commit 3a8117a332c9d3665017e4bbc4631328e7c4f5a1 Author: su-fang Date: Tue Sep 27 19:17:19 2022 +0800 Import Upstream version 2.114.0 diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..d5eb460 --- /dev/null +++ b/.gitignore @@ -0,0 +1,23 @@ +/*-stamp +/debian/*.debhelper* +/debian/debhelper-build-stamp +/debian/files +/debian/lintian.substvars +/debian/lintian/ +/debian/test-out/ +/debian/test.locale/ +/doc/api.html/ +/doc/README +/doc/help.tmp +/doc/lintian.html +/doc/lintian.txt +/l10n/ +/man/man*/ +*.iml +/.idea/ +/.nobackup +*.bak +*.rej +cover_db* +/coverage-report +/TAGS diff --git a/.mailmap b/.mailmap new file mode 100644 index 0000000..e2ec484 --- /dev/null +++ b/.mailmap @@ -0,0 +1,12 @@ +Bastien ROUCARIÈS +Damyan Ivanov +Jakub Wilk +Jean-Michel Vourgère +Jean-Michel Vourgère +Johannes Schauer +Justin B Rye +Justin B Rye +Marcelo Jorge Vieira +Marcelo Jorge Vieira +Raphaël Hertzog +Tobias Quathamer diff --git a/.perlcriticrc b/.perlcriticrc new file mode 100644 index 0000000..2c21c69 --- /dev/null +++ b/.perlcriticrc @@ -0,0 +1,458 @@ +# -*- conf -*- +# the list of checks could perhaps be moved to t/scripts/critic.pl. + +verbose = 1 + +# severity is ignored for our main purposes, see below +severity = 1 + +criticism-fatal = 1 +color = 1 +allow-unsafe = 1 + +# to try some other stuff, uncomment the following +# theme = security || bugs || complexity || maintenance + +# use a whitelist; the disabling config blocks below are for documentation only +only = 1 + +# use separate blocks below instead of long Lines in include +include = + +[BuiltinFunctions::ProhibitBooleanGrep] + +[BuiltinFunctions::ProhibitComplexMappings] + +[BuiltinFunctions::ProhibitLvalueSubstr] + +[BuiltinFunctions::ProhibitReverseSortBlock] + +[BuiltinFunctions::ProhibitShiftRef] + +[BuiltinFunctions::ProhibitSleepViaSelect] + +[BuiltinFunctions::ProhibitStringyEval] +allow_includes = 1 + +[BuiltinFunctions::ProhibitStringySplit] + +[BuiltinFunctions::ProhibitUniversalCan] + +[BuiltinFunctions::ProhibitUniversalIsa] + +[BuiltinFunctions::ProhibitUselessTopic] + +[BuiltinFunctions::ProhibitVoidGrep] + +[BuiltinFunctions::ProhibitVoidMap] + +[BuiltinFunctions::RequireBlockGrep] + +[BuiltinFunctions::RequireBlockMap] + +[BuiltinFunctions::RequireGlobFunction] + +[BuiltinFunctions::RequireSimpleSortBlock] + +[ClassHierarchies::ProhibitAutoloading] + +[ClassHierarchies::ProhibitExplicitISA] + +[ClassHierarchies::ProhibitOneArgBless] + +[-CodeLayout::ProhibitFatCommaNewline] + +[-CodeLayout::ProhibitIfIfSameLine] + +[CodeLayout::ProhibitHardTabs] + +[-CodeLayout::ProhibitParensWithBuiltins] + +[CodeLayout::ProhibitQuotedWordLists] + +[CodeLayout::ProhibitTrailingWhitespace] + +[-CodeLayout::RequireConsistentNewlines] + +[-CodeLayout::RequireFinalSemicolon] + +[CodeLayout::RequireTidyCode] + +[-CodeLayout::RequireTrailingCommaAtNewline] + +[-CodeLayout::RequireTrailingCommas] + +[ControlStructures::ProhibitCStyleForLoops] + +[-ControlStructures::ProhibitCascadingIfElse] + +[-ControlStructures::ProhibitDeepNests] + +[ControlStructures::ProhibitLabelsWithSpecialBlockNames] + +[ControlStructures::ProhibitMutatingListFunctions] + +[ControlStructures::ProhibitNegativeExpressionsInUnlessAndUntilConditions] + +[-ControlStructures::ProhibitPostfixControls] + +[-ControlStructures::ProhibitUnlessBlocks] + +[ControlStructures::ProhibitUnreachableCode] + +[ControlStructures::ProhibitUntilBlocks] + +[ControlStructures::ProhibitYadaOperator] + +[-Compatibility::ConstantPragmaHash] + +[-Compatibility::ConstantLeadingUnderscore] + +[-Compatibility::Gtk2Constants] + +[-Compatibility::PerlMinimumVersionAndWhy] + +[-Compatibility::PodMinimumVersion] + +[-Compatibility::ProhibitUnixDevNull] + +[-Documentation::PodSpelling] + +[-Documentation::ProhibitAdjacentLinks] + +[Documentation::ProhibitDuplicateHeadings] + +[Documentation::ProhibitDuplicateSeeAlso] + +[Documentation::ProhibitBadAproposMarkup] + +[Documentation::ProhibitLinkToSelf] + +[Documentation::ProhibitParagraphEndComma] + +[Documentation::ProhibitParagraphTwoDots] + +[Documentation::ProhibitUnbalancedParens] + +[-Documentation::ProhibitVerbatimMarkup] + +[-Documentation::RequireEndBeforeLastPod] + +[-Documentation::RequireFilenameMarkup] + +[-Documentation::RequireFinalCut] + +[-Documentation::RequireLinkedURLs] + +[Documentation::RequirePackageMatchesPodName] + +[-Documentation::RequirePodAtEnd] + +[-Documentation::RequirePodSections] + +[-ErrorHandling::RequireCarping] + +[-ErrorHandling::RequireCheckingReturnValueOfEval] + +[Community::AmpersandSubCalls] + +[Community::ArrayAssignAref] + +[Community::BarewordFilehandles] + +[Community::ConditionalDeclarations] + +[Community::ConditionalImplicitReturn] + +[Community::DeprecatedFeatures] + +[Community::DiscouragedModules] + +[Community::DollarAB] + +[Community::Each] + +[Community::EmptyReturn] + +[Community::IndirectObjectNotation] + +[Community::LexicalForeachIterator] + +[Community::LoopOnHash] + +[-Community::ModPerl] + +[Community::MultidimensionalArrayEmulation] + +[Community::OpenArgs] + +[Community::OverloadOptions] + +[Community::PackageMatchesFilename] + +[Community::POSIXImports] + +[Community::PreferredAlternatives] + +[Community::Prototypes] + +[Community::StrictWarnings] + +[Community::Threads] + +[Community::Wantarray] + +[Community::WarningsSwitch] + +[Community::WhileDiamondDefaultAssignment] + +[InputOutput::ProhibitBacktickOperators] + +[InputOutput::ProhibitBarewordFileHandles] + +[-InputOutput::ProhibitExplicitStdin] + +[InputOutput::ProhibitInteractiveTest] + +[InputOutput::ProhibitJoinedReadline] + +[-InputOutput::ProhibitOneArgSelect] + +[InputOutput::ProhibitReadlineInForLoop] + +[-InputOutput::ProhibitTwoArgOpen] +# not needed with Community::OpenArgs + +[InputOutput::RequireBracedFileHandleWithPrint] + +[-InputOutput::RequireBriefOpen] + +[-InputOutput::RequireCheckedClose] + +[-InputOutput::RequireCheckedOpen] + +[InputOutput::RequireCheckedSyscalls] +functions = open opendir chdir read readdir readline closedir sysopen sysread sysclose mkdir link pipe readlink unlink rename symlink fork +# possible TODO: close + +[-InputOutput::RequireEncodingWithUTF8Layer] + +[Miscellanea::ProhibitFormats] + +[-Miscellanea::ProhibitTies] + +[Miscellanea::ProhibitUnrestrictedNoCritic] + +[Miscellanea::ProhibitUselessNoCritic] + +[-Miscellanea::TextDomainPlaceholders] + +[-Miscellanea::TextDomainUnused] + +[Modules::ProhibitAutomaticExportation] + +[Modules::ProhibitConditionalUseStatements] + +[Modules::ProhibitEvilModules] + +[-Modules::ProhibitExcessMainComplexity] +# Maybe some day... + +[Modules::ProhibitModuleShebang] + +[Modules::ProhibitMultiplePackages] + +[-Modules::ProhibitPOSIXimport] +# not needed with Community::POSIXImports + +[Modules::ProhibitUseQuotedVersion] + +[Modules::RequireBarewordIncludes] + +[Modules::RequireEndWithOne] + +[Modules::RequireExplicitPackage] + +[-Modules::RequireFilenameMatchesPackage] +# not needed with Community::PackageMatchesFilename + +[Modules::RequireNoMatchVarsWithUseEnglish] + +[-Modules::RequireVersionVar] +# We don't use package versions atm and even if we did, it probably +# won't have full coverage anyway. + +[NamingConventions::Capitalization] + +[NamingConventions::ProhibitAmbiguousNames] + +[Objects::ProhibitIndirectSyntax] + +[References::ProhibitDoubleSigils] + +[-RegularExpressions::ProhibitCaptureWithoutTest] + +[-RegularExpressions::ProhibitComplexRegexes] + +[-RegularExpressions::ProhibitEnumeratedClasses] + +[-RegularExpressions::ProhibitEscapedMetacharacters] + +[RegularExpressions::ProhibitFixedStringMatches] + +[RegularExpressions::ProhibitSingleCharAlternation] + +[RegularExpressions::ProhibitUnusedCapture] + +[RegularExpressions::ProhibitUnusualDelimiters] +allow_all_brackets = 1 + +[RegularExpressions::ProhibitUselessTopic] + +[RegularExpressions::RequireBracesForMultiline] +allow_all_brackets = 1 + +[-RegularExpressions::RequireDotMatchAnything] + +[-RegularExpressions::RequireExtendedFormatting] + +[-RegularExpressions::RequireLineBoundaryMatching] + +[-Subroutines::ProhibitAmpersandSigils] +# not needed with Community::AmpersandSubCalls + +[Subroutines::ProhibitBuiltinHomonyms] + +[-Subroutines::ProhibitExcessComplexity] + +[-Subroutines::ProhibitExplicitReturnUndef] + +[-Subroutines::ProhibitManyArgs] + +[Subroutines::ProhibitNestedSubs] + +[Subroutines::ProhibitReturnSort] + +[-Subroutines::ProhibitSubroutinePrototypes] +# not needed with Community::Prototypes + +[Subroutines::ProhibitUnusedPrivateSubroutines] + +[Subroutines::ProtectPrivateSubs] + +[Subroutines::RequireArgUnpacking] + +[Subroutines::RequireFinalReturn] +terminal_funcs = CORE::exec fatal_error internal_error Lintian::Util::internal_error Die error + +[TestingAndDebugging::ProhibitNoStrict] + +[-TestingAndDebugging::ProhibitNoWarnings] + +[-TestingAndDebugging::ProhibitProlongedStrictureOverride] + +[-TestingAndDebugging::RequireTestLabels] + +[-TestingAndDebugging::RequireUseStrict] +# not needed with Community::StrictWarnings] + +[-TestingAndDebugging::RequireUseWarnings] +# not needed with Community::StrictWarnings] + +[ValuesAndExpressions::ConstantBeforeLt] + +[ValuesAndExpressions::NotWithCompare] + +[-ValuesAndExpressions::ProhibitArrayAssignAref] +# not needed with Community::ArrayAssignAref + +[ValuesAndExpressions::ProhibitBarewordDoubleColon] + +[ValuesAndExpressions::ProhibitCommaSeparatedStatements] + +[-ValuesAndExpressions::ProhibitComplexVersion] + +[-ValuesAndExpressions::ProhibitConstantPragma] + +[ValuesAndExpressions::ProhibitDuplicateHashKeys] + +[ValuesAndExpressions::ProhibitEmptyCommas] + +[ValuesAndExpressions::ProhibitEmptyQuotes] + +[-ValuesAndExpressions::ProhibitEscapedCharacters] + +[ValuesAndExpressions::ProhibitFiletest_f] + +[ValuesAndExpressions::ProhibitImplicitNewlines] + +[ValuesAndExpressions::ProhibitInterpolationOfLiterals] + +[ValuesAndExpressions::ProhibitLeadingZeros] + +[ValuesAndExpressions::ProhibitLongChainsOfMethodCalls] + +[ValuesAndExpressions::ProhibitMagicNumbers] + +[ValuesAndExpressions::ProhibitMismatchedOperators] + +[ValuesAndExpressions::ProhibitMixedBooleanOperators] + +[ValuesAndExpressions::ProhibitNoisyQuotes] + +[ValuesAndExpressions::ProhibitNullStatements] + +[ValuesAndExpressions::ProhibitQuotesAsQuotelikeOperatorDelimiters] + +[ValuesAndExpressions::ProhibitSpecialLiteralHeredocTerminator] + +[ValuesAndExpressions::ProhibitUnknownBackslash] + +[-ValuesAndExpressions::ProhibitVersionStrings] + +[-ValuesAndExpressions::RequireConstantVersion] + +[-ValuesAndExpressions::RequireInterpolationOfMetachars] + +[ValuesAndExpressions::RequireNumberSeparators] + +[-ValuesAndExpressions::RequireNumericVersion] + +[ValuesAndExpressions::RequireQuotedHeredocTerminator] + +[ValuesAndExpressions::RequireUpperCaseHeredocTerminator] + +[ValuesAndExpressions::UnexpandedSpecialLiteral] + +[Variables::ProhibitAugmentedAssignmentInDeclaration] + +[Variables::ProhibitConditionalDeclarations] + +[-Variables::ProhibitEvilVariables] + +[-Variables::ProhibitLocalVars] + +[Variables::ProhibitMatchVars] + +[Variables::ProhibitPackageVars] +add_packages = Devel::Size Module::CoreList Text::Wrap YAML::XS + +[Variables::ProhibitPerl4PackageNames] + +[-Variables::ProhibitPunctuationVars] +# Requires "use English" and our style is against that. + +[Variables::ProhibitReusedNames] + +[Variables::ProhibitUnusedVariables] + +[Variables::ProtectPrivateVars] + +[Variables::RequireInitializationForLocalVars] + +[Variables::RequireLexicalLoopIterators] + +[Variables::RequireLocalizedPunctuationVars] +allow = %ENV %SIG $! $? $0 + +[Variables::RequireNegativeIndices] diff --git a/.perltidyrc b/.perltidyrc new file mode 100644 index 0000000..3eb2839 --- /dev/null +++ b/.perltidyrc @@ -0,0 +1,19 @@ +# -*- conf -*- +# +# Default options for perltidy for proper Perl code reformatting. +# +# This file is based on the one from the rra-c-util package, +# which can be found at . + +-bbao # put line breaks before any operator +-nbbc # don't force blank lines before comments (bad for else blocks) +-ce # cuddle braces around else +-l=79 # usually use 78, but don't want 79-long lines reformatted +-pt=2 # don't add extra whitespace around parentheses +-sbt=2 # ...or square brackets +-sfs # no space before semicolon in for (not that I use this form) +-bar # opening-brace-always-on-right +-sot # avoid lines with isolated opening tokens +-sct # ... same for closing tokens +-fs # allow "perltidy, please don't touch this" sections +-fws # don't add or delete whitespace diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..c598672 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,227 @@ +# How to contribute to Lintian + +This document is intended for prospective and existing contributors. + +The first section will cover how to get started for newcomers. After +that is a section on recommended practices and additional resources. + +## Getting started + +The best way to contribute code to Lintian is to submit merge requests +on [salsa.debian.org][salsa]. First, create an account on Salsa if you +do not have one. You need to configure at least one SSH key. + +The easiest way to file merge requests on Salsa is to fork our team +repository into your private name space. That is done on the website. + +Then you should clone the forked version of Lintian from your private +name space to your local machine. You can find the command for that +under a blue button that says "Clone'. Choose the git protocol (not +HTTPS). + + $ git clone git@salsa.debian.org:${your-namespace}/lintian.git + $ cd lintian + +Create a feature branch for your proposed changes. + + $ git checkout -b my-feature + +### Make Lintian better + +Now you can fix bugs or implement new checks. + +Please commit your changes with suitable explanations in the commit +messages. You can find some examples with: + + $ git log + +Please do not touch debian/changelog. We automatically update that +file at release time from commit messages via `gbp-buildpackage`. + +The first line of your commit message is special. It should make sense +without any context in a list of other, unrelated changes. + +### Tell us how to test your work + +All new tags require unit tests. Lintian's test suite will fail unless +you provide tests for your proposed tags. + +There is a way to exempt your tag from testing, but please do not do +so. + +Our test specifications have two parts. One declares how to build the +test package. The other declares how to run Lintian on it. + +The build instructions are almost completely parameterized. In many +cases, you will not need to copy or modify any templates. For each +test, the build specifications are located in the file +${recipe-dir}/build-spec/fill-values. + +A simple one might look like this: + + Skeleton: upload-native + Testname: pdf-in-etc + Description: Ships a PDF file in /etc + +Such a package would probably be used to trigger a tag about +documentation in a place other than /usr/share/doc. Please do not look +for this test in the test suite; it is ficticious. + +For most tests, we run only the check being tested. That is why the +tests are sorted according to the check to which they belong. + +Please name your tests after what they contain. Do not name them after +the tag they are testing. Many tags use two or more tests to exercise +subtle variations in the trigger conditions. + +The second part of each test describes how to run Lintian and which +tags to expect. Evaluation specifications are located in the file +${recipe-dir}/eval/desc. + +A simple evaluation specification might look like this: + + Testname: pdf-in-etc + Check: documentation + +As noted, this will only run the specified check. It eliminates all +nuisance tags, such as debian-watch-does-not-check-gpg-signature +(unless you are working on the check debian/watch). + +Another file in that same directory shows the tags expected to be +triggered. Only tags from the selected check will show up there. + +You should scrupulously examine that file to make sure your tags show +up exactly the way you want, but you do not have to write it +yourself. The test suite will do it for you during the interactive +calibration in the next step. + +### Calibrate your tests + +To build the test package you probably have to install all test +prerequisites from d/tests/control. Usually, that can be done with: + + $ autopkgtest -B + +If anyhing else is missing, you may also have to install the build +prerequisites. That can be done with: + + $ apt build-dep . + +Both of these commands have to be run with superuse privileges (root). + +As you might imagine, Lintian comes with a large number of test +packages. You have to build all of them locally. It takes time the +first time around but is much faster in subsequent runs. You can build +the test packages with: + + $ private/build-test-packages + +Now, please calibrate your tests. For the documentation check the +command would be: + + $ private/runtests --onlyrun=check:documentation + +Make sure to select the check you are actually modifying. + +The interactive calibration will add expected tags to your test +specifications. In many cases, it is best to "accept all" and examine +the changes in git. In complex cases, you can use git add -i to accept +only the ones you need. + +This is a crucial step. Please make sure the expected tags are +meaningful. We also pay close attention to these tags when we look at +your merge request. + +### Run the full test suite + +Finally, please start the entire test suite. It will run a variety of +style and consistency tests. The most common issue is that you have to +run perltidy. + +We configure perltidy in a special way. Please run it from the +repository's base directory. Otherwise it will not find the custom +configuration, and the test suite will not pass. + +### Submit your merge request + +Finally, please push your changes to the Lintian repo in your own name +space. You may end up doing that multiple times, It will eventually +require the force switch. + + $ git push -f + +That command will respond with the single most important message in +this document. Salsa will ask you to create a merge request. Just +click the link provided in the terminal. + +Your browser will open a draft merge request. For a single commit, the +text field is populated with your commit message. Otherwise, please +explain the purpose of your commit series and hit "Submit". + +The push command also started the standard CI pipeline on Salsa, which +is very comprehensive. It builds Debian packages and runs autopkgtest, +among many other jobs. + +We will generally not accept merge requests unless the CI pipeline +passes sucessfully. You can see the status on Salsa in two places: in +the MR and in your own repo. The pipeline takes about one hundred +minutes. + +There is no need, however, to wait for Salsa CI pipeline before +submitting your merge request. If you followed all the steps above, it +will very likely pass. + +## Other ways to submit changes + +Please make an effort to submit your changes to Lintian by creating a +[merge-request][merge-request] on [Salsa][salsa]. + +Alternatively, submit your changes to the Debian Bug Tracker by reporting +a bug against the `lintian` package On a Debian system, this can usually +be done by using `reportbug`: + + $ reportbug lintian + +Otherwise send a plain text mail to "" with +the first line being `Package: lintian`: + +You are welcome to attach the changes to the bug report or link to a +git branch. If you use attachments, please generate the changes via +the `git format-patch` command. + +[merge-request]: https://salsa.debian.org/lintian/lintian/merge_requests +[salsa]: https://salsa.debian.org/ + +## Recommended practices + +### The "master" branch is "always releasable" + +We try to keep the "master" branch in a clean state that is suitable +for release at all times. + +For topic branches that are not yet suitable for release, please point +us to your personal repository on Salsa or file a merge request with +WIP: in the title. + +### Backport requirements + +There are some limits to which changes Lintian can accept as it needs +to be backportable to the current Debian stable release. As such, +all dependencies must be satisfied in Debian stable or stable-backports. + +There are several reasons for this requirement. The two primary being: + + * Lintian is run on various debian.org hosts which are all running + Debian stable (lintian.debian.org and ftp-master.debian.org) + + * A lot of developers use stable and will easy access to an up to date + lintian. + +Accordingly, we have continuous integration job running on +jenkins.debian.net to test this. + +### Additional resources + + * perldoc [doc/tutorial/Lintian/Tutorial.pod](doc/tutorial/Lintian/Tutorial.pod) + * perldoc [doc/README.developers](doc/README.developers) + * [doc/releases.md](doc/releases.md) diff --git a/COPYING b/COPYING new file mode 100644 index 0000000..d511905 --- /dev/null +++ b/COPYING @@ -0,0 +1,339 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Lesser General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + , 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. diff --git a/README.md b/README.md new file mode 100644 index 0000000..bd90186 --- /dev/null +++ b/README.md @@ -0,0 +1,105 @@ +Lintian - Static Debian package analysis tool +============================================= + +Lintian is a static analysis tool for finding many bugs, policy +violations and other issues in Debian based packages. It can process +binary Debian packages (.deb), micro/installer packages (.udeb), +Debian source packages (.dsc) and (to a limited degree) the "buildinfo" +and "changes" files. + + +Running Lintian +=============== + +Running Lintian is as simple as invoking + + $ lintian path/to/pkg_version_arch.changes + +Alternatively, you can pass Lintian binary/udeb or dsc files directly +instead of the .changes file. Lintian is designed to work directly +from the source tree (simply use "frontend/lintian" itself). + +For information about command options, please run lintian (or +lintian-info) with "--help". Alternatively, you can also read the +manpages lintian(1) and lintian-info(1). + +Advice / Tips and Tricks +------------------------ + +If there is a tag you are not familiar with, you can use "--info" or +lintian-info to get more information: + + $ lintian-info -t no-version-field + +If you want to enable all tags, simply use the "Evil and pedantic" +mnemonic: + + $ lintian -EvIL +pedantic path/to/pkg_version_arch.changes + +You may want to drop the "-v", which may make Lintian more verbose +than you would like. Also, keep in mind that "-E" enables +"experimental" tags and "-L +pedantic" enables some very pedantic +tags. + +Lintian is not always right! Static analysis involves a trade-off +between "accuracy" and CPU/memory usage. Furthermore, in some cases, +certain packages trigger a corner case where the Debian Policy gives +more leeway than Lintian does. + +If you have installed Lintian via the "lintian" Debian package, you +can find the Lintian User's Manual in: + + $ sensible-browser /usr/share/doc/lintian/lintian.html + # or in txt format + $ less /usr/share/doc/lintian/lintian.txt.gz + + +Compiling Lintian +================= + +Lintian is written in pure Perl and therefore does not require any +"building" at all. Consequently, Lintian currently does not have a +build system. Instead it relies on its Debian build system +(implemented in debian/rules) and debhelper. Thus, on Debian-based +systems, installing the build dependencies (see debian/control) and +running: + + $ dpkg-buildpackage + +will provide you with a "lintian" Debian package. + +So far there has been little work in providing a stand-alone build +system as Lintian requires a fair share of "Debian specific" tools and +libraries, including the "Dpkg" and "AptPkg" Perl modules. + +We are willing to accept and maintain a stand-alone build system for +Lintian. Where not intrusive, we may also be willing to accept +alternative dependencies for "Debian specific" libraries/tools. + +Developing/Patching Lintian +=========================== + +If you are interested in developing patches for Lintian or just +writing your own Lintian checks, please review +[CONTRIBUTING.md](CONTRIBUTING.md). + +Feedback +======== + +Please file bugs against the "lintian" package in the Debian Bug +Tracker. We recommend using reportbug(1) for filing bugs, but +in its absence you send a [mail to the BTS][bts-report-bug]. + +Any comments, critics, or suggestions about Lintian or related topics +are highly appreciated by the authors! Please contact +. Thanks! + +Please note that all data submitted to the Debian Bug Tracker and the +address will be available to the general +public. Should you be aware of a severe non-disclosed security issue +in Lintian, then please contact the +[Debian Security Team][report-security-issue] instead. + +[bts-report-bug]: https://www.debian.org/Bugs/Reporting + +[report-security-issue]: https://www.debian.org/security/faq#contact diff --git a/bin/lintian b/bin/lintian new file mode 100755 index 0000000..7d3704e --- /dev/null +++ b/bin/lintian @@ -0,0 +1,1055 @@ +#!/usr/bin/perl +# +# Lintian -- Debian package checker +# +# Copyright (C) 1998 Christian Schwarz and Richard Braakman +# Copyright (C) 2013 Niels Thykier +# Copyright (C) 2017-2019 Chris Lamb +# Copyright (C) 2020 Felix Lechner +# +# This program is free software. It is distributed under the terms of +# the GNU General Public License as published by the Free Software +# Foundation; either version 2 of the License, or (at your option) any +# later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +use v5.20; +use warnings; +use utf8; + +use Cwd qw(realpath); +use File::Basename qw(dirname); + +# neither Path::This nor lib::relative are in Debian +use constant THISFILE => realpath __FILE__; +use constant THISDIR => dirname realpath __FILE__; + +# use Lintian modules that belong to this program +use lib THISDIR . '/../lib'; + +# substituted during package build +my $LINTIAN_VERSION; + +use Carp qw(croak confess verbose); +use Config::Tiny; +use Const::Fast; +use File::BaseDir qw(config_files); +use Getopt::Long (); +use IO::Interactive qw(is_interactive); +use List::Compare; +use List::SomeUtils qw(any none first_value); +use Path::Tiny; +use POSIX qw(:sys_wait_h); +use Syntax::Keyword::Try; +use Term::ReadKey; +use Unicode::UTF8 qw(encode_utf8 decode_utf8); + +use Lintian::Changelog; +use Lintian::IPC::Run3 qw(safe_qx); +use Lintian::Pool; +use Lintian::Processable::Installable; +use Lintian::Processable::Buildinfo; +use Lintian::Processable::Changes; +use Lintian::Processable::Source; +use Lintian::Profile; +use Lintian::Version qw(guess_version); + +const my $EMPTY => q{}; +const my $SPACE => q{ }; +const my $NEWLINE => qq{\n}; +const my $COMMA => q{,}; +const my $SLASH => q{/}; +const my $DOT => q{.}; +const my $DOUBLE_DOT => q{..}; +const my $PLUS => q{+}; +const my $EQUAL => q{=}; +const my $HYPHEN => q{-}; +const my $OPEN_PIPE => q{-|}; + +const my $DEFAULT_TAG_LIMIT => 4; +const my $DEFAULT_OUTPUT_WIDTH => 80; + +# place early, may need original environment to determine terminal blacklist +my $hyperlinks_capable = is_interactive; + +# Globally ignore SIGPIPE. We'd rather deal with error returns from write +# than randomly delivered signals. +$SIG{PIPE} = 'IGNORE'; + +my $TERMINAL_WIDTH; +($TERMINAL_WIDTH, undef, undef, undef) = GetTerminalSize() + if is_interactive; +$TERMINAL_WIDTH //= $DEFAULT_OUTPUT_WIDTH; + +my %PRESERVE_ENV = map { $_ => 1 } qw( + DEB_VENDOR + DEBRELEASE_DEBS_DIR + HOME + NO_COLOR + LANG + LC_ALL + LC_MESSAGES + PATH + TMPDIR + XDG_CACHE_HOME + XDG_CONFIG_DIRS + XDG_CONFIG_HOME + XDG_DATA_DIRS + XDG_DATA_HOME +); + +my @disallowed= grep { !exists $PRESERVE_ENV{$_} && !/^LINTIAN_/ } keys %ENV; + +delete $ENV{$_} for @disallowed; + +# PATH may be unset in some environments; use sane default +$ENV{PATH} //= '/bin:/usr/bin'; + +# needed for tar +$ENV{LC_ALL} = 'C'; +$ENV{TZ} = $EMPTY; + +$ENV{LINTIAN_BASE} = realpath(THISDIR . '/..') + // die encode_utf8('Cannot resolve LINTIAN_BASE'); + +$ENV{LINTIAN_VERSION} = $LINTIAN_VERSION // guess_version($ENV{LINTIAN_BASE}); +die encode_utf8('Unable to determine the version automatically!?') + unless length $ENV{LINTIAN_VERSION}; + +if (my $coverage_arg = $ENV{LINTIAN_COVERAGE}) { + my $p5opt = $ENV{PERL5OPT} // $EMPTY; + $p5opt .= $SPACE unless $p5opt eq $EMPTY; + $ENV{PERL5OPT} = "${p5opt} ${coverage_arg}"; +} + +my @getoptions = qw( + allow-root! + cfg=s + check|c + check-part|C=s@ + color=s + debug|d+ + default-display-level + display-experimental|E! + display-level|L=s@ + display-info|I + display-source=s@ + dont-check-part|X=s@ + exp-output:s + fail-on=s@ + ftp-master-rejects|F + help|h + hide-overrides + hyperlinks=s + ignore-lintian-env + include-dir=s@ + info|i! + jobs|j=i + no-cfg + no-override|o + no-tag-display-limit + output-width=i + packages-from-file=s + pedantic + perf-debug + print-version + profile=s + quiet|q + show-overrides! + status-log=s + suppress-tags=s@ + suppress-tags-from-file=s + tag-display-limit=i + tags|T=s@ + tags-from-file=s + user-dirs! + verbose|v + version|V +); + +my %command_line; + +Getopt::Long::Configure('default', 'bundling', + 'no_getopt_compat','no_auto_abbrev','permute'); + +Getopt::Long::GetOptions(\%command_line, @getoptions) + or die encode_utf8("error parsing options\n"); + +my @basenames = map { path($_)->basename } @ARGV; +$0 = join($SPACE, THISFILE, @basenames); + +if (exists $command_line{'version'}) { + say encode_utf8("Lintian v$ENV{LINTIAN_VERSION}"); + exit; +} + +if (exists $command_line{'print-version'}) { + say encode_utf8($ENV{LINTIAN_VERSION}); + exit; +} + +show_help() + if exists $command_line{help}; + +if (exists $command_line{'hide-overrides'}) { + $command_line{'show-overrides'} = 0; + warn encode_utf8( +"A future release will drop --hide-overrides; please use --no-show-overrides instead.\n" + ); +} + +if (exists $command_line{'no-tag-display-limit'}) { + $command_line{'tag-display-limit'} = 0; + warn encode_utf8( +"A future release will drop --no-tag-display-limit; please use '--tag-display-limit 0' instead.\n" + ); +} + +my $LINTIAN_CFG = $command_line{cfg}; + +$LINTIAN_CFG ||= $ENV{LINTIAN_CFG} + if length $ENV{LINTIAN_CFG} && -e $ENV{LINTIAN_CFG}; + +unless ($command_line{'no-user-dirs'}) { + + my @user_configs; + + # XDG user config + push(@user_configs, config_files('lintian/lintianrc')); + + # legacy per-user config + push(@user_configs, "$ENV{HOME}/.lintianrc") + if length $ENV{HOME}; + + # system wide user config + push(@user_configs, '/etc/lintianrc'); + + $LINTIAN_CFG ||= first_value { length && -e } @user_configs; +} + +$LINTIAN_CFG = $EMPTY + if $command_line{'no-cfg'}; + +my %config; + +# some environment variables can be set from the config file +my @ENV_FROM_CONFIG = qw( + TMPDIR +); + +if (length $LINTIAN_CFG) { + + # for keys appearing multiple times, now uses the last value + my $object = Config::Tiny->read($LINTIAN_CFG, 'utf8'); + my $error = Config::Tiny->errstr; + die encode_utf8( + "syntax error in configuration file $LINTIAN_CFG: $error\n") + if length $error; + + # used elsewhere to check for values already set + %config = %{$object->{_} // {}}; + + my @allowed = qw( + color + display-experimental + display-info + display-level + hyperlinks + info + jobs + LINTIAN_PROFILE + override + pedantic + profile + quiet + show-overrides + suppress-tags + suppress-tags-from-file + tag-display-limit + TMPDIR + verbose + ); + + my $knownlc + = List::Compare->new([keys %config], [@allowed, @ENV_FROM_CONFIG]); + my @unknown = $knownlc->get_Lonly; + die encode_utf8( + "Unknown setting in $LINTIAN_CFG: ". join($SPACE, @unknown). $NEWLINE) + if @unknown; +} + +# substitute home directory +s{\$HOME/}{$ENV{HOME}/}g for values %config; +s{\~/}{$ENV{HOME}/}g for values %config; + +# option inverted in config file +$config{'no-override'} = !$config{'no-override'} + if exists $config{'no-override'}; + +my @GETOPT_ARRAYS = qw( + display-level + suppress-tags +); + +# convert some strings to array references +for my $name (@GETOPT_ARRAYS) { + if (exists $config{$name}) { + $config{$name} = [$config{$name}]; + } else { + $config{$name} = []; + } +} + +# Translate boolean strings to "0" or "1"; ignore +# errors as not all values are (intended to be) +# booleans. +my $booleanlc + = List::Compare->new([keys %config], [qw(jobs tag-display-limit)]); +eval { $config{$_} = parse_boolean($config{$_}); }for $booleanlc->get_Lonly; + +# our defaults +my %selected = ( + 'check-part' => [], + 'color' => 'auto', + 'debug' => 0, + 'display-level' => [], + 'display-source' => [], + 'dont-check-part' => [], + 'fail-on' => [qw(error)], + 'include-dir' => [], + 'jobs' => default_jobs(), + 'output-width' => $TERMINAL_WIDTH, + 'tags' => [], + 'suppress-tags' => [], + 'user-dirs' => 1, + 'verbose' => 0, +); + +$selected{$_} = $config{$_} for keys %config; + +my @MUTUAL_OPTIONS = ( + [qw(verbose quiet)], + [qw(default-display-level display-level display-info pedantic)], +); + +# for precedence of command line +for my $exclusive (@MUTUAL_OPTIONS) { + + if (any { defined $command_line{$_} } @{$exclusive}) { + my @scalars = grep { ref $selected{$_} eq 'SCALAR' } @{$exclusive}; + delete $selected{$_} for @scalars; + + my @arrays = grep { ref $selected{$_} eq 'ARRAY' } @{$exclusive}; + $selected{$_} = [] for @arrays; + } +} + +$selected{$_} = $command_line{$_} for keys %command_line; + +@{$selected{'display-level'}} + = split(/\s*,\s*/, join($COMMA, @{$selected{'display-level'}})); + +my @display_level; + +push(@display_level,[$EQUAL, '>=', 'warning']) + if $selected{'default-display-level'}; + +push(@display_level, [$PLUS, '>=', 'info']) + if $selected{'display-info'}; + +push(@display_level, [$PLUS, $EQUAL, 'pedantic']) + if $selected{'pedantic'}; + +sub display_classificationtags { + push(@display_level, [$PLUS, $EQUAL, 'classification']); + return; +} + +for my $level (@{$selected{'display-level'}}) { + + my $operator; + if ($level =~ s/^([+=-])//) { + $operator = $1; + } + + my $relation; + if ($level =~ s/^([<>]=?|=)//) { + $relation = $1; + } + + my $severity = $level; + $operator //= $EQUAL; + $relation //= $EQUAL; + + push(@display_level, [$operator, $relation, $severity]); +} + +@{$selected{'display-source'}} + = split(/\s*,\s*/, join($COMMA, @{$selected{'display-source'}})); + +@{$selected{'check-part'}} + = split(/\s*,\s*/, join($COMMA, @{$selected{'check-part'}})); +@{$selected{'dont-check-part'}} + = split(/\s*,\s*/, join($COMMA, @{$selected{'dont-check-part'}})); + +@{$selected{tags}} = split(/\s*,\s*/, join($COMMA, @{$selected{tags}})); +@{$selected{'suppress-tags'}} + = split(/\s*,\s*/, join($COMMA, @{$selected{'suppress-tags'}})); + +if (length $selected{'tags-from-file'}) { + + my @lines = path($selected{'tags-from-file'})->lines_utf8; + for my $line (@lines) { + + # trim both ends + $line =~ s/^\s+|\s+$//g; + + next + unless length $line; + next + if $line =~ /^\#/; + + my @activate = split(/\s*,\s*/, $line); + push(@{$selected{tags}}, @activate); + } +} + +if (length $selected{'suppress-tags-from-file'}) { + + my @lines = path($selected{'suppress-tags-from-file'})->lines_utf8; + for my $line (@lines) { + + # trim both ends + $line =~ s/^\s+|\s+$//g; + + next + unless length $line; + next + if $line =~ /^\#/; + + my @suppress = split(/\s*,\s*/, $line); + push(@{$selected{'suppress-tags'}}, @suppress); + } +} + +my $exit_code = 0; + +# root permissions? +# check if effective UID is 0 +warn encode_utf8("running with root privileges is not recommended!\n") + if $> == 0 && !$selected{'allow-root'}; + +if ($selected{'ignore-lintian-env'}) { + delete($ENV{$_}) for grep { m/^LINTIAN_/ } keys %ENV; +} + +# option --all and packages specified at the same time? +if ($selected{'packages-from-file'} && $#ARGV+1 > 0) { + warn encode_utf8( +"option --packages-from-file cannot be mixed with package parameters!\n" + ); + warn encode_utf8("(will ignore --packages-from-file option)\n"); + + delete($selected{'packages-from-file'}); +} + +@{$selected{'fail-on'}} = split(/,/, join($COMMA, @{$selected{'fail-on'}})); +my @known_fail_on = qw( + error + warning + info + pedantic + experimental + override + none +); +my $fail_on_lc = List::Compare->new($selected{'fail-on'}, \@known_fail_on); +my @unknown_fail_on = $fail_on_lc->get_Lonly; +die encode_utf8("Unrecognized fail-on argument: @unknown_fail_on\n") + if @unknown_fail_on; + +if (any { $_ eq 'none' } @{$selected{'fail-on'}}) { + + die encode_utf8( +"Cannot combine 'none' with other conditions: @{$selected{'fail-on'}}\n" + )if @{$selected{'fail-on'}} > 1; + + $selected{'fail-on'} = []; +} + +# environment variables override settings in conf file, so load them now +# assuming they were not set by cmd-line options +for my $var (@ENV_FROM_CONFIG) { +# note $selected{$var} will usually always exists due to the call to GetOptions +# so we have to use "defined" here + $selected{$var} = $ENV{$var} if $ENV{$var} && !defined $selected{$var}; +} + +my %output + = map { split(/=/) } split(/,/, ($selected{'exp-output'} // $EMPTY)); +$selected{'output-format'} = lc($output{format} // 'ewi'); + +my $PROFILE = Lintian::Profile->new; + +# dies on error +$PROFILE->load( + $selected{profile}, + $selected{'include-dir'}, + !$command_line{'no-user-dirs'} +); +say {*STDERR} encode_utf8('Using profile ' . $PROFILE->name . $DOT) + if $selected{debug}; + +if ($selected{'ftp-master-rejects'}) { + say {*STDERR} + encode_utf8( + 'But only with tags enabled from the FTP Master Auto-Reject list.') + if $selected{debug}; + + my $rejection = $PROFILE->data->auto_rejection; + + my @certain = @{$rejection->certain}; + my @preventable = @{$rejection->preventable}; + + # disable all tags + $PROFILE->disable_tag($_) for $PROFILE->known_tags; + + # enable the ones they want + $PROFILE->enable_tag($_) for (@certain, @preventable); + + # no overrides allowed + $PROFILE->set_durable($_, 1) for @certain; + + # overrides okay + $PROFILE->set_durable($_, 0) for @preventable; +} + +my $envlc = List::Compare->new([keys %config], \@ENV_FROM_CONFIG); +my @from_file = $envlc->get_intersection; + +my @already = grep { defined $ENV{$_} } @from_file; +warn encode_utf8( + 'The environment overrides these settings in the configuration file: ' + . join($SPACE, @already) + . $NEWLINE) + if @already; + +my @not_yet = grep { !defined $ENV{$_} } @from_file; +if (@not_yet) { + say {*STDERR} + encode_utf8('Setting environment variables from configuration file: ' + . join($SPACE, @not_yet)) + if $selected{debug}; +} +$ENV{$_} = $config{$_} for @not_yet; + +die encode_utf8("The color value must be one of auto, always, or never.\n") + unless (any { $selected{color} eq $_ } qw(auto always never)); + +$selected{hyperlinks} //= 'off' + if $selected{color} eq 'never'; + +# change to 'on' after gcc's terminal blacklist was implemented here +$selected{hyperlinks} //= 'on'; + +die encode_utf8("The hyperlink value must be on or off\n") + unless any { $selected{hyperlinks} eq $_ } qw(on off); + +$selected{hyperlinks} = $hyperlinks_capable && $selected{hyperlinks} eq 'on'; + +if ($selected{color} eq 'always') { + $selected{color} = 1; +} elsif (exists $ENV{NO_COLOR}) { + $selected{color} = 0; +} elsif ($selected{color} eq 'auto' && is_interactive) { + $selected{color} = 1; +} else { + $selected{color} = 0; +} + +$selected{verbose} = 0 + if $selected{quiet}; + +if ($selected{verbose} || !is_interactive) { + $selected{'tag-display-limit'} //= 0; +} else { + $selected{'tag-display-limit'} //= $DEFAULT_TAG_LIMIT; +} + +if ($selected{debug}) { + $selected{verbose} = 1; + $ENV{LINTIAN_DEBUG} = $selected{debug}; + $SIG{__DIE__} = sub { + confess(map { encode_utf8($_) } @_); + }; +} + +# check for arguments +unless (@ARGV || $selected{'packages-from-file'}) { + + my $ok = 0; + # If debian/changelog exists, assume an implied + # "../__.changes" (or + # "../__source.changes"). + if (-e 'debian/changelog') { + my $file = _find_changes(); + push @ARGV, $file; + $ok = 1; + } + + show_help() + unless $ok; +} + +if ($selected{debug}) { + say {*STDERR} encode_utf8("Lintian v$ENV{LINTIAN_VERSION}"); + say {*STDERR} encode_utf8("Lintian root directory: $ENV{LINTIAN_BASE}"); + say {*STDERR} encode_utf8("Configuration file: $LINTIAN_CFG"); +} + +if (defined $selected{LINTIAN_PROFILE}) { + warn encode_utf8( + "Please use 'profile' in config file; LINTIAN_PROFILE is obsolete.\n"); + $selected{profile} //= $selected{LINTIAN_PROFILE}; + delete $selected{LINTIAN_PROFILE}; +} + +# if tags are listed explicitly (--tags) then show them even if +# they are pedantic/experimental etc. However, for --check-part +# people explicitly have to pass the relevant options. + +if (@{$selected{'check-part'}} || @{$selected{tags}}) { + + $PROFILE->disable_tag($_) for $PROFILE->enabled_tags; + + if (@{$selected{tags}}) { + $selected{'display-experimental'} = 1; + + # discard current display level; get everything + @display_level + = ([$PLUS, '>=', 'pedantic'], [$PLUS, $EQUAL, 'classification']); + + $PROFILE->enable_tag($_) for @{$selected{tags}}; + + } else { + for my $check_name (@{$selected{'check-part'}}) { + if ($check_name eq 'all') { + my @tags = map { @{$PROFILE->tag_names_for_check->{$_} // []} } + $PROFILE->known_checks; + $PROFILE->enable_tag($_) for @tags; + next; + } + + die encode_utf8("Unrecognized check (via -C): $check_name\n") + unless exists $PROFILE->check_module_by_name->{$check_name}; + + $PROFILE->enable_tag($_) + for @{$PROFILE->tag_names_for_check->{$check_name} // []}; + } + } + +} elsif (@{$selected{'dont-check-part'}}) { + # we are disabling checks + for my $check_name (@{$selected{'dont-check-part'}}) { + + die encode_utf8("Unrecognized check (via -X): $check_name\n") + unless exists $PROFILE->check_module_by_name->{$check_name}; + + $PROFILE->disable_tag($_) + for @{$PROFILE->tag_names_for_check->{$check_name} // []}; + } +} + +# ignore --suppress-tags when used with --tags. +if (@{$selected{'suppress-tags'}} && !@{$selected{tags}}) { + $PROFILE->disable_tag($_) for @{$selected{'suppress-tags'}}; +} + +# initialize display level settings; dies on error +$PROFILE->display(@{$_}) for @display_level; + +my @subjects; +push(@subjects, @ARGV); + +if ($selected{'packages-from-file'}){ + my $fd = open_file_or_fd($selected{'packages-from-file'}, '<'); + + while (my $bytes = <$fd>) { + my $line = decode_utf8($bytes); + chomp $line; + + next + if $line =~ /^\s*$/; + + push(@subjects, $line); + } + + # close unless it is STDIN (else we will see a lot of warnings + # about STDIN being reopened as "output only") + close($fd) + unless fileno($fd) == fileno(STDIN); +} + +my $pool = Lintian::Pool->new; + +for my $subject (@subjects) { + die encode_utf8("$subject is not a readable file\n") unless -r $subject; + + # in ubuntu, automatic dbgsym packages end with .ddeb + die encode_utf8( +"bad package file name $subject (neither .deb, .udeb, .ddeb, .changes, .dsc or .buildinfo file)\n" + ) unless $subject =~ /\.(?:[u|d]?deb|dsc|changes|buildinfo)$/; + + try { + # create a new group + my $group = Lintian::Group->new; + $group->pooldir($pool->basedir); + $group->profile($PROFILE); + + my $processable = create_processable_from_file($subject); + $group->add_processable($processable); + + my $parent = path($subject)->parent->stringify; + + my @files; + + # pull in any additional files + @files = keys %{$processable->files} + if $processable->can('files'); + + for my $basename (@files) { + + # ignore traversal attempts + next + if $basename =~ m{/}; + + die encode_utf8("$parent/$basename does not exist, exiting\n") + unless -e "$parent/$basename"; + + # only care about some files; ddeb is ubuntu dbgsym + next + unless $basename =~ /\.[ud]?deb$/ + || $basename =~ /\.dsc$/ + || $basename =~ /\.buildinfo$/; + + my $additional = create_processable_from_file("$parent/$basename"); + $group->add_processable($additional); + } + + $pool->add_group($group); + + } catch { + warn encode_utf8("Skipping $subject: $@\n"); + $exit_code = 1; + } +} + +$pool->process($PROFILE, \$exit_code, \%selected); + +exit $exit_code; + +=item create_processable_from_file + +=cut + +sub create_processable_from_file { + my ($path) = @_; + + croak encode_utf8("Cannot resolve $path: $!") + unless -e $path; + + my $processable; + + if ($path =~ /\.dsc$/) { + $processable = Lintian::Processable::Source->new; + + } elsif ($path =~ /\.buildinfo$/) { + $processable = Lintian::Processable::Buildinfo->new; + + } elsif ($path =~ /\.d?deb$/) { + # in ubuntu, automatic dbgsym packages end with .ddeb + $processable = Lintian::Processable::Installable->new; + $processable->type('binary'); + + } elsif ($path =~ /\.udeb$/) { + $processable = Lintian::Processable::Installable->new; + $processable->type('udeb'); + + } elsif ($path =~ /\.changes$/) { + $processable = Lintian::Processable::Changes->new; + + } else { + croak encode_utf8("$path is not a known type of package"); + } + + $processable->init_from_file($path); + + return $processable; +} + +=item parse_boolean (STR) + +Attempt to parse STR as a boolean and return its value. +If STR is not a valid/recognised boolean, the sub will +invoke croak. + +The following values recognised (string checks are not +case sensitive): + +=over 4 + +=item The integer 0 is considered false + +=item Any non-zero integer is considered true + +=item "true", "y" and "yes" are considered true + +=item "false", "n" and "no" are considered false + +=back + +=cut + +sub parse_boolean { + my ($str) = @_; + + return $str == 0 ? 0 : 1 + if $str =~ /^-?\d++$/; + + $str = lc $str; + + return 1 + if $str eq 'true' || $str =~ m/^y(?:es)?$/; + + return 0 + if $str eq 'false' || $str =~ m/^no?$/; + + croak encode_utf8("'$str' is not a valid boolean value"); +} + +sub _find_changes { + # read bytes to side-step any encoding errors + my $contents = path('debian/changelog')->slurp; + my $changelog = Lintian::Changelog->new; + $changelog->parse($contents); + my @entries = @{$changelog->entries}; + my $latest = @entries ? $entries[0] : undef; + my ($source, $version); + my $changes; + my @archs; + my @dirs = ($DOUBLE_DOT, '../build-area', '/var/cache/pbuilder/result'); + + unshift(@dirs, $ENV{DEBRELEASE_DEBS_DIR}) + if exists $ENV{DEBRELEASE_DEBS_DIR}; + + if (not $latest) { + my @errors = @{$changelog->errors}; + if (@errors) { + warn encode_utf8("Cannot parse debian/changelog due to errors:\n"); + for my $error (@errors) { + warn encode_utf8("$error->[2] (line $error->[1])\n"); + } + } else { + warn encode_utf8("debian/changelog does not have any data?\n"); + } + exit 1; + } + $version = $latest->Version; + $source = $latest->Source; + unless (defined $version && defined $source) { + $version //= ''; + $source //= ''; + warn encode_utf8( + "Cannot determine source and version from debian/changelog:\n"); + warn encode_utf8("Source: $source\n"); + warn encode_utf8("Version: $source\n"); + exit 1; + } + # remove the epoch + $version =~ s/^\d+://; + if (exists $ENV{DEB_BUILD_ARCH}) { + push(@archs, decode_utf8($ENV{DEB_BUILD_ARCH})); + } else { + my $arch = decode_utf8(safe_qx('dpkg', '--print-architecture')); + chomp $arch; + push(@archs, $arch) if length $arch; + } + push(@archs, decode_utf8($ENV{DEB_HOST_ARCH})) + if exists $ENV{DEB_HOST_ARCH}; + # Maybe cross-built for something dpkg knows about... + my @command = qw{dpkg --print-foreign-architectures}; + open(my $foreign, $OPEN_PIPE, @command) + or die encode_utf8("Cannot open pipe to @command"); + + while (my $bytes = <$foreign>) { + my $line = decode_utf8($bytes); + chomp($line); + # Skip already attempted architectures (e.g. via DEB_BUILD_ARCH) + next + if any { $_ eq $line } @archs; + push(@archs, $line); + } + close($foreign); + push @archs, qw(multi all source); + for my $dir (@dirs) { + for my $arch (@archs) { + $changes = "$dir/${source}_${version}_${arch}.changes"; + return $changes if -e $changes; + } + } + + warn encode_utf8( +"Cannot find a changes file for ${source}/${version}. It would be named like:\n" + ); + + warn encode_utf8(" ${source}_${version}_${_}.changes\n") for @archs; + + warn encode_utf8(" in any of those places:\n"); + warn encode_utf8(" $_\n") for @dirs; + + exit 0; +} + +=item open_file_or_fd + +=cut + +# open_file_or_fd(TO_OPEN, MODE) +# +# Open a given file or FD based on TO_OPEN and MODE and returns the +# open handle. Will croak / throw a trappable error on failure. +# +# MODE can be one of "<" (read) or ">" (write). +# +# TO_OPEN is one of: +# * "-", alias of "&0" or "&1" depending on MODE +# * "&N", reads/writes to the file descriptor numbered N +# based on MODE. +# * "+FILE" (MODE eq '>' only), open FILE in append mode +# * "FILE", open FILE in read or write depending on MODE. +# Note that this will truncate the file if MODE +# is ">". +sub open_file_or_fd { + my ($to_open, $mode) = @_; + + my $fd; + # autodie trips this for some reasons (possibly fixed + # in v2.26) + no autodie qw(open); + if ($mode eq '<') { + if ($to_open eq $HYPHEN || $to_open eq '&0') { + $fd = \*STDIN; + } elsif ($to_open =~ m/^\&\d+$/) { + open($fd, '<&=', substr($to_open, 1)) + or die encode_utf8("fdopen $to_open for reading: $!\n"); + } else { + open($fd, '<', $to_open) + or die encode_utf8("open $to_open for reading: $!\n"); + } + + } elsif ($mode eq '>') { + if ($to_open eq $HYPHEN || $to_open eq '&1') { + $fd = \*STDOUT; + } elsif ($to_open =~ m/^\&\d+$/) { + open($fd, '>&=', substr($to_open, 1)) + or die encode_utf8("fdopen $to_open for writing: $!\n"); + } else { + $mode = ">$mode" if $to_open =~ s/^\+//; + open($fd, $mode, $to_open) + or + die encode_utf8("open $to_open for write/append ($mode): $!\n"); + } + + } else { + croak encode_utf8("Invalid mode '$mode' for open_file_or_fd"); + } + + return $fd; +} + +=item default_jobs + +=cut + +sub default_jobs { + + my $cpus = decode_utf8(safe_qx('nproc')); + + return 2 + unless $cpus =~ m/^\d+$/; + + # could be 2x + return $cpus + 1; +} + +sub show_help { + + say encode_utf8("Lintian v$ENV{LINTIAN_VERSION}"); + + my $message =<<"EOT"; +Syntax: lintian [action] [options] [--] [packages] ... +Actions: + -c, --check check packages (default action) + -C X, --check-part X check only certain aspects + -F, --ftp-master-rejects only check for automatic reject tags + -T X, --tags X only run checks needed for requested tags + --tags-from-file X like --tags, but read list from file + -X X, --dont-check-part X don't check certain aspects +General options: + -h, --help display this help text + --print-version print unadorned version number and exit + -q, --quiet suppress all informational messages + -v, --verbose verbose messages + -V, --version display Lintian version and exit +Behavior options: + --color never/always/auto disable, enable, or enable color for TTY + --hyperlinks on/off hyperlinks for TTY (when supported) + --default-display-level reset the display level to the default + --display-source X restrict displayed tags by source + -E, --display-experimental display "X:" tags (normally suppressed) + --no-display-experimental suppress "X:" tags + --fail-on error,warning,info,pedantic,experimental,override + define condition for exit status 2 (default: error) + -i, --info give detailed info about tags + -I, --display-info display "I:" tags (normally suppressed) + -L, --display-level display tags with the specified level + -o, --no-override ignore overrides + --output-width NUM set output width instead of probing terminal + --pedantic display "P:" tags (normally suppressed) + --profile X Use the profile X or use vendor X checks + --show-overrides output tags that have been overridden + --suppress-tags T,... don't show the specified tags + --suppress-tags-from-file X don't show the tags listed in file X + --tag-display-limit NUM Specify "tag per package" display limit + +Configuration options: + --cfg CONFIGFILE read CONFIGFILE for configuration + --no-cfg do not read any config files + --ignore-lintian-env ignore LINTIAN_* env variables + --include-dir DIR include checks, libraries (etc.) from DIR + -j NUM, --jobs NUM limit the number of parallel jobs to NUM + --[no-]user-dirs whether to use files from user directories + +Some options were omitted. Please check the manual page for the complete list. +EOT + + print encode_utf8($message); + + exit; +} + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/bin/lintian-annotate-hints b/bin/lintian-annotate-hints new file mode 100755 index 0000000..bbedbf8 --- /dev/null +++ b/bin/lintian-annotate-hints @@ -0,0 +1,206 @@ +#!/usr/bin/perl +# +# annotate-lintian-hints -- transform lintian tags into descriptive text +# +# Copyright (C) 1998 Christian Schwarz and Richard Braakman +# Copyright (C) 2013 Niels Thykier +# Copyright (C) 2017 Chris Lamb +# Copyright (C) 2020 Felix Lechner +# +# This program is free software. It is distributed under the terms of +# the GNU General Public License as published by the Free Software +# Foundation; either version 2 of the License, or (at your option) any +# later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +use v5.20; +use warnings; +use utf8; + +use Cwd qw(realpath); +use File::Basename qw(dirname); + +# neither Path::This nor lib::relative are in Debian +use constant THISFILE => realpath __FILE__; +use constant THISDIR => dirname realpath __FILE__; + +# use Lintian modules that belong to this program +use lib THISDIR . '/../lib'; + +# substituted during package build +my $LINTIAN_VERSION; + +use Const::Fast; +use Getopt::Long (); +use IO::Interactive qw(is_interactive); +use Term::ReadKey; +use Unicode::UTF8 qw(encode_utf8 decode_utf8); + +use Lintian::Output::EWI; +use Lintian::Profile; +use Lintian::Version qw(guess_version); + +const my $EMPTY => q{}; +const my $SPACE => q{ }; + +const my $DEFAULT_OUTPUT_WIDTH => 80; + +const my $NEW_PROGRAM_NAME => q{lintian-annotate-hints}; + +my $TERMINAL_WIDTH; +($TERMINAL_WIDTH, undef, undef, undef) = GetTerminalSize() + if is_interactive; +$TERMINAL_WIDTH //= $DEFAULT_OUTPUT_WIDTH; + +if (my $coverage_arg = $ENV{'LINTIAN_COVERAGE'}) { + my $p5opt = $ENV{'PERL5OPT'}//$EMPTY; + $p5opt .= $SPACE if $p5opt ne $EMPTY; + $ENV{'PERL5OPT'} = "${p5opt} ${coverage_arg}"; +} + +$ENV{LINTIAN_BASE} = realpath(THISDIR . '/..') + // die encode_utf8('Cannot resolve LINTIAN_BASE'); + +$ENV{LINTIAN_VERSION} = $LINTIAN_VERSION // guess_version($ENV{LINTIAN_BASE}); +die encode_utf8('Unable to determine the version automatically!?') + unless length $ENV{LINTIAN_VERSION}; + +my $annotate; +my @INCLUDE_DIRS; +my $profile_name; +my $user_dirs = 1; + +my %options = ( + 'annotate|a' => \$annotate, + 'help|h' => \&show_help, + 'include-dir=s' => \@INCLUDE_DIRS, + 'output-width=i' => \$TERMINAL_WIDTH, + 'profile=s' => \$profile_name, + 'user-dirs!' => \$user_dirs, + 'version' => \&show_version, +); + +Getopt::Long::Configure('gnu_getopt'); +Getopt::Long::GetOptions(%options) + or die encode_utf8("error parsing options\n"); + +my $profile = Lintian::Profile->new; +$profile->load($profile_name, \@INCLUDE_DIRS, $user_dirs); + +my $output = Lintian::Output::EWI->new; + +# Matches something like: (1:2.0-3) [arch1 arch2] +# - captures the version and the architectures +my $verarchre = qr{(?: \s* \(( [^)]++ )\) \s* \[ ( [^]]++ ) \])}x; + +my $type_re = qr/(?:binary|changes|source|udeb)/; + +my %already_displayed; + +# Otherwise, read input files or STDIN, watch for tags, and add +# descriptions whenever we see one, can, and haven't already +# explained that tag. +while(my $bytes = ) { + + my $line = decode_utf8($bytes); + chomp $line; + + say encode_utf8('N:'); + say encode_utf8($line); + + next + if $line =~ /^\s*$/; + + # strip color + $line =~ s/\e[\[\d;]*m//g; + + # strip HTML + $line =~ s///g; + $line =~ s{}{}g; + + my $tag_name; + if ($annotate) { + + # used for override files only; combine if possible + + next + unless $line =~ m{^(?: # start optional part + (?:\S+)? # Optionally starts with package name + (?: \s*+ \[[^\]]+?\])? # optionally followed by an [arch-list] (like in B-D) + (?: \s*+ $type_re)? # optionally followed by the type + :\s++)? # end optional part + ([\-\.a-zA-Z_0-9]+ (?:\s.+)?)$}x; # [extra] -> $1 + + my $tagdata = $1; + ($tag_name, undef) = split(/ /, $tagdata, 2); + + } elsif ($line + =~ m{^([^N]): (\S+)(?: (\S+)(?:$verarchre)?)?: (\S+)(?:\s+(.*))?$}) { + + # matches the full deal: + # 1 222 3333 4444444 5555 666 777 + # - T: pkg type (version) [arch]: tag [...] + # ^^^^^^^^^^^^^^^^^^^^^ + # Where the marked part(s) are optional values. The numbers above + # the example are the capture groups. + + my $pkg_type = $3 // 'binary'; + + $tag_name = $6; + + } else { + next; + } + + next + if $already_displayed{$tag_name}++; + + my $tag = $profile->get_tag($tag_name); + next + unless defined $tag; + + $output->describe_tag($profile->data, $tag, $TERMINAL_WIDTH); +} + +exit; + +sub show_version { + say encode_utf8("$NEW_PROGRAM_NAME v$ENV{LINTIAN_VERSION}"); + + exit; +} + +sub show_help { + my $message =<<"EOT"; +Usage: $NEW_PROGRAM_NAME [log-file...] ... + $NEW_PROGRAM_NAME --annotate [overrides ...] + +Options: + -a, --annotate display descriptions of tags in Lintian overrides + --include-dir DIR check for Lintian data in DIR + --profile X use vendor profile X to determine severities + --output-width NUM set output width instead of probing terminal + --[no-]user-dirs whether to include profiles from user directories + --version show version info and exit +EOT + + print encode_utf8($message); + + exit; +} + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/bin/lintian-explain-tags b/bin/lintian-explain-tags new file mode 100755 index 0000000..770bb7d --- /dev/null +++ b/bin/lintian-explain-tags @@ -0,0 +1,171 @@ +#!/usr/bin/perl +# +# explain-lintian-tags -- transform lintian tags into descriptive text +# +# Copyright (C) 1998 Christian Schwarz and Richard Braakman +# Copyright (C) 2013 Niels Thykier +# Copyright (C) 2017 Chris Lamb +# Copyright (C) 2020 Felix Lechner +# +# This program is free software. It is distributed under the terms of +# the GNU General Public License as published by the Free Software +# Foundation; either version 2 of the License, or (at your option) any +# later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +use v5.20; +use warnings; +use utf8; + +use Cwd qw(realpath); +use File::Basename qw(dirname); + +# neither Path::This nor lib::relative are in Debian +use constant THISFILE => realpath __FILE__; +use constant THISDIR => dirname realpath __FILE__; + +# use Lintian modules that belong to this program +use lib THISDIR . '/../lib'; + +# substituted during package build +my $LINTIAN_VERSION; + +use Const::Fast; +use Getopt::Long (); +use IO::Interactive qw(is_interactive); +use List::SomeUtils qw(any); +use Term::ReadKey; +use Unicode::UTF8 qw(encode_utf8); + +use Lintian::Output::EWI; +use Lintian::Output::HTML; +use Lintian::Output::JSON; +use Lintian::Profile; +use Lintian::Version qw(guess_version); + +const my $EMPTY => q{}; +const my $SPACE => q{ }; + +const my $DEFAULT_OUTPUT_WIDTH => 80; + +const my $NEW_PROGRAM_NAME => q{lintian-explain-tags}; + +my $TERMINAL_WIDTH; +($TERMINAL_WIDTH, undef, undef, undef) = GetTerminalSize() + if is_interactive; +$TERMINAL_WIDTH //= $DEFAULT_OUTPUT_WIDTH; + +if (my $coverage_arg = $ENV{'LINTIAN_COVERAGE'}) { + my $p5opt = $ENV{'PERL5OPT'}//$EMPTY; + $p5opt .= $SPACE if $p5opt ne $EMPTY; + $ENV{'PERL5OPT'} = "${p5opt} ${coverage_arg}"; +} + +$ENV{LINTIAN_BASE} = realpath(THISDIR . '/..') + // die encode_utf8('Cannot resolve LINTIAN_BASE'); + +$ENV{LINTIAN_VERSION} = $LINTIAN_VERSION // guess_version($ENV{LINTIAN_BASE}); +die encode_utf8('Unable to determine the version automatically!?') + unless length $ENV{LINTIAN_VERSION}; + +my $format = 'ewi'; +my @INCLUDE_DIRS; +my $list_tags; +my $profile_name; +my $tags; +my $user_dirs = 1; + +my %options = ( + 'format|f=s' => \$format, + 'help|h' => \&show_help, + 'include-dir=s' => \@INCLUDE_DIRS, + 'list-tags|l' => \$list_tags, + 'output-width=i' => \$TERMINAL_WIDTH, + 'profile=s' => \$profile_name, + 'tags|tag|t' => \$tags, + 'user-dirs!' => \$user_dirs, + 'version' => \&show_version, +); + +Getopt::Long::Configure('gnu_getopt'); +Getopt::Long::GetOptions(%options) + or die encode_utf8("error parsing options\n"); + +my $profile = Lintian::Profile->new; +$profile->load($profile_name, \@INCLUDE_DIRS, $user_dirs); + +my $output; + +$format = lc $format; +if ($format eq 'ewi') { + $output = Lintian::Output::EWI->new; + +} elsif ($format eq 'json') { + $output = Lintian::Output::JSON->new; + +} elsif ($format eq 'html') { + $output = Lintian::Output::HTML->new; + +} else { + die encode_utf8("Invalid output format $format\n"); +} + +if ($list_tags) { + say encode_utf8($_) for sort { lc($a) cmp lc($b) } $profile->enabled_tags; + exit; +} + +# show all tags when none were specified +my @selected = @ARGV; +@selected = $profile->enabled_tags + unless @selected; + +my @available = grep { defined} map { $profile->get_tag($_) } @selected; + +my @sorted = sort { lc($a->name) cmp lc($b->name) } @available; + +$output->describe_tags($profile->data, \@sorted, $TERMINAL_WIDTH); + +exit any { !defined $profile->get_tag($_) } @selected; + +sub show_version { + say encode_utf8("$NEW_PROGRAM_NAME v$ENV{LINTIAN_VERSION}"); + + exit; +} + +sub show_help { + my $message =<<"EOT"; +Usage: $NEW_PROGRAM_NAME [log-file...] ... + $NEW_PROGRAM_NAME [--tags] tag ... + +Options: + -l, --list-tags list all tags Lintian knows about + -t, --tag, --tags display tag descriptions + --include-dir DIR check for Lintian data in DIR + --profile X use vendor profile X to determine severities + --output-width NUM set output width instead of probing terminal + --[no-]user-dirs whether to include profiles from user directories + --version show version info and exit +EOT + + print encode_utf8($message); + + exit; +} + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/bin/spellintian b/bin/spellintian new file mode 100755 index 0000000..c3dc7c9 --- /dev/null +++ b/bin/spellintian @@ -0,0 +1,161 @@ +#!/usr/bin/perl + +# Copyright (C) 1998 Christian Schwarz, Richard Braakman (and others) +# Copyright (C) 2013 Niels Thykier +# Copyright (C) 2014 Jakub Wilk +# Copyright (C) 2020 Felix Lechner + +# This program is free software. It is distributed under the terms of +# the GNU General Public License as published by the Free Software +# Foundation; either version 2 of the License, or (at your option) any +# later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at , or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +use v5.20; +use warnings; +use utf8; + +use Const::Fast; +use Cwd qw(realpath); +use File::Basename qw(dirname); + +# neither Path::This nor lib::relative are in Debian +use constant THISFILE => realpath __FILE__; +use constant THISDIR => dirname realpath __FILE__; + +# use Lintian modules that belong to this program +use lib THISDIR . '/../lib'; + +# substituted during package build +my $LINTIAN_VERSION; + +use Const::Fast; +use Getopt::Long (); +use Path::Tiny; +use Unicode::UTF8 qw(encode_utf8 decode_utf8); + +use Lintian::Spelling qw(check_spelling check_spelling_picky); +use Lintian::Profile; +use Lintian::Version qw(guess_version); + +const my $EMPTY => q{}; +const my $SPACE => q{ }; + +$SIG{__WARN__} = sub { + my ($message) = @_; + + $message =~ s/\A([[:upper:]])/lc($1)/e; + $message =~ s/\n+\z//; + + die encode_utf8("spellintian: $message\n"); +}; + +if (my $coverage_arg = $ENV{'LINTIAN_COVERAGE'}) { + my $p5opt = $ENV{'PERL5OPT'} // $EMPTY; + $p5opt .= $SPACE if $p5opt ne $EMPTY; + $ENV{'PERL5OPT'} = "${p5opt} ${coverage_arg}"; +} + +$ENV{LINTIAN_BASE} = realpath(THISDIR . '/..') + // die encode_utf8('Cannot resolve LINTIAN_BASE'); + +$ENV{LINTIAN_VERSION} = $LINTIAN_VERSION // guess_version($ENV{LINTIAN_BASE}); +die encode_utf8('Unable to determine the version automatically!?') + unless length $ENV{LINTIAN_VERSION}; + +my @INCLUDE_DIRS; +my $picky = 0; +my $user_dirs = 1; + +my %options = ( + 'h|help' => \&show_help, + 'include-dir=s' => \@INCLUDE_DIRS, + 'picky' => \$picky, + 'user-dirs!' => \$user_dirs, + 'version' => \&show_version, +); + +Getopt::Long::Configure('gnu_getopt'); + +Getopt::Long::GetOptions(%options) + or die encode_utf8("error parsing options\n"); + +my $PROFILE = Lintian::Profile->new; +$PROFILE->load(undef, \@INCLUDE_DIRS, $user_dirs); + +my $exit_code = 0; + +unless (@ARGV) { + my $text = do { local $/ = undef; decode_utf8() }; + spellcheck($PROFILE->data, undef, $picky, $text); +} + +for my $path (@ARGV) { + + unless (-r $path) { + print {*STDERR} encode_utf8("$path is not a readable file\n"); + $exit_code = 1; + + next; + } + + my $text = path($path)->slurp_utf8; + spellcheck($PROFILE->data, $path, $picky, $text); +} + +exit $exit_code; + +sub show_version { + say encode_utf8("spellintian v$ENV{LINTIAN_VERSION}"); + + exit; +} + +sub show_help { + my $message =<<'EOF' ; +Usage: spellintian [--picky] [FILE...] + +Options: + --picky be extra picky + --include-dir DIR check for Lintian data in DIR + --[no-]user-dirs whether to include profiles from user directories + --version show version info and exit +EOF + + print encode_utf8($message); + + exit; +} + +sub spellcheck { + my ($lintian_data, $path, $be_picky, $text) = @_; + + my $prefix = $path ? "$path: " : $EMPTY; + + my $spelling_error_handler = sub { + my ($mistake, $correction) = @_; + say encode_utf8("$prefix$mistake -> $correction"); + }; + + check_spelling($lintian_data, $text, $spelling_error_handler); + check_spelling_picky($lintian_data, $text, $spelling_error_handler) + if $be_picky; + + return; +} + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/commands/reporting-harness.pm b/commands/reporting-harness.pm new file mode 100644 index 0000000..89bf2c6 --- /dev/null +++ b/commands/reporting-harness.pm @@ -0,0 +1,517 @@ +#!/usr/bin/perl +# +# Lintian reporting harness -- Create and maintain Lintian reports automatically +# +# Copyright (C) 1998 Christian Schwarz and Richard Braakman +# +# This program is free software. It is distributed under the terms of +# the GNU General Public License as published by the Free Software +# Foundation; either version 2 of the License, or (at your option) any +# later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package reporting_harness; + +use v5.20; +use warnings; +use utf8; + +use constant BACKLOG_PROCESSING_GROUP_LIMIT => 1024; + +use Date::Format qw(time2str); +use File::Copy; +use FileHandle; +use Getopt::Long; +use Path::Tiny; +use POSIX qw(strftime); +use YAML::XS (); + +use Lintian::IO::Async qw(safe_qx); +use Lintian::Processable; +use Lintian::Relation::Version qw(versions_comparator); +use Lintian::Reporting::Util qw(load_state_cache save_state_cache); +use Lintian::Util qw(open_gz); + +use constant EMPTY => q{}; + +sub usage { + print <. +END + #'/# for cperl-mode + exit; +} + +my %opt = ( + 'schedule-chunk-size' => 512, + 'schedule-limit-groups' => BACKLOG_PROCESSING_GROUP_LIMIT, + 'reporting-config' => './config.yaml', +); + +my %opthash = ( + 'i' => \$opt{'incremental-mode'}, + 'c' => \$opt{'clean-mode'}, + 'f' => \$opt{'full-mode'}, + 'generate-reports|r!' => \$opt{'generate-reports'}, + 'reporting-config=s'=> \$opt{'reporting-config'}, + 'dry-run' => \$opt{'dry-run'}, + 'schedule-chunk-size=i' => \$opt{'schedule-chunk-size'}, + 'schedule-limit-groups=i' => \$opt{'schedule-limit-groups'}, + 'to-stdout' => \$opt{'to-stdout'}, + 'help|h' => \&usage, +); + +# Global variables +my ( + $log_file, $lintian_log, $lintian_perf_log, + $html_reports_log,$sync_state_log, $lintian_cmd, + $STATE_DIR, $LINTIAN_VERSION, $LOG_FD, + $CONFIG,$LOG_DIR, $HTML_DIR, + $HTML_TMP_DIR,$LINTIAN_SCRATCH_SPACE, $LINTIAN_BASE, + $EXTRA_LINTIAN_OPTIONS, +); + +sub required_cfg_value { + my (@keys) = @_; + my $v = $CONFIG; + for my $key (@keys) { + if (not exists($v->{$key})) { + my $k = join('.', @keys); + die("Missing required config parameter: ${k}\n"); + } + $v = $v->{$key}; + } + return $v; +} + +sub required_cfg_list_value { + my (@keys) = @_; + my $v = required_cfg_value(@keys); + if (not defined($v) or ref($v) ne 'ARRAY') { + my $k = join('.', @keys); + die("Invalid configuration: ${k} must be a (possibly empty) list\n"); + } + return $v; +} + +sub main { + parse_options_and_config(); + + # turn file buffering off + STDOUT->autoflush; + + unless ($opt{'dry-run'}) { + # rotate log files + my @rotate_logs + = ($log_file, $html_reports_log, $lintian_perf_log, $sync_state_log); + safe_qx('savelog', @rotate_logs); + + # create new log file + open($LOG_FD, '>', $log_file) + or die("cannot open log file $log_file for writing: $!"); + $LOG_FD->autoflush; + } else { + $opt{'to-stdout'} = 0; + open($LOG_FD, '>&', \*STDOUT) + or die "Cannot open log file for writing: $!"; + Log('Running in dry-run mode'); + } + # From here on we can use Log() and Die(). + if (not $opt{'dry-run'} and $opt{'clean-mode'}) { + Log('Purging old state-cache/dir'); + path($STATE_DIR)->remove_tree; + } + + if (not -d $STATE_DIR) { + path($STATE_DIR)->mkpath; + Log("Created cache dir: $STATE_DIR"); + } + + if ( !$opt{'generate-reports'} + && !$opt{'full-mode'} + && !$opt{'incremental-mode'}) { + # Nothing explicitly chosen, default to -i if the log is present, + # otherwise -f. + if (-f $lintian_log) { + $opt{'incremental-mode'} = 1; + } else { + $opt{'full-mode'} = 1; + } + } + + # Default to yes, if not explicitly disabled. + $opt{'generate-reports'} //= 1; + + if ($opt{'incremental-mode'} or $opt{'full-mode'}) { + run_lintian(); + } + + if ($opt{'generate-reports'}) { + generate_reports(); + } + + # ready!!! :-) + Log('All done.'); + exit 0; +} + +# ------------------------------- + +sub parse_options_and_config { + + # init commandline parser + Getopt::Long::config('bundling', 'no_getopt_compat', 'no_auto_abbrev'); + + # process commandline options + GetOptions(%opthash) + or die("error parsing options\n"); + + # clean implies full - do this as early as possible, so we can just + # check $opt{'full-mode'} rather than a full + # ($opt{'clean-mode'} || $opt{'full-mode'}) + $opt{'full-mode'} = 1 if $opt{'clean-mode'}; + + die("Cannot use both incremental and full/clean.\n") + if $opt{'incremental-mode'} && $opt{'full-mode'}; + die("The argument for --schedule-limit-groups must be an > 0\n") + if $opt{'schedule-limit-groups'} < 1; + if (not $opt{'reporting-config'} or not -f $opt{'reporting-config'}) { + die("The --reporting-config parameter must point to an existing file\n" + ); + } + # read configuration + $CONFIG = YAML::XS::LoadFile($opt{'reporting-config'}); + $LOG_DIR = required_cfg_value('storage', 'log-dir'); + $HTML_DIR = required_cfg_value('storage', 'reports-dir'); + $HTML_TMP_DIR = required_cfg_value('storage', 'reports-work-dir'); + $STATE_DIR = required_cfg_value('storage', 'state-cache'); + $LINTIAN_SCRATCH_SPACE = required_cfg_value('storage', 'scratch-space'); + + if ( exists($CONFIG->{'lintian'}) + && exists($CONFIG->{'lintian'}{'extra-options'})) { + $EXTRA_LINTIAN_OPTIONS + = required_cfg_list_value('lintian', 'extra-options'); + } else { + $EXTRA_LINTIAN_OPTIONS = []; + } + + $LINTIAN_BASE = $ENV{'LINTIAN_BASE'}; + + $lintian_cmd = "$LINTIAN_BASE/bin/lintian"; + + $LINTIAN_VERSION= safe_qx("$LINTIAN_BASE/bin/lintian",'--print-version'); + chomp($LINTIAN_VERSION); + + ( + $log_file, $lintian_log, $lintian_perf_log,$html_reports_log, + $sync_state_log + ) + = map {"$LOG_DIR/$_" } + qw(harness.log lintian.log lintian-perf.log html_reports.log sync_state.log); + + return; +} + +sub run_lintian { + my @sync_state_args = ( + '--reporting-config', $opt{'reporting-config'}, + '--desired-version', $LINTIAN_VERSION,'--debug', + ); + my @lintian_harness_args = ( + '--lintian-frontend', "$LINTIAN_BASE/bin/lintian", + '--lintian-log-dir', $LOG_DIR, + '--schedule-chunk-size', $opt{'schedule-chunk-size'}, + '--schedule-limit-groups', $opt{'schedule-limit-groups'}, + '--state-dir', $STATE_DIR, + # Finish with the lintian command-line + '--', @{$EXTRA_LINTIAN_OPTIONS}); + + if ($opt{'full-mode'}) { + push(@sync_state_args, '--reschedule-all'); + } + if ($opt{'dry-run'}) { + push(@sync_state_args, '--dry-run'); + } + + if ($LINTIAN_SCRATCH_SPACE) { + unshift(@lintian_harness_args, + '--lintian-scratch-space', $LINTIAN_SCRATCH_SPACE); + } + + Log('Updating harness state cache (reading mirror index files)'); + + my $loop = IO::Async::Loop->new; + my $syncdone = $loop->new_future; + + my @synccommand = ($lintian_cmd, 'reporting-sync-state', @sync_state_args); + Log('Command: ' . join(' ', @synccommand)); + + my $syncprocess = IO::Async::Process->new( + command => [@synccommand], + stdout => { via => 'pipe_read' }, + stderr => { via => 'pipe_read' }, + on_finish => sub { + my ($self, $exitcode) = @_; + my $status = ($exitcode >> 8); + + if ($status) { + Log("warning: executing reporting-sync-state returned $status" + ); + my $message= "Non-zero status $status from @synccommand"; + $syncdone->fail($message); + return; + } + + $syncdone->done("Done with @synccommand"); + return; + }); + + my $syncfh = *STDOUT; + unless($opt{'dry-run'}) { + open($syncfh, '>', $sync_state_log) + or die "Could not open file '$sync_state_log': $!"; + } + + $syncprocess->stdout->configure( + on_read => sub { + my ($stream, $buffref, $eof) = @_; + + if (length $$buffref) { + print {$syncfh} $$buffref; + $$buffref = EMPTY; + } + + if ($eof) { + close($syncfh) + unless $opt{'dry-run'}; + } + + return 0; + }, + ); + + $syncprocess->stderr->configure( + on_read => sub { + my ($stream, $buffref, $eof) = @_; + + if (length $$buffref) { + print STDERR $$buffref; + $$buffref = EMPTY; + } + + return 0; + }, + ); + + $loop->add($syncprocess); + $syncdone->await; + + Log('Running lintian (via reporting-lintian-harness)'); + Log( + 'Command: ' + . join(' ', + $lintian_cmd, 'reporting-lintian-harness',@lintian_harness_args)); + my %harness_lintian_opts = ( + 'pipe_out' => FileHandle->new, + 'err' => '&1', + 'fail' => 'never', + ); + + if (not $opt{'dry-run'}) { + spawn(\%harness_lintian_opts, + [$lintian_cmd, 'reporting-lintian-harness', @lintian_harness_args] + ); + my $child_out = $harness_lintian_opts{'pipe_out'}; + while (my $line = <$child_out>) { + chomp($line); + Log_no_ts($line); + } + close($child_out); + if (not reap(\%harness_lintian_opts)) { + my $exit_code = $harness_lintian_opts{harness}->full_result; + my $res = ($exit_code >> 8) & 0xff; + my $sig = $exit_code & 0xff; + # Exit code 2 is "time-out", 3 is "lintian got signalled" + # 255 => reporting-lintian-harness caught an unhandled trappable + # error. + if ($res) { + if ($res == 255) { + Die('Lintian harness died with an unhandled exception'); + } elsif ($res == 3) { + Log('Lintian harness stopped early due to signal'); + if ($opt{'generate-reports'}) { + Log('Skipping report generation'); + $opt{'generate-reports'} = 0; + } + } elsif ($res != 2) { + Die("Lintian harness terminated with code $res"); + } + } elsif ($sig) { + Die("Lintian harness was killed by signal $sig"); + } + } + } + return; +} + +sub generate_reports { + my @html_reports_args + = ('--reporting-config',$opt{'reporting-config'},$lintian_log,); + # create html reports + Log('Creating HTML reports...'); + Log("Executing $lintian_cmd reporting-html-reports @html_reports_args"); + + my $loop = IO::Async::Loop->new; + my $htmldone = $loop->new_future; + + my @htmlcommand + = ($lintian_cmd, 'reporting-html-reports', @html_reports_args); + my $htmlprocess = IO::Async::Process->new( + command => [@htmlcommand], + stdout => { via => 'pipe_read' }, + stderr => { via => 'pipe_read' }, + on_finish => sub { + my ($self, $exitcode) = @_; + my $status = ($exitcode >> 8); + + if ($status) { + Log( +"warning: executing reporting-html-reports returned $status" + ); + my $message= "Non-zero status $status from @htmlcommand"; + $htmldone->fail($message); + return; + } + + $htmldone->done("Done with @htmlcommand"); + return; + }); + + open(my $htmlfh, '>', $html_reports_log) + or die "Could not open file '$html_reports_log': $!"; + + $htmlprocess->stdout->configure( + on_read => sub { + my ($stream, $buffref, $eof) = @_; + + if (length $$buffref) { + print {$htmlfh} $$buffref; + $$buffref = EMPTY; + } + + close($htmlfh) + if $eof; + + return 0; + }, + ); + + $htmlprocess->stderr->configure( + on_read => sub { + my ($stream, $buffref, $eof) = @_; + + if (length $$buffref) { + print STDERR $$buffref; + $$buffref = EMPTY; + } + + return 0; + }, + ); + + $loop->add($htmlprocess); + $htmldone->await; + + Log(''); + + # rotate the statistics file updated by reporting-html-reports + if (!$opt{'dry-run'} && -f "$STATE_DIR/statistics") { + my $date = time2str('%Y%m%d', time()); + my $dest = "$LOG_DIR/stats/statistics-${date}"; + copy("$STATE_DIR/statistics", $dest) + or Log('warning: could not rotate the statistics file'); + } + + # install new html directory + Log('Installing HTML reports...'); + unless ($opt{'dry-run'}) { + path($HTML_DIR)->remove_tree; + # a tiny bit of race right here + rename($HTML_TMP_DIR,$HTML_DIR) + or Die("error renaming $HTML_TMP_DIR into $HTML_DIR"); + } + Log(''); + return; +} + +sub Log { + my ($msg) = @_; + my $ts = strftime('[%FT%T]', localtime()); + Log_no_ts("${ts}: ${msg}"); + return; +} + +sub Log_no_ts { + my ($msg) = @_; + print {$LOG_FD} $msg,"\n"; + print $msg, "\n" if $opt{'to-stdout'}; + return; +} + +sub Die { + Log("fatal error: $_[0]"); + exit 1; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/commands/reporting-html-reports.pm b/commands/reporting-html-reports.pm new file mode 100644 index 0000000..2505538 --- /dev/null +++ b/commands/reporting-html-reports.pm @@ -0,0 +1,1262 @@ +#!/usr/bin/perl -w +# +# Lintian HTML reporting tool -- Create Lintian web reports +# +# Copyright (C) 1998 Christian Schwarz and Richard Braakman +# Copyright (C) 2007 Russ Allbery +# Copyright (C) 2017-2019 Chris Lamb +# +# This program is free software. It is distributed under the terms of +# the GNU General Public License as published by the Free Software +# Foundation; either version 2 of the License, or (at your option) any +# later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package reporting_html_reports; + +use v5.20; +use warnings; +use utf8; +use autodie; + +use Getopt::Long; +use POSIX qw(strftime); +use File::Copy qw(copy); +use Fcntl qw(SEEK_SET); +use List::Util qw(first); +use List::MoreUtils qw(uniq); +use Path::Tiny; +use Text::Template (); +use URI::Escape; +use YAML::XS (); + +use Lintian::Data; +use Lintian::Deb822::Parser qw(read_dpkg_control_lc); +use Lintian::IO::Async qw(safe_qx); +use Lintian::Profile; +use Lintian::Relation::Version qw(versions_comparator); +use Lintian::Reporting::ResourceManager; +use Lintian::Reporting::Util qw(load_state_cache find_backlog); +use Lintian::Util qw(copy_dir run_cmd locate_executable); + +my $CONFIG; +my %OPT; +my %OPT_HASH = ('reporting-config=s'=> \$OPT{'reporting-config'},); + +# ------------------------------ +# Global variables and configuration + +# Some globals initialised in init_global() +my ( + $RESOURCE_MANAGER, $LINTIAN_VERSION, $timestamp, + $TEMPLATE_CONFIG_VARS,$HARNESS_STATE_DIR, $HISTORY_DIR, + $HISTORY, $GRAPHS, $LINTIAN_BASE, + $HTML_TMP_DIR, $SCOUR_ENABLED, +); +# FIXME: Should become obsolete if gnuplot is replaced by R like piuparts.d.o / +# reproducible.d.n is using +my $GRAPHS_RANGE_DAYS = 366; + +# ------------------------------ +# Initialize templates + +# This only has to be done once, so do it at the start and then reuse the same +# templates throughout. +our %templates; + +# %statistics accumulates global statistics. For tags: errors, warnings, +# experimental, overridden, and info are the keys holding the count of tags of +# that sort. For packages: binary, udeb, and source are the number of +# packages of each type with Lintian errors or warnings. For maintainers: +# maintainers is the number of maintainers with Lintian errors or warnings. +# +# %tag_statistics holds a hash of tag-specific statistics. Each tag name is a +# key, and its value is a hash with the following keys: count and overrides +# (number of times the tag has been detected and overridden, respectively), and +# packages (number of packages with at least one such tag). +my (%statistics, %tag_statistics); + +# %by_maint holds a hash of maintainer names to packages and tags. Each +# maintainer is a key. The value is a hash of package names to hashes. Each +# package hash is in turn a hash of versions to an anonymous array of hashes, +# with each hash having keys code, package, type, tag, severity, +# extra, and xref. xref gets the partial URL of the maintainer page for that +# source package. +# +# In other words, the lintian output line: +# +# W: gnubg source: substvar-source-version-is-deprecated gnubg-data +# +# for gnubg 0.15~20061120-1 maintained by Russ Allbery is +# turned into the following structure: +# +# { 'gnubg' => { +# '0.15~20061120-1' => [ +# { code => 'W', # Either 'O' or same as $tag_info->code +# pkg_info => { +# package => 'gnubg', +# version => '0.15~20061120-1', +# component => 'main', +# type => 'source', +# anchor => 'gnubg_0.15~20061120-1', +# xref => 'rra@debian.org.html#gnubg_0.15~20061120-1' +# }, +# tag_info => $tag_info, # an instance of Lintian::Tag::Info +# archs => { +# # Architectures we have seen this tag for +# 'amd64' => 1, +# 'i386' => 1, +# }, +# extra => 'gnubg-data' +# } ] } } +# +# and then stored under the key 'Russ Allbery ' +# +# %by_uploader holds the same thing except for packages for which the person +# is only an uploader. +# +# %by_tag is a hash of tag names to an anonymous array of tag information +# hashes just like the inside-most data structure above. +my (%by_maint, %by_uploader, %by_tag, %maintainer_table, %delta); +my @attrs = qw(maintainers source-packages binary-packages udeb-packages + errors warnings info experimental pedantic overridden groups-known + groups-backlog classifications groups-with-errors); + +my @RESTRICTED_CONFIG_DIRS= split(/:/, $ENV{'LINTIAN_RESTRICTED_CONFIG_DIRS'}); +my @CONFIG_DIRS = split(/:/, $ENV{'LINTIAN_CONFIG_DIRS'}); + +sub load_profile { + my ($profile_name, $options) = @_; + my %opt = ( + 'restricted-search-dirs' => \@RESTRICTED_CONFIG_DIRS, + %{$options // {}}, + ); + require Lintian::Profile; + + my $profile = Lintian::Profile->new; + $profile->load($profile_name, \@CONFIG_DIRS, \%opt); + + return $profile; +} + +sub required_cfg_value { + my (@keys) = @_; + my $v = $CONFIG; + for my $key (@keys) { + if (not exists($v->{$key})) { + my $k = join('.', @keys); + die("Missing required config parameter: ${k}\n"); + } + $v = $v->{$key}; + } + return $v; +} + +sub required_cfg_non_empty_list_value { + my (@keys) = @_; + my $v = required_cfg_value(@keys); + if (not defined($v) or ref($v) ne 'ARRAY' or scalar(@{$v}) < 1) { + my $k = join('.', @keys); + die("Invalid configuration: ${k} must be a non-empty list\n"); + } + return $v; +} + +# ------------------------------ +# Main routine + +sub main { + my $profile = init_globals(); + + setup_output_dir( + 'output_dir' => $HTML_TMP_DIR, + 'lintian_manual' => "${LINTIAN_BASE}/doc/lintian.html", + 'lintian_api_docs' => "${LINTIAN_BASE}/doc/api.html", + 'lintian_log_file' => $ARGV[0], + 'resource_dirs' => + [map { "${LINTIAN_BASE}/reporting/$_"} qw(images resources)], + ); + + load_templates("$LINTIAN_BASE/reporting/templates"); + + # Create lintian.css from a template, install the output file as a resource + # and discard the original output file. We do this after installing all + # resources, so the .css file can refer to resources. + output_template( + 'lintian.css', + $templates{'lintian.css'}, + { 'path_prefix' => '../' }); + $RESOURCE_MANAGER->install_resource("$HTML_TMP_DIR/lintian.css"); + + my $state_cache = load_state_cache($HARNESS_STATE_DIR); + + print "Parsing lintian log...\n"; + parse_lintian_log($profile, $state_cache); + + process_data($profile, $state_cache); + exit(0); +} + +# ------------------------------ +# Utility functions + +sub init_globals { + Getopt::Long::config('bundling', 'no_getopt_compat', 'no_auto_abbrev'); + Getopt::Long::GetOptions(%OPT_HASH) or die("error parsing options\n"); + + if (not $OPT{'reporting-config'} or not -f $OPT{'reporting-config'}) { + die("The --reporting-config parameter must point to an existing file\n" + ); + } + $LINTIAN_BASE = $ENV{'LINTIAN_BASE'}; + + $CONFIG = YAML::XS::LoadFile($OPT{'reporting-config'}); + $HARNESS_STATE_DIR = required_cfg_value('storage', 'state-cache'); + $HTML_TMP_DIR = required_cfg_value('storage', 'reports-work-dir'); + my $history_key = 'storage.historical-data-dir'; + if (exists($CONFIG->{'storage'}{'historical-data-dir'})) { + $HISTORY = 1; + $HISTORY_DIR = required_cfg_value('storage', 'historical-data-dir'); + print "Enabling history tracking as ${history_key} is set\n"; + if (length locate_executable('gnuplot')) { + $GRAPHS = 1; + print "Enabling graphs (gnuplot is in PATH)\n"; + } else { + $GRAPHS = 0; + print "No graphs as \"gnuplot\" is not in PATH\n"; + } + if ($GRAPHS) { + if (locate_executable('scour')) { + $SCOUR_ENABLED = 1; + print "Minimizing generated SVG files (scour is in PATH)\n"; + } else { + $SCOUR_ENABLED = 0; + print 'No minimization of generated SVG files' + . " as \"scour\" is not in PATH\n"; + } + } + } else { + $HISTORY = 0; + $GRAPHS = 0; + print "History tracking is disabled (${history_key} is unset)\n"; + print "Without history tracking, there will be no graphs\n"; + } + + if (exists($CONFIG->{'template-variables'})) { + $TEMPLATE_CONFIG_VARS = $CONFIG->{'template-variables'}; + } else { + $TEMPLATE_CONFIG_VARS = {}; + } + # Provide a default URL for the source code. It might not be correct for + # the given installation, but it is better than nothing. + $TEMPLATE_CONFIG_VARS->{'LINTIAN_SOURCE'} + //= 'https://salsa.debian.org/lintian/lintian.git'; + + my $profile = load_profile(); + + Lintian::Data->set_vendor($profile); + + $LINTIAN_VERSION = $ENV{LINTIAN_VERSION}; + $timestamp = safe_qx(qw(date -u --rfc-822)); + chomp($LINTIAN_VERSION, $timestamp); + + $RESOURCE_MANAGER + = Lintian::Reporting::ResourceManager->new('html_dir' => $HTML_TMP_DIR,); + return $profile; +} + +sub load_templates { + my ($template_dir) = @_; + for my $template ( + qw/head foot clean index maintainer maintainers packages tag + tags tags-severity tag-not-seen tags-all/ + ) { + open(my $fd, '<:encoding(UTF-8)', "${template_dir}/$template.tmpl"); + my %options = (TYPE => 'FILEHANDLE', SOURCE => $fd); + $templates{$template} = Text::Template->new(%options) + or die "cannot load template $template: $Text::Template::ERROR\n"; + close($fd); + } + + open(my $fd, '<:encoding(UTF-8)', "${template_dir}/lintian.css.tmpl"); + $templates{'lintian.css'} = Text::Template->new( + TYPE => 'FILEHANDLE', + SOURCE => $fd, + DELIMITERS => ['{{{', '}}}'], + ) + or die("cannot load template for lintian.css: $Text::Template::ERROR\n"); + close($fd); + return; +} + +sub process_data { + my ($profile, $state_cache) = @_; + my @maintainers = sort(uniq(keys(%by_maint), keys(%by_uploader))); + my $statistics_file = "$HARNESS_STATE_DIR/statistics"; + my ($old_statistics, $archives, @archive_info); + + { + # Scoped to allow memory to be re-purposed. The %qa and %sources + # structures are only used for a very few isolated items. + my (%qa, %sources); + print "Collecting statistics...\n"; + $old_statistics + = collect_statistics($profile, $state_cache, $statistics_file, + \@maintainers,\%sources, \%qa); + + generate_lookup_tables(\%sources); + + write_qa_list(\%qa); + + generate_package_index_packages(\%sources); + + if ($HISTORY) { + update_history_and_make_graphs(\@attrs, \%statistics, + \%tag_statistics); + } + } + + # Build a hash of all maintainers, not just those with Lintian tags. We + # use this later to generate stub pages for maintainers whose packages are + # all Lintian-clean. + my %clean; + for my $group_id (sort(keys(%{$state_cache->{'groups'}}))) { + my $maintainer + = $state_cache->{'groups'}{$group_id}{'mirror-metadata'} + {'maintainer'}; + my $id; + next if not $maintainer; + $id = maintainer_url($maintainer); + $clean{$id} = $maintainer; + } + + # Now, walk through the tags by source package (sorted by maintainer). + # Output a summary page of errors and warnings for each maintainer, output + # a full page that includes info, experimental, and overridden tags, and + # assemble the maintainer index and the QA package list as we go. + + for my $maintainer (@maintainers) { + my $id = maintainer_url($maintainer); + delete $clean{$id}; + + # Determine if the maintainer's page is clean. Check all packages for + # which they're either maintainer or uploader and set $error_clean if + # they have no errors or warnings. + # + # Also take this opportunity to sort the tags so that all similar tags + # will be grouped, which produces better HTML output. + my $error_clean = 1; + for my $source ( + keys %{ $by_maint{$maintainer} }, + keys %{ $by_uploader{$maintainer} } + ) { + my $versions = $by_maint{$maintainer}{$source} + || $by_uploader{$maintainer}{$source}; + for my $version (keys %$versions) { + $versions->{$version} + = [sort by_tag @{ $versions->{$version} }]; + next if not $error_clean; + my $tags = $versions->{$version}; + for my $tag (@$tags) { + if ($tag->{code} eq 'E' or $tag->{code} eq 'W') { + $error_clean = 0; + last; + } + } + } + } + + # Determine the parts of the maintainer and the file name for the + # maintainer page. + my ($name, $email) = extract_name_and_email($maintainer); + + my $regular = "maintainer/$id"; + my $full = "full/$id"; + + # Create the regular maintainer page (only errors and warnings) and the + # full maintainer page (all tags, including overrides and info tags). + print "Generating page for $id\n"; + my $q_name = html_quote($name); + my %data = ( + email => html_quote(uri_escape($email)), + errors => 1, + id => $id, + maintainer => html_quote($maintainer), + name => $q_name, + packages => $by_maint{$maintainer}, + uploads => $by_uploader{$maintainer}, + ); + my $template; + if ($error_clean) { + $template = $templates{clean}; + } else { + $template = $templates{maintainer}; + } + output_template($regular, $template, \%data); + $template = $templates{maintainer}; + $data{errors} = 0; + output_template($full, $template, \%data); + + my %index_data = (url => $id, name => $q_name); + # Add this maintainer to the hash of maintainer to URL mappings. + $maintainer_table{$maintainer} = \%index_data; + } + undef(@maintainers); + + # Write out the maintainer index. + my %data = (maintainers => \%maintainer_table,); + output_template('maintainers.html', $templates{maintainers}, \%data); + + # Now, generate stub pages for every maintainer who has only clean + # packages. + for my $id (keys %clean) { + my $maintainer = $clean{$id}; + my ($name, $email) = extract_name_and_email($maintainer); + my %maint_data = ( + id => $id, + email => html_quote(uri_escape($email)), + maintainer => html_quote($maintainer), + name => html_quote($name), + clean => 1, + ); + print "Generating clean page for $id\n"; + output_template("maintainer/$id", $templates{clean}, \%maint_data); + output_template("full/$id", $templates{clean}, \%maint_data); + } + + # Create the pages for each tag. Each page shows the extended description + # for the tag and all the packages for which that tag was issued. + for my $tag (sort $profile->known_tags) { + my $info = $profile->get_taginfo($tag); + my $description = $info->description('html', ' '); + my ($count, $overrides) = (0, 0); + my $tmpl = 'tag-not-seen'; + my $shown_count = 0; + my $tag_list = $by_tag{$tag}; + my $tag_limit_total = 1024; + my $tag_limit_per_package = 3; + + if (exists $by_tag{$tag}) { + $tmpl = 'tag'; + $count = $tag_statistics{$tag}{'count'}; + $overrides = $tag_statistics{$tag}{'overrides'}; + $shown_count = $count + $overrides; + } + if ($shown_count > $tag_limit_total) { + my (@replacement_list, %seen); + for my $orig_info ( + sort { $a->{pkg_info}{package} cmp $b->{pkg_info}{package} } + @{$tag_list}) { + my $pkg_info = $orig_info->{pkg_info}; + my $key + = "$pkg_info->{package} $pkg_info->{type} $pkg_info->{version}"; + next if ++$seen{$key} > $tag_limit_per_package; + push(@replacement_list, $orig_info); + last if @replacement_list >= $tag_limit_total; + } + $tag_list = \@replacement_list; + $shown_count = scalar(@replacement_list); + } + + my %maint_data = ( + description => $description, + tag => $tag, + code => $info->code, + tags => $tag_list, + shown_count => $shown_count, + tag_limit_per_package => $tag_limit_per_package, + graphs => $GRAPHS, + graphs_days => $GRAPHS_RANGE_DAYS, + statistics => { + count => $count, + overrides => $overrides, + total => $count + $overrides, + }, + ); + output_template("tags/$tag.html", $templates{$tmpl}, \%maint_data); + } + + # Create the general tag indices. + %data = ( + tags => \%by_tag, + stats => \%tag_statistics, + profile => \$profile, + ); + output_template('tags.html', $templates{tags}, \%data); + output_template('tags-severity.html', $templates{'tags-severity'}, \%data); + output_template('tags-all.html', $templates{'tags-all'}, \%data); + + # Update the statistics file. + open(my $stats_fd, '>', $statistics_file); + print {$stats_fd} "last-updated: $timestamp\n"; + for my $attr (@attrs) { + print {$stats_fd} "$attr: $statistics{$attr}\n"; + } + print {$stats_fd} "lintian-version: $LINTIAN_VERSION\n"; + close($stats_fd); + + $archives = required_cfg_value('archives'); + for my $archive (sort(keys(%{$archives}))) { + my $architectures + = required_cfg_non_empty_list_value('archives', $archive, + 'architectures'); + my $components + = required_cfg_non_empty_list_value('archives', $archive, + 'components'); + my $distributions + = required_cfg_non_empty_list_value('archives', $archive, + 'distributions'); + my $path = required_cfg_value('archives', $archive, 'base-dir'); + my $trace_basename + = required_cfg_value('archives', $archive, 'tracefile'); + + # The path to the mirror timestamp. + my $trace_file= "${path}/project/trace/${trace_basename}"; + my $mirror_timestamp = path($trace_file)->slurp; + $mirror_timestamp =~ s/\n.*//s; + $mirror_timestamp + = safe_qx('date', '-u', '--rfc-822', '-d', $mirror_timestamp); + my %info = ( + 'name' => $archive, + 'architectures' => $architectures, + 'components' => $components, + 'distributions' => $distributions, + 'timestamp' => $mirror_timestamp, + ); + push(@archive_info, \%info); + } + + # Finally, we can start creating the index page. + %data = ( + delta => \%delta, + archives => \@archive_info, + previous => $old_statistics->{'last-updated'}, + graphs => $GRAPHS, + graphs_days => $GRAPHS_RANGE_DAYS, + ); + output_template('index.html', $templates{index}, \%data); + return; +} + +sub setup_output_dir { + my (%args) = @_; + my $output_dir = $args{'output_dir'}; + my $lintian_manual = $args{'lintian_manual'}; + my $lintian_api = $args{'lintian_api_docs'}; + my $resource_dirs = $args{'resource_dirs'} // []; + my $lintian_log_file = $args{'lintian_log_file'}; + + # Create output directories. + mkdir($output_dir, 0777); + mkdir("$output_dir/full", 0777); + mkdir("$output_dir/maintainer", 0777); + mkdir("$output_dir/tags", 0777); + symlink('.', "$output_dir/reports"); + copy_dir($lintian_manual, "$output_dir/manual"); + copy_dir($lintian_api, "$output_dir/library-api"); + + if ($lintian_log_file) { + my %opts = ( + 'in' => $lintian_log_file, + 'out' => "$output_dir/lintian.log.gz", + ); + run_cmd(\%opts, 'gzip', '-9nc'); + $RESOURCE_MANAGER->install_resource("$output_dir/lintian.log.gz"); + symlink($RESOURCE_MANAGER->resource_URL('lintian.log.gz'), + "$output_dir/lintian.log.gz"); + } + + for my $dir (@{$resource_dirs}) { + next if not -d $dir; + opendir(my $dirfd, $dir); + for my $resname (readdir($dirfd)) { + next if $resname eq '.' or $resname eq '..'; + $RESOURCE_MANAGER->install_resource("$dir/$resname", + { install_method => 'copy' }); + } + closedir($dirfd); + } + return; +} + +sub collect_statistics { + my ($profile, $state_cache, $statistics_file, $maintainers_ref, + $sources_ref, $qa_list_ref) + = @_; + my $old_statistics; + + # For each of this maintainer's packages, add statistical information + # about the number of each type of tag to the QA data and build the + # packages hash used for the package index. We only do this for the + # maintainer packages, not the uploader packages, to avoid + # double-counting. + for my $maintainer (@{$maintainers_ref}) { + for my $source (keys %{ $by_maint{$maintainer} }) { + my %count; + for my $version ( + sort versions_comparator + keys %{ $by_maint{$maintainer}{$source} }){ + my $tags = $by_maint{$maintainer}{$source}{$version}; + for my $tag (@{$tags}) { + $count{$tag->{code}}++; + } + if (@$tags) { + $sources_ref->{$source}{$version} + = $tags->[0]{pkg_info}{xref}; + } + } + $qa_list_ref->{$source} = \%count; + } + } + + for my $tag ($profile->known_tags) { + my ($count, $overrides) = (0, 0); + my %seen_tags; + next if (not exists($by_tag{$tag})); + foreach (@{$by_tag{$tag}}) { + if ($_->{code} ne 'O') { + $count++; + $seen_tags{$_->{pkg_info}{xref}}++; + } else { + $overrides++; + } + } + $tag_statistics{$tag}{'count'} = $count; + $tag_statistics{$tag}{'overrides'} = $overrides; + $tag_statistics{$tag}{'packages'} = scalar(keys(%seen_tags)); + } + + # Read in the old statistics file so that we can calculate deltas for + # all of our statistics. + + if (-f $statistics_file) { + ($old_statistics) = read_dpkg_control_lc($statistics_file); + } + $statistics{'groups-known'} = scalar(keys(%{$state_cache->{'groups'}})); + $statistics{'groups-backlog'} + = scalar(find_backlog($LINTIAN_VERSION,$state_cache)); + my $pkgs_w_errors = 0; + for my $group_data (values(%{$state_cache->{'groups'}})) { + $pkgs_w_errors++ + if exists($group_data->{'processing-errors'}) + and $group_data->{'processing-errors'}; + } + $statistics{'groups-with-errors'} = $pkgs_w_errors; + + for my $attr (@attrs) { + my $old = $old_statistics->{$attr} || 0; + $statistics{$attr} ||= 0; + $delta{$attr} + = sprintf('%d (%+d)', $statistics{$attr},$statistics{$attr} - $old); + } + + return $old_statistics; +} + +sub extract_name_and_email { + my ($maintainer) = @_; + my ($name, $email) = ($maintainer =~ /^(.*) <([^>]+)>/); + $name = 'Unknown Maintainer' unless $name; + $email = 'unknown' unless $email; + return ($name, $email); +} + +# Generate the package lists. These are huge, so we break them into four +# separate pages. +# +# FIXME: Does anyone actually use these pages? They're basically unreadable. +sub generate_package_index_packages { + my ($sources_ref) = @_; + + my %list = ( + '0-9, A-F' => [], + 'G-L' => [], + 'M-R' => [], + 'S-Z' => [], + ); + for my $package (sort(keys(%{$sources_ref}))) { + my $first = uc(substr($package, 0, 1)); + if ($first le 'F') { push(@{ $list{'0-9, A-F'} }, $package) } + elsif ($first le 'L') { push(@{ $list{'G-L'} }, $package) } + elsif ($first le 'R') { push(@{ $list{'M-R'} }, $package) } + else { push(@{ $list{'S-Z'} }, $package) } + } + my %data = (sources => $sources_ref); + my $i = 1; + for my $section (sort(keys(%list))) { + $data{section} = $section; + $data{list} = $list{$section}; + output_template("packages_$i.html", $templates{packages}, \%data); + $i++; + } + return; +} + +sub run_scour { + my ($input_file, $output_file) = @_; + run_cmd('scour', '-i',$input_file, '-o',$output_file, '-q', + '--enable-id-stripping', '--enable-comment-stripping', + '--shorten-ids', '--indent=none'); + return 1; +} + +sub update_history_and_make_graphs { + my ($attrs_ref, $statistics_ref, $tag_statistics_ref) = @_; + # Update history. + my %versions; + my $graph_dir = "$HTML_TMP_DIR/graphs"; + my $commonf = "$graph_dir/common.gpi"; + my $unix_time = time(); + mkdir("$HISTORY_DIR") + if (not -d "$HISTORY_DIR"); + mkdir("$HISTORY_DIR/tags") + if (not -d "$HISTORY_DIR/tags"); + + my $history_file = "$HISTORY_DIR/statistics.dat"; + my $stats = ''; + for my $attr (@{$attrs_ref}) { + $stats .= ' ' . $statistics_ref->{$attr}; + } + open(my $hist_fd, '+>>', $history_file); + print {$hist_fd} "$unix_time $LINTIAN_VERSION$stats\n"; + + if ($GRAPHS) { + seek($hist_fd, 0, SEEK_SET); + while (<$hist_fd>) { + my @fields = split(); + $versions{$fields[1]} = $fields[0] + if not exists $versions{$fields[1]}; + } + } + close($hist_fd); + + if ($GRAPHS) { + mkdir("$graph_dir", 0777); + mkdir("$graph_dir/tags", 0777); + + my $date_min + = strftime('%s', + localtime($unix_time - 3600 * 24 * $GRAPHS_RANGE_DAYS)); + my $date_max = strftime('%s', localtime($unix_time)); + + # Generate loadable Gnuplot file with common variables and labels/arrows + # for Lintian versions. + open(my $common, '>', $commonf); + print {$common} "history_dir='$HISTORY_DIR'\n"; + print {$common} "graph_dir='$graph_dir'\n"; + print {$common} "date_min='$date_min'\n"; + print {$common} "date_max='$date_max'\n"; + my $last_version = 0; + for my $v (sort { $versions{$a} <=> $versions{$b} } keys %versions) { + next unless $versions{$v} > $date_min; + + print {$common} "set arrow from '$versions{$v}',graph 0 to ", + "'$versions{$v}',graph 1 nohead lw 0.4\n"; + + # Skip label if previous release is too close; graphs can't display + # more than ~32 labels. + my $min_spacing = 3600 * 24 * $GRAPHS_RANGE_DAYS / 32; + if ($versions{$v} - $last_version > $min_spacing) { + (my $label = $v) =~ s/\-[\w\d]+$//; + print {$common} "set label '$label' at '$versions{$v}',graph ", + "1.04 rotate by 90 font ',8'\n"; + + $last_version = $versions{$v}; + } + } + close($common); + + print "Plotting global statistics...\n"; + run_cmd({ 'chdir' => $graph_dir}, + 'gnuplot',"$LINTIAN_BASE/reporting/graphs/statistics.gpi"); + + if ($SCOUR_ENABLED) { + # Do a little "rename" dance to ensure that we keep the + # "statistics.svg"-basename without having to use a + # subdirectory. + rename( + "${graph_dir}/statistics.svg", + "${graph_dir}/_statistics-orig.svg" + ); + run_scour( + "${graph_dir}/_statistics-orig.svg", + "${graph_dir}/statistics.svg" + ); + } + $RESOURCE_MANAGER->install_resource("${graph_dir}/statistics.svg"); + } + + my $gnuplot_fd; + if ($GRAPHS) { + open($gnuplot_fd, '>', "$graph_dir/call.gpi"); + } + + for my $tag (sort(keys(%{$tag_statistics_ref}))) { + $history_file = "$HISTORY_DIR/tags/$tag.dat"; + $stats = $tag_statistics_ref->{$tag}; + open(my $tag_fd, '>>', $history_file); + print {$tag_fd} "$unix_time $stats->{'count'} $stats->{'overrides'} " + ."$stats->{'packages'}\n"; + close($tag_fd); + if ($GRAPHS) { + print {$gnuplot_fd} qq{print 'Plotting $tag statistics...'\n}; + print {$gnuplot_fd} + qq{call '$LINTIAN_BASE/reporting/graphs/tags.gpi' '$tag'\n}; + print {$gnuplot_fd} qq{reset\n}; + } + } + + if ($GRAPHS) { + my $svg_dir = "${graph_dir}/tags"; + close($gnuplot_fd); + run_cmd({'chdir' => $graph_dir}, 'gnuplot', 'call.gpi'); + unlink($commonf); + if ($SCOUR_ENABLED) { + # Obvious optimization potential; run scour in parallel + my $optimized_dir = "${graph_dir}/tags-optimized"; + mkdir($optimized_dir); + print "Minimizing tag graphs; this may take a while ...\n"; + for my $tag (sort(keys(%{$tag_statistics_ref}))) { + run_scour("${svg_dir}/${tag}.svg", + "${optimized_dir}/${tag}.svg"); + } + $svg_dir = $optimized_dir; + } + for my $tag (sort(keys(%{$tag_statistics_ref}))) { + my $graph_file = "${svg_dir}/${tag}.svg"; + $RESOURCE_MANAGER->install_resource($graph_file); + } + path($graph_dir)->remove_tree + if -d $graph_dir; + } + return; +} + +# Write out the QA package list. This is a space-delimited file that contains +# the package name and then the error count, warning count, info count, +# pedantic count, experimental count, and overridden tag count. +sub write_qa_list { + my ($qa_data) = @_; + + open(my $qa_fd, '>', "$HTML_TMP_DIR/qa-list.txt"); + for my $source (sort(keys(%{$qa_data}))) { + print {$qa_fd} $source; + for my $code (qw/E W I P X O/) { + my $count = $qa_data->{$source}{$code} || 0; + print {$qa_fd} " $count"; + } + print {$qa_fd} "\n"; + } + close($qa_fd); + return; +} + +# Generate a "redirect" lookup table for the webserver to power the +# "/source/[/]" redirects. +sub generate_lookup_tables { + my ($sources_ref) = @_; + mkdir("$HTML_TMP_DIR/lookup-tables"); + open(my $table, '>', "$HTML_TMP_DIR/lookup-tables/source-packages"); + + foreach my $source (sort(keys(%{$sources_ref}))) { + my $first = 1; + for my $version ( + sort versions_comparator keys %{ $sources_ref->{$source} }) { + my $xref = $sources_ref->{$source}{$version}; + print {$table} "$source full/$xref\n" if $first; + print {$table} "$source/$version full/$xref\n"; + $first = 0; + } + } + + close($table); + return; +} + +# Determine the file name for the maintainer page given a maintainer. It +# should be .html where is their email address with all +# characters other than a-z A-Z 0-9 - _ . @ = + replaced with _. Don't change +# this without coordinating with QA. +sub maintainer_url { + my ($maintainer) = @_; + if ($maintainer =~ m/<([^>]+)>/) { + my $id = $1; + $id =~ tr/a-zA-Z0-9_.@=+-/_/c; + return "$id.html"; + } else { + return 'unsorted.html'; + } +} + +sub parse_lintian_log { + my ($profile, $state_cache) = @_; + # We take a lintian log file on either standard input or as the + # first argument. This log file contains all the tags lintian + # found, plus N: tags with informational messages. Ignore all the + # N: tags and load everything else into the hashes we use for all + # web page generation. + # + # We keep track of a hash from maintainer page URLs to maintainer + # values so that we don't have two maintainers who map to the same + # page and overwrite each other's pages. If we find two + # maintainers who map to the same URL, just assume that the second + # maintainer is the same as the first (but warn about it). + # + # The "last_*" are optimizations to avoid computing the same + # things over and over again when a package have multiple tags. + my (%seen, $last_info, $last_maintainer, %unknown_member_id, $info, + $last_pi, %map_maint, %arch_map); + my %expanded_code = ( + E => 'errors', + W => 'warnings', + I => 'info', + X => 'experimental', + O => 'overridden', + P => 'pedantic', + C => 'classifications', + ); + while (<>) { + my @parts; + chomp; + @parts = split_tag($_); + next unless @parts; + my ($code, $package, $type, $version, $arch, $tag, $extra) = @parts; + $type = 'binary' unless (defined $type); + next + unless ($type eq 'source' || $type eq 'binary' || $type eq 'udeb'); + # Ignore unknown tags - happens if we removed a tag that is + # still present in the log file. + my $tag_info = $profile->get_taginfo($tag); + next + if not $tag_info + or $tag_info->effective_severity eq 'classification'; + + # Update statistics. + my $key = $expanded_code{$code}; + $statistics{$key}++; + unless ($seen{"$package $type"}) { + $statistics{"$type-packages"}++; + $seen{"$package $type"} = 1; + } + + # Determine the source package for this package and warn if + # there appears to be no source package in the archive. + # Determine the maintainer, version, and archive component. Work + # around a missing source package by pulling information from + # a binary package or udeb of the same name if there is any. + my ($source, $component, $source_version, $maintainer, $uploaders); + my $member_id + = "${type}:${package}/${version}" + . ($type ne 'source' ? "/$arch" : q{}); + my $state_data = $state_cache->{'members-to-groups'}{$member_id}; + next if exists($unknown_member_id{$member_id}); + if ($type eq 'source') { + $source = $package; + $source_version = $version; + if (not defined($state_data)) { + warn "Source package ${member_id} not found in state-cache!\n"; + $unknown_member_id{$member_id} = 1; + } + } elsif (defined($state_data)) { + my $src_member + = first { s/^source:// } keys(%{$state_data->{'members'}}); + if ($src_member) { + ($source, $source_version) = split(m{/}, $src_member, 2); + } + } elsif (not defined($state_data)) { + warn "Package ${member_id} not found in state-cache!\n"; + $unknown_member_id{$member_id} = 1; + } + $state_data //= {}; + $component = $state_data->{'mirror-metadata'}{'component'} ||= 'main'; + $maintainer = $state_data->{'mirror-metadata'}{'maintainer'} + ||= '(unknown)'; + $uploaders = $state_data->{'mirror-metadata'}{'uploaders'}; + $source ||= ''; + $version = 'unknown' + unless (defined($version) and length($version) > 0); + $source_version = $version + unless (defined($source_version) and length($source_version) > 0); + + # Sanitize, just out of paranoia. + $package =~ tr/a-zA-Z0-9.+-/_/c; + $source =~ tr/a-zA-Z0-9.+-/_/c; + $version =~ tr/a-zA-Z0-9.+:~-/_/c; + $source_version =~ tr/a-zA-Z0-9.+:~-/_/c; + + # Conditionally call html_quote if needed. On average, 11-13% of + # all tags (emitted on lintian.d.o) have no "extra". That would be + # tags like "no-upstream-changelog" (now removed) + if (defined($extra)) { + $extra = html_quote($extra); + } else { + $extra = ''; + } + + # Store binary architectures + my $arch_key = join(':', $package, $type, $version, $tag, $extra); + $arch_map{$arch_key}{$arch} = 1 + unless $arch eq 'all' or $arch eq 'source'; + + # Don't duplicate entries if they only differ on architecture + next if scalar(keys %{$arch_map{$arch_key}}) > 1; + + # Add the tag information to our hashes. Share the data + # between the hashes to save space (which means we can't later + # do destructive tricks with it). + if ( $last_info + && $last_pi->{type} eq $type + && $last_pi->{package} eq $package + && $last_pi->{version} eq $version) { + + # There are something like 622k tags emitted on lintian.d.o, + # but only "some" 90k unique package+version(+arch) pairs. + # Therefore, we can conclude that the average package will + # have ~6 tags and optimise for that case. Indeed, this path + # seems to be taken about 90% of the time (561k/624k). + # - In fact, we see less than "90k" package+version(+arch) + # pairs here, since entries without tags never this far down + # in this loop (i.e. they are filtered out by split_tag + # above). + + # Copy the last info and then change the bits that can change + $info = {%{$last_info}}; + # Code depends on whether the given tag was overridden or not + $info->{code} = $code; + $info->{extra} = $extra; + if ($info->{tag_info}->name ne $tag) { + $info->{tag_info} = $tag_info; + } + # saves a map_maintainer call + $maintainer = $last_maintainer; + } else { + + my $anchor = "${source}_${source_version}"; + # Apparently "+" are not allowed in ids and I am guessing + # ":" is not either + if (index($anchor, '+') > -1 or index($anchor, ':') > -1) { + $anchor =~ s/[+]/_x2b/g; + $anchor =~ s/[:]/_x3a/g; + } + if (substr($maintainer, 0, 1) eq q{"}) { + # Strip out ""-quotes, which is required in d/control for some + # maintainers. + $maintainer =~ s/^"(.*)" <(.*)>$/$1 <$2>/; + } + + # Check if we've seen the URL for this maintainer before + # and, if so, map them to the same person as the previous + # one. + + $last_maintainer = $maintainer + = map_maintainer(\%map_maint, $maintainer); + + # Update maintainer statistics. + $statistics{maintainers}++ unless defined $by_maint{$maintainer}; + + $last_info = $info = { + # Tag instance specific data + + # split_tags ensures that $code is a single upper case letter + code => $code, + tag_info => $tag_info, + # extra is unsafe in general, but we already quote it above. + extra => $extra, + archs => $arch_map{$arch_key}, + + # Shareable data + pkg_info => { + package => $package, + version => $version, + # There is a check for type being in a fixed whitelist of + # HTML-safe keywords in the start of the loop., + type => $type, + component => html_quote($component), + # should be safe + anchor => $anchor, + xref => maintainer_url($maintainer). "#${anchor}", + 'state_data' => $state_data, + maintainer => html_quote($maintainer), + }, + }; + $last_pi = $info->{pkg_info}; + if (!$by_maint{$maintainer}{$source}{$source_version}) { + my $list_ref = []; + $by_maint{$maintainer}{$source}{$source_version} = $list_ref; + # If the package had uploaders listed, also add the + # information to %by_uploaders (still sharing the data + # between hashes). + if ($uploaders) { + for my $uploader (@{$uploaders}) { + if (substr($uploader, 0, 1) eq q{"}) { + # Strip out ""-quotes, which is required in + # d/control for some uploaders. + $uploader =~ s/^"(.*)" <(.*)>$/$1 <$2>/; + } + $uploader = map_maintainer(\%map_maint, $uploader); + next if $uploader eq $maintainer; + $by_uploader{$uploader}{$source}{$source_version} + = $list_ref; + } + } + } + } + + push(@{ $by_maint{$maintainer}{$source}{$source_version} }, $info); + $by_tag{$tag} ||= []; + push(@{ $by_tag{$tag} }, $info); + + } + return; +} + +# Deduplicate maintainers. Maintains a cache of the maintainers we've seen +# with a given e-mail address and returns the maintainer string that we +# should use (which is whatever maintainer we saw first with that e-mail). +sub map_maintainer { + my ($urlmap, $maintainer) = @_; + my $url = maintainer_url($maintainer); + if (defined(my $res = $urlmap->{$url})) { + $maintainer = $res; + } else { + $urlmap->{$url} = $maintainer; + } + return $maintainer; +} + +# Quote special characters for HTML output. +sub html_quote { + my ($text) = @_; + $text ||= ''; + # Use index to do a quick check before we bother requesting a + # subst. On average, this is cheaper than blindly s///'ing, since + # we rarely subst (all) of the characters below. + if (index($text, '&') > -1) { + $text =~ s/&/\&/g; + } + if (index($text, '<') > -1) { + $text =~ s/') > -1) { + $text =~ s/>/\>/g; + } + if (index($text, '/') > -1) { + $text =~ s/\//\//g; + } + return $text; +} + +# Given a file name, a template, and a data hash, fill out the template with +# that data hash and output the results to the file. +sub output_template { + my ($file, $template, $data) = @_; + my $path_prefix = $data->{path_prefix}; + if (not defined($path_prefix)) { + $path_prefix = ''; + if (index($file, '/') > -1) { + $path_prefix = '../' x ($file =~ tr|/||); + } + } + $data->{version} ||= $LINTIAN_VERSION; + $data->{timestamp} ||= $timestamp; + $data->{by_version} ||= \&versions_comparator; + $data->{path_prefix} ||= $path_prefix; + $data->{html_quote} ||= \&html_quote; + $data->{resource_path} ||= sub { + return $path_prefix . $RESOURCE_MANAGER->resource_URL($_[0]); + }; + $data->{resource_integrity} ||= sub { + return $RESOURCE_MANAGER->resource_integrity_value($_[0]); + }; + $data->{head} ||= sub { + $templates{head}->fill_in( + HASH => { + page_title => $_[0], + config_vars => $TEMPLATE_CONFIG_VARS, + %{$data}, + }) or die "Filling out head of $file: $Text::Template::ERROR\n"; + }; + $data->{foot} ||= sub { + $templates{foot}->fill_in( + HASH => { + config_vars => $TEMPLATE_CONFIG_VARS, + %{$data}, + }) or die "Filling out footer of $file: $Text::Template::ERROR\n"; + }; + $data->{config_vars} ||= $TEMPLATE_CONFIG_VARS; + open(my $fd, '>:encoding(UTF-8)', "$HTML_TMP_DIR/$file"); + $template->fill_in(OUTPUT => $fd, HASH => $data) + or die "filling out $file failed: $Text::Template::ERROR\n"; + close($fd); + return; +} + +# Sort function for sorting lists of tags. Sort by package, version, component, +# type, tag, and then any extra data. This will produce the best HTML output. +# +# Note that source tags must come before all other tags, hence the "unfair" +# priority for those. This is because the first tags listed are assumed to +# be source package tags. +sub by_tag { + my $a_pi = $a->{pkg_info}; + my $b_pi = $b->{pkg_info}; + if ($a_pi->{type} ne $b_pi->{type}) { + return -1 if $a_pi->{type} eq 'source'; + return 1 if $b_pi->{type} eq 'source'; + } + return + $a_pi->{package} cmp $b_pi->{package} + || $a_pi->{version} cmp $b_pi->{version} + || $a_pi->{component} cmp $b_pi->{component} + || $a_pi->{type} cmp $b_pi->{type} + || $a->{tag_info}->name cmp $b->{tag_info}->name + || $a->{extra} cmp $b->{extra}; +} + +=item split_tag + +=cut + +{ + # Matches something like: (1:2.0-3) [arch1 arch2] + # - captures the version and the architectures + my $verarchre = qr,(?: \s* \(( [^)]++ )\) \s* \[ ( [^]]++ ) \]),xo; + # ^^^^^^^^ ^^^^^^^^^^^^ + # ( version ) [architecture ] + + # matches the full deal: + # 1 222 3333 4444444 5555 666 777 + # - T: pkg type (version) [arch]: tag [...] + # ^^^^^^^^^^^^^^^^^^^^^ + # Where the marked part(s) are optional values. The numbers above + # the example are the capture groups. + my $TAG_REGEX + = qr/([EWIXOPC]): (\S+)(?: (\S+)(?:$verarchre)?)?: (\S+)(?:\s+(.*))?/; + + sub split_tag { + my ($tag_input) = @_; + my $pkg_type; + return unless $tag_input =~ /^${TAG_REGEX}$/; + # default value... + $pkg_type = $3//'binary'; + return ($1, $2, $pkg_type, $4, $5, $6, $7); + } +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/commands/reporting-lintian-harness.pm b/commands/reporting-lintian-harness.pm new file mode 100644 index 0000000..afca58d --- /dev/null +++ b/commands/reporting-lintian-harness.pm @@ -0,0 +1,603 @@ +#!/usr/bin/perl -w + +# Lintian reporting harness -- Run lintian against an archive mirror +# +# Copyright (C) 2015 Niels Thykier +# Copyright (C) 2018 Chris Lamb +# +# Based on "reporting/harness", which was: +# Copyright (C) 1998 Christian Schwarz and Richard Braakman +# +# This program is free software. It is distributed under the terms of +# the GNU General Public License as published by the Free Software +# Foundation; either version 2 of the License, or (at your option) any +# later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package reporting_lintian_harness; + +use v5.20; +use warnings; +use utf8; +use autodie; + +use constant BACKLOG_PROCESSING_TIME_LIMIT => 4 * 3600; # 4hours + +use Fcntl qw(F_GETFD F_SETFD FD_CLOEXEC SEEK_END); +use File::Basename qw(basename); +use File::Temp qw(tempfile); +use Getopt::Long(); +use IO::Async::Loop; +use IO::Async::Process; +use List::MoreUtils qw(first_index); +use POSIX qw(strftime); + +use Lintian::IO::Async qw(safe_qx); +use Lintian::Reporting::Util + qw(find_backlog load_state_cache save_state_cache); + +use constant EMPTY => q{}; +use constant COLON => q{:}; +use constant NEWLINE => qq{\n}; + +my (@LINTIAN_CMD, $LINTIAN_VERSION); + +my @REQUIRED_PARAMETERS = qw( + lintian-log-dir + schedule-chunk-size + schedule-limit-groups + state-dir +); +my %OPT = ('lintian-frontend' => 'lintian',); +my %OPT_HASH = ( + 'schedule-chunk-size=i' => \$OPT{'schedule-chunk-size'}, + 'schedule-limit-groups=i' => \$OPT{'schedule-limit-groups'}, + 'state-dir=s' => \$OPT{'state-dir'}, + 'lintian-frontend=s' => \$OPT{'lintian-frontend'}, + 'lintian-log-dir=s' => \$OPT{'lintian-log-dir'}, + 'lintian-scratch-space=s' => \$OPT{'lintian-scratch-space'}, + 'help|h' => \&usage, +); + +sub main { + STDOUT->autoflush; + Getopt::Long::config('bundling', 'no_getopt_compat', 'no_auto_abbrev'); + Getopt::Long::GetOptions(%OPT_HASH) or die("error parsing options\n"); + check_parameters(); + $LINTIAN_VERSION= safe_qx($OPT{'lintian-frontend'}, '--print-version'); + chomp($LINTIAN_VERSION); + prepare_lintian_environment_and_cmdline(); + exit(harness_lintian()); +} + +### END OF SCRIPT -- below are helper subroutines ### + +=item untaint(VALUE) + +Untaint VALUE + +=cut + +sub untaint { + return $_[0] = $1 if $_[0] =~ m/^(.*)$/; + return; +} + +sub check_parameters { + for my $parameter (@REQUIRED_PARAMETERS) { + if (not defined($OPT{$parameter})) { + die( "Missing required parameter \"--${parameter}\"" + . "(use --help for more info)\n"); + } + } + if (-d $OPT{'state-dir'}) { + untaint($OPT{'state-dir'}); + } else { + die("The --state-dir parameter must point to an existing directory\n"); + } + die("The argument for --schedule-limit-groups must be an > 0\n") + if $OPT{'schedule-limit-groups'} < 1; + + return; +} + +sub prepare_lintian_environment_and_cmdline { + my $frontend = 'lintian'; + my $eoa_marker_index = first_index { $_ eq '--' } @ARGV; + my $logs_dir = $OPT{'lintian-log-dir'}; + my @overridable_args = (qw(-EL +>=classification --show-overrides)); + my @args = ( + qw(--verbose), # We rely on this for filtering the log + qw(--exp-output=format=fullewi --packages-from-file -), + qw(--perf-debug --perf-output), + "+${logs_dir}/lintian-perf.log", + ); + $frontend = $OPT{'lintian-frontend'} if ($OPT{'lintian-frontend'}); + + if ($eoa_marker_index > -1) { + # Move known "non-parameters" and the "--" behind our arguments. + # It is a misfeature, but at least it does not break + # our code. NB: It requires *two* "--" on the command-line to + # trigger this case. + push(@args, splice(@ARGV, $eoa_marker_index)); + } + # Put "our" arguments after user supplied ones + @LINTIAN_CMD = ($frontend, @overridable_args, @ARGV, @args); + + # The environment part + for my $key (keys(%ENV)) { + delete($ENV{$key}) if $key =~ m/^LINTIAN_/; + } + if ($OPT{'lintian-scratch-space'}) { + $ENV{'TMPDIR'} = $OPT{'lintian-scratch-space'}; + log_msg("Setting TMPDIR to $ENV{'TMPDIR'}"); + } else { + log_msg('Leaving TMPDIR unset (no --lintian-scratch-space'); + } + return; +} + +sub log_msg { + my ($msg) = @_; + my $ts = strftime('[%FT%T]: ', localtime()); + print $ts, $msg, "\n"; + return; +} + +sub harness_lintian { + my (@worklist); + my $exit_code = 0; + my $state = load_state_cache($OPT{'state-dir'}); + my $lintian_log_dir = $OPT{'lintian-log-dir'}; + my $lintian_log = "${lintian_log_dir}/lintian.log"; + log_msg('Update complete, loading current state information'); + + @worklist = find_backlog($LINTIAN_VERSION, $state); + + # Always update the log if it exists, as we may have removed + # some entries. + if (-f $lintian_log) { + my $filter = generate_log_filter($state, {}); + + # update lintian.log + log_msg('Updating lintian.log...'); + rewrite_lintian_log($filter); + } + + log_msg(''); + + if (not @worklist) { + log_msg('Skipping Lintian run - nothing to do...'); + } else { + log_msg('Processing backlog...'); + if (@worklist > $OPT{'schedule-limit-groups'}) { + log_msg( + "Truncating worklist to size $OPT{'schedule-limit-groups'}" + . ' from ' + . (scalar(@worklist))); + @worklist = splice(@worklist, 0, $OPT{'schedule-limit-groups'}); + } + $exit_code= process_worklist(\@worklist, $state, $lintian_log_dir); + } + return $exit_code; +} + +sub process_worklist { + my ($worklist_ref, $state, $lintian_log_dir) = @_; + my $round = 0; + my $rounds = 1; + my @worklist = @{$worklist_ref}; + my $exit_code = 0; + my $schedule_chunk_size = $OPT{'schedule-chunk-size'}; + my $start_time = time(); + + if ($schedule_chunk_size > 0) { + # compute the number of rounds needed. + my $size_up = scalar @worklist + ($schedule_chunk_size - 1); + $rounds = int($size_up / $schedule_chunk_size); + } + + log_msg( + sprintf( + 'Groups to process %d will take %d round(s) [round limit: %s]', + scalar @worklist, + $rounds,$schedule_chunk_size > 0 ? $schedule_chunk_size : 'none' + )); + + log_msg('Command line used: ' . join(q{ }, @LINTIAN_CMD)); + while (@worklist) { + my $len = scalar @worklist; + my (@work_splice, @completed, %processed, %errors); + my ($status_fd, $lint_status_out); + my $got_alarm = 0; + + # Bail if there is less than 5 minutes left + if (time() >= $start_time + BACKLOG_PROCESSING_TIME_LIMIT - 300) { + log_msg('No more time for processing backlogs'); + $exit_code = 2; + last; + } + + $round++; + # correct bounds to fit chunk size + if ($schedule_chunk_size > 0 and $len > $schedule_chunk_size) { + $len = $schedule_chunk_size; + } + + # Sort @work_splice to have the "Range:"-line below produce + # reasonable output. + @work_splice = sort(splice(@worklist, 0, $len)); + + log_msg("Running Lintian (round $round/$rounds) ..."); + if ($len == 1) { + log_msg(' - Single group: ' . $work_splice[0]); + } else { + log_msg(' - Range: GROUP:' + . $work_splice[0] + . q{ ... GROUP:} + . $work_splice[-1]); + } + + next if ($OPT{'dry-run'}); + + pipe($status_fd, $lint_status_out); + my ($nfd, $new_lintian_log) + = tempfile('lintian.log-XXXXXXX', DIR => $lintian_log_dir); + # We do not mind if anyone reads the lintian log as it is being written + chmod(0644, $nfd); + log_msg("New lintian log at $new_lintian_log"); + + my $loop = IO::Async::Loop->new; + my $future = $loop->new_future; + my $signalled_lintian = 0; + + push(@LINTIAN_CMD, '--status-log', '&3'); + my $process = IO::Async::Process->new( + command => [@LINTIAN_CMD], + stdin => { via => 'pipe_write' }, + stdout => { via => 'pipe_read' }, + stderr => { via => 'pipe_read' }, + fd3 => { via => 'pipe_read' }, + on_finish => sub { + my ($self, $exitcode) = @_; + my $status = ($exitcode >> 8); + my $signal = ($exitcode & 0xff); + + if ($signal) { + log_msg("Lintian terminated by signal: $signal"); + # If someone is sending us signals (e.g. SIGINT/Ctrl-C) + # don't start the next round. + log_msg(' - skipping the rest of the worklist'); + @worklist = (); + $future->fail( + "Command @LINTIAN_CMD received signal $signal"); + return; + } + + if ($status == 0 || $status == 1) { + # exit 1 (policy violations) happens all the time (sadly) + # exit 2 (broken packages) also happens all the time... + log_msg('Lintian finished successfully'); + $future->done("Done with @LINTIAN_CMD"); + return; + } + + log_msg("warning: executing lintian returned status $status"); + if ($got_alarm) { + # Ideally, lintian would always die by the signal + # but some times it catches it and terminates + # "normally" + log_msg('Stopped by a signal or time out'); + log_msg(' - skipping the rest of the worklist'); + @worklist = (); + } + + $future->fail("Error status $status from @LINTIAN_CMD"); + return; + }); + + $process->stdout->configure( + on_read => sub { + my ($stream, $buffref, $eof) = @_; + + if (length $$buffref) { + print {$nfd} $$buffref; + $$buffref = EMPTY; + } + + close($nfd) + if $eof; + + return 0; + }, + ); + + $process->stderr->configure( + on_read => sub { + my ($stream, $buffref, $eof) = @_; + + if (length $$buffref) { + print STDOUT $$buffref; + $$buffref = EMPTY; + } + + return 0; + }, + ); + + $process->fd3->configure( + on_read => sub { + my ($stream, $buffref, $eof) = @_; + + while($$buffref =~ s/^(.*)\n//) { + my $line = $1; + + # listen to status updates from lintian + if ($line =~ m/^complete ([^ ]+) \(([^\)]+)\)$/) { + my ($group_id, $runtime) = ($1, $2); + push(@completed, $group_id); + $processed{$group_id} = 1; + log_msg(" [lintian] processed $group_id" + . " successfully (time: $runtime)"); + } elsif ($line =~ m/^error ([^ ]+) \(([^\)]+)\)$/) { + my ($group_id, $runtime) = ($1, $2); + log_msg(" [lintian] error processing $group_id " + . "(time: $runtime)"); + $processed{$group_id} = 1; + # We ignore errors if we sent lintian a signal to avoid + # *some* false-positives. + $errors{$group_id} = 1 if not $signalled_lintian; + } elsif ($line =~ m/^ack-signal (SIG\S+)$/) { + my $signal = $1; + log_msg( +"Signal $signal acknowledged: disabled timed alarms" + ); + alarm(0); + } + } + + alarm(0) + if $eof; + + return 0; + }, + ); + + $loop->add($process); + + my $groups = $state->{'groups'}; + # Submit the tasks to Lintian + foreach my $group_id (@work_splice) { + my $members; + if (not exists($groups->{$group_id})) { + # Sanity check (can in theory happen if an external process + # modifies the state cache and we have reloaded it) + log_msg( + "Group ${group_id} disappeared before we could schedule it" + ); + next; + } + $members = $groups->{$group_id}{'members'}; + for my $member_id (sort(keys(%{${members}}))) { + my $path = $members->{$member_id}{'path'}; + $process->stdin->write($path . NEWLINE); + } + } + $process->stdin->close_when_empty; + + eval { + my $time_limit + = $start_time + BACKLOG_PROCESSING_TIME_LIMIT - time(); + my $count = 0; + my $sig_handler = sub { + my ($signal_name) = @_; + $signalled_lintian = 1; + $count++; + if ($signal_name eq 'ALRM') { + $got_alarm = 1 if $got_alarm >= 0; + } else { + $got_alarm = -1; + } + if ($count < 3) { + my $pid = $process->pid; + log_msg("Received SIG${signal_name}, " + . "sending SIGTERM to $pid [${count}/3]"); + $process->kill('TERM'); + if ($signal_name eq 'ALRM') { + log_msg( + 'Scheduling another alarm in 5 minutes from now...' + ); + alarm(300); + } + } else { + my $pid = $process->pid; + log_msg("Received SIG${signal_name} as the third one, " + . "sending SIGKILL to $pid"); + log_msg('You may have to clean up some ' + . 'temporary directories manually'); + $process->kill('KILL'); + } + }; + local $SIG{'TERM'} = $sig_handler; + local $SIG{'INT'} = $sig_handler; + local $SIG{'ALRM'} = $sig_handler; + + alarm($time_limit); + }; + + # Wait for lintian to terminate + $future->await; + + if ($got_alarm) { + if ($got_alarm == 1) { + # Lintian was (presumably) killed due to a + # time-out from this process + $exit_code = 2; + } else { + # Lintian was killed by another signal; notify + # harness that it should skip the rest as well. + $exit_code = 3; + } + } + + log_msg('Updating the lintian log used for reporting'); + my $filter = generate_log_filter($state, \%processed); + seek($nfd, 0, SEEK_END); + update_lintian_log($filter, $nfd, $new_lintian_log); + + log_msg('Updating harness state cache'); + # Reload the state cache, just in case it was modified by an external + # process during the lintian run. + $state = load_state_cache($OPT{'state-dir'}); + for my $group_id (@completed) { + my $group_data; + # In theory, they can disappear - in practise, that requires + # an external call to (e.g.) lintian reporting-sync-state. + next if not exists($state->{'groups'}{$group_id}); + $group_data = $state->{'groups'}{$group_id}; + $group_data->{'last-processed-by'} = $LINTIAN_VERSION; + delete($group_data->{'out-of-date'}); + # Always clear the error counter after a successful run. + delete($group_data->{'processing-errors'}); + delete($group_data->{'last-error-by'}); + } + for my $group_id (sort(keys(%errors))) { + my $group_data; + # In theory, they can disappear - in practise, that requires + # an external call to (e.g.) lintian reporting-sync-state. + next if not exists($state->{'groups'}{$group_id}); + $group_data = $state->{'groups'}{$group_id}; + if ($errors{$group_id}) { + if (not exists($group_data->{'last-error-by'}) + or $group_data->{'last-error-by'} ne $LINTIAN_VERSION) { + # If it is a new lintian version then (re)set the counter + # to 1. Case also triggers for the very first issue. + $group_data->{'processing-errors'} = 1; + } else { + # Repeated error with the same version + ++$group_data->{'processing-errors'}; + } + # Set the "last-error-by" flag so we can clear the + # error if there is a new version of lintian. + $group_data->{'last-error-by'} = $LINTIAN_VERSION; + } else { + delete($group_data->{'processing-errors'}); + } + } + save_state_cache($OPT{'state-dir'}, $state); + last if $exit_code; + } + return $exit_code; +} + +sub generate_log_filter { + my ($state, $exclude) = @_; + my %filter; + my $group_map = $state->{'groups'}; + for my $group_id (keys(%{${group_map}})) { + my $members; + next if exists($exclude->{$group_id}); + $members = $group_map->{$group_id}{'members'}; + for my $member_id (keys(%{$members})) { + $filter{$member_id} = 1; + } + } + return \%filter; +} + +sub update_lintian_log { + my ($keep_filter, $new_fd, $tmp_path) = @_; + my $lintian_log_dir = $OPT{'lintian-log-dir'}; + my $lintian_log = "${lintian_log_dir}/lintian.log"; + my $copy_mode = 0; + my $first = 1; + + eval { + open(my $input, '<', $lintian_log); + while (<$input>) { + if ( + m/^N: [ ] Processing [ ] (binary|udeb|source) [ ] + package [ ] (\S+) [ ] \(version [ ] (\S+), [ ] + arch [ ] (\S+)\)[ ]\.\.\./xsm + ) { + my ($type, $pkg, $ver, $arch) = ($1,$2, $3, $4); + my $k = "$type:$pkg/$ver"; + $k .= "/$arch" if $type ne 'source'; + $copy_mode = 0; + $copy_mode = 1 if exists($keep_filter->{$k}); + } + if ($copy_mode) { + if ($first) { + print {$new_fd} "N: ---start-of-old-lintian-log-file---\n"; + $first = 0; + } + print {$new_fd} $_; + } + } + close($input); + close($new_fd); + rename($tmp_path, $lintian_log); + }; + if (my $err = $@) { + # Unlink $new_lintian_log, we ignore errors as the one we + # already got is more important/interesting. + no autodie qw(unlink); + unlink($tmp_path) or warn("Cannot unlink $tmp_path: $!"); + die($err); + } + return; +} + +sub rewrite_lintian_log { + my ($keep_filter) = @_; + my $lintian_log_dir = $OPT{'lintian-log-dir'}; + my ($nfd, $new_lintian_log); + + ($nfd, $new_lintian_log) + = tempfile('lintian.log-XXXXXXX', DIR => $lintian_log_dir); + chmod(0644, $nfd); + update_lintian_log($keep_filter, $nfd, $new_lintian_log); + return 1; +} + +sub usage { + my $cmd = basename($0); + my $me = "lintian $cmd"; + print < -- + + --help Show this text and exit + + --lintian-frontend PROG Use PROG as frontend for lintian (defaults to "lintian") + --lintian-log-dir DIR Path to the harness log dir. [!] + --lintian-scratch-space DIR Use DIR for temporary files (notably temp labs) + --schedule-chunk-size N Run at most N groups in a given lintian run. + --schedule-limit-groups N Schedule at most N groups in total. [!] + --state-dir DIR Directory containing the state cache (must be + writable). [!] + +Arguments marked with [!] are required for a successful run. +EOF + + exit(0); +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et + diff --git a/commands/reporting-sync-state.pm b/commands/reporting-sync-state.pm new file mode 100644 index 0000000..af649a7 --- /dev/null +++ b/commands/reporting-sync-state.pm @@ -0,0 +1,572 @@ +#!/usr/bin/perl -w +# +# reporting-sync-state +# +# Copyright (C) 2018 Chris Lamb +# +# This program is free software. It is distributed under the terms of +# the GNU General Public License as published by the Free Software +# Foundation; either version 2 of the License, or (at your option) any +# later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package reporting_sync_state; + +use v5.20; +use warnings; +use utf8; +use autodie; + +use Getopt::Long(); +use File::Basename qw(basename); +use YAML::XS (); +use MIME::Base64 qw(encode_base64); + +use Lintian::Deb822::Parser qw(visit_dpkg_paragraph_string); +use Lintian::Relation::Version qw(versions_comparator); +use Lintian::Reporting::Util qw( + find_backlog + load_state_cache + save_state_cache +); +use Lintian::Util qw( + open_gz +); + +my $DEFAULT_CHECKSUM = 'Sha256'; +my (%KNOWN_MEMBERS, %ACTIVE_GROUPS); +my $CONFIG; +my %OPT; +my %OPT_HASH= ( + 'reporting-config=s'=> \$OPT{'reporting-config'}, + 'desired-version=s' => \$OPT{'desired-version'}, + 'reschedule-all' => \$OPT{'reschedule-all'}, + 'help|h' => \&usage, + 'debug|d' => \$OPT{'debug'}, + 'dry-run' => \$OPT{'dry-run'}, +); + +sub check_parameters { + for my $parameter (qw(reporting-config desired-version)) { + if (not defined($OPT{$parameter})) { + die( "Missing required parameter \"--${parameter}\"" + . "(use --help for more info)\n"); + } + } + if (not $OPT{'reporting-config'} or not -f $OPT{'reporting-config'}) { + die("The --reporting-config parameter must point to an existing file\n" + ); + } + return; +} + +sub required_cfg_value { + my (@keys) = @_; + my $v = $CONFIG; + for my $key (@keys) { + if (not exists($v->{$key})) { + my $k = join('.', @keys); + die("Missing required config parameter: ${k}\n"); + } + $v = $v->{$key}; + } + return $v; +} + +sub required_cfg_non_empty_list_value { + my (@keys) = @_; + my $v = required_cfg_value(@keys); + if (not defined($v) or ref($v) ne 'ARRAY' or scalar(@{$v}) < 1) { + my $k = join('.', @keys); + die("Invalid configuration: ${k} must be a non-empty list\n"); + } + return $v; +} + +sub optional_cfg_list_value { + my (@keys) = @_; + my $v = $CONFIG; + for my $key (@keys) { + if (not exists($v->{$key})) { + return []; + } + $v = $v->{$key}; + } + if (ref($v) ne 'ARRAY') { + my $k = join('.', @keys); + die("Invalid configuration: ${k} must be a list (or missing)\n"); + } + return $v; +} + +sub main { + my ($state_dir, $state, $archives, %blacklist); + STDOUT->autoflush; + Getopt::Long::config('bundling', 'no_getopt_compat', 'no_auto_abbrev'); + Getopt::Long::GetOptions(%OPT_HASH) or die("error parsing options\n"); + check_parameters(); + $CONFIG = YAML::XS::LoadFile($OPT{'reporting-config'}); + $state_dir = required_cfg_value('storage', 'state-cache'); + $state = load_state_cache($state_dir); + + if (upgrade_state_cache_if_needed($state)) { + log_debug('Updated the state cache'); + } + log_debug('Initial state had ' + . (scalar(keys(%{$state->{'groups'}}))) + . ' groups'); + $archives = required_cfg_value('archives'); + %blacklist = map { $_ => 1 } @{optional_cfg_list_value('blacklist')}; + for my $archive (sort(keys(%{$archives}))) { + log_debug("Processing archive $archive"); + my $path = required_cfg_value('archives', $archive, 'base-dir'); + my $archs = required_cfg_non_empty_list_value('archives', $archive, + 'architectures'); + my $components + = required_cfg_non_empty_list_value('archives', $archive, + 'components'); + my $distributions + = required_cfg_non_empty_list_value('archives', $archive, + 'distributions'); + local_mirror_manifests($state, $path, $distributions, $components, + $archs, \%blacklist); + } + + cleanup_state($state); + if (not $OPT{'dry-run'}) { + save_state_cache($state_dir, $state); + } + exit(0); +} + +# State: +# group-id => { +# 'last-processed-by' => , +# 'out-of-date' => <0|1>, (# if omitted => 0, unless "last-processed-by" is omitted as well) +# 'members' => { +# $member_id => { +# 'sha1' => , +# 'path' => , +# } +# }, + +sub upgrade_state_cache_if_needed { + my ($state) = @_; + if (exists($state->{'groups'})) { + my $updated = 0; + my $groups = $state->{'groups'}; + for my $group (sort(keys(%{$groups}))) { + my $group_data = $groups->{$group}; + if ( exists($group_data->{'mirror-metadata'}) + && exists($group_data->{'mirror-metadata'}{'area'})) { + if (not exists($group_data->{'mirror-metadata'}{'component'})){ + $group_data->{'mirror-metadata'}{'component'} + = $group_data->{'mirror-metadata'}{'area'}; + delete($group_data->{'mirror-metadata'}{'area'}); + $updated = 1; + } + } + } + return $updated; + } + # Migrate the "last-processed-by" version. + my $groups = $state->{'groups'} = {}; + for my $key (sort(keys(%${state}))) { + next if $key eq 'group'; + if (exists($state->{$key}{'last-processed-by'})) { + my $last_version = $state->{$key}{'last-processed-by'}; + delete($state->{$key}); + $groups->{$key}{'last-processed-by'} = $last_version; + } + } + return 1; +} + +sub add_member_to_group { + my ($state, $group_id, $member_id, $member_data, $group_metadata) = @_; + # Fetch members before group_data (relying on autovivification) + my $members = $state->{'groups'}{$group_id}{'members'}; + my $group_data = $state->{'groups'}{$group_id}; + my $member; + my $new_group = 0; + if (not defined($members)) { + $group_data->{'members'} = $members = {}; + log_debug( + "${group_id} is out-of-date: New group (triggered by ${member_id})" + ); + $new_group = 1; + } + + $member = $members->{$member_id}; + if (not defined($member)) { + $members->{$member_id} = $member = {}; + } + + # Update of path is not sufficient to consider the member out of date + # (mirror restructuring happens - although extremely rarely) + $member->{'path'} = $member_data->{'path'}; + if ($member_data->{'mirror-metadata'} + && keys(%{$member_data->{'mirror-metadata'}})) { + $member->{'mirror-metadata'} = $member_data->{'mirror-metadata'}; + } + if (not exists($group_data->{'mirror-metadata'})) { + $group_data->{'mirror-metadata'}= $group_metadata->{'mirror-metadata'}; + } else { + for my $key (keys(%{$group_metadata->{'mirror-metadata'}})) { + $group_data->{'mirror-metadata'}{$key} + = $group_metadata->{'mirror-metadata'}{$key}; + } + } + $KNOWN_MEMBERS{"${group_id} ${member_id}"} = 1; + $ACTIVE_GROUPS{$group_id} = 1; + + if (!exists($member->{lc $DEFAULT_CHECKSUM}) + || $member->{lc $DEFAULT_CHECKSUM} ne + $member_data->{lc $DEFAULT_CHECKSUM}) { + if (exists($member->{lc $DEFAULT_CHECKSUM})) { + # This seems worth a note even if the group is already out of date + my $lowercase = lc $DEFAULT_CHECKSUM; + log_debug( + "${group_id} is out-of-date: ${member_id} checksum mismatch" + . " ($member->{$lowercase} != $member_data->{$lowercase})"); + } elsif (not $group_data->{'out-of-date'} and not $new_group) { + log_debug("${group_id} is out-of-date: New member (${member_id})"); + } + $group_data->{'out-of-date'} = 1; + $member->{lc $DEFAULT_CHECKSUM} = $member_data->{lc $DEFAULT_CHECKSUM}; + } + delete($member->{'sha1'}); + + return; +} + +sub cleanup_state { + my ($state) = @_; + my %backlog + = map { $_ => 1 } find_backlog($OPT{'desired-version'}, $state); + + # Empty 'members-to-groups' to prune "dead links". It will be + # recreated by cleanup_group_state below. + $state->{'members-to-groups'} = {}; + + for my $group_id (sort(keys(%{$state->{'groups'}}))) { + cleanup_group_state($state, $group_id, \%backlog); + } + return; +} + +sub remove_if_empty { + my ($hash_ref, $key) = @_; + my ($val, $empty); + return if not exists($hash_ref->{$key}); + $val = $hash_ref->{$key}; + if (defined($val)) { + $empty = 1 if (ref($val) eq 'HASH' and not keys(%${val})); + $empty = 1 if (ref($val) eq 'ARRAY' and not scalar(@${val})); + } else { + $empty = 1; + } + delete($hash_ref->{$key}) if $empty; + return; +} + +sub cleanup_group_state { + my ($state, $group_id, $backlog) = @_; + my ($members); + my $group_data = $state->{'groups'}{$group_id}; + $members = $group_data->{'members'}; + if (not exists($ACTIVE_GROUPS{$group_id}) or not $members) { + # No members left, remove the group entirely + delete($state->{'groups'}{$group_id}); + if (not exists($ACTIVE_GROUPS{$group_id})) { + log_debug("Group ${group_id} dropped: It is not an active group"); + } else { + log_debug("Group ${group_id} dropped: No members left (early)"); + } + + return; + } + + for my $member_id (sort(keys(%{$members}))) { + if (not exists($KNOWN_MEMBERS{"${group_id} ${member_id}"})) { + delete($members->{$member_id}); + if (not $group_data->{'out-of-date'}) { + $group_data->{'out-of-date'} = 1; + log_debug( + "${group_id} is out-of-date: ${member_id} disappeared"); + } + } else { + my $member_data = $members->{$member_id}; + # Create "member_id to group_data" link + $state->{'members-to-groups'}{$member_id} = $group_data; + delete($member_data->{'mirror-metadata'}{'component'}) + if exists($member_data->{'mirror-metadata'}); + remove_if_empty($member_data, 'mirror-metadata'); + } + } + + # Add the "out-of-date" flag if it is in the backlog OR we were asked + # to reschedule all + if (not $group_data->{'out-of-date'}) { + if ($OPT{'reschedule-all'} or $backlog->{$group_id}) { + $group_data->{'out-of-date'} = 1; + log_debug("Marking ${group_id} as out of date: In backlog") + if $backlog->{$group_id}; + } + } + # Check for and possible clear the error counters + if ( + exists($group_data->{'processing-errors'}) + and (not exists($group_data->{'last-error-by'}) + or $group_data->{'last-error-by'} ne $OPT{'desired-version'}) + ) { + log_debug( + "Clearing error-counter for ${group_id}: New version of lintian"); + delete($group_data->{'processing-errors'}); + # Leave "last-error-by" as we can use that to tell if the previous + # version triggered errors. + } + + if (not %{$members}) { + # No members left, remove the group entirely. This should not happen + # as the ACTIVE_GROUPS check above ought to have caught this. + delete($state->{$group_id}); + log_debug("Group ${group_id} dropped: No members left (late)"); + } else { + # remove redundant fields + remove_if_empty($group_data, 'out-of-date'); + for my $metadata_field (qw(component maintainer uploaders)) { + remove_if_empty($group_data->{'mirror-metadata'}, $metadata_field); + } + remove_if_empty($group_data, 'mirror-metadata'); + } + + return; +} + +# Helper for local_mirror_manifests - it parses a paragraph from Sources file +sub _parse_srcs_pg { + my ($state, $blacklist, $extra_metadata, $paragraph) = @_; + my $dir = $paragraph->{'Directory'}//''; + my $group_id = $paragraph->{'Package'} . '/' . $paragraph->{'Version'}; + my $member_id = "source:${group_id}"; + my (%data, %group_metadata, $group_mirror_md); + if (exists $blacklist->{$paragraph->{'Package'}}) { + log_debug("Ignoring blacklisted package src:$paragraph->{'Package'}"); + return; + } + # only include the source if it has any binaries to be checked. + # - Otherwise we may end up checking a source with no binaries + # (happens if the architecture is "behind" in building) + return unless $ACTIVE_GROUPS{$group_id}; + $dir .= '/' if $dir; + foreach my $f (split m/\n/, $paragraph->{"Checksums-${DEFAULT_CHECKSUM}"}){ + + # trim both ends + $f =~ s/^\s+|\s+$//g; + + next unless $f && $f =~ m/\.dsc$/; + my ($checksum, undef, $basename) = split(m/\s++/, $f); + my $b64_checksum = encode_base64(pack('H*', $checksum)); + # $dir should end with a slash if it is non-empty. + $data{lc $DEFAULT_CHECKSUM} = $b64_checksum; + $data{'path'} = $extra_metadata->{'mirror-dir'} . "/$dir" . $basename; + last; + } + + $group_mirror_md = $group_metadata{'mirror-metadata'} = {}; + $group_mirror_md->{'component'} = $extra_metadata->{'component'}; + $group_mirror_md->{'maintainer'} = $paragraph->{'maintainer'}; + if (my $uploaders = $paragraph->{'uploaders'}) { + my @ulist = split(/>\K\s*,\s*/, $uploaders); + $group_mirror_md->{'uploaders'} = \@ulist; + } + + add_member_to_group($state, $group_id, $member_id, \%data, + \%group_metadata); + return; +} + +# Helper for local_mirror_manifests - it parses a paragraph from Packages file +sub _parse_pkgs_pg { + my ($state, $blacklist, $extra_metadata, $type, $paragraph) = @_; + my ($group_id, $member_id, %data, %group_metadata, $b64_checksum); + my $package = $paragraph->{'Package'}; + my $version = $paragraph->{'Version'}; + my $architecture = $paragraph->{'Architecture'}; + if (not defined($paragraph->{'Source'})) { + $paragraph->{'Source'} = $package; + } elsif ($paragraph->{'Source'} =~ /^([-+\.\w]+)\s+\((.+)\)$/) { + $paragraph->{'Source'} = $1; + $paragraph->{'Source-version'} = $2; + } + if (exists $blacklist->{$paragraph->{'Source'}}) { + log_debug("Ignoring binary package $package: it is part of " + . "blacklisted source package $paragraph->{'Source'}"); + return; + } + if (not defined($paragraph->{'Source-Version'})) { + $paragraph->{'Source-Version'} = $paragraph->{'Version'}; + } + $group_id = $paragraph->{'Source'} . '/' . $paragraph->{'Source-Version'}; + $member_id = "${type}:${package}/${version}/${architecture}"; + $data{'path'} + = $extra_metadata->{'mirror-dir'} . '/' . $paragraph->{'filename'}; + $b64_checksum + = encode_base64(pack('H*', $paragraph->{lc $DEFAULT_CHECKSUM})); + $data{lc $DEFAULT_CHECKSUM} = $b64_checksum; + + $group_metadata{'mirror-metadata'}{'maintainer'} + = $paragraph->{'Maintainer'}; + if (my $uploaders = $paragraph->{'Uploaders'}) { + my @ulist = split(/>\K\s*,\s*/, $uploaders); + $group_metadata{'mirror-metadata'}{'uploaders'} = \@ulist; + } + + add_member_to_group($state, $group_id, $member_id, \%data, + \%group_metadata); + return; +} + +# local_mirror_manifests ($mirdir, $dists, $components, $archs) +# +# Returns a list of manifests that represents what is on the local mirror +# at $mirdir. 3 manifests will be returned, one for "source", one for "binary" +# and one for "udeb" packages. They are populated based on the "Sources" and +# "Packages" files. +# +# $mirdir - the path to the local mirror +# $dists - listref of dists to consider (e.g. ['unstable']) +# $components - listref of components to consider (e.g. ['main', 'contrib', 'non-free']) +# $archs - listref of archs to consider (e.g. ['i386', 'amd64']) +# $blacklist - hashref of source packages to ignore (e.g. {'gcc-8-cross-ports' => 1}) +# +sub local_mirror_manifests { + my ($state, $mirdir, $dists, $components, $archs, $blacklist) = @_; + foreach my $dist (@$dists) { + foreach my $component (@{$components}) { + my $srcs = "$mirdir/dists/$dist/$component/source/Sources"; + + my %extra_metadata = ( + 'component' => $component, + 'mirror-dir' => $mirdir, + ); + + # Binaries have a "per arch" file. + # - we check those first and then include the source packages that + # are referred to by these binaries. + + my $dist_path = "$mirdir/dists/$dist/$component"; + for my $arch (@{$archs}) { + + my $pkgs = "${dist_path}/binary-$arch/Packages"; + my $pkgfd = _open_data_file($pkgs); + local $/ = undef; + my $pkgstring = <$pkgfd>; + close $pkgfd; + + my $binsub = sub { + _parse_pkgs_pg($state, $blacklist, \%extra_metadata, + 'binary', @_); + }; + visit_dpkg_paragraph_string($binsub, $pkgstring); + + my $upkgs + = "${dist_path}/debian-installer/binary-$arch/Packages"; + my $upkgfd = _open_data_file($upkgs); + local $/ = undef; + my $upkgstring = <$upkgfd>; + close $upkgfd; + + my $udebsub = sub { + _parse_pkgs_pg($state, $blacklist, \%extra_metadata, + 'udeb', @_); + }; + visit_dpkg_paragraph_string($udebsub, $upkgstring); + } + + my $srcfd = _open_data_file($srcs); + local $/ = undef; + my $srcstring = <$srcfd>; + close $srcfd; + + my $srcsub + = sub { _parse_srcs_pg($state, $blacklist, \%extra_metadata, @_) }; + visit_dpkg_paragraph_string($srcsub, $srcstring); + } + } + return; +} + +# _open_data_file ($file) +# +# Opens $file if it exists, otherwise it tries common extensions (i.e. .gz) and opens +# that instead. It may pipe the file through an external decompressor, so the returned +# file descriptor cannot be assumed to be a file. +# +# If $file does not exists and no common extensions are found, this dies. It may also +# die if it finds a file, but is unable to open it. +sub _open_data_file { + my ($file) = @_; + if (-e $file) { + open(my $fd, '<:encoding(UTF-8)', $file); + return $fd; + } + if (-e "${file}.gz") { + my $fd = open_gz("${file}.gz"); + binmode($fd, 'encoding(UTF-8)'); + return $fd; + } + if (-e "${file}.xz") { + open(my $fd, '-|', 'xz', '-dc', "${file}.xz"); + binmode($fd, 'encoding(UTF-8)'); + return $fd; + } + die("Cannot find ${file}: file does not exist"); +} + +sub log_debug { + if ($OPT{'debug'}) { + print "$_[0]\n"; + } + return; +} + +sub usage { + my $cmd = basename($0); + my $me = "lintian $cmd"; + print < + + --help Show this text and exit + --debug Show/log debugging output + + --reporting-config FILE + Path to the configuration file (listing the archive definitions) [!] + --desired-version X The desired "last-processed-by" Lintian version. [!] + +Arguments marked with [!] are required for a successful run. + +EOF + + exit(0); +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/data/architectures/host.json b/data/architectures/host.json new file mode 100644 index 0000000..4c3a9f9 --- /dev/null +++ b/data/architectures/host.json @@ -0,0 +1,7210 @@ +{ + "host_variables" : { + "aix-alpha" : { + "DEB_HOST_ARCH" : "aix-alpha", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "64", + "DEB_HOST_ARCH_CPU" : "alpha", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "sysv", + "DEB_HOST_ARCH_OS" : "aix", + "DEB_HOST_GNU_CPU" : "alpha", + "DEB_HOST_GNU_SYSTEM" : "aix", + "DEB_HOST_GNU_TYPE" : "alpha-aix", + "DEB_HOST_MULTIARCH" : "alpha-aix" + }, + "aix-amd64" : { + "DEB_HOST_ARCH" : "aix-amd64", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "64", + "DEB_HOST_ARCH_CPU" : "amd64", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "sysv", + "DEB_HOST_ARCH_OS" : "aix", + "DEB_HOST_GNU_CPU" : "x86_64", + "DEB_HOST_GNU_SYSTEM" : "aix", + "DEB_HOST_GNU_TYPE" : "x86_64-aix", + "DEB_HOST_MULTIARCH" : "x86_64-aix" + }, + "aix-arc" : { + "DEB_HOST_ARCH" : "aix-arc", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "arc", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "sysv", + "DEB_HOST_ARCH_OS" : "aix", + "DEB_HOST_GNU_CPU" : "arc", + "DEB_HOST_GNU_SYSTEM" : "aix", + "DEB_HOST_GNU_TYPE" : "arc-aix", + "DEB_HOST_MULTIARCH" : "arc-aix" + }, + "aix-arm" : { + "DEB_HOST_ARCH" : "aix-arm", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "arm", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "sysv", + "DEB_HOST_ARCH_OS" : "aix", + "DEB_HOST_GNU_CPU" : "arm", + "DEB_HOST_GNU_SYSTEM" : "aix", + "DEB_HOST_GNU_TYPE" : "arm-aix", + "DEB_HOST_MULTIARCH" : "arm-aix" + }, + "aix-arm64" : { + "DEB_HOST_ARCH" : "aix-arm64", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "64", + "DEB_HOST_ARCH_CPU" : "arm64", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "sysv", + "DEB_HOST_ARCH_OS" : "aix", + "DEB_HOST_GNU_CPU" : "aarch64", + "DEB_HOST_GNU_SYSTEM" : "aix", + "DEB_HOST_GNU_TYPE" : "aarch64-aix", + "DEB_HOST_MULTIARCH" : "aarch64-aix" + }, + "aix-armeb" : { + "DEB_HOST_ARCH" : "aix-armeb", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "armeb", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "sysv", + "DEB_HOST_ARCH_OS" : "aix", + "DEB_HOST_GNU_CPU" : "armeb", + "DEB_HOST_GNU_SYSTEM" : "aix", + "DEB_HOST_GNU_TYPE" : "armeb-aix", + "DEB_HOST_MULTIARCH" : "armeb-aix" + }, + "aix-avr32" : { + "DEB_HOST_ARCH" : "aix-avr32", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "avr32", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "sysv", + "DEB_HOST_ARCH_OS" : "aix", + "DEB_HOST_GNU_CPU" : "avr32", + "DEB_HOST_GNU_SYSTEM" : "aix", + "DEB_HOST_GNU_TYPE" : "avr32-aix", + "DEB_HOST_MULTIARCH" : "avr32-aix" + }, + "aix-hppa" : { + "DEB_HOST_ARCH" : "aix-hppa", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "hppa", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "sysv", + "DEB_HOST_ARCH_OS" : "aix", + "DEB_HOST_GNU_CPU" : "hppa", + "DEB_HOST_GNU_SYSTEM" : "aix", + "DEB_HOST_GNU_TYPE" : "hppa-aix", + "DEB_HOST_MULTIARCH" : "hppa-aix" + }, + "aix-i386" : { + "DEB_HOST_ARCH" : "aix-i386", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "i386", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "sysv", + "DEB_HOST_ARCH_OS" : "aix", + "DEB_HOST_GNU_CPU" : "i686", + "DEB_HOST_GNU_SYSTEM" : "aix", + "DEB_HOST_GNU_TYPE" : "i686-aix", + "DEB_HOST_MULTIARCH" : "i386-aix" + }, + "aix-ia64" : { + "DEB_HOST_ARCH" : "aix-ia64", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "64", + "DEB_HOST_ARCH_CPU" : "ia64", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "sysv", + "DEB_HOST_ARCH_OS" : "aix", + "DEB_HOST_GNU_CPU" : "ia64", + "DEB_HOST_GNU_SYSTEM" : "aix", + "DEB_HOST_GNU_TYPE" : "ia64-aix", + "DEB_HOST_MULTIARCH" : "ia64-aix" + }, + "aix-m32r" : { + "DEB_HOST_ARCH" : "aix-m32r", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "m32r", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "sysv", + "DEB_HOST_ARCH_OS" : "aix", + "DEB_HOST_GNU_CPU" : "m32r", + "DEB_HOST_GNU_SYSTEM" : "aix", + "DEB_HOST_GNU_TYPE" : "m32r-aix", + "DEB_HOST_MULTIARCH" : "m32r-aix" + }, + "aix-m68k" : { + "DEB_HOST_ARCH" : "aix-m68k", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "m68k", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "sysv", + "DEB_HOST_ARCH_OS" : "aix", + "DEB_HOST_GNU_CPU" : "m68k", + "DEB_HOST_GNU_SYSTEM" : "aix", + "DEB_HOST_GNU_TYPE" : "m68k-aix", + "DEB_HOST_MULTIARCH" : "m68k-aix" + }, + "aix-mips" : { + "DEB_HOST_ARCH" : "aix-mips", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "mips", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "sysv", + "DEB_HOST_ARCH_OS" : "aix", + "DEB_HOST_GNU_CPU" : "mips", + "DEB_HOST_GNU_SYSTEM" : "aix", + "DEB_HOST_GNU_TYPE" : "mips-aix", + "DEB_HOST_MULTIARCH" : "mips-aix" + }, + "aix-mips64" : { + "DEB_HOST_ARCH" : "aix-mips64", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "64", + "DEB_HOST_ARCH_CPU" : "mips64", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "sysv", + "DEB_HOST_ARCH_OS" : "aix", + "DEB_HOST_GNU_CPU" : "mips64", + "DEB_HOST_GNU_SYSTEM" : "aix", + "DEB_HOST_GNU_TYPE" : "mips64-aix", + "DEB_HOST_MULTIARCH" : "mips64-aix" + }, + "aix-mips64el" : { + "DEB_HOST_ARCH" : "aix-mips64el", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "64", + "DEB_HOST_ARCH_CPU" : "mips64el", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "sysv", + "DEB_HOST_ARCH_OS" : "aix", + "DEB_HOST_GNU_CPU" : "mips64el", + "DEB_HOST_GNU_SYSTEM" : "aix", + "DEB_HOST_GNU_TYPE" : "mips64el-aix", + "DEB_HOST_MULTIARCH" : "mips64el-aix" + }, + "aix-mips64r6" : { + "DEB_HOST_ARCH" : "aix-mips64r6", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "64", + "DEB_HOST_ARCH_CPU" : "mips64r6", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "sysv", + "DEB_HOST_ARCH_OS" : "aix", + "DEB_HOST_GNU_CPU" : "mipsisa64r6", + "DEB_HOST_GNU_SYSTEM" : "aix", + "DEB_HOST_GNU_TYPE" : "mipsisa64r6-aix", + "DEB_HOST_MULTIARCH" : "mipsisa64r6-aix" + }, + "aix-mips64r6el" : { + "DEB_HOST_ARCH" : "aix-mips64r6el", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "64", + "DEB_HOST_ARCH_CPU" : "mips64r6el", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "sysv", + "DEB_HOST_ARCH_OS" : "aix", + "DEB_HOST_GNU_CPU" : "mipsisa64r6el", + "DEB_HOST_GNU_SYSTEM" : "aix", + "DEB_HOST_GNU_TYPE" : "mipsisa64r6el-aix", + "DEB_HOST_MULTIARCH" : "mipsisa64r6el-aix" + }, + "aix-mipsel" : { + "DEB_HOST_ARCH" : "aix-mipsel", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "mipsel", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "sysv", + "DEB_HOST_ARCH_OS" : "aix", + "DEB_HOST_GNU_CPU" : "mipsel", + "DEB_HOST_GNU_SYSTEM" : "aix", + "DEB_HOST_GNU_TYPE" : "mipsel-aix", + "DEB_HOST_MULTIARCH" : "mipsel-aix" + }, + "aix-mipsr6" : { + "DEB_HOST_ARCH" : "aix-mipsr6", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "mipsr6", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "sysv", + "DEB_HOST_ARCH_OS" : "aix", + "DEB_HOST_GNU_CPU" : "mipsisa32r6", + "DEB_HOST_GNU_SYSTEM" : "aix", + "DEB_HOST_GNU_TYPE" : "mipsisa32r6-aix", + "DEB_HOST_MULTIARCH" : "mipsisa32r6-aix" + }, + "aix-mipsr6el" : { + "DEB_HOST_ARCH" : "aix-mipsr6el", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "mipsr6el", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "sysv", + "DEB_HOST_ARCH_OS" : "aix", + "DEB_HOST_GNU_CPU" : "mipsisa32r6el", + "DEB_HOST_GNU_SYSTEM" : "aix", + "DEB_HOST_GNU_TYPE" : "mipsisa32r6el-aix", + "DEB_HOST_MULTIARCH" : "mipsisa32r6el-aix" + }, + "aix-nios2" : { + "DEB_HOST_ARCH" : "aix-nios2", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "nios2", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "sysv", + "DEB_HOST_ARCH_OS" : "aix", + "DEB_HOST_GNU_CPU" : "nios2", + "DEB_HOST_GNU_SYSTEM" : "aix", + "DEB_HOST_GNU_TYPE" : "nios2-aix", + "DEB_HOST_MULTIARCH" : "nios2-aix" + }, + "aix-or1k" : { + "DEB_HOST_ARCH" : "aix-or1k", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "or1k", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "sysv", + "DEB_HOST_ARCH_OS" : "aix", + "DEB_HOST_GNU_CPU" : "or1k", + "DEB_HOST_GNU_SYSTEM" : "aix", + "DEB_HOST_GNU_TYPE" : "or1k-aix", + "DEB_HOST_MULTIARCH" : "or1k-aix" + }, + "aix-powerpc" : { + "DEB_HOST_ARCH" : "aix-powerpc", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "powerpc", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "sysv", + "DEB_HOST_ARCH_OS" : "aix", + "DEB_HOST_GNU_CPU" : "powerpc", + "DEB_HOST_GNU_SYSTEM" : "aix", + "DEB_HOST_GNU_TYPE" : "powerpc-aix", + "DEB_HOST_MULTIARCH" : "powerpc-aix" + }, + "aix-powerpcel" : { + "DEB_HOST_ARCH" : "aix-powerpcel", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "powerpcel", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "sysv", + "DEB_HOST_ARCH_OS" : "aix", + "DEB_HOST_GNU_CPU" : "powerpcle", + "DEB_HOST_GNU_SYSTEM" : "aix", + "DEB_HOST_GNU_TYPE" : "powerpcle-aix", + "DEB_HOST_MULTIARCH" : "powerpcle-aix" + }, + "aix-ppc64" : { + "DEB_HOST_ARCH" : "aix-ppc64", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "64", + "DEB_HOST_ARCH_CPU" : "ppc64", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "sysv", + "DEB_HOST_ARCH_OS" : "aix", + "DEB_HOST_GNU_CPU" : "powerpc64", + "DEB_HOST_GNU_SYSTEM" : "aix", + "DEB_HOST_GNU_TYPE" : "powerpc64-aix", + "DEB_HOST_MULTIARCH" : "powerpc64-aix" + }, + "aix-ppc64el" : { + "DEB_HOST_ARCH" : "aix-ppc64el", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "64", + "DEB_HOST_ARCH_CPU" : "ppc64el", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "sysv", + "DEB_HOST_ARCH_OS" : "aix", + "DEB_HOST_GNU_CPU" : "powerpc64le", + "DEB_HOST_GNU_SYSTEM" : "aix", + "DEB_HOST_GNU_TYPE" : "powerpc64le-aix", + "DEB_HOST_MULTIARCH" : "powerpc64le-aix" + }, + "aix-riscv64" : { + "DEB_HOST_ARCH" : "aix-riscv64", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "64", + "DEB_HOST_ARCH_CPU" : "riscv64", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "sysv", + "DEB_HOST_ARCH_OS" : "aix", + "DEB_HOST_GNU_CPU" : "riscv64", + "DEB_HOST_GNU_SYSTEM" : "aix", + "DEB_HOST_GNU_TYPE" : "riscv64-aix", + "DEB_HOST_MULTIARCH" : "riscv64-aix" + }, + "aix-s390" : { + "DEB_HOST_ARCH" : "aix-s390", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "s390", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "sysv", + "DEB_HOST_ARCH_OS" : "aix", + "DEB_HOST_GNU_CPU" : "s390", + "DEB_HOST_GNU_SYSTEM" : "aix", + "DEB_HOST_GNU_TYPE" : "s390-aix", + "DEB_HOST_MULTIARCH" : "s390-aix" + }, + "aix-s390x" : { + "DEB_HOST_ARCH" : "aix-s390x", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "64", + "DEB_HOST_ARCH_CPU" : "s390x", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "sysv", + "DEB_HOST_ARCH_OS" : "aix", + "DEB_HOST_GNU_CPU" : "s390x", + "DEB_HOST_GNU_SYSTEM" : "aix", + "DEB_HOST_GNU_TYPE" : "s390x-aix", + "DEB_HOST_MULTIARCH" : "s390x-aix" + }, + "aix-sh3" : { + "DEB_HOST_ARCH" : "aix-sh3", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "sh3", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "sysv", + "DEB_HOST_ARCH_OS" : "aix", + "DEB_HOST_GNU_CPU" : "sh3", + "DEB_HOST_GNU_SYSTEM" : "aix", + "DEB_HOST_GNU_TYPE" : "sh3-aix", + "DEB_HOST_MULTIARCH" : "sh3-aix" + }, + "aix-sh3eb" : { + "DEB_HOST_ARCH" : "aix-sh3eb", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "sh3eb", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "sysv", + "DEB_HOST_ARCH_OS" : "aix", + "DEB_HOST_GNU_CPU" : "sh3eb", + "DEB_HOST_GNU_SYSTEM" : "aix", + "DEB_HOST_GNU_TYPE" : "sh3eb-aix", + "DEB_HOST_MULTIARCH" : "sh3eb-aix" + }, + "aix-sh4" : { + "DEB_HOST_ARCH" : "aix-sh4", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "sh4", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "sysv", + "DEB_HOST_ARCH_OS" : "aix", + "DEB_HOST_GNU_CPU" : "sh4", + "DEB_HOST_GNU_SYSTEM" : "aix", + "DEB_HOST_GNU_TYPE" : "sh4-aix", + "DEB_HOST_MULTIARCH" : "sh4-aix" + }, + "aix-sh4eb" : { + "DEB_HOST_ARCH" : "aix-sh4eb", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "sh4eb", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "sysv", + "DEB_HOST_ARCH_OS" : "aix", + "DEB_HOST_GNU_CPU" : "sh4eb", + "DEB_HOST_GNU_SYSTEM" : "aix", + "DEB_HOST_GNU_TYPE" : "sh4eb-aix", + "DEB_HOST_MULTIARCH" : "sh4eb-aix" + }, + "aix-sparc" : { + "DEB_HOST_ARCH" : "aix-sparc", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "sparc", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "sysv", + "DEB_HOST_ARCH_OS" : "aix", + "DEB_HOST_GNU_CPU" : "sparc", + "DEB_HOST_GNU_SYSTEM" : "aix", + "DEB_HOST_GNU_TYPE" : "sparc-aix", + "DEB_HOST_MULTIARCH" : "sparc-aix" + }, + "aix-sparc64" : { + "DEB_HOST_ARCH" : "aix-sparc64", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "64", + "DEB_HOST_ARCH_CPU" : "sparc64", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "sysv", + "DEB_HOST_ARCH_OS" : "aix", + "DEB_HOST_GNU_CPU" : "sparc64", + "DEB_HOST_GNU_SYSTEM" : "aix", + "DEB_HOST_GNU_TYPE" : "sparc64-aix", + "DEB_HOST_MULTIARCH" : "sparc64-aix" + }, + "aix-tilegx" : { + "DEB_HOST_ARCH" : "aix-tilegx", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "64", + "DEB_HOST_ARCH_CPU" : "tilegx", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "sysv", + "DEB_HOST_ARCH_OS" : "aix", + "DEB_HOST_GNU_CPU" : "tilegx", + "DEB_HOST_GNU_SYSTEM" : "aix", + "DEB_HOST_GNU_TYPE" : "tilegx-aix", + "DEB_HOST_MULTIARCH" : "tilegx-aix" + }, + "alpha" : { + "DEB_HOST_ARCH" : "alpha", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "64", + "DEB_HOST_ARCH_CPU" : "alpha", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "gnu", + "DEB_HOST_ARCH_OS" : "linux", + "DEB_HOST_GNU_CPU" : "alpha", + "DEB_HOST_GNU_SYSTEM" : "linux-gnu", + "DEB_HOST_GNU_TYPE" : "alpha-linux-gnu", + "DEB_HOST_MULTIARCH" : "alpha-linux-gnu" + }, + "amd64" : { + "DEB_HOST_ARCH" : "amd64", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "64", + "DEB_HOST_ARCH_CPU" : "amd64", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "gnu", + "DEB_HOST_ARCH_OS" : "linux", + "DEB_HOST_GNU_CPU" : "x86_64", + "DEB_HOST_GNU_SYSTEM" : "linux-gnu", + "DEB_HOST_GNU_TYPE" : "x86_64-linux-gnu", + "DEB_HOST_MULTIARCH" : "x86_64-linux-gnu" + }, + "arc" : { + "DEB_HOST_ARCH" : "arc", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "arc", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "gnu", + "DEB_HOST_ARCH_OS" : "linux", + "DEB_HOST_GNU_CPU" : "arc", + "DEB_HOST_GNU_SYSTEM" : "linux-gnu", + "DEB_HOST_GNU_TYPE" : "arc-linux-gnu", + "DEB_HOST_MULTIARCH" : "arc-linux-gnu" + }, + "arm" : { + "DEB_HOST_ARCH" : "arm", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "arm", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "gnu", + "DEB_HOST_ARCH_OS" : "linux", + "DEB_HOST_GNU_CPU" : "arm", + "DEB_HOST_GNU_SYSTEM" : "linux-gnu", + "DEB_HOST_GNU_TYPE" : "arm-linux-gnu", + "DEB_HOST_MULTIARCH" : "arm-linux-gnu" + }, + "arm64" : { + "DEB_HOST_ARCH" : "arm64", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "64", + "DEB_HOST_ARCH_CPU" : "arm64", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "gnu", + "DEB_HOST_ARCH_OS" : "linux", + "DEB_HOST_GNU_CPU" : "aarch64", + "DEB_HOST_GNU_SYSTEM" : "linux-gnu", + "DEB_HOST_GNU_TYPE" : "aarch64-linux-gnu", + "DEB_HOST_MULTIARCH" : "aarch64-linux-gnu" + }, + "arm64ilp32" : { + "DEB_HOST_ARCH" : "arm64ilp32", + "DEB_HOST_ARCH_ABI" : "ilp32", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "arm64", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "gnu", + "DEB_HOST_ARCH_OS" : "linux", + "DEB_HOST_GNU_CPU" : "aarch64", + "DEB_HOST_GNU_SYSTEM" : "linux-gnu_ilp32", + "DEB_HOST_GNU_TYPE" : "aarch64-linux-gnu_ilp32", + "DEB_HOST_MULTIARCH" : "aarch64-linux-gnu_ilp32" + }, + "armeb" : { + "DEB_HOST_ARCH" : "armeb", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "armeb", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "gnu", + "DEB_HOST_ARCH_OS" : "linux", + "DEB_HOST_GNU_CPU" : "armeb", + "DEB_HOST_GNU_SYSTEM" : "linux-gnu", + "DEB_HOST_GNU_TYPE" : "armeb-linux-gnu", + "DEB_HOST_MULTIARCH" : "armeb-linux-gnu" + }, + "armel" : { + "DEB_HOST_ARCH" : "armel", + "DEB_HOST_ARCH_ABI" : "eabi", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "arm", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "gnu", + "DEB_HOST_ARCH_OS" : "linux", + "DEB_HOST_GNU_CPU" : "arm", + "DEB_HOST_GNU_SYSTEM" : "linux-gnueabi", + "DEB_HOST_GNU_TYPE" : "arm-linux-gnueabi", + "DEB_HOST_MULTIARCH" : "arm-linux-gnueabi" + }, + "armhf" : { + "DEB_HOST_ARCH" : "armhf", + "DEB_HOST_ARCH_ABI" : "eabihf", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "arm", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "gnu", + "DEB_HOST_ARCH_OS" : "linux", + "DEB_HOST_GNU_CPU" : "arm", + "DEB_HOST_GNU_SYSTEM" : "linux-gnueabihf", + "DEB_HOST_GNU_TYPE" : "arm-linux-gnueabihf", + "DEB_HOST_MULTIARCH" : "arm-linux-gnueabihf" + }, + "avr32" : { + "DEB_HOST_ARCH" : "avr32", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "avr32", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "gnu", + "DEB_HOST_ARCH_OS" : "linux", + "DEB_HOST_GNU_CPU" : "avr32", + "DEB_HOST_GNU_SYSTEM" : "linux-gnu", + "DEB_HOST_GNU_TYPE" : "avr32-linux-gnu", + "DEB_HOST_MULTIARCH" : "avr32-linux-gnu" + }, + "darwin-alpha" : { + "DEB_HOST_ARCH" : "darwin-alpha", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "64", + "DEB_HOST_ARCH_CPU" : "alpha", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "bsd", + "DEB_HOST_ARCH_OS" : "darwin", + "DEB_HOST_GNU_CPU" : "alpha", + "DEB_HOST_GNU_SYSTEM" : "darwin", + "DEB_HOST_GNU_TYPE" : "alpha-darwin", + "DEB_HOST_MULTIARCH" : "alpha-darwin" + }, + "darwin-amd64" : { + "DEB_HOST_ARCH" : "darwin-amd64", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "64", + "DEB_HOST_ARCH_CPU" : "amd64", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "bsd", + "DEB_HOST_ARCH_OS" : "darwin", + "DEB_HOST_GNU_CPU" : "x86_64", + "DEB_HOST_GNU_SYSTEM" : "darwin", + "DEB_HOST_GNU_TYPE" : "x86_64-darwin", + "DEB_HOST_MULTIARCH" : "x86_64-darwin" + }, + "darwin-arc" : { + "DEB_HOST_ARCH" : "darwin-arc", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "arc", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "bsd", + "DEB_HOST_ARCH_OS" : "darwin", + "DEB_HOST_GNU_CPU" : "arc", + "DEB_HOST_GNU_SYSTEM" : "darwin", + "DEB_HOST_GNU_TYPE" : "arc-darwin", + "DEB_HOST_MULTIARCH" : "arc-darwin" + }, + "darwin-arm" : { + "DEB_HOST_ARCH" : "darwin-arm", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "arm", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "bsd", + "DEB_HOST_ARCH_OS" : "darwin", + "DEB_HOST_GNU_CPU" : "arm", + "DEB_HOST_GNU_SYSTEM" : "darwin", + "DEB_HOST_GNU_TYPE" : "arm-darwin", + "DEB_HOST_MULTIARCH" : "arm-darwin" + }, + "darwin-arm64" : { + "DEB_HOST_ARCH" : "darwin-arm64", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "64", + "DEB_HOST_ARCH_CPU" : "arm64", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "bsd", + "DEB_HOST_ARCH_OS" : "darwin", + "DEB_HOST_GNU_CPU" : "aarch64", + "DEB_HOST_GNU_SYSTEM" : "darwin", + "DEB_HOST_GNU_TYPE" : "aarch64-darwin", + "DEB_HOST_MULTIARCH" : "aarch64-darwin" + }, + "darwin-armeb" : { + "DEB_HOST_ARCH" : "darwin-armeb", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "armeb", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "bsd", + "DEB_HOST_ARCH_OS" : "darwin", + "DEB_HOST_GNU_CPU" : "armeb", + "DEB_HOST_GNU_SYSTEM" : "darwin", + "DEB_HOST_GNU_TYPE" : "armeb-darwin", + "DEB_HOST_MULTIARCH" : "armeb-darwin" + }, + "darwin-avr32" : { + "DEB_HOST_ARCH" : "darwin-avr32", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "avr32", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "bsd", + "DEB_HOST_ARCH_OS" : "darwin", + "DEB_HOST_GNU_CPU" : "avr32", + "DEB_HOST_GNU_SYSTEM" : "darwin", + "DEB_HOST_GNU_TYPE" : "avr32-darwin", + "DEB_HOST_MULTIARCH" : "avr32-darwin" + }, + "darwin-hppa" : { + "DEB_HOST_ARCH" : "darwin-hppa", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "hppa", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "bsd", + "DEB_HOST_ARCH_OS" : "darwin", + "DEB_HOST_GNU_CPU" : "hppa", + "DEB_HOST_GNU_SYSTEM" : "darwin", + "DEB_HOST_GNU_TYPE" : "hppa-darwin", + "DEB_HOST_MULTIARCH" : "hppa-darwin" + }, + "darwin-i386" : { + "DEB_HOST_ARCH" : "darwin-i386", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "i386", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "bsd", + "DEB_HOST_ARCH_OS" : "darwin", + "DEB_HOST_GNU_CPU" : "i686", + "DEB_HOST_GNU_SYSTEM" : "darwin", + "DEB_HOST_GNU_TYPE" : "i686-darwin", + "DEB_HOST_MULTIARCH" : "i386-darwin" + }, + "darwin-ia64" : { + "DEB_HOST_ARCH" : "darwin-ia64", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "64", + "DEB_HOST_ARCH_CPU" : "ia64", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "bsd", + "DEB_HOST_ARCH_OS" : "darwin", + "DEB_HOST_GNU_CPU" : "ia64", + "DEB_HOST_GNU_SYSTEM" : "darwin", + "DEB_HOST_GNU_TYPE" : "ia64-darwin", + "DEB_HOST_MULTIARCH" : "ia64-darwin" + }, + "darwin-m32r" : { + "DEB_HOST_ARCH" : "darwin-m32r", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "m32r", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "bsd", + "DEB_HOST_ARCH_OS" : "darwin", + "DEB_HOST_GNU_CPU" : "m32r", + "DEB_HOST_GNU_SYSTEM" : "darwin", + "DEB_HOST_GNU_TYPE" : "m32r-darwin", + "DEB_HOST_MULTIARCH" : "m32r-darwin" + }, + "darwin-m68k" : { + "DEB_HOST_ARCH" : "darwin-m68k", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "m68k", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "bsd", + "DEB_HOST_ARCH_OS" : "darwin", + "DEB_HOST_GNU_CPU" : "m68k", + "DEB_HOST_GNU_SYSTEM" : "darwin", + "DEB_HOST_GNU_TYPE" : "m68k-darwin", + "DEB_HOST_MULTIARCH" : "m68k-darwin" + }, + "darwin-mips" : { + "DEB_HOST_ARCH" : "darwin-mips", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "mips", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "bsd", + "DEB_HOST_ARCH_OS" : "darwin", + "DEB_HOST_GNU_CPU" : "mips", + "DEB_HOST_GNU_SYSTEM" : "darwin", + "DEB_HOST_GNU_TYPE" : "mips-darwin", + "DEB_HOST_MULTIARCH" : "mips-darwin" + }, + "darwin-mips64" : { + "DEB_HOST_ARCH" : "darwin-mips64", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "64", + "DEB_HOST_ARCH_CPU" : "mips64", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "bsd", + "DEB_HOST_ARCH_OS" : "darwin", + "DEB_HOST_GNU_CPU" : "mips64", + "DEB_HOST_GNU_SYSTEM" : "darwin", + "DEB_HOST_GNU_TYPE" : "mips64-darwin", + "DEB_HOST_MULTIARCH" : "mips64-darwin" + }, + "darwin-mips64el" : { + "DEB_HOST_ARCH" : "darwin-mips64el", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "64", + "DEB_HOST_ARCH_CPU" : "mips64el", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "bsd", + "DEB_HOST_ARCH_OS" : "darwin", + "DEB_HOST_GNU_CPU" : "mips64el", + "DEB_HOST_GNU_SYSTEM" : "darwin", + "DEB_HOST_GNU_TYPE" : "mips64el-darwin", + "DEB_HOST_MULTIARCH" : "mips64el-darwin" + }, + "darwin-mips64r6" : { + "DEB_HOST_ARCH" : "darwin-mips64r6", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "64", + "DEB_HOST_ARCH_CPU" : "mips64r6", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "bsd", + "DEB_HOST_ARCH_OS" : "darwin", + "DEB_HOST_GNU_CPU" : "mipsisa64r6", + "DEB_HOST_GNU_SYSTEM" : "darwin", + "DEB_HOST_GNU_TYPE" : "mipsisa64r6-darwin", + "DEB_HOST_MULTIARCH" : "mipsisa64r6-darwin" + }, + "darwin-mips64r6el" : { + "DEB_HOST_ARCH" : "darwin-mips64r6el", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "64", + "DEB_HOST_ARCH_CPU" : "mips64r6el", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "bsd", + "DEB_HOST_ARCH_OS" : "darwin", + "DEB_HOST_GNU_CPU" : "mipsisa64r6el", + "DEB_HOST_GNU_SYSTEM" : "darwin", + "DEB_HOST_GNU_TYPE" : "mipsisa64r6el-darwin", + "DEB_HOST_MULTIARCH" : "mipsisa64r6el-darwin" + }, + "darwin-mipsel" : { + "DEB_HOST_ARCH" : "darwin-mipsel", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "mipsel", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "bsd", + "DEB_HOST_ARCH_OS" : "darwin", + "DEB_HOST_GNU_CPU" : "mipsel", + "DEB_HOST_GNU_SYSTEM" : "darwin", + "DEB_HOST_GNU_TYPE" : "mipsel-darwin", + "DEB_HOST_MULTIARCH" : "mipsel-darwin" + }, + "darwin-mipsr6" : { + "DEB_HOST_ARCH" : "darwin-mipsr6", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "mipsr6", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "bsd", + "DEB_HOST_ARCH_OS" : "darwin", + "DEB_HOST_GNU_CPU" : "mipsisa32r6", + "DEB_HOST_GNU_SYSTEM" : "darwin", + "DEB_HOST_GNU_TYPE" : "mipsisa32r6-darwin", + "DEB_HOST_MULTIARCH" : "mipsisa32r6-darwin" + }, + "darwin-mipsr6el" : { + "DEB_HOST_ARCH" : "darwin-mipsr6el", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "mipsr6el", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "bsd", + "DEB_HOST_ARCH_OS" : "darwin", + "DEB_HOST_GNU_CPU" : "mipsisa32r6el", + "DEB_HOST_GNU_SYSTEM" : "darwin", + "DEB_HOST_GNU_TYPE" : "mipsisa32r6el-darwin", + "DEB_HOST_MULTIARCH" : "mipsisa32r6el-darwin" + }, + "darwin-nios2" : { + "DEB_HOST_ARCH" : "darwin-nios2", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "nios2", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "bsd", + "DEB_HOST_ARCH_OS" : "darwin", + "DEB_HOST_GNU_CPU" : "nios2", + "DEB_HOST_GNU_SYSTEM" : "darwin", + "DEB_HOST_GNU_TYPE" : "nios2-darwin", + "DEB_HOST_MULTIARCH" : "nios2-darwin" + }, + "darwin-or1k" : { + "DEB_HOST_ARCH" : "darwin-or1k", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "or1k", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "bsd", + "DEB_HOST_ARCH_OS" : "darwin", + "DEB_HOST_GNU_CPU" : "or1k", + "DEB_HOST_GNU_SYSTEM" : "darwin", + "DEB_HOST_GNU_TYPE" : "or1k-darwin", + "DEB_HOST_MULTIARCH" : "or1k-darwin" + }, + "darwin-powerpc" : { + "DEB_HOST_ARCH" : "darwin-powerpc", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "powerpc", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "bsd", + "DEB_HOST_ARCH_OS" : "darwin", + "DEB_HOST_GNU_CPU" : "powerpc", + "DEB_HOST_GNU_SYSTEM" : "darwin", + "DEB_HOST_GNU_TYPE" : "powerpc-darwin", + "DEB_HOST_MULTIARCH" : "powerpc-darwin" + }, + "darwin-powerpcel" : { + "DEB_HOST_ARCH" : "darwin-powerpcel", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "powerpcel", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "bsd", + "DEB_HOST_ARCH_OS" : "darwin", + "DEB_HOST_GNU_CPU" : "powerpcle", + "DEB_HOST_GNU_SYSTEM" : "darwin", + "DEB_HOST_GNU_TYPE" : "powerpcle-darwin", + "DEB_HOST_MULTIARCH" : "powerpcle-darwin" + }, + "darwin-ppc64" : { + "DEB_HOST_ARCH" : "darwin-ppc64", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "64", + "DEB_HOST_ARCH_CPU" : "ppc64", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "bsd", + "DEB_HOST_ARCH_OS" : "darwin", + "DEB_HOST_GNU_CPU" : "powerpc64", + "DEB_HOST_GNU_SYSTEM" : "darwin", + "DEB_HOST_GNU_TYPE" : "powerpc64-darwin", + "DEB_HOST_MULTIARCH" : "powerpc64-darwin" + }, + "darwin-ppc64el" : { + "DEB_HOST_ARCH" : "darwin-ppc64el", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "64", + "DEB_HOST_ARCH_CPU" : "ppc64el", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "bsd", + "DEB_HOST_ARCH_OS" : "darwin", + "DEB_HOST_GNU_CPU" : "powerpc64le", + "DEB_HOST_GNU_SYSTEM" : "darwin", + "DEB_HOST_GNU_TYPE" : "powerpc64le-darwin", + "DEB_HOST_MULTIARCH" : "powerpc64le-darwin" + }, + "darwin-riscv64" : { + "DEB_HOST_ARCH" : "darwin-riscv64", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "64", + "DEB_HOST_ARCH_CPU" : "riscv64", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "bsd", + "DEB_HOST_ARCH_OS" : "darwin", + "DEB_HOST_GNU_CPU" : "riscv64", + "DEB_HOST_GNU_SYSTEM" : "darwin", + "DEB_HOST_GNU_TYPE" : "riscv64-darwin", + "DEB_HOST_MULTIARCH" : "riscv64-darwin" + }, + "darwin-s390" : { + "DEB_HOST_ARCH" : "darwin-s390", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "s390", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "bsd", + "DEB_HOST_ARCH_OS" : "darwin", + "DEB_HOST_GNU_CPU" : "s390", + "DEB_HOST_GNU_SYSTEM" : "darwin", + "DEB_HOST_GNU_TYPE" : "s390-darwin", + "DEB_HOST_MULTIARCH" : "s390-darwin" + }, + "darwin-s390x" : { + "DEB_HOST_ARCH" : "darwin-s390x", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "64", + "DEB_HOST_ARCH_CPU" : "s390x", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "bsd", + "DEB_HOST_ARCH_OS" : "darwin", + "DEB_HOST_GNU_CPU" : "s390x", + "DEB_HOST_GNU_SYSTEM" : "darwin", + "DEB_HOST_GNU_TYPE" : "s390x-darwin", + "DEB_HOST_MULTIARCH" : "s390x-darwin" + }, + "darwin-sh3" : { + "DEB_HOST_ARCH" : "darwin-sh3", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "sh3", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "bsd", + "DEB_HOST_ARCH_OS" : "darwin", + "DEB_HOST_GNU_CPU" : "sh3", + "DEB_HOST_GNU_SYSTEM" : "darwin", + "DEB_HOST_GNU_TYPE" : "sh3-darwin", + "DEB_HOST_MULTIARCH" : "sh3-darwin" + }, + "darwin-sh3eb" : { + "DEB_HOST_ARCH" : "darwin-sh3eb", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "sh3eb", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "bsd", + "DEB_HOST_ARCH_OS" : "darwin", + "DEB_HOST_GNU_CPU" : "sh3eb", + "DEB_HOST_GNU_SYSTEM" : "darwin", + "DEB_HOST_GNU_TYPE" : "sh3eb-darwin", + "DEB_HOST_MULTIARCH" : "sh3eb-darwin" + }, + "darwin-sh4" : { + "DEB_HOST_ARCH" : "darwin-sh4", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "sh4", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "bsd", + "DEB_HOST_ARCH_OS" : "darwin", + "DEB_HOST_GNU_CPU" : "sh4", + "DEB_HOST_GNU_SYSTEM" : "darwin", + "DEB_HOST_GNU_TYPE" : "sh4-darwin", + "DEB_HOST_MULTIARCH" : "sh4-darwin" + }, + "darwin-sh4eb" : { + "DEB_HOST_ARCH" : "darwin-sh4eb", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "sh4eb", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "bsd", + "DEB_HOST_ARCH_OS" : "darwin", + "DEB_HOST_GNU_CPU" : "sh4eb", + "DEB_HOST_GNU_SYSTEM" : "darwin", + "DEB_HOST_GNU_TYPE" : "sh4eb-darwin", + "DEB_HOST_MULTIARCH" : "sh4eb-darwin" + }, + "darwin-sparc" : { + "DEB_HOST_ARCH" : "darwin-sparc", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "sparc", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "bsd", + "DEB_HOST_ARCH_OS" : "darwin", + "DEB_HOST_GNU_CPU" : "sparc", + "DEB_HOST_GNU_SYSTEM" : "darwin", + "DEB_HOST_GNU_TYPE" : "sparc-darwin", + "DEB_HOST_MULTIARCH" : "sparc-darwin" + }, + "darwin-sparc64" : { + "DEB_HOST_ARCH" : "darwin-sparc64", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "64", + "DEB_HOST_ARCH_CPU" : "sparc64", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "bsd", + "DEB_HOST_ARCH_OS" : "darwin", + "DEB_HOST_GNU_CPU" : "sparc64", + "DEB_HOST_GNU_SYSTEM" : "darwin", + "DEB_HOST_GNU_TYPE" : "sparc64-darwin", + "DEB_HOST_MULTIARCH" : "sparc64-darwin" + }, + "darwin-tilegx" : { + "DEB_HOST_ARCH" : "darwin-tilegx", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "64", + "DEB_HOST_ARCH_CPU" : "tilegx", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "bsd", + "DEB_HOST_ARCH_OS" : "darwin", + "DEB_HOST_GNU_CPU" : "tilegx", + "DEB_HOST_GNU_SYSTEM" : "darwin", + "DEB_HOST_GNU_TYPE" : "tilegx-darwin", + "DEB_HOST_MULTIARCH" : "tilegx-darwin" + }, + "dragonflybsd-alpha" : { + "DEB_HOST_ARCH" : "dragonflybsd-alpha", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "64", + "DEB_HOST_ARCH_CPU" : "alpha", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "bsd", + "DEB_HOST_ARCH_OS" : "dragonflybsd", + "DEB_HOST_GNU_CPU" : "alpha", + "DEB_HOST_GNU_SYSTEM" : "dragonflybsd", + "DEB_HOST_GNU_TYPE" : "alpha-dragonflybsd", + "DEB_HOST_MULTIARCH" : "alpha-dragonflybsd" + }, + "dragonflybsd-amd64" : { + "DEB_HOST_ARCH" : "dragonflybsd-amd64", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "64", + "DEB_HOST_ARCH_CPU" : "amd64", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "bsd", + "DEB_HOST_ARCH_OS" : "dragonflybsd", + "DEB_HOST_GNU_CPU" : "x86_64", + "DEB_HOST_GNU_SYSTEM" : "dragonflybsd", + "DEB_HOST_GNU_TYPE" : "x86_64-dragonflybsd", + "DEB_HOST_MULTIARCH" : "x86_64-dragonflybsd" + }, + "dragonflybsd-arc" : { + "DEB_HOST_ARCH" : "dragonflybsd-arc", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "arc", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "bsd", + "DEB_HOST_ARCH_OS" : "dragonflybsd", + "DEB_HOST_GNU_CPU" : "arc", + "DEB_HOST_GNU_SYSTEM" : "dragonflybsd", + "DEB_HOST_GNU_TYPE" : "arc-dragonflybsd", + "DEB_HOST_MULTIARCH" : "arc-dragonflybsd" + }, + "dragonflybsd-arm" : { + "DEB_HOST_ARCH" : "dragonflybsd-arm", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "arm", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "bsd", + "DEB_HOST_ARCH_OS" : "dragonflybsd", + "DEB_HOST_GNU_CPU" : "arm", + "DEB_HOST_GNU_SYSTEM" : "dragonflybsd", + "DEB_HOST_GNU_TYPE" : "arm-dragonflybsd", + "DEB_HOST_MULTIARCH" : "arm-dragonflybsd" + }, + "dragonflybsd-arm64" : { + "DEB_HOST_ARCH" : "dragonflybsd-arm64", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "64", + "DEB_HOST_ARCH_CPU" : "arm64", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "bsd", + "DEB_HOST_ARCH_OS" : "dragonflybsd", + "DEB_HOST_GNU_CPU" : "aarch64", + "DEB_HOST_GNU_SYSTEM" : "dragonflybsd", + "DEB_HOST_GNU_TYPE" : "aarch64-dragonflybsd", + "DEB_HOST_MULTIARCH" : "aarch64-dragonflybsd" + }, + "dragonflybsd-armeb" : { + "DEB_HOST_ARCH" : "dragonflybsd-armeb", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "armeb", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "bsd", + "DEB_HOST_ARCH_OS" : "dragonflybsd", + "DEB_HOST_GNU_CPU" : "armeb", + "DEB_HOST_GNU_SYSTEM" : "dragonflybsd", + "DEB_HOST_GNU_TYPE" : "armeb-dragonflybsd", + "DEB_HOST_MULTIARCH" : "armeb-dragonflybsd" + }, + "dragonflybsd-avr32" : { + "DEB_HOST_ARCH" : "dragonflybsd-avr32", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "avr32", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "bsd", + "DEB_HOST_ARCH_OS" : "dragonflybsd", + "DEB_HOST_GNU_CPU" : "avr32", + "DEB_HOST_GNU_SYSTEM" : "dragonflybsd", + "DEB_HOST_GNU_TYPE" : "avr32-dragonflybsd", + "DEB_HOST_MULTIARCH" : "avr32-dragonflybsd" + }, + "dragonflybsd-hppa" : { + "DEB_HOST_ARCH" : "dragonflybsd-hppa", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "hppa", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "bsd", + "DEB_HOST_ARCH_OS" : "dragonflybsd", + "DEB_HOST_GNU_CPU" : "hppa", + "DEB_HOST_GNU_SYSTEM" : "dragonflybsd", + "DEB_HOST_GNU_TYPE" : "hppa-dragonflybsd", + "DEB_HOST_MULTIARCH" : "hppa-dragonflybsd" + }, + "dragonflybsd-i386" : { + "DEB_HOST_ARCH" : "dragonflybsd-i386", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "i386", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "bsd", + "DEB_HOST_ARCH_OS" : "dragonflybsd", + "DEB_HOST_GNU_CPU" : "i686", + "DEB_HOST_GNU_SYSTEM" : "dragonflybsd", + "DEB_HOST_GNU_TYPE" : "i686-dragonflybsd", + "DEB_HOST_MULTIARCH" : "i386-dragonflybsd" + }, + "dragonflybsd-ia64" : { + "DEB_HOST_ARCH" : "dragonflybsd-ia64", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "64", + "DEB_HOST_ARCH_CPU" : "ia64", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "bsd", + "DEB_HOST_ARCH_OS" : "dragonflybsd", + "DEB_HOST_GNU_CPU" : "ia64", + "DEB_HOST_GNU_SYSTEM" : "dragonflybsd", + "DEB_HOST_GNU_TYPE" : "ia64-dragonflybsd", + "DEB_HOST_MULTIARCH" : "ia64-dragonflybsd" + }, + "dragonflybsd-m32r" : { + "DEB_HOST_ARCH" : "dragonflybsd-m32r", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "m32r", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "bsd", + "DEB_HOST_ARCH_OS" : "dragonflybsd", + "DEB_HOST_GNU_CPU" : "m32r", + "DEB_HOST_GNU_SYSTEM" : "dragonflybsd", + "DEB_HOST_GNU_TYPE" : "m32r-dragonflybsd", + "DEB_HOST_MULTIARCH" : "m32r-dragonflybsd" + }, + "dragonflybsd-m68k" : { + "DEB_HOST_ARCH" : "dragonflybsd-m68k", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "m68k", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "bsd", + "DEB_HOST_ARCH_OS" : "dragonflybsd", + "DEB_HOST_GNU_CPU" : "m68k", + "DEB_HOST_GNU_SYSTEM" : "dragonflybsd", + "DEB_HOST_GNU_TYPE" : "m68k-dragonflybsd", + "DEB_HOST_MULTIARCH" : "m68k-dragonflybsd" + }, + "dragonflybsd-mips" : { + "DEB_HOST_ARCH" : "dragonflybsd-mips", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "mips", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "bsd", + "DEB_HOST_ARCH_OS" : "dragonflybsd", + "DEB_HOST_GNU_CPU" : "mips", + "DEB_HOST_GNU_SYSTEM" : "dragonflybsd", + "DEB_HOST_GNU_TYPE" : "mips-dragonflybsd", + "DEB_HOST_MULTIARCH" : "mips-dragonflybsd" + }, + "dragonflybsd-mips64" : { + "DEB_HOST_ARCH" : "dragonflybsd-mips64", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "64", + "DEB_HOST_ARCH_CPU" : "mips64", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "bsd", + "DEB_HOST_ARCH_OS" : "dragonflybsd", + "DEB_HOST_GNU_CPU" : "mips64", + "DEB_HOST_GNU_SYSTEM" : "dragonflybsd", + "DEB_HOST_GNU_TYPE" : "mips64-dragonflybsd", + "DEB_HOST_MULTIARCH" : "mips64-dragonflybsd" + }, + "dragonflybsd-mips64el" : { + "DEB_HOST_ARCH" : "dragonflybsd-mips64el", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "64", + "DEB_HOST_ARCH_CPU" : "mips64el", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "bsd", + "DEB_HOST_ARCH_OS" : "dragonflybsd", + "DEB_HOST_GNU_CPU" : "mips64el", + "DEB_HOST_GNU_SYSTEM" : "dragonflybsd", + "DEB_HOST_GNU_TYPE" : "mips64el-dragonflybsd", + "DEB_HOST_MULTIARCH" : "mips64el-dragonflybsd" + }, + "dragonflybsd-mips64r6" : { + "DEB_HOST_ARCH" : "dragonflybsd-mips64r6", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "64", + "DEB_HOST_ARCH_CPU" : "mips64r6", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "bsd", + "DEB_HOST_ARCH_OS" : "dragonflybsd", + "DEB_HOST_GNU_CPU" : "mipsisa64r6", + "DEB_HOST_GNU_SYSTEM" : "dragonflybsd", + "DEB_HOST_GNU_TYPE" : "mipsisa64r6-dragonflybsd", + "DEB_HOST_MULTIARCH" : "mipsisa64r6-dragonflybsd" + }, + "dragonflybsd-mips64r6el" : { + "DEB_HOST_ARCH" : "dragonflybsd-mips64r6el", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "64", + "DEB_HOST_ARCH_CPU" : "mips64r6el", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "bsd", + "DEB_HOST_ARCH_OS" : "dragonflybsd", + "DEB_HOST_GNU_CPU" : "mipsisa64r6el", + "DEB_HOST_GNU_SYSTEM" : "dragonflybsd", + "DEB_HOST_GNU_TYPE" : "mipsisa64r6el-dragonflybsd", + "DEB_HOST_MULTIARCH" : "mipsisa64r6el-dragonflybsd" + }, + "dragonflybsd-mipsel" : { + "DEB_HOST_ARCH" : "dragonflybsd-mipsel", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "mipsel", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "bsd", + "DEB_HOST_ARCH_OS" : "dragonflybsd", + "DEB_HOST_GNU_CPU" : "mipsel", + "DEB_HOST_GNU_SYSTEM" : "dragonflybsd", + "DEB_HOST_GNU_TYPE" : "mipsel-dragonflybsd", + "DEB_HOST_MULTIARCH" : "mipsel-dragonflybsd" + }, + "dragonflybsd-mipsr6" : { + "DEB_HOST_ARCH" : "dragonflybsd-mipsr6", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "mipsr6", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "bsd", + "DEB_HOST_ARCH_OS" : "dragonflybsd", + "DEB_HOST_GNU_CPU" : "mipsisa32r6", + "DEB_HOST_GNU_SYSTEM" : "dragonflybsd", + "DEB_HOST_GNU_TYPE" : "mipsisa32r6-dragonflybsd", + "DEB_HOST_MULTIARCH" : "mipsisa32r6-dragonflybsd" + }, + "dragonflybsd-mipsr6el" : { + "DEB_HOST_ARCH" : "dragonflybsd-mipsr6el", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "mipsr6el", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "bsd", + "DEB_HOST_ARCH_OS" : "dragonflybsd", + "DEB_HOST_GNU_CPU" : "mipsisa32r6el", + "DEB_HOST_GNU_SYSTEM" : "dragonflybsd", + "DEB_HOST_GNU_TYPE" : "mipsisa32r6el-dragonflybsd", + "DEB_HOST_MULTIARCH" : "mipsisa32r6el-dragonflybsd" + }, + "dragonflybsd-nios2" : { + "DEB_HOST_ARCH" : "dragonflybsd-nios2", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "nios2", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "bsd", + "DEB_HOST_ARCH_OS" : "dragonflybsd", + "DEB_HOST_GNU_CPU" : "nios2", + "DEB_HOST_GNU_SYSTEM" : "dragonflybsd", + "DEB_HOST_GNU_TYPE" : "nios2-dragonflybsd", + "DEB_HOST_MULTIARCH" : "nios2-dragonflybsd" + }, + "dragonflybsd-or1k" : { + "DEB_HOST_ARCH" : "dragonflybsd-or1k", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "or1k", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "bsd", + "DEB_HOST_ARCH_OS" : "dragonflybsd", + "DEB_HOST_GNU_CPU" : "or1k", + "DEB_HOST_GNU_SYSTEM" : "dragonflybsd", + "DEB_HOST_GNU_TYPE" : "or1k-dragonflybsd", + "DEB_HOST_MULTIARCH" : "or1k-dragonflybsd" + }, + "dragonflybsd-powerpc" : { + "DEB_HOST_ARCH" : "dragonflybsd-powerpc", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "powerpc", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "bsd", + "DEB_HOST_ARCH_OS" : "dragonflybsd", + "DEB_HOST_GNU_CPU" : "powerpc", + "DEB_HOST_GNU_SYSTEM" : "dragonflybsd", + "DEB_HOST_GNU_TYPE" : "powerpc-dragonflybsd", + "DEB_HOST_MULTIARCH" : "powerpc-dragonflybsd" + }, + "dragonflybsd-powerpcel" : { + "DEB_HOST_ARCH" : "dragonflybsd-powerpcel", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "powerpcel", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "bsd", + "DEB_HOST_ARCH_OS" : "dragonflybsd", + "DEB_HOST_GNU_CPU" : "powerpcle", + "DEB_HOST_GNU_SYSTEM" : "dragonflybsd", + "DEB_HOST_GNU_TYPE" : "powerpcle-dragonflybsd", + "DEB_HOST_MULTIARCH" : "powerpcle-dragonflybsd" + }, + "dragonflybsd-ppc64" : { + "DEB_HOST_ARCH" : "dragonflybsd-ppc64", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "64", + "DEB_HOST_ARCH_CPU" : "ppc64", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "bsd", + "DEB_HOST_ARCH_OS" : "dragonflybsd", + "DEB_HOST_GNU_CPU" : "powerpc64", + "DEB_HOST_GNU_SYSTEM" : "dragonflybsd", + "DEB_HOST_GNU_TYPE" : "powerpc64-dragonflybsd", + "DEB_HOST_MULTIARCH" : "powerpc64-dragonflybsd" + }, + "dragonflybsd-ppc64el" : { + "DEB_HOST_ARCH" : "dragonflybsd-ppc64el", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "64", + "DEB_HOST_ARCH_CPU" : "ppc64el", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "bsd", + "DEB_HOST_ARCH_OS" : "dragonflybsd", + "DEB_HOST_GNU_CPU" : "powerpc64le", + "DEB_HOST_GNU_SYSTEM" : "dragonflybsd", + "DEB_HOST_GNU_TYPE" : "powerpc64le-dragonflybsd", + "DEB_HOST_MULTIARCH" : "powerpc64le-dragonflybsd" + }, + "dragonflybsd-riscv64" : { + "DEB_HOST_ARCH" : "dragonflybsd-riscv64", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "64", + "DEB_HOST_ARCH_CPU" : "riscv64", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "bsd", + "DEB_HOST_ARCH_OS" : "dragonflybsd", + "DEB_HOST_GNU_CPU" : "riscv64", + "DEB_HOST_GNU_SYSTEM" : "dragonflybsd", + "DEB_HOST_GNU_TYPE" : "riscv64-dragonflybsd", + "DEB_HOST_MULTIARCH" : "riscv64-dragonflybsd" + }, + "dragonflybsd-s390" : { + "DEB_HOST_ARCH" : "dragonflybsd-s390", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "s390", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "bsd", + "DEB_HOST_ARCH_OS" : "dragonflybsd", + "DEB_HOST_GNU_CPU" : "s390", + "DEB_HOST_GNU_SYSTEM" : "dragonflybsd", + "DEB_HOST_GNU_TYPE" : "s390-dragonflybsd", + "DEB_HOST_MULTIARCH" : "s390-dragonflybsd" + }, + "dragonflybsd-s390x" : { + "DEB_HOST_ARCH" : "dragonflybsd-s390x", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "64", + "DEB_HOST_ARCH_CPU" : "s390x", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "bsd", + "DEB_HOST_ARCH_OS" : "dragonflybsd", + "DEB_HOST_GNU_CPU" : "s390x", + "DEB_HOST_GNU_SYSTEM" : "dragonflybsd", + "DEB_HOST_GNU_TYPE" : "s390x-dragonflybsd", + "DEB_HOST_MULTIARCH" : "s390x-dragonflybsd" + }, + "dragonflybsd-sh3" : { + "DEB_HOST_ARCH" : "dragonflybsd-sh3", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "sh3", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "bsd", + "DEB_HOST_ARCH_OS" : "dragonflybsd", + "DEB_HOST_GNU_CPU" : "sh3", + "DEB_HOST_GNU_SYSTEM" : "dragonflybsd", + "DEB_HOST_GNU_TYPE" : "sh3-dragonflybsd", + "DEB_HOST_MULTIARCH" : "sh3-dragonflybsd" + }, + "dragonflybsd-sh3eb" : { + "DEB_HOST_ARCH" : "dragonflybsd-sh3eb", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "sh3eb", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "bsd", + "DEB_HOST_ARCH_OS" : "dragonflybsd", + "DEB_HOST_GNU_CPU" : "sh3eb", + "DEB_HOST_GNU_SYSTEM" : "dragonflybsd", + "DEB_HOST_GNU_TYPE" : "sh3eb-dragonflybsd", + "DEB_HOST_MULTIARCH" : "sh3eb-dragonflybsd" + }, + "dragonflybsd-sh4" : { + "DEB_HOST_ARCH" : "dragonflybsd-sh4", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "sh4", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "bsd", + "DEB_HOST_ARCH_OS" : "dragonflybsd", + "DEB_HOST_GNU_CPU" : "sh4", + "DEB_HOST_GNU_SYSTEM" : "dragonflybsd", + "DEB_HOST_GNU_TYPE" : "sh4-dragonflybsd", + "DEB_HOST_MULTIARCH" : "sh4-dragonflybsd" + }, + "dragonflybsd-sh4eb" : { + "DEB_HOST_ARCH" : "dragonflybsd-sh4eb", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "sh4eb", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "bsd", + "DEB_HOST_ARCH_OS" : "dragonflybsd", + "DEB_HOST_GNU_CPU" : "sh4eb", + "DEB_HOST_GNU_SYSTEM" : "dragonflybsd", + "DEB_HOST_GNU_TYPE" : "sh4eb-dragonflybsd", + "DEB_HOST_MULTIARCH" : "sh4eb-dragonflybsd" + }, + "dragonflybsd-sparc" : { + "DEB_HOST_ARCH" : "dragonflybsd-sparc", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "sparc", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "bsd", + "DEB_HOST_ARCH_OS" : "dragonflybsd", + "DEB_HOST_GNU_CPU" : "sparc", + "DEB_HOST_GNU_SYSTEM" : "dragonflybsd", + "DEB_HOST_GNU_TYPE" : "sparc-dragonflybsd", + "DEB_HOST_MULTIARCH" : "sparc-dragonflybsd" + }, + "dragonflybsd-sparc64" : { + "DEB_HOST_ARCH" : "dragonflybsd-sparc64", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "64", + "DEB_HOST_ARCH_CPU" : "sparc64", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "bsd", + "DEB_HOST_ARCH_OS" : "dragonflybsd", + "DEB_HOST_GNU_CPU" : "sparc64", + "DEB_HOST_GNU_SYSTEM" : "dragonflybsd", + "DEB_HOST_GNU_TYPE" : "sparc64-dragonflybsd", + "DEB_HOST_MULTIARCH" : "sparc64-dragonflybsd" + }, + "dragonflybsd-tilegx" : { + "DEB_HOST_ARCH" : "dragonflybsd-tilegx", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "64", + "DEB_HOST_ARCH_CPU" : "tilegx", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "bsd", + "DEB_HOST_ARCH_OS" : "dragonflybsd", + "DEB_HOST_GNU_CPU" : "tilegx", + "DEB_HOST_GNU_SYSTEM" : "dragonflybsd", + "DEB_HOST_GNU_TYPE" : "tilegx-dragonflybsd", + "DEB_HOST_MULTIARCH" : "tilegx-dragonflybsd" + }, + "freebsd-alpha" : { + "DEB_HOST_ARCH" : "freebsd-alpha", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "64", + "DEB_HOST_ARCH_CPU" : "alpha", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "bsd", + "DEB_HOST_ARCH_OS" : "freebsd", + "DEB_HOST_GNU_CPU" : "alpha", + "DEB_HOST_GNU_SYSTEM" : "freebsd", + "DEB_HOST_GNU_TYPE" : "alpha-freebsd", + "DEB_HOST_MULTIARCH" : "alpha-freebsd" + }, + "freebsd-amd64" : { + "DEB_HOST_ARCH" : "freebsd-amd64", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "64", + "DEB_HOST_ARCH_CPU" : "amd64", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "bsd", + "DEB_HOST_ARCH_OS" : "freebsd", + "DEB_HOST_GNU_CPU" : "x86_64", + "DEB_HOST_GNU_SYSTEM" : "freebsd", + "DEB_HOST_GNU_TYPE" : "x86_64-freebsd", + "DEB_HOST_MULTIARCH" : "x86_64-freebsd" + }, + "freebsd-arc" : { + "DEB_HOST_ARCH" : "freebsd-arc", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "arc", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "bsd", + "DEB_HOST_ARCH_OS" : "freebsd", + "DEB_HOST_GNU_CPU" : "arc", + "DEB_HOST_GNU_SYSTEM" : "freebsd", + "DEB_HOST_GNU_TYPE" : "arc-freebsd", + "DEB_HOST_MULTIARCH" : "arc-freebsd" + }, + "freebsd-arm" : { + "DEB_HOST_ARCH" : "freebsd-arm", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "arm", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "bsd", + "DEB_HOST_ARCH_OS" : "freebsd", + "DEB_HOST_GNU_CPU" : "arm", + "DEB_HOST_GNU_SYSTEM" : "freebsd", + "DEB_HOST_GNU_TYPE" : "arm-freebsd", + "DEB_HOST_MULTIARCH" : "arm-freebsd" + }, + "freebsd-arm64" : { + "DEB_HOST_ARCH" : "freebsd-arm64", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "64", + "DEB_HOST_ARCH_CPU" : "arm64", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "bsd", + "DEB_HOST_ARCH_OS" : "freebsd", + "DEB_HOST_GNU_CPU" : "aarch64", + "DEB_HOST_GNU_SYSTEM" : "freebsd", + "DEB_HOST_GNU_TYPE" : "aarch64-freebsd", + "DEB_HOST_MULTIARCH" : "aarch64-freebsd" + }, + "freebsd-armeb" : { + "DEB_HOST_ARCH" : "freebsd-armeb", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "armeb", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "bsd", + "DEB_HOST_ARCH_OS" : "freebsd", + "DEB_HOST_GNU_CPU" : "armeb", + "DEB_HOST_GNU_SYSTEM" : "freebsd", + "DEB_HOST_GNU_TYPE" : "armeb-freebsd", + "DEB_HOST_MULTIARCH" : "armeb-freebsd" + }, + "freebsd-avr32" : { + "DEB_HOST_ARCH" : "freebsd-avr32", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "avr32", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "bsd", + "DEB_HOST_ARCH_OS" : "freebsd", + "DEB_HOST_GNU_CPU" : "avr32", + "DEB_HOST_GNU_SYSTEM" : "freebsd", + "DEB_HOST_GNU_TYPE" : "avr32-freebsd", + "DEB_HOST_MULTIARCH" : "avr32-freebsd" + }, + "freebsd-hppa" : { + "DEB_HOST_ARCH" : "freebsd-hppa", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "hppa", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "bsd", + "DEB_HOST_ARCH_OS" : "freebsd", + "DEB_HOST_GNU_CPU" : "hppa", + "DEB_HOST_GNU_SYSTEM" : "freebsd", + "DEB_HOST_GNU_TYPE" : "hppa-freebsd", + "DEB_HOST_MULTIARCH" : "hppa-freebsd" + }, + "freebsd-i386" : { + "DEB_HOST_ARCH" : "freebsd-i386", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "i386", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "bsd", + "DEB_HOST_ARCH_OS" : "freebsd", + "DEB_HOST_GNU_CPU" : "i686", + "DEB_HOST_GNU_SYSTEM" : "freebsd", + "DEB_HOST_GNU_TYPE" : "i686-freebsd", + "DEB_HOST_MULTIARCH" : "i386-freebsd" + }, + "freebsd-ia64" : { + "DEB_HOST_ARCH" : "freebsd-ia64", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "64", + "DEB_HOST_ARCH_CPU" : "ia64", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "bsd", + "DEB_HOST_ARCH_OS" : "freebsd", + "DEB_HOST_GNU_CPU" : "ia64", + "DEB_HOST_GNU_SYSTEM" : "freebsd", + "DEB_HOST_GNU_TYPE" : "ia64-freebsd", + "DEB_HOST_MULTIARCH" : "ia64-freebsd" + }, + "freebsd-m32r" : { + "DEB_HOST_ARCH" : "freebsd-m32r", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "m32r", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "bsd", + "DEB_HOST_ARCH_OS" : "freebsd", + "DEB_HOST_GNU_CPU" : "m32r", + "DEB_HOST_GNU_SYSTEM" : "freebsd", + "DEB_HOST_GNU_TYPE" : "m32r-freebsd", + "DEB_HOST_MULTIARCH" : "m32r-freebsd" + }, + "freebsd-m68k" : { + "DEB_HOST_ARCH" : "freebsd-m68k", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "m68k", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "bsd", + "DEB_HOST_ARCH_OS" : "freebsd", + "DEB_HOST_GNU_CPU" : "m68k", + "DEB_HOST_GNU_SYSTEM" : "freebsd", + "DEB_HOST_GNU_TYPE" : "m68k-freebsd", + "DEB_HOST_MULTIARCH" : "m68k-freebsd" + }, + "freebsd-mips" : { + "DEB_HOST_ARCH" : "freebsd-mips", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "mips", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "bsd", + "DEB_HOST_ARCH_OS" : "freebsd", + "DEB_HOST_GNU_CPU" : "mips", + "DEB_HOST_GNU_SYSTEM" : "freebsd", + "DEB_HOST_GNU_TYPE" : "mips-freebsd", + "DEB_HOST_MULTIARCH" : "mips-freebsd" + }, + "freebsd-mips64" : { + "DEB_HOST_ARCH" : "freebsd-mips64", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "64", + "DEB_HOST_ARCH_CPU" : "mips64", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "bsd", + "DEB_HOST_ARCH_OS" : "freebsd", + "DEB_HOST_GNU_CPU" : "mips64", + "DEB_HOST_GNU_SYSTEM" : "freebsd", + "DEB_HOST_GNU_TYPE" : "mips64-freebsd", + "DEB_HOST_MULTIARCH" : "mips64-freebsd" + }, + "freebsd-mips64el" : { + "DEB_HOST_ARCH" : "freebsd-mips64el", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "64", + "DEB_HOST_ARCH_CPU" : "mips64el", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "bsd", + "DEB_HOST_ARCH_OS" : "freebsd", + "DEB_HOST_GNU_CPU" : "mips64el", + "DEB_HOST_GNU_SYSTEM" : "freebsd", + "DEB_HOST_GNU_TYPE" : "mips64el-freebsd", + "DEB_HOST_MULTIARCH" : "mips64el-freebsd" + }, + "freebsd-mips64r6" : { + "DEB_HOST_ARCH" : "freebsd-mips64r6", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "64", + "DEB_HOST_ARCH_CPU" : "mips64r6", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "bsd", + "DEB_HOST_ARCH_OS" : "freebsd", + "DEB_HOST_GNU_CPU" : "mipsisa64r6", + "DEB_HOST_GNU_SYSTEM" : "freebsd", + "DEB_HOST_GNU_TYPE" : "mipsisa64r6-freebsd", + "DEB_HOST_MULTIARCH" : "mipsisa64r6-freebsd" + }, + "freebsd-mips64r6el" : { + "DEB_HOST_ARCH" : "freebsd-mips64r6el", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "64", + "DEB_HOST_ARCH_CPU" : "mips64r6el", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "bsd", + "DEB_HOST_ARCH_OS" : "freebsd", + "DEB_HOST_GNU_CPU" : "mipsisa64r6el", + "DEB_HOST_GNU_SYSTEM" : "freebsd", + "DEB_HOST_GNU_TYPE" : "mipsisa64r6el-freebsd", + "DEB_HOST_MULTIARCH" : "mipsisa64r6el-freebsd" + }, + "freebsd-mipsel" : { + "DEB_HOST_ARCH" : "freebsd-mipsel", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "mipsel", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "bsd", + "DEB_HOST_ARCH_OS" : "freebsd", + "DEB_HOST_GNU_CPU" : "mipsel", + "DEB_HOST_GNU_SYSTEM" : "freebsd", + "DEB_HOST_GNU_TYPE" : "mipsel-freebsd", + "DEB_HOST_MULTIARCH" : "mipsel-freebsd" + }, + "freebsd-mipsr6" : { + "DEB_HOST_ARCH" : "freebsd-mipsr6", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "mipsr6", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "bsd", + "DEB_HOST_ARCH_OS" : "freebsd", + "DEB_HOST_GNU_CPU" : "mipsisa32r6", + "DEB_HOST_GNU_SYSTEM" : "freebsd", + "DEB_HOST_GNU_TYPE" : "mipsisa32r6-freebsd", + "DEB_HOST_MULTIARCH" : "mipsisa32r6-freebsd" + }, + "freebsd-mipsr6el" : { + "DEB_HOST_ARCH" : "freebsd-mipsr6el", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "mipsr6el", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "bsd", + "DEB_HOST_ARCH_OS" : "freebsd", + "DEB_HOST_GNU_CPU" : "mipsisa32r6el", + "DEB_HOST_GNU_SYSTEM" : "freebsd", + "DEB_HOST_GNU_TYPE" : "mipsisa32r6el-freebsd", + "DEB_HOST_MULTIARCH" : "mipsisa32r6el-freebsd" + }, + "freebsd-nios2" : { + "DEB_HOST_ARCH" : "freebsd-nios2", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "nios2", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "bsd", + "DEB_HOST_ARCH_OS" : "freebsd", + "DEB_HOST_GNU_CPU" : "nios2", + "DEB_HOST_GNU_SYSTEM" : "freebsd", + "DEB_HOST_GNU_TYPE" : "nios2-freebsd", + "DEB_HOST_MULTIARCH" : "nios2-freebsd" + }, + "freebsd-or1k" : { + "DEB_HOST_ARCH" : "freebsd-or1k", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "or1k", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "bsd", + "DEB_HOST_ARCH_OS" : "freebsd", + "DEB_HOST_GNU_CPU" : "or1k", + "DEB_HOST_GNU_SYSTEM" : "freebsd", + "DEB_HOST_GNU_TYPE" : "or1k-freebsd", + "DEB_HOST_MULTIARCH" : "or1k-freebsd" + }, + "freebsd-powerpc" : { + "DEB_HOST_ARCH" : "freebsd-powerpc", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "powerpc", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "bsd", + "DEB_HOST_ARCH_OS" : "freebsd", + "DEB_HOST_GNU_CPU" : "powerpc", + "DEB_HOST_GNU_SYSTEM" : "freebsd", + "DEB_HOST_GNU_TYPE" : "powerpc-freebsd", + "DEB_HOST_MULTIARCH" : "powerpc-freebsd" + }, + "freebsd-powerpcel" : { + "DEB_HOST_ARCH" : "freebsd-powerpcel", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "powerpcel", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "bsd", + "DEB_HOST_ARCH_OS" : "freebsd", + "DEB_HOST_GNU_CPU" : "powerpcle", + "DEB_HOST_GNU_SYSTEM" : "freebsd", + "DEB_HOST_GNU_TYPE" : "powerpcle-freebsd", + "DEB_HOST_MULTIARCH" : "powerpcle-freebsd" + }, + "freebsd-ppc64" : { + "DEB_HOST_ARCH" : "freebsd-ppc64", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "64", + "DEB_HOST_ARCH_CPU" : "ppc64", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "bsd", + "DEB_HOST_ARCH_OS" : "freebsd", + "DEB_HOST_GNU_CPU" : "powerpc64", + "DEB_HOST_GNU_SYSTEM" : "freebsd", + "DEB_HOST_GNU_TYPE" : "powerpc64-freebsd", + "DEB_HOST_MULTIARCH" : "powerpc64-freebsd" + }, + "freebsd-ppc64el" : { + "DEB_HOST_ARCH" : "freebsd-ppc64el", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "64", + "DEB_HOST_ARCH_CPU" : "ppc64el", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "bsd", + "DEB_HOST_ARCH_OS" : "freebsd", + "DEB_HOST_GNU_CPU" : "powerpc64le", + "DEB_HOST_GNU_SYSTEM" : "freebsd", + "DEB_HOST_GNU_TYPE" : "powerpc64le-freebsd", + "DEB_HOST_MULTIARCH" : "powerpc64le-freebsd" + }, + "freebsd-riscv64" : { + "DEB_HOST_ARCH" : "freebsd-riscv64", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "64", + "DEB_HOST_ARCH_CPU" : "riscv64", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "bsd", + "DEB_HOST_ARCH_OS" : "freebsd", + "DEB_HOST_GNU_CPU" : "riscv64", + "DEB_HOST_GNU_SYSTEM" : "freebsd", + "DEB_HOST_GNU_TYPE" : "riscv64-freebsd", + "DEB_HOST_MULTIARCH" : "riscv64-freebsd" + }, + "freebsd-s390" : { + "DEB_HOST_ARCH" : "freebsd-s390", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "s390", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "bsd", + "DEB_HOST_ARCH_OS" : "freebsd", + "DEB_HOST_GNU_CPU" : "s390", + "DEB_HOST_GNU_SYSTEM" : "freebsd", + "DEB_HOST_GNU_TYPE" : "s390-freebsd", + "DEB_HOST_MULTIARCH" : "s390-freebsd" + }, + "freebsd-s390x" : { + "DEB_HOST_ARCH" : "freebsd-s390x", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "64", + "DEB_HOST_ARCH_CPU" : "s390x", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "bsd", + "DEB_HOST_ARCH_OS" : "freebsd", + "DEB_HOST_GNU_CPU" : "s390x", + "DEB_HOST_GNU_SYSTEM" : "freebsd", + "DEB_HOST_GNU_TYPE" : "s390x-freebsd", + "DEB_HOST_MULTIARCH" : "s390x-freebsd" + }, + "freebsd-sh3" : { + "DEB_HOST_ARCH" : "freebsd-sh3", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "sh3", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "bsd", + "DEB_HOST_ARCH_OS" : "freebsd", + "DEB_HOST_GNU_CPU" : "sh3", + "DEB_HOST_GNU_SYSTEM" : "freebsd", + "DEB_HOST_GNU_TYPE" : "sh3-freebsd", + "DEB_HOST_MULTIARCH" : "sh3-freebsd" + }, + "freebsd-sh3eb" : { + "DEB_HOST_ARCH" : "freebsd-sh3eb", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "sh3eb", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "bsd", + "DEB_HOST_ARCH_OS" : "freebsd", + "DEB_HOST_GNU_CPU" : "sh3eb", + "DEB_HOST_GNU_SYSTEM" : "freebsd", + "DEB_HOST_GNU_TYPE" : "sh3eb-freebsd", + "DEB_HOST_MULTIARCH" : "sh3eb-freebsd" + }, + "freebsd-sh4" : { + "DEB_HOST_ARCH" : "freebsd-sh4", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "sh4", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "bsd", + "DEB_HOST_ARCH_OS" : "freebsd", + "DEB_HOST_GNU_CPU" : "sh4", + "DEB_HOST_GNU_SYSTEM" : "freebsd", + "DEB_HOST_GNU_TYPE" : "sh4-freebsd", + "DEB_HOST_MULTIARCH" : "sh4-freebsd" + }, + "freebsd-sh4eb" : { + "DEB_HOST_ARCH" : "freebsd-sh4eb", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "sh4eb", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "bsd", + "DEB_HOST_ARCH_OS" : "freebsd", + "DEB_HOST_GNU_CPU" : "sh4eb", + "DEB_HOST_GNU_SYSTEM" : "freebsd", + "DEB_HOST_GNU_TYPE" : "sh4eb-freebsd", + "DEB_HOST_MULTIARCH" : "sh4eb-freebsd" + }, + "freebsd-sparc" : { + "DEB_HOST_ARCH" : "freebsd-sparc", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "sparc", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "bsd", + "DEB_HOST_ARCH_OS" : "freebsd", + "DEB_HOST_GNU_CPU" : "sparc", + "DEB_HOST_GNU_SYSTEM" : "freebsd", + "DEB_HOST_GNU_TYPE" : "sparc-freebsd", + "DEB_HOST_MULTIARCH" : "sparc-freebsd" + }, + "freebsd-sparc64" : { + "DEB_HOST_ARCH" : "freebsd-sparc64", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "64", + "DEB_HOST_ARCH_CPU" : "sparc64", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "bsd", + "DEB_HOST_ARCH_OS" : "freebsd", + "DEB_HOST_GNU_CPU" : "sparc64", + "DEB_HOST_GNU_SYSTEM" : "freebsd", + "DEB_HOST_GNU_TYPE" : "sparc64-freebsd", + "DEB_HOST_MULTIARCH" : "sparc64-freebsd" + }, + "freebsd-tilegx" : { + "DEB_HOST_ARCH" : "freebsd-tilegx", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "64", + "DEB_HOST_ARCH_CPU" : "tilegx", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "bsd", + "DEB_HOST_ARCH_OS" : "freebsd", + "DEB_HOST_GNU_CPU" : "tilegx", + "DEB_HOST_GNU_SYSTEM" : "freebsd", + "DEB_HOST_GNU_TYPE" : "tilegx-freebsd", + "DEB_HOST_MULTIARCH" : "tilegx-freebsd" + }, + "hppa" : { + "DEB_HOST_ARCH" : "hppa", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "hppa", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "gnu", + "DEB_HOST_ARCH_OS" : "linux", + "DEB_HOST_GNU_CPU" : "hppa", + "DEB_HOST_GNU_SYSTEM" : "linux-gnu", + "DEB_HOST_GNU_TYPE" : "hppa-linux-gnu", + "DEB_HOST_MULTIARCH" : "hppa-linux-gnu" + }, + "hurd-alpha" : { + "DEB_HOST_ARCH" : "hurd-alpha", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "64", + "DEB_HOST_ARCH_CPU" : "alpha", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "gnu", + "DEB_HOST_ARCH_OS" : "hurd", + "DEB_HOST_GNU_CPU" : "alpha", + "DEB_HOST_GNU_SYSTEM" : "gnu", + "DEB_HOST_GNU_TYPE" : "alpha-gnu", + "DEB_HOST_MULTIARCH" : "alpha-gnu" + }, + "hurd-amd64" : { + "DEB_HOST_ARCH" : "hurd-amd64", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "64", + "DEB_HOST_ARCH_CPU" : "amd64", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "gnu", + "DEB_HOST_ARCH_OS" : "hurd", + "DEB_HOST_GNU_CPU" : "x86_64", + "DEB_HOST_GNU_SYSTEM" : "gnu", + "DEB_HOST_GNU_TYPE" : "x86_64-gnu", + "DEB_HOST_MULTIARCH" : "x86_64-gnu" + }, + "hurd-arc" : { + "DEB_HOST_ARCH" : "hurd-arc", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "arc", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "gnu", + "DEB_HOST_ARCH_OS" : "hurd", + "DEB_HOST_GNU_CPU" : "arc", + "DEB_HOST_GNU_SYSTEM" : "gnu", + "DEB_HOST_GNU_TYPE" : "arc-gnu", + "DEB_HOST_MULTIARCH" : "arc-gnu" + }, + "hurd-arm" : { + "DEB_HOST_ARCH" : "hurd-arm", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "arm", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "gnu", + "DEB_HOST_ARCH_OS" : "hurd", + "DEB_HOST_GNU_CPU" : "arm", + "DEB_HOST_GNU_SYSTEM" : "gnu", + "DEB_HOST_GNU_TYPE" : "arm-gnu", + "DEB_HOST_MULTIARCH" : "arm-gnu" + }, + "hurd-arm64" : { + "DEB_HOST_ARCH" : "hurd-arm64", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "64", + "DEB_HOST_ARCH_CPU" : "arm64", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "gnu", + "DEB_HOST_ARCH_OS" : "hurd", + "DEB_HOST_GNU_CPU" : "aarch64", + "DEB_HOST_GNU_SYSTEM" : "gnu", + "DEB_HOST_GNU_TYPE" : "aarch64-gnu", + "DEB_HOST_MULTIARCH" : "aarch64-gnu" + }, + "hurd-armeb" : { + "DEB_HOST_ARCH" : "hurd-armeb", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "armeb", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "gnu", + "DEB_HOST_ARCH_OS" : "hurd", + "DEB_HOST_GNU_CPU" : "armeb", + "DEB_HOST_GNU_SYSTEM" : "gnu", + "DEB_HOST_GNU_TYPE" : "armeb-gnu", + "DEB_HOST_MULTIARCH" : "armeb-gnu" + }, + "hurd-avr32" : { + "DEB_HOST_ARCH" : "hurd-avr32", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "avr32", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "gnu", + "DEB_HOST_ARCH_OS" : "hurd", + "DEB_HOST_GNU_CPU" : "avr32", + "DEB_HOST_GNU_SYSTEM" : "gnu", + "DEB_HOST_GNU_TYPE" : "avr32-gnu", + "DEB_HOST_MULTIARCH" : "avr32-gnu" + }, + "hurd-hppa" : { + "DEB_HOST_ARCH" : "hurd-hppa", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "hppa", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "gnu", + "DEB_HOST_ARCH_OS" : "hurd", + "DEB_HOST_GNU_CPU" : "hppa", + "DEB_HOST_GNU_SYSTEM" : "gnu", + "DEB_HOST_GNU_TYPE" : "hppa-gnu", + "DEB_HOST_MULTIARCH" : "hppa-gnu" + }, + "hurd-i386" : { + "DEB_HOST_ARCH" : "hurd-i386", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "i386", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "gnu", + "DEB_HOST_ARCH_OS" : "hurd", + "DEB_HOST_GNU_CPU" : "i686", + "DEB_HOST_GNU_SYSTEM" : "gnu", + "DEB_HOST_GNU_TYPE" : "i686-gnu", + "DEB_HOST_MULTIARCH" : "i386-gnu" + }, + "hurd-ia64" : { + "DEB_HOST_ARCH" : "hurd-ia64", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "64", + "DEB_HOST_ARCH_CPU" : "ia64", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "gnu", + "DEB_HOST_ARCH_OS" : "hurd", + "DEB_HOST_GNU_CPU" : "ia64", + "DEB_HOST_GNU_SYSTEM" : "gnu", + "DEB_HOST_GNU_TYPE" : "ia64-gnu", + "DEB_HOST_MULTIARCH" : "ia64-gnu" + }, + "hurd-m32r" : { + "DEB_HOST_ARCH" : "hurd-m32r", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "m32r", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "gnu", + "DEB_HOST_ARCH_OS" : "hurd", + "DEB_HOST_GNU_CPU" : "m32r", + "DEB_HOST_GNU_SYSTEM" : "gnu", + "DEB_HOST_GNU_TYPE" : "m32r-gnu", + "DEB_HOST_MULTIARCH" : "m32r-gnu" + }, + "hurd-m68k" : { + "DEB_HOST_ARCH" : "hurd-m68k", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "m68k", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "gnu", + "DEB_HOST_ARCH_OS" : "hurd", + "DEB_HOST_GNU_CPU" : "m68k", + "DEB_HOST_GNU_SYSTEM" : "gnu", + "DEB_HOST_GNU_TYPE" : "m68k-gnu", + "DEB_HOST_MULTIARCH" : "m68k-gnu" + }, + "hurd-mips" : { + "DEB_HOST_ARCH" : "hurd-mips", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "mips", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "gnu", + "DEB_HOST_ARCH_OS" : "hurd", + "DEB_HOST_GNU_CPU" : "mips", + "DEB_HOST_GNU_SYSTEM" : "gnu", + "DEB_HOST_GNU_TYPE" : "mips-gnu", + "DEB_HOST_MULTIARCH" : "mips-gnu" + }, + "hurd-mips64" : { + "DEB_HOST_ARCH" : "hurd-mips64", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "64", + "DEB_HOST_ARCH_CPU" : "mips64", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "gnu", + "DEB_HOST_ARCH_OS" : "hurd", + "DEB_HOST_GNU_CPU" : "mips64", + "DEB_HOST_GNU_SYSTEM" : "gnu", + "DEB_HOST_GNU_TYPE" : "mips64-gnu", + "DEB_HOST_MULTIARCH" : "mips64-gnu" + }, + "hurd-mips64el" : { + "DEB_HOST_ARCH" : "hurd-mips64el", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "64", + "DEB_HOST_ARCH_CPU" : "mips64el", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "gnu", + "DEB_HOST_ARCH_OS" : "hurd", + "DEB_HOST_GNU_CPU" : "mips64el", + "DEB_HOST_GNU_SYSTEM" : "gnu", + "DEB_HOST_GNU_TYPE" : "mips64el-gnu", + "DEB_HOST_MULTIARCH" : "mips64el-gnu" + }, + "hurd-mips64r6" : { + "DEB_HOST_ARCH" : "hurd-mips64r6", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "64", + "DEB_HOST_ARCH_CPU" : "mips64r6", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "gnu", + "DEB_HOST_ARCH_OS" : "hurd", + "DEB_HOST_GNU_CPU" : "mipsisa64r6", + "DEB_HOST_GNU_SYSTEM" : "gnu", + "DEB_HOST_GNU_TYPE" : "mipsisa64r6-gnu", + "DEB_HOST_MULTIARCH" : "mipsisa64r6-gnu" + }, + "hurd-mips64r6el" : { + "DEB_HOST_ARCH" : "hurd-mips64r6el", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "64", + "DEB_HOST_ARCH_CPU" : "mips64r6el", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "gnu", + "DEB_HOST_ARCH_OS" : "hurd", + "DEB_HOST_GNU_CPU" : "mipsisa64r6el", + "DEB_HOST_GNU_SYSTEM" : "gnu", + "DEB_HOST_GNU_TYPE" : "mipsisa64r6el-gnu", + "DEB_HOST_MULTIARCH" : "mipsisa64r6el-gnu" + }, + "hurd-mipsel" : { + "DEB_HOST_ARCH" : "hurd-mipsel", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "mipsel", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "gnu", + "DEB_HOST_ARCH_OS" : "hurd", + "DEB_HOST_GNU_CPU" : "mipsel", + "DEB_HOST_GNU_SYSTEM" : "gnu", + "DEB_HOST_GNU_TYPE" : "mipsel-gnu", + "DEB_HOST_MULTIARCH" : "mipsel-gnu" + }, + "hurd-mipsr6" : { + "DEB_HOST_ARCH" : "hurd-mipsr6", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "mipsr6", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "gnu", + "DEB_HOST_ARCH_OS" : "hurd", + "DEB_HOST_GNU_CPU" : "mipsisa32r6", + "DEB_HOST_GNU_SYSTEM" : "gnu", + "DEB_HOST_GNU_TYPE" : "mipsisa32r6-gnu", + "DEB_HOST_MULTIARCH" : "mipsisa32r6-gnu" + }, + "hurd-mipsr6el" : { + "DEB_HOST_ARCH" : "hurd-mipsr6el", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "mipsr6el", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "gnu", + "DEB_HOST_ARCH_OS" : "hurd", + "DEB_HOST_GNU_CPU" : "mipsisa32r6el", + "DEB_HOST_GNU_SYSTEM" : "gnu", + "DEB_HOST_GNU_TYPE" : "mipsisa32r6el-gnu", + "DEB_HOST_MULTIARCH" : "mipsisa32r6el-gnu" + }, + "hurd-nios2" : { + "DEB_HOST_ARCH" : "hurd-nios2", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "nios2", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "gnu", + "DEB_HOST_ARCH_OS" : "hurd", + "DEB_HOST_GNU_CPU" : "nios2", + "DEB_HOST_GNU_SYSTEM" : "gnu", + "DEB_HOST_GNU_TYPE" : "nios2-gnu", + "DEB_HOST_MULTIARCH" : "nios2-gnu" + }, + "hurd-or1k" : { + "DEB_HOST_ARCH" : "hurd-or1k", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "or1k", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "gnu", + "DEB_HOST_ARCH_OS" : "hurd", + "DEB_HOST_GNU_CPU" : "or1k", + "DEB_HOST_GNU_SYSTEM" : "gnu", + "DEB_HOST_GNU_TYPE" : "or1k-gnu", + "DEB_HOST_MULTIARCH" : "or1k-gnu" + }, + "hurd-powerpc" : { + "DEB_HOST_ARCH" : "hurd-powerpc", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "powerpc", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "gnu", + "DEB_HOST_ARCH_OS" : "hurd", + "DEB_HOST_GNU_CPU" : "powerpc", + "DEB_HOST_GNU_SYSTEM" : "gnu", + "DEB_HOST_GNU_TYPE" : "powerpc-gnu", + "DEB_HOST_MULTIARCH" : "powerpc-gnu" + }, + "hurd-powerpcel" : { + "DEB_HOST_ARCH" : "hurd-powerpcel", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "powerpcel", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "gnu", + "DEB_HOST_ARCH_OS" : "hurd", + "DEB_HOST_GNU_CPU" : "powerpcle", + "DEB_HOST_GNU_SYSTEM" : "gnu", + "DEB_HOST_GNU_TYPE" : "powerpcle-gnu", + "DEB_HOST_MULTIARCH" : "powerpcle-gnu" + }, + "hurd-ppc64" : { + "DEB_HOST_ARCH" : "hurd-ppc64", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "64", + "DEB_HOST_ARCH_CPU" : "ppc64", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "gnu", + "DEB_HOST_ARCH_OS" : "hurd", + "DEB_HOST_GNU_CPU" : "powerpc64", + "DEB_HOST_GNU_SYSTEM" : "gnu", + "DEB_HOST_GNU_TYPE" : "powerpc64-gnu", + "DEB_HOST_MULTIARCH" : "powerpc64-gnu" + }, + "hurd-ppc64el" : { + "DEB_HOST_ARCH" : "hurd-ppc64el", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "64", + "DEB_HOST_ARCH_CPU" : "ppc64el", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "gnu", + "DEB_HOST_ARCH_OS" : "hurd", + "DEB_HOST_GNU_CPU" : "powerpc64le", + "DEB_HOST_GNU_SYSTEM" : "gnu", + "DEB_HOST_GNU_TYPE" : "powerpc64le-gnu", + "DEB_HOST_MULTIARCH" : "powerpc64le-gnu" + }, + "hurd-riscv64" : { + "DEB_HOST_ARCH" : "hurd-riscv64", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "64", + "DEB_HOST_ARCH_CPU" : "riscv64", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "gnu", + "DEB_HOST_ARCH_OS" : "hurd", + "DEB_HOST_GNU_CPU" : "riscv64", + "DEB_HOST_GNU_SYSTEM" : "gnu", + "DEB_HOST_GNU_TYPE" : "riscv64-gnu", + "DEB_HOST_MULTIARCH" : "riscv64-gnu" + }, + "hurd-s390" : { + "DEB_HOST_ARCH" : "hurd-s390", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "s390", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "gnu", + "DEB_HOST_ARCH_OS" : "hurd", + "DEB_HOST_GNU_CPU" : "s390", + "DEB_HOST_GNU_SYSTEM" : "gnu", + "DEB_HOST_GNU_TYPE" : "s390-gnu", + "DEB_HOST_MULTIARCH" : "s390-gnu" + }, + "hurd-s390x" : { + "DEB_HOST_ARCH" : "hurd-s390x", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "64", + "DEB_HOST_ARCH_CPU" : "s390x", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "gnu", + "DEB_HOST_ARCH_OS" : "hurd", + "DEB_HOST_GNU_CPU" : "s390x", + "DEB_HOST_GNU_SYSTEM" : "gnu", + "DEB_HOST_GNU_TYPE" : "s390x-gnu", + "DEB_HOST_MULTIARCH" : "s390x-gnu" + }, + "hurd-sh3" : { + "DEB_HOST_ARCH" : "hurd-sh3", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "sh3", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "gnu", + "DEB_HOST_ARCH_OS" : "hurd", + "DEB_HOST_GNU_CPU" : "sh3", + "DEB_HOST_GNU_SYSTEM" : "gnu", + "DEB_HOST_GNU_TYPE" : "sh3-gnu", + "DEB_HOST_MULTIARCH" : "sh3-gnu" + }, + "hurd-sh3eb" : { + "DEB_HOST_ARCH" : "hurd-sh3eb", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "sh3eb", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "gnu", + "DEB_HOST_ARCH_OS" : "hurd", + "DEB_HOST_GNU_CPU" : "sh3eb", + "DEB_HOST_GNU_SYSTEM" : "gnu", + "DEB_HOST_GNU_TYPE" : "sh3eb-gnu", + "DEB_HOST_MULTIARCH" : "sh3eb-gnu" + }, + "hurd-sh4" : { + "DEB_HOST_ARCH" : "hurd-sh4", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "sh4", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "gnu", + "DEB_HOST_ARCH_OS" : "hurd", + "DEB_HOST_GNU_CPU" : "sh4", + "DEB_HOST_GNU_SYSTEM" : "gnu", + "DEB_HOST_GNU_TYPE" : "sh4-gnu", + "DEB_HOST_MULTIARCH" : "sh4-gnu" + }, + "hurd-sh4eb" : { + "DEB_HOST_ARCH" : "hurd-sh4eb", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "sh4eb", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "gnu", + "DEB_HOST_ARCH_OS" : "hurd", + "DEB_HOST_GNU_CPU" : "sh4eb", + "DEB_HOST_GNU_SYSTEM" : "gnu", + "DEB_HOST_GNU_TYPE" : "sh4eb-gnu", + "DEB_HOST_MULTIARCH" : "sh4eb-gnu" + }, + "hurd-sparc" : { + "DEB_HOST_ARCH" : "hurd-sparc", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "sparc", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "gnu", + "DEB_HOST_ARCH_OS" : "hurd", + "DEB_HOST_GNU_CPU" : "sparc", + "DEB_HOST_GNU_SYSTEM" : "gnu", + "DEB_HOST_GNU_TYPE" : "sparc-gnu", + "DEB_HOST_MULTIARCH" : "sparc-gnu" + }, + "hurd-sparc64" : { + "DEB_HOST_ARCH" : "hurd-sparc64", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "64", + "DEB_HOST_ARCH_CPU" : "sparc64", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "gnu", + "DEB_HOST_ARCH_OS" : "hurd", + "DEB_HOST_GNU_CPU" : "sparc64", + "DEB_HOST_GNU_SYSTEM" : "gnu", + "DEB_HOST_GNU_TYPE" : "sparc64-gnu", + "DEB_HOST_MULTIARCH" : "sparc64-gnu" + }, + "hurd-tilegx" : { + "DEB_HOST_ARCH" : "hurd-tilegx", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "64", + "DEB_HOST_ARCH_CPU" : "tilegx", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "gnu", + "DEB_HOST_ARCH_OS" : "hurd", + "DEB_HOST_GNU_CPU" : "tilegx", + "DEB_HOST_GNU_SYSTEM" : "gnu", + "DEB_HOST_GNU_TYPE" : "tilegx-gnu", + "DEB_HOST_MULTIARCH" : "tilegx-gnu" + }, + "i386" : { + "DEB_HOST_ARCH" : "i386", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "i386", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "gnu", + "DEB_HOST_ARCH_OS" : "linux", + "DEB_HOST_GNU_CPU" : "i686", + "DEB_HOST_GNU_SYSTEM" : "linux-gnu", + "DEB_HOST_GNU_TYPE" : "i686-linux-gnu", + "DEB_HOST_MULTIARCH" : "i386-linux-gnu" + }, + "ia64" : { + "DEB_HOST_ARCH" : "ia64", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "64", + "DEB_HOST_ARCH_CPU" : "ia64", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "gnu", + "DEB_HOST_ARCH_OS" : "linux", + "DEB_HOST_GNU_CPU" : "ia64", + "DEB_HOST_GNU_SYSTEM" : "linux-gnu", + "DEB_HOST_GNU_TYPE" : "ia64-linux-gnu", + "DEB_HOST_MULTIARCH" : "ia64-linux-gnu" + }, + "kfreebsd-alpha" : { + "DEB_HOST_ARCH" : "kfreebsd-alpha", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "64", + "DEB_HOST_ARCH_CPU" : "alpha", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "gnu", + "DEB_HOST_ARCH_OS" : "kfreebsd", + "DEB_HOST_GNU_CPU" : "alpha", + "DEB_HOST_GNU_SYSTEM" : "kfreebsd-gnu", + "DEB_HOST_GNU_TYPE" : "alpha-kfreebsd-gnu", + "DEB_HOST_MULTIARCH" : "alpha-kfreebsd-gnu" + }, + "kfreebsd-amd64" : { + "DEB_HOST_ARCH" : "kfreebsd-amd64", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "64", + "DEB_HOST_ARCH_CPU" : "amd64", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "gnu", + "DEB_HOST_ARCH_OS" : "kfreebsd", + "DEB_HOST_GNU_CPU" : "x86_64", + "DEB_HOST_GNU_SYSTEM" : "kfreebsd-gnu", + "DEB_HOST_GNU_TYPE" : "x86_64-kfreebsd-gnu", + "DEB_HOST_MULTIARCH" : "x86_64-kfreebsd-gnu" + }, + "kfreebsd-arc" : { + "DEB_HOST_ARCH" : "kfreebsd-arc", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "arc", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "gnu", + "DEB_HOST_ARCH_OS" : "kfreebsd", + "DEB_HOST_GNU_CPU" : "arc", + "DEB_HOST_GNU_SYSTEM" : "kfreebsd-gnu", + "DEB_HOST_GNU_TYPE" : "arc-kfreebsd-gnu", + "DEB_HOST_MULTIARCH" : "arc-kfreebsd-gnu" + }, + "kfreebsd-arm" : { + "DEB_HOST_ARCH" : "kfreebsd-arm", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "arm", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "gnu", + "DEB_HOST_ARCH_OS" : "kfreebsd", + "DEB_HOST_GNU_CPU" : "arm", + "DEB_HOST_GNU_SYSTEM" : "kfreebsd-gnu", + "DEB_HOST_GNU_TYPE" : "arm-kfreebsd-gnu", + "DEB_HOST_MULTIARCH" : "arm-kfreebsd-gnu" + }, + "kfreebsd-arm64" : { + "DEB_HOST_ARCH" : "kfreebsd-arm64", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "64", + "DEB_HOST_ARCH_CPU" : "arm64", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "gnu", + "DEB_HOST_ARCH_OS" : "kfreebsd", + "DEB_HOST_GNU_CPU" : "aarch64", + "DEB_HOST_GNU_SYSTEM" : "kfreebsd-gnu", + "DEB_HOST_GNU_TYPE" : "aarch64-kfreebsd-gnu", + "DEB_HOST_MULTIARCH" : "aarch64-kfreebsd-gnu" + }, + "kfreebsd-armeb" : { + "DEB_HOST_ARCH" : "kfreebsd-armeb", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "armeb", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "gnu", + "DEB_HOST_ARCH_OS" : "kfreebsd", + "DEB_HOST_GNU_CPU" : "armeb", + "DEB_HOST_GNU_SYSTEM" : "kfreebsd-gnu", + "DEB_HOST_GNU_TYPE" : "armeb-kfreebsd-gnu", + "DEB_HOST_MULTIARCH" : "armeb-kfreebsd-gnu" + }, + "kfreebsd-armhf" : { + "DEB_HOST_ARCH" : "kfreebsd-armhf", + "DEB_HOST_ARCH_ABI" : "eabihf", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "arm", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "gnu", + "DEB_HOST_ARCH_OS" : "kfreebsd", + "DEB_HOST_GNU_CPU" : "arm", + "DEB_HOST_GNU_SYSTEM" : "kfreebsd-gnueabihf", + "DEB_HOST_GNU_TYPE" : "arm-kfreebsd-gnueabihf", + "DEB_HOST_MULTIARCH" : "arm-kfreebsd-gnueabihf" + }, + "kfreebsd-avr32" : { + "DEB_HOST_ARCH" : "kfreebsd-avr32", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "avr32", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "gnu", + "DEB_HOST_ARCH_OS" : "kfreebsd", + "DEB_HOST_GNU_CPU" : "avr32", + "DEB_HOST_GNU_SYSTEM" : "kfreebsd-gnu", + "DEB_HOST_GNU_TYPE" : "avr32-kfreebsd-gnu", + "DEB_HOST_MULTIARCH" : "avr32-kfreebsd-gnu" + }, + "kfreebsd-hppa" : { + "DEB_HOST_ARCH" : "kfreebsd-hppa", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "hppa", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "gnu", + "DEB_HOST_ARCH_OS" : "kfreebsd", + "DEB_HOST_GNU_CPU" : "hppa", + "DEB_HOST_GNU_SYSTEM" : "kfreebsd-gnu", + "DEB_HOST_GNU_TYPE" : "hppa-kfreebsd-gnu", + "DEB_HOST_MULTIARCH" : "hppa-kfreebsd-gnu" + }, + "kfreebsd-i386" : { + "DEB_HOST_ARCH" : "kfreebsd-i386", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "i386", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "gnu", + "DEB_HOST_ARCH_OS" : "kfreebsd", + "DEB_HOST_GNU_CPU" : "i686", + "DEB_HOST_GNU_SYSTEM" : "kfreebsd-gnu", + "DEB_HOST_GNU_TYPE" : "i686-kfreebsd-gnu", + "DEB_HOST_MULTIARCH" : "i386-kfreebsd-gnu" + }, + "kfreebsd-ia64" : { + "DEB_HOST_ARCH" : "kfreebsd-ia64", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "64", + "DEB_HOST_ARCH_CPU" : "ia64", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "gnu", + "DEB_HOST_ARCH_OS" : "kfreebsd", + "DEB_HOST_GNU_CPU" : "ia64", + "DEB_HOST_GNU_SYSTEM" : "kfreebsd-gnu", + "DEB_HOST_GNU_TYPE" : "ia64-kfreebsd-gnu", + "DEB_HOST_MULTIARCH" : "ia64-kfreebsd-gnu" + }, + "kfreebsd-m32r" : { + "DEB_HOST_ARCH" : "kfreebsd-m32r", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "m32r", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "gnu", + "DEB_HOST_ARCH_OS" : "kfreebsd", + "DEB_HOST_GNU_CPU" : "m32r", + "DEB_HOST_GNU_SYSTEM" : "kfreebsd-gnu", + "DEB_HOST_GNU_TYPE" : "m32r-kfreebsd-gnu", + "DEB_HOST_MULTIARCH" : "m32r-kfreebsd-gnu" + }, + "kfreebsd-m68k" : { + "DEB_HOST_ARCH" : "kfreebsd-m68k", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "m68k", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "gnu", + "DEB_HOST_ARCH_OS" : "kfreebsd", + "DEB_HOST_GNU_CPU" : "m68k", + "DEB_HOST_GNU_SYSTEM" : "kfreebsd-gnu", + "DEB_HOST_GNU_TYPE" : "m68k-kfreebsd-gnu", + "DEB_HOST_MULTIARCH" : "m68k-kfreebsd-gnu" + }, + "kfreebsd-mips" : { + "DEB_HOST_ARCH" : "kfreebsd-mips", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "mips", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "gnu", + "DEB_HOST_ARCH_OS" : "kfreebsd", + "DEB_HOST_GNU_CPU" : "mips", + "DEB_HOST_GNU_SYSTEM" : "kfreebsd-gnu", + "DEB_HOST_GNU_TYPE" : "mips-kfreebsd-gnu", + "DEB_HOST_MULTIARCH" : "mips-kfreebsd-gnu" + }, + "kfreebsd-mips64" : { + "DEB_HOST_ARCH" : "kfreebsd-mips64", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "64", + "DEB_HOST_ARCH_CPU" : "mips64", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "gnu", + "DEB_HOST_ARCH_OS" : "kfreebsd", + "DEB_HOST_GNU_CPU" : "mips64", + "DEB_HOST_GNU_SYSTEM" : "kfreebsd-gnu", + "DEB_HOST_GNU_TYPE" : "mips64-kfreebsd-gnu", + "DEB_HOST_MULTIARCH" : "mips64-kfreebsd-gnu" + }, + "kfreebsd-mips64el" : { + "DEB_HOST_ARCH" : "kfreebsd-mips64el", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "64", + "DEB_HOST_ARCH_CPU" : "mips64el", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "gnu", + "DEB_HOST_ARCH_OS" : "kfreebsd", + "DEB_HOST_GNU_CPU" : "mips64el", + "DEB_HOST_GNU_SYSTEM" : "kfreebsd-gnu", + "DEB_HOST_GNU_TYPE" : "mips64el-kfreebsd-gnu", + "DEB_HOST_MULTIARCH" : "mips64el-kfreebsd-gnu" + }, + "kfreebsd-mips64r6" : { + "DEB_HOST_ARCH" : "kfreebsd-mips64r6", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "64", + "DEB_HOST_ARCH_CPU" : "mips64r6", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "gnu", + "DEB_HOST_ARCH_OS" : "kfreebsd", + "DEB_HOST_GNU_CPU" : "mipsisa64r6", + "DEB_HOST_GNU_SYSTEM" : "kfreebsd-gnu", + "DEB_HOST_GNU_TYPE" : "mipsisa64r6-kfreebsd-gnu", + "DEB_HOST_MULTIARCH" : "mipsisa64r6-kfreebsd-gnu" + }, + "kfreebsd-mips64r6el" : { + "DEB_HOST_ARCH" : "kfreebsd-mips64r6el", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "64", + "DEB_HOST_ARCH_CPU" : "mips64r6el", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "gnu", + "DEB_HOST_ARCH_OS" : "kfreebsd", + "DEB_HOST_GNU_CPU" : "mipsisa64r6el", + "DEB_HOST_GNU_SYSTEM" : "kfreebsd-gnu", + "DEB_HOST_GNU_TYPE" : "mipsisa64r6el-kfreebsd-gnu", + "DEB_HOST_MULTIARCH" : "mipsisa64r6el-kfreebsd-gnu" + }, + "kfreebsd-mipsel" : { + "DEB_HOST_ARCH" : "kfreebsd-mipsel", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "mipsel", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "gnu", + "DEB_HOST_ARCH_OS" : "kfreebsd", + "DEB_HOST_GNU_CPU" : "mipsel", + "DEB_HOST_GNU_SYSTEM" : "kfreebsd-gnu", + "DEB_HOST_GNU_TYPE" : "mipsel-kfreebsd-gnu", + "DEB_HOST_MULTIARCH" : "mipsel-kfreebsd-gnu" + }, + "kfreebsd-mipsr6" : { + "DEB_HOST_ARCH" : "kfreebsd-mipsr6", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "mipsr6", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "gnu", + "DEB_HOST_ARCH_OS" : "kfreebsd", + "DEB_HOST_GNU_CPU" : "mipsisa32r6", + "DEB_HOST_GNU_SYSTEM" : "kfreebsd-gnu", + "DEB_HOST_GNU_TYPE" : "mipsisa32r6-kfreebsd-gnu", + "DEB_HOST_MULTIARCH" : "mipsisa32r6-kfreebsd-gnu" + }, + "kfreebsd-mipsr6el" : { + "DEB_HOST_ARCH" : "kfreebsd-mipsr6el", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "mipsr6el", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "gnu", + "DEB_HOST_ARCH_OS" : "kfreebsd", + "DEB_HOST_GNU_CPU" : "mipsisa32r6el", + "DEB_HOST_GNU_SYSTEM" : "kfreebsd-gnu", + "DEB_HOST_GNU_TYPE" : "mipsisa32r6el-kfreebsd-gnu", + "DEB_HOST_MULTIARCH" : "mipsisa32r6el-kfreebsd-gnu" + }, + "kfreebsd-nios2" : { + "DEB_HOST_ARCH" : "kfreebsd-nios2", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "nios2", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "gnu", + "DEB_HOST_ARCH_OS" : "kfreebsd", + "DEB_HOST_GNU_CPU" : "nios2", + "DEB_HOST_GNU_SYSTEM" : "kfreebsd-gnu", + "DEB_HOST_GNU_TYPE" : "nios2-kfreebsd-gnu", + "DEB_HOST_MULTIARCH" : "nios2-kfreebsd-gnu" + }, + "kfreebsd-or1k" : { + "DEB_HOST_ARCH" : "kfreebsd-or1k", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "or1k", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "gnu", + "DEB_HOST_ARCH_OS" : "kfreebsd", + "DEB_HOST_GNU_CPU" : "or1k", + "DEB_HOST_GNU_SYSTEM" : "kfreebsd-gnu", + "DEB_HOST_GNU_TYPE" : "or1k-kfreebsd-gnu", + "DEB_HOST_MULTIARCH" : "or1k-kfreebsd-gnu" + }, + "kfreebsd-powerpc" : { + "DEB_HOST_ARCH" : "kfreebsd-powerpc", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "powerpc", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "gnu", + "DEB_HOST_ARCH_OS" : "kfreebsd", + "DEB_HOST_GNU_CPU" : "powerpc", + "DEB_HOST_GNU_SYSTEM" : "kfreebsd-gnu", + "DEB_HOST_GNU_TYPE" : "powerpc-kfreebsd-gnu", + "DEB_HOST_MULTIARCH" : "powerpc-kfreebsd-gnu" + }, + "kfreebsd-powerpcel" : { + "DEB_HOST_ARCH" : "kfreebsd-powerpcel", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "powerpcel", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "gnu", + "DEB_HOST_ARCH_OS" : "kfreebsd", + "DEB_HOST_GNU_CPU" : "powerpcle", + "DEB_HOST_GNU_SYSTEM" : "kfreebsd-gnu", + "DEB_HOST_GNU_TYPE" : "powerpcle-kfreebsd-gnu", + "DEB_HOST_MULTIARCH" : "powerpcle-kfreebsd-gnu" + }, + "kfreebsd-ppc64" : { + "DEB_HOST_ARCH" : "kfreebsd-ppc64", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "64", + "DEB_HOST_ARCH_CPU" : "ppc64", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "gnu", + "DEB_HOST_ARCH_OS" : "kfreebsd", + "DEB_HOST_GNU_CPU" : "powerpc64", + "DEB_HOST_GNU_SYSTEM" : "kfreebsd-gnu", + "DEB_HOST_GNU_TYPE" : "powerpc64-kfreebsd-gnu", + "DEB_HOST_MULTIARCH" : "powerpc64-kfreebsd-gnu" + }, + "kfreebsd-ppc64el" : { + "DEB_HOST_ARCH" : "kfreebsd-ppc64el", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "64", + "DEB_HOST_ARCH_CPU" : "ppc64el", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "gnu", + "DEB_HOST_ARCH_OS" : "kfreebsd", + "DEB_HOST_GNU_CPU" : "powerpc64le", + "DEB_HOST_GNU_SYSTEM" : "kfreebsd-gnu", + "DEB_HOST_GNU_TYPE" : "powerpc64le-kfreebsd-gnu", + "DEB_HOST_MULTIARCH" : "powerpc64le-kfreebsd-gnu" + }, + "kfreebsd-riscv64" : { + "DEB_HOST_ARCH" : "kfreebsd-riscv64", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "64", + "DEB_HOST_ARCH_CPU" : "riscv64", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "gnu", + "DEB_HOST_ARCH_OS" : "kfreebsd", + "DEB_HOST_GNU_CPU" : "riscv64", + "DEB_HOST_GNU_SYSTEM" : "kfreebsd-gnu", + "DEB_HOST_GNU_TYPE" : "riscv64-kfreebsd-gnu", + "DEB_HOST_MULTIARCH" : "riscv64-kfreebsd-gnu" + }, + "kfreebsd-s390" : { + "DEB_HOST_ARCH" : "kfreebsd-s390", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "s390", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "gnu", + "DEB_HOST_ARCH_OS" : "kfreebsd", + "DEB_HOST_GNU_CPU" : "s390", + "DEB_HOST_GNU_SYSTEM" : "kfreebsd-gnu", + "DEB_HOST_GNU_TYPE" : "s390-kfreebsd-gnu", + "DEB_HOST_MULTIARCH" : "s390-kfreebsd-gnu" + }, + "kfreebsd-s390x" : { + "DEB_HOST_ARCH" : "kfreebsd-s390x", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "64", + "DEB_HOST_ARCH_CPU" : "s390x", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "gnu", + "DEB_HOST_ARCH_OS" : "kfreebsd", + "DEB_HOST_GNU_CPU" : "s390x", + "DEB_HOST_GNU_SYSTEM" : "kfreebsd-gnu", + "DEB_HOST_GNU_TYPE" : "s390x-kfreebsd-gnu", + "DEB_HOST_MULTIARCH" : "s390x-kfreebsd-gnu" + }, + "kfreebsd-sh3" : { + "DEB_HOST_ARCH" : "kfreebsd-sh3", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "sh3", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "gnu", + "DEB_HOST_ARCH_OS" : "kfreebsd", + "DEB_HOST_GNU_CPU" : "sh3", + "DEB_HOST_GNU_SYSTEM" : "kfreebsd-gnu", + "DEB_HOST_GNU_TYPE" : "sh3-kfreebsd-gnu", + "DEB_HOST_MULTIARCH" : "sh3-kfreebsd-gnu" + }, + "kfreebsd-sh3eb" : { + "DEB_HOST_ARCH" : "kfreebsd-sh3eb", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "sh3eb", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "gnu", + "DEB_HOST_ARCH_OS" : "kfreebsd", + "DEB_HOST_GNU_CPU" : "sh3eb", + "DEB_HOST_GNU_SYSTEM" : "kfreebsd-gnu", + "DEB_HOST_GNU_TYPE" : "sh3eb-kfreebsd-gnu", + "DEB_HOST_MULTIARCH" : "sh3eb-kfreebsd-gnu" + }, + "kfreebsd-sh4" : { + "DEB_HOST_ARCH" : "kfreebsd-sh4", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "sh4", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "gnu", + "DEB_HOST_ARCH_OS" : "kfreebsd", + "DEB_HOST_GNU_CPU" : "sh4", + "DEB_HOST_GNU_SYSTEM" : "kfreebsd-gnu", + "DEB_HOST_GNU_TYPE" : "sh4-kfreebsd-gnu", + "DEB_HOST_MULTIARCH" : "sh4-kfreebsd-gnu" + }, + "kfreebsd-sh4eb" : { + "DEB_HOST_ARCH" : "kfreebsd-sh4eb", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "sh4eb", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "gnu", + "DEB_HOST_ARCH_OS" : "kfreebsd", + "DEB_HOST_GNU_CPU" : "sh4eb", + "DEB_HOST_GNU_SYSTEM" : "kfreebsd-gnu", + "DEB_HOST_GNU_TYPE" : "sh4eb-kfreebsd-gnu", + "DEB_HOST_MULTIARCH" : "sh4eb-kfreebsd-gnu" + }, + "kfreebsd-sparc" : { + "DEB_HOST_ARCH" : "kfreebsd-sparc", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "sparc", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "gnu", + "DEB_HOST_ARCH_OS" : "kfreebsd", + "DEB_HOST_GNU_CPU" : "sparc", + "DEB_HOST_GNU_SYSTEM" : "kfreebsd-gnu", + "DEB_HOST_GNU_TYPE" : "sparc-kfreebsd-gnu", + "DEB_HOST_MULTIARCH" : "sparc-kfreebsd-gnu" + }, + "kfreebsd-sparc64" : { + "DEB_HOST_ARCH" : "kfreebsd-sparc64", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "64", + "DEB_HOST_ARCH_CPU" : "sparc64", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "gnu", + "DEB_HOST_ARCH_OS" : "kfreebsd", + "DEB_HOST_GNU_CPU" : "sparc64", + "DEB_HOST_GNU_SYSTEM" : "kfreebsd-gnu", + "DEB_HOST_GNU_TYPE" : "sparc64-kfreebsd-gnu", + "DEB_HOST_MULTIARCH" : "sparc64-kfreebsd-gnu" + }, + "kfreebsd-tilegx" : { + "DEB_HOST_ARCH" : "kfreebsd-tilegx", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "64", + "DEB_HOST_ARCH_CPU" : "tilegx", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "gnu", + "DEB_HOST_ARCH_OS" : "kfreebsd", + "DEB_HOST_GNU_CPU" : "tilegx", + "DEB_HOST_GNU_SYSTEM" : "kfreebsd-gnu", + "DEB_HOST_GNU_TYPE" : "tilegx-kfreebsd-gnu", + "DEB_HOST_MULTIARCH" : "tilegx-kfreebsd-gnu" + }, + "knetbsd-alpha" : { + "DEB_HOST_ARCH" : "knetbsd-alpha", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "64", + "DEB_HOST_ARCH_CPU" : "alpha", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "gnu", + "DEB_HOST_ARCH_OS" : "knetbsd", + "DEB_HOST_GNU_CPU" : "alpha", + "DEB_HOST_GNU_SYSTEM" : "knetbsd-gnu", + "DEB_HOST_GNU_TYPE" : "alpha-knetbsd-gnu", + "DEB_HOST_MULTIARCH" : "alpha-knetbsd-gnu" + }, + "knetbsd-amd64" : { + "DEB_HOST_ARCH" : "knetbsd-amd64", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "64", + "DEB_HOST_ARCH_CPU" : "amd64", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "gnu", + "DEB_HOST_ARCH_OS" : "knetbsd", + "DEB_HOST_GNU_CPU" : "x86_64", + "DEB_HOST_GNU_SYSTEM" : "knetbsd-gnu", + "DEB_HOST_GNU_TYPE" : "x86_64-knetbsd-gnu", + "DEB_HOST_MULTIARCH" : "x86_64-knetbsd-gnu" + }, + "knetbsd-arc" : { + "DEB_HOST_ARCH" : "knetbsd-arc", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "arc", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "gnu", + "DEB_HOST_ARCH_OS" : "knetbsd", + "DEB_HOST_GNU_CPU" : "arc", + "DEB_HOST_GNU_SYSTEM" : "knetbsd-gnu", + "DEB_HOST_GNU_TYPE" : "arc-knetbsd-gnu", + "DEB_HOST_MULTIARCH" : "arc-knetbsd-gnu" + }, + "knetbsd-arm" : { + "DEB_HOST_ARCH" : "knetbsd-arm", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "arm", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "gnu", + "DEB_HOST_ARCH_OS" : "knetbsd", + "DEB_HOST_GNU_CPU" : "arm", + "DEB_HOST_GNU_SYSTEM" : "knetbsd-gnu", + "DEB_HOST_GNU_TYPE" : "arm-knetbsd-gnu", + "DEB_HOST_MULTIARCH" : "arm-knetbsd-gnu" + }, + "knetbsd-arm64" : { + "DEB_HOST_ARCH" : "knetbsd-arm64", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "64", + "DEB_HOST_ARCH_CPU" : "arm64", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "gnu", + "DEB_HOST_ARCH_OS" : "knetbsd", + "DEB_HOST_GNU_CPU" : "aarch64", + "DEB_HOST_GNU_SYSTEM" : "knetbsd-gnu", + "DEB_HOST_GNU_TYPE" : "aarch64-knetbsd-gnu", + "DEB_HOST_MULTIARCH" : "aarch64-knetbsd-gnu" + }, + "knetbsd-armeb" : { + "DEB_HOST_ARCH" : "knetbsd-armeb", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "armeb", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "gnu", + "DEB_HOST_ARCH_OS" : "knetbsd", + "DEB_HOST_GNU_CPU" : "armeb", + "DEB_HOST_GNU_SYSTEM" : "knetbsd-gnu", + "DEB_HOST_GNU_TYPE" : "armeb-knetbsd-gnu", + "DEB_HOST_MULTIARCH" : "armeb-knetbsd-gnu" + }, + "knetbsd-avr32" : { + "DEB_HOST_ARCH" : "knetbsd-avr32", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "avr32", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "gnu", + "DEB_HOST_ARCH_OS" : "knetbsd", + "DEB_HOST_GNU_CPU" : "avr32", + "DEB_HOST_GNU_SYSTEM" : "knetbsd-gnu", + "DEB_HOST_GNU_TYPE" : "avr32-knetbsd-gnu", + "DEB_HOST_MULTIARCH" : "avr32-knetbsd-gnu" + }, + "knetbsd-hppa" : { + "DEB_HOST_ARCH" : "knetbsd-hppa", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "hppa", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "gnu", + "DEB_HOST_ARCH_OS" : "knetbsd", + "DEB_HOST_GNU_CPU" : "hppa", + "DEB_HOST_GNU_SYSTEM" : "knetbsd-gnu", + "DEB_HOST_GNU_TYPE" : "hppa-knetbsd-gnu", + "DEB_HOST_MULTIARCH" : "hppa-knetbsd-gnu" + }, + "knetbsd-i386" : { + "DEB_HOST_ARCH" : "knetbsd-i386", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "i386", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "gnu", + "DEB_HOST_ARCH_OS" : "knetbsd", + "DEB_HOST_GNU_CPU" : "i686", + "DEB_HOST_GNU_SYSTEM" : "knetbsd-gnu", + "DEB_HOST_GNU_TYPE" : "i686-knetbsd-gnu", + "DEB_HOST_MULTIARCH" : "i386-knetbsd-gnu" + }, + "knetbsd-ia64" : { + "DEB_HOST_ARCH" : "knetbsd-ia64", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "64", + "DEB_HOST_ARCH_CPU" : "ia64", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "gnu", + "DEB_HOST_ARCH_OS" : "knetbsd", + "DEB_HOST_GNU_CPU" : "ia64", + "DEB_HOST_GNU_SYSTEM" : "knetbsd-gnu", + "DEB_HOST_GNU_TYPE" : "ia64-knetbsd-gnu", + "DEB_HOST_MULTIARCH" : "ia64-knetbsd-gnu" + }, + "knetbsd-m32r" : { + "DEB_HOST_ARCH" : "knetbsd-m32r", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "m32r", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "gnu", + "DEB_HOST_ARCH_OS" : "knetbsd", + "DEB_HOST_GNU_CPU" : "m32r", + "DEB_HOST_GNU_SYSTEM" : "knetbsd-gnu", + "DEB_HOST_GNU_TYPE" : "m32r-knetbsd-gnu", + "DEB_HOST_MULTIARCH" : "m32r-knetbsd-gnu" + }, + "knetbsd-m68k" : { + "DEB_HOST_ARCH" : "knetbsd-m68k", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "m68k", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "gnu", + "DEB_HOST_ARCH_OS" : "knetbsd", + "DEB_HOST_GNU_CPU" : "m68k", + "DEB_HOST_GNU_SYSTEM" : "knetbsd-gnu", + "DEB_HOST_GNU_TYPE" : "m68k-knetbsd-gnu", + "DEB_HOST_MULTIARCH" : "m68k-knetbsd-gnu" + }, + "knetbsd-mips" : { + "DEB_HOST_ARCH" : "knetbsd-mips", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "mips", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "gnu", + "DEB_HOST_ARCH_OS" : "knetbsd", + "DEB_HOST_GNU_CPU" : "mips", + "DEB_HOST_GNU_SYSTEM" : "knetbsd-gnu", + "DEB_HOST_GNU_TYPE" : "mips-knetbsd-gnu", + "DEB_HOST_MULTIARCH" : "mips-knetbsd-gnu" + }, + "knetbsd-mips64" : { + "DEB_HOST_ARCH" : "knetbsd-mips64", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "64", + "DEB_HOST_ARCH_CPU" : "mips64", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "gnu", + "DEB_HOST_ARCH_OS" : "knetbsd", + "DEB_HOST_GNU_CPU" : "mips64", + "DEB_HOST_GNU_SYSTEM" : "knetbsd-gnu", + "DEB_HOST_GNU_TYPE" : "mips64-knetbsd-gnu", + "DEB_HOST_MULTIARCH" : "mips64-knetbsd-gnu" + }, + "knetbsd-mips64el" : { + "DEB_HOST_ARCH" : "knetbsd-mips64el", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "64", + "DEB_HOST_ARCH_CPU" : "mips64el", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "gnu", + "DEB_HOST_ARCH_OS" : "knetbsd", + "DEB_HOST_GNU_CPU" : "mips64el", + "DEB_HOST_GNU_SYSTEM" : "knetbsd-gnu", + "DEB_HOST_GNU_TYPE" : "mips64el-knetbsd-gnu", + "DEB_HOST_MULTIARCH" : "mips64el-knetbsd-gnu" + }, + "knetbsd-mips64r6" : { + "DEB_HOST_ARCH" : "knetbsd-mips64r6", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "64", + "DEB_HOST_ARCH_CPU" : "mips64r6", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "gnu", + "DEB_HOST_ARCH_OS" : "knetbsd", + "DEB_HOST_GNU_CPU" : "mipsisa64r6", + "DEB_HOST_GNU_SYSTEM" : "knetbsd-gnu", + "DEB_HOST_GNU_TYPE" : "mipsisa64r6-knetbsd-gnu", + "DEB_HOST_MULTIARCH" : "mipsisa64r6-knetbsd-gnu" + }, + "knetbsd-mips64r6el" : { + "DEB_HOST_ARCH" : "knetbsd-mips64r6el", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "64", + "DEB_HOST_ARCH_CPU" : "mips64r6el", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "gnu", + "DEB_HOST_ARCH_OS" : "knetbsd", + "DEB_HOST_GNU_CPU" : "mipsisa64r6el", + "DEB_HOST_GNU_SYSTEM" : "knetbsd-gnu", + "DEB_HOST_GNU_TYPE" : "mipsisa64r6el-knetbsd-gnu", + "DEB_HOST_MULTIARCH" : "mipsisa64r6el-knetbsd-gnu" + }, + "knetbsd-mipsel" : { + "DEB_HOST_ARCH" : "knetbsd-mipsel", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "mipsel", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "gnu", + "DEB_HOST_ARCH_OS" : "knetbsd", + "DEB_HOST_GNU_CPU" : "mipsel", + "DEB_HOST_GNU_SYSTEM" : "knetbsd-gnu", + "DEB_HOST_GNU_TYPE" : "mipsel-knetbsd-gnu", + "DEB_HOST_MULTIARCH" : "mipsel-knetbsd-gnu" + }, + "knetbsd-mipsr6" : { + "DEB_HOST_ARCH" : "knetbsd-mipsr6", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "mipsr6", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "gnu", + "DEB_HOST_ARCH_OS" : "knetbsd", + "DEB_HOST_GNU_CPU" : "mipsisa32r6", + "DEB_HOST_GNU_SYSTEM" : "knetbsd-gnu", + "DEB_HOST_GNU_TYPE" : "mipsisa32r6-knetbsd-gnu", + "DEB_HOST_MULTIARCH" : "mipsisa32r6-knetbsd-gnu" + }, + "knetbsd-mipsr6el" : { + "DEB_HOST_ARCH" : "knetbsd-mipsr6el", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "mipsr6el", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "gnu", + "DEB_HOST_ARCH_OS" : "knetbsd", + "DEB_HOST_GNU_CPU" : "mipsisa32r6el", + "DEB_HOST_GNU_SYSTEM" : "knetbsd-gnu", + "DEB_HOST_GNU_TYPE" : "mipsisa32r6el-knetbsd-gnu", + "DEB_HOST_MULTIARCH" : "mipsisa32r6el-knetbsd-gnu" + }, + "knetbsd-nios2" : { + "DEB_HOST_ARCH" : "knetbsd-nios2", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "nios2", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "gnu", + "DEB_HOST_ARCH_OS" : "knetbsd", + "DEB_HOST_GNU_CPU" : "nios2", + "DEB_HOST_GNU_SYSTEM" : "knetbsd-gnu", + "DEB_HOST_GNU_TYPE" : "nios2-knetbsd-gnu", + "DEB_HOST_MULTIARCH" : "nios2-knetbsd-gnu" + }, + "knetbsd-or1k" : { + "DEB_HOST_ARCH" : "knetbsd-or1k", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "or1k", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "gnu", + "DEB_HOST_ARCH_OS" : "knetbsd", + "DEB_HOST_GNU_CPU" : "or1k", + "DEB_HOST_GNU_SYSTEM" : "knetbsd-gnu", + "DEB_HOST_GNU_TYPE" : "or1k-knetbsd-gnu", + "DEB_HOST_MULTIARCH" : "or1k-knetbsd-gnu" + }, + "knetbsd-powerpc" : { + "DEB_HOST_ARCH" : "knetbsd-powerpc", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "powerpc", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "gnu", + "DEB_HOST_ARCH_OS" : "knetbsd", + "DEB_HOST_GNU_CPU" : "powerpc", + "DEB_HOST_GNU_SYSTEM" : "knetbsd-gnu", + "DEB_HOST_GNU_TYPE" : "powerpc-knetbsd-gnu", + "DEB_HOST_MULTIARCH" : "powerpc-knetbsd-gnu" + }, + "knetbsd-powerpcel" : { + "DEB_HOST_ARCH" : "knetbsd-powerpcel", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "powerpcel", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "gnu", + "DEB_HOST_ARCH_OS" : "knetbsd", + "DEB_HOST_GNU_CPU" : "powerpcle", + "DEB_HOST_GNU_SYSTEM" : "knetbsd-gnu", + "DEB_HOST_GNU_TYPE" : "powerpcle-knetbsd-gnu", + "DEB_HOST_MULTIARCH" : "powerpcle-knetbsd-gnu" + }, + "knetbsd-ppc64" : { + "DEB_HOST_ARCH" : "knetbsd-ppc64", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "64", + "DEB_HOST_ARCH_CPU" : "ppc64", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "gnu", + "DEB_HOST_ARCH_OS" : "knetbsd", + "DEB_HOST_GNU_CPU" : "powerpc64", + "DEB_HOST_GNU_SYSTEM" : "knetbsd-gnu", + "DEB_HOST_GNU_TYPE" : "powerpc64-knetbsd-gnu", + "DEB_HOST_MULTIARCH" : "powerpc64-knetbsd-gnu" + }, + "knetbsd-ppc64el" : { + "DEB_HOST_ARCH" : "knetbsd-ppc64el", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "64", + "DEB_HOST_ARCH_CPU" : "ppc64el", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "gnu", + "DEB_HOST_ARCH_OS" : "knetbsd", + "DEB_HOST_GNU_CPU" : "powerpc64le", + "DEB_HOST_GNU_SYSTEM" : "knetbsd-gnu", + "DEB_HOST_GNU_TYPE" : "powerpc64le-knetbsd-gnu", + "DEB_HOST_MULTIARCH" : "powerpc64le-knetbsd-gnu" + }, + "knetbsd-riscv64" : { + "DEB_HOST_ARCH" : "knetbsd-riscv64", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "64", + "DEB_HOST_ARCH_CPU" : "riscv64", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "gnu", + "DEB_HOST_ARCH_OS" : "knetbsd", + "DEB_HOST_GNU_CPU" : "riscv64", + "DEB_HOST_GNU_SYSTEM" : "knetbsd-gnu", + "DEB_HOST_GNU_TYPE" : "riscv64-knetbsd-gnu", + "DEB_HOST_MULTIARCH" : "riscv64-knetbsd-gnu" + }, + "knetbsd-s390" : { + "DEB_HOST_ARCH" : "knetbsd-s390", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "s390", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "gnu", + "DEB_HOST_ARCH_OS" : "knetbsd", + "DEB_HOST_GNU_CPU" : "s390", + "DEB_HOST_GNU_SYSTEM" : "knetbsd-gnu", + "DEB_HOST_GNU_TYPE" : "s390-knetbsd-gnu", + "DEB_HOST_MULTIARCH" : "s390-knetbsd-gnu" + }, + "knetbsd-s390x" : { + "DEB_HOST_ARCH" : "knetbsd-s390x", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "64", + "DEB_HOST_ARCH_CPU" : "s390x", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "gnu", + "DEB_HOST_ARCH_OS" : "knetbsd", + "DEB_HOST_GNU_CPU" : "s390x", + "DEB_HOST_GNU_SYSTEM" : "knetbsd-gnu", + "DEB_HOST_GNU_TYPE" : "s390x-knetbsd-gnu", + "DEB_HOST_MULTIARCH" : "s390x-knetbsd-gnu" + }, + "knetbsd-sh3" : { + "DEB_HOST_ARCH" : "knetbsd-sh3", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "sh3", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "gnu", + "DEB_HOST_ARCH_OS" : "knetbsd", + "DEB_HOST_GNU_CPU" : "sh3", + "DEB_HOST_GNU_SYSTEM" : "knetbsd-gnu", + "DEB_HOST_GNU_TYPE" : "sh3-knetbsd-gnu", + "DEB_HOST_MULTIARCH" : "sh3-knetbsd-gnu" + }, + "knetbsd-sh3eb" : { + "DEB_HOST_ARCH" : "knetbsd-sh3eb", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "sh3eb", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "gnu", + "DEB_HOST_ARCH_OS" : "knetbsd", + "DEB_HOST_GNU_CPU" : "sh3eb", + "DEB_HOST_GNU_SYSTEM" : "knetbsd-gnu", + "DEB_HOST_GNU_TYPE" : "sh3eb-knetbsd-gnu", + "DEB_HOST_MULTIARCH" : "sh3eb-knetbsd-gnu" + }, + "knetbsd-sh4" : { + "DEB_HOST_ARCH" : "knetbsd-sh4", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "sh4", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "gnu", + "DEB_HOST_ARCH_OS" : "knetbsd", + "DEB_HOST_GNU_CPU" : "sh4", + "DEB_HOST_GNU_SYSTEM" : "knetbsd-gnu", + "DEB_HOST_GNU_TYPE" : "sh4-knetbsd-gnu", + "DEB_HOST_MULTIARCH" : "sh4-knetbsd-gnu" + }, + "knetbsd-sh4eb" : { + "DEB_HOST_ARCH" : "knetbsd-sh4eb", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "sh4eb", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "gnu", + "DEB_HOST_ARCH_OS" : "knetbsd", + "DEB_HOST_GNU_CPU" : "sh4eb", + "DEB_HOST_GNU_SYSTEM" : "knetbsd-gnu", + "DEB_HOST_GNU_TYPE" : "sh4eb-knetbsd-gnu", + "DEB_HOST_MULTIARCH" : "sh4eb-knetbsd-gnu" + }, + "knetbsd-sparc" : { + "DEB_HOST_ARCH" : "knetbsd-sparc", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "sparc", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "gnu", + "DEB_HOST_ARCH_OS" : "knetbsd", + "DEB_HOST_GNU_CPU" : "sparc", + "DEB_HOST_GNU_SYSTEM" : "knetbsd-gnu", + "DEB_HOST_GNU_TYPE" : "sparc-knetbsd-gnu", + "DEB_HOST_MULTIARCH" : "sparc-knetbsd-gnu" + }, + "knetbsd-sparc64" : { + "DEB_HOST_ARCH" : "knetbsd-sparc64", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "64", + "DEB_HOST_ARCH_CPU" : "sparc64", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "gnu", + "DEB_HOST_ARCH_OS" : "knetbsd", + "DEB_HOST_GNU_CPU" : "sparc64", + "DEB_HOST_GNU_SYSTEM" : "knetbsd-gnu", + "DEB_HOST_GNU_TYPE" : "sparc64-knetbsd-gnu", + "DEB_HOST_MULTIARCH" : "sparc64-knetbsd-gnu" + }, + "knetbsd-tilegx" : { + "DEB_HOST_ARCH" : "knetbsd-tilegx", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "64", + "DEB_HOST_ARCH_CPU" : "tilegx", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "gnu", + "DEB_HOST_ARCH_OS" : "knetbsd", + "DEB_HOST_GNU_CPU" : "tilegx", + "DEB_HOST_GNU_SYSTEM" : "knetbsd-gnu", + "DEB_HOST_GNU_TYPE" : "tilegx-knetbsd-gnu", + "DEB_HOST_MULTIARCH" : "tilegx-knetbsd-gnu" + }, + "kopensolaris-alpha" : { + "DEB_HOST_ARCH" : "kopensolaris-alpha", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "64", + "DEB_HOST_ARCH_CPU" : "alpha", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "gnu", + "DEB_HOST_ARCH_OS" : "kopensolaris", + "DEB_HOST_GNU_CPU" : "alpha", + "DEB_HOST_GNU_SYSTEM" : "kopensolaris-gnu", + "DEB_HOST_GNU_TYPE" : "alpha-kopensolaris-gnu", + "DEB_HOST_MULTIARCH" : "alpha-kopensolaris-gnu" + }, + "kopensolaris-amd64" : { + "DEB_HOST_ARCH" : "kopensolaris-amd64", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "64", + "DEB_HOST_ARCH_CPU" : "amd64", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "gnu", + "DEB_HOST_ARCH_OS" : "kopensolaris", + "DEB_HOST_GNU_CPU" : "x86_64", + "DEB_HOST_GNU_SYSTEM" : "kopensolaris-gnu", + "DEB_HOST_GNU_TYPE" : "x86_64-kopensolaris-gnu", + "DEB_HOST_MULTIARCH" : "x86_64-kopensolaris-gnu" + }, + "kopensolaris-arc" : { + "DEB_HOST_ARCH" : "kopensolaris-arc", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "arc", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "gnu", + "DEB_HOST_ARCH_OS" : "kopensolaris", + "DEB_HOST_GNU_CPU" : "arc", + "DEB_HOST_GNU_SYSTEM" : "kopensolaris-gnu", + "DEB_HOST_GNU_TYPE" : "arc-kopensolaris-gnu", + "DEB_HOST_MULTIARCH" : "arc-kopensolaris-gnu" + }, + "kopensolaris-arm" : { + "DEB_HOST_ARCH" : "kopensolaris-arm", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "arm", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "gnu", + "DEB_HOST_ARCH_OS" : "kopensolaris", + "DEB_HOST_GNU_CPU" : "arm", + "DEB_HOST_GNU_SYSTEM" : "kopensolaris-gnu", + "DEB_HOST_GNU_TYPE" : "arm-kopensolaris-gnu", + "DEB_HOST_MULTIARCH" : "arm-kopensolaris-gnu" + }, + "kopensolaris-arm64" : { + "DEB_HOST_ARCH" : "kopensolaris-arm64", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "64", + "DEB_HOST_ARCH_CPU" : "arm64", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "gnu", + "DEB_HOST_ARCH_OS" : "kopensolaris", + "DEB_HOST_GNU_CPU" : "aarch64", + "DEB_HOST_GNU_SYSTEM" : "kopensolaris-gnu", + "DEB_HOST_GNU_TYPE" : "aarch64-kopensolaris-gnu", + "DEB_HOST_MULTIARCH" : "aarch64-kopensolaris-gnu" + }, + "kopensolaris-armeb" : { + "DEB_HOST_ARCH" : "kopensolaris-armeb", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "armeb", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "gnu", + "DEB_HOST_ARCH_OS" : "kopensolaris", + "DEB_HOST_GNU_CPU" : "armeb", + "DEB_HOST_GNU_SYSTEM" : "kopensolaris-gnu", + "DEB_HOST_GNU_TYPE" : "armeb-kopensolaris-gnu", + "DEB_HOST_MULTIARCH" : "armeb-kopensolaris-gnu" + }, + "kopensolaris-avr32" : { + "DEB_HOST_ARCH" : "kopensolaris-avr32", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "avr32", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "gnu", + "DEB_HOST_ARCH_OS" : "kopensolaris", + "DEB_HOST_GNU_CPU" : "avr32", + "DEB_HOST_GNU_SYSTEM" : "kopensolaris-gnu", + "DEB_HOST_GNU_TYPE" : "avr32-kopensolaris-gnu", + "DEB_HOST_MULTIARCH" : "avr32-kopensolaris-gnu" + }, + "kopensolaris-hppa" : { + "DEB_HOST_ARCH" : "kopensolaris-hppa", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "hppa", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "gnu", + "DEB_HOST_ARCH_OS" : "kopensolaris", + "DEB_HOST_GNU_CPU" : "hppa", + "DEB_HOST_GNU_SYSTEM" : "kopensolaris-gnu", + "DEB_HOST_GNU_TYPE" : "hppa-kopensolaris-gnu", + "DEB_HOST_MULTIARCH" : "hppa-kopensolaris-gnu" + }, + "kopensolaris-i386" : { + "DEB_HOST_ARCH" : "kopensolaris-i386", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "i386", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "gnu", + "DEB_HOST_ARCH_OS" : "kopensolaris", + "DEB_HOST_GNU_CPU" : "i686", + "DEB_HOST_GNU_SYSTEM" : "kopensolaris-gnu", + "DEB_HOST_GNU_TYPE" : "i686-kopensolaris-gnu", + "DEB_HOST_MULTIARCH" : "i386-kopensolaris-gnu" + }, + "kopensolaris-ia64" : { + "DEB_HOST_ARCH" : "kopensolaris-ia64", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "64", + "DEB_HOST_ARCH_CPU" : "ia64", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "gnu", + "DEB_HOST_ARCH_OS" : "kopensolaris", + "DEB_HOST_GNU_CPU" : "ia64", + "DEB_HOST_GNU_SYSTEM" : "kopensolaris-gnu", + "DEB_HOST_GNU_TYPE" : "ia64-kopensolaris-gnu", + "DEB_HOST_MULTIARCH" : "ia64-kopensolaris-gnu" + }, + "kopensolaris-m32r" : { + "DEB_HOST_ARCH" : "kopensolaris-m32r", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "m32r", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "gnu", + "DEB_HOST_ARCH_OS" : "kopensolaris", + "DEB_HOST_GNU_CPU" : "m32r", + "DEB_HOST_GNU_SYSTEM" : "kopensolaris-gnu", + "DEB_HOST_GNU_TYPE" : "m32r-kopensolaris-gnu", + "DEB_HOST_MULTIARCH" : "m32r-kopensolaris-gnu" + }, + "kopensolaris-m68k" : { + "DEB_HOST_ARCH" : "kopensolaris-m68k", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "m68k", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "gnu", + "DEB_HOST_ARCH_OS" : "kopensolaris", + "DEB_HOST_GNU_CPU" : "m68k", + "DEB_HOST_GNU_SYSTEM" : "kopensolaris-gnu", + "DEB_HOST_GNU_TYPE" : "m68k-kopensolaris-gnu", + "DEB_HOST_MULTIARCH" : "m68k-kopensolaris-gnu" + }, + "kopensolaris-mips" : { + "DEB_HOST_ARCH" : "kopensolaris-mips", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "mips", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "gnu", + "DEB_HOST_ARCH_OS" : "kopensolaris", + "DEB_HOST_GNU_CPU" : "mips", + "DEB_HOST_GNU_SYSTEM" : "kopensolaris-gnu", + "DEB_HOST_GNU_TYPE" : "mips-kopensolaris-gnu", + "DEB_HOST_MULTIARCH" : "mips-kopensolaris-gnu" + }, + "kopensolaris-mips64" : { + "DEB_HOST_ARCH" : "kopensolaris-mips64", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "64", + "DEB_HOST_ARCH_CPU" : "mips64", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "gnu", + "DEB_HOST_ARCH_OS" : "kopensolaris", + "DEB_HOST_GNU_CPU" : "mips64", + "DEB_HOST_GNU_SYSTEM" : "kopensolaris-gnu", + "DEB_HOST_GNU_TYPE" : "mips64-kopensolaris-gnu", + "DEB_HOST_MULTIARCH" : "mips64-kopensolaris-gnu" + }, + "kopensolaris-mips64el" : { + "DEB_HOST_ARCH" : "kopensolaris-mips64el", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "64", + "DEB_HOST_ARCH_CPU" : "mips64el", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "gnu", + "DEB_HOST_ARCH_OS" : "kopensolaris", + "DEB_HOST_GNU_CPU" : "mips64el", + "DEB_HOST_GNU_SYSTEM" : "kopensolaris-gnu", + "DEB_HOST_GNU_TYPE" : "mips64el-kopensolaris-gnu", + "DEB_HOST_MULTIARCH" : "mips64el-kopensolaris-gnu" + }, + "kopensolaris-mips64r6" : { + "DEB_HOST_ARCH" : "kopensolaris-mips64r6", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "64", + "DEB_HOST_ARCH_CPU" : "mips64r6", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "gnu", + "DEB_HOST_ARCH_OS" : "kopensolaris", + "DEB_HOST_GNU_CPU" : "mipsisa64r6", + "DEB_HOST_GNU_SYSTEM" : "kopensolaris-gnu", + "DEB_HOST_GNU_TYPE" : "mipsisa64r6-kopensolaris-gnu", + "DEB_HOST_MULTIARCH" : "mipsisa64r6-kopensolaris-gnu" + }, + "kopensolaris-mips64r6el" : { + "DEB_HOST_ARCH" : "kopensolaris-mips64r6el", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "64", + "DEB_HOST_ARCH_CPU" : "mips64r6el", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "gnu", + "DEB_HOST_ARCH_OS" : "kopensolaris", + "DEB_HOST_GNU_CPU" : "mipsisa64r6el", + "DEB_HOST_GNU_SYSTEM" : "kopensolaris-gnu", + "DEB_HOST_GNU_TYPE" : "mipsisa64r6el-kopensolaris-gnu", + "DEB_HOST_MULTIARCH" : "mipsisa64r6el-kopensolaris-gnu" + }, + "kopensolaris-mipsel" : { + "DEB_HOST_ARCH" : "kopensolaris-mipsel", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "mipsel", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "gnu", + "DEB_HOST_ARCH_OS" : "kopensolaris", + "DEB_HOST_GNU_CPU" : "mipsel", + "DEB_HOST_GNU_SYSTEM" : "kopensolaris-gnu", + "DEB_HOST_GNU_TYPE" : "mipsel-kopensolaris-gnu", + "DEB_HOST_MULTIARCH" : "mipsel-kopensolaris-gnu" + }, + "kopensolaris-mipsr6" : { + "DEB_HOST_ARCH" : "kopensolaris-mipsr6", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "mipsr6", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "gnu", + "DEB_HOST_ARCH_OS" : "kopensolaris", + "DEB_HOST_GNU_CPU" : "mipsisa32r6", + "DEB_HOST_GNU_SYSTEM" : "kopensolaris-gnu", + "DEB_HOST_GNU_TYPE" : "mipsisa32r6-kopensolaris-gnu", + "DEB_HOST_MULTIARCH" : "mipsisa32r6-kopensolaris-gnu" + }, + "kopensolaris-mipsr6el" : { + "DEB_HOST_ARCH" : "kopensolaris-mipsr6el", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "mipsr6el", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "gnu", + "DEB_HOST_ARCH_OS" : "kopensolaris", + "DEB_HOST_GNU_CPU" : "mipsisa32r6el", + "DEB_HOST_GNU_SYSTEM" : "kopensolaris-gnu", + "DEB_HOST_GNU_TYPE" : "mipsisa32r6el-kopensolaris-gnu", + "DEB_HOST_MULTIARCH" : "mipsisa32r6el-kopensolaris-gnu" + }, + "kopensolaris-nios2" : { + "DEB_HOST_ARCH" : "kopensolaris-nios2", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "nios2", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "gnu", + "DEB_HOST_ARCH_OS" : "kopensolaris", + "DEB_HOST_GNU_CPU" : "nios2", + "DEB_HOST_GNU_SYSTEM" : "kopensolaris-gnu", + "DEB_HOST_GNU_TYPE" : "nios2-kopensolaris-gnu", + "DEB_HOST_MULTIARCH" : "nios2-kopensolaris-gnu" + }, + "kopensolaris-or1k" : { + "DEB_HOST_ARCH" : "kopensolaris-or1k", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "or1k", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "gnu", + "DEB_HOST_ARCH_OS" : "kopensolaris", + "DEB_HOST_GNU_CPU" : "or1k", + "DEB_HOST_GNU_SYSTEM" : "kopensolaris-gnu", + "DEB_HOST_GNU_TYPE" : "or1k-kopensolaris-gnu", + "DEB_HOST_MULTIARCH" : "or1k-kopensolaris-gnu" + }, + "kopensolaris-powerpc" : { + "DEB_HOST_ARCH" : "kopensolaris-powerpc", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "powerpc", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "gnu", + "DEB_HOST_ARCH_OS" : "kopensolaris", + "DEB_HOST_GNU_CPU" : "powerpc", + "DEB_HOST_GNU_SYSTEM" : "kopensolaris-gnu", + "DEB_HOST_GNU_TYPE" : "powerpc-kopensolaris-gnu", + "DEB_HOST_MULTIARCH" : "powerpc-kopensolaris-gnu" + }, + "kopensolaris-powerpcel" : { + "DEB_HOST_ARCH" : "kopensolaris-powerpcel", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "powerpcel", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "gnu", + "DEB_HOST_ARCH_OS" : "kopensolaris", + "DEB_HOST_GNU_CPU" : "powerpcle", + "DEB_HOST_GNU_SYSTEM" : "kopensolaris-gnu", + "DEB_HOST_GNU_TYPE" : "powerpcle-kopensolaris-gnu", + "DEB_HOST_MULTIARCH" : "powerpcle-kopensolaris-gnu" + }, + "kopensolaris-ppc64" : { + "DEB_HOST_ARCH" : "kopensolaris-ppc64", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "64", + "DEB_HOST_ARCH_CPU" : "ppc64", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "gnu", + "DEB_HOST_ARCH_OS" : "kopensolaris", + "DEB_HOST_GNU_CPU" : "powerpc64", + "DEB_HOST_GNU_SYSTEM" : "kopensolaris-gnu", + "DEB_HOST_GNU_TYPE" : "powerpc64-kopensolaris-gnu", + "DEB_HOST_MULTIARCH" : "powerpc64-kopensolaris-gnu" + }, + "kopensolaris-ppc64el" : { + "DEB_HOST_ARCH" : "kopensolaris-ppc64el", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "64", + "DEB_HOST_ARCH_CPU" : "ppc64el", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "gnu", + "DEB_HOST_ARCH_OS" : "kopensolaris", + "DEB_HOST_GNU_CPU" : "powerpc64le", + "DEB_HOST_GNU_SYSTEM" : "kopensolaris-gnu", + "DEB_HOST_GNU_TYPE" : "powerpc64le-kopensolaris-gnu", + "DEB_HOST_MULTIARCH" : "powerpc64le-kopensolaris-gnu" + }, + "kopensolaris-riscv64" : { + "DEB_HOST_ARCH" : "kopensolaris-riscv64", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "64", + "DEB_HOST_ARCH_CPU" : "riscv64", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "gnu", + "DEB_HOST_ARCH_OS" : "kopensolaris", + "DEB_HOST_GNU_CPU" : "riscv64", + "DEB_HOST_GNU_SYSTEM" : "kopensolaris-gnu", + "DEB_HOST_GNU_TYPE" : "riscv64-kopensolaris-gnu", + "DEB_HOST_MULTIARCH" : "riscv64-kopensolaris-gnu" + }, + "kopensolaris-s390" : { + "DEB_HOST_ARCH" : "kopensolaris-s390", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "s390", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "gnu", + "DEB_HOST_ARCH_OS" : "kopensolaris", + "DEB_HOST_GNU_CPU" : "s390", + "DEB_HOST_GNU_SYSTEM" : "kopensolaris-gnu", + "DEB_HOST_GNU_TYPE" : "s390-kopensolaris-gnu", + "DEB_HOST_MULTIARCH" : "s390-kopensolaris-gnu" + }, + "kopensolaris-s390x" : { + "DEB_HOST_ARCH" : "kopensolaris-s390x", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "64", + "DEB_HOST_ARCH_CPU" : "s390x", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "gnu", + "DEB_HOST_ARCH_OS" : "kopensolaris", + "DEB_HOST_GNU_CPU" : "s390x", + "DEB_HOST_GNU_SYSTEM" : "kopensolaris-gnu", + "DEB_HOST_GNU_TYPE" : "s390x-kopensolaris-gnu", + "DEB_HOST_MULTIARCH" : "s390x-kopensolaris-gnu" + }, + "kopensolaris-sh3" : { + "DEB_HOST_ARCH" : "kopensolaris-sh3", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "sh3", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "gnu", + "DEB_HOST_ARCH_OS" : "kopensolaris", + "DEB_HOST_GNU_CPU" : "sh3", + "DEB_HOST_GNU_SYSTEM" : "kopensolaris-gnu", + "DEB_HOST_GNU_TYPE" : "sh3-kopensolaris-gnu", + "DEB_HOST_MULTIARCH" : "sh3-kopensolaris-gnu" + }, + "kopensolaris-sh3eb" : { + "DEB_HOST_ARCH" : "kopensolaris-sh3eb", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "sh3eb", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "gnu", + "DEB_HOST_ARCH_OS" : "kopensolaris", + "DEB_HOST_GNU_CPU" : "sh3eb", + "DEB_HOST_GNU_SYSTEM" : "kopensolaris-gnu", + "DEB_HOST_GNU_TYPE" : "sh3eb-kopensolaris-gnu", + "DEB_HOST_MULTIARCH" : "sh3eb-kopensolaris-gnu" + }, + "kopensolaris-sh4" : { + "DEB_HOST_ARCH" : "kopensolaris-sh4", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "sh4", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "gnu", + "DEB_HOST_ARCH_OS" : "kopensolaris", + "DEB_HOST_GNU_CPU" : "sh4", + "DEB_HOST_GNU_SYSTEM" : "kopensolaris-gnu", + "DEB_HOST_GNU_TYPE" : "sh4-kopensolaris-gnu", + "DEB_HOST_MULTIARCH" : "sh4-kopensolaris-gnu" + }, + "kopensolaris-sh4eb" : { + "DEB_HOST_ARCH" : "kopensolaris-sh4eb", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "sh4eb", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "gnu", + "DEB_HOST_ARCH_OS" : "kopensolaris", + "DEB_HOST_GNU_CPU" : "sh4eb", + "DEB_HOST_GNU_SYSTEM" : "kopensolaris-gnu", + "DEB_HOST_GNU_TYPE" : "sh4eb-kopensolaris-gnu", + "DEB_HOST_MULTIARCH" : "sh4eb-kopensolaris-gnu" + }, + "kopensolaris-sparc" : { + "DEB_HOST_ARCH" : "kopensolaris-sparc", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "sparc", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "gnu", + "DEB_HOST_ARCH_OS" : "kopensolaris", + "DEB_HOST_GNU_CPU" : "sparc", + "DEB_HOST_GNU_SYSTEM" : "kopensolaris-gnu", + "DEB_HOST_GNU_TYPE" : "sparc-kopensolaris-gnu", + "DEB_HOST_MULTIARCH" : "sparc-kopensolaris-gnu" + }, + "kopensolaris-sparc64" : { + "DEB_HOST_ARCH" : "kopensolaris-sparc64", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "64", + "DEB_HOST_ARCH_CPU" : "sparc64", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "gnu", + "DEB_HOST_ARCH_OS" : "kopensolaris", + "DEB_HOST_GNU_CPU" : "sparc64", + "DEB_HOST_GNU_SYSTEM" : "kopensolaris-gnu", + "DEB_HOST_GNU_TYPE" : "sparc64-kopensolaris-gnu", + "DEB_HOST_MULTIARCH" : "sparc64-kopensolaris-gnu" + }, + "kopensolaris-tilegx" : { + "DEB_HOST_ARCH" : "kopensolaris-tilegx", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "64", + "DEB_HOST_ARCH_CPU" : "tilegx", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "gnu", + "DEB_HOST_ARCH_OS" : "kopensolaris", + "DEB_HOST_GNU_CPU" : "tilegx", + "DEB_HOST_GNU_SYSTEM" : "kopensolaris-gnu", + "DEB_HOST_GNU_TYPE" : "tilegx-kopensolaris-gnu", + "DEB_HOST_MULTIARCH" : "tilegx-kopensolaris-gnu" + }, + "m32r" : { + "DEB_HOST_ARCH" : "m32r", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "m32r", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "gnu", + "DEB_HOST_ARCH_OS" : "linux", + "DEB_HOST_GNU_CPU" : "m32r", + "DEB_HOST_GNU_SYSTEM" : "linux-gnu", + "DEB_HOST_GNU_TYPE" : "m32r-linux-gnu", + "DEB_HOST_MULTIARCH" : "m32r-linux-gnu" + }, + "m68k" : { + "DEB_HOST_ARCH" : "m68k", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "m68k", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "gnu", + "DEB_HOST_ARCH_OS" : "linux", + "DEB_HOST_GNU_CPU" : "m68k", + "DEB_HOST_GNU_SYSTEM" : "linux-gnu", + "DEB_HOST_GNU_TYPE" : "m68k-linux-gnu", + "DEB_HOST_MULTIARCH" : "m68k-linux-gnu" + }, + "mint-m68k" : { + "DEB_HOST_ARCH" : "mint-m68k", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "m68k", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "tos", + "DEB_HOST_ARCH_OS" : "mint", + "DEB_HOST_GNU_CPU" : "m68k", + "DEB_HOST_GNU_SYSTEM" : "mint", + "DEB_HOST_GNU_TYPE" : "m68k-mint", + "DEB_HOST_MULTIARCH" : "m68k-mint" + }, + "mips" : { + "DEB_HOST_ARCH" : "mips", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "mips", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "gnu", + "DEB_HOST_ARCH_OS" : "linux", + "DEB_HOST_GNU_CPU" : "mips", + "DEB_HOST_GNU_SYSTEM" : "linux-gnu", + "DEB_HOST_GNU_TYPE" : "mips-linux-gnu", + "DEB_HOST_MULTIARCH" : "mips-linux-gnu" + }, + "mips64" : { + "DEB_HOST_ARCH" : "mips64", + "DEB_HOST_ARCH_ABI" : "abi64", + "DEB_HOST_ARCH_BITS" : "64", + "DEB_HOST_ARCH_CPU" : "mips64", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "gnu", + "DEB_HOST_ARCH_OS" : "linux", + "DEB_HOST_GNU_CPU" : "mips64", + "DEB_HOST_GNU_SYSTEM" : "linux-gnuabi64", + "DEB_HOST_GNU_TYPE" : "mips64-linux-gnuabi64", + "DEB_HOST_MULTIARCH" : "mips64-linux-gnuabi64" + }, + "mips64el" : { + "DEB_HOST_ARCH" : "mips64el", + "DEB_HOST_ARCH_ABI" : "abi64", + "DEB_HOST_ARCH_BITS" : "64", + "DEB_HOST_ARCH_CPU" : "mips64el", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "gnu", + "DEB_HOST_ARCH_OS" : "linux", + "DEB_HOST_GNU_CPU" : "mips64el", + "DEB_HOST_GNU_SYSTEM" : "linux-gnuabi64", + "DEB_HOST_GNU_TYPE" : "mips64el-linux-gnuabi64", + "DEB_HOST_MULTIARCH" : "mips64el-linux-gnuabi64" + }, + "mips64r6" : { + "DEB_HOST_ARCH" : "mips64r6", + "DEB_HOST_ARCH_ABI" : "abi64", + "DEB_HOST_ARCH_BITS" : "64", + "DEB_HOST_ARCH_CPU" : "mips64r6", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "gnu", + "DEB_HOST_ARCH_OS" : "linux", + "DEB_HOST_GNU_CPU" : "mipsisa64r6", + "DEB_HOST_GNU_SYSTEM" : "linux-gnuabi64", + "DEB_HOST_GNU_TYPE" : "mipsisa64r6-linux-gnuabi64", + "DEB_HOST_MULTIARCH" : "mipsisa64r6-linux-gnuabi64" + }, + "mips64r6el" : { + "DEB_HOST_ARCH" : "mips64r6el", + "DEB_HOST_ARCH_ABI" : "abi64", + "DEB_HOST_ARCH_BITS" : "64", + "DEB_HOST_ARCH_CPU" : "mips64r6el", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "gnu", + "DEB_HOST_ARCH_OS" : "linux", + "DEB_HOST_GNU_CPU" : "mipsisa64r6el", + "DEB_HOST_GNU_SYSTEM" : "linux-gnuabi64", + "DEB_HOST_GNU_TYPE" : "mipsisa64r6el-linux-gnuabi64", + "DEB_HOST_MULTIARCH" : "mipsisa64r6el-linux-gnuabi64" + }, + "mipsel" : { + "DEB_HOST_ARCH" : "mipsel", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "mipsel", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "gnu", + "DEB_HOST_ARCH_OS" : "linux", + "DEB_HOST_GNU_CPU" : "mipsel", + "DEB_HOST_GNU_SYSTEM" : "linux-gnu", + "DEB_HOST_GNU_TYPE" : "mipsel-linux-gnu", + "DEB_HOST_MULTIARCH" : "mipsel-linux-gnu" + }, + "mipsn32" : { + "DEB_HOST_ARCH" : "mipsn32", + "DEB_HOST_ARCH_ABI" : "abin32", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "mips64", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "gnu", + "DEB_HOST_ARCH_OS" : "linux", + "DEB_HOST_GNU_CPU" : "mips64", + "DEB_HOST_GNU_SYSTEM" : "linux-gnuabin32", + "DEB_HOST_GNU_TYPE" : "mips64-linux-gnuabin32", + "DEB_HOST_MULTIARCH" : "mips64-linux-gnuabin32" + }, + "mipsn32el" : { + "DEB_HOST_ARCH" : "mipsn32el", + "DEB_HOST_ARCH_ABI" : "abin32", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "mips64el", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "gnu", + "DEB_HOST_ARCH_OS" : "linux", + "DEB_HOST_GNU_CPU" : "mips64el", + "DEB_HOST_GNU_SYSTEM" : "linux-gnuabin32", + "DEB_HOST_GNU_TYPE" : "mips64el-linux-gnuabin32", + "DEB_HOST_MULTIARCH" : "mips64el-linux-gnuabin32" + }, + "mipsn32r6" : { + "DEB_HOST_ARCH" : "mipsn32r6", + "DEB_HOST_ARCH_ABI" : "abin32", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "mips64r6", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "gnu", + "DEB_HOST_ARCH_OS" : "linux", + "DEB_HOST_GNU_CPU" : "mipsisa64r6", + "DEB_HOST_GNU_SYSTEM" : "linux-gnuabin32", + "DEB_HOST_GNU_TYPE" : "mipsisa64r6-linux-gnuabin32", + "DEB_HOST_MULTIARCH" : "mipsisa64r6-linux-gnuabin32" + }, + "mipsn32r6el" : { + "DEB_HOST_ARCH" : "mipsn32r6el", + "DEB_HOST_ARCH_ABI" : "abin32", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "mips64r6el", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "gnu", + "DEB_HOST_ARCH_OS" : "linux", + "DEB_HOST_GNU_CPU" : "mipsisa64r6el", + "DEB_HOST_GNU_SYSTEM" : "linux-gnuabin32", + "DEB_HOST_GNU_TYPE" : "mipsisa64r6el-linux-gnuabin32", + "DEB_HOST_MULTIARCH" : "mipsisa64r6el-linux-gnuabin32" + }, + "mipsr6" : { + "DEB_HOST_ARCH" : "mipsr6", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "mipsr6", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "gnu", + "DEB_HOST_ARCH_OS" : "linux", + "DEB_HOST_GNU_CPU" : "mipsisa32r6", + "DEB_HOST_GNU_SYSTEM" : "linux-gnu", + "DEB_HOST_GNU_TYPE" : "mipsisa32r6-linux-gnu", + "DEB_HOST_MULTIARCH" : "mipsisa32r6-linux-gnu" + }, + "mipsr6el" : { + "DEB_HOST_ARCH" : "mipsr6el", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "mipsr6el", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "gnu", + "DEB_HOST_ARCH_OS" : "linux", + "DEB_HOST_GNU_CPU" : "mipsisa32r6el", + "DEB_HOST_GNU_SYSTEM" : "linux-gnu", + "DEB_HOST_GNU_TYPE" : "mipsisa32r6el-linux-gnu", + "DEB_HOST_MULTIARCH" : "mipsisa32r6el-linux-gnu" + }, + "musl-linux-alpha" : { + "DEB_HOST_ARCH" : "musl-linux-alpha", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "64", + "DEB_HOST_ARCH_CPU" : "alpha", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "musl", + "DEB_HOST_ARCH_OS" : "linux", + "DEB_HOST_GNU_CPU" : "alpha", + "DEB_HOST_GNU_SYSTEM" : "linux-musl", + "DEB_HOST_GNU_TYPE" : "alpha-linux-musl", + "DEB_HOST_MULTIARCH" : "alpha-linux-musl" + }, + "musl-linux-amd64" : { + "DEB_HOST_ARCH" : "musl-linux-amd64", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "64", + "DEB_HOST_ARCH_CPU" : "amd64", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "musl", + "DEB_HOST_ARCH_OS" : "linux", + "DEB_HOST_GNU_CPU" : "x86_64", + "DEB_HOST_GNU_SYSTEM" : "linux-musl", + "DEB_HOST_GNU_TYPE" : "x86_64-linux-musl", + "DEB_HOST_MULTIARCH" : "x86_64-linux-musl" + }, + "musl-linux-arc" : { + "DEB_HOST_ARCH" : "musl-linux-arc", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "arc", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "musl", + "DEB_HOST_ARCH_OS" : "linux", + "DEB_HOST_GNU_CPU" : "arc", + "DEB_HOST_GNU_SYSTEM" : "linux-musl", + "DEB_HOST_GNU_TYPE" : "arc-linux-musl", + "DEB_HOST_MULTIARCH" : "arc-linux-musl" + }, + "musl-linux-arm" : { + "DEB_HOST_ARCH" : "musl-linux-arm", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "arm", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "musl", + "DEB_HOST_ARCH_OS" : "linux", + "DEB_HOST_GNU_CPU" : "arm", + "DEB_HOST_GNU_SYSTEM" : "linux-musl", + "DEB_HOST_GNU_TYPE" : "arm-linux-musl", + "DEB_HOST_MULTIARCH" : "arm-linux-musl" + }, + "musl-linux-arm64" : { + "DEB_HOST_ARCH" : "musl-linux-arm64", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "64", + "DEB_HOST_ARCH_CPU" : "arm64", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "musl", + "DEB_HOST_ARCH_OS" : "linux", + "DEB_HOST_GNU_CPU" : "aarch64", + "DEB_HOST_GNU_SYSTEM" : "linux-musl", + "DEB_HOST_GNU_TYPE" : "aarch64-linux-musl", + "DEB_HOST_MULTIARCH" : "aarch64-linux-musl" + }, + "musl-linux-armeb" : { + "DEB_HOST_ARCH" : "musl-linux-armeb", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "armeb", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "musl", + "DEB_HOST_ARCH_OS" : "linux", + "DEB_HOST_GNU_CPU" : "armeb", + "DEB_HOST_GNU_SYSTEM" : "linux-musl", + "DEB_HOST_GNU_TYPE" : "armeb-linux-musl", + "DEB_HOST_MULTIARCH" : "armeb-linux-musl" + }, + "musl-linux-armhf" : { + "DEB_HOST_ARCH" : "musl-linux-armhf", + "DEB_HOST_ARCH_ABI" : "eabihf", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "arm", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "musl", + "DEB_HOST_ARCH_OS" : "linux", + "DEB_HOST_GNU_CPU" : "arm", + "DEB_HOST_GNU_SYSTEM" : "linux-musleabihf", + "DEB_HOST_GNU_TYPE" : "arm-linux-musleabihf", + "DEB_HOST_MULTIARCH" : "arm-linux-musleabihf" + }, + "musl-linux-avr32" : { + "DEB_HOST_ARCH" : "musl-linux-avr32", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "avr32", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "musl", + "DEB_HOST_ARCH_OS" : "linux", + "DEB_HOST_GNU_CPU" : "avr32", + "DEB_HOST_GNU_SYSTEM" : "linux-musl", + "DEB_HOST_GNU_TYPE" : "avr32-linux-musl", + "DEB_HOST_MULTIARCH" : "avr32-linux-musl" + }, + "musl-linux-hppa" : { + "DEB_HOST_ARCH" : "musl-linux-hppa", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "hppa", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "musl", + "DEB_HOST_ARCH_OS" : "linux", + "DEB_HOST_GNU_CPU" : "hppa", + "DEB_HOST_GNU_SYSTEM" : "linux-musl", + "DEB_HOST_GNU_TYPE" : "hppa-linux-musl", + "DEB_HOST_MULTIARCH" : "hppa-linux-musl" + }, + "musl-linux-i386" : { + "DEB_HOST_ARCH" : "musl-linux-i386", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "i386", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "musl", + "DEB_HOST_ARCH_OS" : "linux", + "DEB_HOST_GNU_CPU" : "i686", + "DEB_HOST_GNU_SYSTEM" : "linux-musl", + "DEB_HOST_GNU_TYPE" : "i686-linux-musl", + "DEB_HOST_MULTIARCH" : "i386-linux-musl" + }, + "musl-linux-ia64" : { + "DEB_HOST_ARCH" : "musl-linux-ia64", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "64", + "DEB_HOST_ARCH_CPU" : "ia64", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "musl", + "DEB_HOST_ARCH_OS" : "linux", + "DEB_HOST_GNU_CPU" : "ia64", + "DEB_HOST_GNU_SYSTEM" : "linux-musl", + "DEB_HOST_GNU_TYPE" : "ia64-linux-musl", + "DEB_HOST_MULTIARCH" : "ia64-linux-musl" + }, + "musl-linux-m32r" : { + "DEB_HOST_ARCH" : "musl-linux-m32r", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "m32r", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "musl", + "DEB_HOST_ARCH_OS" : "linux", + "DEB_HOST_GNU_CPU" : "m32r", + "DEB_HOST_GNU_SYSTEM" : "linux-musl", + "DEB_HOST_GNU_TYPE" : "m32r-linux-musl", + "DEB_HOST_MULTIARCH" : "m32r-linux-musl" + }, + "musl-linux-m68k" : { + "DEB_HOST_ARCH" : "musl-linux-m68k", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "m68k", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "musl", + "DEB_HOST_ARCH_OS" : "linux", + "DEB_HOST_GNU_CPU" : "m68k", + "DEB_HOST_GNU_SYSTEM" : "linux-musl", + "DEB_HOST_GNU_TYPE" : "m68k-linux-musl", + "DEB_HOST_MULTIARCH" : "m68k-linux-musl" + }, + "musl-linux-mips" : { + "DEB_HOST_ARCH" : "musl-linux-mips", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "mips", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "musl", + "DEB_HOST_ARCH_OS" : "linux", + "DEB_HOST_GNU_CPU" : "mips", + "DEB_HOST_GNU_SYSTEM" : "linux-musl", + "DEB_HOST_GNU_TYPE" : "mips-linux-musl", + "DEB_HOST_MULTIARCH" : "mips-linux-musl" + }, + "musl-linux-mips64" : { + "DEB_HOST_ARCH" : "musl-linux-mips64", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "64", + "DEB_HOST_ARCH_CPU" : "mips64", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "musl", + "DEB_HOST_ARCH_OS" : "linux", + "DEB_HOST_GNU_CPU" : "mips64", + "DEB_HOST_GNU_SYSTEM" : "linux-musl", + "DEB_HOST_GNU_TYPE" : "mips64-linux-musl", + "DEB_HOST_MULTIARCH" : "mips64-linux-musl" + }, + "musl-linux-mips64el" : { + "DEB_HOST_ARCH" : "musl-linux-mips64el", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "64", + "DEB_HOST_ARCH_CPU" : "mips64el", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "musl", + "DEB_HOST_ARCH_OS" : "linux", + "DEB_HOST_GNU_CPU" : "mips64el", + "DEB_HOST_GNU_SYSTEM" : "linux-musl", + "DEB_HOST_GNU_TYPE" : "mips64el-linux-musl", + "DEB_HOST_MULTIARCH" : "mips64el-linux-musl" + }, + "musl-linux-mips64r6" : { + "DEB_HOST_ARCH" : "musl-linux-mips64r6", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "64", + "DEB_HOST_ARCH_CPU" : "mips64r6", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "musl", + "DEB_HOST_ARCH_OS" : "linux", + "DEB_HOST_GNU_CPU" : "mipsisa64r6", + "DEB_HOST_GNU_SYSTEM" : "linux-musl", + "DEB_HOST_GNU_TYPE" : "mipsisa64r6-linux-musl", + "DEB_HOST_MULTIARCH" : "mipsisa64r6-linux-musl" + }, + "musl-linux-mips64r6el" : { + "DEB_HOST_ARCH" : "musl-linux-mips64r6el", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "64", + "DEB_HOST_ARCH_CPU" : "mips64r6el", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "musl", + "DEB_HOST_ARCH_OS" : "linux", + "DEB_HOST_GNU_CPU" : "mipsisa64r6el", + "DEB_HOST_GNU_SYSTEM" : "linux-musl", + "DEB_HOST_GNU_TYPE" : "mipsisa64r6el-linux-musl", + "DEB_HOST_MULTIARCH" : "mipsisa64r6el-linux-musl" + }, + "musl-linux-mipsel" : { + "DEB_HOST_ARCH" : "musl-linux-mipsel", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "mipsel", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "musl", + "DEB_HOST_ARCH_OS" : "linux", + "DEB_HOST_GNU_CPU" : "mipsel", + "DEB_HOST_GNU_SYSTEM" : "linux-musl", + "DEB_HOST_GNU_TYPE" : "mipsel-linux-musl", + "DEB_HOST_MULTIARCH" : "mipsel-linux-musl" + }, + "musl-linux-mipsr6" : { + "DEB_HOST_ARCH" : "musl-linux-mipsr6", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "mipsr6", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "musl", + "DEB_HOST_ARCH_OS" : "linux", + "DEB_HOST_GNU_CPU" : "mipsisa32r6", + "DEB_HOST_GNU_SYSTEM" : "linux-musl", + "DEB_HOST_GNU_TYPE" : "mipsisa32r6-linux-musl", + "DEB_HOST_MULTIARCH" : "mipsisa32r6-linux-musl" + }, + "musl-linux-mipsr6el" : { + "DEB_HOST_ARCH" : "musl-linux-mipsr6el", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "mipsr6el", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "musl", + "DEB_HOST_ARCH_OS" : "linux", + "DEB_HOST_GNU_CPU" : "mipsisa32r6el", + "DEB_HOST_GNU_SYSTEM" : "linux-musl", + "DEB_HOST_GNU_TYPE" : "mipsisa32r6el-linux-musl", + "DEB_HOST_MULTIARCH" : "mipsisa32r6el-linux-musl" + }, + "musl-linux-nios2" : { + "DEB_HOST_ARCH" : "musl-linux-nios2", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "nios2", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "musl", + "DEB_HOST_ARCH_OS" : "linux", + "DEB_HOST_GNU_CPU" : "nios2", + "DEB_HOST_GNU_SYSTEM" : "linux-musl", + "DEB_HOST_GNU_TYPE" : "nios2-linux-musl", + "DEB_HOST_MULTIARCH" : "nios2-linux-musl" + }, + "musl-linux-or1k" : { + "DEB_HOST_ARCH" : "musl-linux-or1k", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "or1k", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "musl", + "DEB_HOST_ARCH_OS" : "linux", + "DEB_HOST_GNU_CPU" : "or1k", + "DEB_HOST_GNU_SYSTEM" : "linux-musl", + "DEB_HOST_GNU_TYPE" : "or1k-linux-musl", + "DEB_HOST_MULTIARCH" : "or1k-linux-musl" + }, + "musl-linux-powerpc" : { + "DEB_HOST_ARCH" : "musl-linux-powerpc", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "powerpc", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "musl", + "DEB_HOST_ARCH_OS" : "linux", + "DEB_HOST_GNU_CPU" : "powerpc", + "DEB_HOST_GNU_SYSTEM" : "linux-musl", + "DEB_HOST_GNU_TYPE" : "powerpc-linux-musl", + "DEB_HOST_MULTIARCH" : "powerpc-linux-musl" + }, + "musl-linux-powerpcel" : { + "DEB_HOST_ARCH" : "musl-linux-powerpcel", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "powerpcel", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "musl", + "DEB_HOST_ARCH_OS" : "linux", + "DEB_HOST_GNU_CPU" : "powerpcle", + "DEB_HOST_GNU_SYSTEM" : "linux-musl", + "DEB_HOST_GNU_TYPE" : "powerpcle-linux-musl", + "DEB_HOST_MULTIARCH" : "powerpcle-linux-musl" + }, + "musl-linux-ppc64" : { + "DEB_HOST_ARCH" : "musl-linux-ppc64", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "64", + "DEB_HOST_ARCH_CPU" : "ppc64", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "musl", + "DEB_HOST_ARCH_OS" : "linux", + "DEB_HOST_GNU_CPU" : "powerpc64", + "DEB_HOST_GNU_SYSTEM" : "linux-musl", + "DEB_HOST_GNU_TYPE" : "powerpc64-linux-musl", + "DEB_HOST_MULTIARCH" : "powerpc64-linux-musl" + }, + "musl-linux-ppc64el" : { + "DEB_HOST_ARCH" : "musl-linux-ppc64el", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "64", + "DEB_HOST_ARCH_CPU" : "ppc64el", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "musl", + "DEB_HOST_ARCH_OS" : "linux", + "DEB_HOST_GNU_CPU" : "powerpc64le", + "DEB_HOST_GNU_SYSTEM" : "linux-musl", + "DEB_HOST_GNU_TYPE" : "powerpc64le-linux-musl", + "DEB_HOST_MULTIARCH" : "powerpc64le-linux-musl" + }, + "musl-linux-riscv64" : { + "DEB_HOST_ARCH" : "musl-linux-riscv64", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "64", + "DEB_HOST_ARCH_CPU" : "riscv64", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "musl", + "DEB_HOST_ARCH_OS" : "linux", + "DEB_HOST_GNU_CPU" : "riscv64", + "DEB_HOST_GNU_SYSTEM" : "linux-musl", + "DEB_HOST_GNU_TYPE" : "riscv64-linux-musl", + "DEB_HOST_MULTIARCH" : "riscv64-linux-musl" + }, + "musl-linux-s390" : { + "DEB_HOST_ARCH" : "musl-linux-s390", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "s390", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "musl", + "DEB_HOST_ARCH_OS" : "linux", + "DEB_HOST_GNU_CPU" : "s390", + "DEB_HOST_GNU_SYSTEM" : "linux-musl", + "DEB_HOST_GNU_TYPE" : "s390-linux-musl", + "DEB_HOST_MULTIARCH" : "s390-linux-musl" + }, + "musl-linux-s390x" : { + "DEB_HOST_ARCH" : "musl-linux-s390x", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "64", + "DEB_HOST_ARCH_CPU" : "s390x", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "musl", + "DEB_HOST_ARCH_OS" : "linux", + "DEB_HOST_GNU_CPU" : "s390x", + "DEB_HOST_GNU_SYSTEM" : "linux-musl", + "DEB_HOST_GNU_TYPE" : "s390x-linux-musl", + "DEB_HOST_MULTIARCH" : "s390x-linux-musl" + }, + "musl-linux-sh3" : { + "DEB_HOST_ARCH" : "musl-linux-sh3", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "sh3", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "musl", + "DEB_HOST_ARCH_OS" : "linux", + "DEB_HOST_GNU_CPU" : "sh3", + "DEB_HOST_GNU_SYSTEM" : "linux-musl", + "DEB_HOST_GNU_TYPE" : "sh3-linux-musl", + "DEB_HOST_MULTIARCH" : "sh3-linux-musl" + }, + "musl-linux-sh3eb" : { + "DEB_HOST_ARCH" : "musl-linux-sh3eb", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "sh3eb", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "musl", + "DEB_HOST_ARCH_OS" : "linux", + "DEB_HOST_GNU_CPU" : "sh3eb", + "DEB_HOST_GNU_SYSTEM" : "linux-musl", + "DEB_HOST_GNU_TYPE" : "sh3eb-linux-musl", + "DEB_HOST_MULTIARCH" : "sh3eb-linux-musl" + }, + "musl-linux-sh4" : { + "DEB_HOST_ARCH" : "musl-linux-sh4", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "sh4", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "musl", + "DEB_HOST_ARCH_OS" : "linux", + "DEB_HOST_GNU_CPU" : "sh4", + "DEB_HOST_GNU_SYSTEM" : "linux-musl", + "DEB_HOST_GNU_TYPE" : "sh4-linux-musl", + "DEB_HOST_MULTIARCH" : "sh4-linux-musl" + }, + "musl-linux-sh4eb" : { + "DEB_HOST_ARCH" : "musl-linux-sh4eb", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "sh4eb", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "musl", + "DEB_HOST_ARCH_OS" : "linux", + "DEB_HOST_GNU_CPU" : "sh4eb", + "DEB_HOST_GNU_SYSTEM" : "linux-musl", + "DEB_HOST_GNU_TYPE" : "sh4eb-linux-musl", + "DEB_HOST_MULTIARCH" : "sh4eb-linux-musl" + }, + "musl-linux-sparc" : { + "DEB_HOST_ARCH" : "musl-linux-sparc", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "sparc", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "musl", + "DEB_HOST_ARCH_OS" : "linux", + "DEB_HOST_GNU_CPU" : "sparc", + "DEB_HOST_GNU_SYSTEM" : "linux-musl", + "DEB_HOST_GNU_TYPE" : "sparc-linux-musl", + "DEB_HOST_MULTIARCH" : "sparc-linux-musl" + }, + "musl-linux-sparc64" : { + "DEB_HOST_ARCH" : "musl-linux-sparc64", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "64", + "DEB_HOST_ARCH_CPU" : "sparc64", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "musl", + "DEB_HOST_ARCH_OS" : "linux", + "DEB_HOST_GNU_CPU" : "sparc64", + "DEB_HOST_GNU_SYSTEM" : "linux-musl", + "DEB_HOST_GNU_TYPE" : "sparc64-linux-musl", + "DEB_HOST_MULTIARCH" : "sparc64-linux-musl" + }, + "musl-linux-tilegx" : { + "DEB_HOST_ARCH" : "musl-linux-tilegx", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "64", + "DEB_HOST_ARCH_CPU" : "tilegx", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "musl", + "DEB_HOST_ARCH_OS" : "linux", + "DEB_HOST_GNU_CPU" : "tilegx", + "DEB_HOST_GNU_SYSTEM" : "linux-musl", + "DEB_HOST_GNU_TYPE" : "tilegx-linux-musl", + "DEB_HOST_MULTIARCH" : "tilegx-linux-musl" + }, + "netbsd-alpha" : { + "DEB_HOST_ARCH" : "netbsd-alpha", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "64", + "DEB_HOST_ARCH_CPU" : "alpha", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "bsd", + "DEB_HOST_ARCH_OS" : "netbsd", + "DEB_HOST_GNU_CPU" : "alpha", + "DEB_HOST_GNU_SYSTEM" : "netbsd", + "DEB_HOST_GNU_TYPE" : "alpha-netbsd", + "DEB_HOST_MULTIARCH" : "alpha-netbsd" + }, + "netbsd-amd64" : { + "DEB_HOST_ARCH" : "netbsd-amd64", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "64", + "DEB_HOST_ARCH_CPU" : "amd64", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "bsd", + "DEB_HOST_ARCH_OS" : "netbsd", + "DEB_HOST_GNU_CPU" : "x86_64", + "DEB_HOST_GNU_SYSTEM" : "netbsd", + "DEB_HOST_GNU_TYPE" : "x86_64-netbsd", + "DEB_HOST_MULTIARCH" : "x86_64-netbsd" + }, + "netbsd-arc" : { + "DEB_HOST_ARCH" : "netbsd-arc", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "arc", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "bsd", + "DEB_HOST_ARCH_OS" : "netbsd", + "DEB_HOST_GNU_CPU" : "arc", + "DEB_HOST_GNU_SYSTEM" : "netbsd", + "DEB_HOST_GNU_TYPE" : "arc-netbsd", + "DEB_HOST_MULTIARCH" : "arc-netbsd" + }, + "netbsd-arm" : { + "DEB_HOST_ARCH" : "netbsd-arm", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "arm", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "bsd", + "DEB_HOST_ARCH_OS" : "netbsd", + "DEB_HOST_GNU_CPU" : "arm", + "DEB_HOST_GNU_SYSTEM" : "netbsd", + "DEB_HOST_GNU_TYPE" : "arm-netbsd", + "DEB_HOST_MULTIARCH" : "arm-netbsd" + }, + "netbsd-arm64" : { + "DEB_HOST_ARCH" : "netbsd-arm64", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "64", + "DEB_HOST_ARCH_CPU" : "arm64", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "bsd", + "DEB_HOST_ARCH_OS" : "netbsd", + "DEB_HOST_GNU_CPU" : "aarch64", + "DEB_HOST_GNU_SYSTEM" : "netbsd", + "DEB_HOST_GNU_TYPE" : "aarch64-netbsd", + "DEB_HOST_MULTIARCH" : "aarch64-netbsd" + }, + "netbsd-armeb" : { + "DEB_HOST_ARCH" : "netbsd-armeb", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "armeb", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "bsd", + "DEB_HOST_ARCH_OS" : "netbsd", + "DEB_HOST_GNU_CPU" : "armeb", + "DEB_HOST_GNU_SYSTEM" : "netbsd", + "DEB_HOST_GNU_TYPE" : "armeb-netbsd", + "DEB_HOST_MULTIARCH" : "armeb-netbsd" + }, + "netbsd-avr32" : { + "DEB_HOST_ARCH" : "netbsd-avr32", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "avr32", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "bsd", + "DEB_HOST_ARCH_OS" : "netbsd", + "DEB_HOST_GNU_CPU" : "avr32", + "DEB_HOST_GNU_SYSTEM" : "netbsd", + "DEB_HOST_GNU_TYPE" : "avr32-netbsd", + "DEB_HOST_MULTIARCH" : "avr32-netbsd" + }, + "netbsd-hppa" : { + "DEB_HOST_ARCH" : "netbsd-hppa", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "hppa", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "bsd", + "DEB_HOST_ARCH_OS" : "netbsd", + "DEB_HOST_GNU_CPU" : "hppa", + "DEB_HOST_GNU_SYSTEM" : "netbsd", + "DEB_HOST_GNU_TYPE" : "hppa-netbsd", + "DEB_HOST_MULTIARCH" : "hppa-netbsd" + }, + "netbsd-i386" : { + "DEB_HOST_ARCH" : "netbsd-i386", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "i386", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "bsd", + "DEB_HOST_ARCH_OS" : "netbsd", + "DEB_HOST_GNU_CPU" : "i686", + "DEB_HOST_GNU_SYSTEM" : "netbsd", + "DEB_HOST_GNU_TYPE" : "i686-netbsd", + "DEB_HOST_MULTIARCH" : "i386-netbsd" + }, + "netbsd-ia64" : { + "DEB_HOST_ARCH" : "netbsd-ia64", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "64", + "DEB_HOST_ARCH_CPU" : "ia64", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "bsd", + "DEB_HOST_ARCH_OS" : "netbsd", + "DEB_HOST_GNU_CPU" : "ia64", + "DEB_HOST_GNU_SYSTEM" : "netbsd", + "DEB_HOST_GNU_TYPE" : "ia64-netbsd", + "DEB_HOST_MULTIARCH" : "ia64-netbsd" + }, + "netbsd-m32r" : { + "DEB_HOST_ARCH" : "netbsd-m32r", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "m32r", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "bsd", + "DEB_HOST_ARCH_OS" : "netbsd", + "DEB_HOST_GNU_CPU" : "m32r", + "DEB_HOST_GNU_SYSTEM" : "netbsd", + "DEB_HOST_GNU_TYPE" : "m32r-netbsd", + "DEB_HOST_MULTIARCH" : "m32r-netbsd" + }, + "netbsd-m68k" : { + "DEB_HOST_ARCH" : "netbsd-m68k", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "m68k", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "bsd", + "DEB_HOST_ARCH_OS" : "netbsd", + "DEB_HOST_GNU_CPU" : "m68k", + "DEB_HOST_GNU_SYSTEM" : "netbsd", + "DEB_HOST_GNU_TYPE" : "m68k-netbsd", + "DEB_HOST_MULTIARCH" : "m68k-netbsd" + }, + "netbsd-mips" : { + "DEB_HOST_ARCH" : "netbsd-mips", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "mips", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "bsd", + "DEB_HOST_ARCH_OS" : "netbsd", + "DEB_HOST_GNU_CPU" : "mips", + "DEB_HOST_GNU_SYSTEM" : "netbsd", + "DEB_HOST_GNU_TYPE" : "mips-netbsd", + "DEB_HOST_MULTIARCH" : "mips-netbsd" + }, + "netbsd-mips64" : { + "DEB_HOST_ARCH" : "netbsd-mips64", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "64", + "DEB_HOST_ARCH_CPU" : "mips64", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "bsd", + "DEB_HOST_ARCH_OS" : "netbsd", + "DEB_HOST_GNU_CPU" : "mips64", + "DEB_HOST_GNU_SYSTEM" : "netbsd", + "DEB_HOST_GNU_TYPE" : "mips64-netbsd", + "DEB_HOST_MULTIARCH" : "mips64-netbsd" + }, + "netbsd-mips64el" : { + "DEB_HOST_ARCH" : "netbsd-mips64el", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "64", + "DEB_HOST_ARCH_CPU" : "mips64el", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "bsd", + "DEB_HOST_ARCH_OS" : "netbsd", + "DEB_HOST_GNU_CPU" : "mips64el", + "DEB_HOST_GNU_SYSTEM" : "netbsd", + "DEB_HOST_GNU_TYPE" : "mips64el-netbsd", + "DEB_HOST_MULTIARCH" : "mips64el-netbsd" + }, + "netbsd-mips64r6" : { + "DEB_HOST_ARCH" : "netbsd-mips64r6", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "64", + "DEB_HOST_ARCH_CPU" : "mips64r6", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "bsd", + "DEB_HOST_ARCH_OS" : "netbsd", + "DEB_HOST_GNU_CPU" : "mipsisa64r6", + "DEB_HOST_GNU_SYSTEM" : "netbsd", + "DEB_HOST_GNU_TYPE" : "mipsisa64r6-netbsd", + "DEB_HOST_MULTIARCH" : "mipsisa64r6-netbsd" + }, + "netbsd-mips64r6el" : { + "DEB_HOST_ARCH" : "netbsd-mips64r6el", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "64", + "DEB_HOST_ARCH_CPU" : "mips64r6el", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "bsd", + "DEB_HOST_ARCH_OS" : "netbsd", + "DEB_HOST_GNU_CPU" : "mipsisa64r6el", + "DEB_HOST_GNU_SYSTEM" : "netbsd", + "DEB_HOST_GNU_TYPE" : "mipsisa64r6el-netbsd", + "DEB_HOST_MULTIARCH" : "mipsisa64r6el-netbsd" + }, + "netbsd-mipsel" : { + "DEB_HOST_ARCH" : "netbsd-mipsel", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "mipsel", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "bsd", + "DEB_HOST_ARCH_OS" : "netbsd", + "DEB_HOST_GNU_CPU" : "mipsel", + "DEB_HOST_GNU_SYSTEM" : "netbsd", + "DEB_HOST_GNU_TYPE" : "mipsel-netbsd", + "DEB_HOST_MULTIARCH" : "mipsel-netbsd" + }, + "netbsd-mipsr6" : { + "DEB_HOST_ARCH" : "netbsd-mipsr6", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "mipsr6", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "bsd", + "DEB_HOST_ARCH_OS" : "netbsd", + "DEB_HOST_GNU_CPU" : "mipsisa32r6", + "DEB_HOST_GNU_SYSTEM" : "netbsd", + "DEB_HOST_GNU_TYPE" : "mipsisa32r6-netbsd", + "DEB_HOST_MULTIARCH" : "mipsisa32r6-netbsd" + }, + "netbsd-mipsr6el" : { + "DEB_HOST_ARCH" : "netbsd-mipsr6el", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "mipsr6el", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "bsd", + "DEB_HOST_ARCH_OS" : "netbsd", + "DEB_HOST_GNU_CPU" : "mipsisa32r6el", + "DEB_HOST_GNU_SYSTEM" : "netbsd", + "DEB_HOST_GNU_TYPE" : "mipsisa32r6el-netbsd", + "DEB_HOST_MULTIARCH" : "mipsisa32r6el-netbsd" + }, + "netbsd-nios2" : { + "DEB_HOST_ARCH" : "netbsd-nios2", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "nios2", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "bsd", + "DEB_HOST_ARCH_OS" : "netbsd", + "DEB_HOST_GNU_CPU" : "nios2", + "DEB_HOST_GNU_SYSTEM" : "netbsd", + "DEB_HOST_GNU_TYPE" : "nios2-netbsd", + "DEB_HOST_MULTIARCH" : "nios2-netbsd" + }, + "netbsd-or1k" : { + "DEB_HOST_ARCH" : "netbsd-or1k", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "or1k", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "bsd", + "DEB_HOST_ARCH_OS" : "netbsd", + "DEB_HOST_GNU_CPU" : "or1k", + "DEB_HOST_GNU_SYSTEM" : "netbsd", + "DEB_HOST_GNU_TYPE" : "or1k-netbsd", + "DEB_HOST_MULTIARCH" : "or1k-netbsd" + }, + "netbsd-powerpc" : { + "DEB_HOST_ARCH" : "netbsd-powerpc", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "powerpc", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "bsd", + "DEB_HOST_ARCH_OS" : "netbsd", + "DEB_HOST_GNU_CPU" : "powerpc", + "DEB_HOST_GNU_SYSTEM" : "netbsd", + "DEB_HOST_GNU_TYPE" : "powerpc-netbsd", + "DEB_HOST_MULTIARCH" : "powerpc-netbsd" + }, + "netbsd-powerpcel" : { + "DEB_HOST_ARCH" : "netbsd-powerpcel", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "powerpcel", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "bsd", + "DEB_HOST_ARCH_OS" : "netbsd", + "DEB_HOST_GNU_CPU" : "powerpcle", + "DEB_HOST_GNU_SYSTEM" : "netbsd", + "DEB_HOST_GNU_TYPE" : "powerpcle-netbsd", + "DEB_HOST_MULTIARCH" : "powerpcle-netbsd" + }, + "netbsd-ppc64" : { + "DEB_HOST_ARCH" : "netbsd-ppc64", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "64", + "DEB_HOST_ARCH_CPU" : "ppc64", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "bsd", + "DEB_HOST_ARCH_OS" : "netbsd", + "DEB_HOST_GNU_CPU" : "powerpc64", + "DEB_HOST_GNU_SYSTEM" : "netbsd", + "DEB_HOST_GNU_TYPE" : "powerpc64-netbsd", + "DEB_HOST_MULTIARCH" : "powerpc64-netbsd" + }, + "netbsd-ppc64el" : { + "DEB_HOST_ARCH" : "netbsd-ppc64el", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "64", + "DEB_HOST_ARCH_CPU" : "ppc64el", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "bsd", + "DEB_HOST_ARCH_OS" : "netbsd", + "DEB_HOST_GNU_CPU" : "powerpc64le", + "DEB_HOST_GNU_SYSTEM" : "netbsd", + "DEB_HOST_GNU_TYPE" : "powerpc64le-netbsd", + "DEB_HOST_MULTIARCH" : "powerpc64le-netbsd" + }, + "netbsd-riscv64" : { + "DEB_HOST_ARCH" : "netbsd-riscv64", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "64", + "DEB_HOST_ARCH_CPU" : "riscv64", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "bsd", + "DEB_HOST_ARCH_OS" : "netbsd", + "DEB_HOST_GNU_CPU" : "riscv64", + "DEB_HOST_GNU_SYSTEM" : "netbsd", + "DEB_HOST_GNU_TYPE" : "riscv64-netbsd", + "DEB_HOST_MULTIARCH" : "riscv64-netbsd" + }, + "netbsd-s390" : { + "DEB_HOST_ARCH" : "netbsd-s390", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "s390", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "bsd", + "DEB_HOST_ARCH_OS" : "netbsd", + "DEB_HOST_GNU_CPU" : "s390", + "DEB_HOST_GNU_SYSTEM" : "netbsd", + "DEB_HOST_GNU_TYPE" : "s390-netbsd", + "DEB_HOST_MULTIARCH" : "s390-netbsd" + }, + "netbsd-s390x" : { + "DEB_HOST_ARCH" : "netbsd-s390x", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "64", + "DEB_HOST_ARCH_CPU" : "s390x", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "bsd", + "DEB_HOST_ARCH_OS" : "netbsd", + "DEB_HOST_GNU_CPU" : "s390x", + "DEB_HOST_GNU_SYSTEM" : "netbsd", + "DEB_HOST_GNU_TYPE" : "s390x-netbsd", + "DEB_HOST_MULTIARCH" : "s390x-netbsd" + }, + "netbsd-sh3" : { + "DEB_HOST_ARCH" : "netbsd-sh3", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "sh3", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "bsd", + "DEB_HOST_ARCH_OS" : "netbsd", + "DEB_HOST_GNU_CPU" : "sh3", + "DEB_HOST_GNU_SYSTEM" : "netbsd", + "DEB_HOST_GNU_TYPE" : "sh3-netbsd", + "DEB_HOST_MULTIARCH" : "sh3-netbsd" + }, + "netbsd-sh3eb" : { + "DEB_HOST_ARCH" : "netbsd-sh3eb", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "sh3eb", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "bsd", + "DEB_HOST_ARCH_OS" : "netbsd", + "DEB_HOST_GNU_CPU" : "sh3eb", + "DEB_HOST_GNU_SYSTEM" : "netbsd", + "DEB_HOST_GNU_TYPE" : "sh3eb-netbsd", + "DEB_HOST_MULTIARCH" : "sh3eb-netbsd" + }, + "netbsd-sh4" : { + "DEB_HOST_ARCH" : "netbsd-sh4", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "sh4", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "bsd", + "DEB_HOST_ARCH_OS" : "netbsd", + "DEB_HOST_GNU_CPU" : "sh4", + "DEB_HOST_GNU_SYSTEM" : "netbsd", + "DEB_HOST_GNU_TYPE" : "sh4-netbsd", + "DEB_HOST_MULTIARCH" : "sh4-netbsd" + }, + "netbsd-sh4eb" : { + "DEB_HOST_ARCH" : "netbsd-sh4eb", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "sh4eb", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "bsd", + "DEB_HOST_ARCH_OS" : "netbsd", + "DEB_HOST_GNU_CPU" : "sh4eb", + "DEB_HOST_GNU_SYSTEM" : "netbsd", + "DEB_HOST_GNU_TYPE" : "sh4eb-netbsd", + "DEB_HOST_MULTIARCH" : "sh4eb-netbsd" + }, + "netbsd-sparc" : { + "DEB_HOST_ARCH" : "netbsd-sparc", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "sparc", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "bsd", + "DEB_HOST_ARCH_OS" : "netbsd", + "DEB_HOST_GNU_CPU" : "sparc", + "DEB_HOST_GNU_SYSTEM" : "netbsd", + "DEB_HOST_GNU_TYPE" : "sparc-netbsd", + "DEB_HOST_MULTIARCH" : "sparc-netbsd" + }, + "netbsd-sparc64" : { + "DEB_HOST_ARCH" : "netbsd-sparc64", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "64", + "DEB_HOST_ARCH_CPU" : "sparc64", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "bsd", + "DEB_HOST_ARCH_OS" : "netbsd", + "DEB_HOST_GNU_CPU" : "sparc64", + "DEB_HOST_GNU_SYSTEM" : "netbsd", + "DEB_HOST_GNU_TYPE" : "sparc64-netbsd", + "DEB_HOST_MULTIARCH" : "sparc64-netbsd" + }, + "netbsd-tilegx" : { + "DEB_HOST_ARCH" : "netbsd-tilegx", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "64", + "DEB_HOST_ARCH_CPU" : "tilegx", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "bsd", + "DEB_HOST_ARCH_OS" : "netbsd", + "DEB_HOST_GNU_CPU" : "tilegx", + "DEB_HOST_GNU_SYSTEM" : "netbsd", + "DEB_HOST_GNU_TYPE" : "tilegx-netbsd", + "DEB_HOST_MULTIARCH" : "tilegx-netbsd" + }, + "nios2" : { + "DEB_HOST_ARCH" : "nios2", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "nios2", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "gnu", + "DEB_HOST_ARCH_OS" : "linux", + "DEB_HOST_GNU_CPU" : "nios2", + "DEB_HOST_GNU_SYSTEM" : "linux-gnu", + "DEB_HOST_GNU_TYPE" : "nios2-linux-gnu", + "DEB_HOST_MULTIARCH" : "nios2-linux-gnu" + }, + "openbsd-alpha" : { + "DEB_HOST_ARCH" : "openbsd-alpha", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "64", + "DEB_HOST_ARCH_CPU" : "alpha", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "bsd", + "DEB_HOST_ARCH_OS" : "openbsd", + "DEB_HOST_GNU_CPU" : "alpha", + "DEB_HOST_GNU_SYSTEM" : "openbsd", + "DEB_HOST_GNU_TYPE" : "alpha-openbsd", + "DEB_HOST_MULTIARCH" : "alpha-openbsd" + }, + "openbsd-amd64" : { + "DEB_HOST_ARCH" : "openbsd-amd64", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "64", + "DEB_HOST_ARCH_CPU" : "amd64", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "bsd", + "DEB_HOST_ARCH_OS" : "openbsd", + "DEB_HOST_GNU_CPU" : "x86_64", + "DEB_HOST_GNU_SYSTEM" : "openbsd", + "DEB_HOST_GNU_TYPE" : "x86_64-openbsd", + "DEB_HOST_MULTIARCH" : "x86_64-openbsd" + }, + "openbsd-arc" : { + "DEB_HOST_ARCH" : "openbsd-arc", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "arc", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "bsd", + "DEB_HOST_ARCH_OS" : "openbsd", + "DEB_HOST_GNU_CPU" : "arc", + "DEB_HOST_GNU_SYSTEM" : "openbsd", + "DEB_HOST_GNU_TYPE" : "arc-openbsd", + "DEB_HOST_MULTIARCH" : "arc-openbsd" + }, + "openbsd-arm" : { + "DEB_HOST_ARCH" : "openbsd-arm", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "arm", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "bsd", + "DEB_HOST_ARCH_OS" : "openbsd", + "DEB_HOST_GNU_CPU" : "arm", + "DEB_HOST_GNU_SYSTEM" : "openbsd", + "DEB_HOST_GNU_TYPE" : "arm-openbsd", + "DEB_HOST_MULTIARCH" : "arm-openbsd" + }, + "openbsd-arm64" : { + "DEB_HOST_ARCH" : "openbsd-arm64", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "64", + "DEB_HOST_ARCH_CPU" : "arm64", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "bsd", + "DEB_HOST_ARCH_OS" : "openbsd", + "DEB_HOST_GNU_CPU" : "aarch64", + "DEB_HOST_GNU_SYSTEM" : "openbsd", + "DEB_HOST_GNU_TYPE" : "aarch64-openbsd", + "DEB_HOST_MULTIARCH" : "aarch64-openbsd" + }, + "openbsd-armeb" : { + "DEB_HOST_ARCH" : "openbsd-armeb", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "armeb", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "bsd", + "DEB_HOST_ARCH_OS" : "openbsd", + "DEB_HOST_GNU_CPU" : "armeb", + "DEB_HOST_GNU_SYSTEM" : "openbsd", + "DEB_HOST_GNU_TYPE" : "armeb-openbsd", + "DEB_HOST_MULTIARCH" : "armeb-openbsd" + }, + "openbsd-avr32" : { + "DEB_HOST_ARCH" : "openbsd-avr32", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "avr32", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "bsd", + "DEB_HOST_ARCH_OS" : "openbsd", + "DEB_HOST_GNU_CPU" : "avr32", + "DEB_HOST_GNU_SYSTEM" : "openbsd", + "DEB_HOST_GNU_TYPE" : "avr32-openbsd", + "DEB_HOST_MULTIARCH" : "avr32-openbsd" + }, + "openbsd-hppa" : { + "DEB_HOST_ARCH" : "openbsd-hppa", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "hppa", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "bsd", + "DEB_HOST_ARCH_OS" : "openbsd", + "DEB_HOST_GNU_CPU" : "hppa", + "DEB_HOST_GNU_SYSTEM" : "openbsd", + "DEB_HOST_GNU_TYPE" : "hppa-openbsd", + "DEB_HOST_MULTIARCH" : "hppa-openbsd" + }, + "openbsd-i386" : { + "DEB_HOST_ARCH" : "openbsd-i386", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "i386", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "bsd", + "DEB_HOST_ARCH_OS" : "openbsd", + "DEB_HOST_GNU_CPU" : "i686", + "DEB_HOST_GNU_SYSTEM" : "openbsd", + "DEB_HOST_GNU_TYPE" : "i686-openbsd", + "DEB_HOST_MULTIARCH" : "i386-openbsd" + }, + "openbsd-ia64" : { + "DEB_HOST_ARCH" : "openbsd-ia64", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "64", + "DEB_HOST_ARCH_CPU" : "ia64", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "bsd", + "DEB_HOST_ARCH_OS" : "openbsd", + "DEB_HOST_GNU_CPU" : "ia64", + "DEB_HOST_GNU_SYSTEM" : "openbsd", + "DEB_HOST_GNU_TYPE" : "ia64-openbsd", + "DEB_HOST_MULTIARCH" : "ia64-openbsd" + }, + "openbsd-m32r" : { + "DEB_HOST_ARCH" : "openbsd-m32r", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "m32r", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "bsd", + "DEB_HOST_ARCH_OS" : "openbsd", + "DEB_HOST_GNU_CPU" : "m32r", + "DEB_HOST_GNU_SYSTEM" : "openbsd", + "DEB_HOST_GNU_TYPE" : "m32r-openbsd", + "DEB_HOST_MULTIARCH" : "m32r-openbsd" + }, + "openbsd-m68k" : { + "DEB_HOST_ARCH" : "openbsd-m68k", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "m68k", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "bsd", + "DEB_HOST_ARCH_OS" : "openbsd", + "DEB_HOST_GNU_CPU" : "m68k", + "DEB_HOST_GNU_SYSTEM" : "openbsd", + "DEB_HOST_GNU_TYPE" : "m68k-openbsd", + "DEB_HOST_MULTIARCH" : "m68k-openbsd" + }, + "openbsd-mips" : { + "DEB_HOST_ARCH" : "openbsd-mips", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "mips", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "bsd", + "DEB_HOST_ARCH_OS" : "openbsd", + "DEB_HOST_GNU_CPU" : "mips", + "DEB_HOST_GNU_SYSTEM" : "openbsd", + "DEB_HOST_GNU_TYPE" : "mips-openbsd", + "DEB_HOST_MULTIARCH" : "mips-openbsd" + }, + "openbsd-mips64" : { + "DEB_HOST_ARCH" : "openbsd-mips64", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "64", + "DEB_HOST_ARCH_CPU" : "mips64", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "bsd", + "DEB_HOST_ARCH_OS" : "openbsd", + "DEB_HOST_GNU_CPU" : "mips64", + "DEB_HOST_GNU_SYSTEM" : "openbsd", + "DEB_HOST_GNU_TYPE" : "mips64-openbsd", + "DEB_HOST_MULTIARCH" : "mips64-openbsd" + }, + "openbsd-mips64el" : { + "DEB_HOST_ARCH" : "openbsd-mips64el", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "64", + "DEB_HOST_ARCH_CPU" : "mips64el", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "bsd", + "DEB_HOST_ARCH_OS" : "openbsd", + "DEB_HOST_GNU_CPU" : "mips64el", + "DEB_HOST_GNU_SYSTEM" : "openbsd", + "DEB_HOST_GNU_TYPE" : "mips64el-openbsd", + "DEB_HOST_MULTIARCH" : "mips64el-openbsd" + }, + "openbsd-mips64r6" : { + "DEB_HOST_ARCH" : "openbsd-mips64r6", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "64", + "DEB_HOST_ARCH_CPU" : "mips64r6", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "bsd", + "DEB_HOST_ARCH_OS" : "openbsd", + "DEB_HOST_GNU_CPU" : "mipsisa64r6", + "DEB_HOST_GNU_SYSTEM" : "openbsd", + "DEB_HOST_GNU_TYPE" : "mipsisa64r6-openbsd", + "DEB_HOST_MULTIARCH" : "mipsisa64r6-openbsd" + }, + "openbsd-mips64r6el" : { + "DEB_HOST_ARCH" : "openbsd-mips64r6el", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "64", + "DEB_HOST_ARCH_CPU" : "mips64r6el", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "bsd", + "DEB_HOST_ARCH_OS" : "openbsd", + "DEB_HOST_GNU_CPU" : "mipsisa64r6el", + "DEB_HOST_GNU_SYSTEM" : "openbsd", + "DEB_HOST_GNU_TYPE" : "mipsisa64r6el-openbsd", + "DEB_HOST_MULTIARCH" : "mipsisa64r6el-openbsd" + }, + "openbsd-mipsel" : { + "DEB_HOST_ARCH" : "openbsd-mipsel", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "mipsel", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "bsd", + "DEB_HOST_ARCH_OS" : "openbsd", + "DEB_HOST_GNU_CPU" : "mipsel", + "DEB_HOST_GNU_SYSTEM" : "openbsd", + "DEB_HOST_GNU_TYPE" : "mipsel-openbsd", + "DEB_HOST_MULTIARCH" : "mipsel-openbsd" + }, + "openbsd-mipsr6" : { + "DEB_HOST_ARCH" : "openbsd-mipsr6", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "mipsr6", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "bsd", + "DEB_HOST_ARCH_OS" : "openbsd", + "DEB_HOST_GNU_CPU" : "mipsisa32r6", + "DEB_HOST_GNU_SYSTEM" : "openbsd", + "DEB_HOST_GNU_TYPE" : "mipsisa32r6-openbsd", + "DEB_HOST_MULTIARCH" : "mipsisa32r6-openbsd" + }, + "openbsd-mipsr6el" : { + "DEB_HOST_ARCH" : "openbsd-mipsr6el", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "mipsr6el", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "bsd", + "DEB_HOST_ARCH_OS" : "openbsd", + "DEB_HOST_GNU_CPU" : "mipsisa32r6el", + "DEB_HOST_GNU_SYSTEM" : "openbsd", + "DEB_HOST_GNU_TYPE" : "mipsisa32r6el-openbsd", + "DEB_HOST_MULTIARCH" : "mipsisa32r6el-openbsd" + }, + "openbsd-nios2" : { + "DEB_HOST_ARCH" : "openbsd-nios2", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "nios2", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "bsd", + "DEB_HOST_ARCH_OS" : "openbsd", + "DEB_HOST_GNU_CPU" : "nios2", + "DEB_HOST_GNU_SYSTEM" : "openbsd", + "DEB_HOST_GNU_TYPE" : "nios2-openbsd", + "DEB_HOST_MULTIARCH" : "nios2-openbsd" + }, + "openbsd-or1k" : { + "DEB_HOST_ARCH" : "openbsd-or1k", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "or1k", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "bsd", + "DEB_HOST_ARCH_OS" : "openbsd", + "DEB_HOST_GNU_CPU" : "or1k", + "DEB_HOST_GNU_SYSTEM" : "openbsd", + "DEB_HOST_GNU_TYPE" : "or1k-openbsd", + "DEB_HOST_MULTIARCH" : "or1k-openbsd" + }, + "openbsd-powerpc" : { + "DEB_HOST_ARCH" : "openbsd-powerpc", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "powerpc", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "bsd", + "DEB_HOST_ARCH_OS" : "openbsd", + "DEB_HOST_GNU_CPU" : "powerpc", + "DEB_HOST_GNU_SYSTEM" : "openbsd", + "DEB_HOST_GNU_TYPE" : "powerpc-openbsd", + "DEB_HOST_MULTIARCH" : "powerpc-openbsd" + }, + "openbsd-powerpcel" : { + "DEB_HOST_ARCH" : "openbsd-powerpcel", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "powerpcel", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "bsd", + "DEB_HOST_ARCH_OS" : "openbsd", + "DEB_HOST_GNU_CPU" : "powerpcle", + "DEB_HOST_GNU_SYSTEM" : "openbsd", + "DEB_HOST_GNU_TYPE" : "powerpcle-openbsd", + "DEB_HOST_MULTIARCH" : "powerpcle-openbsd" + }, + "openbsd-ppc64" : { + "DEB_HOST_ARCH" : "openbsd-ppc64", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "64", + "DEB_HOST_ARCH_CPU" : "ppc64", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "bsd", + "DEB_HOST_ARCH_OS" : "openbsd", + "DEB_HOST_GNU_CPU" : "powerpc64", + "DEB_HOST_GNU_SYSTEM" : "openbsd", + "DEB_HOST_GNU_TYPE" : "powerpc64-openbsd", + "DEB_HOST_MULTIARCH" : "powerpc64-openbsd" + }, + "openbsd-ppc64el" : { + "DEB_HOST_ARCH" : "openbsd-ppc64el", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "64", + "DEB_HOST_ARCH_CPU" : "ppc64el", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "bsd", + "DEB_HOST_ARCH_OS" : "openbsd", + "DEB_HOST_GNU_CPU" : "powerpc64le", + "DEB_HOST_GNU_SYSTEM" : "openbsd", + "DEB_HOST_GNU_TYPE" : "powerpc64le-openbsd", + "DEB_HOST_MULTIARCH" : "powerpc64le-openbsd" + }, + "openbsd-riscv64" : { + "DEB_HOST_ARCH" : "openbsd-riscv64", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "64", + "DEB_HOST_ARCH_CPU" : "riscv64", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "bsd", + "DEB_HOST_ARCH_OS" : "openbsd", + "DEB_HOST_GNU_CPU" : "riscv64", + "DEB_HOST_GNU_SYSTEM" : "openbsd", + "DEB_HOST_GNU_TYPE" : "riscv64-openbsd", + "DEB_HOST_MULTIARCH" : "riscv64-openbsd" + }, + "openbsd-s390" : { + "DEB_HOST_ARCH" : "openbsd-s390", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "s390", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "bsd", + "DEB_HOST_ARCH_OS" : "openbsd", + "DEB_HOST_GNU_CPU" : "s390", + "DEB_HOST_GNU_SYSTEM" : "openbsd", + "DEB_HOST_GNU_TYPE" : "s390-openbsd", + "DEB_HOST_MULTIARCH" : "s390-openbsd" + }, + "openbsd-s390x" : { + "DEB_HOST_ARCH" : "openbsd-s390x", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "64", + "DEB_HOST_ARCH_CPU" : "s390x", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "bsd", + "DEB_HOST_ARCH_OS" : "openbsd", + "DEB_HOST_GNU_CPU" : "s390x", + "DEB_HOST_GNU_SYSTEM" : "openbsd", + "DEB_HOST_GNU_TYPE" : "s390x-openbsd", + "DEB_HOST_MULTIARCH" : "s390x-openbsd" + }, + "openbsd-sh3" : { + "DEB_HOST_ARCH" : "openbsd-sh3", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "sh3", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "bsd", + "DEB_HOST_ARCH_OS" : "openbsd", + "DEB_HOST_GNU_CPU" : "sh3", + "DEB_HOST_GNU_SYSTEM" : "openbsd", + "DEB_HOST_GNU_TYPE" : "sh3-openbsd", + "DEB_HOST_MULTIARCH" : "sh3-openbsd" + }, + "openbsd-sh3eb" : { + "DEB_HOST_ARCH" : "openbsd-sh3eb", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "sh3eb", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "bsd", + "DEB_HOST_ARCH_OS" : "openbsd", + "DEB_HOST_GNU_CPU" : "sh3eb", + "DEB_HOST_GNU_SYSTEM" : "openbsd", + "DEB_HOST_GNU_TYPE" : "sh3eb-openbsd", + "DEB_HOST_MULTIARCH" : "sh3eb-openbsd" + }, + "openbsd-sh4" : { + "DEB_HOST_ARCH" : "openbsd-sh4", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "sh4", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "bsd", + "DEB_HOST_ARCH_OS" : "openbsd", + "DEB_HOST_GNU_CPU" : "sh4", + "DEB_HOST_GNU_SYSTEM" : "openbsd", + "DEB_HOST_GNU_TYPE" : "sh4-openbsd", + "DEB_HOST_MULTIARCH" : "sh4-openbsd" + }, + "openbsd-sh4eb" : { + "DEB_HOST_ARCH" : "openbsd-sh4eb", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "sh4eb", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "bsd", + "DEB_HOST_ARCH_OS" : "openbsd", + "DEB_HOST_GNU_CPU" : "sh4eb", + "DEB_HOST_GNU_SYSTEM" : "openbsd", + "DEB_HOST_GNU_TYPE" : "sh4eb-openbsd", + "DEB_HOST_MULTIARCH" : "sh4eb-openbsd" + }, + "openbsd-sparc" : { + "DEB_HOST_ARCH" : "openbsd-sparc", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "sparc", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "bsd", + "DEB_HOST_ARCH_OS" : "openbsd", + "DEB_HOST_GNU_CPU" : "sparc", + "DEB_HOST_GNU_SYSTEM" : "openbsd", + "DEB_HOST_GNU_TYPE" : "sparc-openbsd", + "DEB_HOST_MULTIARCH" : "sparc-openbsd" + }, + "openbsd-sparc64" : { + "DEB_HOST_ARCH" : "openbsd-sparc64", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "64", + "DEB_HOST_ARCH_CPU" : "sparc64", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "bsd", + "DEB_HOST_ARCH_OS" : "openbsd", + "DEB_HOST_GNU_CPU" : "sparc64", + "DEB_HOST_GNU_SYSTEM" : "openbsd", + "DEB_HOST_GNU_TYPE" : "sparc64-openbsd", + "DEB_HOST_MULTIARCH" : "sparc64-openbsd" + }, + "openbsd-tilegx" : { + "DEB_HOST_ARCH" : "openbsd-tilegx", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "64", + "DEB_HOST_ARCH_CPU" : "tilegx", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "bsd", + "DEB_HOST_ARCH_OS" : "openbsd", + "DEB_HOST_GNU_CPU" : "tilegx", + "DEB_HOST_GNU_SYSTEM" : "openbsd", + "DEB_HOST_GNU_TYPE" : "tilegx-openbsd", + "DEB_HOST_MULTIARCH" : "tilegx-openbsd" + }, + "or1k" : { + "DEB_HOST_ARCH" : "or1k", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "or1k", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "gnu", + "DEB_HOST_ARCH_OS" : "linux", + "DEB_HOST_GNU_CPU" : "or1k", + "DEB_HOST_GNU_SYSTEM" : "linux-gnu", + "DEB_HOST_GNU_TYPE" : "or1k-linux-gnu", + "DEB_HOST_MULTIARCH" : "or1k-linux-gnu" + }, + "powerpc" : { + "DEB_HOST_ARCH" : "powerpc", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "powerpc", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "gnu", + "DEB_HOST_ARCH_OS" : "linux", + "DEB_HOST_GNU_CPU" : "powerpc", + "DEB_HOST_GNU_SYSTEM" : "linux-gnu", + "DEB_HOST_GNU_TYPE" : "powerpc-linux-gnu", + "DEB_HOST_MULTIARCH" : "powerpc-linux-gnu" + }, + "powerpcel" : { + "DEB_HOST_ARCH" : "powerpcel", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "powerpcel", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "gnu", + "DEB_HOST_ARCH_OS" : "linux", + "DEB_HOST_GNU_CPU" : "powerpcle", + "DEB_HOST_GNU_SYSTEM" : "linux-gnu", + "DEB_HOST_GNU_TYPE" : "powerpcle-linux-gnu", + "DEB_HOST_MULTIARCH" : "powerpcle-linux-gnu" + }, + "powerpcspe" : { + "DEB_HOST_ARCH" : "powerpcspe", + "DEB_HOST_ARCH_ABI" : "spe", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "powerpc", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "gnu", + "DEB_HOST_ARCH_OS" : "linux", + "DEB_HOST_GNU_CPU" : "powerpc", + "DEB_HOST_GNU_SYSTEM" : "linux-gnuspe", + "DEB_HOST_GNU_TYPE" : "powerpc-linux-gnuspe", + "DEB_HOST_MULTIARCH" : "powerpc-linux-gnuspe" + }, + "ppc64" : { + "DEB_HOST_ARCH" : "ppc64", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "64", + "DEB_HOST_ARCH_CPU" : "ppc64", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "gnu", + "DEB_HOST_ARCH_OS" : "linux", + "DEB_HOST_GNU_CPU" : "powerpc64", + "DEB_HOST_GNU_SYSTEM" : "linux-gnu", + "DEB_HOST_GNU_TYPE" : "powerpc64-linux-gnu", + "DEB_HOST_MULTIARCH" : "powerpc64-linux-gnu" + }, + "ppc64el" : { + "DEB_HOST_ARCH" : "ppc64el", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "64", + "DEB_HOST_ARCH_CPU" : "ppc64el", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "gnu", + "DEB_HOST_ARCH_OS" : "linux", + "DEB_HOST_GNU_CPU" : "powerpc64le", + "DEB_HOST_GNU_SYSTEM" : "linux-gnu", + "DEB_HOST_GNU_TYPE" : "powerpc64le-linux-gnu", + "DEB_HOST_MULTIARCH" : "powerpc64le-linux-gnu" + }, + "riscv64" : { + "DEB_HOST_ARCH" : "riscv64", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "64", + "DEB_HOST_ARCH_CPU" : "riscv64", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "gnu", + "DEB_HOST_ARCH_OS" : "linux", + "DEB_HOST_GNU_CPU" : "riscv64", + "DEB_HOST_GNU_SYSTEM" : "linux-gnu", + "DEB_HOST_GNU_TYPE" : "riscv64-linux-gnu", + "DEB_HOST_MULTIARCH" : "riscv64-linux-gnu" + }, + "s390" : { + "DEB_HOST_ARCH" : "s390", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "s390", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "gnu", + "DEB_HOST_ARCH_OS" : "linux", + "DEB_HOST_GNU_CPU" : "s390", + "DEB_HOST_GNU_SYSTEM" : "linux-gnu", + "DEB_HOST_GNU_TYPE" : "s390-linux-gnu", + "DEB_HOST_MULTIARCH" : "s390-linux-gnu" + }, + "s390x" : { + "DEB_HOST_ARCH" : "s390x", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "64", + "DEB_HOST_ARCH_CPU" : "s390x", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "gnu", + "DEB_HOST_ARCH_OS" : "linux", + "DEB_HOST_GNU_CPU" : "s390x", + "DEB_HOST_GNU_SYSTEM" : "linux-gnu", + "DEB_HOST_GNU_TYPE" : "s390x-linux-gnu", + "DEB_HOST_MULTIARCH" : "s390x-linux-gnu" + }, + "sh3" : { + "DEB_HOST_ARCH" : "sh3", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "sh3", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "gnu", + "DEB_HOST_ARCH_OS" : "linux", + "DEB_HOST_GNU_CPU" : "sh3", + "DEB_HOST_GNU_SYSTEM" : "linux-gnu", + "DEB_HOST_GNU_TYPE" : "sh3-linux-gnu", + "DEB_HOST_MULTIARCH" : "sh3-linux-gnu" + }, + "sh3eb" : { + "DEB_HOST_ARCH" : "sh3eb", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "sh3eb", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "gnu", + "DEB_HOST_ARCH_OS" : "linux", + "DEB_HOST_GNU_CPU" : "sh3eb", + "DEB_HOST_GNU_SYSTEM" : "linux-gnu", + "DEB_HOST_GNU_TYPE" : "sh3eb-linux-gnu", + "DEB_HOST_MULTIARCH" : "sh3eb-linux-gnu" + }, + "sh4" : { + "DEB_HOST_ARCH" : "sh4", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "sh4", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "gnu", + "DEB_HOST_ARCH_OS" : "linux", + "DEB_HOST_GNU_CPU" : "sh4", + "DEB_HOST_GNU_SYSTEM" : "linux-gnu", + "DEB_HOST_GNU_TYPE" : "sh4-linux-gnu", + "DEB_HOST_MULTIARCH" : "sh4-linux-gnu" + }, + "sh4eb" : { + "DEB_HOST_ARCH" : "sh4eb", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "sh4eb", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "gnu", + "DEB_HOST_ARCH_OS" : "linux", + "DEB_HOST_GNU_CPU" : "sh4eb", + "DEB_HOST_GNU_SYSTEM" : "linux-gnu", + "DEB_HOST_GNU_TYPE" : "sh4eb-linux-gnu", + "DEB_HOST_MULTIARCH" : "sh4eb-linux-gnu" + }, + "solaris-alpha" : { + "DEB_HOST_ARCH" : "solaris-alpha", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "64", + "DEB_HOST_ARCH_CPU" : "alpha", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "sysv", + "DEB_HOST_ARCH_OS" : "solaris", + "DEB_HOST_GNU_CPU" : "alpha", + "DEB_HOST_GNU_SYSTEM" : "solaris", + "DEB_HOST_GNU_TYPE" : "alpha-solaris", + "DEB_HOST_MULTIARCH" : "alpha-solaris" + }, + "solaris-amd64" : { + "DEB_HOST_ARCH" : "solaris-amd64", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "64", + "DEB_HOST_ARCH_CPU" : "amd64", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "sysv", + "DEB_HOST_ARCH_OS" : "solaris", + "DEB_HOST_GNU_CPU" : "x86_64", + "DEB_HOST_GNU_SYSTEM" : "solaris", + "DEB_HOST_GNU_TYPE" : "x86_64-solaris", + "DEB_HOST_MULTIARCH" : "x86_64-solaris" + }, + "solaris-arc" : { + "DEB_HOST_ARCH" : "solaris-arc", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "arc", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "sysv", + "DEB_HOST_ARCH_OS" : "solaris", + "DEB_HOST_GNU_CPU" : "arc", + "DEB_HOST_GNU_SYSTEM" : "solaris", + "DEB_HOST_GNU_TYPE" : "arc-solaris", + "DEB_HOST_MULTIARCH" : "arc-solaris" + }, + "solaris-arm" : { + "DEB_HOST_ARCH" : "solaris-arm", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "arm", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "sysv", + "DEB_HOST_ARCH_OS" : "solaris", + "DEB_HOST_GNU_CPU" : "arm", + "DEB_HOST_GNU_SYSTEM" : "solaris", + "DEB_HOST_GNU_TYPE" : "arm-solaris", + "DEB_HOST_MULTIARCH" : "arm-solaris" + }, + "solaris-arm64" : { + "DEB_HOST_ARCH" : "solaris-arm64", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "64", + "DEB_HOST_ARCH_CPU" : "arm64", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "sysv", + "DEB_HOST_ARCH_OS" : "solaris", + "DEB_HOST_GNU_CPU" : "aarch64", + "DEB_HOST_GNU_SYSTEM" : "solaris", + "DEB_HOST_GNU_TYPE" : "aarch64-solaris", + "DEB_HOST_MULTIARCH" : "aarch64-solaris" + }, + "solaris-armeb" : { + "DEB_HOST_ARCH" : "solaris-armeb", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "armeb", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "sysv", + "DEB_HOST_ARCH_OS" : "solaris", + "DEB_HOST_GNU_CPU" : "armeb", + "DEB_HOST_GNU_SYSTEM" : "solaris", + "DEB_HOST_GNU_TYPE" : "armeb-solaris", + "DEB_HOST_MULTIARCH" : "armeb-solaris" + }, + "solaris-avr32" : { + "DEB_HOST_ARCH" : "solaris-avr32", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "avr32", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "sysv", + "DEB_HOST_ARCH_OS" : "solaris", + "DEB_HOST_GNU_CPU" : "avr32", + "DEB_HOST_GNU_SYSTEM" : "solaris", + "DEB_HOST_GNU_TYPE" : "avr32-solaris", + "DEB_HOST_MULTIARCH" : "avr32-solaris" + }, + "solaris-hppa" : { + "DEB_HOST_ARCH" : "solaris-hppa", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "hppa", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "sysv", + "DEB_HOST_ARCH_OS" : "solaris", + "DEB_HOST_GNU_CPU" : "hppa", + "DEB_HOST_GNU_SYSTEM" : "solaris", + "DEB_HOST_GNU_TYPE" : "hppa-solaris", + "DEB_HOST_MULTIARCH" : "hppa-solaris" + }, + "solaris-i386" : { + "DEB_HOST_ARCH" : "solaris-i386", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "i386", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "sysv", + "DEB_HOST_ARCH_OS" : "solaris", + "DEB_HOST_GNU_CPU" : "i686", + "DEB_HOST_GNU_SYSTEM" : "solaris", + "DEB_HOST_GNU_TYPE" : "i686-solaris", + "DEB_HOST_MULTIARCH" : "i386-solaris" + }, + "solaris-ia64" : { + "DEB_HOST_ARCH" : "solaris-ia64", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "64", + "DEB_HOST_ARCH_CPU" : "ia64", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "sysv", + "DEB_HOST_ARCH_OS" : "solaris", + "DEB_HOST_GNU_CPU" : "ia64", + "DEB_HOST_GNU_SYSTEM" : "solaris", + "DEB_HOST_GNU_TYPE" : "ia64-solaris", + "DEB_HOST_MULTIARCH" : "ia64-solaris" + }, + "solaris-m32r" : { + "DEB_HOST_ARCH" : "solaris-m32r", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "m32r", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "sysv", + "DEB_HOST_ARCH_OS" : "solaris", + "DEB_HOST_GNU_CPU" : "m32r", + "DEB_HOST_GNU_SYSTEM" : "solaris", + "DEB_HOST_GNU_TYPE" : "m32r-solaris", + "DEB_HOST_MULTIARCH" : "m32r-solaris" + }, + "solaris-m68k" : { + "DEB_HOST_ARCH" : "solaris-m68k", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "m68k", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "sysv", + "DEB_HOST_ARCH_OS" : "solaris", + "DEB_HOST_GNU_CPU" : "m68k", + "DEB_HOST_GNU_SYSTEM" : "solaris", + "DEB_HOST_GNU_TYPE" : "m68k-solaris", + "DEB_HOST_MULTIARCH" : "m68k-solaris" + }, + "solaris-mips" : { + "DEB_HOST_ARCH" : "solaris-mips", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "mips", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "sysv", + "DEB_HOST_ARCH_OS" : "solaris", + "DEB_HOST_GNU_CPU" : "mips", + "DEB_HOST_GNU_SYSTEM" : "solaris", + "DEB_HOST_GNU_TYPE" : "mips-solaris", + "DEB_HOST_MULTIARCH" : "mips-solaris" + }, + "solaris-mips64" : { + "DEB_HOST_ARCH" : "solaris-mips64", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "64", + "DEB_HOST_ARCH_CPU" : "mips64", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "sysv", + "DEB_HOST_ARCH_OS" : "solaris", + "DEB_HOST_GNU_CPU" : "mips64", + "DEB_HOST_GNU_SYSTEM" : "solaris", + "DEB_HOST_GNU_TYPE" : "mips64-solaris", + "DEB_HOST_MULTIARCH" : "mips64-solaris" + }, + "solaris-mips64el" : { + "DEB_HOST_ARCH" : "solaris-mips64el", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "64", + "DEB_HOST_ARCH_CPU" : "mips64el", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "sysv", + "DEB_HOST_ARCH_OS" : "solaris", + "DEB_HOST_GNU_CPU" : "mips64el", + "DEB_HOST_GNU_SYSTEM" : "solaris", + "DEB_HOST_GNU_TYPE" : "mips64el-solaris", + "DEB_HOST_MULTIARCH" : "mips64el-solaris" + }, + "solaris-mips64r6" : { + "DEB_HOST_ARCH" : "solaris-mips64r6", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "64", + "DEB_HOST_ARCH_CPU" : "mips64r6", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "sysv", + "DEB_HOST_ARCH_OS" : "solaris", + "DEB_HOST_GNU_CPU" : "mipsisa64r6", + "DEB_HOST_GNU_SYSTEM" : "solaris", + "DEB_HOST_GNU_TYPE" : "mipsisa64r6-solaris", + "DEB_HOST_MULTIARCH" : "mipsisa64r6-solaris" + }, + "solaris-mips64r6el" : { + "DEB_HOST_ARCH" : "solaris-mips64r6el", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "64", + "DEB_HOST_ARCH_CPU" : "mips64r6el", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "sysv", + "DEB_HOST_ARCH_OS" : "solaris", + "DEB_HOST_GNU_CPU" : "mipsisa64r6el", + "DEB_HOST_GNU_SYSTEM" : "solaris", + "DEB_HOST_GNU_TYPE" : "mipsisa64r6el-solaris", + "DEB_HOST_MULTIARCH" : "mipsisa64r6el-solaris" + }, + "solaris-mipsel" : { + "DEB_HOST_ARCH" : "solaris-mipsel", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "mipsel", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "sysv", + "DEB_HOST_ARCH_OS" : "solaris", + "DEB_HOST_GNU_CPU" : "mipsel", + "DEB_HOST_GNU_SYSTEM" : "solaris", + "DEB_HOST_GNU_TYPE" : "mipsel-solaris", + "DEB_HOST_MULTIARCH" : "mipsel-solaris" + }, + "solaris-mipsr6" : { + "DEB_HOST_ARCH" : "solaris-mipsr6", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "mipsr6", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "sysv", + "DEB_HOST_ARCH_OS" : "solaris", + "DEB_HOST_GNU_CPU" : "mipsisa32r6", + "DEB_HOST_GNU_SYSTEM" : "solaris", + "DEB_HOST_GNU_TYPE" : "mipsisa32r6-solaris", + "DEB_HOST_MULTIARCH" : "mipsisa32r6-solaris" + }, + "solaris-mipsr6el" : { + "DEB_HOST_ARCH" : "solaris-mipsr6el", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "mipsr6el", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "sysv", + "DEB_HOST_ARCH_OS" : "solaris", + "DEB_HOST_GNU_CPU" : "mipsisa32r6el", + "DEB_HOST_GNU_SYSTEM" : "solaris", + "DEB_HOST_GNU_TYPE" : "mipsisa32r6el-solaris", + "DEB_HOST_MULTIARCH" : "mipsisa32r6el-solaris" + }, + "solaris-nios2" : { + "DEB_HOST_ARCH" : "solaris-nios2", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "nios2", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "sysv", + "DEB_HOST_ARCH_OS" : "solaris", + "DEB_HOST_GNU_CPU" : "nios2", + "DEB_HOST_GNU_SYSTEM" : "solaris", + "DEB_HOST_GNU_TYPE" : "nios2-solaris", + "DEB_HOST_MULTIARCH" : "nios2-solaris" + }, + "solaris-or1k" : { + "DEB_HOST_ARCH" : "solaris-or1k", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "or1k", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "sysv", + "DEB_HOST_ARCH_OS" : "solaris", + "DEB_HOST_GNU_CPU" : "or1k", + "DEB_HOST_GNU_SYSTEM" : "solaris", + "DEB_HOST_GNU_TYPE" : "or1k-solaris", + "DEB_HOST_MULTIARCH" : "or1k-solaris" + }, + "solaris-powerpc" : { + "DEB_HOST_ARCH" : "solaris-powerpc", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "powerpc", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "sysv", + "DEB_HOST_ARCH_OS" : "solaris", + "DEB_HOST_GNU_CPU" : "powerpc", + "DEB_HOST_GNU_SYSTEM" : "solaris", + "DEB_HOST_GNU_TYPE" : "powerpc-solaris", + "DEB_HOST_MULTIARCH" : "powerpc-solaris" + }, + "solaris-powerpcel" : { + "DEB_HOST_ARCH" : "solaris-powerpcel", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "powerpcel", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "sysv", + "DEB_HOST_ARCH_OS" : "solaris", + "DEB_HOST_GNU_CPU" : "powerpcle", + "DEB_HOST_GNU_SYSTEM" : "solaris", + "DEB_HOST_GNU_TYPE" : "powerpcle-solaris", + "DEB_HOST_MULTIARCH" : "powerpcle-solaris" + }, + "solaris-ppc64" : { + "DEB_HOST_ARCH" : "solaris-ppc64", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "64", + "DEB_HOST_ARCH_CPU" : "ppc64", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "sysv", + "DEB_HOST_ARCH_OS" : "solaris", + "DEB_HOST_GNU_CPU" : "powerpc64", + "DEB_HOST_GNU_SYSTEM" : "solaris", + "DEB_HOST_GNU_TYPE" : "powerpc64-solaris", + "DEB_HOST_MULTIARCH" : "powerpc64-solaris" + }, + "solaris-ppc64el" : { + "DEB_HOST_ARCH" : "solaris-ppc64el", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "64", + "DEB_HOST_ARCH_CPU" : "ppc64el", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "sysv", + "DEB_HOST_ARCH_OS" : "solaris", + "DEB_HOST_GNU_CPU" : "powerpc64le", + "DEB_HOST_GNU_SYSTEM" : "solaris", + "DEB_HOST_GNU_TYPE" : "powerpc64le-solaris", + "DEB_HOST_MULTIARCH" : "powerpc64le-solaris" + }, + "solaris-riscv64" : { + "DEB_HOST_ARCH" : "solaris-riscv64", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "64", + "DEB_HOST_ARCH_CPU" : "riscv64", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "sysv", + "DEB_HOST_ARCH_OS" : "solaris", + "DEB_HOST_GNU_CPU" : "riscv64", + "DEB_HOST_GNU_SYSTEM" : "solaris", + "DEB_HOST_GNU_TYPE" : "riscv64-solaris", + "DEB_HOST_MULTIARCH" : "riscv64-solaris" + }, + "solaris-s390" : { + "DEB_HOST_ARCH" : "solaris-s390", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "s390", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "sysv", + "DEB_HOST_ARCH_OS" : "solaris", + "DEB_HOST_GNU_CPU" : "s390", + "DEB_HOST_GNU_SYSTEM" : "solaris", + "DEB_HOST_GNU_TYPE" : "s390-solaris", + "DEB_HOST_MULTIARCH" : "s390-solaris" + }, + "solaris-s390x" : { + "DEB_HOST_ARCH" : "solaris-s390x", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "64", + "DEB_HOST_ARCH_CPU" : "s390x", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "sysv", + "DEB_HOST_ARCH_OS" : "solaris", + "DEB_HOST_GNU_CPU" : "s390x", + "DEB_HOST_GNU_SYSTEM" : "solaris", + "DEB_HOST_GNU_TYPE" : "s390x-solaris", + "DEB_HOST_MULTIARCH" : "s390x-solaris" + }, + "solaris-sh3" : { + "DEB_HOST_ARCH" : "solaris-sh3", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "sh3", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "sysv", + "DEB_HOST_ARCH_OS" : "solaris", + "DEB_HOST_GNU_CPU" : "sh3", + "DEB_HOST_GNU_SYSTEM" : "solaris", + "DEB_HOST_GNU_TYPE" : "sh3-solaris", + "DEB_HOST_MULTIARCH" : "sh3-solaris" + }, + "solaris-sh3eb" : { + "DEB_HOST_ARCH" : "solaris-sh3eb", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "sh3eb", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "sysv", + "DEB_HOST_ARCH_OS" : "solaris", + "DEB_HOST_GNU_CPU" : "sh3eb", + "DEB_HOST_GNU_SYSTEM" : "solaris", + "DEB_HOST_GNU_TYPE" : "sh3eb-solaris", + "DEB_HOST_MULTIARCH" : "sh3eb-solaris" + }, + "solaris-sh4" : { + "DEB_HOST_ARCH" : "solaris-sh4", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "sh4", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "sysv", + "DEB_HOST_ARCH_OS" : "solaris", + "DEB_HOST_GNU_CPU" : "sh4", + "DEB_HOST_GNU_SYSTEM" : "solaris", + "DEB_HOST_GNU_TYPE" : "sh4-solaris", + "DEB_HOST_MULTIARCH" : "sh4-solaris" + }, + "solaris-sh4eb" : { + "DEB_HOST_ARCH" : "solaris-sh4eb", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "sh4eb", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "sysv", + "DEB_HOST_ARCH_OS" : "solaris", + "DEB_HOST_GNU_CPU" : "sh4eb", + "DEB_HOST_GNU_SYSTEM" : "solaris", + "DEB_HOST_GNU_TYPE" : "sh4eb-solaris", + "DEB_HOST_MULTIARCH" : "sh4eb-solaris" + }, + "solaris-sparc" : { + "DEB_HOST_ARCH" : "solaris-sparc", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "sparc", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "sysv", + "DEB_HOST_ARCH_OS" : "solaris", + "DEB_HOST_GNU_CPU" : "sparc", + "DEB_HOST_GNU_SYSTEM" : "solaris", + "DEB_HOST_GNU_TYPE" : "sparc-solaris", + "DEB_HOST_MULTIARCH" : "sparc-solaris" + }, + "solaris-sparc64" : { + "DEB_HOST_ARCH" : "solaris-sparc64", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "64", + "DEB_HOST_ARCH_CPU" : "sparc64", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "sysv", + "DEB_HOST_ARCH_OS" : "solaris", + "DEB_HOST_GNU_CPU" : "sparc64", + "DEB_HOST_GNU_SYSTEM" : "solaris", + "DEB_HOST_GNU_TYPE" : "sparc64-solaris", + "DEB_HOST_MULTIARCH" : "sparc64-solaris" + }, + "solaris-tilegx" : { + "DEB_HOST_ARCH" : "solaris-tilegx", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "64", + "DEB_HOST_ARCH_CPU" : "tilegx", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "sysv", + "DEB_HOST_ARCH_OS" : "solaris", + "DEB_HOST_GNU_CPU" : "tilegx", + "DEB_HOST_GNU_SYSTEM" : "solaris", + "DEB_HOST_GNU_TYPE" : "tilegx-solaris", + "DEB_HOST_MULTIARCH" : "tilegx-solaris" + }, + "sparc" : { + "DEB_HOST_ARCH" : "sparc", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "sparc", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "gnu", + "DEB_HOST_ARCH_OS" : "linux", + "DEB_HOST_GNU_CPU" : "sparc", + "DEB_HOST_GNU_SYSTEM" : "linux-gnu", + "DEB_HOST_GNU_TYPE" : "sparc-linux-gnu", + "DEB_HOST_MULTIARCH" : "sparc-linux-gnu" + }, + "sparc64" : { + "DEB_HOST_ARCH" : "sparc64", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "64", + "DEB_HOST_ARCH_CPU" : "sparc64", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "gnu", + "DEB_HOST_ARCH_OS" : "linux", + "DEB_HOST_GNU_CPU" : "sparc64", + "DEB_HOST_GNU_SYSTEM" : "linux-gnu", + "DEB_HOST_GNU_TYPE" : "sparc64-linux-gnu", + "DEB_HOST_MULTIARCH" : "sparc64-linux-gnu" + }, + "tilegx" : { + "DEB_HOST_ARCH" : "tilegx", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "64", + "DEB_HOST_ARCH_CPU" : "tilegx", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "gnu", + "DEB_HOST_ARCH_OS" : "linux", + "DEB_HOST_GNU_CPU" : "tilegx", + "DEB_HOST_GNU_SYSTEM" : "linux-gnu", + "DEB_HOST_GNU_TYPE" : "tilegx-linux-gnu", + "DEB_HOST_MULTIARCH" : "tilegx-linux-gnu" + }, + "uclibc-linux-alpha" : { + "DEB_HOST_ARCH" : "uclibc-linux-alpha", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "64", + "DEB_HOST_ARCH_CPU" : "alpha", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "uclibc", + "DEB_HOST_ARCH_OS" : "linux", + "DEB_HOST_GNU_CPU" : "alpha", + "DEB_HOST_GNU_SYSTEM" : "linux-uclibc", + "DEB_HOST_GNU_TYPE" : "alpha-linux-uclibc", + "DEB_HOST_MULTIARCH" : "alpha-linux-uclibc" + }, + "uclibc-linux-amd64" : { + "DEB_HOST_ARCH" : "uclibc-linux-amd64", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "64", + "DEB_HOST_ARCH_CPU" : "amd64", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "uclibc", + "DEB_HOST_ARCH_OS" : "linux", + "DEB_HOST_GNU_CPU" : "x86_64", + "DEB_HOST_GNU_SYSTEM" : "linux-uclibc", + "DEB_HOST_GNU_TYPE" : "x86_64-linux-uclibc", + "DEB_HOST_MULTIARCH" : "x86_64-linux-uclibc" + }, + "uclibc-linux-arc" : { + "DEB_HOST_ARCH" : "uclibc-linux-arc", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "arc", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "uclibc", + "DEB_HOST_ARCH_OS" : "linux", + "DEB_HOST_GNU_CPU" : "arc", + "DEB_HOST_GNU_SYSTEM" : "linux-uclibc", + "DEB_HOST_GNU_TYPE" : "arc-linux-uclibc", + "DEB_HOST_MULTIARCH" : "arc-linux-uclibc" + }, + "uclibc-linux-arm" : { + "DEB_HOST_ARCH" : "uclibc-linux-arm", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "arm", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "uclibc", + "DEB_HOST_ARCH_OS" : "linux", + "DEB_HOST_GNU_CPU" : "arm", + "DEB_HOST_GNU_SYSTEM" : "linux-uclibc", + "DEB_HOST_GNU_TYPE" : "arm-linux-uclibc", + "DEB_HOST_MULTIARCH" : "arm-linux-uclibc" + }, + "uclibc-linux-arm64" : { + "DEB_HOST_ARCH" : "uclibc-linux-arm64", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "64", + "DEB_HOST_ARCH_CPU" : "arm64", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "uclibc", + "DEB_HOST_ARCH_OS" : "linux", + "DEB_HOST_GNU_CPU" : "aarch64", + "DEB_HOST_GNU_SYSTEM" : "linux-uclibc", + "DEB_HOST_GNU_TYPE" : "aarch64-linux-uclibc", + "DEB_HOST_MULTIARCH" : "aarch64-linux-uclibc" + }, + "uclibc-linux-armeb" : { + "DEB_HOST_ARCH" : "uclibc-linux-armeb", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "armeb", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "uclibc", + "DEB_HOST_ARCH_OS" : "linux", + "DEB_HOST_GNU_CPU" : "armeb", + "DEB_HOST_GNU_SYSTEM" : "linux-uclibc", + "DEB_HOST_GNU_TYPE" : "armeb-linux-uclibc", + "DEB_HOST_MULTIARCH" : "armeb-linux-uclibc" + }, + "uclibc-linux-armel" : { + "DEB_HOST_ARCH" : "uclibc-linux-armel", + "DEB_HOST_ARCH_ABI" : "eabi", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "arm", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "uclibc", + "DEB_HOST_ARCH_OS" : "linux", + "DEB_HOST_GNU_CPU" : "arm", + "DEB_HOST_GNU_SYSTEM" : "linux-uclibceabi", + "DEB_HOST_GNU_TYPE" : "arm-linux-uclibceabi", + "DEB_HOST_MULTIARCH" : "arm-linux-uclibceabi" + }, + "uclibc-linux-avr32" : { + "DEB_HOST_ARCH" : "uclibc-linux-avr32", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "avr32", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "uclibc", + "DEB_HOST_ARCH_OS" : "linux", + "DEB_HOST_GNU_CPU" : "avr32", + "DEB_HOST_GNU_SYSTEM" : "linux-uclibc", + "DEB_HOST_GNU_TYPE" : "avr32-linux-uclibc", + "DEB_HOST_MULTIARCH" : "avr32-linux-uclibc" + }, + "uclibc-linux-hppa" : { + "DEB_HOST_ARCH" : "uclibc-linux-hppa", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "hppa", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "uclibc", + "DEB_HOST_ARCH_OS" : "linux", + "DEB_HOST_GNU_CPU" : "hppa", + "DEB_HOST_GNU_SYSTEM" : "linux-uclibc", + "DEB_HOST_GNU_TYPE" : "hppa-linux-uclibc", + "DEB_HOST_MULTIARCH" : "hppa-linux-uclibc" + }, + "uclibc-linux-i386" : { + "DEB_HOST_ARCH" : "uclibc-linux-i386", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "i386", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "uclibc", + "DEB_HOST_ARCH_OS" : "linux", + "DEB_HOST_GNU_CPU" : "i686", + "DEB_HOST_GNU_SYSTEM" : "linux-uclibc", + "DEB_HOST_GNU_TYPE" : "i686-linux-uclibc", + "DEB_HOST_MULTIARCH" : "i386-linux-uclibc" + }, + "uclibc-linux-ia64" : { + "DEB_HOST_ARCH" : "uclibc-linux-ia64", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "64", + "DEB_HOST_ARCH_CPU" : "ia64", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "uclibc", + "DEB_HOST_ARCH_OS" : "linux", + "DEB_HOST_GNU_CPU" : "ia64", + "DEB_HOST_GNU_SYSTEM" : "linux-uclibc", + "DEB_HOST_GNU_TYPE" : "ia64-linux-uclibc", + "DEB_HOST_MULTIARCH" : "ia64-linux-uclibc" + }, + "uclibc-linux-m32r" : { + "DEB_HOST_ARCH" : "uclibc-linux-m32r", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "m32r", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "uclibc", + "DEB_HOST_ARCH_OS" : "linux", + "DEB_HOST_GNU_CPU" : "m32r", + "DEB_HOST_GNU_SYSTEM" : "linux-uclibc", + "DEB_HOST_GNU_TYPE" : "m32r-linux-uclibc", + "DEB_HOST_MULTIARCH" : "m32r-linux-uclibc" + }, + "uclibc-linux-m68k" : { + "DEB_HOST_ARCH" : "uclibc-linux-m68k", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "m68k", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "uclibc", + "DEB_HOST_ARCH_OS" : "linux", + "DEB_HOST_GNU_CPU" : "m68k", + "DEB_HOST_GNU_SYSTEM" : "linux-uclibc", + "DEB_HOST_GNU_TYPE" : "m68k-linux-uclibc", + "DEB_HOST_MULTIARCH" : "m68k-linux-uclibc" + }, + "uclibc-linux-mips" : { + "DEB_HOST_ARCH" : "uclibc-linux-mips", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "mips", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "uclibc", + "DEB_HOST_ARCH_OS" : "linux", + "DEB_HOST_GNU_CPU" : "mips", + "DEB_HOST_GNU_SYSTEM" : "linux-uclibc", + "DEB_HOST_GNU_TYPE" : "mips-linux-uclibc", + "DEB_HOST_MULTIARCH" : "mips-linux-uclibc" + }, + "uclibc-linux-mips64" : { + "DEB_HOST_ARCH" : "uclibc-linux-mips64", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "64", + "DEB_HOST_ARCH_CPU" : "mips64", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "uclibc", + "DEB_HOST_ARCH_OS" : "linux", + "DEB_HOST_GNU_CPU" : "mips64", + "DEB_HOST_GNU_SYSTEM" : "linux-uclibc", + "DEB_HOST_GNU_TYPE" : "mips64-linux-uclibc", + "DEB_HOST_MULTIARCH" : "mips64-linux-uclibc" + }, + "uclibc-linux-mips64el" : { + "DEB_HOST_ARCH" : "uclibc-linux-mips64el", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "64", + "DEB_HOST_ARCH_CPU" : "mips64el", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "uclibc", + "DEB_HOST_ARCH_OS" : "linux", + "DEB_HOST_GNU_CPU" : "mips64el", + "DEB_HOST_GNU_SYSTEM" : "linux-uclibc", + "DEB_HOST_GNU_TYPE" : "mips64el-linux-uclibc", + "DEB_HOST_MULTIARCH" : "mips64el-linux-uclibc" + }, + "uclibc-linux-mips64r6" : { + "DEB_HOST_ARCH" : "uclibc-linux-mips64r6", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "64", + "DEB_HOST_ARCH_CPU" : "mips64r6", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "uclibc", + "DEB_HOST_ARCH_OS" : "linux", + "DEB_HOST_GNU_CPU" : "mipsisa64r6", + "DEB_HOST_GNU_SYSTEM" : "linux-uclibc", + "DEB_HOST_GNU_TYPE" : "mipsisa64r6-linux-uclibc", + "DEB_HOST_MULTIARCH" : "mipsisa64r6-linux-uclibc" + }, + "uclibc-linux-mips64r6el" : { + "DEB_HOST_ARCH" : "uclibc-linux-mips64r6el", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "64", + "DEB_HOST_ARCH_CPU" : "mips64r6el", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "uclibc", + "DEB_HOST_ARCH_OS" : "linux", + "DEB_HOST_GNU_CPU" : "mipsisa64r6el", + "DEB_HOST_GNU_SYSTEM" : "linux-uclibc", + "DEB_HOST_GNU_TYPE" : "mipsisa64r6el-linux-uclibc", + "DEB_HOST_MULTIARCH" : "mipsisa64r6el-linux-uclibc" + }, + "uclibc-linux-mipsel" : { + "DEB_HOST_ARCH" : "uclibc-linux-mipsel", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "mipsel", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "uclibc", + "DEB_HOST_ARCH_OS" : "linux", + "DEB_HOST_GNU_CPU" : "mipsel", + "DEB_HOST_GNU_SYSTEM" : "linux-uclibc", + "DEB_HOST_GNU_TYPE" : "mipsel-linux-uclibc", + "DEB_HOST_MULTIARCH" : "mipsel-linux-uclibc" + }, + "uclibc-linux-mipsr6" : { + "DEB_HOST_ARCH" : "uclibc-linux-mipsr6", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "mipsr6", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "uclibc", + "DEB_HOST_ARCH_OS" : "linux", + "DEB_HOST_GNU_CPU" : "mipsisa32r6", + "DEB_HOST_GNU_SYSTEM" : "linux-uclibc", + "DEB_HOST_GNU_TYPE" : "mipsisa32r6-linux-uclibc", + "DEB_HOST_MULTIARCH" : "mipsisa32r6-linux-uclibc" + }, + "uclibc-linux-mipsr6el" : { + "DEB_HOST_ARCH" : "uclibc-linux-mipsr6el", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "mipsr6el", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "uclibc", + "DEB_HOST_ARCH_OS" : "linux", + "DEB_HOST_GNU_CPU" : "mipsisa32r6el", + "DEB_HOST_GNU_SYSTEM" : "linux-uclibc", + "DEB_HOST_GNU_TYPE" : "mipsisa32r6el-linux-uclibc", + "DEB_HOST_MULTIARCH" : "mipsisa32r6el-linux-uclibc" + }, + "uclibc-linux-nios2" : { + "DEB_HOST_ARCH" : "uclibc-linux-nios2", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "nios2", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "uclibc", + "DEB_HOST_ARCH_OS" : "linux", + "DEB_HOST_GNU_CPU" : "nios2", + "DEB_HOST_GNU_SYSTEM" : "linux-uclibc", + "DEB_HOST_GNU_TYPE" : "nios2-linux-uclibc", + "DEB_HOST_MULTIARCH" : "nios2-linux-uclibc" + }, + "uclibc-linux-or1k" : { + "DEB_HOST_ARCH" : "uclibc-linux-or1k", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "or1k", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "uclibc", + "DEB_HOST_ARCH_OS" : "linux", + "DEB_HOST_GNU_CPU" : "or1k", + "DEB_HOST_GNU_SYSTEM" : "linux-uclibc", + "DEB_HOST_GNU_TYPE" : "or1k-linux-uclibc", + "DEB_HOST_MULTIARCH" : "or1k-linux-uclibc" + }, + "uclibc-linux-powerpc" : { + "DEB_HOST_ARCH" : "uclibc-linux-powerpc", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "powerpc", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "uclibc", + "DEB_HOST_ARCH_OS" : "linux", + "DEB_HOST_GNU_CPU" : "powerpc", + "DEB_HOST_GNU_SYSTEM" : "linux-uclibc", + "DEB_HOST_GNU_TYPE" : "powerpc-linux-uclibc", + "DEB_HOST_MULTIARCH" : "powerpc-linux-uclibc" + }, + "uclibc-linux-powerpcel" : { + "DEB_HOST_ARCH" : "uclibc-linux-powerpcel", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "powerpcel", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "uclibc", + "DEB_HOST_ARCH_OS" : "linux", + "DEB_HOST_GNU_CPU" : "powerpcle", + "DEB_HOST_GNU_SYSTEM" : "linux-uclibc", + "DEB_HOST_GNU_TYPE" : "powerpcle-linux-uclibc", + "DEB_HOST_MULTIARCH" : "powerpcle-linux-uclibc" + }, + "uclibc-linux-ppc64" : { + "DEB_HOST_ARCH" : "uclibc-linux-ppc64", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "64", + "DEB_HOST_ARCH_CPU" : "ppc64", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "uclibc", + "DEB_HOST_ARCH_OS" : "linux", + "DEB_HOST_GNU_CPU" : "powerpc64", + "DEB_HOST_GNU_SYSTEM" : "linux-uclibc", + "DEB_HOST_GNU_TYPE" : "powerpc64-linux-uclibc", + "DEB_HOST_MULTIARCH" : "powerpc64-linux-uclibc" + }, + "uclibc-linux-ppc64el" : { + "DEB_HOST_ARCH" : "uclibc-linux-ppc64el", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "64", + "DEB_HOST_ARCH_CPU" : "ppc64el", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "uclibc", + "DEB_HOST_ARCH_OS" : "linux", + "DEB_HOST_GNU_CPU" : "powerpc64le", + "DEB_HOST_GNU_SYSTEM" : "linux-uclibc", + "DEB_HOST_GNU_TYPE" : "powerpc64le-linux-uclibc", + "DEB_HOST_MULTIARCH" : "powerpc64le-linux-uclibc" + }, + "uclibc-linux-riscv64" : { + "DEB_HOST_ARCH" : "uclibc-linux-riscv64", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "64", + "DEB_HOST_ARCH_CPU" : "riscv64", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "uclibc", + "DEB_HOST_ARCH_OS" : "linux", + "DEB_HOST_GNU_CPU" : "riscv64", + "DEB_HOST_GNU_SYSTEM" : "linux-uclibc", + "DEB_HOST_GNU_TYPE" : "riscv64-linux-uclibc", + "DEB_HOST_MULTIARCH" : "riscv64-linux-uclibc" + }, + "uclibc-linux-s390" : { + "DEB_HOST_ARCH" : "uclibc-linux-s390", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "s390", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "uclibc", + "DEB_HOST_ARCH_OS" : "linux", + "DEB_HOST_GNU_CPU" : "s390", + "DEB_HOST_GNU_SYSTEM" : "linux-uclibc", + "DEB_HOST_GNU_TYPE" : "s390-linux-uclibc", + "DEB_HOST_MULTIARCH" : "s390-linux-uclibc" + }, + "uclibc-linux-s390x" : { + "DEB_HOST_ARCH" : "uclibc-linux-s390x", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "64", + "DEB_HOST_ARCH_CPU" : "s390x", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "uclibc", + "DEB_HOST_ARCH_OS" : "linux", + "DEB_HOST_GNU_CPU" : "s390x", + "DEB_HOST_GNU_SYSTEM" : "linux-uclibc", + "DEB_HOST_GNU_TYPE" : "s390x-linux-uclibc", + "DEB_HOST_MULTIARCH" : "s390x-linux-uclibc" + }, + "uclibc-linux-sh3" : { + "DEB_HOST_ARCH" : "uclibc-linux-sh3", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "sh3", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "uclibc", + "DEB_HOST_ARCH_OS" : "linux", + "DEB_HOST_GNU_CPU" : "sh3", + "DEB_HOST_GNU_SYSTEM" : "linux-uclibc", + "DEB_HOST_GNU_TYPE" : "sh3-linux-uclibc", + "DEB_HOST_MULTIARCH" : "sh3-linux-uclibc" + }, + "uclibc-linux-sh3eb" : { + "DEB_HOST_ARCH" : "uclibc-linux-sh3eb", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "sh3eb", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "uclibc", + "DEB_HOST_ARCH_OS" : "linux", + "DEB_HOST_GNU_CPU" : "sh3eb", + "DEB_HOST_GNU_SYSTEM" : "linux-uclibc", + "DEB_HOST_GNU_TYPE" : "sh3eb-linux-uclibc", + "DEB_HOST_MULTIARCH" : "sh3eb-linux-uclibc" + }, + "uclibc-linux-sh4" : { + "DEB_HOST_ARCH" : "uclibc-linux-sh4", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "sh4", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "uclibc", + "DEB_HOST_ARCH_OS" : "linux", + "DEB_HOST_GNU_CPU" : "sh4", + "DEB_HOST_GNU_SYSTEM" : "linux-uclibc", + "DEB_HOST_GNU_TYPE" : "sh4-linux-uclibc", + "DEB_HOST_MULTIARCH" : "sh4-linux-uclibc" + }, + "uclibc-linux-sh4eb" : { + "DEB_HOST_ARCH" : "uclibc-linux-sh4eb", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "sh4eb", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "uclibc", + "DEB_HOST_ARCH_OS" : "linux", + "DEB_HOST_GNU_CPU" : "sh4eb", + "DEB_HOST_GNU_SYSTEM" : "linux-uclibc", + "DEB_HOST_GNU_TYPE" : "sh4eb-linux-uclibc", + "DEB_HOST_MULTIARCH" : "sh4eb-linux-uclibc" + }, + "uclibc-linux-sparc" : { + "DEB_HOST_ARCH" : "uclibc-linux-sparc", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "sparc", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "uclibc", + "DEB_HOST_ARCH_OS" : "linux", + "DEB_HOST_GNU_CPU" : "sparc", + "DEB_HOST_GNU_SYSTEM" : "linux-uclibc", + "DEB_HOST_GNU_TYPE" : "sparc-linux-uclibc", + "DEB_HOST_MULTIARCH" : "sparc-linux-uclibc" + }, + "uclibc-linux-sparc64" : { + "DEB_HOST_ARCH" : "uclibc-linux-sparc64", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "64", + "DEB_HOST_ARCH_CPU" : "sparc64", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "uclibc", + "DEB_HOST_ARCH_OS" : "linux", + "DEB_HOST_GNU_CPU" : "sparc64", + "DEB_HOST_GNU_SYSTEM" : "linux-uclibc", + "DEB_HOST_GNU_TYPE" : "sparc64-linux-uclibc", + "DEB_HOST_MULTIARCH" : "sparc64-linux-uclibc" + }, + "uclibc-linux-tilegx" : { + "DEB_HOST_ARCH" : "uclibc-linux-tilegx", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "64", + "DEB_HOST_ARCH_CPU" : "tilegx", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "uclibc", + "DEB_HOST_ARCH_OS" : "linux", + "DEB_HOST_GNU_CPU" : "tilegx", + "DEB_HOST_GNU_SYSTEM" : "linux-uclibc", + "DEB_HOST_GNU_TYPE" : "tilegx-linux-uclibc", + "DEB_HOST_MULTIARCH" : "tilegx-linux-uclibc" + }, + "uclinux-alpha" : { + "DEB_HOST_ARCH" : "uclinux-alpha", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "64", + "DEB_HOST_ARCH_CPU" : "alpha", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "uclibc", + "DEB_HOST_ARCH_OS" : "uclinux", + "DEB_HOST_GNU_CPU" : "alpha", + "DEB_HOST_GNU_SYSTEM" : "uclinux-uclibc", + "DEB_HOST_GNU_TYPE" : "alpha-uclinux-uclibc", + "DEB_HOST_MULTIARCH" : "alpha-uclinux-uclibc" + }, + "uclinux-amd64" : { + "DEB_HOST_ARCH" : "uclinux-amd64", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "64", + "DEB_HOST_ARCH_CPU" : "amd64", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "uclibc", + "DEB_HOST_ARCH_OS" : "uclinux", + "DEB_HOST_GNU_CPU" : "x86_64", + "DEB_HOST_GNU_SYSTEM" : "uclinux-uclibc", + "DEB_HOST_GNU_TYPE" : "x86_64-uclinux-uclibc", + "DEB_HOST_MULTIARCH" : "x86_64-uclinux-uclibc" + }, + "uclinux-arc" : { + "DEB_HOST_ARCH" : "uclinux-arc", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "arc", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "uclibc", + "DEB_HOST_ARCH_OS" : "uclinux", + "DEB_HOST_GNU_CPU" : "arc", + "DEB_HOST_GNU_SYSTEM" : "uclinux-uclibc", + "DEB_HOST_GNU_TYPE" : "arc-uclinux-uclibc", + "DEB_HOST_MULTIARCH" : "arc-uclinux-uclibc" + }, + "uclinux-arm" : { + "DEB_HOST_ARCH" : "uclinux-arm", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "arm", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "uclibc", + "DEB_HOST_ARCH_OS" : "uclinux", + "DEB_HOST_GNU_CPU" : "arm", + "DEB_HOST_GNU_SYSTEM" : "uclinux-uclibc", + "DEB_HOST_GNU_TYPE" : "arm-uclinux-uclibc", + "DEB_HOST_MULTIARCH" : "arm-uclinux-uclibc" + }, + "uclinux-arm64" : { + "DEB_HOST_ARCH" : "uclinux-arm64", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "64", + "DEB_HOST_ARCH_CPU" : "arm64", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "uclibc", + "DEB_HOST_ARCH_OS" : "uclinux", + "DEB_HOST_GNU_CPU" : "aarch64", + "DEB_HOST_GNU_SYSTEM" : "uclinux-uclibc", + "DEB_HOST_GNU_TYPE" : "aarch64-uclinux-uclibc", + "DEB_HOST_MULTIARCH" : "aarch64-uclinux-uclibc" + }, + "uclinux-armeb" : { + "DEB_HOST_ARCH" : "uclinux-armeb", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "armeb", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "uclibc", + "DEB_HOST_ARCH_OS" : "uclinux", + "DEB_HOST_GNU_CPU" : "armeb", + "DEB_HOST_GNU_SYSTEM" : "uclinux-uclibc", + "DEB_HOST_GNU_TYPE" : "armeb-uclinux-uclibc", + "DEB_HOST_MULTIARCH" : "armeb-uclinux-uclibc" + }, + "uclinux-armel" : { + "DEB_HOST_ARCH" : "uclinux-armel", + "DEB_HOST_ARCH_ABI" : "eabi", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "arm", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "uclibc", + "DEB_HOST_ARCH_OS" : "uclinux", + "DEB_HOST_GNU_CPU" : "arm", + "DEB_HOST_GNU_SYSTEM" : "uclinux-uclibceabi", + "DEB_HOST_GNU_TYPE" : "arm-uclinux-uclibceabi", + "DEB_HOST_MULTIARCH" : "arm-uclinux-uclibceabi" + }, + "uclinux-avr32" : { + "DEB_HOST_ARCH" : "uclinux-avr32", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "avr32", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "uclibc", + "DEB_HOST_ARCH_OS" : "uclinux", + "DEB_HOST_GNU_CPU" : "avr32", + "DEB_HOST_GNU_SYSTEM" : "uclinux-uclibc", + "DEB_HOST_GNU_TYPE" : "avr32-uclinux-uclibc", + "DEB_HOST_MULTIARCH" : "avr32-uclinux-uclibc" + }, + "uclinux-hppa" : { + "DEB_HOST_ARCH" : "uclinux-hppa", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "hppa", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "uclibc", + "DEB_HOST_ARCH_OS" : "uclinux", + "DEB_HOST_GNU_CPU" : "hppa", + "DEB_HOST_GNU_SYSTEM" : "uclinux-uclibc", + "DEB_HOST_GNU_TYPE" : "hppa-uclinux-uclibc", + "DEB_HOST_MULTIARCH" : "hppa-uclinux-uclibc" + }, + "uclinux-i386" : { + "DEB_HOST_ARCH" : "uclinux-i386", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "i386", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "uclibc", + "DEB_HOST_ARCH_OS" : "uclinux", + "DEB_HOST_GNU_CPU" : "i686", + "DEB_HOST_GNU_SYSTEM" : "uclinux-uclibc", + "DEB_HOST_GNU_TYPE" : "i686-uclinux-uclibc", + "DEB_HOST_MULTIARCH" : "i386-uclinux-uclibc" + }, + "uclinux-ia64" : { + "DEB_HOST_ARCH" : "uclinux-ia64", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "64", + "DEB_HOST_ARCH_CPU" : "ia64", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "uclibc", + "DEB_HOST_ARCH_OS" : "uclinux", + "DEB_HOST_GNU_CPU" : "ia64", + "DEB_HOST_GNU_SYSTEM" : "uclinux-uclibc", + "DEB_HOST_GNU_TYPE" : "ia64-uclinux-uclibc", + "DEB_HOST_MULTIARCH" : "ia64-uclinux-uclibc" + }, + "uclinux-m32r" : { + "DEB_HOST_ARCH" : "uclinux-m32r", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "m32r", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "uclibc", + "DEB_HOST_ARCH_OS" : "uclinux", + "DEB_HOST_GNU_CPU" : "m32r", + "DEB_HOST_GNU_SYSTEM" : "uclinux-uclibc", + "DEB_HOST_GNU_TYPE" : "m32r-uclinux-uclibc", + "DEB_HOST_MULTIARCH" : "m32r-uclinux-uclibc" + }, + "uclinux-m68k" : { + "DEB_HOST_ARCH" : "uclinux-m68k", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "m68k", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "uclibc", + "DEB_HOST_ARCH_OS" : "uclinux", + "DEB_HOST_GNU_CPU" : "m68k", + "DEB_HOST_GNU_SYSTEM" : "uclinux-uclibc", + "DEB_HOST_GNU_TYPE" : "m68k-uclinux-uclibc", + "DEB_HOST_MULTIARCH" : "m68k-uclinux-uclibc" + }, + "uclinux-mips" : { + "DEB_HOST_ARCH" : "uclinux-mips", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "mips", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "uclibc", + "DEB_HOST_ARCH_OS" : "uclinux", + "DEB_HOST_GNU_CPU" : "mips", + "DEB_HOST_GNU_SYSTEM" : "uclinux-uclibc", + "DEB_HOST_GNU_TYPE" : "mips-uclinux-uclibc", + "DEB_HOST_MULTIARCH" : "mips-uclinux-uclibc" + }, + "uclinux-mips64" : { + "DEB_HOST_ARCH" : "uclinux-mips64", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "64", + "DEB_HOST_ARCH_CPU" : "mips64", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "uclibc", + "DEB_HOST_ARCH_OS" : "uclinux", + "DEB_HOST_GNU_CPU" : "mips64", + "DEB_HOST_GNU_SYSTEM" : "uclinux-uclibc", + "DEB_HOST_GNU_TYPE" : "mips64-uclinux-uclibc", + "DEB_HOST_MULTIARCH" : "mips64-uclinux-uclibc" + }, + "uclinux-mips64el" : { + "DEB_HOST_ARCH" : "uclinux-mips64el", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "64", + "DEB_HOST_ARCH_CPU" : "mips64el", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "uclibc", + "DEB_HOST_ARCH_OS" : "uclinux", + "DEB_HOST_GNU_CPU" : "mips64el", + "DEB_HOST_GNU_SYSTEM" : "uclinux-uclibc", + "DEB_HOST_GNU_TYPE" : "mips64el-uclinux-uclibc", + "DEB_HOST_MULTIARCH" : "mips64el-uclinux-uclibc" + }, + "uclinux-mips64r6" : { + "DEB_HOST_ARCH" : "uclinux-mips64r6", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "64", + "DEB_HOST_ARCH_CPU" : "mips64r6", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "uclibc", + "DEB_HOST_ARCH_OS" : "uclinux", + "DEB_HOST_GNU_CPU" : "mipsisa64r6", + "DEB_HOST_GNU_SYSTEM" : "uclinux-uclibc", + "DEB_HOST_GNU_TYPE" : "mipsisa64r6-uclinux-uclibc", + "DEB_HOST_MULTIARCH" : "mipsisa64r6-uclinux-uclibc" + }, + "uclinux-mips64r6el" : { + "DEB_HOST_ARCH" : "uclinux-mips64r6el", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "64", + "DEB_HOST_ARCH_CPU" : "mips64r6el", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "uclibc", + "DEB_HOST_ARCH_OS" : "uclinux", + "DEB_HOST_GNU_CPU" : "mipsisa64r6el", + "DEB_HOST_GNU_SYSTEM" : "uclinux-uclibc", + "DEB_HOST_GNU_TYPE" : "mipsisa64r6el-uclinux-uclibc", + "DEB_HOST_MULTIARCH" : "mipsisa64r6el-uclinux-uclibc" + }, + "uclinux-mipsel" : { + "DEB_HOST_ARCH" : "uclinux-mipsel", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "mipsel", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "uclibc", + "DEB_HOST_ARCH_OS" : "uclinux", + "DEB_HOST_GNU_CPU" : "mipsel", + "DEB_HOST_GNU_SYSTEM" : "uclinux-uclibc", + "DEB_HOST_GNU_TYPE" : "mipsel-uclinux-uclibc", + "DEB_HOST_MULTIARCH" : "mipsel-uclinux-uclibc" + }, + "uclinux-mipsr6" : { + "DEB_HOST_ARCH" : "uclinux-mipsr6", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "mipsr6", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "uclibc", + "DEB_HOST_ARCH_OS" : "uclinux", + "DEB_HOST_GNU_CPU" : "mipsisa32r6", + "DEB_HOST_GNU_SYSTEM" : "uclinux-uclibc", + "DEB_HOST_GNU_TYPE" : "mipsisa32r6-uclinux-uclibc", + "DEB_HOST_MULTIARCH" : "mipsisa32r6-uclinux-uclibc" + }, + "uclinux-mipsr6el" : { + "DEB_HOST_ARCH" : "uclinux-mipsr6el", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "mipsr6el", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "uclibc", + "DEB_HOST_ARCH_OS" : "uclinux", + "DEB_HOST_GNU_CPU" : "mipsisa32r6el", + "DEB_HOST_GNU_SYSTEM" : "uclinux-uclibc", + "DEB_HOST_GNU_TYPE" : "mipsisa32r6el-uclinux-uclibc", + "DEB_HOST_MULTIARCH" : "mipsisa32r6el-uclinux-uclibc" + }, + "uclinux-nios2" : { + "DEB_HOST_ARCH" : "uclinux-nios2", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "nios2", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "uclibc", + "DEB_HOST_ARCH_OS" : "uclinux", + "DEB_HOST_GNU_CPU" : "nios2", + "DEB_HOST_GNU_SYSTEM" : "uclinux-uclibc", + "DEB_HOST_GNU_TYPE" : "nios2-uclinux-uclibc", + "DEB_HOST_MULTIARCH" : "nios2-uclinux-uclibc" + }, + "uclinux-or1k" : { + "DEB_HOST_ARCH" : "uclinux-or1k", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "or1k", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "uclibc", + "DEB_HOST_ARCH_OS" : "uclinux", + "DEB_HOST_GNU_CPU" : "or1k", + "DEB_HOST_GNU_SYSTEM" : "uclinux-uclibc", + "DEB_HOST_GNU_TYPE" : "or1k-uclinux-uclibc", + "DEB_HOST_MULTIARCH" : "or1k-uclinux-uclibc" + }, + "uclinux-powerpc" : { + "DEB_HOST_ARCH" : "uclinux-powerpc", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "powerpc", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "uclibc", + "DEB_HOST_ARCH_OS" : "uclinux", + "DEB_HOST_GNU_CPU" : "powerpc", + "DEB_HOST_GNU_SYSTEM" : "uclinux-uclibc", + "DEB_HOST_GNU_TYPE" : "powerpc-uclinux-uclibc", + "DEB_HOST_MULTIARCH" : "powerpc-uclinux-uclibc" + }, + "uclinux-powerpcel" : { + "DEB_HOST_ARCH" : "uclinux-powerpcel", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "powerpcel", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "uclibc", + "DEB_HOST_ARCH_OS" : "uclinux", + "DEB_HOST_GNU_CPU" : "powerpcle", + "DEB_HOST_GNU_SYSTEM" : "uclinux-uclibc", + "DEB_HOST_GNU_TYPE" : "powerpcle-uclinux-uclibc", + "DEB_HOST_MULTIARCH" : "powerpcle-uclinux-uclibc" + }, + "uclinux-ppc64" : { + "DEB_HOST_ARCH" : "uclinux-ppc64", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "64", + "DEB_HOST_ARCH_CPU" : "ppc64", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "uclibc", + "DEB_HOST_ARCH_OS" : "uclinux", + "DEB_HOST_GNU_CPU" : "powerpc64", + "DEB_HOST_GNU_SYSTEM" : "uclinux-uclibc", + "DEB_HOST_GNU_TYPE" : "powerpc64-uclinux-uclibc", + "DEB_HOST_MULTIARCH" : "powerpc64-uclinux-uclibc" + }, + "uclinux-ppc64el" : { + "DEB_HOST_ARCH" : "uclinux-ppc64el", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "64", + "DEB_HOST_ARCH_CPU" : "ppc64el", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "uclibc", + "DEB_HOST_ARCH_OS" : "uclinux", + "DEB_HOST_GNU_CPU" : "powerpc64le", + "DEB_HOST_GNU_SYSTEM" : "uclinux-uclibc", + "DEB_HOST_GNU_TYPE" : "powerpc64le-uclinux-uclibc", + "DEB_HOST_MULTIARCH" : "powerpc64le-uclinux-uclibc" + }, + "uclinux-riscv64" : { + "DEB_HOST_ARCH" : "uclinux-riscv64", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "64", + "DEB_HOST_ARCH_CPU" : "riscv64", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "uclibc", + "DEB_HOST_ARCH_OS" : "uclinux", + "DEB_HOST_GNU_CPU" : "riscv64", + "DEB_HOST_GNU_SYSTEM" : "uclinux-uclibc", + "DEB_HOST_GNU_TYPE" : "riscv64-uclinux-uclibc", + "DEB_HOST_MULTIARCH" : "riscv64-uclinux-uclibc" + }, + "uclinux-s390" : { + "DEB_HOST_ARCH" : "uclinux-s390", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "s390", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "uclibc", + "DEB_HOST_ARCH_OS" : "uclinux", + "DEB_HOST_GNU_CPU" : "s390", + "DEB_HOST_GNU_SYSTEM" : "uclinux-uclibc", + "DEB_HOST_GNU_TYPE" : "s390-uclinux-uclibc", + "DEB_HOST_MULTIARCH" : "s390-uclinux-uclibc" + }, + "uclinux-s390x" : { + "DEB_HOST_ARCH" : "uclinux-s390x", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "64", + "DEB_HOST_ARCH_CPU" : "s390x", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "uclibc", + "DEB_HOST_ARCH_OS" : "uclinux", + "DEB_HOST_GNU_CPU" : "s390x", + "DEB_HOST_GNU_SYSTEM" : "uclinux-uclibc", + "DEB_HOST_GNU_TYPE" : "s390x-uclinux-uclibc", + "DEB_HOST_MULTIARCH" : "s390x-uclinux-uclibc" + }, + "uclinux-sh3" : { + "DEB_HOST_ARCH" : "uclinux-sh3", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "sh3", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "uclibc", + "DEB_HOST_ARCH_OS" : "uclinux", + "DEB_HOST_GNU_CPU" : "sh3", + "DEB_HOST_GNU_SYSTEM" : "uclinux-uclibc", + "DEB_HOST_GNU_TYPE" : "sh3-uclinux-uclibc", + "DEB_HOST_MULTIARCH" : "sh3-uclinux-uclibc" + }, + "uclinux-sh3eb" : { + "DEB_HOST_ARCH" : "uclinux-sh3eb", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "sh3eb", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "uclibc", + "DEB_HOST_ARCH_OS" : "uclinux", + "DEB_HOST_GNU_CPU" : "sh3eb", + "DEB_HOST_GNU_SYSTEM" : "uclinux-uclibc", + "DEB_HOST_GNU_TYPE" : "sh3eb-uclinux-uclibc", + "DEB_HOST_MULTIARCH" : "sh3eb-uclinux-uclibc" + }, + "uclinux-sh4" : { + "DEB_HOST_ARCH" : "uclinux-sh4", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "sh4", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "uclibc", + "DEB_HOST_ARCH_OS" : "uclinux", + "DEB_HOST_GNU_CPU" : "sh4", + "DEB_HOST_GNU_SYSTEM" : "uclinux-uclibc", + "DEB_HOST_GNU_TYPE" : "sh4-uclinux-uclibc", + "DEB_HOST_MULTIARCH" : "sh4-uclinux-uclibc" + }, + "uclinux-sh4eb" : { + "DEB_HOST_ARCH" : "uclinux-sh4eb", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "sh4eb", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "uclibc", + "DEB_HOST_ARCH_OS" : "uclinux", + "DEB_HOST_GNU_CPU" : "sh4eb", + "DEB_HOST_GNU_SYSTEM" : "uclinux-uclibc", + "DEB_HOST_GNU_TYPE" : "sh4eb-uclinux-uclibc", + "DEB_HOST_MULTIARCH" : "sh4eb-uclinux-uclibc" + }, + "uclinux-sparc" : { + "DEB_HOST_ARCH" : "uclinux-sparc", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "sparc", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "uclibc", + "DEB_HOST_ARCH_OS" : "uclinux", + "DEB_HOST_GNU_CPU" : "sparc", + "DEB_HOST_GNU_SYSTEM" : "uclinux-uclibc", + "DEB_HOST_GNU_TYPE" : "sparc-uclinux-uclibc", + "DEB_HOST_MULTIARCH" : "sparc-uclinux-uclibc" + }, + "uclinux-sparc64" : { + "DEB_HOST_ARCH" : "uclinux-sparc64", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "64", + "DEB_HOST_ARCH_CPU" : "sparc64", + "DEB_HOST_ARCH_ENDIAN" : "big", + "DEB_HOST_ARCH_LIBC" : "uclibc", + "DEB_HOST_ARCH_OS" : "uclinux", + "DEB_HOST_GNU_CPU" : "sparc64", + "DEB_HOST_GNU_SYSTEM" : "uclinux-uclibc", + "DEB_HOST_GNU_TYPE" : "sparc64-uclinux-uclibc", + "DEB_HOST_MULTIARCH" : "sparc64-uclinux-uclibc" + }, + "uclinux-tilegx" : { + "DEB_HOST_ARCH" : "uclinux-tilegx", + "DEB_HOST_ARCH_ABI" : "base", + "DEB_HOST_ARCH_BITS" : "64", + "DEB_HOST_ARCH_CPU" : "tilegx", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "uclibc", + "DEB_HOST_ARCH_OS" : "uclinux", + "DEB_HOST_GNU_CPU" : "tilegx", + "DEB_HOST_GNU_SYSTEM" : "uclinux-uclibc", + "DEB_HOST_GNU_TYPE" : "tilegx-uclinux-uclibc", + "DEB_HOST_MULTIARCH" : "tilegx-uclinux-uclibc" + }, + "x32" : { + "DEB_HOST_ARCH" : "x32", + "DEB_HOST_ARCH_ABI" : "x32", + "DEB_HOST_ARCH_BITS" : "32", + "DEB_HOST_ARCH_CPU" : "amd64", + "DEB_HOST_ARCH_ENDIAN" : "little", + "DEB_HOST_ARCH_LIBC" : "gnu", + "DEB_HOST_ARCH_OS" : "linux", + "DEB_HOST_GNU_CPU" : "x86_64", + "DEB_HOST_GNU_SYSTEM" : "linux-gnux32", + "DEB_HOST_GNU_TYPE" : "x86_64-linux-gnux32", + "DEB_HOST_MULTIARCH" : "x86_64-linux-gnux32" + } + }, + "preamble" : { + "cargo" : "host_variables", + "title" : "DEB_HOST_* Variables from Dpkg" + } +} diff --git a/data/archive/auto-rejection.yaml b/data/archive/auto-rejection.yaml new file mode 100644 index 0000000..fda338e --- /dev/null +++ b/data/archive/auto-rejection.yaml @@ -0,0 +1,127 @@ +lintian: + + # Overriding these tags is allowed + nonfatal: + - arch-dependent-file-in-usr-share + - arch-independent-package-contains-binary-or-object + - bad-perm-for-file-in-etc-sudoers.d + - binary-or-shlib-defines-rpath + - binary-with-bad-dynamic-table + - control-interpreter-without-depends + - copyright-contains-dh_make-todo-boilerplate + - debhelper-compat-file-contains-multiple-levels + - dir-or-file-in-etc-opt + - dir-or-file-in-var-www + - distribution-and-changes-mismatch + - distribution-and-experimental-mismatch + - embedded-library + - empty-binary-package + - file-name-is-not-valid-UTF-8 + - gzip-file-is-not-multi-arch-same-safe + - header-has-overly-generic-name + - install-info-used-in-maintainer-script + - invalid-date-in-debian-changelog + - latest-debian-changelog-entry-reuses-existing-version + - license-problem-json-evil + - license-problem-non-free-RFC + - license-problem-nvidia-intellectual + - manpage-has-overly-generic-name + - md5sum-mismatch + - missing-build-dependency + - missing-dependency-on-libc + - mknod-in-maintainer-script + - no-shlibs-control-file + - non-etc-file-marked-as-conffile + - non-standard-toplevel-dir + - not-binnmuable-all-depends-any + - not-binnmuable-any-depends-all + - not-binnmuable-any-depends-any + - package-contains-info-dir-file + - pkg-config-bad-directive + - pkg-config-multi-arch-wrong-dir + - preinst-interpreter-without-predepends + - python-module-has-overly-generic-name + - quilt-series-without-trailing-newline + - shipped-file-without-utf8-name + - source-contains-prebuilt-ms-help-file + - source-contains-prebuilt-silverlight-object + - source-contains-waf-binary + - source-only-upload-to-non-free-without-autobuild + - statically-linked-binary + - usr-share-doc-symlink-without-dependency + - wrong-file-owner-uid-or-gid + + # Overriding these tags is NOT allowed + fatal: + - FSSTND-dir-in-usr + - FSSTND-dir-in-var + - bad-package-name + - bad-relation + - bad-version-number + - binary-in-etc + - build-info-in-binary-control-file-section + - changelog-distribution-does-not-match-changes-file + - conflicting-negation-in-source-relation + - control-file-has-bad-owner + - control-file-has-bad-permissions + - control-file-is-not-a-file + - control-interpreter-in-usr-local + - copyright-file-compressed + - copyright-file-is-symlink + - copyright-refers-to-incorrect-directory + - copyright-refers-to-old-directory + - debian-changelog-file-uses-obsolete-national-encoding + - debian-control-file-uses-obsolete-national-encoding + - debian-copyright-file-uses-obsolete-national-encoding + - debian-rules-missing-required-target + - debian-rules-not-a-makefile + - description-is-dh_make-template + - description-synopsis-is-empty + - dir-or-file-in-build-tree + - dir-or-file-in-home + - dir-or-file-in-mnt + - dir-or-file-in-opt + - dir-or-file-in-run + - dir-or-file-in-srv + - dir-or-file-in-tmp + - dir-or-file-in-var-lock + - dir-or-file-in-var-run + - extended-description-is-empty + - file-in-etc-not-marked-as-conffile + - file-in-usr-marked-as-conffile + - forbidden-postrm-interpreter + - invalid-versioned-provides + - latest-debian-changelog-entry-without-new-date + - library-in-debug-or-profile-should-not-be-stripped + - license-problem-md5sum-non-distributable-file + - license-problem-md5sum-non-free-file + - magic-arch-in-arch-list + - maintainer-address-causes-mail-loops-or-bounces + - maintainer-address-is-on-localhost + - maintainer-address-malformed + - maintainer-address-missing + - maintainer-name-missing + - maintainer-script-removes-device-files + - malformed-deb-archive + - missing-dependency-on-perlapi + - no-architecture-field + - no-copyright-file + - no-maintainer-field + - no-package-name + - no-version-field + - not-allowed-control-file + - package-contains-ancient-file + - package-has-no-description + - package-installs-apt-keyring + - package-installs-apt-preferences + - package-installs-apt-sources + - package-installs-python-bytecode + - package-not-lowercase + - package-uses-local-diversion + - section-is-dh_make-template + - symlink-has-too-many-up-segments + - too-many-architectures + - uploader-address-is-on-localhost + - uploader-address-malformed + - uploader-name-missing + - usr-share-doc-symlink-to-foreign-package diff --git a/data/authority/debconf-specification b/data/authority/debconf-specification new file mode 100644 index 0000000..e90568b --- /dev/null +++ b/data/authority/debconf-specification @@ -0,0 +1,18 @@ +# Data about titles, sections, and URLs of manuals, used to expand references +# in tag descriptions and add links for HTML output. Each line of this file +# has three fields separated by double colons: +# +#
:: :: <url> +# +# If <section> is an underscore, that line specifies the title and URL for the +# whole manual. + +_::Configuration management::https://www.debian.org/doc/packaging-manuals/debconf_specification.html +1::Introduction::https://www.debian.org/doc/packaging-manuals/debconf_specification.html#id-1.2 +2::Configuration Data::https://www.debian.org/doc/packaging-manuals/debconf_specification.html#id-1.3 +2.1::The configuration space::https://www.debian.org/doc/packaging-manuals/debconf_specification.html#id-1.3.2 +3::Templates::https://www.debian.org/doc/packaging-manuals/debconf_specification.html#id-1.4 +3.1::Template information::https://www.debian.org/doc/packaging-manuals/debconf_specification.html#id-1.4.4 +4::Configuration frontends::https://www.debian.org/doc/packaging-manuals/debconf_specification.html#id-1.5 +5::Communication with the frontend::https://www.debian.org/doc/packaging-manuals/debconf_specification.html#id-1.6 +6::Debian install-time configuration::https://www.debian.org/doc/packaging-manuals/debconf_specification.html#id-1.7 diff --git a/data/authority/debian-policy b/data/authority/debian-policy new file mode 100644 index 0000000..337d6d8 --- /dev/null +++ b/data/authority/debian-policy @@ -0,0 +1,279 @@ +# Data about titles, sections, and URLs of manuals, used to expand references +# in tag descriptions and add links for HTML output. Each line of this file +# has three fields separated by double colons: +# +# <section> :: <title> :: <url> +# +# If <section> is an underscore, that line specifies the title and URL for the +# whole manual. + +_::Debian Policy Manual::https://www.debian.org/doc/debian-policy/ +1::About this manual::https://www.debian.org/doc/debian-policy/ch-scope.html +1.1::Scope::https://www.debian.org/doc/debian-policy/ch-scope.html#scope +1.2::New versions of this document::https://www.debian.org/doc/debian-policy/ch-scope.html#new-versions-of-this-document +1.3::Authors and Maintainers::https://www.debian.org/doc/debian-policy/ch-scope.html#authors-and-maintainers +1.3.1::Early history::https://www.debian.org/doc/debian-policy/ch-scope.html#early-history +1.3.2::Current process::https://www.debian.org/doc/debian-policy/ch-scope.html#current-process +1.3.3::Improvements::https://www.debian.org/doc/debian-policy/ch-scope.html#improvements +1.4::Related documents::https://www.debian.org/doc/debian-policy/ch-scope.html#related-documents +1.5::Definitions::https://www.debian.org/doc/debian-policy/ch-scope.html#definitions +1.6::Translations::https://www.debian.org/doc/debian-policy/ch-scope.html#translations +2::The Debian Archive::https://www.debian.org/doc/debian-policy/ch-archive.html +2.1::The Debian Free Software Guidelines::https://www.debian.org/doc/debian-policy/ch-archive.html#the-debian-free-software-guidelines +2.2::Archive areas::https://www.debian.org/doc/debian-policy/ch-archive.html#archive-areas +2.2.1::The main archive area::https://www.debian.org/doc/debian-policy/ch-archive.html#the-main-archive-area +2.2.2::The contrib archive area::https://www.debian.org/doc/debian-policy/ch-archive.html#the-contrib-archive-area +2.2.3::The non-free archive area::https://www.debian.org/doc/debian-policy/ch-archive.html#the-non-free-archive-area +2.3::Copyright considerations::https://www.debian.org/doc/debian-policy/ch-archive.html#copyright-considerations +2.4::Sections::https://www.debian.org/doc/debian-policy/ch-archive.html#sections +2.5::Priorities::https://www.debian.org/doc/debian-policy/ch-archive.html#priorities +3::Binary packages::https://www.debian.org/doc/debian-policy/ch-binary.html +3.1::The package name::https://www.debian.org/doc/debian-policy/ch-binary.html#the-package-name +3.1.1::Packages with potentially offensive content::https://www.debian.org/doc/debian-policy/ch-binary.html#packages-with-potentially-offensive-content +3.2::The version of a package::https://www.debian.org/doc/debian-policy/ch-binary.html#the-version-of-a-package +3.2.1::Version numbers based on dates::https://www.debian.org/doc/debian-policy/ch-binary.html#version-numbers-based-on-dates +3.2.2::Uniqueness of version numbers::https://www.debian.org/doc/debian-policy/ch-binary.html#uniqueness-of-version-numbers +3.3::The maintainer of a package::https://www.debian.org/doc/debian-policy/ch-binary.html#the-maintainer-of-a-package +3.4::The description of a package::https://www.debian.org/doc/debian-policy/ch-binary.html#the-description-of-a-package +3.4.1::The single line synopsis::https://www.debian.org/doc/debian-policy/ch-binary.html#the-single-line-synopsis +3.4.2::The extended description::https://www.debian.org/doc/debian-policy/ch-binary.html#the-extended-description +3.5::Dependencies::https://www.debian.org/doc/debian-policy/ch-binary.html#dependencies +3.6::Virtual packages::https://www.debian.org/doc/debian-policy/ch-binary.html#virtual-packages +3.7::Base system::https://www.debian.org/doc/debian-policy/ch-binary.html#base-system +3.8::Essential packages::https://www.debian.org/doc/debian-policy/ch-binary.html#essential-packages +3.9::Maintainer Scripts::https://www.debian.org/doc/debian-policy/ch-binary.html#maintainer-scripts +3.9.1::Prompting in maintainer scripts::https://www.debian.org/doc/debian-policy/ch-binary.html#prompting-in-maintainer-scripts +4::Source packages::https://www.debian.org/doc/debian-policy/ch-source.html +4.1::Standards conformance::https://www.debian.org/doc/debian-policy/ch-source.html#standards-conformance +4.2::Package relationships::https://www.debian.org/doc/debian-policy/ch-source.html#package-relationships +4.3::Changes to the upstream sources::https://www.debian.org/doc/debian-policy/ch-source.html#changes-to-the-upstream-sources +4.4::Debian changelog: debian/changelog::https://www.debian.org/doc/debian-policy/ch-source.html#debian-changelog-debian-changelog +4.5::Copyright: debian/copyright::https://www.debian.org/doc/debian-policy/ch-source.html#copyright-debian-copyright +4.6::Error trapping in makefiles::https://www.debian.org/doc/debian-policy/ch-source.html#error-trapping-in-makefiles +4.7::Time Stamps::https://www.debian.org/doc/debian-policy/ch-source.html#time-stamps +4.8::Restrictions on objects in source packages::https://www.debian.org/doc/debian-policy/ch-source.html#restrictions-on-objects-in-source-packages +4.9::Main building script: debian/rules::https://www.debian.org/doc/debian-policy/ch-source.html#main-building-script-debian-rules +4.9.1::debian/rules and DEB_BUILD_OPTIONS::https://www.debian.org/doc/debian-policy/ch-source.html#debian-rules-and-deb-build-options +4.9.2::debian/rules and Rules-Requires-Root::https://www.debian.org/doc/debian-policy/ch-source.html#debian-rules-and-rules-requires-root +4.10::Variable substitutions: debian/substvars::https://www.debian.org/doc/debian-policy/ch-source.html#variable-substitutions-debian-substvars +4.11::Upstream source location: debian/watch::https://www.debian.org/doc/debian-policy/ch-source.html#upstream-source-location-debian-watch +4.12::Generated files list: debian/files::https://www.debian.org/doc/debian-policy/ch-source.html#generated-files-list-debian-files +4.13::Embedded code copies::https://www.debian.org/doc/debian-policy/ch-source.html#embedded-code-copies +4.14::Source package handling: debian/README.source::https://www.debian.org/doc/debian-policy/ch-source.html#source-package-handling-debian-readme-source +4.15::Reproducibility::https://www.debian.org/doc/debian-policy/ch-source.html#reproducibility +4.16::Missing sources: debian/missing-sources::https://www.debian.org/doc/debian-policy/ch-source.html#missing-sources-debian-missing-sources +4.17::Vendor-specific patch series::https://www.debian.org/doc/debian-policy/ch-source.html#vendor-specific-patch-series +5::Control files and their fields::https://www.debian.org/doc/debian-policy/ch-controlfields.html +5.1::Syntax of control files::https://www.debian.org/doc/debian-policy/ch-controlfields.html#syntax-of-control-files +5.2::Source package control files – debian/control::https://www.debian.org/doc/debian-policy/ch-controlfields.html#source-package-control-files-debian-control +5.3::Binary package control files – DEBIAN/control::https://www.debian.org/doc/debian-policy/ch-controlfields.html#binary-package-control-files-debian-control +5.4::Debian source control files – .dsc::https://www.debian.org/doc/debian-policy/ch-controlfields.html#debian-source-control-files-dsc +5.5::Debian changes files – .changes::https://www.debian.org/doc/debian-policy/ch-controlfields.html#debian-changes-files-changes +5.6::List of fields::https://www.debian.org/doc/debian-policy/ch-controlfields.html#list-of-fields +5.6.1::Source::https://www.debian.org/doc/debian-policy/ch-controlfields.html#source +5.6.2::Maintainer::https://www.debian.org/doc/debian-policy/ch-controlfields.html#maintainer +5.6.3::Uploaders::https://www.debian.org/doc/debian-policy/ch-controlfields.html#uploaders +5.6.4::Changed-By::https://www.debian.org/doc/debian-policy/ch-controlfields.html#changed-by +5.6.5::Section::https://www.debian.org/doc/debian-policy/ch-controlfields.html#section +5.6.6::Priority::https://www.debian.org/doc/debian-policy/ch-controlfields.html#priority +5.6.7::Package::https://www.debian.org/doc/debian-policy/ch-controlfields.html#package +5.6.8::Architecture::https://www.debian.org/doc/debian-policy/ch-controlfields.html#architecture +5.6.9::Essential::https://www.debian.org/doc/debian-policy/ch-controlfields.html#essential +5.6.10::Package interrelationship fields: Depends, Pre-Depends, Recommends, Suggests, Breaks, Conflicts, Provides, Replaces, Enhances::https://www.debian.org/doc/debian-policy/ch-controlfields.html#package-interrelationship-fields-depends-pre-depends-recommends-suggests-breaks-conflicts-provides-replaces-enhances +5.6.11::Standards-Version::https://www.debian.org/doc/debian-policy/ch-controlfields.html#standards-version +5.6.12::Version::https://www.debian.org/doc/debian-policy/ch-controlfields.html#version +5.6.12.1::Epochs should be used sparingly::https://www.debian.org/doc/debian-policy/ch-controlfields.html#epochs-should-be-used-sparingly +5.6.13::Description::https://www.debian.org/doc/debian-policy/ch-controlfields.html#description +5.6.14::Distribution::https://www.debian.org/doc/debian-policy/ch-controlfields.html#distribution +5.6.15::Date::https://www.debian.org/doc/debian-policy/ch-controlfields.html#date +5.6.16::Format::https://www.debian.org/doc/debian-policy/ch-controlfields.html#format +5.6.17::Urgency::https://www.debian.org/doc/debian-policy/ch-controlfields.html#urgency +5.6.18::Changes::https://www.debian.org/doc/debian-policy/ch-controlfields.html#changes +5.6.19::Binary::https://www.debian.org/doc/debian-policy/ch-controlfields.html#binary +5.6.20::Installed-Size::https://www.debian.org/doc/debian-policy/ch-controlfields.html#installed-size +5.6.21::Files::https://www.debian.org/doc/debian-policy/ch-controlfields.html#files +5.6.22::Closes::https://www.debian.org/doc/debian-policy/ch-controlfields.html#closes +5.6.23::Homepage::https://www.debian.org/doc/debian-policy/ch-controlfields.html#homepage +5.6.24::Checksums-Sha1 and Checksums-Sha256::https://www.debian.org/doc/debian-policy/ch-controlfields.html#checksums-sha1-and-checksums-sha256 +5.6.25::DM-Upload-Allowed::https://www.debian.org/doc/debian-policy/ch-controlfields.html#dm-upload-allowed +5.6.26::Version Control System (VCS) fields::https://www.debian.org/doc/debian-policy/ch-controlfields.html#version-control-system-vcs-fields +5.6.27::Package-List::https://www.debian.org/doc/debian-policy/ch-controlfields.html#package-list +5.6.28::Package-Type::https://www.debian.org/doc/debian-policy/ch-controlfields.html#package-type +5.6.29::Dgit::https://www.debian.org/doc/debian-policy/ch-controlfields.html#dgit +5.6.30::Testsuite::https://www.debian.org/doc/debian-policy/ch-controlfields.html#testsuite +5.6.31::Rules-Requires-Root::https://www.debian.org/doc/debian-policy/ch-controlfields.html#rules-requires-root +5.6.31.1::Remarks::https://www.debian.org/doc/debian-policy/ch-controlfields.html#remarks +5.6.31.2::Definition of the keywords::https://www.debian.org/doc/debian-policy/ch-controlfields.html#definition-of-the-keywords +5.6.31.3::Provided keywords::https://www.debian.org/doc/debian-policy/ch-controlfields.html#provided-keywords +5.7::User-defined fields::https://www.debian.org/doc/debian-policy/ch-controlfields.html#user-defined-fields +5.8::Obsolete fields::https://www.debian.org/doc/debian-policy/ch-controlfields.html#obsolete-fields +5.8.1::DM-Upload-Allowed::https://www.debian.org/doc/debian-policy/ch-controlfields.html#s-f-dm-upload-allowed +6::Package maintainer scripts and installation procedure::https://www.debian.org/doc/debian-policy/ch-maintainerscripts.html +6.1::Introduction to package maintainer scripts::https://www.debian.org/doc/debian-policy/ch-maintainerscripts.html#introduction-to-package-maintainer-scripts +6.2::Maintainer scripts idempotency::https://www.debian.org/doc/debian-policy/ch-maintainerscripts.html#maintainer-scripts-idempotency +6.3::Controlling terminal for maintainer scripts::https://www.debian.org/doc/debian-policy/ch-maintainerscripts.html#controlling-terminal-for-maintainer-scripts +6.4::Exit status::https://www.debian.org/doc/debian-policy/ch-maintainerscripts.html#exit-status +6.5::Summary of ways maintainer scripts are called::https://www.debian.org/doc/debian-policy/ch-maintainerscripts.html#summary-of-ways-maintainer-scripts-are-called +6.6::Details of unpack phase of installation or upgrade::https://www.debian.org/doc/debian-policy/ch-maintainerscripts.html#details-of-unpack-phase-of-installation-or-upgrade +6.7::Details of configuration::https://www.debian.org/doc/debian-policy/ch-maintainerscripts.html#details-of-configuration +6.8::Details of removal and/or configuration purging::https://www.debian.org/doc/debian-policy/ch-maintainerscripts.html#details-of-removal-and-or-configuration-purging +7::Declaring relationships between packages::https://www.debian.org/doc/debian-policy/ch-relationships.html +7.1::Syntax of relationship fields::https://www.debian.org/doc/debian-policy/ch-relationships.html#syntax-of-relationship-fields +7.2::Binary Dependencies - Depends, Recommends, Suggests, Enhances, Pre-Depends::https://www.debian.org/doc/debian-policy/ch-relationships.html#binary-dependencies-depends-recommends-suggests-enhances-pre-depends +7.3::Packages which break other packages - Breaks::https://www.debian.org/doc/debian-policy/ch-relationships.html#packages-which-break-other-packages-breaks +7.4::Conflicting binary packages - Conflicts::https://www.debian.org/doc/debian-policy/ch-relationships.html#conflicting-binary-packages-conflicts +7.5::Virtual packages - Provides::https://www.debian.org/doc/debian-policy/ch-relationships.html#virtual-packages-provides +7.6::Overwriting files and replacing packages - Replaces::https://www.debian.org/doc/debian-policy/ch-relationships.html#overwriting-files-and-replacing-packages-replaces +7.6.1::Overwriting files in other packages::https://www.debian.org/doc/debian-policy/ch-relationships.html#overwriting-files-in-other-packages +7.6.2::Replacing whole packages, forcing their removal::https://www.debian.org/doc/debian-policy/ch-relationships.html#replacing-whole-packages-forcing-their-removal +7.7::Relationships between source and binary packages - Build-Depends, Build-Depends-Indep, Build-Depends-Arch, Build-Conflicts, Build-Conflicts-Indep, Build-Conflicts-Arch::https://www.debian.org/doc/debian-policy/ch-relationships.html#relationships-between-source-and-binary-packages-build-depends-build-depends-indep-build-depends-arch-build-conflicts-build-conflicts-indep-build-conflicts-arch +7.8::Additional source packages used to build the binary - Built-Using::https://www.debian.org/doc/debian-policy/ch-relationships.html#additional-source-packages-used-to-build-the-binary-built-using +8::Shared libraries::https://www.debian.org/doc/debian-policy/ch-sharedlibs.html +8.1::Run-time shared libraries::https://www.debian.org/doc/debian-policy/ch-sharedlibs.html#run-time-shared-libraries +8.1.1::ldconfig::https://www.debian.org/doc/debian-policy/ch-sharedlibs.html#ldconfig +8.2::Shared library support files::https://www.debian.org/doc/debian-policy/ch-sharedlibs.html#shared-library-support-files +8.3::Static libraries::https://www.debian.org/doc/debian-policy/ch-sharedlibs.html#static-libraries +8.4::Development files::https://www.debian.org/doc/debian-policy/ch-sharedlibs.html#development-files +8.5::Dependencies between the packages of the same library::https://www.debian.org/doc/debian-policy/ch-sharedlibs.html#dependencies-between-the-packages-of-the-same-library +8.6::Dependencies between the library and other packages::https://www.debian.org/doc/debian-policy/ch-sharedlibs.html#dependencies-between-the-library-and-other-packages +8.6.1::Generating dependencies on shared libraries::https://www.debian.org/doc/debian-policy/ch-sharedlibs.html#generating-dependencies-on-shared-libraries +8.6.2::Shared library ABI changes::https://www.debian.org/doc/debian-policy/ch-sharedlibs.html#shared-library-abi-changes +8.6.3::The symbols system::https://www.debian.org/doc/debian-policy/ch-sharedlibs.html#the-symbols-system +8.6.3.1::The symbols files present on the system::https://www.debian.org/doc/debian-policy/ch-sharedlibs.html#the-symbols-files-present-on-the-system +8.6.3.2::The symbols File Format::https://www.debian.org/doc/debian-policy/ch-sharedlibs.html#the-symbols-file-format +8.6.3.3::Providing a symbols file::https://www.debian.org/doc/debian-policy/ch-sharedlibs.html#providing-a-symbols-file +8.6.4::The shlibs system::https://www.debian.org/doc/debian-policy/ch-sharedlibs.html#the-shlibs-system +8.6.4.1::The shlibs files present on the system::https://www.debian.org/doc/debian-policy/ch-sharedlibs.html#the-shlibs-files-present-on-the-system +8.6.4.2::The shlibs File Format::https://www.debian.org/doc/debian-policy/ch-sharedlibs.html#the-shlibs-file-format +8.6.4.3::Providing a shlibs file::https://www.debian.org/doc/debian-policy/ch-sharedlibs.html#providing-a-shlibs-file +9::The Operating System::https://www.debian.org/doc/debian-policy/ch-opersys.html +9.1::File system hierarchy::https://www.debian.org/doc/debian-policy/ch-opersys.html#file-system-hierarchy +9.1.1::File System Structure::https://www.debian.org/doc/debian-policy/ch-opersys.html#file-system-structure +9.1.2::Site-specific programs::https://www.debian.org/doc/debian-policy/ch-opersys.html#site-specific-programs +9.1.3::The system-wide mail directory::https://www.debian.org/doc/debian-policy/ch-opersys.html#the-system-wide-mail-directory +9.1.4::/run and /run/lock::https://www.debian.org/doc/debian-policy/ch-opersys.html#run-and-run-lock +9.2::Users and groups::https://www.debian.org/doc/debian-policy/ch-opersys.html#users-and-groups +9.2.1::Introduction::https://www.debian.org/doc/debian-policy/ch-opersys.html#introduction +9.2.2::UID and GID classes::https://www.debian.org/doc/debian-policy/ch-opersys.html#uid-and-gid-classes +9.2.3::Non-existent home directories::https://www.debian.org/doc/debian-policy/ch-opersys.html#non-existent-home-directories +9.3::Starting system services::https://www.debian.org/doc/debian-policy/ch-opersys.html#starting-system-services +9.3.1::Introduction::https://www.debian.org/doc/debian-policy/ch-opersys.html#s-services-intro +9.3.2::Writing the scripts::https://www.debian.org/doc/debian-policy/ch-opersys.html#writing-the-scripts +9.3.3::Interfacing with init systems::https://www.debian.org/doc/debian-policy/ch-opersys.html#interfacing-with-init-systems +9.3.3.1::Managing the links::https://www.debian.org/doc/debian-policy/ch-opersys.html#managing-the-links +9.3.3.2::Running init scripts::https://www.debian.org/doc/debian-policy/ch-opersys.html#running-init-scripts +9.3.4::Boot-time initialization::https://www.debian.org/doc/debian-policy/ch-opersys.html#boot-time-initialization +9.3.5::Example::https://www.debian.org/doc/debian-policy/ch-opersys.html#example +9.4::Console messages from init.d scripts::https://www.debian.org/doc/debian-policy/ch-opersys.html#console-messages-from-init-d-scripts +9.5::Cron jobs::https://www.debian.org/doc/debian-policy/ch-opersys.html#cron-jobs +9.5.1::Cron job file names::https://www.debian.org/doc/debian-policy/ch-opersys.html#cron-job-file-names +9.6::Menus::https://www.debian.org/doc/debian-policy/ch-opersys.html#menus +9.7::Multimedia handlers::https://www.debian.org/doc/debian-policy/ch-opersys.html#multimedia-handlers +9.7.1::Registration of media type handlers with desktop entries::https://www.debian.org/doc/debian-policy/ch-opersys.html#registration-of-media-type-handlers-with-desktop-entries +9.7.2::Registration of media type handlers with mailcap entries::https://www.debian.org/doc/debian-policy/ch-opersys.html#registration-of-media-type-handlers-with-mailcap-entries +9.7.3::Providing media types to files::https://www.debian.org/doc/debian-policy/ch-opersys.html#providing-media-types-to-files +9.8::Keyboard configuration::https://www.debian.org/doc/debian-policy/ch-opersys.html#keyboard-configuration +9.9::Environment variables::https://www.debian.org/doc/debian-policy/ch-opersys.html#environment-variables +9.10::Registering Documents using doc-base::https://www.debian.org/doc/debian-policy/ch-opersys.html#registering-documents-using-doc-base +9.11::Alternate init systems::https://www.debian.org/doc/debian-policy/ch-opersys.html#alternate-init-systems +9.11.1::Event-based boot with upstart::https://www.debian.org/doc/debian-policy/ch-opersys.html#event-based-boot-with-upstart +9.12::Signaling that a reboot is required::https://www.debian.org/doc/debian-policy/ch-opersys.html#signaling-that-a-reboot-is-required +10::Files::https://www.debian.org/doc/debian-policy/ch-files.html +10.1::Binaries::https://www.debian.org/doc/debian-policy/ch-files.html#binaries +10.2::Libraries::https://www.debian.org/doc/debian-policy/ch-files.html#libraries +10.3::Shared libraries::https://www.debian.org/doc/debian-policy/ch-files.html#shared-libraries +10.4::Scripts::https://www.debian.org/doc/debian-policy/ch-files.html#scripts +10.5::Symbolic links::https://www.debian.org/doc/debian-policy/ch-files.html#symbolic-links +10.6::Device files::https://www.debian.org/doc/debian-policy/ch-files.html#device-files +10.7::Configuration files::https://www.debian.org/doc/debian-policy/ch-files.html#configuration-files +10.7.1::Definitions::https://www.debian.org/doc/debian-policy/ch-files.html#definitions +10.7.2::Location::https://www.debian.org/doc/debian-policy/ch-files.html#location +10.7.3::Behavior::https://www.debian.org/doc/debian-policy/ch-files.html#behavior +10.7.4::Sharing configuration files::https://www.debian.org/doc/debian-policy/ch-files.html#sharing-configuration-files +10.7.5::User configuration files (“dotfiles”)::https://www.debian.org/doc/debian-policy/ch-files.html#user-configuration-files-dotfiles +10.8::Log files::https://www.debian.org/doc/debian-policy/ch-files.html#log-files +10.9::Permissions and owners::https://www.debian.org/doc/debian-policy/ch-files.html#permissions-and-owners +10.9.1::The use of dpkg-statoverride::https://www.debian.org/doc/debian-policy/ch-files.html#the-use-of-dpkg-statoverride +10.10::File names::https://www.debian.org/doc/debian-policy/ch-files.html#file-names +11::Customized programs::https://www.debian.org/doc/debian-policy/ch-customized-programs.html +11.1::Architecture specification strings::https://www.debian.org/doc/debian-policy/ch-customized-programs.html#architecture-specification-strings +11.1.1::Architecture wildcards::https://www.debian.org/doc/debian-policy/ch-customized-programs.html#architecture-wildcards +11.2::Daemons::https://www.debian.org/doc/debian-policy/ch-customized-programs.html#daemons +11.3::Using pseudo-ttys and modifying wtmp, utmp and lastlog::https://www.debian.org/doc/debian-policy/ch-customized-programs.html#using-pseudo-ttys-and-modifying-wtmp-utmp-and-lastlog +11.4::Editors and pagers::https://www.debian.org/doc/debian-policy/ch-customized-programs.html#editors-and-pagers +11.5::Web servers and applications::https://www.debian.org/doc/debian-policy/ch-customized-programs.html#web-servers-and-applications +11.6::Mail transport, delivery and user agents::https://www.debian.org/doc/debian-policy/ch-customized-programs.html#mail-transport-delivery-and-user-agents +11.7::News system configuration::https://www.debian.org/doc/debian-policy/ch-customized-programs.html#news-system-configuration +11.8::Programs for the X Window System::https://www.debian.org/doc/debian-policy/ch-customized-programs.html#programs-for-the-x-window-system +11.8.1::Providing X support and package priorities::https://www.debian.org/doc/debian-policy/ch-customized-programs.html#providing-x-support-and-package-priorities +11.8.2::Packages providing an X server::https://www.debian.org/doc/debian-policy/ch-customized-programs.html#packages-providing-an-x-server +11.8.3::Packages providing a terminal emulator::https://www.debian.org/doc/debian-policy/ch-customized-programs.html#packages-providing-a-terminal-emulator +11.8.4::Packages providing a window manager::https://www.debian.org/doc/debian-policy/ch-customized-programs.html#packages-providing-a-window-manager +11.8.5::Packages providing fonts::https://www.debian.org/doc/debian-policy/ch-customized-programs.html#packages-providing-fonts +11.8.6::Application defaults files::https://www.debian.org/doc/debian-policy/ch-customized-programs.html#application-defaults-files +11.8.7::Installation directory issues::https://www.debian.org/doc/debian-policy/ch-customized-programs.html#installation-directory-issues +11.9::Perl programs and modules::https://www.debian.org/doc/debian-policy/ch-customized-programs.html#perl-programs-and-modules +11.10::Emacs lisp programs::https://www.debian.org/doc/debian-policy/ch-customized-programs.html#emacs-lisp-programs +11.11::Games::https://www.debian.org/doc/debian-policy/ch-customized-programs.html#games +12::Documentation::https://www.debian.org/doc/debian-policy/ch-docs.html +12.1::Manual pages::https://www.debian.org/doc/debian-policy/ch-docs.html#manual-pages +12.2::Info documents::https://www.debian.org/doc/debian-policy/ch-docs.html#info-documents +12.3::Additional documentation::https://www.debian.org/doc/debian-policy/ch-docs.html#additional-documentation +12.4::Preferred documentation formats::https://www.debian.org/doc/debian-policy/ch-docs.html#preferred-documentation-formats +12.5::Copyright information::https://www.debian.org/doc/debian-policy/ch-docs.html#copyright-information +12.5.1::Machine-readable copyright information::https://www.debian.org/doc/debian-policy/ch-docs.html#machine-readable-copyright-information +12.6::Examples::https://www.debian.org/doc/debian-policy/ch-docs.html#examples +12.7::Changelog files and release notes::https://www.debian.org/doc/debian-policy/ch-docs.html#changelog-files-and-release-notes +appendix-1::Introduction and scope of these appendices::https://www.debian.org/doc/debian-policy/ap-pkg-scope.html +appendix-2::Binary packages (from old Packaging Manual)::https://www.debian.org/doc/debian-policy/ap-pkg-binarypkg.html +appendix-2.1::Creating package files - dpkg-deb::https://www.debian.org/doc/debian-policy/ap-pkg-binarypkg.html#creating-package-files-dpkg-deb +appendix-2.2::Package control information files::https://www.debian.org/doc/debian-policy/ap-pkg-binarypkg.html#package-control-information-files +appendix-2.3::The main control information file: control::https://www.debian.org/doc/debian-policy/ap-pkg-binarypkg.html#the-main-control-information-file-control +appendix-2.4::Time Stamps::https://www.debian.org/doc/debian-policy/ap-pkg-binarypkg.html#time-stamps +appendix-3::Source packages (from old Packaging Manual)::https://www.debian.org/doc/debian-policy/ap-pkg-sourcepkg.html +appendix-3.1::Tools for processing source packages::https://www.debian.org/doc/debian-policy/ap-pkg-sourcepkg.html#tools-for-processing-source-packages +appendix-3.1.1::dpkg-source - packs and unpacks Debian source packages::https://www.debian.org/doc/debian-policy/ap-pkg-sourcepkg.html#dpkg-source-packs-and-unpacks-debian-source-packages +appendix-3.1.2::dpkg-buildpackage - overall package-building control script::https://www.debian.org/doc/debian-policy/ap-pkg-sourcepkg.html#dpkg-buildpackage-overall-package-building-control-script +appendix-3.1.3::dpkg-gencontrol - generates binary package control files::https://www.debian.org/doc/debian-policy/ap-pkg-sourcepkg.html#dpkg-gencontrol-generates-binary-package-control-files +appendix-3.1.4::dpkg-shlibdeps - calculates shared library dependencies::https://www.debian.org/doc/debian-policy/ap-pkg-sourcepkg.html#dpkg-shlibdeps-calculates-shared-library-dependencies +appendix-3.1.5::dpkg-distaddfile - adds a file to debian/files::https://www.debian.org/doc/debian-policy/ap-pkg-sourcepkg.html#dpkg-distaddfile-adds-a-file-to-debian-files +appendix-3.1.6::dpkg-genchanges - generates a .changes upload control file::https://www.debian.org/doc/debian-policy/ap-pkg-sourcepkg.html#dpkg-genchanges-generates-a-changes-upload-control-file +appendix-3.1.7::dpkg-parsechangelog - produces parsed representation of a changelog::https://www.debian.org/doc/debian-policy/ap-pkg-sourcepkg.html#dpkg-parsechangelog-produces-parsed-representation-of-a-changelog +appendix-3.1.8::dpkg-architecture - information about the build and host system::https://www.debian.org/doc/debian-policy/ap-pkg-sourcepkg.html#dpkg-architecture-information-about-the-build-and-host-system +appendix-3.2::The Debian package source tree::https://www.debian.org/doc/debian-policy/ap-pkg-sourcepkg.html#the-debian-package-source-tree +appendix-3.2.1::debian/rules - the main building script::https://www.debian.org/doc/debian-policy/ap-pkg-sourcepkg.html#debian-rules-the-main-building-script +appendix-3.2.2::debian/substvars and variable substitutions::https://www.debian.org/doc/debian-policy/ap-pkg-sourcepkg.html#debian-substvars-and-variable-substitutions +appendix-3.2.3::debian/files::https://www.debian.org/doc/debian-policy/ap-pkg-sourcepkg.html#debian-files +appendix-3.2.4::debian/tmp::https://www.debian.org/doc/debian-policy/ap-pkg-sourcepkg.html#debian-tmp +appendix-3.3::Source packages as archives::https://www.debian.org/doc/debian-policy/ap-pkg-sourcepkg.html#source-packages-as-archives +appendix-3.4::Unpacking a Debian source package without dpkg-source::https://www.debian.org/doc/debian-policy/ap-pkg-sourcepkg.html#unpacking-a-debian-source-package-without-dpkg-source +appendix-3.4.1::Restrictions on objects in source packages::https://www.debian.org/doc/debian-policy/ap-pkg-sourcepkg.html#restrictions-on-objects-in-source-packages +appendix-4::Control files and their fields (from old Packaging Manual)::https://www.debian.org/doc/debian-policy/ap-pkg-controlfields.html +appendix-4.1::Syntax of control files::https://www.debian.org/doc/debian-policy/ap-pkg-controlfields.html#syntax-of-control-files +appendix-4.2::List of fields::https://www.debian.org/doc/debian-policy/ap-pkg-controlfields.html#list-of-fields +appendix-4.2.1::Filename and MSDOS-Filename::https://www.debian.org/doc/debian-policy/ap-pkg-controlfields.html#filename-and-msdos-filename +appendix-4.2.2::Size and MD5sum::https://www.debian.org/doc/debian-policy/ap-pkg-controlfields.html#size-and-md5sum +appendix-4.2.3::Status::https://www.debian.org/doc/debian-policy/ap-pkg-controlfields.html#status +appendix-4.2.4::Config-Version::https://www.debian.org/doc/debian-policy/ap-pkg-controlfields.html#config-version +appendix-4.2.5::Conffiles::https://www.debian.org/doc/debian-policy/ap-pkg-controlfields.html#conffiles +appendix-4.2.6::Obsolete fields::https://www.debian.org/doc/debian-policy/ap-pkg-controlfields.html#obsolete-fields +appendix-5::Configuration file handling (from old Packaging Manual)::https://www.debian.org/doc/debian-policy/ap-pkg-conffiles.html +appendix-5.1::Automatic handling of configuration files by dpkg::https://www.debian.org/doc/debian-policy/ap-pkg-conffiles.html#automatic-handling-of-configuration-files-by-dpkg +appendix-5.2::Fully-featured maintainer script configuration handling::https://www.debian.org/doc/debian-policy/ap-pkg-conffiles.html#fully-featured-maintainer-script-configuration-handling +appendix-6::Alternative versions of an interface - update-alternatives (from old Packaging Manual)::https://www.debian.org/doc/debian-policy/ap-pkg-alternatives.html +appendix-7::Diversions - overriding a package’s version of a file (from old Packaging Manual)::https://www.debian.org/doc/debian-policy/ap-pkg-diversions.html +appendix-8::Debian Policy changes process::https://www.debian.org/doc/debian-policy/ap-process.html +appendix-8.1::Introduction::https://www.debian.org/doc/debian-policy/ap-process.html#introduction +appendix-8.2::Change Goals::https://www.debian.org/doc/debian-policy/ap-process.html#change-goals +appendix-8.3::Current Process::https://www.debian.org/doc/debian-policy/ap-process.html#current-process +appendix-8.3.1::State A: More information required::https://www.debian.org/doc/debian-policy/ap-process.html#state-a-more-information-required +appendix-8.3.2::State B: Discussion::https://www.debian.org/doc/debian-policy/ap-process.html#state-b-discussion +appendix-8.3.3::State C: Proposal::https://www.debian.org/doc/debian-policy/ap-process.html#state-c-proposal +appendix-8.3.4::State D: Wording proposed::https://www.debian.org/doc/debian-policy/ap-process.html#state-d-wording-proposed +appendix-8.3.5::State E: Seconded::https://www.debian.org/doc/debian-policy/ap-process.html#state-e-seconded +appendix-8.3.6::State F: Accepted::https://www.debian.org/doc/debian-policy/ap-process.html#state-f-accepted +appendix-8.3.7::State G: Reject::https://www.debian.org/doc/debian-policy/ap-process.html#state-g-reject +appendix-8.4::Other Tags::https://www.debian.org/doc/debian-policy/ap-process.html#other-tags +appendix-9::Maintainer script flowcharts::https://www.debian.org/doc/debian-policy/ap-flowcharts.html +appendix-10::Upgrading checklist::https://www.debian.org/doc/debian-policy/upgrading-checklist.html +appendix-11::License::https://www.debian.org/doc/debian-policy/ap-license.html diff --git a/data/authority/developer-reference b/data/authority/developer-reference new file mode 100644 index 0000000..35ec652 --- /dev/null +++ b/data/authority/developer-reference @@ -0,0 +1,276 @@ +# Data about titles, sections, and URLs of manuals, used to expand references +# in tag descriptions and add links for HTML output. Each line of this file +# has three fields separated by double colons: +# +# <section> :: <title> :: <url> +# +# If <section> is an underscore, that line specifies the title and URL for the +# whole manual. + +_::Debian Developer's Reference::https://www.debian.org/doc/developers-reference/ +1::Scope of This Document::https://www.debian.org/doc/developers-reference/scope.html +2::Applying to Become a Member::https://www.debian.org/doc/developers-reference/new-maintainer.html +2.1::Getting started::https://www.debian.org/doc/developers-reference/new-maintainer.html#getting-started +2.2::Debian mentors and sponsors::https://www.debian.org/doc/developers-reference/new-maintainer.html#debian-mentors-and-sponsors +2.3::Registering as a Debian member::https://www.debian.org/doc/developers-reference/new-maintainer.html#registering-as-a-debian-member +3::Debian Developer's Duties::https://www.debian.org/doc/developers-reference/developer-duties.html +3.1::Package Maintainer's Duties::https://www.debian.org/doc/developers-reference/developer-duties.html#package-maintainer-s-duties +3.1.1::Work towards the next stable release::https://www.debian.org/doc/developers-reference/developer-duties.html#work-towards-the-next-stable-release +3.1.2::Maintain packages in stable::https://www.debian.org/doc/developers-reference/developer-duties.html#maintain-packages-in-stable +3.1.3::Manage release-critical bugs::https://www.debian.org/doc/developers-reference/developer-duties.html#manage-release-critical-bugs +3.1.4::Coordination with upstream developers::https://www.debian.org/doc/developers-reference/developer-duties.html#coordination-with-upstream-developers +3.2::Administrative Duties::https://www.debian.org/doc/developers-reference/developer-duties.html#administrative-duties +3.2.1::Maintaining your Debian information::https://www.debian.org/doc/developers-reference/developer-duties.html#maintaining-your-debian-information +3.2.2::Maintaining your public key::https://www.debian.org/doc/developers-reference/developer-duties.html#maintaining-your-public-key +3.2.3::Voting::https://www.debian.org/doc/developers-reference/developer-duties.html#voting +3.2.4::Going on vacation gracefully::https://www.debian.org/doc/developers-reference/developer-duties.html#going-on-vacation-gracefully +3.2.5::Retiring::https://www.debian.org/doc/developers-reference/developer-duties.html#retiring +3.2.6::Returning after retirement::https://www.debian.org/doc/developers-reference/developer-duties.html#returning-after-retirement +4::Resources for Debian Members::https://www.debian.org/doc/developers-reference/resources.html +4.1::Mailing lists::https://www.debian.org/doc/developers-reference/resources.html#mailing-lists +4.1.1::Basic rules for use::https://www.debian.org/doc/developers-reference/resources.html#basic-rules-for-use +4.1.2::Core development mailing lists::https://www.debian.org/doc/developers-reference/resources.html#core-development-mailing-lists +4.1.3::Special lists::https://www.debian.org/doc/developers-reference/resources.html#special-lists +4.1.4::Requesting new development-related lists::https://www.debian.org/doc/developers-reference/resources.html#requesting-new-development-related-lists +4.2::IRC channels::https://www.debian.org/doc/developers-reference/resources.html#irc-channels +4.3::Documentation::https://www.debian.org/doc/developers-reference/resources.html#documentation +4.4::Debian machines::https://www.debian.org/doc/developers-reference/resources.html#debian-machines +4.4.1::The bugs server::https://www.debian.org/doc/developers-reference/resources.html#the-bugs-server +4.4.2::The ftp-master server::https://www.debian.org/doc/developers-reference/resources.html#the-ftp-master-server +4.4.3::The www-master server::https://www.debian.org/doc/developers-reference/resources.html#the-www-master-server +4.4.4::The people web server::https://www.debian.org/doc/developers-reference/resources.html#the-people-web-server +4.4.5::salsa.debian.org: Git repositories and collaborative development platform::https://www.debian.org/doc/developers-reference/resources.html#salsa-debian-org-git-repositories-and-collaborative-development-platform +4.4.6::chroots to different distributions::https://www.debian.org/doc/developers-reference/resources.html#chroots-to-different-distributions +4.5::The Developers Database::https://www.debian.org/doc/developers-reference/resources.html#the-developers-database +4.6::The Debian archive::https://www.debian.org/doc/developers-reference/resources.html#the-debian-archive +4.6.1::Sections::https://www.debian.org/doc/developers-reference/resources.html#sections +4.6.2::Architectures::https://www.debian.org/doc/developers-reference/resources.html#architectures +4.6.3::Packages::https://www.debian.org/doc/developers-reference/resources.html#packages +4.6.4::Distributions::https://www.debian.org/doc/developers-reference/resources.html#distributions +4.6.4.1::Stable, testing, and unstable::https://www.debian.org/doc/developers-reference/resources.html#stable-testing-and-unstable +4.6.4.2::More information about the testing distribution::https://www.debian.org/doc/developers-reference/resources.html#more-information-about-the-testing-distribution +4.6.4.3::Experimental::https://www.debian.org/doc/developers-reference/resources.html#experimental +4.6.5::Release code names::https://www.debian.org/doc/developers-reference/resources.html#release-code-names +4.7::Debian mirrors::https://www.debian.org/doc/developers-reference/resources.html#debian-mirrors +4.8::The Incoming system::https://www.debian.org/doc/developers-reference/resources.html#the-incoming-system +4.9::Package information::https://www.debian.org/doc/developers-reference/resources.html#package-information +4.9.1::On the web::https://www.debian.org/doc/developers-reference/resources.html#on-the-web +4.9.2::The dak ls utility::https://www.debian.org/doc/developers-reference/resources.html#the-dak-ls-utility +4.10::The Debian Package Tracker::https://www.debian.org/doc/developers-reference/resources.html#the-debian-package-tracker +4.11::Developer's packages overview::https://www.debian.org/doc/developers-reference/resources.html#developer-s-packages-overview +4.12::Debian's FusionForge installation: Alioth::https://www.debian.org/doc/developers-reference/resources.html#debian-s-fusionforge-installation-alioth +4.13::Goodies for Debian Members::https://www.debian.org/doc/developers-reference/resources.html#goodies-for-debian-members +5::Managing Packages::https://www.debian.org/doc/developers-reference/pkgs.html +5.1::New packages::https://www.debian.org/doc/developers-reference/pkgs.html#new-packages +5.2::Recording changes in the package::https://www.debian.org/doc/developers-reference/pkgs.html#recording-changes-in-the-package +5.3::Testing the package::https://www.debian.org/doc/developers-reference/pkgs.html#testing-the-package +5.4::Layout of the source package::https://www.debian.org/doc/developers-reference/pkgs.html#layout-of-the-source-package +5.5::Picking a distribution::https://www.debian.org/doc/developers-reference/pkgs.html#picking-a-distribution +5.5.1::Special case: uploads to the stable and oldstable distributions::https://www.debian.org/doc/developers-reference/pkgs.html#special-case-uploads-to-the-stable-and-oldstable-distributions +5.5.2::Special case: the stable-updates suite::https://www.debian.org/doc/developers-reference/pkgs.html#special-case-the-stable-updates-suite +5.5.3::Special case: uploads to testing/testing-proposed-updates::https://www.debian.org/doc/developers-reference/pkgs.html#special-case-uploads-to-testing-testing-proposed-updates +5.6::Uploading a package::https://www.debian.org/doc/developers-reference/pkgs.html#uploading-a-package +5.6.1::Uploading to ftp-master::https://www.debian.org/doc/developers-reference/pkgs.html#uploading-to-ftp-master +5.6.2::Delayed uploads::https://www.debian.org/doc/developers-reference/pkgs.html#delayed-uploads +5.6.3::Security uploads::https://www.debian.org/doc/developers-reference/pkgs.html#security-uploads +5.6.4::Other upload queues::https://www.debian.org/doc/developers-reference/pkgs.html#other-upload-queues +5.6.5::Notifications::https://www.debian.org/doc/developers-reference/pkgs.html#notifications +5.7::Specifying the package section, subsection and priority::https://www.debian.org/doc/developers-reference/pkgs.html#specifying-the-package-section-subsection-and-priority +5.8::Handling bugs::https://www.debian.org/doc/developers-reference/pkgs.html#handling-bugs +5.8.1::Monitoring bugs::https://www.debian.org/doc/developers-reference/pkgs.html#monitoring-bugs +5.8.2::Responding to bugs::https://www.debian.org/doc/developers-reference/pkgs.html#responding-to-bugs +5.8.3::Bug housekeeping::https://www.debian.org/doc/developers-reference/pkgs.html#bug-housekeeping +5.8.4::When bugs are closed by new uploads::https://www.debian.org/doc/developers-reference/pkgs.html#when-bugs-are-closed-by-new-uploads +5.8.5::Handling security-related bugs::https://www.debian.org/doc/developers-reference/pkgs.html#handling-security-related-bugs +5.8.5.1::Debian Security Tracker::https://www.debian.org/doc/developers-reference/pkgs.html#debian-security-tracker +5.8.5.2::Confidentiality::https://www.debian.org/doc/developers-reference/pkgs.html#confidentiality +5.8.5.3::Security Advisories::https://www.debian.org/doc/developers-reference/pkgs.html#security-advisories +5.8.5.4::Preparing packages to address security issues::https://www.debian.org/doc/developers-reference/pkgs.html#preparing-packages-to-address-security-issues +5.8.5.5::Uploading the fixed package::https://www.debian.org/doc/developers-reference/pkgs.html#uploading-the-fixed-package +5.9::Moving, removing, renaming, orphaning, adopting, and reintroducing packages::https://www.debian.org/doc/developers-reference/pkgs.html#moving-removing-renaming-orphaning-adopting-and-reintroducing-packages +5.9.1::Moving packages::https://www.debian.org/doc/developers-reference/pkgs.html#moving-packages +5.9.2::Removing packages::https://www.debian.org/doc/developers-reference/pkgs.html#removing-packages +5.9.2.1::Removing packages from Incoming::https://www.debian.org/doc/developers-reference/pkgs.html#removing-packages-from-incoming +5.9.3::Replacing or renaming packages::https://www.debian.org/doc/developers-reference/pkgs.html#replacing-or-renaming-packages +5.9.4::Orphaning a package::https://www.debian.org/doc/developers-reference/pkgs.html#orphaning-a-package +5.9.5::Adopting a package::https://www.debian.org/doc/developers-reference/pkgs.html#adopting-a-package +5.9.6::Reintroducing packages::https://www.debian.org/doc/developers-reference/pkgs.html#reintroducing-packages +5.10::Porting and being ported::https://www.debian.org/doc/developers-reference/pkgs.html#porting-and-being-ported +5.10.1::Being kind to porters::https://www.debian.org/doc/developers-reference/pkgs.html#being-kind-to-porters +5.10.2::Guidelines for porter uploads::https://www.debian.org/doc/developers-reference/pkgs.html#guidelines-for-porter-uploads +5.10.2.1::Recompilation or binary-only NMU::https://www.debian.org/doc/developers-reference/pkgs.html#recompilation-or-binary-only-nmu +5.10.2.2::When to do a source NMU if you are a porter::https://www.debian.org/doc/developers-reference/pkgs.html#when-to-do-a-source-nmu-if-you-are-a-porter +5.10.3::Porting infrastructure and automation::https://www.debian.org/doc/developers-reference/pkgs.html#porting-infrastructure-and-automation +5.10.3.1::Mailing lists and web pages::https://www.debian.org/doc/developers-reference/pkgs.html#mailing-lists-and-web-pages +5.10.3.2::Porter tools::https://www.debian.org/doc/developers-reference/pkgs.html#porter-tools +5.10.3.3::wanna-build::https://www.debian.org/doc/developers-reference/pkgs.html#wanna-build +5.10.4::When your package is not portable::https://www.debian.org/doc/developers-reference/pkgs.html#when-your-package-is-not-portable +5.10.5::Marking non-free packages as auto-buildable::https://www.debian.org/doc/developers-reference/pkgs.html#marking-non-free-packages-as-auto-buildable +5.11::Non-Maintainer Uploads (NMUs)::https://www.debian.org/doc/developers-reference/pkgs.html#non-maintainer-uploads-nmus +5.11.1::When and how to do an NMU::https://www.debian.org/doc/developers-reference/pkgs.html#when-and-how-to-do-an-nmu +5.11.2::NMUs and debian/changelog::https://www.debian.org/doc/developers-reference/pkgs.html#nmus-and-debian-changelog +5.11.3::Using the DELAYED/ queue::https://www.debian.org/doc/developers-reference/pkgs.html#using-the-delayed-queue +5.11.4::NMUs from the maintainer's point of view::https://www.debian.org/doc/developers-reference/pkgs.html#nmus-from-the-maintainer-s-point-of-view +5.11.5::Source NMUs vs Binary-only NMUs (binNMUs)::https://www.debian.org/doc/developers-reference/pkgs.html#source-nmus-vs-binary-only-nmus-binnmus +5.11.6::NMUs vs QA uploads::https://www.debian.org/doc/developers-reference/pkgs.html#nmus-vs-qa-uploads +5.11.7::NMUs vs team uploads::https://www.debian.org/doc/developers-reference/pkgs.html#nmus-vs-team-uploads +5.12::Package Salvaging::https://www.debian.org/doc/developers-reference/pkgs.html#package-salvaging +5.12.1::When a package is eligible for package salvaging::https://www.debian.org/doc/developers-reference/pkgs.html#when-a-package-is-eligible-for-package-salvaging +5.12.2::How to salvage a package::https://www.debian.org/doc/developers-reference/pkgs.html#how-to-salvage-a-package +5.13::Collaborative maintenance::https://www.debian.org/doc/developers-reference/pkgs.html#collaborative-maintenance +5.14::The testing distribution::https://www.debian.org/doc/developers-reference/pkgs.html#the-testing-distribution +5.14.1::Basics::https://www.debian.org/doc/developers-reference/pkgs.html#basics +5.14.2::Updates from unstable::https://www.debian.org/doc/developers-reference/pkgs.html#updates-from-unstable +5.14.2.1::Out-of-date::https://www.debian.org/doc/developers-reference/pkgs.html#out-of-date +5.14.2.2::Removals from testing::https://www.debian.org/doc/developers-reference/pkgs.html#removals-from-testing +5.14.2.3::Circular dependencies::https://www.debian.org/doc/developers-reference/pkgs.html#circular-dependencies +5.14.2.4::Influence of package in testing::https://www.debian.org/doc/developers-reference/pkgs.html#influence-of-package-in-testing +5.14.2.5::Details::https://www.debian.org/doc/developers-reference/pkgs.html#details +5.14.3::Direct updates to testing::https://www.debian.org/doc/developers-reference/pkgs.html#direct-updates-to-testing +5.14.4::Frequently asked questions::https://www.debian.org/doc/developers-reference/pkgs.html#frequently-asked-questions +5.14.4.1::What are release-critical bugs, and how do they get counted?::https://www.debian.org/doc/developers-reference/pkgs.html#what-are-release-critical-bugs-and-how-do-they-get-counted +5.14.4.2::How could installing a package into testing possibly break other packages?::https://www.debian.org/doc/developers-reference/pkgs.html#how-could-installing-a-package-into-testing-possibly-break-other-packages +5.15::The Stable backports archive::https://www.debian.org/doc/developers-reference/pkgs.html#the-stable-backports-archive +5.15.1::Basics::https://www.debian.org/doc/developers-reference/pkgs.html#backports-rules +5.15.2::Exception to the testing-first rule::https://www.debian.org/doc/developers-reference/pkgs.html#exception-to-the-testing-first-rule +5.15.3::Who can maintain packages in the stable-backports archive?::https://www.debian.org/doc/developers-reference/pkgs.html#who-can-maintain-packages-in-the-stable-backports-archive +5.15.4::When can one start uploading to stable-backports?::https://www.debian.org/doc/developers-reference/pkgs.html#when-can-one-start-uploading-to-stable-backports +5.15.5::How long must a package be maintained when uploaded to stable-backports?::https://www.debian.org/doc/developers-reference/pkgs.html#how-long-must-a-package-be-maintained-when-uploaded-to-stable-backports +5.15.6::How often shall one upload to stable-backports?::https://www.debian.org/doc/developers-reference/pkgs.html#how-often-shall-one-upload-to-stable-backports +5.15.7::How can one learn more about backporting?::https://www.debian.org/doc/developers-reference/pkgs.html#how-can-one-learn-more-about-backporting +6::Best Packaging Practices::https://www.debian.org/doc/developers-reference/best-pkging-practices.html +6.1::Best practices for debian/rules::https://www.debian.org/doc/developers-reference/best-pkging-practices.html#best-practices-for-debian-rules +6.1.1::Helper scripts::https://www.debian.org/doc/developers-reference/best-pkging-practices.html#helper-scripts +6.1.2::Separating your patches into multiple files::https://www.debian.org/doc/developers-reference/best-pkging-practices.html#separating-your-patches-into-multiple-files +6.1.3::Multiple binary packages::https://www.debian.org/doc/developers-reference/best-pkging-practices.html#multiple-binary-packages +6.2::Best practices for debian/control::https://www.debian.org/doc/developers-reference/best-pkging-practices.html#best-practices-for-debian-control +6.2.1::General guidelines for package descriptions::https://www.debian.org/doc/developers-reference/best-pkging-practices.html#general-guidelines-for-package-descriptions +6.2.2::The package synopsis, or short description::https://www.debian.org/doc/developers-reference/best-pkging-practices.html#the-package-synopsis-or-short-description +6.2.3::The long description::https://www.debian.org/doc/developers-reference/best-pkging-practices.html#the-long-description +6.2.4::Upstream home page::https://www.debian.org/doc/developers-reference/best-pkging-practices.html#upstream-home-page +6.2.5::Version Control System location::https://www.debian.org/doc/developers-reference/best-pkging-practices.html#version-control-system-location +6.2.5.1::Vcs-Browser::https://www.debian.org/doc/developers-reference/best-pkging-practices.html#vcs-browser +6.2.5.2::Vcs-*::https://www.debian.org/doc/developers-reference/best-pkging-practices.html#vcs +6.3::Best practices for debian/changelog::https://www.debian.org/doc/developers-reference/best-pkging-practices.html#best-practices-for-debian-changelog +6.3.1::Writing useful changelog entries::https://www.debian.org/doc/developers-reference/best-pkging-practices.html#writing-useful-changelog-entries +6.3.2::Selecting the upload urgency::https://www.debian.org/doc/developers-reference/best-pkging-practices.html#selecting-the-upload-urgency +6.3.3::Common misconceptions about changelog entries::https://www.debian.org/doc/developers-reference/best-pkging-practices.html#common-misconceptions-about-changelog-entries +6.3.4::Common errors in changelog entries::https://www.debian.org/doc/developers-reference/best-pkging-practices.html#common-errors-in-changelog-entries +6.3.5::Supplementing changelogs with NEWS.Debian files::https://www.debian.org/doc/developers-reference/best-pkging-practices.html#supplementing-changelogs-with-news-debian-files +6.4::Best practices around security::https://www.debian.org/doc/developers-reference/best-pkging-practices.html#best-practices-around-security +6.5::Best practices for maintainer scripts::https://www.debian.org/doc/developers-reference/best-pkging-practices.html#best-practices-for-maintainer-scripts +6.6::Configuration management with debconf::https://www.debian.org/doc/developers-reference/best-pkging-practices.html#configuration-management-with-debconf +6.6.1::Do not abuse debconf::https://www.debian.org/doc/developers-reference/best-pkging-practices.html#do-not-abuse-debconf +6.6.2::General recommendations for authors and translators::https://www.debian.org/doc/developers-reference/best-pkging-practices.html#general-recommendations-for-authors-and-translators +6.6.2.1::Write correct English::https://www.debian.org/doc/developers-reference/best-pkging-practices.html#write-correct-english +6.6.2.2::Be kind to translators::https://www.debian.org/doc/developers-reference/best-pkging-practices.html#be-kind-to-translators +6.6.2.3::Unfuzzy complete translations when correcting typos and spelling::https://www.debian.org/doc/developers-reference/best-pkging-practices.html#unfuzzy-complete-translations-when-correcting-typos-and-spelling +6.6.2.4::Do not make assumptions about interfaces::https://www.debian.org/doc/developers-reference/best-pkging-practices.html#do-not-make-assumptions-about-interfaces +6.6.2.5::Do not use first person::https://www.debian.org/doc/developers-reference/best-pkging-practices.html#do-not-use-first-person +6.6.2.6::Be gender neutral::https://www.debian.org/doc/developers-reference/best-pkging-practices.html#be-gender-neutral +6.6.3::Templates fields definition::https://www.debian.org/doc/developers-reference/best-pkging-practices.html#templates-fields-definition +6.6.3.1::Type::https://www.debian.org/doc/developers-reference/best-pkging-practices.html#type +6.6.3.2::Description: short and extended description::https://www.debian.org/doc/developers-reference/best-pkging-practices.html#description-short-and-extended-description +6.6.3.3::Choices::https://www.debian.org/doc/developers-reference/best-pkging-practices.html#choices +6.6.3.4::Default::https://www.debian.org/doc/developers-reference/best-pkging-practices.html#default +6.6.4::Template fields specific style guide::https://www.debian.org/doc/developers-reference/best-pkging-practices.html#template-fields-specific-style-guide +6.6.4.1::Type field::https://www.debian.org/doc/developers-reference/best-pkging-practices.html#type-field +6.6.4.2::Description field::https://www.debian.org/doc/developers-reference/best-pkging-practices.html#description-field +6.6.4.3::Choices field::https://www.debian.org/doc/developers-reference/best-pkging-practices.html#choices-field +6.6.4.4::Default field::https://www.debian.org/doc/developers-reference/best-pkging-practices.html#default-field +6.7::Internationalization::https://www.debian.org/doc/developers-reference/best-pkging-practices.html#internationalization +6.7.1::Handling debconf translations::https://www.debian.org/doc/developers-reference/best-pkging-practices.html#handling-debconf-translations +6.7.2::Internationalized documentation::https://www.debian.org/doc/developers-reference/best-pkging-practices.html#internationalized-documentation +6.8::Common packaging situations::https://www.debian.org/doc/developers-reference/best-pkging-practices.html#common-packaging-situations +6.8.1::Packages using autoconf/automake::https://www.debian.org/doc/developers-reference/best-pkging-practices.html#packages-using-autoconf-automake +6.8.2::Libraries::https://www.debian.org/doc/developers-reference/best-pkging-practices.html#libraries +6.8.3::Documentation::https://www.debian.org/doc/developers-reference/best-pkging-practices.html#documentation +6.8.4::Specific types of packages::https://www.debian.org/doc/developers-reference/best-pkging-practices.html#specific-types-of-packages +6.8.5::Architecture-independent data::https://www.debian.org/doc/developers-reference/best-pkging-practices.html#architecture-independent-data +6.8.6::Needing a certain locale during build::https://www.debian.org/doc/developers-reference/best-pkging-practices.html#needing-a-certain-locale-during-build +6.8.7::Make transition packages deborphan compliant::https://www.debian.org/doc/developers-reference/best-pkging-practices.html#make-transition-packages-deborphan-compliant +6.8.8::Best practices for .orig.tar.{gz,bz2,xz} files::https://www.debian.org/doc/developers-reference/best-pkging-practices.html#best-practices-for-orig-tar-gz-bz2-xz-files +6.8.8.1::Pristine source::https://www.debian.org/doc/developers-reference/best-pkging-practices.html#pristine-source +6.8.8.2::Repackaged upstream source::https://www.debian.org/doc/developers-reference/best-pkging-practices.html#repackaged-upstream-source +6.8.8.3::Changing binary files::https://www.debian.org/doc/developers-reference/best-pkging-practices.html#changing-binary-files +6.8.9::Best practices for debug packages::https://www.debian.org/doc/developers-reference/best-pkging-practices.html#best-practices-for-debug-packages +6.8.9.1::Automatically generated debug packages::https://www.debian.org/doc/developers-reference/best-pkging-practices.html#automatically-generated-debug-packages +6.8.9.2::Manual -dbg packages::https://www.debian.org/doc/developers-reference/best-pkging-practices.html#manual-dbg-packages +6.8.10::Best practices for meta-packages::https://www.debian.org/doc/developers-reference/best-pkging-practices.html#best-practices-for-meta-packages +7::Beyond Packaging::https://www.debian.org/doc/developers-reference/beyond-pkging.html +7.1::Bug reporting::https://www.debian.org/doc/developers-reference/beyond-pkging.html#bug-reporting +7.1.1::Reporting lots of bugs at once (mass bug filing)::https://www.debian.org/doc/developers-reference/beyond-pkging.html#reporting-lots-of-bugs-at-once-mass-bug-filing +7.1.1.1::Usertags::https://www.debian.org/doc/developers-reference/beyond-pkging.html#usertags +7.2::Quality Assurance effort::https://www.debian.org/doc/developers-reference/beyond-pkging.html#quality-assurance-effort +7.2.1::Daily work::https://www.debian.org/doc/developers-reference/beyond-pkging.html#daily-work +7.2.2::Bug squashing parties::https://www.debian.org/doc/developers-reference/beyond-pkging.html#bug-squashing-parties +7.3::Contacting other maintainers::https://www.debian.org/doc/developers-reference/beyond-pkging.html#contacting-other-maintainers +7.4::Dealing with inactive and/or unreachable maintainers::https://www.debian.org/doc/developers-reference/beyond-pkging.html#dealing-with-inactive-and-or-unreachable-maintainers +7.5::Interacting with prospective Debian developers::https://www.debian.org/doc/developers-reference/beyond-pkging.html#interacting-with-prospective-debian-developers +7.5.1::Sponsoring packages::https://www.debian.org/doc/developers-reference/beyond-pkging.html#sponsoring-packages +7.5.1.1::Sponsoring a new package::https://www.debian.org/doc/developers-reference/beyond-pkging.html#sponsoring-a-new-package +7.5.1.2::Sponsoring an update of an existing package::https://www.debian.org/doc/developers-reference/beyond-pkging.html#sponsoring-an-update-of-an-existing-package +7.5.2::Advocating new developers::https://www.debian.org/doc/developers-reference/beyond-pkging.html#advocating-new-developers +7.5.3::Handling new maintainer applications::https://www.debian.org/doc/developers-reference/beyond-pkging.html#handling-new-maintainer-applications +8::Internationalization and Translations::https://www.debian.org/doc/developers-reference/l10n.html +8.1::How translations are handled within Debian::https://www.debian.org/doc/developers-reference/l10n.html#how-translations-are-handled-within-debian +8.2::I18N & L10N FAQ for maintainers::https://www.debian.org/doc/developers-reference/l10n.html#i18n-l10n-faq-for-maintainers +8.2.1::How to get a given text translated::https://www.debian.org/doc/developers-reference/l10n.html#how-to-get-a-given-text-translated +8.2.2::How to get a given translation reviewed::https://www.debian.org/doc/developers-reference/l10n.html#how-to-get-a-given-translation-reviewed +8.2.3::How to get a given translation updated::https://www.debian.org/doc/developers-reference/l10n.html#how-to-get-a-given-translation-updated +8.2.4::How to handle a bug report concerning a translation::https://www.debian.org/doc/developers-reference/l10n.html#how-to-handle-a-bug-report-concerning-a-translation +8.3::I18N & L10N FAQ for translators::https://www.debian.org/doc/developers-reference/l10n.html#i18n-l10n-faq-for-translators +8.3.1::How to help the translation effort::https://www.debian.org/doc/developers-reference/l10n.html#how-to-help-the-translation-effort +8.3.2::How to provide a translation for inclusion in a package::https://www.debian.org/doc/developers-reference/l10n.html#how-to-provide-a-translation-for-inclusion-in-a-package +8.4::Best current practice concerning l10n::https://www.debian.org/doc/developers-reference/l10n.html#best-current-practice-concerning-l10n +appendix-1::Overview of Debian Maintainer Tools::https://www.debian.org/doc/developers-reference/tools.html +appendix-1.1::Core tools::https://www.debian.org/doc/developers-reference/tools.html#core-tools +appendix-1.1.1::dpkg-dev::https://www.debian.org/doc/developers-reference/tools.html#dpkg-dev +appendix-1.1.2::debconf::https://www.debian.org/doc/developers-reference/tools.html#debconf +appendix-1.1.3::fakeroot::https://www.debian.org/doc/developers-reference/tools.html#fakeroot +appendix-1.2::Package lint tools::https://www.debian.org/doc/developers-reference/tools.html#package-lint-tools +appendix-1.2.1::lintian::https://www.debian.org/doc/developers-reference/tools.html#lintian +appendix-1.2.2::lintian-brush::https://www.debian.org/doc/developers-reference/tools.html#lintian-brush +appendix-1.2.3::piuparts::https://www.debian.org/doc/developers-reference/tools.html#piuparts +appendix-1.2.4::debdiff::https://www.debian.org/doc/developers-reference/tools.html#debdiff +appendix-1.2.5::diffoscope::https://www.debian.org/doc/developers-reference/tools.html#diffoscope +appendix-1.2.6::duck::https://www.debian.org/doc/developers-reference/tools.html#duck +appendix-1.2.7::adequate::https://www.debian.org/doc/developers-reference/tools.html#adequate +appendix-1.2.8::i18nspector::https://www.debian.org/doc/developers-reference/tools.html#i18nspector +appendix-1.2.9::cme::https://www.debian.org/doc/developers-reference/tools.html#cme +appendix-1.2.10::licensecheck::https://www.debian.org/doc/developers-reference/tools.html#licensecheck +appendix-1.2.11::blhc::https://www.debian.org/doc/developers-reference/tools.html#blhc +appendix-1.3::Helpers for debian/rules::https://www.debian.org/doc/developers-reference/tools.html#helpers-for-debian-rules +appendix-1.3.1::debhelper::https://www.debian.org/doc/developers-reference/tools.html#debhelper +appendix-1.3.2::dh-make::https://www.debian.org/doc/developers-reference/tools.html#dh-make +appendix-1.3.3::equivs::https://www.debian.org/doc/developers-reference/tools.html#equivs +appendix-1.4::Package builders::https://www.debian.org/doc/developers-reference/tools.html#package-builders +appendix-1.4.1::git-buildpackage::https://www.debian.org/doc/developers-reference/tools.html#git-buildpackage +appendix-1.4.2::debootstrap::https://www.debian.org/doc/developers-reference/tools.html#debootstrap +appendix-1.4.3::pbuilder::https://www.debian.org/doc/developers-reference/tools.html#pbuilder +appendix-1.4.4::sbuild::https://www.debian.org/doc/developers-reference/tools.html#sbuild +appendix-1.5::Package uploaders::https://www.debian.org/doc/developers-reference/tools.html#package-uploaders +appendix-1.5.1::dupload::https://www.debian.org/doc/developers-reference/tools.html#dupload +appendix-1.5.2::dput::https://www.debian.org/doc/developers-reference/tools.html#dput +appendix-1.5.3::dcut::https://www.debian.org/doc/developers-reference/tools.html#dcut +appendix-1.6::Maintenance automation::https://www.debian.org/doc/developers-reference/tools.html#maintenance-automation +appendix-1.6.1::devscripts::https://www.debian.org/doc/developers-reference/tools.html#devscripts +appendix-1.6.2::reportbug::https://www.debian.org/doc/developers-reference/tools.html#reportbug +appendix-1.6.3::autotools-dev::https://www.debian.org/doc/developers-reference/tools.html#autotools-dev +appendix-1.6.4::dpkg-repack::https://www.debian.org/doc/developers-reference/tools.html#dpkg-repack +appendix-1.6.5::alien::https://www.debian.org/doc/developers-reference/tools.html#alien +appendix-1.6.6::dpkg-dev-el::https://www.debian.org/doc/developers-reference/tools.html#dpkg-dev-el +appendix-1.6.7::dpkg-depcheck::https://www.debian.org/doc/developers-reference/tools.html#dpkg-depcheck +appendix-1.7::Porting tools::https://www.debian.org/doc/developers-reference/tools.html#porting-tools +appendix-1.7.1::dpkg-cross::https://www.debian.org/doc/developers-reference/tools.html#dpkg-cross +appendix-1.8::Documentation and information::https://www.debian.org/doc/developers-reference/tools.html#documentation-and-information +appendix-1.8.1::debian-policy::https://www.debian.org/doc/developers-reference/tools.html#debian-policy +appendix-1.8.2::doc-debian::https://www.debian.org/doc/developers-reference/tools.html#doc-debian +appendix-1.8.3::developers-reference::https://www.debian.org/doc/developers-reference/tools.html#developers-reference +appendix-1.8.4::maint-guide::https://www.debian.org/doc/developers-reference/tools.html#maint-guide +appendix-1.8.5::packaging-tutorial::https://www.debian.org/doc/developers-reference/tools.html#packaging-tutorial +appendix-1.8.6::how-can-i-help::https://www.debian.org/doc/developers-reference/tools.html#how-can-i-help +appendix-1.8.7::docbook-xml::https://www.debian.org/doc/developers-reference/tools.html#docbook-xml +appendix-1.8.8::debiandoc-sgml::https://www.debian.org/doc/developers-reference/tools.html#debiandoc-sgml +appendix-1.8.9::debian-keyring::https://www.debian.org/doc/developers-reference/tools.html#debian-keyring +appendix-1.8.10::debian-el::https://www.debian.org/doc/developers-reference/tools.html#debian-el diff --git a/data/authority/doc-base-manual b/data/authority/doc-base-manual new file mode 100644 index 0000000..34a56ee --- /dev/null +++ b/data/authority/doc-base-manual @@ -0,0 +1,30 @@ +# Data about titles, sections, and URLs of manuals, used to expand references +# in tag descriptions and add links for HTML output. Each line of this file +# has three fields separated by double colons: +# +# <section> :: <title> :: <url> +# +# If <section> is an underscore, that line specifies the title and URL for the +# whole manual. + +_::Debian doc-base Manual::file:///usr/share/doc/doc-base/doc-base.html/index.html +1::About doc-base::file:///usr/share/doc/doc-base/doc-base.html/about.html +2::The packages interface::file:///usr/share/doc/doc-base/doc-base.html/interface.html +2.1::Introduction::file:///usr/share/doc/doc-base/doc-base.html/interface.html#s2.1 +2.2::Document IDs::file:///usr/share/doc/doc-base/doc-base.html/interface.html#document-ids +2.3::Control Files::file:///usr/share/doc/doc-base/doc-base.html/interface.html#control-files +2.3.1::Example::file:///usr/share/doc/doc-base/doc-base.html/interface.html#s2.3.1 +2.3.2::Syntax of the control file::file:///usr/share/doc/doc-base/doc-base.html/interface.html#s2.3.2 +2.3.2.1::The main section::file:///usr/share/doc/doc-base/doc-base.html/interface.html#main-section +2.3.2.2::Format sections::file:///usr/share/doc/doc-base/doc-base.html/interface.html#format-sections +2.3.3::The section field::file:///usr/share/doc/doc-base/doc-base.html/interface.html#section-field +2.4::Registering Documents With doc-base::file:///usr/share/doc/doc-base/doc-base.html/interface.html#registering-documents +2.5::doc-base 0.8.x features and incompatibilities::file:///usr/share/doc/doc-base/doc-base.html/interface.html#s2.5 +2.5.1::Splitting control files over multiple binary packages::file:///usr/share/doc/doc-base/doc-base.html/interface.html#s2.5.1 +2.5.2::Registering local documents::file:///usr/share/doc/doc-base/doc-base.html/interface.html#s2.5.2 +2.5.3::dpkg triggers::file:///usr/share/doc/doc-base/doc-base.html/interface.html#s2.5.3 +2.6::Checking Syntax of Control Files::file:///usr/share/doc/doc-base/doc-base.html/interface.html#checking-syntax +3::Getting information about installed documents::file:///usr/share/doc/doc-base/doc-base.html/informations.html +4::TODO List::file:///usr/share/doc/doc-base/doc-base.html/todo.html +4.1::Roadmap for 0.9.* releases::file:///usr/share/doc/doc-base/doc-base.html/todo.html#s4.1 +4.2::Old TODO entries::file:///usr/share/doc/doc-base/doc-base.html/todo.html#s4.2 diff --git a/data/authority/filesystem-hierarchy b/data/authority/filesystem-hierarchy new file mode 100644 index 0000000..d8ebd7b --- /dev/null +++ b/data/authority/filesystem-hierarchy @@ -0,0 +1,170 @@ +# Data about titles, sections, and URLs of manuals, used to expand references +# in tag descriptions and add links for HTML output. Each line of this file +# has three fields separated by double colons: +# +# <section> :: <title> :: <url> +# +# If <section> is an underscore, that line specifies the title and URL for the +# whole manual. + +_::::Filesystem Hierarchy Standard::https://refspecs.linuxfoundation.org/FHS_3.0/fhs-3.0.html +introduction::1::Introduction::https://refspecs.linuxfoundation.org/FHS_3.0/fhs-3.0.html#introduction +purpose::1.1::Purpose::https://refspecs.linuxfoundation.org/FHS_3.0/fhs-3.0.html#purpose +conventions::1.2::Conventions::https://refspecs.linuxfoundation.org/FHS_3.0/fhs-3.0.html#conventions +thefilesystem::2::The Filesystem::https://refspecs.linuxfoundation.org/FHS_3.0/fhs-3.0.html#thefilesystem +therootfilesystem::3::The Root Filesystem::https://refspecs.linuxfoundation.org/FHS_3.0/fhs-3.0.html#theRootFilesystem +purpose2::3.1::Purpose::https://refspecs.linuxfoundation.org/FHS_3.0/fhs-3.0.html#purpose2 +requirements::3.2::Requirements::https://refspecs.linuxfoundation.org/FHS_3.0/fhs-3.0.html#requirements +specificoptions::3.3::Specific Options::https://refspecs.linuxfoundation.org/FHS_3.0/fhs-3.0.html#specificOptions +binessentialusercommandbinaries::3.4::/bin : Essential user command binaries (for use by all users)::https://refspecs.linuxfoundation.org/FHS_3.0/fhs-3.0.html#binEssentialUserCommandBinaries +purpose3::3.4.1::Purpose::https://refspecs.linuxfoundation.org/FHS_3.0/fhs-3.0.html#purpose3 +requirements2::3.4.2::Requirements::https://refspecs.linuxfoundation.org/FHS_3.0/fhs-3.0.html#requirements2 +specificoptions2::3.4.3::Specific Options::https://refspecs.linuxfoundation.org/FHS_3.0/fhs-3.0.html#specificOptions2 +bootstaticfilesofthebootloader::3.5::/boot : Static files of the boot loader::https://refspecs.linuxfoundation.org/FHS_3.0/fhs-3.0.html#bootStaticFilesOfTheBootLoader +purpose4::3.5.1::Purpose::https://refspecs.linuxfoundation.org/FHS_3.0/fhs-3.0.html#purpose4 +specificoptions3::3.5.2::Specific Options::https://refspecs.linuxfoundation.org/FHS_3.0/fhs-3.0.html#specificOptions3 +devdevicefiles::3.6::/dev : Device files::https://refspecs.linuxfoundation.org/FHS_3.0/fhs-3.0.html#devDeviceFiles +purpose5::3.6.1::Purpose::https://refspecs.linuxfoundation.org/FHS_3.0/fhs-3.0.html#purpose5 +specificoptions4::3.6.2::Specific Options::https://refspecs.linuxfoundation.org/FHS_3.0/fhs-3.0.html#specificOptions4 +etchostspecificsystemconfiguration::3.7::/etc : Host-specific system configuration::https://refspecs.linuxfoundation.org/FHS_3.0/fhs-3.0.html#etcHostspecificSystemConfiguration +purpose6::3.7.1::Purpose::https://refspecs.linuxfoundation.org/FHS_3.0/fhs-3.0.html#purpose6 +requirements3::3.7.2::Requirements::https://refspecs.linuxfoundation.org/FHS_3.0/fhs-3.0.html#requirements3 +specificoptions5::3.7.3::Specific Options::https://refspecs.linuxfoundation.org/FHS_3.0/fhs-3.0.html#specificOptions5 +etcoptconfigurationfilesforopt::3.7.4::/etc/opt : Configuration files for /opt::https://refspecs.linuxfoundation.org/FHS_3.0/fhs-3.0.html#etcoptConfigurationFilesForOpt +etcx11configurationforthexwindows::3.7.5::/etc/X11 : Configuration for the X Window System (optional)::https://refspecs.linuxfoundation.org/FHS_3.0/fhs-3.0.html#etcx11ConfigurationForTheXWindowS +etcsgmlconfigurationfilesforsgmlan::3.7.6::/etc/sgml : Configuration files for SGML (optional)::https://refspecs.linuxfoundation.org/FHS_3.0/fhs-3.0.html#etcsgmlConfigurationFilesForSgmlAn +idm236088418512::3.7.7::/etc/xml : Configuration files for XML (optional)::https://refspecs.linuxfoundation.org/FHS_3.0/fhs-3.0.html#idm236088418512 +homeuserhomedirectories::3.8::/home : User home directories (optional)::https://refspecs.linuxfoundation.org/FHS_3.0/fhs-3.0.html#homeUserHomeDirectories +purpose10::3.8.1::Purpose::https://refspecs.linuxfoundation.org/FHS_3.0/fhs-3.0.html#purpose10 +requirements4a::3.8.2::Requirements::https://refspecs.linuxfoundation.org/FHS_3.0/fhs-3.0.html#requirements4a +homereferences::3.8.3::Home Directory Specifications and Conventions::https://refspecs.linuxfoundation.org/FHS_3.0/fhs-3.0.html#homeReferences +libessentialsharedlibrariesandkern::3.9::/lib : Essential shared libraries and kernel modules::https://refspecs.linuxfoundation.org/FHS_3.0/fhs-3.0.html#libEssentialSharedLibrariesAndKern +purpose11::3.9.1::Purpose::https://refspecs.linuxfoundation.org/FHS_3.0/fhs-3.0.html#purpose11 +requirements5::3.9.2::Requirements::https://refspecs.linuxfoundation.org/FHS_3.0/fhs-3.0.html#requirements5 +specificoptions7::3.9.3::Specific Options::https://refspecs.linuxfoundation.org/FHS_3.0/fhs-3.0.html#specificOptions7 +libltqualgtalternateformatessential::3.10::/lib<qual> : Alternate format essential shared libraries (optional)::https://refspecs.linuxfoundation.org/FHS_3.0/fhs-3.0.html#libltqualgtAlternateFormatEssential +purpose12::3.10.1::Purpose::https://refspecs.linuxfoundation.org/FHS_3.0/fhs-3.0.html#purpose12 +requirements6::3.10.2::Requirements::https://refspecs.linuxfoundation.org/FHS_3.0/fhs-3.0.html#requirements6 +mediamountpoint::3.11::/media : Mount point for removable media::https://refspecs.linuxfoundation.org/FHS_3.0/fhs-3.0.html#mediaMountPoint +purposemediamountpoint::3.11.1::Purpose::https://refspecs.linuxfoundation.org/FHS_3.0/fhs-3.0.html#purposeMediaMountPoint +specificoptionsmediamount::3.11.2::Specific Options::https://refspecs.linuxfoundation.org/FHS_3.0/fhs-3.0.html#specificOptionsMediaMount +mntmountpointforatemporarilymount::3.12::/mnt : Mount point for a temporarily mounted filesystem::https://refspecs.linuxfoundation.org/FHS_3.0/fhs-3.0.html#mntMountPointForATemporarilyMount +purpose13::3.12.1::Purpose::https://refspecs.linuxfoundation.org/FHS_3.0/fhs-3.0.html#purpose13 +optaddonapplicationsoftwarepackages::3.13::/opt : Add-on application software packages::https://refspecs.linuxfoundation.org/FHS_3.0/fhs-3.0.html#optAddonApplicationSoftwarePackages +purpose14::3.13.1::Purpose::https://refspecs.linuxfoundation.org/FHS_3.0/fhs-3.0.html#purpose14 +requirements7::3.13.2::Requirements::https://refspecs.linuxfoundation.org/FHS_3.0/fhs-3.0.html#requirements7 +roothomedirectoryfortherootuser::3.14::/root : Home directory for the root user (optional)::https://refspecs.linuxfoundation.org/FHS_3.0/fhs-3.0.html#rootHomeDirectoryForTheRootUser +purpose15::3.14.1::Purpose::https://refspecs.linuxfoundation.org/FHS_3.0/fhs-3.0.html#purpose15 +runruntimevariabledata::3.15::/run : Run-time variable data::https://refspecs.linuxfoundation.org/FHS_3.0/fhs-3.0.html#runRuntimeVariableData +runpurpose::3.15.1::Purpose::https://refspecs.linuxfoundation.org/FHS_3.0/fhs-3.0.html#runPurpose +runrequirements::3.15.2::Requirements::https://refspecs.linuxfoundation.org/FHS_3.0/fhs-3.0.html#runRequirements +sbinsystembinaries::3.16::/sbin : System binaries::https://refspecs.linuxfoundation.org/FHS_3.0/fhs-3.0.html#sbinSystemBinaries +purpose16::3.16.1::Purpose::https://refspecs.linuxfoundation.org/FHS_3.0/fhs-3.0.html#purpose16 +requirements8::3.16.2::Requirements::https://refspecs.linuxfoundation.org/FHS_3.0/fhs-3.0.html#requirements8 +specificoptions8::3.16.3::Specific Options::https://refspecs.linuxfoundation.org/FHS_3.0/fhs-3.0.html#specificOptions8 +srvdataforservicesprovidedbysystem::3.17::/srv : Data for services provided by this system::https://refspecs.linuxfoundation.org/FHS_3.0/fhs-3.0.html#srvDataForServicesProvidedBySystem +purpose16a::3.17.1::Purpose::https://refspecs.linuxfoundation.org/FHS_3.0/fhs-3.0.html#purpose16a +tmptemporaryfiles::3.18::/tmp : Temporary files::https://refspecs.linuxfoundation.org/FHS_3.0/fhs-3.0.html#tmpTemporaryFiles +purpose17::3.18.1::Purpose::https://refspecs.linuxfoundation.org/FHS_3.0/fhs-3.0.html#purpose17 +theusrhierarchy::4::The /usr Hierarchy::https://refspecs.linuxfoundation.org/FHS_3.0/fhs-3.0.html#theUsrHierarchy +purpose18::4.1::Purpose::https://refspecs.linuxfoundation.org/FHS_3.0/fhs-3.0.html#purpose18 +requirements9::4.2::Requirements::https://refspecs.linuxfoundation.org/FHS_3.0/fhs-3.0.html#requirements9 +specificoptions9::4.3::Specific Options::https://refspecs.linuxfoundation.org/FHS_3.0/fhs-3.0.html#specificOptions9 +usrbinmostusercommands::4.4::/usr/bin : Most user commands::https://refspecs.linuxfoundation.org/FHS_3.0/fhs-3.0.html#usrbinMostUserCommands +purpose20::4.4.1::Purpose::https://refspecs.linuxfoundation.org/FHS_3.0/fhs-3.0.html#purpose20 +requirements9a::4.4.2::Requirements::https://refspecs.linuxfoundation.org/FHS_3.0/fhs-3.0.html#requirements9a +specificoptions11::4.4.3::Specific Options::https://refspecs.linuxfoundation.org/FHS_3.0/fhs-3.0.html#specificOptions11 +usrincludedirectoryforstandardinclu::4.5::/usr/include : Directory for standard include files.::https://refspecs.linuxfoundation.org/FHS_3.0/fhs-3.0.html#usrincludeDirectoryForStandardInclu +purpose21::4.5.1::Purpose::https://refspecs.linuxfoundation.org/FHS_3.0/fhs-3.0.html#purpose21 +specificoptions12::4.5.2::Specific Options::https://refspecs.linuxfoundation.org/FHS_3.0/fhs-3.0.html#specificOptions12 +usrliblibrariesforprogrammingandpa::4.6::/usr/lib : Libraries for programming and packages::https://refspecs.linuxfoundation.org/FHS_3.0/fhs-3.0.html#usrlibLibrariesForProgrammingAndPa +purpose22::4.6.1::Purpose::https://refspecs.linuxfoundation.org/FHS_3.0/fhs-3.0.html#purpose22 +specificoptions13::4.6.2::Specific Options::https://refspecs.linuxfoundation.org/FHS_3.0/fhs-3.0.html#specificOptions13 +usrlibexec::4.7::/usr/libexec : Binaries run by other programs (optional)::https://refspecs.linuxfoundation.org/FHS_3.0/fhs-3.0.html#usrlibexec +usrlibexecpurpose::4.7.1::Purpose::https://refspecs.linuxfoundation.org/FHS_3.0/fhs-3.0.html#usrlibexecPurpose +usrlibltqualgtalternateformatlibrari::4.8::/usr/lib<qual> : Alternate format libraries (optional)::https://refspecs.linuxfoundation.org/FHS_3.0/fhs-3.0.html#usrlibltqualgtAlternateFormatLibrari +purpose23::4.8.1::Purpose::https://refspecs.linuxfoundation.org/FHS_3.0/fhs-3.0.html#purpose23 +usrlocallocalhierarchy::4.9::/usr/local : Local hierarchy::https://refspecs.linuxfoundation.org/FHS_3.0/fhs-3.0.html#usrlocalLocalHierarchy +purpose24::4.9.1::Purpose::https://refspecs.linuxfoundation.org/FHS_3.0/fhs-3.0.html#purpose24 +requirements10::4.9.2::Requirements::https://refspecs.linuxfoundation.org/FHS_3.0/fhs-3.0.html#requirements10 +specificoptions14::4.9.3::Specific Options::https://refspecs.linuxfoundation.org/FHS_3.0/fhs-3.0.html#specificOptions14 +usrlocalshare1::4.9.4::/usr/local/share : Local architecture-independent hierarchy::https://refspecs.linuxfoundation.org/FHS_3.0/fhs-3.0.html#usrlocalshare1 +usrsbinnonessentialstandardsystembi::4.10::/usr/sbin : Non-essential standard system binaries::https://refspecs.linuxfoundation.org/FHS_3.0/fhs-3.0.html#usrsbinNonessentialStandardSystemBi +purpose25::4.10.1::Purpose::https://refspecs.linuxfoundation.org/FHS_3.0/fhs-3.0.html#purpose25 +requirements10a::4.10.2::Requirements::https://refspecs.linuxfoundation.org/FHS_3.0/fhs-3.0.html#requirements10a +usrsharearchitectureindependentdata::4.11::/usr/share : Architecture-independent data::https://refspecs.linuxfoundation.org/FHS_3.0/fhs-3.0.html#usrshareArchitectureindependentData +purpose26::4.11.1::Purpose::https://refspecs.linuxfoundation.org/FHS_3.0/fhs-3.0.html#purpose26 +requirements11::4.11.2::Requirements::https://refspecs.linuxfoundation.org/FHS_3.0/fhs-3.0.html#requirements11 +specificoptions15::4.11.3::Specific Options::https://refspecs.linuxfoundation.org/FHS_3.0/fhs-3.0.html#specificOptions15 +usrsharecolorcolormanagement::4.11.4::/usr/share/color : Color management information (optional)::https://refspecs.linuxfoundation.org/FHS_3.0/fhs-3.0.html#usrsharecolorColorManagement +usrsharedictwordlists::4.11.5::/usr/share/dict : Word lists (optional)::https://refspecs.linuxfoundation.org/FHS_3.0/fhs-3.0.html#usrsharedictWordLists +usrsharemanmanualpages::4.11.6::/usr/share/man : Manual pages::https://refspecs.linuxfoundation.org/FHS_3.0/fhs-3.0.html#usrsharemanManualPages +usrsharemiscmiscellaneousarchitecture::4.11.7::/usr/share/misc : Miscellaneous architecture-independent data::https://refspecs.linuxfoundation.org/FHS_3.0/fhs-3.0.html#usrsharemiscMiscellaneousArchitecture +usrshareppd::4.11.8::/usr/share/ppd : Printer definitions (optional)::https://refspecs.linuxfoundation.org/FHS_3.0/fhs-3.0.html#usrshareppd +usrsharesgmlsgmlandxmldata::4.11.9::/usr/share/sgml : SGML data (optional)::https://refspecs.linuxfoundation.org/FHS_3.0/fhs-3.0.html#usrsharesgmlSgmlAndXmlData +idm236087237360::4.11.10::/usr/share/xml : XML data (optional)::https://refspecs.linuxfoundation.org/FHS_3.0/fhs-3.0.html#idm236087237360 +usrsrcsourcecode::4.12::/usr/src : Source code (optional)::https://refspecs.linuxfoundation.org/FHS_3.0/fhs-3.0.html#usrsrcSourceCode +purpose30::4.12.1::Purpose::https://refspecs.linuxfoundation.org/FHS_3.0/fhs-3.0.html#purpose30 +thevarhierarchy::5::The /var Hierarchy::https://refspecs.linuxfoundation.org/FHS_3.0/fhs-3.0.html#theVarHierarchy +purpose31::5.1::Purpose::https://refspecs.linuxfoundation.org/FHS_3.0/fhs-3.0.html#purpose31 +requirements12::5.2::Requirements::https://refspecs.linuxfoundation.org/FHS_3.0/fhs-3.0.html#requirements12 +specificoptions20::5.3::Specific Options::https://refspecs.linuxfoundation.org/FHS_3.0/fhs-3.0.html#specificOptions20 +varaccountprocessaccountinglogs::5.4::/var/account : Process accounting logs (optional)::https://refspecs.linuxfoundation.org/FHS_3.0/fhs-3.0.html#varaccountProcessAccountingLogs +purpose32::5.4.1::Purpose::https://refspecs.linuxfoundation.org/FHS_3.0/fhs-3.0.html#purpose32 +varcacheapplicationcachedata::5.5::/var/cache : Application cache data::https://refspecs.linuxfoundation.org/FHS_3.0/fhs-3.0.html#varcacheApplicationCacheData +purpose33::5.5.1::Purpose::https://refspecs.linuxfoundation.org/FHS_3.0/fhs-3.0.html#purpose33 +specificoptions21::5.5.2::Specific Options::https://refspecs.linuxfoundation.org/FHS_3.0/fhs-3.0.html#specificOptions21 +varcachefontslocallygeneratedfonts::5.5.3::/var/cache/fonts : Locally-generated fonts (optional)::https://refspecs.linuxfoundation.org/FHS_3.0/fhs-3.0.html#varcachefontsLocallygeneratedFonts +varcachemanlocallyformattedmanualpag::5.5.4::/var/cache/man : Locally-formatted manual pages (optional)::https://refspecs.linuxfoundation.org/FHS_3.0/fhs-3.0.html#varcachemanLocallyformattedManualPag +varcrashsystemcrashdumps::5.6::/var/crash : System crash dumps (optional)::https://refspecs.linuxfoundation.org/FHS_3.0/fhs-3.0.html#varcrashSystemCrashDumps +purpose36::5.6.1::Purpose::https://refspecs.linuxfoundation.org/FHS_3.0/fhs-3.0.html#purpose36 +vargamesvariablegamedata::5.7::/var/games : Variable game data (optional)::https://refspecs.linuxfoundation.org/FHS_3.0/fhs-3.0.html#vargamesVariableGameData +purpose37::5.7.1::Purpose::https://refspecs.linuxfoundation.org/FHS_3.0/fhs-3.0.html#purpose37 +varlibvariablestateinformation::5.8::/var/lib : Variable state information::https://refspecs.linuxfoundation.org/FHS_3.0/fhs-3.0.html#varlibVariableStateInformation +purpose38::5.8.1::Purpose::https://refspecs.linuxfoundation.org/FHS_3.0/fhs-3.0.html#purpose38 +requirements13::5.8.2::Requirements::https://refspecs.linuxfoundation.org/FHS_3.0/fhs-3.0.html#requirements13 +specificoptions23::5.8.3::Specific Options::https://refspecs.linuxfoundation.org/FHS_3.0/fhs-3.0.html#specificOptions23 +varliblteditorgteditorbackupfilesan::5.8.4::/var/lib/<editor> : Editor backup files and state (optional)::https://refspecs.linuxfoundation.org/FHS_3.0/fhs-3.0.html#varliblteditorgtEditorBackupFilesAn +varlibcolor::5.8.5::/var/lib/color : Color management information (optional)::https://refspecs.linuxfoundation.org/FHS_3.0/fhs-3.0.html#varlibcolor +varlibhwclockstatedirectoryforhwclo::5.8.6::/var/lib/hwclock : State directory for hwclock (optional)::https://refspecs.linuxfoundation.org/FHS_3.0/fhs-3.0.html#varlibhwclockStateDirectoryForHwclo +varlibmiscmiscellaneousvariabledata::5.8.7::/var/lib/misc : Miscellaneous variable data::https://refspecs.linuxfoundation.org/FHS_3.0/fhs-3.0.html#varlibmiscMiscellaneousVariableData +varlocklockfiles::5.9::/var/lock : Lock files::https://refspecs.linuxfoundation.org/FHS_3.0/fhs-3.0.html#varlockLockFiles +purpose42::5.9.1::Purpose::https://refspecs.linuxfoundation.org/FHS_3.0/fhs-3.0.html#purpose42 +varloglogfilesanddirectories::5.10::/var/log : Log files and directories::https://refspecs.linuxfoundation.org/FHS_3.0/fhs-3.0.html#varlogLogFilesAndDirectories +purpose43::5.10.1::Purpose::https://refspecs.linuxfoundation.org/FHS_3.0/fhs-3.0.html#purpose43 +specificoptions24::5.10.2::Specific Options::https://refspecs.linuxfoundation.org/FHS_3.0/fhs-3.0.html#specificOptions24 +varmailusermailboxfiles::5.11::/var/mail : User mailbox files (optional)::https://refspecs.linuxfoundation.org/FHS_3.0/fhs-3.0.html#varmailUserMailboxFiles +purpose44::5.11.1::Purpose::https://refspecs.linuxfoundation.org/FHS_3.0/fhs-3.0.html#purpose44 +varoptvariabledataforopt::5.12::/var/opt : Variable data for /opt::https://refspecs.linuxfoundation.org/FHS_3.0/fhs-3.0.html#varoptVariableDataForOpt +purpose45::5.12.1::Purpose::https://refspecs.linuxfoundation.org/FHS_3.0/fhs-3.0.html#purpose45 +varrunruntimevariabledata::5.13::/var/run : Run-time variable data::https://refspecs.linuxfoundation.org/FHS_3.0/fhs-3.0.html#varrunRuntimeVariableData +purpose46::5.13.1::Purpose::https://refspecs.linuxfoundation.org/FHS_3.0/fhs-3.0.html#purpose46 +requirements14::5.13.2::Requirements::https://refspecs.linuxfoundation.org/FHS_3.0/fhs-3.0.html#requirements14 +varspoolapplicationspooldata::5.14::/var/spool : Application spool data::https://refspecs.linuxfoundation.org/FHS_3.0/fhs-3.0.html#varspoolApplicationSpoolData +purpose47::5.14.1::Purpose::https://refspecs.linuxfoundation.org/FHS_3.0/fhs-3.0.html#purpose47 +specificoptions25::5.14.2::Specific Options::https://refspecs.linuxfoundation.org/FHS_3.0/fhs-3.0.html#specificOptions25 +varspoollpdlineprinterdaemonprintqu::5.14.3::/var/spool/lpd : Line-printer daemon print queues (optional)::https://refspecs.linuxfoundation.org/FHS_3.0/fhs-3.0.html#varspoollpdLineprinterDaemonPrintQu +varspoolrwhorwhodfiles::5.14.4::/var/spool/rwho : Rwhod files (optional)::https://refspecs.linuxfoundation.org/FHS_3.0/fhs-3.0.html#varspoolrwhoRwhodFiles +vartmptemporaryfilespreservedbetwee::5.15::/var/tmp : Temporary files preserved between system reboots::https://refspecs.linuxfoundation.org/FHS_3.0/fhs-3.0.html#vartmpTemporaryFilesPreservedBetwee +purpose50::5.15.1::Purpose::https://refspecs.linuxfoundation.org/FHS_3.0/fhs-3.0.html#purpose50 +varypnetworkinformationservice::5.16::/var/yp : Network Information Service (NIS) database files (optional)::https://refspecs.linuxfoundation.org/FHS_3.0/fhs-3.0.html#varypNetworkInformationService +purpose51::5.16.1::Purpose::https://refspecs.linuxfoundation.org/FHS_3.0/fhs-3.0.html#purpose51 +operatingsystemspecificannex::6::Operating System Specific Annex::https://refspecs.linuxfoundation.org/FHS_3.0/fhs-3.0.html#operatingSystemSpecificAnnex +linux::6.1::Linux::https://refspecs.linuxfoundation.org/FHS_3.0/fhs-3.0.html#linux +rootdirectory::6.1.1::/ : Root directory::https://refspecs.linuxfoundation.org/FHS_3.0/fhs-3.0.html#rootDirectory +binessentialusercommandbinaries2::6.1.2::/bin : Essential user command binaries (for use by all users)::https://refspecs.linuxfoundation.org/FHS_3.0/fhs-3.0.html#binEssentialUserCommandBinaries2 +devdevicesandspecialfiles::6.1.3::/dev : Devices and special files::https://refspecs.linuxfoundation.org/FHS_3.0/fhs-3.0.html#devDevicesAndSpecialFiles +etchostspecificsystemconfiguration2::6.1.4::/etc : Host-specific system configuration::https://refspecs.linuxfoundation.org/FHS_3.0/fhs-3.0.html#etcHostspecificSystemConfiguration2 +prockernelandprocessinformationvir::6.1.5::/proc : Kernel and process information virtual filesystem::https://refspecs.linuxfoundation.org/FHS_3.0/fhs-3.0.html#procKernelAndProcessInformationVir +sbinessentialsystembinaries::6.1.6::/sbin : Essential system binaries::https://refspecs.linuxfoundation.org/FHS_3.0/fhs-3.0.html#sbinEssentialSystemBinaries +syskernelandsysteminformation::6.1.7::/sys : Kernel and system information virtual filesystem::https://refspecs.linuxfoundation.org/FHS_3.0/fhs-3.0.html#sysKernelAndSystemInformation +usrincludeheaderfilesincludedbycp::6.1.8::/usr/include : Header files included by C programs::https://refspecs.linuxfoundation.org/FHS_3.0/fhs-3.0.html#usrincludeHeaderFilesIncludedByCP +usrsrcsourcecode2::6.1.9::/usr/src : Source code::https://refspecs.linuxfoundation.org/FHS_3.0/fhs-3.0.html#usrsrcSourceCode2 +varspoolcroncronandatjobs::6.1.10::/var/spool/cron : cron and at jobs::https://refspecs.linuxfoundation.org/FHS_3.0/fhs-3.0.html#varspoolcronCronAndAtJobs +appendix::7::Appendix::https://refspecs.linuxfoundation.org/FHS_3.0/fhs-3.0.html#appendix +thefhsmailinglist::7.1::The FHS mailing list::https://refspecs.linuxfoundation.org/FHS_3.0/fhs-3.0.html#theFhsMailingList +backgroundofthefhs::7.2::Background of the FHS::https://refspecs.linuxfoundation.org/FHS_3.0/fhs-3.0.html#backgroundOfTheFhs +generalguidelines::7.3::General Guidelines::https://refspecs.linuxfoundation.org/FHS_3.0/fhs-3.0.html#generalGuidelines +scope::7.4::Scope::https://refspecs.linuxfoundation.org/FHS_3.0/fhs-3.0.html#scope +acknowledgments::7.5::Acknowledgments::https://refspecs.linuxfoundation.org/FHS_3.0/fhs-3.0.html#acknowledgments +contributors::7.6::Contributors::https://refspecs.linuxfoundation.org/FHS_3.0/fhs-3.0.html#contributors diff --git a/data/authority/java-policy.json b/data/authority/java-policy.json new file mode 100644 index 0000000..4a27204 --- /dev/null +++ b/data/authority/java-policy.json @@ -0,0 +1,58 @@ +{ + "preamble" : { + "cargo" : "sections", + "title" : "Java Policy" + }, + "sections" : [ + { + "destination" : "https://www.debian.org/doc/packaging-manuals/java-policy/", + "key" : "_", + "title" : "Debian policy for Java" + }, + { + "destination" : "https://www.debian.org/doc/packaging-manuals/java-policy/ch01.html", + "key" : "1", + "title" : "Background" + }, + { + "destination" : "https://www.debian.org/doc/packaging-manuals/java-policy/ch02.html", + "key" : "2", + "title" : "Policy" + }, + { + "destination" : "https://www.debian.org/doc/packaging-manuals/java-policy/ch02.html#policy-vm", + "key" : "2.1", + "title" : "Virtual machines" + }, + { + "destination" : "https://www.debian.org/doc/packaging-manuals/java-policy/ch02.html#build-pkg", + "key" : "2.2", + "title" : "Building Java packages" + }, + { + "destination" : "https://www.debian.org/doc/packaging-manuals/java-policy/ch02.html#policy-programs", + "key" : "2.3", + "title" : "Java programs" + }, + { + "destination" : "https://www.debian.org/doc/packaging-manuals/java-policy/ch02.html#policy-libraries", + "key" : "2.4", + "title" : "Java libraries" + }, + { + "destination" : "https://www.debian.org/doc/packaging-manuals/java-policy/ch02.html#policy-politics", + "key" : "2.5", + "title" : "Main, contrib or non-free" + }, + { + "destination" : "https://www.debian.org/doc/packaging-manuals/java-policy/ch03.html", + "key" : "3", + "title" : "Issues to discuss" + }, + { + "destination" : "https://www.debian.org/doc/packaging-manuals/java-policy/ch04.html", + "key" : "4", + "title" : "Advice to Java packagers" + } + ] +} diff --git a/data/authority/lintian-manual b/data/authority/lintian-manual new file mode 100644 index 0000000..8b5c7f2 --- /dev/null +++ b/data/authority/lintian-manual @@ -0,0 +1,35 @@ +# Data about titles, sections, and URLs of manuals, used to expand references +# in tag descriptions and add links for HTML output. Each line of this file +# has three fields separated by double colons: +# +# <section> :: <title> :: <url> +# +# If <section> is an underscore, that line specifies the title and URL for the +# whole manual. + +_::Lintian User's Manual::https://lintian.debian.org/manual/index.html +1::Introduction::https://lintian.debian.org/manual/index.html#introduction +1.1::About Lintian::https://lintian.debian.org/manual/index.html#about-lintian +1.2::The intention of Lintian::https://lintian.debian.org/manual/index.html#the-intention-of-lintian +1.3::Design issues::https://lintian.debian.org/manual/index.html#design-issues +1.4::Disclaimer::https://lintian.debian.org/manual/index.html#disclaimer +2::Getting started::https://lintian.debian.org/manual/index.html#getting-started +2.1::Installing Lintian::https://lintian.debian.org/manual/index.html#installing-lintian +2.2::Running lintian::https://lintian.debian.org/manual/index.html#running-lintian +2.3::Lintian Tags::https://lintian.debian.org/manual/index.html#lintian-tags +2.4::Overrides::https://lintian.debian.org/manual/index.html#overrides +2.4.1::Format of override files::https://lintian.debian.org/manual/index.html#format-of-override-files +2.4.2::Documenting overrides::https://lintian.debian.org/manual/index.html#documenting-overrides +2.4.3::Architecture specific overrides::https://lintian.debian.org/manual/index.html#architecture-specific-overrides +2.5::Vendor Profiles::https://lintian.debian.org/manual/index.html#vendor-profiles +2.5.1::Rules for profile names and location::https://lintian.debian.org/manual/index.html#rules-for-profile-names-and-location +2.5.2::Profile syntax and semantics::https://lintian.debian.org/manual/index.html#profile-syntax-and-semantics +2.6::Vendor specific data files::https://lintian.debian.org/manual/index.html#vendor-specific-data-files +2.6.1::Load paths and order::https://lintian.debian.org/manual/index.html#load-paths-and-order +2.6.2::Basic syntax of data files::https://lintian.debian.org/manual/index.html#basic-syntax-of-data-files +3::Advanced usage::https://lintian.debian.org/manual/index.html#advanced-usage +3.1::How Lintian works::https://lintian.debian.org/manual/index.html#how-lintian-works +3.2::The laboratory::https://lintian.debian.org/manual/index.html#the-laboratory +3.3::Writing your own Lintian checks::https://lintian.debian.org/manual/index.html#writing-your-own-lintian-checks +3.3.1::Check description file::https://lintian.debian.org/manual/index.html#check-description-file +3.3.2::Check Perl module file::https://lintian.debian.org/manual/index.html#check-perl-module-file diff --git a/data/authority/menu-manual b/data/authority/menu-manual new file mode 100644 index 0000000..f5bdbca --- /dev/null +++ b/data/authority/menu-manual @@ -0,0 +1,43 @@ +# Data about titles, sections, and URLs of manuals, used to expand references +# in tag descriptions and add links for HTML output. Each line of this file +# has three fields separated by double colons: +# +# <section> :: <title> :: <url> +# +# If <section> is an underscore, that line specifies the title and URL for the +# whole manual. + +_::Debian Menu System::https://www.debian.org/doc/packaging-manuals/menu.html/ +1::Introduction::https://www.debian.org/doc/packaging-manuals/menu.html/ch1.html +2::Menu from the viewpoint of a user::https://www.debian.org/doc/packaging-manuals/menu.html/ch2.html +2.1::How/when do the window manager startup files get created?::https://www.debian.org/doc/packaging-manuals/menu.html/ch2.html#s2.1 +2.2::Tuning of the generated window manager startup files::https://www.debian.org/doc/packaging-manuals/menu.html/ch2.html#s2.2 +2.3::Optimization of menu tree: hints::https://www.debian.org/doc/packaging-manuals/menu.html/ch2.html#s2.3 +3::The menu file::https://www.debian.org/doc/packaging-manuals/menu.html/ch3.html +3.1::Location::https://www.debian.org/doc/packaging-manuals/menu.html/ch3.html#s3.1 +3.2::Syntax::https://www.debian.org/doc/packaging-manuals/menu.html/ch3.html#s3.2 +3.3::The title field::https://www.debian.org/doc/packaging-manuals/menu.html/ch3.html#s3.3 +3.4::The needs field::https://www.debian.org/doc/packaging-manuals/menu.html/ch3.html#s3.4 +3.5::The section field::https://www.debian.org/doc/packaging-manuals/menu.html/ch3.html#s3.5 +3.6::The command field::https://www.debian.org/doc/packaging-manuals/menu.html/ch3.html#s3.6 +3.7::The icon field::https://www.debian.org/doc/packaging-manuals/menu.html/ch3.html#s3.7 +3.8::The hints field::https://www.debian.org/doc/packaging-manuals/menu.html/ch3.html#s3.8 +3.9::Entries for menu sections.::https://www.debian.org/doc/packaging-manuals/menu.html/ch3.html#s3.9 +3.10::Fvwm's task and title bars::https://www.debian.org/doc/packaging-manuals/menu.html/ch3.html#s3.10 +4::What packages with applications should do::https://www.debian.org/doc/packaging-manuals/menu.html/ch4.html +4.1::Providing a menu file::https://www.debian.org/doc/packaging-manuals/menu.html/ch4.html#s4.1 +4.2::Adding a hook for dpkg in your packages::https://www.debian.org/doc/packaging-manuals/menu.html/ch4.html#s4.2 +5::What packages with menu managers should do::https://www.debian.org/doc/packaging-manuals/menu.html/ch5.html +6::How a user can override the menus::https://www.debian.org/doc/packaging-manuals/menu.html/ch6.html +6.1::Configuring the menus::https://www.debian.org/doc/packaging-manuals/menu.html/ch6.html#s6.1 +6.2::Specifying that a menu entry should not be displayed::https://www.debian.org/doc/packaging-manuals/menu.html/ch6.html#s6.2 +6.3::Including other files::https://www.debian.org/doc/packaging-manuals/menu.html/ch6.html#s6.3 +7::The internals of the menu package::https://www.debian.org/doc/packaging-manuals/menu.html/ch7.html +7.1::The update-menus program::https://www.debian.org/doc/packaging-manuals/menu.html/ch7.html#s7.1 +7.2::The install-menu program::https://www.debian.org/doc/packaging-manuals/menu.html/ch7.html#s7.2 +7.3::The install-menu config script definitions::https://www.debian.org/doc/packaging-manuals/menu.html/ch7.html#s7.3 +7.4::Hints, tree optimization::https://www.debian.org/doc/packaging-manuals/menu.html/ch7.html#s7.4 +8::Variables and functions in the install-menu scripts::https://www.debian.org/doc/packaging-manuals/menu.html/ch8.html +8.1::String constants::https://www.debian.org/doc/packaging-manuals/menu.html/ch8.html#s8.1 +8.2::Variables::https://www.debian.org/doc/packaging-manuals/menu.html/ch8.html#s8.2 +8.3::Functions::https://www.debian.org/doc/packaging-manuals/menu.html/ch8.html#s8.3 diff --git a/data/authority/menu-policy b/data/authority/menu-policy new file mode 100644 index 0000000..4d2bf21 --- /dev/null +++ b/data/authority/menu-policy @@ -0,0 +1,13 @@ +# Data about titles, sections, and URLs of manuals, used to expand references +# in tag descriptions and add links for HTML output. Each line of this file +# has three fields separated by double colons: +# +# <section> :: <title> :: <url> +# +# If <section> is an underscore, that line specifies the title and URL for the +# whole manual. + +_::The Debian Menu sub-policy::https://www.debian.org/doc/packaging-manuals/menu-policy/ +1::About this document::https://www.debian.org/doc/packaging-manuals/menu-policy/ch1.html +2::Menu Structure::https://www.debian.org/doc/packaging-manuals/menu-policy/ch2.html +2.1::Preferred menu structure::https://www.debian.org/doc/packaging-manuals/menu-policy/ch2.html#s2.1 diff --git a/data/authority/new-maintainer.json b/data/authority/new-maintainer.json new file mode 100644 index 0000000..2ef4adc --- /dev/null +++ b/data/authority/new-maintainer.json @@ -0,0 +1,463 @@ +{ + "preamble" : { + "cargo" : "sections", + "title" : "New Maintainer's Guide" + }, + "sections" : [ + { + "destination" : "https://www.debian.org/doc/manuals/maint-guide/index.html", + "key" : "_", + "title" : "Debian New Maintainers' Guide" + }, + { + "destination" : "https://www.debian.org/doc/manuals/maint-guide/index.htmlstart.en.html", + "key" : "1", + "title" : "Getting started The Right Way" + }, + { + "destination" : "https://www.debian.org/doc/manuals/maint-guide/index.htmlstart.en.html#socialdynamics", + "key" : "1.1", + "title" : "Social dynamics of Debian" + }, + { + "destination" : "https://www.debian.org/doc/manuals/maint-guide/index.htmlstart.en.html#needprogs", + "key" : "1.2", + "title" : "Programs needed for development" + }, + { + "destination" : "https://www.debian.org/doc/manuals/maint-guide/index.htmlstart.en.html#needdocs", + "key" : "1.3", + "title" : "Documentation needed for development" + }, + { + "destination" : "https://www.debian.org/doc/manuals/maint-guide/index.htmlstart.en.html#helpme", + "key" : "1.4", + "title" : "Where to ask for help" + }, + { + "destination" : "https://www.debian.org/doc/manuals/maint-guide/index.htmlfirst.en.html", + "key" : "2", + "title" : "First steps" + }, + { + "destination" : "https://www.debian.org/doc/manuals/maint-guide/index.htmlfirst.en.html#workflow", + "key" : "2.1", + "title" : "Debian package building workflow" + }, + { + "destination" : "https://www.debian.org/doc/manuals/maint-guide/index.htmlfirst.en.html#choose", + "key" : "2.2", + "title" : "Choose your program" + }, + { + "destination" : "https://www.debian.org/doc/manuals/maint-guide/index.htmlfirst.en.html#getit", + "key" : "2.3", + "title" : "Get the program, and try it out" + }, + { + "destination" : "https://www.debian.org/doc/manuals/maint-guide/index.htmlfirst.en.html#simplemake", + "key" : "2.4", + "title" : "Simple build systems" + }, + { + "destination" : "https://www.debian.org/doc/manuals/maint-guide/index.htmlfirst.en.html#portable", + "key" : "2.5", + "title" : "Popular portable build systems" + }, + { + "destination" : "https://www.debian.org/doc/manuals/maint-guide/index.htmlfirst.en.html#namever", + "key" : "2.6", + "title" : "Package name and version" + }, + { + "destination" : "https://www.debian.org/doc/manuals/maint-guide/index.htmlfirst.en.html#dh-make", + "key" : "2.7", + "title" : "Setting up dh_make" + }, + { + "destination" : "https://www.debian.org/doc/manuals/maint-guide/index.htmlfirst.en.html#non-native-dh-make", + "key" : "2.8", + "title" : "Initial non-native Debian package" + }, + { + "destination" : "https://www.debian.org/doc/manuals/maint-guide/index.htmlmodify.en.html", + "key" : "3", + "title" : "Modifying the source" + }, + { + "destination" : "https://www.debian.org/doc/manuals/maint-guide/index.htmlmodify.en.html#quiltrc", + "key" : "3.1", + "title" : "Setting up quilt" + }, + { + "destination" : "https://www.debian.org/doc/manuals/maint-guide/index.htmlmodify.en.html#fixupstream", + "key" : "3.2", + "title" : "Fixing upstream bugs" + }, + { + "destination" : "https://www.debian.org/doc/manuals/maint-guide/index.htmlmodify.en.html#destdir", + "key" : "3.3", + "title" : "Installation of files to their destination" + }, + { + "destination" : "https://www.debian.org/doc/manuals/maint-guide/index.htmlmodify.en.html#difflibs", + "key" : "3.4", + "title" : "Differing libraries" + }, + { + "destination" : "https://www.debian.org/doc/manuals/maint-guide/index.htmldreq.en.html", + "key" : "4", + "title" : "Required files under the debian directory" + }, + { + "destination" : "https://www.debian.org/doc/manuals/maint-guide/index.htmldreq.en.html#control", + "key" : "4.1", + "title" : "control" + }, + { + "destination" : "https://www.debian.org/doc/manuals/maint-guide/index.htmldreq.en.html#copyright", + "key" : "4.2", + "title" : "copyright" + }, + { + "destination" : "https://www.debian.org/doc/manuals/maint-guide/index.htmldreq.en.html#changelog", + "key" : "4.3", + "title" : "changelog" + }, + { + "destination" : "https://www.debian.org/doc/manuals/maint-guide/index.htmldreq.en.html#rules", + "key" : "4.4", + "title" : "rules" + }, + { + "destination" : "https://www.debian.org/doc/manuals/maint-guide/index.htmldreq.en.html#targets", + "key" : "4.4.1", + "title" : "Targets of the rules file" + }, + { + "destination" : "https://www.debian.org/doc/manuals/maint-guide/index.htmldreq.en.html#defaultrules", + "key" : "4.4.2", + "title" : "Default rules file" + }, + { + "destination" : "https://www.debian.org/doc/manuals/maint-guide/index.htmldreq.en.html#customrules", + "key" : "4.4.3", + "title" : "Customization of rules file" + }, + { + "destination" : "https://www.debian.org/doc/manuals/maint-guide/index.htmldother.en.html", + "key" : "5", + "title" : "Other files under the debian directory" + }, + { + "destination" : "https://www.debian.org/doc/manuals/maint-guide/index.htmldother.en.html#readme", + "key" : "5.1", + "title" : "README.Debian" + }, + { + "destination" : "https://www.debian.org/doc/manuals/maint-guide/index.htmldother.en.html#compat", + "key" : "5.2", + "title" : "compat" + }, + { + "destination" : "https://www.debian.org/doc/manuals/maint-guide/index.htmldother.en.html#conffiles", + "key" : "5.3", + "title" : "conffiles" + }, + { + "destination" : "https://www.debian.org/doc/manuals/maint-guide/index.htmldother.en.html#crond", + "key" : "5.4", + "title" : "package.cron.*" + }, + { + "destination" : "https://www.debian.org/doc/manuals/maint-guide/index.htmldother.en.html#dirs", + "key" : "5.5", + "title" : "dirs" + }, + { + "destination" : "https://www.debian.org/doc/manuals/maint-guide/index.htmldother.en.html#doc-base", + "key" : "5.6", + "title" : "package.doc-base" + }, + { + "destination" : "https://www.debian.org/doc/manuals/maint-guide/index.htmldother.en.html#docs", + "key" : "5.7", + "title" : "docs" + }, + { + "destination" : "https://www.debian.org/doc/manuals/maint-guide/index.htmldother.en.html#emacsen", + "key" : "5.8", + "title" : "emacsen-*" + }, + { + "destination" : "https://www.debian.org/doc/manuals/maint-guide/index.htmldother.en.html#examples", + "key" : "5.9", + "title" : "package.examples" + }, + { + "destination" : "https://www.debian.org/doc/manuals/maint-guide/index.htmldother.en.html#initd", + "key" : "5.10", + "title" : "package.init and package.default" + }, + { + "destination" : "https://www.debian.org/doc/manuals/maint-guide/index.htmldother.en.html#install", + "key" : "5.11", + "title" : "install" + }, + { + "destination" : "https://www.debian.org/doc/manuals/maint-guide/index.htmldother.en.html#info", + "key" : "5.12", + "title" : "package.info" + }, + { + "destination" : "https://www.debian.org/doc/manuals/maint-guide/index.htmldother.en.html#links", + "key" : "5.13", + "title" : "package.links" + }, + { + "destination" : "https://www.debian.org/doc/manuals/maint-guide/index.htmldother.en.html#lintian", + "key" : "5.14", + "title" : "{package.,source/}lintian-overrides" + }, + { + "destination" : "https://www.debian.org/doc/manuals/maint-guide/index.htmldother.en.html#manpage", + "key" : "5.15", + "title" : "manpage.*" + }, + { + "destination" : "https://www.debian.org/doc/manuals/maint-guide/index.htmldother.en.html#manpage1", + "key" : "5.15.1", + "title" : "manpage.1.ex" + }, + { + "destination" : "https://www.debian.org/doc/manuals/maint-guide/index.htmldother.en.html#manpagesgml", + "key" : "5.15.2", + "title" : "manpage.sgml.ex" + }, + { + "destination" : "https://www.debian.org/doc/manuals/maint-guide/index.htmldother.en.html#manpagexml", + "key" : "5.15.3", + "title" : "manpage.xml.ex" + }, + { + "destination" : "https://www.debian.org/doc/manuals/maint-guide/index.htmldother.en.html#manpages", + "key" : "5.16", + "title" : "package.manpages" + }, + { + "destination" : "https://www.debian.org/doc/manuals/maint-guide/index.htmldother.en.html#news", + "key" : "5.17", + "title" : "NEWS" + }, + { + "destination" : "https://www.debian.org/doc/manuals/maint-guide/index.htmldother.en.html#maintscripts", + "key" : "5.18", + "title" : "{pre,post}{inst,rm}" + }, + { + "destination" : "https://www.debian.org/doc/manuals/maint-guide/index.htmldother.en.html#symbols", + "key" : "5.19", + "title" : "package.symbols" + }, + { + "destination" : "https://www.debian.org/doc/manuals/maint-guide/index.htmldother.en.html#todo", + "key" : "5.20", + "title" : "TODO" + }, + { + "destination" : "https://www.debian.org/doc/manuals/maint-guide/index.htmldother.en.html#watch", + "key" : "5.21", + "title" : "watch" + }, + { + "destination" : "https://www.debian.org/doc/manuals/maint-guide/index.htmldother.en.html#sourcef", + "key" : "5.22", + "title" : "source/format" + }, + { + "destination" : "https://www.debian.org/doc/manuals/maint-guide/index.htmldother.en.html#sourcel", + "key" : "5.23", + "title" : "source/local-options" + }, + { + "destination" : "https://www.debian.org/doc/manuals/maint-guide/index.htmldother.en.html#sourceopt", + "key" : "5.24", + "title" : "source/options" + }, + { + "destination" : "https://www.debian.org/doc/manuals/maint-guide/index.htmldother.en.html#patches", + "key" : "5.25", + "title" : "patches/*" + }, + { + "destination" : "https://www.debian.org/doc/manuals/maint-guide/index.htmlbuild.en.html", + "key" : "6", + "title" : "Building the package" + }, + { + "destination" : "https://www.debian.org/doc/manuals/maint-guide/index.htmlbuild.en.html#completebuild", + "key" : "6.1", + "title" : "Complete (re)build" + }, + { + "destination" : "https://www.debian.org/doc/manuals/maint-guide/index.htmlbuild.en.html#autobuilder", + "key" : "6.2", + "title" : "Autobuilder" + }, + { + "destination" : "https://www.debian.org/doc/manuals/maint-guide/index.htmlbuild.en.html#debuild", + "key" : "6.3", + "title" : "debuild command" + }, + { + "destination" : "https://www.debian.org/doc/manuals/maint-guide/index.htmlbuild.en.html#pbuilder", + "key" : "6.4", + "title" : "pbuilder package" + }, + { + "destination" : "https://www.debian.org/doc/manuals/maint-guide/index.htmlbuild.en.html#git-buildpackage", + "key" : "6.5", + "title" : "git-buildpackage command and similar" + }, + { + "destination" : "https://www.debian.org/doc/manuals/maint-guide/index.htmlbuild.en.html#quickrebuild", + "key" : "6.6", + "title" : "Quick rebuild" + }, + { + "destination" : "https://www.debian.org/doc/manuals/maint-guide/index.htmlbuild.en.html#hierarchy", + "key" : "6.7", + "title" : "Command hierarchy" + }, + { + "destination" : "https://www.debian.org/doc/manuals/maint-guide/index.htmlcheckit.en.html", + "key" : "7", + "title" : "Checking the package for errors" + }, + { + "destination" : "https://www.debian.org/doc/manuals/maint-guide/index.htmlcheckit.en.html#inadvent", + "key" : "7.1", + "title" : "Suspicious changes" + }, + { + "destination" : "https://www.debian.org/doc/manuals/maint-guide/index.htmlcheckit.en.html#pinstall", + "key" : "7.2", + "title" : "Verifying a package's installation" + }, + { + "destination" : "https://www.debian.org/doc/manuals/maint-guide/index.htmlcheckit.en.html#pmaintscripts", + "key" : "7.3", + "title" : "Verifying a package's maintainer scripts" + }, + { + "destination" : "https://www.debian.org/doc/manuals/maint-guide/index.htmlcheckit.en.html#lintians", + "key" : "7.4", + "title" : "Using lintian" + }, + { + "destination" : "https://www.debian.org/doc/manuals/maint-guide/index.htmlcheckit.en.html#debc", + "key" : "7.5", + "title" : "The debc command" + }, + { + "destination" : "https://www.debian.org/doc/manuals/maint-guide/index.htmlcheckit.en.html#debdiff", + "key" : "7.6", + "title" : "The debdiff command" + }, + { + "destination" : "https://www.debian.org/doc/manuals/maint-guide/index.htmlcheckit.en.html#interdiff", + "key" : "7.7", + "title" : "The interdiff command" + }, + { + "destination" : "https://www.debian.org/doc/manuals/maint-guide/index.htmlcheckit.en.html#mc", + "key" : "7.8", + "title" : "The mc command" + }, + { + "destination" : "https://www.debian.org/doc/manuals/maint-guide/index.htmlupdate.en.html", + "key" : "8", + "title" : "Updating the package" + }, + { + "destination" : "https://www.debian.org/doc/manuals/maint-guide/index.htmlupdate.en.html#newrevision", + "key" : "8.1", + "title" : "New Debian revision" + }, + { + "destination" : "https://www.debian.org/doc/manuals/maint-guide/index.htmlupdate.en.html#inspectnewupstream", + "key" : "8.2", + "title" : "Inspection of the new upstream release" + }, + { + "destination" : "https://www.debian.org/doc/manuals/maint-guide/index.htmlupdate.en.html#newupstream", + "key" : "8.3", + "title" : "New upstream release" + }, + { + "destination" : "https://www.debian.org/doc/manuals/maint-guide/index.htmlupdate.en.html#packagestyle", + "key" : "8.4", + "title" : "Updating the packaging style" + }, + { + "destination" : "https://www.debian.org/doc/manuals/maint-guide/index.htmlupdate.en.html#utf8", + "key" : "8.5", + "title" : "UTF-8 conversion" + }, + { + "destination" : "https://www.debian.org/doc/manuals/maint-guide/index.htmlupdate.en.html#reminders", + "key" : "8.6", + "title" : "Reminders for updating packages" + }, + { + "destination" : "https://www.debian.org/doc/manuals/maint-guide/index.htmlupload.en.html", + "key" : "9", + "title" : "Uploading the package" + }, + { + "destination" : "https://www.debian.org/doc/manuals/maint-guide/index.htmlupload.en.html#upload-debian", + "key" : "9.1", + "title" : "Uploading to the Debian archive" + }, + { + "destination" : "https://www.debian.org/doc/manuals/maint-guide/index.htmlupload.en.html#option-sa", + "key" : "9.2", + "title" : "Including orig.tar.gz for upload" + }, + { + "destination" : "https://www.debian.org/doc/manuals/maint-guide/index.htmlupload.en.html#skipped-uploads", + "key" : "9.3", + "title" : "Skipped uploads" + }, + { + "destination" : "https://www.debian.org/doc/manuals/maint-guide/index.htmladvanced.en.html", + "key" : "A", + "title" : "Advanced packaging" + }, + { + "destination" : "https://www.debian.org/doc/manuals/maint-guide/index.htmladvanced.en.html#library", + "key" : "A.1", + "title" : "Shared libraries" + }, + { + "destination" : "https://www.debian.org/doc/manuals/maint-guide/index.htmladvanced.en.html#librarysymbols", + "key" : "A.2", + "title" : "Managing debian/package.symbols" + }, + { + "destination" : "https://www.debian.org/doc/manuals/maint-guide/index.htmladvanced.en.html#multiarch", + "key" : "A.3", + "title" : "Multiarch" + }, + { + "destination" : "https://www.debian.org/doc/manuals/maint-guide/index.htmladvanced.en.html#librarypackage", + "key" : "A.4", + "title" : "Building a shared library package" + }, + { + "destination" : "https://www.debian.org/doc/manuals/maint-guide/index.htmladvanced.en.html#native-dh-make", + "key" : "A.5", + "title" : "Native Debian package" + } + ] +} diff --git a/data/authority/perl-policy b/data/authority/perl-policy new file mode 100644 index 0000000..b8cb21d --- /dev/null +++ b/data/authority/perl-policy @@ -0,0 +1,35 @@ +# Data about titles, sections, and URLs of manuals, used to expand references +# in tag descriptions and add links for HTML output. Each line of this file +# has three fields separated by double colons: +# +# <section> :: <title> :: <url> +# +# If <section> is an underscore, that line specifies the title and URL for the +# whole manual. + +_::Debian Perl Policy::https://www.debian.org/doc/packaging-manuals/perl-policy/ +1::About this document::https://www.debian.org/doc/packaging-manuals/perl-policy/ch1.html +2::Perl Packaging::https://www.debian.org/doc/packaging-manuals/perl-policy/ch-perl.html +2.1::Versions::https://www.debian.org/doc/packaging-manuals/perl-policy/ch-perl.html#s-versions +2.2::Base Package::https://www.debian.org/doc/packaging-manuals/perl-policy/ch-perl.html#s-base +2.3::Module Path::https://www.debian.org/doc/packaging-manuals/perl-policy/ch-perl.html#s-paths +2.4::Documentation::https://www.debian.org/doc/packaging-manuals/perl-policy/ch-perl.html#s-docs +3::Locally Installed Modules::https://www.debian.org/doc/packaging-manuals/perl-policy/ch-site.html +3.1::Site Directories::https://www.debian.org/doc/packaging-manuals/perl-policy/ch-site.html#s-site-dirs +3.2::Site Installation::https://www.debian.org/doc/packaging-manuals/perl-policy/ch-site.html#s-site-install +4::Packaged Modules::https://www.debian.org/doc/packaging-manuals/perl-policy/ch-module_packages.html +4.1::Vendor Directories::https://www.debian.org/doc/packaging-manuals/perl-policy/ch-module_packages.html#s-vendor-dirs +4.2::Module Package Names::https://www.debian.org/doc/packaging-manuals/perl-policy/ch-module_packages.html#s-package-names +4.3::Vendor Installation::https://www.debian.org/doc/packaging-manuals/perl-policy/ch-module_packages.html#s-vendor-install +4.4::Module Dependencies::https://www.debian.org/doc/packaging-manuals/perl-policy/ch-module_packages.html#s-module-deps +4.4.1::Architecture-Independent Modules::https://www.debian.org/doc/packaging-manuals/perl-policy/ch-module_packages.html#s-indep-modules +4.4.2::Binary and Other Architecture Dependent Modules::https://www.debian.org/doc/packaging-manuals/perl-policy/ch-module_packages.html#s-binary-modules +4.4.3::Automating Perl Dependencies::https://www.debian.org/doc/packaging-manuals/perl-policy/ch-module_packages.html#s-dh-perl +5::Perl Programs::https://www.debian.org/doc/packaging-manuals/perl-policy/ch-programs.html +5.1::Script Magic::https://www.debian.org/doc/packaging-manuals/perl-policy/ch-programs.html#s-hash-bang +5.2::Program Dependencies::https://www.debian.org/doc/packaging-manuals/perl-policy/ch-programs.html#s-program-deps +6::Programs Embedding Perl::https://www.debian.org/doc/packaging-manuals/perl-policy/ch-embed.html +6.1::Building Embedded Programs::https://www.debian.org/doc/packaging-manuals/perl-policy/ch-embed.html#s-build-embedded +6.2::Embedded Perl Dependencies::https://www.debian.org/doc/packaging-manuals/perl-policy/ch-embed.html#s-embedded-deps +6.3::Perl Package Upgrades::https://www.debian.org/doc/packaging-manuals/perl-policy/ch-embed.html#s-perl-upgrades +A::Perl 6::https://www.debian.org/doc/packaging-manuals/perl-policy/ap-perl6.html diff --git a/data/authority/python-policy b/data/authority/python-policy new file mode 100644 index 0000000..1c86d59 --- /dev/null +++ b/data/authority/python-policy @@ -0,0 +1,52 @@ +# Data about titles, sections, and URLs of manuals, used to expand references +# in tag descriptions and add links for HTML output. Each line of this file +# has three fields separated by double colons: +# +# <section> :: <title> :: <url> +# +# If <section> is an underscore, that line specifies the title and URL for the +# whole manual. + +_::Debian Python Policy 0.12.0.0 documentation::https://www.debian.org/doc/packaging-manuals/python-policy/ +1::Copyright::https://www.debian.org/doc/packaging-manuals/python-policy/index.html#document-copyright +2::Completing the move to Python 3::https://www.debian.org/doc/packaging-manuals/python-policy/index.html#document-python3 +2.1::Removal of the unversioned packages::https://www.debian.org/doc/packaging-manuals/python-policy/index.html#removal-of-the-unversioned-packages +2.2::Unversioned python commands::https://www.debian.org/doc/packaging-manuals/python-policy/index.html#unversioned-python-commands +3::Python Packaging::https://www.debian.org/doc/packaging-manuals/python-policy/index.html#document-interpreter +3.1::Versions::https://www.debian.org/doc/packaging-manuals/python-policy/index.html#versions +3.2::Main packages::https://www.debian.org/doc/packaging-manuals/python-policy/index.html#main-packages +3.3::Minimal packages::https://www.debian.org/doc/packaging-manuals/python-policy/index.html#minimal-packages +3.4::Python Interpreter::https://www.debian.org/doc/packaging-manuals/python-policy/index.html#python-interpreter +3.4.1::Interpreter Name::https://www.debian.org/doc/packaging-manuals/python-policy/index.html#interpreter-name +3.4.2::Interpreter Location::https://www.debian.org/doc/packaging-manuals/python-policy/index.html#interpreter-location +3.5::Module Path::https://www.debian.org/doc/packaging-manuals/python-policy/index.html#module-path +3.6::Hooks for updates to installed runtimes::https://www.debian.org/doc/packaging-manuals/python-policy/index.html#hooks-for-updates-to-installed-runtimes +3.7::Documentation::https://www.debian.org/doc/packaging-manuals/python-policy/index.html#documentation +4::Packaged Modules::https://www.debian.org/doc/packaging-manuals/python-policy/index.html#document-packaged-modules +4.1::Types of Python Modules::https://www.debian.org/doc/packaging-manuals/python-policy/index.html#types-of-python-modules +4.2::Wheels::https://www.debian.org/doc/packaging-manuals/python-policy/index.html#wheels +4.3::Module Package Names::https://www.debian.org/doc/packaging-manuals/python-policy/index.html#module-package-names +4.4::Specifying Supported Versions::https://www.debian.org/doc/packaging-manuals/python-policy/index.html#specifying-supported-versions +4.5::Dependencies::https://www.debian.org/doc/packaging-manuals/python-policy/index.html#dependencies +4.6::Provides::https://www.debian.org/doc/packaging-manuals/python-policy/index.html#provides +4.7::Modules Byte-Compilation::https://www.debian.org/doc/packaging-manuals/python-policy/index.html#modules-byte-compilation +5::Python Programs::https://www.debian.org/doc/packaging-manuals/python-policy/index.html#document-python-programs +5.1::Interpreter directive (“Shebang”)::https://www.debian.org/doc/packaging-manuals/python-policy/index.html#interpreter-directive-shebang +5.2::Programs using the default Python::https://www.debian.org/doc/packaging-manuals/python-policy/index.html#programs-using-the-default-python +5.3::Programs Shipping Private Modules::https://www.debian.org/doc/packaging-manuals/python-policy/index.html#programs-shipping-private-modules +5.4::Programs Using a Particular Python Version::https://www.debian.org/doc/packaging-manuals/python-policy/index.html#programs-using-a-particular-python-version +6::Programs Embedding Python::https://www.debian.org/doc/packaging-manuals/python-policy/index.html#document-embedded-python +6.1::Building Embedded Programs::https://www.debian.org/doc/packaging-manuals/python-policy/index.html#building-embedded-programs +6.2::Embedded Python Dependencies::https://www.debian.org/doc/packaging-manuals/python-policy/index.html#embedded-python-dependencies +7::Interaction with Locally Installed Python Versions::https://www.debian.org/doc/packaging-manuals/python-policy/index.html#document-locally-installed-python +appendix-1::Build Dependencies::https://www.debian.org/doc/packaging-manuals/python-policy/index.html#document-build-dependencies +appendix-2::Packaging Tools::https://www.debian.org/doc/packaging-manuals/python-policy/index.html#document-packaging-tools +appendix-2.1::distutils::https://www.debian.org/doc/packaging-manuals/python-policy/index.html#distutils +appendix-2.2::setuptools::https://www.debian.org/doc/packaging-manuals/python-policy/index.html#setuptools +appendix-2.3::dh-python::https://www.debian.org/doc/packaging-manuals/python-policy/index.html#dh-python +appendix-2.4::pybuild::https://www.debian.org/doc/packaging-manuals/python-policy/index.html#pybuild +appendix-2.5::CDBS::https://www.debian.org/doc/packaging-manuals/python-policy/index.html#cdbs +appendix-2.6::python-support (removed)::https://www.debian.org/doc/packaging-manuals/python-policy/index.html#python-support-removed +appendix-2.7::python-central (removed)::https://www.debian.org/doc/packaging-manuals/python-policy/index.html#python-central-removed +appendix-3::Upgrade Procedure::https://www.debian.org/doc/packaging-manuals/python-policy/index.html#document-upgrade-procedure +appendix-4::This document::https://www.debian.org/doc/packaging-manuals/python-policy/index.html#document-this-document diff --git a/data/authority/vim-policy b/data/authority/vim-policy new file mode 100644 index 0000000..b7469f4 --- /dev/null +++ b/data/authority/vim-policy @@ -0,0 +1,18 @@ +# Data about titles, sections, and URLs of manuals, used to expand references +# in tag descriptions and add links for HTML output. Each line of this file +# has three fields separated by double colons: +# +# <section> :: <title> :: <url> +# +# If <section> is an underscore, that line specifies the title and URL for the +# whole manual. + +_::Debian Packaging Policy for Vim::file:///usr/share/doc/vim/vim-policy.html/index.html +1::Vim Addon Packaging in a Nutshell::file:///usr/share/doc/vim/vim-policy.html/index.html#nutshell +2::Vim Packaging::file:///usr/share/doc/vim/vim-policy.html/x73.html +3::Packaging of Vim Addons::file:///usr/share/doc/vim/vim-policy.html/x113.html +3.1::Addon Structure::file:///usr/share/doc/vim/vim-policy.html/x113.html#addon-structure +3.2::Addon Packages::file:///usr/share/doc/vim/vim-policy.html/x113.html#addon-packages +3.3::Registry Entries::file:///usr/share/doc/vim/vim-policy.html/x113.html#registry-entry +4::Tools::file:///usr/share/doc/vim/vim-policy.html/x221.html +A::Vim Registry Entry Examples::file:///usr/share/doc/vim/vim-policy.html/a245.html diff --git a/data/binaries/arch-64bit-equivs b/data/binaries/arch-64bit-equivs new file mode 100644 index 0000000..e349014 --- /dev/null +++ b/data/binaries/arch-64bit-equivs @@ -0,0 +1,13 @@ +# Manually maintained table mapping 32bit archs to the +# name of their 64bit counter part. +# +# Please keep this sorted by "key" (i.e. 32bit arch) + +hppa => hppa64 +i386 => amd64 +kfreebsd-i386 => kfreebsd-amd64 +mips => mips64 +mipsel => mipsel64 +powerpc => ppc64 +s390 => s390x +sparc => sparc64 diff --git a/data/binaries/arch-regex b/data/binaries/arch-regex new file mode 100644 index 0000000..3e5c141 --- /dev/null +++ b/data/binaries/arch-regex @@ -0,0 +1,57 @@ +# Manually maintained table of architectures and their "file(1)" +# signature. Table based on checks/emdebian's %archdetecttable, as +# found in emdebian-tools. +# +# syntax: +# key ~~regex +# +# Note spaces on the right hand side of ~~ are assumed to be a part +# of the regex. +# +# Please keep this sorted based on the arch names. + +# Phony architectures used for some special cases, where Lintian just +# requires the number of "bits" to be correct. +# +32 ~~^ELF 32-bit +64 ~~^ELF 64-bit + +# Regular architectures + +# some of the negative assertions require an anchor in the rear + +alpha ~~^ELF 64-bit LSB .* Alpha +amd64 ~~^ELF 64-bit LSB .* x86-64, .* (?:GNU/Linux|(?!GNU)).*$ +arm ~~^ELF 32-bit LSB .* ARM, version \d, +arm64 ~~^ELF 64-bit LSB .* ARM aarch64, +armeb ~~^ELF 32-bit MSB .* ARM +armel ~~^ELF 32-bit LSB .* ARM, .* [(](?:SYSV|GNU/Linux)[)] +armhf ~~^ELF 32-bit LSB .* ARM, .* [(](?:SYSV|GNU/Linux)[)] +#avr32 ~~^ELF 32-bit MSB .* [(]SYSV[)] +hppa ~~^ELF 32-bit MSB .* PA-RISC +hppa64 ~~^ELF 64-bit MSB .* PA-RISC +hurd-i386 ~~^ELF 32-bit LSB .* Intel 80386, .* (?:GNU/Hurd|(?!GNU)).*$ +i386 ~~^ELF 32-bit LSB .* 80386, .* (?:GNU/Linux|(?!GNU)).*$ +ia64 ~~^ELF 64-bit LSB .* IA-64 +kfreebsd-amd64~~^ELF 64-bit LSB .* x86-64, .* (?:GNU/kFreeBSD|(?!GNU)).*$ +kfreebsd-i386 ~~^ELF 32-bit LSB .* 80386, .* (?:GNU/kFreeBSD|(?!GNU)).*$ +lpia ~~^ELF 32-bit LSB .* 80386, .* (?:GNU/Linux|(?!GNU)).*$ +m32r ~~^ELF 32-bit MSB .* M32R +m68k ~~^ELF 32-bit MSB .* 680[02]0 +mips ~~^ELF 32-bit MSB .* MIPS +mipsel ~~^ELF 32-bit LSB .* MIPS +#mipsn32 ~~^ELF 32-bit LSB .* MIPS.* N32 +mips64 ~~^ELF 64-bit MSB .* MIPS +mips64el ~~^ELF 64-bit LSB .* MIPS +powerpc ~~^ELF 32-bit MSB .* PowerPC +powerpcspe ~~^ELF 32-bit MSB .* PowerPC .* cisco 4500 +ppc64 ~~^ELF 64-bit MSB .* PowerPC +ppc64el ~~^ELF 64-bit LSB .* PowerPC +riscv64 ~~^ELF 64-bit LSB .* RISC-V +s390 ~~^ELF 32-bit MSB .* S.390 +s390x ~~^ELF 64-bit MSB .* S.390 +sh4 ~~^ELF 32-bit LSB .* Renesas SH +sparc ~~^ELF 32-bit MSB .* SPARC +#sparcv9b ~~^ELF 32-bit MSB .* SPARC.* V8[+] +sparc64 ~~^ELF 64-bit MSB .* SPARC +x32 ~~^ELF 32-bit LSB .* x86-64 diff --git a/data/binaries/embedded-libs b/data/binaries/embedded-libs new file mode 100644 index 0000000..47d7b10 --- /dev/null +++ b/data/binaries/embedded-libs @@ -0,0 +1,111 @@ +# Manually maintained table of embedded libraries. +# +# Basic syntax: +# key || [options] || <regex> +# +# Where [options] is space separated list of: +# +# source=<src> +# - If present, it declares that this library is built from the +# source package <src> +# - If both "source" and "source-regex" are omitted, then +# Lintian will default to using "source" with a value equal +# to the key. +# - Cannot be used with "source-regex" +# +# source-regex=<srcregex> +# - If present, it declares that this library is built from (or +# expected in binaries built from) any source package whose +# name matches <srcregex>. +# - Cannot be used with "source" +# +# libname=<name> +# - Declares the "name" of the library. +# - If omitted, the key will be used. +# +# Note: Avoid unintended leading and trailing whitespace in <regex> +# as Lintian will assume such whitespace is a part of the regex. +# If possible, consider using \s or [ ] to mark intended trailing +# whitespace. +# +# Please keep it sorted by key. +# + +bzip2 || ||(?m)^This is a bug in bzip2 +curl || ||A libcurl function was given a bad argument +expat || ||(?m)^requested feature requires XML_DTD support in Expat +file || ||(?m)^could not find any (?:valid )?magic files +freetype || ||HuaTianSongTi[?] +ftgl || ||FTGlyphContainer +gl2ps || ||\(C\) 1999-2009 C\. Geuzaine +glee || ||Extension name exceeds 1023 characters\. +glew || ||Missing GL version +gmp || ||GNU MP: Cannot allocate memory +heimdal || ||Heimdal (?:NTLMSSP|SPNEGO) Mechanism + +# not really an embedded lib but avoid duplication +ieee-data || ||(?i)(?:standards(?:-oui\.ieee\.org|\.ieee\.org/develop/regauth/oui)/oui\.txt|DR\. B\. STRUCK) + +lcms || ||cmsCreateTransform: intent mismatch +lcms2 || ||Unsupported number of channels for VCGT +libavcodec ||source-regex=(?:libav|ffmpeg)||insufficient thread locking around avcodec_open/close\(\)\n +libavdevice ||source-regex=(?:libav|ffmpeg)||Soundcard does not support 16 bit sample format\n +libavfilter ||source-regex=(?:libav|ffmpeg)||Buffer video frames, and make them accessible to the filterchain\. +libavformat ||source-regex=(?:libav|ffmpeg)||Format detected only with low score of %d, misdetection possible!\n +libavutil ||source-regex=(?:libav|ffmpeg)||AVOption type %d of option %s not implemented yet\n +libgd ||source-regex=libgd2? ||gd-(?:png|jpeg:) error: +libgadu || ||Gadu-Gadu Client Build +libgxps || ||Invalid XPS File: cannot open fixedrepresentation +libidn || ||(?m)^(?:Punycode failed|ISCSIprep$) +libidn2-0 || ||punycode conversion resulted in overflow +libjpeg ||source-regex=libjpeg.* ||(?m)^Caution: quantization tables are too coarse for baseline JPEG +libjsoncpp || ||A valid JSON document must be either an array or an object value\. +liblivemedia || ||(?:Received incoming RTSP request:|LIVE555 Streaming Media v) +libm ||source-regex=e?glibc ||neg\*\*non-integral: DOMAIN error +libmms ||source-regex=(?:libmms|xine-lib)||failed to read new ASF header +libmng || ||TERM misplaced during creation of MNG stream +libmsn || ||The MSN server has terminated the connection with an unknown reason code\. +libminiupnpc||source=miniupnpc||Miniupnpc Invalid Arguments +libmikmod || ||APUN \(APlayer\) and UNI \(MikMod\) +libmysqlclient ||source-regex=(?:mysql|mariadb)(?:-\d.*)? ||MySQL client ran out of memory +libpcap || ||(?:pcap_activate: The "any" device isn\'t supported|corrupted frame on kernel ring mac offset) +libpng ||source-regex=(?:libpng(?:1\.6)?)||(?m)^(?:Potential overflow in png_zalloc|gamma value does not match libpng estimate) +libquicktime|| ||quicktime_make_streamable: out of memory +libraw || ||Unsupported file format or not RAW file +libpostproc ||source-regex=(?:libav|libpostproc|ffmpeg)||using npp filters 0x%X/0x%X\n +libsass || ||unknown internal error; please contact the LibSass maintainers +libssh2 || ||Invalid descriptor passed to libssh2_poll +libssh || ||Error allocating memory for ssh_scp +libswscale ||source-regex=(?:libav|ffmpeg)||Exactly one scaler algorithm must be chosen[,\n] + +# Trailing whitespace was present when the file was created (see commit: 77fd246) +libtheora || ||Xiph.Org libtheora\s + +libupnp ||source-regex=libupnp\d?||(?m)(?:SSDP_LIB: New Request Handler:Error|^mserv start: Error in IPv4 listen) +libxml2 || ||root and DTD name do not match +libyaml || ||(?m)^did not find expected <stream-start> +libytnef || ||Signature does not match\. Not TNEF\. +ltdl ||source=libtool ||(?m)^library already shutdown +mbedtls || ||(?m)^(?:ASN1 - Actual length differs from expected length|SSL - The connection indicated an EOF) +mpfr ||source=mpfr4 ||MPFR: Can't allocate memory +mpg123 || ||Warning: Encountered more data after announced end of track +ncurses || ||Not enough memory to create terminal structure +nspr || ||(?m)^Unable to create nspr log file +nss || ||(?m)^My Encrytion Test Data +openjpeg ||source-regex=openjpeg2?||(?:tcd_decode: incomplete bit?stream|Cannot handle box of less than 8 bytes) +openssl ||source-regex=openssl(?:\d+(?:\.\d+)?)?||You need to read the OpenSSL FAQ +pcre3 || ||this version of PCRE is not compiled with PCRE_UTF8 support +poppler ||source-regex=(?:poppler|xpdf)||(?:May not be a PDF file \(continuing anyway\)|PDF file is damaged - attempting to reconstruct xref table\.\.\.) +srtp || ||srtp: in stream 0x%x: +sqlite ||source-regex=sqlite3? ||CREATE TABLE sqlite_master\( +taglib || ||One of the size bytes in the id3v2 header was greater than the allowed 128 +t1lib || ||t1lib is copyright \(c\) Rainer Menzner +tiff ||source-regex=tiff\d* ||No space for PixarLog state block +tinyxml || ||(?m)^(?:Error when TiXmlDocument added to document|Error null \(0\) or unexpected EOF found in input stream\.) + +# We exclude version strings starting with "4 " since that's a mark of the +# Pascal implementation, which is not what this tag is designed to detect. +# (The "4" is actually the string length (52 characters) in the Pascal +# counted string format.) +zlib ||source-regex=(?:zlib|klibc|kfreebsd-kernel-di\w+) ||(?m)(?<!4 )(?:in|de)flate (?:\d[ \w.\-]{1,20}[\w.\-]) + diff --git a/data/binaries/hardened-functions b/data/binaries/hardened-functions new file mode 100644 index 0000000..4b48d0a --- /dev/null +++ b/data/binaries/hardened-functions @@ -0,0 +1,88 @@ +# Set of C functions that have a hardened variant +# +# Known functions which are deliberately omitted +# (due to false positives): +# +# memcpy +# memset +# memmove +# wmemcpy +# wmemmove +# wmemset +# +# The list is manually updated, please keep it +# sorted by name +# + +asprintf +confstr +dprintf +fdelt +fgets +fgets_unlocked +fgetws +fgetws_unlocked +fprintf +fread +fread_unlocked +fwprintf +getcwd +getdomainname +getgroups +gethostname +getlogin_r +gets +getwd +longjmp +mbsnrtowcs +mbsrtowcs +mbstowcs +mempcpy +obstack_printf +obstack_vprintf +poll +ppoll +pread64 +pread +printf +ptsname_r +read +readlink +readlinkat +realpath +recv +recvfrom +snprintf +sprintf +stpcpy +stpncpy +strcat +strcpy +strncat +strncpy +swprintf +syslog +ttyname_r +vasprintf +vdprintf +vfprintf +vfwprintf +vprintf +vsnprintf +vsprintf +vswprintf +vsyslog +vwprintf +wcpcpy +wcpncpy +wcrtomb +wcscat +wcscpy +wcsncat +wcsncpy +wcsnrtombs +wcsrtombs +wcstombs +wctomb +wmempcpy +wprintf diff --git a/data/binaries/lfs-symbols b/data/binaries/lfs-symbols new file mode 100644 index 0000000..3f1aa1b --- /dev/null +++ b/data/binaries/lfs-symbols @@ -0,0 +1,68 @@ +# Manually maintained list of non-lfs symbols +# +# List was found by grepping around in /usr/include on an i386 system +# with build-essential installed +# +# Please keep this sorted by key. + +__fxstat +__fxstatat +__lxstat +__xstat +aio_cancel +aio_error +aio_fsync +aio_read +aio_return +aio_suspend +aio_write +alphasort +creat +fallocate +fgetpos +fopen +freopen +fseeko +fsetpos +fstatfs +fstatvfs +ftello +ftruncate +fts_open +fts_read +fts_children +fts_set +fts_close +ftw +getdirentries +getrlimit +glob +globfree +lio_listio +lockf +lseek +mkostemp +mkostemps +mkstemp +mkstemps +mmap +nftw +open +openat +posix_fadvise +posix_fallocate +pread +preadv +prlimit +pwrite +pwritev +readdir +readdir_r +scandir +sendfile +setrlimit +statfs +statvfs +tmpfile +truncate +versionsort diff --git a/data/binaries/obsolete-crypt-functions b/data/binaries/obsolete-crypt-functions new file mode 100644 index 0000000..6029f8a --- /dev/null +++ b/data/binaries/obsolete-crypt-functions @@ -0,0 +1,13 @@ +# Set of C functions defined by libcrypt.so.1 that should no longer be +# used at all, either because they imply use of the obsolete DES +# encryption algorithm, or because they are alternative, less-portable +# names for 'crypt'. +# +# The list is manually updated, please keep it sorted by name. + +encrypt || obsolete-des-encryption +encrypt_r || obsolete-des-encryption +setkey || obsolete-des-encryption +setkey_r || obsolete-des-encryption + +fcrypt || obsolete-crypt-alias diff --git a/data/binaries/spelling-exceptions b/data/binaries/spelling-exceptions new file mode 100644 index 0000000..18bf33f --- /dev/null +++ b/data/binaries/spelling-exceptions @@ -0,0 +1,14 @@ +# Set of exceptions that should be ignored for spelling-error-in-binary + +teH # From #711207 +tEH # From #782902 +tEh # From #782902, too +ang # The Go stdlib html/ package contains "ang;" +writeN # The Go stdlib text/tabwriter pkg contains "writeN" +ot # The Go stdlib runtime/ package contains "ot" +cymK # The Go runtime contains "cymK" (#888074) +selectOn # "void ToolBoxWidget::selectOn()" in pencil2d (#895818) +itialize # From #923725 (carla) +wIH # From #895841 (osmo-trx) +wiH +iIF # binutils/armhf (#939637) diff --git a/data/buildflags/hardening.json b/data/buildflags/hardening.json new file mode 100644 index 0000000..e5f3a53 --- /dev/null +++ b/data/buildflags/hardening.json @@ -0,0 +1,4444 @@ +{ + "preamble" : { + "cargo" : "recommended_features", + "title" : "Hardening Flags from Dpkg" + }, + "recommended_features" : { + "aix-alpha" : [ + "bindnow", + "format", + "fortify", + "relro" + ], + "aix-amd64" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "aix-arc" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "aix-arm" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "aix-arm64" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "aix-armeb" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "aix-avr32" : [ + "format", + "fortify", + "stackprotector", + "stackprotectorstrong" + ], + "aix-hppa" : [ + "format", + "fortify" + ], + "aix-i386" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "aix-ia64" : [ + "format", + "fortify" + ], + "aix-m32r" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "aix-m68k" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "aix-mips" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "aix-mips64" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "aix-mips64el" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "aix-mips64r6" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "aix-mips64r6el" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "aix-mipsel" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "aix-mipsr6" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "aix-mipsr6el" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "aix-nios2" : [ + "bindnow", + "format", + "fortify", + "relro" + ], + "aix-or1k" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "aix-powerpc" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "aix-powerpcel" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "aix-ppc64" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "aix-ppc64el" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "aix-riscv64" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "aix-s390" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "aix-s390x" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "aix-sh3" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "aix-sh3eb" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "aix-sh4" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "aix-sh4eb" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "aix-sparc" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "aix-sparc64" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "aix-tilegx" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "alpha" : [ + "bindnow", + "format", + "fortify", + "pie", + "relro" + ], + "amd64" : [ + "bindnow", + "format", + "fortify", + "pie", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "arc" : [ + "bindnow", + "format", + "fortify", + "pie", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "arm" : [ + "bindnow", + "format", + "fortify", + "pie", + "relro" + ], + "arm64" : [ + "bindnow", + "format", + "fortify", + "pie", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "arm64ilp32" : [ + "bindnow", + "format", + "fortify", + "pie", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "armeb" : [ + "bindnow", + "format", + "fortify", + "pie", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "armel" : [ + "bindnow", + "format", + "fortify", + "pie", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "armhf" : [ + "bindnow", + "format", + "fortify", + "pie", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "avr32" : [ + "format", + "fortify", + "stackprotector", + "stackprotectorstrong" + ], + "darwin-alpha" : [ + "bindnow", + "format", + "fortify", + "relro" + ], + "darwin-amd64" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "darwin-arc" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "darwin-arm" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "darwin-arm64" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "darwin-armeb" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "darwin-avr32" : [ + "format", + "fortify", + "stackprotector", + "stackprotectorstrong" + ], + "darwin-hppa" : [ + "format", + "fortify" + ], + "darwin-i386" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "darwin-ia64" : [ + "format", + "fortify" + ], + "darwin-m32r" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "darwin-m68k" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "darwin-mips" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "darwin-mips64" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "darwin-mips64el" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "darwin-mips64r6" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "darwin-mips64r6el" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "darwin-mipsel" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "darwin-mipsr6" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "darwin-mipsr6el" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "darwin-nios2" : [ + "bindnow", + "format", + "fortify", + "relro" + ], + "darwin-or1k" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "darwin-powerpc" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "darwin-powerpcel" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "darwin-ppc64" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "darwin-ppc64el" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "darwin-riscv64" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "darwin-s390" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "darwin-s390x" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "darwin-sh3" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "darwin-sh3eb" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "darwin-sh4" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "darwin-sh4eb" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "darwin-sparc" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "darwin-sparc64" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "darwin-tilegx" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "dragonflybsd-alpha" : [ + "bindnow", + "format", + "fortify", + "relro" + ], + "dragonflybsd-amd64" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "dragonflybsd-arc" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "dragonflybsd-arm" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "dragonflybsd-arm64" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "dragonflybsd-armeb" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "dragonflybsd-avr32" : [ + "format", + "fortify", + "stackprotector", + "stackprotectorstrong" + ], + "dragonflybsd-hppa" : [ + "format", + "fortify" + ], + "dragonflybsd-i386" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "dragonflybsd-ia64" : [ + "format", + "fortify" + ], + "dragonflybsd-m32r" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "dragonflybsd-m68k" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "dragonflybsd-mips" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "dragonflybsd-mips64" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "dragonflybsd-mips64el" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "dragonflybsd-mips64r6" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "dragonflybsd-mips64r6el" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "dragonflybsd-mipsel" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "dragonflybsd-mipsr6" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "dragonflybsd-mipsr6el" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "dragonflybsd-nios2" : [ + "bindnow", + "format", + "fortify", + "relro" + ], + "dragonflybsd-or1k" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "dragonflybsd-powerpc" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "dragonflybsd-powerpcel" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "dragonflybsd-ppc64" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "dragonflybsd-ppc64el" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "dragonflybsd-riscv64" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "dragonflybsd-s390" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "dragonflybsd-s390x" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "dragonflybsd-sh3" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "dragonflybsd-sh3eb" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "dragonflybsd-sh4" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "dragonflybsd-sh4eb" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "dragonflybsd-sparc" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "dragonflybsd-sparc64" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "dragonflybsd-tilegx" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "freebsd-alpha" : [ + "bindnow", + "format", + "fortify", + "relro" + ], + "freebsd-amd64" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "freebsd-arc" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "freebsd-arm" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "freebsd-arm64" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "freebsd-armeb" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "freebsd-avr32" : [ + "format", + "fortify", + "stackprotector", + "stackprotectorstrong" + ], + "freebsd-hppa" : [ + "format", + "fortify" + ], + "freebsd-i386" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "freebsd-ia64" : [ + "format", + "fortify" + ], + "freebsd-m32r" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "freebsd-m68k" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "freebsd-mips" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "freebsd-mips64" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "freebsd-mips64el" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "freebsd-mips64r6" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "freebsd-mips64r6el" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "freebsd-mipsel" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "freebsd-mipsr6" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "freebsd-mipsr6el" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "freebsd-nios2" : [ + "bindnow", + "format", + "fortify", + "relro" + ], + "freebsd-or1k" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "freebsd-powerpc" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "freebsd-powerpcel" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "freebsd-ppc64" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "freebsd-ppc64el" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "freebsd-riscv64" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "freebsd-s390" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "freebsd-s390x" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "freebsd-sh3" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "freebsd-sh3eb" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "freebsd-sh4" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "freebsd-sh4eb" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "freebsd-sparc" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "freebsd-sparc64" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "freebsd-tilegx" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "hppa" : [ + "format", + "fortify" + ], + "hurd-alpha" : [ + "bindnow", + "format", + "fortify", + "pie", + "relro" + ], + "hurd-amd64" : [ + "bindnow", + "format", + "fortify", + "pie", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "hurd-arc" : [ + "bindnow", + "format", + "fortify", + "pie", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "hurd-arm" : [ + "bindnow", + "format", + "fortify", + "pie", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "hurd-arm64" : [ + "bindnow", + "format", + "fortify", + "pie", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "hurd-armeb" : [ + "bindnow", + "format", + "fortify", + "pie", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "hurd-avr32" : [ + "format", + "fortify", + "stackprotector", + "stackprotectorstrong" + ], + "hurd-hppa" : [ + "format", + "fortify" + ], + "hurd-i386" : [ + "bindnow", + "format", + "fortify", + "pie", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "hurd-ia64" : [ + "format", + "fortify", + "pie" + ], + "hurd-m32r" : [ + "bindnow", + "format", + "fortify", + "pie", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "hurd-m68k" : [ + "bindnow", + "format", + "fortify", + "pie", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "hurd-mips" : [ + "bindnow", + "format", + "fortify", + "pie", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "hurd-mips64" : [ + "bindnow", + "format", + "fortify", + "pie", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "hurd-mips64el" : [ + "bindnow", + "format", + "fortify", + "pie", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "hurd-mips64r6" : [ + "bindnow", + "format", + "fortify", + "pie", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "hurd-mips64r6el" : [ + "bindnow", + "format", + "fortify", + "pie", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "hurd-mipsel" : [ + "bindnow", + "format", + "fortify", + "pie", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "hurd-mipsr6" : [ + "bindnow", + "format", + "fortify", + "pie", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "hurd-mipsr6el" : [ + "bindnow", + "format", + "fortify", + "pie", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "hurd-nios2" : [ + "bindnow", + "format", + "fortify", + "pie", + "relro" + ], + "hurd-or1k" : [ + "bindnow", + "format", + "fortify", + "pie", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "hurd-powerpc" : [ + "bindnow", + "format", + "fortify", + "pie", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "hurd-powerpcel" : [ + "bindnow", + "format", + "fortify", + "pie", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "hurd-ppc64" : [ + "bindnow", + "format", + "fortify", + "pie", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "hurd-ppc64el" : [ + "bindnow", + "format", + "fortify", + "pie", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "hurd-riscv64" : [ + "bindnow", + "format", + "fortify", + "pie", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "hurd-s390" : [ + "bindnow", + "format", + "fortify", + "pie", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "hurd-s390x" : [ + "bindnow", + "format", + "fortify", + "pie", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "hurd-sh3" : [ + "bindnow", + "format", + "fortify", + "pie", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "hurd-sh3eb" : [ + "bindnow", + "format", + "fortify", + "pie", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "hurd-sh4" : [ + "bindnow", + "format", + "fortify", + "pie", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "hurd-sh4eb" : [ + "bindnow", + "format", + "fortify", + "pie", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "hurd-sparc" : [ + "bindnow", + "format", + "fortify", + "pie", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "hurd-sparc64" : [ + "bindnow", + "format", + "fortify", + "pie", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "hurd-tilegx" : [ + "bindnow", + "format", + "fortify", + "pie", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "i386" : [ + "bindnow", + "format", + "fortify", + "pie", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "ia64" : [ + "format", + "fortify", + "pie" + ], + "kfreebsd-alpha" : [ + "bindnow", + "format", + "fortify", + "pie", + "relro" + ], + "kfreebsd-amd64" : [ + "bindnow", + "format", + "fortify", + "pie", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "kfreebsd-arc" : [ + "bindnow", + "format", + "fortify", + "pie", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "kfreebsd-arm" : [ + "bindnow", + "format", + "fortify", + "pie", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "kfreebsd-arm64" : [ + "bindnow", + "format", + "fortify", + "pie", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "kfreebsd-armeb" : [ + "bindnow", + "format", + "fortify", + "pie", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "kfreebsd-armhf" : [ + "bindnow", + "format", + "fortify", + "pie", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "kfreebsd-avr32" : [ + "format", + "fortify", + "stackprotector", + "stackprotectorstrong" + ], + "kfreebsd-hppa" : [ + "format", + "fortify" + ], + "kfreebsd-i386" : [ + "bindnow", + "format", + "fortify", + "pie", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "kfreebsd-ia64" : [ + "format", + "fortify", + "pie" + ], + "kfreebsd-m32r" : [ + "bindnow", + "format", + "fortify", + "pie", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "kfreebsd-m68k" : [ + "bindnow", + "format", + "fortify", + "pie", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "kfreebsd-mips" : [ + "bindnow", + "format", + "fortify", + "pie", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "kfreebsd-mips64" : [ + "bindnow", + "format", + "fortify", + "pie", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "kfreebsd-mips64el" : [ + "bindnow", + "format", + "fortify", + "pie", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "kfreebsd-mips64r6" : [ + "bindnow", + "format", + "fortify", + "pie", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "kfreebsd-mips64r6el" : [ + "bindnow", + "format", + "fortify", + "pie", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "kfreebsd-mipsel" : [ + "bindnow", + "format", + "fortify", + "pie", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "kfreebsd-mipsr6" : [ + "bindnow", + "format", + "fortify", + "pie", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "kfreebsd-mipsr6el" : [ + "bindnow", + "format", + "fortify", + "pie", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "kfreebsd-nios2" : [ + "bindnow", + "format", + "fortify", + "pie", + "relro" + ], + "kfreebsd-or1k" : [ + "bindnow", + "format", + "fortify", + "pie", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "kfreebsd-powerpc" : [ + "bindnow", + "format", + "fortify", + "pie", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "kfreebsd-powerpcel" : [ + "bindnow", + "format", + "fortify", + "pie", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "kfreebsd-ppc64" : [ + "bindnow", + "format", + "fortify", + "pie", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "kfreebsd-ppc64el" : [ + "bindnow", + "format", + "fortify", + "pie", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "kfreebsd-riscv64" : [ + "bindnow", + "format", + "fortify", + "pie", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "kfreebsd-s390" : [ + "bindnow", + "format", + "fortify", + "pie", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "kfreebsd-s390x" : [ + "bindnow", + "format", + "fortify", + "pie", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "kfreebsd-sh3" : [ + "bindnow", + "format", + "fortify", + "pie", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "kfreebsd-sh3eb" : [ + "bindnow", + "format", + "fortify", + "pie", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "kfreebsd-sh4" : [ + "bindnow", + "format", + "fortify", + "pie", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "kfreebsd-sh4eb" : [ + "bindnow", + "format", + "fortify", + "pie", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "kfreebsd-sparc" : [ + "bindnow", + "format", + "fortify", + "pie", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "kfreebsd-sparc64" : [ + "bindnow", + "format", + "fortify", + "pie", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "kfreebsd-tilegx" : [ + "bindnow", + "format", + "fortify", + "pie", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "knetbsd-alpha" : [ + "bindnow", + "format", + "fortify", + "pie", + "relro" + ], + "knetbsd-amd64" : [ + "bindnow", + "format", + "fortify", + "pie", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "knetbsd-arc" : [ + "bindnow", + "format", + "fortify", + "pie", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "knetbsd-arm" : [ + "bindnow", + "format", + "fortify", + "pie", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "knetbsd-arm64" : [ + "bindnow", + "format", + "fortify", + "pie", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "knetbsd-armeb" : [ + "bindnow", + "format", + "fortify", + "pie", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "knetbsd-avr32" : [ + "format", + "fortify", + "stackprotector", + "stackprotectorstrong" + ], + "knetbsd-hppa" : [ + "format", + "fortify" + ], + "knetbsd-i386" : [ + "bindnow", + "format", + "fortify", + "pie", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "knetbsd-ia64" : [ + "format", + "fortify", + "pie" + ], + "knetbsd-m32r" : [ + "bindnow", + "format", + "fortify", + "pie", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "knetbsd-m68k" : [ + "bindnow", + "format", + "fortify", + "pie", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "knetbsd-mips" : [ + "bindnow", + "format", + "fortify", + "pie", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "knetbsd-mips64" : [ + "bindnow", + "format", + "fortify", + "pie", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "knetbsd-mips64el" : [ + "bindnow", + "format", + "fortify", + "pie", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "knetbsd-mips64r6" : [ + "bindnow", + "format", + "fortify", + "pie", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "knetbsd-mips64r6el" : [ + "bindnow", + "format", + "fortify", + "pie", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "knetbsd-mipsel" : [ + "bindnow", + "format", + "fortify", + "pie", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "knetbsd-mipsr6" : [ + "bindnow", + "format", + "fortify", + "pie", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "knetbsd-mipsr6el" : [ + "bindnow", + "format", + "fortify", + "pie", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "knetbsd-nios2" : [ + "bindnow", + "format", + "fortify", + "pie", + "relro" + ], + "knetbsd-or1k" : [ + "bindnow", + "format", + "fortify", + "pie", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "knetbsd-powerpc" : [ + "bindnow", + "format", + "fortify", + "pie", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "knetbsd-powerpcel" : [ + "bindnow", + "format", + "fortify", + "pie", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "knetbsd-ppc64" : [ + "bindnow", + "format", + "fortify", + "pie", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "knetbsd-ppc64el" : [ + "bindnow", + "format", + "fortify", + "pie", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "knetbsd-riscv64" : [ + "bindnow", + "format", + "fortify", + "pie", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "knetbsd-s390" : [ + "bindnow", + "format", + "fortify", + "pie", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "knetbsd-s390x" : [ + "bindnow", + "format", + "fortify", + "pie", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "knetbsd-sh3" : [ + "bindnow", + "format", + "fortify", + "pie", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "knetbsd-sh3eb" : [ + "bindnow", + "format", + "fortify", + "pie", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "knetbsd-sh4" : [ + "bindnow", + "format", + "fortify", + "pie", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "knetbsd-sh4eb" : [ + "bindnow", + "format", + "fortify", + "pie", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "knetbsd-sparc" : [ + "bindnow", + "format", + "fortify", + "pie", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "knetbsd-sparc64" : [ + "bindnow", + "format", + "fortify", + "pie", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "knetbsd-tilegx" : [ + "bindnow", + "format", + "fortify", + "pie", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "kopensolaris-alpha" : [ + "bindnow", + "format", + "fortify", + "relro" + ], + "kopensolaris-amd64" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "kopensolaris-arc" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "kopensolaris-arm" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "kopensolaris-arm64" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "kopensolaris-armeb" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "kopensolaris-avr32" : [ + "format", + "fortify", + "stackprotector", + "stackprotectorstrong" + ], + "kopensolaris-hppa" : [ + "format", + "fortify" + ], + "kopensolaris-i386" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "kopensolaris-ia64" : [ + "format", + "fortify" + ], + "kopensolaris-m32r" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "kopensolaris-m68k" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "kopensolaris-mips" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "kopensolaris-mips64" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "kopensolaris-mips64el" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "kopensolaris-mips64r6" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "kopensolaris-mips64r6el" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "kopensolaris-mipsel" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "kopensolaris-mipsr6" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "kopensolaris-mipsr6el" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "kopensolaris-nios2" : [ + "bindnow", + "format", + "fortify", + "relro" + ], + "kopensolaris-or1k" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "kopensolaris-powerpc" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "kopensolaris-powerpcel" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "kopensolaris-ppc64" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "kopensolaris-ppc64el" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "kopensolaris-riscv64" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "kopensolaris-s390" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "kopensolaris-s390x" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "kopensolaris-sh3" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "kopensolaris-sh3eb" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "kopensolaris-sh4" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "kopensolaris-sh4eb" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "kopensolaris-sparc" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "kopensolaris-sparc64" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "kopensolaris-tilegx" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "m32r" : [ + "bindnow", + "format", + "fortify", + "pie", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "m68k" : [ + "bindnow", + "format", + "fortify", + "pie", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "mint-m68k" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "mips" : [ + "bindnow", + "format", + "fortify", + "pie", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "mips64" : [ + "bindnow", + "format", + "fortify", + "pie", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "mips64el" : [ + "bindnow", + "format", + "fortify", + "pie", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "mips64r6" : [ + "bindnow", + "format", + "fortify", + "pie", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "mips64r6el" : [ + "bindnow", + "format", + "fortify", + "pie", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "mipsel" : [ + "bindnow", + "format", + "fortify", + "pie", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "mipsn32" : [ + "bindnow", + "format", + "fortify", + "pie", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "mipsn32el" : [ + "bindnow", + "format", + "fortify", + "pie", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "mipsn32r6" : [ + "bindnow", + "format", + "fortify", + "pie", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "mipsn32r6el" : [ + "bindnow", + "format", + "fortify", + "pie", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "mipsr6" : [ + "bindnow", + "format", + "fortify", + "pie", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "mipsr6el" : [ + "bindnow", + "format", + "fortify", + "pie", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "musl-linux-alpha" : [ + "bindnow", + "format", + "fortify", + "pie", + "relro" + ], + "musl-linux-amd64" : [ + "bindnow", + "format", + "fortify", + "pie", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "musl-linux-arc" : [ + "bindnow", + "format", + "fortify", + "pie", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "musl-linux-arm" : [ + "bindnow", + "format", + "fortify", + "pie", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "musl-linux-arm64" : [ + "bindnow", + "format", + "fortify", + "pie", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "musl-linux-armeb" : [ + "bindnow", + "format", + "fortify", + "pie", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "musl-linux-armhf" : [ + "bindnow", + "format", + "fortify", + "pie", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "musl-linux-avr32" : [ + "format", + "fortify", + "stackprotector", + "stackprotectorstrong" + ], + "musl-linux-hppa" : [ + "format", + "fortify" + ], + "musl-linux-i386" : [ + "bindnow", + "format", + "fortify", + "pie", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "musl-linux-ia64" : [ + "format", + "fortify", + "pie" + ], + "musl-linux-m32r" : [ + "bindnow", + "format", + "fortify", + "pie", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "musl-linux-m68k" : [ + "bindnow", + "format", + "fortify", + "pie", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "musl-linux-mips" : [ + "bindnow", + "format", + "fortify", + "pie", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "musl-linux-mips64" : [ + "bindnow", + "format", + "fortify", + "pie", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "musl-linux-mips64el" : [ + "bindnow", + "format", + "fortify", + "pie", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "musl-linux-mips64r6" : [ + "bindnow", + "format", + "fortify", + "pie", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "musl-linux-mips64r6el" : [ + "bindnow", + "format", + "fortify", + "pie", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "musl-linux-mipsel" : [ + "bindnow", + "format", + "fortify", + "pie", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "musl-linux-mipsr6" : [ + "bindnow", + "format", + "fortify", + "pie", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "musl-linux-mipsr6el" : [ + "bindnow", + "format", + "fortify", + "pie", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "musl-linux-nios2" : [ + "bindnow", + "format", + "fortify", + "pie", + "relro" + ], + "musl-linux-or1k" : [ + "bindnow", + "format", + "fortify", + "pie", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "musl-linux-powerpc" : [ + "bindnow", + "format", + "fortify", + "pie", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "musl-linux-powerpcel" : [ + "bindnow", + "format", + "fortify", + "pie", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "musl-linux-ppc64" : [ + "bindnow", + "format", + "fortify", + "pie", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "musl-linux-ppc64el" : [ + "bindnow", + "format", + "fortify", + "pie", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "musl-linux-riscv64" : [ + "bindnow", + "format", + "fortify", + "pie", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "musl-linux-s390" : [ + "bindnow", + "format", + "fortify", + "pie", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "musl-linux-s390x" : [ + "bindnow", + "format", + "fortify", + "pie", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "musl-linux-sh3" : [ + "bindnow", + "format", + "fortify", + "pie", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "musl-linux-sh3eb" : [ + "bindnow", + "format", + "fortify", + "pie", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "musl-linux-sh4" : [ + "bindnow", + "format", + "fortify", + "pie", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "musl-linux-sh4eb" : [ + "bindnow", + "format", + "fortify", + "pie", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "musl-linux-sparc" : [ + "bindnow", + "format", + "fortify", + "pie", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "musl-linux-sparc64" : [ + "bindnow", + "format", + "fortify", + "pie", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "musl-linux-tilegx" : [ + "bindnow", + "format", + "fortify", + "pie", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "netbsd-alpha" : [ + "bindnow", + "format", + "fortify", + "relro" + ], + "netbsd-amd64" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "netbsd-arc" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "netbsd-arm" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "netbsd-arm64" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "netbsd-armeb" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "netbsd-avr32" : [ + "format", + "fortify", + "stackprotector", + "stackprotectorstrong" + ], + "netbsd-hppa" : [ + "format", + "fortify" + ], + "netbsd-i386" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "netbsd-ia64" : [ + "format", + "fortify" + ], + "netbsd-m32r" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "netbsd-m68k" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "netbsd-mips" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "netbsd-mips64" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "netbsd-mips64el" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "netbsd-mips64r6" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "netbsd-mips64r6el" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "netbsd-mipsel" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "netbsd-mipsr6" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "netbsd-mipsr6el" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "netbsd-nios2" : [ + "bindnow", + "format", + "fortify", + "relro" + ], + "netbsd-or1k" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "netbsd-powerpc" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "netbsd-powerpcel" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "netbsd-ppc64" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "netbsd-ppc64el" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "netbsd-riscv64" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "netbsd-s390" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "netbsd-s390x" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "netbsd-sh3" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "netbsd-sh3eb" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "netbsd-sh4" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "netbsd-sh4eb" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "netbsd-sparc" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "netbsd-sparc64" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "netbsd-tilegx" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "nios2" : [ + "bindnow", + "format", + "fortify", + "pie", + "relro" + ], + "openbsd-alpha" : [ + "bindnow", + "format", + "fortify", + "relro" + ], + "openbsd-amd64" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "openbsd-arc" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "openbsd-arm" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "openbsd-arm64" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "openbsd-armeb" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "openbsd-avr32" : [ + "format", + "fortify", + "stackprotector", + "stackprotectorstrong" + ], + "openbsd-hppa" : [ + "format", + "fortify" + ], + "openbsd-i386" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "openbsd-ia64" : [ + "format", + "fortify" + ], + "openbsd-m32r" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "openbsd-m68k" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "openbsd-mips" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "openbsd-mips64" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "openbsd-mips64el" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "openbsd-mips64r6" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "openbsd-mips64r6el" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "openbsd-mipsel" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "openbsd-mipsr6" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "openbsd-mipsr6el" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "openbsd-nios2" : [ + "bindnow", + "format", + "fortify", + "relro" + ], + "openbsd-or1k" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "openbsd-powerpc" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "openbsd-powerpcel" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "openbsd-ppc64" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "openbsd-ppc64el" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "openbsd-riscv64" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "openbsd-s390" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "openbsd-s390x" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "openbsd-sh3" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "openbsd-sh3eb" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "openbsd-sh4" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "openbsd-sh4eb" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "openbsd-sparc" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "openbsd-sparc64" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "openbsd-tilegx" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "or1k" : [ + "bindnow", + "format", + "fortify", + "pie", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "powerpc" : [ + "bindnow", + "format", + "fortify", + "pie", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "powerpcel" : [ + "bindnow", + "format", + "fortify", + "pie", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "powerpcspe" : [ + "bindnow", + "format", + "fortify", + "pie", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "ppc64" : [ + "bindnow", + "format", + "fortify", + "pie", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "ppc64el" : [ + "bindnow", + "format", + "fortify", + "pie", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "riscv64" : [ + "bindnow", + "format", + "fortify", + "pie", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "s390" : [ + "bindnow", + "format", + "fortify", + "pie", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "s390x" : [ + "bindnow", + "format", + "fortify", + "pie", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "sh3" : [ + "bindnow", + "format", + "fortify", + "pie", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "sh3eb" : [ + "bindnow", + "format", + "fortify", + "pie", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "sh4" : [ + "bindnow", + "format", + "fortify", + "pie", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "sh4eb" : [ + "bindnow", + "format", + "fortify", + "pie", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "solaris-alpha" : [ + "bindnow", + "format", + "fortify", + "relro" + ], + "solaris-amd64" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "solaris-arc" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "solaris-arm" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "solaris-arm64" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "solaris-armeb" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "solaris-avr32" : [ + "format", + "fortify", + "stackprotector", + "stackprotectorstrong" + ], + "solaris-hppa" : [ + "format", + "fortify" + ], + "solaris-i386" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "solaris-ia64" : [ + "format", + "fortify" + ], + "solaris-m32r" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "solaris-m68k" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "solaris-mips" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "solaris-mips64" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "solaris-mips64el" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "solaris-mips64r6" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "solaris-mips64r6el" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "solaris-mipsel" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "solaris-mipsr6" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "solaris-mipsr6el" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "solaris-nios2" : [ + "bindnow", + "format", + "fortify", + "relro" + ], + "solaris-or1k" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "solaris-powerpc" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "solaris-powerpcel" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "solaris-ppc64" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "solaris-ppc64el" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "solaris-riscv64" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "solaris-s390" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "solaris-s390x" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "solaris-sh3" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "solaris-sh3eb" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "solaris-sh4" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "solaris-sh4eb" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "solaris-sparc" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "solaris-sparc64" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "solaris-tilegx" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "sparc" : [ + "bindnow", + "format", + "fortify", + "pie", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "sparc64" : [ + "bindnow", + "format", + "fortify", + "pie", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "tilegx" : [ + "bindnow", + "format", + "fortify", + "pie", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "uclibc-linux-alpha" : [ + "bindnow", + "format", + "fortify", + "pie", + "relro" + ], + "uclibc-linux-amd64" : [ + "bindnow", + "format", + "fortify", + "pie", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "uclibc-linux-arc" : [ + "bindnow", + "format", + "fortify", + "pie", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "uclibc-linux-arm" : [ + "bindnow", + "format", + "fortify", + "pie", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "uclibc-linux-arm64" : [ + "bindnow", + "format", + "fortify", + "pie", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "uclibc-linux-armeb" : [ + "bindnow", + "format", + "fortify", + "pie", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "uclibc-linux-armel" : [ + "bindnow", + "format", + "fortify", + "pie", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "uclibc-linux-avr32" : [ + "format", + "fortify", + "stackprotector", + "stackprotectorstrong" + ], + "uclibc-linux-hppa" : [ + "format", + "fortify" + ], + "uclibc-linux-i386" : [ + "bindnow", + "format", + "fortify", + "pie", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "uclibc-linux-ia64" : [ + "format", + "fortify", + "pie" + ], + "uclibc-linux-m32r" : [ + "bindnow", + "format", + "fortify", + "pie", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "uclibc-linux-m68k" : [ + "bindnow", + "format", + "fortify", + "pie", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "uclibc-linux-mips" : [ + "bindnow", + "format", + "fortify", + "pie", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "uclibc-linux-mips64" : [ + "bindnow", + "format", + "fortify", + "pie", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "uclibc-linux-mips64el" : [ + "bindnow", + "format", + "fortify", + "pie", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "uclibc-linux-mips64r6" : [ + "bindnow", + "format", + "fortify", + "pie", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "uclibc-linux-mips64r6el" : [ + "bindnow", + "format", + "fortify", + "pie", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "uclibc-linux-mipsel" : [ + "bindnow", + "format", + "fortify", + "pie", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "uclibc-linux-mipsr6" : [ + "bindnow", + "format", + "fortify", + "pie", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "uclibc-linux-mipsr6el" : [ + "bindnow", + "format", + "fortify", + "pie", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "uclibc-linux-nios2" : [ + "bindnow", + "format", + "fortify", + "pie", + "relro" + ], + "uclibc-linux-or1k" : [ + "bindnow", + "format", + "fortify", + "pie", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "uclibc-linux-powerpc" : [ + "bindnow", + "format", + "fortify", + "pie", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "uclibc-linux-powerpcel" : [ + "bindnow", + "format", + "fortify", + "pie", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "uclibc-linux-ppc64" : [ + "bindnow", + "format", + "fortify", + "pie", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "uclibc-linux-ppc64el" : [ + "bindnow", + "format", + "fortify", + "pie", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "uclibc-linux-riscv64" : [ + "bindnow", + "format", + "fortify", + "pie", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "uclibc-linux-s390" : [ + "bindnow", + "format", + "fortify", + "pie", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "uclibc-linux-s390x" : [ + "bindnow", + "format", + "fortify", + "pie", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "uclibc-linux-sh3" : [ + "bindnow", + "format", + "fortify", + "pie", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "uclibc-linux-sh3eb" : [ + "bindnow", + "format", + "fortify", + "pie", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "uclibc-linux-sh4" : [ + "bindnow", + "format", + "fortify", + "pie", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "uclibc-linux-sh4eb" : [ + "bindnow", + "format", + "fortify", + "pie", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "uclibc-linux-sparc" : [ + "bindnow", + "format", + "fortify", + "pie", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "uclibc-linux-sparc64" : [ + "bindnow", + "format", + "fortify", + "pie", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "uclibc-linux-tilegx" : [ + "bindnow", + "format", + "fortify", + "pie", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "uclinux-alpha" : [ + "bindnow", + "format", + "fortify", + "relro" + ], + "uclinux-amd64" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "uclinux-arc" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "uclinux-arm" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "uclinux-arm64" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "uclinux-armeb" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "uclinux-armel" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "uclinux-avr32" : [ + "format", + "fortify", + "stackprotector", + "stackprotectorstrong" + ], + "uclinux-hppa" : [ + "format", + "fortify" + ], + "uclinux-i386" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "uclinux-ia64" : [ + "format", + "fortify" + ], + "uclinux-m32r" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "uclinux-m68k" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "uclinux-mips" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "uclinux-mips64" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "uclinux-mips64el" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "uclinux-mips64r6" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "uclinux-mips64r6el" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "uclinux-mipsel" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "uclinux-mipsr6" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "uclinux-mipsr6el" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "uclinux-nios2" : [ + "bindnow", + "format", + "fortify", + "relro" + ], + "uclinux-or1k" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "uclinux-powerpc" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "uclinux-powerpcel" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "uclinux-ppc64" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "uclinux-ppc64el" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "uclinux-riscv64" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "uclinux-s390" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "uclinux-s390x" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "uclinux-sh3" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "uclinux-sh3eb" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "uclinux-sh4" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "uclinux-sh4eb" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "uclinux-sparc" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "uclinux-sparc64" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "uclinux-tilegx" : [ + "bindnow", + "format", + "fortify", + "relro", + "stackprotector", + "stackprotectorstrong" + ], + "x32" : [ + "bindnow", + "format", + "fortify", + "pie", + "relro", + "stackprotector", + "stackprotectorstrong" + ] + } +} diff --git a/data/changelog-file/invalid-dates b/data/changelog-file/invalid-dates new file mode 100644 index 0000000..fbae56c --- /dev/null +++ b/data/changelog-file/invalid-dates @@ -0,0 +1,23 @@ +# Format is /\bREGEX\b/i => correction + +# Days +Monday => Mon +Tues(day)? => Tue +Wednesday => Wed +Thurs(day)? => Thu +Friday => Fri +Saturday => Sat +Sunday => Sun + +# Months +January => Jan +February => Feb +March => Mar +April => Apr +June => Jun +July => Jul +August => Aug +Sept(ember)? => Sep +October => Oct +November => Nov +December => Dec diff --git a/data/changes-file/known-dists b/data/changes-file/known-dists new file mode 100644 index 0000000..ffe986a --- /dev/null +++ b/data/changes-file/known-dists @@ -0,0 +1,22 @@ +# A list of Debian distributions, both code names and their aliases +# - Note that common "extensions"[1] are stripped before checking for the +# distribution name (except for "sid", "unstable" and "experimental"). +# +# [1] -backports, -security, -proposed-updates etc. See checks/changes-file +# for the complete list. + + +# Codenames +jessie +stretch +buster +bullseye +sid + +# Aliases +oldstable +stable +testing +unstable +experimental + diff --git a/data/common/dbg-pkg b/data/common/dbg-pkg new file mode 100644 index 0000000..2cb1515 --- /dev/null +++ b/data/common/dbg-pkg @@ -0,0 +1,4 @@ +# gcc and valgrind need glibc package +^libc\d+-dbg$ +# python module build against python debug +^python\d*-.*-dbg$ diff --git a/data/common/derivative-changed-by b/data/common/derivative-changed-by new file mode 100644 index 0000000..dcee1b6 --- /dev/null +++ b/data/common/derivative-changed-by @@ -0,0 +1,7 @@ +# Derivative-specific changed-by validation. +# +# Checked in order, warns with $explanation if $regex does not match +# +# format: $regex ~~ explanation + +. ~~ always matches diff --git a/data/common/signing-key-filenames b/data/common/signing-key-filenames new file mode 100644 index 0000000..d055b6b --- /dev/null +++ b/data/common/signing-key-filenames @@ -0,0 +1,5 @@ +# Manually maintained list of possible upstream signing key locations +# +upstream-signing-key.pgp +upstream/signing-key.pgp +upstream/signing-key.asc diff --git a/data/common/source-fields b/data/common/source-fields new file mode 100644 index 0000000..7f2c640 --- /dev/null +++ b/data/common/source-fields @@ -0,0 +1,90 @@ +# Manually maintained list of known source fields +# - please keep it sorted + +Architecture +Binary +Bugs +Build-Conflicts +Build-Conflicts-Arch +Build-Conflicts-Indep +Build-Depends +Build-Depends-Arch +Build-Depends-Indep +Checksums-Md5 +Checksums-Sha1 +Checksums-Sha256 + +# Allow for non-Debian profiles to specify the location of Debian VCSes +# +# NB: Do not rely on @if-vendor-is-not in your data files; it may +# disappear without notice +@if-vendor-is-not debian Debian-Vcs-Arch +@if-vendor-is-not debian Debian-Vcs-Browser +@if-vendor-is-not debian Debian-Vcs-Bzr +@if-vendor-is-not debian Debian-Vcs-Cvs +@if-vendor-is-not debian Debian-Vcs-Darcs +@if-vendor-is-not debian Debian-Vcs-Git +@if-vendor-is-not debian Debian-Vcs-Hg +@if-vendor-is-not debian Debian-Vcs-Mtn +@if-vendor-is-not debian Debian-Vcs-Svn + +# pending in policy via Bug#998165 +Description + +Dgit +Dm-Upload-Allowed +Files +Format +Homepage +Maintainer +Origin + +# Special-case, original-maintainer is not ok in Debian, but we allow +# it in any non-Debian profile by default. +# +# NB: Do not rely on @if-vendor-is-not in your data files; it may +# disappear without notice +@if-vendor-is-not debian Original-Maintainer + +Package-List +Rules-Requires-Root +Source +Standards-Version +Testsuite +Testsuite-Restrictions +Testsuite-Triggers +Uploaders +Vcs-Arch +Vcs-Browser +Vcs-Bzr +Vcs-Cvs +Vcs-Darcs +Vcs-Git +Vcs-Hg +Vcs-Mtn +Vcs-Svn +Version + +# These fields require their X[BS]- prefix, see #999768. TODO: Then +# again, these fields in here don't seem to make any difference in any +# test, not even in +# +# t/recipes/checks/debian/control/field/adopted/control-file-golang-xs-go-import-path/build-spec/debian/control.in +# t/recipes/checks/debian/control/field/adopted/control-file-source-upload-to-non-free-without-autobuild/build-spec/debian/control.in +# t/recipes/checks/fields/unknown/fields-unknown-fields/build-spec/debian/control.in +# +# despite I would have expected an "unknown-field" tag being emitted +# if used without X[BS]- prefix as they should according to the +# comments in #999768. +# +# Run tests with: +# private/runtests -o check:fields/unknown,check:archive/non-free/autobuild,check:debian/control/field/adopted + +X-Python-Version +X-Python3-Version + +XB-Ruby-Versions + +XS-Autobuild +XS-Go-Import-Path +XS-Ruby-Versions diff --git a/data/control-files/deb-permissions b/data/control-files/deb-permissions new file mode 100644 index 0000000..1c61f84 --- /dev/null +++ b/data/control-files/deb-permissions @@ -0,0 +1,17 @@ +# Manually maintained list of files in a deb control.tar.gz along +# with their expected permissions. +# + +clilibs 0644 +config 0755 +control 0644 +conffiles 0644 +md5sums 0644 +postinst 0755 +preinst 0755 +postrm 0755 +prerm 0755 +shlibs 0644 +symbols 0644 +templates 0644 +triggers 0644 diff --git a/data/control-files/udeb-permissions b/data/control-files/udeb-permissions new file mode 100644 index 0000000..b6b06f4 --- /dev/null +++ b/data/control-files/udeb-permissions @@ -0,0 +1,12 @@ +# Manually maintained list of files in a udeb control.tar.gz along +# with their expected permissions. +# + +config 0755 +control 0644 +isinstallable 0755 +menutest 0755 +postinst 0755 +shlibs 0644 +symbols 0644 +templates 0644 diff --git a/data/copyright-file/common-licenses b/data/copyright-file/common-licenses new file mode 100644 index 0000000..d627204 --- /dev/null +++ b/data/copyright-file/common-licenses @@ -0,0 +1,16 @@ +# /usr/share/common-licenses list +# generated by ls -1 /usr/share/common-licenses/ +Apache-2.0 +Artistic +BSD +GFDL +GFDL-1.2 +GFDL-1.3 +GPL +GPL-1 +GPL-2 +GPL-3 +LGPL +LGPL-2 +LGPL-2.1 +LGPL-3 diff --git a/data/cruft/bad-link-copyright b/data/cruft/bad-link-copyright new file mode 100644 index 0000000..2daf077 --- /dev/null +++ b/data/cruft/bad-link-copyright @@ -0,0 +1,3 @@ +# Well-known bad link rel copyright +# format is tag ~~ regexp +license-problem-cc-by-nc-sa ~~ ^https?://creativecommons.org/licenses/by-nc-sa/ diff --git a/data/cruft/browserify-regex b/data/cruft/browserify-regex new file mode 100644 index 0000000..a93d9d4 --- /dev/null +++ b/data/cruft/browserify-regex @@ -0,0 +1,4 @@ +# detect browserify stuff name ~~ lower case regex (?x) modifier first capture group is displayed +browserify-lite ~~ ([(] \s* function \s* [(] \s* modules \s* , \s* cache \s* , \s* entry \s* [)] \s* \{ .{0,30}) +webpack ~~ ([(] \s* function \s* webpackuniversalmoduledefinition \s* [(] \s* root \s* , \s* factory [)] .{0,30}) +browserify ~~ (if \s* [(]\s* "object" \s* ==\s* typeof \s* exports \s* && \s* "undefined" \s* !=\s* typeof \s* module \s* [)] .{0,30}) diff --git a/data/cruft/gfdl-license-fragments-checks b/data/cruft/gfdl-license-fragments-checks new file mode 100644 index 0000000..faac983 --- /dev/null +++ b/data/cruft/gfdl-license-fragments-checks @@ -0,0 +1,34 @@ +# this data file check gfdl +# first field is known good gfdl section (regex) +# if second field is present it is good only for these files (regexp). By default ok for all file +# if third field is present tag with the parameters if the two previous field match + +# verbatim text used in the license +\A with [ ] the [ ] Invariant [ ] Sections [ ] being [ ] LIST (?:[ ] THEIR [ ] TITLES)? [ ]? [,\.;]? [ ]? with [ ] the [ ] Front(?:[ ]?-?[ ]?|[ ])Cover [ ] Texts [ ] being [ ] LIST (?:[ ] THEIR [ ] TITLES)? [ ]? [,\.;]? [ ]? (?:and[ ])? with [ ] the [ ] Back(?:[ ]?-?[ ]?|[ ])Cover [ ] Texts [ ] being [ ] LIST (?:[ ] THEIR [ ] TITLES)? \Z ~~ + +# variant are tagged not official +# official text variations +\A (?:with[ ])? (?:the[ ])? no [ ]? Invariant [ ]+ Sections? [ ]? [,\.;]? [ ]? (?:with[ ])? (?:the[ ])? no [ ] Front[ ]?-?[ ]?Cover (?:[ ] Texts?)? [ ]? [,\.;]? [ ]? (?:and[ ])? (?:with[ ])? (?:the[ ])? (?:no[ ])? Back[ ]?-?[ ]?Covers? (?:[ ] Texts?)?\Z ~~ ~~ license-problem-gfdl-non-official-text +# (dict fold) +\A (?:with[ ])? no [ ] Invariant [ ] Sections? [ ]? [,\.;]? [ ]? (?:no[ ])? Front[ ]?-?[ ]? (?:cover[ ])? (?:Texts?[ ])? or [ ] (?:no[ ])? Back(?:[ ]?-?[ ]?|[ ])Cover [ ] Texts?\Z ~~ ~~ license-problem-gfdl-non-official-text +# (libnss-pgsql) +\A There [ ] are [ ] no [ ] invariants? [ ] sections? \Z ~~ ~~ license-problem-gfdl-non-official-text +# (parsewiki) +\A without [ ] any [ ] Invariant [ ] Sections? \Z ~~ ~~ license-problem-gfdl-non-official-text +# (lilypond) +\A with [ ] no [ ] invariants? [ ] sections? (?:[ ]?[,\.;][ ]? and [ ] no [ ] covers? [ ] texts?)?\Z ~~ ~~ license-problem-gfdl-non-official-text +# jedit +\A with [ ] no [ ] invariant [ ] sections?[ ]?,?[ ]? front[ ]?-?[ ]?cover [ ] texts? [ ] or [ ] back[ ]?-?[ ]?cover [ ] texts?[ ]?,?[ ]?each [ ] as [ ] defined [ ] in [ ] the [ ] license \Z ~~ ~~ license-problem-gfdl-non-official-text +# oidentd +with [ ] (?:the[ ])? invariants? [ ] sections? [ ] being [ ] no [ ] invariants? [ ] sections?[ ]?[,\.;]?[ ]? with [ ] the [ ] front[ ]?-?[ ]?cover [ ] texts? [ ] being [ ] no [ ] front[ ]?-?[ ]?cover [ ] texts? ?[ ]?[,\.;]?[ ]? (?:and[ ])? with [ ] the [ ] back[ ]?-?[ ]?cover [ ] texts? [ ] being [ ] no [ ] back[ ]?-?[ ]?cover [ ] texts? \Z~~ ~~ license-problem-gfdl-non-official-text +#sdlbasic +\A with [ ] no [ ] invariants? [ ] (?:sections?[ ])? texts? \Z ~~ ~~ license-problem-gfdl-non-official-text +# smbc +\A (:?with [ ])? no [ ] front[ ]?-?[ ]?cover [ ] texts? [ ]?[,;\.]?[ ]? and [ ] with [ ] no [ ] back[ ]?-?[ ]?cover [ ] texts? \Z ~~ ~~ license-problem-gfdl-non-official-text +# tla +\A with [ ] the [ ] front[ ]?-?[ ]?cover [ ] texts? [ ] being [ ] \(none\) [ ] and [ ] with [ ] the [ ] back[ ]?-?[ ]?cover [ ] texts [ ] being [ ] \(none\) \Z ~~ ~~ license-problem-gfdl-non-official-text +# +# Conditionally ok +# +with [ ] \&FDLInvariantSections; [ ]? [,\.;]? [ ]? with [ ]+\&FDLFrontCoverText; [ ]? [,\.;]? [ ]? and [ ] with [ ] \&FDLBackCoverText; ~~ /customization/[^/]+/entities/[^/]+\.docbook\Z +\A with [ ] the [ ]? <_: [ ]? link-\d+ [ ]? /> [ ]? being [ ] list [ ] their [ ] titles [ ]?[,\.;]?[ ]? with [ ] the [ ]? <_: [ ]* link-\d+ [ ]? /> [ ]? being [ ] list [ ]?[,\.;]?[ ]? (?:and[ ])? with [ ] the [ ]? <_:[ ]? link-\d+ [ ]? /> [ ]? being [ ] list \Z ~~ .po\Z diff --git a/data/cruft/non-distributable-files b/data/cruft/non-distributable-files new file mode 100644 index 0000000..e0c23cb --- /dev/null +++ b/data/cruft/non-distributable-files @@ -0,0 +1,13 @@ +# this file are forbidden in main and contrib +# format is +# md5sum ~~ sha1 ~~ sha256 ~~ current name ~~ reason ~~ official reference +# +# current name is the usual name of the file +# reason is human description of the problem +# official reference is a link to the license/official source +# +# Please sort by md5sum +2ab371cb4a67747aaa7835ebb22cb0d5 ~~ a396330a335b055c5b8cb81299921c356286e6a7 ~~ 8e058aa0b336cd2b0bd0dc14db9e7d225ca34d3324652e2ea06eb48462f020f1 ~~ data-forbidden-lintian-files ~~ This is part of lintian test suite, used for testing this tag ~~ http://lintian.debian.org +861dea8f9c038c5610eb56a1bd3c9486 ~~ 8b1a561e3d039466c0fb947f8e33a72f98aed596 ~~ 1b51cae9713bea3605f344864b58ae24cd28d583614ba1a29c9d47a782427963 ~~ fail32.json ~~ This is part of non distributable rapidjson ~~ https://lists.debian.org/debian-devel/2016/10/msg00162.html +90c983b1d401c770bb28b03ad8791f9d ~~ 241278e1b032954bdff6405b3c963c8f0208ad51 ~~ 3db379a515ed0abd0dc74a149e1b7039b9b2978e61470c8021b1cebb02750145 ~~ libcpre.gcc.o ~~ This file comes from the Novell libc Software Development Kit ~~ https://lists.debian.org/debian-legal/2014/04/msg00025.html +c8198d886fc817df838d83f7b083dc89 ~~ 2528060fa1acee5e0ec06f4b353c22d89d3f87f1 ~~ 3c6a89f93d74b7dcf978ad1c280cf17b4827cf16050d0b907e2bf290e51c09c7 ~~ fail8.json ~~ This is part of non distributable rapidjson ~~ https://lists.debian.org/debian-devel/2016/10/msg00162.html diff --git a/data/cruft/non-free-files b/data/cruft/non-free-files new file mode 100644 index 0000000..22303ca --- /dev/null +++ b/data/cruft/non-free-files @@ -0,0 +1,279 @@ +# this file are forbidden in main and contrib +# format is +# md5sum ~~ sha1 ~~ sha256 ~~ current name ~~ reason ~~ official reference +# +# current name is the usual name of the file +# reason is human description of the problem +# official reference is a link to the license/official source +# +# Please sort by md5sum +02dddef23fc9bc71b96f945d3ebead72 ~~ 721dd41959cc1f5ba12eb22589f97e2288f408ea ~~ 371e6767a25d23aae8140b914439699793d55f689801ece0a77f67618b2a62b0 ~~ PhotoGamutRGB_avg6c.icc ~~ Does not allow modification ~~ https://packages.debian.org/sid/icc-profiles +02e79d9d2fc3a5a9ee6ab5c7744d64a0 ~~ afc4ff937145189043154437750c8bae0bb43f74 ~~ 7327d6bf39bd5048ddffff7563175dc3a465c7553f51bcbad153a69eccf504ed ~~ valid-html20-v.eps~~ The valid w3c icons could not be modified. ~~ http://www.w3.org/QA/Tools/Icons +034d80867a2d880134d143e5b457a138 ~~ 7aacd6575cceb6d161cabbcfa04b9f7ae604ca6e ~~ a99ea17b0ed87822455b0c535bebf15f39667243a7a781a99a615092afef8f69 ~~ valid-xml10-blue.png~~ The valid w3c icons could not be modified. ~~ http://www.w3.org/QA/Tools/Icons +03c218e88b8627bfe6723cee63227f44 ~~ db19e44adba19eebf4ea04bf0d8653db72bb8da2 ~~ 030810662b02f201f0b903e8064b559c1fefc5f88f280cd5ed44264182786c68 ~~ valid-html401-v.eps~~ The valid w3c icons could not be modified. ~~ http://www.w3.org/QA/Tools/Icons +055460df9ab3c8aadd3330bd30805f11 ~~ b54b5fa32a884b4297b2343efdc745d0755cc7d1 ~~ f65941f9487c0a0a3b7445996ecbbd24466d7ae76ea2a597ced55f438fa63838 ~~ trebucbd.ttf~~ The EULA does not allow modification, reverse engineering etc. ~~ https://bugs.debian.org/298545#29 +060e79448f1454582be37b3de490da2f ~~ 70c3d0efd519de0aeb45a5edf6b5ca316fe7d4d2 ~~ c4c1153168e817be61a676e403c370ce2c485a6bd54fbb59c3850845cfefad00 ~~ sRGB_IEC61966-2-1_black_scaled.icc ~~ Does not allow modification ~~ https://packages.debian.org/sid/icc-profiles +068de8c0b1d9926c0423a409c0adf881 ~~ 2a33257d868d5d23fccb71b57e21d37c897adf7c ~~ c7d287eac2af4840cec9a2b61adfbc6df18da82d63f5a2431fa07e0b48078f41 ~~ valid-svg11.gif~~ The valid w3c icons could not be modified. ~~ http://www.w3.org/QA/Tools/Icons +06db2a1b6d1eff0a49aaf350888a170e ~~ fb66ada21acf586917434e3c5f506b91202eb8da ~~ 1da8611a83588453251ce6486d82ed08374e749fb04953301d3beea9b130bea8 ~~ ISOuncoatedyellowish.icc ~~ Does not allow modification ~~ https://packages.debian.org/sid/icc-profiles +0a83edb1fdc0469f39673613144b8687 ~~ 072bee098c55545f56f693eb3ab3f3eac8912f32 ~~ 43f695a032a284c8c05d773f0bfce5639dc1e6127d87a5d1d45ff178f7efb692 ~~ valid-xhtmlbasic10-blue.png~~ The valid w3c icons could not be modified. ~~ http://www.w3.org/QA/Tools/Icons +0bf2ede138b0272421b629b6c8c4deaf ~~ 127fafa600b25ee885900357436a1925643999f8 ~~ 122522db97bc3b6cebdc52652e1baa75ccc59d638b4c95230a534be6fe800c4d ~~ ISOwebcoated.icc ~~ Does not allow modification ~~ https://packages.debian.org/sid/icc-profiles +0c2a0b4b6f069984e510eddb34a8e462 ~~ 227a6d4a20fd807c1db4aac121e75c47a9448b2a ~~ 06a80f90aaf9b0b4b4446a6d5b20d8e59cd328c5cf7202f7e379988f82e4b93f ~~ valid-css2-v.svg~~ The valid w3c icons could not be modified. ~~ http://www.w3.org/QA/Tools/Icons +0e14f7af10984e48a51886b8b9c8e3ee ~~ 95e7716cdf9ac4a07eabe09bb4db83db722e5622 ~~ cbf8f3f82a699c22a7e5ece708011a87ceeae76ce3ada9b33415c9144c237fef ~~ valid-html32-blue-v.svg~~ The valid w3c icons could not be modified. ~~ http://www.w3.org/QA/Tools/Icons +0ed79958c3b02d6d514dc331b66953c3 ~~ cf33e3d5d7d1c198382fcf64a3b20db05eb6c968 ~~ 308359e53bcb253dca22232084c93427bb1a52c8dd1c9c9e71827356634c2f5e ~~ valid-css2-blue.gif~~ The valid w3c icons could not be modified. ~~ http://www.w3.org/QA/Tools/Icons +0f18e38686cb819de4b50021b324d590 ~~ e8f1b12529d336cdfdea1be086a6f81c3776049e ~~ 65a1cb69a69cac252043b01fba3652906b605cebcc75e2c54d02f5eeb6f2b75c ~~ valid-svgtiny12-v.eps~~ The valid w3c icons could not be modified. ~~ http://www.w3.org/QA/Tools/Icons +0f9aa82343bec790dfbbc41254a6f1fb ~~ 69f692ae9fe1e445d9a5c243e4d90e76a26093f7 ~~ 4fbf68ac8c8e767d1013294aa811e2b4052f861b87e0f44c2fd51e9653f2bee1 ~~ eciRGB_v2_ICCv4.icc ~~ Does not allow modification ~~ https://packages.debian.org/sid/icc-profiles +10b59a0b3f9c1982013c87c81580f0a0 ~~ ec2e0bf3eada4eb0513f539012a56b92da77601c ~~ 24fc8707ea4ec14e128f747d24bf9d0e2f38b02d54cddceb69448cf0836d16d6 ~~ valid-svg10-blue-v.svg~~ The valid w3c icons could not be modified. ~~ http://www.w3.org/QA/Tools/Icons +11bbe23913450b19a5711a9c1f7c2228 ~~ bc686e10dfaff59ff9e1bbf008e97e4fa2290e03 ~~ faab2771380875d54f6188344da47ac2619c0e16d18b61700c1037493a837697 ~~ definitive-guide.png ~~ Non free book cover. ~~ http://www.imagemagick.org/discourse-server/viewtopic.php?f=3&t=24735&sid=00d5a91304948ce71a38e695d225e122 +127423d6da6ddd673915edcd61264bb4 ~~ 65399bc8e392478a2c7e899b061e6377162bf7da ~~ 2cfd9f2d1e1c9be94f077439a54b31d304b39520d38f5b9eace983965baecc98 ~~ valid-css1-v.eps~~ The valid w3c icons could not be modified. ~~ http://www.w3.org/QA/Tools/Icons +127a486e3e554209d2551a5aa76d8927 ~~ 74518a5e53df261767ef3a385aec12f682027071 ~~ 41a824318d6027205ed5adb4fe157bbd4aee6ac4f5e8d1fad0b0fa1a28aa0bec ~~ valid-css2-blue-v.svg~~ The valid w3c icons could not be modified. ~~ http://www.w3.org/QA/Tools/Icons +147b1c61b0cf362fe9c6f69fd2ae012e ~~ 43dd70fdf999e9e87683827cea64ea45fc124127 ~~ 2e939f5626079dde3c002482a5c0cecebd5e7dc6c3fc8acec4cf9b05cc1ffa44 ~~ valid-xhtmlbasic10.gif~~ The valid w3c icons could not be modified. ~~ http://www.w3.org/QA/Tools/Icons +14e7ebd754a6815c621fe3077f85b17f ~~ 607a24b9f392e2531b8d94eaf62ef91593f46da4 ~~ f0b2eadb29a9d9c63122fed05bbe52750d8605a81c8bc85fe1cae9949c35d82b ~~ valid-html40-blue-v.eps~~ The valid w3c icons could not be modified. ~~ http://www.w3.org/QA/Tools/Icons +163d7d71acfc0ca7db3b733fa310a276 ~~ d5e6fc3807300636574f099f61daaddf5fb5d6f5 ~~ 1cf896df22f56f5b83d9cba17f8400f0cbd8638ddddc6d130f47d73982c33971 ~~ valid-css2.gif~~ The valid w3c icons could not be modified. ~~ http://www.w3.org/QA/Tools/Icons +167e27add66e9e8eb0d28a1235dd3bda ~~ 74941cc95734772f8b17aeec33e9a116f94a26ae ~~ f3f6b09855b6700977e214aab5eb9e5be6813976a24f894bd7766e92c732fbe1 ~~ couri.ttf~~ The EULA does not allow modification, reverse engineering etc. ~~ https://bugs.debian.org/298545#29 +17e6af61533aad07ffd56119e995f6a1 ~~ 53fd2d33ce8d5639dd0c409e5b41d28f1e6d341d ~~ b4ae8f92fe5c2d145b8890b20c008eb21632e7084b0b8fde90eb107adec35e99 ~~ valid-html32-blue-v.eps~~ The valid w3c icons could not be modified. ~~ http://www.w3.org/QA/Tools/Icons +18110f421269eba9191127a2b9c40778 ~~ eb3e1c014f7c33932cd06908524cf7c44b29b8f2 ~~ cf4f78a94a207138ed4b634b3fcecc9922fc6fa94c4bb42ac3f77dbfe689e347 ~~ valid-css1.png~~ The valid w3c icons could not be modified. ~~ http://www.w3.org/QA/Tools/Icons +181c48c6bce494b7c97de93b3ac2359a ~~ 95e6a7b2d58c15c312ec36ed6abe096b13a7a56e ~~ 01accbd90451af33dc3b0cf935278af3605624ede3bac88becd1dd328d53d8e8 ~~ valid-svgtiny12-blue.gif~~ The valid w3c icons could not be modified. ~~ http://www.w3.org/QA/Tools/Icons +1835cc9ea99d41071c627d23a7cf5a58 ~~ e0550b80f7241c0c9c819c7ae4263769ca9c4f45 ~~ 602f0412c03828aae92741d0ac5fdc783ef9be79d7d99ed0d4c02a3ea6396c14 ~~ valid-html20-blue.png~~ The valid w3c icons could not be modified. ~~ http://www.w3.org/QA/Tools/Icons +18d86628c801d531df9703ac50b3db3f ~~ 0ea79af20e41291d9e19563e056511a8ed65c093 ~~ f8589f6740e6296d5fac5e40c25d41ee4fd81e545fbc702a880f5031636ae230 ~~ valid-html40.png~~ The valid w3c icons could not be modified. ~~ http://www.w3.org/QA/Tools/Icons +1a56b45a66b07b4c576d5ead048ed992 ~~ bc1382a14358f747cbd3ff54676950231f67c95a ~~ 10d099c88521b1b9e380b7690cbe47b54bb19396ca515358cfdc15ac249e2f5d ~~ webdings.ttf~~ The EULA does not allow modification, reverse engineering etc. ~~ https://bugs.debian.org/298545#29 +1d3fda2edb4a89ab60a23c5f7c7d81dd ~~ 9eaea0911d89d63e39e95f2e2116eaec7e0bb91e ~~ 2b3aa1645779a9e634744faf9b01e9102b0c9b88fd6deced7934df86b949af7e ~~ sRGB.icm ~~ This file may not be distributed without fee if modified. ~~ https://bugs.debian.org/657281 +1e30b3b20c8f0635122df48988ef2c2e ~~ d520a305379a359cb8069efa81eed4d18d3cab5c ~~ e3ba6e0ece6799e84a5e8224bb5d683c6897ceca5ec2c58fffa8818be9144bda ~~ valid-xhtmlbasic10-blue-v.svg~~ The valid w3c icons could not be modified. ~~ http://www.w3.org/QA/Tools/Icons +1e4e5d1975bdf4a5c648afbf8872fa13 ~~ f6bafcca21153f02b4449fc8949cdd5786bb2992 ~~ 1523f19bda6acca42c47c50da719a12dd34f85cc2606e6a5af15a7728b377b60 ~~ georgiai.ttf~~ The EULA does not allow modification, reverse engineering etc. ~~ https://bugs.debian.org/298545#29 +209da8a9016a12eb5d9d1a7ee34638a2 ~~ 0ed3144eb20cc54a73837f9eb0c9672693b2e9e5 ~~ 260e87368b06066863e853e2fda2551cb9b3739ea3d9892a4d475e6e1af4590e ~~ valid-svgtiny11-blue.gif~~ The valid w3c icons could not be modified. ~~ http://www.w3.org/QA/Tools/Icons +20f23317e90516cbb7d38bd53b3d1c5b ~~ 9c5be4c1f151257798602aa74a7937dcead5db1f ~~ 6715838c52f813f3821549d3f645db9a768bd6f3a43d8f85a89cb6875a546c61 ~~ cour.ttf~~ The EULA does not allow modification, reverse engineering etc. ~~ https://bugs.debian.org/298545#29 +22bce04f537a28d2d3e64f73ad910351 ~~ f7d110da2eef2cdefa2ee8e66fbbad35b7998cf8 ~~ 464f143fa846f01adad267793c20bf075f78f71000cd1aa799c094d5fa22caf0 ~~ valid-html40-blue.gif~~ The valid w3c icons could not be modified. ~~ http://www.w3.org/QA/Tools/Icons +23f86f9f398de2043fc228cd7d8e7283 ~~ 576da542de411199ec69ba239317b44ff95348d4 ~~ df76b219e5c633f3e8ecc09dd214bf5a31c2a424c76553a283f8ac8620ff8891 ~~ valid-mathml20.gif~~ The valid w3c icons could not be modified. ~~ http://www.w3.org/QA/Tools/Icons +24b3a293c865a2c265280f017fb24ba5 ~~ 3ac316b55334e70a6993ded91328682733c4d133 ~~ 91b59186656f52972531a11433c866fd56e62ec4e61e2621a2dba70c8f19a828 ~~ verdanai.ttf~~ The EULA does not allow modification, reverse engineering etc. ~~ https://bugs.debian.org/298545#29 +24f5a9360a3d7b0483fa68240da1241a ~~ 1eec251f6da09ccea499fac8b263684590831d61 ~~ 37ae4813be539afea94d73ee075d5cd17140a042237f93a06a0b23f479862525 ~~ project-support.jpg ~~ Non free logo. ~~ http://www.imagemagick.org/discourse-server/viewtopic.php?f=3&t=24735&sid=00d5a91304948ce71a38e695d225e122 +25633f73d92a0646e733e50cf2cc3b07 ~~ d205d443f4431600378adaa92a29cc0396508919 ~~ 70ade233175a6a6675e4501461af9326e6f78b1ffdf787ca0da5ab0fc8c9cfd6 ~~ ariali.ttf~~ The EULA does not allow modification, reverse engineering etc. ~~ https://bugs.debian.org/298545#29 +260fb0b39d93c57755234c30c44eca4e ~~ 883f3ad1314f80f65fb47a5a12d50ffb26d1b554 ~~ 4f438144260f3e0bed889de8b2aa0635b36cf38c9a9f16ed12d7ee1cbba15ce3 ~~ valid-css2-blue-v.eps~~ The valid w3c icons could not be modified. ~~ http://www.w3.org/QA/Tools/Icons +26ba1ba208c37e5417b5b74d331a644d ~~ 7085c8c0c9746aa718d81cf59a78642be1008487 ~~ 2814fc0c03847da8ad725052ead899ef44d2cfbf69044d02661dac1fa0a9a49d ~~ valid-svg10-blue-v.eps~~ The valid w3c icons could not be modified. ~~ http://www.w3.org/QA/Tools/Icons +274bffcbe48d0b1c1959f6a782fefd39 ~~ c36ae8c104cb08216a8a4016c07e45f9b064fae7 ~~ 1a30b0a4318affe15a4d6af381f39fa24215b6975f0d23c90b7b72d657055d03 ~~ valid-html20.gif~~ The valid w3c icons could not be modified. ~~ http://www.w3.org/QA/Tools/Icons +288235a67dd5d01befc2ced6c00b2ca1 ~~ 499b7270c24af9eb236037457b40bb0924f69a4b ~~ 3d152f011c6fc65b2e693ba0b68e275083ff18e70174d8f88ce3efce7be5cee0 ~~ valid-svgtiny11-v.svg~~ The valid w3c icons could not be modified. ~~ http://www.w3.org/QA/Tools/Icons +2a8068edae3084160f4c0685b24de629 ~~ a9e1c4a2a72d05eb0d0fa9a37ecd6990d887ed76 ~~ 7959d80a4be99bac0f33de9da5474e4550522ef6d626e8c2ce4e624d782e6e34 ~~ flattr-logo.pdf ~~~~ Could not be modified ~~ http://developers.flattr.net/api/policy/ +2c8b213e276a778c4b18a896b2002cd2 ~~ 0424bf00624e144a9c6a36553c119c9b55534808 ~~ 6b9ffdde47a95ea1024117301b77401eb61af63abf7c016c615ffc0b021c6cdb ~~ valid-svg10-blue.png~~ The valid w3c icons could not be modified. ~~ http://www.w3.org/QA/Tools/Icons +2db6f1591f1b6ee0801ff49e6fc830b6 ~~ 9863db8d9a803378c9be86590fd2505037eac2be ~~ 41f54b61422f1e57130a928a0d6642eff1da4ee0247c1cb43d49272b8df22130 ~~ apple.icc ~~ Copyright from apple ~~ https://lists.debian.org/debian-devel/2014/05/msg00312.html +2e54d10b392cac47226469ba2ea95bd8 ~~ 9eacec49def244d521a3103a12a19c32087c9f70 ~~ 94559b531a2481650e1bcfb8fbf4295e6d315f6ebf3660b9ad6ea96d3c8f8b82 ~~ AppleRGB.icc ~~ Does not allow modification ~~ http://www.adobe.com/support/downloads/detail.jsp?ftpID=4074 +2ef0a3da342c98067b57d3285f26c02b ~~ 11c90411dd0340cc7c83ee43554b9e4b780a7565 ~~ 40370d10ee90e1ef6f238729e1aed7c63dc8da35ac062bd4599cb8267bd8ab0c ~~ valid-xml10-blue.gif~~ The valid w3c icons could not be modified. ~~ http://www.w3.org/QA/Tools/Icons +2ef216df211bd28924637ab82597c1e9 ~~ 7bb393411d0ea3ec77c8c163d5131c4d3f839e6b ~~ a51e388f1261ec2bf1fa73496d85454244e99d18cf1636a678446d6f1f59d168 ~~ valid-css1-blue.png~~ The valid w3c icons could not be modified. ~~ http://www.w3.org/QA/Tools/Icons +2f56157e02756a47a0f2b1520695011c ~~ 244c6b7f5c90368e9538748eb9804323e3048962 ~~ 98c450a906ffe2b2dc515f59fe265a1fe88aff5efc922ee77f81bd4c6fa47a13 ~~ valid-xhtml20.gif~~ The valid w3c icons could not be modified. ~~ http://www.w3.org/QA/Tools/Icons +2fa45221a62d6b5cb9f91ce6a49ab2a2 ~~ 03ce32f2fd5b6563f357d0627af7424eefc78e7a ~~ a18ce0b6fc336bb58148672fe82ae1c9b4b3c4dc7a5e39fc10a2122baa2d5b98 ~~ valid-svgtiny11.png~~ The valid w3c icons could not be modified. ~~ http://www.w3.org/QA/Tools/Icons +2fe9ed8884ea91fb8df5b775b45e9dd7 ~~ b4aad64d5b79007f8addba8e8b4805c0075d2fa4 ~~ 42813bca4bf2c612778f22763290c93579e5b169bb28fdfb0a6abbf257622c48 ~~ valid-svg11-v.eps~~ The valid w3c icons could not be modified. ~~ http://www.w3.org/QA/Tools/Icons +3019df8c130fc39c949a705266365d34 ~~ b773a346ab457e1c3192437e2c30cdbce05cd02b ~~ 4675edd75bfa382dd4bbbc709593f3f769708df8a4a36e7f3906cd02be2054c2 ~~ valid-css1-blue.gif~~ The valid w3c icons could not be modified. ~~ http://www.w3.org/QA/Tools/Icons +320894f07fd8f448e5eee51f851c3572 ~~ 12a2f91e1f6c92eeeb75b85c018931bcc1a4a3f1 ~~ 88bb59de7991e0322b0e10a0005814dc44628a19e2cbf1e9474a7affcc2a1c1c ~~ valid-xhtml11-blue.gif~~ The valid w3c icons could not be modified. ~~ http://www.w3.org/QA/Tools/Icons +324dca8bc1f5c7d1cbfc21a6bf60959f ~~ f0389704f49b34511259a3b7c893a9bc0352ed0e ~~ 65d81ab2b1a084f3fb115c46c8150a2afc4e89ef3e78a0c467339ed4e7971fed ~~ valid-xhtml20-blue-v.eps~~ The valid w3c icons could not be modified. ~~ http://www.w3.org/QA/Tools/Icons +336f3c18067572f0c14310bdde0c3783 ~~ bd1bfa922eb137ae7bfce010eb0c8b208666855f ~~ 7a7cb281230460e9dadc41c7d705f441f52ae3c0a81681dd00a5d166da5fb79d ~~ flattr-logo-beta-small.png ~~ Could not be modified ~~ http://developers.flattr.net/api/policy/ +34cd8fd9e4fae9f075d4c9a2c971d065 ~~ 0d99c9d151db525c20b8209b9f0ee1ce812a961c ~~ 4044aa6b5bebbc36980206b45b0aaaaa5681552a48bcadb41746d5d1d71fd7b4 ~~ arialbd.ttf~~ The EULA does not allow modification, reverse engineering etc. ~~ https://bugs.debian.org/298545#29 +356b779a06c228895d3228fc1ee1355c ~~ e6ccaa38bf5eb9a3c4f1c667d414eda8358c8d7c ~~ 298586eced80f0f99adb3e5252a16b64bcc11aa833e50772be1ffda25c6e8925 ~~ id3v22-tda.mp3 ~~ According to tag (COMMENT="ripped by [...]"). ~~ https://bugs.debian.org/736203 +36317f85acf46c21da79de350c28d28d ~~ e7a6e90d4de5ec35b49d6a3cc81caf9b43f6bc80 ~~ 1509709af9da7a54ff83a90c311ed354bbfb8caf85843ef35f82e0807f1ad785 ~~ valid-xhtml20-blue-v.svg~~ The valid w3c icons could not be modified. ~~ http://www.w3.org/QA/Tools/Icons +37082bc60cf6a5af10fdc5fcdf905b29 ~~ b561161b6f15ebc09cc14a14669e32a8cdd7624c ~~ a3de696410c388a3df2e68520cc596d64b4b14954c87d2713aa10a49bec46e2f ~~ valid-html40-v.eps~~ The valid w3c icons could not be modified. ~~ http://www.w3.org/QA/Tools/Icons +37153ab647107018620cc415fdf5837c ~~ 08cd698e02907eed5a04e75a36b266ba5a9ed741 ~~ 22ace033995dc54b0f3288ac6b5e438d8b9d46de7daf6806cb8cc8f1cb0f1d6f ~~ valid-xhtml20-v.svg~~ The valid w3c icons could not be modified. ~~ http://www.w3.org/QA/Tools/Icons +378737887fff3128b99884883b11ced7 ~~ 233d467e1340fa7c6fe020c9234687d59a526c97 ~~ d1da5c100ace9d29f2a9a1e73d1e63daac570e0d280eebcc1008168871b7bc54 ~~ valid-svgtiny11.gif~~ The valid w3c icons could not be modified. ~~ http://www.w3.org/QA/Tools/Icons +39cdcac91b02b0c0db457f6920c6acd9 ~~ 85236c5ee9bb6ef3009be77f8adcfbb0b609f9df ~~ 213dbcd8ee2057af7db0f323bc5e3d77707d785a2a527e31d9ac7cb7548fa4c8 ~~ valid-html32.png~~ The valid w3c icons could not be modified. ~~ http://www.w3.org/QA/Tools/Icons +39f24df117c3ced49f129aa8e4a26295 ~~ 93428cd89c1041e65a358f7acdb2f2bbef96a120 ~~ 8bf6ed6d7fa35b29f67efed4938d6c2f0e7147dca04efd5806be27d50081f3fd ~~ valid-xhtml11-blue-v.svg~~ The valid w3c icons could not be modified. ~~ http://www.w3.org/QA/Tools/Icons +3ba52ab1fa0cd726e7868e9c6673902c ~~ ba19d57e11bd674c1d8065e1736454dc0a051751 ~~ 96ed14949ca4b7392cff235b9c41d55c125382abbe0c0d3c2b9dd66897cae0cb ~~ verdana.ttf~~ The EULA does not allow modification, reverse engineering etc. ~~ https://bugs.debian.org/298545#29 +3c04a9f646b00807c47ea0b2cce75ccb ~~ 41a9c7bd584c348b9051291fc52b538161ad48ae ~~ de0080703f0e1e0126436a7c611fb29cc6ca102d41d1e9412f20d44e2eac618e ~~ logo-32x32.png ~~ Could not be modified (variant from https://github.com/balupton/flattr-buttons.git) ~~ http://developers.flattr.net/api/policy/ +3cf661cc8862886c1d280823da177661 ~~ 1c52ade48cd7a8f6f508474d6b1820ef616a01cd ~~ ff566480f8308ca2241131dd0a39f996dd29043b8ebe9781e090cc266b874d98 ~~ valid-css-blue.png~~ The valid w3c icons could not be modified. ~~ http://www.w3.org/QA/Tools/Icons +3cfc9c924b87d933f57a51a03d4fa0f5 ~~ 1d21654b0e08f8bec7f7d7c5bb017a1b037b61fc ~~ e754da93ec799df34e9b1ab85df495caedbbd5fcf1896cf08fd8361588d39df1 ~~ valid-xhtml11.gif~~ The valid w3c icons could not be modified. ~~ http://www.w3.org/QA/Tools/Icons +3e0823042b28b72908951240200ba290 ~~ 16de7da2d395230fdd0b844e340c6600f4e8c5e7 ~~ 2f84e29197b6a8332965213c874780220b8e30c5fa349741586252dcbdf181d5 ~~ valid-xhtml10-blue.png~~ The valid w3c icons could not be modified. ~~ http://www.w3.org/QA/Tools/Icons +3e7043e8125f1c8998347310f2c315bc ~~ 49560b47dac944923a6c918c75f27fbe8a3054c5 ~~ dad7c04acb26e23dfe4780e79375ca193ddaf68409317e81577a30674668830e ~~ ariblk.ttf~~ The EULA does not allow modification, reverse engineering etc. ~~ https://bugs.debian.org/298545#29 +3f47afac29754a5149687c2d4c1401ee ~~ 41c6541306ece13f28366bdcf3c3ba9a948bf722 ~~ 9186e6a54241a309d9058ce325bb06692bbd42180b4f06556ea35d7c5cd15599 ~~ SC_paper_eci.icc ~~ Does not allow modification ~~ https://packages.debian.org/sid/icc-profiles +3fbdc9eeecb5a8613277be69f0383f39 ~~ cb9987c1518b7d08466ef4f0ab22fe4a7cd14494 ~~ 3c23d51873f2f04a2dde1aae54454664d8c69ba54747f74c2a3ed1fa1a4d5d45 ~~ valid-html40-v.svg~~ The valid w3c icons could not be modified. ~~ http://www.w3.org/QA/Tools/Icons +407d78354f6a4dce0cf30f60d1dd7de3 ~~ dc42d9092d0bc8d744d4dcff0300b14015a00eee ~~ 7380bc2a173c7eaa4f900384bad224b0a2f1dda6ea5339f3aef893f50f4e9d35 ~~ WebCoatedSWOP2006Grade3.icc ~~ Does not allow modification ~~ http://www.adobe.com/support/downloads/detail.jsp?ftpID=4074 +411d33fd82f04daecbfb10020a69b7ea ~~ aa1dc8920929d523c3e2ea0c94acb118d24232f2 ~~ a03f47087b21cd41337b1e06bc1751f6cbd2b150349f6b304d821d4b5d01921f ~~ valid-css1.gif~~ The valid w3c icons could not be modified. ~~ http://www.w3.org/QA/Tools/Icons +42dbc9acc2c7b33fd88e5a8bacdffb86 ~~ 6a77510bce4fdab639de128b417c5580974dafb4 ~~ 5917dc36c6274ea18055f876159d005df46f62eaa5e116b5e2c5e774fd2e8735 ~~ valid-html32-blue.png~~ The valid w3c icons could not be modified. ~~ http://www.w3.org/QA/Tools/Icons +43f1ddf6ab8bc25fe4ff26f9765306b2 ~~ db90e922040a9b83743d610b7ae66490842989de ~~ 2c99faf273c1c176f3878febb0caeb87691fac1b8a22f66488581ee42b676a5f ~~ valid-xml10-blue-v.svg~~ The valid w3c icons could not be modified. ~~ http://www.w3.org/QA/Tools/Icons +4532a59f9263477d5bb292ec74f3ea53 ~~ 92b3b7a815fc8af2e1c0af2df0c70ced2434c258 ~~ b45bd555ada8525ae253d15816a2bdba103cd995058e16b37ae573840b7914df ~~ valid-xhtmlprint10-blue.png~~ The valid w3c icons could not be modified. ~~ http://www.w3.org/QA/Tools/Icons +459092a016bf36cb991d22e0731f564c ~~ 2b9333a3f58056efa2b63adbdf66748b32c2416e ~~ 67fe953640d3bbf7042772fb553db3dcbe7120da29cf08d74e00e2d9014873bc ~~ SWOP2006_Coated3v2.icc ~~ Does not allow modification ~~ https://packages.debian.org/sid/icc-profiles +45dabde250dbbc2b4ab1ddaab1380892 ~~ 1ed998c5901d31e9f5f12e2bb0f820a434e625ca ~~ bc0312abb23921a17acb76f43142022ba73c26d869315a5f59163921fe6db5b4 ~~ ISOnewspaper26v4_gr.icc ~~ Does not allow modification ~~ https://packages.debian.org/sid/icc-profiles +467689e1ff1bb49a08e3a0e2b54129e6 ~~ 7da1c4f5a93675ba956d84cd63983ae32a00b267 ~~ 4edc8d5f94b5e97f118376311e4c8484ff964aaefaf50c27ed1f3f7d236d846b ~~ valid-xhtml-rdfa-blue-v.svg~~ The valid w3c icons could not be modified. ~~ http://www.w3.org/QA/Tools/Icons +47820e664fb46597e29935435d20fdd4 ~~ 0b457a37d643b41afd048f63b27f8a58ed894c99 ~~ f906418016008f581f35f68292ded3c2129167ae1ddb024722c897fa0144e0db ~~ valid-html401-blue-v.eps~~ The valid w3c icons could not be modified. ~~ http://www.w3.org/QA/Tools/Icons +47e0ad5d9f8d4622a896f4769a382770 ~~ 9c519e4482230e51aa4eebd08cdd9b852874f2be ~~ 0a4c1a699a684ed74906662cb7cf0042bf1e19f0e9c5feb33f60de74b836a1d7 ~~ valid-xhtmlbasic10-v.eps~~ The valid w3c icons could not be modified. ~~ http://www.w3.org/QA/Tools/Icons +4864de5442ed2d5c75e631a6ad6f7402 ~~ 65a459a93330e4f16df65f2222091c98e1128a51 ~~ 7f3702cc1a6fecf918628e5eb9e6beb67e48acfd5e2264ba57ee81df2a25923f ~~ PSO_LWC_Improved_eci.icc ~~ Does not allow modification ~~ https://packages.debian.org/sid/icc-profiles +4a4e798e768d580e994127f92bca9c7f ~~ d41faa8d0fba6dbcc3a058cfbc6abf66258e1808 ~~ 80f18f480b9826e075814a18edfc6a7d3fd2584ac86644f709ef9617d095ae2d ~~ valid-xhtml-rdfa-blue.png~~ The valid w3c icons could not be modified. ~~ http://www.w3.org/QA/Tools/Icons +4bd3e733593d533cfeee8a3ad32ec65f ~~ 97b94632698a6569eb6ab42ba143d78f01e8543f ~~ 6e404ce33318bf7b383f2d35b0281c7647cc105f1fb30d55a43133296e71c9ab ~~ valid-svg11-blue-v.svg~~ The valid w3c icons could not be modified. ~~ http://www.w3.org/QA/Tools/Icons +4c175ddf046bdc9fb7308c5c4db1c59e ~~ 3ccac12a9ecb188c3814acc998b06a21f8e6c24c ~~ 39ec7559ccbcd70a9c9b61c4a3bfaf03bf5d4af95561b5ad8da96af0880e6d36 ~~ valid-html401-v.svg~~ The valid w3c icons could not be modified. ~~ http://www.w3.org/QA/Tools/Icons +4cb167869183b59bbad20fb90ccf3e0c ~~ 63540058326d3f7b96528bed54fd11dd19b11a0e ~~ 842bd0543ab1ddd8fe1dd154a3752b461a1589eb39b37a28dee764a319d7b333 ~~ JapanColor2001Coated.icc ~~ Does not allow modification ~~ http://www.adobe.com/support/downloads/detail.jsp?ftpID=4074 +4d426d260789d44003b1526ca71893f9 ~~ 345904717964673b5dbfb32c5f37120995c68e04 ~~ 62f6663512c4d0bd39bd296e03bc6d948174dce69f0b205036c019d6cb0455d9 ~~ valid-mathml20-blue.png~~ The valid w3c icons could not be modified. ~~ http://www.w3.org/QA/Tools/Icons +4e7ed61f78a86fa9fc6a58b3c107dd0d ~~ 28ac8a98d71b387252d167708fa5944094495512 ~~ c520c18704c61942ec7358c050d1fcb3cfc61c88520202150d3afba2d4faa733 ~~ valid-css-blue-v.svg~~ The valid w3c icons could not be modified. ~~ http://www.w3.org/QA/Tools/Icons +4f97f4d6ba74767259ccfb242ce0e3f7 ~~ d9d9ad4ba85fcd9dbe69e7866613756f1dbb4e97 ~~ 4e98adeff8ccc8ef4e3ece8d4547e288ff85fdc9c7ca711a4599c234874bbe86 ~~ times.ttf~~ The EULA does not allow modification, reverse engineering etc. ~~ https://bugs.debian.org/298545#29 +53f94aed311ed8f88dad3be7dfb0522d ~~ edc7e6b20fb2833cf8ea1de576da9ec1ab562265 ~~ f28fcd434e116d0ad8ad523953f5aff3bf167ebdba5ff7273c935c8a9df598c8 ~~ valid-xhtml10-v.eps~~ The valid w3c icons could not be modified. ~~ http://www.w3.org/QA/Tools/Icons +54c6fd8ea93b273acf0047a261b19fc7 ~~ 2ef1dbafc37fc8dd2cdca2c6ed9325a5d82a4d9c ~~ 5caf3e728d91c107b388e67ea3c5f3b1e5fd3eb7d1b99477ed61ce85070f11ae ~~ valid-xml11-blue.gif~~ The valid w3c icons could not be modified. ~~ http://www.w3.org/QA/Tools/Icons +54d5361fbd234bf6514c33230cf0c659 ~~ b6ba9d52f361e3e5352ab0b3b07816a406ba61d3 ~~ 52ae8eb2852754b330097997e243cb98d6c2982a6d707d62c707bed34cc7200b ~~ valid-xhtml11.png~~ The valid w3c icons could not be modified. ~~ http://www.w3.org/QA/Tools/Icons +58cce9ac66081951ad7aac1463b06313 ~~ e3b528c66f8deac9fb28b15999a4f9d4ee6435bd ~~ cee3631d5da85ac2f9eabf3a1656842ae4e6e8694ce545ffdf6f98e0b13d656b ~~ tricks.png ~~ Non free book cover. ~~ http://www.imagemagick.org/discourse-server/viewtopic.php?f=3&t=24735&sid=00d5a91304948ce71a38e695d225e122 +5bbad00fb58aafdda30d6775c476686c ~~ bd1141cb3bb0207346c1facfdcb0bff5c09ce405 ~~ e9f115a1aa98f9802bd25bab14d4f92bdf9c30070b4a562ff0ebfc0fc043d3dc ~~ valid-xhtml-rdfa-blue.gif~~ The valid w3c icons could not be modified. ~~ http://www.w3.org/QA/Tools/Icons +5bbf23e7c90a7c96a779f758528a04f9 ~~ b26a404f0899eb0621b017f92ca1a45f8eb0c26c ~~ f95a2fb17ca6317c54587a2b809f2e15c3d05c2ce49434e601f34b90490fc012 ~~ valid-html20-v.svg~~ The valid w3c icons could not be modified. ~~ http://www.w3.org/QA/Tools/Icons +5d51432151f81ada3bf6f463f1263c36 ~~ 0042bbea30f7a37a38c4905f1b28fd9f921b650f ~~ d8caa94f426fe0c286037b1db37a25160855b901fe70b6c1f146081dc9f05f50 ~~ valid-xhtml11-blue.png~~ The valid w3c icons could not be modified. ~~ http://www.w3.org/QA/Tools/Icons +5dcca5eebb87214e8d459cded09a5373 ~~ a177dc6152f9afc51700a894ce7ef5e5d30ab316 ~~ db93d557a2704790a06fe793484bb6fd591af757b6d097098db2a36f5bc471f8 ~~ valid-svgtiny12.png~~ The valid w3c icons could not be modified. ~~ http://www.w3.org/QA/Tools/Icons +5f06ed664188785dfe65d7fc76a86622 ~~ a2770de9b277d5c07662a8f48c31cf64eaff3b3c ~~ fb287e3cc39c1df7bf24a41b7536670537419b70d323da63e517e9218ec6810a ~~ valid-svg10-v.svg~~ The valid w3c icons could not be modified. ~~ http://www.w3.org/QA/Tools/Icons +653fbc47ebae9108b2991a026ba8ed0a ~~ 08b67468fcd1c01e03c528ad6bd5fa6aee8904d4 ~~ 444f62bb103e21e198563eda5929e506cfcbeead612736538629fb6544902c9e ~~ valid-xml11-v.eps~~ The valid w3c icons could not be modified. ~~ http://www.w3.org/QA/Tools/Icons +659becd98fb3482ba1498416bd73cb6c ~~ 4fe2f00c5a00219e8017ae6a47b74df94a43ddc2 ~~ 7796dc87f29cdf6d0713ad6525f907aa67e8c689c661e5faecba1925386a465e ~~ PSO_Coated_NPscreen_ISO12647_eci.icc ~~ Does not allow modification ~~ https://packages.debian.org/sid/icc-profiles +65cd8d7bc6d9070d17b4c772032d4c6f ~~ 228e976744a7fef771e0155ffeec79bbc05f21b8 ~~ cbd75ff057348f6a53d0561aa1513c2998569c979eaf1a2749f1573c42450a07 ~~ valid-html20-blue-v.svg~~ The valid w3c icons could not be modified. ~~ http://www.w3.org/QA/Tools/Icons +660fb33181e24b9695be97cf13cc5b73 ~~ 6a6ac853ba451bccc6ba49156aba483a557abdf7 ~~ f8fecf79e9b69ba9a28da6bd1118e13a6486f6f7c471f7da56ab11cec144d0e3 ~~ valid-xhtml11-v.svg~~ The valid w3c icons could not be modified. ~~ http://www.w3.org/QA/Tools/Icons +663974c9fe3ba55b228724fd4d4e445f ~~ 953839b69c5bc047cb53efefc755dd21175a3a1d ~~ 48d9bc613917709d3b0e0f4a6d4fe33a5c544c5035dffe9e90bc11e50e822071 ~~ andalemo.ttf~~ The EULA does not allow modification, reverse engineering etc. ~~ https://bugs.debian.org/298545#29 +6981a9d53adda53cb3d1d4840d0cacc8 ~~ b74b61316ccd59740d321870214119dabe1fba97 ~~ 662a345063b2853a66ed12dc54215e513e8485cbf4cb7f673971c834979eb25f ~~ JapanColor2003WebCoated.icc ~~ Does not allow modification ~~ http://www.adobe.com/support/downloads/detail.jsp?ftpID=4074 +69fef828ece289b7196c9dda6325db3f ~~ cb748784f70ccddb45bd46366e8a31ff7049e570 ~~ b1290f5b924dc1d585bdf7edb87a64add4e04fcc32dd092a8804c999d29fa660 ~~ USWebUncoated.icc ~~ Does not allow modification ~~ http://www.adobe.com/support/downloads/detail.jsp?ftpID=4074 +6baa9d31753a781bd3adf59324316468 ~~ c7d7e06b40d353cfbd432ef2f943ad4f8dab5840 ~~ aa03e3f7e0354f393f686ca50bf80aca16c68e63e880da2eb62564a8ca3d7a07 ~~ valid-html32-v.svg~~ The valid w3c icons could not be modified. ~~ http://www.w3.org/QA/Tools/Icons +6c0321ba4f9bc33777d4784dcd15e0f6 ~~ da4d6ff7bf0f96a7c7454eb654da573b64f47673 ~~ 6a4090c537cc88c006ca822981a3c7826058c0fcfc84bc7174bb35091f2f5e71 ~~ valid-xhtmlbasic10-blue-v.eps~~ The valid w3c icons could not be modified. ~~ http://www.w3.org/QA/Tools/Icons +6c2e943f1c31c7613d85e971b1c5352a ~~ 3b999e70cb0a9b60e1f19e19400f424fa58cd799 ~~ f73ab06f5c13d72bb23860bd8792a86221730be65c5ee56a423f82088803041b ~~ valid-svgtiny11-blue-v.svg~~ The valid w3c icons could not be modified. ~~ http://www.w3.org/QA/Tools/Icons +6d2bd425ff00a79dd02e4c95f689861b ~~ e997a0bf7a322c7ba5d4bde9251129dee3f66119 ~~ 192e1b0d18e90334e999a99f8c32808d6a2e74b3698b8cd90c943c2249a46549 ~~ timesbi.ttf~~ The EULA does not allow modification, reverse engineering etc. ~~ https://bugs.debian.org/298545#29 +6e3b77d09d3613bc52ba7f63048d4638 ~~ 5c9f81dbfd88a39b375458df0ec816ac3cb56c6b ~~ 817f6969bcd38a82f36dc8fe6ee797bec28bcd57c0d23c363bf56f4957cdac93 ~~ WebCoatedFOGRA28.icc ~~ Does not allow modification ~~ http://www.adobe.com/support/downloads/detail.jsp?ftpID=4074 +6e8ad6a37983ddb3a0951ac3a7c0b4d7 ~~ a105793df7445263f250f7f5b925236519b39332 ~~ 8a9e64adf9351dbc0f333daae135c88d5162ed8eadf5e65801c19914ab657bab ~~ valid-xhtml10.png~~ The valid w3c icons could not be modified. ~~ http://www.w3.org/QA/Tools/Icons +6ea617b8063a70212794c9fefc868bf3 ~~ a39ac02973936089311e242bf5c7c3368fdc4235 ~~ d57d2a852758d0cfc58130901f1b3e4c0473b4a4fb52478f4bf49c95434ac61d ~~ valid-xhtml20-blue.png~~ The valid w3c icons could not be modified. ~~ http://www.w3.org/QA/Tools/Icons +7088205c37654319e430b57dda2aabfe ~~ eb5f70db5d0a68c00e2c502c49d6f06f5ce52bb1 ~~ 29d63668ca4f958b7b0910c7cd6b307af30904418f15b572dbde37f962a9239b ~~ valid-xhtml-rdfa.gif~~ The valid w3c icons could not be modified. ~~ http://www.w3.org/QA/Tools/Icons +70e7be8567bc05f771b59abd9d696407 ~~ 6480f383a9cd92c8d75ac11ef206c53e3233abb2 ~~ ec3ffb302488251e1b67fb09dd578b364c5339e27c1cfb26eb627666236453d0 ~~ trebuc.ttf~~ The EULA does not allow modification, reverse engineering etc. ~~ https://bugs.debian.org/298545#29 +71b2b30faae6968739c7bcccd324040c ~~ 5583e9ceda3be6eccc2eec3fb066d2260cf54ac2 ~~ 0851e174d2b3ece515802dedf74a64e975a0ebb051386deca4f798cc1e354340 ~~ valid-html32.gif~~ The valid w3c icons could not be modified. ~~ http://www.w3.org/QA/Tools/Icons +74325a1957cd934f819f61be1c73784f ~~ b4325f497fab7ccdd04062d1e883e82431383ae6 ~~ cab1c2e2878c7505db695d6277d85cf87cbd5b529154b089ad0d9101ef417abf ~~ valid-css-blue-v.eps~~ The valid w3c icons could not be modified. ~~ http://www.w3.org/QA/Tools/Icons +7482510247cd1dba2f2e7cb66453ecda ~~ 315a9ab52794619eee4988242a814634d574ddde ~~ db5051824b520cecaa265cccde06c363467524545d87452114b88159b6e4a5c6 ~~ PSO_LWC_Standard_eci.icc ~~ Does not allow modification ~~ https://packages.debian.org/sid/icc-profiles +74ff62f330bf0dbe4495b5720542d511 ~~ 921ddde4a618e0d5d11ce9839d98f9f4af5ff17f ~~ da2b9b593e27cba2563cbc8596071c5c8f2395d3dbb4434538bac2bc9d58ce77 ~~ CoatedFOGRA39.icc ~~ Does not allow modification ~~ http://www.adobe.com/support/downloads/detail.jsp?ftpID=4074 +757d7ef87d2af4f76322dd6fcb75423b ~~ b41a5d29a9fd53114f522fac67987a6c5b367193 ~~ ec41aacd3d0a95e911097443c929848524c8fef645a0f6a18c26dc507576f265 ~~ CoatedFOGRA27.icc ~~ Does not allow modification ~~ http://www.adobe.com/support/downloads/detail.jsp?ftpID=4074 +774c6de7a25e927d04fd84d467c9e936 ~~ 71c654ebdc6eccb5daca4c180dd9da9bc5bed94f ~~ e5194e57cbe7370c9e43f2a5198a066347a6d575f8bac3622d962edb39c62ccf ~~ valid-html20-blue-v.eps~~ The valid w3c icons could not be modified. ~~ http://www.w3.org/QA/Tools/Icons +775a202b8d5ec8cf009535a076c9fc52 ~~ 6f135be1bff8203d04bc80b4b89df7ede291a9f7 ~~ c576108c0cfb59bc82a9ef0a64159ced37896f903acccdf5effa07a33f175457 ~~ data-non-free-lintian-files ~~ This is part of lintian test suite, used for testing this tag ~~ http://lintian.debian.org +781f30fd5839bba3e48998256d4c3458 ~~ ce539215e8f662c438192b86b670989beaf7fd0c ~~ f42d521ab513aba165aee2e82bea1363b693b7e5a6c96e7dad098e299b9d15d5 ~~ valid-xml11.png~~ The valid w3c icons could not be modified. ~~ http://www.w3.org/QA/Tools/Icons +79d7e984ea3ac74eed7cc92bf6b22a0d ~~ 69f9a472804708c8b133529fe4ef48bb8b4b9a75 ~~ 35f401731df11a4eba3502af632e51d68bc394bcb7d34632a331c1ba3f4a0bf6 ~~ USWebCoatedSWOP.icc ~~ Does not allow modification ~~ http://www.adobe.com/support/downloads/detail.jsp?ftpID=4074 +7a3571eae7ef7351263e5bf118b3504f ~~ 6e3d6332535f81b6ac6d6983730335e898ee3f35 ~~ c4e4c2bcbbab229653c3285bbe211bdd9efba44c84cf8d76414bfbb46fc3dbd4 ~~ valid-xml10.gif~~ The valid w3c icons could not be modified. ~~ http://www.w3.org/QA/Tools/Icons +7a5e17a4b613e35d1d10f518495254bf ~~ 3367ef25993e088e9fef41eb03011c51f81645d7 ~~ b86ef30256234d5037a4ca2627375dcb93c050c31dc28c82d935ac149ef8e425 ~~ valid-html32-blue.gif~~ The valid w3c icons could not be modified. ~~ http://www.w3.org/QA/Tools/Icons +7bfbe49aca0f69c6a936d548af568a94 ~~ c43655d90095c92a761a6baf4c3eb3a43a7ab7ef ~~ 0582d49672e7157e71d910d0005e97fe14ad1661307b5b108bf3e4bca0770077 ~~ valid-svg12.gif~~ The valid w3c icons could not be modified. ~~ http://www.w3.org/QA/Tools/Icons +7cee00720025ab007428f6e3e1a7214e ~~ 01a6c6f262e003a1a2dc30e0cdd8ca412eb8be6e ~~ 26496d2be92279a0f4a6394497964491837339ae44af590e9f92f516ec4e9d34 ~~ valid-svgtiny11-v.eps~~ The valid w3c icons could not be modified. ~~ http://www.w3.org/QA/Tools/Icons +7d49c9fa009b69e181b1930fc94bb396 ~~ 725448c5513bab5549c6caeea929c6090897c564 ~~ b58db54cc4df6ea2d4b8f9452cab4e881e8cc8e9f27b6c6bc026d7c400bbc571 ~~ ISOcoated.icc ~~ Does not allow modification ~~ https://packages.debian.org/sid/icc-profiles +7d94f95bf383769b51379d095139f2d7 ~~ 39b43bf424ac193259b3787764c1cdd7a7e2242c ~~ edf8a7c5bfcac2e1fe507faab417137cbddc9071637ef4648238d0768c921e02 ~~ courbd.ttf~~ The EULA does not allow modification, reverse engineering etc. ~~ https://bugs.debian.org/298545#29 +7e1795c2bf10a86a6ad9b20f7f0db073 ~~ 991a1674360af410d819080a53c1c171fad0cc12 ~~ fbf1dd5700661d41a03f1dfae5aabc3410ebfc8389ac5fc1bd61596544ec2c6d ~~ SWOP2006_Coated5v2.icc ~~ Does not allow modification ~~ https://packages.debian.org/sid/icc-profiles +7e562ac7e442b624574c5c4f35afc6e0 ~~ ed0e8aea57c4ad9f3089f9fda0ec79df3cc2fc65 ~~ 7af51046652b9c8fd2f1504b38d50b1a0730d5f604d4f4a997024bbb8e839f9f ~~ valid-svg12-blue.gif~~ The valid w3c icons could not be modified. ~~ http://www.w3.org/QA/Tools/Icons +7e84f9887fb3a132c152c18f11dad3ec ~~ e96168d80b69bcd1b46aaa5beac80544400db40c ~~ 96b2f2987f83e2a545e607799fbfdff43ef8158fb9b215b187c574db8f145aaf ~~ ISO22028-2_ROMM-RGB.icc ~~ Does not allow modification ~~ https://packages.debian.org/sid/icc-profiles +7ee946b73bb86040f3e7ab93f6db14df ~~ 4f540c36bf274eb4f3f746e3b29732f3b2fc5548 ~~ 64f0e8605726e3f4e28296e39fb8e327280bd157dc23a9a1e6c6984f62528f10 ~~ HP5000_UVDuraImageGlossMaxQ.icc ~~ Does not allow modification ~~ https://packages.debian.org/sid/icc-profiles +7f63ed8a0ec048bb218416b0a44938e1 ~~ 9666bc22e2b92eb3c680aa533658e8690fa8ac6a ~~ b4b6e4ec939dc2076920d403870a815bf796ebb60a1319ad012bd33e2a216616 ~~ flattr_logo_16.png ~~ Could not be modified ~~ http://developers.flattr.net/api/policy/ +80eb5bb65bce626e4fe1c30b01b415b3 ~~ 466f3d78e234967f32b78853b0861f6339f4a272 ~~ ca8e911927118a9cfddcedcd562b50d86c22349479c3347ab4337ebf180eb0e2 ~~ valid-css2.png~~ The valid w3c icons could not be modified. ~~ http://www.w3.org/QA/Tools/Icons +81d64ec3675c4adc14e9ad2c5c8103a7 ~~ 5518f0bdebe7212d10492ab6f4fff9b0230c3cbe ~~ 873361465d994994762d0b9845c99fc7baa2a600442ea8db713a7dd19f8b0172 ~~ comicbd.ttf~~ The EULA does not allow modification, reverse engineering etc. ~~ https://bugs.debian.org/298545#29 +82fcfdf86e94104ca27b00b675bd00f8 ~~ cdf4366e1a216f07f966185efe45cb723d7f14af ~~ 8a4df954c554bede09cd9e66192c02a15f7edf736cc3d3939cca0f70fb99925e ~~ SMPTE-C.icc ~~ Does not allow modification ~~ http://www.adobe.com/support/downloads/detail.jsp?ftpID=4074 +84a0496cfe509bf4370ad17af6d85622 ~~ 7ab8f1991dabde584b9838771e6dfd1507ba90c5 ~~ c92e0fa07d29e3cc5c2b4cd5cb9366e4216599ba367ca7bddcbb99b6947de344 ~~ valid-svg12-v.eps~~ The valid w3c icons could not be modified. ~~ http://www.w3.org/QA/Tools/Icons +84e2f28174782dd9fc12f18018f77b6a ~~ 91f8d7ca42350e66a463d70a363b8da052b73ccf ~~ 53a07672be6a7ffcfcb33b9f35514e52144a32a32291dd2f13df13f446e4b91c ~~ PSO_MFC_Paper_eci.icc ~~ Does not allow modification ~~ https://packages.debian.org/sid/icc-profiles +8739256e5092b650350fcdb2f3d05620 ~~ 138d2b58355ec3ec06a6a113a5998ea002bce9e3 ~~ 90ef36ef0f26aa9b645971c5158a482bf028fcf84e5b83a582e9b6d092967d24 ~~ PSO_Uncoated_NPscreen_ISO12647_eci.icc ~~ Does not allow modification ~~ https://packages.debian.org/sid/icc-profiles +875f43ef98790eeb2eb6bbf4fd9f357d ~~ 64abf9487f0ab95bc58980fdeb4b6135e675a0ce ~~ ca6287c7970f25be503c1d4a11544331f75700d357a9ed44614a4908b8d4a6da ~~ valid-xml11-blue-v.svg~~ The valid w3c icons could not be modified. ~~ http://www.w3.org/QA/Tools/Icons +87996b1fe7118751e5e5ab90580a952e ~~ 776a5b2b388ff669ec30a1866048967bcc7b81a4 ~~ 0342f1f4084b2f0df09138e28c6b7c859aca3e7dd87860691758d788dd81ca04 ~~ valid-xml10-v.eps~~ The valid w3c icons could not be modified. ~~ http://www.w3.org/QA/Tools/Icons +8ba42fcbb61411cd8d04c84669fb5046 ~~ f4a6e779ff48886c3bee82e283c3384cabb2554b ~~ 9f819a940bd8fc82763563864f16b848a760a2c5534ad5d8f35893136c12ba38 ~~ valid-svgtiny12-blue-v.eps~~ The valid w3c icons could not be modified. ~~ http://www.w3.org/QA/Tools/Icons +8d468c1a8dfd2b7d6cce25eff76b65c6 ~~ 8d9069fe50f89461de9fe4d293d0f4e62980e1b7 ~~ 244738a697d313e29ebe0059ddd1cb23ad8fefe5bbaf1954463401bf8998ae63 ~~ valid-svg10-v.eps~~ The valid w3c icons could not be modified. ~~ http://www.w3.org/QA/Tools/Icons +8d708f9880597a9810b8a1b778189035 ~~ 65870fe048c78512165c65acd3f3af16f0311fc3 ~~ c96fa8de8fa62207eaf3921ce08d1997b8927c2c2d2f6b7ebbae72c8bfc01bbe ~~ valid-svg12-blue.png~~ The valid w3c icons could not be modified. ~~ http://www.w3.org/QA/Tools/Icons +8e6f0c4c08a843c0299f156e74f0728b ~~ d7fab95973fba222ec6cd09b99b265ca7874a397 ~~ d9abcff597e9e3069b67e1197bb6f358f0b89208af73288356e7fd801b7937a6 ~~ valid-mathml20.png~~ The valid w3c icons could not be modified. ~~ http://www.w3.org/QA/Tools/Icons +8e8603d86a548e2c41a4966e55f58844 ~~ 2b68e4c7f4bd0477fab8f6da4a1c0abcd27c3286 ~~ b90668c33f6e67f621b64d9ea8d37266f0ef481f5dd0b5c45490afa5d998db2c ~~ valid-xhtml11-blue-v.eps~~ The valid w3c icons could not be modified. ~~ http://www.w3.org/QA/Tools/Icons +8f308fe77b584e20b246aa1f8403d2e9 ~~ 2614ce1c336f8568b9bf0c14752edfe1819a072f ~~ db56fdac7d3ba20b7aededcb6ee86c46687489d17b759e1708ea4e2d21e38410 ~~ trebucit.ttf~~ The EULA does not allow modification, reverse engineering etc. ~~ https://bugs.debian.org/298545#29 +8fc622c3a2e2d992ec059cca61e3dfc0 ~~ 1cc231f6ba7e2c141e28db4eac92b211d4033df6 ~~ 00f1fc230ac99f9b97ba1a7c214eb5b909a78660cb3826fca7d64c3af5a14848 ~~ impact.ttf~~ The EULA does not allow modification, reverse engineering etc. ~~ https://bugs.debian.org/298545#29 +90a24770ba08869e300ce7571a68bb79 ~~ 754f1e1c05a332ebbde9f3d380e74b39eb9d94e2 ~~ 3dad336c17ce25b5179cdc0ab8c15c7539083d6b40d8186e2f51a1713e123d30 ~~ valid-xhtmlbasic10-v.svg~~ The valid w3c icons could not be modified. ~~ http://www.w3.org/QA/Tools/Icons +90a7a620a2d20028d19d5789a3663d77 ~~ 16c6d4f70538144a00442078a8afcde652e8c6ef ~~ 97647e43f30579fc5a71c8ac80e6957b12dda05ec0302d7d54089ec9fca91d6a ~~ donate.png ~~ From paypal button. ~~ http://www.imagemagick.org/discourse-server/viewtopic.php?f=3&t=24735&sid=00d5a91304948ce71a38e695d225e122 +91cf26c58e07eda724fdbf3eadce4505 ~~ f818fb6e4d3d1eab00cc236caadc9d9a445ea51b ~~ 11f767aef1cdebb4f60ba6432a1b6546558d6de9c51435d46c4333aacec2c4cf ~~ ColorMatchRGB.icc ~~ Does not allow modification ~~ http://www.adobe.com/support/downloads/detail.jsp?ftpID=4074 +91da8b37dca8c84af7fff31cddaddcbe ~~ 36b8fef88da3b502579c794336d08321954dbd3b ~~ 189899f40cbb8a439bfb516197d8cf35433385e8960275734b00b4f25798e6cd ~~ valid-xhtml20-v.eps~~ The valid w3c icons could not be modified. ~~ http://www.w3.org/QA/Tools/Icons +92701eb188b1afe047cf02805bce601a ~~ e6981b3298d535341b741c51809949814c07e05a ~~ 81c0a00a8a5ae00c08a1f55f8efa618814762d8ef22df1b39d0e69c990d9f490 ~~ CoatedGRACoL2006.icc ~~ Does not allow modification ~~ http://www.adobe.com/support/downloads/detail.jsp?ftpID=4074 +92fe5e5ef3fcd253d1b766340959adbc ~~ 98cac714cf4a6ae6fbbad38c7309b761ad899924 ~~ 56fbeb9566b24d19386e5a0d64129991faeaa6c9ca44633b070230af29b1fab6 ~~ valid-css.gif~~ The valid w3c icons could not be modified. ~~ http://www.w3.org/QA/Tools/Icons +932e79d2f55e5664ff706c61ea4622b9 ~~ 3b666844300ac255da1aff067f83f0ff3fb9aad8 ~~ 54e49a69fa169fd55a53a6df83ea3aae41c7a6abe524cacbc991d17de7daab45 ~~ valid-xhtml10-blue-v.svg~~ The valid w3c icons could not be modified. ~~ http://www.w3.org/QA/Tools/Icons +9413fd425c1f69b3dc6c0a9bcea42da8 ~~ 8673414fd20425f98e7153686c9771cfb77fef1d ~~ d07f51b1625a732200cb4c768345a34c8d0dff0ac2fa94a87a8ad1f5bc70df8e ~~ valid-xhtml-rdfa-v.svg~~ The valid w3c icons could not be modified. ~~ http://www.w3.org/QA/Tools/Icons +957dd4f17296522dead302ab4fcdfa8d ~~ 5f896ef096ad01f495cefc126e963b2cd6638fab ~~ c25ae529b4cecdbca148b6ccb862ee0abad770af8b1fd29c8dba619d1b8da78a ~~ timesi.ttf~~ The EULA does not allow modification, reverse engineering etc. ~~ https://bugs.debian.org/298545#29 +95ba414cc6a78267378434805296a3b2 ~~ d15a26de865e391d47c39ca80c218614f81e93a7 ~~ 2b3bcf187a0e1a7b545cf729f765e27922e8cf5ae206174941645b9e1ec44c91 ~~ badge-89x18.gif ~~ Could not be modified (variant from https://github.com/balupton/flattr-buttons.git) ~~ http://developers.flattr.net/api/policy/ +990f17aa4481c7bf72a4b3bcbb936210 ~~ 546c7558638ee0ff09e9baa957de0e2f5bfd0c56 ~~ b047f5cd95f0f62a98ceaede6fc59c4b6a76b29f2c74d6204c30553a073ebf7a ~~ PAL_SECAM.icc ~~ Does not allow modification ~~ http://www.adobe.com/support/downloads/detail.jsp?ftpID=4074 +99192cee336734ba883a660ab024921f ~~ 51a08207c696205d16fdb9e8f649c1ecb51eb7ec ~~ ccc6c9bec5c19b544fd4a027a2f9ec07006d6616e205d315845bb368d61f2ebe ~~ valid-html401.gif~~ The valid w3c icons could not be modified. ~~ http://www.w3.org/QA/Tools/Icons +998d8d0124a6ee1aab92679f39f60ffe ~~ 579eeaed4679d9e35a9743e7ff87ba4b07b7f0de ~~ 12dcac11bac023b7184b10e605820626cbd3c5e3312d3cd4e758e112e06cde80 ~~ valid-xhtmlprint10-blue-v.svg~~ The valid w3c icons could not be modified. ~~ http://www.w3.org/QA/Tools/Icons +998fbb5d3614ac87e52abf701c11462f ~~ 2cb088015ad4f1048ca199ba084acca1b901bdec ~~ a05d905da9a54b1070d2a6cbd51a8780d7fd45f3279ec5e31e4555810109d1be ~~ ECI-RGB.V1.0.icc ~~ Does not allow modification ~~ https://packages.debian.org/sid/icc-profiles +9a5ee67a90f6fcda231066e76ddc2bc7 ~~ 1f50fe05eaf41339766d465be8aeed90c92b2718 ~~ 216654adb0174972350894e95a58f50654c80fba64992cb7e4c61eb84a402f63 ~~ valid-mathml20-v.eps~~ The valid w3c icons could not be modified. ~~ http://www.w3.org/QA/Tools/Icons +9a7fb2fcadcd6251ece4a26ce2a2cf03 ~~ 13380521c26669f9e61dca80298e4808c2d2ab66 ~~ 9ab00fee1773663d6e937bb1d746496ebc76ef7b869ca3b9b9912bbd16812396 ~~ valid-svgtiny12-v.svg~~ The valid w3c icons could not be modified. ~~ http://www.w3.org/QA/Tools/Icons +9e49c3f7c4d063d18c1a074d6ac2675f ~~ c12fb8238c5a2db23d22c081a766d3e64903037e ~~ 052a153ac653cee8e2b7015d982d42a8524f43ede8a2c7d8335d085ce73879f6 ~~ valid-css-blue.gif~~ The valid w3c icons could not be modified. ~~ http://www.w3.org/QA/Tools/Icons +9ec1fb4ce244280c1d77a0ff6caca171 ~~ 11d6957b24ba5b897bacce56372b5e9bc564ae33 ~~ 2b8138629103b5d498ff0dda2dd276f5f536cf30a10e10afff37f18dc71b68f6 ~~ valid-svg11.png~~ The valid w3c icons could not be modified. ~~ http://www.w3.org/QA/Tools/Icons +9febb0b81034473ffec6e8e68cdd78d1 ~~ 8410c83ddaca876af87bc75366d82cf95e4f5d05 ~~ 05f6d5d529a7204f99615dd67726e36ec0c5be12ec0f467ce2568dda5d6dc865 ~~ valid-html40-blue.png~~ The valid w3c icons could not be modified. ~~ http://www.w3.org/QA/Tools/Icons +a0623d0348ccd800868bca2771613041 ~~ e3677c0e722c0aa6ffa3061b6141e76ff8bcbb86 ~~ 15d7ebc8031d8358d1ad2ae5e93d0157d2341ecc72896d4c41779027794745cb ~~ WebCoatedSWOP2006Grade5.icc ~~ Does not allow modification ~~ http://www.adobe.com/support/downloads/detail.jsp?ftpID=4074 +a2b3bcdb39097b6aed17a766652b92b2 ~~ 0aba42fc6e5b1e78992414f5c4df31376f90f0e2 ~~ 2f371cd9d96b3ac544519d85c16dc43ceacdfcea35090ee8ddf3ec5857c50328 ~~ arialbi.ttf~~ The EULA does not allow modification, reverse engineering etc. ~~ https://bugs.debian.org/298545#29 +a2b4dc9afc18e76cfcaa0071fa7cd0da ~~ fe5e9cfe72f1cbf07b4190f7fc4702cd15f452d1 ~~ c8f5065ba91680f596af3b0378e2c3e713b95a523be3d56ae185ca2b8f5f0b23 ~~ verdanab.ttf~~ The EULA does not allow modification, reverse engineering etc. ~~ https://bugs.debian.org/298545#29 +a315d5babf0907b7437506c12e9c66ad ~~ 1f5f5148b3ee5b361c3f63a39699d329d286e982 ~~ a87c7f818752705fa0ff6c94c4368ba5a1b89c47a70cce33b4630d51dc8ef4bb ~~ valid-html401-blue-v.svg~~ The valid w3c icons could not be modified. ~~ http://www.w3.org/QA/Tools/Icons +a3fe13b83e7cb992f9ecc60c21ed9722 ~~ 3c3c6c65ab8b4ba09d67bcb0edfdc2345e8285dd ~~ 83174717332326ddc198d9df188a4daec27b8979ba152cebbfc470c793d0bb11 ~~ sRGB_v4_ICC_preference.icc ~~ Does not allow modification ~~ https://packages.debian.org/sid/icc-profiles +a455acadf3a8494b13ecd9647a6c4f0a ~~ c01cdfb17564d9a33b2bb2fe25f57ca540ff0d9d ~~ 9f92e78a75201776eade029e5044d56b76a5ca1f040340e03760b3ef3a4ec86d ~~ valid-mathml20-blue.gif~~ The valid w3c icons could not be modified. ~~ http://www.w3.org/QA/Tools/Icons +a4fef8819bbf43b1c424e195782cf514 ~~ 3d2f25a8a596181ad485be8240d57b8c766fce5b ~~ bf62d7155802ae42b966702986d9911f846dfdacf18aa2299f797c861d1d4f23 ~~ VideoPAL.icc ~~ Does not allow modification ~~ http://www.adobe.com/support/downloads/detail.jsp?ftpID=4074 +a50f9c96a76356e3d01013e0b042989f ~~ d17fae7a6628e2bc4c31a2074b666a775eed9055 ~~ b82c53776058f291382ff7e008d4675839d2dc21eb295c66391f6fb0655d8fc0 ~~ comic.ttf~~ The EULA does not allow modification, reverse engineering etc. ~~ https://bugs.debian.org/298545#29 +a5b7cb8e0efac6bfac265c7a1e2f9400 ~~ 0160e47f713e81adc7fa90ccee47b7794b165e9a ~~ 02ce5ee344c4e4d1046374ac8a42f522c9e8961827c86ea75f68bd7eea4dc174 ~~ valid-svgtiny12.gif~~ The valid w3c icons could not be modified. ~~ http://www.w3.org/QA/Tools/Icons +a5d7699bee6b7a3ecb554c707bcb7e66 ~~ 9b873d3399237be0723d0ebba21426d0ed91fdb3 ~~ 98ebd604adea6bbd42efcc31f15f4abaaff118b033afe1d70c70cd98c1c38a91 ~~ valid-xhtml20.png~~ The valid w3c icons could not be modified. ~~ http://www.w3.org/QA/Tools/Icons +a718767221642d3a83d2af645eddfd47 ~~ 21ca26055a1c5bd08de7d7379775fb492dc0d2c2 ~~ 71057d0a4b0a7a21588465d9a7e9afc33ac0e85db05777eb79f801c2a4ad7539 ~~ valid-xhtml-rdfa-v.eps~~ The valid w3c icons could not be modified. ~~ http://www.w3.org/QA/Tools/Icons +a7f312474dca7b17dc3475075637bdfe ~~ 267ad1f6a62205ba8e6bae5639b8d9056578f568 ~~ cb38e77f63cc8798ec881452be9f17e77b0820069dd8e67fdc1cfcc06f42784b ~~ valid-css2-v.eps~~ The valid w3c icons could not be modified. ~~ http://www.w3.org/QA/Tools/Icons +a8babd1abc3be0acc7831e4a030a01df ~~ e0441025cdd38734f6dcbd610c3acd3ef7d91474 ~~ 8ad41ca14758b4266235b2ca6a16811dc44983ed118d0cba0b4398bc05c9246f ~~ valid-xhtml10.gif~~ The valid w3c icons could not be modified. ~~ http://www.w3.org/QA/Tools/Icons +aaf594015c74e1f5efc6c2564c7386c6 ~~ 72e079046e6df264cf3dbd7f946a34e9c212e5e0 ~~ b612e8f4fa38c76b16f3e48585edb24991d5ffc8bb451d1f81523b7e0e43bf9f ~~ valid-mathml20-blue-v.eps~~ The valid w3c icons could not be modified. ~~ http://www.w3.org/QA/Tools/Icons +abbc84e259b7a7f00986c0941f4354c6 ~~ 6e5159e13faf938362093c764803fe8f0523940c ~~ 9969f0deeab0e011294a1a7a71a928f6b3e4e05a06f177071a5611cda978d339 ~~ valid-xml11-v.svg~~ The valid w3c icons could not be modified. ~~ http://www.w3.org/QA/Tools/Icons +ae81087e1c54c6fdda2f93bd2d47cfaf ~~ ee36e8bacb2c76281acbfe993de442358b9217e7 ~~ e170a59fbf26e7845c62b07e95901b1ef3335a664c03e7ef48ddb84fa08337be ~~ PSO_Uncoated_ISO12647_eci.icc ~~ Does not allow modification ~~ https://packages.debian.org/sid/icc-profiles +b041a1c34404ae52a2e237c954e3d98c ~~ 00ba0772b858ee90d98688538348a5e98c8326f2 ~~ ba3c582e625d54caed29af09b74047219afdd08d09a7d8e742cdd2d2e729ce1b ~~ valid-xml10-blue-v.eps~~ The valid w3c icons could not be modified. ~~ http://www.w3.org/QA/Tools/Icons +b066355b92e008e72dc1dce7bb83dec3 ~~ 2c1c69aad79c804e88764c962e24f6a5813442de ~~ 2884642732a81c4d66561faff094d8b763af008576a58a2d78c1da966033361c ~~ valid-xhtmlbasic10-blue.gif~~ The valid w3c icons could not be modified. ~~ http://www.w3.org/QA/Tools/Icons +b0c5e9b999266830cba59fe3a5cbb4e3 ~~ 84a840ff9c3be260eb7cd5fddfe632bb232c8962 ~~ 362761d7c9d7b3ae4323d03cb80993b4eb56b70a6bbdc463fa2f42556b8653b6 ~~ eciRGB_v2.icc ~~ Does not allow modification ~~ https://packages.debian.org/sid/icc-profiles +b11a602ca66a0b746b894c4a8301e216 ~~ ad0a22dea86a37698da49e19e30dfe5bf98811d2 ~~ f54b145a18e4b12112750e672f1c79cac9347dc8403da3955e7f74a352816a21 ~~ sRGB_v4_ICC_preference_displayclass.icc ~~ Could not be modified ~~ http://www.color.org/srgbprofiles.xalter +b15431dd1c93e12280fe4037b90e0920 ~~ 9939b411597062cc9e114c38132b1be6b8dc3e52 ~~ 8a5f2c0ee0e6378953214cf4e1d4c1a532791f44e4d963d87d8857599d8905dc ~~ valid-mathml20-v.svg~~ The valid w3c icons could not be modified. ~~ http://www.w3.org/QA/Tools/Icons +b1bc241fc57cc7e6d0317e806d547b94 ~~ b1106897e13f1c7c943418331c4f31516fd658b6 ~~ d2f7cef65e78ab2088af72d8acc7df6d1f1da92826bd75586138364e466a35f6 ~~ valid-css1-blue-v.eps~~ The valid w3c icons could not be modified. ~~ http://www.w3.org/QA/Tools/Icons +b1e79950a20e54f6a20d0480c4c7e712 ~~ 4fd3d68a9ba1fb8597d480d652ea3d374a259a30 ~~ aacd131ae899adb2338c3d1bbffb27818c507d137ccb5ec6259c50cd63e66580 ~~ valid-xhtml10-blue.gif~~ The valid w3c icons could not be modified. ~~ http://www.w3.org/QA/Tools/Icons +b43417fb9fd9c882511c444b4e952395 ~~ 67590724c8fd8465c8db2e3bce0f1ab740c26b50 ~~ b79493e5acc5f3025778f44b6abe35c3d2a0fd08871fcaa27b9b82f2bf1214ed ~~ valid-xhtmlprint10-v.svg~~ The valid w3c icons could not be modified. ~~ http://www.w3.org/QA/Tools/Icons +b4e3fbd4c04cc702a93eb806d974dbf2 ~~ fbaf212c58942b9e34ee3c0339f9ac66a6e4c2ed ~~ 108472bd69acdf4ccca0b84c5d8d6be916107e4c1d9ca57ed27dd6137e9aa7c1 ~~ JapanColor2001Uncoated.icc ~~ Does not allow modification ~~ http://www.adobe.com/support/downloads/detail.jsp?ftpID=4074 +b6b32e3e6f0c12493aac5311cde3e88f ~~ 17c1155dd5b03cb9c0d0fcfb05ca64ae5d714fe4 ~~ c74ce366d9d19521a4a95197d227b324730f30815e017b76d926ba7395a8b05d ~~ valid-html401-blue.png~~ The valid w3c icons could not be modified. ~~ http://www.w3.org/QA/Tools/Icons +b7ca28ec04c8b59fb299e3a800de5e48 ~~ 386ad5fe9242c7ce6db6b778a4788ff15ab635ce ~~ 59ad761ae0ff5e32b8368a6eeb69539c995d8c0eda596f37c4bd96b906bd3bc3 ~~ valid-xhtml20-blue.gif~~ The valid w3c icons could not be modified. ~~ http://www.w3.org/QA/Tools/Icons +b8837688de7cd2e68c23f2f710135b70 ~~ 60a7fea13bc67a809911735cee5ab016094fb181 ~~ 5dbe339485b91f260e4f0070b36a1604308a6cbaf5aeee5c38194ad602144ca2 ~~ valid-svg12.png~~ The valid w3c icons could not be modified. ~~ http://www.w3.org/QA/Tools/Icons +bc1ac3e3b56bb48769beb243dff2446c ~~ de41f8e3c1131e8476947047b939f48c65830166 ~~ 3382de0b11c8a53eefb1d43e744f1d9665a11f8982916a1b0278900ef6f600d1 ~~ valid-html20.png~~ The valid w3c icons could not be modified. ~~ http://www.w3.org/QA/Tools/Icons +bc4ad1bf80077d63abebfa7fd5c83dfc ~~ 02a8d25d48caadffacfda95b798901fe8c45fa2a ~~ 859bf913d5f318ffc27c7747027354d1798219db861c7886820f5fd61571fcd9 ~~ valid-svg12-blue-v.eps~~ The valid w3c icons could not be modified. ~~ http://www.w3.org/QA/Tools/Icons +bca21a6afa3a4b5cef9ca8e91565c1b7 ~~ 64dd3f95c4fdc5797e31a04bb94f87fc8b6275b0 ~~ 29a90551a0589bd43f0f8d8d9b1ef9a4e609654f49bce6a345bd2ba390ed2ce9 ~~ ISOnewspaper26v4.icc ~~ Does not allow modification ~~ https://packages.debian.org/sid/icc-profiles +bda07efcacf5377e91edacb0454ea7e5 ~~ 711de43d215ed1f69a6a04965b7c7e21f9a0a00f ~~ 128dc02f7246cc3807af0323695379f64151a8f27a587736acc59f8b6ce894b8 ~~ ISOcoated_v2_eci.icc ~~ Does not allow modification ~~ https://packages.debian.org/sid/icc-profiles +bdd052f421da1394e165d12628203830 ~~ b5777d5ec1bb3604a6171dda162a9ad23cce1b42 ~~ aad2694c593a41d17128124c5647246851e18d993628301c952e10fc86d82ff4 ~~ valid-css-v.eps~~ The valid w3c icons could not be modified. ~~ http://www.w3.org/QA/Tools/Icons +bef41e75eb18e7d7c9b9f6356f9ff118 ~~ 4fbb694fc44b6126485c2546e1ed8d3c7403adfb ~~ 018441d7dd9434dd06d8532a559c31368f3b9293d33e1d17371049936c0851c2 ~~ README.md ~~ Could not be modified (variant from https://github.com/balupton/flattr-buttons.git) ~~ http://developers.flattr.net/api/policy/ +c61b355a5811e56ed3d7cea5d67c900e ~~ 3ccf584caad7dfaf07a2b492e6e27dfe642c6ba0 ~~ 82d2fbadb88a8632d7f2e8ad50420c9fd2e7d3cbc0e90b04890213a711b34b93 ~~ georgiab.ttf~~ The EULA does not allow modification, reverse engineering etc. ~~ https://bugs.debian.org/298545#29 +c62d711cf39488a1fc60e8be18a9d6d7 ~~ 90dc61d4d6299690049b0d63e9539c9a72cf8eab ~~ f4361ea9aed10f111fb30a5525991986d8acbedd8a830a803198bc9edebc906f ~~ ISOuncoated.icc ~~ Does not allow modification ~~ https://packages.debian.org/sid/icc-profiles +c822d9854da9f276aa29a70b6f37d8d1 ~~ 303670924caf87066c18dc4cb19dce337af7ea2c ~~ bac47bae29cf8f10ad926401eaf7ebe7d7f49e7c5671aeb12e8dd658a405725d ~~ valid-css-v.svg~~ The valid w3c icons could not be modified. ~~ http://www.w3.org/QA/Tools/Icons +c8720db4c921c18df5bc8f53fbaac4df ~~ 1439d9a56c8ff06a5ac846a5a7ac8612618a9e92 ~~ f816c05b2bbcf3bcf2b4a8ae6029fae4b99e921d35608f2624f8e73ffbad7ce6 ~~ valid-svg10.gif~~ The valid w3c icons could not be modified. ~~ http://www.w3.org/QA/Tools/Icons +c8c648fbab1d669f1c130ecd533452c1 ~~ 5c2649a6e2bd6d0b822380183781a30d772dc661 ~~ d6db6255f32591be723b45289f75e0018cc7a2eacefef52033b48f81d8a37f32 ~~ valid-xhtml11-v.eps~~ The valid w3c icons could not be modified. ~~ http://www.w3.org/QA/Tools/Icons +ca679923a7d341f733de44408739382f ~~ e155eb67721c4b1d864c0d0409c6e0ccf0fcdccd ~~ 9447a078e011848189d9b0037bfa8b37d561f259e321bd6693052ec398faf741 ~~ valid-xhtml10-v.svg~~ The valid w3c icons could not be modified. ~~ http://www.w3.org/QA/Tools/Icons +cb61e3ed0a20147e401244c09626bb9e ~~ f8de9891e3ef0ff821ea6ddbf8da39bc61849d2c ~~ e97279bc4354799db6940a8546076887bc3f2b873e91aa544f210089b4ae8fc7 ~~ valid-xhtml-rdfa-blue-v.eps~~ The valid w3c icons could not be modified. ~~ http://www.w3.org/QA/Tools/Icons +cbc979588a3ae01494c991f9f2e43863 ~~ 6a049f5815f9927936531bb8c9b0a324059a1a90 ~~ 2c53aa19b877695fe2d26749dd4787923a6a53d3cb40c8dca970e2c702ab0439 ~~ valid-xml10.png~~ The valid w3c icons could not be modified. ~~ http://www.w3.org/QA/Tools/Icons +cbe696cd6659f1d7f6d09cd17ad25fc6 ~~ eaaffe86521aa39d6df64f41d20e74761d6aaf34 ~~ 18c12ea703ec885599fc7f3a983de2df13295780790578d7a495b54c2134e806 ~~ valid-svg10-blue.gif~~ The valid w3c icons could not be modified. ~~ http://www.w3.org/QA/Tools/Icons +cc697b6abf992330bcf05fd07397c45f ~~ 797dfcfa9da6b92cfa86eebe634733515cacb162 ~~ 49678565e9653b800d044f5bc596e279729410c00dbed4abc8ab0e6d4716af0a ~~ PSO_SNP_Paper_eci.icc ~~ Does not allow modification ~~ https://packages.debian.org/sid/icc-profiles +ccc79917c28a6f67735a66a369b02a4e ~~ e90ad6929f33a9c7ab4e1168220f0cf932f54ddb ~~ 4f20d42a39386e6845a94bea0e6c85d5975139990ef6e69c1e45a58544f79251 ~~ valid-css2-blue.png~~ The valid w3c icons could not be modified. ~~ http://www.w3.org/QA/Tools/Icons +ce4f946f5b4ea75a774c717ce0b1383c ~~ d392230007b12a21e95a07faaa4135de3a367fe8 ~~ 45a8b982ba73c191a6bc0dbed3fbf13b1f834d2a20d0293d10dfb96b45996ecc ~~ valid-xml11-blue-v.eps~~ The valid w3c icons could not be modified. ~~ http://www.w3.org/QA/Tools/Icons +ce7471dab641af1016dfc8f3482da966 ~~ 4e707e8db5245e72ab2e0075cdd17514f080d9f2 ~~ b3599c68b79236e5ce69d8dd22178157553631c5fe829130602cde98d8764790 ~~ sRGB_IEC61966-2-1_no_black_scaling.icc ~~ Does not allow modification ~~ https://packages.debian.org/sid/icc-profiles +ce79392e1f7f2eb1c37414653feb9ccd ~~ 56bb6e8e3d8166ca4314add0e4c5b108d5be9262 ~~ a4154b6550859c2638ab09e3561f666a1f7bd899723a8da8a4c8e467b9432fc2 ~~ valid-svgtiny12-blue-v.svg~~ The valid w3c icons could not be modified. ~~ http://www.w3.org/QA/Tools/Icons +cfc9632ec5e6091e2a11c1dba6e2b270 ~~ b6c278875e8bb398392d104b2598b9d2a7d8be8a ~~ 4970d5940eff2c99e8ebca2325f56de667ef8d97f5075d477cf5f37438f1b2a3 ~~ valid-css1-blue-v.svg~~ The valid w3c icons could not be modified. ~~ http://www.w3.org/QA/Tools/Icons +d0e9246f555b3fd579f675ed0da5f970 ~~ 4f58e8e20a0a6000b3b44b60b52633c27e078796 ~~ 0efe4af5f7be218828d77152b5e38fe206987a0f7f0f6666105bf257f5ba3b24 ~~ valid-css.png~~ The valid w3c icons could not be modified. ~~ http://www.w3.org/QA/Tools/Icons +d319984b757dd214c8d33fd0a20d12ca ~~ 1021a94b161b6c7b85e82eb7ddd3895fbe6510e7 ~~ 191312d4cf3819d4f1aeadf5fa4442a885ab89ac0ef3192caaa33ce00df68f19 ~~ valid-mathml20-blue-v.svg~~ The valid w3c icons could not be modified. ~~ http://www.w3.org/QA/Tools/Icons +d361c3a673aa980a47e10f05baf99116 ~~ d186ae2feb0a319ea9e6ea8b5956be1fb54da935 ~~ 5fd67205d64f00759b4394cadbd66a729303c0adcf328d531f833a7491c170f4 ~~ valid-xhtmlprint10.png~~ The valid w3c icons could not be modified. ~~ http://www.w3.org/QA/Tools/Icons +d3b42501d0e2598b1289e38a6ed78442 ~~ 227da85240b8afdb3a28fee0c4db0dc09f07e5e7 ~~ 5d6c200ce86e8e40a7760f926a3a64265c82c7658ba89a53bccd284dd839962c ~~ valid-svgtiny11-blue-v.eps~~ The valid w3c icons could not be modified. ~~ http://www.w3.org/QA/Tools/Icons +d7ce0073b774bed6f9ef5f48c11fdcd3 ~~ 7ac34e68d6c4e612e572bdf37abe2ad8af493b51 ~~ a093c7252b83d7a292ce8fa829dbbe6cbd7d1a0db615c2b54c0925c28e48512e ~~ valid-xhtmlprint10.gif~~ The valid w3c icons could not be modified. ~~ http://www.w3.org/QA/Tools/Icons +d903ac66ad9e5d99b57b4be94f7ef1e5 ~~ 960301306e982cdbda6236c0fd11fc51cf6a52f1 ~~ 1016dd7b56cfc6482d0883b4d4978b3aaa131d6d4e00775e9d51f7ac356761c8 ~~ valid-svgtiny11-blue.png~~ The valid w3c icons could not be modified. ~~ http://www.w3.org/QA/Tools/Icons +d94351568b3934d8c391e66a8df6c7f2 ~~ 32fbf4d2d436c83d8145878e5a79ee58999bcf4f ~~ b2c0439e9cf6dd2a91214119dfb701253d1e9a8bffdad66fefe95d08d76b4c20 ~~ valid-xhtml-rdfa.png~~ The valid w3c icons could not be modified. ~~ http://www.w3.org/QA/Tools/Icons +d9873cac720cb96c7c9b60bf38e9cb84 ~~ 4f487e2b79ea36059a01fcacd479951386d30c1d ~~ 8eb6e4004d7869bde4470c2a69c1d1fcb8ba0a4a79dee2c800faa7b0f594d44f ~~ GRACoL2006_Coated1v2.icc ~~ Does not allow modification ~~ https://packages.debian.org/sid/icc-profiles +da414c01f951b020bb09a4165d3fb5fa ~~ c5f4818fa6876e93f043a209597bcb39c57e43ca ~~ 66dbfa20b534fba0e203da140fec7276a45a1069e424b1b9c35547538128bbe8 ~~ courbi.ttf~~ The EULA does not allow modification, reverse engineering etc. ~~ https://bugs.debian.org/298545#29 +dea88382d899d5f6e573b432473ae138 ~~ 806e8561209515151f477f2c7a6bd2b1a00bb63c ~~ 304f569a83c1e5eddaddac54e99ed03339333db013738bb499ab64f049887e28 ~~ AdobeRGB1998.icc ~~ Does not allow modification ~~ http://www.adobe.com/support/downloads/detail.jsp?ftpID=4074 +debeb65b839c838c141e7f93c27d1903 ~~ 1b0fd975e35d36b854c41ca7f61377e212541b52 ~~ 93aaa6f7ca6035516be06e858c6df7237073bbe776f618858da97405c6898144 ~~ valid-svg11-v.svg~~ The valid w3c icons could not be modified. ~~ http://www.w3.org/QA/Tools/Icons +e111e8cadca60735b0f6800776745f44 ~~ 5b67357755fe776ff4e780f142fc982f1b95ffd4 ~~ ed26408f095153fa973e68d4da2d8ddd50b7d550e4cbbedb9e725d94ca8faf0e ~~ valid-xml11-blue.png~~ The valid w3c icons could not be modified. ~~ http://www.w3.org/QA/Tools/Icons +e14f5db955711d914d877df35ad7a1b5 ~~ 6e6503b66e2d54d0c9e1ac198ec47e3cbdc920e1 ~~ c6b4b62f0726243742eced8b9669476a6be89e581f50a7600ed8b6fcbb9cdab8 ~~ ISOcoated_v2_300_eci.icc ~~ Does not allow modification ~~ https://packages.debian.org/sid/icc-profiles +e1581c126f047814a1e03a3a2c341ab3 ~~ d1e71083fe3ec82397f45bd4ec7011aa8ca5e42f ~~ f1c9ee4d47070ecec0c6679f83798c99b661e498ac14de1eea0d641274863b1d ~~ valid-xhtml10-blue-v.eps~~ The valid w3c icons could not be modified. ~~ http://www.w3.org/QA/Tools/Icons +e1b9ca24d31179ef3379d474bcce3be2 ~~ c3e4b470c40f4def158690679ca4be7cd61adecf ~~ 11772b66e51d7163d202637ce50341fae3874932c2a1934708e7eb369fd74664 ~~ valid-svg12-blue-v.svg~~ The valid w3c icons could not be modified. ~~ http://www.w3.org/QA/Tools/Icons +e2657b6eaefba7956736f6d3ba27c5e8 ~~ 7c6402b8d71adf5d8db84e27282821b3dd18df5c ~~ 14df28b3f91ad668ffb04d6f272e5a63ad16dc98fd7d97a70127ada5f7c3385f ~~ valid-xhtmlprint10-blue.gif~~ The valid w3c icons could not be modified. ~~ http://www.w3.org/QA/Tools/Icons +e2cf1908851d20f450e6e03b7e9fef96 ~~ 55472e91d355827ef7f06f83405ac2606c323a42 ~~ fd05621339a229d712f3d8681a67e85ecadf2f9b4bab12f92b2a4a82ad82aaf6 ~~ valid-svg11-blue.gif~~ The valid w3c icons could not be modified. ~~ http://www.w3.org/QA/Tools/Icons +e2efd5381ecd97ec8cb9426150e2c7a8 ~~ e7d4545ff817632f4e3cbd2a066629d10cb0bf3c ~~ 229719502b58a36a03bf955d47cf9b1f4c581893437df3ebe2d381fd391d9ffd ~~ valid-xml10-v.svg~~ The valid w3c icons could not be modified. ~~ http://www.w3.org/QA/Tools/Icons +e3d8676356f2709a7b120036b7ada996 ~~ 372af6c16801fa3369f7cc02b3ca5c8280886285 ~~ 9af0eb039208b0ae700d3fccd64a657b174db5c617c09ee79ced7cfcb7d4c392 ~~ UncoatedFOGRA29.icc ~~ Does not allow modification ~~ http://www.adobe.com/support/downloads/detail.jsp?ftpID=4074 +e5d52bbfff45e1044381bacb7fc8e300 ~~ 328b246b57108d5f175eb9a4df8f613b7207d0bf ~~ c983e037d8e4e694dd0fb0ba2e625bca317d67a41da2dc81e46a374e53d0ec8a ~~ georgiaz.ttf~~ The EULA does not allow modification, reverse engineering etc. ~~ https://bugs.debian.org/298545#29 +e650e0edc37445be4850285b15f0ec13 ~~ 315c60122079a0a2afde814e3726ab2ec0dfe680 ~~ e2dd625ef1cd8b0711faa967559ecbc68656fbc77a0f01640204414e6b2488b0 ~~ valid-html401.png~~ The valid w3c icons could not be modified. ~~ http://www.w3.org/QA/Tools/Icons +e729b445abc89051fe8ba7c6d8e9b127 ~~ 3c1e7dff5a7f4f8e8492cbca12510130a32ef592 ~~ 110f20b80a4b04614a1f340c2134770bfe9e70dc5287d8d8195c4308850c023d ~~ Fogra27L.icm ~~ Does not allow modification ~~ https://packages.debian.org/sid/icc-profiles +e75df4e582aba891ad90b1eed4f99df6 ~~ 7948737ddc42534000f4c8cb58bf09073218fc0c ~~ 849da570171fe982a94cc2831aa866170224b89285959ed4e2eb602c4192b1a9 ~~ valid-xhtmlprint10-blue-v.eps~~ The valid w3c icons could not be modified. ~~ http://www.w3.org/QA/Tools/Icons +e82af93429c91fb02e57360761885ad8 ~~ 7621a6721fb6fc9fa0b635bb8c7b2c7ce28babd5 ~~ 867a1e83e91b14c56fba894fbb7023f941332e6fcb5d74512e152afcb2e6ce6a ~~ valid-html20-blue.gif~~ The valid w3c icons could not be modified. ~~ http://www.w3.org/QA/Tools/Icons +e85664667fff23911d2984789d06a0de ~~ 047c588d16138db9dc24a8820fa2def272063a03 ~~ eaa813234aee3fbe68d7d63d58a74ba059d1519e80156998459114445b7f8ac0 ~~ PSO_Coated_300_NPscreen_ISO12647_eci.icc ~~ Does not allow modification ~~ https://packages.debian.org/sid/icc-profiles +e8ec3589482f137ad186d175ce15a8b2 ~~ b8349e0a1d1535e99edee016e16d3743c2a97f16 ~~ 8985d5856f602a6e2bf06df4c2d398003dbf6558498608b7ec3a7008dc7c5c9c ~~ valid-svgtiny12-blue.png~~ The valid w3c icons could not be modified. ~~ http://www.w3.org/QA/Tools/Icons +e9f82b83f9cc8fc2b4daada6d016d86c ~~ 078057aed474c249b11f27b81a4533539681d1b2 ~~ fa4b2a687ee885d755627bc8d2a87cb7aba7f05227884e258ac8cf490221c6cf ~~ valid-html40-blue-v.svg~~ The valid w3c icons could not be modified. ~~ http://www.w3.org/QA/Tools/Icons +ea351fac46173a39c353e1512865fcbd ~~ 7df45c43dbf906d4541be2e1029052dff4e296d2 ~~ 0fff564619d25adb8728e693cee1de9093ad443826164f2956b9a8c15bebc2ca ~~ VideoHD.icc ~~ Does not allow modification ~~ http://www.adobe.com/support/downloads/detail.jsp?ftpID=4074 +eaaaf139af3d6615e0f1517ab8535561 ~~ c44c680f80887edc66c33bbdb84c2a594bca33e9 ~~ 036524f7f1235b21d4b437c29d5a869aaccf90f597f5ab6c23e37b496fb7e293 ~~ valid-svg12-v.svg~~ The valid w3c icons could not be modified. ~~ http://www.w3.org/QA/Tools/Icons +eba743583c36fc0d3242c6bb40bfe65b ~~ dd541054e7f57bedd7f566ccd6b0a21a7b8ac21f ~~ c4f34419a761c3a87fc923beb0caa3eeb55d435eece3a6d1f0fb06bbce85d951 ~~ valid-html32-v.eps~~ The valid w3c icons could not be modified. ~~ http://www.w3.org/QA/Tools/Icons +ed6e29caf3843142d739232aa8642158 ~~ f67a30f4db2ff469ed5b2c9830d031cb4b3174b4 ~~ 4357b63cef20c01661a53c5dae70ffd20cb4765503aaed6d38b17a57c5a90bff ~~ timesbd.ttf~~ The EULA does not allow modification, reverse engineering etc. ~~ https://bugs.debian.org/298545#29 +ed9d3bf664eb65b59ca04cd09bd4ad3e ~~ ac709f6589fd0e84168db9b416b42c7819d5b138 ~~ 4c2dec7019be4aa6ac58b22b6b91b39e9151577e14c335cb1e15323df02a2d3a ~~ valid-xml11.gif~~ The valid w3c icons could not be modified. ~~ http://www.w3.org/QA/Tools/Icons +eed112802f9ebd24f2bb818444d79302 ~~ ade9de54aafab10c85328381ee2cb51951be4531 ~~ 3d24bc0fd996909c369db799d9af8e68b6b7a7a00402724236a83d3b6a861ab5 ~~ valid-xhtmlbasic10.png~~ The valid w3c icons could not be modified. ~~ http://www.w3.org/QA/Tools/Icons +eeef5cb5b45f412a0135c5f6fa10ab2a ~~ 4e6fe066ae3199b7e49e79206ad75383f0c833c2 ~~ 3f6d674174f3804eb0dabdac90ae17486e898c5063a66f861c116ea033da8301 ~~ srgb-IEC61966-2.1.icc ~~ Copyright claim from HP ~~ https://lists.debian.org/debian-devel/2014/05/msg00312.html +ef9699cf523ad3255aaced735ca298a3 ~~ 082aa1f53b8ac43750e56985b1480c16cecefa26 ~~ 6122dcdbd5bf8a602a4175617e837b8c4253ea4bb822daf57657f24f1e399c9c ~~ valid-svg11-blue-v.eps~~ The valid w3c icons could not be modified. ~~ http://www.w3.org/QA/Tools/Icons +efeb1eff559cc912be6b4a606778557e ~~ 7e89774fdb32687ae7906d2c8a2fadea7db89cea ~~ 5f9fb8033a44c981047ed24247ec11b2807ea31aae0ca896cb5ad5f9e117f7a6 ~~ ios-icon.png ~~ Could not be modified ~~ http://developers.flattr.net/api/policy/ +f11c0317db527bdd80fa0afa04703441 ~~ 2c5cb7cfa19eea5d90c375dc0f9f8e502ea97f0c ~~ 35c0f3559d8db569e36c31095b8a60d441643d95f59139de40e23fada819b833 ~~ arial.ttf~~ The EULA does not allow modification, reverse engineering etc. ~~ https://bugs.debian.org/298545#29 +f2436b9c355b64bcabe83795628f83ec ~~ 2b46b87b9020e4941619b0f3c6821c535d268d00 ~~ 035f9ee8644e8ba3814b56db72f86aa5aa74b37975968b8a73fec2777c268437 ~~ valid-xhtmlprint10-v.eps~~ The valid w3c icons could not be modified. ~~ http://www.w3.org/QA/Tools/Icons +f43ea864440de28ad70e8a78b9144334 ~~ de3c89fb14962630df6adf0fc6e8e623cf6d5064 ~~ 4dbee0615c3828ff10de69d61b02cf0230d219057a3937948776fc7372682879 ~~ valid-css1-v.svg~~ The valid w3c icons could not be modified. ~~ http://www.w3.org/QA/Tools/Icons +f4b306eed95aa7d274840533be635532 ~~ 5d69d55862471d18f1c22132a44f05291134cbf4 ~~ 7d0bb20c632bb59e81a0885f573bd2173f71f73204de9058feb68ce032227072 ~~ georgia.ttf~~ The EULA does not allow modification, reverse engineering etc. ~~ https://bugs.debian.org/298545#29 +f5b0791d2da535e5514e1fb151de4ab8 ~~ e978eaebe367ca32a1af485176f185dc53c6666d ~~ 1aa0412fc75dfbf07c2db9493420d526becefffa1eb0f5b6de416fc63412efd5 ~~ valid-svg10.png~~ The valid w3c icons could not be modified. ~~ http://www.w3.org/QA/Tools/Icons +f6150b1b96bb240c72402eb2e2dfbfd9 ~~ aeb3b0c851f88073fd37f9b42bcb519de5c4e7ef ~~ 1b70592d167880d1a8814f28d6a40343bbd5b18a11cf816ec073c88e9d178b22 ~~ valid-svg11-blue.png~~ The valid w3c icons could not be modified. ~~ http://www.w3.org/QA/Tools/Icons +f71e418a494262774b44bad8d400dd1c ~~ 4ad77a8a8793845602ad465ca56330ed89521f0c ~~ 2c3642d60402842222c2df85736669a7c2dcf3a868f83d75dd1199baf2c5b2a8 ~~ valid-html401-blue.gif~~ The valid w3c icons could not be modified. ~~ http://www.w3.org/QA/Tools/Icons +f7310c29df0070530c48a47f2dca9014 ~~ 09aff891c626fe7d3b878f40a6376073b90d4fde ~~ 698e220f48f4a40e77af7eb34958c8fd02f1e18c3ba3f365d93bfa2ed4474c80 ~~ verdanaz.ttf~~ The EULA does not allow modification, reverse engineering etc. ~~ https://bugs.debian.org/298545#29 +f8607e551233cefdda26d7d6baaa2a4f ~~ 3341cb90ab6e585e5069643d66d148238dc8d615 ~~ 5d3cfa03514978003cab345ba5fcabbf6bde5b60074e7e7548edb269bf339653 ~~ JapanWebCoated.icc ~~ Does not allow modification ~~ http://www.adobe.com/support/downloads/detail.jsp?ftpID=4074 +f95bb7597fc2d1e2f4bddda3d3ad2d44 ~~ 1dac327b03d32a0a72a0dda9397ead042e35c964 ~~ 3615182e0f3892077de3020a0b8c4ed28a6b20c95bfaa9daa233207d3226529f ~~ flattr-logo-og.png ~~ Could not be modified ~~ http://developers.flattr.net/api/policy/ +fa5be8d5b4eb756bf1399afc2cda7d1c ~~ 2044d1b1e6fb391b33e113c910433b101cd80a69 ~~ 3ad66070209c6721fab7f2506c27e21e24b091bdd491ee0e16ef75964ac26629 ~~ JapanColor2002Newspaper.icc ~~ Does not allow modification ~~ http://www.adobe.com/support/downloads/detail.jsp?ftpID=4074 +fb5d68cb58c6ad7e88249d65f6900740 ~~ bc377a42afee7f73f0b80e2ed6e0d18edbd4f8fd ~~ c0a6bdf31f9f2953b2f08a0c1734c892bc825f0fb17c604d420f7acf203a213b ~~ trebucbi.ttf~~ The EULA does not allow modification, reverse engineering etc. ~~ https://bugs.debian.org/298545#29 +fb7338392a7e06ed64c534f69f0c01f5 ~~ f90e8b542b222dff01c7e58a3347fbcf65e1a4c2 ~~ 314c8d5eaaf09d01bd39360870690f1426911cd2f9a60acc38f94b362e3b4b54 ~~ badge-93x20.png ~~ Could not be modified (variant from https://github.com/balupton/flattr-buttons.git) ~~ http://developers.flattr.net/api/policy/ +fce22382a573ac597fd2838d752eeb91 ~~ c67489df016f5da7cbc988c2668c3889166636e5 ~~ 67517f5fae665bff099374bca81f9f92edcdda3621ce5980d4feb14b9e603b4f ~~ networkredux.png ~~ Non free logo. ~~ http://www.imagemagick.org/discourse-server/viewtopic.php?f=3&t=24735&sid=00d5a91304948ce71a38e695d225e122 +fd00ed13dce8482c1516750fdb262dbc ~~ 1c9529c61616c36873fd55e48ef60b95e05b0bde ~~ f94ef89f8f127a018a024b022aadf4599daa9b322b815dfc53b9daa663dd78e7 ~~ valid-html40.gif~~ The valid w3c icons could not be modified. ~~ http://www.w3.org/QA/Tools/Icons +ff747b611498383c6692924a41e0a50a ~~ 18196bf74cac4f5f9c8079d4103efb6c707dbc9d ~~ 41c835b1ddc851f2b1facdd142a5847f58ac70a99c03d974ce6dede815731c09 ~~ VideoNTSC.icc ~~ Does not allow modification ~~ http://www.adobe.com/support/downloads/detail.jsp?ftpID=4074 diff --git a/data/cruft/rfc-whitelist b/data/cruft/rfc-whitelist new file mode 100644 index 0000000..34113ff --- /dev/null +++ b/data/cruft/rfc-whitelist @@ -0,0 +1,17 @@ +# regexp of know dual licensed rfc +# please use number of rfc for sorting +\Arfc\D?2629(?:\..*)?\Z +\Arfc\D?3492(?:\..*)?\Z +\Apunycode(?:\..*)?\Z +\Arfc\D?5215(?:\..*)?\Z +\Arfc\D?5864(?:\..*)?\Z + +# draft +\Adraft-ietf-cat-kerb-chg-password-\d+(?:\..*)?\Z +\Adraft-morgan-ident-ext-\d+(?:\..*)?\Z +\Adraft-riikonen-presence-attrs-\d+(?:\..*)?\Z +\Adraft-riikonen-silc-commands-\d+(?:\..*)?\Z +\Adraft-riikonen-silc-flags-payloads-\d+(?:\..*)?\Z +\Adraft-riikonen-silc-ke-auth-\d+(?:\..*)?\Z +\Adraft-riikonen-silc-pp-\d+(?:\..*)?\Z +\Adraft-riikonen-silc-spec-\d+(?:\..*)?\Z diff --git a/data/deb-format/extra-members b/data/deb-format/extra-members new file mode 100644 index 0000000..23d298f --- /dev/null +++ b/data/deb-format/extra-members @@ -0,0 +1,16 @@ +# List of extra members permitted in the .deb files +# +# Format is: +# <name> => <position> +# +# +# <position> is a 0-indexed position of where the extra member is +# expected. It can be "ANYWHERE" if the order is not relevant. Note +# despite of the value of <position>, any member appearing before the +# data.tar member MUST have a name starting with "_". If not Lintian +# will presume it is the control.tar or the data.tar member (depending +# on how early it occurs). It is impossible for any valid "2.0" deb +# file to have an extra member at position 0 (which is exclusively +# reserved for the "debian-binary" member) +# +# For Debian, no extra members are defined, so the file is empty atm. diff --git a/data/debhelper/add_ons.json b/data/debhelper/add_ons.json new file mode 100644 index 0000000..c202009 --- /dev/null +++ b/data/debhelper/add_ons.json @@ -0,0 +1,478 @@ +{ + "add_ons" : { + "acc" : { + "installed_by" : [ + "dh-acc" + ] + }, + "ada_library" : { + "installed_by" : [ + "dh-ada-library" + ] + }, + "apache2" : { + "installed_by" : [ + "apache2-dev" + ] + }, + "aspell_simple" : { + "installed_by" : [ + "dictionaries-common-dev" + ] + }, + "asterisk" : { + "installed_by" : [ + "asterisk-dev" + ] + }, + "autoreconf" : { + "installed_by" : [ + "dh-autoreconf" + ] + }, + "autotools_dev" : { + "installed_by" : [ + "autotools-dev" + ] + }, + "bash_completion" : { + "installed_by" : [ + "bash-completion" + ] + }, + "build_stamp" : { + "installed_by" : [ + "libdebhelper-perl" + ] + }, + "buildinfo" : { + "installed_by" : [ + "dh-buildinfo" + ] + }, + "cli" : { + "installed_by" : [ + "cli-common-dev" + ] + }, + "cli_nant" : { + "installed_by" : [ + "cli-common-dev" + ] + }, + "click" : { + "installed_by" : [ + "click-dev" + ] + }, + "cmake" : { + "installed_by" : [ + "dh-cmake" + ] + }, + "cme_upgrade" : { + "installed_by" : [ + "cme" + ] + }, + "config_package" : { + "installed_by" : [ + "config-package-dev" + ] + }, + "coq" : { + "installed_by" : [ + "dh-coq" + ] + }, + "cpack" : { + "installed_by" : [ + "dh-cmake" + ] + }, + "ctest" : { + "installed_by" : [ + "dh-cmake" + ] + }, + "d_i" : { + "installed_by" : [ + "dh-di" + ] + }, + "dist_zilla" : { + "installed_by" : [ + "dh-dist-zilla" + ] + }, + "dkms" : { + "installed_by" : [ + "dh-dkms" + ] + }, + "dwz" : { + "installed_by" : [ + "libdebhelper-perl" + ] + }, + "eclipse_helper" : { + "installed_by" : [ + "javahelper" + ] + }, + "elf_tools" : { + "installed_by" : [ + "libdebhelper-perl" + ] + }, + "elpa" : { + "installed_by" : [ + "dh-elpa" + ] + }, + "fortran_mod" : { + "installed_by" : [ + "dh-fortran-mod" + ] + }, + "germinate" : { + "installed_by" : [ + "germinate" + ] + }, + "gir" : { + "installed_by" : [ + "gobject-introspection" + ] + }, + "gnome" : { + "installed_by" : [ + "gnome-pkg-tools" + ] + }, + "golang" : { + "installed_by" : [ + "dh-golang" + ] + }, + "haskell" : { + "installed_by" : [ + "dh-haskell" + ] + }, + "installinitramfs" : { + "installed_by" : [ + "libdebhelper-perl" + ] + }, + "installnss" : { + "installed_by" : [ + "dh-nss" + ] + }, + "javahelper" : { + "installed_by" : [ + "javahelper" + ] + }, + "jh_maven_repo_helper" : { + "installed_by" : [ + "maven-repo-helper" + ] + }, + "kde" : { + "installed_by" : [ + "pkg-kde-tools" + ] + }, + "kf5" : { + "installed_by" : [ + "pkg-kde-tools" + ] + }, + "kodiaddon" : { + "installed_by" : [ + "kodi-addons-dev-common" + ] + }, + "libva" : { + "installed_by" : [ + "libva-dev" + ] + }, + "linktree" : { + "installed_by" : [ + "dh-linktree" + ] + }, + "lisp" : { + "installed_by" : [ + "dh-lisp" + ] + }, + "lua" : { + "installed_by" : [ + "dh-lua" + ] + }, + "maven_repo_helper" : { + "installed_by" : [ + "maven-repo-helper" + ] + }, + "mkdocs" : { + "installed_by" : [ + "mkdocs" + ] + }, + "nginx" : { + "installed_by" : [ + "nginx-dev" + ] + }, + "nodejs" : { + "installed_by" : [ + "dh-nodejs" + ] + }, + "nodejs_no_lerna" : { + "installed_by" : [ + "dh-nodejs" + ] + }, + "numpy3" : { + "installed_by" : [ + "python3-numpy" + ] + }, + "ocaml" : { + "installed_by" : [ + "dh-ocaml" + ] + }, + "octave" : { + "installed_by" : [ + "dh-octave" + ] + }, + "package_notes" : { + "installed_by" : [ + "dh-package-notes" + ] + }, + "perl6" : { + "installed_by" : [ + "dh-perl6" + ] + }, + "perl_dbi" : { + "installed_by" : [ + "libdbi-perl" + ] + }, + "perl_imager" : { + "installed_by" : [ + "libimager-perl" + ] + }, + "perl_openssl" : { + "installed_by" : [ + "perl-openssl-defaults" + ] + }, + "pgxs" : { + "installed_by" : [ + "postgresql-server-dev-all" + ] + }, + "pgxs_loop" : { + "installed_by" : [ + "postgresql-server-dev-all" + ] + }, + "php" : { + "installed_by" : [ + "dh-php" + ] + }, + "phpcomposer" : { + "installed_by" : [ + "pkg-php-tools" + ] + }, + "phppear" : { + "installed_by" : [ + "pkg-php-tools" + ] + }, + "pkgkde_symbolshelper" : { + "installed_by" : [ + "pkg-kde-tools" + ] + }, + "ppp" : { + "installed_by" : [ + "ppp-dev" + ] + }, + "pyppd" : { + "installed_by" : [ + "pyppd" + ] + }, + "pypy" : { + "installed_by" : [ + "dh-python" + ] + }, + "python2" : { + "installed_by" : [ + "dh-python" + ] + }, + "python3" : { + "installed_by" : [ + "dh-python" + ] + }, + "python_virtualenv" : { + "installed_by" : [ + "dh-virtualenv" + ] + }, + "qmlcdeps" : { + "installed_by" : [ + "pkg-kde-tools" + ] + }, + "quilt" : { + "installed_by" : [ + "quilt" + ] + }, + "raku" : { + "installed_by" : [ + "dh-raku" + ] + }, + "rebar" : { + "installed_by" : [ + "dh-rebar" + ] + }, + "root_sequence" : { + "installed_by" : [ + "libdebhelper-perl" + ] + }, + "ruby" : { + "installed_by" : [ + "gem2deb" + ] + }, + "runit" : { + "installed_by" : [ + "dh-runit" + ] + }, + "scour" : { + "installed_by" : [ + "scour" + ] + }, + "single_binary" : { + "installed_by" : [ + "libdebhelper-perl" + ] + }, + "sip3" : { + "installed_by" : [ + "python3-sip-dev" + ] + }, + "sodeps" : { + "installed_by" : [ + "pkg-kde-tools" + ] + }, + "sphinxdoc" : { + "installed_by" : [ + "sphinx-common" + ] + }, + "systemd" : { + "installed_by" : [ + "libdebhelper-perl" + ] + }, + "sysuser" : { + "installed_by" : [ + "dh-sysuser" + ] + }, + "tex" : { + "installed_by" : [ + "tex-common" + ] + }, + "uwsgi" : { + "installed_by" : [ + "uwsgi-dev" + ] + }, + "vdrplugin" : { + "installed_by" : [ + "vdr-dev" + ] + }, + "vignette" : { + "installed_by" : [ + "dh-r" + ] + }, + "vim_addon" : { + "installed_by" : [ + "dh-vim-addon" + ] + }, + "webext" : { + "installed_by" : [ + "mozilla-devscripts" + ] + }, + "xine" : { + "installed_by" : [ + "libxine2-dev" + ] + }, + "xml_core" : { + "installed_by" : [ + "xml-core" + ] + }, + "xsf" : { + "installed_by" : [ + "xserver-xorg-dev" + ] + }, + "xsp" : { + "installed_by" : [ + "dh-xsp" + ] + }, + "xul_ext" : { + "installed_by" : [ + "mozilla-devscripts" + ] + }, + "zathura" : { + "installed_by" : [ + "zathura-dev" + ] + } + }, + "preamble" : { + "cargo" : "add_ons", + "title" : "Debhelper Add-ons" + } +} diff --git a/data/debhelper/commands.json b/data/debhelper/commands.json new file mode 100644 index 0000000..ca21efa --- /dev/null +++ b/data/debhelper/commands.json @@ -0,0 +1,1173 @@ +{ + "commands" : { + "dh_acc" : { + "installed_by" : [ + "dh-acc" + ] + }, + "dh_ada_library" : { + "installed_by" : [ + "dh-ada-library" + ] + }, + "dh_apache2" : { + "installed_by" : [ + "apache2-dev" + ], + "uses_autoscript" : 1, + "uses_misc_depends" : 1 + }, + "dh_apparmor" : { + "installed_by" : [ + "dh-apparmor" + ], + "uses_autoscript" : 1 + }, + "dh_aspell-simple" : { + "installed_by" : [ + "dictionaries-common-dev" + ] + }, + "dh_assistant" : { + "installed_by" : [ + "debhelper" + ] + }, + "dh_asterisk" : { + "installed_by" : [ + "asterisk-dev" + ] + }, + "dh_auto_build" : { + "installed_by" : [ + "debhelper" + ] + }, + "dh_auto_build_nant" : { + "installed_by" : [ + "cli-common-dev" + ] + }, + "dh_auto_clean" : { + "installed_by" : [ + "debhelper" + ] + }, + "dh_auto_clean_nant" : { + "installed_by" : [ + "cli-common-dev" + ] + }, + "dh_auto_configure" : { + "installed_by" : [ + "debhelper" + ] + }, + "dh_auto_install" : { + "installed_by" : [ + "debhelper" + ] + }, + "dh_auto_test" : { + "installed_by" : [ + "debhelper" + ] + }, + "dh_autoreconf" : { + "installed_by" : [ + "dh-autoreconf" + ] + }, + "dh_autoreconf_clean" : { + "installed_by" : [ + "dh-autoreconf" + ] + }, + "dh_autotools-dev_restoreconfig" : { + "installed_by" : [ + "autotools-dev" + ] + }, + "dh_autotools-dev_updateconfig" : { + "installed_by" : [ + "autotools-dev" + ] + }, + "dh_bash-completion" : { + "installed_by" : [ + "bash-completion" + ] + }, + "dh_bugfiles" : { + "installed_by" : [ + "debhelper" + ] + }, + "dh_builddeb" : { + "installed_by" : [ + "debhelper" + ] + }, + "dh_buildinfo" : { + "installed_by" : [ + "dh-buildinfo" + ] + }, + "dh_clean" : { + "installed_by" : [ + "debhelper" + ] + }, + "dh_click" : { + "installed_by" : [ + "click-dev" + ], + "uses_autoscript" : 1 + }, + "dh_clideps" : { + "installed_by" : [ + "cli-common-dev" + ] + }, + "dh_clifixperms" : { + "installed_by" : [ + "cli-common-dev" + ] + }, + "dh_cligacpolicy" : { + "installed_by" : [ + "cli-common-dev" + ], + "uses_autoscript" : 1 + }, + "dh_clistrip" : { + "installed_by" : [ + "cli-common-dev" + ] + }, + "dh_cmake_install" : { + "installed_by" : [ + "dh-cmake" + ] + }, + "dh_cme_upgrade" : { + "installed_by" : [ + "cme" + ], + "uses_autoscript" : 1, + "uses_misc_depends" : 1 + }, + "dh_compress" : { + "installed_by" : [ + "debhelper" + ] + }, + "dh_configpackage" : { + "installed_by" : [ + "config-package-dev" + ], + "uses_autoscript" : 1 + }, + "dh_consoledata" : { + "installed_by" : [ + "dh-consoledata" + ], + "uses_autoscript" : 1 + }, + "dh_coq" : { + "installed_by" : [ + "dh-coq" + ] + }, + "dh_cpack_generate" : { + "installed_by" : [ + "dh-cmake" + ] + }, + "dh_cpack_install" : { + "installed_by" : [ + "dh-cmake" + ] + }, + "dh_cpack_substvars" : { + "installed_by" : [ + "dh-cmake" + ] + }, + "dh_ctest_build" : { + "installed_by" : [ + "dh-cmake" + ] + }, + "dh_ctest_clean" : { + "installed_by" : [ + "dh-cmake" + ] + }, + "dh_ctest_configure" : { + "installed_by" : [ + "dh-cmake" + ] + }, + "dh_ctest_start" : { + "installed_by" : [ + "dh-cmake" + ] + }, + "dh_ctest_submit" : { + "installed_by" : [ + "dh-cmake" + ] + }, + "dh_ctest_test" : { + "installed_by" : [ + "dh-cmake" + ] + }, + "dh_ctest_update" : { + "installed_by" : [ + "dh-cmake" + ] + }, + "dh_di_kernel_gencontrol" : { + "installed_by" : [ + "dh-di" + ] + }, + "dh_di_kernel_install" : { + "installed_by" : [ + "dh-di" + ] + }, + "dh_di_numbers" : { + "installed_by" : [ + "dh-di" + ] + }, + "dh_dist_zilla_origtar" : { + "installed_by" : [ + "dh-dist-zilla" + ] + }, + "dh_dkms" : { + "installed_by" : [ + "dh-dkms" + ], + "uses_autoscript" : 1, + "uses_misc_depends" : 1 + }, + "dh_doxygen" : { + "installed_by" : [ + "doxygen" + ] + }, + "dh_dwz" : { + "installed_by" : [ + "debhelper" + ] + }, + "dh_dzil_build" : { + "installed_by" : [ + "dh-dist-zilla" + ] + }, + "dh_dzil_clean" : { + "installed_by" : [ + "dh-dist-zilla" + ] + }, + "dh_elpa" : { + "installed_by" : [ + "dh-elpa" + ], + "uses_autoscript" : 1, + "uses_misc_depends" : 1 + }, + "dh_elpa_test" : { + "installed_by" : [ + "dh-elpa" + ] + }, + "dh_fixperms" : { + "installed_by" : [ + "debhelper" + ] + }, + "dh_fortran_mod" : { + "installed_by" : [ + "dh-fortran-mod" + ], + "uses_autoscript" : 1, + "uses_misc_depends" : 1 + }, + "dh_gencontrol" : { + "installed_by" : [ + "debhelper" + ], + "uses_misc_depends" : 1 + }, + "dh_germinate_clean" : { + "installed_by" : [ + "germinate" + ] + }, + "dh_germinate_metapackage" : { + "installed_by" : [ + "germinate" + ] + }, + "dh_girepository" : { + "installed_by" : [ + "gobject-introspection" + ] + }, + "dh_gnome" : { + "installed_by" : [ + "gnome-pkg-tools" + ] + }, + "dh_gnome_clean" : { + "installed_by" : [ + "gnome-pkg-tools" + ] + }, + "dh_gnustep" : { + "installed_by" : [ + "gnustep-make" + ] + }, + "dh_golang" : { + "installed_by" : [ + "dh-golang" + ] + }, + "dh_golang_autopkgtest" : { + "installed_by" : [ + "dh-golang" + ] + }, + "dh_gstscancodecs" : { + "installed_by" : [ + "libgstreamer1.0-dev" + ] + }, + "dh_haskell_blurbs" : { + "installed_by" : [ + "haskell-devscripts-minimal" + ] + }, + "dh_haskell_compiler" : { + "installed_by" : [ + "haskell-devscripts-minimal" + ] + }, + "dh_haskell_depends" : { + "installed_by" : [ + "haskell-devscripts-minimal" + ] + }, + "dh_haskell_depends_cabal" : { + "installed_by" : [ + "haskell-devscripts-minimal" + ] + }, + "dh_haskell_depends_haddock" : { + "installed_by" : [ + "haskell-devscripts-minimal" + ] + }, + "dh_haskell_depends_hugs" : { + "installed_by" : [ + "haskell-devscripts-minimal" + ] + }, + "dh_haskell_description" : { + "installed_by" : [ + "haskell-devscripts-minimal" + ] + }, + "dh_haskell_extra_depends_ghc" : { + "installed_by" : [ + "haskell-devscripts-minimal" + ] + }, + "dh_haskell_install_development_libs" : { + "installed_by" : [ + "haskell-devscripts-minimal" + ] + }, + "dh_haskell_install_ghc_registration" : { + "installed_by" : [ + "haskell-devscripts-minimal" + ] + }, + "dh_haskell_install_haddock" : { + "installed_by" : [ + "haskell-devscripts-minimal" + ] + }, + "dh_haskell_install_htmldocs" : { + "installed_by" : [ + "haskell-devscripts-minimal" + ] + }, + "dh_haskell_install_profiling_libs" : { + "installed_by" : [ + "haskell-devscripts-minimal" + ] + }, + "dh_haskell_provides" : { + "installed_by" : [ + "haskell-devscripts-minimal" + ] + }, + "dh_haskell_provides_ghc" : { + "installed_by" : [ + "haskell-devscripts-minimal" + ] + }, + "dh_haskell_recommends_documentation_references" : { + "installed_by" : [ + "haskell-devscripts-minimal" + ] + }, + "dh_haskell_shlibdeps" : { + "installed_by" : [ + "haskell-devscripts-minimal" + ] + }, + "dh_haskell_suggests" : { + "installed_by" : [ + "haskell-devscripts-minimal" + ] + }, + "dh_icons" : { + "installed_by" : [ + "debhelper" + ], + "uses_autoscript" : 1 + }, + "dh_install" : { + "installed_by" : [ + "debhelper" + ] + }, + "dh_installalternatives" : { + "installed_by" : [ + "debhelper" + ], + "uses_autoscript" : 1 + }, + "dh_installcatalogs" : { + "installed_by" : [ + "debhelper" + ], + "uses_autoscript" : 1, + "uses_misc_depends" : 1 + }, + "dh_installchangelogs" : { + "installed_by" : [ + "debhelper" + ] + }, + "dh_installcliframework" : { + "installed_by" : [ + "cli-common-dev" + ], + "uses_autoscript" : 1 + }, + "dh_installcligac" : { + "installed_by" : [ + "cli-common-dev" + ], + "uses_autoscript" : 1 + }, + "dh_installcron" : { + "installed_by" : [ + "debhelper" + ] + }, + "dh_installdeb" : { + "installed_by" : [ + "debhelper" + ], + "uses_autoscript" : 1 + }, + "dh_installdebconf" : { + "installed_by" : [ + "debhelper" + ], + "uses_autoscript" : 1, + "uses_misc_depends" : 1 + }, + "dh_installdirs" : { + "installed_by" : [ + "debhelper" + ] + }, + "dh_installdocs" : { + "installed_by" : [ + "debhelper" + ], + "uses_misc_depends" : 1 + }, + "dh_installemacsen" : { + "installed_by" : [ + "debhelper" + ], + "uses_autoscript" : 1 + }, + "dh_installexamples" : { + "installed_by" : [ + "debhelper" + ] + }, + "dh_installgsettings" : { + "installed_by" : [ + "debhelper" + ], + "uses_misc_depends" : 1 + }, + "dh_installifupdown" : { + "installed_by" : [ + "debhelper" + ] + }, + "dh_installinfo" : { + "installed_by" : [ + "debhelper" + ] + }, + "dh_installinit" : { + "installed_by" : [ + "debhelper" + ], + "uses_autoscript" : 1, + "uses_misc_depends" : 1 + }, + "dh_installinitramfs" : { + "installed_by" : [ + "debhelper" + ] + }, + "dh_installlogcheck" : { + "installed_by" : [ + "debhelper" + ] + }, + "dh_installlogrotate" : { + "installed_by" : [ + "debhelper" + ] + }, + "dh_installman" : { + "installed_by" : [ + "debhelper" + ] + }, + "dh_installmanpages" : { + "installed_by" : [ + "debhelper" + ] + }, + "dh_installmenu" : { + "installed_by" : [ + "debhelper" + ], + "uses_autoscript" : 1 + }, + "dh_installmime" : { + "installed_by" : [ + "debhelper" + ] + }, + "dh_installmodules" : { + "installed_by" : [ + "debhelper" + ], + "uses_autoscript" : 1 + }, + "dh_installnss" : { + "installed_by" : [ + "dh-nss" + ], + "uses_autoscript" : 1 + }, + "dh_installpam" : { + "installed_by" : [ + "debhelper" + ] + }, + "dh_installppp" : { + "installed_by" : [ + "debhelper" + ] + }, + "dh_installsystemd" : { + "installed_by" : [ + "debhelper" + ], + "uses_autoscript" : 1 + }, + "dh_installsystemduser" : { + "installed_by" : [ + "debhelper" + ], + "uses_autoscript" : 1, + "uses_misc_depends" : 1 + }, + "dh_installsysusers" : { + "installed_by" : [ + "debhelper" + ], + "uses_autoscript" : 1, + "uses_misc_depends" : 1 + }, + "dh_installtex" : { + "installed_by" : [ + "tex-common" + ], + "uses_autoscript" : 1, + "uses_misc_depends" : 1 + }, + "dh_installtmpfiles" : { + "installed_by" : [ + "debhelper" + ], + "uses_autoscript" : 1 + }, + "dh_installudev" : { + "installed_by" : [ + "debhelper" + ] + }, + "dh_installwm" : { + "installed_by" : [ + "debhelper" + ], + "uses_autoscript" : 1 + }, + "dh_installxfonts" : { + "installed_by" : [ + "debhelper" + ], + "uses_autoscript" : 1, + "uses_misc_depends" : 1 + }, + "dh_installxmlcatalogs" : { + "installed_by" : [ + "xml-core" + ], + "uses_autoscript" : 1, + "uses_misc_depends" : 1 + }, + "dh_installxsp" : { + "installed_by" : [ + "dh-xsp" + ], + "uses_autoscript" : 1 + }, + "dh_installyorick" : { + "installed_by" : [ + "yorick-dev" + ] + }, + "dh_kodiaddon_depends" : { + "installed_by" : [ + "kodi-addons-dev" + ] + }, + "dh_libva" : { + "installed_by" : [ + "libva-dev" + ], + "uses_misc_depends" : 1 + }, + "dh_link" : { + "installed_by" : [ + "debhelper" + ] + }, + "dh_linktree" : { + "installed_by" : [ + "dh-linktree" + ], + "uses_misc_depends" : 1 + }, + "dh_lintian" : { + "installed_by" : [ + "debhelper" + ] + }, + "dh_lisp" : { + "installed_by" : [ + "dh-lisp" + ], + "uses_misc_depends" : 1 + }, + "dh_listpackages" : { + "installed_by" : [ + "debhelper" + ] + }, + "dh_lua" : { + "installed_by" : [ + "dh-lua" + ] + }, + "dh_make" : { + "installed_by" : [ + "dh-make" + ] + }, + "dh_make_pgxs" : { + "installed_by" : [ + "postgresql-server-dev-all" + ] + }, + "dh_makeclilibs" : { + "installed_by" : [ + "cli-common-dev" + ] + }, + "dh_makefont" : { + "installed_by" : [ + "dh-make" + ], + "uses_misc_depends" : 1 + }, + "dh_makeshlibs" : { + "installed_by" : [ + "debhelper" + ] + }, + "dh_md5sums" : { + "installed_by" : [ + "debhelper" + ] + }, + "dh_missing" : { + "installed_by" : [ + "debhelper" + ] + }, + "dh_mkdocs" : { + "installed_by" : [ + "mkdocs" + ] + }, + "dh_movefiles" : { + "installed_by" : [ + "debhelper" + ] + }, + "dh_movelibkdeinit" : { + "installed_by" : [ + "pkg-kde-tools" + ] + }, + "dh_nginx" : { + "installed_by" : [ + "nginx-dev" + ], + "uses_autoscript" : 1, + "uses_misc_depends" : 1 + }, + "dh_nodejs_autodocs" : { + "installed_by" : [ + "dh-nodejs" + ] + }, + "dh_nodejs_substvars" : { + "installed_by" : [ + "dh-nodejs" + ] + }, + "dh_numpy3" : { + "installed_by" : [ + "python3-numpy" + ] + }, + "dh_ocaml" : { + "installed_by" : [ + "dh-ocaml" + ] + }, + "dh_ocamlclean" : { + "installed_by" : [ + "dh-ocaml" + ] + }, + "dh_ocamldoc" : { + "installed_by" : [ + "dh-ocaml" + ] + }, + "dh_ocamlinit" : { + "installed_by" : [ + "dh-ocaml" + ] + }, + "dh_octave_changelogs" : { + "installed_by" : [ + "dh-octave" + ] + }, + "dh_octave_check" : { + "installed_by" : [ + "dh-octave-autopkgtest" + ] + }, + "dh_octave_clean" : { + "installed_by" : [ + "dh-octave" + ] + }, + "dh_octave_examples" : { + "installed_by" : [ + "dh-octave" + ] + }, + "dh_octave_make" : { + "installed_by" : [ + "dh-octave" + ], + "uses_misc_depends" : 1 + }, + "dh_octave_substvar" : { + "installed_by" : [ + "dh-octave" + ] + }, + "dh_octave_version" : { + "installed_by" : [ + "dh-octave" + ] + }, + "dh_package_notes" : { + "installed_by" : [ + "dh-package-notes" + ] + }, + "dh_pdl" : { + "installed_by" : [ + "pdl" + ] + }, + "dh_perl" : { + "installed_by" : [ + "debhelper" + ] + }, + "dh_perl6_depsfile" : { + "installed_by" : [ + "dh-perl6" + ] + }, + "dh_perl6_maintscript" : { + "installed_by" : [ + "dh-perl6" + ], + "uses_autoscript" : 1 + }, + "dh_perl6_test" : { + "installed_by" : [ + "dh-perl6" + ] + }, + "dh_perl_dbi" : { + "installed_by" : [ + "libdbi-perl" + ] + }, + "dh_perl_imager" : { + "installed_by" : [ + "libimager-perl" + ] + }, + "dh_perl_openssl" : { + "installed_by" : [ + "perl-openssl-defaults" + ] + }, + "dh_pgxs_test" : { + "installed_by" : [ + "postgresql-server-dev-all" + ] + }, + "dh_php" : { + "installed_by" : [ + "dh-php" + ], + "uses_autoscript" : 1 + }, + "dh_phpcomposer" : { + "installed_by" : [ + "pkg-php-tools" + ] + }, + "dh_phppear" : { + "installed_by" : [ + "pkg-php-tools" + ], + "uses_misc_depends" : 1 + }, + "dh_pidgin" : { + "installed_by" : [ + "pidgin-dev" + ], + "uses_misc_depends" : 1 + }, + "dh_ppp" : { + "installed_by" : [ + "ppp-dev" + ], + "uses_misc_depends" : 1 + }, + "dh_prep" : { + "installed_by" : [ + "debhelper" + ] + }, + "dh_pyppd" : { + "installed_by" : [ + "pyppd" + ], + "uses_misc_depends" : 1 + }, + "dh_pypy" : { + "installed_by" : [ + "dh-python" + ], + "uses_autoscript" : 1 + }, + "dh_python2" : { + "installed_by" : [ + "dh-python" + ], + "uses_autoscript" : 1 + }, + "dh_python3" : { + "installed_by" : [ + "dh-python" + ], + "uses_autoscript" : 1 + }, + "dh_python3-ply" : { + "installed_by" : [ + "python3-ply" + ] + }, + "dh_qmlcdeps" : { + "installed_by" : [ + "pkg-kde-tools" + ] + }, + "dh_quilt_patch" : { + "installed_by" : [ + "quilt" + ] + }, + "dh_quilt_unpatch" : { + "installed_by" : [ + "quilt" + ] + }, + "dh_raku_build" : { + "installed_by" : [ + "dh-raku" + ] + }, + "dh_raku_install" : { + "installed_by" : [ + "dh-raku" + ] + }, + "dh_raku_test" : { + "installed_by" : [ + "dh-raku" + ] + }, + "dh_rebar" : { + "installed_by" : [ + "dh-rebar" + ] + }, + "dh_ruby" : { + "installed_by" : [ + "gem2deb" + ] + }, + "dh_ruby_fixdepends" : { + "installed_by" : [ + "gem2deb" + ] + }, + "dh_ruby_fixdocs" : { + "installed_by" : [ + "gem2deb" + ] + }, + "dh_runit" : { + "installed_by" : [ + "dh-runit" + ], + "uses_autoscript" : 1, + "uses_misc_depends" : 1 + }, + "dh_sameversiondep" : { + "installed_by" : [ + "pkg-kde-tools" + ] + }, + "dh_scour" : { + "installed_by" : [ + "scour" + ] + }, + "dh_shlibdeps" : { + "installed_by" : [ + "debhelper" + ] + }, + "dh_sip3" : { + "installed_by" : [ + "python3-sip-dev" + ] + }, + "dh_sodeps" : { + "installed_by" : [ + "pkg-kde-tools" + ] + }, + "dh_sphinxdoc" : { + "installed_by" : [ + "sphinx-common" + ] + }, + "dh_strip" : { + "installed_by" : [ + "debhelper" + ] + }, + "dh_strip_nondeterminism" : { + "installed_by" : [ + "dh-strip-nondeterminism" + ] + }, + "dh_systemd_enable" : { + "installed_by" : [ + "debhelper" + ], + "uses_autoscript" : 1 + }, + "dh_systemd_start" : { + "installed_by" : [ + "debhelper" + ], + "uses_autoscript" : 1 + }, + "dh_sysuser" : { + "installed_by" : [ + "dh-sysuser" + ], + "uses_autoscript" : 1, + "uses_misc_depends" : 1 + }, + "dh_testdir" : { + "installed_by" : [ + "debhelper" + ] + }, + "dh_testroot" : { + "installed_by" : [ + "debhelper" + ] + }, + "dh_ucf" : { + "installed_by" : [ + "debhelper" + ], + "uses_autoscript" : 1, + "uses_misc_depends" : 1 + }, + "dh_update_autotools_config" : { + "installed_by" : [ + "debhelper" + ] + }, + "dh_usrlocal" : { + "installed_by" : [ + "debhelper" + ], + "uses_autoscript" : 1 + }, + "dh_uwsgi" : { + "installed_by" : [ + "uwsgi-dev" + ] + }, + "dh_vagrant_plugin" : { + "installed_by" : [ + "vagrant" + ] + }, + "dh_vdrplugin_depends" : { + "installed_by" : [ + "vdr-dev" + ] + }, + "dh_vdrplugin_enable" : { + "installed_by" : [ + "vdr-dev" + ], + "uses_autoscript" : 1 + }, + "dh_vignette" : { + "installed_by" : [ + "dh-r" + ] + }, + "dh_vim-addon" : { + "installed_by" : [ + "dh-vim-addon" + ] + }, + "dh_virtualenv" : { + "installed_by" : [ + "dh-virtualenv" + ], + "uses_autoscript" : 1 + }, + "dh_webext" : { + "installed_by" : [ + "mozilla-devscripts" + ] + }, + "dh_xine" : { + "installed_by" : [ + "libxine2-dev" + ] + }, + "dh_xsf_substvars" : { + "installed_by" : [ + "xserver-xorg-dev" + ] + }, + "dh_xul-ext" : { + "installed_by" : [ + "mozilla-devscripts" + ] + }, + "dh_zathura" : { + "installed_by" : [ + "zathura-dev" + ], + "uses_misc_depends" : 1 + } + }, + "preamble" : { + "cargo" : "commands", + "title" : "Debhelper Commands" + } +} diff --git a/data/debhelper/compat-level b/data/debhelper/compat-level new file mode 100644 index 0000000..a1bce7e --- /dev/null +++ b/data/debhelper/compat-level @@ -0,0 +1,8 @@ +# warn if no versioned depend below this level +pedantic=10 +# warn (pedantic) if does not depend on this debhelper level +recommended=13 +# warn if below this level +deprecated=10 +# warn if equal or above +experimental=14 diff --git a/data/debhelper/filename-config-files b/data/debhelper/filename-config-files new file mode 100644 index 0000000..e861eb1 --- /dev/null +++ b/data/debhelper/filename-config-files @@ -0,0 +1,16 @@ +# This is a list of known debhelper config files which consist of a list +# of filenames. It's used for tests that look for problems in debhelper +# processing of file names, such as using glob characters that aren't +# guaranteed to work. + +dirs +docs +examples +info +install +links +manpages +mime +sgmlcatalogs +sharedmimeinfo +wm diff --git a/data/debhelper/maint_commands b/data/debhelper/maint_commands new file mode 100644 index 0000000..4af39e5 --- /dev/null +++ b/data/debhelper/maint_commands @@ -0,0 +1,44 @@ +# Generated by private/refresh-debhelper-data on 2021-11-22T01:13:36Z + +dh_apache2 +dh_apparmor +dh_cligacpolicy +dh_cme_upgrade +dh_configpackage +dh_consoledata +dh_dkms +dh_elpa +dh_fortran_mod +dh_icons +dh_installalternatives +dh_installcatalogs +dh_installcliframework +dh_installcligac +dh_installdeb +dh_installdebconf +dh_installemacsen +dh_installinit +dh_installmenu +dh_installmodules +dh_installsystemd +dh_installsystemduser +dh_installsysusers +dh_installtex +dh_installtmpfiles +dh_installwm +dh_installxfonts +dh_installxmlcatalogs +dh_installxsp +dh_perl6_maintscript +dh_php +dh_pypy +dh_python2 +dh_python3 +dh_runit +dh_systemd_enable +dh_systemd_start +dh_sysuser +dh_ucf +dh_usrlocal +dh_vdrplugin_enable +dh_virtualenv diff --git a/data/debhelper/miscDepends_commands b/data/debhelper/miscDepends_commands new file mode 100644 index 0000000..b0b2491 --- /dev/null +++ b/data/debhelper/miscDepends_commands @@ -0,0 +1,31 @@ +# This file is generated from private/refresh-debhelper-data. +# It was generated on 2021-11-19 20:32 + +dh_apache2 +dh_cme_upgrade +dh_dkms +dh_elpa +dh_fortran_mod +dh_installcatalogs +dh_installdebconf +dh_installdocs +dh_installgsettings +dh_installinit +dh_installsystemduser +dh_installsysusers +dh_installtex +dh_installxfonts +dh_installxmlcatalogs +dh_libva +dh_linktree +dh_lisp +dh_makefont +dh_octave_make +dh_phppear +dh_pidgin +dh_ppp +dh_pyppd +dh_runit +dh_sysuser +dh_ucf +dh_zathura diff --git a/data/debian-policy/releases.json b/data/debian-policy/releases.json new file mode 100644 index 0000000..293b8a0 --- /dev/null +++ b/data/debian-policy/releases.json @@ -0,0 +1,5958 @@ +{ + "preamble" : { + "cargo" : "releases", + "title" : "Debian Policy Releases" + }, + "releases" : [ + { + "author" : "Sean Whitton <spwhitton@spwhitton.name>", + "changes" : [ + "", + "debian-policy (4.6.1.1) unstable; urgency=medium", + "", + " * d/control: Add Homepage field (Closes: #1012879).", + " Thanks to Benjamin Drung for the suggestion.", + " * Upgrading checklist for 4.5.1: apply wording change from 07f1b39", + " (Closes: #1017095)." + ], + "closes" : [ + 1012879, + 1017095 + ], + "epoch" : 1660436014, + "timestamp" : "2022-08-14T00:13:34Z", + "version" : "4.6.1.1" + }, + { + "author" : "Sean Whitton <spwhitton@spwhitton.name>", + "changes" : [ + "", + "debian-policy (4.6.1.0) unstable; urgency=medium", + "", + " * Policy: Allow non-64-bit packages to install to /usr/lib64", + " Wording: Sean Whitton <spwhitton@spwhitton.name>", + " Seconded: Simon McVittie <smcv@debian.org>", + " Seconded: Russ Allbery <rra@debian.org>", + " Closes: #992601", + " * Policy: Define 'upstream' & document several version conventions", + " Wording: Russ Allbery <rra@debian.org>", + " Seconded: Sam Hartman <hartmans@debian.org>", + " Seconded: Sean Whitton <spwhitton@spwhitton.name>", + " Closes: #542288, #850729", + " * virtual-package-names-list: Add {default,}dbus-system-bus (Closes: #998063).", + " Thanks to Simon McVittie for the patch.", + " * Update 9.7.2 and 9.7.3 for package split of bin:mime-support into", + " bin:media-types and bin:mailcap (Closes: #1008480).", + " Thanks to Charles Plessy for the patch.", + "", + " * Fix several problems with footnote regarding the autobuilders and", + " build dependency alternatives (Closes: #999826).", + " Thanks to Johannes Schauer Marin Rodrigues for the report and patch.", + " * Use syntax highlighting for some source code blocks (Closes: #999566).", + " Thanks to Stéphane Blondon for the patch." + ], + "closes" : [ + 542288, + 850729, + 992601, + 998063, + 999566, + 999826, + 1008480 + ], + "epoch" : 1652292179, + "timestamp" : "2022-05-11T18:02:59Z", + "version" : "4.6.1.0" + }, + { + "author" : "Sean Whitton <spwhitton@spwhitton.name>", + "changes" : [ + "", + "debian-policy (4.6.0.1) unstable; urgency=medium", + "", + " * Fix header of upgrading checklist entry for last release (Closes: #992414).", + " Thanks to Scott Talbert and Drew Parsons for reporting the problem." + ], + "closes" : [ + 992414.0 + ], + "epoch" : 1629318110, + "timestamp" : "2021-08-18T20:21:50Z", + "version" : "4.6.0.1" + }, + { + "author" : "Sean Whitton <spwhitton@spwhitton.name>", + "changes" : [ + "", + "debian-policy (4.6.0.0) unstable; urgency=medium", + "", + " [ Sean Whitton ]", + " * Policy: Allow manpages to be included in the dependencies of packages", + " Wording: Helmut Grohne <helmut@subdivi.de>", + " Seconded: Russ Allbery <rra@debian.org>", + " Seconded: Christoph Berg <myon@debian.org>", + " Seconded: Sean Whitton <spwhitton@spwhitton.name>", + " Closes: #983657", + " * Policy: Support for subpaths in Vcs-Git", + " Wording: Russ Allbery <rra@debian.org>", + " Seconded: Sean Whitton <spwhitton@spwhitton.name>", + " Seconded: Mattia Rizzolo <mattia@debian.org>", + " Closes: #932696", + " * 4.4: Fix changelog format: needs an extra space before sign-off", + " (Closes: #976301).", + " Thanks to Anatoli Babenia for reporting the problem.", + " * autopkgtest: Update variable name ADTTMP->AUTOPKGTEST_TMP (Closes: #989581).", + " Thanks to Fabrice Bauzac-Stehly for reporting the problem.", + "", + " [ Russ Allbery ]", + " * Policy: Add new encouraged keyword, make keywords consistent", + " Wording: Russ Allbery <rra@debian.org>", + " Seconded: Sam Hartman <hartmans@debian.org>", + " Seconded: Sean Whitton <spwhitton@spwhitton.name>", + " Closes: #944920", + " * Clarify that no package may install files in /usr/lib64. The previous", + " wording implied this restriction only applied to 64-bit packages.", + " * Reserve the /etc/rcn.d directories for the init-system-helpers package", + " rather than the sysvinit package, reflecting a change already made in", + " the archive." + ], + "closes" : [ + 932696, + 944920, + 976301, + 983657, + 989581 + ], + "epoch" : 1629256002, + "timestamp" : "2021-08-18T03:06:42Z", + "version" : "4.6.0.0" + }, + { + "author" : "Sean Whitton <spwhitton@spwhitton.name>", + "changes" : [ + "", + "debian-policy (4.5.1.0) unstable; urgency=medium", + "", + " * Policy: Relax requirements on copying copyright notices into d/copyright", + " Wording: Sean Whitton <spwhitton@spwhitton.name>", + " Seconded: Scott Kitterman <debian@kitterman.com>", + " Seconded: Joerg Jaspert <joerg@debian.org>", + " Closes: #955005", + " * Policy: Forbid vendor-specific series files", + " Wording: Sean Whitton <spwhitton@spwhitton.name>", + " Seconded: gregor herrmann <gregoa@debian.org>", + " Seconded: Graham Inggs <ginggs@debian.org>", + " Closes: #959909", + " * Policy: Clarification about colons in version numbers", + " Wording: Sean Whitton <spwhitton@spwhitton.name>", + " Seconded: Mattia Rizzolo <mattia@debian.org>", + " Seconded: Holger Levsen <holger@layer-acht.org>", + " Closes: #971023", + " * Replace `/usr/share/package/copyright` -> `/usr/share/PACKAGE/copyright`.", + " Thanks to Guillem Jover for the suggestion.", + " * Fix manpage section in reference to systemd.unit(5) (Closes: #973491).", + " Thanks to Martin Schwarz for the report.", + " * Makefile: Always use UTC date (Closes: #974911).", + " Thanks to Vagrant Cascadian for the patch." + ], + "closes" : [ + 955005, + 959909, + 971023, + 973491, + 974911 + ], + "epoch" : 1605571543, + "timestamp" : "2020-11-17T00:05:43Z", + "version" : "4.5.1.0" + }, + { + "author" : "Sean Whitton <spwhitton@spwhitton.name>", + "changes" : [ + "", + "debian-policy (4.5.0.3) unstable; urgency=medium", + "", + " * Add a sample grep command for finding copyright notices in upstream", + " source code to an existing footnote in section 2.3.", + " * 3.2.1: tweak wording to avoid suggesting that Policy forbids using", + " Debian revisions for packages using a native source package format", + " (Closes: #953629).", + " Thank you to Ian Jackson for the suggestion.", + " * Switch back dh_linktree -> dh_sphinxdoc now that #658238 has been", + " resolved (Closes: #968664)", + " - Update substvars usage", + " - Drop linktree config", + " - Drop ${misc:Depends} -> ${linktree:Recommends} hack from d/rules.", + " We now just have ${sphinxdoc:Depends} in the Recommends: field." + ], + "closes" : [ + 953629, + 968664 + ], + "epoch" : 1597861491, + "timestamp" : "2020-08-19T18:24:51Z", + "version" : "4.5.0.3" + }, + { + "author" : "Sean Whitton <spwhitton@spwhitton.name>", + "changes" : [ + "", + "debian-policy (4.5.0.2) unstable; urgency=medium", + "", + " * Rebuild against newer libjs-sphinxdoc (Closes: #959005).", + " Thanks Gabriele Stilli for the report." + ], + "closes" : [ + 959005.0 + ], + "epoch" : 1588108818, + "timestamp" : "2020-04-28T21:20:18Z", + "version" : "4.5.0.2" + }, + { + "author" : "Sean Whitton <spwhitton@spwhitton.name>", + "changes" : [ + "", + "debian-policy (4.5.0.1) unstable; urgency=medium", + "", + " * Rename section \"Convenience copies of code\" -> \"Embedded code copies\"", + " (Closes: #955036).", + " * Use xelatex in Sphinx conf to deal with Unicode chars in input", + " (Closes: #955083).", + " - Add build-deps on texlive-xetex, fonts-freefont-otf, xindy." + ], + "closes" : [ + 955036, + 955083 + ], + "epoch" : 1585337678, + "timestamp" : "2020-03-27T19:34:38Z", + "version" : "4.5.0.1" + }, + { + "author" : "Sean Whitton <spwhitton@spwhitton.name>", + "changes" : [ + "", + "debian-policy (4.5.0.0) unstable; urgency=medium", + "", + " [ Russ Allbery ]", + " * Clarify the footnote explaining why packages should not depend on X", + " fonts. Thanks, Stephen Kitt.", + " * Fix error in Perl example for the gain root command. Thanks, Niels", + " Thykier. (Closes: #949007)", + "", + " [ Sean Whitton ]", + " * Policy: Packages including daemons should ship systemd units", + " Wording: Russ Allbery <rra@debian.org>", + " Seconded: Sean Whitton <spwhitton@spwhitton.name>", + " Seconded: Ansgar <ansgar@debian.org>", + " Closes: #941198", + " * Policy: New package usernames should begin with an underscore", + " Wording: Philipp Kern <pkern@debian.org>", + " Seconded: Sean Whitton <spwhitton@spwhitton.name>", + " Seconded: Russ Allbery <rra@debian.org>", + " Closes: #949390", + " * Policy: Revise init script policy in light of GR result", + " Wording: Russ Allbery <rra@debian.org>", + " Seconded: Sam Hartman <hartmans@debian.org>", + " Seconded: Sean Whitton <spwhitton@spwhitton.name>", + " Closes: #948115", + " - This change involved changing a number of Sphinx anchor names. This", + " may break some external links into Policy.", + " * Fix 'day-of week'.", + " Thanks to Jakub Wilk." + ], + "closes" : [ + 941198, + 948115, + 949007, + 949390 + ], + "epoch" : 1579549029, + "timestamp" : "2020-01-20T19:37:09Z", + "version" : "4.5.0.0" + }, + { + "author" : "Sean Whitton <spwhitton@spwhitton.name>", + "changes" : [ + "", + "debian-policy (4.4.1.2) unstable; urgency=medium", + "", + " [ Sean Whitton ]", + " * Policy: Drop implementation details of sysvinit runlevels", + " Wording: Ansgar <ansgar@debian.org>", + " Seconded: Russ Allbery <rra@debian.org>", + " Seconded: Sean Whitton <spwhitton@spwhitton.name>", + " Closes: #941194", + " See also #943583.", + " * Fix \"set -e\" extraneous whitespace (Closes: #943880).", + " Thanks Sven Joachim for the patch.", + " * Fix 'multple' typo (Closes: #944407).", + " Thanks Ansgar for the patch.", + " * Improve some phrasing in 7.8 (Closes: #944325).", + " Thank you to Nicholas D Steeves for pointing out the problem and Russ", + " Allbery for the new text.", + "", + " [ Russ Allbery ]", + " * Remove mention of the old Packaging Manual from the package", + " description. This is ancient history and no longer likely to be", + " helpful. Thanks, Holger Levsen. (Closes: #941835)", + " * Add missing close brackets to the examples in the Diversions", + " appendix. Thanks, Abou Al Montacir.", + " * Add explicit :manpage: markup to links to manual pages.", + " * Fix anchor syntax for s-signalingreboot section.", + " * Fix broken markup in a footnote about sponsored uploads. Thanks,", + " Guillem Jover. (Closes: #944332)" + ], + "closes" : [ + 941194, + 941835, + 943880, + 944325, + 944332, + 944407 + ], + "epoch" : 1575076152, + "timestamp" : "2019-11-30T01:09:12Z", + "version" : "4.4.1.2" + }, + { + "author" : "Sean Whitton <spwhitton@spwhitton.name>", + "changes" : [ + "", + "debian-policy (4.4.1.1) unstable; urgency=medium", + "", + " * Add /run/reboot-required change to the upgrading checklist", + " (Closes: #941475)." + ], + "closes" : [ + 941475.0 + ], + "epoch" : 1570112996, + "timestamp" : "2019-10-03T14:29:56Z", + "version" : "4.4.1.1" + }, + { + "author" : "Sean Whitton <spwhitton@spwhitton.name>", + "changes" : [ + "", + "debian-policy (4.4.1.0) unstable; urgency=medium", + "", + " * Policy: Only one Vcs-<type> field is permitted", + " Wording: Russ Allbery <rra@debian.org>", + " Seconded: Sean Whitton <spwhitton@spwhitton.name>", + " Seconded: Guillem Jover <guillem@debian.org>", + " Closes: #931975", + " * Policy: Document /run/reboot-required mechanism", + " Wording: Karl O. Pinc <kop@meme.com>", + " Seconded: Sean Whitton <spwhitton@spwhitton.name>", + " Seconded: Holger Levsen <holger@layer-acht.org>", + " Seconded: Russ Allbery <rra@debian.org>", + " Seconded: Simon McVittie <smcv@debian.org>", + " Closes: #919507", + " * Policy: doc-base now optional, not recommended", + " Wording: Sean Whitton <spwhitton@spwhitton.name>", + " Seconded: Russ Allbery <rra@debian.org>", + " Seconded: Ansgar Burchardt <ansgar@debian.org>", + " Closes: #910783", + " * Copyright format: state syntactical restrictions on Files: field", + " Wording: Nicolas Boulenguez <nicolas@debian.org>", + " Seconded: Sean Whitton <spwhitton@spwhitton.name>", + " Seconded: Russ Allbery <rra@debian.org>", + " Closes: #688481" + ], + "closes" : [ + 688481, + 910783, + 919507, + 931975 + ], + "epoch" : 1569780709, + "timestamp" : "2019-09-29T18:11:49Z", + "version" : "4.4.1.0" + }, + { + "author" : "Sean Whitton <spwhitton@spwhitton.name>", + "changes" : [ + "", + "debian-policy (4.4.0.1) unstable; urgency=medium", + "", + " * Rebuild against newer libjs-sphinxdoc (Closes: #932359).", + " Thanks Gabriele Stilli for the report.", + " * Clarify using more than one VCS-* field.", + " Thanks to Guillem Jover for reporting the problem and Russ Allbery for", + " the patch." + ], + "closes" : [ + 932359.0 + ], + "epoch" : 1563480069, + "timestamp" : "2019-07-18T20:01:09Z", + "version" : "4.4.0.1" + }, + { + "author" : "Sean Whitton <spwhitton@spwhitton.name>", + "changes" : [ + "", + "debian-policy (4.4.0.0) unstable; urgency=medium", + "", + " [ Sean Whitton ]", + " * Policy: Recommend use of dh", + " Wording: Russ Allbery <rra@debian.org>", + " Wording: Sean Whitton <spwhitton@spwhitton.name>", + " Seconded: Sam Hartman <hartmans@debian.org>", + " Closes: #930666", + " * Policy: Permit -b in Vcs-Hg as well as Vcs-Git", + " Wording: Chris Lamb <lamby@debian.org>", + " Seconded: Holger Levsen <holger@layer-acht.org>", + " Seconded: Sean Whitton <spwhitton@spwhitton.name>", + " Closes: #897217, #920355", + " * Policy: Document versioned Provides:", + " Wording: Dominic Hargreaves <dom@earth.li>", + " Seconded: Sean Whitton <spwhitton@spwhitton.name>", + " Seconded: gregor herrmann <gregoa@debian.org>", + " Closes: #761219", + " * virtual-package-names-list: Add logind, default-logind", + " Wording: Adam Borowski <kilobyte@angband.pl>", + " Seconded: Jonathan Nieder <jrnieder@gmail.com>", + " Seconded: Holger Levsen <holger@layer-acht.org>", + " Closes: #917431", + " * Add text to header of the virtual packages list describing the", + " \"(versioned)\" annotation.", + " * Fix reference to FHS section in Policy 9.1.2.", + " Thanks to Juuso \"Linda\" Lapinlampi for the patch.", + " (Closes: #922654)", + " * Process: Rewrite description of 'obsolete' usertag.", + " * Process: Add 'stalled' usertag.", + " * Add footnote to 2.3 with a list of licenses thought not to require the", + " copying of all copyright notices into the package's copyright file", + " (Closes: #928199).", + " This was based on discussion between myself and FTP team members.", + "", + " [ Russ Allbery ]", + " * Fix formatting of the debian_revision explanation in Policy 5.6.12.", + " Thanks to Emmanuel Arias for the patch." + ], + "closes" : [ + 761219, + 897217, + 917431, + 920355, + 922654, + 928199, + 930666 + ], + "epoch" : 1562510441, + "timestamp" : "2019-07-07T14:40:41Z", + "version" : "4.4.0.0" + }, + { + "author" : "Sean Whitton <spwhitton@spwhitton.name>", + "changes" : [ + "", + "debian-policy (4.3.0.3) unstable; urgency=medium", + "", + " * Add link to jenkins.debian.net build of Policy (Closes: #921963).", + " Thanks, Holger Levsen.", + " * Rebuild against newer libjs-sphinxdoc (Closes: #921889).", + " Thanks Gabriele Stilli for the report." + ], + "closes" : [ + 921889, + 921963 + ], + "epoch" : 1551311991, + "timestamp" : "2019-02-27T23:59:51Z", + "version" : "4.3.0.3" + }, + { + "author" : "Sean Whitton <spwhitton@spwhitton.name>", + "changes" : [ + "", + "debian-policy (4.3.0.2) unstable; urgency=medium", + "", + " * Rebuild against newer libjs-sphinxdoc (Closes: #921889).", + " Thanks Gabriele Stilli for the report." + ], + "closes" : [ + 921889.0 + ], + "epoch" : 1549757148, + "timestamp" : "2019-02-10T00:05:48Z", + "version" : "4.3.0.2" + }, + { + "author" : "Sean Whitton <spwhitton@spwhitton.name>", + "changes" : [ + "", + "debian-policy (4.3.0.1) unstable; urgency=medium", + "", + " * Correct heading in upgrading checklist \"Version 4.2.2\"->\"Version 4.3.0\"." + ], + "closes" : [], + "epoch" : 1545563464, + "timestamp" : "2018-12-23T11:11:04Z", + "version" : "4.3.0.1" + }, + { + "author" : "Sean Whitton <spwhitton@spwhitton.name>", + "changes" : [ + "", + "debian-policy (4.3.0.0) unstable; urgency=medium", + "", + " * Policy: Update recommendations for stripping binaries and shlibs", + " Wording: Sean Whitton <spwhitton@spwhitton.name>", + " Seconded: Russ Allbery <rra@debian.org>", + " Seconded: Niels Thykier <niels@thykier.net>", + " Closes: #188731", + " * Policy: Slightly relax when copyright information need be included verbatim", + " Wording: Sean Whitton <spwhitton@spwhitton.name>", + " Seconded: Holger Levsen <holger@layer-acht.org>", + " Seconded: Russ Allbery <rra@debian.org>", + " Closes: #912581", + " * Policy: Required targets must not write outside of the source package tree", + " Wording: Johannes Schauer <josch@debian.org>", + " Wording: Bill Allombert <ballombe@debian.org>", + " Seconded: Niels Thykier <niels@thykier.net>", + " Seconded: Holger Levsen <holger@layer-acht.org>", + " Closes: #845715", + " * Policy: Packages should not contain a non-default series file", + " Wording: Sean Whitton <spwhitton@spwhitton.name>", + " Seconded: Russ Allbery <rra@debian.org>", + " Seconded: gregor herrmann <gregoa@debian.org>", + " Closes: #850156", + " * virtual-package-names-list: Add dbus-session-bus, default-dbus-session-bus", + " Wording: Sean Whitton <spwhitton@spwhitton.name>", + " Seconded: Simon McVittie <smcv@debian.org>", + " Seconded: gregor herrmann <gregoa@debian.org>", + " Closes: #833401", + " * In a preexisting footnote, recommend passing -D to strip(1) when", + " stripping static libraries.", + " Thanks to Niels Thykier for the suggestion.", + " * Add references to 'next' branch in README.md.", + " * Convert virtual-package-names-list to YAML (Closes: #914383).", + " Thanks to Jonathan Dowland for the patch.", + " * Append missing '.git' to Vcs-Git." + ], + "closes" : [ + 188731, + 833401, + 845715, + 850156, + 912581, + 914383 + ], + "epoch" : 1545560275, + "timestamp" : "2018-12-23T10:17:55Z", + "version" : "4.3.0.0" + }, + { + "author" : "Sean Whitton <spwhitton@spwhitton.name>", + "changes" : [ + "", + "debian-policy (4.2.1.5) unstable; urgency=medium", + "", + " * Add references to 'next' branch in README.md.", + " * Replace a 'can' with a 'may' for readability in 7.7 (Closes: #824495).", + " Thanks to Santiago Vila for reporting the problem.", + " * Update location of sample init.d script (Closes: #913295).", + " Thanks to Dmitry Bogatov for the patch.", + " * Document in 1.1 that not all bugs are Policy violations (Closes: #913659).", + " Thanks to Ian Jackson for the patch." + ], + "closes" : [ + 824495, + 913295, + 913659 + ], + "epoch" : 1542472599, + "timestamp" : "2018-11-17T16:36:39Z", + "version" : "4.2.1.5" + }, + { + "author" : "Sean Whitton <spwhitton@spwhitton.name>", + "changes" : [ + "", + "debian-policy (4.2.1.4) unstable; urgency=medium", + "", + " * Increase ToC depth 3->4 (Closes: #912059)." + ], + "closes" : [ + 912059.0 + ], + "epoch" : 1540665059, + "timestamp" : "2018-10-27T18:30:59Z", + "version" : "4.2.1.4" + }, + { + "author" : "Sean Whitton <spwhitton@spwhitton.name>", + "changes" : [ + "", + "debian-policy (4.2.1.3) unstable; urgency=medium", + "", + " * Update URI to d-i internals manual (Closes: #906910).", + " Thanks to Holger Wansing for the patch.", + " * Crosslink and deduplicate 4.9 and 10.1.", + " These sections both include discussion of the verbosity of build logs", + " and compiler warnings.", + " * Add policy/definition.txt to .gitignore." + ], + "closes" : [ + 906910.0 + ], + "epoch" : 1540064179, + "timestamp" : "2018-10-20T19:36:19Z", + "version" : "4.2.1.3" + }, + { + "author" : "Sean Whitton <spwhitton@spwhitton.name>", + "changes" : [ + "", + "debian-policy (4.2.1.2) unstable; urgency=medium", + "", + " * README.md: drop mention of 'dbnpolicy' UNIX group, which has now been", + " deleted.", + " * Upgrading checklist: drop the word 'maximally', to match the change to", + " section 4.9 made in release 4.2.1.0.", + " * README.md: add steps to add a new language.", + " * Use Sphinx replacements to insert the version and date into index.rst,", + " rather than substituting it in during the build (Closes: #909079).", + " This means that .po files are invalidated slightly less frequently.", + " Thanks to Hideki Yamane for the patch.", + " * Rebuild to update Recommends: field (Closes: #910561)." + ], + "closes" : [ + 909079, + 910561 + ], + "epoch" : 1539120350, + "timestamp" : "2018-10-09T21:25:50Z", + "version" : "4.2.1.2" + }, + { + "author" : "Sean Whitton <spwhitton@spwhitton.name>", + "changes" : [ + "", + "debian-policy (4.2.1.1) unstable; urgency=medium", + "", + " [ Sean Whitton ]", + " * Drop stray colon in 4.9.", + " Thanks to Thorsten Glaser for pointing this out.", + " * New \"Seeking seconds for a patch\" section in README.md.", + " Ralf Treinen suggested recommending that those who propose patches", + " include word diffs and/or side-by-side diffs.", + " * README.md: remove a lot of outdated information, some wordsmithing,", + " and rearrangement to highlight opportunities for contribution.", + "", + " [ Russ Allbery ]", + " * Add a footnote warning that different SONAMEs of the same shared", + " library cannot always be made safely co-installable, but these", + " exceptions are complex and beyond what Policy can explain.", + " (Closes: #901437)" + ], + "closes" : [ + 901437.0 + ], + "epoch" : 1535920029, + "timestamp" : "2018-09-02T20:27:09Z", + "version" : "4.2.1.1" + }, + { + "author" : "Sean Whitton <spwhitton@spwhitton.name>", + "changes" : [ + "", + "debian-policy (4.2.1.0) unstable; urgency=medium", + "", + " * Policy & Perl Policy: /usr/bin/perl shebang 'must' -> 'should'", + " Wording: Russ Allbery <rra@debian.org>", + " Seconded: Jonathan Nieder <jrnieder@gmail.com>", + " Seconded: Dominic Hargreaves <dom@earth.li>", + " Seconded: Sean Whitton <spwhitton@spwhitton.name>", + " Closes: #906901", + " * Fix inconsistent wording in 4.9 by dropping the word 'maximally'", + " (Closes: #905251).", + " Thanks to several people who pointed out this issue, both in the BTS", + " and in person.", + "", + " * Demote libjs-sphinxdoc hard dependencies to recommendations by using", + " an override_dh_linktree stanza (Closes: #906139).", + " Thanks to Vagrant Cascadian and Sven Joachim for the report and Ian", + " Jackson for suggesting the fix.", + " * README.md improvements:", + " - Add references to salsa:dbnpolicy/policy-l10n-merge-requests-here", + " repo.", + " - Improve the description of the release process (Closes: #905909)", + " Thanks Osamu Aoki for the patch.", + " - Add a link to the new 'by-complexity' BTS view.", + " - Some other small fixes (Closes: #905696).", + " Thanks Helge Kreutzmann for pointing them out.", + " * Update and alphabetise lists of the Policy delegates in various places." + ], + "closes" : [ + 905251, + 905696, + 905909, + 906139, + 906901 + ], + "epoch" : 1535227554, + "timestamp" : "2018-08-25T20:05:54Z", + "version" : "4.2.1.0" + }, + { + "author" : "Sean Whitton <spwhitton@spwhitton.name>", + "changes" : [ + "", + "debian-policy (4.2.0.1) unstable; urgency=medium", + "", + " [ Hideki Yamane ]", + " * Partial translation of Policy Manual chs. 1--3 into Japanese.", + " - Add debian-policy-ja binary package.", + " * Infrastructure for translations.", + " - New build dependency on sphinx-intl.", + "", + " [ Sean Whitton ]", + " * Switch dh_sphinxdoc->dh_linktree.", + " dh_sphinxdoc gets confused by the use of sphinx-intl.", + " - New build dependency on dh-linktree.", + " * Bump copyright years in d/copyright.", + " * Refer to rST source, not SGML source, in d/copyright.", + " * Add section 1.6, \"Translations\".", + " * Add \"Translation\" subsection to README.md.", + "", + " [ Sean Whitton & Ian Jackson ]", + " * Simplify and rework Hideki's Makefile & dh_{auto_,}install changes." + ], + "closes" : [], + "epoch" : 1533295914, + "timestamp" : "2018-08-03T11:31:54Z", + "version" : "4.2.0.1" + }, + { + "author" : "Sean Whitton <spwhitton@spwhitton.name>", + "changes" : [ + "", + "debian-policy (4.2.0.0) unstable; urgency=medium", + "", + " * Policy: Standards-Version field is mandatory", + " Wording: Sean Whitton <spwhitton@spwhitton.name>", + " Seconded: Holger Levsen <holger@layer-acht.org>", + " Seconded: Bill Allombert <ballombe@debian.org>", + " Closes: #886258", + " * Policy: Builds should be verbose & 'terse' DEB_BUILD_OPTIONS flag", + " Wording: Sean Whitton <spwhitton@spwhitton.name>", + " Seconded: Andrey Rahmatullin <wrar@debian.org>", + " Seconded: David Bremner <bremner@debian.org>", + " Seconded: Ian Jackson <ijackson@chiark.greenend.org.uk>", + " Closes: #628515", + " * Policy: Required targets may attempt some network access", + " Wording: Sean Whitton <spwhitton@spwhitton.name>", + " Seconded: David Bremner <bremner@debian.org>", + " Seconded: Osamu Aoki <osamu@debian.org>", + " Seconded: Niels Thykier <niels@thykier.net>", + " Closes: #813471", + " * Policy: Installation of upstream release notes and changelogs", + " Wording: Sean Whitton <spwhitton@spwhitton.name>", + " Seconded: Holger Levsen <holger@layer-acht.org>", + " Seconded: Russ Allbery <rra@debian.org>", + " Seconded: David Bremner <bremner@debian.org>", + " Closes: #459427", + "", + " * Add a third paragraph to 1.3.3 encouraging the submission of patches", + " to document new techniques sooner rather than later, while making it", + " clear that updating the Policy Manual should never block making other", + " improvements to Debian.", + " * Tweak wording in a sentence in 1.1.", + " * Add a note to the README about why salsa merge requests are turned off.", + "", + " * Stop installing policy-1.html because Sphinx's singlehtml output is", + " too buggy at present (Closes: #873456, #876075, #879048).", + " See also #877367. Thanks to Paul Wise for switching the web mirrors", + " away from policy-1.html.", + "", + " * license-count: improve regex for some Creative Commons licenses.", + " Thanks Jonathan Dowland for the patch.", + " * Fix some indentation in ch-archive.rst.", + " Thanks Hideki Yamane for the patch." + ], + "closes" : [ + 459427, + 628515, + 813471, + 873456, + 876075, + 879048, + 886258 + ], + "epoch" : 1533174213, + "timestamp" : "2018-08-02T01:43:33Z", + "version" : "4.2.0.0" + }, + { + "author" : "Sean Whitton <spwhitton@spwhitton.name>", + "changes" : [ + "", + "debian-policy (4.1.5.0) unstable; urgency=medium", + "", + " * Policy: Update section 4.1, \"Standards conformance\"", + " Wording: Ian Jackson <ijackson@chiark.greenend.org.uk>", + " Seconded: Sean Whitton <spwhitton@spwhitton.name>", + " Seconded: Holger Levsen <holger@layer-acht.org>", + " Closes: #901160", + " * Policy: Require d-devel consultation for each epoch bump", + " Wording: Ian Jackson <ijackson@chiark.greenend.org.uk>", + " Seconded: Sean Whitton <spwhitton@spwhitton.name>", + " Seconded: Paul Gevers <elbrus@debian.org>", + " Closes: #891216", + " * Policy: Document Rules-Requires-Root", + " Wording: Niels Thykier <niels@thykier.net>", + " Wording: Guillem Jover <guillem@debian.org>", + " Wording: Sean Whitton <spwhitton@spwhitton.name>", + " Seconded: Paul Gevers <elbrus@debian.org>", + " Closes: #880920", + " * Policy: Update version of POSIX standard for shell scripts", + " Wording: Sean Whitton <spwhitton@spwhitton.name>", + " Seconded: Simon McVittie <smcv@debian.org>", + " Seconded: Julien Cristau <jcristau@debian.org>", + " Seconded: Gunnar Wolf <gwolf@debian.org>", + " Closes: #864615", + " * Policy: Update version of FHS from 2.3 to 3.0", + " Wording: Simon McVittie <smcv@debian.org>", + " Seconded: Sean Whitton <spwhitton@spwhitton.name>", + " Seconded: Julien Cristau <jcristau@debian.org>", + " Closes: #787816", + " * Add reference link to section 4.1 to section 5.6.11." + ], + "closes" : [ + 787816, + 864615, + 880920, + 891216, + 901160 + ], + "epoch" : 1530701350, + "timestamp" : "2018-07-04T10:49:10Z", + "version" : "4.1.5.0" + }, + { + "author" : "Sean Whitton <spwhitton@spwhitton.name>", + "changes" : [ + "", + "debian-policy (4.1.4.2) unstable; urgency=medium", + "", + " * Fix URL to the alioth lists service in footnote (Closes: #896749).", + " Thanks Martin Zobel-Helas for the report.", + " * Tidy up \"Authors and Maintainers\":", + " - Add subsections to separate the record of the document's history", + " from the description of how it is presently maintained", + " - Correct claims about the role of the manual's maintainers: the", + " Policy Editors actually do have editorial power, thanks to our", + " DPL delegation, but we further delegate this power to the", + " Policy Changes Process." + ], + "closes" : [ + 896749.0 + ], + "epoch" : 1528619533, + "timestamp" : "2018-06-10T08:32:13Z", + "version" : "4.1.4.2" + }, + { + "author" : "Sean Whitton <spwhitton@spwhitton.name>", + "changes" : [ + "", + "debian-policy (4.1.4.1) unstable; urgency=medium", + "", + " * Fix some errors in upgrading checklist.", + " Thanks to several people for noticing these.", + " Thanks to Jeremy Bicha for a patch.", + " * Soften wording in upgrading checklist for removal of get-orig-source", + " target.", + " Thanks Helmut Grohne for the new wording.", + " * Fix sample postinst in 9.1.2 to comply with new required permissions", + " for /usr/local (Closes: #895136).", + " Thanks to Niels Thykier for noticing the problem, and for the new", + " sample script.", + " - Reorder 9.1.2 so that details of the permissions requirement appear", + " before the sample postinst.", + " This ensures that the complexity of the sample postinst makes sense", + " to the reader." + ], + "closes" : [ + 895136.0 + ], + "epoch" : 1523117581, + "timestamp" : "2018-04-07T16:13:01Z", + "version" : "4.1.4.1" + }, + { + "author" : "Sean Whitton <spwhitton@spwhitton.name>", + "changes" : [ + "", + "debian-policy (4.1.4.0) unstable; urgency=medium", + "", + " [ Sean Whitton ]", + " * Policy: Drop get-orig-source rules target", + " Wording: Helmut Grohne <helmut@subdivi.de>", + " Seconded: Holger Levsen <holger@layer-acht.org>", + " Seconded: Niels Thykier <niels@thykier.net>", + " Closes: #515856", + " * Policy: Update required permissions for /usr/local", + " Wording: Santiago Vila <sanvila@unex.es>", + " Seconded: Don Armstrong <don@debian.org>", + " Seconded: Ian Jackson <ijackson@chiark.greenend.org.uk>", + " Seconded: Russ Allbery <rra@debian.org>", + " Closes: #299007", + " * Policy: Document debian/missing-sources", + " Wording: Sean Whitton <spwhitton@spwhitton.name>", + " Seconded: Holger Levsen <holger@layer-acht.org>", + " Seconded: Gunnar Wolf <gwolf@debian.org>", + " Closes: #742364", + " * Policy: Uniqueness of version numbers", + " Wording: Sean Whitton <spwhitton@spwhitton.name>", + " Seconded: Simon McVittie <smcv@debian.org>", + " Seconded: Holger Levsen <holger@layer-acht.org>", + " Closes: #881431", + " * Update recommendations dh_systemd_* -> dh_installsystemd (Closes: #889167).", + " Thanks Chris Lamb for the report.", + " * Fix some typos (Closes: #886890).", + " Thanks Sebastian Rasmussen for the patch.", + " * Fix some errors in shell script snippets caused by the rST conversion", + " script (Closes: #888437).", + " Thanks Yao Wei for the patch.", + " * Fix version of init-system-helpers required for `defaults-disabled`", + " option from 1.5.0 to 1.50.", + " Thanks to GengYu Rao for noting this on the debian-policy list.", + " * Fix indentation of description of the clean target (Closes: #889960).", + " Thanks Ferenc Wágner for the report.", + "", + " [ Jonathan Nieder ]", + " * Use default-mta instead of exim in dependency example (Closes: #892142).", + " Thanks to Paul Wise for the report." + ], + "closes" : [ + 299007, + 515856, + 742364, + 881431, + 886890, + 888437, + 889167, + 889960, + 892142 + ], + "epoch" : 1522944496, + "timestamp" : "2018-04-05T16:08:16Z", + "version" : "4.1.4.0" + }, + { + "author" : "Sean Whitton <spwhitton@spwhitton.name>", + "changes" : [ + "", + "debian-policy (4.1.3.0) unstable; urgency=medium", + "", + " [ Sean Whitton ]", + " * Policy: Add CC0-1.0 to common-licenses", + " Wording: Jeremy Bicha <jbicha@debian.org>", + " Seconded: Sean Whitton <spwhitton@spwhitton.name>", + " Seconded: Mattia Rizzolo <mattia@debian.org>", + " Seconded: Holger Levsen <holger@layer-acht.org>", + " Closes: #859649, #882628", + " * Policy: Clarify when Built-Using should be used", + " Wording: Sean Whitton <spwhitton@spwhitton.name>", + " Seconded: Russ Allbery <rra@debian.org>", + " Seconded: Jonathan Nieder <jrnieder@gmail.com>", + " Closes: #688251", + " * Policy: Use update-rc.d's defaults-disabled instead of DISABLED=yes", + " Wording: Sean Whitton <spwhitton@spwhitton.name>", + " Wording: Russ Allbery <rra@debian.org>", + " Seconded: Andreas Henriksson <andreas@fatal.se>", + " Closes: #522163, #601455, #661496", + " - Also explain how the local administrator can enable/disable", + " autostarting daemons using update-rc.d.", + " * Point Vcs-* fields at salsa.debian.org.", + " * README: update references & URIs alioth->salsa", + " * Maintainer field: \"Debian Policy List\"->\"Debian Policy Editors\"", + " To match our new group on salsa.debian.org.", + "", + " [ Russ Allbery ]", + " * Policy: Recommend that Vcs-* URLs provide confidentiality", + " Wording: Russ Allbery <rra@debian.org>", + " Seconded: Sean Whitton <spwhitton@spwhitton.name>", + " Seconded: Holger Levsen <holger@layer-acht.org>", + " Closes: #810381", + " * Policy: Clarify that programs may search PATH for editor and pager", + " Wording: Jonathan Nieder <jrnieder@gmail.com>", + " Seconded: Russ Allbery <rra@debian.org>", + " Seconded: Sean Whitton <spwhitton@spwhitton.name>", + " Closes: #880992", + " * Policy: Allow libc to install files in /lib64", + " Wording: Russ Allbery <rra@debian.org>", + " Seconded: Jonathan Nieder <jrnieder@gmail.com>", + " Seconded: Sean Whitton <spwhitton@spwhitton.name>", + " Closes: #885219", + " * Use the term 'synopsis' consistently in copyright-format. Thanks, Ben", + " Finney. (Closes: #874095)", + " * Fix various minor wording issues and add additional cross-references", + " in copyright-format. Thanks, Ben Finney. (Closes: #874090)", + " * Adapt tools/license-count to run against ftp-master metadata instead", + " of the Lintian lab, add patterns for CC0-1.0, and add some comments on", + " how to run this tool." + ], + "closes" : [ + 522163, + 601455, + 661496, + 688251, + 810381, + 859649, + 874090, + 874095, + 880992, + 882628, + 885219 + ], + "epoch" : 1514412835, + "timestamp" : "2017-12-27T22:13:55Z", + "version" : "4.1.3.0" + }, + { + "author" : "Sean Whitton <spwhitton@spwhitton.name>", + "changes" : [ + "", + "debian-policy (4.1.2.0) unstable; urgency=medium", + "", + " * Policy: /usr/bin/perl shebang 'should' -> 'must'", + " Wording: Sean Whitton <spwhitton@spwhitton.name>", + " Seconded: Dominic Hargreaves <dom@earth.li>", + " Seconded: Salvatore Bonaccorso <carnil@debian.org>", + " Seconded: Gunnar Wolf <gwolf@debian.org>", + " Seconded: Bill Allombert <ballombe@debian.org>", + " Seconded: Jonathan Nieder <jrnieder@gmail.com>", + " Seconded: Dominique Dumont <dod@debian.org>", + " Closes: #683495", + " * Policy: Update where private shared object files may be installed", + " Wording: Charles Plessy <plessy@debian.org>", + " Seconded: Sean Whitton <spwhitton@spwhitton.name>", + " Seconded: Mattia Rizzolo <mattia@debian.org>", + " Seconded: Simon McVittie <smcv@debian.org>", + " Closes: #636383", + " * Policy: Convention for naming packages with potentially offensive content", + " Wording: Ian Jackson <ijackson@chiark.greenend.org.uk>", + " Seconded: Sean Whitton <spwhitton@spwhitton.name>", + " Seconded: Gunnar Wolf <gwolf@debian.org>", + " Seconded: Iain R. Learmonth <irl@debian.org>", + " Closes: #882445", + " * Update links to other formats in 1.2 (Closes: #877674).", + " Thanks to Laura Arjona Reina for the patch.", + " * Fix duplication in upgrading checklist.", + " /nonexistent as the canonical home directory was listed under 4.1.1", + " and 4.1.0.", + " * Miscellaneous spelling fixes (Closes: #878523).", + " Thanks to Ville Skyttä for the patch.", + " * Drop workarounds in d/rules for the (reopened) dh_sphinxdoc bug #872863.", + " Thanks to Dmitry Shachnev for fixing the bug.", + " - Tighten build-dep on sphinx-common.", + " * Add a footnote documenting limitations on build-dependency", + " alternatives imposed by Debian's autobuilders (Closes: #614807).", + " Thanks to Sean Finney for the patch, and Simon McVittie for reviewing." + ], + "closes" : [ + 614807, + 636383, + 683495, + 877674, + 878523, + 882445 + ], + "epoch" : 1512080585, + "timestamp" : "2017-11-30T22:23:05Z", + "version" : "4.1.2.0" + }, + { + "author" : "Sean Whitton <spwhitton@spwhitton.name>", + "changes" : [ + "", + "debian-policy (4.1.1.1) unstable; urgency=medium", + "", + " * Fix some broken links in singlehtml output (Closes: #877573).", + " Thanks to Paul Wise for pointing out the problem." + ], + "closes" : [ + 877573.0 + ], + "epoch" : 1507090965, + "timestamp" : "2017-10-04T04:22:45Z", + "version" : "4.1.1.1" + }, + { + "author" : "Sean Whitton <spwhitton@spwhitton.name>", + "changes" : [ + "", + "debian-policy (4.1.1.0) unstable; urgency=medium", + "", + " [ Russ Allbery ]", + " * Add back missing parentheses around the man page section in man page", + " references in the Policy manual, lost in the conversion to", + " reStructuredText. Thanks, Daniel Shahaf.", + " * Revert the contents of the policy.html directory to the multi-page", + " HTML output. (Closes: #872895)", + " * Move the single-page HTML output to policy-1.html, matching the", + " previous file name, and add the supporting _images and _static", + " directories to /usr/share/doc/debian-policy.", + " * Remove the stray policy.html.tar.gz file from the built package.", + " (Closes: #872896)", + " * Simplify the build rules for generating policy.html.", + " * Remove some stray build rules left over from DocBook Policy.", + " * Restructure the document to ensure proper section numbering in info", + " and PDF output except for the appendices. The appendix numbering", + " will require a Sphinx change. (Closes: #872893, #872950)", + " * Rename the info document to debian-policy.info to make it less", + " generic, and update the PNG file names accordingly. (Closes: #872900)", + " * Reformat the shared libraries chapter (8) to move footnotes to the end", + " of the section of their references and use more succinct", + " reStructuredText syntax. Fix some errors in the shlibs syntax and", + " examples introduced by the conversion, and missing newlines in the", + " footnote illustrating alternative templates that were lost in the", + " DocBook translation.", + " * Add a footnote documenting a (complex) command that returns the Debian", + " package name for a shared library. Thanks, Jakub Wilk and Julien", + " Cristau. (Closes: #661928)", + " * Add build dependency on latexmk. (Closes: #873125)", + "", + " [ Sean Whitton ]", + " * Policy: debian/changelog must exist in source packages", + " Wording: Sean Whitton <spwhitton@spwhitton.name>", + " Seconded: Jonathan Nieder <jrnieder@gmail.com>", + " Seconded: Russ Allbery <rra@debian.org>", + " Seconded: Mattia Rizzolo <mattia@debian.org>", + " Closes: #683222", + " * Policy: /nonexistent is the canonical non-existent home directory", + " Wording: Sean Whitton <spwhitton@spwhitton.name>", + " Seconded: Russ Allbery <rra@debian.org>", + " Seconded: David Bremner <bremner@debian.org>", + " Closes: #679751", + " * Policy: Correct the description of Testsuite: field", + " Wording: Sean Whitton <spwhitton@spwhitton.name>", + " Seconded: Russ Allbery <rra@debian.org>", + " Seconded: gregor herrmann <gregoa@debian.org>", + " Closes: #870915", + " Thanks to Ondřej Nový for pointing out the problem.", + " * Fix a typo in 4.1.0 upgrading checklist (Closes: #873819).", + " Thanks, Martin Kepplinger.", + " * Add missing line breaks in summary of the ways in which maintainer", + " scripts may be called (Closes: #874411).", + " Thanks Sébastian Villemot for reporting the issue, and for the patch.", + " * Drop workarounds for dh_sphinxdoc's lack of support for singlehtml.", + " Thanks Dmitry Shachnev for the new support in dh_sphinxdoc.", + " - Tighten build-dep on sphinx-common." + ], + "closes" : [ + 661928, + 679751, + 683222, + 870915, + 872893, + 872895, + 872896, + 872900, + 872950, + 873125, + 873819, + 874411 + ], + "epoch" : 1506630466, + "timestamp" : "2017-09-28T20:27:46Z", + "version" : "4.1.1.0" + }, + { + "author" : "Sean Whitton <spwhitton@spwhitton.name>", + "changes" : [ + "", + "debian-policy (4.1.0.0) unstable; urgency=medium", + "", + " [ Sean Whitton ]", + " * Policy: Packages should build reproducibly", + " Wording: Sean Whitton <spwhitton@spwhitton.name>", + " Seconded: Holger Levsen <holger@layer-acht.org>", + " Seconded: Ondrej Novy <novy@ondrej.org>", + " Seconded: Russ Allbery <rra@debian.org>", + " Seconded: Ximin Luo <infinity0@debian.org>", + " Seconded: gregor herrmann <gregoa@debian.org>", + " Closes: #844431", + " * Policy: Restrictions on the use of /lib64/ and /usr/lib64/", + " Wording: Bill Allombert <ballombe@debian.org>", + " Seconded: Niels Thykier <niels@thykier.net>", + " Seconded: Sean Whitton <spwhitton@spwhitton.name>", + " Closes: #630174", + " * Policy: Clarify how `x-terminal-emulator -e` must behave", + " Wording: Jonathan Nieder <jrnieder@gmail.com>", + " Seconded: Russ Allbery <rra@debian.org>", + " Seconded: Sean Whitton <spwhitton@spwhitton.name>", + " Closes: #648271", + " * Fix a singular/plural error in 9.6.", + " Thanks to Didier Raboud for pointing out the problem.", + " * Improve release process documentation in README.md.", + " * Policy changes process:", + " - Deprecate usage of the 'issue' usertag", + " It is usually very clear whether an issue is a policy matter, so bugs", + " can be simply closed, or moved to the 'discussion' phase.", + " In the rare case that it's not clear whether the bug is a policy matter,", + " it can remain unclassified, or be tagged 'moreinfo' (see below).", + " - Add policy-specific usage for the 'moreinfo' tag.", + " * tools/policy-bug-report:", + " - Enhance to fetch bugs that have a given usertag or combination of", + " usertags", + " - Improve the lists of bugs generated, for posting to Planet Debian.", + " * Add convention to upgrading checklist for indicating that a policy", + " requirement is covered by Lintian.", + "", + " [ Russ Allbery ]", + " * Policy: Recommend including the upstream signing key", + " Wording: Russ Allbery <rra@debian.org>", + " Seconded: Daniel Kahn Gillmor <dkg@fifthhorseman.net>", + " Seconded: Jonathan Nieder <jrnieder@gmail.com>", + " Seconded: Didier 'OdyX' Raboud <odyx@debian.org>", + " Closes: #732445", + " * Policy: Clearly allow non-default alternative non-free dependencies", + " Wording: Russ Allbery <rra@debian.org>", + " Seconded: Simon McVittie <smcv@debian.org>", + " Seconded: Sean Whitton <spwhitton@spwhitton.name>", + " Closes: #587279", + "", + " [ Russ Allbery & Sean Whitton ]", + " * Convert the source of the Debian Policy Manual to reStructuredText,", + " built using the Sphinx toolchain.", + " Many thanks to Hideki Yamane <henrich@debian.or.jp> for the conversion", + " scripts, and pushing the project forward.", + " Thanks to David Bremner <bremner@debian.org> for help proofreading the", + " output.", + " - Drop PostScript output." + ], + "closes" : [ + 587279, + 630174, + 648271, + 732445, + 844431 + ], + "epoch" : 1503350262, + "timestamp" : "2017-08-21T21:17:42Z", + "version" : "4.1.0.0" + }, + { + "author" : "Sean Whitton <spwhitton@spwhitton.name>", + "changes" : [ + "", + "debian-policy (4.0.1.0) unstable; urgency=medium", + "", + " [ Russ Allbery ]", + " * Policy: Overhaul priorities, deprecate extra", + " Wording: Russ Allbery <rra@debian.org>", + " Seconded: Niels Thykier <niels@thykier.net>", + " Seconded: Andreas Henriksson <andreas@fatal.se>", + " Seconded: Ansgar Burchardt <ansgar@debian.org>", + " Closes: #758234, #759260, #660249, #196367", + " * Policy: Clarify prohibition on depending on environment variables", + " Wording: Russ Allbery <rra@debian.org>", + " Seconded: Simon McVittie <smcv@debian.org>", + " Seconded: Niels Thykier <niels@thykier.net>", + " Closes: #640263", + "", + " [ Sean Whitton ]", + " * Policy: Disambiguate \"original authors\" in 12.5", + " Wording: Jonathan Nieder <jrnieder@gmail.com>", + " Seconded: Russ Allbery <rra@debian.org>", + " Seconded: David Bremner <bremner@debian.org>", + " Seconded: Jonas Smedegaard <dr@jones.dk>", + " Closes: #678607", + " * Policy: Document Testsuite: field", + " Wording: Charles Plessy <plessy@debian.org>", + " Seconded: Antonio Terceiro <terceiro@debian.org>", + " Seconded: Sean Whitton <spwhitton@spwhitton.name>", + " Seconded: David Bremner <bremner@debian.org>", + " Closes: #758124", + " * Policy: Require calling ldconfig by means of triggers", + " Wording: Niels Thykier <niels@thykier.net>", + " Seconded: Andreas Henriksson <andreas@fatal.se>", + " Seconded: Sean Whitton <spwhitton@spwhitton.name>", + " Seconded: David Bremner <bremner@debian.org>", + " Closes: #822430", + " * Policy: Make section 9 agnostic between Debian's init systems", + " Wording: Andreas Henriksson <andreas@fatal.se>", + " Seconded: Andrey Rahmatullin <wrar@debian.org>", + " Seconded: Martin Pitt <mpitt@debian.org>", + " Seconded: Holger Levsen <holger@layer-acht.org>", + " Seconded: gregor herrmann <gregoa@debian.org>", + " Seconded: Sean Whitton <spwhitton@spwhitton.name>", + " Seconded: Russ Allbery <rra@debian.org>", + " Closes: #835520", + " * Policy: Packages may not install both a desktop entry and a menu entry", + " Wording: Sean Whitton <spwhitton@spwhitton.name>", + " Seconded: Philip Hands <phil@hands.com>", + " Seconded: Didier 'OdyX' Raboud <odyx@debian.org>", + " Seconded: David Bremner <bremner@debian.org>", + " Closes: #839172", + " * Convert Process.md to an appendix to Policy itself.", + " - Update link in \"Authors and Maintainers\" to point to this new", + " appendix (Closes: #866192).", + " * Incorporate Margarita Manterola's maintscript flowcharts as a new", + " appendix (Closes: #485776).", + " Many thanks to David Bremner for help importing the images to docbook.", + " - Add a footnote to 6.6 linking to the new appendix.", + " * Update first paragraph of Appendix A to note that the final three", + " appendices (the policy changes process and the upgrading checklist)", + " were not taken from the Packaging Manual.", + " * Add a footnote linking to the REJECT-FAQ (Closes: #849853).", + " * Note that the debian/rules clean target is useless for removing files", + " not compatible with the DFSG (Closes: #849851).", + " * Add 'javascript', 'rust' archive sections (Closes: #867308).", + " * Drop remark that systems with only required packages installed are", + " \"probably unusable\", and add a paragraph break. (Closes: #589671)." + ], + "closes" : [ + 196367, + 485776, + 589671, + 640263, + 660249, + 678607, + 758124, + 758234, + 759260, + 822430, + 835520, + 839172, + 849851, + 849853, + 866192, + 867308 + ], + "epoch" : 1501984067, + "timestamp" : "2017-08-06T01:47:47Z", + "version" : "4.0.1.0" + }, + { + "author" : "Russ Allbery <rra@debian.org>", + "changes" : [ + "", + "debian-policy (4.0.0.4) unstable; urgency=medium", + "", + " * Fix URLs to Policy documents. Policy previously used the full URL as", + " the link but a partial URL as anchor text, and then sometimes added", + " the full URL in parentheses. The result was very ugly in the text", + " version. Replace that style with just the full URL as anchor text for", + " a link to that URL, which is not ideal for HTML output but produces", + " reasonable results for both HTML and text.", + " * Extensive reformatting of the maintainer script section.", + " - Use <cmdsynopsis> in the summary of how maintainer scripts are", + " called, with a single <term>. This avoids gluing all the command", + " summaries together with commas. The output in text is radically", + " better; HTML has some font issues, but isn't awful.", + " - Avoid trailing newlines in <screen> examples, which produce extra", + " whitespace in text and HTML output.", + " - Use different numeration methods at different levels of the nested", + " ordered lists and ensure there is some introductory text for each", + " list element to avoid awkward formatting.", + " * Convert many of the <screen> tags in Policy to </programlisting> since", + " the semantics are slightly more correct.", + " * Remove the newline before </screen> or </programlisting> end tags,", + " since it produces an extraneous and distracting blank line in both", + " text and HTML output.", + " * Change the mapping of Perl module names to Debian package names in", + " the Perl Policy from a verbatim block to a table.", + " * Change the list of cron directories from a verbatim block to a list." + ], + "closes" : [], + "epoch" : 1498448067, + "timestamp" : "2017-06-26T03:34:27Z", + "version" : "4.0.0.4" + }, + { + "author" : "Russ Allbery <rra@debian.org>", + "changes" : [ + "", + "debian-policy (4.0.0.3) unstable; urgency=medium", + "", + " [ Sean Whitton ]", + " * Fix typo 'the' -> 'they' in upgrading checklist (Closes: #865685).", + " Thanks Sven Joachim for the report.", + "", + " [ Russ Allbery ]", + " * Move the autopkgtest, copyright-format, and debconf_specification", + " source files to the top-level directory and the debconf_spec/include", + " files to a debconf directory. Simplify the build system to eliminate", + " recursive make, reuse the same XML version file for all files, and use", + " the same method of embedding a version in Markdown output for all", + " files.", + " * Fix dependencies so that version.xml is generated before XML", + " validation is done on XML source files.", + " * Move README.shlibdeps and libc6-migration.txt to a new historical", + " subdirectory and add a README explaining that the files in this", + " directory are of historical interest only and are not included in the", + " debian-policy binary package." + ], + "closes" : [ + 865685.0 + ], + "epoch" : 1498338679, + "timestamp" : "2017-06-24T21:11:19Z", + "version" : "4.0.0.3" + }, + { + "author" : "Russ Allbery <rra@debian.org>", + "changes" : [ + "", + "debian-policy (4.0.0.2) unstable; urgency=low", + "", + " [ Sean Whitton ]", + " * Update list of Policy Editors in various places.", + " See https://lists.debian.org/debian-devel-announce/2017/06/msg00005.html", + "", + " [ Russ Allbery ]", + " * Remove mention of the libc6 migration paper from the package long", + " description. This is no longer shipped in the debian-policy package." + ], + "closes" : [], + "epoch" : 1497931108, + "timestamp" : "2017-06-20T03:58:28Z", + "version" : "4.0.0.2" + }, + { + "author" : "Russ Allbery <rra@debian.org>", + "changes" : [ + "", + "debian-policy (4.0.0.1) unstable; urgency=low", + "", + " * Upload to unstable.", + " * Clarify the conflict policy between /path and /usr/path by adding the", + " leading slash in front of the first path. Thanks, Ferenc Wágner.", + " * Change http URLs to https for every resource available over https.", + " * Replace broken CPAN URL in the Perl policy with the current URL, and", + " turn this into an in-line link rather than a footnote with the full", + " URL. This hides the URL in the text output, but it's not horribly", + " important for the text version and easy to find with a search.", + " * Fix formatting of the list of shlibs and symbol file locations. These", + " were mistakenly converted to itemized lists instead of variable lists", + " during the DocBook conversion, which produced inferior output.", + " * Use UTF-8 instead of ISO-8859-1 as the character set for the text", + " versions of policy documents.", + " * Further standardize author and copyright notices.", + " - Add the notice from the main document that the copyright notices are", + " incomplete to the other documents with copyright notices.", + " - Add the Debian Policy Mailing List as an author of the debconf", + " specification.", + " - Replace (incorrect) Software in the Public Interest copyrights with", + " copyright notices for the original authors.", + " - Standardize capitalization of Debian Policy Mailing List in notices.", + " - Update copyright notices in debian/copyright.", + " * Add a full copy of the BSD license without advertising clause to the", + " <legalinfo> section of the debconf specification, instead of just a", + " reference to it.", + " * Update the GPL license statements to the current recommended form,", + " which doesn't include a street address for the FSF. Use all-caps for", + " the warranty disclaimer just in case it matters. Link to the general", + " FSF license page to make it easier to find the GPLv2, which is", + " technically the license under which these documents are distributed,", + " even if the GPLv3 may be used if desired.", + " * Completely rewrite the build system to use debhelper.", + " - Remove all hand-rolled package build rules and let debhelper do the", + " package construction.", + " - Remove gzip compression from the main build and let debhelper handle", + " compression of text files. This allows debhelper to control the", + " gzip flags and do whatever is correct for reproducible builds.", + " - The top-level Makefile now has conventional all and install targets", + " that build all documents and would install them (not that anyone is", + " likely to use the install target other than the packaging).", + " - Get the document publication dates from debian/changelog instead of", + " the current date for more reproducible builds.", + " - Do xmllint validation of the copyright-format and debconf", + " specification documents as well.", + " - Remove a bunch of old leftovers from the clean and distclean targets", + " and make distclean identical to clean. Stop cleaning editor", + " autosave files and patch droppings (this can be destructive).", + " - Move all doc-base files into the debian packaging directory.", + " * Restructure the command list in the debconf specification document to", + " pass xmllint, which didn't like including the body of an itemizedlist", + " as an XML entity.", + " * Add missing release date to the 4.0.0 upgrading-checklist entry.", + " * Fix tools/policy-bug-report to not fail when bug lists are empty and", + " to ignore closed bugs.", + " * Don't delete virtual-package-names-list.txt during make distclean.", + " * Make distclean depend on clean to remove stamp-* files.", + " * Update Standards-Version of the debian-policy package itself." + ], + "closes" : [], + "epoch" : 1497839268, + "timestamp" : "2017-06-19T02:27:48Z", + "version" : "4.0.0.1" + }, + { + "author" : "Russ Allbery <rra@debian.org>", + "changes" : [ + "", + "debian-policy (4.0.0.0) experimental; urgency=low", + "", + " [ Andreas Barth ]", + " * Policy: Add the MPLs to /usr/share/common-licenses", + " Wording: Charles Plessy <plessy@debian.org>", + " Seconded: Russ Allbery <rra@debian.org>", + " Seconded: Andrey Rahmatullin <wrar@debian.org>", + " Closes: #768292", + " * Policy: [5.6.12] forbid colons in package version numbers", + " Wording: Charles Plessy <plessy@debian.org>", + " Seconded: Didier 'OdyX' Raboud <odyx@debian.org>", + " Seconded: Sam Hartman <hartmans@debian.org>", + " Thanks: Jakub Wilk <jwilk@debian.org>", + " Closes: #792853", + " * Policy: [4.3] Update config.guess and config.sub during the build", + " Wording: Bill Allombert <ballombe@debian.org>", + " Seconded: Niels Thykier <niels@thykier.net>", + " Seconded: Andreas Barth <aba@ayous.org>", + " Closes: #746514", + " * Spelling fixes, thanks to Martin A. Brown. Closes: #820197", + "", + " [ Russ Allbery ]", + " * Policy: [10.9] Don't contact base-passwd maintainer for dynamic users", + " Wording: Colin Watson <cjwatson@debian.org>", + " Seconded: Russ Allbery <rra@debian.org>", + " Seconded: Didier 'OdyX' Raboud <odyx@debian.org>", + " Seconded: gregor herrmann <gregoa@debian.org>", + " Closes: #841877", + " * Policy: Document Build-Depends-Arch and Build-Conflicts-Arch", + " Wording: Johannes Schauer <josch@debian.org>", + " Seconded: Stuart Prescott <stuart@debian.org>", + " Seconded: Russ Allbery <rra@debian.org>", + " Closes: #823910", + " * Policy: Add nodoc tag to DEB_BUILD_OPTIONS", + " Wording: Russ Allbery <rra@debian.org>", + " Seconded: Johannes Schauer <j.schauer@email.de>", + " Seconded: Charles Plessy <plessy@debian.org>", + " Seconded: Andrey Rahmatullin <wrar@debian.org>", + " Closes: #759186", + " * Policy: Prohibit file conflicts between /bin and /usr/bin", + " Wording: Ansgar Burchardt <ansgar@debian.org>", + " Wording: Russ Allbery <rra@debian.org>", + " Seconded: Raphael Hertzog <hertzog@debian.org>", + " Seconded: Felipe Sateler <fsateler@debian.org>", + " Closes: #759492", + " * Policy: Debug packages don't need a debian/control paragraph", + " Wording: Tanguy Ortolo <tanguy+debian@ortolo.eu>", + " Seconded: Russ Allbery <rra@debian.org>", + " Seconded: Raphael Hertzog <hertzog@debian.org>", + " Closes: #819660", + " * Policy: New dpkg-architecture flags", + " Wording: Guillem Jover <guillem@debian.org>", + " Seconded: Russ Allbery <rra@debian.org>", + " Seconded: Raphael Hertzog <hertzog@debian.org>", + " Closes: #793493", + " * Policy: Remove even the fallback to calling /etc/init.d directly", + " Wording: Ondřej Nový <onovy@debian.org>", + " Seconded: Michael Stapelberg <stapelberg@debian.org>", + " Seconded: Andreas Henriksson <andreas@fatal.se>", + " Closes: #833177", + " * Policy: Limit strength of dependencies on -doc packages", + " Wording: Josh Triplett <josh@joshtriplett.org>", + " Seconded: Russ Allbery <rra@debian.org>", + " Seconded: Raphael Hertzog <hertzog@debian.org>", + " Seconded: Niels Thykier <niels@thykier.net>", + " Closes: #823348", + " * Policy: Explicitly allow https form of copyright-format URL", + " Wording: Russ Allbery <rra@debian.org>", + " Seconded: Andrey Rahmatullin <wrar@debian.org>", + " Seconded: gregor herrmann <gregoa@debian.org>", + " Seconded: Didier 'OdyX' Raboud <odyx@debian.org>", + " Closes: #850646", + " * Policy: Recommend libraryname-dev or librarynameAPIVERSION-dev", + " Wording: Ansgar Burchardt <ansgar@debian.org>", + " Seconded: Julien Cristau <jcristau@debian.org>", + " Seconded: Emilio Pozuelo Monfort <pochu@debian.org>", + " Closes: #568374", + " * Policy: Add optional try-restart init status, make status recommended", + " Wording: Andreas Henriksson <andreas@fatal.se>", + " Seconded: Simon McVittie <smcv@debian.org>", + " Seconded: Felipe Sateler <fsateler@debian.org>", + " Seconded: Ondřej Nový <novy@ondrej.org>", + " Closes: #181123", + " * Policy: No special dependency now required for /run", + " Wording: Marc Haber <mh+debian-packages@zugschlus.de>", + " Seconded: Andreas Henriksson <andreas@fatal.se>", + " Seconded: Russ Allbery <rra@debian.org>", + " Closes: #852314", + " * Policy: Update policy on /dev and device file management", + " Wording: Russ Allbery <rra@debian.org>", + " Seconded: Andreas Henriksson <andreas@fatal.se>", + " Seconded: Simon McVittie <smcv@debian.org>", + " Closes: #698012", + " * Policy: Remove integration instructions for upstart", + " Wording: Ansgar Burchardt <ansgar@debian.org>", + " Seconded: Michael Biebl <biebl@debian.org>", + " Seconded: Andrey Rahmatullin <wrar@debian.org>", + " Seconded: Simon McVittie <smcv@debian.org>", + " Closes: #835490", + " * Perl: Update module search path for multiarch support", + " Wording: Dominic Hargreaves <dom@earth.li>", + " Seconded: Niko Tyni <ntyni@debian.org>", + " Seconded: Russ Allbery <rra@debian.org>", + " Closes: #798309", + " * virtual-package-names-list: Add adventure", + " Wording: Ben Finney <ben+debian@benfinney.id.au>", + " Seconded: Russ Allbery <rra@debian.org>", + " Seconded: Niels Thykier <niels@thykier.net>", + " Closes: #821859", + " * virtual-package-names-list: Add httpd-wsgi3", + " Wording: Bill Allombert <ballombe@debian.org>", + " Seconded: Brian May <bam@debian.org>", + " Seconded: Russ Allbery <rra@debian.org>", + " Closes: #768117", + " * virtual-package-names-list: Add virtual-mysql-* packages", + " Wording: Otto Kekäläinen <otto@debian.org>", + " Seconded: Russ Allbery <rra@debian.org>", + " Seconded: Raphael Hertzog <hertzog@debian.org>", + " Closes: #829367", + " * Convert all remaining DebianDoc-SGML source files in the package to", + " DocBook XML. Many thanks to Osamu Aoki and Guillem Jover for lots of", + " hard work on the conversion. This was a huge conversion, so there", + " will probably be some lingering formatting issues, incorrect markup,", + " and less-than-ideal output. Please report any problems as bugs.", + " (Closes: #175064, #700532, #809382)", + " * Additional fixes from Guillem Jover as part of the DocBook conversion:", + " - Stop distributing the source SGML files as part of the installed", + " package. There doesn't seem to be any point in doing this.", + " - Switch to xsltproc and dblatex instead of OpenJade.", + " - Stop using tidy on the generated files since it generates larger", + " files and the output from xsltproc is already compliant and fairly", + " clean.", + " - Remove unused Build-Depends.", + " - Use entities instead of literal <, >, and & characters.", + " - Use <var> instead of escaped angle brackets for metavariables.", + " - Use <var> instead of <em> inside <tt>.", + " - Avoid slashes in section IDs.", + " - Convert a comment about maintenance policy in the Menu Policy", + " document to a regular paragraph in the document.", + " - Replace a comment reference to the policy maintenance process with", + " an actual link to Process.md.", + " - Remove obsolete SGML comments.", + " * Move the description of < and > relations to a footnote to make", + " abundantly clear that they're no longer valid relation operators in", + " dependencies. (Closes: #816515)", + " * Clarify informative mentions of debian/tmp in the appendices to", + " document the now-common use of debian/<pkg> instead as the temporary", + " staging area. Document that convention, instead of", + " debian/tmp-something, for multi-binary packages. Thanks, Niels", + " Thykier. (Closes: #816249)", + " * Remove lingering wording that implied that build-arch and build-indep", + " targets are optional. Thanks, Ferenc Wagner, Jakub Wilk, and Charles", + " Plessy. (Closes: #793999)", + " * Rather than giving the paths to the installed shlibs and symbols files", + " and then saying those paths shouldn't be used, just say to use", + " dpkg-query --control-show. Recommend --control-show instead of", + " --control-path, since the latter is deprecated. Patch from Salvatore", + " Bonaccorso. (Closes: #688220)", + " * Explicitly give Unicode code points in the definition of the syntax of", + " Debian control files and, where appropriate, show the character.", + " Patch from Ben Finney. (Closes: #821365)", + " * Remove obsolete footnote about a versioned dependency on a", + " liblockfile1 release from 1999. Thanks, Jakub Wilk. (Closes: #794902)", + " * Fix the long name of the Common Public License in the copyright-format", + " policy. It is just Common Public License, with no leading \"IBM\".", + " Thanks, Stefano Zacchiroli. (Closes: #781654)", + " * Fix the copyright-format examples to not have duplicate License", + " paragraphs. Thanks, Stefan <bd@bc-bd.org>. (Closes: #824922)", + " * Replace reference to dbus-launch in the autopkgtest documentation with", + " dbus-run-session. Patch from Simon McVittie. (Closes: #835876)", + " * Add an example of an architecture restriction in a dependency with", + " multiple architectures separated by spaces. (Closes: #734662)", + " * Replace use of markdown with MultiMarkdown for the autopkgtest", + " documentation and convert README and Process to MultiMarkdown, thus", + " dropping the last org-mode files and the build dependency on Emacs.", + " Patch from Guillem Jover. (Closes: #849483)", + " * Add some additional information to the upgrading-checklist entry for", + " the 3.9.8.0 release.", + " * Fix debian/changelog and upgrading-checklist dates for the 3.9.8.0", + " release to match the actual upload. (Closes: #822059)", + " * Fix duplicated \"the\" words in 4.4 and 8.6.3.2. Patch from Valentin", + " Samir. (Closes: #830989)", + " * Clean up the upgrading checklist a bit:", + " - Rewrite the introduction to read a bit more smoothly and mention", + " that the Standards-Version value omits the minor patch number.", + " - Remove the minor patch number from all the version headings except", + " for the anomalies that contain normative changes, and note those", + " explicitly.", + " - Remove some unhelpful section headings and trailing colons in very", + " old upgrading checklist entries.", + " - Standardize the release date format.", + " * Compress all files with gzip -n to avoid embedding timestamps,", + " enabling reproducible builds.", + " * Redo some of the Makefile and debian/rules dependencies to avoid", + " ambiguous pattern rules and to ensure that make at the top level", + " rebuilds output files if input files change.", + " * Switch to https URLs for Vcs-Git and Vcs-Browser.", + " * Use the same URL for both Vcs-Git and Vcs-Browser, which now works", + " fine and has some advantages over the gitweb version for Vcs-Browser.", + " Thanks, Mattia Rizzolo.", + " * Run wrap-and-sort -ast.", + " * Tag as Multi-Arch: foreign (mostly to silence the hinter).", + "", + " [ Sean Whitton ]", + " * Remove references to DebianDoc-SGML from README.md.", + " * Fix typo & comma splice in Process.md." + ], + "closes" : [ + 175064, + 181123, + 568374, + 688220, + 698012, + 700532, + 734662, + 746514, + 759186, + 759492, + 768117, + 768292, + 781654, + 792853, + 793493, + 793999, + 794902, + 798309, + 809382, + 816249, + 816515, + 819660, + 820197, + 821365, + 821859, + 822059, + 823348, + 823910, + 824922, + 829367, + 830989, + 833177, + 835490, + 835876, + 841877, + 849483, + 850646, + 852314 + ], + "epoch" : 1495999627, + "timestamp" : "2017-05-28T19:27:07Z", + "version" : "4.0.0.0" + }, + { + "author" : "Don Armstrong <don@debian.org>", + "changes" : [ + "", + "debian-policy (3.9.8.0) unstable; urgency=medium", + "", + " * Policy: The Debian menu is optionally supported.", + " Wording: Charles Plessy <plessy@debian.org>", + " Seconded: Lisandro Damián Nicanor Pérez Meyer <perezmeyer@gmail.com>", + " Seconded: Cyril Brulebois <kibi@debian.org> (for the menu entries)", + " Seconded: Russ Allbery <rra@debian.org>", + " Closes: #707851" + ], + "closes" : [ + 707851.0 + ], + "epoch" : 1459914598, + "timestamp" : "2016-04-06T03:49:58Z", + "version" : "3.9.8.0" + }, + { + "author" : "Bill Allombert <ballombe@debian.org>", + "changes" : [ + "", + "debian-policy (3.9.7.0) unstable; urgency=low", + "", + " * Policy: refreshed the names of the Policy Editors.", + " * Makefile: use gzip -n when compressing generated files.", + " * debian/control, Makefile:", + " - add missing Build-Depends on sp (opensp). Closes: #812663", + " - migrate to openjade and opensp.", + " * debian/rules: no more ship libc6-migration.txt. Closes: #797478", + " * Policy: Symbolic links must not traverse above the root directory.", + " Wording: Andrey Rahmatullin <wrar@debian.org>", + " Seconded: Bill Allombert <ballombe@debian.org>", + " Seconded: Jakub Wilk <jwilk@debian.org>", + " Seconded: Henrique de Moraes Holschuh <hmh@debian.org>", + " Closes: #555979", + " * Policy: [9.2.2] document 32-bit UIDs ranges.", + " Wording: Matthew Vernon <matthew@debian.org>", + " Seconded: Russ Allbery <rra@debian.org>", + " Seconded: Bill Allombert <ballombe@debian.org>", + " Seconded: Julien Cristau <jcristau@debian.org>", + " Closes: #765499", + " * Policy: [5.1] empty field values in control files are only permitted in", + " the debian/control file of a source package.", + " Wording: Bill Allombert <ballombe@debian.org>", + " Seconded: Henrique de Moraes Holschuh <hmh@debian.org>", + " Seconded: Andrey Rahmatullin <wrar@debian.org>", + " Closes: #666726", + " * Policy: [4.9] debian/rules: required targets must not attempt network", + " access.", + " Wording: Bill Allombert <ballombe@debian.org>", + " Seconded: Andrey Rahmatullin <wrar@debian.org>", + " Seconded: Lucas Nussbaum <lucas@debian.org>", + " Closes: #770016", + " * Policy: [12.3] recommend to ship additional documentation for package 'pkg'", + " in a separate package 'pkg-doc' and install it into /usr/share/doc/pkg.", + " Wording: Russ Allbery <rra@debian.org>", + " Seconded: Bill Allombert <ballombe@debian.org>", + " Seconded: Charles Plessy <plessy@debian.org>", + " Closes: #106073", + "", + " [ Stefano Zacchiroli ]", + " * autopkgtest: new document containing the specification of automatic,", + " as-installed (AKA autopkgtest, or DEP-8) package tests", + " Closes: #799779" + ], + "closes" : [ + 106073, + 555979, + 666726, + 765499, + 770016, + 797478, + 799779, + 812663 + ], + "epoch" : 1454364231, + "timestamp" : "2016-02-01T22:03:51Z", + "version" : "3.9.7.0" + }, + { + "author" : "Bill Allombert <ballombe@debian.org>", + "changes" : [ + "", + "debian-policy (3.9.6.1) unstable; urgency=low", + "", + " * Fix FTBFS with emacs 24.4. Thanks to David Bremner <david@tethera.net>", + " for the help. Closes: #769219" + ], + "closes" : [ + 769219.0 + ], + "epoch" : 1416221755, + "timestamp" : "2014-11-17T10:55:55Z", + "version" : "3.9.6.1" + }, + { + "author" : "Bill Allombert <ballombe@debian.org>", + "changes" : [ + "", + "debian-policy (3.9.6.0) unstable; urgency=low", + "", + " [ Bill Allombert ]", + " * upgrading-checklist.sgml: remove spurious 'details in' leftover from", + " the HTML transition. Closes: #740100. Thanks Jakub Wilk.", + " * debian/control:", + " - Build-Depends emacs-nox|emacs instead of emacs23. Closes: #753999", + " Thanks Gabriele Giacone and Rob Browning.", + " * Packaging: refreshed the names of the Policy Editors.", + " * Policy: [11.5.1] Web servers: Fix use of metasyntactic variables and", + " applications Closes: #737730. Thanks Olivier Berger.", + " * Policy: [5.6.21] Files: Fix typo \"by\" -> be. Closes: #753353.", + " Thanks Benedikt Wildenhain.", + " * Policy: Remove reference to DEHS (dead service)", + " Wording: David Prévot <taffit@debian.org>", + " Seconded: Julian Gilbey <julian@d-and-j.net>", + " Seconded: Charles Plessy <plessy@debian.org>", + " Closes: #731810", + " * Policy: Relax /usr/share FHS requirement for directories with mixed content.", + " Wording: Joey Hess <joeyh@debian.org>", + " Seconded: Russ Allbery <rra@debian.org>", + " Seconded: Julien Cristau <jcristau@debian.org>", + " Seconded: Jakub Wilk <jwilk@debian.org>", + " Seconded: Michael Biebl <biebl@debian.org>", + " Closes: #741304", + " * Perl Policy: @INC has /usr/lib/perl/5.18, not /usr/lib/perl/5.18.2", + " Wording: Niko Tyni <ntyni@debian.org>", + " Seconded: Russ Allbery <rra@debian.org>", + " Seconded: Bill Allombert <ballombe@debian.org>", + " Closes: #748480", + " * Perl Policy: Explain %Config earlier", + " Wording: Niko Tyni <ntyni@debian.org>", + " Seconded: Russ Allbery <rra@debian.org>", + " Seconded: Damyan Ivanov <dmn@debian.org>", + " Closes: #748479", + " * Perl Policy: @INC changes for multiarch", + " Wording: Niko Tyni <ntyni@debian.org>", + " Seconded: Russ Allbery <rra@debian.org>", + " Seconded: Damyan Ivanov <dmn@debian.org>", + " Closes: #748380", + " * Perl Policy: Packages using Perl vendorarch directory need a perlapi-*", + " dependency", + " Wording: Niko Tyni <ntyni@debian.org>", + " Seconded: Russ Allbery <rra@debian.org>", + " Seconded: Gregor Herrmann <gregoa@debian.org>", + " Seconded: Axel Beckert <abe@debian.org>", + " Closes: #750017", + " * Policy: Grant an FHS exception for the multiarch headers directories", + " Wording: Bill Allombert <ballombe@debian.org>", + " Seconded: Jonathan Nieder <jrnieder@gmail.com>", + " Seconded: Russ Allbery <rra@debian.org>", + " Closes: #742756", + " * Policy: Discourage statically linked binaries", + " Wording: Russ Allbery <rra@debian.org>", + " Seconded: Bill Allombert <ballombe@debian.org>", + " Seconded: Jonathan Nieder <jrnieder@gmail.com>", + " Closes: #555980", + " * Policy: Clarify whose signature should go in debian/changelog (4.4)", + " Wording: Russ Allbery <rra@debian.org>", + " Seconded: Andrew McMillan <andrew@morphoss.com>", + " Seconded: Gregor Herrmann <gregoa@debian.org>", + " Closes: #593611", + " * Policy: Change default web document root to /var/www/html", + " Wording: Bill Allombert <ballombe@debian.org>", + " Seconded: Arno Töll <arno@debian.org>", + " Seconded: Matthias Urlichs <matthias@urlichs.de>", + " Closes: #491547", + " * virtual-package-names-list: Update java runtime list", + " Wording: Emmanuel Bourg <ebourg@apache.org>", + " Seconded: Tony Mancill <tmancill@debian.org>", + " Seconded: Bill Allombert <ballombe@debian.org>", + " Closes: #754876", + " * virtual-package-names-list: Add httpd-wsgi", + " Wording: Bill Allombert <ballombe@debian.org>", + " Seconded: Jonas Smedegaard <dr@jones.dk>", + " Seconded: Piotr Ożarowski <piotr@debian.org>", + " Closes: #588497", + " [ Jonathan Nieder ]", + " * Policy: Drop FHS requirement that /usr/local/lib<qual> exist when /lib<qual>", + " or /usr/lib<qual> does.", + " Wording: Tollef Fog Heen <tfheen@err.no>", + " Seconded: Bill Allombert <ballombe@debian.org>", + " Seconded: Jonathan Nieder <jrnieder@gmail.com>", + " Seconded: Russ Allbery <rra@debian.org>", + " Closes: #613143" + ], + "closes" : [ + 491547, + 555980, + 588497, + 593611, + 613143, + 731810, + 737730, + 740100, + 741304, + 742756, + 748380, + 748479, + 748480, + 750017, + 753353, + 753999, + 754876 + ], + "epoch" : 1410977000, + "timestamp" : "2014-09-17T18:03:20Z", + "version" : "3.9.6.0" + }, + { + "author" : "Charles Plessy <plessy@debian.org>", + "changes" : [ + "", + "debian-policy (3.9.5.0) unstable; urgency=low", + "", + " * Policy: Document the Package-List field.", + " Wording: Charles Plessy <plessy@debian.org>", + " Seconded: Russ Allbery <rra@debian.org>", + " Seconded: Guillem Jover <guillem@debian.org>", + " Closes: #697433", + " * Policy: DM-Upload-Allowed is now obsolete", + " Wording: Charles Plessy <plessy@debian.org>", + " Seconded: Russ Allbery <rra@debian.org>", + " Seconded: Ansgar Burchardt <ansgar@debian.org>", + " Seconded: Guillem Jover <guillem@debian.org>", + " Closes: #679326", + " * Policy: Checksums-{Sha1,Sha256} are now mandatory", + " Wording: Charles Plessy <plessy@debian.org>", + " Seconded: Guillem Jover <guillem@debian.org>", + " Seconded: Ansgar Burchardt <ansgar@debian.org>", + " Closes: #690293", + " * Policy: Requirements for udebs are not well documented yet", + " Wording: Russ Allbery <rra@debian.org>", + " Wording: Jonathan Nieder <jrnieder@gmail.com>", + " Seconded: Charles Plessy <plessy@debian.org>", + " Seconded: Cyril Brulebois <kibi@debian.org>", + " Seconded: Russ Allbery <rra@debian.org>", + " Closes: #698030", + " * Policy: install-info is run by a dpkg trigger.", + " Wording: Jonathan Nieder <jrnieder@gmail.com>", + " Seconded: Charles Plessy <plessy@debian.org>", + " Seconded: Russ Allbery <rra@debian.org>", + " Closes: #669915", + " * Policy: Stop recommending to serve HTML documents from /usr/share/doc.", + " Wording: Thomas Goirand <zigo@debian.org>", + " Seconded: Charles Plessy <plessy@debian.org>", + " Seconded: Jonathan Nieder <jrnieder@gmail.com>", + " Closes: #715804", + " * Policy: File names encoded in UTF-8. ASCII preferred and mandatory in PATH.", + " Wording: Charles Plessy <plessy@debian.org>", + " Seconded: Jonathan Nieder <jrnieder@gmail.com>", + " Seconded: Julian Gilbey <julian@d-and-j.net>", + " Closes: #701081", + " * Policy: Document the Dgit field for Debian Source Control files.", + " Wording: Ian Jackson <ijackson@chiark.greenend.org.uk>", + " Seconded: Charles Plessy <plessy@debian.org>", + " Seconded: Joey Hess <joeyh@debian.org>", + " Seconded: Dmitrijs Ledkovs <xnox@debian.org>", + " Closes: #720507", + " * Policy: Remove the exception to the FHS for the /selinux directory.", + " Wording: Charles Plessy <plessy@debian.org>", + " Seconded: Steve Langasek <vorlon@debian.org>", + " Seconded: Julien Cristau <jcristau@debian.org>", + " Closes: #707183", + " * Policy: on upgrades, recommend removing obsolete unchanged conf. files.", + " Wording: Paul Wise <pabs@debian.org>", + " Seconded: Jonathan Nieder <jrnieder@gmail.com>", + " Seconded: Charles Plessy <plessy@debian.org>", + " Closes: #707077", + " * Policy: Control data fields must not start with a hyphen character.", + " Wording: Niels Thykier <niels@thykier.net>", + " Seconded: Russ Allbery <rra@debian.org>", + " Seconded: Guillem Jover <guillem@debian.org>", + " Closes: #706778", + " * debconf_spec: Document the 'escape' capability.", + " Wording: Jonathan Nieder <jrnieder@gmail.com>", + " Seconded: Charles Plessy <plessy@debian.org>", + " Seconded: Russ Allbery <rra@debian.org>", + " Closes: #671355", + " * virtual-package-names-list: removed mp3-decoder and mp3-encoder.", + " Seconded: Jonathan Nieder <jrnieder@gmail.com>", + " Seconded: Kurt Roeckx <kurt@roeckx.be>", + " Seconded: Charles Plessy <plessy@debian.org>", + " Closes: #668394", + " * Clean outdated mentions of dpkg commands in appendix. Thanks, Guillem Jover", + " * Remove outdated mention of dselect documentation.", + " Closes: #700574. Thanks, Guillem Jover.", + " * Update dak reference from old katie name.", + " Closes: #700536. Thanks, Guillem Jover.", + " * Fix typo in 8.6.4. Thanks, Raúl Benencia. (Closes: #691352)", + " * Fix typo in 8.6.4.1. Thanks, Salvatore Bonaccorso <carnil@debian.org>.", + " * Added a warning in appendix G about diverting conffiles.", + " Closes: #703022. Thanks, Torsten Jerzembeck.", + " * List build-arch and build-indep with the other required targets in 4.9.", + " Closes: #704657. Thanks, Philipp Hahn.", + " * Replaced non-standard names of dpkg states by normalised ones.", + " Closes: #705403", + " * Clarify what is meant by \"compressed\" in section 10.5. (Closes: #676784)", + " * Packaging: use the VCS URLs proposed by Lintian.", + " * Packaging: normalised debian/control with the tool \"config-model-edit\".", + " * Packaging: refreshed the names of the Policy Editors." + ], + "closes" : [ + 668394, + 669915, + 671355, + 676784, + 679326, + 690293, + 691352, + 697433, + 698030, + 700536, + 700574, + 701081, + 703022, + 704657, + 705403, + 706778, + 707077, + 707183, + 715804, + 720507 + ], + "epoch" : 1382920848, + "timestamp" : "2013-10-28T00:40:48Z", + "version" : "3.9.5.0" + }, + { + "author" : "Russ Allbery <rra@debian.org>", + "changes" : [ + "", + "debian-policy (3.9.4.0) unstable; urgency=low", + "", + " * build-arch and build-indep are now mandatory targets in debian/rules,", + " implementing the Technical Committee ruling in #629385. Wording", + " review by Jonathan Nieder, Jakub Wilk, and Roger Leigh.", + " (Closes: #374029)", + " * Resynchronize the archive section list with ftp-master, adding tasks.", + " Patch from Charles Plessy. (Closes: #670429)", + " * Policy: Copyright files must be encoded in UTF-8", + " Wording: Russ Allbery <rra@debian.org>", + " Seconded: Guillem Jover <guillem@debian.org>", + " Seconded: Salvatore Bonaccorso <carnil@debian.org>", + " Seconded: Simon McVittie <smcv@debian.org>", + " Closes: #661933", + " * Policy: Prohibit deprecated < and > relations", + " Wording: Jakub Wilk <jwilk@debian.org>", + " Seconded: Cyril Brulebois <kibi@debian.org>", + " Seconded: Russ Allbery <rra@debian.org>", + " Closes: #663918", + " * Policy: Document the Built-Using field", + " Wording: Charles Plessy <plessy@debian.org>", + " Seconded: Russ Allbery <rra@debian.org>", + " Seconded: Ansgar Burchardt <ansgar@debian.org>", + " Closes: #641153", + " * Policy: Document the Vcs-* fields", + " Wording: Charles Plessy <plessy@debian.org>", + " Wording: Jonathan Nieder <jrnieder@gmail.com>", + " Seconded: Russ Allbery <rra@debian.org>", + " Seconded: Charles Plessy <plessy@debian.org>", + " Seconded: Guillem Jover <guillem@debian.org>", + " Closes: #654958", + " * Policy: Document restrictions on the use of /run for wheezy", + " Wording: Roger Leigh <rleigh@debian.org>", + " Seconded: Charles Plessy <plessy@debian.org>", + " Seconded: Russ Allbery <rra@debian.org>", + " Closes: #676561", + " * Policy: Rewrite shared library dependency policy to document symbols", + " Wording: Russ Allbery <rra@debian.org>", + " Wording: Jonathan Nieder <jrnieder@gmail.com>", + " Seconded: Raphaël Hertzog <hertzog@debian.org>", + " Seconded: Julien Cristau <jcristau@debian.org>", + " Closes: #571776", + " * Policy: Document generic and upstart-specific init system requirements", + " Wording: Steve Langasek <steve.langasek@canonical.com>", + " Seconded: Russ Allbery <rra@debian.org>", + " Seconded: Adam D. Barratt <adam@adam-barratt.org.uk>", + " Closes: #591791", + " * Policy: Rely on triggers instead of calling update-mime", + " Wording: Charles Plessy <plessy@debian.org>", + " Seconded: Russ Allbery <rra@debian.org>", + " Seconded: Guillem Jover <guillem@debian.org>", + " Closes: #661816" + ], + "closes" : [ + 374029, + 571776, + 591791, + 641153, + 654958, + 661816, + 661933, + 663918, + 670429, + 676561 + ], + "epoch" : 1348029336, + "timestamp" : "2012-09-19T04:35:36Z", + "version" : "3.9.4.0" + }, + { + "author" : "Russ Allbery <rra@debian.org>", + "changes" : [ + "", + "debian-policy (3.9.3.1) unstable; urgency=low", + "", + " * Fix cross-reference to control field syntax in Policy 5.4 (source", + " package control files). Thanks, Jakub Wilk. (Closes: #661412)", + " * Additional wording improvements to copyright-format 1.0 for clarity.", + " Also mention that the Files pattern syntax is the same as fnmatch(3)", + " and GNU find -path without [] patterns. Thanks, Jonathan Nieder and", + " Ben Finney.", + " * Suggest checkbashisms from devscripts or the posh shell for checking", + " whether /bin/sh scripts are Policy-compliant rather than recommending", + " dash. Thanks, Raphael Geissert. (Closes: #490604)", + " * Remove the ambiguous word \"installed\" when requiring that the location", + " of files and directories follow the FHS. (Closes: #638060)", + " * Clarify the syntax of field names to make it clear that they may not", + " contain spaces. Thanks, Charles Plessy. (Closes: #647645)", + " * Clarify that only one of build-arch or build-indep may be provided", + " (currently, at least) and that build should depend on whichever exist", + " or perform the equivalent actions. Thanks to Jonathan Nieder for some", + " of the wording. (Closes: #601839)", + " * Clearly state that \"yes\" is the only valid value of DM-Upload-Allowed", + " and rewrite its description to be less indirect. (Closes: #622263)", + " * Update the dpkg-buildpackage -r documentation in the appendix to", + " reflect the current behavior of using fakeroot. Wording from Sam", + " Morris. (Closes: #658009)", + " * Fix the legal notice in copyright-format to not refer to a nonexistent", + " copyright notice.", + " * Embed the Debian Policy version and build date in the debconf", + " specification and the copyright-format document. We'll make", + " non-normative changes without updating other version numbers, and it's", + " good to know which version one is looking at.", + " * Fix some whitespace issues in the debconf specification articleinfo.", + " * Install the HTML version of upgrading-checklist in the policy.html", + " directory as upgrading-checklist.html so that it can be deployed on", + " www.debian.org in a way that will allow links to Policy sections to", + " work easily. Thanks, Charles Plessy. (Partly addresses #639663)", + " * Ship the copyright-format source as copyright-format.xml.tar.gz", + " without a version, since it will include all of the versions, not just", + " the current version.", + " * Fix mistaken word choice (prefix instead of suffix) in the upgrading", + " checklist entry for 3.9.3.0.", + " * Add some missing entries to the virtual package names list changelog.", + " * Expand package long description to include all documents.", + " * Remove unused substitution variable generated by the build. Thanks,", + " Charles Plessy.", + " * Strip down and reformat debian/rules to remove unused variables,", + " references to old files no longer included, use a more standard", + " layout and standardize variable names, and add comments for better", + " maintainability.", + " * Convert debian/copyright to copyright-format 1.0, and in the process", + " add the license information for the documents other than Policy itself", + " and the FHS. Note the implication of the GPL source code requirement", + " for distributing generated versions of the Policy documents." + ], + "closes" : [ + 490604, + 601839, + 622263, + 638060, + 647645, + 658009, + 661412 + ], + "epoch" : 1330902132, + "timestamp" : "2012-03-04T23:02:12Z", + "version" : "3.9.3.1" + }, + { + "author" : "Russ Allbery <rra@debian.org>", + "changes" : [ + "", + "debian-policy (3.9.3.0) unstable; urgency=low", + "", + " [ Russ Allbery ]", + " * Update the copyright format document to the version of DEP-5 from the", + " DEP web site and apply additional changes from subsequent discussion", + " in debian-devel and debian-project. Revise for clarity, to add more", + " examples, and to update the GFDL license versions. Thanks, Steve", + " Langasek, Charles Plessy, Justin B Rye, and Jonathan Nieder.", + " (Closes: #658209, #648387)", + " * Publish the copyright format specification as copyright-format-1.0 so", + " that later versions can be added without removing previous versions of", + " the standard. Patch from Charles Plessy. (Closes: #646119)", + " * Policy: Improve Architecture field in source package", + " Wording: Raphaël Hertzog <hertzog@debian.org>", + " Seconded: Russ Allbery <rra@debian.org>", + " Seconded: Charles Plessy <plessy@debian.org>", + " Seconded: Guillem Jover <guillem@debian.org>", + " Closes: #626779", + " * Policy: Initial Debian maintainers need not be listed in copyright", + " Wording: Charles Plessy <plessy@debian.org>", + " Seconded: Russ Allbery <rra@debian.org>", + " Seconded: Raphaël Hertzog <hertzog@debian.org>", + " Seconded: Andrew McMillan <andrew@morphoss.com>", + " Closes: #593533", + " * Policy: Document cron job file naming restrictions", + " Wording: Karl E. Jorgensen <karl@jorgensen.org.uk>", + " Wording: Russ Allbery <rra@debian.org>", + " Seconded: Russ Allbery <rra@debian.org>", + " Seconded: Dominic Hargreaves <dom@earth.li>", + " Seconded: Javier Fernández-Sanguino Peña <jfs@computer.org>", + " Closes: #609162", + " * Policy: Document issues with conflicting packages sharing a conffile", + " Wording: Russ Allbery <rra@debian.org>", + " Seconded: Cyril Brulebois <kibi@debian.org>", + " Seconded: Raphaël Hertzog <hertzog@debian.org>", + " Closes: #23712", + " * Policy: Add /run FHS exception, clarify rules for /run and /var/run", + " Wording: Russ Allbery <rra@debian.org>", + " Seconded: Steve Langasek <vorlon@debian.org>", + " Seconded: Roger Leigh <rleigh@codelibre.net>", + " Closes: #620870, #532120", + " * Policy: Architecture restrictions in a dependency must be non-empty", + " Wording: Stefano Zacchiroli <zack@debian.org>", + " Seconded: Russ Allbery <rra@debian.org>", + " Seconded: Julien Cristau <jcristau@debian.org>", + " Seconded: Colin Watson <cjwatson@debian.org>", + " Closes: #498300", + " * MIME Policy: Retire this document and merge it with Policy", + " Wording: Ben Finney <ben+debian@benfinney.id.au>", + " Seconded: Russ Allbery <rra@debian.org>", + " Seconded: Raphaël Hertzog <hertzog@debian.org>", + " Seconded: Andrew McMillan <andrew@morphoss.com>", + " Closes: #89038", + " * Consistently use \"Debian source control file\" for *.dsc files and", + " \"Source package control file\" for debian/control files. Patch from", + " Charles Plessy. (Closes: #626796)", + " * Clarify that continuation lines of the Description control field must", + " contain at least one non-whitespace character. Thanks, Guillem Jover.", + " (Closes: #627490)", + " * Fix the example of creating a /usr/local subdirectory to not fail if", + " the chown or chmod fail. Thanks, Joey Hess. (Closes: #617315)", + " * Clarify the requirements for symlinks from inside one top-level", + " directory to another and add examples and a rationale. Thanks,", + " Carsten Hey. (Closes: #626338)", + " * Clarify that Perl Policy 2.4 is for packages built from the perl", + " source package and the manual page extensions are different for", + " separate module packages. Thanks, Steve Langasek. (Closes: #643690)", + " * Say that packages in main may also not recommend packages in non-free,", + " bringing the main text in line with the list of fields and in line", + " with the long-standing release goal. (Closes: #646166)", + " * Resynchronize the archive section list with ftp-master, adding", + " education, introspection, and metapackages. Patch from Charles", + " Plessy. (Closes: #651020)", + " * Clarify that packages in main may not declare Pre-Depends or", + " Build-Depends-Indep relationships outside of main either. Partly", + " addresses #587279.", + " * Fix typo in the version numbers in the dpkg-divert examples. Thanks,", + " Slavko.", + " * Add the release date of 3.9.2.0 to upgrading-checklist.", + " * Fix ordering of the last entries in the 3.9.2.0 upgrading-checklist.", + " * Fix typo in upgrading-checklist entry for multiarch paths. Thanks,", + " Michael Dorrington. (Closes: #626408)", + " * Add id tags for each version entry in upgrading-checklist so that,", + " when eventually published somewhere, other Debian web sites can link", + " to specific entries. Patch from Charles Plessy.", + " * Add AGPL-3 to tools/license-count.", + " * Update tools/license-count to work with the new Lintian lab layout.", + " * Add build-arch and build-indep targets to debian/rules.", + "", + " [ Bill Allombert ]", + " * Policy: Link relationship fields (7.1) to architecture specification", + " strings (11.1).", + " Patch from Charles Plessy in #628174.", + " * Policy: Retire legacy Motif policy (11.8.8)", + " Proposed by: Justin B Rye", + " Wording: Russ Allbery <rra@debian.org>", + " Seconded: Jakub Wilk <jwilk@debian.org>", + " Seconded: Steve Langasek <vorlon@debian.org>", + " Seconded: Charles Plessy <plessy@debian.org>", + " Closes: #621479", + " * copyright-format: Fix URL for the Eiffel Forum License.", + " Reported by Thomas Preud'homme, patch by Charles Plessy.", + " Closes: #623050", + " * copyright-format: Update SPDX link to point to the SPDX license registry.", + " Patch by Charles Plessy. Closes: #628540", + " * copyright-format: Correct or add links to SPDX.", + " Wording: Charles Plessy <plessy@debian.org>", + " Seconded: Gregor Herrmann <gregoa@debian.org>", + " Closes: #641071", + " * Policy: Clarify that 'machine-extractable' referer the copyright", + " files (12.5)", + " Wording: Charles Plessy <plessy@debian.org>", + " Seconded: Bill Allombert <ballombe@debian.org>", + " Seconded: Jakub Wilk <jwilk@debian.org>", + " Closes: #617516", + " * copyright-format: remove drivers from abstract and useless appendix", + " Wording: Lars Wirzenius <liw@liw.fi>", + " Seconded: Charles Plessy <plessy@debian.org>", + " Seconded: Jakub Wilk <jwilk@debian.org>", + " Closes: #640735", + " * copyright-format: Fix syntax of examples.", + " Proposed by: Charles Plessy <plessy@debian.org>", + " Wording: Jonathan Nieder <jrnieder@gmail.com>", + " Closes: #649674", + " * copyright-format: Clarify specification of multiple license exception:", + " Wording: Steve Langasek <vorlon@debian.org>", + " Seconded: Craig Small <csmall@debian.org>", + " Seconded: Gregor Herrmann <gregoa@debian.org>", + " Seconded: Jakub Wilk <jwilk@debian.org>", + " Seconded: Jonas Smedegaard <dr@jones.dk>", + " Closes: #633797", + " * copyright-format: Specify URL on www.debian.org", + " Wording: Charles Plessy <plessy@debian.org>", + " Seconded: David Prévot <taffit@debian.org>", + " Seconded: Gregor Herrmann <gregoa@debian.org>", + " Closes: #640737", + " * Perl policy: Document major version upgrade trigger", + " Wording: Dominic Hargreaves <dom@debian.org>", + " Seconded: Russ Allbery <rra@debian.org>", + " Seconded: Niko Tyni <ntyni@debian.org>", + " Seconded: Gregor Herrmann <gregoa@debian.org>", + " Closes: #619275", + " * Virtual: change ttf-japanese-{mincho, gothic} to", + " fonts-japanese-{mincho, gothic}.", + " Proposed by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>", + " Seconded: Charles Plessy <plessy@debian.org>", + " Seconded: Bill Allombert <ballombe@debian.org>", + " Closes: #644230", + " * Virtual: Retire java-compiler, java2-compiler, and java-virtual-machine.", + " Proposed by: Niels Thykier <niels@thykier.net>", + " Seconded: tony mancill <tmancill@debian.org>", + " Seconded: Bill Allombert <ballombe@debian.org>", + " Closes: #578421", + " * Policy 9.10: No more recommend to call install-docs for doc-base.", + " Wording: Charles Plessy <plessy@debian.org>", + " Seconded: Robert Luberda <robert@debian.org>", + " Seconded: Raphael Hertzog <hertzog@debian.org>", + " Closes: #637614" + ], + "closes" : [ + 23712, + 89038, + 498300, + 532120, + 578421, + 593533, + 609162, + 617315, + 617516, + 619275, + 620870, + 621479, + 623050, + 626338, + 626408, + 626779, + 626796, + 627490, + 628540, + 633797, + 637614, + 640735, + 640737, + 641071, + 643690, + 644230, + 646119, + 646166, + 648387, + 649674, + 651020, + 658209 + ], + "epoch" : 1329968436, + "timestamp" : "2012-02-23T03:40:36Z", + "version" : "3.9.3.0" + }, + { + "author" : "Russ Allbery <rra@debian.org>", + "changes" : [ + "", + "debian-policy (3.9.2.0) unstable; urgency=low", + "", + " * Policy: Require human Maintainer or Uploader, clarify Maintainer", + " Wording: Russ Allbery <rra@debian.org>", + " Seconded: Charles Plessy <plessy@debian.org>", + " Seconded: Raphaël Hertzog <hertzog@debian.org>", + " Closes: #459868, #581011", + " * Policy: Add an FHS exception on GNU/Hurd for /hurd and /servers", + " Wording: Russ Allbery <rra@debian.org>", + " Seconded: Andrew McMillan <andrew@morphoss.com>", + " Seconded: Guillem Jover <guillem@debian.org>", + " Closes: #594658", + " * Policy: Document DM-Upload-Allowed", + " Wording: Charles Plessy <plessy@debian.org>", + " Seconded: Andrew McMillan <andrew@morphoss.com>", + " Seconded: Russ Allbery <rra@debian.org>", + " Closes: #588014", + " * Policy: Update multiarch FHS exception for i386 naming", + " Wording: Steve Langasek <vorlon@debian.org>", + " Seconded: Aurelien Jarno <aurelien@aurel32.net>", + " Seconded: Raphael Hertzog <hertzog@debian.org>", + " Closes: #619186", + " * Policy: Significant additions to maintainer script documentation", + " Wording: Russ Allbery <rra@debian.org>", + " Seconded: Steve Langasek <vorlon@debian.org>", + " Seconded: Raphaël Hertzog <hertzog@debian.org>", + " Closes: #504880", + " * Policy: Clarify format of Debian control fields", + " Wording: Charles Plessy <plessy@debian.org>", + " Seconded: Russ Allbery <rra@debian.org>", + " Seconded: Julien Cristau <jcristau@debian.org>", + " Closes: #501930, #593909", + " * Virtual: Added mailx as a new virtual package", + " Wording: Russ Allbery <rra@debian.org>", + " Seconded: Raphaël Hertzog <hertzog@debian.org>", + " Seconded: Giacomo A. Catenazzi <cate@debian.org>", + " Closes: #488214", + " * Be more verbose in defining the build architecture and the host", + " architecture and consistently refer to architecture rather than", + " machine. (Closes: #591857)", + " * Correct the name of the Filesystem Hierarchy Standard in the package", + " description. Patch from Christoph Anton Mitterer. (Closes: #590696)", + " * Use the word \"implemented\" to describe required targets in", + " debian/rules, which is clearer about allowing wildcard rules. List", + " the required rules in their own paragraph rather than with the", + " paragraph discussing non-interactivity, and explicitly mark all rules", + " as either required or optional. (Closes: #536790)", + " * Update the ldconfig footnote listing the /etc/ld.so.conf directories", + " to remove the libc5 compatibility directories and mention the", + " multiarch triplet directories. Based on a patch by Charles Plessy.", + " (Closes: #597074)", + " * Add introductory paragraphs for each archive area explaining briefly", + " the purpose of that archive area. Based on a proposal by CJ", + " Fearnley. (Closes: #594542)", + " * Change all non-historical references to Debian GNU/Linux to simply", + " Debian since Debian now includes FreeBSD-based architectures. Patch", + " from Guillem Jover. (Closes: #594656)", + " * Remove references to the obsolete debmake package.", + " * Update the list of Policy maintainers.", + " * Wrap Uploaders in debian/control.", + " * Move Build-Depends-Indep to Build-Depends (there's no reason to use", + " -Indep in a package that builds only architecture-independent binary", + " packages), wrap it, and remove version restrictions that are older", + " than the version in oldstable.", + " * Add emacs23 to the build dependencies and remove the files generated", + " from org source from the revision control repository. Build and clean", + " files from org source unconditionally. Add Process.{txt,html} to the", + " list of files generated from org source. (Closes: #594274)", + " * Fix URLs under www.freedesktop.org to avoid permanent redirects.", + " Thanks, David Prévot. (Closes: #606869)", + " * Add a cross-reference to the Pre-Depends requirement in 3.5 to section", + " 7.2 where Pre-Depends is defined. Thanks, Mattias Ellert and Jonathan", + " Nieder. (Closes: #599944)", + " * Include the new (optional) copyright format that was drafted as DEP-5.", + " This is not yet a final version; that's expected to come in the", + " 3.9.3.0 release. Thanks to all the DEP-5 contributors and to Lars", + " Wirzenius and Charles Plessy for the integration into the Policy", + " package. (Closes: #609160)" + ], + "closes" : [ + 459868, + 488214, + 501930, + 504880, + 536790, + 581011, + 588014, + 590696, + 591857, + 593909, + 594274, + 594542, + 594656, + 594658, + 597074, + 599944, + 606869, + 609160, + 619186 + ], + "epoch" : 1302155335, + "timestamp" : "2011-04-07T05:48:55Z", + "version" : "3.9.2.0" + }, + { + "author" : "Russ Allbery <rra@debian.org>", + "changes" : [ + "", + "debian-policy (3.9.1.0) unstable; urgency=low", + "", + " * Policy: Include GPL version 1 in common-licenses", + " Wording: Russ Allbery <rra@debian.org>", + " Seconded: gregor herrmann <gregoa@debian.org>", + " Seconded: Damyan Ivanov <dmn@debian.org>", + " Seconded: Giacomo A. Catenazzi <cate@debian.org>", + " Closes: #436105", + " * Policy: Libtool *.la files should generally not be installed", + " Wording: Russ Allbery <rra@debian.org>", + " Seconded: Julien Cristau <jcristau@debian.org>", + " Seconded: Cyril Brulebois <kibi@debian.org>", + " Closes: #561413", + " * Policy: Require dpkg-divert --package when adding/removing diversions", + " Wording: Russ Allbery <rra@debian.org>", + " Seconded: Raphaël Hertzog <hertzog@debian.org>", + " Seconded: Raphael Geissert <geissert@debian.org>", + " Closes: #218897", + " * Policy: Remove encouragement to create shlibs.local", + " Wording: Russ Allbery <rra@debian.org>", + " Seconded: Julien Cristau <jcristau@debian.org>", + " Seconded: Jakub Wilk <jwilk@debian.org>", + " Seconded: Cyril Brulebois <kibi@debian.org>", + " * Policy: Document alternate SONAME format with version before .so", + " Wording: Russ Allbery <rra@debian.org>", + " Seconded: Julien Cristau <jcristau@debian.org>", + " Seconded: Raphaël Hertzog <hertzog@debian.org>", + " Closes: #509932", + " * Policy: Architecture wildcards also allowed in binary relationships", + " Wording: Russ Allbery <rra@debian.org>", + " Seconded: Guillem Jover <guillem@debian.org>", + " Seconded: Raphaël Hertzog <hertzog@debian.org>", + " Closes: #400322", + " * Policy: Say Conflicts should not be used unless necessary", + " Wording: Russ Allbery <rra@debian.org>", + " Seconded: Guillem Jover <guillem@debian.org>", + " Seconded: Jakub Wilk <jwilk@debian.org>", + " Closes: #402721", + " * Policy: Remove obsolete _REENTRANT, require thread-safe libraries", + " Wording: Russ Allbery <rra@debian.org>", + " Seconded: Kurt Roeckx <kurt@roeckx.be>", + " Seconded: Giacomo A. Catenazzi <cate@debian.org>", + " Closes: #475101", + " * Policy: Allow subdirectories of /usr/lib/cgi-bin to be used", + " Wording: Russ Allbery <rra@debian.org>", + " Seconded: Andrew McMillan <andrew@morphoss.com>", + " Seconded: Charles Plessy <plessy@debian.org>", + " Closes: #104373", + " * Policy: More specific requirements around date-based versions", + " Wording: Russ Allbery <rra@debian.org>", + " Seconded: Julien Cristau <jcristau@debian.org>", + " Seconded: Cyril Brulebois <kibi@debian.org>", + " Seconded: Steve Langasek <vorlon@debian.org>", + " Closes: #186102", + " * Policy: Require slave alternatives for manual pages", + " Wording: Russ Allbery <rra@debian.org>", + " Seconded: Guillem Jover <guillem@debian.org>", + " Seconded: Jakub Wilk <jwilk@debian.org>", + " Seconded: Emilio Pozuelo Monfort <pochu@debian.org>", + " Closes: #184064", + " * Policy: More explicit requirements around library SONAMEs", + " Wording: Russ Allbery <rra@debian.org>", + " Seconded: Raphaël Hertzog <hertzog@debian.org>", + " Seconded: Emilio Pozuelo Monfort <pochu27@gmail.com>", + " Closes: #509933", + " * Policy: Only dpkg-gencontrol supports variable substitutions", + " Wording: Charles Plessy <plessy@debian.org>", + " Seconded: Emilio Pozuelo Monfort <pochu@debian.org>", + " Seconded: Guillem Jover <guillem@debian.org>", + " Closes: #589609", + " * Policy: Ada Library Information files must be read-only", + " Wording: Russ Allbery <rra@debian.org>", + " Seconded: Emilio Pozuelo Monfort <pochu@debian.org>", + " Seconded: Ludovic Brenta <ludovic@ludovic-brenta.org>", + " Closes: #232448", + " * Policy: Recommend /etc/logrotate.d/package for logrotate rules", + " Wording: Russ Allbery <rra@debian.org>", + " Seconded: Guillem Jover <guillem@debian.org>", + " Seconded: Thijs Kinkhorst <thijs@debian.org>", + " Closes: #445203", + " * Policy: Allow /bin/sh scripts to rely on XSI for kill and trap", + " Wording: Russ Allbery <rra@debian.org>", + " Seconded: Giacomo A. Catenazzi <cate@debian.org>", + " Seconded: Raphael Geissert <geissert@debian.org>", + " Closes: #477240", + " * Policy: Ownership and permissions for control information files", + " Wording: Russ Allbery <rra@debian.org>", + " Seconded: Emilio Pozuelo Monfort <pochu@debian.org>", + " Seconded: Julien Cristau <jcristau@debian.org>", + " Closes: #555977", + " * Set the version of the Perl Policy to match the version of the Policy", + " package.", + " * Explain the Perl module package naming policy more explicitly and", + " provide some examples. (Closes: #175202)", + " * Revise the footnote discussing shlibs creation to not talk about the", + " switch to objdump as if it were a new innovation and to explicitly", + " mention the NEEDED attribute as the source of dependency information.", + " * Introduce \"control information file\" to refer to the contents of the", + " Debian package control.tar.gz, following the dpkg documentation. Use", + " that terminology consistently, and change possibly confusing", + " references to fields in control files to use \"control field\"", + " uniformly.", + " * Document that the first line of the changelog entry is conventionally", + " an explanation for the upload if the uploader is not the regular", + " maintainer. Patch from Charles Plessy. (Closes: #589605)", + " * Fix typo in upgrading-checklist. (Closes: #588750)", + " * Fix formatting error in footnote to 7.7. (Closes: #589362)", + " * Remove ancient Conflicts and Replaces." + ], + "closes" : [ + 104373, + 175202, + 184064, + 186102, + 218897, + 232448, + 400322, + 402721, + 436105, + 445203, + 475101, + 477240, + 509932, + 509933, + 555977, + 561413, + 588750, + 589362, + 589605, + 589609 + ], + "epoch" : 1280111901, + "timestamp" : "2010-07-26T02:38:21Z", + "version" : "3.9.1.0" + }, + { + "author" : "Russ Allbery <rra@debian.org>", + "changes" : [ + "", + "debian-policy (3.9.0.0) unstable; urgency=low", + "", + " [ Colin Watson ]", + " * Fix path to changelog.Debian.gz in footnote on documentation symlinks.", + "", + " [ Bill Allombert ]", + " * Convert upgrading-checklist to debiandoc-sgml. This generates a better", + " looking .txt file.", + " Closes: #567845", + " * Fix typo in package_upstream-version.orig.tar.gz.", + " Thanks, Salvatore Bonaccorso. (Closes: #558430)", + " * Replace 'copyright and distribution license' by 'copyright information", + " and distribution license' (three times).", + " Proposed by Jonathan Nieder.", + " Seconded: Steve Langasek <vorlon@debian.org>", + " Seconded: Thijs Kinkhorst <thijs@debian.org>", + " Seconded: Julien Cristau <jcristau@debian.org>", + " Seconded: Gregor Herrmann <gregoa@debian.org>", + " Closes: #566220", + " * extend UID range of user accounts by removing the 30000-59999 reserved", + " ranges.", + " Proposed by Santiago Vila", + " Seconded: Russ Allbery <rra@debian.org>", + " Seconded: Luk Claes <luk@debian.org>", + " Seconded: Raphael Hertzog <hertzog@debian.org>", + " Seconded: Steve Langasek <vorlon@debian.org>", + " Closes: #582495", + "", + " [ Russ Allbery ]", + " * Policy: Overhaul Breaks, Conflicts, Provides, and Replaces", + " Wording: Russ Allbery <rra@debian.org>", + " Seconded: Steve Langasek <vorlon@debian.org>", + " Seconded: Raphael Hertzog <hertzog@debian.org>", + " Closes: #578854", + " * Policy: Support for architecture wildcards", + " Wording: Manoj Srivastava <srivasta@debian.org>", + " Wording: Russ Allbery <rra@debian.org>", + " Seconded: Guillem Jover <guillem@debian.org>", + " Seconded: Andrew McMillan <andrew@morphoss.com>", + " Seconded: Steve Langasek <vorlon@debian.org>", + " Closes: #530687", + " * Policy: Except init.d scripts from the normal set -e requirement", + " Wording: Russ Allbery <rra@debian.org>", + " Seconded: Raphael Hertzog <hertzog@debian.org>", + " Seconded: Guillem Jover <guillem@debian.org>", + " Closes: #562506", + " * Policy: Maintainer scripts might not have a controlling terminal", + " Wording: Russ Allbery <rra@debian.org>", + " Seconded: Guillem Jover <guillem@debian.org>", + " Seconded: Andrew McMillan <andrew@morphoss.com>", + " Seconded: Steve Langasek <vorlon@debian.org>", + " Closes: #224509", + " * Policy: Fully specify the date format for changelog entries", + " Wording: Charles Plessy <plessy@debian.org>", + " Seconded: Russ Allbery <rra@debian.org>", + " Seconded: Andrew McMillan <andrew@morphoss.com>", + " Seconded: Giacomo A. Catenazzi <cate@debian.org>", + " Closes: #569174", + " * Policy: Deprecate /usr/share/common-licenses/BSD", + " Wording: Russ Allbery <rra@debian.org>", + " Seconded: Emilio Pozuelo Monfort <pochu@debian.org>", + " Seconded: Jakub Wilk <jwilk@debian.org>", + " Seconded: gregor herrmann <gregoa@debian.org>", + " Closes: #284340", + " * Policy: Document Checksums-Sha1 and Checksums-Sha256", + " Wording: Russ Allbery <rra@stanford.edu>", + " Seconded: Julien Cristau <jcristau@debian.org>", + " Seconded: Emilio Pozuelo Monfort <pochu@debian.org>", + " Closes: #478295", + " * Policy: Prohibit duplicate field names in a control paragraph", + " Wording: Russ Allbery <rra@debian.org>", + " Seconded: Charles Plessy <plessy@debian.org>", + " Seconded: Steve Langasek <vorlon@debian.org>", + " Seconded: Emilio Pozuelo Monfort <pochu@debian.org>", + " Closes: #555978", + " * Policy: Relax requirement that library dev files be in one package", + " Wording: Russ Allbery <rra@debian.org>", + " Seconded: Julien Cristau <jcristau@debian.org>", + " Seconded: Andrew McMillan <andrew@morphoss.com>", + " Closes: #347581", + " * Policy: Tighten requirements for maintainer-like fields", + " Wording: Russ Allbery <rra@debian.org>", + " Seconded: Emilio Pozuelo Monfort <pochu@debian.org>", + " Seconded: Andrew McMillan <andrew@morphoss.com>", + " Closes: #575639", + " * Policy: Update Format control field documentation", + " Wording: Russ Allbery <rra@debian.org>", + " Wording: Charles Plessy <plessy@debian.org>", + " Seconded: Charles Plessy <plessy@debian.org>", + " Seconded: Emilio Pozuelo Monfort <pochu27@gmail.com>", + " Closes: #547272", + " * Debconf: Add SETTITLE, like title but uses a template", + " Wording: Frans Pop <elendil@planet.nl>", + " Seconded: Russ Allbery <rra@debian.org>", + " Seconded: Ben Pfaff <blp@cs.stanford.edu>", + " Closes: #560411", + " * Perl Policy: Change perlapi provides to use an ABI version", + " Wording: Niko Tyni <ntyni@debian.org>", + " Seconded: Russ Allbery <rra@debian.org>", + " Seconded: Brendan O'Dea <bod@debian.org>", + " Seconded: Damyan Ivanov <dmn@debian.org>", + " Closes: #579457", + " * Perl Policy: Recommend DESTDIR instead of PREFIX with Makefile.PL", + " Wording: Niko Tyni <ntyni@debian.org>", + " Seconded: Russ Allbery <rra@debian.org>", + " Seconded: Raphael Hertzog <hertzog@debian.org>", + " Closes: #579461", + " * Standardize dpkg state wording and bring it in line with dpkg,", + " renaming Failed-Config to Half-Configured and use uniform", + " capitalization and punctuation. (Closes: #442134)", + " * Remove documentation of alternative changelog formats. This feature", + " is not allowed in the Debian archive and will be documented in the", + " dpkg-dev documentation instead. The documentation that was in Policy", + " was also somewhat outdated. (Closes: #555009, see #584141)", + " * Remove obsolete footnote sentence saying that dpkg-statoverride is a", + " new feature and not well-known. (Closes: #563425)", + " * Clarify in the Perl Policy that perl-base is essential, not perl, and", + " don't imply packages need to depend on perl-base. (Closes: #576594)", + " * Document the special debian-installer section in the list of current", + " sections and add a link to the list of sections in unstable, which", + " contains longer descriptions. (Closes: #577666)", + " * Remove the footnote listing every architecture known to dpkg. This", + " list can be trivially produced by dpkg-architecture -L (already", + " noted), is very long, and quickly becomes out-of-date.", + " * Move silly version ordering example to a footnote. (Closes: #560839)", + " * Reletter the process steps to not skip State C and use more", + " traditional foreground and background colors for Process.html and", + " README.html. (Closes: #584521)", + " * Fix typo in footnote about help2man. (Closes: #584796)", + " * Add an example for Replaces when a package is split. Thanks, Uwe", + " Kleine-König. (Closes: #572253)", + " * Explicitly state that packages may remove unmodified, obsolete", + " configuration files during upgrade. (Closes: #470633)", + " * Clarify the wording around which build dependencies must be satisfied", + " for different debian/rules targets and add a footnote to the", + " description of the build-arch and build-indep targets explaining why", + " this split does not currently work as desired. (Closes: #328951)", + " * Avoid \"Debianised\" or \"Debianized\" in favor of just \"Debian\" or", + " \"Debian package\" as appropriate. Patch from Ben Finney.", + " (Closes: #586163)", + " * Switch to source format 3.0 (native)." + ], + "closes" : [ + 224509, + 284340, + 328951, + 347581, + 442134, + 470633, + 478295, + 530687, + 547272, + 555009, + 555978, + 558430, + 560411, + 560839, + 562506, + 563425, + 566220, + 567845, + 569174, + 572253, + 575639, + 576594, + 577666, + 578854, + 579457, + 579461, + 582495, + 584521, + 584796, + 586163 + ], + "epoch" : 1277700052, + "timestamp" : "2010-06-28T04:40:52Z", + "version" : "3.9.0.0" + }, + { + "author" : "Bill Allombert <ballombe@debian.org>", + "changes" : [ + "", + "debian-policy (3.8.4.0) unstable; urgency=low", + "", + " [ Bill Allombert ]", + " * Also provide documents in single-file HTML format.", + " Proposed by Jari Aalto.", + " Closes: #544353", + " * Number the DFSG points like in the social_contract document.", + " Proposed by Enrico Zini.", + " Closes: #550192", + "", + " [ Manoj Srivastava ]", + " * [b270d2d]: Typo fix: relayed -> related. Thanks to Matt Kraai for", + " pointing this out.", + " * [c74ac74]:", + " Policy: Grant an FHS exception for the multiarch library directories", + " Wording: Steve Langasek.", + " Seconded: Aurelien Jarno", + " Seconded: Julien Cristau", + " Seconded: Kurt Roeckx", + " Closes: #542865", + " * [7ac3ee6]:", + " virtual package list: Added Doom virtual packages", + " Wording: Manoj Srivastava", + " Seconded: Russ Allbery", + " Seconded: Giacomo A. Catenazzi", + " Closes: #518199", + " * [8fd91a0]", + " README Process upgrading-checklist: Created/converted to org-mode", + " Wording: Manoj Srivastava", + " Seconded: Russ Allbery", + " Closes: #545548", + " * [4da0692]: [typo-fixes]:", + " policy: Fix a number of grammatical or typographical errors", + " wording: Eric Dantan Rzewnicki", + " Seconded: Manoj Srivastava", + " * [112c4bc]: FHS Exceptions", + " policy: Explicitly allow /selinux and /sys as FHS exceptions", + " Wording: Manoj Srivastava", + " Seconded: Russ Allbery <rra@debian.org>", + " Seconded: Kurt Roeckx <kurt@roeckx.be>", + " Closes: #556972", + " This patch explicitly allows /sys and /selinux as additional", + " directories in the root file system allowed under the policy.", + " * [16afbcb]: Clarify ./debian/rules #! line", + " policy: Clarify rule for debian/rules shebang line", + " Wording: Ben Finney <ben+debian@benfinney.id.au>", + " Seconded: Kurt Roeckx <kurt@roeckx.be>", + " Seconded: Russ Allbery <rra@debian.org>", + " Seconded: Manoj Srivastava <srivasta@debian.org>", + " Explicitly state that \"make -f debian/rules\" and \"./debian/rules\"", + " must behave identically, to prevent confusion, and to promote", + " reproducibility, and conform to the principle of least surprise.", + " * [dab93b2]: Add a cron-daemon virtual package", + " policy, virtual package list: New virtual package: cron-daemon", + " wording: Javier Fernández-Sanguino Peña, Manoj Srivastava", + " Seconded: Russ Allbery <rra@debian.org>", + " Seconded: Kurt Roeckx <kurt@roeckx.be>", + " Closes: #391836", + " Create a virtual cron daemon package that:", + " - Has to provide /usr/bin/crontab and support crontab entries", + " - Correct execution of /etc/cron.d", + " - Correct support of /etc/crontab", + " - Support of crontab entries with names for days and months,", + " ranges, step values", + " - Correct execution of /etc/cron.{hourly,daily,weekly,monthly}", + "", + " [ Russ Allbery ]", + " * Policy: Clarify policy on named pipes in packages", + " Wording: Russ Allbery <rra@debian.org>", + " Seconded: Manoj Srivastava <srivasta@debian.org>", + " Seconded: Andrew McMillan <andrew@morphoss.com>", + " * Change the sole occurrence of MUST to must for consistency and to", + " avoid confusion with IETF RFC keywords. Thanks, Jakub Wilk.", + " (Closes: #552757)" + ], + "closes" : [ + 391836, + 518199, + 542865, + 544353, + 545548, + 550192, + 552757, + 556972 + ], + "epoch" : 1264616563, + "timestamp" : "2010-01-27T18:22:43Z", + "version" : "3.8.4.0" + }, + { + "author" : "Russ Allbery <rra@debian.org>", + "changes" : [ + "", + "debian-policy (3.8.3.0) unstable; urgency=low", + "", + " * Policy: Bring Architecture description in line with dpkg-source", + " Wording: Russ Allbery <rra@debian.org>", + " Seconded: Raphael Hertzog <hertzog@debian.org>", + " Seconded: Manoj Srivastava <srivasta@debian.org>", + " Closes: #530967", + " * Policy: Update information about DEB_*_ARCH variables", + " Wording: Guillem Jover <guillem@debian.org>", + " Seconded: Russ Allbery <rra@debian.org>", + " Seconded: Andrew McMillan <andrew@morphoss.com>", + " Closes: #527871", + " * Policy: Remove support for uploads to multiple distributions", + " Wording: Russ Allbery <rra@debian.org>", + " Seconded: Raphael Hertzog <hertzog@debian.org>", + " Seconded: Manoj Srivastava <srivasta@debian.org>", + " Closes: #514919", + " * Policy: Remove permission for packages to modify ld.so.conf", + " Wording: Steve Langasek <vorlon@debian.org>", + " Seconded: Russ Allbery <rra@debian.org>", + " Seconded: Kurt Roeckx <kurt@roeckx.be>", + " Seconded: Adeodato Simó <dato@net.com.org.es>", + " Seconded: Julien Cristau <jcristau@debian.org>", + " Closes: #519941", + " * Policy: Clarify X installation directory handling", + " Wording: Russ Allbery <rra@debian.org>", + " Seconded: Julien Cristau <jcristau@debian.org>", + " Seconded: Manoj Srivastava <srivasta@debian.org>", + " Seconded: Raphaël Hertzog <hertzog@debian.org>", + " Closes: #522217", + " * Policy: Localized man pages should be up-to-date or warn", + " Wording: Russ Allbery <rra@debian.org>", + " Seconded: Julien Cristau <jcristau@debian.org>", + " Seconded: Raphaël Hertzog <hertzog@debian.org>", + " Closes: #493007", + " * Policy: Remove restriction on manual page character encoding", + " Wording: Colin Watson <cjwatson@debian.org>", + " Seconded: Russ Allbery <rra@debian.org>", + " Seconded: Manoj Srivastava <srivasta@golden-gryphon.com>", + " Closes: #537707", + " * Policy: Allow Binary field to span multiple lines", + " Wording: Russ Allbery <rra@debian.org>", + " Seconded: Julien Cristau <jcristau@debian.org>", + " Seconded: Guillem Jover <guillem@debian.org>", + " Closes: #533852", + " * Policy: Revise info requirements for triggerized install-info", + " Wording: Russ Allbery <rra@debian.org>", + " Seconded: Guillem Jover <guillem@debian.org>", + " Seconded: Raphaël Hertzog <hertzog@debian.org>", + " Closes: #538665", + " * Perl Policy: Remove obsolete dependency requirements", + " Wording: Cyril Brulebois <kibi@debian.org>", + " Seconded: Russ Allbery <rra@debian.org>", + " Seconded: Manoj Srivastava <srivasta@debian.org>", + " Closes: #525190", + " * Breaks is now supported by the stable release of dpkg, so drop", + " warnings against its use. Thanks, Steve Langasek. (Closes: #533577)", + " * Add references to the sections on Breaks and Conflicts to the section", + " on binary dependencies. Thanks, Frank Küster. (Closes: #529771)", + " * Clarify the units of Installed-Size and document that it is an", + " approximation. Thanks, Martin Dorey. (Closes: #534408)", + " * Don't suggest calling dpkg-statoverride --remove unconditionally in", + " the postrm script. Thanks, Patrick Schoenfeld. (Closes: #539389)", + " * Explain that the copyright dates are for the original Policy manual", + " and that there is no updated list of copyright holders for subsequent", + " revisions available. (Partly addresses #47438)", + " * Clarify the description of the Files control field and add examples.", + " * Change the wording of the Description and Changes field specifications", + " for *.changes files to more closely match the wording for Files and", + " add more details about the contents of the Description field in", + " a *.changes file.", + " * Merge the package name syntax requirements between the Package and", + " Source field descriptions.", + " * Say that sensible-editor and sensible-pager are provided by the", + " sensible-utils package, not by the base system. Thanks, Clint Adams", + " and Steve Langasek. (Closes: #541537)", + " * Document that control field values are case-sensitive unless the field", + " description says otherwise." + ], + "closes" : [ + 493007, + 514919, + 519941, + 522217, + 525190, + 527871, + 529771, + 530967, + 533577, + 533852, + 534408, + 537707, + 538665, + 539389, + 541537 + ], + "epoch" : 1250381606, + "timestamp" : "2009-08-16T00:13:26Z", + "version" : "3.8.3.0" + }, + { + "author" : "Bill Allombert <ballombe@debian.org>", + "changes" : [ + "", + "debian-policy (3.8.2.0) unstable; urgency=low", + "", + " [ Russ Allbery ]", + " * Policy: Mandate debconf or equivalent for user prompting", + " Wording: Andrew McMillan <awm@debian.org>", + " Seconded: Russ Allbery <rra@debian.org>", + " Seconded: Holger Levsen <holger@layer-acht.org>", + " Seconded: Bill Allombert <Bill.Allombert@math.u-bordeaux1.fr>", + " Seconded: Julien Cristau <jcristau@debian.org>", + " Closes: #206684", + " * Policy: Remove /etc/X11/XF86Config-4 FHS exception", + " Wording: Julien Cristau <jcristau@debian.org>", + " Seconded: Russ Allbery <rra@debian.org>", + " Seconded: Bill Allombert <Bill.Allombert@math.u-bordeaux1.fr>", + " Closes: #522219", + " * Policy: Remove obsolete /var/mail transition requirement", + " Wording: Russ Allbery <rra@debian.org>", + " Seconded: Julien Cristau <jcristau@debian.org>", + " Seconded: Andrew McMillan <andrew@morphoss.com>", + " Closes: #522364", + " * Policy: Move Speedo fonts into the deprecated category", + " Wording: Julien Cristau <jcristau@debian.org>", + " Seconded: Russ Allbery <rra@debian.org>", + " Seconded: Julien Danjou <acid@debian.org>", + " Closes: #522218", + " * Housekeeping (resynchronizing lists maintained elsewhere):", + " - Add GFDL 1.3 to the common-licenses list.", + " - Update the list of archive sections. (Closes: #519835)", + " * Set the release date of the 3.8.1 upgrading-checklist entry.", + " (Closes: #519706)", + "", + " [ Colin Watson ]", + " * The FHS is the \"Filesystem Hierarchy Standard\", regardless of our", + " preferred spelling of \"file system\" elsewhere. Fix this and a nearby", + " search-and-replace capitalisation bug.", + " * Build-depend on texlive-latex-extra, which is needed by", + " debiandoc2latexps and isn't included in texlive's dependencies.", + " Closes: #533257", + " * Policy: State requirements for source package names", + " Wording: Colin Watson <cjwatson@debian.org>", + " Seconded: Russ Allbery <rra@debian.org>", + " Seconded: Julien Cristau <jcristau@debian.org>", + " Closes: #525151", + " * Add myself to Uploaders.", + "", + " [ Bill Allombert ]", + " * Add myself to Uploaders.", + " * Update Standards-Version to 3.8.1 (no changes required).", + " * debian/rules:", + " - use `dpkg --print-architecture' instead of obsolete form", + " `dpkg --print-installation-architecture'.", + " - fix a race condition while generating DEBIAN/md5sums." + ], + "closes" : [ + 206684, + 519706, + 519835, + 522218, + 522219, + 522364, + 525151, + 533257 + ], + "epoch" : 1245181373, + "timestamp" : "2009-06-16T19:42:53Z", + "version" : "3.8.2.0" + }, + { + "author" : "Russ Allbery <rra@debian.org>", + "changes" : [ + "", + "debian-policy (3.8.1.0) unstable; urgency=low", + "", + " * Policy: Clarify what \"sensible behavior\" is for init scripts", + " Wording: Steve Langasek <vorlon@debian.org>", + " Seconded: Raphaël Hertzog <hertzog@debian.org>", + " Seconded: Russ Allbery <rra@debian.org>", + " Closes: #426877", + " * Policy: Remove alternative changelog formats from main manual", + " Wording: Russ Allbery <rra@debian.org>", + " Seconded: Ben Pfaff <blp@cs.stanford.edu>", + " Seconded: Guillem Jover <guillem@debian.org>", + " Closes: #489460", + " * Policy: Mandate UTF-8 for changelog files", + " Wording: Russ Allbery <rra@debian.org>", + " Seconded: Guillem Jover <guillem@debian.org>", + " Seconded: Kurt Roeckx <kurt@roeckx.be>", + " Closes: #241333", + " * Policy: Mandate UTF-8 for control files", + " Wording: Russ Allbery <rra@debian.org>", + " Seconded: Kurt Roeckx <kurt@roeckx.be>", + " Seconded: Raphaël Hertzog <hertzog@debian.org>", + " Closes: #143941", + " * Policy: New option in DEB_BUILD_OPTIONS to avoid running test-suites", + " Wording: Russ Allbery <rra@debian.org>", + " Seconded: Guillem Jover <guillem@debian.org>", + " Seconded: Raphaël Hertzog <hertzog@debian.org>", + " Closes: #416450", + " * Policy: Expand expected capabilities for local in /bin/sh scripts", + " Wording: Russ Allbery <rra@debian.org>", + " Seconded: Guillem Jover <guillem@debian.org>", + " Seconded: Raphaël Hertzog <hertzog@debian.org>", + " Closes: #473019", + " * Policy: Clarify Essential definition and caution when adding to it", + " Wording: Russ Allbery <rra@debian.org>", + " Seconded: Jörg Sommer <joerg@alea.gnuu.de>", + " Seconded: Guillem Jover <guillem@debian.org>", + " Closes: #479080", + " * Policy: Allow user mail spools to be mode 0600 or 0660", + " Wording: Russ Allbery <rra@debian.org>", + " Seconded: Kurt Roeckx <kurt@roeckx.be>", + " Seconded: Andrew McMillan <awm@debian.org>", + " Closes: #470994", + " * Policy: Remove special handling of init scripts ending in .sh", + " Wording: Kel Modderman <kel@otaku42.de>", + " Seconded: Russ Allbery <rra@debian.org>", + " Seconded: Henrique de Moraes Holschuh <hmh@debian.org>", + " Closes: #513955", + " * Policy: /var/run and /var/lock may be volatile", + " Wording: Colin Watson <cjwatson@debian.org>", + " Seconded: Russ Allbery <rra@debian.org>", + " Seconded: Bill Allombert <Bill.Allombert@math.u-bordeaux1.fr>", + " Closes: #514326", + " * Policy: debian/control allows comments starting with #", + " Wording: Russ Allbery <rra@debian.org>", + " Seconded: Julien Cristau <jcristau@debian.org>", + " Seconded: Adeodato Simó <dato@net.com.org.es>", + " Seconded: Guillem Jover <guillem@debian.org>", + " Closes: #446712", + " * Improve the documentation of maintainer script actions for diversions", + " in the informative appendix to allow for addition of a new diversion", + " on upgrade and handle error cases correctly. Thanks to Olivier Berger", + " for the report and Raphaël Hertzog for the review. (Closes: #483418)", + " * Clarify the meaning of architecture restrictions on build dependencies", + " in the presence of alternatives. Thanks to Guillem Jover for the", + " explanation and review and Emilio Pozuelo Monfort and Don Armstrong", + " for wording review. (Closes: #163666)", + " * Change the term \"category\" to \"archive area\" when referring to main,", + " contrib, and non-free. This is closer to the wording of the Social", + " Contract. (Closes: #473439)", + " * Use <user>:<group> notation rather than <user>.<group> notation in", + " multiple places. Thanks, Kurt Roeckx. (Closes: #488039)", + " * Fix typo in 3.8.0.0 upgrading-checklist entry. Patch from Kobayashi", + " Noritada. (Closes: #487701)", + " * Mention debugging packages as an explicit example of packages with", + " extra priority. Thanks, Charles Plessy. (Closes: #491985)", + " * Clarify that translation is only required for user-visible debconf", + " messages. Capitalize \"Debian Configuration Management Specification\"", + " uniformly. Thanks, Julian Andres Klode. (Closes: #492624)", + " * Add --wildcards to the sample tar command in appendix B.1 for", + " extracting the package copyright file, adjusting for new tar option", + " behavior. Thanks, Yan Morin. (Closes: #503685)", + " * Reword the requirement that maintainer scripts exit with a zero", + " status on success to avoid double-negatives.", + " * Include the full name of each menu category rather than only the", + " portion relative to the parent heading to be clearer in long category", + " lists. Thanks, Christoph Berg. (Closes: #511804)", + " * Build-Depend on texlive rather than tetex-extra. texlive appears to", + " be sufficient for how Policy uses debiandoc-sgml and pulls in far", + " fewer packages.", + " * Remove the postinst and prerm scripts. doc-base registration is now", + " handled by triggers and no longer required and removal of /usr/doc", + " links was completed long ago.", + " * Reference GPL-2 rather than the GPL symlink in debian/copyright." + ], + "closes" : [ + 143941, + 163666, + 241333, + 416450, + 426877, + 446712, + 470994, + 473019, + 473439, + 479080, + 483418, + 487701, + 488039, + 489460, + 491985, + 492624, + 503685, + 511804, + 513955, + 514326 + ], + "epoch" : 1236829852, + "timestamp" : "2009-03-12T03:50:52Z", + "version" : "3.8.1.0" + }, + { + "author" : "Russ Allbery <rra@debian.org>", + "changes" : [ + "", + "debian-policy (3.8.0.1) unstable; urgency=low", + "", + " * Don't attempt to register the non-existent debian-policy-process", + " document. Thanks, Adrian von Bidder. (Closes: #484706)" + ], + "closes" : [ + 484706.0 + ], + "epoch" : 1212696781, + "timestamp" : "2008-06-05T20:13:01Z", + "version" : "3.8.0.1" + }, + { + "author" : "Russ Allbery <rra@debian.org>", + "changes" : [ + "", + "debian-policy (3.8.0.0) unstable; urgency=low", + "", + " * Bug fix: \"[PROPOSAL] \"debian/README.source\" file for packages with", + " non-trivial source\", thanks to Wouter Verhelst, Jörg Sommer, Colin Watson,", + " and Junichi Uekawa (Closes: #250202).", + " * Bug fix: \"[AMENDMENT 11/02/2008] Manual page encoding\", thanks to", + " Colin Watson (Closes: #440420).", + " * Bug fix: \"[PROPOSAL] common interface for parallel building in", + " DEB_BUILD_OPTIONS\", thanks to Loïc Minier, Peter Samuelson, and Robert", + " Millan (Closes: #209008).", + " * Bug fix: \"Please clarify splitting/syntax of DEB_BUILD_OPTIONS\", thanks to", + " Loïc Minier, Peter Samuelson, Robert Millan, and Guillem Jover", + " (Closes: #430649).", + " * Bug fix: \"Documentation for Breaks in dpkg\", thanks to Ian Jackson", + " (Closes: #379150).", + " * Bug fix: \"support for wrapped Uploaders should now be mandatory\"", + " (Closes: #431813).", + " * Bug fix: \"[PROPOSAL] Add should not embed code from other packages\",", + " thanks to Neil McGovern, Colin Watson, Bill Allombert, Steve Langasek,", + " Kurt Roeckx, and others (Closes: #392362).", + " * Bug fix: \"Homepage field in debian/control undocumented\", thanks to", + " Mario Iseli (Closes: #452105).", + " * Bug fix: \"Policy inconsistent with reality: base subsection no longer", + " used\", thanks to Magnus Holmgren, Bernd Zeimetz, and Colin Watson", + " (Closes: #442070).", + " * Bug fix: \"Inclusion of Apache Software License versions in", + " /usr/share/common-licenses\", thanks to Barry Hawkins (Closes: #291460).", + " * Bug fix: \"[Amended] copyright should include notice if a package is", + " not a part of Debian distribution\", thanks to Taketoshi Sano", + " (Closes: #65577).", + " * Bug fix: \"scripts as configuration files: should vs. must\", thanks to Frank", + " Küster (Closes: #403391).", + " * Bug fix: \"debconf specification should allow underscores in template", + " names\", thanks to Colin Watson (Closes: #473761).", + " * Bug fix: \"clarify handling of run-time and compile-time support programs\",", + " thanks to Goswin Brederlow and Raphael Hertzog (Closes: #367984).", + " * Policy: better document version ranking and empty Debian revisions", + " Wording: Russ Allbery <rra@debian.org>", + " Seconded: Raphaël Hertzog <hertzog@debian.org>", + " Seconded: Manoj Srivastava <srivasta@debian.org>", + " Seconded: Guillem Jover <guillem@debian.org>", + " Closes: #186700, #458910", + " * Policy: remove obsolete app-defaults and Xresources provisions", + " Wording: Julien Cristau <jcristau@debian.org>", + " Seconded: Russ Allbery <rra@debian.org>", + " Closes: #480551", + " * Bug fix: \"Examples of dpkg frontends should mention apt now\", thanks", + " to Josh Triplett (Closes: #455602).", + " * Bug fix: \"Minor typos and wording suggestions\", thanks to Michael", + " Tautschnig (Closes: #422552).", + " * Bug fix: \"substvar reference moved from dpkg-source(1) to", + " deb-substvars(5)\", thanks to Ian Beckwith (Closes: #475731).", + " * Policy: bugs fixed in NMUs are now closed rather than marked fixed", + " Wording: Russ Allbery <rra@debian.org> (thanks, Sandro Tosi)", + " Closes: #481640", + " * Policy: C.1.4, C.1.8: minor typos", + " Wording: Sandro Tosi <matrixhasu@gmail.com>", + " Closes: #481954", + " * Remove the now-obsolete policy-process document.", + " * Add an md5sums control file.", + " * Add Vcs-Browser and Vcs-Git control fields.", + " * Remove build system support for FHS 2.1 and FSSTND, mostly commented out.", + " * Remove more temporary files created by the build.", + " * Remove the FSSTND license from debian/copyright; no FSSTND files are", + " currently part of policy.", + " * Update FHS copyright dates in debian/copyright.", + " * Standardize the spacing around headings in upgrading-checklist.html.", + " * Remove old ChangeLog files and metadata headers in maintainer scripts", + " and debian/rules." + ], + "closes" : [ + 65577, + 186700, + 209008, + 250202, + 291460, + 367984, + 379150, + 392362, + 403391, + 422552, + 430649, + 431813, + 440420, + 442070, + 452105, + 455602, + 458910, + 473761, + 475731, + 480551, + 481640, + 481954 + ], + "epoch" : 1212620007, + "timestamp" : "2008-06-04T22:53:27Z", + "version" : "3.8.0.0" + }, + { + "author" : "Russ Allbery <rra@debian.org>", + "changes" : [ + "", + "debian-policy (3.7.3.0) unstable; urgency=low", + "", + " * Bug fix: \"FTBFS if built twice in a row\" (Closes: #424212).", + " * Bug fix: \"[PROPOSAL] Document ~ behavior in version numbers\", thanks", + " to Nicolas François and Marc Brockschmidt (Closes: #382612).", + " * Bug fix: \"Please add 'local' to list of supra-POSIX features that", + " /bin/sh can be expected to offer\". Also add test -a/-o binary logical", + " operators and change references from POSIX to SUSv3 (Closes: #294962).", + " * Bug fix: \"[Proposal] new Debian menu structure\", thanks to Bill", + " Allombert (Closes: #361418).", + " * Bug fix: \"typo: \"must not be not world-writable\"\", thanks to Sam", + " Hocevar (Closes: #392594).", + " * Bug fix: \"debian-policy: recommend binary:Version substvar instead\",", + " thanks to Guillem Jover (Closes: #418444).", + " * Bug fix: \"New virtual package: dictd-dictionary\", thanks to Tatsuya", + " Kinoshita (Closes: #413575).", + " * The virtual package in use is inet-superserver, not inetd-superserver.", + " Adjust the virtual package list to match. Thanks, Tatsuya Kinoshita", + " and Marco d'Itri.", + " * Wrapped, cleaned up trailing whitespace, and alphabetized the list of", + " virtual packages.", + " * Bug fix: \"Small spelling errors and erratic sentences in debian-policy\",", + " thanks to Michiel de Boer. (Closes: #435207).", + " * Bug fix: \"Source field of .changes files may contain a version number\"", + " (Closes: #431813).", + " * Bug fix: \"822-date is deprecated (use date -R instead)\" (Closes: #448035).", + " * Bug fix: \"5.6.17 (Urgency) should list emergency, maybe a normative", + " list?\" (Closes: #412634).", + " * Bug fix: \"[PROPOSAL] Document support of package types in shlibs", + " files\", thanks to Franz Pop and Raphaël Hertzog (Closes: #363133).", + " * Bug fix: \"Introduce a requirement for internationalisation of debconf", + " templates\", thanks to Christian Perrier (Closes: #402975).", + " * Bug fix: \"GFDL is now in common-licenses\". Also add the rest of the", + " specific license versions and the GPLv3 (Closes: #420701).", + " * Bug fix: \"Virtual package for Japanese font packages", + " (ttf-japanese-mincho and ttf-japanese-gothic)\", thanks to Nobuhiro", + " Iwamatsu (Closes: #440931).", + " * Drop unsupported docbook-xml format from the doc-base file for the", + " debconf specification.", + " * Remove inactive uploaders and add Russ Allbery.", + " * Update Standards-Version to 3.7.3 (no changes required)." + ], + "closes" : [ + 294962, + 361418, + 363133, + 382612, + 392594, + 402975, + 412634, + 413575, + 418444, + 420701, + 424212, + 431813, + 435207, + 440931, + 448035 + ], + "epoch" : 1196663635, + "timestamp" : "2007-12-03T06:33:55Z", + "version" : "3.7.3.0" + }, + { + "author" : "Manoj Srivastava <srivasta@debian.org>", + "changes" : [ + "", + "debian-policy (3.7.2.2) unstable; urgency=low", + "", + " * Bug fix: \"clarify 12.3 Additional documentation\", thanks to Peter", + " Eisentraut (Closes: #367697).", + " * Bug fix: \"debian-policy: s/dependcy/dependency/\", thanks to Justin", + " Pryzby (Closes: #375508).", + " * Bug fix: \"various spelling mistakes\", thanks to Nico Golde", + " (Closes: #375728).", + " * Bug fix: \"debian-policy: typo\", thanks to Peter Samuelson", + " (Closes: #376104).", + " * Bug fix: \"debian-policy: [PROPOSAL] maintainer scripts must not be", + " world writable\", thanks to Kari Pahula (Closes: #376438).", + " * Bug fix: \"policy-process: s/ a a / a /; s/peoples/people's/;", + " s/intiated/initiated/; s/participattion the/participation in the/? add", + " quotes; s/was a larger/a larger/?\", thanks to Justin Pryzby", + " (Closes: #377215).", + " * Bug fix: \"[PROPOSAL] Include the GFDL in the set shipped in", + " /usr/share/common-licenses\", thanks to Adeodato Simó. However, it is", + " premature to tell packages to use the common licenses file until we", + " actually ship the license in /usr/share/common-licenses/ (Closes: #378386).", + " * Bug fix: \"circular dependencies, improved guarantees\", thanks to Ian", + " Jackson (Closes: #379630).", + " * Bug fix: \"section on invoke-rc.d doesn't make sense\", thanks to Peter", + " Eisentraut (Closes: #380692).", + " * Bug fix: \"policy: postinst doesn't document typical abort-remove", + " case\", thanks to Justin Pryzby. Removed all such comments. This is not", + " the place to document such material. (Closes: #373212).", + " * Bug fix: \"use of "invoke-rc.d $PACKAGE stop || exit $?" in", + " prerm scripts\", thanks to Lars Wirzenius (Closes: #370471).", + " * Bug fix: \"debian-policy: Inconsistent requirements wrt bashisms\",", + " thanks to Frank Küster (Closes: #367531).", + " * Bug fix: \"debian-policy: s/with With/with /\", thanks to Justin Pryzby", + " (Closes: #379974).", + " * Bug fix: \"debian-policy: \"$RET\" not \"RET\"\", thanks to Justin Pryzby", + " (Closes: #386178).", + " * Bug fix: \"debian-policy: Spelling error in chapter 9.1.1:", + " exceptiions\", thanks to Andreas Janssen (Closes: #388302).", + " * Bug fix: \"[PROPOSAL] Document ~ behavior in version numbers\", thanks", + " to Jakob Bohm (Closes: #382612).", + " * Bug fix: \"debian-policy: [ACCEPTED] Request for the 'stardict'\",", + " thanks to Andrew Lee (Closes: #385935).", + " * Bug fix: \"[ACCEPTED] virtual package 'lzh-archiver' -- an LZH archiver", + " package\", thanks to Ying-Chun Liu (PaulLiu) (Closes: #387027)." + ], + "closes" : [ + 367531, + 367697, + 370471, + 373212, + 375508, + 375728, + 376104, + 376438, + 377215, + 378386, + 379630, + 379974, + 380692, + 382612, + 385935, + 386178, + 387027, + 388302 + ], + "epoch" : 1159828283, + "timestamp" : "2006-10-02T22:31:23Z", + "version" : "3.7.2.2" + }, + { + "author" : "Manoj Srivastava <srivasta@debian.org>", + "changes" : [ + "", + "debian-policy (3.7.2.1) unstable; urgency=low", + "", + " * Bug fix: \"debian-policy: s/control are/&a/; s/stats/status/;", + " s/and/an/; s/'/"/; s/rewind/unwind/; s/fact/& that/; s/like", + " like/look like/;\", thanks to Justin Pryzby (Closes: #372147).", + " * Bug fix: \"debian-policy: Minor typo in footnote 53\", thanks to Jordà", + " Polo (Closes: #372497).", + " * Bug fix: \"debian-policy: Typo in 9.1.1: "'..' character"", + " should be "'.' character"\", thanks to Matt Zagrabelny", + " (Closes: #372522).", + " * Bug fix: \"debian-policy: More typos in upgrading-checklist.txt\",", + " thanks to Kevin B. McCarty (Closes: #366466).", + " * Bug fix: \"typo: package remains in and "Installed' state\", thanks", + " to Sam Hocevar \\(Debian packages\\) (Closes: #369413).", + " * Bug fix: \"debian-policy: Cleanup build-dependencies\", thanks to Stefan", + " Huehner (Closes: #366032).", + " * Bug fix: \"debian-policy: 2.2 should be named 'categories'\", thanks to", + " Thomas Weber (Closes: #369912).", + " * Bug fix: \"debian-policy: old postinst abort-upgrade, not new\", thanks", + " to Justin Pryzby. The fix was thanks to Margarita Manterola", + " (Closes: #372148).", + " * Bug fix: \"policy: please say which control fields can line-wrap\",", + " thanks to Peter Samuelson (Closes: #372731).", + " * Bug fix: \"debian/copyright should be mentioned in source section\",", + " thanks to Ian Jackson (Closes: #369011).", + " * Bug fix: \"GNU office not on Temple Place anymore\", thanks to Dan", + " Jacobson (Closes: #366889)." + ], + "closes" : [ + 366032, + 366466, + 366889, + 369011, + 369413, + 369912, + 372147, + 372148, + 372497, + 372522, + 372731 + ], + "epoch" : 1150780699, + "timestamp" : "2006-06-20T05:18:19Z", + "version" : "3.7.2.1" + }, + { + "author" : "Manoj Srivastava <srivasta@debian.org>", + "changes" : [ + "", + "debian-policy (3.7.2.0) unstable; urgency=low", + "", + " * Revert the cgi-lib change.", + " * Bug fix: \"Clarification for difference between Build-Depends and", + " Build-Depends-Indep (Section 7.6)\", thanks to Christoph Berg", + " Note that this is not part of policy, just an informative footnote.", + " (Closes: #328951).", + " * Bug fix: \"debian-policy: Typo in policy 5.6.3: semantic meaning\",", + " thanks to Thijs Kinkhorst (Closes: #365907)." + ], + "closes" : [ + 328951, + 365907 + ], + "epoch" : 1146697639, + "timestamp" : "2006-05-03T23:07:19Z", + "version" : "3.7.2.0" + }, + { + "author" : "Manoj Srivastava <srivasta@debian.org>", + "changes" : [ + "", + "debian-policy (3.7.1.0) unstable; urgency=low", + "", + " * Bug fix: \"[PROPOSAL] 11.9: document handling of directories permission", + " when upgrading\", thanks to Bill Allombert (Closes: #136318).", + " * Bug fix: \"[DISCUSS] documentation of the \"-fPIC\" constraint\", thanks", + " to Loïc Minier. Clarified when it may be reasonable to violate the standard", + " directive that shared libraries must be compiled with -fPIC, and", + " static libraries without, added the protocol to be followed when", + " doing so. (Closes: #329762).", + " * Bug fix: \"Minor typo in upgrading checklist\", thanks to David", + " Weinehall (Closes: #364982).", + " * Bug fix: \"Typo in upgrading-checklist\", thanks to David Weinehall", + " (Closes: #364983).", + " * Bug fix: \"typo in debian policy section 10.9.1\", thanks to Miguel Gea", + " Milvaques (Closes: #365058).", + " * Bug fix: \"debian-policy: The section 11.8.5 needs some", + " clarifications\", thanks to Robert Luberda (Closes: #365356).", + " * Bug fix: \"11.8.7: X11R7 puts headers in /usr/include/X11\", thanks to", + " Drew Parsons (Closes: #365510).", + " * Bug fix: \"debian-policy: typo in policy-process:", + " "Guideliens"\", thanks to Lars Wirzenius (Closes: #360518).", + " * Bug fix: \"debian-policy: repeated word in section 10.4\", thanks to", + " Russ Allbery (Closes: #364985).", + " * Bug fix: \"typo in debian-policy\", thanks to Miguel Gea Milvaques", + " (Closes: #365323)." + ], + "closes" : [ + 136318, + 329762, + 360518, + 364982, + 364983, + 364985, + 365058, + 365323, + 365356, + 365510 + ], + "epoch" : 1146673062, + "timestamp" : "2006-05-03T16:17:42Z", + "version" : "3.7.1.0" + }, + { + "author" : "Manoj Srivastava <srivasta@debian.org>", + "changes" : [ + "", + "debian-policy (3.7.0.0) unstable; urgency=low", + "", + " * Bug fix: \"[PENDING AMENDMENT 20/01/2000] Splitting cgi-bin\", thanks to", + " Brian White. (Closes: #32263).", + " * Bug fix: \"debian-policy: [PROPOSAL] Should update to Filesystem", + " Hierarchy Standard FHS 2.3\", thanks to Tobias Burnus", + " (Closes: #230217, #212434, #344158).", + " * Bug fix: \"[AMENDMENT 11/04/2006] Permit multi-line fields in", + " debian/control\", thanks to John R. Daily. Mention that all fields,", + " except the Uploaders, are supposed to be a single logical line, which", + " may be spread over multiple physical lines (newline followed by space", + " is elided). Also mention that anything parsing the control file must", + " allow for a multi-line uploaders field. (Closes: #148194).", + " * Bug fix: \"[AMENDMENT 12/04/2004] frown on programs in PATH with", + " language extentions\", thanks to Joey Hess. (Closes: #190753).", + " * Bug fix: \"init script stop example should use --oknodo\", thanks to", + " Matt Kraai. Removed the example entirely. (Closes: #346598).", + " * Bug fix: \"policy 12.5: Please recommend a sane practice WRT different", + " gpl versions (was: Re: RFC/RFS: beef - a flexible BrainFuck", + " interpreter)\", thanks to Justin Pryzby. The subject leaves something", + " to be desired, but polic should not attempt to enumerate all common", + " licenses. (Closes: #355263).", + " * Bug fix: \"debian-policy: Conflicting Architecture definitions\", thanks", + " to Hans Ulrich Niedermann. Punt to dpkg-architecture to providing", + " legal architecture strings, since that's what is used by everyone", + " anyway. The version in policy was wrong, but that s=does not seem to", + " have hindered anyone, which indicates that this policy directive was", + " uneeded. Now the dpkg-architecture list is deemed authoritative, which", + " it is, but the format for the string is defined by policy, and the", + " current list of architecture strings is in an informative foot note.", + " (Closes: #357613).", + " * Bug fix: \"[AMENDMENT 06/04/2006] Make use of invoke-rc.d, if", + " available, mandatory\", thanks to Lars Wirzenius. (Closes: #361137).", + " * Bug fix: \"no longer current regarding X font paths\", thanks to Joey", + " Hess (Closes: #362247).", + " * Bug fix: \"debian-policy: please prohibit circular dependencies, or", + " mention that dependencies won't be respected during prerm remove\",", + " thanks to Justin Pryzby. Well, we did not prohibit circular", + " dependencies. But we do now have a warning that In case of circular", + " dependencies, since installation or removal order honoring the", + " dependency order can't be established, dependency loops are broken at", + " some random point, and some packages may not be able to rely on their", + " dependencies being present when being installed or removed, depending", + " on which side of the break of the circular dependcy loop they happen", + " to be on. (Closes: #362975).", + " * Bug fix: \"8.6.4. Providing a `shlibs' file: s/should create/must", + " provide/\", thanks to Christoph Berg. Clarified the wording.", + " (Closes: #341232).", + " * Bug fix: \"debian-policy: Chapter 6 - Package maintainer scripts:", + " redundant info about exit status\", thanks to Daniel Bonniot", + " (Closes: #349010).", + " * Bug fix: \"debian-policy: Refers to upgrading-checklist.txt instead of", + " upgrading-checklist.txt.gz\", thanks to Matt Kraai (Closes: #349775).", + " * Bug fix: \"debian-policy: dpkg-gencontrol now uses -isp by default\",", + " thanks to Guillem Jover (Closes: #359817).", + " * Bug fix: \"[PROPOSAL] unclear recommendation for debconf w/", + " dpkg-statoverride\", thanks to Eduard Bloch (Closes: #199849).", + " * debian-policy: please support Watch file as recommendation, thanks to", + " Bluefuture (Closes: #342611).", + " * Bug fix: \"[PROPOSED] Mandate http servers to provide httpd-cgi as", + " relevenat\", thanks to Uwe Hermann. This is already supported by the", + " http servers out there. (Closes: #117916)." + ], + "closes" : [ + 32263, + 117916, + 148194, + 190753, + 199849, + 212434, + 230217, + 341232, + 342611, + 344158, + 346598, + 349010, + 349775, + 355263, + 357613, + 359817, + 361137, + 362247, + 362975 + ], + "epoch" : 1146027376, + "timestamp" : "2006-04-26T04:56:16Z", + "version" : "3.7.0.0" + }, + { + "author" : "Manoj Srivastava <srivasta@debian.org>", + "changes" : [ + "", + "debian-policy (3.6.2.2) unstable; urgency=low", + "", + " [ Manoj ]", + " * Bug fix: \"policy is out of date re tasks and tasksel\", thanks to Joey", + " Hess. Removed the section from policy. (Closes: #344310).", + " * Bug fix: \"debian-policy: Please remove virtual package cron-daemon\",", + " thanks to Steve Greenland (Closes: #257726).", + " * Bug fix: \"debian-policy: incorrect tar example deb manipulation\",", + " thanks to Bob Proulx (Closes: #224770).", + " * Bug fix: \"Probable typo in 10.1 install -s miss INSTALL =\", thanks to", + " Bill Allombert (Closes: #341992).", + " * Bug fix: \"debian-policy: postinst abort-remove (6.7) not present in", + " summary (6.4)\", thanks to Ferenc Wagner (Closes: #338493).", + " * Bug fix: \"UTF-8 footnote is out of date (pre-sarge)\", thanks to Martin", + " Michlmayr (Closes: #337539).", + " * Bug fix: \"debian-policy: Typo in perl-policy\", thanks to Tibor Csögör", + " (Closes: #334913).", + " * Bug fix: \"debian-policy: Outdated FSF postal address in Copyright", + " Notice\", thanks to Jean-Marc Ranger (Closes: #334819).", + " * Bug fix: \"debian-policy: §6.5 (3)(1): missing "Error", + " unwind:" for "new-postrm abort-upgrade"\", thanks to", + " Henning Makholm (Closes: #321792).", + " * Bug fix: \"debian-policy: typo in §5.6.3: co-maintaintainers\", thanks", + " to Henning Makholm (Closes: #321790).", + " * Bug fix: \"debian-policy: typos in sect 9.3.1: "ends .sh",", + " "rather that"\", thanks to Thijs Kinkhorst (Closes: #343933).", + " * Bug fix: \"debian-policy: Unclear wording of ldconfig requirements in", + " section 8.1.1\", thanks to Ben Finney (Closes: #318214).", + " * Bug fix: \"debian-policy: Typo in 8.6.2: ${shlib:Depends} must be", + " ${shlibs:Depends}\", thanks to Thijs Kinkhorst (Closes: #318147).", + " * Bug fix: \"debian-policy: gzipped fhs-2.3 documentation is corrupt\",", + " thanks to Gabor Gombas (Closes: #340189).", + " * Bug fix: \"Section 6.3 should reference 3.10.1\", thanks to Marc 'HE'", + " Brockschmidt (Closes: #326633).", + " * Bug fix: \"debian-policy: section 2.2 refers to no-longer existant", + " non-US repository sections\", thanks to Martin-Eric Racine", + " (Closes: #315470)." + ], + "closes" : [ + 224770, + 257726, + 315470, + 318147, + 318214, + 321790, + 321792, + 326633, + 334819, + 334913, + 337539, + 338493, + 340189, + 341992, + 343933, + 344310 + ], + "epoch" : 1135522072, + "timestamp" : "2005-12-25T14:47:52Z", + "version" : "3.6.2.2" + }, + { + "author" : "Manoj Srivastava <srivasta@debian.org>", + "changes" : [ + "", + "debian-policy (3.6.2.1) unstable; urgency=low", + "", + " * Bug fix: \"debian-policy: Typo in upgrading-checklist.txt.gz\", thanks", + " to Romain Francoise. Added the missing /. (Closes: #314569).", + " * Bug fix: \"x-session-manager already in use, so please add to", + " virtual-package-names-list.txt\", thanks to Christopher Martin", + " (Closes: #313626).", + " * Bug fix: \"[ACCEPTED] SRFI 22 names for Scheme implementations\", thanks", + " to Jorgen Schaefer (Closes: #310113).", + " * Bug fix: \"debian-policy: please add x-display-manager to", + " virtual-package-names-list.txt\", thanks to Jon Dowland (Closes: #294633)." + ], + "closes" : [ + 294633, + 310113, + 313626, + 314569 + ], + "epoch" : 1119073694, + "timestamp" : "2005-06-18T05:48:14Z", + "version" : "3.6.2.1" + }, + { + "author" : "Manoj Srivastava <srivasta@debian.org>", + "changes" : [ + "", + "debian-policy (3.6.2.0) unstable; urgency=low", + "", + " Manoj:", + " * Bug fix: \"policy 11.5.3 refers to using the menu package to register", + " docs\", thanks to Joey Hess (Closes: #222553).", + " * Bug fix: \"[PROPOSAL] Document Uploaders: field in policy\", thanks to", + " Andrew Pollock. Andreas Metzler provided the wording, though it was", + " modified during inclusion. (Closes: #203145).", + " * Bug fix: \"debian-policy: Minor grammatical correction in section 9.4\",", + " thanks to Eric Evans. I rejected the proposed change, instead I went", + " over the whole policy document and removed all he/she/him/her", + " constructs before the gender police jump all over me. (Closes: #273122).", + " * Bug fix: \"XSI:ism in prerm and postinst\", thanks to David Weinehall", + " (Closes: #260092).", + " * Bug fix: \"debian-policy: please clarify section 12.7.\", thanks to", + " Adrian Bunk. Added a clarifying footnote that makes it clear that", + " section 12.3 does not allow one to ignore section 12.7 (Closes: #276953).", + " *", + " * Bug fix: \"debian-policy: should not ship generated files in source", + " archive, and should clean them from the tree\", thanks to Branden", + " Robinson (Closes: #284967).", + " * Bug fix: \"debian-policy: Detailed description of maintainer script", + " calls (Section 6.5) is incomplete\", thanks to Nikolaus Schulz", + " and Thomas Hood. What happens when error unwinding itself runs into", + " problems is perhaps not discussed as completely as it should be.", + " (Closes: #286549).", + " * Bug fix: \"9.3.3.2 "command -v" example needs tweaking\",", + " thanks to Thomas Hood. Instead of the massively complex shenanigans", + " suggested in the bug report, just use which. which lives in an", + " essential package, so can be used in the preinst of packages.", + " (Closes: #291026).", + " * Bug fix: \"debian-policy: please clarify/loosen the policy on rewriting", + " history\", thanks to Frank Küster. Since this was not really a", + " directive, but merely an expression of an opinion, moved it into an", + " informative footnote. (Closes: #290270).", + " * Bug fix: \"debian-policy: virtual package request: mpd-client\", thanks", + " to Eric Wong (Closes: #270020).", + " * Bug fix: \"[ACCEPTED 2005/02/04]: \"libexec\", or use of \"lib\" for", + " binaries in lib* packages\", thanks to Junichi Uekawa", + " (Closes: #146023).", + " * Bug fix: \"debian-policy: virtual package: flexmem\", thanks to Bartosz", + " Fenski aka fEnIo (Closes: #239359).", + " * Bug fix: \"Please clarify Section 2.5. required <-> essential\",", + " thanks to Adrian Bunk. Clarified the section. (Closes: #216104).", + " * Bug fix: \"debian-policy: Please remove virtual package", + " aspell-dictionary\", thanks to Brian Nelson (Closes: #295939).", + " * Bug fix: \"[AMENDMENT 18/02/2002] Where to place web-accessible", + " images\", thanks to Tollef Fog Heen (Closes: #89867).", + " * Bug fix: \"debian-policy: erroneous enumeration in prebuilt policy.*", + " files\", thanks to Nikolaus Schulz. I am hoping that this shall go away", + " when we rebuild. (Closes: #286553).", + " * Bug fix: \"please make names of alternate versions links\", thanks to", + " Robert Cheramy. Added HTTPPATH elements that should provide the URL's", + " as well as the hyperlinks. (Closes: #308886).", + " * Bug fix: \"www.debian.org: Misspelling in Policy Manual\", thanks to", + " Roberto C. Sanchez Various spelling errors were also corrected in a", + " spell check run. (Closes: #309162)." + ], + "closes" : [ + 89867, + 146023, + 203145, + 216104, + 222553, + 239359, + 260092, + 270020, + 273122, + 276953, + 284967, + 286549, + 286553, + 290270, + 291026, + 295939, + 308886, + 309162 + ], + "epoch" : 1118971637, + "timestamp" : "2005-06-17T01:27:17Z", + "version" : "3.6.2.0" + }, + { + "author" : "Manoj Srivastava <srivasta@debian.org>", + "changes" : [ + "", + "debian-policy (3.6.1.1) unstable; urgency=low", + "", + " Manoj:", + " * [AMENDMENT 15/09/2003] Move documentation of behavior of ancient dpkg", + " in 6.6 to a footnote. closes: Bug#209855", + " * Fix the outdated link for the mime subpolicy. closes: Bug#212153", + " * Fix a missing comma in the list of sections closes: Bug#215524", + " * Fix spelling of sysv-rc closes: Bug#215558", + " * [AMENDMENT 28/03/2004] ${perl:Depends} documentation", + " incomplete. Added an informative foot note stating that dependencies", + " caused by versioned uses and on separately packaged modules are not", + " included in this variable and must be explicitly included.", + " closes: Bug#202054", + " * Clarified that section 3.2.1 refers to the date based postion of the", + " version number, if not already clear from the context. This allows", + " developers leeway in selecting date based version numbers for their", + " packages, without loosing the advantages of the format specified in", + " this section. closes: Bug#248618", + " * Bug fix: \"Broken link to virtual-package-names-list.txt in section", + " 3.6\", thanks to Carlos O'Donell (Closes: #248786).", + " * Bug fix: \"Broken link to debconf_specification.txt.gz in section", + " 3.10.1 of the Debian Policy manual.\", thanks to Carlos O'Donell and", + " Scott C.MacCallum <scm@madoshi.com> (Closes: #248788, 247761).", + " * Bug fix: \"missing commas in subsections list\", thanks to Filippo", + " Giunchedi (Closes: #236614).", + " * Bug fix: \"debian-policy: policy-process, broken URL\", thanks to Manoj", + " Srivastava (Closes: #244969).", + " * Bug fix: \"bad reference to debconf-devel(8) has to be (7)\", thanks to", + " Kevin Price (Closes: #247143).", + " * Bug fix: \"debian-policy: Small wording change\", thanks to Mike Paul", + " (Closes: #252392).", + " * Bug fix: \"debian-policy: broken URL: CSH Programming Considered", + " Harmful\", thanks to Steven Augart (Closes: #253324).", + " * Bug fix: \"New virtual package: cron-daemon\", thanks to Adam Byrtek", + " (Closes: #252086).", + " Josip:", + " * Fixed detection of invoke-rc.d's existence, closes: #218530.", + " * Generalized the dpkg-shlibdeps example and added a current example in a", + " footnote, set proper section ids and linked the d-sd section better,", + " closes: #50565.", + " * Clarified the section about the Architecture field and added footnotes", + " to indicate recommended actions, closes: #51832.", + " * Updated PGP references, closes: #68827.", + " * Linked f-Format in the list of fields of the .dsc file, not mandatory", + " according to my skimming of dpkg-source, closes: #70742.", + " * Fixed the command line required to output the copyright file,", + " closes: #75508.", + " * Removed the long obsolete notion of specific directory names within", + " source tarballs, closes: #79210.", + " Andi:", + " * sgml-dtd was moved, fix FTBFS. Closes: #241683", + " * fix link to WM specification. Closes: #235484", + " * manpage -> man page. Closes: #232364, #238958", + " * language adjustment. Closes: #227762", + " * added virtual packages stardict-dictionary, inetd-superserver.", + " Closes: #185943, #237049" + ], + "closes" : [ + 50565, + 51832, + 68827, + 70742, + 75508, + 79210, + 185943, + 202054, + 209855, + 212153, + 215524, + 215558, + 218530, + 227762, + 232364, + 235484, + 236614, + 237049, + 238958, + 241683, + 244969, + 247143, + 247761, + 248618, + 248786, + 248788, + 252086, + 252392, + 253324 + ], + "epoch" : 1088197658, + "timestamp" : "2004-06-25T21:07:38Z", + "version" : "3.6.1.1" + }, + { + "author" : "Manoj Srivastava <srivasta@debian.org>", + "changes" : [ + "", + "debian-policy (3.6.1.0) unstable; urgency=low", + "", + " Josip:", + " * Removed obsolete section on obsolete constructs and libraries,", + " closes: #193748.", + " Manoj:", + " * Change reference to the debconf introduction from kitenet to a debian", + " hosted server. closes: Bug#187297", + " * Added myspell-dictionary to the virtual packages list closes: Bug#203728", + " * Fix the restart action in the init.d/bind example; it now uses", + " --oknodo so that the action does not fail when the service is not", + " running. closes: Bug#187250", + " * invoke-rc.d and update-rc.d are now in the sysv-rc package instead of", + " the sysvinit package. Fixed a reference in policy. closes: Bug#200440", + " * Note that postinst abort-remove is called if there is an error while", + " removing the package. closes: Bug#188030", + " * [AMENDMENT 2003/08/03] Make Debconf the standard for prompting the", + " user closes: Bug#176506" + ], + "closes" : [ + 176506, + 187250, + 187297, + 188030, + 193748, + 200440, + 203728 + ], + "epoch" : 1061296090, + "timestamp" : "2003-08-19T12:28:10Z", + "version" : "3.6.1.0" + }, + { + "author" : "Josip Rodin <joy-packages@debian.org>", + "changes" : [ + "", + "debian-policy (3.6.0) unstable; urgency=low", + "", + " Josip:", + " * Restructured Policy, closes: #189306.", + " + Many packaging manual appendices that were integrated into policy", + " sections are now empty, and replaced with links to the Policy.", + " In particular, the appendices that included the list of control", + " fields were updated (new fields like Closes, Changed-By were added)", + " and the list of fields for each of control, .changes and .dsc files", + " is now in Policy, and they're marked mandatory, recommended or", + " optional based on the current practice and the behaviour of the", + " deb-building toolchain.", + " + Elimination of needlessly deep section levels, primarily in the", + " chapter Debian Archive, from which two new chapters were split out,", + " Binary packages and Source packages. What remained was reordered", + " properly, that is, some sect1s became sects etc.", + " + Several sections that were redundant, crufty or simply not designed", + " with any sort of vision, were rearranged according to the formula that", + " everything should be either in the same place or properly interlinked.", + " Some things remained split up between different chapters when they", + " talked about different aspects of files: their content, their syntax,", + " and their placement in the file system. In particular, see the new", + " sections about changelog files.", + " Manoj:", + " * Added Games/Simulation to menu subpolicy closes: Bug#194974", + " * Added Apps/Education to menu subpolicy closes: Bug#194972", + " * [ACCEPTED]: Debian changelogs should be UTF-8 encoded. Changed the", + " wording from a should to a may; since a should would make an unknown", + " number of packages insta buggy. A reuest makes all these wishlist", + " bugs; we can raise the severity in a later version of policy.", + " closes: Bug#174982", + " * Added LANG=C before the debiandoc2X invocations, this ensures that the", + " resulting documents do not get converted to the locale on the building", + " machine. This answers some of the issues mentioned in Bug#175064", + " * [AMENDMENT 02/05/2003] encourage packagers to systematically prevent", + " mis-linked libraries closes: Bug#191369", + " * [AMENDMENT 6/6/2003] build-depends-indep need not be satisfied", + " during clean target. closes: Bug#191411, Bug#178809", + " * Fixed the fact that section 7.5.1 does not describe dpkg's true", + " behavior. Now added a footnote that explains that replaces is a one", + " way relationship. closes: Bug#183195", + " * Could no longer find the misspelling \"seciton\", thus this must have", + " been fixed in a previous change in the manual. closes: Bug#193903", + " * Fixed an incorect /usr/share/common-licences/GPL reference, ensured a", + " consistent spelling across the manuals. closes: Bug#189516", + " * Removed an extraneous > in menu policy. closes: Bug#187615", + " * Fixed typos, and part of the report that was deemed valid; the other", + " changes suggested were incorrect, or style issues. closes: Bug#169744", + " * updated the section numbers in the upgrading checklist", + " for the restructuring" + ], + "closes" : [ + 169744, + 174982, + 178809, + 183195, + 187615, + 189306, + 189516, + 191369, + 191411, + 193903, + 194972, + 194974 + ], + "epoch" : 1057766495, + "timestamp" : "2003-07-09T16:01:35Z", + "version" : "3.6.0" + }, + { + "author" : "Josip Rodin <joy-packages@debian.org>", + "changes" : [ + "", + "debian-policy (3.5.10.0) unstable; urgency=low", + "", + " Josip:", + " * Fixed date, typos and added indentation in the virtual packages list,", + " closes: #182792.", + " * Changed the formatting of the link to the authors section to avoid", + " confusion in the debiandoc2txt output, closes: #185985.", + " * Fixed various typos, closes: #189274, #187418, #187422, #189654.", + " * Removed broken link to csh.whynot on CPAN, closes: #187567.", + " * Updated archive section list, closes: #187420.", + " * Stop attaching byhand tarballs, cf. bug #184082.", + " Manoj:", + " * Clarify x-terminal-emulator virtual package eligibility, in an", + " extention to an informative footnote. closes: Bug#165063", + " * Add 40 points, not 20, when the window manager is compliant with \"The", + " Window Manager Specification Project\". closes: Bug#167004", + " * Fixed reference to the debconf URL (we can change the URL as it", + " changes again, and I don't think any additional load would accrue", + " since people using the old URL were redirected to auric anyway).", + " closes: Bug#184518", + " * Inserted the word only in the package name section. closes: Bug#184368", + " * Amended the section about Prompting in maintainer scripts. Added a", + " footnote (quoting from the Jargon File) to explain what \"by hand\"", + " means in a computer context. closes: Bug#184507" + ], + "closes" : [ + 165063, + 167004, + 182792, + 184368, + 184507, + 184518, + 185985, + 187418, + 187420, + 187422, + 187567, + 189274, + 189654 + ], + "epoch" : 1052586830, + "timestamp" : "2003-05-10T17:13:50Z", + "version" : "3.5.10.0" + }, + { + "author" : "Manoj Srivastava <srivasta@acm.org>", + "changes" : [ + "", + "debian-policy (3.5.9.0) unstable; urgency=low", + "", + " Josip:", + " * Added missing bits of information about Description: fields from", + " the old Packaging manual, closes: #172022", + " * Fixed a stale reference to the \"base system maintainer\" to", + " base-passwd maintainer, closes: #174927", + " * Fixed an accidental change from /usr/share/package to /usr/share/doc in", + " the paragraph about not depending on /usr/share/doc/package,", + " closes: #174048", + " * Fixed several errors reported by Guenther Palfinger, with some help from", + " Richard Braakman, closes: #177205, #177206, #177207, #177208, #177209", + " * Added versions to links and docbook-xml source-dependencies, hopefully", + " fixes the bug with potato, and even if it doesn't, I don't care :)", + " closes: #103459", + " * Fixed typos in the debconf spec noticed by Jay Bonci, closes: #178455", + " * Clarified that using Build-Depends for build-dependencies is not a \"may\"", + " but a \"should\", added proper linking among various sections dealing with", + " the dependencies so that there is no confusion, closes: #87510", + " If any one of those poor, misguided people ;) still thinks that the", + " requirement should be a \"must\" (in _our_ meaning, not RFC \"MUST\"),", + " please file a new bug, as it's quite unproductive to have to sift", + " through a 152-page bug log which mostly goes back-and-forth with", + " explanations how policy should work, occasionally sprinkled with", + " offtopic stuff, too.", + " * When asked to restart a service that isn't already running, the init", + " script should start it, closes: #60979", + " * Rephrased section on configuration files to remove confusing use of", + " \"should\", closes: #170019", + " * Rearranged the shared library information properly, closes: #109166", + " This change also centralizes the info on how to ship static libraries", + " in one place (hopefully not too ambiguous), closes: #93975", + " * Allow examples to be placed in /usr/share/doc/package/ in packages", + " that are meant to provide examples, closes: #69864", + " * Removed several references to the Policy manual etc in the stuff", + " imported from old packaging manual, closes: #181923", + " * Fixed too greedy wildcard match in the logrotate example,", + " closes: #183544" + ], + "closes" : [ + 60979, + 69864, + 87510, + 93975, + 103459, + 109166, + 170019, + 172022, + 174048, + 174927, + 177205, + 177206, + 177207, + 177208, + 177209, + 178455, + 181923, + 183544 + ], + "epoch" : 1047062116, + "timestamp" : "2003-03-07T18:35:16Z", + "version" : "3.5.9.0" + }, + { + "author" : "Manoj Srivastava <srivasta@debian.org>", + "changes" : [ + "", + "debian-policy (3.5.8.0) unstable; urgency=low", + "", + " Manoj", + " * Added example for why one may call ldconfig anywhere in the", + " postsint. closes: Bug#120585", + " * Add the modifications about base system, as opposed to the soon to be", + " obsolete base section (I assume it is) closes: Bug#53582", + " * Rearranged the virtual packages list. closes: Bug#72980", + " * This is basically an attempt to ratify the current practice of using", + " debhelper in the clean target. Currently, policy does not require", + " debhelper to be installed when the clean target is run, even though it", + " is in the build-depends field. This was a simple oversight.", + " closes: Bug#164035", + " * No longer depend on fileutils. closes: Bug#167425", + " * Added the Apps/Science menu section closes: Bug#162812", + " * Applied text patch from Joey Hess to the debconf spec simply make it", + " conform to the reality of how some things work now. This is part of an", + " effort to make debconf and cdebconf better substitutes for each", + " other. Since it was not an XML patch, no special markup is present in", + " the new content, except where I made guesses. closes: Bug#160776", + " * Clarify section 13.3. closes: Bug#160248", + " * Removed the undocumented(7) hack requirement. closes: Bug#39830", + " Josip", + " * Removed the obsolete notion of documenting changes within the copyright", + " file, closes: Bug#65764" + ], + "closes" : [ + 39830, + 53582, + 65764, + 72980, + 120585, + 160248, + 160776, + 162812, + 164035, + 167425 + ], + "epoch" : 1037342214, + "timestamp" : "2002-11-15T06:36:54Z", + "version" : "3.5.8.0" + }, + { + "author" : "Manoj Srivastava <srivasta@debian.org>", + "changes" : [ + "", + "debian-policy (3.5.7.1) unstable; urgency=low", + "", + " * Fix the debconf spec to (postinst -> postrm) closes: Bug#129375, Bug#160839", + " * Fix update-rc.d example, mention that changing run-levels or priority", + " may require removing and re-creating the symbolic links. closes: Bug#149709", + " * Fix the groff and col -b interaction closes: Bug#164755", + " * Added section numbers to upgrading checklist closes: Bug#160914", + " * Fixed typo KB_Backspace -> KB_BackSpace", + " * Clarify wording in the section about ChangeLog files to allow for", + " symbolic links in /usr/share/doc/ directory (was already allowed in a", + " previous section of policy 13.6) closes: Bug#111137", + " * Removed a spurious + from text. closes: Bug#160908", + " * Added a note in the debconf spec to consult debconf-devel(8) for", + " details. closes: Bug#133030", + " * Added a reference to the local copy of the FHS. closes: Bug#122928", + " * Updated reference to ash (dash). This implements the non controversial", + " parts of Bug#161455." + ], + "closes" : [ + 111137, + 122928, + 129375, + 133030, + 149709, + 160839, + 160908, + 160914, + 164755 + ], + "epoch" : 1035655969, + "timestamp" : "2002-10-26T18:12:49Z", + "version" : "3.5.7.1" + }, + { + "author" : "Manoj Srivastava <srivasta@debian.org>", + "changes" : [ + "", + "debian-policy (3.5.7.0) unstable; urgency=low", + "", + " * Fixed some broken hrefs in links", + " * No longer use local debiandoc stuff (it's been fixed upstream)", + " * Added table of contents (index.html) to policy-process.sgml, fixing", + " the new error reported to bug #137521 closes: Bug#137521", + " * Fixed a couple of typos closes: Bug#139832", + " * Ran through the policy document looking for long instances of text in", + " the <tt> tag, and changed it to <file> where appropriate. This is", + " since the <file> tag can handle line breaking, but the <t> flag does", + " not. closes: Bug#139820", + " * Change the requirement to ask permission to make devices to merely", + " requiring a notification. closes: Bug#106280", + " * Added a build dependson docbook utils. closes: Bug#154660", + " * Since this is being built with a newer version of debiandoc-sgml, this", + " should display better with lynx. closes: Bug#153704", + " * Add in the crypto-in-main amendment. closes: Bug#81852, Bug#144411", + " * we no longer have task packages, instead, we define tasks using a", + " special field in the control file (and these should be added only", + " after discussion on the mailing lists) closes: Bug#97755", + " * Clarify wording in the section for packages providing fonts.", + " closes: Bug#109672", + " * Fix the doc base file for policy process closes: Bug#137521, Bug#147554", + " closes: Bug#146756", + " * using set -e is not dubious advice. Rejecting this. closes: Bug#139969", + " * Make the directory one is building under ./debian/ be up to the", + " maintainer, instead of mandating ./debian/tmp/ closes: Bug#144297", + " * Add a standards version closes: Bug#145067", + " * Added virtual package debconf-2.0 closes: Bug#151328", + " * Added The Window Manager Specification Project support to the default", + " window manager selection mechanism closes: Bug#155680", + " * The confusion between /var/mail and /var/spool/mail seems to have been", + " disambiguated. closes: Bug#114949", + " * Mention the new Build-Depend-Indep semantic and the new", + " build-indep/build-arch rules in upgrading checklist closes: Bug#116134", + " * Made package naming rules in policy consistent. I did not eliminate", + " the duplication, since I don't want to make major changes to the flow,", + " since we are supposed to be re-writing policy anyway. closes: Bug#131441", + " * Clarified wording about cases where we may have concrete and virtual", + " packages with the same name. closes: Bug#134977", + " * Fixed typo 'be be' closes: Bug#138681", + " * Fixed typo in appendix G -- example of diversion closes: Bug#140697", + " * fix typo shlib: -> shlibs: closes: Bug#141903", + " * Provide a link between two sections dealing with virtual packages.", + " closes: Bug#143770", + " * Fixed xtifr's email address in the menu policy closes: Bug#152965", + " * Allow shared library names to be have a hyphen between library name", + " and soversion if the library name ends in a number. closes: Bug#100472", + " * Permit some libraries to only install static libs. closes: Bug#100346", + " * Remove the debug option, add noopt closes: Bug#157131, Bug#113525", + " * provide dhcp-client virtual package. closes: Bug#154142", + " * We do not need bits in policy that ``should not be enforced''.", + " closes: Bug#150456", + " * We are building this with the latest debianndoc-sgml. closes: Bug#146703", + " * Finish incorporating all of the accepted changes in Bug#72335, and", + " this closes: Bug#141307, Bug#156546", + " * Added virtual package aspell-dictionary closes: Bug#139067", + " * Added virtual package radius-server closes: Bug#118608", + " * Clarifying manual pages is not a policy issue. closes: Bug#112828", + " * Corrected the ldconfig handling instructions. closes: Bug#111025", + " * Not a policy issue. closes: Bug#106826", + " * Removed the /usr/doc/ symlink clause. closes: Bug#47298, Bug#69311" + ], + "closes" : [ + 47298, + 69311, + 81852, + 97755, + 100346, + 100472, + 106280, + 106826, + 109672, + 111025, + 112828, + 113525, + 114949, + 116134, + 118608, + 131441, + 134977, + 137521, + 138681, + 139067, + 139820, + 139832, + 139969, + 140697, + 141307, + 141903, + 143770, + 144297, + 144411, + 145067, + 146703, + 146756, + 147554, + 150456, + 151328, + 152965, + 153704, + 154142, + 154660, + 155680, + 156546, + 157131 + ], + "epoch" : 1030778282, + "timestamp" : "2002-08-31T07:18:02Z", + "version" : "3.5.7.0" + }, + { + "author" : "Manoj Srivastava <srivasta@debian.org>", + "changes" : [ + "", + "debian-policy (3.5.6.1) unstable; urgency=low", + "", + " * Set the cotact information for the FHS contact, and add mention of the", + " FHS mailing list. closes: Bug#137172", + " * ftp://ftp.debian.org/debian/doc/package-developer/ certainly seems to", + " exist, and does contain the menu policy. closes: Bug#110711, Bug#121977", + " * Added java related virtual packages closes: Bug#110713", + " * Fixed confusion in appar4ently contradictory wording about /etc/init.d", + " scripts: clarified to emphasize that the init.d files _are_", + " configuration files, and they _must_ have local changes preserved,", + " either (if they are present in the .deb) by marking them as conffiles", + " or, if they do not exist in the .deb file, by any other means. This", + " does not change any requirements, and should have no affect on any", + " conformant packages. closes: Bug#132621", + " * Fixed error in doc-base file closes: Bug#137521", + " * fixed typo in virtual packages list closes: Bug#110446", + " * Fixed typo in upgrading checklist. closes: Bug#110705", + " * Fixed typo (dependencies) in the policy closes: Bug#122931", + " * Fixed grammar errors in the policy closes: Bug#126131", + " * While I am cleaning out bugs, these are old and the reporter no longer", + " wnats to pursue them, and there was never a consensus reached. If", + " there is interest, new bugs can be filed. closes: Bug#51411, Bug#51412", + " * Added the virtual package dict-client closes: Bug#122996", + " * Added the virtual package foomatic-data closes: Bug#123570", + " * Added the virtual packages {x-}audio-mixer closes: Bug#131781" + ], + "closes" : [ + 51411, + 51412, + 110446, + 110705, + 110711, + 110713, + 121977, + 122931, + 122996, + 123570, + 126131, + 131781, + 132621, + 137172, + 137521 + ], + "epoch" : 1016129813, + "timestamp" : "2002-03-14T18:16:53Z", + "version" : "3.5.6.1" + }, + { + "author" : "Manoj Srivastava <srivasta@debian.org>", + "changes" : [ + "", + "debian-policy (3.5.6.0) unstable; urgency=low", + "", + " * Change footnote about urgency values to the now-current list: low,", + " medium, high, emergency.", + " * Correct note about /etc/default files being conffiles/config files,", + " which I mucked up (sorry Joey) [10.3.2]", + " * [AMENDMENT 2001/06/26] Downgrade emacs/tex to optional", + " closes: Bug#102204, Bug#53849", + " * [AMENDMENT 2001/06/26] Next stage in usr/doc -> usr/share/doc transition", + " closes: Bug#102199", + "", + " * [AMENDMENT 09/06/2001] Clarifying FHS policy closes: Bug#98291, Bug#60461", + " * Spelling correction closes: Bug#105625", + " * [AMMENDMENT 28/06/2001] Restrict http access to /usr/share/doc", + " closes: Bug#100631", + " * [AMENDMENT 23/5/2001] Optional build-arch and build-indep targets for", + " debian/rules closes: Bug#72335", + " * The old packaging manual is included in the policy document as an", + " informative appendix. It is not part of Debian Technical Policy, and", + " its presence is a temporary measure until dpkg documentation includes", + " the information provided. closes: Bug#105535", + " * Added information about optional blank lines in the chagelog format.", + " closes: Bug#105538" + ], + "closes" : [ + 53849, + 60461, + 72335, + 98291, + 100631, + 102199, + 102204, + 105535, + 105538, + 105625 + ], + "epoch" : 996029002, + "timestamp" : "2001-07-25T02:43:22Z", + "version" : "3.5.6.0" + }, + { + "author" : "Julian Gilbey <jdg@debian.org>", + "changes" : [ + "", + "debian-policy (3.5.5.0) unstable; urgency=low", + "", + " * Fixed up incorrect entries in the changelog (there was an erroneous", + " 3.5.0.1 revision which never happened; it has now been correctly", + " merged with the 3.5.3.0 changelog entry)", + " * Add section numbers to upgrading-checklist for all revisions from", + " 3.0.0 onwards", + " * Complete rewrite (and renumbering) of sections 9.1 and 9,2", + " * This time *really* include the HTML version of the FHS", + " * Added doc-base support for all of the HTML files", + " * Added several more files to the byhand list and rewrote chunks of", + " debian/rules to do this", + " * Add patched versions of debiandoc-sgml stuff to source package until", + " patches are incorporated upstream", + " * Versioned Build-Depend on debiandoc-sgml for fixed Text.pm", + " * Improved mkdir example in 10.1.2 closes: Bug#92744", + " * Made the \"where examples live\" entry in the upgrading-checklist", + " clearer (add \"for use by scripts\")", + " * Add a dpkg-statoverride description section closes: Bug#89473", + " * Fix the ldconfig usage description (remove \"only if\")", + " closes: Bug#89674", + " * Clarification of package priority issues vis-a-vis the X Windows", + " system closes: Bug#91249", + " * Enhanced x-terminal-emulator policy closes: Bug#91252", + " * Minor changes to X app-defaults policy closes: Bug#91259", + " * Clarification of X policy in respect to FHS closes: Bug#91260", + " * OpenMotif has the same rules as OSF/Motif closes: Bug#91261", + " * The X Font policy rewrite closes: Bug#91257", + " * The \"man\" program is no longer guaranteed to read header information", + " to find alternative manpage names closes: Bug#94995", + " * Correction to meaning of Standards-Version closes: Bug#97072", + " * Split section 12.8 (X Window System) into subsections for readability", + " * Plug-ins != shared libraries (at last) closes: Bug#66023", + " * Add packaging manual remnants to policy document as appendices, and", + " mention this in control file closes: Bug#95906", + " * Clarification in Perl policy closes: Bug#98712" + ], + "closes" : [ + 66023, + 89473, + 89674, + 91249, + 91252, + 91257, + 91259, + 91260, + 91261, + 92744, + 94995, + 95906, + 97072, + 98712 + ], + "epoch" : 991388272, + "timestamp" : "2001-06-01T09:37:52Z", + "version" : "3.5.5.0" + }, + { + "author" : "Manoj Srivastava <srivasta@debian.org>", + "changes" : [ + "", + "debian-policy (3.5.4.0) unstable; urgency=low", + "", + " * [ACCEPTED 2/4/01] /var/mail and /var/spool/mail closes: Bug#42052", + " * [AMENDMENT 26/04/2001] include Perl Policy closes: Bug#83977", + " * Also incorporates all the improvements that Julian has made to to the", + " grammar and flow of the policy manual. The following are mostly", + " Julian's fixes:", + " * Removed reference to non-extant dpkg documentation", + " * Fixed the confusing self referential language. closes: Bug#85503", + " * Correct ambiguous kanguage about declaring build dependencies.", + " closes: Bug#86436", + " * Improved the woding of the footnote about shlibdeps.", + " closes: Bug#87233" + ], + "closes" : [ + 42052, + 83977, + 85503, + 86436, + 87233 + ], + "epoch" : 988482621, + "timestamp" : "2001-04-28T18:30:21Z", + "version" : "3.5.4.0" + }, + { + "author" : "Manoj Srivastava <srivasta@debian.org>", + "changes" : [ + "", + "debian-policy (3.5.3.0) unstable; urgency=low", + "", + " * Removed recommendation on packaging-manual", + " closes: Bug#86507, #93620, #93705", + " * Also now Conflicts and Replaces packaging-manual", + " * Remove FSSTND from binary package, although retain it in the source", + " package for the time being", + " * Get the version.ent non-compression thingy right this time!", + " * Also install FHS stuff byhand (as requested by webmasters)", + " * Corrected GPL name and location closes: Bug#88788, #93047", + " * Correct bug severities closes: Bug#91276", + " * Correct typos etc. in policy-process", + " * Rename all .text files as .txt", + " * Fixed the \"to to\" typo in policy closes: Bug#87007", + " * Changed packaging manual ==> dpkg documentation closes: Bug#88651", + " * [ACCEPTED 14/03/2001] Deprecate confusing closes: Bug#87828", + " Build-Depends arch syntax", + " * [AMENDMENT 29/03/2001] Clarification of example closes: Bug#87711", + " configuration files", + " * Undo all renaming to text, since the change had not been propogated to", + " the rules file, which broke badly. This shall have to wait for a later", + " version.", + " * Richard Braakman and Michael Dorman have expressed their resignation", + " from policy maintenance duties.", + " * fixed the date thinko in upgrading checklist. Thanks to Sébastien", + " Montagne <sebastien.montagne@netcourrier.com> closes: Bug#84236" + ], + "closes" : [ + 84236, + 86507, + 87007, + 87711, + 87828, + 88651, + 88788, + 91276, + 93047, + 93620, + 93705 + ], + "epoch" : 987359779, + "timestamp" : "2001-04-15T18:36:19Z", + "version" : "3.5.3.0" + }, + { + "author" : "Julian Gilbey <jdg@debian.org>", + "changes" : [ + "", + "debian-policy (3.5.2.0) unstable; urgency=low", + "", + " * Add XFree86 app-defaults ammendment closes: Bug#83069" + ], + "closes" : [ + 83069.0 + ], + "epoch" : 982505509, + "timestamp" : "2001-02-18T14:11:49Z", + "version" : "3.5.2.0" + }, + { + "author" : "Julian Gilbey <jdg@debian.org>", + "changes" : [ + "", + "debian-policy (3.5.1.0) unstable; urgency=low", + "", + " * Removed deprecated virtual package names closes: Bug#84641", + " * Changed rmdir postrm example (suggestion on -policy list)", + " * Removed Richard Braakman from list of maintainers at his request", + " * Corrected typos and grammatical errors found by Sean Perry", + " closes: Bug#85501, #85504, #85505, #85506", + " closes: Bug#85508, #85510, #85511, #85514", + " closes: Bug#84631, #84636, #85497, #85982", + " closes: Bug#85986, #85993, #86001", + " * No longer include the old proposal document closes: Bug#84079", + " * Update footnote about dpkg-shlibdeps now that it uses objdump; bump up", + " minor version number for this", + " * Updated dpkg-shlibdeps example to use up-to-date package names (and", + " correct dpkg-shlibdeps command line syntax)", + " * Clarify error conditions for package installation", + " (Bug#61801 from packaging-manual)", + " * Add the \"main\" section of each distribution (got left out by", + " accident!) (Bug#64304, #75955 from packaging-manual)", + " * Clean version numbering string (Bug#73064 from packaging-manual)", + " * Install HTML version of FHS closes: Bug#83487", + " * Removed bashism from debian/rules" + ], + "closes" : [ + 83487, + 84079, + 84631, + 84636, + 84641, + 85497, + 85501, + 85504, + 85505, + 85506, + 85508, + 85510, + 85511, + 85514, + 85982, + 85986, + 85993, + 86001 + ], + "epoch" : 982239180, + "timestamp" : "2001-02-15T12:13:00Z", + "version" : "3.5.1.0" + }, + { + "author" : "Manoj Srivastava <srivasta@debian.org>", + "changes" : [ + "", + "debian-policy (3.5.0.0) unstable; urgency=low", + "", + " * There have been numerous changes since the last major change, and", + " peole have had tiome now to review the recent changes, so I am", + " updating the policy minor version to reflect the quantity and", + " magnitude of changes since 3.2.1", + " * More spelling corrections, thanks to \"Christian T. Steigies\"", + " <cts@nikocity.de>", + " * Added mention of DEB_BUILD_OPTIONS in upgrading checklist.", + " closes: Bug#83924", + " * Fixed some typos. closes: Bug#83960", + " * Policy now mentions preinst scripts. closes: Bug#80342", + " * [AMENDMENT 2000/12/26] allow/document use of Debian Configuration", + " management system (debconf) closes: Bug#80347", + " * Yet more typo fixes closes: Bug#82743", + " * Document the fact that X font utilities have moved to the package", + " xutils closes: Bug#82966", + " * Fixed the date in the virtual package list closes: Bug#83438", + " * Cleaned up some ephemeral informative foornotes of the polic. Thanks", + " to Branden Robinson <branden@debian.org> closes: Bug#83065", + " * Corrected reference to the mime policy. closes: Bug#79891", + " * Corrected reference to the menu policy. closes: Bug#75925", + " * Added a note to the effect that the example make snippet used to", + " illustrate the DEB_BUILD_OPTIONS environment variable is merely", + " informative, and expanded the example to dismiss any confusion about", + " potential failure due to accidentally trying to strip scripts.", + " closes: Bug#80506" + ], + "closes" : [ + 75925, + 79891, + 80342, + 80347, + 80506, + 82743, + 82966, + 83065, + 83438, + 83924, + 83960 + ], + "epoch" : 980740756, + "timestamp" : "2001-01-29T03:59:16Z", + "version" : "3.5.0.0" + }, + { + "author" : "Manoj Srivastava <srivasta@debian.org>", + "changes" : [ + "", + "debian-policy (3.2.1.2) unstable; urgency=low", + "", + " * The minimal change in version number is so that people can test and", + " root out the bugs in this document before we make everyone change to", + " this version.", + " * Document the Enhances relationship", + " * Removed the restriction that one, and exactly one, person must", + " maintain a package. closes: Bug#51879", + " * Fixed a typo, and added the nogroup name, in uid/gid section of", + " policy. closes: Bug#53496", + " * Fixed a misstatement in policy about not needing to depend on packages", + " in the base system (not true -- the Essential tag is significant)", + " closes: Bug#53700", + " * Clarified update-rc.d stuff closes: Bug#55048", + "", + " * We have already included the material for shlibdep changes, and most", + " of this is not relevant to policy anyway. closes: Bug#55730", + " * makedev--> MAKEDEV closes: Bug#57154", + " * Added restrictions on the files in /usr/share/doc/", + " closes: Bug#59403", + " * Changed location of a paragraph about copyright files into the section", + " that deals with copyright files. closes: Bug#65765", + " * init script configuration variables closes: Bug#66912", + " * Clarifed language about packages sharing a conffile need to be marked", + " as conflicting closes: Bug#76028" + ], + "closes" : [ + 51879, + 53496, + 53700, + 55048, + 55730, + 57154, + 59403, + 65765, + 66912, + 76028 + ], + "epoch" : 979803838, + "timestamp" : "2001-01-18T07:43:58Z", + "version" : "3.2.1.2" + }, + { + "author" : "Manoj Srivastava <srivasta@debian.org>", + "changes" : [ + "", + "debian-policy (3.2.1.1) unstable; urgency=low", + "", + " * Don't compress version.ent in the doc directory (it gets bigger!)", + " * Incorporate the packaging manual into the policy document. The minimal", + " change in version number is because I suspect that this version is", + " going to be buggy.", + " closes: Bug#62943, Bug#72949", + " * Fixed typo in menu-policy. closes: Bug#70442", + " * Fixed typo in policy manual closes: Bug#70634, Bug#70643", + " * Removed extraneous > from policy closes: Bug#77645", + " * Fixed two typos in upgrading checklist closes: Bug#78809, Bug#78822", + " * Fixed spelling of utility closes: Bug#82458", + " * [ACCEPTED 2000/09/08] Free pkgs depending on non-US should go into", + " non-US/{main,contrib} closes: Bug#69229", + " * Added rsh-server and telnet server to the virtual packages list", + " closes: Bug#77404", + " * Fixed outdated references to the FHS. closes: Bug#77650" + ], + "closes" : [ + 62943, + 69229, + 70442, + 70634, + 70643, + 72949, + 77404, + 77645, + 77650, + 78809, + 78822, + 82458 + ], + "epoch" : 979710811, + "timestamp" : "2001-01-17T05:53:31Z", + "version" : "3.2.1.1" + }, + { + "author" : "Manoj Srivastava <srivasta@debian.org>", + "changes" : [ + "", + "debian-policy (3.2.1.0) unstable; urgency=low", + "", + " * [AMENDMENT 15/01/2000] revision of the \"to build with X support or", + " not\" policy. closes: Bug#53759", + " * [ACCEPTED 2000/06/06] Must/Should/May in policy This is only a", + " clarifying change, and was not intended to change the intent of", + " policy. closes: Bug#64437", + " * [ACCEPTED 03/05/2000] About the use of conffiles. closes: Bug#61308", + " * [AMENDMENT 10/05/2000] s/mail\\.mail/root\\.mail/ closes: Bug#62668", + " * [ACCEPTED 04/05/2000] Update for new non-US layout closes: Bug#62946", + " * [ACCEPTED 04/05/2000] s/debian-devel/debian-legal/ closes: Bug#62947", + " * [ACCEPTED 04/05/2000] s/bash/base-files/ closes: Bug#62948", + " * Typo: 1744s/tty/ttyS/ closes: Bug#64516", + " * proposal for mp3-encoder virtual package closes: Bug#64004", + " * proposal for mp3-decoder virtual package closes: Bug#64006", + " * new virtual package time-daemon closes: Bug#69031", + " * [PATCH] typos in menu-policy.sgml closes: Bug#69424", + " * [PATCH] typos and awkwardness in policy.sgml closes: Bug#69426", + " * the example for using nostrip in DEB_BUILD_OPTIONS is", + " incorrect. closes: Bug#69487", + " * [PATCH] more corrections closes: Bug#69670", + " * [AMENDMENT 26/10/99] Amend non-free definition closes: Bug#46522", + " * [AMMENDMENT 29/10/99] /bin/sh needs echo -n closes: Bug#48247", + " * [AMENDMENT 1999/11/23] Clarify meaning of Essential: yes", + " closes: Bug#50832", + " * [ACCEPTED] Request for new virtual packages: rsh-client and", + " telnet-client closes: Bug#58759" + ], + "closes" : [ + 46522, + 48247, + 50832, + 53759, + 58759, + 61308, + 62668, + 62946, + 62947, + 62948, + 64004, + 64006, + 64437, + 64516, + 69031, + 69424, + 69426, + 69487, + 69670 + ], + "epoch" : 967100790, + "timestamp" : "2000-08-24T07:06:30Z", + "version" : "3.2.1.0" + }, + { + "author" : "Manoj Srivastava <srivasta@debian.org>", + "changes" : [ + "", + "debian-policy (3.2.0.0) unstable; urgency=low", + "", + " * Fixed bugs in debian-policy package:", + " * We have had doc-base support for a while now. closes: Bug#15709", + " * packaging manual: Added additional clarification on dpkg", + " behaviour. closes: Bug#17369", + " * [PROPOSAL] Do not make hardlinks to conffiles closes: Bug#22935", + " * [PROPOSED]: clarification needed about diversions.", + " fixed usage for dpkg-divert closes: Bug#29522", + " * [OLD PROPOSAL] debian-policy has an unclear statement", + " on dependancies and priorities closes: Bug#39398", + " * [ACCEPTED 10/26/99] changelog.html.gz sanitization. closes: Bug#40934", + " * [AMENDED 07/09/1999] policy on -g, a proposal closes: Bug#43787", + " * Fixed missing </chapt> tag. closes: Bug#51091", + " * Correct typo in section 2.3.5 closes: Bug#52225", + " * Documented that the library before the symlink hack", + " (which dependend on file system specific kinks to work)", + " is no longer required by newer versions of dpkg. closes: Bug#53405", + " * [ACCEPTED 02/01/2000] policy for usage of \"xserver\"", + " alternative closes: Bug#53755", + " * [ACCEPTED 02/01/2000] additions to virtual package", + " list closes: Bug#53756", + " * [ACCEPTED 02/01/2000] policy for \"x-terminal-emulator\"", + " virtual package and alternative closes: Bug#53757", + " * [ACCEPTED 02/01/2000] policy for \"x-window-manager\"", + " virtual package and alternative closes: Bug#53758", + " * [ACCEPTED 02/01/2000] revision of X application-defaults", + " policy closes: Bug#53760", + " * [ACCEPTED 02/01/2000] revision of the Motif/LessTif", + " policy closes: Bug#53761", + " * [ACCEPTED 02/01/2000] applying the FHS to packages", + " that use X closes: Bug#53762", + " * [ACCEPTED 02/01/2000] policy for X font packages closes: Bug#53763", + " * Moved the documents into the Debian/ section, since", + " that is where they belong, really. closes: Bug#54777", + " * Fixed the ftp location in the manuals. closes: Bug#56407", + " * Fixed missing urlname entity in the sgml docs (where", + " was it defined before anyway?) closes: Bug#56692", + " * Fixed bugs in packaging-manual package:", + " * Fixed typo where dpkg-genchanges was used instead of", + " dpkg-gencontrol. closes: Bug#58771", + " * Other changes:", + " * Added policy-process to document current procedures.", + " * Added a dependency on fileutiles >=4.0, since the package would fail", + " to install with older fileutils.", + " * Installed FHS version 2.1", + " * Policy recommends packaging manual and vice versa", + " * Added FHS details to copyright file", + " * Updaed the upgrade checklist. Minor changes to the ./debian/rules", + " file.", + " * Added footnotes in the packaging manual warning about the upcoming", + " dpkg-shlibdeps change as in Bug#55730" + ], + "closes" : [ + 15709, + 17369, + 22935, + 29522, + 39398, + 40934, + 43787, + 51091, + 52225, + 53405, + 53755, + 53756, + 53757, + 53758, + 53760, + 53761, + 53762, + 53763, + 54777, + 56407, + 56692, + 58771 + ], + "epoch" : 964996982, + "timestamp" : "2000-07-30T22:43:02Z", + "version" : "3.2.0.0" + }, + { + "author" : "Manoj Srivastava <srivasta@debian.org>", + "changes" : [ + "", + "debian-policy (3.1.1.3) unstable; urgency=low", + "", + " * Fixed an upgrade bug when /usr/doc happens to be a symlink, and does", + " not point to /usr/share/doc. A couple of people were bitten by this." + ], + "closes" : [], + "epoch" : 951798425, + "timestamp" : "2000-02-29T04:27:05Z", + "version" : "3.1.1.3" + }, + { + "author" : "Julian Gilbey <jdg@debian.org>", + "changes" : [ + "", + "debian-policy (3.1.1.2) unstable; urgency=low", + "", + " * Correct missing </chapt> in packaging.sgml (closes: #51091)", + " * Correct typo in policy 2.3.5 (closes: #52225)" + ], + "closes" : [ + 51091, + 52225 + ], + "epoch" : 945722397, + "timestamp" : "1999-12-20T20:39:57Z", + "version" : "3.1.1.2" + }, + { + "author" : "Julian Gilbey <jdg@debian.org>", + "changes" : [ + "", + "debian-policy (3.1.1.1) unstable; urgency=low", + "", + " * Correction to typo in packaging manual, section 6.2.", + " * Correction to typo in packaging manual, section 12.2.5 (closes:", + " #50502)", + " * More corrections to packaging manual typos (closes: #50857)" + ], + "closes" : [ + 50502, + 50857 + ], + "epoch" : 943298611, + "timestamp" : "1999-11-22T19:23:31Z", + "version" : "3.1.1.1" + }, + { + "author" : "Julian Gilbey <jdg@debian.org>", + "changes" : [ + "", + "debian-policy (3.1.1.0) unstable; urgency=low", + "", + " * Correct description of negated architectures in Build-Depends", + " description in Packaging manual (closes: #49901)" + ], + "closes" : [ + 49901.0 + ], + "epoch" : 942764628, + "timestamp" : "1999-11-16T15:03:48Z", + "version" : "3.1.1.0" + }, + { + "author" : "Julian Gilbey <jdg@debian.org>", + "changes" : [ + "", + "debian-policy (3.1.0.0) unstable; urgency=low", + "", + " * Add instructions on /usr/doc -> /usr/share/doc symlinks (closes:", + " #45561, #42447, #48570)", + " * Added source dependencies (closes: #41232)", + " * Deprecated /etc/rc.boot (closes: #32448, #32449)", + " * Update-rc.d now only legal way to automatically access /etc/rc?.d", + " directoried (closes: #41547)", + " * FHS compliant location of examples (closes: #42849)", + " * Added ispell-dictionary to virtual-packages.list (following new", + " suggestions: no objections => accept) (closes: #8221)", + " * Added man-browser to virtual-packages.list (closes: #24695)", + " * Added ident-server to virtual-packages.list (closes: #45307)", + " * Alphabeticised virtual packages list ;)", + " * Corrected GPL reference in proposal.sgml", + " * Clarification of \"extra\" priority (closes: #33076)", + " * Remove buggy and seriously problematic licenses from list of contrib", + " package criteria (closes: #45318)", + " * Move docs to /usr/share/doc with a compatibility symlink (closes:", + " #41829)", + " * Update to FHS 2.1 draft #3 (for /var/state etc. changes).", + " * Correct /var/lib/games -> /var/games (closes: #42358)", + " * Added MIME subpolicy (closes: #46516)", + " * Added support for VISUAL (closes: #41121)", + " * Clarify non-dependence on /usr/local (closes: #44922)", + " * Modified description of mail spool locking (closes: #43651)", + " * Clarified wording of conffiles and configuration files (closes:", + " #40766, #40767)", + " * Changed description of release numbers (closes: #44620)", + " * Added changelog.html -> changelog requirement (closes: $40934)", + " * packaging-manual now correctly installs its docs (closes: #44643)", + " * The packaging manual now discusses version numbers based on dates", + " (closes: #17621)", + " * Mention ls -f for testing order in which files appear on disk (closes:", + " #19179)", + " * Change order of '.' and '+' in description of version numbers (closes:", + " #41095)", + " * s/fields/field names/ in section 4.1 of packaging manual for clarity", + " * Add Build-Depends-Indep: field to control file" + ], + "closes" : [ + 8221, + 17621, + 19179, + 24695, + 32448, + 32449, + 33076, + 40766, + 40767, + 41095, + 41121, + 41232, + 41547, + 41829, + 42358, + 42447, + 42849, + 43651, + 44620, + 44643, + 44922, + 45307, + 45318, + 45561, + 46516, + 48570 + ], + "epoch" : 941759437, + "timestamp" : "1999-11-04T23:50:37Z", + "version" : "3.1.0.0" + }, + { + "author" : "Manoj Srivastava <srivasta@debian.org>", + "changes" : [ + "", + "debian-policy (3.0.1.1) unstable; urgency=low", + "", + " * Typo corrected in packaging manual. closes: Bug#40180", + " * Chnaged rules file to create ps and pdf files." + ], + "closes" : [ + 40180.0 + ], + "epoch" : 934784469, + "timestamp" : "1999-08-16T06:21:09Z", + "version" : "3.0.1.1" + }, + { + "author" : "Manoj Srivastava <srivasta@debian.org>", + "changes" : [ + "", + "debian-policy (3.0.1.0) unstable; urgency=low", + "", + " * A few typos and omissions corrected", + " * Added the pop3-server to the virtual packages list, as decided on the", + " list.", + " * Fix the self reference to a location on the web site. closes: Bug#39408", + " * Added the clarification that the .la files are essential for the", + " packages using libtool's libltdl library, in which case the", + " .la files must go in the run-time library package. (this is why this", + " is version 3.0.1.0, and not 3.0.0.1)", + " * The virtual package list has new directions (this has been true for a", + " while, I am just closing the bug now). closes: Bug#26159", + " * Since this package now contains the FHS, this closes: Bug#25533", + " * The General resolution prototcol handling of the logos closes: Bug#26915", + " * Inclusion of the Menu policy in the main policy document closes: Bug#30036", + " * Since proposal submitting guidelines are now in the policy package,", + " this closes: Bug#38612", + " * Changed a /usr/doc reference to /usr/share/doc which had beeen missed", + " before. closes: Bug#40864" + ], + "closes" : [ + 25533, + 26159, + 26915, + 30036, + 38612, + 39408, + 40864 + ], + "epoch" : 932063711, + "timestamp" : "1999-07-15T18:35:11Z", + "version" : "3.0.1.0" + }, + { + "author" : "Manoj Srivastava <srivasta@debian.org>", + "changes" : [ + "", + "debian-policy (3.0.0.0) unstable; urgency=low", + "", + " * This is a test version of the policy package, and shall not be", + " officially uploaded.", + " * Merged in the packaging manual sources (we still have two separate", + " .deb packages)", + " * Multiple minor packaging tweaks.", + " * [ACCEPTED 1998/05/01] Policy clarification about Standards-Version", + " Added the clarifying paragraph (and the rationale in a footnote).", + " closes: Bug#21969", + " * [ACCEPTED 1999/04/05] Policy note that GPL moved to", + " /usr/share/common-licenses. Again, also added the rationale as a", + " footnote. closes: Bug#28747", + " * [ACCEPTED 1999/05/04] Libtool archive (*.la) files in -dev' packages", + " closes: Bug#37257, Bug#37338", + " * [ACCEPTED 1999/04/28] Logrotation. Standardizer on logrotate.", + " closes: Bug# 37342", + " * [ACCEPTED 1999/05/23] Rewrite of section 5.7 (Programs for the X", + " Window System) closes: Bug#38212", + " * [ACCEPTED 1999/05/15] Separate menu policy (like virtual package list)", + " closes: Bug#37713", + " * [ACCEPTED 1999/05/09] Utmp group proposal", + " closes: Bug#37389", + " * [ACCEPTED 1999/05/09] Adopt the FHS in place of FSSTND", + " Changed all references to the proper FHS versions. This was a first", + " scan, so some references may still need to be changed. closes: Bug#37345", + " * Updated the upgrading checklist.", + " * updated the proposal for policy update to reflect the latest" + ], + "closes" : [ + 21969, + 28747, + 37257, + 37338, + 37342, + 37345, + 37389, + 37713, + 38212 + ], + "epoch" : 930800955, + "timestamp" : "1999-07-01T03:49:15Z", + "version" : "3.0.0.0" + }, + { + "author" : "Manoj Srivastava <srivasta@debian.org>", + "changes" : [ + "", + "debian-policy (2.5.1.0) unstable; urgency=low", + "", + " * Removed double '>' marks from the policy document. closes: Bug#35095", + " * Corrected canonical source for \"Csh Programming Considered Harmful\"", + " closes: Bug#36286 Bug#32499", + " * Fixed typo in invocation of update-rc.d. closes: Bug#34988 Bug#34543", + " * Fixed misspelling of accessible. Ran ispell over the rest of the", + " document (painful because of the large number of technical terms in", + " there). closes: Bug#34233", + " * Make the binary package contain the version.ent as well. closes: Bug#31033", + " * Fixed typo s/as is/is/. closes: Bug#30302", + " * AMENDMENT 23/04/1999: changed /etc/nntpserver recommendation to", + " /etc/news/server. closes: Bug#21875", + " * Added the current list of policy maintainers. closes: Bug#30148" + ], + "closes" : [ + 21875, + 30148, + 30302, + 31033, + 34233, + 34988, + 35095, + 36286 + ], + "epoch" : 925229429, + "timestamp" : "1999-04-27T16:10:29Z", + "version" : "2.5.1.0" + }, + { + "author" : "Manoj Srivastava <srivasta@debian.org>", + "changes" : [ + "", + "debian-policy (2.5.0.0) unstable; urgency=low", + "", + " * AMENDMENT: Added in changes in Bug #25911, which rearranged sections", + " to create a new section 4, namely, files. Section 3.3 (\"Files\") should", + " become Section 4. The Sections that are currently Section 4 and", + " Section 5 should be moved down to become Section 5 and Section 6", + " accordingly.", + "", + " What is now Section 5.5 (\"Log files\") should be moved to be a", + " subsection of the new Section 4 (\"Files\"), becoming section 4.8,", + " placing it after \"Configuration files\", moving the would-be Section", + " 4.8 (\"Permissions and owners\") to Section 4.9. All subsections of the", + " current Section 5 after 5.5 should be accordingly moved down to fill", + " in the number gap.", + "", + " This, along with the next amendment, justifies bumping up the version", + " number. closes: BUG#25911", + "", + " * AMENDMENT: Added in changes in Bug #21185, about the naming and", + " compression of changelog files. Now, if the upstream changelog file is", + " HTML formatted, it should be accessible as", + " /usr/doc/<package>/changelog.html.gz It also allows for this to be a", + " symlink, if the upstream file name does not conform to Debian", + " conventions. closes: BUG#21185", + "", + " * AMENDMENT: Added in changes in Bug #7890, to make clear that the HTML", + " documents should be supplied in _some_ package, not necessarily in the", + " main binary package (at the discretion of the maintainer).", + " closes: BUG#7890", + "", + " * AMENDMENT: Added in changes in Bug #26461, which corrects the policy", + " to refer to /usr/doc/<package>/copyright, rather than", + " /usr/doc/copyright/<package>. closes: BUG#26461", + "", + " * AMENDMENT: Added in changes in Bug #25385, which allow the", + " architecture specification strings to be of the form <arch>-<os>,", + " where os is one of linux, gnu. Previously, only linux was allowed, now", + " we also cater to the hurd. closes: BUG#25385", + "", + " * The responsibility of the contents of this package has now passed to", + " the debian-policy mailing list. The packaging details are now being", + " managed by a group of maintainers that do ot won the contents.", + "", + " * Make the package optional, not extra.", + "", + " * Re did the SGML markup. Normalized the document, and undid the omitted", + " and shor tags. Personally, I use too many DTD's in real life to be so", + " converssant with each one to be clever with tag omissions, and, since", + " I have a smart editor, omitting tags does not byuy one much. In the", + " process, I discovered a few errors in the markup (one of my", + " predecessors hasd the unfortunate habit of treating <p> as a \"create", + " some space here\" tag, and more often than not put it at the end of a", + " paragraph, rather than using is as a container element (which is what", + " it is, really).", + "", + " * Re did the control files, making them more robust", + "", + " * re did the rules file, making it more general, and easier to maintain", + " by putting in a layer of abstractions." + ], + "closes" : [ + 7890, + 21185, + 25385, + 25911, + 26461 + ], + "epoch" : 909695812, + "timestamp" : "1998-10-29T21:16:52Z", + "version" : "2.5.0.0" + }, + { + "author" : "Philip Hands <phil@hands.com>", + "changes" : [ + "", + "debian-policy (2.4.1.4) unstable; urgency=low", + "", + " * New Maintainer <debian-policy@lists.debian.org>" + ], + "closes" : [], + "epoch" : 904959695, + "timestamp" : "1998-09-05T01:41:35Z", + "version" : "2.4.1.4" + }, + { + "author" : "Philip Hands <phil@hands.com>", + "changes" : [ + "", + "debian-policy (2.4.1.3) unstable; urgency=low", + "", + " * New maintainer (with changes from Adam P. Harris' proposed NMU)", + " * policy.sgml: some awkward phrasings fixed (closes Bug#22006)", + " * policy.sgml: s/depreciated/deprecated (closes Bug#21831)", + " * debian/control: added conflict doc-base (<< 0.6), which I still am not", + " sure why we need this but hey (closes Bug#21554)", + " * policy.sgml: use new <url> tag where appropriate", + " * policy.sgml, debian/control: always dynamically self reference the", + " current version of policy, that is, do not hard code policy revision", + " or date anywhere", + " * debian/rules: use dpkg-gencontrol -isp", + " * bugs fixed in some unknown previous version (closes Bug#23177)" + ], + "closes" : [], + "epoch" : 902825657, + "timestamp" : "1998-08-11T08:54:17Z", + "version" : "2.4.1.3" + }, + { + "author" : "Adam P. Harris <aph@debian.org>", + "changes" : [ + "", + "debian-policy (2.4.1.2) frozen unstable; urgency=low", + "", + " * non-maintainer release", + " * rebuild package to fix truncated Chapter 3 (Bug#23408, not marked as", + " important but should be, since a gaping hole in policy is very", + " annoying.)", + " * bumped version of policy, within the document, to this version number,", + " but not the date, indicating nothing really changed since then", + " * no content changes", + " * debian/rules: clean is a little cleaner" + ], + "closes" : [], + "epoch" : 897981322, + "timestamp" : "1998-06-16T07:15:22Z", + "version" : "2.4.1.2" + }, + { + "author" : "Christian Schwarz <schwarz@debian.org>", + "changes" : [ + "", + "debian-policy (2.4.1.1) frozen unstable; urgency=low", + "", + " * Orphaned package" + ], + "closes" : [], + "epoch" : 895175690, + "timestamp" : "1998-05-14T19:54:50Z", + "version" : "2.4.1.1" + }, + { + "author" : "Christian Schwarz <schwarz@debian.org>", + "changes" : [ + "", + "debian-policy (2.4.1.0) frozen unstable; urgency=low", + "", + " * Changes to the Debian Policy Manual:", + "", + " - Updated section 3.1.2 Site-specific programs", + " and section 3.8 Keyboard configuration:", + " + improved wording (fixes:bug#20129)", + "", + " - Updated section 2.1.7 Subsections:", + " + fixed typos (fixes:bug#18145)", + "", + " - Updated section 3.3.5 Symbolic links:", + " + symbolic links within a toplevel directory should be relative,", + " symbolic links between toplevel directories should be absolute", + " (cf., Policy Weekly Issue#6, topic 2)", + "", + " - Updated section 3.4 System run levels:", + " + Intro: mention /etc/rcS.d (links to boot time scripts)", + " + Notes: include rationale why /etc/init.d scripts have to be tagged", + " as conffiles (fixes:bug#16199)", + " + Example: changed example init.d script to handle force-reload", + " and restart options and to comply with the console message", + " standard (fixes:bug#19216)", + "", + " - Updated section 4.8 Emacs lisp programs:", + " + Replaced old section about lisp programs with a reference to", + " the file debian-emacs-policy.gz, installed by the emacsen-common", + " package.", + "", + " - Updated section 4.9 Games:", + " + manpages for games should be installed in /usr/man/man6", + " (cf., Policy Weekly Issue#6, topic 3)", + "", + " - Removed one example reference to the current standards version", + " - Include manual's date as plain text in the .sgml source so that", + " a recompiled manual uses the same release date", + "", + " * Changes to the authoritative list of virtual package names:", + " - Removed obsolete virtual package `emacs'", + "", + " * New version numbering scheme:", + "", + " - The version numbers are independent of dpkg now, but all policy", + " manuals (the Debian Policy Manual, the Debian Packaging Manual, and", + " the Debian Developer's Reference) share the same version numbering", + " scheme.", + "", + " - The first three digits of the version number specify the", + " `Standards-Version.' This number is incremented with each policy", + " change. The fourth digit represents the `patch-level,' which may", + " differ between the manuals.", + "", + " If only the patch-level digit is incremented, no changes in policy", + " have been made, except bug fixes and clarifications. Packages only", + " have to specify the first three digits of the version number in the", + " `Standards-Version' field of their source packages.", + "", + " * Packaging changes:", + "", + " - Uploaded to frozen and unstable. This is a documentation-only", + " package and the changes to the manual are relevant for hamm.", + "", + " - Fixed FSF's address in copyright file (detected by Lintian)" + ], + "closes" : [], + "epoch" : 892541289, + "timestamp" : "1998-04-14T08:08:09Z", + "version" : "2.4.1.0" + }, + { + "author" : "Christian Schwarz <schwarz@debian.org>", + "changes" : [ + "", + "debian-policy (2.4.0.0) unstable; urgency=low", + "", + " * Changes to the Debian Policy Manual:", + "", + " - Updated section 3.3.4 Scripts:", + " + /bin/sh may be any POSIX compatible shell", + " + scripts including bashisms have to specify /bin/bash as", + " interpreter", + " + scripts which create files in world-writable directories", + " (e.g., in /tmp) should use tempfile or mktemp for creating", + " the directory", + "", + " - Updated section 3.3.5 Symbolic Links:", + " + symbolic links referencing compressed files must have the same", + " file extension as the referenced file", + "", + " - Updated section 3.3.6 Device files:", + " + /dev/tty* serial devices should be used instead of /dev/cu*", + "", + " - Updated section 3.4.2 Writing the scripts [in /etc/init.d]:", + " + all /etc/init.d scripts have to provide the following options:", + " start, stop, restart, force-reload", + " + the reload option is optional and must never stop and restart", + " the service", + "", + " - Updated section 3.5 Cron jobs:", + " + cron jobs that need to be executed more often than daily should", + " be installed into /etc/cron.d", + "", + " - Updated section 3.7 Menus:", + " + removed section about how to register HTML docs to `menu'", + " (the corresponding section in 4.4, Web servers and applications,", + " has been removed in policy 2.2.0.0 already, so this one was", + " obsolete)", + "", + " - New section 3.8 Keyboard configuration:", + " + details about how the backspace and delete keys should be", + " handled", + "", + " - New section 3.9 Environment variables:", + " + no program must depend on environment variables to get a", + " reasonable default configuration", + "", + " - New section 4.6 News system configuration:", + " + /etc/news/organization and /etc/news/server should be supported", + " by all news servers and clients", + "", + " - Updated section 4.7 Programs for the X Windows system:", + " + programs requiring a non-free Motif library should be provided", + " as foo-smotif and foo-dmotif package", + " + if lesstif works reliably for such program, it should be linked", + " against lesstif and not against a non-free Motif library", + "", + " - Updated section 4.9 Games:", + " + games for X Windows have to be installed in /usr/games, just as", + " non-X games", + "", + " - Lots of typos fixed (thanks to Ray Dassen for the patch!)", + "", + " * Changes to the authoritative list of virtual package names:", + " - added `libc-dev' and `emacsen'", + "", + " * Merged `/usr/doc/debian-policy/changelog-policy.gz' into this", + " changelog file", + "", + " * Included `Policy checklist for upgrading your packages' from the", + " Policy Home Page as /usr/doc/debian-policy/upgrading-checklist.text.gz", + "", + " * Added support for doc-base to register the Policy Manual to the", + " online documentation systems dwww and dhelp (fixes:#15710)", + "", + " * Upgraded to standards version 2.4.0.0 (no changes)" + ], + "closes" : [], + "epoch" : 886193905, + "timestamp" : "1998-01-30T20:58:25Z", + "version" : "2.4.0.0" + }, + { + "author" : "Christian Schwarz <schwarz@debian.org>", + "changes" : [ + "", + "debian-policy (2.3.0.1) unstable; urgency=low", + "", + " * Changes in the Debian Policy Manual:", + " - X library package is now called xlib6g", + " * Changes in the authoritative list of virtual package names:", + " - Added emacs, c-compiler, fortran77-compiler, lambdamoo-core,", + " lambdamoo-server", + " * Conflict with old dpkg-dev version that included policy manual", + " (fixes #13790)", + " * Removed `tentative-opt-draft' from package since people considered", + " the draft official policy (which is not the case)", + " * Don't use debstd anymore" + ], + "closes" : [], + "epoch" : 877467832, + "timestamp" : "1997-10-21T21:03:52Z", + "version" : "2.3.0.1" + }, + { + "author" : "Christian Schwarz <schwarz@debian.org>", + "changes" : [ + "", + "debian-policy (2.3.0.0) unstable; urgency=low", + "", + " * Changes in the Debian Policy Manual:", + " - reworked chapter `The Debian Archive' to cover new", + " contrib/non-free policy", + " - call \"contrib\" and \"non-free\" a `section' (not `distribution')", + " - refer to license files (GPL, LGPL, etc.) as uncompressed files", + " - changed `/etc/news/server' into `/etc/nntpserver' in example of", + " maintainer scripts (fixes #11517)", + " - new section about `Daemons'", + " - updated section about `Configuration files'", + " - MUAs and MTAs have to use liblockfile", + " - fixed typos and grammatical errors", + " * Changes in the authoritative list of virtual package names:", + " - renamed tcl/tk virtual package names to `tclsh' and `wish'", + " * Paper about libc6 migration:", + " - fixed typos (fixes #11641), thanks to James Troup for the patch!", + " * SGML source code included in package", + " * don't use `2-up' style for PostScript version (fixes #11095)" + ], + "closes" : [], + "epoch" : 873154471, + "timestamp" : "1997-09-01T22:54:31Z", + "version" : "2.3.0.0" + }, + { + "author" : "Christian Schwarz <schwarz@debian.org>", + "changes" : [ + "", + "debian-policy (2.2.0.0) unstable; urgency=low", + "", + " * Changes in the Debian Policy Manual:", + " - completely reworked structure", + " - moved sections about new maintainers, upload procedure, interim", + " releases, and mailing lists into the Developers Reference Manual", + " - moved a few (small) sections into the Debian Packaging Manual", + " - removed all those ugly footnotes", + " - new example for \"reload\" in section about console messages", + " - mention Artistic License (fixes #9793)", + " - don't mention dpkg's version number in Policy Manual", + " - rewrote abstract and section introductions", + " - mention \"orphaned packages\"", + " - maintainer is responsible for a package license to comply with the", + " distributions' policy", + " - putting a package into base section requires discussion on debian-devel", + " - rewrote sections about \"pre-depends\", \"essential\" and, \"base\" packages", + " - added note that non-us' maintainers have to live outside the US", + " - added crypto-hook statement (fixes #7257)", + " - added section about arch spec strings", + " - rewrote section about \"Site specific programs\" (/usr/local)", + " - included Ian's suggestions for user IDs", + " - added section about \"menus\"", + " - removed section about \"web menus\" since this will be superseded with", + " the new documentation policy soon", + " - incorporated \"Debian Free Software Guidelines\" (fixes #9024)", + " - removed note that linking with -g produces large a.out binary (fixes", + " #11008)", + " - added section about editors and pagers", + " - added note about Package priorities and dependencies", + " - added section about cron jobs (fixes #8814)", + " - added section about device files", + " - don't install shared libraries as executable (fixes #7129)", + " - app-defaults files may not be conffiles (cf. #2717)", + " - lots of minor changes not worth mentioning here (typos, formulations,", + " etc.)", + " * Changes in the authoritative list of virtual package names", + " - Removed obsolete virtual packages: xR6shlib, xlibraries,", + " compress, emacs, sgmls, inews, gs_x, gs_svga, gs_both, xpmR6", + " - Added new section about obsolete names", + " * Added Helmut Geyer's paper about libc5-libc6 migration", + " * Fixed package's description" + ], + "closes" : [], + "epoch" : 868793151, + "timestamp" : "1997-07-13T11:25:51Z", + "version" : "2.2.0.0" + }, + { + "author" : "Christian Schwarz <schwarz@debian.org>", + "changes" : [ + "", + "debian-policy (2.1.3.3) frozen unstable; urgency=low", + "", + " * Mention Artistic License in section 2.5 (bug #9755)" + ], + "closes" : [], + "epoch" : 863621595, + "timestamp" : "1997-05-14T14:53:15Z", + "version" : "2.1.3.3" + }, + { + "author" : "Christian Schwarz <schwarz@debian.org>", + "changes" : [ + "", + "debian-policy (2.1.3.2) frozen unstable; urgency=low", + "", + " * Fixed an email address, an URL, and several typos in chapter 6 (#9358)", + " * Added new virtual package \"wordlist\" to list (requested by Joey Hess)", + " * Changed wording in section about \"non-free\" packages as suggested", + " by Kai Henningsen (#7076)" + ], + "closes" : [], + "epoch" : 862855539, + "timestamp" : "1997-05-05T18:05:39Z", + "version" : "2.1.3.2" + }, + { + "author" : "Christian Schwarz <schwarz@debian.org>", + "changes" : [ + "", + "debian-policy (2.1.3.1) frozen unstable; urgency=low", + "", + " * Fixed bug in chapter 7: `-ur' should read `-us' (#8874)", + " * Fixed bug in chapter 7: `-rwhatever' also needed for rebuild (#8874)", + " * Create a PS and HTML version of the Policy Manual and upload it", + " \"byhand\".", + " * Install virtual-package-names-list.text in /usr/doc/debian-policy", + " and upload it \"byhand\" too." + ], + "closes" : [], + "epoch" : 862329734, + "timestamp" : "1997-04-29T16:02:14Z", + "version" : "2.1.3.1" + }, + { + "author" : "Christian Schwarz <schwarz@debian.org>", + "changes" : [ + "", + "debian-policy (2.1.3.0) unstable; urgency=low", + "", + " * Initial Release.", + " * New Policy Manager: Christian Schwarz <schwarz@debian.org>", + " * Added section 2.4 about the \"non-us\" distribution.", + " * Added section 3.1.1 about the \"Package\" field in the control file.", + " * Added section 3.2.1 about \"Binaries\": two programs with different", + " functionality must not have the same name.", + " * Changed headline of section 3.2.6 into \"Debian changelog and upstream", + " changelog\" as suggested by Santiago Vila Doncel <sanvila@unex.es>.", + " * Added log-rotating example to section 3.2.9 that tests with `-sf',", + " as suggested by Boris D. Beletsky <borik@isracom.co.il>.", + " * Added section 3.13: \"Webstandard 3.0\" by Christoph Lameter.", + " * Added section 3.14: \"Standard for Console Messages\" by Christian Schwarz.", + " * Split section 4.1 into 4.1.1 (Options for binaries) and 4.1.2 (Options", + " for libraries)", + " * Added note to 4.1.2: Libraries should be compiled with `-D_REENTRANT'", + " to make them compatible with LinuxThreads, by Rob Browning", + " <osiris@cs.utexas.edu>.", + " * Added note to 4.1.2: Libraries should be stripped with", + " \"strip --strip-unneeded\", by Guy Maor <maor@ece.utexas.edu>.", + " * Section 5.2: Policy changelog is now", + " \"/usr/doc/debian-policy/changelog-policy.gz\". This fixes bug #6130.", + " * Section 6.2 renamed to \"Uploading your first Debian package\". This", + " fixes bug #6130." + ], + "closes" : [], + "epoch" : 858445736, + "timestamp" : "1997-03-15T17:08:56Z", + "version" : "2.1.3.0" + }, + { + "author" : "David Morris <bweaver@worf.netins.net>", + "changes" : [ + "", + "debian-manuals (2.1.2.2) frozen unstable;", + "", + " * Fixed even more typographical and grammatical errors in Policy and", + " Programmer's manual", + " * Corrected the contact email addresses again.", + " * Added a paragraph to Policy 6.3 on taking over an old package (Guy Maor)", + " * Added a paragraph to Programmer 4.2.14 on listing distributions to load", + " a package into. (Guy Maor)", + " * Further clarification of use of absolute pathnames in scripts in", + " Programmer 6.1." + ], + "closes" : [], + "epoch" : 849677284, + "timestamp" : "1996-12-04T05:28:04Z", + "version" : "2.1.2.2" + }, + { + "author" : "David Morris <bweaver@worf.netins.net>", + "changes" : [ + "", + "debian-manuals (2.1.2.1) frozen unstable;", + "", + " * Many editorial and formatting revisions with suggestions from Ian Jackson,", + " Guy Maor and others", + " * correction of chiark address in Policy 6.2", + " * footnote in Programmers chapter 2 pointing to deb(5) manpage for", + " description of deb file format.", + " * addition of more dpkg examples in Programmer chapter 2", + " * Replace paragraph in Policy 4.1 outlining compiling parameters for", + " shared libraries.", + " * Added paragraph in Programmer 6.1 on paths in maintainer scripts", + " (Bug #2481)", + " * Cleaned up language and formatting of Programmer's 12.2, shlibs", + " * Corrected contact addresses for listmaster and override-change" + ], + "closes" : [], + "epoch" : 849104236, + "timestamp" : "1996-11-27T14:17:16Z", + "version" : "2.1.2.1" + }, + { + "author" : "David Morris <bweaver@worf.netins.net>", + "changes" : [ + "", + "debian-manuals (2.1.2.0) frozen unstable;", + "", + " * Mostly editorial changes in Policy Manual.", + " * Added summary of distribution criteria to Introduction", + " * Added section headings for copyright criteria", + " * Fixed typos (Bugs #4485, #4622)", + " * Added paragraph in Compilation Options related to use of shared and", + " static libraries. (Bug #5299)", + " * Paragraph added about where to find PGP and other export restricted", + " packages in section on Procedure", + " * Change in List administrator and in the contact address for becoming", + " a package maintainer", + " * A paragraph added related to who to contact for package maintainer changes.", + " * Changed where to send upload announcements: uploads destined for unstable,", + " frozen, or experimental go to debian-devel-changes.", + "", + " * Made some mostly editorial changes to Programmers Manual.", + " * Added a recommendation to debmake in Introduction.", + " * A further interpretation of the various Distributions is added with", + " the intent of helping people decide which one to choose. (section 4.2.14)", + " * Section 12 on Shared Libraries expanded with further technical information", + " on various shlib files", + " * Section in 2.2 on format of shlib file moved to new subsection within 12.", + " * Paragraph on adding a symlink without version number added to Shared", + " Library Section (Guy Maor, Bug #5299)" + ], + "closes" : [], + "epoch" : 848727699, + "timestamp" : "1996-11-23T05:41:39Z", + "version" : "2.1.2.0" + }, + { + "author" : "Ian Jackson <ian@chiark.greenend.org.uk>", + "changes" : [ + "", + "debian-manuals (2.1.1.0) unstable;", + "", + " * Hard links are forbidden in source packages (they didn't work anyway,", + " and can't easily be made to work reliably).", + " * Do not use dpkg-divert or update-alternatives without consultation.", + "", + " * Do not need to declare dependencies on Essential packages.", + " * Restrictions on Pre-Depends stated in policy manual.", + " * debian/substvars file is now almost always auto-generated.", + " * Shared libraries must be installed stripped.", + " * Essential and Pre-Depends put together in policy manual.", + "", + " * Explained component-wise (file-wise) vs. package-wise dependencies." + ], + "closes" : [], + "epoch" : 842486441, + "timestamp" : "1996-09-12T00:00:41Z", + "version" : "2.1.1.0" + }, + { + "author" : "Ian Jackson <ian@chiark.chu.cam.ac.uk>", + "changes" : [ + "", + "debian-manuals (2.1.0.0) unstable;", + "", + " * Upstream changelog must be installed too (was just recommended).", + "", + " * Modification to use dpkg-shlibdeps added to conversion instructions.", + " * Packages which are buggy and orphaned but which are preserved for", + " compatibility go in contrib.", + "", + " * Programmers' manual source package section refers to conversion", + " instructions in policy manual.", + " * Make it clear that recommending a non-free or contrib package puts a", + " package in contrib." + ], + "closes" : [], + "epoch" : 841596438, + "timestamp" : "1996-09-01T16:47:18Z", + "version" : "2.1.0.0" + }, + { + "author" : "Ian Jackson <ian@chiark.chu.cam.ac.uk>", + "changes" : [ + "", + "debian-manuals (2.0.1.0) unstable;", + "", + " * varargs.h and libtermcap are obsolete - use stdarg.h and ncurses.", + " * Shared library link/library ordering corrected (aargh).", + " * When to byte-compile Elisp files.", + " * Missing final newlines not represented by dpkg-source.", + "", + " * Must post upload announcements to debian-changes.", + " * Moved some sections into new `configuring and building' chapter.", + " * Typo fixes." + ], + "closes" : [], + "epoch" : 841518442, + "timestamp" : "1996-08-31T19:07:22Z", + "version" : "2.0.1.0" + }, + { + "author" : "Ian Jackson <ian@chiark.chu.cam.ac.uk>", + "changes" : [ + "", + "debian-manuals (2.0.0.0) unstable;", + "", + " * Footnote added OK'ing copyrights which require name changes.", + " * More detail about changelog format names.", + "", + " * Problematic licence restrictions are formatted as lists.", + " * Mentioned 822-date utility as way to generate RFC822 format dates.", + " * Typos corrected.", + " * Released." + ], + "closes" : [], + "epoch" : 841066054, + "timestamp" : "1996-08-26T13:27:34Z", + "version" : "2.0.0.0" + }, + { + "author" : "Ian Jackson <ian@chiark.chu.cam.ac.uk>", + "changes" : [ + "", + "debian-manuals (0.2.1.1) unstable;", + "", + " * Can't overwrite directories in one package with files in another." + ], + "closes" : [], + "epoch" : 840908694, + "timestamp" : "1996-08-24T17:44:54Z", + "version" : "0.2.1.1" + }, + { + "author" : "Ian Jackson <ian@chiark.chu.cam.ac.uk>", + "changes" : [ + "", + "debian-manuals (0.2.1.0) unstable;", + "", + " * Policy says when and how to include original source in upload.", + "", + " * Need -sa on dpkg-genchanges/dpkg-buildpackage when converting.", + "", + " * Use minor patchlevel for meaning changes which don't affect packages.", + " * More verbosity about netiquette.", + " * Reorganised participation and upload policy: merged with mailing lists." + ], + "closes" : [], + "epoch" : 840800889, + "timestamp" : "1996-08-23T11:48:09Z", + "version" : "0.2.1.0" + }, + { + "author" : "Ian Jackson <ian@chiark.chu.cam.ac.uk>", + "changes" : [ + "", + "debian-manuals (0.2.0.1) experimental;", + "", + " * Said that system administrators' manual does not exist." + ], + "closes" : [], + "epoch" : 840769536, + "timestamp" : "1996-08-23T03:05:36Z", + "version" : "0.2.0.1" + }, + { + "author" : "Ian Jackson <ian@chiark.chu.cam.ac.uk>", + "changes" : [ + "", + "debian-manuals (0.2.0.0) experimental;", + "", + " * Draft releases." + ], + "closes" : [], + "epoch" : 840636473, + "timestamp" : "1996-08-21T14:07:53Z", + "version" : "0.2.0.0" + } + ] +} diff --git a/data/debian-source-dir/known-files b/data/debian-source-dir/known-files new file mode 100644 index 0000000..cd4f235 --- /dev/null +++ b/data/debian-source-dir/known-files @@ -0,0 +1,10 @@ +# A manually maintained sorted list of files that we know can appear in +# debian/source/ + +format +git-patches +include-binaries +lintian-overrides +options +patch-header + diff --git a/data/description/planned-features b/data/description/planned-features new file mode 100644 index 0000000..fbe6018 --- /dev/null +++ b/data/description/planned-features @@ -0,0 +1,10 @@ +# Regular expressions (/i) of "planned features" + +will soon allow +soon will allow +soon will be able +will soon be able +will soon support +soon will support +is planned +is also planned diff --git a/data/doc-base/sections b/data/doc-base/sections new file mode 100644 index 0000000..649e198 --- /dev/null +++ b/data/doc-base/sections @@ -0,0 +1,76 @@ +# Taken from /usr/share/doc-base/data/sections.list. +# +# Last synchronized with doc-base 0.10.4 (2012-07-10). + +Accessibility +Amateur Radio +Data Management +Debian +Editors +Education +Emulators +File Management +Games/Action +Games/Adventure +Games/Blocks +Games/Board +Games/Card +Games/Puzzles +Games/Simulation +Games/Strategy +Games/Tools +Games/Toys +Graphics +Help +Help/Books +Help/FAQ +Help/HOWTO +Help/RFC +Help/Standards +Mobile Devices +Network/Communication +Network/File Transfer +Network/Monitoring +Network/Remote Access +Network/Web Browsing +Network/Web News +Office +Programming +Programming/C +Programming/C++ +Programming/Java +Programming/OCaml +Programming/Perl +Programming/Python +Programming/Ruby +Project Management +Science/Astronomy +Science/Biology +Science/Chemistry +Science/Data Analysis +Science/Electronics +Science/Engineering +Science/Geoscience +Science/Mathematics +Science/Medicine +Science/Physics +Science/Social +Screen +Screen/Saving +Screen/Locking +Shells +Sound +System/Administration +System/Hardware +System/Language Environment +System/Monitoring +System/Package Management +System/Security +Terminal Emulators +Text +TV and Radio +Typesetting +Viewers +Video +Web Development +Window Managers diff --git a/data/fields/archive-sections b/data/fields/archive-sections new file mode 100644 index 0000000..af8f979 --- /dev/null +++ b/data/fields/archive-sections @@ -0,0 +1,60 @@ +admin +cli-mono +comm +database +debian-installer +debug +devel +doc +editors +education +electronics +embedded +fonts +games +gnome +gnu-r +gnustep +golang +graphics +hamradio +haskell +httpd +interpreters +introspection +java +javascript +kde +kernel +libdevel +libs +lisp +localization +mail +math +metapackages +misc +net +news +ocaml +oldlibs +otherosfs +perl +php +python +raku +ruby +rust +science +shells +sound +tasks +tex +text +utils +vcs +video +web +x11 +xfce +zope diff --git a/data/fields/bad-homepages b/data/fields/bad-homepages new file mode 100644 index 0000000..b9cf8ef --- /dev/null +++ b/data/fields/bad-homepages @@ -0,0 +1,20 @@ +# Checked in order, any must match. +# List of bad Homepage fields in debian/control +# Format is: +# +# tag ~~ regex (\x\s) +# +# Please sort by alphabetic sort of tags + +homepage-field-uses-insecure-uri ~~ ^ftp:// +homepage-field-uses-insecure-uri ~~ ^http://(?:[^\.]+\.)?bioconductor\.org +homepage-field-uses-insecure-uri ~~ ^http://(?:[^\.]+\.)?cran\.r-project\.org +homepage-field-uses-insecure-uri ~~ ^http://(?:[^\.]+\.)?debian\.org +homepage-field-uses-insecure-uri ~~ ^http://(?:[^\.]+\.)?github\.com +homepage-field-uses-insecure-uri ~~ ^http://(?:[^\.]+\.)?metacpan\.org +homepage-field-uses-insecure-uri ~~ ^http://(www\.)?gnu\.org +homepage-for-bioconductor-package-not-canonical ~~ bioconductor\.org/packages/.*/bioc/html/.*\.html*$ +homepage-for-cpan-package-contains-version ~~ (?:search\.cpan\.org|metacpan\.org)/.*-[0-9._]+/* +homepage-for-cran-package-not-canonical ~~ cran\.r-project\.org/web/packages/.+ +homepage-refers-to-filesystem-listing ~~ (https?|ftp)://ftp\.gnu\.org/gnu/(.*) +homepage-refers-to-obsolete-debian-infrastructure ~~ alioth\.debian\.org diff --git a/data/fields/binary-fields b/data/fields/binary-fields new file mode 100644 index 0000000..d1f9c81 --- /dev/null +++ b/data/fields/binary-fields @@ -0,0 +1,47 @@ +# Manually maintained list of known binary fields + +Package +Package-Type +Version +Architecture +Depends +Pre-Depends +Recommends +Suggests +Enhances +Conflicts +Provides +Replaces +Breaks +Essential +Maintainer +Section +Priority +Source +Description +Installed-Size +Python-Version +Homepage +Bugs +Origin +Multi-Arch +Build-Ids +Built-Using +Ruby-Versions +Ghc-Package +Gstreamer-Version +Gstreamer-Elements +Gstreamer-Uri-Sources +Gstreamer-Uri-Sinks +Gstreamer-Encoders +Gstreamer-Decoders +Lua-Versions +Auto-Built-Package +X-Cargo-Built-Using + +# Special-case, original-maintainer is not ok in Debian, but we allow +# it in any non-Debian profile by default. +# +# NB: Do not rely on @if-vendor-is-not in your data files; it may +# disappear without notice +@if-vendor-is-not debian Original-Maintainer diff --git a/data/fields/build-essential-packages b/data/fields/build-essential-packages new file mode 100644 index 0000000..f685d8e --- /dev/null +++ b/data/fields/build-essential-packages @@ -0,0 +1,8 @@ +# Manually maintained list of build-essential packages + +libc6-dev +libc-dev +gcc +g++ +make +dpkg-dev diff --git a/data/fields/build-profiles b/data/fields/build-profiles new file mode 100644 index 0000000..3f43dc3 --- /dev/null +++ b/data/fields/build-profiles @@ -0,0 +1,19 @@ +cross +nobiarch +nocheck +nocil +nodoc +nogolang +noguile +noinsttest +nojava +nolua +noocaml +noperl +nopython +noruby +noudeb +nowasm +nowindows +stage1 +stage2 diff --git a/data/fields/derivative-fields b/data/fields/derivative-fields new file mode 100644 index 0000000..a0ee415 --- /dev/null +++ b/data/fields/derivative-fields @@ -0,0 +1,5 @@ +# Derivative-specific field validation +# +# format: field ~~ ^regex$ ~~ explanation + +Source ~~ . ~~ always matches diff --git a/data/fields/derivative-versions b/data/fields/derivative-versions new file mode 100644 index 0000000..6b71fd7 --- /dev/null +++ b/data/fields/derivative-versions @@ -0,0 +1,7 @@ +# Derivative-specific version number validation +# +# Checked in order, warns with $explanation if $regex does not match +# +# format: $regex ~~ explanation + +. ~~ always matches diff --git a/data/fields/essential b/data/fields/essential new file mode 100644 index 0000000..0996e4a --- /dev/null +++ b/data/fields/essential @@ -0,0 +1,27 @@ +# Known essential packages. These packages can always be assumed to be +# installed and should not have non-versioned dependencies. + +base-files +base-passwd +bash +bsdutils +coreutils +dash +debianutils +diffutils +dpkg +findutils +grep +gzip +hostname +hurd +init-system-helpers +libc-bin +login +ncurses-base +ncurses-bin +perl-base +sed +sysvinit-utils +tar +util-linux diff --git a/data/fields/mail-transport-agents b/data/fields/mail-transport-agents new file mode 100644 index 0000000..51daf43 --- /dev/null +++ b/data/fields/mail-transport-agents @@ -0,0 +1,14 @@ +# Packages that provide mail-transport-agent +# +courier-mta +dma +esmtp-run +exim4-daemon-heavy +exim4-daemon-light +masqmail +msmtp-mta +nullmailer +opensmtpd +postfix +sendmail-bin +ssmtp diff --git a/data/fields/metapackages b/data/fields/metapackages new file mode 100644 index 0000000..1f6828a --- /dev/null +++ b/data/fields/metapackages @@ -0,0 +1,13 @@ +# Known metapackages. A metapackage is a package that exists for the +# convenience of users or installers to install a set of related packages +# and should not be used as a dependency of anything other than another +# metapackage. It should not be used as a build dependency ever. + +mono-complete +qt4-default +qt5-default +x-window-system +x-window-system-dev +x-window-system-core +xorg +xorg-dev diff --git a/data/fields/name_section_mappings b/data/fields/name_section_mappings new file mode 100644 index 0000000..bb7ceb0 --- /dev/null +++ b/data/fields/name_section_mappings @@ -0,0 +1,56 @@ +# map between regex (x) of package => section +# +# This list is tried from top to bottom + +# Generic +-docs?$ => doc +-dbg(?:sym)?$ => debug + +# Application or framework specific +^lib(?:apache2|nginx)-mod- => httpd +^lighttpd-mod => httpd +\.(?:framework|tool|app)(?:-common)?$ => gnustep +^gnustep- => gnustep +^moblin- => embedded + +# Language-specific +^node- => javascript +^(?:python-)?zope => zope +^python3?- => python +^r-(?:cran|bioc|other)- => gnu-r +^elpa- => editors +^cl- => lisp +-elisp(?:-.*)$ => lisp +^lib.*-guile$ => lisp +^guile- => lisp +^golang- => golang +^lib.*-perl$ => perl +lib.*-cil(?:-dev)?$ => cli-mono +^lib.*-(?:java|gcj|jni)$ => java +^(?:lib)?php(?:\d(?:\.\d)?)?- => php +^lib-.*-php$ => php +^haskell- => haskell +^lib(?:hugs|ghc6?)- => haskell +^lib.*-ruby(?:1\.\d)?$ => ruby +^ruby- => ruby +^librust-.*-dev$ => rust +^rust- => rust +^lib.*-(?:ocaml|camlp4)-dev$ => ocaml +^libjs- => javascript +^lib.*-(tcl|lua|gst)$ => interpreters + +# Data files +^gir\d+\.\d+-.*-\d+\.\d+$ => introspection +^xfonts- => fonts +^(?:fonts|ttf)- => fonts +^lib(?:nss|pam)- => admin +^(?:aspell|hunspell|myspell|mythes)- => localization +^hyphen-[a-z]{2}(?:-[a-z]{2})?$ => localization +^dict-freedict- => localization +^gcompris-sound- => localization +-l10n(?:-.*)?$ => localization +-(dkms|firmware)$ => kernel + +# Catch remaining +^lib.*-(dev|headers)$ => libdevel +^lib.*\d[ad]?$ => libs diff --git a/data/fields/no-build-depends b/data/fields/no-build-depends new file mode 100644 index 0000000..86e4b07 --- /dev/null +++ b/data/fields/no-build-depends @@ -0,0 +1,6 @@ +# This file lists packages that should not be listed as build +# dependencies, generally because they require interactivity or cannot be +# correctly installed in a build environment. It is presently maintained +# manually. + +java-propose-classpath diff --git a/data/fields/obsolete-packages b/data/fields/obsolete-packages new file mode 100644 index 0000000..c5149ef --- /dev/null +++ b/data/fields/obsolete-packages @@ -0,0 +1,153 @@ +# Known obsolete packages. Not all packages are added to this list, only +# ones for which it's helpful for Lintian to warn about, such as +# significant transitions or transitional packages that we're trying to +# remove from the archive. +# +# Each list of packages should be tagged with the last Debian release in +# which the package appeared so that we can remove long-obsolete entries +# that are no longer worth checking for. +# +# It is possible to specify a replacement (which need not be a package). +# Examples: +# # Obsolete with no replacement +# <pkgX> +# # pkgY is replaced by <replacement> +# <pkgY> => <replacement> + +# Last seen in sarge. +xlibs-dev +exim => exim4 + +# Last seen in etch. +gcc-2.95 +apache => apache2 + +# Last seen in lenny. +cdrecord +cupsys +cupsys-bsd +cupsys-client +cupsys-common +foomatic-data +gaim +gnomemeeting +gs +gs-aladdin +gs-esp +gs-gpl +kernel-headers +kernel-image +kernel-image-2.4 +kernel-image-2.6 +kernel-source +lambdamoo-core +lambdamoo-server +libcupsys2 +libcupsys2-dev +libglu1-xorg +libglu1-xorg-dev +libmime-perl +libungif4-dev +libxerces28 +libxerces28-dev +mkisofs +netcdfg-dev +pcmcia-cs +python-pyopenssl +ssh-krb5 +tetex-base +tetex-bin +tetex-extra +x-dev +xbase-clients +xlibmesa-gl +xlibmesa-gl-dev +xlibmesa-glu +xutils + +# Last seen in Squeeze +default-jdk-builddep + +# Last seen in Wheezy +fuse-utils +ruby1.8 +libruby1.8 + +# See: https://wiki.debian.org/Teams/DebianPerlGroup/OpenTasks/Transitions/DigestSHA1ToDigestSHA +libdigest-sha1-perl + +# Deprecated in Wheezy by maintainer (#646420) +dpatch + +# Deprecated in Jessie (#710466) +texi2html + +# Deprecated versions of automake +automake1.4 +automake1.5 +automake1.6 +automake1.7 +automake1.8 +automake1.9 +automake1.10 + +# Deprecated in Jessie (#720911) +openjdk-6-jdk +openjdk-6-jre +openjdk-6-jre-headless + +# Deprecated in Jessie (#711193) +hardening-wrapper => use dpkg-buildflags instead +hardening-includes => use dpkg-buildflags instead +# Deprecated in Jessie (#746563) +python-support => use dh_python2 instead + +# Deprecated in Jessie (#722084) +ruby1.9.1 +ruby1.9.1-dev +libruby1.9.1 + +# Deprecated in Stretch (https://lists.debian.org/debian-devel-announce/2016/09/msg00000.html) +mysql-server => default-mysql-server +mysql-server-core => default-mysql-server-core +mysql-client => default-mysql-client +mysql-client-core => default-mysql-client-core +libmysqlclient-dev => default-libmysqlclient-dev + +# Deprecated in Stretch (#872076) +dh-systemd => use debhelper (>= 9.20160709) + +# Adobe Flash +mtasc +libjs-swfobject + +# Deprecated in stretch +libavresample-dev => libswresample-dev +liblircclient-dev => liblirc-dev + +# Deprecated in buster +apt-transport-https => apt +e2fslibs-dev => libext2fs-dev +libncurses5-dev => libncurses-dev +libncursesw5-dev => libncurses-dev +libpango1.0-0 => libpango-1.0-0, libpangocairo-1.0-0, libpangoft2-1.0-0 and/or libpangoxft-1.0-0 +libsensors4-dev => libsensors-dev +libservlet3.1-java => libservlet-api-java +libtinfo-dev => libncurses-dev + +# Deprecated in bullseye +bsdmainutils => bsdextrautils and/or ncal +libegl1-mesa-dev => libegl-dev +libfontconfig1-dev => libfontconfig-dev +libfreetype6-dev => libfreetype-dev +libgdk-pixbuf2.0-0 => libgdk-pixbuf-2.0-0 and optionally libgdk-pixbuf-xlib-2.0-0 +libgdk-pixbuf2.0-dev => libgdk-pixbuf-2.0-dev and optionally libgdk-pixbuf-xlib-2.0-dev +libgl1-mesa-dev => libgl-dev +libshout3-dev => libshout-dev +libtiff5-dev => libtiff-dev +libxcb-util0-dev => libxcb-util-dev + +# Deprecated in bookworm +libgsasl7-dev => libgsasl-dev +libidn11-dev => libidn-dev +policykit-1 => polkitd and optionally pkexec diff --git a/data/fields/perl-provides b/data/fields/perl-provides new file mode 100644 index 0000000..3838411 --- /dev/null +++ b/data/fields/perl-provides @@ -0,0 +1,32 @@ +# virtual packages provided by the Perl core packages that also have a +# separate binary package available +# +# the listed version is the one included in the Perl core +# +# regenerate by running +# debian/rules refresh-perl-provides +# in the lintian source tree +# +# last updated for PERL_VERSION=5.034000 +libsocket-perl 2.031 +libio-socket-ip-perl 0.41 +libversion-perl 1:0.9928 +libunicode-collate-perl 1.29 +libtest-simple-perl 1.302183 +libtest-harness-perl 3.43 +libpod-simple-perl 3.42 +libmodule-metadata-perl 1.000037 +libmodule-load-conditional-perl 0.74 +libmodule-corelist-perl 5.20210520 +libmath-bigint-perl 1.999818 +libjson-pp-perl 4.06000 +libio-compress-perl 2.102 +libhttp-tiny-perl 0.076 +libextutils-cbuilder-perl 0.280236 +libexperimental-perl 0.024 +libencode-perl 3.08 +libdigest-sha-perl 6.02 +libcpan-meta-yaml-perl 0.018 +libcpan-meta-requirements-perl 2.140 +libcompress-raw-zlib-perl 2.101 +libcompress-raw-bzip2-perl 2.101 diff --git a/data/fields/priorities b/data/fields/priorities new file mode 100644 index 0000000..47412d1 --- /dev/null +++ b/data/fields/priorities @@ -0,0 +1,9 @@ +# Manually maintained map of priorities +# +# It is used by checks/fields to validate the priority fields. + +required +important +standard +optional + diff --git a/data/fields/toolchain b/data/fields/toolchain new file mode 100644 index 0000000..d1d9497 --- /dev/null +++ b/data/fields/toolchain @@ -0,0 +1,2 @@ +cdbs +debhelper diff --git a/data/fields/udeb-fields b/data/fields/udeb-fields new file mode 100644 index 0000000..d0089fe --- /dev/null +++ b/data/fields/udeb-fields @@ -0,0 +1,35 @@ +# Manually maintained list of known udeb fields +# - note the Ubuntu original-maintainer field is handled separately. + +Package +Version +Architecture +Subarchitecture +Depends +Recommends +Enhances +Provides +Replaces +Breaks +Replaces +Maintainer +Section +Priority +Source +Description +Installed-Size +Kernel-Version +Installer-Menu-Item +Bugs +Origin +Auto-Built-Package +Build-Ids +Built-Using +X-Cargo-Built-Using + +# Special-case, original-maintainer is not ok in Debian, but we allow +# it in any non-Debian profile by default. +# +# NB: Do not rely on @if-vendor-is-not in your data files; it may +# disappear without notice +@if-vendor-is-not debian original-maintainer diff --git a/data/fields/vcs-hosters b/data/fields/vcs-hosters new file mode 100644 index 0000000..c244407 --- /dev/null +++ b/data/fields/vcs-hosters @@ -0,0 +1,31 @@ +# List of hosting services with their corresponding VCS +# +# Format: +# ^regex \x\s) ~~ vcs,vcs1,vcs2 + +git://anonscm\.debian\.org/ ~~ Git +https?://anonscm\.debian\.org/git/ ~~ Git +https?://anonscm\.debian\.org/cgit/ ~~ Git +git://git\.debian\.org/ ~~ Git +https?://git\.debian\.org/ ~~ Git +git://alioth\.debian\.org/ ~~ Git +https?://alioth\.debian\.org/anonscm/git/ ~~ Git +git://anongit\.debian\.org/ ~~ Git +https?://git\.dgit\.debian\.org/ ~~ Git +git://anongit\.freedesktop\.org/ ~~ Git +git://anongit\.kde\.org/ ~~ Git +git://git\.code\.sf\.net/ ~~ Git +https?://git\.code\.sf\.net/p/ ~~ Git +git://[a-zA-Z0-9]+\.git\.sourceforge\.net/ ~~ Git +git://git@github\.com: ~~ Git +git://github\.com/ ~~ Git +https?://github\.com/ ~~ Git +git@gitlab\.com: ~~ Git +https?://gitlab\.[^/]+/ ~~ Git +https?://salsa\.debian\.org/ ~~ Git +git://git\.kernel\.org/ ~~ Git +git://gitorious\.org/ ~~ Git +git://[a-zA-Z0-9]+\.branchable\.com/ ~~ Git +git://repo\.or\.cz/ ~~ Git +https?://repo\.or\.cz/ ~~ Git +https?://bitbucket\.org/ ~~ Git,Hg diff --git a/data/fields/virtual-packages b/data/fields/virtual-packages new file mode 100644 index 0000000..5c23efe --- /dev/null +++ b/data/fields/virtual-packages @@ -0,0 +1,682 @@ +# The list of virtual packages in Debian that are provided by two or more +# packages. +# +# Packages that should be listed but are not found by this script can be +# listed in a special comment in this file. They will then be preserved when +# the list is regenerated. Such packages must be listed in a comment line +# staring with "Keep:". Multiple packages can be specified in the same line, +# separated by comma and/or white space. Multiple "Keep: " lines can be used +# as well. +# +# Last updated: 2022-09-07 + +# Keep: xserver-xorg-input, xserver-xorg-input-2, xserver-xorg-input-2.1 +# Keep: xserver-xorg-input-4 +# Keep: xserver-xorg-video, xserver-xorg-video-1.0, xserver-xorg-video-1.9 +# Keep: xserver-xorg-video-2, xserver-xorg-video-4, xserver-xorg-video-5 + +adventure +alsaplayer-interface +alsaplayer-output +apache2-suexec +aptitude-doc +aspell-dictionary +asterisk-prompt-fr +asterisk-prompt-it-it +audio-mixer +automaken +awk +bacula-director-database +bilibop-device-policy +blacs-test-common +bochs-gui +bogofilter-db +boom-engine +brig-compiler +brig-compiler-x86-64-linux-gnu +brig-compiler-x86-64-linux-gnux32 +c++-compiler +c++-compiler-aarch64-linux-gnu +c++-compiler-alpha-linux-gnu +c++-compiler-arm-linux-gnueabi +c++-compiler-arm-linux-gnueabihf +c++-compiler-hppa-linux-gnu +c++-compiler-m68k-linux-gnu +c++-compiler-mips-linux-gnu +c++-compiler-mips64-linux-gnuabi64 +c++-compiler-mips64el-linux-gnuabi64 +c++-compiler-mipsel-linux-gnu +c++-compiler-mipsisa32r6-linux-gnu +c++-compiler-mipsisa32r6el-linux-gnu +c++-compiler-mipsisa64r6-linux-gnuabi64 +c++-compiler-mipsisa64r6el-linux-gnuabi64 +c++-compiler-powerpc-linux-gnu +c++-compiler-powerpc64-linux-gnu +c++-compiler-powerpc64le-linux-gnu +c++-compiler-riscv64-linux-gnu +c++-compiler-s390x-linux-gnu +c++-compiler-sh4-linux-gnu +c++-compiler-sparc64-linux-gnu +c++-compiler-x86-64-linux-gnu +c++-compiler-x86-64-linux-gnux32 +c++abi2-dev +c-compiler +c-compiler-aarch64-linux-gnu +c-compiler-alpha-linux-gnu +c-compiler-arm-linux-gnueabi +c-compiler-arm-linux-gnueabihf +c-compiler-hppa-linux-gnu +c-compiler-m68k-linux-gnu +c-compiler-mips-linux-gnu +c-compiler-mips64-linux-gnuabi64 +c-compiler-mips64el-linux-gnuabi64 +c-compiler-mipsel-linux-gnu +c-compiler-mipsisa32r6-linux-gnu +c-compiler-mipsisa32r6el-linux-gnu +c-compiler-mipsisa64r6-linux-gnuabi64 +c-compiler-mipsisa64r6el-linux-gnuabi64 +c-compiler-powerpc-linux-gnu +c-compiler-powerpc64-linux-gnu +c-compiler-powerpc64le-linux-gnu +c-compiler-riscv64-linux-gnu +c-compiler-s390x-linux-gnu +c-compiler-sh4-linux-gnu +c-compiler-sparc64-linux-gnu +c-compiler-x86-64-linux-gnu +c-compiler-x86-64-linux-gnux32 +c-shell +cataclysm-dda +chasen-dic +cl-sql-backend +core-dump-handler +cron-daemon +ctags +cudf-solver +cwl-runner +d-compiler +d-v2-compiler +dbus-session-bus +debconf-2.0 +debian-installer-netboot +dhcp-client +dict-client +dict-server +dictd-dictionary +djvu-viewer +docbook-xsl-doc +doom-engine +doom-node-builder +doom-wad +doublecmd +doublecmd-help +dssi-plugin +dyndns-client +editor +emacsen +ettercap +exim4-localscanapi-6.0 +expeyes-doc +festival-voice +fizmo +fonts-japanese-gothic +fonts-japanese-mincho +fortran95-compiler +fortune-cookie-db +freeciv-client (= 3.0.3-3) +freerdp +ftp-server +gem-plugin-film +gem-plugin-image +gem-plugin-record +gem-plugin-video +gem-plugin-window +gfortran-mod-15 +gimp-help +gmerlin-encoders +gmt-gshhg-data +gnome-www-browser +gnumach +gnumach-image +gnuplot +gnustep-back0.29-alt +go-compiler +gsettings-backend +gstreamer1.0-audiosink +gstreamer1.0-audiosource +gstreamer1.0-videosink +gstreamer1.0-videosource +gstreamer1.0-visualization +guile +gvim (= 2:9.0.0242-1) +heretic-engine +hexen-engine +homer-api-datastore +horde-bundle +httpd +httpd-cgi +httpd-wsgi3 +hunspell-dictionary +hunspell-dictionary-de +hunspell-dictionary-es +hunspell-dictionary-fr +hyphen-hyphenation-patterns +ident-server +ike-server +imap-client +imap-server +indicator-renderer +inet-superserver +inews +info-browser +irc +ircd +ispell-dictionary +jack-daemon +jackd-firewire +java-compiler +java-runtime +java-runtime-headless +java-sdk +java-sdk-headless +java10-runtime +java10-runtime-headless +java10-sdk +java10-sdk-headless +java11-runtime +java11-runtime-headless +java11-sdk +java11-sdk-headless +java12-runtime +java12-runtime-headless +java12-sdk +java12-sdk-headless +java13-runtime +java13-runtime-headless +java13-sdk +java13-sdk-headless +java14-runtime +java14-runtime-headless +java14-sdk +java14-sdk-headless +java15-runtime +java15-runtime-headless +java15-sdk +java15-sdk-headless +java16-runtime +java16-runtime-headless +java16-sdk +java16-sdk-headless +java17-runtime +java17-runtime-headless +java17-sdk +java17-sdk-headless +java2-runtime +java2-runtime-headless +java2-sdk +java2-sdk-headless +java5-runtime +java5-runtime-headless +java5-sdk +java5-sdk-headless +java6-runtime +java6-runtime-headless +java6-sdk +java6-sdk-headless +java7-runtime +java7-runtime-headless +java7-sdk +java7-sdk-headless +java8-runtime +java8-runtime-headless +java8-sdk +java8-sdk-headless +java9-runtime +java9-runtime-headless +java9-sdk +java9-sdk-headless +kwin +kwin-wayland-backend +ladspa-plugin +lha +lib32gcc-s1-mips64-dcv1 +lib32gcc-s1-mips64el-dcv1 +lib32gcc-s1-mips64r6-dcv1 +lib32gcc-s1-mips64r6el-dcv1 +lib32gcc-s1-ppc64-dcv1 +lib32gcc-s1-sparc64-dcv1 +lib32gcc-s1-x32-dcv1 +lib32stdc++6-mips64-dcv1 +lib32stdc++6-mips64el-dcv1 +lib32stdc++6-mips64r6-dcv1 +lib32stdc++6-mips64r6el-dcv1 +lib32stdc++6-ppc64-dcv1 +lib32stdc++6-sparc64-dcv1 +lib32stdc++6-x32-dcv1 +lib64gcc-s1-mips-dcv1 +lib64gcc-s1-mipsel-dcv1 +lib64gcc-s1-mipsr6-dcv1 +lib64gcc-s1-mipsr6el-dcv1 +lib64gcc-s1-powerpc-dcv1 +lib64gcc-s1-x32-dcv1 +lib64stdc++6-mips-dcv1 +lib64stdc++6-mipsel-dcv1 +lib64stdc++6-mipsr6-dcv1 +lib64stdc++6-mipsr6el-dcv1 +lib64stdc++6-powerpc-dcv1 +lib64stdc++6-x32-dcv1 +libadios-mpi-dev +libblacs-mpi-dev +libblas.so +libblas.so.3 +libblis.so +libblis.so.4 +libc++-x.y +libc++-x.y-dev +libc++abi-x.y +libc++abi-x.y-dev +libc-icap-module +libclc-x.y +libclc-x.y-dev +libcurl-dev +libcurl-ssl-dev +libcurl4-dev +libedac +libevas1-engine +libextractor-plugins +libfltk-dev +libgcc-s1-alpha-dcv1 +libgcc-s1-mips-dcv1 +libgcc-s1-mips64-dcv1 +libgcc-s1-mips64el-dcv1 +libgcc-s1-mips64r6-dcv1 +libgcc-s1-mips64r6el-dcv1 +libgcc-s1-mipsel-dcv1 +libgcc-s1-mipsr6-dcv1 +libgcc-s1-mipsr6el-dcv1 +libgcc-s1-powerpc-dcv1 +libgcc-s1-ppc64-dcv1 +libgcc-s1-riscv64-dcv1 +libgcc-s1-sh4-dcv1 +libgcc-s1-sparc64-dcv1 +libgcc-s1-x32-dcv1 +libgcc-s2-m68k-dcv1 +libgdchart +libgdchart-gd2-dev +libhtml-wikiconverter-dialect +libjack-0.116 +libjack-0.125 +libjack-dev-session +libjack0.100.0-dev +liblapack.so +liblapack.so.3 +libllvmspirvlib-x.y-dev +libmagickcore-extra +libmlir-x.y +libmlir-x.y-dev +libn32gcc-s1-mips-dcv1 +libn32gcc-s1-mips64-dcv1 +libn32gcc-s1-mips64el-dcv1 +libn32gcc-s1-mips64r6-dcv1 +libn32gcc-s1-mips64r6el-dcv1 +libn32gcc-s1-mipsel-dcv1 +libn32gcc-s1-mipsr6-dcv1 +libn32gcc-s1-mipsr6el-dcv1 +libn32stdc++6-mips-dcv1 +libn32stdc++6-mips64-dcv1 +libn32stdc++6-mips64el-dcv1 +libn32stdc++6-mips64r6-dcv1 +libn32stdc++6-mips64r6el-dcv1 +libn32stdc++6-mipsel-dcv1 +libn32stdc++6-mipsr6-dcv1 +libn32stdc++6-mipsr6el-dcv1 +libneon-dev +libocsipersist-provider-ocaml-dev +libomp-x.y +libomp-x.y-dev +libopencl-clang-x.y-dev +libopendbx1-backend +libopenni-sensor +libopenni-sensor-dev +libpypy-dev +libreoffice-grammarcheck +libreoffice-help (= 7.4) +libreoffice-l10n (= 7.4) +libreoffice-style +libsdl-dev +libstdc++-dev +libstdc++-dev-alpha-cross +libstdc++-dev-alpha-dcv1 +libstdc++-dev-amd64-cross +libstdc++-dev-amd64-dcv1 +libstdc++-dev-arm64-cross +libstdc++-dev-arm64-dcv1 +libstdc++-dev-armel-cross +libstdc++-dev-armel-dcv1 +libstdc++-dev-armhf-cross +libstdc++-dev-armhf-dcv1 +libstdc++-dev-hppa-cross +libstdc++-dev-hppa-dcv1 +libstdc++-dev-i386-cross +libstdc++-dev-i386-dcv1 +libstdc++-dev-m68k-cross +libstdc++-dev-m68k-dcv1 +libstdc++-dev-mips-cross +libstdc++-dev-mips-dcv1 +libstdc++-dev-mips64-cross +libstdc++-dev-mips64-dcv1 +libstdc++-dev-mips64el-cross +libstdc++-dev-mips64el-dcv1 +libstdc++-dev-mips64r6-cross +libstdc++-dev-mips64r6-dcv1 +libstdc++-dev-mips64r6el-cross +libstdc++-dev-mips64r6el-dcv1 +libstdc++-dev-mipsel-cross +libstdc++-dev-mipsel-dcv1 +libstdc++-dev-mipsr6-cross +libstdc++-dev-mipsr6-dcv1 +libstdc++-dev-mipsr6el-cross +libstdc++-dev-mipsr6el-dcv1 +libstdc++-dev-powerpc-cross +libstdc++-dev-powerpc-dcv1 +libstdc++-dev-ppc64-cross +libstdc++-dev-ppc64-dcv1 +libstdc++-dev-ppc64el-cross +libstdc++-dev-ppc64el-dcv1 +libstdc++-dev-riscv64-cross +libstdc++-dev-riscv64-dcv1 +libstdc++-dev-s390x-cross +libstdc++-dev-s390x-dcv1 +libstdc++-dev-sh4-cross +libstdc++-dev-sh4-dcv1 +libstdc++-dev-sparc64-cross +libstdc++-dev-sparc64-dcv1 +libstdc++-dev-x32-cross +libstdc++-dev-x32-dcv1 +libstdc++-pic-alpha-dcv1 +libstdc++-pic-amd64-dcv1 +libstdc++-pic-arm64-dcv1 +libstdc++-pic-armel-dcv1 +libstdc++-pic-armhf-dcv1 +libstdc++-pic-hppa-dcv1 +libstdc++-pic-i386-dcv1 +libstdc++-pic-m68k-dcv1 +libstdc++-pic-mips-dcv1 +libstdc++-pic-mips64-dcv1 +libstdc++-pic-mips64el-dcv1 +libstdc++-pic-mips64r6-dcv1 +libstdc++-pic-mips64r6el-dcv1 +libstdc++-pic-mipsel-dcv1 +libstdc++-pic-mipsr6-dcv1 +libstdc++-pic-mipsr6el-dcv1 +libstdc++-pic-powerpc-dcv1 +libstdc++-pic-ppc64-dcv1 +libstdc++-pic-ppc64el-dcv1 +libstdc++-pic-riscv64-dcv1 +libstdc++-pic-s390x-dcv1 +libstdc++-pic-sh4-dcv1 +libstdc++-pic-sparc64-dcv1 +libstdc++-pic-x32-dcv1 +libstdc++6-alpha-dcv1 +libstdc++6-hppa-dcv1 +libstdc++6-m68k-dcv1 +libstdc++6-mips-dcv1 +libstdc++6-mips64-dcv1 +libstdc++6-mips64el-dcv1 +libstdc++6-mips64r6-dcv1 +libstdc++6-mips64r6el-dcv1 +libstdc++6-mipsel-dcv1 +libstdc++6-mipsr6-dcv1 +libstdc++6-mipsr6el-dcv1 +libstdc++6-powerpc-dcv1 +libstdc++6-ppc64-dcv1 +libstdc++6-riscv64-dcv1 +libstdc++6-sh4-dcv1 +libstdc++6-sparc64-dcv1 +libstdc++6-x32-dcv1 +libtachyon +libtachyon-dev +libunity-common +libunwind-x.y +libunwind-x.y-dev +libzookeeper-dev +lightdm-greeter +linux-initramfs-tool +linux-kernel-log-daemon +linux-latest-image-dbg +linuxcnc-doc +lisp-compiler +live-config-backend +lua +lv2-host +lv2-plugin +lxqt-theme +lzh-archiver +lzip-alternative +lzip-compressor +lzip-decompressor +m2-compiler +mail-reader +mail-transport-agent +mailx +man-browser +mh +mobile-tweaks +mp3-decoder +mpd-client +mumps +mupen64plus-rsp +mupen64plus-video +musescore-compatible-soundfont +myspell-dictionary +myspell-dictionary-fr +mythes-thesaurus +mythes-thesaurus-de +nes-emulator +netcat +netdata-plugins +nethack +netpbm-dev +neutron-plugin +news-reader +news-transport-system +nova-compute-hypervisor +nslcd-2 +objc++-compiler +objc++-compiler-aarch64-linux-gnu +objc++-compiler-alpha-linux-gnu +objc++-compiler-arm-linux-gnueabi +objc++-compiler-arm-linux-gnueabihf +objc++-compiler-hppa-linux-gnu +objc++-compiler-m68k-linux-gnu +objc++-compiler-mips-linux-gnu +objc++-compiler-mips64-linux-gnuabi64 +objc++-compiler-mips64el-linux-gnuabi64 +objc++-compiler-mipsel-linux-gnu +objc++-compiler-mipsisa32r6-linux-gnu +objc++-compiler-mipsisa32r6el-linux-gnu +objc++-compiler-mipsisa64r6-linux-gnuabi64 +objc++-compiler-mipsisa64r6el-linux-gnuabi64 +objc++-compiler-powerpc-linux-gnu +objc++-compiler-powerpc64-linux-gnu +objc++-compiler-powerpc64le-linux-gnu +objc++-compiler-riscv64-linux-gnu +objc++-compiler-s390x-linux-gnu +objc++-compiler-sh4-linux-gnu +objc++-compiler-sparc64-linux-gnu +objc++-compiler-x86-64-linux-gnu +objc++-compiler-x86-64-linux-gnux32 +objc-compiler +objc-compiler-aarch64-linux-gnu +objc-compiler-alpha-linux-gnu +objc-compiler-arm-linux-gnueabi +objc-compiler-arm-linux-gnueabihf +objc-compiler-hppa-linux-gnu +objc-compiler-m68k-linux-gnu +objc-compiler-mips-linux-gnu +objc-compiler-mips64-linux-gnuabi64 +objc-compiler-mips64el-linux-gnuabi64 +objc-compiler-mipsel-linux-gnu +objc-compiler-mipsisa32r6-linux-gnu +objc-compiler-mipsisa32r6el-linux-gnu +objc-compiler-mipsisa64r6-linux-gnuabi64 +objc-compiler-mipsisa64r6el-linux-gnuabi64 +objc-compiler-powerpc-linux-gnu +objc-compiler-powerpc64-linux-gnu +objc-compiler-powerpc64le-linux-gnu +objc-compiler-riscv64-linux-gnu +objc-compiler-s390x-linux-gnu +objc-compiler-sh4-linux-gnu +objc-compiler-sparc64-linux-gnu +objc-compiler-x86-64-linux-gnu +objc-compiler-x86-64-linux-gnux32 +opencl-icd +opendnssec-enforcer-backend +osspd-backend +parolottero-data +paw-binary +pcsc-ifd-handler +pd-net +pdf-viewer +perl-modules +phonon4qt5-backend +php-libsmbclient +php-pecl-http +php-php-http-async-client-implementation +php-php-http-client-implementation +php-psr-cache-implementation +php-psr-container-implementation (= 1.0) +php-psr-event-dispatcher-implementation (= 1.0) +php-psr-http-client-implementation (= 1.0) +php-psr-http-factory-implementation (= 1.0) +php-psr-http-message-implementation (= 1.0) +php-psr-link-implementation (= 1.0) +php-psr-log-implementation +php-psr-simple-cache-implementation +php-symfony-cache-implementation +php-symfony-event-dispatcher-implementation (= 2.0) +php-symfony-http-client-implementation (= 2.4) +php-symfony-service-implementation +php-symfony-translation-implementation (= 2.3) +php8.1-json +phpapi-20210902 +pinentry +pinentry-x11 +ping +plymouth-theme +policy-rcd-default-policy +polkit-1-auth-agent +pop3-server +postscript-viewer +python-clang-x.y +python3-cysignals +python3-lldb-x.y +qt5-style-kvantum-theme +quake-engine +quake-engine-server +radius-server +readline-editor +roaraudio-server +ruby-abbrev (= 0.1.0) +ruby-delegate (= 0.2.0) +ruby-english (= 0.7.1) +ruby-etc (= 1.3.0) +ruby-fcntl (= 1.0.1) +ruby-forwardable (= 1.3.2) +ruby-getoptlong (= 0.1.1) +ruby-io-nonblock (= 0.1.0) +ruby-mutex-m (= 0.1.1) +ruby-net-pop (= 0.1.1) +ruby-observer (= 0.1.1) +ruby-open3 (= 0.1.1) +ruby-openssl (= 3.0.0) +ruby-prettyprint (= 0.1.1) +ruby-prime (= 0.1.2) +ruby-pstore (= 0.1.1) +ruby-resolv (= 0.2.1) +ruby-resolv-replace (= 0.1.0) +ruby-rexml (= 3.2.5) +ruby-rinda (= 0.1.1) +ruby-rss (= 0.2.9) +ruby-shellwords (= 0.1.0) +ruby-singleton (= 0.1.1) +ruby-stringio (= 3.0.1) +ruby-strscan (= 3.0.1) +ruby-syslog (= 0.1.0) +ruby-tmpdir (= 0.1.2) +ruby-tsort (= 0.1.0) +ruby-weakref (= 0.1.1) +sddm-theme +sf2-soundfont-gm +sf3-soundfont-gm +skkserv +snort-rules +soapysdr0.8-module +ssh-server +sword-comm +sword-dict +sword-frontend +sword-text +system-log-daemon +systemd-sysusers (= 251.4-3) +systemd-tmpfiles (= 251.4-3) +tachyon-bin +tads2-interpreter +tads3-interpreter +tcl-itcl-dev +tcl-itcl-doc +telepathy-connection-manager +telnet-client +telnet-server +tesseract-ocr-lang +tesseract-ocr-language +time-daemon +tk-itk-dev +tk-itk-doc +turn-server +unity-scopes-json-def +ups-monitor +va-driver +vdpau-driver +vim (= 2:9.0.0242-1) +vim-lua (= 2:9.0.0242-1) +vim-perl (= 2:9.0.0242-1) +vim-python3 (= 2:9.0.0242-1) +vim-ruby (= 2:9.0.0242-1) +vim-tcl (= 2:9.0.0242-1) +virtual-mysql-client +virtual-mysql-client-core +virtual-mysql-server +virtual-mysql-server-core +virtual-mysql-testsuite +virtualbox-guest-modules +vnc-server +vnc-viewer +vncviewer +vst-plugin +wireguard-modules (= 1.0.0) +wordlist +wsrep +www-browser +x-audio-mixer +x-display-manager +x-session-manager +x-terminal-emulator +x-window-manager +xdg-desktop-portal-backend +xmlformat +xmms2-plugin-output +xmpp-server +xorg-driver-input +xorg-driver-video +xserver +xserver-xorg-input +xserver-xorg-input-2 +xserver-xorg-input-2.1 +xserver-xorg-input-4 +xserver-xorg-video +xserver-xorg-video-1.0 +xserver-xorg-video-1.9 +xserver-xorg-video-2 +xserver-xorg-video-4 +xserver-xorg-video-5 +zcode-interpreter diff --git a/data/files/allowed-ancient-files b/data/files/allowed-ancient-files new file mode 100644 index 0000000..cbc4000 --- /dev/null +++ b/data/files/allowed-ancient-files @@ -0,0 +1,7 @@ +# Filename regexes to exclude from package-contains-ancient-file + +# Rust crates, upstream, have their Cargo.toml canonicalized on upload, and +# that and other cargo-generated files have their timestamps set to 0 in the +# resulting crate tarball. +^usr/share/cargo/registry/.*/Cargo\.toml$ +^usr/share/cargo/registry/.*/\.cargo_vcs_info\.json$ diff --git a/data/files/allowed-python-files b/data/files/allowed-python-files new file mode 100644 index 0000000..d559938 --- /dev/null +++ b/data/files/allowed-python-files @@ -0,0 +1,7 @@ +# Regular expressions (/i) of filenames that are allowed in top-level Python +# directories such as /usr/lib/python3/dist-packages + +\.egg-info$ +\.so$ +\.pth$ +\.py[ic]?$ diff --git a/data/files/banned/lenna/blacklist b/data/files/banned/lenna/blacklist new file mode 100644 index 0000000..3d7b7e8 --- /dev/null +++ b/data/files/banned/lenna/blacklist @@ -0,0 +1,23 @@ +# format is +# md5sum ~~ sha1 ~~ sha256 ~~ common name ~~ reference +# +# current name is the usual name of the file +# reference is a link to the license/official source + +36ad1cdb7c7855fcc253062c767c5748 ~~ 13bb28a3b6a8f07783636e7611c25db20d36e6ba ~~ 67f03c78826e88f8fbefc01195803497c6c4ff452a4585a8a1c8a8eeb538e1e4 ~~ lena.jpg ~~ https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=758442 + +3752999d8a4142d93eed4c8c97f0997c ~~ 4a8b9c9207de05db6b26604083202f05419e9afc ~~ 1f24a4dd0b5dbddf247f935b10b50665191943c813ff81f4b808fcffdbe422f1 ~~ lena.tif ~~ https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=758442 + +49d8d697422232eeb28b71846e993ef5 ~~ d712504a0fdf2425ab08debe01c6b2737c4da553 ~~ 0e8c262873c283681ebf7594295603b78cd505f8cafbde4af0bdc6289f6bdb01 ~~ lena.jpg ~~ https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=758442 + +9393259555eaaf91b58fe24a687fb60a ~~ 95beced0503c13c08beb6a8b157704382afa2f5f ~~ f9be71887ece95fb34c60d3910e4af5ae072b5f2d3c4863f0ec4afcf7bbf32b7 ~~ lena.png ~~ https://bugs.debian.org/827941 + +bb431a4c0c3280c7ca62f43e9882174c ~~ 73ed70526b5f4ad49c5f43d5849087a4a8dd00cc ~~ 6054bdfd37d3a147cd99920f1921d8278879399aabdedbf118f0960f592766ee ~~ lena.jpg ~~ https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=758442 + +bcb76439e9848b22830ee44973664084 ~~ 658b1ca8c82055e2f8d57773b7dbcdead0af6c14 ~~ d4268e35d21def2ba215607d202fc52501c91fda5f7a67c5bd0e2942f9afbcb6 ~~ lena.mat ~~ https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=758442 + +ec2daed3fa3835749a7d0423d36c652a ~~ 69e4bd806b20e51b5caa062f6d510ed796e1d067 ~~ 8974279a1c6d4711bea6d7db49e4fde2458615ccc80265ef1b4bc5ba16b84cad ~~ lenna.pgm ~~ Lenna test image ~~ https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=758442 + +ef70b3083e06b236bd804215c0382d09 ~~ bbbe2215e4bc6f38e3829bbe78ac6ca8008249f5 ~~ 1b33c59bcd9ced166f4b6f726ce05bd3c182ac049444178837ddede2a4b4550b ~~ lena.jpg ~~ https://bugs.debian.org/827941 + +dc0f99bbc6d31e7ce4000cc7c1117dbb ~~ 3712585117d7f181f76a67cbbdca9c558cb39110 ~~ 8640b22549789d5aeabebb487b0b6cda05119c3bff8f67699850a0f8177532d7 ~~ lena_std.jpg ~~ https://bugs.debian.org/996093 diff --git a/data/files/banned/lenna/whitelist b/data/files/banned/lenna/whitelist new file mode 100644 index 0000000..2ca0315 --- /dev/null +++ b/data/files/banned/lenna/whitelist @@ -0,0 +1,4 @@ +# md5sums of known-good Lenna images + +# libplacebo demos/lena.jpg +0ea16a2c4b94f0c1a83d11278655ac9f diff --git a/data/files/binary-file-extensions b/data/files/binary-file-extensions new file mode 100644 index 0000000..add2b55 --- /dev/null +++ b/data/files/binary-file-extensions @@ -0,0 +1,94 @@ +3g2 +3gp +TTF +aac +aif +ani +asf +aps +avi +avif +avifs +bmp +cb7 +cbr +cbt +cbz +chm +der +djvu +dll +dmg +doc +docx +emf +epub +exe +flac +gif +gmo +gpg +icc +icm +icns +ico +jar +jpeg +jpg +jsonlz4 +kbx +m4a +m4s +mjpg +mkv +mo +mov +mp3 +mp4 +mpg +odg +odp +ods +odt +oga +ogg +ogv +opus +otf +otp +p12 +pdf +pfx +pgp +png +ppt +pptx +psd +spx +sqlite +sqlite3 +suo +svgz +swf +tar +tga +tgz +tbz2 +txz +tif +tiff +ttf +war +wasm +wav +webp +webm +woff +woff2 +wv +xcf +xls +xlsx +xpi +xv +zip diff --git a/data/files/build-path-regex b/data/files/build-path-regex new file mode 100644 index 0000000..b99807b --- /dev/null +++ b/data/files/build-path-regex @@ -0,0 +1,6 @@ +# a list of known build path regex (xms) without leading / +^var/cache/pbuilder/build/ +^var/lib/sbuild/ +^var/lib/buildd/ +^build/ +^tmp/buildd/ diff --git a/data/files/compressed-file-extensions b/data/files/compressed-file-extensions new file mode 100644 index 0000000..adebbdf --- /dev/null +++ b/data/files/compressed-file-extensions @@ -0,0 +1,9 @@ +# list of compressed file extensions +# please alpha sort +bz +bz2 +gz +tgz +xz +z +Z diff --git a/data/files/generic-python-modules b/data/files/generic-python-modules new file mode 100644 index 0000000..b8777d5 --- /dev/null +++ b/data/files/generic-python-modules @@ -0,0 +1,9 @@ +# Regular expressions (/i) of overly-generic Python module names. + +backports? +core +docs? +site +tests? +examples? +scripts? diff --git a/data/files/obsolete-paths b/data/files/obsolete-paths new file mode 100644 index 0000000..825bb40 --- /dev/null +++ b/data/files/obsolete-paths @@ -0,0 +1,6 @@ +# obsolete path (regexp) -> newer path ~~ Reference +# +# Please alpha sort +^etc/bash_completion.d/ -> usr/share/bash-completion/completions ~~ Ensure new filename matches stricter requirements (see https://bugs.debian.org/776954 and https://bugs.debian.org/814599) +^etc/dhcp3/ -> etc/dhcp ~~ (see also https://bugs.debian.org/673029) +^etc/X11/fonts/X11R7/ -> etc/X11/fonts ~~ (see also https://bugs.debian.org/364530#24) diff --git a/data/files/pkg-config-bad-regex b/data/files/pkg-config-bad-regex new file mode 100644 index 0000000..0b8500a --- /dev/null +++ b/data/files/pkg-config-bad-regex @@ -0,0 +1,47 @@ +# a list of pkg-config bad constructions +# regex (xms) +# found in omnithread3.pc +^(?:[^:]*flags\h*:|[^=]*FLAGS\h*=) (?:\V*\h)? (-[DU]__linux__) \s +^(?:[^:]*flags\h*:|[^=]*FLAGS\h*=) (?:\V*\h)? (-[DU]__x86_64__) \s +^(?:[^:]*flags\h*:|[^=]*FLAGS\h*=) (?:\V*\h)? (-D__OSVERSION__=\d+) \s +# found in znc.pc +^(?:[^:]*flags\h*:|[^=]*FLAGS\h*=) (?:\V*\h)? (-g\d*) \s +^(?:[^:]*flags\h*:|[^=]*FLAGS\h*=) (?:\V*\h)? (-D_FORTIFY_SOURCE=\d+) \s +^(?:[^:]*flags\h*:|[^=]*FLAGS\h*=) (?:\V*\h)? (-O[s0-9]) \s +^(?:[^:]*flags\h*:|[^=]*FLAGS\h*=) (?:\V*\h)? (-W\S*) \s +^(?:[^:]*flags\h*:|[^=]*FLAGS\h*=) (?:\V*\h)? (-fvisibility=\w+) \s +^(?:[^:]*flags\h*:|[^=]*FLAGS\h*=) (?:\V*\h)? (-fPI[CE]) \s +# found in dolfin.pc +^(?:[^:]*flags\h*:|[^=]*FLAGS\h*=) (?:\V*\h)? (-f(?:no-)?stack-protector) \s +^(?:[^:]*flags\h*:|[^=]*FLAGS\h*=) (?:\V*\h)? (--param=ssp-buffer-size=\d+) \s +# found in clam_core.pc +[:=\h](-[IL](?:/usr/local/|/var/cache/pbuilder/build/|/var/lib/s?buildd?/)\S*)\s +# found in scilab.pc +^((?:[cC]flags\h*:|CFLAGS\h*=) (?:\V*\h)? -l\S+) \s +# found meep.pc +^(?:[^:]*flags\h*:|[^=]*FLAGS\h*=) (?:\V*\h)? (-march=\S+) \s +# found opensaml.pc +^(?:[^:]*flags\h*:|[^=]*FLAGS\h*=) (?:\V*\h)? (-[DU]NDEBUG) \s +# found in libspatialindex.pc +^(?:[^:]*flags\h*:|[^=]*FLAGS\h*=) (?:\V*\h)? (-pedantic) \s +# found in common-cpp.pc +^(?:[^:]*flags\h*:|[^=]*FLAGS\h*=) (?:\V*\h)? (-[DU]NEW_STDCPP) \s +^(?:[^:]*flags\h*:|[^=]*FLAGS\h*=) (?:\V*\h)? (-f(?:no-)?check-new) \s +^(?:[^:]*flags\h*:|[^=]*FLAGS\h*=) (?:\V*\h)? (-f(?:no-)?inline) \s +# found in postgresql, see 687208 +^(?:[^:]*flags\h*:|[^=]*FLAGS\h*=) (?:\V*\h)? (-pie) \s +^(?:[^:]*flags\h*:|[^=]*FLAGS\h*=) (?:\V*\h)? (-f(?:no-)?strict-aliasing) \s +^(?:[^:]*flags\h*:|[^=]*FLAGS\h*=) (?:\V*\h)? (-f(?:no-)?wrapv) \s +^(?:[^:]*flags\h*:|[^=]*FLAGS\h*=) (?:\V*\h)? (-fexcess-precision=\w+) \s +^(?:[^:]*flags\h*:|[^=]*FLAGS\h*=) (?:\V*\h)? (-f(?:no-)?unsafe-math-optimizations) \s +^(?:[^:]*flags\h*:|[^=]*FLAGS\h*=) (?:\V*\h)? (-f(?:no-)?signed-zeros) \s +^(?:[^:]*flags\h*:|[^=]*FLAGS\h*=) (?:\V*\h)? (-f(?:no-)?fp-contract) \s +^(?:[^:]*flags\h*:|[^=]*FLAGS\h*=) (?:\V*\h)? (-f(?:no-)?finite-math-only) \s +# generic math +^(?:[^:]*flags\h*:|[^=]*FLAGS\h*=) (?:\V*\h)? (-f\S+math) \s +# found in libbt.pc +^(?:[lL]ibs\h*:|LDFLAGS\h*=) (?:\V*\h)? (-Wl,z,relro) \s +# unexpanded automake variable +(@[^@\s]*@) + + diff --git a/data/files/privacy-breaker-fragments b/data/files/privacy-breaker-fragments new file mode 100644 index 0000000..2a329d0 --- /dev/null +++ b/data/files/privacy-breaker-fragments @@ -0,0 +1,34 @@ +# Manually maintained table of well known privacy breakers html/js fragment +# syntax: +# keyword ~~regex (xsm) ~~ tag +# +# Note spaces on the right hand side of ~~ are assumed to be a part +# of the regex. Also note that the regex will be applied to a string +# in all lowercase. +# +# Please keep this sorted by tag. +google_ad_client ~~ google_ad_client\s*= ~~ privacy-breach-google-adsense +google-analytics.com/ga.js ~~ [\"\'](?:[^/.]?\.)?google-analytics.com/(?:ga|analytics).js[\"\'] ~~ privacy-breach-google-adsense +urchintracker ~~ urchintracker\s*\(\s*\)\s*; ~~ privacy-breach-google-adsense +adsense ~~ </?\s*adsense\s*> ~~ privacy-breach-google-adsense +data-ad-client ~~ \s+data-ad-client\s* ~~ privacy-breach-google-adsense +adsbygoogle ~~ =\s*window\.adsbygoogle ~~ privacy-breach-google-adsense +googlesearchdomain ~~ googlesearchdomain\s*= ~~ privacy-breach-google-cse +cse-branding ~~ <div\s+class="cse-branding-(?:logo|form)"\s*> ~~ privacy-breach-google-cse +customsearchcontrol ~~ google\.search\.customsearchcontrol\s*\(\s*' ~~ privacy-breach-google-cse +google.load ~~ google\.load\s*\(\s*'search' ~~ privacy-breach-google-cse +customsearchengine ~~ </?\s*customsearchengine\s*> ~~ privacy-breach-google-cse +partner-pub ~~ value\s*=\s*"partner-pub-\d+:?\d+" ~~ privacy-breach-google-cse +cse.js ~~ //www[.]google[.]com/cse/cse[.]js\?cx[=] ~~ privacy-breach-google-cse +plusone ~~ (?:<g:plusone|google\.com/js/plusone\.js\?onload=onloadcallback|src\s*=\s*'https?://apis\.google\.com/js/plusone\.js') ~~ privacy-breach-google-plus +flattr ~~ (?:api\.flattr\.com/js/\d(\.\d)?/load\.js|<a\s+class\s*=\s*"flattrbutton"|data-flattr-uid\s*=|flattrloader\.(?:setup\s*\(\)|render\s*\(|addloadevent\s*\()) ~~ privacy-breach-donation +facebook ~~ (?:facebook-jssdk|xmlns:fb="https?://www.facebook.com/20\d\d/fbml) ~~ privacy-breach-facebook +ogp.me/ns/fb ~~ xmlns:fb="https?://ogp.me/ns/fb\#?" ~~ privacy-breach-facebook +fb. ~~ fb\.(?:canvas|api|init|login|getloginstatus|event|ui|xfbml)(?!\()(?!<) ~~ privacy-breach-facebook +fb: ~~ </?fb:(?:activity|comments|friendpile|like|like-box|login-button|name|profile-pic|recommendations)\s+[^>]*> ~~ privacy-breach-facebook +piwik ~~ (?:piwik_url\s*=|[\'"]piwik\.js[\'\"]|end\s+piwik\h+(?:tag|code)|[\'\"]settrackerurl[\'\"]) ~~ privacy-breach-piwik +pkbaseurl ~~ pkbaseurl\s*= ~~ privacy-breach-piwik +sc_project ~~ var\s+sc_project\s*=\s*\d+\s*; ~~ privacy-breach-statistics-website +twitter ~~ (?:src\s*=\s*["']https?|[+]\s*['"])://platform\.twitter\.com/widgets\.js['"] ~~ privacy-breach-twitter + + diff --git a/data/files/privacy-breaker-tag-attr b/data/files/privacy-breaker-tag-attr new file mode 100644 index 0000000..508f259 --- /dev/null +++ b/data/files/privacy-breaker-tag-attr @@ -0,0 +1,22 @@ +# tag attribute url file helper +# format is name ~~ keyword1 && keyword2 || keyword3 && keyword4~~ secondary keyword ~~ regex (xsm) $1 is whole $2 tag $3 is url +# in regex &URL is replaced by URL regex +# could not use @import +import ~~ @import && url ~~ (([@]import) \s+ url \s* \( \s* \"(&URL)\" \s* \) \s*;) +applet ~~ codebase="http && <applet || codebase="ftp && <applet || codebase="// && <applet ~~ (<(applet) (?:\s[^>]+)? \s+ codebase="(&URL)" [^>]*>) +div src= ~~ src="http && <div || src="ftp && <div || src="// && <div ~~ (<(div) (?:\s[^>]+)? \s+ src="(&URL)" [^>]*>) +div data-href= ~~ data-href="http && <div || data-href="ftp && <div || data-href="// && <div ~~ (<(div) (?:\s[^>]+)? \s+ data-href="(&URL)" [^>]*>) +embed ~~ src="http && <embed || src="ftp && <embed || src="// && <embed ~~ (<(embed) (?:\s[^>]+)? \s+ src="(&URL)" [^>]*>) +frame ~~ src="http && <frame || src="ftp && <frame || src="// && <frame ~~ (<(frame) (?:\s[^>]+)? \s+ src="(&URL)" [^>]*>) +iframe ~~ src="http && <iframe || src="ftp && <iframe || src="// && <iframe ~~ (<(iframe) (?:\s[^>]+)? \s+ src="(&URL)" [^>]*>) +img ~~ src="http && <img || src="ftp && <img || src="// && <img ~~ (<(img) (?:\s[^>]+)? \s+ src="(&URL)" [^>]*>) +input ~~ src="http && <input || src="ftp && <input || src="// && <input ~~ (<(input) (?:\s[^>]+)? \s+ src="(&URL)" [^>]*>) +link ~~ <link && href="http || <link && href="ftp|| <link && href="//~~ (<(link) (?:\s[^>]+)? \s+ href="(&URL)" [^>]*>) +object codebase= ~~ codebase="http && <object || codebase="ftp && <object || codebase="// && <object ~~ (<(object) (?:\s[^>]+)? \s+ codebase="(&URL)" [^>]*>) +object data= ~~ data="http && <object || data="ftp && <object || data="// && <object ~~ (<(object) (?:\s[^>]+)? \s+ data="(&URL)" [^>]*>) +script ~~ src="http && <script || src="ftp && <script || src="// && <script ~~ (<(script) (?:\s[^>]+)? \s+ src="(&URL)" [^>]*>) +source ~~ src="http && <source || src="ftp && <source || src="// && <source ~~ (<(source) (?:\s[^>]+)? \s+ src="(&URL)" [^>]*>) +track ~~ src="http && <track || src="ftp && <track || src="// && <track ~~ (<(track) (?:\s[^>]+)? \s+ src="(&URL)" [^>]*>) +video src= ~~ src="http && <video || src="ftp && <video || src="// && <video ~~ (<(video) (?:\s[^>]+)? \s+ src="(&URL)" [^>]*>) +video poster= ~~ poster="http && <video || poster="ftp && <video || poster="// && <video ~~ (<(video) (?:\s[^>]+)? \s+ poster="(&URL)" [^>]*>) +audio ~~ src="http && <audio || src="ftp && <audio || src="// && <audio ~~ (<(audio) (?:\s[^>]+)? \s+ src="(&URL)" [^>]*>) diff --git a/data/files/privacy-breaker-websites b/data/files/privacy-breaker-websites new file mode 100644 index 0000000..2e957c7 --- /dev/null +++ b/data/files/privacy-breaker-websites @@ -0,0 +1,34 @@ +# Manually maintained table of well known privacy breakers site +# syntax: +# key ~~regex (xsm) ~~ tag (optional assumed to be key) ~~ hint (optional) +# +# please always use lowercase for regex +# Note spaces on the right hand side of ~~ are assumed to be a part +# of the regex. +# +# Please keep this sorted by tag. +privacy-breach-google-adsense ~~^(?:[^\./]+\.)?(?:googlesyndication\.com/pagead/(?:show_ads\.js|js/)|google-analytics\.com/(?:ga|urchin)\.js) +privacy-breach-google-cse ~~^(?:[^\./]+\.)?google\.[^\./]+\.?/(:?afsonline/show_afs_search\.js|cse/api/branding\.css|coop/cse/brand\?[^/]+)$ +privacy-breach-google-plus ~~(?:^(?:[^\./]+\.)?google\.[^\./]+\.?/js/plusone\.[^\./]+\Z|^plus\.google\.com/) +privacy-breach-donation ~~(?:(?:donate|paypal|support)(?:[^/_.]*)?(?:_?small)?\.(gif|jpe?g|png|svg)$|^(?:[^\./]+\.)?(?:flattr\.(?:com|net)|paypal(?:objects)?\.com|pledgie\.com|xoom\.com)/) +privacy-breach-facebook ~~^(?:[^\./]+\.)?(?:facebook\.com|static\.ak\.fbcdn\.net)(?:/|\Z) +privacy-breach-logo ~~(?:^(?:sflogo\.)?(?:sourceforge|sf)\.[^\./]+/sflogo\.php\?|/logos?/|(?:acrobat|clanlib|(?:fav|github-)?icons?|logos?_?(?:\d+|small)|mascot[^\./]*|youtube-icon[^\./]*|twitter_logo[^\./]*|doxygen|forkme_[^/\.]*|logos?_[^/\.]*|logos?)\.(gif|ico|jpe?g|png|svg)$) +privacy-breach-piwik ~~/piwik\.php\? +privacy-breach-statistics-website ~~^(?:(?:[^\./]+\.)?(?:cruel-carlota\.pagodabox\.com|linkexchange\.com|nedstatbasic\.net|onestat\.com|sitemeter\.com|statcounter\.com|webstats\.motigo\.com|digit\.com)(?:/|\Z)|/count(?:er)?\.cgi\?[^/]*\Z|\Acount(?:er)?\.) +privacy-breach-w3c-valid-html ~~^(?:(?:[^\./]+\.)?w3.org/(?:icons/valid-|css-validator/images/)(?:[^/]+)?$|validator\.w3\.org(?:/|\Z)) +# already packaged under debian (please alpha sort by package name +privacy-breach-uses-embedded-file-bootstrap ~~/bootstrap(?:-(?:\d\.?)+(b\d+)?)?(?:\.min)?\.(?:js|css)\Z ~~ privacy-breach-uses-embedded-file ~~ You may use the libjs-bootstrap package. +privacy-breach-uses-embedded-file-expect.js ~~/expect\.js/\d+(?:\.\d+)*/index(?:\.min)?\.js\Z ~~ privacy-breach-uses-embedded-file ~~ You may use the libjs-expect.js package. +privacy-breach-uses-embedded-file-chai ~~/chai(?:\d+(?:\.\d+)*)?(?:\.min)?\.js\Z ~~ privacy-breach-uses-embedded-file ~~ You may use the libjs-chai package. +privacy-breach-uses-embedded-file-html5shiv ~~/html5shiv(?:-printshiv)?(?:\d+(?:\.\d+)*)?(?:\.min)?\.js\Z ~~ privacy-breach-uses-embedded-file ~~ You may use the node-html5shiv package (virtual package). +privacy-breach-uses-embedded-file-jquery ~~(?:(?!doxygen.*)/jquery(?:-(?:\d\.?)+(b\d+)?)?(?:\.min)?\.js\Z) ~~ privacy-breach-uses-embedded-file ~~ You may use the libjs-jquery package. +privacy-breach-uses-embedded-file-jquery-flot ~~(?:/jquery[\.-]flot(?:(?:-(?:\d\.?)+)?(?:\.min)?\.js|\.css)\Z) ~~ privacy-breach-uses-embedded-file ~~ You may use the libjs-jquery-flot package. +privacy-breach-uses-embedded-file-jquery-mobile ~~(?:/jquery[\.-]mobile(?:(?:-(?:\d\.?)+)?(?:\.min)?\.js|\.css)\Z|^code\.jquery\.com/mobile/) ~~ privacy-breach-uses-embedded-file ~~ You may use the libjs-jquery-mobile package. +privacy-breach-uses-embedded-file-jquery-ui ~~(?:/jquery[\.-]ui(?:(?:-(?:\d\.?)+)?(?:\.min)?\.js|\.css)\Z|^(?:[^\./]+\.)?jqueryui\.com/|/jquery/ui/[^/]+\Z) ~~ privacy-breach-uses-embedded-file ~~ You may use the libjs-jquery-ui package. +privacy-breach-uses-embedded-file-mathjax ~~ /mathjax(?:\.min)?\.js(\Z|\?) ~~ privacy-breach-uses-embedded-file ~~ You may use the libjs-mathjax package. +privacy-breach-uses-embedded-file-modernizr ~~ /modernizr(?:\.min)?\.js\Z ~~ privacy-breach-uses-embedded-file ~~ You may use the libjs-modernizr package. +privacy-breach-uses-embedded-file-mocha ~~ /mocha(?:\.min)?\.(?:js|css)\Z ~~ privacy-breach-uses-embedded-file ~~ You may use the libjs-mocha package. +privacy-breach-uses-embedded-file-normalize.css ~~ /normalize(?:\.min)?\.css\Z ~~ privacy-breach-uses-embedded-file ~~ You may use the libjs-normalize (virtual) package. +privacy-breach-uses-embedded-file-openlayers ~~ /openlayers(?:\.min)?\.js\Z ~~ privacy-breach-uses-embedded-file ~~ You may use the libjs-openlayers package. +privacy-breach-uses-embedded-file-openlayer ~~ /prototype(?:\.min)?\.js\Z ~~ privacy-breach-uses-embedded-file ~~ You may use the libjs-prototype package. +privacy-breach-uses-embedded-file-rx ~~ /rx(?:\.min|\.umd)?\.js\Z ~~ privacy-breach-uses-embedded-file ~~ You may use the libjs-rx package. diff --git a/data/files/standard-files b/data/files/standard-files new file mode 100644 index 0000000..231ef53 --- /dev/null +++ b/data/files/standard-files @@ -0,0 +1,28 @@ +# Manually maintained list of "standard" files in /usr/share/doc/$pkg +# These are not enough to consider the package "not-empty" +# +# NB: There is a special case in Lintian for ignoring all "README.*" +# files as well. They need not be listed here. +# +# Please keep this sorted (ignoring case) + +AUTHORS +AUTHORS.gz +BUGS +BUGS.gz +changelog.Debian.gz +changelog.gz +CHANGES +CHANGES.gz +COPYING.gz +copyright +HACKING +HACKING.gz +NEWS +NEWS.Debian +NEWS.Debian.gz +NEWS.gz +TODO +TODO.gz + + diff --git a/data/files/vcs-control-files b/data/files/vcs-control-files new file mode 100644 index 0000000..9a7a6e7 --- /dev/null +++ b/data/files/vcs-control-files @@ -0,0 +1,8 @@ +# vcs control files regex +# ${COMPRESS_EXT} will be replaced by compression extension list +# please alpha sort +/\.arch-inventory(?:\.${COMPRESS_EXT})?\Z +/\.hgtags(?:\.${COMPRESS_EXT})?\Z +/\.(?:cvs|git|hg)_?ignore(?:\.${COMPRESS_EXT})?\Z +/\.git_?(?:modules|attributes)(?:\.${COMPRESS_EXT})?\Z +/\.hg_archival\.txt(?:\.${COMPRESS_EXT})?\Z diff --git a/data/fonts.json b/data/fonts.json new file mode 100644 index 0000000..fafb16b --- /dev/null +++ b/data/fonts.json @@ -0,0 +1,28952 @@ +{ + "fonts" : { + "1015sn.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "1015snr.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "18holes.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "3270-regular.ttf" : { + "installed_by" : [ + "fonts-3270" + ] + }, + "3270condensed-regular.ttf" : { + "installed_by" : [ + "fonts-3270" + ] + }, + "3270semicondensed-regular.ttf" : { + "installed_by" : [ + "fonts-3270" + ] + }, + "36daysag.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "36daythk.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "3dlet.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "4shadow.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "4shadowo.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "8bitlim.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "8bitlimo.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "8bitlimr.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "8blimro.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "90stars.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "a010013d.pfb" : { + "installed_by" : [ + "t1-cyrillic" + ] + }, + "a010015d.pfb" : { + "installed_by" : [ + "t1-cyrillic" + ] + }, + "a010033d.pfb" : { + "installed_by" : [ + "t1-cyrillic" + ] + }, + "a010035d.pfb" : { + "installed_by" : [ + "t1-cyrillic" + ] + }, + "aakar-medium.ttf" : { + "installed_by" : [ + "fonts-gujr-extra" + ] + }, + "abecedario.ttf" : { + "installed_by" : [ + "fonts-linex" + ] + }, + "abecedarioguiada.ttf" : { + "installed_by" : [ + "fonts-linex" + ] + }, + "abecedarionegrita.ttf" : { + "installed_by" : [ + "fonts-linex" + ] + }, + "abecedariopautada.ttf" : { + "installed_by" : [ + "fonts-linex" + ] + }, + "abecedariopuntguiada.ttf" : { + "installed_by" : [ + "fonts-linex" + ] + }, + "abecedariopuntos.ttf" : { + "installed_by" : [ + "fonts-linex" + ] + }, + "abecedariopuntpautada.ttf" : { + "installed_by" : [ + "fonts-linex" + ] + }, + "aboriginalsansbold9433.ttf" : { + "installed_by" : [ + "fonts-lg-aboriginal" + ] + }, + "aboriginalsansbolditalic9433.ttf" : { + "installed_by" : [ + "fonts-lg-aboriginal" + ] + }, + "aboriginalsansitalic9433.ttf" : { + "installed_by" : [ + "fonts-lg-aboriginal" + ] + }, + "aboriginalsansregular9433.ttf" : { + "installed_by" : [ + "fonts-lg-aboriginal" + ] + }, + "aboriginalserifbold943.ttf" : { + "installed_by" : [ + "fonts-lg-aboriginal" + ] + }, + "aboriginalserifbolditalic943.ttf" : { + "installed_by" : [ + "fonts-lg-aboriginal" + ] + }, + "aboriginalserifitalic943.ttf" : { + "installed_by" : [ + "fonts-lg-aboriginal" + ] + }, + "aboriginalserifregular943.ttf" : { + "installed_by" : [ + "fonts-lg-aboriginal" + ] + }, + "abydosb_hint.ttf" : { + "installed_by" : [ + "fonts-ancient-scripts" + ] + }, + "abydosr_hint.ttf" : { + "installed_by" : [ + "fonts-ancient-scripts" + ] + }, + "abyssinicasil-regular.ttf" : { + "installed_by" : [ + "fonts-sil-abyssinica" + ] + }, + "accanthisadfstd-bold.otf" : { + "installed_by" : [ + "fonts-adf-accanthis" + ] + }, + "accanthisadfstd-bolditalic.otf" : { + "installed_by" : [ + "fonts-adf-accanthis" + ] + }, + "accanthisadfstd-italic.otf" : { + "installed_by" : [ + "fonts-adf-accanthis" + ] + }, + "accanthisadfstd-regular.otf" : { + "installed_by" : [ + "fonts-adf-accanthis" + ] + }, + "accanthisadfstdno2-bold.otf" : { + "installed_by" : [ + "fonts-adf-accanthis" + ] + }, + "accanthisadfstdno2-bolditalic.otf" : { + "installed_by" : [ + "fonts-adf-accanthis" + ] + }, + "accanthisadfstdno2-italic.otf" : { + "installed_by" : [ + "fonts-adf-accanthis" + ] + }, + "accanthisadfstdno2-regular.otf" : { + "installed_by" : [ + "fonts-adf-accanthis" + ] + }, + "accanthisadfstdno3-bold.otf" : { + "installed_by" : [ + "fonts-adf-accanthis" + ] + }, + "accanthisadfstdno3-bolditalic.otf" : { + "installed_by" : [ + "fonts-adf-accanthis" + ] + }, + "accanthisadfstdno3-italic.otf" : { + "installed_by" : [ + "fonts-adf-accanthis" + ] + }, + "accanthisadfstdno3-regular.otf" : { + "installed_by" : [ + "fonts-adf-accanthis" + ] + }, + "acidrefl.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "acknowtt.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "ae_alarabiya.ttf" : { + "installed_by" : [ + "fonts-arabeyes" + ] + }, + "ae_albattar.ttf" : { + "installed_by" : [ + "fonts-arabeyes" + ] + }, + "ae_alhor.ttf" : { + "installed_by" : [ + "fonts-arabeyes" + ] + }, + "ae_almanzomah.ttf" : { + "installed_by" : [ + "fonts-arabeyes" + ] + }, + "ae_alyarmook.ttf" : { + "installed_by" : [ + "fonts-arabeyes" + ] + }, + "ae_arab.ttf" : { + "installed_by" : [ + "fonts-arabeyes" + ] + }, + "ae_cortoba.ttf" : { + "installed_by" : [ + "fonts-arabeyes" + ] + }, + "ae_dimnah.ttf" : { + "installed_by" : [ + "fonts-arabeyes" + ] + }, + "ae_electron.ttf" : { + "installed_by" : [ + "fonts-arabeyes" + ] + }, + "ae_furat.ttf" : { + "installed_by" : [ + "fonts-arabeyes" + ] + }, + "ae_granada.ttf" : { + "installed_by" : [ + "fonts-arabeyes" + ] + }, + "ae_graph.ttf" : { + "installed_by" : [ + "fonts-arabeyes" + ] + }, + "ae_hani.ttf" : { + "installed_by" : [ + "fonts-arabeyes" + ] + }, + "ae_haramain.ttf" : { + "installed_by" : [ + "fonts-arabeyes" + ] + }, + "ae_hor.ttf" : { + "installed_by" : [ + "fonts-arabeyes" + ] + }, + "ae_japan.ttf" : { + "installed_by" : [ + "fonts-arabeyes" + ] + }, + "ae_jet.ttf" : { + "installed_by" : [ + "fonts-arabeyes" + ] + }, + "ae_kayrawan.ttf" : { + "installed_by" : [ + "fonts-arabeyes" + ] + }, + "ae_khalid.ttf" : { + "installed_by" : [ + "fonts-arabeyes" + ] + }, + "ae_mashq-bold.ttf" : { + "installed_by" : [ + "fonts-arabeyes" + ] + }, + "ae_mashq.ttf" : { + "installed_by" : [ + "fonts-arabeyes" + ] + }, + "ae_metal.ttf" : { + "installed_by" : [ + "fonts-arabeyes" + ] + }, + "ae_nada.ttf" : { + "installed_by" : [ + "fonts-arabeyes" + ] + }, + "ae_nagham.ttf" : { + "installed_by" : [ + "fonts-arabeyes" + ] + }, + "ae_nice.ttf" : { + "installed_by" : [ + "fonts-arabeyes" + ] + }, + "ae_ostorah.ttf" : { + "installed_by" : [ + "fonts-arabeyes" + ] + }, + "ae_ouhod-bold.ttf" : { + "installed_by" : [ + "fonts-arabeyes" + ] + }, + "ae_petra.ttf" : { + "installed_by" : [ + "fonts-arabeyes" + ] + }, + "ae_rasheeq-bold.ttf" : { + "installed_by" : [ + "fonts-arabeyes" + ] + }, + "ae_rehan.ttf" : { + "installed_by" : [ + "fonts-arabeyes" + ] + }, + "ae_salem.ttf" : { + "installed_by" : [ + "fonts-arabeyes" + ] + }, + "ae_shado.ttf" : { + "installed_by" : [ + "fonts-arabeyes" + ] + }, + "ae_sharjah.ttf" : { + "installed_by" : [ + "fonts-arabeyes" + ] + }, + "ae_sindbad.ttf" : { + "installed_by" : [ + "fonts-arabeyes" + ] + }, + "ae_tarablus.ttf" : { + "installed_by" : [ + "fonts-arabeyes" + ] + }, + "ae_tholoth.ttf" : { + "installed_by" : [ + "fonts-arabeyes" + ] + }, + "aegean_hint.ttf" : { + "installed_by" : [ + "fonts-ancient-scripts" + ] + }, + "aegyptusb_hint.ttf" : { + "installed_by" : [ + "fonts-ancient-scripts" + ] + }, + "aegyptusr_hint.ttf" : { + "installed_by" : [ + "fonts-ancient-scripts" + ] + }, + "aerial.ttf" : { + "installed_by" : [ + "fonts-arkpandora" + ] + }, + "aerialbd.ttf" : { + "installed_by" : [ + "fonts-arkpandora" + ] + }, + "aerialbdit.ttf" : { + "installed_by" : [ + "fonts-arkpandora" + ] + }, + "aerialit.ttf" : { + "installed_by" : [ + "fonts-arkpandora" + ] + }, + "aerialmono.ttf" : { + "installed_by" : [ + "fonts-arkpandora" + ] + }, + "aerialmonobd.ttf" : { + "installed_by" : [ + "fonts-arkpandora" + ] + }, + "aerialmonobdit.ttf" : { + "installed_by" : [ + "fonts-arkpandora" + ] + }, + "aerialmonoit.ttf" : { + "installed_by" : [ + "fonts-arkpandora" + ] + }, + "aescrawl.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "aesymatt.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "aftermat.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "agave-b-autohinted.ttf" : { + "installed_by" : [ + "fonts-agave" + ] + }, + "agave-r-autohinted.ttf" : { + "installed_by" : [ + "fonts-agave" + ] + }, + "akatab-bold.ttf" : { + "installed_by" : [ + "fonts-sil-akatab" + ] + }, + "akatab-regular.ttf" : { + "installed_by" : [ + "fonts-sil-akatab" + ] + }, + "akkadian_hint.ttf" : { + "installed_by" : [ + "fonts-ancient-scripts" + ] + }, + "aksharyogini2normal.ttf" : { + "installed_by" : [ + "fonts-aksharyogini2" + ] + }, + "alegreyasans-black.otf" : { + "installed_by" : [ + "fonts-alegreya-sans" + ] + }, + "alegreyasans-blackitalic.otf" : { + "installed_by" : [ + "fonts-alegreya-sans" + ] + }, + "alegreyasans-bold.otf" : { + "installed_by" : [ + "fonts-alegreya-sans" + ] + }, + "alegreyasans-bolditalic.otf" : { + "installed_by" : [ + "fonts-alegreya-sans" + ] + }, + "alegreyasans-extrabold.otf" : { + "installed_by" : [ + "fonts-alegreya-sans" + ] + }, + "alegreyasans-extrabolditalic.otf" : { + "installed_by" : [ + "fonts-alegreya-sans" + ] + }, + "alegreyasans-italic.otf" : { + "installed_by" : [ + "fonts-alegreya-sans" + ] + }, + "alegreyasans-light.otf" : { + "installed_by" : [ + "fonts-alegreya-sans" + ] + }, + "alegreyasans-lightitalic.otf" : { + "installed_by" : [ + "fonts-alegreya-sans" + ] + }, + "alegreyasans-medium.otf" : { + "installed_by" : [ + "fonts-alegreya-sans" + ] + }, + "alegreyasans-mediumitalic.otf" : { + "installed_by" : [ + "fonts-alegreya-sans" + ] + }, + "alegreyasans-regular.otf" : { + "installed_by" : [ + "fonts-alegreya-sans" + ] + }, + "alegreyasans-thin.otf" : { + "installed_by" : [ + "fonts-alegreya-sans" + ] + }, + "alegreyasans-thinitalic.otf" : { + "installed_by" : [ + "fonts-alegreya-sans" + ] + }, + "alegreyasanssc-black.otf" : { + "installed_by" : [ + "fonts-alegreya-sans" + ] + }, + "alegreyasanssc-blackitalic.otf" : { + "installed_by" : [ + "fonts-alegreya-sans" + ] + }, + "alegreyasanssc-bold.otf" : { + "installed_by" : [ + "fonts-alegreya-sans" + ] + }, + "alegreyasanssc-bolditalic.otf" : { + "installed_by" : [ + "fonts-alegreya-sans" + ] + }, + "alegreyasanssc-extrabold.otf" : { + "installed_by" : [ + "fonts-alegreya-sans" + ] + }, + "alegreyasanssc-extrabolditalic.otf" : { + "installed_by" : [ + "fonts-alegreya-sans" + ] + }, + "alegreyasanssc-italic.otf" : { + "installed_by" : [ + "fonts-alegreya-sans" + ] + }, + "alegreyasanssc-light.otf" : { + "installed_by" : [ + "fonts-alegreya-sans" + ] + }, + "alegreyasanssc-lightitalic.otf" : { + "installed_by" : [ + "fonts-alegreya-sans" + ] + }, + "alegreyasanssc-medium.otf" : { + "installed_by" : [ + "fonts-alegreya-sans" + ] + }, + "alegreyasanssc-mediumitalic.otf" : { + "installed_by" : [ + "fonts-alegreya-sans" + ] + }, + "alegreyasanssc-regular.otf" : { + "installed_by" : [ + "fonts-alegreya-sans" + ] + }, + "alegreyasanssc-thin.otf" : { + "installed_by" : [ + "fonts-alegreya-sans" + ] + }, + "alegreyasanssc-thinitalic.otf" : { + "installed_by" : [ + "fonts-alegreya-sans" + ] + }, + "alexander_hint.ttf" : { + "installed_by" : [ + "fonts-ancient-scripts" + ] + }, + "alfa-beta.ttf" : { + "installed_by" : [ + "fonts-linex" + ] + }, + "alfios_b.otf" : { + "installed_by" : [ + "fonts-ancient-scripts" + ] + }, + "alfios_i.otf" : { + "installed_by" : [ + "fonts-ancient-scripts" + ] + }, + "alfios_j.otf" : { + "installed_by" : [ + "fonts-ancient-scripts" + ] + }, + "alfios_r.otf" : { + "installed_by" : [ + "fonts-ancient-scripts" + ] + }, + "alkalami-light.ttf" : { + "installed_by" : [ + "fonts-sil-alkalami" + ] + }, + "alkalami-regular.ttf" : { + "installed_by" : [ + "fonts-sil-alkalami" + ] + }, + "allerta_medium.otf" : { + "installed_by" : [ + "fonts-allerta" + ] + }, + "allerta_stencil.otf" : { + "installed_by" : [ + "fonts-allerta" + ] + }, + "alphbeta.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "amalgama.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "amalgamo.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "amiga-regular.ttf" : { + "installed_by" : [ + "fonts-amiga" + ] + }, + "amiri-bold.ttf" : { + "installed_by" : [ + "fonts-hosny-amiri" + ] + }, + "amiri-boldslanted.ttf" : { + "installed_by" : [ + "fonts-hosny-amiri" + ] + }, + "amiri-regular.ttf" : { + "installed_by" : [ + "fonts-hosny-amiri" + ] + }, + "amiri-slanted.ttf" : { + "installed_by" : [ + "fonts-hosny-amiri" + ] + }, + "amiriquran.ttf" : { + "installed_by" : [ + "fonts-hosny-amiri" + ] + }, + "amiriqurancolored.ttf" : { + "installed_by" : [ + "fonts-hosny-amiri" + ] + }, + "amit.otf" : { + "installed_by" : [ + "fonts-ldco" + ] + }, + "amit.ttf" : { + "installed_by" : [ + "fonts-ldco" + ] + }, + "amplitud.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "anaktoria_hint.ttf" : { + "installed_by" : [ + "fonts-ancient-scripts" + ] + }, + "analecta_hint.ttf" : { + "installed_by" : [ + "fonts-ancient-scripts" + ] + }, + "anatolian_hint.ttf" : { + "installed_by" : [ + "fonts-ancient-scripts" + ] + }, + "andika-bold.ttf" : { + "installed_by" : [ + "fonts-sil-andika" + ] + }, + "andika-bolditalic.ttf" : { + "installed_by" : [ + "fonts-sil-andika" + ] + }, + "andika-italic.ttf" : { + "installed_by" : [ + "fonts-sil-andika" + ] + }, + "andika-regular.ttf" : { + "installed_by" : [ + "fonts-sil-andika" + ] + }, + "andikacompact-r.ttf" : { + "installed_by" : [ + "fonts-sil-andika-compact" + ] + }, + "andikanewbasic-b.ttf" : { + "installed_by" : [ + "fonts-sil-andikanewbasic" + ] + }, + "andikanewbasic-bi.ttf" : { + "installed_by" : [ + "fonts-sil-andikanewbasic" + ] + }, + "andikanewbasic-i.ttf" : { + "installed_by" : [ + "fonts-sil-andikanewbasic" + ] + }, + "andikanewbasic-r.ttf" : { + "installed_by" : [ + "fonts-sil-andikanewbasic" + ] + }, + "ani.ttf" : { + "installed_by" : [ + "fonts-beng-extra" + ] + }, + "anjalioldlipi-regular.ttf" : { + "installed_by" : [ + "fonts-smc-anjalioldlipi" + ] + }, + "annapurnasil-bold.ttf" : { + "installed_by" : [ + "fonts-sil-annapurna" + ] + }, + "annapurnasil-regular.ttf" : { + "installed_by" : [ + "fonts-sil-annapurna" + ] + }, + "aoyagi-soseki.ttf" : { + "installed_by" : [ + "fonts-aoyagi-soseki" + ] + }, + "aoyagikouzant.ttf" : { + "installed_by" : [ + "fonts-aoyagi-kouzan-t" + ] + }, + "apibold.ttf" : { + "installed_by" : [ + "fonts-linex" + ] + }, + "apibolit.ttf" : { + "installed_by" : [ + "fonts-linex" + ] + }, + "apiitali.ttf" : { + "installed_by" : [ + "fonts-linex" + ] + }, + "apiregul.ttf" : { + "installed_by" : [ + "fonts-linex" + ] + }, + "apropal-bold.otf" : { + "installed_by" : [ + "fonts-apropal" + ] + }, + "arapey-black-display.otf" : { + "installed_by" : [ + "fonts-arapey" + ] + }, + "arapey-black.otf" : { + "installed_by" : [ + "fonts-arapey" + ] + }, + "arapey-regular-display.otf" : { + "installed_by" : [ + "fonts-arapey" + ] + }, + "arapey-regular.otf" : { + "installed_by" : [ + "fonts-arapey" + ] + }, + "arapey-thin-display.otf" : { + "installed_by" : [ + "fonts-arapey" + ] + }, + "arapey-thin.otf" : { + "installed_by" : [ + "fonts-arapey" + ] + }, + "arimo-bold.ttf" : { + "installed_by" : [ + "fonts-croscore" + ] + }, + "arimo-bolditalic.ttf" : { + "installed_by" : [ + "fonts-croscore" + ] + }, + "arimo-italic.ttf" : { + "installed_by" : [ + "fonts-croscore" + ] + }, + "arimo-regular.ttf" : { + "installed_by" : [ + "fonts-croscore" + ] + }, + "aroania_hint.ttf" : { + "installed_by" : [ + "fonts-ancient-scripts" + ] + }, + "arthriti.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "arundinasans-bold.ttf" : { + "installed_by" : [ + "fonts-arundina" + ] + }, + "arundinasans-boldoblique.ttf" : { + "installed_by" : [ + "fonts-arundina" + ] + }, + "arundinasans-oblique.ttf" : { + "installed_by" : [ + "fonts-arundina" + ] + }, + "arundinasans.ttf" : { + "installed_by" : [ + "fonts-arundina" + ] + }, + "arundinasansmono-bold.ttf" : { + "installed_by" : [ + "fonts-arundina" + ] + }, + "arundinasansmono-boldoblique.ttf" : { + "installed_by" : [ + "fonts-arundina" + ] + }, + "arundinasansmono-oblique.ttf" : { + "installed_by" : [ + "fonts-arundina" + ] + }, + "arundinasansmono.ttf" : { + "installed_by" : [ + "fonts-arundina" + ] + }, + "arundinaserif-bold.ttf" : { + "installed_by" : [ + "fonts-arundina" + ] + }, + "arundinaserif.ttf" : { + "installed_by" : [ + "fonts-arundina" + ] + }, + "asana-math.otf" : { + "installed_by" : [ + "fonts-oflb-asana-math" + ] + }, + "aseab_hint.ttf" : { + "installed_by" : [ + "fonts-ancient-scripts" + ] + }, + "aseai_hint.ttf" : { + "installed_by" : [ + "fonts-ancient-scripts" + ] + }, + "aseaj_hint.ttf" : { + "installed_by" : [ + "fonts-ancient-scripts" + ] + }, + "asear_hint.ttf" : { + "installed_by" : [ + "fonts-ancient-scripts" + ] + }, + "aspartam.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "assyrian_hint.ttf" : { + "installed_by" : [ + "fonts-ancient-scripts" + ] + }, + "atarismall.ttf" : { + "installed_by" : [ + "fonts-atarismall" + ] + }, + "atavyros.otf" : { + "installed_by" : [ + "fonts-ancient-scripts" + ] + }, + "ataxia.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "ataxiao.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "automati.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "avdira_hint.ttf" : { + "installed_by" : [ + "fonts-ancient-scripts" + ] + }, + "averiagwf-bold.ttf" : { + "installed_by" : [ + "fonts-averia-gwf" + ] + }, + "averiagwf-bolditalic.ttf" : { + "installed_by" : [ + "fonts-averia-gwf" + ] + }, + "averiagwf-gruesa.ttf" : { + "installed_by" : [ + "fonts-averia-gwf" + ] + }, + "averiagwf-italic.ttf" : { + "installed_by" : [ + "fonts-averia-gwf" + ] + }, + "averiagwf-light.ttf" : { + "installed_by" : [ + "fonts-averia-gwf" + ] + }, + "averiagwf-lightitalic.ttf" : { + "installed_by" : [ + "fonts-averia-gwf" + ] + }, + "averiagwf-regular.ttf" : { + "installed_by" : [ + "fonts-averia-gwf" + ] + }, + "averiasansgwf-bold.ttf" : { + "installed_by" : [ + "fonts-averia-sans-gwf" + ] + }, + "averiasansgwf-bolditalic.ttf" : { + "installed_by" : [ + "fonts-averia-sans-gwf" + ] + }, + "averiasansgwf-italic.ttf" : { + "installed_by" : [ + "fonts-averia-sans-gwf" + ] + }, + "averiasansgwf-light.ttf" : { + "installed_by" : [ + "fonts-averia-sans-gwf" + ] + }, + "averiasansgwf-lightitalic.ttf" : { + "installed_by" : [ + "fonts-averia-sans-gwf" + ] + }, + "averiasansgwf-regular.ttf" : { + "installed_by" : [ + "fonts-averia-sans-gwf" + ] + }, + "averiaserifgwf-bold.ttf" : { + "installed_by" : [ + "fonts-averia-serif-gwf" + ] + }, + "averiaserifgwf-bolditalic.ttf" : { + "installed_by" : [ + "fonts-averia-serif-gwf" + ] + }, + "averiaserifgwf-italic.ttf" : { + "installed_by" : [ + "fonts-averia-serif-gwf" + ] + }, + "averiaserifgwf-light.ttf" : { + "installed_by" : [ + "fonts-averia-serif-gwf" + ] + }, + "averiaserifgwf-lightitalic.ttf" : { + "installed_by" : [ + "fonts-averia-serif-gwf" + ] + }, + "averiaserifgwf-regular.ttf" : { + "installed_by" : [ + "fonts-averia-serif-gwf" + ] + }, + "awaminastaliq-regular.ttf" : { + "installed_by" : [ + "fonts-sil-awami-nastaliq" + ] + }, + "ayar.ttf" : { + "installed_by" : [ + "fonts-myanmar" + ] + }, + "b018012d.pfb" : { + "installed_by" : [ + "t1-cyrillic" + ] + }, + "b018015d.pfb" : { + "installed_by" : [ + "t1-cyrillic" + ] + }, + "b018032d.pfb" : { + "installed_by" : [ + "t1-cyrillic" + ] + }, + "b018035d.pfb" : { + "installed_by" : [ + "t1-cyrillic" + ] + }, + "b2sq.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "b2sqol1.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "b2sqol2.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "b612-bold.otf" : { + "installed_by" : [ + "fonts-b612" + ] + }, + "b612-bolditalic.otf" : { + "installed_by" : [ + "fonts-b612" + ] + }, + "b612-italic.otf" : { + "installed_by" : [ + "fonts-b612" + ] + }, + "b612-regular.otf" : { + "installed_by" : [ + "fonts-b612" + ] + }, + "b612mono-bold.otf" : { + "installed_by" : [ + "fonts-b612" + ] + }, + "b612mono-bolditalic.otf" : { + "installed_by" : [ + "fonts-b612" + ] + }, + "b612mono-italic.otf" : { + "installed_by" : [ + "fonts-b612" + ] + }, + "b612mono-regular.otf" : { + "installed_by" : [ + "fonts-b612" + ] + }, + "babeboit.ttf" : { + "installed_by" : [ + "fonts-linex" + ] + }, + "babebold.ttf" : { + "installed_by" : [ + "fonts-linex" + ] + }, + "babelita.ttf" : { + "installed_by" : [ + "fonts-linex" + ] + }, + "babelreg.ttf" : { + "installed_by" : [ + "fonts-linex" + ] + }, + "babelstonehan.ttf" : { + "installed_by" : [ + "fonts-babelstone-han" + ] + }, + "babelstonemodern.ttf" : { + "installed_by" : [ + "fonts-babelstone-modern" + ] + }, + "backlash.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "bajaderka-regular.otf" : { + "installed_by" : [ + "fonts-bajaderka" + ] + }, + "balker.ttf" : { + "installed_by" : [ + "fonts-dustin" + ] + }, + "bandal.ttf" : { + "installed_by" : [ + "fonts-alee" + ] + }, + "bandless.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "bandmess.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "bandwdth.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "bangwool.ttf" : { + "installed_by" : [ + "fonts-alee" + ] + }, + "baskervaldadfstd-bold.otf" : { + "installed_by" : [ + "fonts-adf-baskervald" + ] + }, + "baskervaldadfstd-bolditalic.otf" : { + "installed_by" : [ + "fonts-adf-baskervald" + ] + }, + "baskervaldadfstd-heavy.otf" : { + "installed_by" : [ + "fonts-adf-baskervald" + ] + }, + "baskervaldadfstd-heavyitalic.otf" : { + "installed_by" : [ + "fonts-adf-baskervald" + ] + }, + "baskervaldadfstd-italic.otf" : { + "installed_by" : [ + "fonts-adf-baskervald" + ] + }, + "baskervaldadfstd.otf" : { + "installed_by" : [ + "fonts-adf-baskervald" + ] + }, + "batang.ttf" : { + "installed_by" : [ + "fonts-baekmuk" + ] + }, + "bebasneue-bold.otf" : { + "installed_by" : [ + "fonts-bebas-neue" + ] + }, + "bebasneue-book.otf" : { + "installed_by" : [ + "fonts-bebas-neue" + ] + }, + "bebasneue-light.otf" : { + "installed_by" : [ + "fonts-bebas-neue" + ] + }, + "bebasneue-regular.otf" : { + "installed_by" : [ + "fonts-bebas-neue" + ] + }, + "bebasneue-thin.otf" : { + "installed_by" : [ + "fonts-bebas-neue" + ] + }, + "becausewebuild-regular.otf" : { + "installed_by" : [ + "fonts-bwht" + ] + }, + "becauseweconnect-regular.otf" : { + "installed_by" : [ + "fonts-bwht" + ] + }, + "becausewecreate-regular.otf" : { + "installed_by" : [ + "fonts-bwht" + ] + }, + "becausewelearn-regular.otf" : { + "installed_by" : [ + "fonts-bwht" + ] + }, + "becausewementor-regular.otf" : { + "installed_by" : [ + "fonts-bwht" + ] + }, + "becauseweorganize-regular.otf" : { + "installed_by" : [ + "fonts-bwht" + ] + }, + "bendable.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "berenika-bold.ttf" : { + "installed_by" : [ + "fonts-klaudia-berenika" + ] + }, + "berenika-boldoblique.ttf" : { + "installed_by" : [ + "fonts-klaudia-berenika" + ] + }, + "berenika-oblique.ttf" : { + "installed_by" : [ + "fonts-klaudia-berenika" + ] + }, + "berenika.ttf" : { + "installed_by" : [ + "fonts-klaudia-berenika" + ] + }, + "berenisadfpro-bold.otf" : { + "installed_by" : [ + "fonts-adf-berenis" + ] + }, + "berenisadfpro-bolditalic.otf" : { + "installed_by" : [ + "fonts-adf-berenis" + ] + }, + "berenisadfpro-italic.otf" : { + "installed_by" : [ + "fonts-adf-berenis" + ] + }, + "berenisadfpro-regular.otf" : { + "installed_by" : [ + "fonts-adf-berenis" + ] + }, + "berenisadfpromath-regular.otf" : { + "installed_by" : [ + "fonts-adf-berenis" + ] + }, + "beteckna.ttf" : { + "installed_by" : [ + "fonts-beteckna" + ] + }, + "betecknags-bold.ttf" : { + "installed_by" : [ + "fonts-beteckna" + ] + }, + "betecknags-italic.ttf" : { + "installed_by" : [ + "fonts-beteckna" + ] + }, + "betecknags.ttf" : { + "installed_by" : [ + "fonts-beteckna" + ] + }, + "betecknagscondensed-bold.ttf" : { + "installed_by" : [ + "fonts-beteckna" + ] + }, + "betecknagscondensed-italic.ttf" : { + "installed_by" : [ + "fonts-beteckna" + ] + }, + "bewilder.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "bewildet.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "bin01st.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "binaryt.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "binaryx.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "binchrt.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "binx01s.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "binxchr.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "bitbttf.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "bkai00mp.ttf" : { + "installed_by" : [ + "fonts-arphic-bkai00mp" + ] + }, + "bknuckss.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "bknuckst.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "blackoni.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "blankenburg_unz1a.ttf" : { + "installed_by" : [ + "fonts-blankenburg" + ] + }, + "bleakseg.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "bloktilt.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "blonibld.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "blonirex.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "blox2.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "bmdohyeon_ttf.ttf" : { + "installed_by" : [ + "fonts-woowa-bm" + ] + }, + "bmeuljiro10yearslater.ttf" : { + "installed_by" : [ + "fonts-woowa-bm" + ] + }, + "bmeuljirooraeorae.ttf" : { + "installed_by" : [ + "fonts-woowa-bm" + ] + }, + "bmeuljirottf.ttf" : { + "installed_by" : [ + "fonts-woowa-bm" + ] + }, + "bmhanna_11yrs_ttf.ttf" : { + "installed_by" : [ + "fonts-woowa-bm" + ] + }, + "bmhannaair_ttf.ttf" : { + "installed_by" : [ + "fonts-woowa-bm" + ] + }, + "bmhannapro.ttf" : { + "installed_by" : [ + "fonts-woowa-bm" + ] + }, + "bmjua_ttf.ttf" : { + "installed_by" : [ + "fonts-woowa-bm" + ] + }, + "bmkiranghaerang-ttf.ttf" : { + "installed_by" : [ + "fonts-woowa-bm" + ] + }, + "bmyeonsung_ttf.ttf" : { + "installed_by" : [ + "fonts-woowa-bm" + ] + }, + "bobcayge.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "bobcaygr.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "bocuma.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "bocumaad.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "bocumaba.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "bocumade.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "bocumang.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "booku___.ttf" : { + "installed_by" : [ + "fonts-uralic" + ] + }, + "bookub__.ttf" : { + "installed_by" : [ + "fonts-uralic" + ] + }, + "bookui__.ttf" : { + "installed_by" : [ + "fonts-uralic" + ] + }, + "bpg_algeti_gpl&gnu.ttf" : { + "installed_by" : [ + "fonts-bpg-georgian" + ] + }, + "bpg_chveulebrivi_gpl&gnu.ttf" : { + "installed_by" : [ + "fonts-bpg-georgian" + ] + }, + "bpg_courier_gpl&gnu.ttf" : { + "installed_by" : [ + "fonts-bpg-georgian" + ] + }, + "bpg_courier_s_gpl&gnu.ttf" : { + "installed_by" : [ + "fonts-bpg-georgian" + ] + }, + "bpg_dedeena_block_gpl&gnu.ttf" : { + "installed_by" : [ + "fonts-bpg-georgian" + ] + }, + "bpg_dejavu_sans_2011_gpl-gnu.ttf" : { + "installed_by" : [ + "fonts-bpg-georgian" + ] + }, + "bpg_elite_gpl&gnu.ttf" : { + "installed_by" : [ + "fonts-bpg-georgian" + ] + }, + "bpg_excelsior_caps_gpl&gnu.ttf" : { + "installed_by" : [ + "fonts-bpg-georgian" + ] + }, + "bpg_excelsior_condenced_gpl&gnu.ttf" : { + "installed_by" : [ + "fonts-bpg-georgian" + ] + }, + "bpg_excelsior_gpl&gnu.ttf" : { + "installed_by" : [ + "fonts-bpg-georgian" + ] + }, + "bpg_glaho_gpl&gnu.ttf" : { + "installed_by" : [ + "fonts-bpg-georgian" + ] + }, + "bpg_glaho_gpl&gnu_2011.ttf" : { + "installed_by" : [ + "fonts-bpg-georgian" + ] + }, + "bpg_gorda_gnu-gpl.ttf" : { + "installed_by" : [ + "fonts-bpg-georgian" + ] + }, + "bpg_ingiri_gpl&gnu.ttf" : { + "installed_by" : [ + "fonts-bpg-georgian" + ] + }, + "bpg_mrgvlovani_caps_gnu&gpl.ttf" : { + "installed_by" : [ + "fonts-bpg-georgian" + ] + }, + "bpg_mrgvlovani_gpl&gnu.ttf" : { + "installed_by" : [ + "fonts-bpg-georgian" + ] + }, + "bpg_nateli_caps_gpl&gnu.ttf" : { + "installed_by" : [ + "fonts-bpg-georgian" + ] + }, + "bpg_nateli_condenced_gpl&gnu.ttf" : { + "installed_by" : [ + "fonts-bpg-georgian" + ] + }, + "bpg_nateli_gpl&gnu.ttf" : { + "installed_by" : [ + "fonts-bpg-georgian" + ] + }, + "bpg_nino_medium_cond_gpl&gnu.ttf" : { + "installed_by" : [ + "fonts-bpg-georgian" + ] + }, + "bpg_nino_medium_gpl&gnu.ttf" : { + "installed_by" : [ + "fonts-bpg-georgian" + ] + }, + "bpg_sans_gpl&gnu.ttf" : { + "installed_by" : [ + "fonts-bpg-georgian" + ] + }, + "bpg_sans_medium_gpl&gnu.ttf" : { + "installed_by" : [ + "fonts-bpg-georgian" + ] + }, + "bpg_sans_modern_gpl&gnu.ttf" : { + "installed_by" : [ + "fonts-bpg-georgian" + ] + }, + "bpg_sans_regular_gpl&gnu.ttf" : { + "installed_by" : [ + "fonts-bpg-georgian" + ] + }, + "bpg_serif_gpl&gnu.ttf" : { + "installed_by" : [ + "fonts-bpg-georgian" + ] + }, + "bpg_serif_modern_gpl&gnu.ttf" : { + "installed_by" : [ + "fonts-bpg-georgian" + ] + }, + "brassknu.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "breip.ttf" : { + "installed_by" : [ + "fonts-breip" + ] + }, + "breipfont.ttf" : { + "installed_by" : [ + "fonts-breip" + ] + }, + "brigadom.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "brigadow.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "bsmi00lp.ttf" : { + "installed_by" : [ + "fonts-arphic-bsmi00lp" + ] + }, + "bumped.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "busra-b.ttf" : { + "installed_by" : [ + "fonts-sil-mondulkiri" + ] + }, + "busra-bi.ttf" : { + "installed_by" : [ + "fonts-sil-mondulkiri" + ] + }, + "busra-i.ttf" : { + "installed_by" : [ + "fonts-sil-mondulkiri" + ] + }, + "busra-r.ttf" : { + "installed_by" : [ + "fonts-sil-mondulkiri" + ] + }, + "c-64-regular.ttf" : { + "installed_by" : [ + "fonts-sixtyfour" + ] + }, + "c0419bt_.pfb" : { + "installed_by" : [ + "xfonts-scalable" + ] + }, + "c0582bt_.pfb" : { + "installed_by" : [ + "xfonts-scalable" + ] + }, + "c0583bt_.pfb" : { + "installed_by" : [ + "xfonts-scalable" + ] + }, + "c059-bdita.otf" : { + "installed_by" : [ + "fonts-urw-base35" + ] + }, + "c059-bdita.pfb" : { + "installed_by" : [ + "fonts-urw-base35" + ] + }, + "c059-bold.otf" : { + "installed_by" : [ + "fonts-urw-base35" + ] + }, + "c059-bold.pfb" : { + "installed_by" : [ + "fonts-urw-base35" + ] + }, + "c059-italic.otf" : { + "installed_by" : [ + "fonts-urw-base35" + ] + }, + "c059-italic.pfb" : { + "installed_by" : [ + "fonts-urw-base35" + ] + }, + "c059-roman.otf" : { + "installed_by" : [ + "fonts-urw-base35" + ] + }, + "c059-roman.pfb" : { + "installed_by" : [ + "fonts-urw-base35" + ] + }, + "c059013d.pfb" : { + "installed_by" : [ + "t1-cyrillic" + ] + }, + "c059016d.pfb" : { + "installed_by" : [ + "t1-cyrillic" + ] + }, + "c059033d.pfb" : { + "installed_by" : [ + "t1-cyrillic" + ] + }, + "c059036d.pfb" : { + "installed_by" : [ + "t1-cyrillic" + ] + }, + "c0611bt_.pfb" : { + "installed_by" : [ + "xfonts-scalable" + ] + }, + "c0632bt_.pfb" : { + "installed_by" : [ + "xfonts-scalable" + ] + }, + "c0633bt_.pfb" : { + "installed_by" : [ + "xfonts-scalable" + ] + }, + "c0648bt_.pfb" : { + "installed_by" : [ + "xfonts-scalable" + ] + }, + "c0649bt_.pfb" : { + "installed_by" : [ + "xfonts-scalable" + ] + }, + "cabin-bold.otf" : { + "installed_by" : [ + "fonts-cabin" + ] + }, + "cabin-bolditalic.otf" : { + "installed_by" : [ + "fonts-cabin" + ] + }, + "cabin-italic.otf" : { + "installed_by" : [ + "fonts-cabin" + ] + }, + "cabin-medium.otf" : { + "installed_by" : [ + "fonts-cabin" + ] + }, + "cabin-mediumitalic.otf" : { + "installed_by" : [ + "fonts-cabin" + ] + }, + "cabin-regular.otf" : { + "installed_by" : [ + "fonts-cabin" + ] + }, + "cabin-semibold.otf" : { + "installed_by" : [ + "fonts-cabin" + ] + }, + "cabin-semibolditalic.otf" : { + "installed_by" : [ + "fonts-cabin" + ] + }, + "cabinsketch-bold.ttf" : { + "installed_by" : [ + "fonts-cabinsketch" + ] + }, + "cabinsketch-regular.ttf" : { + "installed_by" : [ + "fonts-cabinsketch" + ] + }, + "caladea-bold.ttf" : { + "installed_by" : [ + "fonts-crosextra-caladea" + ] + }, + "caladea-bolditalic.ttf" : { + "installed_by" : [ + "fonts-crosextra-caladea" + ] + }, + "caladea-italic.ttf" : { + "installed_by" : [ + "fonts-crosextra-caladea" + ] + }, + "caladea-regular.ttf" : { + "installed_by" : [ + "fonts-crosextra-caladea" + ] + }, + "caliban.ttf" : { + "installed_by" : [ + "fonts-georgewilliams" + ] + }, + "campania.otf" : { + "installed_by" : [ + "fonts-campania" + ] + }, + "campania.ttf" : { + "installed_by" : [ + "fonts-campania" + ] + }, + "candystr.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "cantarell-bold.otf" : { + "installed_by" : [ + "fonts-cantarell" + ] + }, + "cantarell-extrabold.otf" : { + "installed_by" : [ + "fonts-cantarell" + ] + }, + "cantarell-light.otf" : { + "installed_by" : [ + "fonts-cantarell" + ] + }, + "cantarell-regular.otf" : { + "installed_by" : [ + "fonts-cantarell" + ] + }, + "cantarell-thin.otf" : { + "installed_by" : [ + "fonts-cantarell" + ] + }, + "cardo104s.ttf" : { + "installed_by" : [ + "fonts-cardo" + ] + }, + "cardob101.ttf" : { + "installed_by" : [ + "fonts-cardo" + ] + }, + "cardoi99.ttf" : { + "installed_by" : [ + "fonts-cardo" + ] + }, + "carlito-bold.ttf" : { + "installed_by" : [ + "fonts-crosextra-carlito" + ] + }, + "carlito-bolditalic.ttf" : { + "installed_by" : [ + "fonts-crosextra-carlito" + ] + }, + "carlito-italic.ttf" : { + "installed_by" : [ + "fonts-crosextra-carlito" + ] + }, + "carlito-regular.ttf" : { + "installed_by" : [ + "fonts-crosextra-carlito" + ] + }, + "cascadiacode.ttf" : { + "installed_by" : [ + "fonts-cascadia-code" + ] + }, + "cascadiacodepl.ttf" : { + "installed_by" : [ + "fonts-cascadia-code" + ] + }, + "cascadiamono.ttf" : { + "installed_by" : [ + "fonts-cascadia-code" + ] + }, + "cascadiamonopl.ttf" : { + "installed_by" : [ + "fonts-cascadia-code" + ] + }, + "caslon-black.ttf" : { + "installed_by" : [ + "fonts-georgewilliams" + ] + }, + "caslonbold.ttf" : { + "installed_by" : [ + "fonts-georgewilliams" + ] + }, + "caslonitalic.ttf" : { + "installed_by" : [ + "fonts-georgewilliams" + ] + }, + "caslonroman.ttf" : { + "installed_by" : [ + "fonts-georgewilliams" + ] + }, + "ccaps.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "ccapshad.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "century-catalogue.ttf" : { + "installed_by" : [ + "fonts-century-catalogue" + ] + }, + "chandas1-2.ttf" : { + "installed_by" : [ + "fonts-deva-extra" + ] + }, + "chanui__.ttf" : { + "installed_by" : [ + "fonts-uralic" + ] + }, + "charissil-bold.ttf" : { + "installed_by" : [ + "fonts-sil-charis" + ] + }, + "charissil-bolditalic.ttf" : { + "installed_by" : [ + "fonts-sil-charis" + ] + }, + "charissil-italic.ttf" : { + "installed_by" : [ + "fonts-sil-charis" + ] + }, + "charissil-regular.ttf" : { + "installed_by" : [ + "fonts-sil-charis" + ] + }, + "charissilcompact-b.ttf" : { + "installed_by" : [ + "fonts-sil-charis-compact" + ] + }, + "charissilcompact-bi.ttf" : { + "installed_by" : [ + "fonts-sil-charis-compact" + ] + }, + "charissilcompact-i.ttf" : { + "installed_by" : [ + "fonts-sil-charis-compact" + ] + }, + "charissilcompact-r.ttf" : { + "installed_by" : [ + "fonts-sil-charis-compact" + ] + }, + "chemrea.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "chemreb.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "cherrybomb-regular.otf" : { + "installed_by" : [ + "fonts-cherrybomb" + ] + }, + "chilanka-regular.otf" : { + "installed_by" : [ + "fonts-smc-chilanka" + ] + }, + "chintzy.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "chintzys.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "chumbly.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "circossymbols.otf" : { + "installed_by" : [ + "fonts-circos-symbols" + ] + }, + "circulat.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "clasict1.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "clasict2.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "claw1.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "claw2.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "clearsans-bold.ttf" : { + "installed_by" : [ + "fonts-clear-sans" + ] + }, + "clearsans-bolditalic.ttf" : { + "installed_by" : [ + "fonts-clear-sans" + ] + }, + "clearsans-italic.ttf" : { + "installed_by" : [ + "fonts-clear-sans" + ] + }, + "clearsans-light.ttf" : { + "installed_by" : [ + "fonts-clear-sans" + ] + }, + "clearsans-medium.ttf" : { + "installed_by" : [ + "fonts-clear-sans" + ] + }, + "clearsans-mediumitalic.ttf" : { + "installed_by" : [ + "fonts-clear-sans" + ] + }, + "clearsans-regular.ttf" : { + "installed_by" : [ + "fonts-clear-sans" + ] + }, + "clearsans-thin.ttf" : { + "installed_by" : [ + "fonts-clear-sans" + ] + }, + "cleavttr.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "cmex10.ttf" : { + "installed_by" : [ + "fonts-lyx" + ] + }, + "cmmi10.ttf" : { + "installed_by" : [ + "fonts-lyx" + ] + }, + "cmr10.ttf" : { + "installed_by" : [ + "fonts-lyx" + ] + }, + "cmsy10.ttf" : { + "installed_by" : [ + "fonts-lyx" + ] + }, + "cmunbbx.ttf" : { + "installed_by" : [ + "fonts-cmu" + ] + }, + "cmunbi.ttf" : { + "installed_by" : [ + "fonts-cmu" + ] + }, + "cmunbl.ttf" : { + "installed_by" : [ + "fonts-cmu" + ] + }, + "cmunbmo.ttf" : { + "installed_by" : [ + "fonts-cmu" + ] + }, + "cmunbmr.ttf" : { + "installed_by" : [ + "fonts-cmu" + ] + }, + "cmunbso.ttf" : { + "installed_by" : [ + "fonts-cmu" + ] + }, + "cmunbsr.ttf" : { + "installed_by" : [ + "fonts-cmu" + ] + }, + "cmunbtl.ttf" : { + "installed_by" : [ + "fonts-cmu" + ] + }, + "cmunbto.ttf" : { + "installed_by" : [ + "fonts-cmu" + ] + }, + "cmunbx.ttf" : { + "installed_by" : [ + "fonts-cmu" + ] + }, + "cmunbxo.ttf" : { + "installed_by" : [ + "fonts-cmu" + ] + }, + "cmunci.ttf" : { + "installed_by" : [ + "fonts-cmu" + ] + }, + "cmunit.ttf" : { + "installed_by" : [ + "fonts-cmu" + ] + }, + "cmunobi.ttf" : { + "installed_by" : [ + "fonts-cmu" + ] + }, + "cmunobx.ttf" : { + "installed_by" : [ + "fonts-cmu" + ] + }, + "cmunorm.ttf" : { + "installed_by" : [ + "fonts-cmu" + ] + }, + "cmunoti.ttf" : { + "installed_by" : [ + "fonts-cmu" + ] + }, + "cmunrb.ttf" : { + "installed_by" : [ + "fonts-cmu" + ] + }, + "cmunrm.ttf" : { + "installed_by" : [ + "fonts-cmu" + ] + }, + "cmunsi.ttf" : { + "installed_by" : [ + "fonts-cmu" + ] + }, + "cmunsl.ttf" : { + "installed_by" : [ + "fonts-cmu" + ] + }, + "cmunso.ttf" : { + "installed_by" : [ + "fonts-cmu" + ] + }, + "cmunss.ttf" : { + "installed_by" : [ + "fonts-cmu" + ] + }, + "cmunssdc.ttf" : { + "installed_by" : [ + "fonts-cmu" + ] + }, + "cmunst.ttf" : { + "installed_by" : [ + "fonts-cmu" + ] + }, + "cmunsx.ttf" : { + "installed_by" : [ + "fonts-cmu" + ] + }, + "cmuntb.ttf" : { + "installed_by" : [ + "fonts-cmu" + ] + }, + "cmunti.ttf" : { + "installed_by" : [ + "fonts-cmu" + ] + }, + "cmuntt.ttf" : { + "installed_by" : [ + "fonts-cmu" + ] + }, + "cmuntx.ttf" : { + "installed_by" : [ + "fonts-cmu" + ] + }, + "cmunui.ttf" : { + "installed_by" : [ + "fonts-cmu" + ] + }, + "cmunvi.ttf" : { + "installed_by" : [ + "fonts-cmu" + ] + }, + "cmunvt.ttf" : { + "installed_by" : [ + "fonts-cmu" + ] + }, + "codelife.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "collecro.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "collecrs.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "collecto.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "collects.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "combusii.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "combuspl.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "combusti.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "combustt.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "combustw.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "comfortaa-bold.ttf" : { + "installed_by" : [ + "fonts-comfortaa" + ] + }, + "comfortaa-light.ttf" : { + "installed_by" : [ + "fonts-comfortaa" + ] + }, + "comfortaa-regular.ttf" : { + "installed_by" : [ + "fonts-comfortaa" + ] + }, + "comicneue-bold.otf" : { + "installed_by" : [ + "fonts-comic-neue" + ] + }, + "comicneue-bolditalic.otf" : { + "installed_by" : [ + "fonts-comic-neue" + ] + }, + "comicneue-italic.otf" : { + "installed_by" : [ + "fonts-comic-neue" + ] + }, + "comicneue-light.otf" : { + "installed_by" : [ + "fonts-comic-neue" + ] + }, + "comicneue-lightitalic.otf" : { + "installed_by" : [ + "fonts-comic-neue" + ] + }, + "comicneue-regular.otf" : { + "installed_by" : [ + "fonts-comic-neue" + ] + }, + "compagnon-bold.otf" : { + "installed_by" : [ + "fonts-compagnon" + ] + }, + "compagnon-italic.otf" : { + "installed_by" : [ + "fonts-compagnon" + ] + }, + "compagnon-light.otf" : { + "installed_by" : [ + "fonts-compagnon" + ] + }, + "compagnon-medium.otf" : { + "installed_by" : [ + "fonts-compagnon" + ] + }, + "compagnon-roman.otf" : { + "installed_by" : [ + "fonts-compagnon" + ] + }, + "compc1o.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "compc1s.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "compc2o.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "compc2s.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "compc3o.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "compc3s.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "conakry.ttf" : { + "installed_by" : [ + "fonts-evertype-conakry" + ] + }, + "condui2i.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "conduit.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "conduit2.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "courier.ttf" : { + "installed_by" : [ + "fonts-wine" + ] + }, + "cousine-bold.ttf" : { + "installed_by" : [ + "fonts-croscore" + ] + }, + "cousine-bolditalic.ttf" : { + "installed_by" : [ + "fonts-croscore" + ] + }, + "cousine-italic.ttf" : { + "installed_by" : [ + "fonts-croscore" + ] + }, + "cousine-regular.ttf" : { + "installed_by" : [ + "fonts-croscore" + ] + }, + "crackdr2.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "cretan_hint.ttf" : { + "installed_by" : [ + "fonts-ancient-scripts" + ] + }, + "crkdownr.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "crkdwno1.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "crkdwno2.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "crystal.ttf" : { + "installed_by" : [ + "fonts-povray" + ] + }, + "cupola.ttf" : { + "installed_by" : [ + "fonts-georgewilliams" + ] + }, + "cwfs.ttf" : { + "installed_by" : [ + "fonts-cwtex-fs" + ] + }, + "cwheib.ttf" : { + "installed_by" : [ + "fonts-cwtex-heib" + ] + }, + "cwkai.ttf" : { + "installed_by" : [ + "fonts-cwtex-kai" + ] + }, + "cwming.ttf" : { + "installed_by" : [ + "fonts-cwtex-ming" + ] + }, + "cwyen.ttf" : { + "installed_by" : [ + "fonts-cwtex-yen" + ] + }, + "cyprominoan_hint.ttf" : { + "installed_by" : [ + "fonts-ancient-scripts" + ] + }, + "cyrvetic.ttf" : { + "installed_by" : [ + "fonts-povray" + ] + }, + "d050000l.otf" : { + "installed_by" : [ + "fonts-urw-base35" + ] + }, + "d050000l.pfb" : { + "installed_by" : [ + "fonts-urw-base35" + ] + }, + "damase.ttf" : { + "installed_by" : [ + "fonts-mph-2b-damase" + ] + }, + "dancingscript-bold.otf" : { + "installed_by" : [ + "fonts-dancingscript" + ] + }, + "dancingscript-regular.otf" : { + "installed_by" : [ + "fonts-dancingscript" + ] + }, + "daniel.otf" : { + "installed_by" : [ + "fonts-ldco" + ] + }, + "daniel.ttf" : { + "installed_by" : [ + "fonts-ldco" + ] + }, + "darkside.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "dashdot.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "dastardl.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "dblayer1.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "dblayer2.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "dblayer3.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "dblayer4.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "dblbogey.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "dbsilbb.ttf" : { + "installed_by" : [ + "fonts-sil-dai-banna" + ] + }, + "dbsilbc.ttf" : { + "installed_by" : [ + "fonts-sil-dai-banna" + ] + }, + "dbsilbo.ttf" : { + "installed_by" : [ + "fonts-sil-dai-banna" + ] + }, + "dbsilbr.ttf" : { + "installed_by" : [ + "fonts-sil-dai-banna" + ] + }, + "dbsillb.ttf" : { + "installed_by" : [ + "fonts-sil-dai-banna" + ] + }, + "dbsillc.ttf" : { + "installed_by" : [ + "fonts-sil-dai-banna" + ] + }, + "dbsillo.ttf" : { + "installed_by" : [ + "fonts-sil-dai-banna" + ] + }, + "dbsillr.ttf" : { + "installed_by" : [ + "fonts-sil-dai-banna" + ] + }, + "dclmarker-black.ttf" : { + "installed_by" : [ + "fonts-dclfonts" + ] + }, + "dclmarker-bold.ttf" : { + "installed_by" : [ + "fonts-dclfonts" + ] + }, + "dclmarker-light.ttf" : { + "installed_by" : [ + "fonts-dclfonts" + ] + }, + "dclmarker-regular.ttf" : { + "installed_by" : [ + "fonts-dclfonts" + ] + }, + "ddc_uchen.ttf" : { + "installed_by" : [ + "fonts-ddc-uchen" + ] + }, + "decrepit.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "dejavumathtexgyre.ttf" : { + "installed_by" : [ + "fonts-dejavu-extra" + ] + }, + "dejavusans-bold.ttf" : { + "installed_by" : [ + "fonts-dejavu-core" + ] + }, + "dejavusans-boldoblique.ttf" : { + "installed_by" : [ + "fonts-dejavu-extra" + ] + }, + "dejavusans-extralight.ttf" : { + "installed_by" : [ + "fonts-dejavu-extra" + ] + }, + "dejavusans-oblique.ttf" : { + "installed_by" : [ + "fonts-dejavu-extra" + ] + }, + "dejavusans.ttf" : { + "installed_by" : [ + "fonts-dejavu-core" + ] + }, + "dejavusanscondensed-bold.ttf" : { + "installed_by" : [ + "fonts-dejavu-extra" + ] + }, + "dejavusanscondensed-boldoblique.ttf" : { + "installed_by" : [ + "fonts-dejavu-extra" + ] + }, + "dejavusanscondensed-oblique.ttf" : { + "installed_by" : [ + "fonts-dejavu-extra" + ] + }, + "dejavusanscondensed.ttf" : { + "installed_by" : [ + "fonts-dejavu-extra" + ] + }, + "dejavusansmono-bold.ttf" : { + "installed_by" : [ + "fonts-dejavu-core" + ] + }, + "dejavusansmono-boldoblique.ttf" : { + "installed_by" : [ + "fonts-dejavu-extra" + ] + }, + "dejavusansmono-oblique.ttf" : { + "installed_by" : [ + "fonts-dejavu-extra" + ] + }, + "dejavusansmono.ttf" : { + "installed_by" : [ + "fonts-dejavu-core" + ] + }, + "dejavuserif-bold.ttf" : { + "installed_by" : [ + "fonts-dejavu-core" + ] + }, + "dejavuserif-bolditalic.ttf" : { + "installed_by" : [ + "fonts-dejavu-extra" + ] + }, + "dejavuserif-italic.ttf" : { + "installed_by" : [ + "fonts-dejavu-extra" + ] + }, + "dejavuserif.ttf" : { + "installed_by" : [ + "fonts-dejavu-core" + ] + }, + "dejavuserifcondensed-bold.ttf" : { + "installed_by" : [ + "fonts-dejavu-extra" + ] + }, + "dejavuserifcondensed-bolditalic.ttf" : { + "installed_by" : [ + "fonts-dejavu-extra" + ] + }, + "dejavuserifcondensed-italic.ttf" : { + "installed_by" : [ + "fonts-dejavu-extra" + ] + }, + "dejavuserifcondensed.ttf" : { + "installed_by" : [ + "fonts-dejavu-extra" + ] + }, + "dejima-mincho-r227.ttf" : { + "installed_by" : [ + "fonts-dejima-mincho" + ] + }, + "delphine.ttf" : { + "installed_by" : [ + "fonts-sjfonts" + ] + }, + "denemo.ttf" : { + "installed_by" : [ + "fonts-denemo" + ] + }, + "dented.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "dephun2.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "detonate.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "dhurjati.ttf" : { + "installed_by" : [ + "fonts-teluguvijayam" + ] + }, + "discorda.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "dkg.ttf" : { + "installed_by" : [ + "fonts-dkg-handwriting" + ] + }, + "dkgbd.ttf" : { + "installed_by" : [ + "fonts-dkg-handwriting" + ] + }, + "dkgbi.ttf" : { + "installed_by" : [ + "fonts-dkg-handwriting" + ] + }, + "dkgit.ttf" : { + "installed_by" : [ + "fonts-dkg-handwriting" + ] + }, + "domestic_manners.ttf" : { + "installed_by" : [ + "fonts-dustin" + ] + }, + "dosis-bold.otf" : { + "installed_by" : [ + "fonts-dosis" + ] + }, + "dosis-book.otf" : { + "installed_by" : [ + "fonts-dosis" + ] + }, + "dosis-extrabold.otf" : { + "installed_by" : [ + "fonts-dosis" + ] + }, + "dosis-extralight.otf" : { + "installed_by" : [ + "fonts-dosis" + ] + }, + "dosis-light.otf" : { + "installed_by" : [ + "fonts-dosis" + ] + }, + "dosis-medium.otf" : { + "installed_by" : [ + "fonts-dosis" + ] + }, + "dosis-semibold.otf" : { + "installed_by" : [ + "fonts-dosis" + ] + }, + "dotgothic16-regular.ttf" : { + "installed_by" : [ + "fonts-dotgothic16" + ] + }, + "dotum.ttf" : { + "installed_by" : [ + "fonts-baekmuk" + ] + }, + "doulossil-regular.ttf" : { + "installed_by" : [ + "fonts-sil-doulos" + ] + }, + "doulossilcompact-r.ttf" : { + "installed_by" : [ + "fonts-sil-doulos-compact" + ] + }, + "draggle.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "draggleo.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "droidsansfallback.ttf" : { + "installed_by" : [ + "fonts-droid-fallback" + ] + }, + "droidsansfallbackfull.ttf" : { + "installed_by" : [ + "fonts-droid-fallback" + ] + }, + "dseg14classic-bold.ttf" : { + "installed_by" : [ + "fonts-dseg" + ] + }, + "dseg14classic-bolditalic.ttf" : { + "installed_by" : [ + "fonts-dseg" + ] + }, + "dseg14classic-italic.ttf" : { + "installed_by" : [ + "fonts-dseg" + ] + }, + "dseg14classic-light.ttf" : { + "installed_by" : [ + "fonts-dseg" + ] + }, + "dseg14classic-lightitalic.ttf" : { + "installed_by" : [ + "fonts-dseg" + ] + }, + "dseg14classic-regular.ttf" : { + "installed_by" : [ + "fonts-dseg" + ] + }, + "dseg14classicmini-bold.ttf" : { + "installed_by" : [ + "fonts-dseg" + ] + }, + "dseg14classicmini-bolditalic.ttf" : { + "installed_by" : [ + "fonts-dseg" + ] + }, + "dseg14classicmini-italic.ttf" : { + "installed_by" : [ + "fonts-dseg" + ] + }, + "dseg14classicmini-light.ttf" : { + "installed_by" : [ + "fonts-dseg" + ] + }, + "dseg14classicmini-lightitalic.ttf" : { + "installed_by" : [ + "fonts-dseg" + ] + }, + "dseg14classicmini-regular.ttf" : { + "installed_by" : [ + "fonts-dseg" + ] + }, + "dseg14modern-bold.ttf" : { + "installed_by" : [ + "fonts-dseg" + ] + }, + "dseg14modern-bolditalic.ttf" : { + "installed_by" : [ + "fonts-dseg" + ] + }, + "dseg14modern-italic.ttf" : { + "installed_by" : [ + "fonts-dseg" + ] + }, + "dseg14modern-light.ttf" : { + "installed_by" : [ + "fonts-dseg" + ] + }, + "dseg14modern-lightitalic.ttf" : { + "installed_by" : [ + "fonts-dseg" + ] + }, + "dseg14modern-regular.ttf" : { + "installed_by" : [ + "fonts-dseg" + ] + }, + "dseg14modernmini-bold.ttf" : { + "installed_by" : [ + "fonts-dseg" + ] + }, + "dseg14modernmini-bolditalic.ttf" : { + "installed_by" : [ + "fonts-dseg" + ] + }, + "dseg14modernmini-italic.ttf" : { + "installed_by" : [ + "fonts-dseg" + ] + }, + "dseg14modernmini-light.ttf" : { + "installed_by" : [ + "fonts-dseg" + ] + }, + "dseg14modernmini-lightitalic.ttf" : { + "installed_by" : [ + "fonts-dseg" + ] + }, + "dseg14modernmini-regular.ttf" : { + "installed_by" : [ + "fonts-dseg" + ] + }, + "dseg7classic-bold.ttf" : { + "installed_by" : [ + "fonts-dseg" + ] + }, + "dseg7classic-bolditalic.ttf" : { + "installed_by" : [ + "fonts-dseg" + ] + }, + "dseg7classic-italic.ttf" : { + "installed_by" : [ + "fonts-dseg" + ] + }, + "dseg7classic-light.ttf" : { + "installed_by" : [ + "fonts-dseg" + ] + }, + "dseg7classic-lightitalic.ttf" : { + "installed_by" : [ + "fonts-dseg" + ] + }, + "dseg7classic-regular.ttf" : { + "installed_by" : [ + "fonts-dseg" + ] + }, + "dseg7classicmini-bold.ttf" : { + "installed_by" : [ + "fonts-dseg" + ] + }, + "dseg7classicmini-bolditalic.ttf" : { + "installed_by" : [ + "fonts-dseg" + ] + }, + "dseg7classicmini-italic.ttf" : { + "installed_by" : [ + "fonts-dseg" + ] + }, + "dseg7classicmini-light.ttf" : { + "installed_by" : [ + "fonts-dseg" + ] + }, + "dseg7classicmini-lightitalic.ttf" : { + "installed_by" : [ + "fonts-dseg" + ] + }, + "dseg7classicmini-regular.ttf" : { + "installed_by" : [ + "fonts-dseg" + ] + }, + "dseg7modern-bold.ttf" : { + "installed_by" : [ + "fonts-dseg" + ] + }, + "dseg7modern-bolditalic.ttf" : { + "installed_by" : [ + "fonts-dseg" + ] + }, + "dseg7modern-italic.ttf" : { + "installed_by" : [ + "fonts-dseg" + ] + }, + "dseg7modern-light.ttf" : { + "installed_by" : [ + "fonts-dseg" + ] + }, + "dseg7modern-lightitalic.ttf" : { + "installed_by" : [ + "fonts-dseg" + ] + }, + "dseg7modern-regular.ttf" : { + "installed_by" : [ + "fonts-dseg" + ] + }, + "dseg7modernmini-bold.ttf" : { + "installed_by" : [ + "fonts-dseg" + ] + }, + "dseg7modernmini-bolditalic.ttf" : { + "installed_by" : [ + "fonts-dseg" + ] + }, + "dseg7modernmini-italic.ttf" : { + "installed_by" : [ + "fonts-dseg" + ] + }, + "dseg7modernmini-light.ttf" : { + "installed_by" : [ + "fonts-dseg" + ] + }, + "dseg7modernmini-lightitalic.ttf" : { + "installed_by" : [ + "fonts-dseg" + ] + }, + "dseg7modernmini-regular.ttf" : { + "installed_by" : [ + "fonts-dseg" + ] + }, + "dseg7seggchan-regular.ttf" : { + "installed_by" : [ + "fonts-dseg" + ] + }, + "dseg7seggchanmini-regular.ttf" : { + "installed_by" : [ + "fonts-dseg" + ] + }, + "dsegweather.ttf" : { + "installed_by" : [ + "fonts-dseg" + ] + }, + "dsrom10.ttf" : { + "installed_by" : [ + "fonts-lyx" + ] + }, + "dustismo.ttf" : { + "installed_by" : [ + "fonts-dustin" + ] + }, + "dustismo_bold.ttf" : { + "installed_by" : [ + "fonts-dustin" + ] + }, + "dustismo_bold_italic.ttf" : { + "installed_by" : [ + "fonts-dustin" + ] + }, + "dustismo_italic.ttf" : { + "installed_by" : [ + "fonts-dustin" + ] + }, + "dustismo_roman.ttf" : { + "installed_by" : [ + "fonts-dustin" + ] + }, + "dustismo_roman_bold.ttf" : { + "installed_by" : [ + "fonts-dustin" + ] + }, + "dustismo_roman_italic.ttf" : { + "installed_by" : [ + "fonts-dustin" + ] + }, + "dustismo_roman_italic_bold.ttf" : { + "installed_by" : [ + "fonts-dustin" + ] + }, + "dynamic.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "dyphusio.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "dystorqu.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "dyuthi-regular.ttf" : { + "installed_by" : [ + "fonts-smc-dyuthi" + ] + }, + "ebgaramond-initials.otf" : { + "installed_by" : [ + "fonts-ebgaramond-extra" + ] + }, + "ebgaramond-initials.ttf" : { + "installed_by" : [ + "fonts-ebgaramond-extra" + ] + }, + "ebgaramond-initialsf1.otf" : { + "installed_by" : [ + "fonts-ebgaramond-extra" + ] + }, + "ebgaramond-initialsf1.ttf" : { + "installed_by" : [ + "fonts-ebgaramond-extra" + ] + }, + "ebgaramond-initialsf2.otf" : { + "installed_by" : [ + "fonts-ebgaramond-extra" + ] + }, + "ebgaramond-initialsf2.ttf" : { + "installed_by" : [ + "fonts-ebgaramond-extra" + ] + }, + "ebgaramond08-italic.otf" : { + "installed_by" : [ + "fonts-ebgaramond" + ] + }, + "ebgaramond08-italic.ttf" : { + "installed_by" : [ + "fonts-ebgaramond-extra" + ] + }, + "ebgaramond08-regular.otf" : { + "installed_by" : [ + "fonts-ebgaramond" + ] + }, + "ebgaramond08-regular.ttf" : { + "installed_by" : [ + "fonts-ebgaramond-extra" + ] + }, + "ebgaramond12-allsc.otf" : { + "installed_by" : [ + "fonts-ebgaramond-extra" + ] + }, + "ebgaramond12-allsc.ttf" : { + "installed_by" : [ + "fonts-ebgaramond-extra" + ] + }, + "ebgaramond12-bold.otf" : { + "installed_by" : [ + "fonts-ebgaramond" + ] + }, + "ebgaramond12-bold.ttf" : { + "installed_by" : [ + "fonts-ebgaramond-extra" + ] + }, + "ebgaramond12-italic.otf" : { + "installed_by" : [ + "fonts-ebgaramond" + ] + }, + "ebgaramond12-italic.ttf" : { + "installed_by" : [ + "fonts-ebgaramond-extra" + ] + }, + "ebgaramond12-regular.otf" : { + "installed_by" : [ + "fonts-ebgaramond" + ] + }, + "ebgaramond12-regular.ttf" : { + "installed_by" : [ + "fonts-ebgaramond-extra" + ] + }, + "ebgaramondsc08-regular.otf" : { + "installed_by" : [ + "fonts-ebgaramond-extra" + ] + }, + "ebgaramondsc08-regular.ttf" : { + "installed_by" : [ + "fonts-ebgaramond-extra" + ] + }, + "ebgaramondsc12-regular.otf" : { + "installed_by" : [ + "fonts-ebgaramond-extra" + ] + }, + "ebgaramondsc12-regular.ttf" : { + "installed_by" : [ + "fonts-ebgaramond-extra" + ] + }, + "ecliptic.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "eco.otf" : { + "installed_by" : [ + "fonts-ldco" + ] + }, + "eco.ttf" : { + "installed_by" : [ + "fonts-ldco" + ] + }, + "ecolier-court.ttf" : { + "installed_by" : [ + "fonts-ecolier-court" + ] + }, + "ecolier-lignes-court.ttf" : { + "installed_by" : [ + "fonts-ecolier-lignes-court" + ] + }, + "editundo.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "edundot.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "edunline.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "eeyek.ttf" : { + "installed_by" : [ + "fonts-eeyek" + ] + }, + "el_abogado_loco.ttf" : { + "installed_by" : [ + "fonts-dustin" + ] + }, + "elegbold.ttf" : { + "installed_by" : [ + "fonts-linex" + ] + }, + "elegital.ttf" : { + "installed_by" : [ + "fonts-linex" + ] + }, + "elleboli.ttf" : { + "installed_by" : [ + "fonts-linex" + ] + }, + "ellenbold.ttf" : { + "installed_by" : [ + "fonts-linex" + ] + }, + "ellenike.ttf" : { + "installed_by" : [ + "fonts-linex" + ] + }, + "ellenita.ttf" : { + "installed_by" : [ + "fonts-linex" + ] + }, + "elsewhe2.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "elsewher.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "elstob-10pt.otf" : { + "installed_by" : [ + "fonts-elstob" + ] + }, + "elstob-10ptbold.otf" : { + "installed_by" : [ + "fonts-elstob" + ] + }, + "elstob-10ptbolditalic.otf" : { + "installed_by" : [ + "fonts-elstob" + ] + }, + "elstob-10ptitalic.otf" : { + "installed_by" : [ + "fonts-elstob" + ] + }, + "elstob-10ptmedium.otf" : { + "installed_by" : [ + "fonts-elstob" + ] + }, + "elstob-10ptmediumitalic.otf" : { + "installed_by" : [ + "fonts-elstob" + ] + }, + "elstob-10ptsemibold.otf" : { + "installed_by" : [ + "fonts-elstob" + ] + }, + "elstob-10ptsemibolditalic.otf" : { + "installed_by" : [ + "fonts-elstob" + ] + }, + "elstob-14pt.otf" : { + "installed_by" : [ + "fonts-elstob" + ] + }, + "elstob-14ptbold.otf" : { + "installed_by" : [ + "fonts-elstob" + ] + }, + "elstob-14ptbolditalic.otf" : { + "installed_by" : [ + "fonts-elstob" + ] + }, + "elstob-14ptitalic.otf" : { + "installed_by" : [ + "fonts-elstob" + ] + }, + "elstob-14ptmedium.otf" : { + "installed_by" : [ + "fonts-elstob" + ] + }, + "elstob-14ptmediumitalic.otf" : { + "installed_by" : [ + "fonts-elstob" + ] + }, + "elstob-14ptsemibold.otf" : { + "installed_by" : [ + "fonts-elstob" + ] + }, + "elstob-14ptsemibolditalic.otf" : { + "installed_by" : [ + "fonts-elstob" + ] + }, + "elstob-18pt.otf" : { + "installed_by" : [ + "fonts-elstob" + ] + }, + "elstob-18ptbold.otf" : { + "installed_by" : [ + "fonts-elstob" + ] + }, + "elstob-18ptbolditalic.otf" : { + "installed_by" : [ + "fonts-elstob" + ] + }, + "elstob-18ptextrabold.otf" : { + "installed_by" : [ + "fonts-elstob" + ] + }, + "elstob-18ptextrabolditalic.otf" : { + "installed_by" : [ + "fonts-elstob" + ] + }, + "elstob-18ptitalic.otf" : { + "installed_by" : [ + "fonts-elstob" + ] + }, + "elstob-18ptmedium.otf" : { + "installed_by" : [ + "fonts-elstob" + ] + }, + "elstob-18ptmediumitalic.otf" : { + "installed_by" : [ + "fonts-elstob" + ] + }, + "elstob-18ptsemibold.otf" : { + "installed_by" : [ + "fonts-elstob" + ] + }, + "elstob-18ptsemibolditalic.otf" : { + "installed_by" : [ + "fonts-elstob" + ] + }, + "elstob-6pt.otf" : { + "installed_by" : [ + "fonts-elstob" + ] + }, + "elstob-6ptbold.otf" : { + "installed_by" : [ + "fonts-elstob" + ] + }, + "elstob-6ptbolditalic.otf" : { + "installed_by" : [ + "fonts-elstob" + ] + }, + "elstob-6ptitalic.otf" : { + "installed_by" : [ + "fonts-elstob" + ] + }, + "elstob-6ptmedium.otf" : { + "installed_by" : [ + "fonts-elstob" + ] + }, + "elstob-6ptmediumitalic.otf" : { + "installed_by" : [ + "fonts-elstob" + ] + }, + "elstob-6ptsemibold.otf" : { + "installed_by" : [ + "fonts-elstob" + ] + }, + "elstob-6ptsemibolditalic.otf" : { + "installed_by" : [ + "fonts-elstob" + ] + }, + "elstob-8pt.otf" : { + "installed_by" : [ + "fonts-elstob" + ] + }, + "elstob-8ptbold.otf" : { + "installed_by" : [ + "fonts-elstob" + ] + }, + "elstob-8ptbolditalic.otf" : { + "installed_by" : [ + "fonts-elstob" + ] + }, + "elstob-8ptitalic.otf" : { + "installed_by" : [ + "fonts-elstob" + ] + }, + "elstob-8ptmedium.otf" : { + "installed_by" : [ + "fonts-elstob" + ] + }, + "elstob-8ptmediumitalic.otf" : { + "installed_by" : [ + "fonts-elstob" + ] + }, + "elstob-8ptsemibold.otf" : { + "installed_by" : [ + "fonts-elstob" + ] + }, + "elstob-8ptsemibolditalic.otf" : { + "installed_by" : [ + "fonts-elstob" + ] + }, + "elstob-bold.otf" : { + "installed_by" : [ + "fonts-elstob" + ] + }, + "elstob-bolditalic.otf" : { + "installed_by" : [ + "fonts-elstob" + ] + }, + "elstob-extrabold.otf" : { + "installed_by" : [ + "fonts-elstob" + ] + }, + "elstob-extrabolditalic.otf" : { + "installed_by" : [ + "fonts-elstob" + ] + }, + "elstob-extralight.otf" : { + "installed_by" : [ + "fonts-elstob" + ] + }, + "elstob-extralightitalic.otf" : { + "installed_by" : [ + "fonts-elstob" + ] + }, + "elstob-grade.otf" : { + "installed_by" : [ + "fonts-elstob" + ] + }, + "elstob-gradeitalic.otf" : { + "installed_by" : [ + "fonts-elstob" + ] + }, + "elstob-italic.otf" : { + "installed_by" : [ + "fonts-elstob" + ] + }, + "elstob-light.otf" : { + "installed_by" : [ + "fonts-elstob" + ] + }, + "elstob-lightitalic.otf" : { + "installed_by" : [ + "fonts-elstob" + ] + }, + "elstob-medium.otf" : { + "installed_by" : [ + "fonts-elstob" + ] + }, + "elstob-mediumitalic.otf" : { + "installed_by" : [ + "fonts-elstob" + ] + }, + "elstob-regular.otf" : { + "installed_by" : [ + "fonts-elstob" + ] + }, + "elstob-semibold.otf" : { + "installed_by" : [ + "fonts-elstob" + ] + }, + "elstob-semibolditalic.otf" : { + "installed_by" : [ + "fonts-elstob" + ] + }, + "elusiveicons-webfont.ttf" : { + "installed_by" : [ + "fonts-elusive-icons", + "fonts-elusive-icons" + ] + }, + "embosst1.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "embosst2.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "embosst3.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "emerita_latina.ttf" : { + "installed_by" : [ + "fonts-linex" + ] + }, + "emmentaler.ttf" : { + "installed_by" : [ + "fonts-denemo" + ] + }, + "encappln.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "encapsul.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "engadget.ttf" : { + "installed_by" : [ + "fonts-engadget" + ] + }, + "entangle.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "enthuse.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "enthuses.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "entlayra.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "entlayrb.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "entplain.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "entypo.ttf" : { + "installed_by" : [ + "fonts-entypo" + ] + }, + "esint10.ttf" : { + "installed_by" : [ + "fonts-lyx" + ] + }, + "essays1743-bold.ttf" : { + "installed_by" : [ + "fonts-essays1743" + ] + }, + "essays1743-bolditalic.ttf" : { + "installed_by" : [ + "fonts-essays1743" + ] + }, + "essays1743-italic.ttf" : { + "installed_by" : [ + "fonts-essays1743" + ] + }, + "essays1743.ttf" : { + "installed_by" : [ + "fonts-essays1743" + ] + }, + "eufm10.ttf" : { + "installed_by" : [ + "fonts-lyx" + ] + }, + "eunjin.ttf" : { + "installed_by" : [ + "fonts-alee" + ] + }, + "eunjinnakseo.ttf" : { + "installed_by" : [ + "fonts-alee" + ] + }, + "euphor3d.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "euphoric.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "eurof35.ttf" : { + "installed_by" : [ + "fonts-eurofurence" + ] + }, + "eurof36.ttf" : { + "installed_by" : [ + "fonts-eurofurence" + ] + }, + "eurof55.ttf" : { + "installed_by" : [ + "fonts-eurofurence" + ] + }, + "eurof56.ttf" : { + "installed_by" : [ + "fonts-eurofurence" + ] + }, + "eurof75.ttf" : { + "installed_by" : [ + "fonts-eurofurence" + ] + }, + "eurof76.ttf" : { + "installed_by" : [ + "fonts-eurofurence" + ] + }, + "eurofc35.ttf" : { + "installed_by" : [ + "fonts-eurofurence" + ] + }, + "eurofc36.ttf" : { + "installed_by" : [ + "fonts-eurofurence" + ] + }, + "eurofc55.ttf" : { + "installed_by" : [ + "fonts-eurofurence" + ] + }, + "eurofc56.ttf" : { + "installed_by" : [ + "fonts-eurofurence" + ] + }, + "eurofc75.ttf" : { + "installed_by" : [ + "fonts-eurofurence" + ] + }, + "eurofc76.ttf" : { + "installed_by" : [ + "fonts-eurofurence" + ] + }, + "euterpe.ttf" : { + "installed_by" : [ + "fonts-oflb-euterpe" + ] + }, + "exagger8.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "extracti.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "f500.ttf" : { + "installed_by" : [ + "fonts-f500" + ] + }, + "falsepos.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "falsposr.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "fantasma-bold.otf" : { + "installed_by" : [ + "fonts-fantasma" + ] + }, + "fantasquesansmono-bold.otf" : { + "installed_by" : [ + "fonts-fantasque-sans", + "fonts-fantasque-sans", + "fonts-fantasque-sans", + "fonts-fantasque-sans" + ] + }, + "fantasquesansmono-bold.ttf" : { + "installed_by" : [ + "fonts-fantasque-sans", + "fonts-fantasque-sans", + "fonts-fantasque-sans", + "fonts-fantasque-sans" + ] + }, + "fantasquesansmono-bolditalic.otf" : { + "installed_by" : [ + "fonts-fantasque-sans", + "fonts-fantasque-sans", + "fonts-fantasque-sans", + "fonts-fantasque-sans" + ] + }, + "fantasquesansmono-bolditalic.ttf" : { + "installed_by" : [ + "fonts-fantasque-sans", + "fonts-fantasque-sans", + "fonts-fantasque-sans", + "fonts-fantasque-sans" + ] + }, + "fantasquesansmono-italic.otf" : { + "installed_by" : [ + "fonts-fantasque-sans", + "fonts-fantasque-sans", + "fonts-fantasque-sans", + "fonts-fantasque-sans" + ] + }, + "fantasquesansmono-italic.ttf" : { + "installed_by" : [ + "fonts-fantasque-sans", + "fonts-fantasque-sans", + "fonts-fantasque-sans", + "fonts-fantasque-sans" + ] + }, + "fantasquesansmono-regular.otf" : { + "installed_by" : [ + "fonts-fantasque-sans", + "fonts-fantasque-sans", + "fonts-fantasque-sans", + "fonts-fantasque-sans" + ] + }, + "fantasquesansmono-regular.ttf" : { + "installed_by" : [ + "fonts-fantasque-sans", + "fonts-fantasque-sans", + "fonts-fantasque-sans", + "fonts-fantasque-sans" + ] + }, + "fantuwua.ttf" : { + "installed_by" : [ + "fonts-senamirmir-washra" + ] + }, + "fanwood-italic.otf" : { + "installed_by" : [ + "fonts-fanwood" + ] + }, + "fanwood.otf" : { + "installed_by" : [ + "fonts-fanwood" + ] + }, + "fanwoodtext-italic.otf" : { + "installed_by" : [ + "fonts-fanwood" + ] + }, + "fanwoodtext.otf" : { + "installed_by" : [ + "fonts-fanwood" + ] + }, + "fascii.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "fasciicr.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "fasciisc.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "fasciism.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "fasciitw.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "fauxsnow.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "fbsbltc.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "fbsbltc2.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "femkeklaver.ttf" : { + "installed_by" : [ + "fonts-femkeklaver" + ] + }, + "feta.ttf" : { + "installed_by" : [ + "fonts-denemo" + ] + }, + "fetteclassicunzfraktur.ttf" : { + "installed_by" : [ + "fonts-cegui" + ] + }, + "fidgety.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "firacode-bold.ttf" : { + "installed_by" : [ + "fonts-firacode" + ] + }, + "firacode-light.ttf" : { + "installed_by" : [ + "fonts-firacode" + ] + }, + "firacode-medium.ttf" : { + "installed_by" : [ + "fonts-firacode" + ] + }, + "firacode-regular.ttf" : { + "installed_by" : [ + "fonts-firacode" + ] + }, + "firacode-retina.ttf" : { + "installed_by" : [ + "fonts-firacode" + ] + }, + "firacode-semibold.ttf" : { + "installed_by" : [ + "fonts-firacode" + ] + }, + "fixedsys.ttf" : { + "installed_by" : [ + "fonts-wine" + ] + }, + "fixedsys_jp.ttf" : { + "installed_by" : [ + "fonts-wine" + ] + }, + "flatline.ttf" : { + "installed_by" : [ + "fonts-dustin" + ] + }, + "flipside.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "fontawesome-webfont.ttf" : { + "installed_by" : [ + "fonts-font-awesome", + "fonts-font-awesome" + ] + }, + "fontawesome.otf" : { + "installed_by" : [ + "fonts-font-awesome", + "fonts-font-awesome" + ] + }, + "fonts-sambhota-tsugring.otf" : { + "installed_by" : [ + "fonts-sambhota-tsugring" + ] + }, + "forcible.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "forkawesome-webfont.ttf" : { + "installed_by" : [ + "fonts-fork-awesome", + "fonts-fork-awesome" + ] + }, + "freaktur.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "freefarsi-bold.ttf" : { + "installed_by" : [ + "fonts-freefarsi" + ] + }, + "freefarsi-bolditalic.ttf" : { + "installed_by" : [ + "fonts-freefarsi" + ] + }, + "freefarsi-italic.ttf" : { + "installed_by" : [ + "fonts-freefarsi" + ] + }, + "freefarsi-mono.ttf" : { + "installed_by" : [ + "fonts-freefarsi" + ] + }, + "freefarsi.ttf" : { + "installed_by" : [ + "fonts-freefarsi" + ] + }, + "freemono.otf" : { + "installed_by" : [ + "fonts-freefont-otf" + ] + }, + "freemono.ttf" : { + "installed_by" : [ + "fonts-freefont-ttf" + ] + }, + "freemonobold.otf" : { + "installed_by" : [ + "fonts-freefont-otf" + ] + }, + "freemonobold.ttf" : { + "installed_by" : [ + "fonts-freefont-ttf" + ] + }, + "freemonoboldoblique.otf" : { + "installed_by" : [ + "fonts-freefont-otf" + ] + }, + "freemonoboldoblique.ttf" : { + "installed_by" : [ + "fonts-freefont-ttf" + ] + }, + "freemonooblique.otf" : { + "installed_by" : [ + "fonts-freefont-otf" + ] + }, + "freemonooblique.ttf" : { + "installed_by" : [ + "fonts-freefont-ttf" + ] + }, + "freesans.otf" : { + "installed_by" : [ + "fonts-freefont-otf" + ] + }, + "freesans.ttf" : { + "installed_by" : [ + "fonts-freefont-ttf" + ] + }, + "freesansbold.otf" : { + "installed_by" : [ + "fonts-freefont-otf" + ] + }, + "freesansbold.ttf" : { + "installed_by" : [ + "fonts-freefont-ttf" + ] + }, + "freesansboldoblique.otf" : { + "installed_by" : [ + "fonts-freefont-otf" + ] + }, + "freesansboldoblique.ttf" : { + "installed_by" : [ + "fonts-freefont-ttf" + ] + }, + "freesansoblique.otf" : { + "installed_by" : [ + "fonts-freefont-otf" + ] + }, + "freesansoblique.ttf" : { + "installed_by" : [ + "fonts-freefont-ttf" + ] + }, + "freeserif.otf" : { + "installed_by" : [ + "fonts-freefont-otf" + ] + }, + "freeserif.ttf" : { + "installed_by" : [ + "fonts-freefont-ttf" + ] + }, + "freeserifbold.otf" : { + "installed_by" : [ + "fonts-freefont-otf" + ] + }, + "freeserifbold.ttf" : { + "installed_by" : [ + "fonts-freefont-ttf" + ] + }, + "freeserifbolditalic.otf" : { + "installed_by" : [ + "fonts-freefont-otf" + ] + }, + "freeserifbolditalic.ttf" : { + "installed_by" : [ + "fonts-freefont-ttf" + ] + }, + "freeserifitalic.otf" : { + "installed_by" : [ + "fonts-freefont-otf" + ] + }, + "freeserifitalic.ttf" : { + "installed_by" : [ + "fonts-freefont-ttf" + ] + }, + "frizzed.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "fullcomp.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "fust&schoeffer-durandus-goticoantiqua118g.otf" : { + "installed_by" : [ + "fonts-gotico-antiqua" + ] + }, + "futharkadapted.ttf" : { + "installed_by" : [ + "fonts-cegui" + ] + }, + "galapogo.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "galsilb.ttf" : { + "installed_by" : [ + "fonts-sil-galatia" + ] + }, + "galsilr.ttf" : { + "installed_by" : [ + "fonts-sil-galatia" + ] + }, + "galvaniz.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "gamaliel.ttf" : { + "installed_by" : [ + "fonts-gamaliel" + ] + }, + "gaposiso.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "gaposiss.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "gardiner_hint.ttf" : { + "installed_by" : [ + "fonts-ancient-scripts" + ] + }, + "gargi.ttf" : { + "installed_by" : [ + "fonts-gargi" + ] + }, + "garuda-bold.otf" : { + "installed_by" : [ + "fonts-tlwg-garuda-otf" + ] + }, + "garuda-bold.ttf" : { + "installed_by" : [ + "fonts-tlwg-garuda-ttf" + ] + }, + "garuda-boldoblique.otf" : { + "installed_by" : [ + "fonts-tlwg-garuda-otf" + ] + }, + "garuda-boldoblique.ttf" : { + "installed_by" : [ + "fonts-tlwg-garuda-ttf" + ] + }, + "garuda-oblique.otf" : { + "installed_by" : [ + "fonts-tlwg-garuda-otf" + ] + }, + "garuda-oblique.ttf" : { + "installed_by" : [ + "fonts-tlwg-garuda-ttf" + ] + }, + "garuda.otf" : { + "installed_by" : [ + "fonts-tlwg-garuda-otf" + ] + }, + "garuda.ttf" : { + "installed_by" : [ + "fonts-tlwg-garuda-ttf" + ] + }, + "gasping.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "gather.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "gathrgap.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "gayathri-bold.otf" : { + "installed_by" : [ + "fonts-smc-gayathri" + ] + }, + "gayathri-regular.otf" : { + "installed_by" : [ + "fonts-smc-gayathri" + ] + }, + "gayathri-thin.otf" : { + "installed_by" : [ + "fonts-smc-gayathri" + ] + }, + "gbsn00lp.ttf" : { + "installed_by" : [ + "fonts-arphic-gbsn00lp" + ] + }, + "gemunulibre-bold.otf" : { + "installed_by" : [ + "fonts-gemunu-libre" + ] + }, + "gemunulibre-extrabold.otf" : { + "installed_by" : [ + "fonts-gemunu-libre" + ] + }, + "gemunulibre-extralight.otf" : { + "installed_by" : [ + "fonts-gemunu-libre" + ] + }, + "gemunulibre-light.otf" : { + "installed_by" : [ + "fonts-gemunu-libre" + ] + }, + "gemunulibre-medium.otf" : { + "installed_by" : [ + "fonts-gemunu-libre" + ] + }, + "gemunulibre-regular.otf" : { + "installed_by" : [ + "fonts-gemunu-libre" + ] + }, + "gemunulibre-semibold.otf" : { + "installed_by" : [ + "fonts-gemunu-libre" + ] + }, + "genbasb.ttf" : { + "installed_by" : [ + "fonts-sil-gentium-basic" + ] + }, + "genbasbi.ttf" : { + "installed_by" : [ + "fonts-sil-gentium-basic" + ] + }, + "genbasi.ttf" : { + "installed_by" : [ + "fonts-sil-gentium-basic" + ] + }, + "genbasr.ttf" : { + "installed_by" : [ + "fonts-sil-gentium-basic" + ] + }, + "genbkbasb.ttf" : { + "installed_by" : [ + "fonts-sil-gentium-basic" + ] + }, + "genbkbasbi.ttf" : { + "installed_by" : [ + "fonts-sil-gentium-basic" + ] + }, + "genbkbasi.ttf" : { + "installed_by" : [ + "fonts-sil-gentium-basic" + ] + }, + "genbkbasr.ttf" : { + "installed_by" : [ + "fonts-sil-gentium-basic" + ] + }, + "genotyph.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "genotyps.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "genotyrh.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "genotyrs.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "gentium-i.ttf" : { + "installed_by" : [ + "fonts-sil-gentium" + ] + }, + "gentium-r.ttf" : { + "installed_by" : [ + "fonts-sil-gentium" + ] + }, + "gentiumalt-i.ttf" : { + "installed_by" : [ + "fonts-sil-gentium" + ] + }, + "gentiumalt-r.ttf" : { + "installed_by" : [ + "fonts-sil-gentium" + ] + }, + "gentiumbookplus-bold.ttf" : { + "installed_by" : [ + "fonts-sil-gentiumplus" + ] + }, + "gentiumbookplus-bolditalic.ttf" : { + "installed_by" : [ + "fonts-sil-gentiumplus" + ] + }, + "gentiumbookplus-italic.ttf" : { + "installed_by" : [ + "fonts-sil-gentiumplus" + ] + }, + "gentiumbookplus-regular.ttf" : { + "installed_by" : [ + "fonts-sil-gentiumplus" + ] + }, + "gentiumplus-bold.ttf" : { + "installed_by" : [ + "fonts-sil-gentiumplus" + ] + }, + "gentiumplus-bolditalic.ttf" : { + "installed_by" : [ + "fonts-sil-gentiumplus" + ] + }, + "gentiumplus-italic.ttf" : { + "installed_by" : [ + "fonts-sil-gentiumplus" + ] + }, + "gentiumplus-regular.ttf" : { + "installed_by" : [ + "fonts-sil-gentiumplus" + ] + }, + "gentiumpluscompact-i.ttf" : { + "installed_by" : [ + "fonts-sil-gentiumplus-compact" + ] + }, + "gentiumpluscompact-r.ttf" : { + "installed_by" : [ + "fonts-sil-gentiumplus-compact" + ] + }, + "gesture.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "gestures.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "gesturet.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "gesturts.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "gfsartemisia.otf" : { + "installed_by" : [ + "fonts-gfs-artemisia" + ] + }, + "gfsartemisiabold.otf" : { + "installed_by" : [ + "fonts-gfs-artemisia" + ] + }, + "gfsartemisiaboldit.otf" : { + "installed_by" : [ + "fonts-gfs-artemisia" + ] + }, + "gfsartemisiait.otf" : { + "installed_by" : [ + "fonts-gfs-artemisia" + ] + }, + "gfsbaskerville.otf" : { + "installed_by" : [ + "fonts-gfs-baskerville" + ] + }, + "gfsbodoniclassic.otf" : { + "installed_by" : [ + "fonts-gfs-bodoni-classic" + ] + }, + "gfsdidot.otf" : { + "installed_by" : [ + "fonts-gfs-didot" + ] + }, + "gfsdidotbold.otf" : { + "installed_by" : [ + "fonts-gfs-didot" + ] + }, + "gfsdidotbolditalic.otf" : { + "installed_by" : [ + "fonts-gfs-didot" + ] + }, + "gfsdidotclassic.otf" : { + "installed_by" : [ + "fonts-gfs-didot-classic" + ] + }, + "gfsdidotitalic.otf" : { + "installed_by" : [ + "fonts-gfs-didot" + ] + }, + "gfsgazis.otf" : { + "installed_by" : [ + "fonts-gfs-gazis" + ] + }, + "gfsneohellenic.otf" : { + "installed_by" : [ + "fonts-gfs-neohellenic" + ] + }, + "gfsneohellenicbold.otf" : { + "installed_by" : [ + "fonts-gfs-neohellenic" + ] + }, + "gfsneohellenicboldit.otf" : { + "installed_by" : [ + "fonts-gfs-neohellenic" + ] + }, + "gfsneohellenicit.otf" : { + "installed_by" : [ + "fonts-gfs-neohellenic" + ] + }, + "gfsolga.otf" : { + "installed_by" : [ + "fonts-gfs-olga" + ] + }, + "gfspolyglot.otf" : { + "installed_by" : [ + "fonts-gfs-complutum" + ] + }, + "gfsporson.otf" : { + "installed_by" : [ + "fonts-gfs-porson" + ] + }, + "gfssolomos.otf" : { + "installed_by" : [ + "fonts-gfs-solomos" + ] + }, + "gfstheokritos.otf" : { + "installed_by" : [ + "fonts-gfs-theokritos" + ] + }, + "gidugu.ttf" : { + "installed_by" : [ + "fonts-teluguvijayam" + ] + }, + "gilliusadf-bold.otf" : { + "installed_by" : [ + "fonts-adf-gillius" + ] + }, + "gilliusadf-boldcond.otf" : { + "installed_by" : [ + "fonts-adf-gillius" + ] + }, + "gilliusadf-boldconditalic.otf" : { + "installed_by" : [ + "fonts-adf-gillius" + ] + }, + "gilliusadf-bolditalic.otf" : { + "installed_by" : [ + "fonts-adf-gillius" + ] + }, + "gilliusadf-cond.otf" : { + "installed_by" : [ + "fonts-adf-gillius" + ] + }, + "gilliusadf-conditalic.otf" : { + "installed_by" : [ + "fonts-adf-gillius" + ] + }, + "gilliusadf-italic.otf" : { + "installed_by" : [ + "fonts-adf-gillius" + ] + }, + "gilliusadf-regular.otf" : { + "installed_by" : [ + "fonts-adf-gillius" + ] + }, + "gilliusadfno2-bold.otf" : { + "installed_by" : [ + "fonts-adf-gillius" + ] + }, + "gilliusadfno2-boldcond.otf" : { + "installed_by" : [ + "fonts-adf-gillius" + ] + }, + "gilliusadfno2-boldconditalic.otf" : { + "installed_by" : [ + "fonts-adf-gillius" + ] + }, + "gilliusadfno2-bolditalic.otf" : { + "installed_by" : [ + "fonts-adf-gillius" + ] + }, + "gilliusadfno2-cond.otf" : { + "installed_by" : [ + "fonts-adf-gillius" + ] + }, + "gilliusadfno2-conditalic.otf" : { + "installed_by" : [ + "fonts-adf-gillius" + ] + }, + "gilliusadfno2-italic.otf" : { + "installed_by" : [ + "fonts-adf-gillius" + ] + }, + "gilliusadfno2-regular.otf" : { + "installed_by" : [ + "fonts-adf-gillius" + ] + }, + "gkai00mp.ttf" : { + "installed_by" : [ + "fonts-arphic-gkai00mp" + ] + }, + "glass_tty_vt220.ttf" : { + "installed_by" : [ + "fonts-glasstty" + ] + }, + "glyphicons-halflings-regular.ttf" : { + "installed_by" : [ + "fonts-glyphicons-halflings", + "fonts-glyphicons-halflings" + ] + }, + "gnutypewriter.ttf" : { + "installed_by" : [ + "fonts-gnutypewriter" + ] + }, + "go-bold-italic.ttf" : { + "installed_by" : [ + "fonts-go" + ] + }, + "go-bold.ttf" : { + "installed_by" : [ + "fonts-go" + ] + }, + "go-italic.ttf" : { + "installed_by" : [ + "fonts-go" + ] + }, + "go-medium-italic.ttf" : { + "installed_by" : [ + "fonts-go" + ] + }, + "go-medium.ttf" : { + "installed_by" : [ + "fonts-go" + ] + }, + "go-mono-bold-italic.ttf" : { + "installed_by" : [ + "fonts-go" + ] + }, + "go-mono-bold.ttf" : { + "installed_by" : [ + "fonts-go" + ] + }, + "go-mono-italic.ttf" : { + "installed_by" : [ + "fonts-go" + ] + }, + "go-mono.ttf" : { + "installed_by" : [ + "fonts-go" + ] + }, + "go-regular.ttf" : { + "installed_by" : [ + "fonts-go" + ] + }, + "go-smallcaps-italic.ttf" : { + "installed_by" : [ + "fonts-go" + ] + }, + "go-smallcaps.ttf" : { + "installed_by" : [ + "fonts-go" + ] + }, + "goffer.ttf" : { + "installed_by" : [ + "fonts-senamirmir-washra" + ] + }, + "gosebmp2.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "gosebmps.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "gothu___.ttf" : { + "installed_by" : [ + "fonts-uralic" + ] + }, + "gothub__.ttf" : { + "installed_by" : [ + "fonts-uralic" + ] + }, + "goudybookletter1911.otf" : { + "installed_by" : [ + "fonts-goudybookletter" + ] + }, + "gr8higts.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "granular.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "grapple.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "graveyrd.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "graviseg.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "gravitat.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "graze.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "greatvibes-regular.ttf" : { + "installed_by" : [ + "fonts-cegui" + ] + }, + "grotesq.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "grudge.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "grudge2.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "gubbi.ttf" : { + "installed_by" : [ + "fonts-gubbi" + ] + }, + "gulim.ttf" : { + "installed_by" : [ + "fonts-baekmuk" + ] + }, + "gurajada.ttf" : { + "installed_by" : [ + "fonts-teluguvijayam" + ] + }, + "guseul.ttf" : { + "installed_by" : [ + "fonts-alee" + ] + }, + "gwmonospace.ttf" : { + "installed_by" : [ + "fonts-georgewilliams" + ] + }, + "gwmonospacebold.ttf" : { + "installed_by" : [ + "fonts-georgewilliams" + ] + }, + "gwmonospaceoblique.ttf" : { + "installed_by" : [ + "fonts-georgewilliams" + ] + }, + "gyneric.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "gyneric3.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "gyroresh.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "gyrose.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "gyrosesq.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "hack-bold.ttf" : { + "installed_by" : [ + "fonts-hack" + ] + }, + "hack-bolditalic.ttf" : { + "installed_by" : [ + "fonts-hack" + ] + }, + "hack-italic.ttf" : { + "installed_by" : [ + "fonts-hack" + ] + }, + "hack-regular.ttf" : { + "installed_by" : [ + "fonts-hack" + ] + }, + "hackslsh.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "hairball.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "hamlet-cicero12.otf" : { + "installed_by" : [ + "fonts-gotico-antiqua" + ] + }, + "hamlet-tertia18.otf" : { + "installed_by" : [ + "fonts-gotico-antiqua" + ] + }, + "hanamina.ttf" : { + "installed_by" : [ + "fonts-hanazono" + ] + }, + "hanaminb.ttf" : { + "installed_by" : [ + "fonts-hanazono" + ] + }, + "handmedo.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "handmeds.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "harmattan-bold.ttf" : { + "installed_by" : [ + "fonts-sil-harmattan" + ] + }, + "harmattan-regular.ttf" : { + "installed_by" : [ + "fonts-sil-harmattan" + ] + }, + "harsinai.otf" : { + "installed_by" : [ + "fonts-ldco" + ] + }, + "harsinai.ttf" : { + "installed_by" : [ + "fonts-ldco" + ] + }, + "hassle.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "havana-regular.otf" : { + "installed_by" : [ + "fonts-havana" + ] + }, + "hbevel.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "hdmaker.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "hearts.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "hermit-bold.otf" : { + "installed_by" : [ + "fonts-hermit" + ] + }, + "hermit-light.otf" : { + "installed_by" : [ + "fonts-hermit" + ] + }, + "hermit-medium.otf" : { + "installed_by" : [ + "fonts-hermit" + ] + }, + "hidekel.otf" : { + "installed_by" : [ + "fonts-ldco" + ] + }, + "hidekel.ttf" : { + "installed_by" : [ + "fonts-ldco" + ] + }, + "hillock.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "hiwua.ttf" : { + "installed_by" : [ + "fonts-senamirmir-washra" + ] + }, + "hline.ttf" : { + "installed_by" : [ + "fonts-baekmuk" + ] + }, + "homa.ttf" : { + "installed_by" : [ + "fonts-farsiweb" + ] + }, + "homespun.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "humor-sans.ttf" : { + "installed_by" : [ + "fonts-humor-sans" + ] + }, + "hyde.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "hyperion.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "ikariusadfno2std-bold.otf" : { + "installed_by" : [ + "fonts-adf-ikarius" + ] + }, + "ikariusadfno2std-bolditalic.otf" : { + "installed_by" : [ + "fonts-adf-ikarius" + ] + }, + "ikariusadfno2std-italic.otf" : { + "installed_by" : [ + "fonts-adf-ikarius" + ] + }, + "ikariusadfno2std-regular.otf" : { + "installed_by" : [ + "fonts-adf-ikarius" + ] + }, + "ikariusadfstd-bold.otf" : { + "installed_by" : [ + "fonts-adf-ikarius" + ] + }, + "ikariusadfstd-bolditalic.otf" : { + "installed_by" : [ + "fonts-adf-ikarius" + ] + }, + "ikariusadfstd-italic.otf" : { + "installed_by" : [ + "fonts-adf-ikarius" + ] + }, + "ikariusadfstd-regular.otf" : { + "installed_by" : [ + "fonts-adf-ikarius" + ] + }, + "ilits.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "imfepirm29p.ttf" : { + "installed_by" : [ + "fonts-cegui" + ] + }, + "imposs.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "inconsolata.otf" : { + "installed_by" : [ + "fonts-inconsolata" + ] + }, + "induni-c-bold.otf" : { + "installed_by" : [ + "fonts-johnsmith-induni" + ] + }, + "induni-c-boldoblique.otf" : { + "installed_by" : [ + "fonts-johnsmith-induni" + ] + }, + "induni-c-oblique.otf" : { + "installed_by" : [ + "fonts-johnsmith-induni" + ] + }, + "induni-c-regular.otf" : { + "installed_by" : [ + "fonts-johnsmith-induni" + ] + }, + "induni-h-bold.otf" : { + "installed_by" : [ + "fonts-johnsmith-induni" + ] + }, + "induni-h-boldoblique.otf" : { + "installed_by" : [ + "fonts-johnsmith-induni" + ] + }, + "induni-h-oblique.otf" : { + "installed_by" : [ + "fonts-johnsmith-induni" + ] + }, + "induni-h-regular.otf" : { + "installed_by" : [ + "fonts-johnsmith-induni" + ] + }, + "induni-n-bold.otf" : { + "installed_by" : [ + "fonts-johnsmith-induni" + ] + }, + "induni-n-bolditalic.otf" : { + "installed_by" : [ + "fonts-johnsmith-induni" + ] + }, + "induni-n-italic.otf" : { + "installed_by" : [ + "fonts-johnsmith-induni" + ] + }, + "induni-n-roman.otf" : { + "installed_by" : [ + "fonts-johnsmith-induni" + ] + }, + "induni-p-bold.otf" : { + "installed_by" : [ + "fonts-johnsmith-induni" + ] + }, + "induni-p-bolditalic.otf" : { + "installed_by" : [ + "fonts-johnsmith-induni" + ] + }, + "induni-p-italic.otf" : { + "installed_by" : [ + "fonts-johnsmith-induni" + ] + }, + "induni-p-roman.otf" : { + "installed_by" : [ + "fonts-johnsmith-induni" + ] + }, + "induni-t-bold.otf" : { + "installed_by" : [ + "fonts-johnsmith-induni" + ] + }, + "induni-t-bolditalic.otf" : { + "installed_by" : [ + "fonts-johnsmith-induni" + ] + }, + "induni-t-italic.otf" : { + "installed_by" : [ + "fonts-johnsmith-induni" + ] + }, + "induni-t-roman.otf" : { + "installed_by" : [ + "fonts-johnsmith-induni" + ] + }, + "inertia.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "inevitab.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "inkswipe.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "inktank.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "inter-black.otf" : { + "installed_by" : [ + "fonts-inter" + ] + }, + "inter-blackitalic.otf" : { + "installed_by" : [ + "fonts-inter" + ] + }, + "inter-bold.otf" : { + "installed_by" : [ + "fonts-inter" + ] + }, + "inter-bolditalic.otf" : { + "installed_by" : [ + "fonts-inter" + ] + }, + "inter-extrabold.otf" : { + "installed_by" : [ + "fonts-inter" + ] + }, + "inter-extrabolditalic.otf" : { + "installed_by" : [ + "fonts-inter" + ] + }, + "inter-extralight.otf" : { + "installed_by" : [ + "fonts-inter" + ] + }, + "inter-extralightitalic.otf" : { + "installed_by" : [ + "fonts-inter" + ] + }, + "inter-italic.otf" : { + "installed_by" : [ + "fonts-inter" + ] + }, + "inter-light.otf" : { + "installed_by" : [ + "fonts-inter" + ] + }, + "inter-lightitalic.otf" : { + "installed_by" : [ + "fonts-inter" + ] + }, + "inter-medium.otf" : { + "installed_by" : [ + "fonts-inter" + ] + }, + "inter-mediumitalic.otf" : { + "installed_by" : [ + "fonts-inter" + ] + }, + "inter-regular.otf" : { + "installed_by" : [ + "fonts-inter" + ] + }, + "inter-semibold.otf" : { + "installed_by" : [ + "fonts-inter" + ] + }, + "inter-semibolditalic.otf" : { + "installed_by" : [ + "fonts-inter" + ] + }, + "inter-thin.otf" : { + "installed_by" : [ + "fonts-inter" + ] + }, + "inter-thinitalic.otf" : { + "installed_by" : [ + "fonts-inter" + ] + }, + "inter-vf.ttf" : { + "installed_by" : [ + "fonts-inter-variable" + ] + }, + "intersc.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "intersec.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "interso.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "ipabold.ttf" : { + "installed_by" : [ + "fonts-linex" + ] + }, + "ipabolit.ttf" : { + "installed_by" : [ + "fonts-linex" + ] + }, + "ipaexg.ttf" : { + "installed_by" : [ + "fonts-ipaexfont-gothic" + ] + }, + "ipaexm.ttf" : { + "installed_by" : [ + "fonts-ipaexfont-mincho" + ] + }, + "ipag.ttf" : { + "installed_by" : [ + "fonts-ipafont-gothic" + ] + }, + "ipagp.ttf" : { + "installed_by" : [ + "fonts-ipafont-gothic" + ] + }, + "ipaitali.ttf" : { + "installed_by" : [ + "fonts-linex" + ] + }, + "ipam.ttf" : { + "installed_by" : [ + "fonts-ipafont-mincho" + ] + }, + "ipamjm.ttf" : { + "installed_by" : [ + "fonts-ipamj-mincho" + ] + }, + "ipamp.ttf" : { + "installed_by" : [ + "fonts-ipafont-mincho" + ] + }, + "iparegul.ttf" : { + "installed_by" : [ + "fonts-linex" + ] + }, + "irianisadfstd-bold.otf" : { + "installed_by" : [ + "fonts-adf-irianis" + ] + }, + "irianisadfstd-bolditalic.otf" : { + "installed_by" : [ + "fonts-adf-irianis" + ] + }, + "irianisadfstd-italic.otf" : { + "installed_by" : [ + "fonts-adf-irianis" + ] + }, + "irianisadfstd-regular.otf" : { + "installed_by" : [ + "fonts-adf-irianis" + ] + }, + "irianisadfstylestd-bold.otf" : { + "installed_by" : [ + "fonts-adf-irianis" + ] + }, + "irianisadfstylestd-bolditalic.otf" : { + "installed_by" : [ + "fonts-adf-irianis" + ] + }, + "irianisadfstylestd-italic.otf" : { + "installed_by" : [ + "fonts-adf-irianis" + ] + }, + "irianisadfstylestd-regular.otf" : { + "installed_by" : [ + "fonts-adf-irianis" + ] + }, + "irritate.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "isabella.ttf" : { + "installed_by" : [ + "fonts-isabella" + ] + }, + "it_wasn_t_me.ttf" : { + "installed_by" : [ + "fonts-dustin" + ] + }, + "jagged.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "jamrulnormal.ttf" : { + "installed_by" : [ + "fonts-beng-extra" + ] + }, + "janken.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "jara.ttf" : { + "installed_by" : [ + "fonts-linex" + ] + }, + "jara_bold-it.ttf" : { + "installed_by" : [ + "fonts-linex" + ] + }, + "jara_bold.ttf" : { + "installed_by" : [ + "fonts-linex" + ] + }, + "jara_it.ttf" : { + "installed_by" : [ + "fonts-linex" + ] + }, + "jargon.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "jasper.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "jaspers.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "jawbhard.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "jawbreak.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "jawbrko1.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "jawbrko2.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "jekyll.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "jeopardi.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "jeopardt.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "jessen-cicero12.otf" : { + "installed_by" : [ + "fonts-gotico-antiqua" + ] + }, + "jessen-mittel14.otf" : { + "installed_by" : [ + "fonts-gotico-antiqua" + ] + }, + "jetbrainsmono-bold.ttf" : { + "installed_by" : [ + "fonts-jetbrains-mono" + ] + }, + "jetbrainsmono-bolditalic.ttf" : { + "installed_by" : [ + "fonts-jetbrains-mono" + ] + }, + "jetbrainsmono-extrabold.ttf" : { + "installed_by" : [ + "fonts-jetbrains-mono" + ] + }, + "jetbrainsmono-extrabolditalic.ttf" : { + "installed_by" : [ + "fonts-jetbrains-mono" + ] + }, + "jetbrainsmono-extralight.ttf" : { + "installed_by" : [ + "fonts-jetbrains-mono" + ] + }, + "jetbrainsmono-extralightitalic.ttf" : { + "installed_by" : [ + "fonts-jetbrains-mono" + ] + }, + "jetbrainsmono-italic.ttf" : { + "installed_by" : [ + "fonts-jetbrains-mono" + ] + }, + "jetbrainsmono-light.ttf" : { + "installed_by" : [ + "fonts-jetbrains-mono" + ] + }, + "jetbrainsmono-lightitalic.ttf" : { + "installed_by" : [ + "fonts-jetbrains-mono" + ] + }, + "jetbrainsmono-medium.ttf" : { + "installed_by" : [ + "fonts-jetbrains-mono" + ] + }, + "jetbrainsmono-mediumitalic.ttf" : { + "installed_by" : [ + "fonts-jetbrains-mono" + ] + }, + "jetbrainsmono-regular.ttf" : { + "installed_by" : [ + "fonts-jetbrains-mono" + ] + }, + "jetbrainsmono-semibold.ttf" : { + "installed_by" : [ + "fonts-jetbrains-mono" + ] + }, + "jetbrainsmono-semibolditalic.ttf" : { + "installed_by" : [ + "fonts-jetbrains-mono" + ] + }, + "jetbrainsmono-thin.ttf" : { + "installed_by" : [ + "fonts-jetbrains-mono" + ] + }, + "jetbrainsmono-thinitalic.ttf" : { + "installed_by" : [ + "fonts-jetbrains-mono" + ] + }, + "jiret.ttf" : { + "installed_by" : [ + "fonts-senamirmir-washra" + ] + }, + "jmacscrl.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "joltcaff.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "jomolhari-alpha3c-0605331.ttf" : { + "installed_by" : [ + "fonts-dzongkha" + ] + }, + "joscelyn-regular.otf" : { + "installed_by" : [ + "fonts-joscelyn" + ] + }, + "josef.otf" : { + "installed_by" : [ + "fonts-ldco" + ] + }, + "josef.ttf" : { + "installed_by" : [ + "fonts-ldco" + ] + }, + "jsmath-bbold10.ttf" : { + "installed_by" : [ + "fonts-jsmath" + ] + }, + "jsmath-cmbsy10.ttf" : { + "installed_by" : [ + "fonts-jsmath" + ] + }, + "jsmath-cmbx10.ttf" : { + "installed_by" : [ + "fonts-jsmath" + ] + }, + "jsmath-cmex10.ttf" : { + "installed_by" : [ + "fonts-jsmath" + ] + }, + "jsmath-cmmi10.ttf" : { + "installed_by" : [ + "fonts-jsmath" + ] + }, + "jsmath-cmmib10.ttf" : { + "installed_by" : [ + "fonts-jsmath" + ] + }, + "jsmath-cmr10.ttf" : { + "installed_by" : [ + "fonts-jsmath" + ] + }, + "jsmath-cmss10.ttf" : { + "installed_by" : [ + "fonts-jsmath" + ] + }, + "jsmath-cmsy10.ttf" : { + "installed_by" : [ + "fonts-jsmath" + ] + }, + "jsmath-cmti10.ttf" : { + "installed_by" : [ + "fonts-jsmath" + ] + }, + "jsmath-eufb10.ttf" : { + "installed_by" : [ + "fonts-jsmath" + ] + }, + "jsmath-eufm10.ttf" : { + "installed_by" : [ + "fonts-jsmath" + ] + }, + "jsmath-eurb10.ttf" : { + "installed_by" : [ + "fonts-jsmath" + ] + }, + "jsmath-eurm10.ttf" : { + "installed_by" : [ + "fonts-jsmath" + ] + }, + "jsmath-eusb10.ttf" : { + "installed_by" : [ + "fonts-jsmath" + ] + }, + "jsmath-eusm10.ttf" : { + "installed_by" : [ + "fonts-jsmath" + ] + }, + "jsmath-lasy10.ttf" : { + "installed_by" : [ + "fonts-jsmath" + ] + }, + "jsmath-lasyb10.ttf" : { + "installed_by" : [ + "fonts-jsmath" + ] + }, + "jsmath-msam10.ttf" : { + "installed_by" : [ + "fonts-jsmath" + ] + }, + "jsmath-msbm10.ttf" : { + "installed_by" : [ + "fonts-jsmath" + ] + }, + "jsmath-rsfs10.ttf" : { + "installed_by" : [ + "fonts-jsmath" + ] + }, + "jsmath-stmary10.ttf" : { + "installed_by" : [ + "fonts-jsmath" + ] + }, + "jsmath-wasy10.ttf" : { + "installed_by" : [ + "fonts-jsmath" + ] + }, + "jsmath-wasyb10.ttf" : { + "installed_by" : [ + "fonts-jsmath" + ] + }, + "junction.otf" : { + "installed_by" : [ + "fonts-junction" + ] + }, + "junicodetwobeta-bold.otf" : { + "installed_by" : [ + "fonts-junicode" + ] + }, + "junicodetwobeta-bolditalic.otf" : { + "installed_by" : [ + "fonts-junicode" + ] + }, + "junicodetwobeta-condensed.otf" : { + "installed_by" : [ + "fonts-junicode" + ] + }, + "junicodetwobeta-condenseditalic.otf" : { + "installed_by" : [ + "fonts-junicode" + ] + }, + "junicodetwobeta-condensedlight.otf" : { + "installed_by" : [ + "fonts-junicode" + ] + }, + "junicodetwobeta-condensedlightitalic.otf" : { + "installed_by" : [ + "fonts-junicode" + ] + }, + "junicodetwobeta-condensedmedium.otf" : { + "installed_by" : [ + "fonts-junicode" + ] + }, + "junicodetwobeta-condensedmediumitalic.otf" : { + "installed_by" : [ + "fonts-junicode" + ] + }, + "junicodetwobeta-expanded.otf" : { + "installed_by" : [ + "fonts-junicode" + ] + }, + "junicodetwobeta-expandedbold.otf" : { + "installed_by" : [ + "fonts-junicode" + ] + }, + "junicodetwobeta-expandedbolditalic.otf" : { + "installed_by" : [ + "fonts-junicode" + ] + }, + "junicodetwobeta-expandeditalic.otf" : { + "installed_by" : [ + "fonts-junicode" + ] + }, + "junicodetwobeta-expandedmedium.otf" : { + "installed_by" : [ + "fonts-junicode" + ] + }, + "junicodetwobeta-expandedmediumitalic.otf" : { + "installed_by" : [ + "fonts-junicode" + ] + }, + "junicodetwobeta-expandedsemibold.otf" : { + "installed_by" : [ + "fonts-junicode" + ] + }, + "junicodetwobeta-expandedsemibolditalic.otf" : { + "installed_by" : [ + "fonts-junicode" + ] + }, + "junicodetwobeta-italic.otf" : { + "installed_by" : [ + "fonts-junicode" + ] + }, + "junicodetwobeta-light.otf" : { + "installed_by" : [ + "fonts-junicode" + ] + }, + "junicodetwobeta-lightitalic.otf" : { + "installed_by" : [ + "fonts-junicode" + ] + }, + "junicodetwobeta-medium.otf" : { + "installed_by" : [ + "fonts-junicode" + ] + }, + "junicodetwobeta-mediumitalic.otf" : { + "installed_by" : [ + "fonts-junicode" + ] + }, + "junicodetwobeta-regular.otf" : { + "installed_by" : [ + "fonts-junicode" + ] + }, + "junicodetwobeta-semibold.otf" : { + "installed_by" : [ + "fonts-junicode" + ] + }, + "junicodetwobeta-semibolditalic.otf" : { + "installed_by" : [ + "fonts-junicode" + ] + }, + "junicodetwobeta-semicondensed.otf" : { + "installed_by" : [ + "fonts-junicode" + ] + }, + "junicodetwobeta-semicondenseditalic.otf" : { + "installed_by" : [ + "fonts-junicode" + ] + }, + "junicodetwobeta-semicondensedlight.otf" : { + "installed_by" : [ + "fonts-junicode" + ] + }, + "junicodetwobeta-semicondensedlightitalic.otf" : { + "installed_by" : [ + "fonts-junicode" + ] + }, + "junicodetwobeta-semicondensedmedium.otf" : { + "installed_by" : [ + "fonts-junicode" + ] + }, + "junicodetwobeta-semicondensedmediumitalic.otf" : { + "installed_by" : [ + "fonts-junicode" + ] + }, + "junicodetwobeta-semiexpanded.otf" : { + "installed_by" : [ + "fonts-junicode" + ] + }, + "junicodetwobeta-semiexpandedbold.otf" : { + "installed_by" : [ + "fonts-junicode" + ] + }, + "junicodetwobeta-semiexpandedbolditalic.otf" : { + "installed_by" : [ + "fonts-junicode" + ] + }, + "junicodetwobeta-semiexpandeditalic.otf" : { + "installed_by" : [ + "fonts-junicode" + ] + }, + "junicodetwobeta-semiexpandedmedium.otf" : { + "installed_by" : [ + "fonts-junicode" + ] + }, + "junicodetwobeta-semiexpandedmediumitalic.otf" : { + "installed_by" : [ + "fonts-junicode" + ] + }, + "junicodetwobeta-semiexpandedsemibold.otf" : { + "installed_by" : [ + "fonts-junicode" + ] + }, + "junicodetwobeta-semiexpandedsemibolditalic.otf" : { + "installed_by" : [ + "fonts-junicode" + ] + }, + "junkyard.ttf" : { + "installed_by" : [ + "fonts-dustin" + ] + }, + "jupiterc.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "jura-bold.otf" : { + "installed_by" : [ + "fonts-jura" + ] + }, + "jura-light.otf" : { + "installed_by" : [ + "fonts-jura" + ] + }, + "jura-medium.otf" : { + "installed_by" : [ + "fonts-jura" + ] + }, + "jura-regular.otf" : { + "installed_by" : [ + "fonts-jura" + ] + }, + "jura-semibold.otf" : { + "installed_by" : [ + "fonts-jura" + ] + }, + "kacstart.ttf" : { + "installed_by" : [ + "fonts-kacst" + ] + }, + "kacstbook.ttf" : { + "installed_by" : [ + "fonts-kacst" + ] + }, + "kacstdecorative.ttf" : { + "installed_by" : [ + "fonts-kacst" + ] + }, + "kacstdigital.ttf" : { + "installed_by" : [ + "fonts-kacst" + ] + }, + "kacstfarsi.ttf" : { + "installed_by" : [ + "fonts-kacst" + ] + }, + "kacstletter.ttf" : { + "installed_by" : [ + "fonts-kacst" + ] + }, + "kacstnaskh.ttf" : { + "installed_by" : [ + "fonts-kacst" + ] + }, + "kacstoffice.ttf" : { + "installed_by" : [ + "fonts-kacst" + ] + }, + "kacstone-bold.ttf" : { + "installed_by" : [ + "fonts-kacst-one" + ] + }, + "kacstone.ttf" : { + "installed_by" : [ + "fonts-kacst-one" + ] + }, + "kacstpen.ttf" : { + "installed_by" : [ + "fonts-kacst" + ] + }, + "kacstposter.ttf" : { + "installed_by" : [ + "fonts-kacst" + ] + }, + "kacstqurn.ttf" : { + "installed_by" : [ + "fonts-kacst" + ] + }, + "kacstscreen.ttf" : { + "installed_by" : [ + "fonts-kacst" + ] + }, + "kacsttitle.ttf" : { + "installed_by" : [ + "fonts-kacst" + ] + }, + "kacsttitlel.ttf" : { + "installed_by" : [ + "fonts-kacst" + ] + }, + "kalapi.ttf" : { + "installed_by" : [ + "fonts-kalapi" + ] + }, + "kaliberr.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "kalibers.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "kaliberx.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "kalimati.ttf" : { + "installed_by" : [ + "fonts-deva-extra" + ] + }, + "kanjistrokeorders_v4.003.ttf" : { + "installed_by" : [ + "fonts-kanjistrokeorders" + ] + }, + "kapl.ttf" : { + "installed_by" : [ + "xfonts-kapl" + ] + }, + "karla-bold.otf" : { + "installed_by" : [ + "fonts-karla" + ] + }, + "karla-bolditalic.otf" : { + "installed_by" : [ + "fonts-karla" + ] + }, + "karla-extrabold.otf" : { + "installed_by" : [ + "fonts-karla" + ] + }, + "karla-extrabolditalic.otf" : { + "installed_by" : [ + "fonts-karla" + ] + }, + "karla-extralight.otf" : { + "installed_by" : [ + "fonts-karla" + ] + }, + "karla-extralightitalic.otf" : { + "installed_by" : [ + "fonts-karla" + ] + }, + "karla-italic.otf" : { + "installed_by" : [ + "fonts-karla" + ] + }, + "karla-italic[wght].ttf" : { + "installed_by" : [ + "fonts-karla" + ] + }, + "karla-light.otf" : { + "installed_by" : [ + "fonts-karla" + ] + }, + "karla-lightitalic.otf" : { + "installed_by" : [ + "fonts-karla" + ] + }, + "karla-medium.otf" : { + "installed_by" : [ + "fonts-karla" + ] + }, + "karla-mediumitalic.otf" : { + "installed_by" : [ + "fonts-karla" + ] + }, + "karla-regular.otf" : { + "installed_by" : [ + "fonts-karla" + ] + }, + "karla[wght].ttf" : { + "installed_by" : [ + "fonts-karla" + ] + }, + "karlatamilinclined-bold.ttf" : { + "installed_by" : [ + "fonts-karla" + ] + }, + "karlatamilinclined-regular.ttf" : { + "installed_by" : [ + "fonts-karla" + ] + }, + "karlatamilupright-bold.ttf" : { + "installed_by" : [ + "fonts-karla" + ] + }, + "karlatamilupright-regular.ttf" : { + "installed_by" : [ + "fonts-karla" + ] + }, + "karmilla-bold.ttf" : { + "installed_by" : [ + "fonts-karmilla" + ] + }, + "karmilla-bolditalic.ttf" : { + "installed_by" : [ + "fonts-karmilla" + ] + }, + "karmilla-italic.ttf" : { + "installed_by" : [ + "fonts-karmilla" + ] + }, + "karmilla-regular.ttf" : { + "installed_by" : [ + "fonts-karmilla" + ] + }, + "karumbi-regular.ttf" : { + "installed_by" : [ + "fonts-smc-karumbi" + ] + }, + "kataacti.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "katainac.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "katex_ams-regular.ttf" : { + "installed_by" : [ + "fonts-katex" + ] + }, + "katex_caligraphic-bold.ttf" : { + "installed_by" : [ + "fonts-katex" + ] + }, + "katex_caligraphic-regular.ttf" : { + "installed_by" : [ + "fonts-katex" + ] + }, + "katex_fraktur-bold.ttf" : { + "installed_by" : [ + "fonts-katex" + ] + }, + "katex_fraktur-regular.ttf" : { + "installed_by" : [ + "fonts-katex" + ] + }, + "katex_main-bold.ttf" : { + "installed_by" : [ + "fonts-katex" + ] + }, + "katex_main-bolditalic.ttf" : { + "installed_by" : [ + "fonts-katex" + ] + }, + "katex_main-italic.ttf" : { + "installed_by" : [ + "fonts-katex" + ] + }, + "katex_main-regular.ttf" : { + "installed_by" : [ + "fonts-katex" + ] + }, + "katex_math-bolditalic.ttf" : { + "installed_by" : [ + "fonts-katex" + ] + }, + "katex_math-italic.ttf" : { + "installed_by" : [ + "fonts-katex" + ] + }, + "katex_sansserif-bold.ttf" : { + "installed_by" : [ + "fonts-katex" + ] + }, + "katex_sansserif-italic.ttf" : { + "installed_by" : [ + "fonts-katex" + ] + }, + "katex_sansserif-regular.ttf" : { + "installed_by" : [ + "fonts-katex" + ] + }, + "katex_script-regular.ttf" : { + "installed_by" : [ + "fonts-katex" + ] + }, + "katex_size1-regular.ttf" : { + "installed_by" : [ + "fonts-katex" + ] + }, + "katex_size2-regular.ttf" : { + "installed_by" : [ + "fonts-katex" + ] + }, + "katex_size3-regular.ttf" : { + "installed_by" : [ + "fonts-katex" + ] + }, + "katex_size4-regular.ttf" : { + "installed_by" : [ + "fonts-katex" + ] + }, + "katex_typewriter-regular.ttf" : { + "installed_by" : [ + "fonts-katex" + ] + }, + "kaushanscript-regular.otf" : { + "installed_by" : [ + "fonts-kaushanscript" + ] + }, + "keraleeyam-regular.ttf" : { + "installed_by" : [ + "fonts-smc-keraleeyam" + ] + }, + "keyrialt.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "keyridge.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "khmeros.ttf" : { + "installed_by" : [ + "fonts-khmeros" + ] + }, + "khmerosbattambang.ttf" : { + "installed_by" : [ + "fonts-khmeros" + ] + }, + "khmerosbokor.ttf" : { + "installed_by" : [ + "fonts-khmeros" + ] + }, + "khmeroscontent.ttf" : { + "installed_by" : [ + "fonts-khmeros" + ] + }, + "khmerosfasthand.ttf" : { + "installed_by" : [ + "fonts-khmeros" + ] + }, + "khmerosfreehand.ttf" : { + "installed_by" : [ + "fonts-khmeros" + ] + }, + "khmerosmetalchrieng.ttf" : { + "installed_by" : [ + "fonts-khmeros" + ] + }, + "khmerosmuol.ttf" : { + "installed_by" : [ + "fonts-khmeros" + ] + }, + "khmerosmuollight.ttf" : { + "installed_by" : [ + "fonts-khmeros" + ] + }, + "khmerosmuolpali.ttf" : { + "installed_by" : [ + "fonts-khmeros" + ] + }, + "khmerossiemreap.ttf" : { + "installed_by" : [ + "fonts-khmeros" + ] + }, + "khmerossys.ttf" : { + "installed_by" : [ + "fonts-khmeros" + ] + }, + "kickflip.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "kiloji.ttf" : { + "installed_by" : [ + "fonts-kiloji" + ] + }, + "kiloji_b.ttf" : { + "installed_by" : [ + "fonts-kiloji" + ] + }, + "kiloji_d.ttf" : { + "installed_by" : [ + "fonts-kiloji" + ] + }, + "kiloji_p.ttf" : { + "installed_by" : [ + "fonts-kiloji" + ] + }, + "kimchi.otf" : { + "installed_by" : [ + "fonts-ldco" + ] + }, + "kimchi.ttf" : { + "installed_by" : [ + "fonts-ldco" + ] + }, + "kinkaid.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "kinnari-bold.otf" : { + "installed_by" : [ + "fonts-tlwg-kinnari-otf" + ] + }, + "kinnari-bold.ttf" : { + "installed_by" : [ + "fonts-tlwg-kinnari-ttf" + ] + }, + "kinnari-bolditalic.otf" : { + "installed_by" : [ + "fonts-tlwg-kinnari-otf" + ] + }, + "kinnari-bolditalic.ttf" : { + "installed_by" : [ + "fonts-tlwg-kinnari-ttf" + ] + }, + "kinnari-boldoblique.otf" : { + "installed_by" : [ + "fonts-tlwg-kinnari-otf" + ] + }, + "kinnari-boldoblique.ttf" : { + "installed_by" : [ + "fonts-tlwg-kinnari-ttf" + ] + }, + "kinnari-italic.otf" : { + "installed_by" : [ + "fonts-tlwg-kinnari-otf" + ] + }, + "kinnari-italic.ttf" : { + "installed_by" : [ + "fonts-tlwg-kinnari-ttf" + ] + }, + "kinnari-oblique.otf" : { + "installed_by" : [ + "fonts-tlwg-kinnari-otf" + ] + }, + "kinnari-oblique.ttf" : { + "installed_by" : [ + "fonts-tlwg-kinnari-ttf" + ] + }, + "kinnari.otf" : { + "installed_by" : [ + "fonts-tlwg-kinnari-otf" + ] + }, + "kinnari.ttf" : { + "installed_by" : [ + "fonts-tlwg-kinnari-ttf" + ] + }, + "kirbyss.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "klaudia-bold.ttf" : { + "installed_by" : [ + "fonts-klaudia-berenika" + ] + }, + "klaudia-boldoblique.ttf" : { + "installed_by" : [ + "fonts-klaudia-berenika" + ] + }, + "klaudia-oblique.ttf" : { + "installed_by" : [ + "fonts-klaudia-berenika" + ] + }, + "klaudia.ttf" : { + "installed_by" : [ + "fonts-klaudia-berenika" + ] + }, + "kleeone-regular.ttf" : { + "installed_by" : [ + "fonts-klee" + ] + }, + "kleeone-semibold.ttf" : { + "installed_by" : [ + "fonts-klee" + ] + }, + "klingon-piqad-hasta.ttf" : { + "installed_by" : [ + "fonts-cegui" + ] + }, + "knot.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "komatuna-p.ttf" : { + "installed_by" : [ + "fonts-komatuna" + ] + }, + "komatuna.ttf" : { + "installed_by" : [ + "fonts-komatuna" + ] + }, + "konatu.ttf" : { + "installed_by" : [ + "fonts-konatu" + ] + }, + "konatutohaba.ttf" : { + "installed_by" : [ + "fonts-konatu" + ] + }, + "konecto1.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "konecto2.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "konector.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "koneerie.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "kouzan-mouhitsu-gyosho.ttf" : { + "installed_by" : [ + "fonts-kouzan-mouhitsu" + ] + }, + "kouzan-mouhitsu.ttf" : { + "installed_by" : [ + "fonts-kouzan-mouhitsu" + ] + }, + "kouzanbrushfontsousyo.ttf" : { + "installed_by" : [ + "fonts-kouzan-mouhitsu" + ] + }, + "kristi.ttf" : { + "installed_by" : [ + "fonts-kristi" + ] + }, + "kurvatur.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "lakeshor.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "lakkireddy.ttf" : { + "installed_by" : [ + "fonts-teluguvijayam" + ] + }, + "laksaman-bold.otf" : { + "installed_by" : [ + "fonts-tlwg-laksaman-otf" + ] + }, + "laksaman-bold.ttf" : { + "installed_by" : [ + "fonts-tlwg-laksaman-ttf" + ] + }, + "laksaman-bolditalic.otf" : { + "installed_by" : [ + "fonts-tlwg-laksaman-otf" + ] + }, + "laksaman-bolditalic.ttf" : { + "installed_by" : [ + "fonts-tlwg-laksaman-ttf" + ] + }, + "laksaman-italic.otf" : { + "installed_by" : [ + "fonts-tlwg-laksaman-otf" + ] + }, + "laksaman-italic.ttf" : { + "installed_by" : [ + "fonts-tlwg-laksaman-ttf" + ] + }, + "laksaman.otf" : { + "installed_by" : [ + "fonts-tlwg-laksaman-otf" + ] + }, + "laksaman.ttf" : { + "installed_by" : [ + "fonts-tlwg-laksaman-ttf" + ] + }, + "lamebrai.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "larkspur.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "lateefgr-regular.ttf" : { + "installed_by" : [ + "fonts-sil-lateef" + ] + }, + "latinmodern-math.otf" : { + "installed_by" : [ + "fonts-lmodern" + ] + }, + "lato-black.ttf" : { + "installed_by" : [ + "fonts-lato" + ] + }, + "lato-blackitalic.ttf" : { + "installed_by" : [ + "fonts-lato" + ] + }, + "lato-bold.ttf" : { + "installed_by" : [ + "fonts-lato" + ] + }, + "lato-bolditalic.ttf" : { + "installed_by" : [ + "fonts-lato" + ] + }, + "lato-hairline.ttf" : { + "installed_by" : [ + "fonts-lato" + ] + }, + "lato-hairlineitalic.ttf" : { + "installed_by" : [ + "fonts-lato" + ] + }, + "lato-heavy.ttf" : { + "installed_by" : [ + "fonts-lato" + ] + }, + "lato-heavyitalic.ttf" : { + "installed_by" : [ + "fonts-lato" + ] + }, + "lato-italic.ttf" : { + "installed_by" : [ + "fonts-lato" + ] + }, + "lato-light.ttf" : { + "installed_by" : [ + "fonts-lato" + ] + }, + "lato-lightitalic.ttf" : { + "installed_by" : [ + "fonts-lato" + ] + }, + "lato-medium.ttf" : { + "installed_by" : [ + "fonts-lato" + ] + }, + "lato-mediumitalic.ttf" : { + "installed_by" : [ + "fonts-lato" + ] + }, + "lato-regular.ttf" : { + "installed_by" : [ + "fonts-lato" + ] + }, + "lato-semibold.ttf" : { + "installed_by" : [ + "fonts-lato" + ] + }, + "lato-semibolditalic.ttf" : { + "installed_by" : [ + "fonts-lato" + ] + }, + "lato-thin.ttf" : { + "installed_by" : [ + "fonts-lato" + ] + }, + "lato-thinitalic.ttf" : { + "installed_by" : [ + "fonts-lato" + ] + }, + "le-murmure.otf" : { + "installed_by" : [ + "fonts-le-murmure" + ] + }, + "leaguemono-bold.otf" : { + "installed_by" : [ + "fonts-league-mono" + ] + }, + "leaguemono-condensed.otf" : { + "installed_by" : [ + "fonts-league-mono" + ] + }, + "leaguemono-condensedbold.otf" : { + "installed_by" : [ + "fonts-league-mono" + ] + }, + "leaguemono-condensedextrabold.otf" : { + "installed_by" : [ + "fonts-league-mono" + ] + }, + "leaguemono-condensedlight.otf" : { + "installed_by" : [ + "fonts-league-mono" + ] + }, + "leaguemono-condensedmedium.otf" : { + "installed_by" : [ + "fonts-league-mono" + ] + }, + "leaguemono-condensedsemibold.otf" : { + "installed_by" : [ + "fonts-league-mono" + ] + }, + "leaguemono-condensedthin.otf" : { + "installed_by" : [ + "fonts-league-mono" + ] + }, + "leaguemono-condensedultralight.otf" : { + "installed_by" : [ + "fonts-league-mono" + ] + }, + "leaguemono-extendedbold.otf" : { + "installed_by" : [ + "fonts-league-mono" + ] + }, + "leaguemono-extendedextrabold.otf" : { + "installed_by" : [ + "fonts-league-mono" + ] + }, + "leaguemono-extendedlight.otf" : { + "installed_by" : [ + "fonts-league-mono" + ] + }, + "leaguemono-extendedmedium.otf" : { + "installed_by" : [ + "fonts-league-mono" + ] + }, + "leaguemono-extendedregular.otf" : { + "installed_by" : [ + "fonts-league-mono" + ] + }, + "leaguemono-extendedsemibold.otf" : { + "installed_by" : [ + "fonts-league-mono" + ] + }, + "leaguemono-extendedthin.otf" : { + "installed_by" : [ + "fonts-league-mono" + ] + }, + "leaguemono-extendedultralight.otf" : { + "installed_by" : [ + "fonts-league-mono" + ] + }, + "leaguemono-extrabold.otf" : { + "installed_by" : [ + "fonts-league-mono" + ] + }, + "leaguemono-light.otf" : { + "installed_by" : [ + "fonts-league-mono" + ] + }, + "leaguemono-medium.otf" : { + "installed_by" : [ + "fonts-league-mono" + ] + }, + "leaguemono-narrowbold.otf" : { + "installed_by" : [ + "fonts-league-mono" + ] + }, + "leaguemono-narrowextrabold.otf" : { + "installed_by" : [ + "fonts-league-mono" + ] + }, + "leaguemono-narrowlight.otf" : { + "installed_by" : [ + "fonts-league-mono" + ] + }, + "leaguemono-narrowmedium.otf" : { + "installed_by" : [ + "fonts-league-mono" + ] + }, + "leaguemono-narrowregular.otf" : { + "installed_by" : [ + "fonts-league-mono" + ] + }, + "leaguemono-narrowsemibold.otf" : { + "installed_by" : [ + "fonts-league-mono" + ] + }, + "leaguemono-narrowthin.otf" : { + "installed_by" : [ + "fonts-league-mono" + ] + }, + "leaguemono-narrowultralight.otf" : { + "installed_by" : [ + "fonts-league-mono" + ] + }, + "leaguemono-regular.otf" : { + "installed_by" : [ + "fonts-league-mono" + ] + }, + "leaguemono-semibold.otf" : { + "installed_by" : [ + "fonts-league-mono" + ] + }, + "leaguemono-thin.otf" : { + "installed_by" : [ + "fonts-league-mono" + ] + }, + "leaguemono-ultralight.otf" : { + "installed_by" : [ + "fonts-league-mono" + ] + }, + "leaguemono-widebold.otf" : { + "installed_by" : [ + "fonts-league-mono" + ] + }, + "leaguemono-wideextrabold.otf" : { + "installed_by" : [ + "fonts-league-mono" + ] + }, + "leaguemono-widelight.otf" : { + "installed_by" : [ + "fonts-league-mono" + ] + }, + "leaguemono-widemedium.otf" : { + "installed_by" : [ + "fonts-league-mono" + ] + }, + "leaguemono-wideregular.otf" : { + "installed_by" : [ + "fonts-league-mono" + ] + }, + "leaguemono-widesemibold.otf" : { + "installed_by" : [ + "fonts-league-mono" + ] + }, + "leaguemono-widethin.otf" : { + "installed_by" : [ + "fonts-league-mono" + ] + }, + "leaguemono-wideultralight.otf" : { + "installed_by" : [ + "fonts-league-mono" + ] + }, + "leaguespartan-black.otf" : { + "installed_by" : [ + "fonts-league-spartan" + ] + }, + "leaguespartan-bold.otf" : { + "installed_by" : [ + "fonts-league-spartan" + ] + }, + "leaguespartan-extrabold.otf" : { + "installed_by" : [ + "fonts-league-spartan" + ] + }, + "leaguespartan-extralight.otf" : { + "installed_by" : [ + "fonts-league-spartan" + ] + }, + "leaguespartan-light.otf" : { + "installed_by" : [ + "fonts-league-spartan" + ] + }, + "leaguespartan-medium.otf" : { + "installed_by" : [ + "fonts-league-spartan" + ] + }, + "leaguespartan-regular.otf" : { + "installed_by" : [ + "fonts-league-spartan" + ] + }, + "leaguespartan-semibold.otf" : { + "installed_by" : [ + "fonts-league-spartan" + ] + }, + "leckerlione-regular.otf" : { + "installed_by" : [ + "fonts-leckerli-one" + ] + }, + "lemonada-bold.otf" : { + "installed_by" : [ + "fonts-lemonada" + ] + }, + "lemonada-light.otf" : { + "installed_by" : [ + "fonts-lemonada" + ] + }, + "lemonada-regular.otf" : { + "installed_by" : [ + "fonts-lemonada" + ] + }, + "lemonada-semibold.otf" : { + "installed_by" : [ + "fonts-lemonada" + ] + }, + "lethargi.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "lexigulim.ttf" : { + "installed_by" : [ + "fonts-lexi-gulim" + ] + }, + "lexisaebomr.ttf" : { + "installed_by" : [ + "fonts-lexi-saebom" + ] + }, + "liberationmono-bold.ttf" : { + "installed_by" : [ + "fonts-liberation", + "fonts-liberation2" + ] + }, + "liberationmono-bolditalic.ttf" : { + "installed_by" : [ + "fonts-liberation", + "fonts-liberation2" + ] + }, + "liberationmono-italic.ttf" : { + "installed_by" : [ + "fonts-liberation", + "fonts-liberation2" + ] + }, + "liberationmono-regular.ttf" : { + "installed_by" : [ + "fonts-liberation", + "fonts-liberation2" + ] + }, + "liberationsans-bold.ttf" : { + "installed_by" : [ + "fonts-liberation", + "fonts-liberation2" + ] + }, + "liberationsans-bolditalic.ttf" : { + "installed_by" : [ + "fonts-liberation", + "fonts-liberation2" + ] + }, + "liberationsans-italic.ttf" : { + "installed_by" : [ + "fonts-liberation", + "fonts-liberation2" + ] + }, + "liberationsans-regular.ttf" : { + "installed_by" : [ + "fonts-liberation", + "fonts-liberation2" + ] + }, + "liberationsansnarrow-bold.ttf" : { + "installed_by" : [ + "fonts-liberation" + ] + }, + "liberationsansnarrow-bolditalic.ttf" : { + "installed_by" : [ + "fonts-liberation" + ] + }, + "liberationsansnarrow-italic.ttf" : { + "installed_by" : [ + "fonts-liberation" + ] + }, + "liberationsansnarrow-regular.ttf" : { + "installed_by" : [ + "fonts-liberation" + ] + }, + "liberationserif-bold.ttf" : { + "installed_by" : [ + "fonts-liberation", + "fonts-liberation2" + ] + }, + "liberationserif-bolditalic.ttf" : { + "installed_by" : [ + "fonts-liberation", + "fonts-liberation2" + ] + }, + "liberationserif-italic.ttf" : { + "installed_by" : [ + "fonts-liberation", + "fonts-liberation2" + ] + }, + "liberationserif-regular.ttf" : { + "installed_by" : [ + "fonts-liberation", + "fonts-liberation2" + ] + }, + "librisadfstd-bold.otf" : { + "installed_by" : [ + "fonts-adf-libris" + ] + }, + "librisadfstd-bolditalic.otf" : { + "installed_by" : [ + "fonts-adf-libris" + ] + }, + "librisadfstd-italic.otf" : { + "installed_by" : [ + "fonts-adf-libris" + ] + }, + "librisadfstd-regular.otf" : { + "installed_by" : [ + "fonts-adf-libris" + ] + }, + "licostrg.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "lightout.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "likhannormal.ttf" : { + "installed_by" : [ + "fonts-beng-extra" + ] + }, + "lilach.otf" : { + "installed_by" : [ + "fonts-ldco" + ] + }, + "lilach.ttf" : { + "installed_by" : [ + "fonts-ldco" + ] + }, + "linbiolinum_k.otf" : { + "installed_by" : [ + "fonts-linuxlibertine" + ] + }, + "linbiolinum_r.otf" : { + "installed_by" : [ + "fonts-linuxlibertine" + ] + }, + "linbiolinum_rb.otf" : { + "installed_by" : [ + "fonts-linuxlibertine" + ] + }, + "linbiolinum_ri.otf" : { + "installed_by" : [ + "fonts-linuxlibertine" + ] + }, + "lindenhill-italic.otf" : { + "installed_by" : [ + "fonts-lindenhill" + ] + }, + "lindenhill.otf" : { + "installed_by" : [ + "fonts-lindenhill" + ] + }, + "lineding.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "linlibertine_dr.otf" : { + "installed_by" : [ + "fonts-linuxlibertine" + ] + }, + "linlibertine_i.otf" : { + "installed_by" : [ + "fonts-linuxlibertine" + ] + }, + "linlibertine_m.otf" : { + "installed_by" : [ + "fonts-linuxlibertine" + ] + }, + "linlibertine_r.otf" : { + "installed_by" : [ + "fonts-linuxlibertine" + ] + }, + "linlibertine_rb.otf" : { + "installed_by" : [ + "fonts-linuxlibertine" + ] + }, + "linlibertine_rbi.otf" : { + "installed_by" : [ + "fonts-linuxlibertine" + ] + }, + "linlibertine_ri.otf" : { + "installed_by" : [ + "fonts-linuxlibertine" + ] + }, + "linlibertine_rz.otf" : { + "installed_by" : [ + "fonts-linuxlibertine" + ] + }, + "linlibertine_rzi.otf" : { + "installed_by" : [ + "fonts-linuxlibertine" + ] + }, + "lklug.ttf" : { + "installed_by" : [ + "fonts-lklug-sinhala" + ] + }, + "lmmono10-italic.otf" : { + "installed_by" : [ + "fonts-lmodern" + ] + }, + "lmmono10-regular.otf" : { + "installed_by" : [ + "fonts-lmodern" + ] + }, + "lmmono12-regular.otf" : { + "installed_by" : [ + "fonts-lmodern" + ] + }, + "lmmono8-regular.otf" : { + "installed_by" : [ + "fonts-lmodern" + ] + }, + "lmmono9-regular.otf" : { + "installed_by" : [ + "fonts-lmodern" + ] + }, + "lmmonocaps10-oblique.otf" : { + "installed_by" : [ + "fonts-lmodern" + ] + }, + "lmmonocaps10-regular.otf" : { + "installed_by" : [ + "fonts-lmodern" + ] + }, + "lmmonolt10-bold.otf" : { + "installed_by" : [ + "fonts-lmodern" + ] + }, + "lmmonolt10-boldoblique.otf" : { + "installed_by" : [ + "fonts-lmodern" + ] + }, + "lmmonolt10-oblique.otf" : { + "installed_by" : [ + "fonts-lmodern" + ] + }, + "lmmonolt10-regular.otf" : { + "installed_by" : [ + "fonts-lmodern" + ] + }, + "lmmonoltcond10-oblique.otf" : { + "installed_by" : [ + "fonts-lmodern" + ] + }, + "lmmonoltcond10-regular.otf" : { + "installed_by" : [ + "fonts-lmodern" + ] + }, + "lmmonoprop10-oblique.otf" : { + "installed_by" : [ + "fonts-lmodern" + ] + }, + "lmmonoprop10-regular.otf" : { + "installed_by" : [ + "fonts-lmodern" + ] + }, + "lmmonoproplt10-bold.otf" : { + "installed_by" : [ + "fonts-lmodern" + ] + }, + "lmmonoproplt10-boldoblique.otf" : { + "installed_by" : [ + "fonts-lmodern" + ] + }, + "lmmonoproplt10-oblique.otf" : { + "installed_by" : [ + "fonts-lmodern" + ] + }, + "lmmonoproplt10-regular.otf" : { + "installed_by" : [ + "fonts-lmodern" + ] + }, + "lmmonoslant10-regular.otf" : { + "installed_by" : [ + "fonts-lmodern" + ] + }, + "lmroman10-bold.otf" : { + "installed_by" : [ + "fonts-lmodern" + ] + }, + "lmroman10-bolditalic.otf" : { + "installed_by" : [ + "fonts-lmodern" + ] + }, + "lmroman10-italic.otf" : { + "installed_by" : [ + "fonts-lmodern" + ] + }, + "lmroman10-regular.otf" : { + "installed_by" : [ + "fonts-lmodern" + ] + }, + "lmroman12-bold.otf" : { + "installed_by" : [ + "fonts-lmodern" + ] + }, + "lmroman12-italic.otf" : { + "installed_by" : [ + "fonts-lmodern" + ] + }, + "lmroman12-regular.otf" : { + "installed_by" : [ + "fonts-lmodern" + ] + }, + "lmroman17-regular.otf" : { + "installed_by" : [ + "fonts-lmodern" + ] + }, + "lmroman5-bold.otf" : { + "installed_by" : [ + "fonts-lmodern" + ] + }, + "lmroman5-regular.otf" : { + "installed_by" : [ + "fonts-lmodern" + ] + }, + "lmroman6-bold.otf" : { + "installed_by" : [ + "fonts-lmodern" + ] + }, + "lmroman6-regular.otf" : { + "installed_by" : [ + "fonts-lmodern" + ] + }, + "lmroman7-bold.otf" : { + "installed_by" : [ + "fonts-lmodern" + ] + }, + "lmroman7-italic.otf" : { + "installed_by" : [ + "fonts-lmodern" + ] + }, + "lmroman7-regular.otf" : { + "installed_by" : [ + "fonts-lmodern" + ] + }, + "lmroman8-bold.otf" : { + "installed_by" : [ + "fonts-lmodern" + ] + }, + "lmroman8-italic.otf" : { + "installed_by" : [ + "fonts-lmodern" + ] + }, + "lmroman8-regular.otf" : { + "installed_by" : [ + "fonts-lmodern" + ] + }, + "lmroman9-bold.otf" : { + "installed_by" : [ + "fonts-lmodern" + ] + }, + "lmroman9-italic.otf" : { + "installed_by" : [ + "fonts-lmodern" + ] + }, + "lmroman9-regular.otf" : { + "installed_by" : [ + "fonts-lmodern" + ] + }, + "lmromancaps10-oblique.otf" : { + "installed_by" : [ + "fonts-lmodern" + ] + }, + "lmromancaps10-regular.otf" : { + "installed_by" : [ + "fonts-lmodern" + ] + }, + "lmromandemi10-oblique.otf" : { + "installed_by" : [ + "fonts-lmodern" + ] + }, + "lmromandemi10-regular.otf" : { + "installed_by" : [ + "fonts-lmodern" + ] + }, + "lmromandunh10-oblique.otf" : { + "installed_by" : [ + "fonts-lmodern" + ] + }, + "lmromandunh10-regular.otf" : { + "installed_by" : [ + "fonts-lmodern" + ] + }, + "lmromanslant10-bold.otf" : { + "installed_by" : [ + "fonts-lmodern" + ] + }, + "lmromanslant10-regular.otf" : { + "installed_by" : [ + "fonts-lmodern" + ] + }, + "lmromanslant12-regular.otf" : { + "installed_by" : [ + "fonts-lmodern" + ] + }, + "lmromanslant17-regular.otf" : { + "installed_by" : [ + "fonts-lmodern" + ] + }, + "lmromanslant8-regular.otf" : { + "installed_by" : [ + "fonts-lmodern" + ] + }, + "lmromanslant9-regular.otf" : { + "installed_by" : [ + "fonts-lmodern" + ] + }, + "lmromanunsl10-regular.otf" : { + "installed_by" : [ + "fonts-lmodern" + ] + }, + "lmsans10-bold.otf" : { + "installed_by" : [ + "fonts-lmodern" + ] + }, + "lmsans10-boldoblique.otf" : { + "installed_by" : [ + "fonts-lmodern" + ] + }, + "lmsans10-oblique.otf" : { + "installed_by" : [ + "fonts-lmodern" + ] + }, + "lmsans10-regular.otf" : { + "installed_by" : [ + "fonts-lmodern" + ] + }, + "lmsans12-oblique.otf" : { + "installed_by" : [ + "fonts-lmodern" + ] + }, + "lmsans12-regular.otf" : { + "installed_by" : [ + "fonts-lmodern" + ] + }, + "lmsans17-oblique.otf" : { + "installed_by" : [ + "fonts-lmodern" + ] + }, + "lmsans17-regular.otf" : { + "installed_by" : [ + "fonts-lmodern" + ] + }, + "lmsans8-oblique.otf" : { + "installed_by" : [ + "fonts-lmodern" + ] + }, + "lmsans8-regular.otf" : { + "installed_by" : [ + "fonts-lmodern" + ] + }, + "lmsans9-oblique.otf" : { + "installed_by" : [ + "fonts-lmodern" + ] + }, + "lmsans9-regular.otf" : { + "installed_by" : [ + "fonts-lmodern" + ] + }, + "lmsansdemicond10-oblique.otf" : { + "installed_by" : [ + "fonts-lmodern" + ] + }, + "lmsansdemicond10-regular.otf" : { + "installed_by" : [ + "fonts-lmodern" + ] + }, + "lmsansquot8-bold.otf" : { + "installed_by" : [ + "fonts-lmodern" + ] + }, + "lmsansquot8-boldoblique.otf" : { + "installed_by" : [ + "fonts-lmodern" + ] + }, + "lmsansquot8-oblique.otf" : { + "installed_by" : [ + "fonts-lmodern" + ] + }, + "lmsansquot8-regular.otf" : { + "installed_by" : [ + "fonts-lmodern" + ] + }, + "lobster.otf" : { + "installed_by" : [ + "fonts-lobster" + ] + }, + "lobstertwo-bold.otf" : { + "installed_by" : [ + "fonts-lobstertwo" + ] + }, + "lobstertwo-bolditalic.otf" : { + "installed_by" : [ + "fonts-lobstertwo" + ] + }, + "lobstertwo-italic.otf" : { + "installed_by" : [ + "fonts-lobstertwo" + ] + }, + "lobstertwo-regular.otf" : { + "installed_by" : [ + "fonts-lobstertwo" + ] + }, + "lohit-assamese.ttf" : { + "installed_by" : [ + "fonts-lohit-beng-assamese" + ] + }, + "lohit-bengali.ttf" : { + "installed_by" : [ + "fonts-lohit-beng-bengali" + ] + }, + "lohit-devanagari.ttf" : { + "installed_by" : [ + "fonts-lohit-deva" + ] + }, + "lohit-gujarati.ttf" : { + "installed_by" : [ + "fonts-lohit-gujr" + ] + }, + "lohit-gurmukhi.ttf" : { + "installed_by" : [ + "fonts-lohit-guru" + ] + }, + "lohit-kannada.ttf" : { + "installed_by" : [ + "fonts-lohit-knda" + ] + }, + "lohit-malayalam.ttf" : { + "installed_by" : [ + "fonts-lohit-mlym" + ] + }, + "lohit-marathi.ttf" : { + "installed_by" : [ + "fonts-lohit-deva-marathi" + ] + }, + "lohit-nepali.ttf" : { + "installed_by" : [ + "fonts-lohit-deva-nepali" + ] + }, + "lohit-odia.ttf" : { + "installed_by" : [ + "fonts-lohit-orya" + ] + }, + "lohit-tamil-classical.ttf" : { + "installed_by" : [ + "fonts-lohit-taml-classical" + ] + }, + "lohit-tamil.ttf" : { + "installed_by" : [ + "fonts-lohit-taml" + ] + }, + "lohit-telugu.ttf" : { + "installed_by" : [ + "fonts-lohit-telu" + ] + }, + "loma-bold.otf" : { + "installed_by" : [ + "fonts-tlwg-loma-otf" + ] + }, + "loma-bold.ttf" : { + "installed_by" : [ + "fonts-tlwg-loma-ttf" + ] + }, + "loma-boldoblique.otf" : { + "installed_by" : [ + "fonts-tlwg-loma-otf" + ] + }, + "loma-boldoblique.ttf" : { + "installed_by" : [ + "fonts-tlwg-loma-ttf" + ] + }, + "loma-oblique.otf" : { + "installed_by" : [ + "fonts-tlwg-loma-otf" + ] + }, + "loma-oblique.ttf" : { + "installed_by" : [ + "fonts-tlwg-loma-ttf" + ] + }, + "loma.otf" : { + "installed_by" : [ + "fonts-tlwg-loma-otf" + ] + }, + "loma.ttf" : { + "installed_by" : [ + "fonts-tlwg-loma-ttf" + ] + }, + "loopy.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "lowdown.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "lucid.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "lucid2.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "lucid2o.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "lucido.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "lyneous.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "lyneousl.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "lynx.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "macropsi.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "madscrwl.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "mallanna.ttf" : { + "installed_by" : [ + "fonts-teluguvijayam" + ] + }, + "manchufont.ttf" : { + "installed_by" : [ + "fonts-manchufont" + ] + }, + "mandali-regular.ttf" : { + "installed_by" : [ + "fonts-teluguvijayam" + ] + }, + "manjari-bold.otf" : { + "installed_by" : [ + "fonts-smc-manjari" + ] + }, + "manjari-regular.otf" : { + "installed_by" : [ + "fonts-smc-manjari" + ] + }, + "manjari-thin.otf" : { + "installed_by" : [ + "fonts-smc-manjari" + ] + }, + "manrope-bold.ttf" : { + "installed_by" : [ + "fonts-manrope" + ] + }, + "manrope-extrabold.ttf" : { + "installed_by" : [ + "fonts-manrope" + ] + }, + "manrope-extralight.ttf" : { + "installed_by" : [ + "fonts-manrope" + ] + }, + "manrope-light.ttf" : { + "installed_by" : [ + "fonts-manrope" + ] + }, + "manrope-medium.ttf" : { + "installed_by" : [ + "fonts-manrope" + ] + }, + "manrope-regular.ttf" : { + "installed_by" : [ + "fonts-manrope" + ] + }, + "manrope-semibold.ttf" : { + "installed_by" : [ + "fonts-manrope" + ] + }, + "markedfool.ttf" : { + "installed_by" : [ + "fonts-dustin" + ] + }, + "marlett.ttf" : { + "installed_by" : [ + "fonts-wine" + ] + }, + "materialdesignicons-webfont.ttf" : { + "installed_by" : [ + "fonts-materialdesignicons-webfont", + "fonts-materialdesignicons-webfont" + ] + }, + "materialicons-regular.ttf" : { + "installed_by" : [ + "fonts-material-design-icons-iconfont" + ] + }, + "mathjax_ams-regular.otf" : { + "installed_by" : [ + "fonts-mathjax" + ] + }, + "mathjax_caligraphic-bold.otf" : { + "installed_by" : [ + "fonts-mathjax" + ] + }, + "mathjax_caligraphic-regular.otf" : { + "installed_by" : [ + "fonts-mathjax" + ] + }, + "mathjax_fraktur-bold.otf" : { + "installed_by" : [ + "fonts-mathjax" + ] + }, + "mathjax_fraktur-regular.otf" : { + "installed_by" : [ + "fonts-mathjax" + ] + }, + "mathjax_main-bold.otf" : { + "installed_by" : [ + "fonts-mathjax" + ] + }, + "mathjax_main-italic.otf" : { + "installed_by" : [ + "fonts-mathjax" + ] + }, + "mathjax_main-regular.otf" : { + "installed_by" : [ + "fonts-mathjax" + ] + }, + "mathjax_math-bolditalic.otf" : { + "installed_by" : [ + "fonts-mathjax" + ] + }, + "mathjax_math-italic.otf" : { + "installed_by" : [ + "fonts-mathjax" + ] + }, + "mathjax_math-regular.otf" : { + "installed_by" : [ + "fonts-mathjax" + ] + }, + "mathjax_sansserif-bold.otf" : { + "installed_by" : [ + "fonts-mathjax" + ] + }, + "mathjax_sansserif-italic.otf" : { + "installed_by" : [ + "fonts-mathjax" + ] + }, + "mathjax_sansserif-regular.otf" : { + "installed_by" : [ + "fonts-mathjax" + ] + }, + "mathjax_script-regular.otf" : { + "installed_by" : [ + "fonts-mathjax" + ] + }, + "mathjax_size1-regular.otf" : { + "installed_by" : [ + "fonts-mathjax" + ] + }, + "mathjax_size2-regular.otf" : { + "installed_by" : [ + "fonts-mathjax" + ] + }, + "mathjax_size3-regular.otf" : { + "installed_by" : [ + "fonts-mathjax" + ] + }, + "mathjax_size4-regular.otf" : { + "installed_by" : [ + "fonts-mathjax" + ] + }, + "mathjax_typewriter-regular.otf" : { + "installed_by" : [ + "fonts-mathjax" + ] + }, + "mathjax_vector-bold.otf" : { + "installed_by" : [ + "fonts-mathjax" + ] + }, + "mathjax_vector-regular.otf" : { + "installed_by" : [ + "fonts-mathjax" + ] + }, + "mathjax_winchrome-regular.otf" : { + "installed_by" : [ + "fonts-mathjax" + ] + }, + "mathjax_winie6-regular.otf" : { + "installed_by" : [ + "fonts-mathjax" + ] + }, + "maya_hint.ttf" : { + "installed_by" : [ + "fonts-ancient-scripts" + ] + }, + "meera-regular.ttf" : { + "installed_by" : [ + "fonts-smc-meera" + ] + }, + "meerainimai-regular.ttf" : { + "installed_by" : [ + "fonts-meera-inimai" + ] + }, + "mekanusadfstd-bold.otf" : { + "installed_by" : [ + "fonts-adf-mekanus" + ] + }, + "mekanusadfstd-bolditalic.otf" : { + "installed_by" : [ + "fonts-adf-mekanus" + ] + }, + "mekanusadfstd-italic.otf" : { + "installed_by" : [ + "fonts-adf-mekanus" + ] + }, + "mekanusadfstd-regular.otf" : { + "installed_by" : [ + "fonts-adf-mekanus" + ] + }, + "mekanusadftitlingstd-bditalic.otf" : { + "installed_by" : [ + "fonts-adf-mekanus" + ] + }, + "mekanusadftitlingstd-bold.otf" : { + "installed_by" : [ + "fonts-adf-mekanus" + ] + }, + "mekanusadftitlingstd-italic.otf" : { + "installed_by" : [ + "fonts-adf-mekanus" + ] + }, + "mekanusadftitlingstd-regular.otf" : { + "installed_by" : [ + "fonts-adf-mekanus" + ] + }, + "migmix-1m-bold.ttf" : { + "installed_by" : [ + "fonts-migmix" + ] + }, + "migmix-1m-regular.ttf" : { + "installed_by" : [ + "fonts-migmix" + ] + }, + "migmix-1p-bold.ttf" : { + "installed_by" : [ + "fonts-migmix" + ] + }, + "migmix-1p-regular.ttf" : { + "installed_by" : [ + "fonts-migmix" + ] + }, + "migmix-2m-bold.ttf" : { + "installed_by" : [ + "fonts-migmix" + ] + }, + "migmix-2m-regular.ttf" : { + "installed_by" : [ + "fonts-migmix" + ] + }, + "migmix-2p-bold.ttf" : { + "installed_by" : [ + "fonts-migmix" + ] + }, + "migmix-2p-regular.ttf" : { + "installed_by" : [ + "fonts-migmix" + ] + }, + "migu-1c-bold.ttf" : { + "installed_by" : [ + "fonts-migmix" + ] + }, + "migu-1c-regular.ttf" : { + "installed_by" : [ + "fonts-migmix" + ] + }, + "migu-1m-bold.ttf" : { + "installed_by" : [ + "fonts-migmix" + ] + }, + "migu-1m-regular.ttf" : { + "installed_by" : [ + "fonts-migmix" + ] + }, + "migu-1p-bold.ttf" : { + "installed_by" : [ + "fonts-migmix" + ] + }, + "migu-1p-regular.ttf" : { + "installed_by" : [ + "fonts-migmix" + ] + }, + "migu-2m-bold.ttf" : { + "installed_by" : [ + "fonts-migmix" + ] + }, + "migu-2m-regular.ttf" : { + "installed_by" : [ + "fonts-migmix" + ] + }, + "mima4x4i.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "mima4x4o.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "mimaalt1.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "mimaalt2.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "mimafuse.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "mincer.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "mingzat-regular.ttf" : { + "installed_by" : [ + "fonts-sil-mingzat" + ] + }, + "minikott.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "minikstt.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "misaki_gothic.ttf" : { + "installed_by" : [ + "fonts-misaki" + ] + }, + "misaki_gothic_2nd.ttf" : { + "installed_by" : [ + "fonts-misaki" + ] + }, + "misaki_mincho.ttf" : { + "installed_by" : [ + "fonts-misaki" + ] + }, + "mishmash.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "miso.otf" : { + "installed_by" : [ + "fonts-ldco" + ] + }, + "miso.ttf" : { + "installed_by" : [ + "fonts-ldco" + ] + }, + "mitramono.ttf" : { + "installed_by" : [ + "fonts-beng-extra" + ] + }, + "mixer.otf" : { + "installed_by" : [ + "fonts-ldco" + ] + }, + "mixer.ttf" : { + "installed_by" : [ + "fonts-ldco" + ] + }, + "mm3-multi-os_16-08-2011.ttf" : { + "installed_by" : [ + "fonts-myanmar" + ] + }, + "mmcedar-p.ttf" : { + "installed_by" : [ + "fonts-mmcedar" + ] + }, + "mmcedar.ttf" : { + "installed_by" : [ + "fonts-mmcedar" + ] + }, + "mmrcensus.v5.minbe5.ttf" : { + "installed_by" : [ + "fonts-myanmar" + ] + }, + "mo5v56bu.ttf" : { + "installed_by" : [ + "fonts-sil-mondulkiri-extra" + ] + }, + "mo5v56dc.ttf" : { + "installed_by" : [ + "fonts-sil-mondulkiri-extra" + ] + }, + "mo5v56di.ttf" : { + "installed_by" : [ + "fonts-sil-mondulkiri-extra" + ] + }, + "mo5v56do.ttf" : { + "installed_by" : [ + "fonts-sil-mondulkiri-extra" + ] + }, + "mo5v56hi.ttf" : { + "installed_by" : [ + "fonts-sil-mondulkiri-extra" + ] + }, + "mo5v56mo.ttf" : { + "installed_by" : [ + "fonts-sil-mondulkiri-extra" + ] + }, + "mo5v56xs.ttf" : { + "installed_by" : [ + "fonts-sil-mondulkiri-extra" + ] + }, + "mo9v55.ttf" : { + "installed_by" : [ + "fonts-sil-mondulkiri-extra" + ] + }, + "mobilize.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "mona.ttf" : { + "installed_by" : [ + "fonts-mona" + ] + }, + "monapo.ttf" : { + "installed_by" : [ + "fonts-monapo" + ] + }, + "mondulkiri-b.ttf" : { + "installed_by" : [ + "fonts-sil-mondulkiri" + ] + }, + "mondulkiri-bi.ttf" : { + "installed_by" : [ + "fonts-sil-mondulkiri" + ] + }, + "mondulkiri-i.ttf" : { + "installed_by" : [ + "fonts-sil-mondulkiri" + ] + }, + "mondulkiri-r.ttf" : { + "installed_by" : [ + "fonts-sil-mondulkiri" + ] + }, + "monkphon.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "monof55.ttf" : { + "installed_by" : [ + "fonts-monofur" + ] + }, + "monof56.ttf" : { + "installed_by" : [ + "fonts-monofur" + ] + }, + "monoid-bold-halfloose.ttf" : { + "installed_by" : [ + "fonts-monoid-halfloose" + ] + }, + "monoid-bold-halftight.ttf" : { + "installed_by" : [ + "fonts-monoid-halftight" + ] + }, + "monoid-bold-loose.ttf" : { + "installed_by" : [ + "fonts-monoid-loose" + ] + }, + "monoid-bold-tight.ttf" : { + "installed_by" : [ + "fonts-monoid-tight" + ] + }, + "monoid-bold.ttf" : { + "installed_by" : [ + "fonts-monoid" + ] + }, + "monoid-italic-halfloose.ttf" : { + "installed_by" : [ + "fonts-monoid-halfloose" + ] + }, + "monoid-italic-halftight.ttf" : { + "installed_by" : [ + "fonts-monoid-halftight" + ] + }, + "monoid-italic-loose.ttf" : { + "installed_by" : [ + "fonts-monoid-loose" + ] + }, + "monoid-italic-tight.ttf" : { + "installed_by" : [ + "fonts-monoid-tight" + ] + }, + "monoid-italic.ttf" : { + "installed_by" : [ + "fonts-monoid" + ] + }, + "monoid-regular-halfloose.ttf" : { + "installed_by" : [ + "fonts-monoid-halfloose" + ] + }, + "monoid-regular-halftight.ttf" : { + "installed_by" : [ + "fonts-monoid-halftight" + ] + }, + "monoid-regular-loose.ttf" : { + "installed_by" : [ + "fonts-monoid-loose" + ] + }, + "monoid-regular-tight.ttf" : { + "installed_by" : [ + "fonts-monoid-tight" + ] + }, + "monoid-regular.ttf" : { + "installed_by" : [ + "fonts-monoid" + ] + }, + "monoid-retina-halfloose.ttf" : { + "installed_by" : [ + "fonts-monoid-halfloose" + ] + }, + "monoid-retina-halftight.ttf" : { + "installed_by" : [ + "fonts-monoid-halftight" + ] + }, + "monoid-retina-loose.ttf" : { + "installed_by" : [ + "fonts-monoid-loose" + ] + }, + "monoid-retina-tight.ttf" : { + "installed_by" : [ + "fonts-monoid-tight" + ] + }, + "monoid-retina.ttf" : { + "installed_by" : [ + "fonts-monoid" + ] + }, + "monoisome-regular-halfloose.ttf" : { + "installed_by" : [ + "fonts-monoid-halfloose" + ] + }, + "monoisome-regular-halftight.ttf" : { + "installed_by" : [ + "fonts-monoid-halftight" + ] + }, + "monoisome-regular-loose.ttf" : { + "installed_by" : [ + "fonts-monoid-loose" + ] + }, + "monoisome-regular-tight.ttf" : { + "installed_by" : [ + "fonts-monoid-tight" + ] + }, + "monoisome-regular.ttf" : { + "installed_by" : [ + "fonts-monoid" + ] + }, + "mononoki-bold.ttf" : { + "installed_by" : [ + "fonts-mononoki" + ] + }, + "mononoki-bolditalic.ttf" : { + "installed_by" : [ + "fonts-mononoki" + ] + }, + "mononoki-italic.ttf" : { + "installed_by" : [ + "fonts-mononoki" + ] + }, + "mononoki-regular.ttf" : { + "installed_by" : [ + "fonts-mononoki" + ] + }, + "monou___.ttf" : { + "installed_by" : [ + "fonts-uralic" + ] + }, + "moronmis.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "mplus-1c-black.ttf" : { + "installed_by" : [ + "fonts-mplus" + ] + }, + "mplus-1c-bold.ttf" : { + "installed_by" : [ + "fonts-mplus" + ] + }, + "mplus-1c-heavy.ttf" : { + "installed_by" : [ + "fonts-mplus" + ] + }, + "mplus-1c-light.ttf" : { + "installed_by" : [ + "fonts-mplus" + ] + }, + "mplus-1c-medium.ttf" : { + "installed_by" : [ + "fonts-mplus" + ] + }, + "mplus-1c-regular.ttf" : { + "installed_by" : [ + "fonts-mplus" + ] + }, + "mplus-1c-thin.ttf" : { + "installed_by" : [ + "fonts-mplus" + ] + }, + "mplus-1m-bold.ttf" : { + "installed_by" : [ + "fonts-mplus" + ] + }, + "mplus-1m-light.ttf" : { + "installed_by" : [ + "fonts-mplus" + ] + }, + "mplus-1m-medium.ttf" : { + "installed_by" : [ + "fonts-mplus" + ] + }, + "mplus-1m-regular.ttf" : { + "installed_by" : [ + "fonts-mplus" + ] + }, + "mplus-1m-thin.ttf" : { + "installed_by" : [ + "fonts-mplus" + ] + }, + "mplus-1mn-bold.ttf" : { + "installed_by" : [ + "fonts-mplus" + ] + }, + "mplus-1mn-light.ttf" : { + "installed_by" : [ + "fonts-mplus" + ] + }, + "mplus-1mn-medium.ttf" : { + "installed_by" : [ + "fonts-mplus" + ] + }, + "mplus-1mn-regular.ttf" : { + "installed_by" : [ + "fonts-mplus" + ] + }, + "mplus-1mn-thin.ttf" : { + "installed_by" : [ + "fonts-mplus" + ] + }, + "mplus-1p-black.ttf" : { + "installed_by" : [ + "fonts-mplus" + ] + }, + "mplus-1p-bold.ttf" : { + "installed_by" : [ + "fonts-mplus" + ] + }, + "mplus-1p-heavy.ttf" : { + "installed_by" : [ + "fonts-mplus" + ] + }, + "mplus-1p-light.ttf" : { + "installed_by" : [ + "fonts-mplus" + ] + }, + "mplus-1p-medium.ttf" : { + "installed_by" : [ + "fonts-mplus" + ] + }, + "mplus-1p-regular.ttf" : { + "installed_by" : [ + "fonts-mplus" + ] + }, + "mplus-1p-thin.ttf" : { + "installed_by" : [ + "fonts-mplus" + ] + }, + "mplus-2c-black.ttf" : { + "installed_by" : [ + "fonts-mplus" + ] + }, + "mplus-2c-bold.ttf" : { + "installed_by" : [ + "fonts-mplus" + ] + }, + "mplus-2c-heavy.ttf" : { + "installed_by" : [ + "fonts-mplus" + ] + }, + "mplus-2c-light.ttf" : { + "installed_by" : [ + "fonts-mplus" + ] + }, + "mplus-2c-medium.ttf" : { + "installed_by" : [ + "fonts-mplus" + ] + }, + "mplus-2c-regular.ttf" : { + "installed_by" : [ + "fonts-mplus" + ] + }, + "mplus-2c-thin.ttf" : { + "installed_by" : [ + "fonts-mplus" + ] + }, + "mplus-2m-bold.ttf" : { + "installed_by" : [ + "fonts-mplus" + ] + }, + "mplus-2m-light.ttf" : { + "installed_by" : [ + "fonts-mplus" + ] + }, + "mplus-2m-medium.ttf" : { + "installed_by" : [ + "fonts-mplus" + ] + }, + "mplus-2m-regular.ttf" : { + "installed_by" : [ + "fonts-mplus" + ] + }, + "mplus-2m-thin.ttf" : { + "installed_by" : [ + "fonts-mplus" + ] + }, + "mplus-2p-black.ttf" : { + "installed_by" : [ + "fonts-mplus" + ] + }, + "mplus-2p-bold.ttf" : { + "installed_by" : [ + "fonts-mplus" + ] + }, + "mplus-2p-heavy.ttf" : { + "installed_by" : [ + "fonts-mplus" + ] + }, + "mplus-2p-light.ttf" : { + "installed_by" : [ + "fonts-mplus" + ] + }, + "mplus-2p-medium.ttf" : { + "installed_by" : [ + "fonts-mplus" + ] + }, + "mplus-2p-regular.ttf" : { + "installed_by" : [ + "fonts-mplus" + ] + }, + "mplus-2p-thin.ttf" : { + "installed_by" : [ + "fonts-mplus" + ] + }, + "mry_kacstqurn.ttf" : { + "installed_by" : [ + "fonts-kacst" + ] + }, + "ms_sans_serif.ttf" : { + "installed_by" : [ + "fonts-wine" + ] + }, + "msam10.ttf" : { + "installed_by" : [ + "fonts-lyx" + ] + }, + "msbm10.ttf" : { + "installed_by" : [ + "fonts-lyx" + ] + }, + "mtlc3m.ttf" : { + "installed_by" : [ + "fonts-motoya-l-cedar" + ] + }, + "mtlmr3m.ttf" : { + "installed_by" : [ + "fonts-motoya-l-maruberi" + ] + }, + "mukti.ttf" : { + "installed_by" : [ + "fonts-beng-extra" + ] + }, + "muktibold.ttf" : { + "installed_by" : [ + "fonts-beng-extra" + ] + }, + "museumbible.otf" : { + "installed_by" : [ + "fonts-levien-museum" + ] + }, + "museumfoundry.otf" : { + "installed_by" : [ + "fonts-levien-museum" + ] + }, + "museumfourteen.otf" : { + "installed_by" : [ + "fonts-levien-museum" + ] + }, + "museumsixty.otf" : { + "installed_by" : [ + "fonts-levien-museum" + ] + }, + "musica_hint.ttf" : { + "installed_by" : [ + "fonts-ancient-scripts" + ] + }, + "myanmarchatu.ttf" : { + "installed_by" : [ + "fonts-myanmar" + ] + }, + "myanmarchatulight.ttf" : { + "installed_by" : [ + "fonts-myanmar" + ] + }, + "myanmargantgaw.ttf" : { + "installed_by" : [ + "fonts-myanmar" + ] + }, + "myanmarkhyay.ttf" : { + "installed_by" : [ + "fonts-myanmar" + ] + }, + "myanmarkuttar.ttf" : { + "installed_by" : [ + "fonts-myanmar" + ] + }, + "myanmarnayone.ttf" : { + "installed_by" : [ + "fonts-myanmar" + ] + }, + "myanmarnjaun.ttf" : { + "installed_by" : [ + "fonts-myanmar" + ] + }, + "myanmarpauklay.ttf" : { + "installed_by" : [ + "fonts-myanmar" + ] + }, + "myanmarphetsot.ttf" : { + "installed_by" : [ + "fonts-myanmar" + ] + }, + "myanmarphiksel.ttf" : { + "installed_by" : [ + "fonts-myanmar" + ] + }, + "myanmarphikselsmooth.ttf" : { + "installed_by" : [ + "fonts-myanmar" + ] + }, + "myanmarponenyet.ttf" : { + "installed_by" : [ + "fonts-myanmar" + ] + }, + "myanmarsabae.ttf" : { + "installed_by" : [ + "fonts-myanmar" + ] + }, + "myanmarsagar.ttf" : { + "installed_by" : [ + "fonts-myanmar" + ] + }, + "myanmarsanpya.ttf" : { + "installed_by" : [ + "fonts-myanmar" + ] + }, + "myanmarsanspro-regular.ttf" : { + "installed_by" : [ + "fonts-myanmar" + ] + }, + "myanmarsquarelight.ttf" : { + "installed_by" : [ + "fonts-myanmar" + ] + }, + "myanmartagu.ttf" : { + "installed_by" : [ + "fonts-myanmar" + ] + }, + "myanmarthuriya.ttf" : { + "installed_by" : [ + "fonts-myanmar" + ] + }, + "myanmarwaso.ttf" : { + "installed_by" : [ + "fonts-myanmar" + ] + }, + "myanmaryinmar.ttf" : { + "installed_by" : [ + "fonts-myanmar" + ] + }, + "mysteron.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "n019003d.pfb" : { + "installed_by" : [ + "t1-cyrillic" + ] + }, + "n019004d.pfb" : { + "installed_by" : [ + "t1-cyrillic" + ] + }, + "n019023d.pfb" : { + "installed_by" : [ + "t1-cyrillic" + ] + }, + "n019024d.pfb" : { + "installed_by" : [ + "t1-cyrillic" + ] + }, + "n019043d.pfb" : { + "installed_by" : [ + "t1-cyrillic" + ] + }, + "n019044d.pfb" : { + "installed_by" : [ + "t1-cyrillic" + ] + }, + "n019063d.pfb" : { + "installed_by" : [ + "t1-cyrillic" + ] + }, + "n019064d.pfb" : { + "installed_by" : [ + "t1-cyrillic" + ] + }, + "n021003d.pfb" : { + "installed_by" : [ + "t1-cyrillic" + ] + }, + "n021004d.pfb" : { + "installed_by" : [ + "t1-cyrillic" + ] + }, + "n021023d.pfb" : { + "installed_by" : [ + "t1-cyrillic" + ] + }, + "n021024d.pfb" : { + "installed_by" : [ + "t1-cyrillic" + ] + }, + "n022003d.pfb" : { + "installed_by" : [ + "t1-cyrillic" + ] + }, + "n022004d.pfb" : { + "installed_by" : [ + "t1-cyrillic" + ] + }, + "n022023d.pfb" : { + "installed_by" : [ + "t1-cyrillic" + ] + }, + "n022024d.pfb" : { + "installed_by" : [ + "t1-cyrillic" + ] + }, + "nafeesweb.ttf" : { + "installed_by" : [ + "fonts-nafees" + ] + }, + "nakula.ttf" : { + "installed_by" : [ + "fonts-nakula" + ] + }, + "nanosecw.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "nanumbarungothic-yethangul.ttf" : { + "installed_by" : [ + "fonts-nanum-extra" + ] + }, + "nanumbarungothic.ttf" : { + "installed_by" : [ + "fonts-nanum" + ] + }, + "nanumbarungothicbold.ttf" : { + "installed_by" : [ + "fonts-nanum" + ] + }, + "nanumbarungothiclight.ttf" : { + "installed_by" : [ + "fonts-nanum-extra" + ] + }, + "nanumbarungothicultralight.ttf" : { + "installed_by" : [ + "fonts-nanum-extra" + ] + }, + "nanumbarunpenb.ttf" : { + "installed_by" : [ + "fonts-nanum-extra" + ] + }, + "nanumbarunpenr.ttf" : { + "installed_by" : [ + "fonts-nanum-extra" + ] + }, + "nanumbrush.ttf" : { + "installed_by" : [ + "fonts-nanum-extra" + ] + }, + "nanumgothic.ttf" : { + "installed_by" : [ + "fonts-nanum" + ] + }, + "nanumgothicbold.ttf" : { + "installed_by" : [ + "fonts-nanum" + ] + }, + "nanumgothiccoding.ttf" : { + "installed_by" : [ + "fonts-nanum" + ] + }, + "nanumgothiccodingbold.ttf" : { + "installed_by" : [ + "fonts-nanum" + ] + }, + "nanumgothiceco.ttf" : { + "installed_by" : [ + "fonts-nanum-eco" + ] + }, + "nanumgothicecobold.ttf" : { + "installed_by" : [ + "fonts-nanum-eco" + ] + }, + "nanumgothicecoextrabold.ttf" : { + "installed_by" : [ + "fonts-nanum-eco" + ] + }, + "nanumgothicecor.ttf" : { + "installed_by" : [ + "fonts-nanum-extra" + ] + }, + "nanumgothicextrabold.ttf" : { + "installed_by" : [ + "fonts-nanum-extra" + ] + }, + "nanumgothiclight.ttf" : { + "installed_by" : [ + "fonts-nanum-extra" + ] + }, + "nanummyeongjo-yethangul.ttf" : { + "installed_by" : [ + "fonts-nanum-extra" + ] + }, + "nanummyeongjo.ttf" : { + "installed_by" : [ + "fonts-nanum" + ] + }, + "nanummyeongjobold.ttf" : { + "installed_by" : [ + "fonts-nanum" + ] + }, + "nanummyeongjoeco.ttf" : { + "installed_by" : [ + "fonts-nanum-eco" + ] + }, + "nanummyeongjoecobold.ttf" : { + "installed_by" : [ + "fonts-nanum-eco" + ] + }, + "nanummyeongjoecoextrabold.ttf" : { + "installed_by" : [ + "fonts-nanum-eco" + ] + }, + "nanummyeongjoecor.ttf" : { + "installed_by" : [ + "fonts-nanum-extra" + ] + }, + "nanummyeongjoextrabold.ttf" : { + "installed_by" : [ + "fonts-nanum-extra" + ] + }, + "nanumpen.ttf" : { + "installed_by" : [ + "fonts-nanum-extra" + ] + }, + "nanumsquare_acb.ttf" : { + "installed_by" : [ + "fonts-nanum-extra" + ] + }, + "nanumsquare_aceb.ttf" : { + "installed_by" : [ + "fonts-nanum-extra" + ] + }, + "nanumsquare_acl.ttf" : { + "installed_by" : [ + "fonts-nanum-extra" + ] + }, + "nanumsquare_acr.ttf" : { + "installed_by" : [ + "fonts-nanum-extra" + ] + }, + "nanumsquareb.ttf" : { + "installed_by" : [ + "fonts-nanum" + ] + }, + "nanumsquareeb.ttf" : { + "installed_by" : [ + "fonts-nanum-extra" + ] + }, + "nanumsquarel.ttf" : { + "installed_by" : [ + "fonts-nanum-extra" + ] + }, + "nanumsquarer.ttf" : { + "installed_by" : [ + "fonts-nanum" + ] + }, + "nanumsquareroundb.ttf" : { + "installed_by" : [ + "fonts-nanum" + ] + }, + "nanumsquareroundeb.ttf" : { + "installed_by" : [ + "fonts-nanum-extra" + ] + }, + "nanumsquareroundl.ttf" : { + "installed_by" : [ + "fonts-nanum-extra" + ] + }, + "nanumsquareroundr.ttf" : { + "installed_by" : [ + "fonts-nanum" + ] + }, + "nationalpark-heavy.otf" : { + "installed_by" : [ + "fonts-national-park" + ] + }, + "nationalpark-outline.otf" : { + "installed_by" : [ + "fonts-national-park" + ] + }, + "nationalpark-regular.otf" : { + "installed_by" : [ + "fonts-national-park" + ] + }, + "nationalpark-thin.otf" : { + "installed_by" : [ + "fonts-national-park" + ] + }, + "nats.ttf" : { + "installed_by" : [ + "fonts-teluguvijayam" + ] + }, + "naughts.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "navilu.ttf" : { + "installed_by" : [ + "fonts-navilu" + ] + }, + "nazli.ttf" : { + "installed_by" : [ + "fonts-farsiweb" + ] + }, + "nazlib.ttf" : { + "installed_by" : [ + "fonts-farsiweb" + ] + }, + "neo.otf" : { + "installed_by" : [ + "fonts-ldco" + ] + }, + "neo.ttf" : { + "installed_by" : [ + "fonts-ldco" + ] + }, + "neural.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "neuralol.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "nilus_hint.ttf" : { + "installed_by" : [ + "fonts-ancient-scripts" + ] + }, + "nimbusmonops-bold.otf" : { + "installed_by" : [ + "fonts-urw-base35" + ] + }, + "nimbusmonops-bold.pfb" : { + "installed_by" : [ + "fonts-urw-base35" + ] + }, + "nimbusmonops-bolditalic.otf" : { + "installed_by" : [ + "fonts-urw-base35" + ] + }, + "nimbusmonops-bolditalic.pfb" : { + "installed_by" : [ + "fonts-urw-base35" + ] + }, + "nimbusmonops-italic.otf" : { + "installed_by" : [ + "fonts-urw-base35" + ] + }, + "nimbusmonops-italic.pfb" : { + "installed_by" : [ + "fonts-urw-base35" + ] + }, + "nimbusmonops-regular.otf" : { + "installed_by" : [ + "fonts-urw-base35" + ] + }, + "nimbusmonops-regular.pfb" : { + "installed_by" : [ + "fonts-urw-base35" + ] + }, + "nimbusroman-bold.otf" : { + "installed_by" : [ + "fonts-urw-base35" + ] + }, + "nimbusroman-bold.pfb" : { + "installed_by" : [ + "fonts-urw-base35" + ] + }, + "nimbusroman-bolditalic.otf" : { + "installed_by" : [ + "fonts-urw-base35" + ] + }, + "nimbusroman-bolditalic.pfb" : { + "installed_by" : [ + "fonts-urw-base35" + ] + }, + "nimbusroman-italic.otf" : { + "installed_by" : [ + "fonts-urw-base35" + ] + }, + "nimbusroman-italic.pfb" : { + "installed_by" : [ + "fonts-urw-base35" + ] + }, + "nimbusroman-regular.otf" : { + "installed_by" : [ + "fonts-urw-base35" + ] + }, + "nimbusroman-regular.pfb" : { + "installed_by" : [ + "fonts-urw-base35" + ] + }, + "nimbussans-bold.otf" : { + "installed_by" : [ + "fonts-urw-base35" + ] + }, + "nimbussans-bold.pfb" : { + "installed_by" : [ + "fonts-urw-base35" + ] + }, + "nimbussans-bolditalic.otf" : { + "installed_by" : [ + "fonts-urw-base35" + ] + }, + "nimbussans-bolditalic.pfb" : { + "installed_by" : [ + "fonts-urw-base35" + ] + }, + "nimbussans-italic.otf" : { + "installed_by" : [ + "fonts-urw-base35" + ] + }, + "nimbussans-italic.pfb" : { + "installed_by" : [ + "fonts-urw-base35" + ] + }, + "nimbussans-regular.otf" : { + "installed_by" : [ + "fonts-urw-base35" + ] + }, + "nimbussans-regular.pfb" : { + "installed_by" : [ + "fonts-urw-base35" + ] + }, + "nimbussansnarrow-bold.otf" : { + "installed_by" : [ + "fonts-urw-base35" + ] + }, + "nimbussansnarrow-bold.pfb" : { + "installed_by" : [ + "fonts-urw-base35" + ] + }, + "nimbussansnarrow-boldoblique.otf" : { + "installed_by" : [ + "fonts-urw-base35" + ] + }, + "nimbussansnarrow-boldoblique.pfb" : { + "installed_by" : [ + "fonts-urw-base35" + ] + }, + "nimbussansnarrow-oblique.otf" : { + "installed_by" : [ + "fonts-urw-base35" + ] + }, + "nimbussansnarrow-oblique.pfb" : { + "installed_by" : [ + "fonts-urw-base35" + ] + }, + "nimbussansnarrow-regular.otf" : { + "installed_by" : [ + "fonts-urw-base35" + ] + }, + "nimbussansnarrow-regular.pfb" : { + "installed_by" : [ + "fonts-urw-base35" + ] + }, + "nk_ssmart2.ttf" : { + "installed_by" : [ + "fonts-myanmar" + ] + }, + "nk_ssmart3.ttf" : { + "installed_by" : [ + "fonts-myanmar" + ] + }, + "nk_ssmart4.ttf" : { + "installed_by" : [ + "fonts-myanmar" + ] + }, + "noam.otf" : { + "installed_by" : [ + "fonts-ldco" + ] + }, + "noam.ttf" : { + "installed_by" : [ + "fonts-ldco" + ] + }, + "nominal.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "norasi-bold.otf" : { + "installed_by" : [ + "fonts-tlwg-norasi-otf" + ] + }, + "norasi-bold.ttf" : { + "installed_by" : [ + "fonts-tlwg-norasi-ttf" + ] + }, + "norasi-bolditalic.otf" : { + "installed_by" : [ + "fonts-tlwg-norasi-otf" + ] + }, + "norasi-bolditalic.ttf" : { + "installed_by" : [ + "fonts-tlwg-norasi-ttf" + ] + }, + "norasi-boldoblique.otf" : { + "installed_by" : [ + "fonts-tlwg-norasi-otf" + ] + }, + "norasi-boldoblique.ttf" : { + "installed_by" : [ + "fonts-tlwg-norasi-ttf" + ] + }, + "norasi-italic.otf" : { + "installed_by" : [ + "fonts-tlwg-norasi-otf" + ] + }, + "norasi-italic.ttf" : { + "installed_by" : [ + "fonts-tlwg-norasi-ttf" + ] + }, + "norasi-oblique.otf" : { + "installed_by" : [ + "fonts-tlwg-norasi-otf" + ] + }, + "norasi-oblique.ttf" : { + "installed_by" : [ + "fonts-tlwg-norasi-ttf" + ] + }, + "norasi.otf" : { + "installed_by" : [ + "fonts-tlwg-norasi-otf" + ] + }, + "norasi.ttf" : { + "installed_by" : [ + "fonts-tlwg-norasi-ttf" + ] + }, + "nostalgi.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "notocoloremoji.ttf" : { + "installed_by" : [ + "fonts-noto-color-emoji" + ] + }, + "notokufiarabic-black.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notokufiarabic-bold.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notokufiarabic-extrabold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notokufiarabic-extralight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notokufiarabic-light.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notokufiarabic-medium.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notokufiarabic-regular.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notokufiarabic-semibold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notokufiarabic-thin.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoloopedlao-black.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoloopedlao-bold.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notoloopedlao-condensed.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoloopedlao-condensedblack.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoloopedlao-condensedbold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoloopedlao-condensedextrabold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoloopedlao-condensedextralight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoloopedlao-condensedlight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoloopedlao-condensedmedium.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoloopedlao-condensedsemibold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoloopedlao-condensedthin.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoloopedlao-extrabold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoloopedlao-extracondensed.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoloopedlao-extracondensedblack.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoloopedlao-extracondensedbold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoloopedlao-extracondensedextrabold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoloopedlao-extracondensedextralight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoloopedlao-extracondensedlight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoloopedlao-extracondensedmedium.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoloopedlao-extracondensedsemibold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoloopedlao-extracondensedthin.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoloopedlao-extralight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoloopedlao-light.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoloopedlao-medium.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoloopedlao-regular.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notoloopedlao-semibold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoloopedlao-semicondensed.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoloopedlao-semicondensedblack.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoloopedlao-semicondensedbold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoloopedlao-semicondensedextrabold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoloopedlao-semicondensedextralight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoloopedlao-semicondensedlight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoloopedlao-semicondensedmedium.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoloopedlao-semicondensedsemibold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoloopedlao-semicondensedthin.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoloopedlao-thin.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoloopedlaoui-black.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notoloopedlaoui-bold.ttf" : { + "installed_by" : [ + "fonts-noto-ui-core" + ] + }, + "notoloopedlaoui-condensed.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notoloopedlaoui-condensedblack.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notoloopedlaoui-condensedbold.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notoloopedlaoui-condensedextrabold.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notoloopedlaoui-condensedextralight.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notoloopedlaoui-condensedlight.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notoloopedlaoui-condensedmedium.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notoloopedlaoui-condensedsemibold.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notoloopedlaoui-condensedthin.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notoloopedlaoui-extrabold.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notoloopedlaoui-extracondensed.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notoloopedlaoui-extracondensedblack.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notoloopedlaoui-extracondensedbold.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notoloopedlaoui-extracondensedextrabold.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notoloopedlaoui-extracondensedextralight.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notoloopedlaoui-extracondensedlight.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notoloopedlaoui-extracondensedmedium.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notoloopedlaoui-extracondensedsemibold.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notoloopedlaoui-extracondensedthin.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notoloopedlaoui-extralight.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notoloopedlaoui-light.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notoloopedlaoui-medium.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notoloopedlaoui-regular.ttf" : { + "installed_by" : [ + "fonts-noto-ui-core" + ] + }, + "notoloopedlaoui-semibold.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notoloopedlaoui-semicondensed.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notoloopedlaoui-semicondensedblack.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notoloopedlaoui-semicondensedbold.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notoloopedlaoui-semicondensedextrabold.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notoloopedlaoui-semicondensedextralight.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notoloopedlaoui-semicondensedlight.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notoloopedlaoui-semicondensedmedium.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notoloopedlaoui-semicondensedsemibold.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notoloopedlaoui-semicondensedthin.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notoloopedlaoui-thin.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notoloopedthai-black.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoloopedthai-bold.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notoloopedthai-condensed.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoloopedthai-condensedblack.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoloopedthai-condensedbold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoloopedthai-condensedextrabold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoloopedthai-condensedextralight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoloopedthai-condensedlight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoloopedthai-condensedmedium.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoloopedthai-condensedsemibold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoloopedthai-condensedthin.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoloopedthai-extrabold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoloopedthai-extracondensed.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoloopedthai-extracondensedblack.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoloopedthai-extracondensedbold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoloopedthai-extracondensedextrabold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoloopedthai-extracondensedextralight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoloopedthai-extracondensedlight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoloopedthai-extracondensedmedium.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoloopedthai-extracondensedsemibold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoloopedthai-extracondensedthin.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoloopedthai-extralight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoloopedthai-light.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoloopedthai-medium.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoloopedthai-regular.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notoloopedthai-semibold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoloopedthai-semicondensed.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoloopedthai-semicondensedblack.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoloopedthai-semicondensedbold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoloopedthai-semicondensedextrabold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoloopedthai-semicondensedextralight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoloopedthai-semicondensedlight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoloopedthai-semicondensedmedium.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoloopedthai-semicondensedsemibold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoloopedthai-semicondensedthin.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoloopedthai-thin.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoloopedthaiui-black.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notoloopedthaiui-bold.ttf" : { + "installed_by" : [ + "fonts-noto-ui-core" + ] + }, + "notoloopedthaiui-condensed.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notoloopedthaiui-condensedblack.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notoloopedthaiui-condensedbold.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notoloopedthaiui-condensedextrabold.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notoloopedthaiui-condensedextralight.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notoloopedthaiui-condensedlight.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notoloopedthaiui-condensedmedium.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notoloopedthaiui-condensedsemibold.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notoloopedthaiui-condensedthin.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notoloopedthaiui-extrabold.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notoloopedthaiui-extracondensed.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notoloopedthaiui-extracondensedblack.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notoloopedthaiui-extracondensedbold.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notoloopedthaiui-extracondensedextrabold.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notoloopedthaiui-extracondensedextralight.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notoloopedthaiui-extracondensedlight.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notoloopedthaiui-extracondensedmedium.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notoloopedthaiui-extracondensedsemibold.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notoloopedthaiui-extracondensedthin.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notoloopedthaiui-extralight.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notoloopedthaiui-light.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notoloopedthaiui-medium.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notoloopedthaiui-regular.ttf" : { + "installed_by" : [ + "fonts-noto-ui-core" + ] + }, + "notoloopedthaiui-semibold.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notoloopedthaiui-semicondensed.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notoloopedthaiui-semicondensedblack.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notoloopedthaiui-semicondensedbold.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notoloopedthaiui-semicondensedextrabold.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notoloopedthaiui-semicondensedextralight.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notoloopedthaiui-semicondensedlight.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notoloopedthaiui-semicondensedmedium.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notoloopedthaiui-semicondensedsemibold.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notoloopedthaiui-semicondensedthin.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notoloopedthaiui-thin.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notomono-regular.ttf" : { + "installed_by" : [ + "fonts-noto-mono" + ] + }, + "notomusic-regular.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notonaskharabic-bold.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notonaskharabic-medium.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notonaskharabic-regular.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notonaskharabic-semibold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notonaskharabicui-bold.ttf" : { + "installed_by" : [ + "fonts-noto-ui-core" + ] + }, + "notonaskharabicui-medium.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notonaskharabicui-regular.ttf" : { + "installed_by" : [ + "fonts-noto-ui-core" + ] + }, + "notonaskharabicui-semibold.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notonastaliqurdu-bold.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notonastaliqurdu-regular.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notorashihebrew-black.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notorashihebrew-bold.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notorashihebrew-extrabold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notorashihebrew-extralight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notorashihebrew-light.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notorashihebrew-medium.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notorashihebrew-regular.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notorashihebrew-semibold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notorashihebrew-thin.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosans-black.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosans-blackitalic.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosans-bold.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notosans-bolditalic.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notosans-condensed.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosans-condensedblack.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosans-condensedblackitalic.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosans-condensedbold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosans-condensedbolditalic.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosans-condensedextrabold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosans-condensedextrabolditalic.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosans-condensedextralight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosans-condensedextralightitalic.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosans-condenseditalic.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosans-condensedlight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosans-condensedlightitalic.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosans-condensedmedium.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosans-condensedmediumitalic.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosans-condensedsemibold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosans-condensedsemibolditalic.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosans-condensedthin.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosans-condensedthinitalic.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosans-extrabold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosans-extrabolditalic.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosans-extracondensed.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosans-extracondensedblack.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosans-extracondensedblackitalic.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosans-extracondensedbold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosans-extracondensedbolditalic.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosans-extracondensedextrabold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosans-extracondensedextrabolditalic.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosans-extracondensedextralight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosans-extracondensedextralightitalic.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosans-extracondenseditalic.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosans-extracondensedlight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosans-extracondensedlightitalic.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosans-extracondensedmedium.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosans-extracondensedmediumitalic.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosans-extracondensedsemibold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosans-extracondensedsemibolditalic.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosans-extracondensedthin.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosans-extracondensedthinitalic.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosans-extralight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosans-extralightitalic.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosans-italic.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notosans-light.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosans-lightitalic.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosans-medium.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosans-mediumitalic.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosans-regular.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notosans-semibold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosans-semibolditalic.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosans-semicondensed.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosans-semicondensedblack.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosans-semicondensedblackitalic.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosans-semicondensedbold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosans-semicondensedbolditalic.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosans-semicondensedextrabold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosans-semicondensedextrabolditalic.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosans-semicondensedextralight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosans-semicondensedextralightitalic.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosans-semicondenseditalic.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosans-semicondensedlight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosans-semicondensedlightitalic.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosans-semicondensedmedium.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosans-semicondensedmediumitalic.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosans-semicondensedsemibold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosans-semicondensedsemibolditalic.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosans-semicondensedthin.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosans-semicondensedthinitalic.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosans-thin.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosans-thinitalic.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansadlam-bold.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notosansadlam-regular.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notosansadlamunjoined-bold.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notosansadlamunjoined-regular.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notosansanatolianhieroglyphs-regular.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notosansarabic-black.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansarabic-bold.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notosansarabic-condensed.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansarabic-condensedblack.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansarabic-condensedbold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansarabic-condensedextrabold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansarabic-condensedextralight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansarabic-condensedlight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansarabic-condensedmedium.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansarabic-condensedsemibold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansarabic-condensedthin.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansarabic-extrabold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansarabic-extracondensed.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansarabic-extracondensedblack.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansarabic-extracondensedbold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansarabic-extracondensedextrabold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansarabic-extracondensedextralight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansarabic-extracondensedlight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansarabic-extracondensedmedium.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansarabic-extracondensedsemibold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansarabic-extracondensedthin.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansarabic-extralight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansarabic-light.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansarabic-medium.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansarabic-regular.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notosansarabic-semibold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansarabic-semicondensed.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansarabic-semicondensedblack.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansarabic-semicondensedbold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansarabic-semicondensedextrabold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansarabic-semicondensedextralight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansarabic-semicondensedlight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansarabic-semicondensedmedium.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansarabic-semicondensedsemibold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansarabic-semicondensedthin.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansarabic-thin.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansarabicui-black.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansarabicui-bold.ttf" : { + "installed_by" : [ + "fonts-noto-ui-core" + ] + }, + "notosansarabicui-condensed.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansarabicui-condensedblack.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansarabicui-condensedbold.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansarabicui-condensedextrabold.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansarabicui-condensedextralight.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansarabicui-condensedlight.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansarabicui-condensedmedium.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansarabicui-condensedsemibold.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansarabicui-condensedthin.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansarabicui-extrabold.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansarabicui-extracondensed.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansarabicui-extracondensedblack.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansarabicui-extracondensedbold.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansarabicui-extracondensedextrabold.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansarabicui-extracondensedextralight.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansarabicui-extracondensedlight.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansarabicui-extracondensedmedium.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansarabicui-extracondensedsemibold.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansarabicui-extracondensedthin.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansarabicui-extralight.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansarabicui-light.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansarabicui-medium.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansarabicui-regular.ttf" : { + "installed_by" : [ + "fonts-noto-ui-core" + ] + }, + "notosansarabicui-semibold.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansarabicui-semicondensed.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansarabicui-semicondensedblack.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansarabicui-semicondensedbold.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansarabicui-semicondensedextrabold.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansarabicui-semicondensedextralight.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansarabicui-semicondensedlight.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansarabicui-semicondensedmedium.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansarabicui-semicondensedsemibold.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansarabicui-semicondensedthin.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansarabicui-thin.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansarmenian-black.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansarmenian-bold.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notosansarmenian-condensed.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansarmenian-condensedblack.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansarmenian-condensedbold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansarmenian-condensedextrabold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansarmenian-condensedextralight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansarmenian-condensedlight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansarmenian-condensedmedium.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansarmenian-condensedsemibold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansarmenian-condensedthin.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansarmenian-extrabold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansarmenian-extracondensed.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansarmenian-extracondensedblack.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansarmenian-extracondensedbold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansarmenian-extracondensedextrabold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansarmenian-extracondensedextralight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansarmenian-extracondensedlight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansarmenian-extracondensedmedium.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansarmenian-extracondensedsemibold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansarmenian-extracondensedthin.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansarmenian-extralight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansarmenian-light.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansarmenian-medium.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansarmenian-regular.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notosansarmenian-semibold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansarmenian-semicondensed.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansarmenian-semicondensedblack.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansarmenian-semicondensedbold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansarmenian-semicondensedextrabold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansarmenian-semicondensedextralight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansarmenian-semicondensedlight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansarmenian-semicondensedmedium.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansarmenian-semicondensedsemibold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansarmenian-semicondensedthin.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansarmenian-thin.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansavestan-regular.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notosansbalinese-bold.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notosansbalinese-medium.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansbalinese-regular.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notosansbalinese-semibold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansbamum-bold.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notosansbamum-medium.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansbamum-regular.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notosansbamum-semibold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansbassavah-regular.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notosansbatak-regular.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notosansbengali-black.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansbengali-bold.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notosansbengali-condensed.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansbengali-extrabold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansbengali-extracondensed.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansbengali-extralight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansbengali-light.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansbengali-medium.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansbengali-regular.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notosansbengali-semibold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansbengali-semicondensed.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansbengali-thin.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansbengaliui-black.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansbengaliui-bold.ttf" : { + "installed_by" : [ + "fonts-noto-ui-core" + ] + }, + "notosansbengaliui-condensed.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansbengaliui-extrabold.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansbengaliui-extracondensed.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansbengaliui-extralight.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansbengaliui-light.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansbengaliui-medium.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansbengaliui-regular.ttf" : { + "installed_by" : [ + "fonts-noto-ui-core" + ] + }, + "notosansbengaliui-semibold.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansbengaliui-semicondensed.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansbengaliui-thin.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansbhaiksuki-regular.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notosansbrahmi-regular.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notosansbuginese-regular.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notosansbuhid-regular.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notosanscanadianaboriginal-black.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanscanadianaboriginal-bold.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notosanscanadianaboriginal-extrabold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanscanadianaboriginal-extralight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanscanadianaboriginal-light.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanscanadianaboriginal-medium.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanscanadianaboriginal-regular.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notosanscanadianaboriginal-semibold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanscanadianaboriginal-thin.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanscarian-regular.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notosanscaucasianalbanian-regular.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notosanschakma-regular.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notosanscham-black.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanscham-bold.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notosanscham-extrabold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanscham-extralight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanscham-light.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanscham-medium.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanscham-regular.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notosanscham-semibold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanscham-thin.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanscherokee-black.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanscherokee-bold.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notosanscherokee-extrabold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanscherokee-extralight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanscherokee-light.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanscherokee-medium.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanscherokee-regular.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notosanscherokee-semibold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanscherokee-thin.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanscoptic-regular.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notosanscuneiform-regular.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notosanscypriot-regular.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notosansdeseret-regular.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notosansdevanagari-black.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansdevanagari-bold.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notosansdevanagari-condensed.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansdevanagari-condensedblack.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansdevanagari-condensedbold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansdevanagari-condensedextrabold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansdevanagari-condensedextralight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansdevanagari-condensedlight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansdevanagari-condensedmedium.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansdevanagari-condensedsemibold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansdevanagari-condensedthin.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansdevanagari-extrabold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansdevanagari-extracondensed.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansdevanagari-extracondensedblack.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansdevanagari-extracondensedbold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansdevanagari-extracondensedextrabold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansdevanagari-extracondensedextralight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansdevanagari-extracondensedlight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansdevanagari-extracondensedmedium.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansdevanagari-extracondensedsemibold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansdevanagari-extracondensedthin.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansdevanagari-extralight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansdevanagari-light.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansdevanagari-medium.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansdevanagari-regular.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notosansdevanagari-semibold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansdevanagari-semicondensed.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansdevanagari-semicondensedblack.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansdevanagari-semicondensedbold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansdevanagari-semicondensedextrabold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansdevanagari-semicondensedextralight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansdevanagari-semicondensedlight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansdevanagari-semicondensedmedium.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansdevanagari-semicondensedsemibold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansdevanagari-semicondensedthin.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansdevanagari-thin.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansdevanagariui-black.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansdevanagariui-bold.ttf" : { + "installed_by" : [ + "fonts-noto-ui-core" + ] + }, + "notosansdevanagariui-condensed.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansdevanagariui-condensedblack.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansdevanagariui-condensedbold.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansdevanagariui-condensedextrabold.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansdevanagariui-condensedextralight.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansdevanagariui-condensedlight.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansdevanagariui-condensedmedium.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansdevanagariui-condensedsemibold.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansdevanagariui-condensedthin.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansdevanagariui-extrabold.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansdevanagariui-extracondensed.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansdevanagariui-extracondensedblack.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansdevanagariui-extracondensedbold.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansdevanagariui-extracondensedextrabold.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansdevanagariui-extracondensedextralight.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansdevanagariui-extracondensedlight.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansdevanagariui-extracondensedmedium.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansdevanagariui-extracondensedsemibold.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansdevanagariui-extracondensedthin.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansdevanagariui-extralight.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansdevanagariui-light.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansdevanagariui-medium.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansdevanagariui-regular.ttf" : { + "installed_by" : [ + "fonts-noto-ui-core" + ] + }, + "notosansdevanagariui-semibold.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansdevanagariui-semicondensed.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansdevanagariui-semicondensedblack.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansdevanagariui-semicondensedbold.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansdevanagariui-semicondensedextrabold.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansdevanagariui-semicondensedextralight.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansdevanagariui-semicondensedlight.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansdevanagariui-semicondensedmedium.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansdevanagariui-semicondensedsemibold.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansdevanagariui-semicondensedthin.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansdevanagariui-thin.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansdisplay-black.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansdisplay-blackitalic.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansdisplay-bold.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notosansdisplay-bolditalic.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notosansdisplay-condensed.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansdisplay-condensedblack.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansdisplay-condensedblackitalic.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansdisplay-condensedbold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansdisplay-condensedbolditalic.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansdisplay-condensedextrabold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansdisplay-condensedextrabolditalic.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansdisplay-condensedextralight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansdisplay-condensedextralightitalic.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansdisplay-condenseditalic.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansdisplay-condensedlight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansdisplay-condensedlightitalic.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansdisplay-condensedmedium.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansdisplay-condensedmediumitalic.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansdisplay-condensedsemibold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansdisplay-condensedsemibolditalic.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansdisplay-condensedthin.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansdisplay-condensedthinitalic.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansdisplay-extrabold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansdisplay-extrabolditalic.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansdisplay-extracondensed.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansdisplay-extracondensedblack.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansdisplay-extracondensedblackitalic.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansdisplay-extracondensedbold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansdisplay-extracondensedbolditalic.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansdisplay-extracondensedextrabold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansdisplay-extracondensedextrabolditalic.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansdisplay-extracondensedextralight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansdisplay-extracondensedextralightitalic.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansdisplay-extracondenseditalic.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansdisplay-extracondensedlight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansdisplay-extracondensedlightitalic.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansdisplay-extracondensedmedium.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansdisplay-extracondensedmediumitalic.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansdisplay-extracondensedsemibold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansdisplay-extracondensedsemibolditalic.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansdisplay-extracondensedthin.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansdisplay-extracondensedthinitalic.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansdisplay-extralight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansdisplay-extralightitalic.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansdisplay-italic.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notosansdisplay-light.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansdisplay-lightitalic.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansdisplay-medium.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansdisplay-mediumitalic.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansdisplay-regular.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notosansdisplay-semibold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansdisplay-semibolditalic.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansdisplay-semicondensed.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansdisplay-semicondensedblack.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansdisplay-semicondensedblackitalic.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansdisplay-semicondensedbold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansdisplay-semicondensedbolditalic.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansdisplay-semicondensedextrabold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansdisplay-semicondensedextrabolditalic.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansdisplay-semicondensedextralight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansdisplay-semicondensedextralightitalic.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansdisplay-semicondenseditalic.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansdisplay-semicondensedlight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansdisplay-semicondensedlightitalic.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansdisplay-semicondensedmedium.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansdisplay-semicondensedmediumitalic.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansdisplay-semicondensedsemibold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansdisplay-semicondensedsemibolditalic.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansdisplay-semicondensedthin.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansdisplay-semicondensedthinitalic.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansdisplay-thin.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansdisplay-thinitalic.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansduployan-regular.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notosansegyptianhieroglyphs-regular.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notosanselbasan-regular.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notosanselymaic-regular.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notosansethiopic-black.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansethiopic-bold.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notosansethiopic-condensed.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansethiopic-condensedblack.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansethiopic-condensedbold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansethiopic-condensedextrabold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansethiopic-condensedextralight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansethiopic-condensedlight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansethiopic-condensedmedium.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansethiopic-condensedsemibold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansethiopic-condensedthin.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansethiopic-extrabold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansethiopic-extracondensed.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansethiopic-extracondensedblack.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansethiopic-extracondensedbold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansethiopic-extracondensedextrabold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansethiopic-extracondensedextralight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansethiopic-extracondensedlight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansethiopic-extracondensedmedium.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansethiopic-extracondensedsemibold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansethiopic-extracondensedthin.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansethiopic-extralight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansethiopic-light.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansethiopic-medium.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansethiopic-regular.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notosansethiopic-semibold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansethiopic-semicondensed.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansethiopic-semicondensedblack.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansethiopic-semicondensedbold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansethiopic-semicondensedextrabold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansethiopic-semicondensedextralight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansethiopic-semicondensedlight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansethiopic-semicondensedmedium.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansethiopic-semicondensedsemibold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansethiopic-semicondensedthin.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansethiopic-thin.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansgeorgian-black.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansgeorgian-bold.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notosansgeorgian-condensed.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansgeorgian-condensedblack.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansgeorgian-condensedbold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansgeorgian-condensedextrabold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansgeorgian-condensedextralight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansgeorgian-condensedlight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansgeorgian-condensedmedium.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansgeorgian-condensedsemibold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansgeorgian-condensedthin.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansgeorgian-extrabold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansgeorgian-extracondensed.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansgeorgian-extracondensedblack.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansgeorgian-extracondensedbold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansgeorgian-extracondensedextrabold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansgeorgian-extracondensedextralight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansgeorgian-extracondensedlight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansgeorgian-extracondensedmedium.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansgeorgian-extracondensedsemibold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansgeorgian-extracondensedthin.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansgeorgian-extralight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansgeorgian-light.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansgeorgian-medium.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansgeorgian-regular.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notosansgeorgian-semibold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansgeorgian-semicondensed.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansgeorgian-semicondensedblack.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansgeorgian-semicondensedbold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansgeorgian-semicondensedextrabold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansgeorgian-semicondensedextralight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansgeorgian-semicondensedlight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansgeorgian-semicondensedmedium.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansgeorgian-semicondensedsemibold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansgeorgian-semicondensedthin.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansgeorgian-thin.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansglagolitic-regular.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notosansgothic-regular.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notosansgrantha-regular.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notosansgujarati-black.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansgujarati-bold.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notosansgujarati-condensed.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansgujarati-condensedblack.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansgujarati-condensedbold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansgujarati-condensedextrabold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansgujarati-condensedextralight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansgujarati-condensedlight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansgujarati-condensedmedium.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansgujarati-condensedsemibold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansgujarati-condensedthin.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansgujarati-extrabold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansgujarati-extracondensed.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansgujarati-extracondensedblack.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansgujarati-extracondensedbold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansgujarati-extracondensedextrabold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansgujarati-extracondensedextralight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansgujarati-extracondensedlight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansgujarati-extracondensedmedium.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansgujarati-extracondensedsemibold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansgujarati-extracondensedthin.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansgujarati-extralight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansgujarati-light.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansgujarati-medium.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansgujarati-regular.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notosansgujarati-semibold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansgujarati-semicondensed.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansgujarati-semicondensedblack.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansgujarati-semicondensedbold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansgujarati-semicondensedextrabold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansgujarati-semicondensedextralight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansgujarati-semicondensedlight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansgujarati-semicondensedmedium.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansgujarati-semicondensedsemibold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansgujarati-semicondensedthin.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansgujarati-thin.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansgujaratiui-black.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansgujaratiui-bold.ttf" : { + "installed_by" : [ + "fonts-noto-ui-core" + ] + }, + "notosansgujaratiui-condensed.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansgujaratiui-condensedblack.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansgujaratiui-condensedbold.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansgujaratiui-condensedextrabold.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansgujaratiui-condensedextralight.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansgujaratiui-condensedlight.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansgujaratiui-condensedmedium.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansgujaratiui-condensedsemibold.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansgujaratiui-condensedthin.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansgujaratiui-extrabold.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansgujaratiui-extracondensed.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansgujaratiui-extracondensedblack.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansgujaratiui-extracondensedbold.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansgujaratiui-extracondensedextrabold.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansgujaratiui-extracondensedextralight.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansgujaratiui-extracondensedlight.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansgujaratiui-extracondensedmedium.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansgujaratiui-extracondensedsemibold.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansgujaratiui-extracondensedthin.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansgujaratiui-extralight.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansgujaratiui-light.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansgujaratiui-medium.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansgujaratiui-regular.ttf" : { + "installed_by" : [ + "fonts-noto-ui-core" + ] + }, + "notosansgujaratiui-semibold.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansgujaratiui-semicondensed.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansgujaratiui-semicondensedblack.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansgujaratiui-semicondensedbold.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansgujaratiui-semicondensedextrabold.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansgujaratiui-semicondensedextralight.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansgujaratiui-semicondensedlight.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansgujaratiui-semicondensedmedium.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansgujaratiui-semicondensedsemibold.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansgujaratiui-semicondensedthin.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansgujaratiui-thin.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansgunjalagondi-regular.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notosansgurmukhi-black.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansgurmukhi-bold.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notosansgurmukhi-condensed.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansgurmukhi-condensedblack.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansgurmukhi-condensedbold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansgurmukhi-condensedextrabold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansgurmukhi-condensedextralight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansgurmukhi-condensedlight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansgurmukhi-condensedmedium.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansgurmukhi-condensedsemibold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansgurmukhi-condensedthin.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansgurmukhi-extrabold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansgurmukhi-extracondensed.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansgurmukhi-extracondensedblack.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansgurmukhi-extracondensedbold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansgurmukhi-extracondensedextrabold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansgurmukhi-extracondensedextralight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansgurmukhi-extracondensedlight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansgurmukhi-extracondensedmedium.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansgurmukhi-extracondensedsemibold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansgurmukhi-extracondensedthin.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansgurmukhi-extralight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansgurmukhi-light.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansgurmukhi-medium.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansgurmukhi-regular.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notosansgurmukhi-semibold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansgurmukhi-semicondensed.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansgurmukhi-semicondensedblack.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansgurmukhi-semicondensedbold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansgurmukhi-semicondensedextrabold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansgurmukhi-semicondensedextralight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansgurmukhi-semicondensedlight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansgurmukhi-semicondensedmedium.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansgurmukhi-semicondensedsemibold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansgurmukhi-semicondensedthin.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansgurmukhi-thin.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansgurmukhiui-black.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansgurmukhiui-bold.ttf" : { + "installed_by" : [ + "fonts-noto-ui-core" + ] + }, + "notosansgurmukhiui-condensed.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansgurmukhiui-condensedblack.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansgurmukhiui-condensedbold.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansgurmukhiui-condensedextrabold.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansgurmukhiui-condensedextralight.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansgurmukhiui-condensedlight.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansgurmukhiui-condensedmedium.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansgurmukhiui-condensedsemibold.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansgurmukhiui-condensedthin.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansgurmukhiui-extrabold.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansgurmukhiui-extracondensed.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansgurmukhiui-extracondensedblack.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansgurmukhiui-extracondensedbold.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansgurmukhiui-extracondensedextrabold.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansgurmukhiui-extracondensedextralight.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansgurmukhiui-extracondensedlight.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansgurmukhiui-extracondensedmedium.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansgurmukhiui-extracondensedsemibold.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansgurmukhiui-extracondensedthin.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansgurmukhiui-extralight.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansgurmukhiui-light.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansgurmukhiui-medium.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansgurmukhiui-regular.ttf" : { + "installed_by" : [ + "fonts-noto-ui-core" + ] + }, + "notosansgurmukhiui-semibold.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansgurmukhiui-semicondensed.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansgurmukhiui-semicondensedblack.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansgurmukhiui-semicondensedbold.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansgurmukhiui-semicondensedextrabold.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansgurmukhiui-semicondensedextralight.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansgurmukhiui-semicondensedlight.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansgurmukhiui-semicondensedmedium.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansgurmukhiui-semicondensedsemibold.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansgurmukhiui-semicondensedthin.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansgurmukhiui-thin.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosanshanifirohingya-bold.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notosanshanifirohingya-medium.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanshanifirohingya-regular.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notosanshanifirohingya-semibold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanshanunoo-regular.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notosanshatran-regular.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notosanshebrew-black.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanshebrew-bold.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notosanshebrew-condensed.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanshebrew-condensedblack.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanshebrew-condensedbold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanshebrew-condensedextrabold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanshebrew-condensedextralight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanshebrew-condensedlight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanshebrew-condensedmedium.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanshebrew-condensedsemibold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanshebrew-condensedthin.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanshebrew-extrabold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanshebrew-extracondensed.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanshebrew-extracondensedblack.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanshebrew-extracondensedbold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanshebrew-extracondensedextrabold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanshebrew-extracondensedextralight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanshebrew-extracondensedlight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanshebrew-extracondensedmedium.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanshebrew-extracondensedsemibold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanshebrew-extracondensedthin.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanshebrew-extralight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanshebrew-light.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanshebrew-medium.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanshebrew-regular.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notosanshebrew-semibold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanshebrew-semicondensed.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanshebrew-semicondensedblack.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanshebrew-semicondensedbold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanshebrew-semicondensedextrabold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanshebrew-semicondensedextralight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanshebrew-semicondensedlight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanshebrew-semicondensedmedium.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanshebrew-semicondensedsemibold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanshebrew-semicondensedthin.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanshebrew-thin.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansimperialaramaic-regular.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notosansindicsiyaqnumbers-regular.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notosansinscriptionalpahlavi-regular.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notosansinscriptionalparthian-regular.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notosansjavanese-bold.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notosansjavanese-regular.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notosanskaithi-regular.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notosanskannada-black.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanskannada-bold.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notosanskannada-condensed.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanskannada-condensedblack.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanskannada-condensedbold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanskannada-condensedextrabold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanskannada-condensedextralight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanskannada-condensedlight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanskannada-condensedmedium.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanskannada-condensedsemibold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanskannada-condensedthin.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanskannada-extrabold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanskannada-extracondensed.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanskannada-extracondensedblack.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanskannada-extracondensedbold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanskannada-extracondensedextrabold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanskannada-extracondensedextralight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanskannada-extracondensedlight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanskannada-extracondensedmedium.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanskannada-extracondensedsemibold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanskannada-extracondensedthin.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanskannada-extralight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanskannada-light.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanskannada-medium.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanskannada-regular.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notosanskannada-semibold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanskannada-semicondensed.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanskannada-semicondensedblack.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanskannada-semicondensedbold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanskannada-semicondensedextrabold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanskannada-semicondensedextralight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanskannada-semicondensedlight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanskannada-semicondensedmedium.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanskannada-semicondensedsemibold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanskannada-semicondensedthin.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanskannada-thin.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanskannadaui-black.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosanskannadaui-bold.ttf" : { + "installed_by" : [ + "fonts-noto-ui-core" + ] + }, + "notosanskannadaui-condensed.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosanskannadaui-condensedblack.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosanskannadaui-condensedbold.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosanskannadaui-condensedextrabold.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosanskannadaui-condensedextralight.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosanskannadaui-condensedlight.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosanskannadaui-condensedmedium.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosanskannadaui-condensedsemibold.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosanskannadaui-condensedthin.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosanskannadaui-extrabold.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosanskannadaui-extracondensed.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosanskannadaui-extracondensedblack.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosanskannadaui-extracondensedbold.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosanskannadaui-extracondensedextrabold.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosanskannadaui-extracondensedextralight.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosanskannadaui-extracondensedlight.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosanskannadaui-extracondensedmedium.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosanskannadaui-extracondensedsemibold.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosanskannadaui-extracondensedthin.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosanskannadaui-extralight.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosanskannadaui-light.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosanskannadaui-medium.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosanskannadaui-regular.ttf" : { + "installed_by" : [ + "fonts-noto-ui-core" + ] + }, + "notosanskannadaui-semibold.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosanskannadaui-semicondensed.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosanskannadaui-semicondensedblack.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosanskannadaui-semicondensedbold.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosanskannadaui-semicondensedextrabold.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosanskannadaui-semicondensedextralight.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosanskannadaui-semicondensedlight.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosanskannadaui-semicondensedmedium.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosanskannadaui-semicondensedsemibold.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosanskannadaui-semicondensedthin.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosanskannadaui-thin.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosanskayahli-bold.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notosanskayahli-medium.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanskayahli-regular.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notosanskayahli-semibold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanskharoshthi-regular.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notosanskhmer-black.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanskhmer-bold.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notosanskhmer-condensed.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanskhmer-condensedblack.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanskhmer-condensedbold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanskhmer-condensedextrabold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanskhmer-condensedextralight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanskhmer-condensedlight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanskhmer-condensedmedium.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanskhmer-condensedsemibold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanskhmer-condensedthin.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanskhmer-extrabold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanskhmer-extracondensed.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanskhmer-extracondensedblack.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanskhmer-extracondensedbold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanskhmer-extracondensedextrabold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanskhmer-extracondensedextralight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanskhmer-extracondensedlight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanskhmer-extracondensedmedium.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanskhmer-extracondensedsemibold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanskhmer-extracondensedthin.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanskhmer-extralight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanskhmer-light.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanskhmer-medium.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanskhmer-regular.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notosanskhmer-semibold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanskhmer-semicondensed.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanskhmer-semicondensedblack.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanskhmer-semicondensedbold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanskhmer-semicondensedextrabold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanskhmer-semicondensedextralight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanskhmer-semicondensedlight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanskhmer-semicondensedmedium.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanskhmer-semicondensedsemibold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanskhmer-semicondensedthin.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanskhmer-thin.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanskhmerui-black.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosanskhmerui-bold.ttf" : { + "installed_by" : [ + "fonts-noto-ui-core" + ] + }, + "notosanskhmerui-condensed.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosanskhmerui-condensedblack.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosanskhmerui-condensedbold.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosanskhmerui-condensedextrabold.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosanskhmerui-condensedextralight.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosanskhmerui-condensedlight.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosanskhmerui-condensedmedium.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosanskhmerui-condensedsemibold.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosanskhmerui-condensedthin.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosanskhmerui-extrabold.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosanskhmerui-extracondensed.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosanskhmerui-extracondensedblack.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosanskhmerui-extracondensedbold.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosanskhmerui-extracondensedextrabold.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosanskhmerui-extracondensedextralight.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosanskhmerui-extracondensedlight.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosanskhmerui-extracondensedmedium.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosanskhmerui-extracondensedsemibold.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosanskhmerui-extracondensedthin.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosanskhmerui-extralight.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosanskhmerui-light.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosanskhmerui-medium.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosanskhmerui-regular.ttf" : { + "installed_by" : [ + "fonts-noto-ui-core" + ] + }, + "notosanskhmerui-semibold.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosanskhmerui-semicondensed.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosanskhmerui-semicondensedblack.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosanskhmerui-semicondensedbold.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosanskhmerui-semicondensedextrabold.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosanskhmerui-semicondensedextralight.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosanskhmerui-semicondensedlight.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosanskhmerui-semicondensedmedium.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosanskhmerui-semicondensedsemibold.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosanskhmerui-semicondensedthin.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosanskhmerui-thin.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosanskhojki-regular.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notosanskhudawadi-regular.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notosanslao-black.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanslao-bold.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notosanslao-condensed.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanslao-condensedblack.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanslao-condensedbold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanslao-condensedextrabold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanslao-condensedextralight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanslao-condensedlight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanslao-condensedmedium.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanslao-condensedsemibold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanslao-condensedthin.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanslao-extrabold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanslao-extracondensed.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanslao-extracondensedblack.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanslao-extracondensedbold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanslao-extracondensedextrabold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanslao-extracondensedextralight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanslao-extracondensedlight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanslao-extracondensedmedium.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanslao-extracondensedsemibold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanslao-extracondensedthin.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanslao-extralight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanslao-light.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanslao-medium.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanslao-regular.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notosanslao-semibold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanslao-semicondensed.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanslao-semicondensedblack.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanslao-semicondensedbold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanslao-semicondensedextrabold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanslao-semicondensedextralight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanslao-semicondensedlight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanslao-semicondensedmedium.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanslao-semicondensedsemibold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanslao-semicondensedthin.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanslao-thin.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanslaoui-black.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosanslaoui-bold.ttf" : { + "installed_by" : [ + "fonts-noto-ui-core" + ] + }, + "notosanslaoui-condensed.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosanslaoui-condensedblack.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosanslaoui-condensedbold.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosanslaoui-condensedextrabold.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosanslaoui-condensedextralight.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosanslaoui-condensedlight.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosanslaoui-condensedmedium.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosanslaoui-condensedsemibold.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosanslaoui-condensedthin.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosanslaoui-extrabold.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosanslaoui-extracondensed.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosanslaoui-extracondensedblack.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosanslaoui-extracondensedbold.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosanslaoui-extracondensedextrabold.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosanslaoui-extracondensedextralight.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosanslaoui-extracondensedlight.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosanslaoui-extracondensedmedium.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosanslaoui-extracondensedsemibold.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosanslaoui-extracondensedthin.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosanslaoui-extralight.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosanslaoui-light.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosanslaoui-medium.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosanslaoui-regular.ttf" : { + "installed_by" : [ + "fonts-noto-ui-core" + ] + }, + "notosanslaoui-semibold.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosanslaoui-semicondensed.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosanslaoui-semicondensedblack.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosanslaoui-semicondensedbold.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosanslaoui-semicondensedextrabold.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosanslaoui-semicondensedextralight.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosanslaoui-semicondensedlight.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosanslaoui-semicondensedmedium.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosanslaoui-semicondensedsemibold.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosanslaoui-semicondensedthin.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosanslaoui-thin.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosanslepcha-regular.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notosanslimbu-regular.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notosanslineara-regular.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notosanslinearb-regular.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notosanslisu-bold.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notosanslisu-medium.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanslisu-regular.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notosanslisu-semibold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanslycian-regular.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notosanslydian-regular.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notosansmahajani-regular.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notosansmalayalam-black.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansmalayalam-bold.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notosansmalayalam-condensed.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansmalayalam-condensedblack.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansmalayalam-condensedbold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansmalayalam-condensedextrabold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansmalayalam-condensedextralight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansmalayalam-condensedlight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansmalayalam-condensedmedium.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansmalayalam-condensedsemibold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansmalayalam-condensedthin.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansmalayalam-extrabold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansmalayalam-extracondensed.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansmalayalam-extracondensedblack.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansmalayalam-extracondensedbold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansmalayalam-extracondensedextrabold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansmalayalam-extracondensedextralight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansmalayalam-extracondensedlight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansmalayalam-extracondensedmedium.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansmalayalam-extracondensedsemibold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansmalayalam-extracondensedthin.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansmalayalam-extralight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansmalayalam-light.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansmalayalam-medium.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansmalayalam-regular.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notosansmalayalam-semibold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansmalayalam-semicondensed.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansmalayalam-semicondensedblack.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansmalayalam-semicondensedbold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansmalayalam-semicondensedextrabold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansmalayalam-semicondensedextralight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansmalayalam-semicondensedlight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansmalayalam-semicondensedmedium.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansmalayalam-semicondensedsemibold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansmalayalam-semicondensedthin.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansmalayalam-thin.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansmalayalamui-black.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansmalayalamui-bold.ttf" : { + "installed_by" : [ + "fonts-noto-ui-core" + ] + }, + "notosansmalayalamui-condensed.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansmalayalamui-condensedblack.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansmalayalamui-condensedbold.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansmalayalamui-condensedextrabold.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansmalayalamui-condensedextralight.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansmalayalamui-condensedlight.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansmalayalamui-condensedmedium.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansmalayalamui-condensedsemibold.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansmalayalamui-condensedthin.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansmalayalamui-extrabold.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansmalayalamui-extracondensed.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansmalayalamui-extracondensedblack.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansmalayalamui-extracondensedbold.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansmalayalamui-extracondensedextrabold.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansmalayalamui-extracondensedextralight.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansmalayalamui-extracondensedlight.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansmalayalamui-extracondensedmedium.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansmalayalamui-extracondensedsemibold.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansmalayalamui-extracondensedthin.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansmalayalamui-extralight.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansmalayalamui-light.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansmalayalamui-medium.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansmalayalamui-regular.ttf" : { + "installed_by" : [ + "fonts-noto-ui-core" + ] + }, + "notosansmalayalamui-semibold.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansmalayalamui-semicondensed.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansmalayalamui-semicondensedblack.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansmalayalamui-semicondensedbold.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansmalayalamui-semicondensedextrabold.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansmalayalamui-semicondensedextralight.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansmalayalamui-semicondensedlight.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansmalayalamui-semicondensedmedium.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansmalayalamui-semicondensedsemibold.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansmalayalamui-semicondensedthin.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansmalayalamui-thin.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansmandaic-regular.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notosansmanichaean-regular.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notosansmarchen-regular.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notosansmasaramgondi-regular.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notosansmath-regular.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notosansmayannumerals-regular.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notosansmedefaidrin-bold.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notosansmedefaidrin-medium.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansmedefaidrin-regular.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notosansmedefaidrin-semibold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansmeeteimayek-black.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansmeeteimayek-bold.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notosansmeeteimayek-extrabold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansmeeteimayek-extralight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansmeeteimayek-light.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansmeeteimayek-medium.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansmeeteimayek-regular.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notosansmeeteimayek-semibold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansmeeteimayek-thin.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansmendekikakui-regular.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notosansmeroitic-regular.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notosansmiao-regular.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notosansmodi-regular.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notosansmongolian-regular.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notosansmono-black.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansmono-bold.ttf" : { + "installed_by" : [ + "fonts-noto-mono" + ] + }, + "notosansmono-condensed.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansmono-condensedblack.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansmono-condensedbold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansmono-condensedextrabold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansmono-condensedextralight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansmono-condensedlight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansmono-condensedmedium.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansmono-condensedsemibold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansmono-condensedthin.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansmono-extrabold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansmono-extracondensed.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansmono-extracondensedblack.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansmono-extracondensedbold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansmono-extracondensedextrabold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansmono-extracondensedextralight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansmono-extracondensedlight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansmono-extracondensedmedium.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansmono-extracondensedsemibold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansmono-extracondensedthin.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansmono-extralight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansmono-light.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansmono-medium.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansmono-regular.ttf" : { + "installed_by" : [ + "fonts-noto-mono" + ] + }, + "notosansmono-semibold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansmono-semicondensed.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansmono-semicondensedblack.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansmono-semicondensedbold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansmono-semicondensedextrabold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansmono-semicondensedextralight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansmono-semicondensedlight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansmono-semicondensedmedium.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansmono-semicondensedsemibold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansmono-semicondensedthin.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansmono-thin.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansmro-regular.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notosansmultani-regular.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notosansmyanmar-black.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansmyanmar-bold.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notosansmyanmar-condensed.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansmyanmar-condensedblack.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansmyanmar-condensedbold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansmyanmar-condensedextrabold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansmyanmar-condensedextralight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansmyanmar-condensedlight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansmyanmar-condensedmedium.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansmyanmar-condensedsemibold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansmyanmar-condensedthin.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansmyanmar-extrabold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansmyanmar-extracondensed.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansmyanmar-extracondensedblack.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansmyanmar-extracondensedbold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansmyanmar-extracondensedextrabold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansmyanmar-extracondensedextralight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansmyanmar-extracondensedlight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansmyanmar-extracondensedmedium.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansmyanmar-extracondensedsemibold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansmyanmar-extracondensedthin.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansmyanmar-extralight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansmyanmar-light.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansmyanmar-medium.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansmyanmar-regular.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notosansmyanmar-semibold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansmyanmar-semicondensed.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansmyanmar-semicondensedblack.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansmyanmar-semicondensedbold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansmyanmar-semicondensedextrabold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansmyanmar-semicondensedextralight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansmyanmar-semicondensedlight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansmyanmar-semicondensedmedium.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansmyanmar-semicondensedsemibold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansmyanmar-semicondensedthin.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansmyanmar-thin.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansmyanmarui-black.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansmyanmarui-bold.ttf" : { + "installed_by" : [ + "fonts-noto-ui-core" + ] + }, + "notosansmyanmarui-condensed.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansmyanmarui-condensedblack.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansmyanmarui-condensedbold.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansmyanmarui-condensedextrabold.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansmyanmarui-condensedextralight.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansmyanmarui-condensedlight.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansmyanmarui-condensedmedium.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansmyanmarui-condensedsemibold.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansmyanmarui-condensedthin.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansmyanmarui-extrabold.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansmyanmarui-extracondensed.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansmyanmarui-extracondensedblack.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansmyanmarui-extracondensedbold.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansmyanmarui-extracondensedextrabold.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansmyanmarui-extracondensedextralight.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansmyanmarui-extracondensedlight.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansmyanmarui-extracondensedmedium.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansmyanmarui-extracondensedsemibold.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansmyanmarui-extracondensedthin.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansmyanmarui-extralight.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansmyanmarui-light.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansmyanmarui-medium.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansmyanmarui-regular.ttf" : { + "installed_by" : [ + "fonts-noto-ui-core" + ] + }, + "notosansmyanmarui-semibold.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansmyanmarui-semicondensed.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansmyanmarui-semicondensedblack.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansmyanmarui-semicondensedbold.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansmyanmarui-semicondensedextrabold.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansmyanmarui-semicondensedextralight.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansmyanmarui-semicondensedlight.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansmyanmarui-semicondensedmedium.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansmyanmarui-semicondensedsemibold.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansmyanmarui-semicondensedthin.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansmyanmarui-thin.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansnabataean-regular.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notosansnewa-regular.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notosansnewtailue-regular.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notosansnko-regular.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notosansnushu-regular.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notosansogham-regular.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notosansolchiki-bold.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notosansolchiki-medium.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansolchiki-regular.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notosansolchiki-semibold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansoldhungarian-regular.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notosansolditalic-regular.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notosansoldnortharabian-regular.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notosansoldpermic-regular.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notosansoldpersian-regular.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notosansoldsogdian-regular.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notosansoldsoutharabian-regular.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notosansoldturkic-regular.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notosansoriya-black.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansoriya-bold.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notosansoriya-condensed.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansoriya-condensedblack.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansoriya-condensedbold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansoriya-condensedthin.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansoriya-extracondensed.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansoriya-extracondensedblack.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansoriya-extracondensedbold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansoriya-extracondensedthin.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansoriya-regular.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notosansoriya-thin.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansoriyaui-black.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansoriyaui-bold.ttf" : { + "installed_by" : [ + "fonts-noto-ui-core" + ] + }, + "notosansoriyaui-condensed.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansoriyaui-condensedblack.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansoriyaui-condensedbold.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansoriyaui-condensedthin.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansoriyaui-extracondensed.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansoriyaui-extracondensedblack.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansoriyaui-extracondensedbold.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansoriyaui-extracondensedthin.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansoriyaui-regular.ttf" : { + "installed_by" : [ + "fonts-noto-ui-core" + ] + }, + "notosansoriyaui-thin.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansosage-regular.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notosansosmanya-regular.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notosanspahawhhmong-regular.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notosanspalmyrene-regular.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notosanspaucinhau-regular.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notosansphagspa-regular.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notosansphoenician-regular.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notosanspsalterpahlavi-regular.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notosansrejang-regular.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notosansrunic-regular.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notosanssamaritan-regular.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notosanssaurashtra-regular.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notosanssharada-regular.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notosansshavian-regular.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notosanssiddham-regular.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notosanssignwriting-regular.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notosanssinhala-black.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanssinhala-bold.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notosanssinhala-condensed.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanssinhala-condensedblack.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanssinhala-condensedbold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanssinhala-condensedextrabold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanssinhala-condensedextralight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanssinhala-condensedlight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanssinhala-condensedmedium.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanssinhala-condensedsemibold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanssinhala-condensedthin.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanssinhala-extrabold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanssinhala-extracondensed.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanssinhala-extracondensedblack.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanssinhala-extracondensedbold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanssinhala-extracondensedextrabold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanssinhala-extracondensedextralight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanssinhala-extracondensedlight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanssinhala-extracondensedmedium.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanssinhala-extracondensedsemibold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanssinhala-extracondensedthin.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanssinhala-extralight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanssinhala-light.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanssinhala-medium.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanssinhala-regular.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notosanssinhala-semibold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanssinhala-semicondensed.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanssinhala-semicondensedblack.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanssinhala-semicondensedbold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanssinhala-semicondensedextrabold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanssinhala-semicondensedextralight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanssinhala-semicondensedlight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanssinhala-semicondensedmedium.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanssinhala-semicondensedsemibold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanssinhala-semicondensedthin.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanssinhala-thin.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanssinhalaui-black.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosanssinhalaui-bold.ttf" : { + "installed_by" : [ + "fonts-noto-ui-core" + ] + }, + "notosanssinhalaui-condensed.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosanssinhalaui-condensedblack.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosanssinhalaui-condensedbold.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosanssinhalaui-condensedextrabold.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosanssinhalaui-condensedextralight.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosanssinhalaui-condensedlight.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosanssinhalaui-condensedmedium.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosanssinhalaui-condensedsemibold.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosanssinhalaui-condensedthin.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosanssinhalaui-extrabold.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosanssinhalaui-extracondensed.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosanssinhalaui-extracondensedblack.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosanssinhalaui-extracondensedbold.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosanssinhalaui-extracondensedextrabold.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosanssinhalaui-extracondensedextralight.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosanssinhalaui-extracondensedlight.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosanssinhalaui-extracondensedmedium.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosanssinhalaui-extracondensedsemibold.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosanssinhalaui-extracondensedthin.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosanssinhalaui-extralight.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosanssinhalaui-light.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosanssinhalaui-medium.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosanssinhalaui-regular.ttf" : { + "installed_by" : [ + "fonts-noto-ui-core" + ] + }, + "notosanssinhalaui-semibold.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosanssinhalaui-semicondensed.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosanssinhalaui-semicondensedblack.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosanssinhalaui-semicondensedbold.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosanssinhalaui-semicondensedextrabold.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosanssinhalaui-semicondensedextralight.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosanssinhalaui-semicondensedlight.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosanssinhalaui-semicondensedmedium.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosanssinhalaui-semicondensedsemibold.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosanssinhalaui-semicondensedthin.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosanssinhalaui-thin.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosanssogdian-regular.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notosanssorasompeng-bold.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notosanssorasompeng-medium.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanssorasompeng-regular.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notosanssorasompeng-semibold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanssoyombo-regular.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notosanssundanese-bold.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notosanssundanese-medium.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanssundanese-regular.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notosanssundanese-semibold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanssylotinagri-regular.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notosanssymbols-black.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanssymbols-bold.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notosanssymbols-extrabold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanssymbols-extralight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanssymbols-light.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanssymbols-medium.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanssymbols-regular.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notosanssymbols-semibold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanssymbols-thin.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanssymbols2-regular.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notosanssyriac-black.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanssyriac-regular.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notosanssyriac-thin.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanstagalog-regular.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notosanstagbanwa-regular.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notosanstaile-regular.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notosanstaitham-bold.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notosanstaitham-medium.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanstaitham-regular.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notosanstaitham-semibold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanstaiviet-regular.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notosanstakri-regular.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notosanstamil-black.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanstamil-bold.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notosanstamil-condensed.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanstamil-condensedblack.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanstamil-condensedbold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanstamil-condensedextrabold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanstamil-condensedextralight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanstamil-condensedlight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanstamil-condensedmedium.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanstamil-condensedsemibold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanstamil-condensedthin.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanstamil-extrabold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanstamil-extracondensed.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanstamil-extracondensedblack.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanstamil-extracondensedbold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanstamil-extracondensedextrabold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanstamil-extracondensedextralight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanstamil-extracondensedlight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanstamil-extracondensedmedium.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanstamil-extracondensedsemibold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanstamil-extracondensedthin.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanstamil-extralight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanstamil-light.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanstamil-medium.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanstamil-regular.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notosanstamil-semibold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanstamil-semicondensed.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanstamil-semicondensedblack.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanstamil-semicondensedbold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanstamil-semicondensedextrabold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanstamil-semicondensedextralight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanstamil-semicondensedlight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanstamil-semicondensedmedium.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanstamil-semicondensedsemibold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanstamil-semicondensedthin.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanstamil-thin.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanstamilsupplement-regular.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notosanstamilui-black.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosanstamilui-bold.ttf" : { + "installed_by" : [ + "fonts-noto-ui-core" + ] + }, + "notosanstamilui-condensed.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosanstamilui-condensedblack.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosanstamilui-condensedbold.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosanstamilui-condensedextrabold.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosanstamilui-condensedextralight.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosanstamilui-condensedlight.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosanstamilui-condensedmedium.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosanstamilui-condensedsemibold.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosanstamilui-condensedthin.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosanstamilui-extrabold.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosanstamilui-extracondensed.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosanstamilui-extracondensedblack.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosanstamilui-extracondensedbold.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosanstamilui-extracondensedextrabold.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosanstamilui-extracondensedextralight.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosanstamilui-extracondensedlight.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosanstamilui-extracondensedmedium.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosanstamilui-extracondensedsemibold.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosanstamilui-extracondensedthin.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosanstamilui-extralight.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosanstamilui-light.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosanstamilui-medium.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosanstamilui-regular.ttf" : { + "installed_by" : [ + "fonts-noto-ui-core" + ] + }, + "notosanstamilui-semibold.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosanstamilui-semicondensed.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosanstamilui-semicondensedblack.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosanstamilui-semicondensedbold.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosanstamilui-semicondensedextrabold.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosanstamilui-semicondensedextralight.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosanstamilui-semicondensedlight.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosanstamilui-semicondensedmedium.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosanstamilui-semicondensedsemibold.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosanstamilui-semicondensedthin.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosanstamilui-thin.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosanstelugu-black.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanstelugu-bold.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notosanstelugu-condensed.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanstelugu-condensedblack.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanstelugu-condensedbold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanstelugu-condensedextrabold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanstelugu-condensedextralight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanstelugu-condensedlight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanstelugu-condensedmedium.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanstelugu-condensedsemibold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanstelugu-condensedthin.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanstelugu-extrabold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanstelugu-extracondensed.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanstelugu-extracondensedblack.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanstelugu-extracondensedbold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanstelugu-extracondensedextrabold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanstelugu-extracondensedextralight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanstelugu-extracondensedlight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanstelugu-extracondensedmedium.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanstelugu-extracondensedsemibold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanstelugu-extracondensedthin.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanstelugu-extralight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanstelugu-light.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanstelugu-medium.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanstelugu-regular.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notosanstelugu-semibold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanstelugu-semicondensed.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanstelugu-semicondensedblack.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanstelugu-semicondensedbold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanstelugu-semicondensedextrabold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanstelugu-semicondensedextralight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanstelugu-semicondensedlight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanstelugu-semicondensedmedium.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanstelugu-semicondensedsemibold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanstelugu-semicondensedthin.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosanstelugu-thin.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansteluguui-black.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansteluguui-bold.ttf" : { + "installed_by" : [ + "fonts-noto-ui-core" + ] + }, + "notosansteluguui-condensed.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansteluguui-condensedblack.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansteluguui-condensedbold.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansteluguui-condensedextrabold.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansteluguui-condensedextralight.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansteluguui-condensedlight.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansteluguui-condensedmedium.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansteluguui-condensedsemibold.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansteluguui-condensedthin.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansteluguui-extrabold.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansteluguui-extracondensed.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansteluguui-extracondensedblack.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansteluguui-extracondensedbold.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansteluguui-extracondensedextrabold.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansteluguui-extracondensedextralight.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansteluguui-extracondensedlight.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansteluguui-extracondensedmedium.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansteluguui-extracondensedsemibold.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansteluguui-extracondensedthin.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansteluguui-extralight.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansteluguui-light.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansteluguui-medium.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansteluguui-regular.ttf" : { + "installed_by" : [ + "fonts-noto-ui-core" + ] + }, + "notosansteluguui-semibold.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansteluguui-semicondensed.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansteluguui-semicondensedblack.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansteluguui-semicondensedbold.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansteluguui-semicondensedextrabold.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansteluguui-semicondensedextralight.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansteluguui-semicondensedlight.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansteluguui-semicondensedmedium.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansteluguui-semicondensedsemibold.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansteluguui-semicondensedthin.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansteluguui-thin.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansthaana-black.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansthaana-bold.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notosansthaana-extrabold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansthaana-extralight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansthaana-light.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansthaana-medium.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansthaana-regular.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notosansthaana-semibold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansthaana-thin.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansthai-black.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansthai-bold.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notosansthai-condensed.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansthai-condensedblack.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansthai-condensedbold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansthai-condensedextrabold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansthai-condensedextralight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansthai-condensedlight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansthai-condensedmedium.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansthai-condensedsemibold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansthai-condensedthin.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansthai-extrabold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansthai-extracondensed.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansthai-extracondensedblack.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansthai-extracondensedbold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansthai-extracondensedextrabold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansthai-extracondensedextralight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansthai-extracondensedlight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansthai-extracondensedmedium.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansthai-extracondensedsemibold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansthai-extracondensedthin.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansthai-extralight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansthai-light.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansthai-medium.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansthai-regular.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notosansthai-semibold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansthai-semicondensed.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansthai-semicondensedblack.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansthai-semicondensedbold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansthai-semicondensedextrabold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansthai-semicondensedextralight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansthai-semicondensedlight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansthai-semicondensedmedium.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansthai-semicondensedsemibold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansthai-semicondensedthin.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansthai-thin.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notosansthaiui-black.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansthaiui-bold.ttf" : { + "installed_by" : [ + "fonts-noto-ui-core" + ] + }, + "notosansthaiui-condensed.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansthaiui-condensedblack.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansthaiui-condensedbold.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansthaiui-condensedextrabold.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansthaiui-condensedextralight.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansthaiui-condensedlight.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansthaiui-condensedmedium.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansthaiui-condensedsemibold.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansthaiui-condensedthin.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansthaiui-extrabold.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansthaiui-extracondensed.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansthaiui-extracondensedblack.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansthaiui-extracondensedbold.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansthaiui-extracondensedextrabold.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansthaiui-extracondensedextralight.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansthaiui-extracondensedlight.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansthaiui-extracondensedmedium.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansthaiui-extracondensedsemibold.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansthaiui-extracondensedthin.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansthaiui-extralight.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansthaiui-light.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansthaiui-medium.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansthaiui-regular.ttf" : { + "installed_by" : [ + "fonts-noto-ui-core" + ] + }, + "notosansthaiui-semibold.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansthaiui-semicondensed.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansthaiui-semicondensedblack.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansthaiui-semicondensedbold.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansthaiui-semicondensedextrabold.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansthaiui-semicondensedextralight.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansthaiui-semicondensedlight.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansthaiui-semicondensedmedium.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansthaiui-semicondensedsemibold.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansthaiui-semicondensedthin.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosansthaiui-thin.ttf" : { + "installed_by" : [ + "fonts-noto-ui-extra" + ] + }, + "notosanstifinagh-regular.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notosanstifinaghadrar-regular.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notosanstifinaghagrawimazighen-regular.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notosanstifinaghahaggar-regular.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notosanstifinaghair-regular.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notosanstifinaghapt-regular.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notosanstifinaghazawagh-regular.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notosanstifinaghghat-regular.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notosanstifinaghhawad-regular.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notosanstifinaghrhissaixa-regular.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notosanstifinaghsil-regular.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notosanstifinaghtawellemmet-regular.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notosanstirhuta-regular.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notosansugaritic-regular.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notosansvai-regular.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notosanswancho-regular.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notosanswarangciti-regular.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notosansyi-regular.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notosanszanabazarsquare-regular.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notoserif-black.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserif-blackitalic.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserif-bold.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notoserif-bolditalic.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notoserif-condensed.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserif-condensedblack.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserif-condensedblackitalic.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserif-condensedbold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserif-condensedbolditalic.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserif-condensedextrabold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserif-condensedextrabolditalic.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserif-condensedextralight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserif-condensedextralightitalic.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserif-condenseditalic.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserif-condensedlight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserif-condensedlightitalic.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserif-condensedmedium.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserif-condensedmediumitalic.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserif-condensedsemibold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserif-condensedsemibolditalic.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserif-condensedthin.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserif-condensedthinitalic.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserif-extrabold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserif-extrabolditalic.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserif-extracondensed.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserif-extracondensedblack.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserif-extracondensedblackitalic.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserif-extracondensedbold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserif-extracondensedbolditalic.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserif-extracondensedextrabold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserif-extracondensedextrabolditalic.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserif-extracondensedextralight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserif-extracondensedextralightitalic.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserif-extracondenseditalic.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserif-extracondensedlight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserif-extracondensedlightitalic.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserif-extracondensedmedium.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserif-extracondensedmediumitalic.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserif-extracondensedsemibold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserif-extracondensedsemibolditalic.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserif-extracondensedthin.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserif-extracondensedthinitalic.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserif-extralight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserif-extralightitalic.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserif-italic.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notoserif-light.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserif-lightitalic.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserif-medium.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserif-mediumitalic.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserif-regular.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notoserif-semibold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserif-semibolditalic.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserif-semicondensed.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserif-semicondensedblack.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserif-semicondensedblackitalic.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserif-semicondensedbold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserif-semicondensedbolditalic.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserif-semicondensedextrabold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserif-semicondensedextrabolditalic.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserif-semicondensedextralight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserif-semicondensedextralightitalic.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserif-semicondenseditalic.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserif-semicondensedlight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserif-semicondensedlightitalic.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserif-semicondensedmedium.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserif-semicondensedmediumitalic.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserif-semicondensedsemibold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserif-semicondensedsemibolditalic.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserif-semicondensedthin.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserif-semicondensedthinitalic.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserif-thin.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserif-thinitalic.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifahom-regular.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notoserifarmenian-black.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifarmenian-bold.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notoserifarmenian-condensed.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifarmenian-condensedblack.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifarmenian-condensedbold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifarmenian-condensedextrabold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifarmenian-condensedextralight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifarmenian-condensedlight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifarmenian-condensedmedium.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifarmenian-condensedsemibold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifarmenian-condensedthin.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifarmenian-extrabold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifarmenian-extracondensed.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifarmenian-extracondensedblack.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifarmenian-extracondensedbold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifarmenian-extracondensedextrabold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifarmenian-extracondensedextralight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifarmenian-extracondensedlight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifarmenian-extracondensedmedium.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifarmenian-extracondensedsemibold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifarmenian-extracondensedthin.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifarmenian-extralight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifarmenian-light.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifarmenian-medium.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifarmenian-regular.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notoserifarmenian-semibold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifarmenian-semicondensed.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifarmenian-semicondensedblack.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifarmenian-semicondensedbold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifarmenian-semicondensedextrabold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifarmenian-semicondensedextralight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifarmenian-semicondensedlight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifarmenian-semicondensedmedium.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifarmenian-semicondensedsemibold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifarmenian-semicondensedthin.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifarmenian-thin.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifbalinese-regular.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notoserifbengali-black.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifbengali-bold.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notoserifbengali-condensed.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifbengali-condensedblack.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifbengali-condensedbold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifbengali-condensedextrabold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifbengali-condensedextralight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifbengali-condensedlight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifbengali-condensedmedium.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifbengali-condensedsemibold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifbengali-condensedthin.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifbengali-extrabold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifbengali-extracondensed.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifbengali-extracondensedblack.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifbengali-extracondensedbold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifbengali-extracondensedextrabold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifbengali-extracondensedextralight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifbengali-extracondensedlight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifbengali-extracondensedmedium.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifbengali-extracondensedsemibold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifbengali-extracondensedthin.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifbengali-extralight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifbengali-light.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifbengali-medium.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifbengali-regular.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notoserifbengali-semibold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifbengali-semicondensed.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifbengali-semicondensedblack.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifbengali-semicondensedbold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifbengali-semicondensedextrabold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifbengali-semicondensedextralight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifbengali-semicondensedlight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifbengali-semicondensedmedium.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifbengali-semicondensedsemibold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifbengali-semicondensedthin.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifbengali-thin.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifdevanagari-black.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifdevanagari-bold.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notoserifdevanagari-condensed.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifdevanagari-condensedblack.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifdevanagari-condensedbold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifdevanagari-condensedextrabold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifdevanagari-condensedextralight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifdevanagari-condensedlight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifdevanagari-condensedmedium.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifdevanagari-condensedsemibold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifdevanagari-condensedthin.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifdevanagari-extrabold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifdevanagari-extracondensed.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifdevanagari-extracondensedblack.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifdevanagari-extracondensedbold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifdevanagari-extracondensedextrabold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifdevanagari-extracondensedextralight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifdevanagari-extracondensedlight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifdevanagari-extracondensedmedium.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifdevanagari-extracondensedsemibold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifdevanagari-extracondensedthin.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifdevanagari-extralight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifdevanagari-light.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifdevanagari-medium.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifdevanagari-regular.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notoserifdevanagari-semibold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifdevanagari-semicondensed.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifdevanagari-semicondensedblack.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifdevanagari-semicondensedbold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifdevanagari-semicondensedextrabold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifdevanagari-semicondensedextralight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifdevanagari-semicondensedlight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifdevanagari-semicondensedmedium.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifdevanagari-semicondensedsemibold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifdevanagari-semicondensedthin.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifdevanagari-thin.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifdisplay-black.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifdisplay-blackitalic.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifdisplay-bold.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notoserifdisplay-bolditalic.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notoserifdisplay-condensed.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifdisplay-condensedblack.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifdisplay-condensedblackitalic.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifdisplay-condensedbold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifdisplay-condensedbolditalic.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifdisplay-condensedextrabold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifdisplay-condensedextrabolditalic.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifdisplay-condensedextralight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifdisplay-condensedextralightitalic.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifdisplay-condenseditalic.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifdisplay-condensedlight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifdisplay-condensedlightitalic.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifdisplay-condensedmedium.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifdisplay-condensedmediumitalic.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifdisplay-condensedsemibold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifdisplay-condensedsemibolditalic.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifdisplay-condensedthin.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifdisplay-condensedthinitalic.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifdisplay-extrabold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifdisplay-extrabolditalic.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifdisplay-extracondensed.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifdisplay-extracondensedblack.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifdisplay-extracondensedblackitalic.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifdisplay-extracondensedbold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifdisplay-extracondensedbolditalic.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifdisplay-extracondensedextrabold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifdisplay-extracondensedextrabolditalic.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifdisplay-extracondensedextralight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifdisplay-extracondensedextralightitalic.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifdisplay-extracondenseditalic.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifdisplay-extracondensedlight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifdisplay-extracondensedlightitalic.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifdisplay-extracondensedmedium.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifdisplay-extracondensedmediumitalic.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifdisplay-extracondensedsemibold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifdisplay-extracondensedsemibolditalic.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifdisplay-extracondensedthin.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifdisplay-extracondensedthinitalic.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifdisplay-extralight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifdisplay-extralightitalic.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifdisplay-italic.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notoserifdisplay-light.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifdisplay-lightitalic.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifdisplay-medium.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifdisplay-mediumitalic.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifdisplay-regular.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notoserifdisplay-semibold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifdisplay-semibolditalic.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifdisplay-semicondensed.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifdisplay-semicondensedblack.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifdisplay-semicondensedblackitalic.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifdisplay-semicondensedbold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifdisplay-semicondensedbolditalic.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifdisplay-semicondensedextrabold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifdisplay-semicondensedextrabolditalic.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifdisplay-semicondensedextralight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifdisplay-semicondensedextralightitalic.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifdisplay-semicondenseditalic.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifdisplay-semicondensedlight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifdisplay-semicondensedlightitalic.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifdisplay-semicondensedmedium.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifdisplay-semicondensedmediumitalic.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifdisplay-semicondensedsemibold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifdisplay-semicondensedsemibolditalic.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifdisplay-semicondensedthin.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifdisplay-semicondensedthinitalic.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifdisplay-thin.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifdisplay-thinitalic.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifdogra-regular.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notoserifethiopic-black.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifethiopic-bold.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notoserifethiopic-condensed.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifethiopic-condensedblack.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifethiopic-condensedbold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifethiopic-condensedextrabold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifethiopic-condensedextralight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifethiopic-condensedlight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifethiopic-condensedmedium.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifethiopic-condensedsemibold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifethiopic-condensedthin.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifethiopic-extrabold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifethiopic-extracondensed.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifethiopic-extracondensedblack.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifethiopic-extracondensedbold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifethiopic-extracondensedextrabold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifethiopic-extracondensedextralight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifethiopic-extracondensedlight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifethiopic-extracondensedmedium.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifethiopic-extracondensedsemibold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifethiopic-extracondensedthin.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifethiopic-extralight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifethiopic-light.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifethiopic-medium.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifethiopic-regular.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notoserifethiopic-semibold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifethiopic-semicondensed.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifethiopic-semicondensedblack.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifethiopic-semicondensedbold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifethiopic-semicondensedextrabold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifethiopic-semicondensedextralight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifethiopic-semicondensedlight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifethiopic-semicondensedmedium.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifethiopic-semicondensedsemibold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifethiopic-semicondensedthin.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifethiopic-thin.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifgeorgian-black.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifgeorgian-bold.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notoserifgeorgian-condensed.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifgeorgian-condensedblack.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifgeorgian-condensedbold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifgeorgian-condensedextrabold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifgeorgian-condensedextralight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifgeorgian-condensedlight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifgeorgian-condensedmedium.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifgeorgian-condensedsemibold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifgeorgian-condensedthin.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifgeorgian-extrabold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifgeorgian-extracondensed.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifgeorgian-extracondensedblack.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifgeorgian-extracondensedbold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifgeorgian-extracondensedextrabold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifgeorgian-extracondensedextralight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifgeorgian-extracondensedlight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifgeorgian-extracondensedmedium.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifgeorgian-extracondensedsemibold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifgeorgian-extracondensedthin.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifgeorgian-extralight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifgeorgian-light.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifgeorgian-medium.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifgeorgian-regular.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notoserifgeorgian-semibold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifgeorgian-semicondensed.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifgeorgian-semicondensedblack.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifgeorgian-semicondensedbold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifgeorgian-semicondensedextrabold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifgeorgian-semicondensedextralight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifgeorgian-semicondensedlight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifgeorgian-semicondensedmedium.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifgeorgian-semicondensedsemibold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifgeorgian-semicondensedthin.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifgeorgian-thin.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifgrantha-regular.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notoserifgujarati-black.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifgujarati-bold.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notoserifgujarati-extrabold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifgujarati-extralight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifgujarati-light.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifgujarati-medium.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifgujarati-regular.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notoserifgujarati-semibold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifgujarati-thin.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifgurmukhi-black.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifgurmukhi-bold.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notoserifgurmukhi-extrabold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifgurmukhi-extralight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifgurmukhi-light.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifgurmukhi-medium.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifgurmukhi-regular.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notoserifgurmukhi-semibold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifgurmukhi-thin.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifhebrew-black.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifhebrew-bold.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notoserifhebrew-condensed.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifhebrew-condensedblack.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifhebrew-condensedbold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifhebrew-condensedextrabold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifhebrew-condensedextralight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifhebrew-condensedlight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifhebrew-condensedmedium.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifhebrew-condensedsemibold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifhebrew-condensedthin.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifhebrew-extrabold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifhebrew-extracondensed.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifhebrew-extracondensedblack.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifhebrew-extracondensedbold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifhebrew-extracondensedextrabold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifhebrew-extracondensedextralight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifhebrew-extracondensedlight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifhebrew-extracondensedmedium.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifhebrew-extracondensedsemibold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifhebrew-extracondensedthin.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifhebrew-extralight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifhebrew-light.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifhebrew-medium.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifhebrew-regular.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notoserifhebrew-semibold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifhebrew-semicondensed.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifhebrew-semicondensedblack.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifhebrew-semicondensedbold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifhebrew-semicondensedextrabold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifhebrew-semicondensedextralight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifhebrew-semicondensedlight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifhebrew-semicondensedmedium.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifhebrew-semicondensedsemibold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifhebrew-semicondensedthin.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifhebrew-thin.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifkannada-black.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifkannada-bold.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notoserifkannada-extrabold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifkannada-extralight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifkannada-light.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifkannada-medium.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifkannada-regular.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notoserifkannada-semibold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifkannada-thin.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifkhmer-black.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifkhmer-bold.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notoserifkhmer-condensed.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifkhmer-condensedblack.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifkhmer-condensedbold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifkhmer-condensedextrabold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifkhmer-condensedextralight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifkhmer-condensedlight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifkhmer-condensedmedium.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifkhmer-condensedsemibold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifkhmer-condensedthin.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifkhmer-extrabold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifkhmer-extracondensed.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifkhmer-extracondensedblack.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifkhmer-extracondensedbold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifkhmer-extracondensedextrabold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifkhmer-extracondensedextralight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifkhmer-extracondensedlight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifkhmer-extracondensedmedium.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifkhmer-extracondensedsemibold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifkhmer-extracondensedthin.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifkhmer-extralight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifkhmer-light.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifkhmer-medium.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifkhmer-regular.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notoserifkhmer-semibold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifkhmer-semicondensed.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifkhmer-semicondensedblack.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifkhmer-semicondensedbold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifkhmer-semicondensedextrabold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifkhmer-semicondensedextralight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifkhmer-semicondensedlight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifkhmer-semicondensedmedium.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifkhmer-semicondensedsemibold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifkhmer-semicondensedthin.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifkhmer-thin.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifkhojki-bold.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notoserifkhojki-regular.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notoseriflao-black.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoseriflao-bold.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notoseriflao-condensed.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoseriflao-condensedblack.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoseriflao-condensedbold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoseriflao-condensedextrabold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoseriflao-condensedextralight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoseriflao-condensedlight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoseriflao-condensedmedium.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoseriflao-condensedsemibold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoseriflao-condensedthin.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoseriflao-extrabold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoseriflao-extracondensed.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoseriflao-extracondensedblack.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoseriflao-extracondensedbold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoseriflao-extracondensedextrabold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoseriflao-extracondensedextralight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoseriflao-extracondensedlight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoseriflao-extracondensedmedium.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoseriflao-extracondensedsemibold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoseriflao-extracondensedthin.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoseriflao-extralight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoseriflao-light.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoseriflao-medium.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoseriflao-regular.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notoseriflao-semibold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoseriflao-semicondensed.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoseriflao-semicondensedblack.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoseriflao-semicondensedbold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoseriflao-semicondensedextrabold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoseriflao-semicondensedextralight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoseriflao-semicondensedlight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoseriflao-semicondensedmedium.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoseriflao-semicondensedsemibold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoseriflao-semicondensedthin.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoseriflao-thin.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifmalayalam-black.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifmalayalam-bold.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notoserifmalayalam-extrabold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifmalayalam-extralight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifmalayalam-light.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifmalayalam-medium.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifmalayalam-regular.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notoserifmalayalam-semibold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifmalayalam-thin.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifmyanmar-black.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifmyanmar-bold.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notoserifmyanmar-condensed.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifmyanmar-condensedblack.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifmyanmar-condensedbold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifmyanmar-condensedextrabold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifmyanmar-condensedextralight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifmyanmar-condensedlight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifmyanmar-condensedmedium.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifmyanmar-condensedsemibold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifmyanmar-condensedthin.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifmyanmar-extrabold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifmyanmar-extracondensed.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifmyanmar-extracondensedblack.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifmyanmar-extracondensedbold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifmyanmar-extracondensedextrabold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifmyanmar-extracondensedextralight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifmyanmar-extracondensedlight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifmyanmar-extracondensedmedium.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifmyanmar-extracondensedsemibold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifmyanmar-extracondensedthin.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifmyanmar-extralight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifmyanmar-light.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifmyanmar-medium.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifmyanmar-regular.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notoserifmyanmar-semibold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifmyanmar-semicondensed.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifmyanmar-semicondensedblack.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifmyanmar-semicondensedbold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifmyanmar-semicondensedextrabold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifmyanmar-semicondensedextralight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifmyanmar-semicondensedlight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifmyanmar-semicondensedmedium.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifmyanmar-semicondensedsemibold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifmyanmar-semicondensedthin.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifmyanmar-thin.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifnyiakengpuachuehmong-bold.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notoserifnyiakengpuachuehmong-medium.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifnyiakengpuachuehmong-regular.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notoserifnyiakengpuachuehmong-semibold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifsinhala-black.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifsinhala-bold.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notoserifsinhala-condensed.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifsinhala-condensedblack.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifsinhala-condensedbold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifsinhala-condensedextrabold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifsinhala-condensedextralight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifsinhala-condensedlight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifsinhala-condensedmedium.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifsinhala-condensedsemibold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifsinhala-condensedthin.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifsinhala-extrabold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifsinhala-extracondensed.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifsinhala-extracondensedblack.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifsinhala-extracondensedbold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifsinhala-extracondensedextrabold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifsinhala-extracondensedextralight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifsinhala-extracondensedlight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifsinhala-extracondensedmedium.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifsinhala-extracondensedsemibold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifsinhala-extracondensedthin.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifsinhala-extralight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifsinhala-light.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifsinhala-medium.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifsinhala-regular.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notoserifsinhala-semibold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifsinhala-semicondensed.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifsinhala-semicondensedblack.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifsinhala-semicondensedbold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifsinhala-semicondensedextrabold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifsinhala-semicondensedextralight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifsinhala-semicondensedlight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifsinhala-semicondensedmedium.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifsinhala-semicondensedsemibold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifsinhala-semicondensedthin.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifsinhala-thin.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoseriftamil-black.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoseriftamil-bold.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notoseriftamil-condensed.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoseriftamil-condensedblack.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoseriftamil-condensedbold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoseriftamil-condensedextrabold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoseriftamil-condensedextralight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoseriftamil-condensedlight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoseriftamil-condensedmedium.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoseriftamil-condensedsemibold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoseriftamil-condensedthin.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoseriftamil-extrabold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoseriftamil-extracondensed.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoseriftamil-extracondensedblack.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoseriftamil-extracondensedbold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoseriftamil-extracondensedextrabold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoseriftamil-extracondensedextralight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoseriftamil-extracondensedlight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoseriftamil-extracondensedmedium.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoseriftamil-extracondensedsemibold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoseriftamil-extracondensedthin.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoseriftamil-extralight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoseriftamil-light.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoseriftamil-medium.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoseriftamil-regular.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notoseriftamil-semibold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoseriftamil-semicondensed.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoseriftamil-semicondensedblack.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoseriftamil-semicondensedbold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoseriftamil-semicondensedextrabold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoseriftamil-semicondensedextralight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoseriftamil-semicondensedlight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoseriftamil-semicondensedmedium.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoseriftamil-semicondensedsemibold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoseriftamil-semicondensedthin.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoseriftamil-thin.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoseriftamilslanted-black.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoseriftamilslanted-bold.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notoseriftamilslanted-condensed.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoseriftamilslanted-condensedblack.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoseriftamilslanted-condensedbold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoseriftamilslanted-condensedextrabold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoseriftamilslanted-condensedextralight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoseriftamilslanted-condensedlight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoseriftamilslanted-condensedmedium.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoseriftamilslanted-condensedsemibold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoseriftamilslanted-condensedthin.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoseriftamilslanted-extrabold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoseriftamilslanted-extracondensed.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoseriftamilslanted-extracondensedblack.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoseriftamilslanted-extracondensedbold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoseriftamilslanted-extracondensedextrabold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoseriftamilslanted-extracondensedextralight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoseriftamilslanted-extracondensedlight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoseriftamilslanted-extracondensedmedium.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoseriftamilslanted-extracondensedsemibold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoseriftamilslanted-extracondensedthin.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoseriftamilslanted-extralight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoseriftamilslanted-light.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoseriftamilslanted-medium.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoseriftamilslanted-regular.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notoseriftamilslanted-semibold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoseriftamilslanted-semicondensed.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoseriftamilslanted-semicondensedblack.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoseriftamilslanted-semicondensedbold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoseriftamilslanted-semicondensedextrabold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoseriftamilslanted-semicondensedextralight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoseriftamilslanted-semicondensedlight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoseriftamilslanted-semicondensedmedium.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoseriftamilslanted-semicondensedsemibold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoseriftamilslanted-semicondensedthin.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoseriftamilslanted-thin.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoseriftangut-regular.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notoseriftelugu-black.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoseriftelugu-bold.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notoseriftelugu-extrabold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoseriftelugu-extralight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoseriftelugu-light.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoseriftelugu-medium.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoseriftelugu-regular.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notoseriftelugu-semibold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoseriftelugu-thin.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifthai-black.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifthai-bold.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notoserifthai-condensed.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifthai-condensedblack.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifthai-condensedbold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifthai-condensedextrabold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifthai-condensedextralight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifthai-condensedlight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifthai-condensedmedium.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifthai-condensedsemibold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifthai-condensedthin.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifthai-extrabold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifthai-extracondensed.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifthai-extracondensedblack.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifthai-extracondensedbold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifthai-extracondensedextrabold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifthai-extracondensedextralight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifthai-extracondensedlight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifthai-extracondensedmedium.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifthai-extracondensedsemibold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifthai-extracondensedthin.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifthai-extralight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifthai-light.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifthai-medium.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifthai-regular.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notoserifthai-semibold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifthai-semicondensed.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifthai-semicondensedblack.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifthai-semicondensedbold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifthai-semicondensedextrabold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifthai-semicondensedextralight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifthai-semicondensedlight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifthai-semicondensedmedium.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifthai-semicondensedsemibold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifthai-semicondensedthin.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifthai-thin.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoseriftibetan-black.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoseriftibetan-bold.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notoseriftibetan-extrabold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoseriftibetan-extralight.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoseriftibetan-light.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoseriftibetan-medium.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoseriftibetan-regular.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notoseriftibetan-semibold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoseriftibetan-thin.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifyezidi-bold.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notoserifyezidi-medium.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "notoserifyezidi-regular.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notoserifyezidi-semibold.ttf" : { + "installed_by" : [ + "fonts-noto-extra" + ] + }, + "nototraditionalnushu-regular.ttf" : { + "installed_by" : [ + "fonts-noto-core" + ] + }, + "notqr.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "nsecthck.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "nsecthin.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "ntr.ttf" : { + "installed_by" : [ + "fonts-teluguvijayam" + ] + }, + "nucleus.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "numskull.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "nuosusil-regular.ttf" : { + "installed_by" : [ + "fonts-sil-nuosusil" + ] + }, + "nymonak.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "obloquyo.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "obloquys.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "obstacle.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "obstacll.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "ocra.ttf" : { + "installed_by" : [ + "fonts-ocr-a" + ] + }, + "ocrabold.ttf" : { + "installed_by" : [ + "fonts-ocr-a" + ] + }, + "ocracondensed.ttf" : { + "installed_by" : [ + "fonts-ocr-a" + ] + }, + "ocraitalic.ttf" : { + "installed_by" : [ + "fonts-ocr-a" + ] + }, + "ocrb.otf" : { + "installed_by" : [ + "fonts-ocr-b" + ] + }, + "ocrbe.otf" : { + "installed_by" : [ + "fonts-ocr-b" + ] + }, + "ocrbf.otf" : { + "installed_by" : [ + "fonts-ocr-b" + ] + }, + "ocrbl.otf" : { + "installed_by" : [ + "fonts-ocr-b" + ] + }, + "ocrbs.otf" : { + "installed_by" : [ + "fonts-ocr-b" + ] + }, + "ocrbx.otf" : { + "installed_by" : [ + "fonts-ocr-b" + ] + }, + "octicons.ttf" : { + "installed_by" : [ + "fonts-octicons" + ] + }, + "offkiltl.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "offkiltr.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "okolaksbold.ttf" : { + "installed_by" : [ + "fonts-okolaks" + ] + }, + "okolaksbolditalic.ttf" : { + "installed_by" : [ + "fonts-okolaks" + ] + }, + "okolaksregular.ttf" : { + "installed_by" : [ + "fonts-okolaks" + ] + }, + "okolaksregularitalic.ttf" : { + "installed_by" : [ + "fonts-okolaks" + ] + }, + "oldaniaadfstd-bold.otf" : { + "installed_by" : [ + "fonts-adf-oldania" + ] + }, + "oldaniaadfstd-bolditalic.otf" : { + "installed_by" : [ + "fonts-adf-oldania" + ] + }, + "oldaniaadfstd-italic.otf" : { + "installed_by" : [ + "fonts-adf-oldania" + ] + }, + "oldaniaadfstd-regular.otf" : { + "installed_by" : [ + "fonts-adf-oldania" + ] + }, + "oldslavicregu.pfb" : { + "installed_by" : [ + "t1-oldslavic" + ] + }, + "oldstandard-bold.ttf" : { + "installed_by" : [ + "fonts-oldstandard" + ] + }, + "oldstandard-italic.ttf" : { + "installed_by" : [ + "fonts-oldstandard" + ] + }, + "oldstandard-regular.ttf" : { + "installed_by" : [ + "fonts-oldstandard" + ] + }, + "opendyslexic-bold.otf" : { + "installed_by" : [ + "fonts-opendyslexic" + ] + }, + "opendyslexic-bolditalic.otf" : { + "installed_by" : [ + "fonts-opendyslexic" + ] + }, + "opendyslexic-italic.otf" : { + "installed_by" : [ + "fonts-opendyslexic" + ] + }, + "opendyslexic-regular.otf" : { + "installed_by" : [ + "fonts-opendyslexic" + ] + }, + "opendyslexicalta-bold.otf" : { + "installed_by" : [ + "fonts-opendyslexic" + ] + }, + "opendyslexicalta-bolditalic.otf" : { + "installed_by" : [ + "fonts-opendyslexic" + ] + }, + "opendyslexicalta-italic.otf" : { + "installed_by" : [ + "fonts-opendyslexic" + ] + }, + "opendyslexicalta-regular.otf" : { + "installed_by" : [ + "fonts-opendyslexic" + ] + }, + "opendyslexicmono-regular.otf" : { + "installed_by" : [ + "fonts-opendyslexic" + ] + }, + "opens___.ttf" : { + "installed_by" : [ + "fonts-opensymbol" + ] + }, + "opensans-bold.ttf" : { + "installed_by" : [ + "fonts-open-sans" + ] + }, + "opensans-bolditalic.ttf" : { + "installed_by" : [ + "fonts-open-sans" + ] + }, + "opensans-condbold.ttf" : { + "installed_by" : [ + "fonts-open-sans" + ] + }, + "opensans-condlight.ttf" : { + "installed_by" : [ + "fonts-open-sans" + ] + }, + "opensans-condlightitalic.ttf" : { + "installed_by" : [ + "fonts-open-sans" + ] + }, + "opensans-extrabold.ttf" : { + "installed_by" : [ + "fonts-open-sans" + ] + }, + "opensans-extrabolditalic.ttf" : { + "installed_by" : [ + "fonts-open-sans" + ] + }, + "opensans-italic.ttf" : { + "installed_by" : [ + "fonts-open-sans" + ] + }, + "opensans-light.ttf" : { + "installed_by" : [ + "fonts-open-sans" + ] + }, + "opensans-lightitalic.ttf" : { + "installed_by" : [ + "fonts-open-sans" + ] + }, + "opensans-regular.ttf" : { + "installed_by" : [ + "fonts-open-sans" + ] + }, + "opensans-semibold.ttf" : { + "installed_by" : [ + "fonts-open-sans" + ] + }, + "opensans-semibolditalic.ttf" : { + "installed_by" : [ + "fonts-open-sans" + ] + }, + "opiated.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "oradanogsrr.ttf" : { + "installed_by" : [ + "fonts-oradano-mincho-gsrr" + ] + }, + "orbicula.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "osifont.ttf" : { + "installed_by" : [ + "fonts-osifont" + ] + }, + "osp-din.ttf" : { + "installed_by" : [ + "fonts-opendin" + ] + }, + "outersid.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "overhead.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "oxygen-sans-bold.ttf" : { + "installed_by" : [ + "fonts-oxygen" + ] + }, + "oxygen-sans.ttf" : { + "installed_by" : [ + "fonts-oxygen" + ] + }, + "oxygenmono-regular.ttf" : { + "installed_by" : [ + "fonts-oxygen" + ] + }, + "p052-bold.otf" : { + "installed_by" : [ + "fonts-urw-base35" + ] + }, + "p052-bold.pfb" : { + "installed_by" : [ + "fonts-urw-base35" + ] + }, + "p052-bolditalic.otf" : { + "installed_by" : [ + "fonts-urw-base35" + ] + }, + "p052-bolditalic.pfb" : { + "installed_by" : [ + "fonts-urw-base35" + ] + }, + "p052-italic.otf" : { + "installed_by" : [ + "fonts-urw-base35" + ] + }, + "p052-italic.pfb" : { + "installed_by" : [ + "fonts-urw-base35" + ] + }, + "p052-roman.otf" : { + "installed_by" : [ + "fonts-urw-base35" + ] + }, + "p052-roman.pfb" : { + "installed_by" : [ + "fonts-urw-base35" + ] + }, + "p052003d.pfb" : { + "installed_by" : [ + "t1-cyrillic" + ] + }, + "p052004d.pfb" : { + "installed_by" : [ + "t1-cyrillic" + ] + }, + "p052023d.pfb" : { + "installed_by" : [ + "t1-cyrillic" + ] + }, + "p052024d.pfb" : { + "installed_by" : [ + "t1-cyrillic" + ] + }, + "padauk-bold.ttf" : { + "installed_by" : [ + "fonts-sil-padauk" + ] + }, + "padauk-regular.ttf" : { + "installed_by" : [ + "fonts-sil-padauk" + ] + }, + "padaukbook-bold.ttf" : { + "installed_by" : [ + "fonts-sil-padauk" + ] + }, + "padaukbook-regular.ttf" : { + "installed_by" : [ + "fonts-sil-padauk" + ] + }, + "padmaa-bold.1.1.ttf" : { + "installed_by" : [ + "fonts-gujr-extra" + ] + }, + "padmaa-medium-0.5.ttf" : { + "installed_by" : [ + "fonts-gujr-extra" + ] + }, + "padmaa.ttf" : { + "installed_by" : [ + "fonts-gujr-extra" + ] + }, + "pagul.ttf" : { + "installed_by" : [ + "fonts-pagul" + ] + }, + "pallu___.ttf" : { + "installed_by" : [ + "fonts-uralic" + ] + }, + "pallub__.ttf" : { + "installed_by" : [ + "fonts-uralic" + ] + }, + "pallui__.ttf" : { + "installed_by" : [ + "fonts-uralic" + ] + }, + "parix-hybrid111r.otf" : { + "installed_by" : [ + "fonts-gotico-antiqua" + ] + }, + "patchsans.otf" : { + "installed_by" : [ + "fonts-ldco" + ] + }, + "patchsans.ttf" : { + "installed_by" : [ + "fonts-ldco" + ] + }, + "patchserif.otf" : { + "installed_by" : [ + "fonts-ldco" + ] + }, + "patchserif.ttf" : { + "installed_by" : [ + "fonts-ldco" + ] + }, + "patchstencil.otf" : { + "installed_by" : [ + "fonts-ldco" + ] + }, + "patchstencil.ttf" : { + "installed_by" : [ + "fonts-ldco" + ] + }, + "pdark.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "pecita.otf" : { + "installed_by" : [ + "fonts-pecita" + ] + }, + "peddana-regular.ttf" : { + "installed_by" : [ + "fonts-teluguvijayam" + ] + }, + "penguinattack.ttf" : { + "installed_by" : [ + "fonts-dustin" + ] + }, + "persuasi.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "phetsarath_ot.ttf" : { + "installed_by" : [ + "fonts-lao" + ] + }, + "phorfeir.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "phorfeis.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "pincers.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "pindown.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "pindownp.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "pindwnx.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "pindwnxp.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "pixlkrud.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "plasdrip.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "plasdrpe.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "play-bold.otf" : { + "installed_by" : [ + "fonts-play" + ] + }, + "play-bold.ttf" : { + "installed_by" : [ + "fonts-play" + ] + }, + "play-regular.otf" : { + "installed_by" : [ + "fonts-play" + ] + }, + "play-regular.ttf" : { + "installed_by" : [ + "fonts-play" + ] + }, + "pneumati.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "pneutall.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "pneuwide.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "ponnala.ttf" : { + "installed_by" : [ + "fonts-teluguvijayam" + ] + }, + "pothana2000.ttf" : { + "installed_by" : [ + "fonts-telu-extra" + ] + }, + "pottisreeramulu.ttf" : { + "installed_by" : [ + "fonts-teluguvijayam" + ] + }, + "povlogo.ttf" : { + "installed_by" : [ + "fonts-povray" + ] + }, + "powdwrk5.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "powerlinesymbols.otf" : { + "installed_by" : [ + "fonts-powerline" + ] + }, + "prociono.otf" : { + "installed_by" : [ + "fonts-prociono" + ] + }, + "progenisis.ttf" : { + "installed_by" : [ + "fonts-dustin" + ] + }, + "proggytiny.ttf" : { + "installed_by" : [ + "fonts-proggy" + ] + }, + "pseudo.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "ptc55f.ttf" : { + "installed_by" : [ + "fonts-paratype" + ] + }, + "ptc75f.ttf" : { + "installed_by" : [ + "fonts-paratype" + ] + }, + "ptf55f.ttf" : { + "installed_by" : [ + "fonts-paratype" + ] + }, + "ptf56f.ttf" : { + "installed_by" : [ + "fonts-paratype" + ] + }, + "ptf75f.ttf" : { + "installed_by" : [ + "fonts-paratype" + ] + }, + "ptf76f.ttf" : { + "installed_by" : [ + "fonts-paratype" + ] + }, + "ptm55f.ttf" : { + "installed_by" : [ + "fonts-paratype" + ] + }, + "ptm75f.ttf" : { + "installed_by" : [ + "fonts-paratype" + ] + }, + "ptn57f.ttf" : { + "installed_by" : [ + "fonts-paratype" + ] + }, + "ptn77f.ttf" : { + "installed_by" : [ + "fonts-paratype" + ] + }, + "ptolemy-greatprimer18.otf" : { + "installed_by" : [ + "fonts-gotico-antiqua" + ] + }, + "pts55f.ttf" : { + "installed_by" : [ + "fonts-paratype" + ] + }, + "pts56f.ttf" : { + "installed_by" : [ + "fonts-paratype" + ] + }, + "pts75f.ttf" : { + "installed_by" : [ + "fonts-paratype" + ] + }, + "pts76f.ttf" : { + "installed_by" : [ + "fonts-paratype" + ] + }, + "ptz55f.ttf" : { + "installed_by" : [ + "fonts-paratype" + ] + }, + "ptz56f.ttf" : { + "installed_by" : [ + "fonts-paratype" + ] + }, + "purisa-bold.otf" : { + "installed_by" : [ + "fonts-tlwg-purisa-otf" + ] + }, + "purisa-bold.ttf" : { + "installed_by" : [ + "fonts-tlwg-purisa-ttf" + ] + }, + "purisa-boldoblique.otf" : { + "installed_by" : [ + "fonts-tlwg-purisa-otf" + ] + }, + "purisa-boldoblique.ttf" : { + "installed_by" : [ + "fonts-tlwg-purisa-ttf" + ] + }, + "purisa-oblique.otf" : { + "installed_by" : [ + "fonts-tlwg-purisa-otf" + ] + }, + "purisa-oblique.ttf" : { + "installed_by" : [ + "fonts-tlwg-purisa-ttf" + ] + }, + "purisa.otf" : { + "installed_by" : [ + "fonts-tlwg-purisa-otf" + ] + }, + "purisa.ttf" : { + "installed_by" : [ + "fonts-tlwg-purisa-ttf" + ] + }, + "px_ami_bios-2y.ttf" : { + "installed_by" : [ + "fonts-pc-extra" + ] + }, + "px_ami_bios.ttf" : { + "installed_by" : [ + "fonts-pc-extra" + ] + }, + "px_amstradpc1512-2y.ttf" : { + "installed_by" : [ + "fonts-pc" + ] + }, + "px_amstradpc1512.ttf" : { + "installed_by" : [ + "fonts-pc-extra" + ] + }, + "px_ati_8x14.ttf" : { + "installed_by" : [ + "fonts-pc-extra" + ] + }, + "px_ati_8x16.ttf" : { + "installed_by" : [ + "fonts-pc-extra" + ] + }, + "px_ati_8x8-2y.ttf" : { + "installed_by" : [ + "fonts-pc-extra" + ] + }, + "px_ati_8x8.ttf" : { + "installed_by" : [ + "fonts-pc-extra" + ] + }, + "px_ati_9x14.ttf" : { + "installed_by" : [ + "fonts-pc-extra" + ] + }, + "px_ati_9x16.ttf" : { + "installed_by" : [ + "fonts-pc-extra" + ] + }, + "px_ati_smallw_6x8.ttf" : { + "installed_by" : [ + "fonts-pc-extra" + ] + }, + "px_att_pc6300-2x.ttf" : { + "installed_by" : [ + "fonts-pc-extra" + ] + }, + "px_att_pc6300.ttf" : { + "installed_by" : [ + "fonts-pc-extra" + ] + }, + "px_compaqthin_8x14.ttf" : { + "installed_by" : [ + "fonts-pc-extra" + ] + }, + "px_compaqthin_8x16.ttf" : { + "installed_by" : [ + "fonts-pc-extra" + ] + }, + "px_compaqthin_8x8.ttf" : { + "installed_by" : [ + "fonts-pc-extra" + ] + }, + "px_dtk_bios-2y.ttf" : { + "installed_by" : [ + "fonts-pc-extra" + ] + }, + "px_dtk_bios.ttf" : { + "installed_by" : [ + "fonts-pc-extra" + ] + }, + "px_ibm_3270pc.ttf" : { + "installed_by" : [ + "fonts-pc-extra" + ] + }, + "px_ibm_bios-2x.ttf" : { + "installed_by" : [ + "fonts-pc-extra" + ] + }, + "px_ibm_bios-2y.ttf" : { + "installed_by" : [ + "fonts-pc-extra" + ] + }, + "px_ibm_bios.ttf" : { + "installed_by" : [ + "fonts-pc-extra" + ] + }, + "px_ibm_cga-2y.ttf" : { + "installed_by" : [ + "fonts-pc" + ] + }, + "px_ibm_cga.ttf" : { + "installed_by" : [ + "fonts-pc" + ] + }, + "px_ibm_cgathin-2y.ttf" : { + "installed_by" : [ + "fonts-pc-extra" + ] + }, + "px_ibm_cgathin.ttf" : { + "installed_by" : [ + "fonts-pc-extra" + ] + }, + "px_ibm_conv-2x.ttf" : { + "installed_by" : [ + "fonts-pc-extra" + ] + }, + "px_ibm_conv-2y.ttf" : { + "installed_by" : [ + "fonts-pc-extra" + ] + }, + "px_ibm_conv.ttf" : { + "installed_by" : [ + "fonts-pc-extra" + ] + }, + "px_ibm_ega8-2x.ttf" : { + "installed_by" : [ + "fonts-pc-extra" + ] + }, + "px_ibm_ega8.ttf" : { + "installed_by" : [ + "fonts-pc" + ] + }, + "px_ibm_ega9-2x.ttf" : { + "installed_by" : [ + "fonts-pc-extra" + ] + }, + "px_ibm_ega9.ttf" : { + "installed_by" : [ + "fonts-pc-extra" + ] + }, + "px_ibm_iso8.ttf" : { + "installed_by" : [ + "fonts-pc-extra" + ] + }, + "px_ibm_iso9.ttf" : { + "installed_by" : [ + "fonts-pc-extra" + ] + }, + "px_ibm_mda.ttf" : { + "installed_by" : [ + "fonts-pc" + ] + }, + "px_ibm_pgc-2x.ttf" : { + "installed_by" : [ + "fonts-pc-extra" + ] + }, + "px_ibm_pgc.ttf" : { + "installed_by" : [ + "fonts-pc-extra" + ] + }, + "px_ibm_ps2thin1.ttf" : { + "installed_by" : [ + "fonts-pc-extra" + ] + }, + "px_ibm_ps2thin2.ttf" : { + "installed_by" : [ + "fonts-pc-extra" + ] + }, + "px_ibm_ps2thin3.ttf" : { + "installed_by" : [ + "fonts-pc-extra" + ] + }, + "px_ibm_ps2thin4.ttf" : { + "installed_by" : [ + "fonts-pc-extra" + ] + }, + "px_ibm_vga8-2x.ttf" : { + "installed_by" : [ + "fonts-pc-extra" + ] + }, + "px_ibm_vga8.ttf" : { + "installed_by" : [ + "fonts-pc" + ] + }, + "px_ibm_vga9-2x.ttf" : { + "installed_by" : [ + "fonts-pc-extra" + ] + }, + "px_ibm_vga9.ttf" : { + "installed_by" : [ + "fonts-pc" + ] + }, + "px_itt_bios-2y.ttf" : { + "installed_by" : [ + "fonts-pc-extra" + ] + }, + "px_itt_bios.ttf" : { + "installed_by" : [ + "fonts-pc-extra" + ] + }, + "px_kaypro2k-2y.ttf" : { + "installed_by" : [ + "fonts-pc-extra" + ] + }, + "px_kaypro2k.ttf" : { + "installed_by" : [ + "fonts-pc-extra" + ] + }, + "px_phoenix_bios-2y.ttf" : { + "installed_by" : [ + "fonts-pc-extra" + ] + }, + "px_phoenix_bios.ttf" : { + "installed_by" : [ + "fonts-pc-extra" + ] + }, + "px_phoenixega_8x14.ttf" : { + "installed_by" : [ + "fonts-pc-extra" + ] + }, + "px_phoenixega_8x16.ttf" : { + "installed_by" : [ + "fonts-pc-extra" + ] + }, + "px_phoenixega_8x8-2y.ttf" : { + "installed_by" : [ + "fonts-pc-extra" + ] + }, + "px_phoenixega_8x8.ttf" : { + "installed_by" : [ + "fonts-pc-extra" + ] + }, + "px_phoenixega_9x14.ttf" : { + "installed_by" : [ + "fonts-pc-extra" + ] + }, + "px_tandynew_225-2y.ttf" : { + "installed_by" : [ + "fonts-pc-extra" + ] + }, + "px_tandynew_225.ttf" : { + "installed_by" : [ + "fonts-pc-extra" + ] + }, + "px_tandynew_mono.ttf" : { + "installed_by" : [ + "fonts-pc-extra" + ] + }, + "px_tandynew_tv-2y.ttf" : { + "installed_by" : [ + "fonts-pc-extra" + ] + }, + "px_tandynew_tv.ttf" : { + "installed_by" : [ + "fonts-pc-extra" + ] + }, + "px_tandyold_225-2y.ttf" : { + "installed_by" : [ + "fonts-pc-extra" + ] + }, + "px_tandyold_225.ttf" : { + "installed_by" : [ + "fonts-pc-extra" + ] + }, + "px_tandyold_tv-2y.ttf" : { + "installed_by" : [ + "fonts-pc-extra" + ] + }, + "px_tandyold_tv.ttf" : { + "installed_by" : [ + "fonts-pc-extra" + ] + }, + "px_toshibalcd_8x16.ttf" : { + "installed_by" : [ + "fonts-pc-extra" + ] + }, + "px_toshibalcd_8x8.ttf" : { + "installed_by" : [ + "fonts-pc-extra" + ] + }, + "px_verite_8x14.ttf" : { + "installed_by" : [ + "fonts-pc-extra" + ] + }, + "px_verite_8x16.ttf" : { + "installed_by" : [ + "fonts-pc-extra" + ] + }, + "px_verite_8x8-2y.ttf" : { + "installed_by" : [ + "fonts-pc-extra" + ] + }, + "px_verite_8x8.ttf" : { + "installed_by" : [ + "fonts-pc-extra" + ] + }, + "px_verite_9x14.ttf" : { + "installed_by" : [ + "fonts-pc-extra" + ] + }, + "px_verite_9x16.ttf" : { + "installed_by" : [ + "fonts-pc-extra" + ] + }, + "px_vga_squarepx.ttf" : { + "installed_by" : [ + "fonts-pc" + ] + }, + "px_vtech_bios-2y.ttf" : { + "installed_by" : [ + "fonts-pc-extra" + ] + }, + "px_vtech_bios.ttf" : { + "installed_by" : [ + "fonts-pc-extra" + ] + }, + "px_wyse700a-2y.ttf" : { + "installed_by" : [ + "fonts-pc-extra" + ] + }, + "px_wyse700a.ttf" : { + "installed_by" : [ + "fonts-pc-extra" + ] + }, + "px_wyse700b-2y.ttf" : { + "installed_by" : [ + "fonts-pc-extra" + ] + }, + "px_wyse700b.ttf" : { + "installed_by" : [ + "fonts-pc-extra" + ] + }, + "pyidaungsu-2.3_bold.ttf" : { + "installed_by" : [ + "fonts-myanmar" + ] + }, + "pyidaungsu-2.3_regular.ttf" : { + "installed_by" : [ + "fonts-myanmar" + ] + }, + "qbicle1.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "qbicle2.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "qbicle3.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "qbicle4.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "qlumpy.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "qlumpysh.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "quacksal.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "quadrcal.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "quadrtic.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "quandary.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "quantfh.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "quantflt.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "quantrh.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "quantrnd.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "quanttap.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "quaranti.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "quarthck.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "quarthin.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "quattrocento-regular.otf" : { + "installed_by" : [ + "fonts-quattrocento" + ] + }, + "queasy.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "queasyol.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "quercus.ttf" : { + "installed_by" : [ + "fonts-linex" + ] + }, + "quercus_bold.ttf" : { + "installed_by" : [ + "fonts-linex" + ] + }, + "quercus_bold_it.ttf" : { + "installed_by" : [ + "fonts-linex" + ] + }, + "quercus_it.ttf" : { + "installed_by" : [ + "fonts-linex" + ] + }, + "quicksand-bold.ttf" : { + "installed_by" : [ + "fonts-quicksand" + ] + }, + "quicksand-light.ttf" : { + "installed_by" : [ + "fonts-quicksand" + ] + }, + "quicksand-medium.ttf" : { + "installed_by" : [ + "fonts-quicksand" + ] + }, + "quicksand-regular.ttf" : { + "installed_by" : [ + "fonts-quicksand" + ] + }, + "quillexo.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "quillexs.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "rachana-bold.ttf" : { + "installed_by" : [ + "fonts-smc-rachana" + ] + }, + "rachana-regular.ttf" : { + "installed_by" : [ + "fonts-smc-rachana" + ] + }, + "radissans-medium.otf" : { + "installed_by" : [ + "fonts-radisnoir" + ] + }, + "raghumalayalamsans-regular.ttf" : { + "installed_by" : [ + "fonts-smc-raghumalayalamsans" + ] + }, + "ramabhadra.ttf" : { + "installed_by" : [ + "fonts-teluguvijayam" + ] + }, + "ramaraja-regular.ttf" : { + "installed_by" : [ + "fonts-teluguvijayam" + ] + }, + "rambling.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "rampartone-regular.ttf" : { + "installed_by" : [ + "fonts-rampart" + ] + }, + "rasa-bold.ttf" : { + "installed_by" : [ + "fonts-yrsa-rasa" + ] + }, + "rasa-light.ttf" : { + "installed_by" : [ + "fonts-yrsa-rasa" + ] + }, + "rasa-medium.ttf" : { + "installed_by" : [ + "fonts-yrsa-rasa" + ] + }, + "rasa-regular.ttf" : { + "installed_by" : [ + "fonts-yrsa-rasa" + ] + }, + "rasa-semibold.ttf" : { + "installed_by" : [ + "fonts-yrsa-rasa" + ] + }, + "ratav53.ttf" : { + "installed_by" : [ + "fonts-sil-mondulkiri-extra" + ] + }, + "ravaged2.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "ravcater.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "raviprakash.ttf" : { + "installed_by" : [ + "fonts-teluguvijayam" + ] + }, + "raydiat2.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "reason.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "reasonsh.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "redundan.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "regenera.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "reggaeone-regular.ttf" : { + "installed_by" : [ + "fonts-reggae" + ] + }, + "registry.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "rehearsc.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "rehearso.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "rehearsp.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "rekha.ttf" : { + "installed_by" : [ + "fonts-gujr-extra" + ] + }, + "relapse.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "revert.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "revertro.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "rg2014b.ttf" : { + "installed_by" : [ + "fonts-roadgeek" + ] + }, + "rg2014c.ttf" : { + "installed_by" : [ + "fonts-roadgeek" + ] + }, + "rg2014d.ttf" : { + "installed_by" : [ + "fonts-roadgeek" + ] + }, + "rg2014e.ttf" : { + "installed_by" : [ + "fonts-roadgeek" + ] + }, + "rg2014eem.ttf" : { + "installed_by" : [ + "fonts-roadgeek" + ] + }, + "rg2014em.ttf" : { + "installed_by" : [ + "fonts-roadgeek" + ] + }, + "rg2014f.ttf" : { + "installed_by" : [ + "fonts-roadgeek" + ] + }, + "richstyle.ttf" : { + "installed_by" : [ + "fonts-cegui" + ] + }, + "rictydiminished-bold.ttf" : { + "installed_by" : [ + "fonts-ricty-diminished" + ] + }, + "rictydiminished-boldoblique.ttf" : { + "installed_by" : [ + "fonts-ricty-diminished" + ] + }, + "rictydiminished-oblique.ttf" : { + "installed_by" : [ + "fonts-ricty-diminished" + ] + }, + "rictydiminished-regular.ttf" : { + "installed_by" : [ + "fonts-ricty-diminished" + ] + }, + "rictydiminisheddiscord-bold.ttf" : { + "installed_by" : [ + "fonts-ricty-diminished" + ] + }, + "rictydiminisheddiscord-boldoblique.ttf" : { + "installed_by" : [ + "fonts-ricty-diminished" + ] + }, + "rictydiminisheddiscord-oblique.ttf" : { + "installed_by" : [ + "fonts-ricty-diminished" + ] + }, + "rictydiminisheddiscord-regular.ttf" : { + "installed_by" : [ + "fonts-ricty-diminished" + ] + }, + "rit-sundar.ttf" : { + "installed_by" : [ + "fonts-rit-sundar" + ] + }, + "roboto-black.ttf" : { + "installed_by" : [ + "fonts-roboto-fontface", + "fonts-roboto-fontface", + "fonts-roboto-hinted", + "fonts-roboto-unhinted" + ] + }, + "roboto-blackitalic.ttf" : { + "installed_by" : [ + "fonts-roboto-fontface", + "fonts-roboto-fontface", + "fonts-roboto-hinted", + "fonts-roboto-unhinted" + ] + }, + "roboto-bold.ttf" : { + "installed_by" : [ + "fonts-roboto-fontface", + "fonts-roboto-fontface", + "fonts-roboto-hinted", + "fonts-roboto-unhinted" + ] + }, + "roboto-bolditalic.ttf" : { + "installed_by" : [ + "fonts-roboto-fontface", + "fonts-roboto-fontface", + "fonts-roboto-hinted", + "fonts-roboto-unhinted" + ] + }, + "roboto-condensed-bold.ttf" : { + "installed_by" : [ + "fonts-roboto-fontface", + "fonts-roboto-fontface" + ] + }, + "roboto-condensed-bolditalic.ttf" : { + "installed_by" : [ + "fonts-roboto-fontface", + "fonts-roboto-fontface" + ] + }, + "roboto-condensed-light.ttf" : { + "installed_by" : [ + "fonts-roboto-fontface", + "fonts-roboto-fontface" + ] + }, + "roboto-condensed-lightitalic.ttf" : { + "installed_by" : [ + "fonts-roboto-fontface", + "fonts-roboto-fontface" + ] + }, + "roboto-condensed-regular.ttf" : { + "installed_by" : [ + "fonts-roboto-fontface", + "fonts-roboto-fontface" + ] + }, + "roboto-condensed-regularitalic.ttf" : { + "installed_by" : [ + "fonts-roboto-fontface", + "fonts-roboto-fontface" + ] + }, + "roboto-italic.ttf" : { + "installed_by" : [ + "fonts-roboto-hinted", + "fonts-roboto-unhinted" + ] + }, + "roboto-light.ttf" : { + "installed_by" : [ + "fonts-roboto-fontface", + "fonts-roboto-fontface", + "fonts-roboto-hinted", + "fonts-roboto-unhinted" + ] + }, + "roboto-lightitalic.ttf" : { + "installed_by" : [ + "fonts-roboto-fontface", + "fonts-roboto-fontface", + "fonts-roboto-hinted", + "fonts-roboto-unhinted" + ] + }, + "roboto-medium.ttf" : { + "installed_by" : [ + "fonts-roboto-fontface", + "fonts-roboto-fontface", + "fonts-roboto-hinted", + "fonts-roboto-unhinted" + ] + }, + "roboto-mediumitalic.ttf" : { + "installed_by" : [ + "fonts-roboto-fontface", + "fonts-roboto-fontface", + "fonts-roboto-hinted", + "fonts-roboto-unhinted" + ] + }, + "roboto-regular.ttf" : { + "installed_by" : [ + "fonts-roboto-fontface", + "fonts-roboto-fontface", + "fonts-roboto-hinted", + "fonts-roboto-unhinted" + ] + }, + "roboto-regularitalic.ttf" : { + "installed_by" : [ + "fonts-roboto-fontface", + "fonts-roboto-fontface" + ] + }, + "roboto-thin.ttf" : { + "installed_by" : [ + "fonts-roboto-fontface", + "fonts-roboto-fontface", + "fonts-roboto-hinted", + "fonts-roboto-unhinted" + ] + }, + "roboto-thinitalic.ttf" : { + "installed_by" : [ + "fonts-roboto-fontface", + "fonts-roboto-fontface", + "fonts-roboto-hinted", + "fonts-roboto-unhinted" + ] + }, + "robotocondensed-bold.ttf" : { + "installed_by" : [ + "fonts-roboto-hinted", + "fonts-roboto-unhinted" + ] + }, + "robotocondensed-bolditalic.ttf" : { + "installed_by" : [ + "fonts-roboto-hinted", + "fonts-roboto-unhinted" + ] + }, + "robotocondensed-italic.ttf" : { + "installed_by" : [ + "fonts-roboto-hinted", + "fonts-roboto-unhinted" + ] + }, + "robotocondensed-light.ttf" : { + "installed_by" : [ + "fonts-roboto-hinted", + "fonts-roboto-unhinted" + ] + }, + "robotocondensed-lightitalic.ttf" : { + "installed_by" : [ + "fonts-roboto-hinted", + "fonts-roboto-unhinted" + ] + }, + "robotocondensed-medium.ttf" : { + "installed_by" : [ + "fonts-roboto-hinted", + "fonts-roboto-unhinted" + ] + }, + "robotocondensed-mediumitalic.ttf" : { + "installed_by" : [ + "fonts-roboto-hinted", + "fonts-roboto-unhinted" + ] + }, + "robotocondensed-regular.ttf" : { + "installed_by" : [ + "fonts-roboto-hinted", + "fonts-roboto-unhinted" + ] + }, + "robotoslab-bold.otf" : { + "installed_by" : [ + "fonts-roboto-slab" + ] + }, + "robotoslab-light.otf" : { + "installed_by" : [ + "fonts-roboto-slab" + ] + }, + "robotoslab-regular.otf" : { + "installed_by" : [ + "fonts-roboto-slab" + ] + }, + "robotoslab-thin.otf" : { + "installed_by" : [ + "fonts-roboto-slab" + ] + }, + "rocknrollone-regular.ttf" : { + "installed_by" : [ + "fonts-rocknroll" + ] + }, + "romandeadfno2std-demibold.otf" : { + "installed_by" : [ + "fonts-adf-romande" + ] + }, + "romandeadfno2std-demibolditalic.otf" : { + "installed_by" : [ + "fonts-adf-romande" + ] + }, + "romandeadfno2std-italic.otf" : { + "installed_by" : [ + "fonts-adf-romande" + ] + }, + "romandeadfno2std-regular.otf" : { + "installed_by" : [ + "fonts-adf-romande" + ] + }, + "romandeadfscriptstd-italic.otf" : { + "installed_by" : [ + "fonts-adf-romande" + ] + }, + "romandeadfstd-demibold.otf" : { + "installed_by" : [ + "fonts-adf-romande" + ] + }, + "romandeadfstd-demibolditalic.otf" : { + "installed_by" : [ + "fonts-adf-romande" + ] + }, + "romandeadfstd-italic.otf" : { + "installed_by" : [ + "fonts-adf-romande" + ] + }, + "romandeadfstd-regular.otf" : { + "installed_by" : [ + "fonts-adf-romande" + ] + }, + "romandeadfstylestd-demibold.otf" : { + "installed_by" : [ + "fonts-adf-romande" + ] + }, + "romandeadfstylestd-regular.otf" : { + "installed_by" : [ + "fonts-adf-romande" + ] + }, + "romau___.ttf" : { + "installed_by" : [ + "fonts-uralic" + ] + }, + "romaub__.ttf" : { + "installed_by" : [ + "fonts-uralic" + ] + }, + "romaui__.ttf" : { + "installed_by" : [ + "fonts-uralic" + ] + }, + "rot-protoroman102r.otf" : { + "installed_by" : [ + "fonts-gotico-antiqua" + ] + }, + "rotund.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "rotundo.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "roughday.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "routed-gothic-half-italic.ttf" : { + "installed_by" : [ + "fonts-routed-gothic" + ] + }, + "routed-gothic-italic.ttf" : { + "installed_by" : [ + "fonts-routed-gothic" + ] + }, + "routed-gothic-narrow-half-italic.ttf" : { + "installed_by" : [ + "fonts-routed-gothic" + ] + }, + "routed-gothic-narrow-italic.ttf" : { + "installed_by" : [ + "fonts-routed-gothic" + ] + }, + "routed-gothic-narrow.ttf" : { + "installed_by" : [ + "fonts-routed-gothic" + ] + }, + "routed-gothic-wide-half-italic.ttf" : { + "installed_by" : [ + "fonts-routed-gothic" + ] + }, + "routed-gothic-wide-italic.ttf" : { + "installed_by" : [ + "fonts-routed-gothic" + ] + }, + "routed-gothic-wide.ttf" : { + "installed_by" : [ + "fonts-routed-gothic" + ] + }, + "routed-gothic.ttf" : { + "installed_by" : [ + "fonts-routed-gothic" + ] + }, + "rsfs10.ttf" : { + "installed_by" : [ + "fonts-lyx" + ] + }, + "rufscript010.ttf" : { + "installed_by" : [ + "fonts-rufscript" + ] + }, + "rusch-goticoantiqua100g.otf" : { + "installed_by" : [ + "fonts-gotico-antiqua" + ] + }, + "rusch-r-bizarre-protoroman103r.otf" : { + "installed_by" : [ + "fonts-gotico-antiqua" + ] + }, + "ryuker.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "saab.ttf" : { + "installed_by" : [ + "fonts-guru-extra" + ] + }, + "sahadeva.ttf" : { + "installed_by" : [ + "fonts-sahadeva" + ] + }, + "salaowu-bold.ttf" : { + "installed_by" : [ + "fonts-sil-shimenkan-salaowu" + ] + }, + "salaowu-regular.ttf" : { + "installed_by" : [ + "fonts-sil-shimenkan-salaowu" + ] + }, + "salaowubook-bold.ttf" : { + "installed_by" : [ + "fonts-sil-shimenkan-salaowu" + ] + }, + "salaowubook-regular.ttf" : { + "installed_by" : [ + "fonts-sil-shimenkan-salaowu" + ] + }, + "salaowuextralight-bold.ttf" : { + "installed_by" : [ + "fonts-sil-shimenkan-salaowu" + ] + }, + "salaowuextralight-regular.ttf" : { + "installed_by" : [ + "fonts-sil-shimenkan-salaowu" + ] + }, + "salaowulight-bold.ttf" : { + "installed_by" : [ + "fonts-sil-shimenkan-salaowu" + ] + }, + "salaowulight-regular.ttf" : { + "installed_by" : [ + "fonts-sil-shimenkan-salaowu" + ] + }, + "samanata.ttf" : { + "installed_by" : [ + "fonts-deva-extra" + ] + }, + "samyak-devanagari.ttf" : { + "installed_by" : [ + "fonts-samyak-deva" + ] + }, + "samyak-gujarati.ttf" : { + "installed_by" : [ + "fonts-samyak-gujr" + ] + }, + "samyak-malayalam.ttf" : { + "installed_by" : [ + "fonts-samyak-mlym" + ] + }, + "samyak-oriya.ttf" : { + "installed_by" : [ + "fonts-samyak-orya" + ] + }, + "samyak-tamil.ttf" : { + "installed_by" : [ + "fonts-samyak-taml" + ] + }, + "sanscu__.ttf" : { + "installed_by" : [ + "fonts-uralic" + ] + }, + "sanscub_.ttf" : { + "installed_by" : [ + "fonts-uralic" + ] + }, + "sansu___.ttf" : { + "installed_by" : [ + "fonts-uralic" + ] + }, + "sansub__.ttf" : { + "installed_by" : [ + "fonts-uralic" + ] + }, + "sansubi_.ttf" : { + "installed_by" : [ + "fonts-uralic" + ] + }, + "sansui__.ttf" : { + "installed_by" : [ + "fonts-uralic" + ] + }, + "sapushan-bold.ttf" : { + "installed_by" : [ + "fonts-sil-shimenkan-sapushan" + ] + }, + "sapushan-regular.ttf" : { + "installed_by" : [ + "fonts-sil-shimenkan-sapushan" + ] + }, + "sapushanbook-bold.ttf" : { + "installed_by" : [ + "fonts-sil-shimenkan-sapushan" + ] + }, + "sapushanbook-regular.ttf" : { + "installed_by" : [ + "fonts-sil-shimenkan-sapushan" + ] + }, + "sapushanextralight-bold.ttf" : { + "installed_by" : [ + "fonts-sil-shimenkan-sapushan" + ] + }, + "sapushanextralight-regular.ttf" : { + "installed_by" : [ + "fonts-sil-shimenkan-sapushan" + ] + }, + "sapushanlight-bold.ttf" : { + "installed_by" : [ + "fonts-sil-shimenkan-sapushan" + ] + }, + "sapushanlight-regular.ttf" : { + "installed_by" : [ + "fonts-sil-shimenkan-sapushan" + ] + }, + "sarai.ttf" : { + "installed_by" : [ + "fonts-sarai" + ] + }, + "sarcasti.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "saunder.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "sawarabi-gothic-medium.ttf" : { + "installed_by" : [ + "fonts-sawarabi-gothic" + ] + }, + "sawarabi-mincho-medium.ttf" : { + "installed_by" : [ + "fonts-sawarabi-mincho" + ] + }, + "sawasdee-bold.otf" : { + "installed_by" : [ + "fonts-tlwg-sawasdee-otf" + ] + }, + "sawasdee-bold.ttf" : { + "installed_by" : [ + "fonts-tlwg-sawasdee-ttf" + ] + }, + "sawasdee-boldoblique.otf" : { + "installed_by" : [ + "fonts-tlwg-sawasdee-otf" + ] + }, + "sawasdee-boldoblique.ttf" : { + "installed_by" : [ + "fonts-tlwg-sawasdee-ttf" + ] + }, + "sawasdee-oblique.otf" : { + "installed_by" : [ + "fonts-tlwg-sawasdee-otf" + ] + }, + "sawasdee-oblique.ttf" : { + "installed_by" : [ + "fonts-tlwg-sawasdee-ttf" + ] + }, + "sawasdee.otf" : { + "installed_by" : [ + "fonts-tlwg-sawasdee-otf" + ] + }, + "sawasdee.ttf" : { + "installed_by" : [ + "fonts-tlwg-sawasdee-ttf" + ] + }, + "sayphan.otf" : { + "installed_by" : [ + "fonts-ldco" + ] + }, + "sayphan.ttf" : { + "installed_by" : [ + "fonts-ldco" + ] + }, + "scalines.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "scheherazade-bold.ttf" : { + "installed_by" : [ + "fonts-sil-scheherazade" + ] + }, + "scheherazade-regular.ttf" : { + "installed_by" : [ + "fonts-sil-scheherazade" + ] + }, + "schou___.ttf" : { + "installed_by" : [ + "fonts-uralic" + ] + }, + "schoub__.ttf" : { + "installed_by" : [ + "fonts-uralic" + ] + }, + "schoui__.ttf" : { + "installed_by" : [ + "fonts-uralic" + ] + }, + "sclnmaze.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "sequence.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "setbackt.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "setofont-ex.ttf" : { + "installed_by" : [ + "fonts-seto" + ] + }, + "setofont.ttf" : { + "installed_by" : [ + "fonts-seto" + ] + }, + "shimenkan-bold.ttf" : { + "installed_by" : [ + "fonts-sil-shimenkan" + ] + }, + "shimenkan-regular.ttf" : { + "installed_by" : [ + "fonts-sil-shimenkan" + ] + }, + "shimenkanbook-bold.ttf" : { + "installed_by" : [ + "fonts-sil-shimenkan" + ] + }, + "shimenkanbook-regular.ttf" : { + "installed_by" : [ + "fonts-sil-shimenkan" + ] + }, + "shimenkanextralight-bold.ttf" : { + "installed_by" : [ + "fonts-sil-shimenkan" + ] + }, + "shimenkanextralight-regular.ttf" : { + "installed_by" : [ + "fonts-sil-shimenkan" + ] + }, + "shimenkangsm-bold.ttf" : { + "installed_by" : [ + "fonts-sil-shimenkan-gsm" + ] + }, + "shimenkangsm-regular.ttf" : { + "installed_by" : [ + "fonts-sil-shimenkan-gsm" + ] + }, + "shimenkangsmbook-bold.ttf" : { + "installed_by" : [ + "fonts-sil-shimenkan-gsm" + ] + }, + "shimenkangsmbook-regular.ttf" : { + "installed_by" : [ + "fonts-sil-shimenkan-gsm" + ] + }, + "shimenkangsmextralight-bold.ttf" : { + "installed_by" : [ + "fonts-sil-shimenkan-gsm" + ] + }, + "shimenkangsmextralight-regular.ttf" : { + "installed_by" : [ + "fonts-sil-shimenkan-gsm" + ] + }, + "shimenkangsmlight-bold.ttf" : { + "installed_by" : [ + "fonts-sil-shimenkan-gsm" + ] + }, + "shimenkangsmlight-regular.ttf" : { + "installed_by" : [ + "fonts-sil-shimenkan-gsm" + ] + }, + "shimenkanguifan-bold.ttf" : { + "installed_by" : [ + "fonts-sil-shimenkan-guifan" + ] + }, + "shimenkanguifan-regular.ttf" : { + "installed_by" : [ + "fonts-sil-shimenkan-guifan" + ] + }, + "shimenkanguifanbook-bold.ttf" : { + "installed_by" : [ + "fonts-sil-shimenkan-guifan" + ] + }, + "shimenkanguifanbook-regular.ttf" : { + "installed_by" : [ + "fonts-sil-shimenkan-guifan" + ] + }, + "shimenkanguifanextralight-bold.ttf" : { + "installed_by" : [ + "fonts-sil-shimenkan-guifan" + ] + }, + "shimenkanguifanextralight-regular.ttf" : { + "installed_by" : [ + "fonts-sil-shimenkan-guifan" + ] + }, + "shimenkanguifanlight-bold.ttf" : { + "installed_by" : [ + "fonts-sil-shimenkan-guifan" + ] + }, + "shimenkanguifanlight-regular.ttf" : { + "installed_by" : [ + "fonts-sil-shimenkan-guifan" + ] + }, + "shimenkanmas-bold.ttf" : { + "installed_by" : [ + "fonts-sil-shimenkan-mas" + ] + }, + "shimenkanmas-regular.ttf" : { + "installed_by" : [ + "fonts-sil-shimenkan-mas" + ] + }, + "shimenkanmasbook-bold.ttf" : { + "installed_by" : [ + "fonts-sil-shimenkan-mas" + ] + }, + "shimenkanmasbook-regular.ttf" : { + "installed_by" : [ + "fonts-sil-shimenkan-mas" + ] + }, + "shimenkanmasextralight-bold.ttf" : { + "installed_by" : [ + "fonts-sil-shimenkan-mas" + ] + }, + "shimenkanmasextralight-regular.ttf" : { + "installed_by" : [ + "fonts-sil-shimenkan-mas" + ] + }, + "shimenkanmaslight-bold.ttf" : { + "installed_by" : [ + "fonts-sil-shimenkan-mas" + ] + }, + "shimenkanmaslight-regular.ttf" : { + "installed_by" : [ + "fonts-sil-shimenkan-mas" + ] + }, + "shimenkanmgs-bold.ttf" : { + "installed_by" : [ + "fonts-sil-shimenkan-mgs" + ] + }, + "shimenkanmgs-regular.ttf" : { + "installed_by" : [ + "fonts-sil-shimenkan-mgs" + ] + }, + "shimenkanmgsbook-bold.ttf" : { + "installed_by" : [ + "fonts-sil-shimenkan-mgs" + ] + }, + "shimenkanmgsbook-regular.ttf" : { + "installed_by" : [ + "fonts-sil-shimenkan-mgs" + ] + }, + "shimenkanmgsextralight-bold.ttf" : { + "installed_by" : [ + "fonts-sil-shimenkan-mgs" + ] + }, + "shimenkanmgsextralight-regular.ttf" : { + "installed_by" : [ + "fonts-sil-shimenkan-mgs" + ] + }, + "shimenkanmgslight-bold.ttf" : { + "installed_by" : [ + "fonts-sil-shimenkan-mgs" + ] + }, + "shimenkanmgslight-regular.ttf" : { + "installed_by" : [ + "fonts-sil-shimenkan-mgs" + ] + }, + "shimenkanzonghe-bold.ttf" : { + "installed_by" : [ + "fonts-sil-shimenkan-zonghe" + ] + }, + "shimenkanzonghe-regular.ttf" : { + "installed_by" : [ + "fonts-sil-shimenkan-zonghe" + ] + }, + "shimenkanzonghebook-bold.ttf" : { + "installed_by" : [ + "fonts-sil-shimenkan-zonghe" + ] + }, + "shimenkanzonghebook-regular.ttf" : { + "installed_by" : [ + "fonts-sil-shimenkan-zonghe" + ] + }, + "shimenkanzongheextralight-bold.ttf" : { + "installed_by" : [ + "fonts-sil-shimenkan-zonghe" + ] + }, + "shimenkanzongheextralight-regular.ttf" : { + "installed_by" : [ + "fonts-sil-shimenkan-zonghe" + ] + }, + "shimenkanzonghelight-bold.ttf" : { + "installed_by" : [ + "fonts-sil-shimenkan-zonghe" + ] + }, + "shimenkanzonghelight-regular.ttf" : { + "installed_by" : [ + "fonts-sil-shimenkan-zonghe" + ] + }, + "sideways.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "sileot.ttf" : { + "installed_by" : [ + "fonts-sil-ezra" + ] + }, + "sileotsr.ttf" : { + "installed_by" : [ + "fonts-sil-ezra" + ] + }, + "simplto2.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "skechers.otf" : { + "installed_by" : [ + "fonts-ldco" + ] + }, + "skechers.ttf" : { + "installed_by" : [ + "fonts-ldco" + ] + }, + "skullcap.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "slender.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "slenderw.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "slenmini.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "slenstub.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "small_fonts.ttf" : { + "installed_by" : [ + "fonts-wine" + ] + }, + "small_fonts_jp.ttf" : { + "installed_by" : [ + "fonts-wine" + ] + }, + "snailets.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "snb.ttf" : { + "installed_by" : [ + "fonts-sil-sophia-nubian" + ] + }, + "snbi.ttf" : { + "installed_by" : [ + "fonts-sil-sophia-nubian" + ] + }, + "sni.ttf" : { + "installed_by" : [ + "fonts-sil-sophia-nubian" + ] + }, + "snr.ttf" : { + "installed_by" : [ + "fonts-sil-sophia-nubian" + ] + }, + "solidemirageetroit.otf" : { + "installed_by" : [ + "fonts-solide-mirage" + ] + }, + "solidemiragemono.otf" : { + "installed_by" : [ + "fonts-solide-mirage" + ] + }, + "solothurn-bold.otf" : { + "installed_by" : [ + "fonts-adf-solothurn" + ] + }, + "solothurn-boldoblique.otf" : { + "installed_by" : [ + "fonts-adf-solothurn" + ] + }, + "solothurn-medium.otf" : { + "installed_by" : [ + "fonts-adf-solothurn" + ] + }, + "solothurn-mediumoblique.otf" : { + "installed_by" : [ + "fonts-adf-solothurn" + ] + }, + "solothurn-oblique.otf" : { + "installed_by" : [ + "fonts-adf-solothurn" + ] + }, + "solothurn-regular.otf" : { + "installed_by" : [ + "fonts-adf-solothurn" + ] + }, + "sora-bold.otf" : { + "installed_by" : [ + "fonts-sora" + ] + }, + "sora-extrabold.otf" : { + "installed_by" : [ + "fonts-sora" + ] + }, + "sora-extralight.otf" : { + "installed_by" : [ + "fonts-sora" + ] + }, + "sora-light.otf" : { + "installed_by" : [ + "fonts-sora" + ] + }, + "sora-regular.otf" : { + "installed_by" : [ + "fonts-sora" + ] + }, + "sora-semibold.otf" : { + "installed_by" : [ + "fonts-sora" + ] + }, + "sora-thin.otf" : { + "installed_by" : [ + "fonts-sora" + ] + }, + "souffletvert-hybrid106r.otf" : { + "installed_by" : [ + "fonts-gotico-antiqua" + ] + }, + "spaciouo.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "spacious.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "spastic2.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "spheroid.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "spheroix.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "spira-protoroman110r.otf" : { + "installed_by" : [ + "fonts-gotico-antiqua" + ] + }, + "splatz2.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "spleen-12x24.otf" : { + "installed_by" : [ + "fonts-spleen" + ] + }, + "spleen-16x32.otf" : { + "installed_by" : [ + "fonts-spleen" + ] + }, + "spleen-32x64.otf" : { + "installed_by" : [ + "fonts-spleen" + ] + }, + "spleen-6x12.otf" : { + "installed_by" : [ + "fonts-spleen" + ] + }, + "spleen-8x16.otf" : { + "installed_by" : [ + "fonts-spleen" + ] + }, + "sqroute.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "sreekrushnadevaraya.ttf" : { + "installed_by" : [ + "fonts-teluguvijayam" + ] + }, + "stagnati.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "standardsymbolsps.otf" : { + "installed_by" : [ + "fonts-urw-base35" + ] + }, + "standardsymbolsps.pfb" : { + "installed_by" : [ + "fonts-urw-base35" + ] + }, + "staypuft.ttf" : { + "installed_by" : [ + "fonts-staypuft" + ] + }, + "stevehand.ttf" : { + "installed_by" : [ + "fonts-sjfonts" + ] + }, + "stick-regular.ttf" : { + "installed_by" : [ + "fonts-stick" + ] + }, + "sticks.otf" : { + "installed_by" : [ + "fonts-ldco" + ] + }, + "sticks.ttf" : { + "installed_by" : [ + "fonts-ldco" + ] + }, + "stix-bold.otf" : { + "installed_by" : [ + "fonts-stix" + ] + }, + "stix-bolditalic.otf" : { + "installed_by" : [ + "fonts-stix" + ] + }, + "stix-italic.otf" : { + "installed_by" : [ + "fonts-stix" + ] + }, + "stix-regular.otf" : { + "installed_by" : [ + "fonts-stix" + ] + }, + "stixgeneral-bold.otf" : { + "installed_by" : [ + "fonts-stix" + ] + }, + "stixgeneral-bolditalic.otf" : { + "installed_by" : [ + "fonts-stix" + ] + }, + "stixgeneral-italic.otf" : { + "installed_by" : [ + "fonts-stix" + ] + }, + "stixgeneral-regular.otf" : { + "installed_by" : [ + "fonts-stix" + ] + }, + "stixintegralsd-bold.otf" : { + "installed_by" : [ + "fonts-stix" + ] + }, + "stixintegralsd-regular.otf" : { + "installed_by" : [ + "fonts-stix" + ] + }, + "stixintegralssm-bold.otf" : { + "installed_by" : [ + "fonts-stix" + ] + }, + "stixintegralssm-regular.otf" : { + "installed_by" : [ + "fonts-stix" + ] + }, + "stixintegralsup-bold.otf" : { + "installed_by" : [ + "fonts-stix" + ] + }, + "stixintegralsup-regular.otf" : { + "installed_by" : [ + "fonts-stix" + ] + }, + "stixintegralsupd-bold.otf" : { + "installed_by" : [ + "fonts-stix" + ] + }, + "stixintegralsupd-regular.otf" : { + "installed_by" : [ + "fonts-stix" + ] + }, + "stixintegralsupsm-bold.otf" : { + "installed_by" : [ + "fonts-stix" + ] + }, + "stixintegralsupsm-regular.otf" : { + "installed_by" : [ + "fonts-stix" + ] + }, + "stixmath-regular.otf" : { + "installed_by" : [ + "fonts-stix" + ] + }, + "stixmathjax_alphabets-bold.otf" : { + "installed_by" : [ + "fonts-mathjax" + ] + }, + "stixmathjax_alphabets-bolditalic.otf" : { + "installed_by" : [ + "fonts-mathjax" + ] + }, + "stixmathjax_alphabets-italic.otf" : { + "installed_by" : [ + "fonts-mathjax" + ] + }, + "stixmathjax_alphabets-regular.otf" : { + "installed_by" : [ + "fonts-mathjax" + ] + }, + "stixmathjax_arrows-bold.otf" : { + "installed_by" : [ + "fonts-mathjax" + ] + }, + "stixmathjax_arrows-regular.otf" : { + "installed_by" : [ + "fonts-mathjax" + ] + }, + "stixmathjax_doublestruck-bold.otf" : { + "installed_by" : [ + "fonts-mathjax" + ] + }, + "stixmathjax_doublestruck-bolditalic.otf" : { + "installed_by" : [ + "fonts-mathjax" + ] + }, + "stixmathjax_doublestruck-italic.otf" : { + "installed_by" : [ + "fonts-mathjax" + ] + }, + "stixmathjax_doublestruck-regular.otf" : { + "installed_by" : [ + "fonts-mathjax" + ] + }, + "stixmathjax_fraktur-bold.otf" : { + "installed_by" : [ + "fonts-mathjax" + ] + }, + "stixmathjax_fraktur-regular.otf" : { + "installed_by" : [ + "fonts-mathjax" + ] + }, + "stixmathjax_latin-bold.otf" : { + "installed_by" : [ + "fonts-mathjax" + ] + }, + "stixmathjax_latin-bolditalic.otf" : { + "installed_by" : [ + "fonts-mathjax" + ] + }, + "stixmathjax_latin-italic.otf" : { + "installed_by" : [ + "fonts-mathjax" + ] + }, + "stixmathjax_latin-regular.otf" : { + "installed_by" : [ + "fonts-mathjax" + ] + }, + "stixmathjax_main-bold.otf" : { + "installed_by" : [ + "fonts-mathjax" + ] + }, + "stixmathjax_main-bolditalic.otf" : { + "installed_by" : [ + "fonts-mathjax" + ] + }, + "stixmathjax_main-italic.otf" : { + "installed_by" : [ + "fonts-mathjax" + ] + }, + "stixmathjax_main-regular.otf" : { + "installed_by" : [ + "fonts-mathjax" + ] + }, + "stixmathjax_marks-bold.otf" : { + "installed_by" : [ + "fonts-mathjax" + ] + }, + "stixmathjax_marks-bolditalic.otf" : { + "installed_by" : [ + "fonts-mathjax" + ] + }, + "stixmathjax_marks-italic.otf" : { + "installed_by" : [ + "fonts-mathjax" + ] + }, + "stixmathjax_marks-regular.otf" : { + "installed_by" : [ + "fonts-mathjax" + ] + }, + "stixmathjax_misc-bold.otf" : { + "installed_by" : [ + "fonts-mathjax" + ] + }, + "stixmathjax_misc-bolditalic.otf" : { + "installed_by" : [ + "fonts-mathjax" + ] + }, + "stixmathjax_misc-italic.otf" : { + "installed_by" : [ + "fonts-mathjax" + ] + }, + "stixmathjax_misc-regular.otf" : { + "installed_by" : [ + "fonts-mathjax" + ] + }, + "stixmathjax_monospace-regular.otf" : { + "installed_by" : [ + "fonts-mathjax" + ] + }, + "stixmathjax_normal-bold.otf" : { + "installed_by" : [ + "fonts-mathjax" + ] + }, + "stixmathjax_normal-bolditalic.otf" : { + "installed_by" : [ + "fonts-mathjax" + ] + }, + "stixmathjax_normal-italic.otf" : { + "installed_by" : [ + "fonts-mathjax" + ] + }, + "stixmathjax_operators-bold.otf" : { + "installed_by" : [ + "fonts-mathjax" + ] + }, + "stixmathjax_operators-regular.otf" : { + "installed_by" : [ + "fonts-mathjax" + ] + }, + "stixmathjax_sansserif-bold.otf" : { + "installed_by" : [ + "fonts-mathjax" + ] + }, + "stixmathjax_sansserif-bolditalic.otf" : { + "installed_by" : [ + "fonts-mathjax" + ] + }, + "stixmathjax_sansserif-italic.otf" : { + "installed_by" : [ + "fonts-mathjax" + ] + }, + "stixmathjax_sansserif-regular.otf" : { + "installed_by" : [ + "fonts-mathjax" + ] + }, + "stixmathjax_script-bolditalic.otf" : { + "installed_by" : [ + "fonts-mathjax" + ] + }, + "stixmathjax_script-italic.otf" : { + "installed_by" : [ + "fonts-mathjax" + ] + }, + "stixmathjax_script-regular.otf" : { + "installed_by" : [ + "fonts-mathjax" + ] + }, + "stixmathjax_shapes-bold.otf" : { + "installed_by" : [ + "fonts-mathjax" + ] + }, + "stixmathjax_shapes-bolditalic.otf" : { + "installed_by" : [ + "fonts-mathjax" + ] + }, + "stixmathjax_shapes-regular.otf" : { + "installed_by" : [ + "fonts-mathjax" + ] + }, + "stixmathjax_size1-regular.otf" : { + "installed_by" : [ + "fonts-mathjax" + ] + }, + "stixmathjax_size2-regular.otf" : { + "installed_by" : [ + "fonts-mathjax" + ] + }, + "stixmathjax_size3-regular.otf" : { + "installed_by" : [ + "fonts-mathjax" + ] + }, + "stixmathjax_size4-regular.otf" : { + "installed_by" : [ + "fonts-mathjax" + ] + }, + "stixmathjax_size5-regular.otf" : { + "installed_by" : [ + "fonts-mathjax" + ] + }, + "stixmathjax_symbols-bold.otf" : { + "installed_by" : [ + "fonts-mathjax" + ] + }, + "stixmathjax_symbols-regular.otf" : { + "installed_by" : [ + "fonts-mathjax" + ] + }, + "stixmathjax_variants-bold.otf" : { + "installed_by" : [ + "fonts-mathjax" + ] + }, + "stixmathjax_variants-bolditalic.otf" : { + "installed_by" : [ + "fonts-mathjax" + ] + }, + "stixmathjax_variants-italic.otf" : { + "installed_by" : [ + "fonts-mathjax" + ] + }, + "stixmathjax_variants-regular.otf" : { + "installed_by" : [ + "fonts-mathjax" + ] + }, + "stixnonunicode-bold.otf" : { + "installed_by" : [ + "fonts-stix" + ] + }, + "stixnonunicode-bolditalic.otf" : { + "installed_by" : [ + "fonts-stix" + ] + }, + "stixnonunicode-italic.otf" : { + "installed_by" : [ + "fonts-stix" + ] + }, + "stixnonunicode-regular.otf" : { + "installed_by" : [ + "fonts-stix" + ] + }, + "stixsizefivesym-regular.otf" : { + "installed_by" : [ + "fonts-stix" + ] + }, + "stixsizefoursym-bold.otf" : { + "installed_by" : [ + "fonts-stix" + ] + }, + "stixsizefoursym-regular.otf" : { + "installed_by" : [ + "fonts-stix" + ] + }, + "stixsizeonesym-bold.otf" : { + "installed_by" : [ + "fonts-stix" + ] + }, + "stixsizeonesym-regular.otf" : { + "installed_by" : [ + "fonts-stix" + ] + }, + "stixsizethreesym-bold.otf" : { + "installed_by" : [ + "fonts-stix" + ] + }, + "stixsizethreesym-regular.otf" : { + "installed_by" : [ + "fonts-stix" + ] + }, + "stixsizetwosym-bold.otf" : { + "installed_by" : [ + "fonts-stix" + ] + }, + "stixsizetwosym-regular.otf" : { + "installed_by" : [ + "fonts-stix" + ] + }, + "stixvariants-bold.otf" : { + "installed_by" : [ + "fonts-stix" + ] + }, + "stixvariants-regular.otf" : { + "installed_by" : [ + "fonts-stix" + ] + }, + "stmary10.ttf" : { + "installed_by" : [ + "fonts-lyx" + ] + }, + "strande2.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "strokes.otf" : { + "installed_by" : [ + "fonts-ldco" + ] + }, + "strokes.ttf" : { + "installed_by" : [ + "fonts-ldco" + ] + }, + "summersby.ttf" : { + "installed_by" : [ + "fonts-summersby" + ] + }, + "supragc.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "supragl.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "suranna.ttf" : { + "installed_by" : [ + "fonts-teluguvijayam" + ] + }, + "suravaram.ttf" : { + "installed_by" : [ + "fonts-teluguvijayam" + ] + }, + "suruma.ttf" : { + "installed_by" : [ + "fonts-smc-suruma" + ] + }, + "sweynheim&pannartz-protoroman115r.otf" : { + "installed_by" : [ + "fonts-gotico-antiqua" + ] + }, + "sweynheim&pannartz-subiaco-protoroman120r.otf" : { + "installed_by" : [ + "fonts-gotico-antiqua" + ] + }, + "swift.ttf" : { + "installed_by" : [ + "fonts-dustin" + ] + }, + "swirled2.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "switzeraadf-bold.otf" : { + "installed_by" : [ + "fonts-adf-switzera" + ] + }, + "switzeraadf-boldcond.otf" : { + "installed_by" : [ + "fonts-adf-switzera" + ] + }, + "switzeraadf-boldconditalic.otf" : { + "installed_by" : [ + "fonts-adf-switzera" + ] + }, + "switzeraadf-boldext.otf" : { + "installed_by" : [ + "fonts-adf-switzera" + ] + }, + "switzeraadf-boldextitalic.otf" : { + "installed_by" : [ + "fonts-adf-switzera" + ] + }, + "switzeraadf-bolditalic.otf" : { + "installed_by" : [ + "fonts-adf-switzera" + ] + }, + "switzeraadf-cond.otf" : { + "installed_by" : [ + "fonts-adf-switzera" + ] + }, + "switzeraadf-conditalic.otf" : { + "installed_by" : [ + "fonts-adf-switzera" + ] + }, + "switzeraadf-demibold.otf" : { + "installed_by" : [ + "fonts-adf-switzera" + ] + }, + "switzeraadf-demibolditalic.otf" : { + "installed_by" : [ + "fonts-adf-switzera" + ] + }, + "switzeraadf-dmbdcond.otf" : { + "installed_by" : [ + "fonts-adf-switzera" + ] + }, + "switzeraadf-dmbdconditalic.otf" : { + "installed_by" : [ + "fonts-adf-switzera" + ] + }, + "switzeraadf-ext.otf" : { + "installed_by" : [ + "fonts-adf-switzera" + ] + }, + "switzeraadf-extitalic.otf" : { + "installed_by" : [ + "fonts-adf-switzera" + ] + }, + "switzeraadf-extrabold.otf" : { + "installed_by" : [ + "fonts-adf-switzera" + ] + }, + "switzeraadf-extrabolditalic.otf" : { + "installed_by" : [ + "fonts-adf-switzera" + ] + }, + "switzeraadf-italic.otf" : { + "installed_by" : [ + "fonts-adf-switzera" + ] + }, + "switzeraadf-light.otf" : { + "installed_by" : [ + "fonts-adf-switzera" + ] + }, + "switzeraadf-lightcond.otf" : { + "installed_by" : [ + "fonts-adf-switzera" + ] + }, + "switzeraadf-lightconditalic.otf" : { + "installed_by" : [ + "fonts-adf-switzera" + ] + }, + "switzeraadf-lightitalic.otf" : { + "installed_by" : [ + "fonts-adf-switzera" + ] + }, + "switzeraadf-medium.otf" : { + "installed_by" : [ + "fonts-adf-switzera" + ] + }, + "switzeraadf-mediumitalic.otf" : { + "installed_by" : [ + "fonts-adf-switzera" + ] + }, + "switzeraadf-regular.otf" : { + "installed_by" : [ + "fonts-adf-switzera" + ] + }, + "syamalaramana.ttf" : { + "installed_by" : [ + "fonts-teluguvijayam" + ] + }, + "symbol.ttf" : { + "installed_by" : [ + "fonts-wine" + ] + }, + "symbola_hint.ttf" : { + "installed_by" : [ + "fonts-symbola" + ] + }, + "symmetry.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "syndrome.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "syntheti.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "syracuse.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "system.ttf" : { + "installed_by" : [ + "fonts-wine" + ] + }, + "tagbanwa.ttf" : { + "installed_by" : [ + "ttf-tagbanwa" + ] + }, + "tagmukay-bold.ttf" : { + "installed_by" : [ + "fonts-sil-tagmukay" + ] + }, + "tagmukay-regular.ttf" : { + "installed_by" : [ + "fonts-sil-tagmukay" + ] + }, + "tahoma.ttf" : { + "installed_by" : [ + "fonts-wine" + ] + }, + "tahomabd.ttf" : { + "installed_by" : [ + "fonts-wine" + ] + }, + "taiheritagepro-bold.ttf" : { + "installed_by" : [ + "fonts-sil-taiheritagepro" + ] + }, + "taiheritagepro-regular.ttf" : { + "installed_by" : [ + "fonts-sil-taiheritagepro" + ] + }, + "takaogothic.ttf" : { + "installed_by" : [ + "fonts-takao-gothic" + ] + }, + "takaomincho.ttf" : { + "installed_by" : [ + "fonts-takao-mincho" + ] + }, + "takaopgothic.ttf" : { + "installed_by" : [ + "fonts-takao-gothic" + ] + }, + "takaopmincho.ttf" : { + "installed_by" : [ + "fonts-takao-mincho" + ] + }, + "tamu_kadampari.ttf" : { + "installed_by" : [ + "fonts-taml-tamu" + ] + }, + "tamu_kalyani.ttf" : { + "installed_by" : [ + "fonts-taml-tamu" + ] + }, + "tamu_maduram.ttf" : { + "installed_by" : [ + "fonts-taml-tamu" + ] + }, + "taogu-bold.ttf" : { + "installed_by" : [ + "fonts-sil-shimenkan-taogu" + ] + }, + "taogu-regular.ttf" : { + "installed_by" : [ + "fonts-sil-shimenkan-taogu" + ] + }, + "taogubook-bold.ttf" : { + "installed_by" : [ + "fonts-sil-shimenkan-taogu" + ] + }, + "taogubook-regular.ttf" : { + "installed_by" : [ + "fonts-sil-shimenkan-taogu" + ] + }, + "taoguextralight-bold.ttf" : { + "installed_by" : [ + "fonts-sil-shimenkan-taogu" + ] + }, + "taoguextralight-regular.ttf" : { + "installed_by" : [ + "fonts-sil-shimenkan-taogu" + ] + }, + "taogulight-bold.ttf" : { + "installed_by" : [ + "fonts-sil-shimenkan-taogu" + ] + }, + "taogulight-regular.ttf" : { + "installed_by" : [ + "fonts-sil-shimenkan-taogu" + ] + }, + "teams.pfb" : { + "installed_by" : [ + "t1-teams" + ] + }, + "teamsb.pfb" : { + "installed_by" : [ + "t1-teams" + ] + }, + "teamsbi.pfb" : { + "installed_by" : [ + "t1-teams" + ] + }, + "teamsi.pfb" : { + "installed_by" : [ + "t1-teams" + ] + }, + "tearful.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "techniqo.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "techniqu.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "techover.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "telephas.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "tenaliramakrishna-regular.ttf" : { + "installed_by" : [ + "fonts-teluguvijayam" + ] + }, + "terminusttf-4.46.0.ttf" : { + "installed_by" : [ + "fonts-terminus" + ] + }, + "tetri.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "texgyreadventor-bold.otf" : { + "installed_by" : [ + "fonts-texgyre" + ] + }, + "texgyreadventor-bolditalic.otf" : { + "installed_by" : [ + "fonts-texgyre" + ] + }, + "texgyreadventor-italic.otf" : { + "installed_by" : [ + "fonts-texgyre" + ] + }, + "texgyreadventor-regular.otf" : { + "installed_by" : [ + "fonts-texgyre" + ] + }, + "texgyrebonum-bold.otf" : { + "installed_by" : [ + "fonts-texgyre" + ] + }, + "texgyrebonum-bolditalic.otf" : { + "installed_by" : [ + "fonts-texgyre" + ] + }, + "texgyrebonum-italic.otf" : { + "installed_by" : [ + "fonts-texgyre" + ] + }, + "texgyrebonum-math.otf" : { + "installed_by" : [ + "fonts-texgyre" + ] + }, + "texgyrebonum-regular.otf" : { + "installed_by" : [ + "fonts-texgyre" + ] + }, + "texgyrechorus-mediumitalic.otf" : { + "installed_by" : [ + "fonts-texgyre" + ] + }, + "texgyrecursor-bold.otf" : { + "installed_by" : [ + "fonts-texgyre" + ] + }, + "texgyrecursor-bolditalic.otf" : { + "installed_by" : [ + "fonts-texgyre" + ] + }, + "texgyrecursor-italic.otf" : { + "installed_by" : [ + "fonts-texgyre" + ] + }, + "texgyrecursor-regular.otf" : { + "installed_by" : [ + "fonts-texgyre" + ] + }, + "texgyredejavu-math.otf" : { + "installed_by" : [ + "fonts-texgyre" + ] + }, + "texgyreheros-bold.otf" : { + "installed_by" : [ + "fonts-texgyre" + ] + }, + "texgyreheros-bolditalic.otf" : { + "installed_by" : [ + "fonts-texgyre" + ] + }, + "texgyreheros-italic.otf" : { + "installed_by" : [ + "fonts-texgyre" + ] + }, + "texgyreheros-regular.otf" : { + "installed_by" : [ + "fonts-texgyre" + ] + }, + "texgyreheroscn-bold.otf" : { + "installed_by" : [ + "fonts-texgyre" + ] + }, + "texgyreheroscn-bolditalic.otf" : { + "installed_by" : [ + "fonts-texgyre" + ] + }, + "texgyreheroscn-italic.otf" : { + "installed_by" : [ + "fonts-texgyre" + ] + }, + "texgyreheroscn-regular.otf" : { + "installed_by" : [ + "fonts-texgyre" + ] + }, + "texgyrepagella-bold.otf" : { + "installed_by" : [ + "fonts-texgyre" + ] + }, + "texgyrepagella-bolditalic.otf" : { + "installed_by" : [ + "fonts-texgyre" + ] + }, + "texgyrepagella-italic.otf" : { + "installed_by" : [ + "fonts-texgyre" + ] + }, + "texgyrepagella-math.otf" : { + "installed_by" : [ + "fonts-texgyre" + ] + }, + "texgyrepagella-regular.otf" : { + "installed_by" : [ + "fonts-texgyre" + ] + }, + "texgyreschola-bold.otf" : { + "installed_by" : [ + "fonts-texgyre" + ] + }, + "texgyreschola-bolditalic.otf" : { + "installed_by" : [ + "fonts-texgyre" + ] + }, + "texgyreschola-italic.otf" : { + "installed_by" : [ + "fonts-texgyre" + ] + }, + "texgyreschola-math.otf" : { + "installed_by" : [ + "fonts-texgyre" + ] + }, + "texgyreschola-regular.otf" : { + "installed_by" : [ + "fonts-texgyre" + ] + }, + "texgyretermes-bold.otf" : { + "installed_by" : [ + "fonts-texgyre" + ] + }, + "texgyretermes-bolditalic.otf" : { + "installed_by" : [ + "fonts-texgyre" + ] + }, + "texgyretermes-italic.otf" : { + "installed_by" : [ + "fonts-texgyre" + ] + }, + "texgyretermes-math.otf" : { + "installed_by" : [ + "fonts-texgyre" + ] + }, + "texgyretermes-regular.otf" : { + "installed_by" : [ + "fonts-texgyre" + ] + }, + "thabit-bold-oblique.ttf" : { + "installed_by" : [ + "fonts-hosny-thabit" + ] + }, + "thabit-bold.ttf" : { + "installed_by" : [ + "fonts-hosny-thabit" + ] + }, + "thabit-oblique.ttf" : { + "installed_by" : [ + "fonts-hosny-thabit" + ] + }, + "thabit.ttf" : { + "installed_by" : [ + "fonts-hosny-thabit" + ] + }, + "thwart.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "tibetanmachineuni.ttf" : { + "installed_by" : [ + "fonts-tibetan-machine" + ] + }, + "tibetansambhotayigchung.ttf" : { + "installed_by" : [ + "fonts-sambhota-yigchung" + ] + }, + "timmanaregular.ttf" : { + "installed_by" : [ + "fonts-teluguvijayam" + ] + }, + "timrom.ttf" : { + "installed_by" : [ + "fonts-povray" + ] + }, + "tinos-bold.ttf" : { + "installed_by" : [ + "fonts-croscore" + ] + }, + "tinos-bolditalic.ttf" : { + "installed_by" : [ + "fonts-croscore" + ] + }, + "tinos-italic.ttf" : { + "installed_by" : [ + "fonts-croscore" + ] + }, + "tinos-regular.ttf" : { + "installed_by" : [ + "fonts-croscore" + ] + }, + "tint.ttf" : { + "installed_by" : [ + "fonts-senamirmir-washra" + ] + }, + "tipa10.pfb" : { + "installed_by" : [ + "xfonts-tipa" + ] + }, + "tipa12.pfb" : { + "installed_by" : [ + "xfonts-tipa" + ] + }, + "tipa17.pfb" : { + "installed_by" : [ + "xfonts-tipa" + ] + }, + "tipa8.pfb" : { + "installed_by" : [ + "xfonts-tipa" + ] + }, + "tipa9.pfb" : { + "installed_by" : [ + "xfonts-tipa" + ] + }, + "tipab10.pfb" : { + "installed_by" : [ + "xfonts-tipa" + ] + }, + "tipabs10.pfb" : { + "installed_by" : [ + "xfonts-tipa" + ] + }, + "tipabx10.pfb" : { + "installed_by" : [ + "xfonts-tipa" + ] + }, + "tipabx12.pfb" : { + "installed_by" : [ + "xfonts-tipa" + ] + }, + "tipabx8.pfb" : { + "installed_by" : [ + "xfonts-tipa" + ] + }, + "tipabx9.pfb" : { + "installed_by" : [ + "xfonts-tipa" + ] + }, + "tipasb10.pfb" : { + "installed_by" : [ + "xfonts-tipa" + ] + }, + "tipasi10.pfb" : { + "installed_by" : [ + "xfonts-tipa" + ] + }, + "tipasl10.pfb" : { + "installed_by" : [ + "xfonts-tipa" + ] + }, + "tipasl12.pfb" : { + "installed_by" : [ + "xfonts-tipa" + ] + }, + "tipasl8.pfb" : { + "installed_by" : [ + "xfonts-tipa" + ] + }, + "tipasl9.pfb" : { + "installed_by" : [ + "xfonts-tipa" + ] + }, + "tipass10.pfb" : { + "installed_by" : [ + "xfonts-tipa" + ] + }, + "tipass12.pfb" : { + "installed_by" : [ + "xfonts-tipa" + ] + }, + "tipass17.pfb" : { + "installed_by" : [ + "xfonts-tipa" + ] + }, + "tipass8.pfb" : { + "installed_by" : [ + "xfonts-tipa" + ] + }, + "tipass9.pfb" : { + "installed_by" : [ + "xfonts-tipa" + ] + }, + "tipats10.pfb" : { + "installed_by" : [ + "xfonts-tipa" + ] + }, + "tipatt10.pfb" : { + "installed_by" : [ + "xfonts-tipa" + ] + }, + "tipatt12.pfb" : { + "installed_by" : [ + "xfonts-tipa" + ] + }, + "tipatt8.pfb" : { + "installed_by" : [ + "xfonts-tipa" + ] + }, + "tipatt9.pfb" : { + "installed_by" : [ + "xfonts-tipa" + ] + }, + "tipx10.pfb" : { + "installed_by" : [ + "xfonts-tipa" + ] + }, + "tipx12.pfb" : { + "installed_by" : [ + "xfonts-tipa" + ] + }, + "tipx17.pfb" : { + "installed_by" : [ + "xfonts-tipa" + ] + }, + "tipx8.pfb" : { + "installed_by" : [ + "xfonts-tipa" + ] + }, + "tipx9.pfb" : { + "installed_by" : [ + "xfonts-tipa" + ] + }, + "tipxb10.pfb" : { + "installed_by" : [ + "xfonts-tipa" + ] + }, + "tipxbs10.pfb" : { + "installed_by" : [ + "xfonts-tipa" + ] + }, + "tipxbx10.pfb" : { + "installed_by" : [ + "xfonts-tipa" + ] + }, + "tipxbx12.pfb" : { + "installed_by" : [ + "xfonts-tipa" + ] + }, + "tipxbx8.pfb" : { + "installed_by" : [ + "xfonts-tipa" + ] + }, + "tipxbx9.pfb" : { + "installed_by" : [ + "xfonts-tipa" + ] + }, + "tipxsb10.pfb" : { + "installed_by" : [ + "xfonts-tipa" + ] + }, + "tipxsi10.pfb" : { + "installed_by" : [ + "xfonts-tipa" + ] + }, + "tipxsl10.pfb" : { + "installed_by" : [ + "xfonts-tipa" + ] + }, + "tipxsl12.pfb" : { + "installed_by" : [ + "xfonts-tipa" + ] + }, + "tipxsl8.pfb" : { + "installed_by" : [ + "xfonts-tipa" + ] + }, + "tipxsl9.pfb" : { + "installed_by" : [ + "xfonts-tipa" + ] + }, + "tipxss10.pfb" : { + "installed_by" : [ + "xfonts-tipa" + ] + }, + "tipxss12.pfb" : { + "installed_by" : [ + "xfonts-tipa" + ] + }, + "tipxss17.pfb" : { + "installed_by" : [ + "xfonts-tipa" + ] + }, + "tipxss8.pfb" : { + "installed_by" : [ + "xfonts-tipa" + ] + }, + "tipxss9.pfb" : { + "installed_by" : [ + "xfonts-tipa" + ] + }, + "tipxts10.pfb" : { + "installed_by" : [ + "xfonts-tipa" + ] + }, + "tipxtt10.pfb" : { + "installed_by" : [ + "xfonts-tipa" + ] + }, + "tipxtt12.pfb" : { + "installed_by" : [ + "xfonts-tipa" + ] + }, + "tipxtt8.pfb" : { + "installed_by" : [ + "xfonts-tipa" + ] + }, + "tipxtt9.pfb" : { + "installed_by" : [ + "xfonts-tipa" + ] + }, + "tirekv__.ttf" : { + "installed_by" : [ + "fonts-tiresias" + ] + }, + "tiresias_infofont.ttf" : { + "installed_by" : [ + "fonts-tiresias" + ] + }, + "tiresias_infofont_bold.ttf" : { + "installed_by" : [ + "fonts-tiresias" + ] + }, + "tiresias_infofont_italic.ttf" : { + "installed_by" : [ + "fonts-tiresias" + ] + }, + "tiresias_infofontz.ttf" : { + "installed_by" : [ + "fonts-tiresias" + ] + }, + "tiresias_infofontz_bold.ttf" : { + "installed_by" : [ + "fonts-tiresias" + ] + }, + "tiresias_infofontz_italic.ttf" : { + "installed_by" : [ + "fonts-tiresias" + ] + }, + "tiresias_lpfont.ttf" : { + "installed_by" : [ + "fonts-tiresias" + ] + }, + "tiresias_lpfont_bold.ttf" : { + "installed_by" : [ + "fonts-tiresias" + ] + }, + "tiresias_lpfont_italic.ttf" : { + "installed_by" : [ + "fonts-tiresias" + ] + }, + "tiresias_pcfont.ttf" : { + "installed_by" : [ + "fonts-tiresias" + ] + }, + "tiresias_pcfont_bold.ttf" : { + "installed_by" : [ + "fonts-tiresias" + ] + }, + "tiresias_pcfont_italic.ttf" : { + "installed_by" : [ + "fonts-tiresias" + ] + }, + "tiresias_pcfontz.ttf" : { + "installed_by" : [ + "fonts-tiresias" + ] + }, + "tiresias_pcfontz_bold.ttf" : { + "installed_by" : [ + "fonts-tiresias" + ] + }, + "tiresias_pcfontz_italic.ttf" : { + "installed_by" : [ + "fonts-tiresias" + ] + }, + "tiresias_signfont.ttf" : { + "installed_by" : [ + "fonts-tiresias" + ] + }, + "tiresias_signfont_bold.ttf" : { + "installed_by" : [ + "fonts-tiresias" + ] + }, + "tiresias_signfont_italic.ttf" : { + "installed_by" : [ + "fonts-tiresias" + ] + }, + "tiresias_signfontz.ttf" : { + "installed_by" : [ + "fonts-tiresias" + ] + }, + "tiresias_signfontz_bold.ttf" : { + "installed_by" : [ + "fonts-tiresias" + ] + }, + "tiresias_signfontz_italic.ttf" : { + "installed_by" : [ + "fonts-tiresias" + ] + }, + "titr.ttf" : { + "installed_by" : [ + "fonts-farsiweb" + ] + }, + "tlwgmono-bold.otf" : { + "installed_by" : [ + "fonts-tlwg-mono-otf" + ] + }, + "tlwgmono-bold.ttf" : { + "installed_by" : [ + "fonts-tlwg-mono-ttf" + ] + }, + "tlwgmono-boldoblique.otf" : { + "installed_by" : [ + "fonts-tlwg-mono-otf" + ] + }, + "tlwgmono-boldoblique.ttf" : { + "installed_by" : [ + "fonts-tlwg-mono-ttf" + ] + }, + "tlwgmono-oblique.otf" : { + "installed_by" : [ + "fonts-tlwg-mono-otf" + ] + }, + "tlwgmono-oblique.ttf" : { + "installed_by" : [ + "fonts-tlwg-mono-ttf" + ] + }, + "tlwgmono.otf" : { + "installed_by" : [ + "fonts-tlwg-mono-otf" + ] + }, + "tlwgmono.ttf" : { + "installed_by" : [ + "fonts-tlwg-mono-ttf" + ] + }, + "tlwgtypewriter-bold.otf" : { + "installed_by" : [ + "fonts-tlwg-typewriter-otf" + ] + }, + "tlwgtypewriter-bold.ttf" : { + "installed_by" : [ + "fonts-tlwg-typewriter-ttf" + ] + }, + "tlwgtypewriter-boldoblique.otf" : { + "installed_by" : [ + "fonts-tlwg-typewriter-otf" + ] + }, + "tlwgtypewriter-boldoblique.ttf" : { + "installed_by" : [ + "fonts-tlwg-typewriter-ttf" + ] + }, + "tlwgtypewriter-oblique.otf" : { + "installed_by" : [ + "fonts-tlwg-typewriter-otf" + ] + }, + "tlwgtypewriter-oblique.ttf" : { + "installed_by" : [ + "fonts-tlwg-typewriter-ttf" + ] + }, + "tlwgtypewriter.otf" : { + "installed_by" : [ + "fonts-tlwg-typewriter-otf" + ] + }, + "tlwgtypewriter.ttf" : { + "installed_by" : [ + "fonts-tlwg-typewriter-ttf" + ] + }, + "tlwgtypist-bold.otf" : { + "installed_by" : [ + "fonts-tlwg-typist-otf" + ] + }, + "tlwgtypist-bold.ttf" : { + "installed_by" : [ + "fonts-tlwg-typist-ttf" + ] + }, + "tlwgtypist-boldoblique.otf" : { + "installed_by" : [ + "fonts-tlwg-typist-otf" + ] + }, + "tlwgtypist-boldoblique.ttf" : { + "installed_by" : [ + "fonts-tlwg-typist-ttf" + ] + }, + "tlwgtypist-oblique.otf" : { + "installed_by" : [ + "fonts-tlwg-typist-otf" + ] + }, + "tlwgtypist-oblique.ttf" : { + "installed_by" : [ + "fonts-tlwg-typist-ttf" + ] + }, + "tlwgtypist.otf" : { + "installed_by" : [ + "fonts-tlwg-typist-otf" + ] + }, + "tlwgtypist.ttf" : { + "installed_by" : [ + "fonts-tlwg-typist-ttf" + ] + }, + "tlwgtypo-bold.otf" : { + "installed_by" : [ + "fonts-tlwg-typo-otf" + ] + }, + "tlwgtypo-bold.ttf" : { + "installed_by" : [ + "fonts-tlwg-typo-ttf" + ] + }, + "tlwgtypo-boldoblique.otf" : { + "installed_by" : [ + "fonts-tlwg-typo-otf" + ] + }, + "tlwgtypo-boldoblique.ttf" : { + "installed_by" : [ + "fonts-tlwg-typo-ttf" + ] + }, + "tlwgtypo-oblique.otf" : { + "installed_by" : [ + "fonts-tlwg-typo-otf" + ] + }, + "tlwgtypo-oblique.ttf" : { + "installed_by" : [ + "fonts-tlwg-typo-ttf" + ] + }, + "tlwgtypo.otf" : { + "installed_by" : [ + "fonts-tlwg-typo-otf" + ] + }, + "tlwgtypo.ttf" : { + "installed_by" : [ + "fonts-tlwg-typo-ttf" + ] + }, + "tnua-libre.ttf" : { + "installed_by" : [ + "fonts-cegui" + ] + }, + "tomsontalks.ttf" : { + "installed_by" : [ + "fonts-tomsontalks" + ] + }, + "tonik.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "tragic2.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "trainone-regular.ttf" : { + "installed_by" : [ + "fonts-train" + ] + }, + "tribunadfstd-bold.otf" : { + "installed_by" : [ + "fonts-adf-tribun" + ] + }, + "tribunadfstd-boldcond.otf" : { + "installed_by" : [ + "fonts-adf-tribun" + ] + }, + "tribunadfstd-boldconditalic.otf" : { + "installed_by" : [ + "fonts-adf-tribun" + ] + }, + "tribunadfstd-bolditalic.otf" : { + "installed_by" : [ + "fonts-adf-tribun" + ] + }, + "tribunadfstd-cond.otf" : { + "installed_by" : [ + "fonts-adf-tribun" + ] + }, + "tribunadfstd-conditalic.otf" : { + "installed_by" : [ + "fonts-adf-tribun" + ] + }, + "tribunadfstd-extrabold.otf" : { + "installed_by" : [ + "fonts-adf-tribun" + ] + }, + "tribunadfstd-extrabolditalic.otf" : { + "installed_by" : [ + "fonts-adf-tribun" + ] + }, + "tribunadfstd-italic.otf" : { + "installed_by" : [ + "fonts-adf-tribun" + ] + }, + "tribunadfstd-medium.otf" : { + "installed_by" : [ + "fonts-adf-tribun" + ] + }, + "tribunadfstd-mediumitalic.otf" : { + "installed_by" : [ + "fonts-adf-tribun" + ] + }, + "tribunadfstd-regular.otf" : { + "installed_by" : [ + "fonts-adf-tribun" + ] + }, + "triodpostnaja.ttf" : { + "installed_by" : [ + "fonts-triod-postnaja" + ] + }, + "tscu_comic.ttf" : { + "installed_by" : [ + "fonts-taml-tscu" + ] + }, + "tscu_paranar.ttf" : { + "installed_by" : [ + "fonts-taml-tscu" + ] + }, + "tscu_paranarb.ttf" : { + "installed_by" : [ + "fonts-taml-tscu" + ] + }, + "tscu_paranari.ttf" : { + "installed_by" : [ + "fonts-taml-tscu" + ] + }, + "tscu_times.ttf" : { + "installed_by" : [ + "fonts-taml-tscu" + ] + }, + "tsextolo.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "tsextols.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "tuffy.ttf" : { + "installed_by" : [ + "fonts-tuffy" + ] + }, + "tuffy_bold.ttf" : { + "installed_by" : [ + "fonts-tuffy", + "fonts-tuffy" + ] + }, + "tuffy_bold_italic.ttf" : { + "installed_by" : [ + "fonts-tuffy", + "fonts-tuffy" + ] + }, + "tuffy_italic.ttf" : { + "installed_by" : [ + "fonts-tuffy", + "fonts-tuffy" + ] + }, + "tuffy_regular.ttf" : { + "installed_by" : [ + "fonts-tuffy" + ] + }, + "turmoil.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "tw-kai-98_1.ttf" : { + "installed_by" : [ + "fonts-cns11643-kai" + ] + }, + "tw-kai-ext-b-98_1.ttf" : { + "installed_by" : [ + "fonts-cns11643-kai" + ] + }, + "tw-kai-plus-98_1.ttf" : { + "installed_by" : [ + "fonts-cns11643-kai" + ] + }, + "tw-sung-98_1.ttf" : { + "installed_by" : [ + "fonts-cns11643-sung" + ] + }, + "tw-sung-ext-b-98_1.ttf" : { + "installed_by" : [ + "fonts-cns11643-sung" + ] + }, + "tw-sung-plus-98_1.ttf" : { + "installed_by" : [ + "fonts-cns11643-sung" + ] + }, + "tymes.ttf" : { + "installed_by" : [ + "fonts-arkpandora" + ] + }, + "tymesbd.ttf" : { + "installed_by" : [ + "fonts-arkpandora" + ] + }, + "typoscript.otf" : { + "installed_by" : [ + "fonts-levien-typoscript" + ] + }, + "ubiquity.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "ubuntu-title.ttf" : { + "installed_by" : [ + "fonts-ubuntu-title" + ] + }, + "ukij3d.ttf" : { + "installed_by" : [ + "fonts-ukij-uyghur" + ] + }, + "ukij_macbasma.ttf" : { + "installed_by" : [ + "fonts-ukij-uyghur" + ] + }, + "ukij_macbasmabold.ttf" : { + "installed_by" : [ + "fonts-ukij-uyghur" + ] + }, + "ukij_macekran.ttf" : { + "installed_by" : [ + "fonts-ukij-uyghur" + ] + }, + "ukij_macekranbold.ttf" : { + "installed_by" : [ + "fonts-ukij-uyghur" + ] + }, + "ukijbasma.ttf" : { + "installed_by" : [ + "fonts-ukij-uyghur" + ] + }, + "ukijbom.ttf" : { + "installed_by" : [ + "fonts-ukij-uyghur" + ] + }, + "ukijchechek.ttf" : { + "installed_by" : [ + "fonts-ukij-uyghur" + ] + }, + "ukijchik.ttf" : { + "installed_by" : [ + "fonts-ukij-uyghur" + ] + }, + "ukijcjk.ttf" : { + "installed_by" : [ + "fonts-ukij-uyghur" + ] + }, + "ukijdi.ttf" : { + "installed_by" : [ + "fonts-ukij-uyghur" + ] + }, + "ukijdik.ttf" : { + "installed_by" : [ + "fonts-ukij-uyghur" + ] + }, + "ukijdit.ttf" : { + "installed_by" : [ + "fonts-ukij-uyghur" + ] + }, + "ukijdiy.ttf" : { + "installed_by" : [ + "fonts-ukij-uyghur" + ] + }, + "ukijekran.ttf" : { + "installed_by" : [ + "fonts-ukij-uyghur" + ] + }, + "ukijelipbe-b.ttf" : { + "installed_by" : [ + "fonts-ukij-uyghur" + ] + }, + "ukijelipbe.ttf" : { + "installed_by" : [ + "fonts-ukij-uyghur" + ] + }, + "ukijelipbech-b.ttf" : { + "installed_by" : [ + "fonts-ukij-uyghur" + ] + }, + "ukijelipbech.ttf" : { + "installed_by" : [ + "fonts-ukij-uyghur" + ] + }, + "ukijes.ttf" : { + "installed_by" : [ + "fonts-ukij-uyghur" + ] + }, + "ukijesbold.ttf" : { + "installed_by" : [ + "fonts-ukij-uyghur" + ] + }, + "ukijesc.ttf" : { + "installed_by" : [ + "fonts-ukij-uyghur" + ] + }, + "ukijesn.ttf" : { + "installed_by" : [ + "fonts-ukij-uyghur" + ] + }, + "ukijesq.ttf" : { + "installed_by" : [ + "fonts-ukij-uyghur" + ] + }, + "ukijest.ttf" : { + "installed_by" : [ + "fonts-ukij-uyghur" + ] + }, + "ukijimaret.ttf" : { + "installed_by" : [ + "fonts-ukij-uyghur" + ] + }, + "ukijinichke.ttf" : { + "installed_by" : [ + "fonts-ukij-uyghur" + ] + }, + "ukijinichkeb.ttf" : { + "installed_by" : [ + "fonts-ukij-uyghur" + ] + }, + "ukijje.ttf" : { + "installed_by" : [ + "fonts-ukij-uyghur" + ] + }, + "ukijjunu.ttf" : { + "installed_by" : [ + "fonts-ukij-uyghur" + ] + }, + "ukijka.ttf" : { + "installed_by" : [ + "fonts-ukij-uyghur" + ] + }, + "ukijka3d-b.ttf" : { + "installed_by" : [ + "fonts-ukij-uyghur" + ] + }, + "ukijka3d.ttf" : { + "installed_by" : [ + "fonts-ukij-uyghur" + ] + }, + "ukijkesme-b.ttf" : { + "installed_by" : [ + "fonts-ukij-uyghur" + ] + }, + "ukijkesme.ttf" : { + "installed_by" : [ + "fonts-ukij-uyghur" + ] + }, + "ukijkesmetuz-b.ttf" : { + "installed_by" : [ + "fonts-ukij-uyghur" + ] + }, + "ukijkesmetuz.ttf" : { + "installed_by" : [ + "fonts-ukij-uyghur" + ] + }, + "ukijku.ttf" : { + "installed_by" : [ + "fonts-ukij-uyghur" + ] + }, + "ukijku3d.ttf" : { + "installed_by" : [ + "fonts-ukij-uyghur" + ] + }, + "ukijkuchi.ttf" : { + "installed_by" : [ + "fonts-ukij-uyghur" + ] + }, + "ukijkug.ttf" : { + "installed_by" : [ + "fonts-ukij-uyghur" + ] + }, + "ukijkuka.ttf" : { + "installed_by" : [ + "fonts-ukij-uyghur" + ] + }, + "ukijkut.ttf" : { + "installed_by" : [ + "fonts-ukij-uyghur" + ] + }, + "ukijkuu.ttf" : { + "installed_by" : [ + "fonts-ukij-uyghur" + ] + }, + "ukijkuy.ttf" : { + "installed_by" : [ + "fonts-ukij-uyghur" + ] + }, + "ukijkuyb.ttf" : { + "installed_by" : [ + "fonts-ukij-uyghur" + ] + }, + "ukijkuyol.ttf" : { + "installed_by" : [ + "fonts-ukij-uyghur" + ] + }, + "ukijme.ttf" : { + "installed_by" : [ + "fonts-ukij-uyghur" + ] + }, + "ukijmejn.ttf" : { + "installed_by" : [ + "fonts-ukij-uyghur" + ] + }, + "ukijmejt.ttf" : { + "installed_by" : [ + "fonts-ukij-uyghur" + ] + }, + "ukijmoyq.ttf" : { + "installed_by" : [ + "fonts-ukij-uyghur" + ] + }, + "ukijnsq.ttf" : { + "installed_by" : [ + "fonts-ukij-uyghur" + ] + }, + "ukijnsqb.ttf" : { + "installed_by" : [ + "fonts-ukij-uyghur" + ] + }, + "ukijnsqz.ttf" : { + "installed_by" : [ + "fonts-ukij-uyghur" + ] + }, + "ukijnsqzb.ttf" : { + "installed_by" : [ + "fonts-ukij-uyghur" + ] + }, + "ukijorqun_b.ttf" : { + "installed_by" : [ + "fonts-ukij-uyghur" + ] + }, + "ukijorqun_y.ttf" : { + "installed_by" : [ + "fonts-ukij-uyghur" + ] + }, + "ukijorxun.ttf" : { + "installed_by" : [ + "fonts-ukij-uyghur" + ] + }, + "ukijqara-b.ttf" : { + "installed_by" : [ + "fonts-ukij-uyghur" + ] + }, + "ukijqara.ttf" : { + "installed_by" : [ + "fonts-ukij-uyghur" + ] + }, + "ukijqol_tez.ttf" : { + "installed_by" : [ + "fonts-ukij-uyghur" + ] + }, + "ukijqol_tuz.ttf" : { + "installed_by" : [ + "fonts-ukij-uyghur" + ] + }, + "ukijqol_yantu.ttf" : { + "installed_by" : [ + "fonts-ukij-uyghur" + ] + }, + "ukijqolyazma.ttf" : { + "installed_by" : [ + "fonts-ukij-uyghur" + ] + }, + "ukijru.ttf" : { + "installed_by" : [ + "fonts-ukij-uyghur" + ] + }, + "ukijsaet.ttf" : { + "installed_by" : [ + "fonts-ukij-uyghur" + ] + }, + "ukijsls.ttf" : { + "installed_by" : [ + "fonts-ukij-uyghur" + ] + }, + "ukijslsbold.ttf" : { + "installed_by" : [ + "fonts-ukij-uyghur" + ] + }, + "ukijslstom.ttf" : { + "installed_by" : [ + "fonts-ukij-uyghur" + ] + }, + "ukijteng-b.ttf" : { + "installed_by" : [ + "fonts-ukij-uyghur" + ] + }, + "ukijteng.ttf" : { + "installed_by" : [ + "fonts-ukij-uyghur" + ] + }, + "ukijtiken.ttf" : { + "installed_by" : [ + "fonts-ukij-uyghur" + ] + }, + "ukijtitle.ttf" : { + "installed_by" : [ + "fonts-ukij-uyghur" + ] + }, + "ukijtor.ttf" : { + "installed_by" : [ + "fonts-ukij-uyghur" + ] + }, + "ukijtughra.ttf" : { + "installed_by" : [ + "fonts-ukij-uyghur" + ] + }, + "ukijtut.ttf" : { + "installed_by" : [ + "fonts-ukij-uyghur" + ] + }, + "ukijtuz.ttf" : { + "installed_by" : [ + "fonts-ukij-uyghur" + ] + }, + "ukijtuzb.ttf" : { + "installed_by" : [ + "fonts-ukij-uyghur" + ] + }, + "ukijtuzbb.ttf" : { + "installed_by" : [ + "fonts-ukij-uyghur" + ] + }, + "ukijtuzbold.ttf" : { + "installed_by" : [ + "fonts-ukij-uyghur" + ] + }, + "ukijtuzg.ttf" : { + "installed_by" : [ + "fonts-ukij-uyghur" + ] + }, + "ukijtuzgb.ttf" : { + "installed_by" : [ + "fonts-ukij-uyghur" + ] + }, + "ukijtuzk.ttf" : { + "installed_by" : [ + "fonts-ukij-uyghur" + ] + }, + "ukijtuzkb.ttf" : { + "installed_by" : [ + "fonts-ukij-uyghur" + ] + }, + "ukijtuzq.ttf" : { + "installed_by" : [ + "fonts-ukij-uyghur" + ] + }, + "ukijtuzqb.ttf" : { + "installed_by" : [ + "fonts-ukij-uyghur" + ] + }, + "ukijtzneqish.ttf" : { + "installed_by" : [ + "fonts-ukij-uyghur" + ] + }, + "ukijtztr.ttf" : { + "installed_by" : [ + "fonts-ukij-uyghur" + ] + }, + "ukijtztrbold.ttf" : { + "installed_by" : [ + "fonts-ukij-uyghur" + ] + }, + "ukijzilwa.ttf" : { + "installed_by" : [ + "fonts-ukij-uyghur" + ] + }, + "ume-hgo4.ttf" : { + "installed_by" : [ + "fonts-horai-umefont" + ] + }, + "ume-hgo5.ttf" : { + "installed_by" : [ + "fonts-horai-umefont" + ] + }, + "ume-pgc4.ttf" : { + "installed_by" : [ + "fonts-horai-umefont" + ] + }, + "ume-pgc5.ttf" : { + "installed_by" : [ + "fonts-horai-umefont" + ] + }, + "ume-pgo4.ttf" : { + "installed_by" : [ + "fonts-horai-umefont" + ] + }, + "ume-pgo5.ttf" : { + "installed_by" : [ + "fonts-horai-umefont" + ] + }, + "ume-pgs4.ttf" : { + "installed_by" : [ + "fonts-horai-umefont" + ] + }, + "ume-pgs5.ttf" : { + "installed_by" : [ + "fonts-horai-umefont" + ] + }, + "ume-pmo3.ttf" : { + "installed_by" : [ + "fonts-horai-umefont" + ] + }, + "ume-pms3.ttf" : { + "installed_by" : [ + "fonts-horai-umefont" + ] + }, + "ume-tgc4.ttf" : { + "installed_by" : [ + "fonts-horai-umefont" + ] + }, + "ume-tgc5.ttf" : { + "installed_by" : [ + "fonts-horai-umefont" + ] + }, + "ume-tgo4.ttf" : { + "installed_by" : [ + "fonts-horai-umefont" + ] + }, + "ume-tgo5.ttf" : { + "installed_by" : [ + "fonts-horai-umefont" + ] + }, + "ume-tgs4.ttf" : { + "installed_by" : [ + "fonts-horai-umefont" + ] + }, + "ume-tgs5.ttf" : { + "installed_by" : [ + "fonts-horai-umefont" + ] + }, + "ume-tmo3.ttf" : { + "installed_by" : [ + "fonts-horai-umefont" + ] + }, + "ume-tms3.ttf" : { + "installed_by" : [ + "fonts-horai-umefont" + ] + }, + "ume-ugo4.ttf" : { + "installed_by" : [ + "fonts-horai-umefont" + ] + }, + "ume-ugo5.ttf" : { + "installed_by" : [ + "fonts-horai-umefont" + ] + }, + "umeplus-cl-gothic.ttf" : { + "installed_by" : [ + "fonts-umeplus-cl" + ] + }, + "umeplus-clp-gothic.ttf" : { + "installed_by" : [ + "fonts-umeplus-cl" + ] + }, + "umeplus-gothic.ttf" : { + "installed_by" : [ + "fonts-umeplus" + ] + }, + "umeplus-p-gothic.ttf" : { + "installed_by" : [ + "fonts-umeplus" + ] + }, + "umpush-bold.otf" : { + "installed_by" : [ + "fonts-tlwg-umpush-otf" + ] + }, + "umpush-bold.ttf" : { + "installed_by" : [ + "fonts-tlwg-umpush-ttf" + ] + }, + "umpush-boldoblique.otf" : { + "installed_by" : [ + "fonts-tlwg-umpush-otf" + ] + }, + "umpush-boldoblique.ttf" : { + "installed_by" : [ + "fonts-tlwg-umpush-ttf" + ] + }, + "umpush-light.otf" : { + "installed_by" : [ + "fonts-tlwg-umpush-otf" + ] + }, + "umpush-light.ttf" : { + "installed_by" : [ + "fonts-tlwg-umpush-ttf" + ] + }, + "umpush-lightoblique.otf" : { + "installed_by" : [ + "fonts-tlwg-umpush-otf" + ] + }, + "umpush-lightoblique.ttf" : { + "installed_by" : [ + "fonts-tlwg-umpush-ttf" + ] + }, + "umpush-oblique.otf" : { + "installed_by" : [ + "fonts-tlwg-umpush-otf" + ] + }, + "umpush-oblique.ttf" : { + "installed_by" : [ + "fonts-tlwg-umpush-ttf" + ] + }, + "umpush.otf" : { + "installed_by" : [ + "fonts-tlwg-umpush-otf" + ] + }, + "umpush.ttf" : { + "installed_by" : [ + "fonts-tlwg-umpush-ttf" + ] + }, + "unanimo.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "unanimoi.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "unbatang.ttf" : { + "installed_by" : [ + "fonts-unfonts-core" + ] + }, + "unbatangbold.ttf" : { + "installed_by" : [ + "fonts-unfonts-core" + ] + }, + "underscr.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "underwhe.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "underwho.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "undinaru.ttf" : { + "installed_by" : [ + "fonts-unfonts-core" + ] + }, + "undinarubold.ttf" : { + "installed_by" : [ + "fonts-unfonts-core" + ] + }, + "undinarulight.ttf" : { + "installed_by" : [ + "fonts-unfonts-core" + ] + }, + "undotum.ttf" : { + "installed_by" : [ + "fonts-unfonts-core" + ] + }, + "undotumbold.ttf" : { + "installed_by" : [ + "fonts-unfonts-core" + ] + }, + "undrscr2.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "ungraphic.ttf" : { + "installed_by" : [ + "fonts-unfonts-core" + ] + }, + "ungraphicbold.ttf" : { + "installed_by" : [ + "fonts-unfonts-core" + ] + }, + "ungungseo.ttf" : { + "installed_by" : [ + "fonts-unfonts-core" + ] + }, + "unidings_hint.ttf" : { + "installed_by" : [ + "fonts-ancient-scripts" + ] + }, + "unifont.ttf" : { + "installed_by" : [ + "fonts-unifont" + ] + }, + "unifont_csur.ttf" : { + "installed_by" : [ + "fonts-unifont" + ] + }, + "unifont_jp.ttf" : { + "installed_by" : [ + "fonts-unifont" + ] + }, + "unifont_sample.ttf" : { + "installed_by" : [ + "fonts-unifont" + ] + }, + "unifont_upper.ttf" : { + "installed_by" : [ + "fonts-unifont" + ] + }, + "unifur.ttf" : { + "installed_by" : [ + "fonts-eurofurence" + ] + }, + "unikuweb.ttf" : { + "installed_by" : [ + "fonts-unikurdweb" + ] + }, + "uniol.ttf" : { + "installed_by" : [ + "fonts-uniol" + ] + }, + "united.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "universalisadfstd-bold.otf" : { + "installed_by" : [ + "fonts-adf-universalis" + ] + }, + "universalisadfstd-boldcond.otf" : { + "installed_by" : [ + "fonts-adf-universalis" + ] + }, + "universalisadfstd-boldcondit.otf" : { + "installed_by" : [ + "fonts-adf-universalis" + ] + }, + "universalisadfstd-bolditalic.otf" : { + "installed_by" : [ + "fonts-adf-universalis" + ] + }, + "universalisadfstd-cond.otf" : { + "installed_by" : [ + "fonts-adf-universalis" + ] + }, + "universalisadfstd-conditalic.otf" : { + "installed_by" : [ + "fonts-adf-universalis" + ] + }, + "universalisadfstd-italic.otf" : { + "installed_by" : [ + "fonts-adf-universalis" + ] + }, + "universalisadfstd-regular.otf" : { + "installed_by" : [ + "fonts-adf-universalis" + ] + }, + "unjamobatang.ttf" : { + "installed_by" : [ + "fonts-unfonts-extra" + ] + }, + "unjamodotum.ttf" : { + "installed_by" : [ + "fonts-unfonts-extra" + ] + }, + "unjamonovel.ttf" : { + "installed_by" : [ + "fonts-unfonts-extra" + ] + }, + "unjamosora.ttf" : { + "installed_by" : [ + "fonts-unfonts-extra" + ] + }, + "unlearn2.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "unlearne.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "unpen.ttf" : { + "installed_by" : [ + "fonts-unfonts-extra" + ] + }, + "unpenheulim.ttf" : { + "installed_by" : [ + "fonts-unfonts-extra" + ] + }, + "unpilgi.ttf" : { + "installed_by" : [ + "fonts-unfonts-core" + ] + }, + "unpilgia.ttf" : { + "installed_by" : [ + "fonts-unfonts-extra" + ] + }, + "unpilgibold.ttf" : { + "installed_by" : [ + "fonts-unfonts-core" + ] + }, + "unrespon.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "unshinmun.ttf" : { + "installed_by" : [ + "fonts-unfonts-extra" + ] + }, + "untaza.ttf" : { + "installed_by" : [ + "fonts-unfonts-extra" + ] + }, + "unvada.ttf" : { + "installed_by" : [ + "fonts-unfonts-extra" + ] + }, + "unxgala.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "unxgalaw.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "unxgalo.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "unxgalwo.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "unyetgul.ttf" : { + "installed_by" : [ + "fonts-unfonts-extra" + ] + }, + "upheavtt.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "upraise.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "urcompi.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "urcompo.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "uroob-regular.ttf" : { + "installed_by" : [ + "fonts-smc-uroob" + ] + }, + "urwbookman-demi.otf" : { + "installed_by" : [ + "fonts-urw-base35" + ] + }, + "urwbookman-demi.pfb" : { + "installed_by" : [ + "fonts-urw-base35" + ] + }, + "urwbookman-demiitalic.otf" : { + "installed_by" : [ + "fonts-urw-base35" + ] + }, + "urwbookman-demiitalic.pfb" : { + "installed_by" : [ + "fonts-urw-base35" + ] + }, + "urwbookman-light.otf" : { + "installed_by" : [ + "fonts-urw-base35" + ] + }, + "urwbookman-light.pfb" : { + "installed_by" : [ + "fonts-urw-base35" + ] + }, + "urwbookman-lightitalic.otf" : { + "installed_by" : [ + "fonts-urw-base35" + ] + }, + "urwbookman-lightitalic.pfb" : { + "installed_by" : [ + "fonts-urw-base35" + ] + }, + "urwgothic-book.otf" : { + "installed_by" : [ + "fonts-urw-base35" + ] + }, + "urwgothic-book.pfb" : { + "installed_by" : [ + "fonts-urw-base35" + ] + }, + "urwgothic-bookoblique.otf" : { + "installed_by" : [ + "fonts-urw-base35" + ] + }, + "urwgothic-bookoblique.pfb" : { + "installed_by" : [ + "fonts-urw-base35" + ] + }, + "urwgothic-demi.otf" : { + "installed_by" : [ + "fonts-urw-base35" + ] + }, + "urwgothic-demi.pfb" : { + "installed_by" : [ + "fonts-urw-base35" + ] + }, + "urwgothic-demioblique.otf" : { + "installed_by" : [ + "fonts-urw-base35" + ] + }, + "urwgothic-demioblique.pfb" : { + "installed_by" : [ + "fonts-urw-base35" + ] + }, + "utkal.ttf" : { + "installed_by" : [ + "fonts-orya-extra" + ] + }, + "vacantz.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "vanished.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "vantage.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "variance.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "vemana2000.ttf" : { + "installed_by" : [ + "fonts-telu-extra" + ] + }, + "vera.ttf" : { + "installed_by" : [ + "ttf-bitstream-vera" + ] + }, + "verabd.ttf" : { + "installed_by" : [ + "ttf-bitstream-vera" + ] + }, + "verabi.ttf" : { + "installed_by" : [ + "ttf-bitstream-vera" + ] + }, + "verait.ttf" : { + "installed_by" : [ + "ttf-bitstream-vera" + ] + }, + "veramobd.ttf" : { + "installed_by" : [ + "ttf-bitstream-vera" + ] + }, + "veramobi.ttf" : { + "installed_by" : [ + "ttf-bitstream-vera" + ] + }, + "veramoit.ttf" : { + "installed_by" : [ + "ttf-bitstream-vera" + ] + }, + "veramono.ttf" : { + "installed_by" : [ + "ttf-bitstream-vera" + ] + }, + "verana-bold.otf" : { + "installed_by" : [ + "fonts-adf-verana" + ] + }, + "verana-bolditalic.otf" : { + "installed_by" : [ + "fonts-adf-verana" + ] + }, + "verana-italic.otf" : { + "installed_by" : [ + "fonts-adf-verana" + ] + }, + "verana-regular.otf" : { + "installed_by" : [ + "fonts-adf-verana" + ] + }, + "veranasans-bold.otf" : { + "installed_by" : [ + "fonts-adf-verana" + ] + }, + "veranasans-boldoblique.otf" : { + "installed_by" : [ + "fonts-adf-verana" + ] + }, + "veranasans-oblique.otf" : { + "installed_by" : [ + "fonts-adf-verana" + ] + }, + "veranasans-regular.otf" : { + "installed_by" : [ + "fonts-adf-verana" + ] + }, + "veranasansdemi-oblique.otf" : { + "installed_by" : [ + "fonts-adf-verana" + ] + }, + "veranasansdemi-regular.otf" : { + "installed_by" : [ + "fonts-adf-verana" + ] + }, + "veranasansmedium-oblique.otf" : { + "installed_by" : [ + "fonts-adf-verana" + ] + }, + "veranasansmedium-regular.otf" : { + "installed_by" : [ + "fonts-adf-verana" + ] + }, + "veranda.ttf" : { + "installed_by" : [ + "fonts-arkpandora" + ] + }, + "verandabd.ttf" : { + "installed_by" : [ + "fonts-arkpandora" + ] + }, + "verandabdit.ttf" : { + "installed_by" : [ + "fonts-arkpandora" + ] + }, + "verandait.ttf" : { + "installed_by" : [ + "fonts-arkpandora" + ] + }, + "verase.ttf" : { + "installed_by" : [ + "ttf-bitstream-vera" + ] + }, + "verasebd.ttf" : { + "installed_by" : [ + "ttf-bitstream-vera" + ] + }, + "vertigo.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "vertigo2.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "vertigup.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "vertiup2.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "vigilanc.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "vindicti.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "visitor1.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "visitor2.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "vl-gothic-regular.ttf" : { + "installed_by" : [ + "fonts-vlgothic" + ] + }, + "vl-pgothic-regular.ttf" : { + "installed_by" : [ + "fonts-vlgothic" + ] + }, + "volatil1.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "volatil2.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "vollkorn-black.ttf" : { + "installed_by" : [ + "fonts-vollkorn" + ] + }, + "vollkorn-blackitalic.ttf" : { + "installed_by" : [ + "fonts-vollkorn" + ] + }, + "vollkorn-bold.ttf" : { + "installed_by" : [ + "fonts-vollkorn" + ] + }, + "vollkorn-bolditalic.ttf" : { + "installed_by" : [ + "fonts-vollkorn" + ] + }, + "vollkorn-extrabold.ttf" : { + "installed_by" : [ + "fonts-vollkorn" + ] + }, + "vollkorn-extrabolditalic.ttf" : { + "installed_by" : [ + "fonts-vollkorn" + ] + }, + "vollkorn-italic.ttf" : { + "installed_by" : [ + "fonts-vollkorn" + ] + }, + "vollkorn-medium.ttf" : { + "installed_by" : [ + "fonts-vollkorn" + ] + }, + "vollkorn-mediumitalic.ttf" : { + "installed_by" : [ + "fonts-vollkorn" + ] + }, + "vollkorn-regular.ttf" : { + "installed_by" : [ + "fonts-vollkorn" + ] + }, + "vollkorn-semibold.ttf" : { + "installed_by" : [ + "fonts-vollkorn" + ] + }, + "vollkorn-semibolditalic.ttf" : { + "installed_by" : [ + "fonts-vollkorn" + ] + }, + "wager.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "wagerlos.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "wagerwon.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "waree-bold.otf" : { + "installed_by" : [ + "fonts-tlwg-waree-otf" + ] + }, + "waree-bold.ttf" : { + "installed_by" : [ + "fonts-tlwg-waree-ttf" + ] + }, + "waree-boldoblique.otf" : { + "installed_by" : [ + "fonts-tlwg-waree-otf" + ] + }, + "waree-boldoblique.ttf" : { + "installed_by" : [ + "fonts-tlwg-waree-ttf" + ] + }, + "waree-oblique.otf" : { + "installed_by" : [ + "fonts-tlwg-waree-otf" + ] + }, + "waree-oblique.ttf" : { + "installed_by" : [ + "fonts-tlwg-waree-ttf" + ] + }, + "waree.otf" : { + "installed_by" : [ + "fonts-tlwg-waree-otf" + ] + }, + "waree.ttf" : { + "installed_by" : [ + "fonts-tlwg-waree-ttf" + ] + }, + "wargames.ttf" : { + "installed_by" : [ + "fonts-dustin" + ] + }, + "washrab.ttf" : { + "installed_by" : [ + "fonts-senamirmir-washra" + ] + }, + "washrasb.ttf" : { + "installed_by" : [ + "fonts-senamirmir-washra" + ] + }, + "wasy10.ttf" : { + "installed_by" : [ + "fonts-lyx" + ] + }, + "waver.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "wayward.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "waywards.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "weatherd.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "weathers.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "weaver.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "webdings.ttf" : { + "installed_by" : [ + "fonts-wine" + ] + }, + "whatever.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "whipsnap.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "wigsquig.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "wincing.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "wingding.ttf" : { + "installed_by" : [ + "fonts-wine" + ] + }, + "winks.ttf" : { + "installed_by" : [ + "fonts-dustin" + ] + }, + "withstan.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "wobbly.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "wookianos.ttf" : { + "installed_by" : [ + "fonts-senamirmir-washra" + ] + }, + "wyvernwi.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "wyvernww.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "xeroxmal.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "xhume.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "xipa10.pfb" : { + "installed_by" : [ + "xfonts-tipa" + ] + }, + "xipab10.pfb" : { + "installed_by" : [ + "xfonts-tipa" + ] + }, + "xipabs10.pfb" : { + "installed_by" : [ + "xfonts-tipa" + ] + }, + "xipasb10.pfb" : { + "installed_by" : [ + "xfonts-tipa" + ] + }, + "xipasi10.pfb" : { + "installed_by" : [ + "xfonts-tipa" + ] + }, + "xipasl10.pfb" : { + "installed_by" : [ + "xfonts-tipa" + ] + }, + "xipass10.pfb" : { + "installed_by" : [ + "xfonts-tipa" + ] + }, + "xipital.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "xipx10.pfb" : { + "installed_by" : [ + "xfonts-tipa" + ] + }, + "xipxb10.pfb" : { + "installed_by" : [ + "xfonts-tipa" + ] + }, + "xipxbs10.pfb" : { + "installed_by" : [ + "xfonts-tipa" + ] + }, + "xipxsb10.pfb" : { + "installed_by" : [ + "xfonts-tipa" + ] + }, + "xipxsi10.pfb" : { + "installed_by" : [ + "xfonts-tipa" + ] + }, + "xipxsl10.pfb" : { + "installed_by" : [ + "xfonts-tipa" + ] + }, + "xipxss10.pfb" : { + "installed_by" : [ + "xfonts-tipa" + ] + }, + "xmaslght.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "xtrusion.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "yamsuf.otf" : { + "installed_by" : [ + "fonts-ldco" + ] + }, + "yamsuf.ttf" : { + "installed_by" : [ + "fonts-ldco" + ] + }, + "yanonekaffeesatz-bold.otf" : { + "installed_by" : [ + "fonts-yanone-kaffeesatz" + ] + }, + "yanonekaffeesatz-extralight.otf" : { + "installed_by" : [ + "fonts-yanone-kaffeesatz" + ] + }, + "yanonekaffeesatz-light.otf" : { + "installed_by" : [ + "fonts-yanone-kaffeesatz" + ] + }, + "yanonekaffeesatz-medium.otf" : { + "installed_by" : [ + "fonts-yanone-kaffeesatz" + ] + }, + "yanonekaffeesatz-regular.otf" : { + "installed_by" : [ + "fonts-yanone-kaffeesatz" + ] + }, + "yanonekaffeesatz-semibold.otf" : { + "installed_by" : [ + "fonts-yanone-kaffeesatz" + ] + }, + "yearend.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "yebse.ttf" : { + "installed_by" : [ + "fonts-senamirmir-washra" + ] + }, + "yesterda.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "yielding.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "yigezubisratgothic.ttf" : { + "installed_by" : [ + "fonts-senamirmir-washra" + ] + }, + "yonder.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "yoshisst.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "yourcomp.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "yozba_.ttf" : { + "installed_by" : [ + "fonts-yozvox-yozfont-antique" + ] + }, + "yozba_90.ttf" : { + "installed_by" : [ + "fonts-yozvox-yozfont-antique" + ] + }, + "yozba_90i.ttf" : { + "installed_by" : [ + "fonts-yozvox-yozfont-antique" + ] + }, + "yozba_i.ttf" : { + "installed_by" : [ + "fonts-yozvox-yozfont-antique" + ] + }, + "yozbaf.ttf" : { + "installed_by" : [ + "fonts-yozvox-yozfont-antique" + ] + }, + "yozbaf90.ttf" : { + "installed_by" : [ + "fonts-yozvox-yozfont-antique" + ] + }, + "yozbaf90i.ttf" : { + "installed_by" : [ + "fonts-yozvox-yozfont-antique" + ] + }, + "yozbafi.ttf" : { + "installed_by" : [ + "fonts-yozvox-yozfont-antique" + ] + }, + "yozbap.ttf" : { + "installed_by" : [ + "fonts-yozvox-yozfont-antique" + ] + }, + "yozbap90.ttf" : { + "installed_by" : [ + "fonts-yozvox-yozfont-antique" + ] + }, + "yozbc_.ttf" : { + "installed_by" : [ + "fonts-yozvox-yozfont-cute" + ] + }, + "yozbc_90.ttf" : { + "installed_by" : [ + "fonts-yozvox-yozfont-cute" + ] + }, + "yozbc_90i.ttf" : { + "installed_by" : [ + "fonts-yozvox-yozfont-cute" + ] + }, + "yozbc_i.ttf" : { + "installed_by" : [ + "fonts-yozvox-yozfont-cute" + ] + }, + "yozbcf.ttf" : { + "installed_by" : [ + "fonts-yozvox-yozfont-cute" + ] + }, + "yozbcf90.ttf" : { + "installed_by" : [ + "fonts-yozvox-yozfont-cute" + ] + }, + "yozbcf90i.ttf" : { + "installed_by" : [ + "fonts-yozvox-yozfont-cute" + ] + }, + "yozbcfi.ttf" : { + "installed_by" : [ + "fonts-yozvox-yozfont-cute" + ] + }, + "yozbe_.ttf" : { + "installed_by" : [ + "fonts-yozvox-yozfont-edu" + ] + }, + "yozbe_90.ttf" : { + "installed_by" : [ + "fonts-yozvox-yozfont-edu" + ] + }, + "yozbe_90i.ttf" : { + "installed_by" : [ + "fonts-yozvox-yozfont-edu" + ] + }, + "yozbe_i.ttf" : { + "installed_by" : [ + "fonts-yozvox-yozfont-edu" + ] + }, + "yozbe_m.ttf" : { + "installed_by" : [ + "fonts-yozvox-yozfont-edu" + ] + }, + "yozbe_m90.ttf" : { + "installed_by" : [ + "fonts-yozvox-yozfont-edu" + ] + }, + "yozbef.ttf" : { + "installed_by" : [ + "fonts-yozvox-yozfont-edu" + ] + }, + "yozbef90.ttf" : { + "installed_by" : [ + "fonts-yozvox-yozfont-edu" + ] + }, + "yozbef90i.ttf" : { + "installed_by" : [ + "fonts-yozvox-yozfont-edu" + ] + }, + "yozbefi.ttf" : { + "installed_by" : [ + "fonts-yozvox-yozfont-edu" + ] + }, + "yozbefm.ttf" : { + "installed_by" : [ + "fonts-yozvox-yozfont-edu" + ] + }, + "yozbefm90.ttf" : { + "installed_by" : [ + "fonts-yozvox-yozfont-edu" + ] + }, + "yozbn_.ttf" : { + "installed_by" : [ + "fonts-yozvox-yozfont-new-kana" + ] + }, + "yozbn_90.ttf" : { + "installed_by" : [ + "fonts-yozvox-yozfont-new-kana" + ] + }, + "yozbn_90i.ttf" : { + "installed_by" : [ + "fonts-yozvox-yozfont-new-kana" + ] + }, + "yozbn_i.ttf" : { + "installed_by" : [ + "fonts-yozvox-yozfont-new-kana" + ] + }, + "yozbn_m.ttf" : { + "installed_by" : [ + "fonts-yozvox-yozfont-new-kana" + ] + }, + "yozbn_m90.ttf" : { + "installed_by" : [ + "fonts-yozvox-yozfont-new-kana" + ] + }, + "yozbnf.ttf" : { + "installed_by" : [ + "fonts-yozvox-yozfont-new-kana" + ] + }, + "yozbnf90.ttf" : { + "installed_by" : [ + "fonts-yozvox-yozfont-new-kana" + ] + }, + "yozbnf90i.ttf" : { + "installed_by" : [ + "fonts-yozvox-yozfont-new-kana" + ] + }, + "yozbnfi.ttf" : { + "installed_by" : [ + "fonts-yozvox-yozfont-new-kana" + ] + }, + "yozbnfm.ttf" : { + "installed_by" : [ + "fonts-yozvox-yozfont-new-kana" + ] + }, + "yozbnfm90.ttf" : { + "installed_by" : [ + "fonts-yozvox-yozfont-new-kana" + ] + }, + "yozbs_.ttf" : { + "installed_by" : [ + "fonts-yozvox-yozfont-standard-kana" + ] + }, + "yozbs_90.ttf" : { + "installed_by" : [ + "fonts-yozvox-yozfont-standard-kana" + ] + }, + "yozbs_90i.ttf" : { + "installed_by" : [ + "fonts-yozvox-yozfont-standard-kana" + ] + }, + "yozbs_i.ttf" : { + "installed_by" : [ + "fonts-yozvox-yozfont-standard-kana" + ] + }, + "yozbsf.ttf" : { + "installed_by" : [ + "fonts-yozvox-yozfont-standard-kana" + ] + }, + "yozbsf90.ttf" : { + "installed_by" : [ + "fonts-yozvox-yozfont-standard-kana" + ] + }, + "yozbsf90i.ttf" : { + "installed_by" : [ + "fonts-yozvox-yozfont-standard-kana" + ] + }, + "yozbsfi.ttf" : { + "installed_by" : [ + "fonts-yozvox-yozfont-standard-kana" + ] + }, + "yozbsp.ttf" : { + "installed_by" : [ + "fonts-yozvox-yozfont-standard-kana" + ] + }, + "yozbsp90.ttf" : { + "installed_by" : [ + "fonts-yozvox-yozfont-standard-kana" + ] + }, + "yozra_.ttf" : { + "installed_by" : [ + "fonts-yozvox-yozfont-antique" + ] + }, + "yozra_90.ttf" : { + "installed_by" : [ + "fonts-yozvox-yozfont-antique" + ] + }, + "yozra_90i.ttf" : { + "installed_by" : [ + "fonts-yozvox-yozfont-antique" + ] + }, + "yozra_i.ttf" : { + "installed_by" : [ + "fonts-yozvox-yozfont-antique" + ] + }, + "yozraf.ttf" : { + "installed_by" : [ + "fonts-yozvox-yozfont-antique" + ] + }, + "yozraf90.ttf" : { + "installed_by" : [ + "fonts-yozvox-yozfont-antique" + ] + }, + "yozraf90i.ttf" : { + "installed_by" : [ + "fonts-yozvox-yozfont-antique" + ] + }, + "yozrafi.ttf" : { + "installed_by" : [ + "fonts-yozvox-yozfont-antique" + ] + }, + "yozrap.ttf" : { + "installed_by" : [ + "fonts-yozvox-yozfont-antique" + ] + }, + "yozrap90.ttf" : { + "installed_by" : [ + "fonts-yozvox-yozfont-antique" + ] + }, + "yozrc_.ttf" : { + "installed_by" : [ + "fonts-yozvox-yozfont-cute" + ] + }, + "yozrc_90.ttf" : { + "installed_by" : [ + "fonts-yozvox-yozfont-cute" + ] + }, + "yozrc_90i.ttf" : { + "installed_by" : [ + "fonts-yozvox-yozfont-cute" + ] + }, + "yozrc_i.ttf" : { + "installed_by" : [ + "fonts-yozvox-yozfont-cute" + ] + }, + "yozrcf.ttf" : { + "installed_by" : [ + "fonts-yozvox-yozfont-cute" + ] + }, + "yozrcf90.ttf" : { + "installed_by" : [ + "fonts-yozvox-yozfont-cute" + ] + }, + "yozrcf90i.ttf" : { + "installed_by" : [ + "fonts-yozvox-yozfont-cute" + ] + }, + "yozrcfi.ttf" : { + "installed_by" : [ + "fonts-yozvox-yozfont-cute" + ] + }, + "yozre_.ttf" : { + "installed_by" : [ + "fonts-yozvox-yozfont-edu" + ] + }, + "yozre_90.ttf" : { + "installed_by" : [ + "fonts-yozvox-yozfont-edu" + ] + }, + "yozre_90i.ttf" : { + "installed_by" : [ + "fonts-yozvox-yozfont-edu" + ] + }, + "yozre_i.ttf" : { + "installed_by" : [ + "fonts-yozvox-yozfont-edu" + ] + }, + "yozre_m.ttf" : { + "installed_by" : [ + "fonts-yozvox-yozfont-edu" + ] + }, + "yozre_m90.ttf" : { + "installed_by" : [ + "fonts-yozvox-yozfont-edu" + ] + }, + "yozref.ttf" : { + "installed_by" : [ + "fonts-yozvox-yozfont-edu" + ] + }, + "yozref90.ttf" : { + "installed_by" : [ + "fonts-yozvox-yozfont-edu" + ] + }, + "yozref90i.ttf" : { + "installed_by" : [ + "fonts-yozvox-yozfont-edu" + ] + }, + "yozrefi.ttf" : { + "installed_by" : [ + "fonts-yozvox-yozfont-edu" + ] + }, + "yozrefm.ttf" : { + "installed_by" : [ + "fonts-yozvox-yozfont-edu" + ] + }, + "yozrefm90.ttf" : { + "installed_by" : [ + "fonts-yozvox-yozfont-edu" + ] + }, + "yozrex.ttf" : { + "installed_by" : [ + "fonts-yozvox-yozfont-edu" + ] + }, + "yozrex90.ttf" : { + "installed_by" : [ + "fonts-yozvox-yozfont-edu" + ] + }, + "yozrexf.ttf" : { + "installed_by" : [ + "fonts-yozvox-yozfont-edu" + ] + }, + "yozrexf90.ttf" : { + "installed_by" : [ + "fonts-yozvox-yozfont-edu" + ] + }, + "yozrexm.ttf" : { + "installed_by" : [ + "fonts-yozvox-yozfont-edu" + ] + }, + "yozrexm90.ttf" : { + "installed_by" : [ + "fonts-yozvox-yozfont-edu" + ] + }, + "yozrn_.ttf" : { + "installed_by" : [ + "fonts-yozvox-yozfont-new-kana" + ] + }, + "yozrn_90.ttf" : { + "installed_by" : [ + "fonts-yozvox-yozfont-new-kana" + ] + }, + "yozrn_90i.ttf" : { + "installed_by" : [ + "fonts-yozvox-yozfont-new-kana" + ] + }, + "yozrn_i.ttf" : { + "installed_by" : [ + "fonts-yozvox-yozfont-new-kana" + ] + }, + "yozrn_m.ttf" : { + "installed_by" : [ + "fonts-yozvox-yozfont-new-kana" + ] + }, + "yozrn_m90.ttf" : { + "installed_by" : [ + "fonts-yozvox-yozfont-new-kana" + ] + }, + "yozrnf.ttf" : { + "installed_by" : [ + "fonts-yozvox-yozfont-new-kana" + ] + }, + "yozrnf90.ttf" : { + "installed_by" : [ + "fonts-yozvox-yozfont-new-kana" + ] + }, + "yozrnf90i.ttf" : { + "installed_by" : [ + "fonts-yozvox-yozfont-new-kana" + ] + }, + "yozrnfi.ttf" : { + "installed_by" : [ + "fonts-yozvox-yozfont-new-kana" + ] + }, + "yozrnfm.ttf" : { + "installed_by" : [ + "fonts-yozvox-yozfont-new-kana" + ] + }, + "yozrnfm90.ttf" : { + "installed_by" : [ + "fonts-yozvox-yozfont-new-kana" + ] + }, + "yozrnx.ttf" : { + "installed_by" : [ + "fonts-yozvox-yozfont-new-kana" + ] + }, + "yozrnx90.ttf" : { + "installed_by" : [ + "fonts-yozvox-yozfont-new-kana" + ] + }, + "yozrnxf.ttf" : { + "installed_by" : [ + "fonts-yozvox-yozfont-new-kana" + ] + }, + "yozrnxf90.ttf" : { + "installed_by" : [ + "fonts-yozvox-yozfont-new-kana" + ] + }, + "yozrnxm.ttf" : { + "installed_by" : [ + "fonts-yozvox-yozfont-new-kana" + ] + }, + "yozrnxm90.ttf" : { + "installed_by" : [ + "fonts-yozvox-yozfont-new-kana" + ] + }, + "yozrs_.ttf" : { + "installed_by" : [ + "fonts-yozvox-yozfont-standard-kana" + ] + }, + "yozrs_90.ttf" : { + "installed_by" : [ + "fonts-yozvox-yozfont-standard-kana" + ] + }, + "yozrs_90i.ttf" : { + "installed_by" : [ + "fonts-yozvox-yozfont-standard-kana" + ] + }, + "yozrs_i.ttf" : { + "installed_by" : [ + "fonts-yozvox-yozfont-standard-kana" + ] + }, + "yozrsf.ttf" : { + "installed_by" : [ + "fonts-yozvox-yozfont-standard-kana" + ] + }, + "yozrsf90.ttf" : { + "installed_by" : [ + "fonts-yozvox-yozfont-standard-kana" + ] + }, + "yozrsf90i.ttf" : { + "installed_by" : [ + "fonts-yozvox-yozfont-standard-kana" + ] + }, + "yozrsfi.ttf" : { + "installed_by" : [ + "fonts-yozvox-yozfont-standard-kana" + ] + }, + "yozrsp.ttf" : { + "installed_by" : [ + "fonts-yozvox-yozfont-standard-kana" + ] + }, + "yozrsp90.ttf" : { + "installed_by" : [ + "fonts-yozvox-yozfont-standard-kana" + ] + }, + "yozrsx.ttf" : { + "installed_by" : [ + "fonts-yozvox-yozfont-standard-kana" + ] + }, + "yozrsx90.ttf" : { + "installed_by" : [ + "fonts-yozvox-yozfont-standard-kana" + ] + }, + "yozrsxf.ttf" : { + "installed_by" : [ + "fonts-yozvox-yozfont-standard-kana" + ] + }, + "yozrsxf90.ttf" : { + "installed_by" : [ + "fonts-yozvox-yozfont-standard-kana" + ] + }, + "yozrsxm.ttf" : { + "installed_by" : [ + "fonts-yozvox-yozfont-standard-kana" + ] + }, + "yozrsxm90.ttf" : { + "installed_by" : [ + "fonts-yozvox-yozfont-standard-kana" + ] + }, + "yrsa-bold.ttf" : { + "installed_by" : [ + "fonts-yrsa-rasa" + ] + }, + "yrsa-bolditalic.ttf" : { + "installed_by" : [ + "fonts-yrsa-rasa" + ] + }, + "yrsa-italic.ttf" : { + "installed_by" : [ + "fonts-yrsa-rasa" + ] + }, + "yrsa-light.ttf" : { + "installed_by" : [ + "fonts-yrsa-rasa" + ] + }, + "yrsa-lightitalic.ttf" : { + "installed_by" : [ + "fonts-yrsa-rasa" + ] + }, + "yrsa-medium.ttf" : { + "installed_by" : [ + "fonts-yrsa-rasa" + ] + }, + "yrsa-mediumitalic.ttf" : { + "installed_by" : [ + "fonts-yrsa-rasa" + ] + }, + "yrsa-regular.ttf" : { + "installed_by" : [ + "fonts-yrsa-rasa" + ] + }, + "yrsa-semibold.ttf" : { + "installed_by" : [ + "fonts-yrsa-rasa" + ] + }, + "yrsa-semibolditalic.ttf" : { + "installed_by" : [ + "fonts-yrsa-rasa" + ] + }, + "yuseimagic-regular.ttf" : { + "installed_by" : [ + "fonts-yusei-magic" + ] + }, + "z003-mediumitalic.otf" : { + "installed_by" : [ + "fonts-urw-base35" + ] + }, + "z003-mediumitalic.pfb" : { + "installed_by" : [ + "fonts-urw-base35" + ] + }, + "z003034d.pfb" : { + "installed_by" : [ + "t1-cyrillic" + ] + }, + "zaghawaberia.otf" : { + "installed_by" : [ + "fonts-sil-zaghawa-beria" + ] + }, + "zainer-goticoantiqua96g.otf" : { + "installed_by" : [ + "fonts-gotico-antiqua" + ] + }, + "zainer-initials45mm.otf" : { + "installed_by" : [ + "fonts-gotico-antiqua" + ] + }, + "zawgyione2008.ttf" : { + "installed_by" : [ + "fonts-myanmar" + ] + }, + "zelan.ttf" : { + "installed_by" : [ + "fonts-senamirmir-washra" + ] + }, + "zeldadxt.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "zenith.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "zephyrea.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "zephyreg.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "zerovelo.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "zirccube.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "zirconia.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "zoetrope.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "zoidal.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "zurklezo.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + }, + "zurklezs.ttf" : { + "installed_by" : [ + "fonts-aenigma" + ] + } + }, + "preamble" : { + "cargo" : "fonts", + "title" : "Fonts Available for Installation" + } +} diff --git a/data/init.d/virtual_facilities b/data/init.d/virtual_facilities new file mode 100644 index 0000000..0aabf16 --- /dev/null +++ b/data/init.d/virtual_facilities @@ -0,0 +1,13 @@ +# The list of known virtual facilities that init scripts may depend on. +# + +$all +$local_fs +$mail-transport-agent +$named +$network +$portmap +$remote_fs +$syslog +$time +$x-display-manager diff --git a/data/java/constants b/data/java/constants new file mode 100644 index 0000000..6dc1e14 --- /dev/null +++ b/data/java/constants @@ -0,0 +1,27 @@ +# This defines the maximal version of Java bytecode +# to make sure it runs on older JVM +# Byte code numbers: +# 45-49 -> Java1 +# 50 -> Java6 +# 51 -> Java7 +# 52 -> Java8 +# 53 -> Java9 +# 54 -> Java10 +# 55 -> Java11 +# 56 -> Java12 +# 57 -> Java13 +# 58 -> Java14 +# 59 -> Java15 +# 60 -> Java16 +# 61 -> Java17 +# 62 -> Java18 - highest version in Debian unstable +# 63 -> Java19 + +# current default in Debian +default-bytecode-version = 56 + +# highest known anywhere +highest-known-bytecode-version = 63 + +# The following should not change +lowest-known-bytecode-version = 45 diff --git a/data/menu-format/add-categories b/data/menu-format/add-categories new file mode 100644 index 0000000..841bc96 --- /dev/null +++ b/data/menu-format/add-categories @@ -0,0 +1,130 @@ +# This is a list of all Additional Categories for .desktop files. +# +# It is manually maintained; please keep it sorted. + +2DGraphics +3DGraphics +Accessibility +ActionGame +Adult +AdventureGame +Amusement +ArcadeGame +Archiving +Art +ArtificialIntelligence +Astronomy +AudioVideoEditing +Biology +BlocksGame +BoardGame +Building +Calculator +Calendar +CardGame +Chart +Chat +Chemistry +Clock +Compression +ComputerScience +ConsoleOnly +Construction +ContactManagement +Core +Database +DataVisualization +Debugger +DesktopSettings +Dialup +Dictionary +DiscBurning +Documentation +Economy +Electricity +Electronics +Email +Emulator +Engineering +Feed +FileManager +Filesystem +FileTools +FileTransfer +Finance +FlowChart +Geography +Geology +Geoscience +GNOME +GTK +GUIDesigner +HamRadio +HardwareSettings +History +Humanities +IDE +ImageProcessing +InstantMessaging +IRCClient +Java +KDE +KidsGame +Languages +Literature +LogicGame +Maps +Math +MedicalSoftware +Midi +Mixer +Monitor +Motif +Music +News +NumericalAnalysis +OCR +P2P +PackageManager +ParallelComputing +PDA +Photography +Physics +Player +Presentation +Printing +Profiling +ProjectManagement +Publishing +Qt +RasterGraphics +Recorder +RemoteAccess +RevisionControl +Robotics +RolePlaying +Scanning +Security +Sequencer +Shooter +Simulation +Spirituality +Sports +SportsGame +Spreadsheet +StrategyGame +Telephony +TelephonyTools +TerminalEmulator +TextEditor +TextTools +Translation +Tuner +TV +VectorGraphics +VideoConference +Viewer +WebBrowser +WebDevelopment +WordProcessor +XFCE diff --git a/data/menu-format/deprecated-desktop-keys b/data/menu-format/deprecated-desktop-keys new file mode 100644 index 0000000..b8d0ea5 --- /dev/null +++ b/data/menu-format/deprecated-desktop-keys @@ -0,0 +1,12 @@ +# deprecated desktop keys +BinaryPattern +Encoding +Extensions +FilePattern +MapNotify +MiniIcon +Protocols +SortOrder +SwallowExec +SwallowTitle +TerminalOptions diff --git a/data/menu-format/kde-desktop-keys b/data/menu-format/kde-desktop-keys new file mode 100644 index 0000000..a8ade9d --- /dev/null +++ b/data/menu-format/kde-desktop-keys @@ -0,0 +1,10 @@ +# KDE uses some additional keys that should start with X-KDE but don't for +# historical reasons. +Dev +DocPath +FSType +InitialPreference +MountPoint +ReadOnly +ServiceTypes +UnmountIcon diff --git a/data/menu-format/known-desktop-keys b/data/menu-format/known-desktop-keys new file mode 100644 index 0000000..82892b6 --- /dev/null +++ b/data/menu-format/known-desktop-keys @@ -0,0 +1,29 @@ +# from https://specifications.freedesktop.org/desktop-entry-spec/latest/ar01s06.html +# list of Recognized desktop entry keys +# please alpha sort +# +# do not delete entry but move to deprecated-desktop-keys +Actions +Categories +Comment +DBusActivatable +DesktopNames +Exec +GenericName +Hidden +Icon +Keywords +MimeType +Name +NoDisplay +NotShowIn +OnlyShowIn +Path +PrefersNonDefaultGPU +StartupNotify +StartupWMClass +Terminal +TryExec +Type +URL +Version diff --git a/data/menu-format/menu-sections b/data/menu-format/menu-sections new file mode 100644 index 0000000..4131548 --- /dev/null +++ b/data/menu-format/menu-sections @@ -0,0 +1,71 @@ +# Data file of all the valid sections a menu item (or submenu) can go in. +# +# Authoritative source of menu sections: +# https://www.debian.org/doc/packaging-manuals/menu-policy/ch2#s2.1 +# +# This file maps "root sections" to the valid sections in each root +# sections. +# +# Format: +# root-section[/section] +# +# Please keep it sorted. + +Applications/Accessibility +Applications/Amateur Radio +Applications/Data Management +Applications/Editors +Applications/Education +Applications/Emulators +Applications/File Management +Applications/Graphics +Applications/Mobile Devices +Applications/Network/Communication +Applications/Network/File Transfer +Applications/Network/Monitoring +Applications/Network/Web Browsing +Applications/Network/Web News +Applications/Office +Applications/Programming +Applications/Project Management +Applications/Science/Astronomy +Applications/Science/Biology +Applications/Science/Chemistry +Applications/Science/Data Analysis +Applications/Science/Electronics +Applications/Science/Engineering +Applications/Science/Geoscience +Applications/Science/Mathematics +Applications/Science/Medicine +Applications/Science/Physics +Applications/Science/Social +Applications/Shells +Applications/Sound +Applications/System/Administration +Applications/System/Hardware +Applications/System/Language Environment +Applications/System/Monitoring +Applications/System/Package Management +Applications/System/Security +Applications/Terminal Emulators +Applications/Text +Applications/TV and Radio +Applications/Video +Applications/Viewers +Applications/Web Development +Games/Action +Games/Adventure +Games/Blocks +Games/Board +Games/Card +Games/Puzzles +Games/Simulation +Games/Strategy +Games/Tools +Games/Toys +Help +Screen/Saving +Screen/Locking +Window Managers +FVWM Modules +Window Maker diff --git a/data/obsolete-sites/obsolete-sites b/data/obsolete-sites/obsolete-sites new file mode 100644 index 0000000..8353d69 --- /dev/null +++ b/data/obsolete-sites/obsolete-sites @@ -0,0 +1,24 @@ +# Known obsolete websites / hosters who closed down or have frozen +# content, one hostname per line. Subdomains will be matched, too. +# +# Please keep the file sorted alphabetically. + +alioth.debian.org +anonscm.debian.org +berlios.de +betavine.net +code.google.com +codehaus.org +codeplex.com +fedorahosted.org +freecode.com +freshmeat.net +git.debian.org +gitorious.org +gna.org +googlecode.com +rubyforge.org +search.cpan.org +sourceforge.jp +tigris.org +titanpad.com diff --git a/data/python/versions b/data/python/versions new file mode 100644 index 0000000..214a6dc --- /dev/null +++ b/data/python/versions @@ -0,0 +1,5 @@ +old-python2 = 2.7 +old-python3 = 3.5 + +ancient-python2 = 2.7 +ancient-python3 = 3.5 diff --git a/data/rules/deprecated-makefiles b/data/rules/deprecated-makefiles new file mode 100644 index 0000000..0d8d2f9 --- /dev/null +++ b/data/rules/deprecated-makefiles @@ -0,0 +1,12 @@ +# Manually maintained list of Makefiles that can be included from +# d/rules, but is also known to be deprecated. +# +# Please keep it sorted by file name. + +/usr/share/cdbs/1/class/perlmodule-vars.mk +/usr/share/cdbs/1/class/perlmodule.mk +/usr/share/cdbs/1/rules/dpatch.mk +/usr/share/cdbs/1/rules/simple-patchsys.mk +/usr/share/cdbs/1/rules/tarball.mk +/usr/share/dbs/dbs-build.mk +/usr/share/dbs/dpkg-arch.mk diff --git a/data/rules/known-makefiles b/data/rules/known-makefiles new file mode 100644 index 0000000..7b60df6 --- /dev/null +++ b/data/rules/known-makefiles @@ -0,0 +1,39 @@ +# Manually maintained list of known makefiles and their +# (lack of) targets. This is used to avoid assuming +# that (e.g.) the quilt makefile provides all needed +# targets. +# +# Syntax: +# +# <makefile>||[<target>[, <target2> ...]] +# +# + +# Variables only or providing non-standard targets +# (targets not mentioned in the policy at all) +/usr/share/cli-common/cli-nant.make|| +/usr/share/cli-common/cli.make|| +/usr/share/coq/coqvars.mk|| +/usr/share/dpkg/architecture.mk|| +/usr/share/dpkg/buildflags.mk|| +/usr/share/dpkg/default.mk|| +/usr/share/dpkg/pkg-info.mk|| +/usr/share/dpkg/vendor.mk|| +/usr/share/gcj/debian_defaults|| +/usr/share/hardening-includes/hardening.make|| +/usr/share/javahelper/java-vars.mk|| +/usr/share/libdbi-perl/perl-dbdabi.make|| +/usr/share/mpi-default-dev/debian_defaults|| +/usr/share/ocaml/ocamlinit.mk|| +/usr/share/ocaml/ocamlvars.mk|| +/usr/share/octave/debian/defs.make|| +/usr/share/pkg-kde-tools/makefiles/1/variables.mk|| +/usr/share/postgresql-common/pgxs_debian_control.mk|| +/usr/share/pycentral-data/pycentral.mk|| +/usr/share/python/python.mk|| +/usr/share/python3/python.mk|| + +# Makefiles with (possibly) relevant targets +/usr/share/quilt/quilt.make||patch, unpatch, $(QUILT_STAMPFN) +/usr/share/dpatch/dpatch.make||patch, unpatch +/usr/share/topgit/tg2quilt.mk||patch, unpatch 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..707f97b --- /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, 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 + diff --git a/data/shared-libs/hwcap-dirs b/data/shared-libs/hwcap-dirs new file mode 100644 index 0000000..ee6ff8e --- /dev/null +++ b/data/shared-libs/hwcap-dirs @@ -0,0 +1,90 @@ +# List of all known hwcap. +# +# Last updated: 2022-09-07 +# Generated by private/refresh-hwcap +# +# Lines to always be included: +# Keep: tls + +4xxmac +acpi +altivec +apic +arch_2_05 +arch_2_06 +booke +cellbe +clflush +cmov +cx8 +dfp +dts +efpdouble +efpsingle +eimm +esan3 +etf3enh +ev4 +ev5 +ev56 +ev6 +ev67 +flush +fpu +fxsr +g5 +highgprs +hpage +ht +i386 +i486 +i586 +i686 +ic_snoop +ldisp +loongson2e +loongson2f +mca +mmu +mmx +msa +mtrr +muldiv +notb +octeon +octeon2 +pa6t +pat +pbe +pge +pn +power4 +power5 +power5+ +power6x +ppc32 +ppc601 +ppc64 +pse36 +sep +smt +spe +ss +sse +sse2 +stbar +stfle +swap +tls +tm +ucache +ultra3 +v9 +v9v +v9v2 +vsx +z10 +z9-109 +z900 +z990 +zarch diff --git a/data/shared-libs/unknown-shared-library-exceptions b/data/shared-libs/unknown-shared-library-exceptions new file mode 100644 index 0000000..391a131 --- /dev/null +++ b/data/shared-libs/unknown-shared-library-exceptions @@ -0,0 +1,30 @@ +# Exceptions for pkg-config-references-unknown-shared-library, etc. +# +# Originally generated by: +# +# dpkg -L libc6-dev libgcc1 | sed -n -e 's@.*\/lib\([^\/]*\)\.so.*@\1@p' | sort + +anl +BrokenLocale +c +crypt +dl +gcc_s +m +mvec +nsl +nss_compat +nss_dns +nss_files +nss_hesiod +nss_nis +nss_nisplus +pthread +pthread-2.28 +resolv +rt +thread_db +util + +# Manually-added exceptions +gcc diff --git a/data/spelling/Makefile b/data/spelling/Makefile new file mode 100644 index 0000000..3c31861 --- /dev/null +++ b/data/spelling/Makefile @@ -0,0 +1,6 @@ +sort: sort-corrections sort-corrections-case sort-corrections-multiword + +sort-%: % + csplit --prefix $<- $< '/^$$/' + LC_ALL=en_US.UTF-8 sort -u $<-01 | cat $<-00 - > $< + rm -f $<-0[01] diff --git a/data/spelling/corrections b/data/spelling/corrections new file mode 100644 index 0000000..5e24d72 --- /dev/null +++ b/data/spelling/corrections @@ -0,0 +1,12453 @@ +# All spelling errors that have been observed "in the wild" in package +# descriptions are added here, on the grounds that if they occurred once they +# are more likely to occur again. +# +# Misspellings of "compatibility", "separate", and "similar" are particularly +# common. +# +# Be careful with corrections that involve punctuation, since the check is a +# bit rough with punctuation. For example, I had to delete the correction of +# "builtin" to "built-in". +# +# The format of each line is: +# mistake||correction +# +# Note that corrections involving multiple word mistakes or case errors +# should be included in the appropriate data file, rather than here. +# +# Please keep the list sorted using `make sort` in this directory. + +aaccessibility||accessibility +aaccession||accession +abailable||available +abandonded||abandoned +abandonned||abandoned +abandonning||abandoning +abbort||abort +abborted||aborted +abborting||aborting +abborts||aborts +abbrevation||abbreviation +abbrevations||abbreviations +abbriviation||abbreviation +abbriviations||abbreviations +abigious||ambiguous +abilties||abilities +abilty||ability +abitrate||arbitrate +abnormaly||abnormally +aboce||above +abolute||absolute +abount||about +abov||above +abreviate||abbreviate +abreviated||abbreviated +abreviates||abbreviates +abreviating||abbreviating +absense||absence +absodefly||absolute +absodeflyly||absolutely +absolate||absolute +absolately||absolutely +absolaute||absolute +absolautely||absolutely +absoleted||obsoleted +absoletely||absolutely +absolete||obsolete +absoliute||absolute +absoliutely||absolutely +absoloute||absolute +absoloutely||absolutely +absolte||absolute +absoltely||absolutely +absoltue||absolute +absoltuely||absolutely +absoluate||absolute +absoluately||absolutely +absoluely||absolutely +absoluet||absolute +absoluetly||absolutely +absolulte||absolute +absolultely||absolutely +absolune||absolute +absolunely||absolutely +absolure||absolute +absolurely||absolutely +absolut||absolute +absoluth||absolute +absoluthe||absolute +absoluthely||absolutely +absoluthly||absolutely +absolutley||absolutely +absolutly||absolutely +absolutlye||absolutely +absoluute||absolute +absoluutely||absolutely +absoluve||absolute +absoluvely||absolutely +absoolute||absolute +absoolutely||absolutely +absorbtion||absorption +absorve||absorb +absould||absolute +absouldly||absolutely +absoule||absolute +absoulely||absolutely +absouletely||absolutely +absoulete||obsolete +absoult||absolute +absoulte||absolute +absoultely||absolutely +absoultly||absolutely +absoulute||absolute +absoulutely||absolutely +absout||absolute +absoute||absolute +absoutely||absolutely +absoutly||absolutely +abstact||abstract +abstactly||abstractly +accapt||accept +accapted||accepted +accapts||accepts +acccept||accept +acccepted||accepted +acccepting||accepting +acccepts||accepts +acccess||access +acccessd||accessed +acccessed||accessed +acccesses||accesses +acccessibility||accessibility +acccessible||accessible +acccessing||accessing +acccession||accession +acccessor||accessor +acccessors||accessors +acccuracy||accuracy +acccurate||accurate +acccurately||accurately +acceleratoin||acceleration +accelleration||acceleration +accepect||accept +accepected||accepted +acceptible||acceptable +acces||access +accesible||accessible +accesing||accessing +accesnt||accent +accessable||accessible +accesss||access +accet||accept +accets||accepts +accidentaly||accidentally +accidential||accidental +accidentially||accidentally +accidentily||accidentally +accidently||accidentally +accidentually||accidentally +acciedential||accidental +acciednetally||accidentally +accient||accident +acciental||accidental +accoding||according +accodingly||accordingly +accomadate||accommodate +accomadated||accommodated +accomadates||accommodates +accomadating||accommodating +accommadate||accommodate +accommadates||accommodates +accommdated||accommodated +accomodate||accommodate +accomodates||accommodates +accomodation||accommodation +accompagned||accompanied +accompagnied||accompanied +accompagnies||accompanies +accompagniment||accompaniment +accompagning||accompanying +accompagny||accompany +accompagnying||accompanying +accoording||according +accoordingly||accordingly +accordint||according +accoring||according +accout||account +accquire||acquire +accquired||acquired +accquires||acquires +accquiring||acquiring +accracy||accuracy +accrate||accurate +accrding||according +accrdingly||accordingly +accroding||according +accrodingly||accordingly +accronym||acronym +accronyms||acronyms +accrording||according +accrose||across +accross||across +accumalte||accumulate +accumalted||accumulated +accumlate||accumulate +accumlated||accumulated +accumlates||accumulates +accumlating||accumulating +accuraccies||accuracies +accuraccy||accuracy +acessable||accessible +acess||access +acheive||achieve +acheived||achieved +acheives||achieves +acheiving||achieving +achitecture||architecture +achitectures||architectures +achive||achieve +achived||achieved +achives||achieves +achiving||achieving +achor||anchor +achored||anchored +achoring||anchoring +achors||anchors +acient||ancient +ACII||ASCII +acition||action +acitions||actions +acknoledge||acknowledge +acknoledged||acknowledged +acknoledges||acknowledges +acknoledging||acknowledging +acknowldegement||acknowledgement +acknowleding||acknowledging +acknowlege||acknowledge +acknowleged||acknowledged +acknowleges||acknowledges +acknowleging||acknowledging +ackowledge||acknowledge +ackowledged||acknowledged +acommodate||accommodate +acommodated||accommodated +acommodates||accommodates +acommodating||accommodating +acommpany||accompany +acommpanying||accompanying +acoording||according +acoordingly||accordingly +acording||according +acordingly||accordingly +acount||account +acounts||accounts +acqure||acquire +acqured||acquired +acqures||acquires +acquring||acquiring +actaul||actual +actaully||actually +activete||activate +actuaal||actual +actuaally||actually +actuak||actual +actuakly||actually +actualy||actually +actualyl||actually +actuionable||actionable +actuion||action +actully||actually +actusally||actually +acually||actually +acumulating||accumulating +acurate||accurate +acutally||actually +adapated||adapted +adapater||adapter +adapaters||adapters +adaquate||adequate +adaquately||adequately +adatper||adapter +adatpers||adapters +addd||add +addded||added +addding||adding +adddress||address +adddresses||addresses +addds||adds +addedd||added +addert||assert +adderted||asserted +addess||address +addessed||addressed +addesses||addresses +addessing||addressing +addional||additional +additionaly||additionally +additionnal||additional +additionnally||additionally +additonal||additional +additonally||additionally +addjust||adjust +addjusted||adjusted +addjusting||adjusting +addjusts||adjusts +addres||address +addresed||addressed +addreses||addresses +addresing||addressing +addressess||addresses +addresss||address +addresssed||addressed +addressses||addresses +addresssing||addressing +addtional||additional +addtionally||additionally +aditional||additional +aditionally||additionally +aditionaly||additionally +adjustmenet||adjustment +adminstration||administration +adminstrative||administrative +adminstrator||administrator +adminstrators||administrators +admissable||admissible +adressable||addressable +adress||address +adressed||addressed +adresses||addresses +adressing||addressing +adresss||address +adressses||addresses +advane||advance +advaned||advanced +advertisment||advertisement +advertisments||advertisements +adviced||advised +afecting||affecting +afer||after +afe||safe +affortable||affordable +affort||afford +afforts||affords +affraid||afraid +aforementionned||aforementioned +aformentioned||aforementioned +afterall||after all +agains||against +againts||against +agaist||against +aganist||against +aginst||against +agreemnet||agreement +agreemnets||agreements +agressive||aggressive +agressively||aggressively +agressiveness||aggressiveness +agressivity||aggressivity +agressor||aggressor +agresssive||aggressive +agrument||argument +agruments||arguments +agument||argument +aguments||arguments +aheared||adhered +aiffer||differ +aks||ask +albumns||albums +aleays||always +alegorical||allegorical +alghoritm||algorithm +alghoritmic||algorithmic +alghoritmically||algorithmically +alghoritms||algorithms +algohm||algorithm +algohmic||algorithmic +algohmically||algorithmically +algohms||algorithms +algoirthm||algorithm +algoirthmic||algorithmic +algoirthmically||algorithmically +algoirthms||algorithms +algoithm||algorithm +algoithmic||algorithmic +algoithmically||algorithmically +algoithms||algorithms +algolithm||algorithm +algolithmic||algorithmic +algolithmically||algorithmically +algolithms||algorithms +algoorithm||algorithm +algoorithmic||algorithmic +algoorithmically||algorithmically +algoorithms||algorithms +algoprithm||algorithm +algoprithmic||algorithmic +algoprithmically||algorithmically +algoprithms||algorithms +algorgithm||algorithm +algorgithmic||algorithmic +algorgithmically||algorithmically +algorgithms||algorithms +algorhithm||algorithm +algorhithmic||algorithmic +algorhithmically||algorithmically +algorhithms||algorithms +algorhitm||algorithm +algorhitmic||algorithmic +algorhitmically||algorithmically +algorhitms||algorithms +algorhtm||algorithm +algorhtmic||algorithmic +algorhtmically||algorithmically +algorhtms||algorithms +algorhythm||algorithm +algorhythmic||algorithmic +algorhythmically||algorithmically +algorhythms||algorithms +algorhytm||algorithm +algorhytmic||algorithmic +algorhytmically||algorithmically +algorhytms||algorithms +algorightm||algorithm +algorightmic||algorithmic +algorightmically||algorithmically +algorightms||algorithms +algorihm||algorithm +algorihmic||algorithmic +algorihmically||algorithmically +algorihms||algorithms +algorihtm||algorithm +algorihtmic||algorithmic +algorihtmically||algorithmically +algorihtms||algorithms +algorith||algorithm +algorithem||algorithm +algorithemic||algorithmic +algorithemically||algorithmically +algorithems||algorithms +algorithic||algorithmic +algorithically||algorithmically +algorithmical||algorithmically +algorithmm||algorithm +algorithmmic||algorithmic +algorithmmically||algorithmically +algorithmms||algorithms +algorithmn||algorithm +algorithmnic||algorithmic +algorithmnically||algorithmically +algorithmns||algorithms +algoriths||algorithms +algorithsm||algorithm +algorithsmic||algorithmic +algorithsmically||algorithmically +algorithsms||algorithms +algoritm||algorithm +algoritmic||algorithmic +algoritmically||algorithmically +algoritms||algorithms +algoroithm||algorithm +algoroithmic||algorithmic +algoroithmically||algorithmically +algoroithms||algorithms +algororithm||algorithm +algororithmic||algorithmic +algororithmically||algorithmically +algororithms||algorithms +algorothm||algorithm +algorothmic||algorithmic +algorothmically||algorithmically +algorothms||algorithms +algorrithm||algorithm +algorrithmic||algorithmic +algorrithmically||algorithmically +algorrithms||algorithms +algorritm||algorithm +algorritmic||algorithmic +algorritmically||algorithmically +algorritms||algorithms +algorthim||algorithm +algorthimic||algorithmic +algorthimically||algorithmically +algorthims||algorithms +algorthin||algorithm +algorthinic||algorithmic +algorthinically||algorithmically +algorthins||algorithms +algorthm||algorithm +algorthmic||algorithmic +algorthmically||algorithmically +algorthms||algorithms +algorthn||algorithm +algorthnic||algorithmic +algorthnically||algorithmically +algorthns||algorithms +algorthym||algorithm +algorthymic||algorithmic +algorthymically||algorithmically +algorthyms||algorithms +algorthyn||algorithm +algorthynic||algorithmic +algorthynically||algorithmically +algorthyns||algorithms +algortihm||algorithm +algortihmic||algorithmic +algortihmically||algorithmically +algortihms||algorithms +algortim||algorithm +algortimic||algorithmic +algortimically||algorithmically +algortims||algorithms +algortism||algorithm +algortismic||algorithmic +algortismically||algorithmically +algortisms||algorithms +algortithm||algorithm +algortithmic||algorithmic +algortithmically||algorithmically +algortithms||algorithms +algoruthm||algorithm +algoruthmic||algorithmic +algoruthmically||algorithmically +algoruthms||algorithms +algorwwithm||algorithm +algorwwithmic||algorithmic +algorwwithmically||algorithmically +algorwwithms||algorithms +algorythem||algorithm +algorythemic||algorithmic +algorythemically||algorithmically +algorythems||algorithms +algorythm||algorithm +algorythmic||algorithmic +algorythmically||algorithmically +algorythms||algorithms +algothitm||algorithm +algothitmic||algorithmic +algothitmically||algorithmically +algothitms||algorithms +algotighm||algorithm +algotighmic||algorithmic +algotighmically||algorithmically +algotighms||algorithms +algotihm||algorithm +algotihmic||algorithmic +algotihmically||algorithmically +algotihms||algorithms +algotirhm||algorithm +algotirhmic||algorithmic +algotirhmically||algorithmically +algotirhms||algorithms +algotithm||algorithm +algotithmic||algorithmic +algotithmically||algorithmically +algotithms||algorithms +algotrithm||algorithm +algotrithmic||algorithmic +algotrithmically||algorithmically +algotrithms||algorithms +alha||alpha +alhabet||alphabet +alhabetical||alphabetical +alhabetically||alphabetically +alhabeticaly||alphabetically +alhabets||alphabets +alhapet||alphabet +alhapetical||alphabetical +alhapetically||alphabetically +alhapeticaly||alphabetically +alhapets||alphabets +aligne||align +alignement||alignment +alignemnt||alignment +alignemnts||alignments +alignmenet||alignment +alignmenets||alignments +allign||align +alligned||aligned +alligning||aligning +allignment||alignment +allignments||alignments +alligns||aligns +allmost||almost +allocae||allocate +allocaes||allocates +allocaiing||allocating +allocaing||allocating +allocaion||allocation +allocaions||allocations +allocaite||allocate +allocaites||allocates +allocaiting||allocating +allocaition||allocation +allocaitions||allocations +allocaiton||allocation +allocaitons||allocations +allowd||allowed +allpication||application +allready||already +allso||also +allthough||although +alltogeher||altogether +alltogehter||altogether +alltogether||altogether +alltogetrher||altogether +alltogther||altogether +alltough||although +allways||always +alocate||allocate +alocated||allocated +alocates||allocates +alocating||allocating +alogirhtm||algorithm +alogirhtmic||algorithmic +alogirhtmically||algorithmically +alogirhtms||algorithms +alogirthm||algorithm +alogirthmic||algorithmic +alogirthmically||algorithmically +alogirthms||algorithms +alogrithm||algorithm +alogrithmic||algorithmic +alogrithmically||algorithmically +alogrithms||algorithms +alot||a lot +alow||allow +alows||allows +alpabet||alphabet +alpabetical||alphabetical +alpabetic||alphabetic +alpabets||alphabets +alphabeticaly||alphabetically +alphapeticaly||alphabetically +alrady||already +alraedy||already +alreay||already +alreayd||already +alterative||alternative +alteratives||alternatives +alternarive||alternative +alternativly||alternatively +althorithm||algorithm +althorithmic||algorithmic +althorithmically||algorithmically +althorithms||algorithms +altough||although +altought||although +alvorithm||algorithm +alvorithmic||algorithmic +alvorithmically||algorithmically +alvorithms||algorithms +alwas||always +alwast||always +alwasy||always +alwasys||always +alwyas||always +ambibuity||ambiguity +ambigious||ambiguous +ambigous||ambiguous +ammend||amend +ammended||amended +ammending||amending +ammendment||amendment +ammendments||amendments +ammends||amends +ammount||amount +amny||many +amoung||among +amout||amount +amoutn||amount +amoutns||amounts +amouts||amounts +analagous||analogous +analysator||analyzer +anarquism||anarchism +anarquist||anarchist +anevironment||environment +anevironments||environments +ang||and +anhoter||another +anlysis||analysis +anniversery||anniversary +annoncement||announcement +annonymous||anonymous +annouce||announce +annouced||announced +annoucement||announcement +annouces||announces +annoucing||announcing +announcment||announcement +announcments||announcements +anohter||another +anomolies||anomalies +anomoly||anomaly +anothe||another +anount||amount +ansestor||ancestor +ansestors||ancestors +antyhing||anything +anually||annually +anway||anyway +anwser||answer +anwsered||answered +anwsering||answering +anwsers||answers +anytghing||anything +anythign||anything +anytiem||anytime +anytihng||anything +anyting||anything +anytning||anything +anytrhing||anything +anytthing||anything +apendage||appendage +apend||append +apended||appended +apender||appender +apendices||appendices +apending||appending +apendix||appendix +aplication||application +apllied||applied +apllies||applies +aplly||apply +apllying||applying +apparence||appearance +apparenlty||apparently +apparenly||apparently +appearence||appearance +appeneded||appended +appered||appeared +appers||appears +appicability||applicability +appicable||applicable +appicaliton||application +appicant||applicant +appication||application +appications||applications +appication-specific||application-specific +appicative||applicative +applicaiton||application +applicaitons||applications +appliction||application +applictions||applications +appologies||apologies +appology||apology +appove||approve +appoved||approved +apppears||appears +appplication||application +appplications||applications +approch||approach +approched||approached +approches||approaches +approching||approaching +approopriate||appropriate +approoximately||approximately +appropiate||appropriate +appropriatedly||appropriately +appropriatly||appropriately +approprite||appropriate +approproate||appropriate +appropropriate||appropriate +approriate||appropriate +approriately||appropriately +approrpriate||appropriate +approrpriately||appropriately +approximatly||approximately +aprooved||approved +apropriate||appropriate +apropriately||appropriately +aproximate||approximate +aproximately||approximately +aproximation||approximation +aproximations||approximations +aqain||again +aqcuire||acquire +aqcuired||acquired +aqcuires||acquires +aqcuiring||acquiring +aquaint||acquaint +aquainted||acquainted +aquainting||acquainting +aquaints||acquaints +aquire||acquire +aquired||acquired +aquisition||acquisition +arbiatraily||arbitrarily +arbiatray||arbitrary +arbibtarily||arbitrarily +arbibtary||arbitrary +arbibtrarily||arbitrarily +arbibtrary||arbitrary +arbiitrarily||arbitrarily +arbiitrary||arbitrary +arbirarily||arbitrarily +arbirary||arbitrary +arbiratily||arbitrarily +arbiraty||arbitrary +arbirtarily||arbitrarily +arbirtary||arbitrary +arbirtrarily||arbitrarily +arbirtrary||arbitrary +arbitarily||arbitrarily +arbitary||arbitrary +arbitiarily||arbitrarily +arbitiary||arbitrary +arbitiraly||arbitrarily +arbitiray||arbitrary +arbitor||arbiter +arbitors||arbiters +arbitrailly||arbitrarily +arbitraily||arbitrarily +arbitraion||arbitration +arbitrairly||arbitrarily +arbitrairy||arbitrary +arbitral||arbitrary +arbitralily||arbitrarily +arbitrally||arbitrarily +arbitralrily||arbitrarily +arbitralry||arbitrary +arbitraly||arbitrary +arbitrarion||arbitration +arbitrarly||arbitrary +arbitratily||arbitrarily +arbitraton||arbitration +arbitratrily||arbitrarily +arbitratrion||arbitration +arbitratry||arbitrary +arbitraty||arbitrary +arbitray||arbitrary +arbitrer||arbiter +arbitrers||arbiters +arbitriarily||arbitrarily +arbitriary||arbitrary +arbitrily||arbitrarily +arbitrion||arbitration +arbitriraly||arbitrarily +arbitriray||arbitrary +arbitrition||arbitration +arbitror||arbiter +arbitrors||arbiters +arbitrtily||arbitrarily +arbitrty||arbitrary +arbitry||arbitrary +arbitryarily||arbitrarily +arbitryary||arbitrary +arbitual||arbitrary +arbitually||arbitrarily +arbitualy||arbitrary +arbituarily||arbitrarily +arbituary||arbitrary +arbiturarily||arbitrarily +arbiturary||arbitrary +arbort||abort +arborted||aborted +arborting||aborting +arborts||aborts +arbritrarily||arbitrarily +arbritrary||arbitrary +arbtirarily||arbitrarily +arbtirary||arbitrary +arbtrarily||arbitrarily +arbtrary||arbitrary +arbutrarily||arbitrarily +arbutrary||arbitrary +archiecture||architecture +archiectures||architectures +architechture||architecture +architechtures||architectures +architecturs||architectures +architecturse||architectures +architecure||architecture +architecures||architectures +architeture||architecture +architetures||architectures +archtecture||architecture +archtectures||architectures +archvie||archive +archvies||archives +archving||archiving +aready||already +are'nt||aren't +arent||aren't +argement||argument +argements||arguments +argemnt||argument +argemnts||arguments +argment||argument +argments||arguments +arguement||argument +arguements||arguments +argumemnt||argument +argumemnts||arguments +argumeng||argument +argumengs||arguments +aribtrarily||arbitrarily +aribtrary||arbitrary +arithmatic||arithmetic +arithmitic||arithmetic +aritmetic||arithmetic +arne't||aren't +aroung||around +arount||around +arraival||arrival +arranable||arrangeable +arrane||arrange +arraned||arranged +arranement||arrangement +arranements||arrangements +arranent||arrangement +arranents||arrangements +arranes||arranges +arrangable||arrangeable +arrangaeble||arrangeable +arrangaelbe||arrangeable +arrang||arrange +arrangd||arranged +arrangde||arranged +arrangemenet||arrangement +arrangemenets||arrangements +arrangent||arrangement +arrangents||arrangements +arrangmeent||arrangement +arrangmeents||arrangements +arrangmenet||arrangement +arrangmenets||arrangements +arrangment||arrangement +arrangments||arrangements +arrangnig||arranging +arrangs||arranges +arrangse||arranges +arrangt||arrangement +arrangteable||arrangeable +arrangte||arrange +arrangted||arranged +arrangtement||arrangement +arrangtements||arrangements +arrangtes||arranges +arrangting||arranging +arrangts||arrangements +arraning||arranging +arranment||arrangement +arranments||arrangements +arround||around +articaft||artifact +articafts||artifacts +artical||article +articals||articles +articat||artifact +articats||artifacts +artifical||artificial +artifically||artificially +artillary||artillery +arugment||argument +arugments||arguments +asbtraction||abstraction +assertation||assertion +assesmenet||assessment +assesment||assessment +assgin||assign +assgined||assigned +assgining||assigning +assginment||assignment +assginments||assignments +assgins||assigns +assiged||assigned +assigment||assignment +assigments||assignments +assignement||assignment +assignements||assignments +assignemnt||assignment +assignemnts||assignments +assignmenet||assignment +assignt||assign +assigntment||assignment +assiocate||associate +assiocated||associated +assiocates||associates +assiocating||associating +assiocation||association +assiociate||associate +assiociated||associated +assiociates||associates +assiociating||associating +assiociation||association +assistent||assistant +assocate||associate +assocated||associated +assocates||associates +assocating||associating +assocation||association +associcate||associate +associcated||associated +associcates||associates +associcating||associating +assosciate||associate +assosciated||associated +assosciates||associates +assosciating||associating +assosiacition||association +assosiacitions||associations +assosiate||associate +assosiated||associated +assosiates||associates +assosiating||associating +assotiated||associated +assuma||assume +assumad||assumed +assumang||assuming +assumas||assumes +assum||assume +assumbe||assume +assumbed||assumed +assumbes||assumes +assumbing||assuming +assumking||assuming +assumme||assume +assummed||assumed +assummes||assumes +assumming||assuming +assumne||assume +assumned||assumed +assumnes||assumes +assumning||assuming +assumong||assuming +assumotion||assumption +assumotions||assumptions +assums||assumes +assumse||assumes +assumtion||assumption +assumtions||assumptions +assumtpion||assumption +assumtpions||assumptions +assumu||assume +assumud||assumed +assumue||assume +assumued||assumed +assumues||assumes +assumuing||assuming +assumung||assuming +assumuption||assumption +assumuptions||assumptions +assumus||assumes +asthetic||aesthetic +asuming||assuming +asycronous||asynchronous +asynchonous||asynchronous +asynchonously||asynchronously +asynchronious||asynchronous +asyncronous||asynchronous +asyncronously||asynchronously +atomatically||automatically +atomical||atomic +atomicly||atomically +atribute||attribute +atributes||attributes +attachement||attachment +attachements||attachments +attatch||attach +attatched||attached +attatches||attaches +attatching||attaching +attatchment||attachment +attatchments||attachments +attched||attached +attemp||attempt +attemped||attempted +attemps||attempts +attemt||attempt +attemted||attempted +attemting||attempting +attemtp||attempt +attemtped||attempted +attemtping||attempting +attemtps||attempts +attemtpted||attempted +attemtpts||attempts +attemts||attempts +attibute||attribute +attibutes||attributes +attirbute||attribute +attirbutes||attributes +attmept||attempt +attosencond||attosecond +attosenconds||attoseconds +attribuite||attribute +attribuites||attributes +attribuition||attribution +attribye||attribute +attribyes||attributes +__attribyte__||__attribute__ +attribyte||attribute +attribytes||attributes +attrubite||attribute +attrubites||attributes +attrubte||attribute +attrubtes||attributes +attrubure||attribute +attrubures||attributes +attrubute||attribute +attrubutes||attributes +attrubyte||attribute +attrubytes||attributes +attruibutes||attributes +atttribute||attribute +atttributes||attributes +aunthenticate||authenticate +aunthenticated||authenticated +aunthenticates||authenticates +aunthenticating||authenticating +autenticate||authenticate +autenticated||authenticated +autenticates||authenticates +autenticating||authenticating +autentication||authentication +authecate||authenticate +authecated||authenticated +authecates||authenticates +authecating||authenticating +authecation||authentication +authecator||authenticator +authecators||authenticators +authenaticate||authenticate +authenaticated||authenticated +authenaticates||authenticates +authenaticating||authenticating +authenatication||authentication +authenaticator||authenticator +authenaticators||authenticators +authencate||authenticate +authencated||authenticated +authencates||authenticates +authencating||authenticating +authencation||authentication +authencator||authenticator +authencators||authenticators +authenciate||authenticate +authenciated||authenticated +authenciates||authenticates +authenciating||authenticating +authenciation||authentication +authenciator||authenticator +authenciators||authenticators +authencicate||authenticate +authencicated||authenticated +authencicates||authenticates +authencicating||authenticating +authencication||authentication +authencicator||authenticator +authencicators||authenticators +authencity||authenticity +authencticate||authenticate +authencticated||authenticated +authencticates||authenticates +authencticating||authenticating +authenctication||authentication +authencticator||authenticator +authencticators||authenticators +authendicate||authenticate +authendicated||authenticated +authendicates||authenticates +authendicating||authenticating +authendication||authentication +authendicator||authenticator +authendicators||authenticators +authenenticate||authenticate +authenenticated||authenticated +authenenticates||authenticates +authenenticating||authenticating +authenentication||authentication +authenenticator||authenticator +authenenticators||authenticators +authenfie||authenticate +authenfied||authenticated +authenfies||authenticates +authenfiing||authenticating +authenfiion||authentication +authenfior||authenticator +authenfiors||authenticators +authenicae||authenticate +authenicaed||authenticated +authenicaes||authenticates +authenicaing||authenticating +authenicaion||authentication +authenicaor||authenticator +authenicaors||authenticators +authenicate||authenticate +authenicated||authenticated +authenicates||authenticates +authenicating||authenticating +authenication||authentication +authenicator||authenticator +authenicators||authenticators +authenificate||authenticate +authenificated||authenticated +authenificates||authenticates +authenificating||authenticating +authenification||authentication +authenificator||authenticator +authenificators||authenticators +authenitcate||authenticate +authenitcated||authenticated +authenitcates||authenticates +authenitcating||authenticating +authenitcation||authentication +authenitcator||authenticator +authenitcators||authenticators +autheniticate||authenticate +autheniticated||authenticated +autheniticates||authenticates +autheniticating||authenticating +authenitication||authentication +autheniticator||authenticator +autheniticators||authenticators +authenricate||authenticate +authenricated||authenticated +authenricates||authenticates +authenricating||authenticating +authenrication||authentication +authenricator||authenticator +authenricators||authenticators +authenticaiton||authentication +authentification||authentication +auther||author +autherisation||authorisation +autherise||authorise +autherization||authorization +autherize||authorize +authers||authors +authethenticate||authenticate +authethenticated||authenticated +authethenticates||authenticates +authethenticating||authenticating +authethentication||authentication +authethenticator||authenticator +authethenticators||authenticators +authethicate||authenticate +authethicated||authenticated +authethicates||authenticates +authethicating||authenticating +authethication||authentication +authethicator||authenticator +authethicators||authenticators +autheticate||authenticate +autheticated||authenticated +autheticates||authenticates +autheticating||authenticating +authetication||authentication +autheticator||authenticator +autheticators||authenticators +authetnicate||authenticate +authetnicated||authenticated +authetnicates||authenticates +authetnicating||authenticating +authetnication||authentication +authetnicator||authenticator +authetnicators||authenticators +authetnticate||authenticate +authetnticated||authenticated +authetnticates||authenticates +authetnticating||authenticating +authetntication||authentication +authetnticator||authenticator +authetnticators||authenticators +authorative||authoritative +authoritive||authoritative +auto-destrcut||auto-destruct +auto-genrated||auto-generated +autogenrated||autogenerated +auto-genratet||auto-generated +autogenratet||autogenerated +auto-genration||auto-generation +autogenration||autogeneration +automaitcally||automatically +automaitc||automatic +automanifactured||automanufactured +automaticall||automatically +automaticaly||automatically +automaticalyl||automatically +automaticalyy||automatically +automaticlly||automatically +automaticly||automatically +automatize||automate +automatized||automated +automatizes||automates +auto-negatiotiation||auto-negotiation +autonegatiotiation||autonegotiation +auto-negatiotiations||auto-negotiations +autonegatiotiations||autonegotiations +auto-negoatiation||auto-negotiation +autonegoatiation||autonegotiation +auto-negoatiations||auto-negotiations +autonegoatiations||autonegotiations +auto-negoation||auto-negotiation +autonegoation||autonegotiation +auto-negoations||auto-negotiations +autonegoations||autonegotiations +auto-negociation||auto-negotiation +autonegociation||autonegotiation +auto-negociations||auto-negotiations +autonegociations||autonegotiations +auto-negogtiation||auto-negotiation +autonegogtiation||autonegotiation +auto-negogtiations||auto-negotiations +autonegogtiations||autonegotiations +auto-negoitation||auto-negotiation +autonegoitation||autonegotiation +auto-negoitations||auto-negotiations +autonegoitations||autonegotiations +auto-negoptionsotiation||auto-negotiation +autonegoptionsotiation||autonegotiation +auto-negoptionsotiations||auto-negotiations +autonegoptionsotiations||autonegotiations +auto-negosiation||auto-negotiation +autonegosiation||autonegotiation +auto-negosiations||auto-negotiations +autonegosiations||autonegotiations +auto-negotaiation||auto-negotiation +autonegotaiation||autonegotiation +auto-negotaiations||auto-negotiations +autonegotaiations||autonegotiations +auto-negotaition||auto-negotiation +autonegotaition||autonegotiation +auto-negotaitions||auto-negotiations +autonegotaitions||autonegotiations +auto-negotatiation||auto-negotiation +autonegotatiation||autonegotiation +auto-negotatiations||auto-negotiations +autonegotatiations||autonegotiations +auto-negotation||auto-negotiation +autonegotation||autonegotiation +auto-negotations||auto-negotiations +autonegotations||autonegotiations +auto-negothiation||auto-negotiation +autonegothiation||autonegotiation +auto-negothiations||auto-negotiations +autonegothiations||autonegotiations +auto-negotication||auto-negotiation +autonegotication||autonegotiation +auto-negotications||auto-negotiations +autonegotications||autonegotiations +auto-negotioation||auto-negotiation +autonegotioation||autonegotiation +auto-negotioations||auto-negotiations +autonegotioations||autonegotiations +auto-negotionation||auto-negotiation +autonegotionation||autonegotiation +auto-negotionations||auto-negotiations +autonegotionations||autonegotiations +auto-negotion||auto-negotiation +autonegotion||autonegotiation +auto-negotions||auto-negotiations +autonegotions||autonegotiations +auto-negotiotation||auto-negotiation +autonegotiotation||autonegotiation +auto-negotiotations||auto-negotiations +autonegotiotations||autonegotiations +auto-negotitaion||auto-negotiation +autonegotitaion||autonegotiation +auto-negotitaions||auto-negotiations +autonegotitaions||autonegotiations +auto-negotitation||auto-negotiation +autonegotitation||autonegotiation +auto-negotitations||auto-negotiations +autonegotitations||autonegotiations +auto-negotition||auto-negotiation +autonegotition||autonegotiation +auto-negotitions||auto-negotiations +autonegotitions||autonegotiations +auto-negoziation||auto-negotiation +autonegoziation||autonegotiation +auto-negoziations||auto-negotiations +autonegoziations||autonegotiations +autonymous||autonomous +autoonf||autoconf +autor||author +auto-realease||auto-release +autorealease||autorelease +auto-realeased||auto-released +autorisation||authorisation +autorization||authorization +autoropeat||autorepeat +autors||authors +auxilary||auxiliary +auxillary||auxiliary +auxilliary||auxiliary +avaiable||available +avaialable||available +avaialbale||available +avaialbe||available +avaialbel||available +avaialbility||availability +avaialble||available +avaible||available +avaiilable||available +availaable||available +availabable||available +availabal||available +availabale||available +availabality||availability +availabble||available +availabe||available +availabed||available +availabel||available +availabele||available +availabilty||availability +availabke||available +availabled||available +availablity||availability +availaiable||available +availaible||available +availailability||availability +availaility||availability +availalable||available +availalbe||available +availalble||available +availale||available +availaliable||available +availality||availability +availanle||available +availavble||available +availavility||availability +availavle||available +availbale||available +availbe||available +availble||available +availeable||available +availeble||available +availiable||available +availibility||availability +availibilty||availability +availible||available +availlable||available +avalable||available +avaliable||available +avalible||available +avaluated||evaluated +avaluate||evaluate +avaluates||evaluates +avaluating||evaluating +avaoidable||avoidable +avaoid||avoid +aviable||available +avilable||available +avod||avoid +avoded||avoided +avoding||avoiding +avods||avoids +avriants||variants +avriant||variant +aweful||awful +awefully||awfully +backgroud||background +backpsace||backspace +backslashs||backslashes +backupped||backed-up +bacup||backup +bahavior||behavior +bakup||backup +bakups||backups +baloon||balloon +baloons||balloons +bandwidht||bandwidth +bandwith||bandwidth +barycentic||barycentric +basicly||basically +batery||battery +beacause||because +beacuse||because +beause||because +becahse||because +becaouse||because +becase||because +becasue||because +becomming||becoming +becuase||because +beeing||being +beeings||beings +beetween||between +beetwen||between +befor||before +befure||before +beggin||begin +begginer||beginner +begginers||beginners +beggingin||beginning +begginging||beginning +begginig||beginning +beggining||beginning +begginnig||beginning +begginning||beginning +beggins||begins +begining||beginning +beginnning||beginning +behaivior||behaviour +behavoir||behavior +behavoirs||behaviors +behavriour||behaviour +behavriours||behaviours +beleive||believe +beleived||believed +beleives||believes +beleiving||believing +beliveable||believable +beliveably||believably +belive||believe +beliveble||believable +belivebly||believably +belived||believed +belives||believes +beliving||believing +bellow||below +benifit||benefit +benifite||benefit +benifited||benefited +benifitial||beneficial +benifits||benefits +benig||being +beteeen||between +beteen||between +bettery||better +betweeen||between +betwen||between +beween||between +bianries||binaries +biappicative||biapplicative +bidimentionnal||bidimensional +bi-langual||bi-lingual +bilangual||bilingual +bimillenia||bimillennia +bimillenial||bimillennial +bimillenium||bimillennium +bimontly||bimonthly +binay||binary +bitfileld||bitfield +bitfilelds||bitfields +bitwise-orring||bitwise-oring +bizzare||bizarre +blanace||balance +blindy||blindly +bloking||blocking +bnecause||because +bofore||before +boggus||bogus +bood||boot +boomark||bookmark +boomarks||bookmarks +bootsrap||bootstrap +bootstap||bootstrap +bootstapped||bootstrapped +bootstapping||bootstrapping +bootstaps||bootstraps +bouce||bounce +bouces||bounces +boudaries||boundaries +boudary||boundary +bouding||bounding +boudnaries||boundaries +boudnary||boundary +bouds||bounds +bouind||bound +bouinded||bounded +bouinding||bounding +bouinds||bounds +bounaaries||boundaries +bounaary||boundary +bounadaries||boundaries +bounadary||boundary +bounad||bound +bounaded||bounded +bounading||bounding +bounadries||boundaries +bounadry||boundary +bounads||bounds +bounardies||boundaries +bounardy||boundary +bounaries||boundaries +bounary||boundary +boun||bound +boundries||boundaries +boundry||boundary +bouned||bounded +boungaries||boundaries +boungary||boundary +boungin||bounding +boungind||bounding +bounhdaries||boundaries +bounhdary||boundary +bounidng||bounding +bouning||bounding +bounnd||bound +bounnded||bounded +bounnding||bounding +bounnds||bounds +bounradies||boundaries +bounrady||boundary +bounraies||boundaries +bounraries||boundaries +bounrary||boundary +bounray||boundary +bounsaries||boundaries +bounsary||boundary +bouns||bounds +bounsd||bounds +bountries||boundaries +bountry||boundary +bounudaries||boundaries +bounudary||boundary +bounus||bonus +bouund||bound +bouunded||bounded +bouunding||bounding +bouunds||bounds +bracese||braces +brancket||bracket +branckets||brackets +brane||brain +breif||brief +brige||bridge +briges||bridges +brighness||brightness +brnach||branch +brnaches||branches +brokeness||brokenness +broser||browser +brower||browser +browers||browsers +bufffer||buffer +bufffers||buffers +bugus||bogus +buid||build +buil||build +build-dependancies||build-dependencies +build-dependancy||build-dependency +build-dependencie||build-dependency +buildpackge||buildpackage +builter||builder +builters||builders +buipd||build +buit||built +buitin||builtin +buitins||builtins +buitlin||builtin +buitlins||builtins +buitton||button +buittons||buttons +buld||build +bulding||building +bulds||builds +bulid||build +buliding||building +bulids||builds +bulit||built +bulletted||bulleted +bultin||builtin +bumpded||bumped +bumpted||bumped +bundel||bundle +burocratic||bureaucratic +cacahe||cache +cacahes||caches +cacheed||cached +cacluate||calculate +cacluated||calculated +cacluates||calculates +cacluating||calculating +cacluation||calculation +cacluations||calculations +caculate||calculate +caculated||calculated +caculates||calculates +caculating||calculating +caculation||calculation +caculations||calculations +cahacter||character +cahacters||characters +cahange||change +cahanging||changing +caharacter||character +caharacters||characters +caharcter||character +caharcters||characters +cahc||cache +cahce||cache +cahced||cached +cahces||caches +cahche||cache +cahchedb||cachedb +cahches||caches +cahcing||caching +cahcs||caches +cahdidate||candidate +cahdidates||candidates +cahe||cache +cahes||caches +cahgne||change +cahhel||channel +cahhels||channels +cahined||chained +cahing||caching +cahining||chaining +cahnge||change +cahnged||changed +cahnges||changes +cahnnel||channel +cahnnels||channels +cahracter||character +cahracters||characters +cahr||char +cahrging||charging +cahrs||chars +calcualte||calculate +calcualted||calculated +calcualtes||calculates +calcualting||calculating +calender||calendar +calloed||called +calulate||calculate +calulated||calculated +calulates||calculates +calulating||calculating +calulation||calculation +calulations||calculations +canidate||candidate +canidates||candidates +canonalize||canonicalize +canonalized||canonicalized +canonalizes||canonicalizes +canonalizing||canonicalizing +capabilies||capabilities +capabilites||capabilities +capatibilities||capabilities +captable||capable +captial||capital +carefull||careful +carefuly||carefully +cariage||carriage +carreer||career +cartain||certain +casue||cause +casued||caused +casues||causes +catagories||categories +catagory||category +catched||caught +cbds||cdbs +ceate||create +ceated||created +ceates||creates +ceating||creating +cehck||check +cehcked||checked +cehcking||checking +cehcks||checks +cenario||scenario +centisencond||centisecond +centisenconds||centiseconds +certainity||certainty +certficate||certificate +certficates||certificates +certian||certain +certianly||certainly +certicate||certificate +certicates||certificates +certifacte||certificate +certifactes||certificates +certifcate||certificate +certifcates||certificates +certificat||certificate +chagned||changed +challanage||challenge +challange||challenge +challanges||challenges +changable||changeable +chaning||changing +chaninging||changing +channle||channel +channles||channels +channnel||channel +channnels||channels +characer||character +characers||characters +charachter||character +charachters||characters +charactear||character +charactears||characters +characte||character +characted||character +characteds||characters +characteer||character +characteers||characters +characteisation||characterisation +characteization||characterization +characteor||character +characteors||characters +charactes||characters +charactet||character +characteter||character +characteteristic||characteristic +characteteristics||characteristics +characteters||characters +charactetistic||characteristic +charactetistics||characteristics +charactetr||characters +charactetrs||characterss +charactets||characters +charactor||character +charactors||characters +charater||character +charaters||characters +charcter||character +chatacter||character +chatacters||characters +chcek||check +chceked||checked +chceking||checking +chceks||checks +checg||check +checged||checked +checkstum||checksum +checksuming||checksumming +checkum||checksum +checkums||checksums +chek||check +cheked||checked +cheking||checking +cheksum||checksum +cheksums||checksums +childern||children +childs||children +chnage||change +chnages||changes +choise||choice +choosen||chosen +chosing||choosing +chracter||character +chracters||characters +chunck||chunk +chuncked||chunked +chuncking||chunking +chuncks||chunks +chuncksize||chunksize +cicruit||circuit +cicruits||circuits +cilyndre||cylinder +cilyndres||cylinders +circut||circuit +circuts||circuits +ciricle||circle +ciricles||circles +ciricular||circular +ciricularise||circularise +ciricularize||circularize +cirilic||Cyrillic +cirillic||Cyrillic +ciritcal||critical +ciritcality||criticality +ciritcals||criticals +ciritc||critic +ciritcs||critics +ciritical||critical +ciriticality||criticality +ciriticals||criticals +ciritic||critic +ciritics||critics +cirucal||circular +cirucit||circuit +cirucits||circuits +ciruclar||circular +ciruclation||circulation +ciruclator||circulator +cirucmflex||circumflex +cirucular||circular +cirucumstance||circumstance +cirucumstances||circumstances +ciruit||circuit +ciruits||circuits +cirumstance||circumstance +cirumstances||circumstances +cjoice||choice +cjoices||choices +claaes||classes +claculate||calculate +clasified||classified +clasifies||classifies +clasify||classify +clasifying||classifying +classess||classes +classesss||classes +classs||class +classses||classes +cleaer||clear +cleanpu||cleanup +cleanpus||cleanups +clearified||clarified +clearifies||clarifies +clearify||clarify +clearifying||clarifying +cleean||clean +cleint||client +cleints||clients +cloack||cloak +cloacks||cloaks +clock_getttime||clock_gettime +closeing||closing +clossing||closing +coalacece||coalescence +coalace||coalesce +coalaced||coalesced +coalacence||coalescence +coalacing||coalescing +coalaesce||coalesce +coalaesced||coalesced +coalaescence||coalescence +coalaescing||coalescing +coalascece||coalescence +coalascence||coalescence +coalasece||coalescence +coalase||coalesce +coalased||coalesced +coalasence||coalescence +coalases||coalesces +coalasing||coalescing +coalcece||coalescence +coalcence||coalescence +coallate||collate +coallates||collates +coallating||collating +coallece||coalesce +coalleced||coalesced +coallecence||coalescence +coalleces||coalesces +coallecing||coalescing +coallee||coalesce +coalleed||coalesced +coalleence||coalescence +coallees||coalesces +coalleing||coalescing +coallesce||coalesce +coallesced||coalesced +coallesceing||coalescing +coallescence||coalescence +coallesces||coalesces +coallescing||coalescing +coallese||coalesce +coallesed||coalesced +coallesence||coalescence +coalleses||coalesces +coallesing||coalescing +coallesse||coalesce +coallessed||coalesced +coallessence||coalescence +coallesses||coalesces +coallessing||coalescing +coallision||collision +coallisions||collisions +coallition||coalition +coalscece||coalescence +coalsce||coalesce +coalsced||coalesced +coalscence||coalescence +coalscing||coalescing +coalsece||coalescence +coalseced||coalesced +coalsecense||coalescence +coalsence||coalescence +coefficent||coefficient +coefficents||coefficients +cofidence||confidence +cofigure||configure +cofigured||configured +cofigures||configures +cofiguring||configuring +cointain||contain +cointained||contained +cointains||contains +colaboration||collaboration +collaobrative||collaborative +collapsable||collapsible +collecion||collection +collecions||collections +collegue||colleague +collegues||colleagues +collumn||column +collumns||columns +colorfull||colorful +colorpsace||colorspace +colorpsaces||colorspaces +coloum||column +coloumn||column +coloumns||columns +coloums||columns +colourpsace||colourspace +colourpsaces||colourspaces +colum||column +colums||columns +comamnd||command +comamnd-line||command-line +comamndline||commandline +comamnds||commands +comand||command +comapnies||companies +comapny||company +comaptible||compatible +combatibility||compatibility +coment||comment +comented||commented +comenting||commenting +coments||comments +comit||commit +commad||command +commadn||command +commadn-line||command-line +commadnline||commandline +commadns||commands +commads||commands +comma-separeted||comma-separated +commenet||comment +commenetd||commented +commeneted||commented +commerical||commercial +comming||coming +comminucation||communication +commited||committed +commiter||committer +commiters||committers +commiting||committing +committ||commit +commma||comma +commmand||command +commmand-line||command-line +commmandline||commandline +commmands||commands +commma-separated||comma-separated +commment||comment +commmented||commented +commmenting||commenting +commments||comments +commmet||comment +commmets||comments +commmit||commit +commmited||committed +commmiting||committing +commmits||commits +commmitted||committed +commmitter||committer +commmitters||committers +commmitting||committing +commmon||common +commmunicate||communicate +commmunicated||communicated +commmunicates||communicates +commmunication||communication +commmunity||community +commna||comma +commnad||command +commnad-line||command-line +commnadline||commandline +commnads||commands +commnand||command +commnand-line||command-line +commnandline||commandline +commnands||commands +commna-separated||comma-separated +commnd||command +commnd-line||command-line +commndline||commandline +commnds||commands +commnent||comment +commnents||comments +commnetary||commentary +commnication||communication +commnt||comment +commnted||commented +commnuative||commutative +commnunicating||communicating +commnunication||communication +commnunity||community +commoditiy||commodity +commontly||commonly +commpact||compact +commpaction||compaction +commpare||compare +commpatibility||compatibility +commpatible||compatible +commpilation||compilation +commpile||compile +commpiled||compiled +commpiling||compiling +commplain||complain +commplete||complete +commpleted||completed +commpletely||completely +commpletes||completes +commpletion||completion +commplex||complex +commpliant||compliant +commplied||complied +commponent||component +commponents||components +commpound||compound +commpresd||compressed +commpresed||compressed +commpresion||compression +commpress||compress +commpressd||compressed +commpressed||compressed +commpression||compression +commpute||compute +commputed||computed +commputer||computer +commputes||computes +commtited||committed +commtted||committed +commuication||communication +communcation||communication +commutive||commutative +compability||compatibility +compagnion||companion +compagny||company +comparation||comparison +comparations||comparisons +compareing||comparing +compariable||comparable +comparied||compared +comparign||comparing +comparigon||comparison +comparigons||comparisons +compariing||comparing +comparion||comparison +comparions||comparisons +comparios||comparison +comparioss||comparisons +comparisaion||comparison +comparisaions||comparisons +comparisation||comparison +comparisations||comparisons +comparisement||comparison +comparisements||comparisons +comparisin||comparison +comparising||comparing +comparisins||comparisons +comparision||comparison +comparisions||comparisons +comparism||comparison +comparisment||comparison +comparisments||comparisons +comparisms||comparisons +comparisn||comparison +comparisns||comparisons +comparispon||comparison +comparispons||comparisons +comparission||comparison +comparissions||comparisons +comparisson||comparison +comparissons||comparisons +comparistion||comparison +comparistions||comparisons +compariston||comparison +comparistons||comparisons +comparition||comparison +comparitions||comparisons +comparititive||comparative +comparititively||comparatively +comparitive||comparative +comparitively||comparatively +comparitor||comparator +comparitors||comparators +comparizon||comparison +comparizons||comparisons +comparment||compartment +comparotor||comparator +comparotors||comparators +comparsion||comparison +comparsions||comparisons +compatabable||compatible +compatabiity||compatibility +compatabile||compatible +compatability||compatibility +compatabillity||compatibility +compatabilty||compatibility +compatabily||compatibility +compatable||compatible +compatablie||compatibly +compatablility||compatibility +compatablities||compatibilities +compatablitiy||compatibility +compatablity||compatibility +compatably||compatibly +compataibility||compatibility +compataible||compatible +compataility||compatibility +compatatbility||compatibility +compatatble||compatible +compatatible||compatible +compatator||comparator +compatators||comparators +compatbility||compatibility +compatiability||compatibility +compatibile||compatible +compatibiliy||compatibility +compatibilty||compatibility +compatiblities||compatibilities +compatiblity||compatibility +competetive||competitive +competion||completion +competions||completions +compilant||compliant +complaing||complaining +compleate||complete +compleated||completed +compleates||completes +compleating||completing +compleatly||completely +compleete||complete +compleeted||completed +compleetly||completely +compleetness||completeness +complelte||complete +complession||compression +complet||complete +completition||completion +completly||completely +completness||completeness +complianse||compliance +complient||compliant +complier||compiler +compliers||compilers +complile||compile +compliled||compiled +compliles||compiles +compliling||compiling +compling||compiling +complmenet||complement +componet||component +componets||components +compontent||component +compontents||components +compres||compress +compresed||compressed +compreses||compresses +compresing||compressing +compresion||compression +compsable||composable +comptible||compatible +comression||compression +comsumer||consumer +comsumers||consumers +comunication||communication +conain||contain +conained||contained +conainer||container +conainers||containers +conaines||contains +conaining||containing +conains||contains +conaint||contain +conainter||container +conatin||contain +conatined||contained +conatining||containing +conatins||contains +conbination||combination +conbinations||combinations +concatentate||concatenate +concatentated||concatenated +concatentates||concatenates +concatentating||concatenating +concatentation||concatenation +concatentations||concatenations +concatination||concatenation +concatinations||concatenations +concatonate||concatenate +concatonated||concatenated +concatonates||concatenates +concatonating||concatenating +concensus||consensus +concentic||concentric +concidered||considered +conciousness||consciousness +concurent||concurrent +concurently||concurrently +condident||confident +condidential||confidential +condifurable||configurable +condifuration||configuration +condifure||configure +condifured||configured +conditial||conditional +conditially||conditionally +conditianal||conditional +conditianally||conditionally +conditionaly||conditionally +conditionnaly||conditionally +condtiion||condition +condtiions||conditions +condtional||conditional +condtionally||conditionally +condtionals||conditionals +condtion||condition +condtioned||conditioned +condtions||conditions +condtitional||conditional +condtitionals||conditionals +condtition||condition +condtitions||conditions +conecct||connect +coneccted||connected +coneccting||connecting +conecction||connection +conecctions||connections +conecctivities||connectivities +conecctivity||connectivity +conecctor||connector +conecctors||connectors +coneccts||connects +conecept||concept +conecepts||concepts +conecjture||conjecture +conecjtures||conjectures +conecnt||connect +conecntrate||concentrate +conecntrated||concentrated +conecntrates||concentrates +conecnts||connects +conecpt||concept +conecpts||concepts +conect||connect +conected||connected +conecting||connecting +conection||connection +conections||connections +conectivities||connectivities +conectivity||connectivity +conector||connector +conectors||connectors +conects||connects +conecurrency||concurrency +conecutive||consecutive +coneect||connect +coneected||connected +coneecting||connecting +coneection||connection +coneections||connections +coneectivities||connectivities +coneectivity||connectivity +coneector||connector +coneectors||connectors +coneects||connects +conenct||connect +conencted||connected +conencting||connecting +conenction||connection +conenctions||connections +conenctivities||connectivities +conenctivity||connectivity +conenctor||connector +conenctors||connectors +conencts||connects +conenience||convenience +conenient||convenient +coneninece||convenience +coneninet||convenient +conent||content +conents||contents +coner||corner +conergence||convergence +conern||concern +conerning||concerning +coners||corners +conersion||conversion +conersions||conversions +conert||convert +conerted||converted +conervative||conservative +conet||connect +coneted||connected +coneting||connecting +conetion||connection +conetions||connections +conetivities||connectivities +conetivity||connectivity +conetnt||content +conetor||connector +conetors||connectors +conets||connects +conetxt||context +conetxts||contexts +conext||context +conexts||contexts +confict||conflict +conficted||conflicted +conficts||conflicts +confifurable||configurable +confifuration||configuration +confifure||configure +confifured||configured +configed||configured +configration||configuration +configrations||configurations +configuarble||configurable +configuare||configure +configuared||configured +configuarion||configuration +configuarions||configurations +configuartion||configuration +configuartions||configurations +configuation||configuration +configuations||configurations +configuraion||configuration +configuratoin||configuration +configuratoins||configurations +configuraton||configuration +configuratons||configurations +confimred||confirmed +confucing||confusing +confucion||confusion +confuction||conjunction +confudion||confusion +confue||confuse +confued||confused +confues||confuses +confugiration||configuration +confugirble||configurable +confugire||configure +confugired||configured +confugires||configures +confugiring||configuring +confugrable||configurable +confugration||configuration +confugre||configure +confugred||configured +confugres||configures +confugring||configuring +confugurable||configurable +confuguration||configuration +confugure||configure +confugured||configured +confugures||configures +confuguring||configuring +confuing||confusing +confunction||conjunction +confunder||confounder +confunse||confuse +confunsed||confused +confunses||confuses +confunsing||confusing +confurable||configurable +confuration||configuration +confure||configure +confured||configured +confures||configures +confuring||configuring +confurse||confuse +confursed||confused +confurses||confuses +confursing||confusing +confuze||confuse +confuzed||confused +confuzes||confuses +confuzing||confusing +confuzze||confuse +confuzzed||confused +confuzzes||confuses +confuzzing||confusing +congifurable||configurable +congifuration||configuration +congifure||configure +congifured||configured +conincide||coincide +conincidence||coincidence +conincident||coincident +conincides||coincides +coninciding||coinciding +coninient||convenient +coninstallable||coinstallable +coninuation||continuation +coninue||continue +coninues||continues +coninuity||continuity +coninuous||continuous +conjuction||conjunction +conneciton||connection +connecitons||connections +connectinos||connections +connnect||connect +connnected||connected +connnecting||connecting +connnection||connection +connnections||connections +connnects||connects +connot||cannot +conrtib||contrib +consequtive||consecutive +consequtively||consecutively +considderation||consideration +considder||consider +considdered||considered +considdering||considering +consifer||consider +consifered||considered +consisent||consistent +consisently||consistently +consistancy||consistency +consistant||consistent +consistenly||consistently +consitency||consistency +consituent||constituent +consituents||constituents +consitute||constitute +consituted||constituted +consitutes||constitutes +consituting||constituting +consitution||constitution +consitutuent||constituent +consitutuents||constituents +consitutute||constitute +consitututed||constituted +consitututes||constitutes +consitututing||constituting +consonent||consonant +consonents||consonants +constraintes||constraints +constrast||contrast +constrasts||contrasts +constrcut||construct +constrcuted||constructed +constrcution||construction +constrcutor||constructor +constrcutors||constructors +constrcuts||constructs +constructred||constructed +constuctor||constructor +constuctors||constructors +containe||contained +containes||contains +containg||containing +containt||contain +containted||contained +containter||container +containting||containing +containts||contains +contaisn||contains +contan||contain +contaned||contained +contaning||containing +contans||contains +contein||contain +conteined||contained +conteining||containing +conteins||contains +contence||contents +contentended||contended +content-negatiotiation||content-negotiation +content-negoatiation||content-negotiation +content-negoation||content-negotiation +content-negociation||content-negotiation +content-negogtiation||content-negotiation +content-negoitation||content-negotiation +content-negoptionsotiation||content-negotiation +content-negosiation||content-negotiation +content-negotaiation||content-negotiation +content-negotaition||content-negotiation +content-negotatiation||content-negotiation +content-negotation||content-negotiation +content-negothiation||content-negotiation +content-negotication||content-negotiation +content-negotioation||content-negotiation +content-negotionation||content-negotiation +content-negotion||content-negotiation +content-negotiotation||content-negotiation +content-negotitaion||content-negotiation +content-negotitation||content-negotiation +content-negotition||content-negotiation +content-negoziation||content-negotiation +contermporaneous||contemporaneous +contian||contain +contianed||contained +contianer||container +contianers||containers +contianing||containing +contians||contains +contigious||contiguous +continouity||continuity +continous||continuous +continously||continuously +continueing||continuing +continus||continuous +continuse||continues +continusly||continuously +continuting||continuing +contoller||controller +contollers||controllers +contraciction||contradiction +contracictions||contradictions +contracition||contradiction +contracitions||contradictions +contraints||constraints +contraveining||contravening +contributer||contributor +contributers||contributors +contries||countries +controlable||controllable +controled||controlled +controler||controller +controlers||controllers +controling||controlling +controll||control +controlls||controls +contruct||construct +contructed||constructed +contructing||constructing +contruction||construction +contructions||constructions +contructor||constructor +contructors||constructors +contructs||constructs +contry||country +convenince||convenience +converion||conversion +converions||conversions +conversly||conversely +converstion||conversion +converstions||conversions +convertable||convertible +convertion||conversion +convertions||conversions +convesion||conversion +convesions||conversions +convet||convert +conveted||converted +conveting||converting +convets||converts +convienient||convenient +convieniently||conveniently +conviguration||configuration +convigure||configure +convination||combination +convineance||convenience +convineances||conveniences +convine||combine +convined||convinced +convineient||convenient +convinence||convenience +convinences||conveniences +convinent||convenient +convinently||conveniently +conviniance||convenience +conviniances||conveniences +convinience||convenience +conviniences||conveniences +conviniency||convenience +conviniencys||conveniences +convinient||convenient +conviniently||conveniently +convining||combining +convinve||convince +convinved||convinced +convinving||convincing +convirted||converted +convirting||converting +convised||convinced +coodinate||coordinate +coodinates||coordinates +coopearte||cooperate +coopeartes||cooperates +coordindate||coordinate +coordindates||coordinates +coordine||coordinate +coordines||coordinates +coording||according +coordingate||coordinate +coordingates||coordinates +coordingly||accordingly +coordiniate||coordinate +coordiniates||coordinates +coordinite||coordinate +coordinites||coordinates +coordinnate||coordinate +coordinnates||coordinates +coordintae||coordinate +coordintaes||coordinates +coordintate||coordinate +coordintates||coordinates +coordinte||coordinate +coordintes||coordinates +copeing||copying +coprright||copyright +copyrigth||copyright +copyrigthed||copyrighted +copyrigths||copyrights +copyritght||copyright +copyritghted||copyrighted +copyritghts||copyrights +corected||corrected +corelate||correlate +corelated||correlated +corelates||correlates +corerct||correct +corerctly||correctly +corespond||correspond +coresponded||corresponded +corespondence||correspondence +coresponding||corresponding +coresponds||corresponds +correclty||correctly +correctnes||correctness +correect||correct +correectly||correctly +correlatd||correlated +correllation||correlation +correllations||correlations +correnspond||correspond +corrensponded||corresponded +corrensponding||corresponding +corrensponds||corresponds +correponding||corresponding +correponds||corresponds +corresond||correspond +corresonded||corresponded +corresonding||corresponding +corresonds||corresponds +correspoding||corresponding +correspondance||correspondence +correspondes||corresponds +corresponing||corresponding +corresponsing||corresponding +corretly||correctly +corrolated||correlated +corrolates||correlates +corrolation||correlation +corrolations||correlations +corsor||cursor +cotnain||contain +cotnained||contained +cotnainer||container +cotnainers||containers +cotnaining||containing +cotnains||contains +cotrol||control +cotrolled||controlled +cotrolling||controlling +cotrols||controls +coudn't||couldn't +coul||could +could'nt||couldn't +could't||couldn't +coult||could +countour||contour +countours||contours +cource||course +couter||counter +coutner||counter +coutners||counters +coverted||converted +coverting||converting +covriance||covariance +covriate||covariate +covriates||covariates +coypright||copyright +__cpluspus||__cplusplus +__cpusplus||__cplusplus +creationg||creating +creatre||create +creatred||created +credintial||credential +credintials||credentials +cretae||create +cretaed||created +cretaes||creates +cretaing||creating +cricital||critical +crirical||critical +critcial||critical +critera||criteria +criterias||criteria +criticial||critical +criticially||critically +cross-commpilation||cross-compilation +cross-orgin||cross-origin +crsytal||crystal +crsytallographic||crystallographic +crtical||critical +cryptocraphic||cryptographic +ctificates||certificates +cuase||cause +cuased||caused +cuases||causes +cuasing||causing +cummulative||cumulative +curently||currently +curiousities||curiosities +curiousity||curiosity +curiousity's||curiosity's +currectly||correctly +curren||current +currious||curious +currnt||current +currntly||currently +currupt||corrupt +currupted||corrupted +curruption||corruption +curruptions||corruptions +custome||custom +cymk||CMYK +dafault||default +dafualt||default +dafualted||defaulted +dafualts||defaults +damge||damage +dammage||damage +dammages||damages +databas||database +databse||database +data-strcuture||data-structure +datastrcuture||datastructure +data-strcutures||data-structures +datastrcutures||datastructures +datatbase||database +datatbases||databases +datatgram||datagram +datatgrams||datagrams +datatore||datastore +datatores||datastores +datatpe||datatype +datatpes||datatypes +datatpye||datatype +datatpyes||datatypes +datatset||dataset +datatsets||datasets +datatstructure||datastructure +datatstructures||datastructures +datattype||datatype +datattypes||datatypes +datatye||datatype +datatyep||datatype +datatyepe||datatype +datatyepes||datatypes +datatyeps||datatypes +datatyes||datatypes +datatyoe||datatype +datatyoes||datatypes +datatytpe||datatype +datatytpes||datatypes +deaemon||daemon +deafault||default +deafualt||default +deafualts||defaults +deafult||default +deafulted||defaulted +deafults||defaults +deamand||demand +deamanding||demanding +deamands||demands +deambigate||disambiguate +deambigates||disambiguates +deambigation||disambiguation +deambiguage||disambiguate +deambiguages||disambiguates +deambiguate||disambiguate +deambiguates||disambiguates +deambiguation||disambiguation +deamiguate||disambiguate +deamiguates||disambiguates +deamiguation||disambiguation +deamon||daemon +deamonified||daemonified +deamonisation||daemonisation +deamonise||daemonise +deamonised||daemonised +deamonises||daemonises +deamonising||daemonising +deamonization||daemonization +deamonize||daemonize +deamonized||daemonized +deamonizes||daemonizes +deamonizing||daemonizing +deamons||daemons +deatch||detach +deatched||detached +deatches||detaches +deatching||detaching +deauthenication||deauthentication +debain||Debian +debehlper||debhelper +debgu||debug +debgug||debug +debguging||debugging +debhlper||debhelper +debiab||Debian +Debiab||Debian +debia||Debian +debians||Debian's +debloking||deblocking +debugginf||debugging +debuging||debugging +decalared||declared +decalare||declare +decalares||declares +decalaring||declaring +decendant||descendant +decendentant||descendant +decendentants||descendants +decendent||descendent +decendents||descendents +decidated||dedicated +decidate||dedicate +decidates||dedicates +deciedd||decided +decied||decided +decie||decide +decieded||decided +deciede||decide +deciedes||decides +decieding||deciding +decieds||decides +deciemal||decimal +decies||decides +decieved||deceived +decieve||deceive +decieves||deceives +decieving||deceiving +decison||decision +declard||declared +declarded||declared +declaritive||declarative +declaritively||declaratively +declarnig||declaring +declars||declares +declartated||declared +declartation||declaration +declartations||declarations +declartative||declarative +declartator||declarator +declartators||declarators +declarted||declared +declartion||declaration +declartions||declarations +declartiuon||declaration +declartiuons||declarations +declartiuve||declarative +declartive||declarative +declartor||declarator +declartors||declarators +declatation||declaration +declatations||declarations +declated||declared +declation||declaration +declations||declarations +declatory||declaratory +decleration||declaration +decodded||decoded +decodding||decoding +decomissioned||decommissioned +decomissioning||decommissioning +decommissionn||decommission +decommissionned||decommissioned +decommpress||decompress +decompres||decompress +decompresed||decompressed +decompreses||decompresses +decompresing||decompressing +deconstrcutor||deconstructor +decorrellation||decorrelation +decremenetd||decremented +decremenet||decrement +decremeneted||decremented +decribed||described +decribe||describe +decribes||describes +decribing||describing +decription||description +decriptions||descriptions +decriptor||descriptor +decriptors||descriptors +decrmenetd||decremented +decrmenet||decrement +decrmeneted||decremented +decrpt||decrypt +decrpted||decrypted +decrption||decryption +decsriptor||descriptor +decsriptors||descriptors +decstiption||description +decstiptions||descriptions +de-duplacated||de-duplicated +deduplacated||deduplicated +de-duplacate||de-duplicate +deduplacate||deduplicate +de-duplacates||de-duplicates +deduplacates||deduplicates +de-duplacation||de-duplication +deduplacation||deduplication +de-duplacted||de-duplicated +deduplacted||deduplicated +de-duplacte||de-duplicate +deduplacte||deduplicate +de-duplactes||de-duplicates +deduplactes||deduplicates +de-duplaction||de-duplication +deduplaction||deduplication +de-duplaicated||de-duplicated +deduplaicated||deduplicated +de-duplaicate||de-duplicate +deduplaicate||deduplicate +de-duplaicates||de-duplicates +deduplaicates||deduplicates +de-duplaication||de-duplication +deduplaication||deduplication +de-duplated||de-duplicated +deduplated||deduplicated +de-duplate||de-duplicate +deduplate||deduplicate +de-duplates||de-duplicates +deduplates||deduplicates +de-duplation||de-duplication +deduplation||deduplication +dedupliated||deduplicated +dedupliate||deduplicate +deelte||delete +deendencies||dependencies +deendency||dependency +defailt||default +defalt||default +defaulat||default +defaulats||defaults +defauld||default +defaul||default +defaulds||defaults +defauled||defaulted +defaule||default +defaules||defaults +defaulf||default +defaulfs||defaults +defaulg||default +defaulgs||defaults +defaulh||default +defaulhs||defaults +defauling||defaulting +defaulit||default +defaulits||defaults +defaulkt||default +defaulkts||defaults +defaull||default +defaulls||defaults +defaullt||default +defaullts||defaults +defaulr||default +defaulrs||defaults +defaulrt||default +defaulrts||defaults +defauls||defaults +defaulst||defaults +defauly||default +defaulys||defaults +defaulz||default +defaut||default +defautl||default +defautled||defaulted +defautling||defaulting +defautls||defaults +defautlt||default +defautly||default +defenition||definition +defenitions||definitions +defered||deferred +deffered||deferred +defiend||defined +defiened||defined +definate||definite +definately||definitely +definining||defining +defininition||definition +defininitions||definitions +definitly||definitely +definitons||definitions +defintion||definition +defintions||definitions +defition||definition +defitions||definitions +defninition||definition +defninitions||definitions +defqault||default +de-fualt||default +defualt||default +defualtdict||defaultdict +de-fualts||defaults +defualts||defaults +defult||default +degenarated||degenerated +degenracy||degeneracy +degenrated||degenerated +degenratet||degenerated +degreee||degree +degreeee||degree +degreeees||degrees +degreees||degrees +deinitailse||deinitialise +deinitailze||deinitialize +deivce||device +deivces||devices +dekstop||desktop +dekstops||desktops +delared||declared +delare||declare +delares||declares +delaring||declaring +delate||delete +delemiter||delimiter +deleteed||deleted +deleteing||deleting +delets||deletes +delgated||delegated +delgate||delegate +delgates||delegates +delgating||delegating +delgation||delegation +delgations||delegations +delgator||delegator +delgators||delegators +delimeter||delimiter +delimeters||delimiters +delimitiaion||delimitation +delimitiaions||delimitations +delimitiation||delimitation +delimitiations||delimitations +delimitied||delimited +delimitier||delimiter +delimitiers||delimiters +delimitiing||delimiting +delimitimg||delimiting +delimition||delimitation +delimitions||delimitations +delimitis||delimits +delimititation||delimitation +delimititations||delimitations +delimitited||delimited +delimititer||delimiter +delimititers||delimiters +delimititing||delimiting +delivative||derivative +delivatives||derivatives +delted||deleted +delte||delete +delting||deleting +deltion||deletion +demoninator||denominator +demoninators||denominators +demostrated||demonstrated +demostrate||demonstrate +demostrates||demonstrates +demostrating||demonstrating +deoes||does +deoesn't||doesn't +depdence||dependence +depdencente||dependence +depdencentes||dependences +depdences||dependences +depdencies||dependencies +depdency||dependency +depdendancies||dependencies +depdendancy||dependency +depdendant||dependent +depdendants||dependents +depdend||depend +depdended||depended +depdendence||dependence +depdendences||dependences +depdendencies||dependencies +depdendency||dependency +depdendent||dependent +depdendents||dependents +depden||depend +depdendet||dependent +depdendets||dependents +depdending||depending +depdends||depends +depdenence||dependence +depdenences||dependences +depdenencies||dependencies +depdenency||dependency +depdenent||dependent +depdenents||dependents +depdening||depending +depdenncies||dependencies +depdenncy||dependency +depdens||depends +depdent||dependent +depdents||dependents +depedencies||dependencies +depedency||dependency +depencies||dependencies +depency||dependency +dependcies||dependencies +dependcy||dependency +dependecies||dependencies +dependecy||dependency +dependencied||dependency +dependencie||dependency +dependenciens||dependencies +dependend||dependent +dependncies||dependencies +dependncy||dependency +depenedecies||dependencies +depenedecy||dependency +depenencies||dependencies +depenency||dependency +depenendecies||dependencies +depenendecy||dependency +depenendence||dependence +depenendencies||dependencies +depenendency||dependency +deploied||deployed +deploiment||deployment +deploiments||deployments +deploymenet||deployment +deploymenets||deployments +depracated||deprecated +depreacted||deprecated +depreacte||deprecate +deprectated||deprecated +deprectate||deprecate +deprectates||deprecates +deprectating||deprecating +deprected||deprecated +depricated||deprecated +depricate||deprecate +depricates||deprecates +depricating||deprecating +derefenced||dereferenced +derefencing||dereferencing +derefernced||dereferenced +derefernce||dereference +dereferncence||dereference +dereferncencer||dereferencer +dereferncencers||dereferencers +dereferncences||dereferences +dereferncer||dereferencer +dereferncers||dereferencers +derefernces||dereferences +dereferncing||dereferencing +de-registeres||de-registers +deregisteres||deregisters +deregiter||deregister +deregiters||deregisters +derevative||derivative +derevatives||derivatives +derivaties||derivatives +derivitive||derivative +derivitives||derivatives +desactivate||deactivate +descibed||described +descibe||describe +descibes||describes +descibing||describing +descided||decided +descide||decide +descides||decides +desciding||deciding +desciptor||descriptor +desciptors||descriptors +desciribed||described +desciribe||describe +desciribes||describes +desciribing||describing +desciription||description +desciriptions||descriptions +descrie||describe +descriptior||descriptor +descriptiors||descriptors +descripton||description +descriptons||descriptions +descriptuve||descriptive +descrition||description +descritpion||description +descritpions||descriptions +descritpiton||description +descritpitons||descriptions +descritpor||descriptor +descritpors||descriptors +descritpr||descriptor +descritpro||descriptor +descritpros||descriptors +descritprs||descriptors +descritption||description +descritptions||descriptions +descritptive||descriptive +descritptor||descriptor +descritptors||descriptors +descrybe||describe +descrybing||describing +descryption||description +descryptions||descriptions +desctiptor||descriptor +desctiptors||descriptors +descvription||description +descvriptions||descriptions +desepears||disappears +desgined||designed +desination||destination +desinations||destinations +desireable||desirable +desision||decision +desisions||decisions +deskop||desktop +deskops||desktops +desltop||desktop +desltops||desktops +desparate||desperate +desparately||desperately +desribed||described +desribe||describe +desribes||describes +desribing||describing +desription||description +desriptions||descriptions +desriptor||descriptor +desriptors||descriptors +desscribe||describe +desscribing||describing +destiantion||destination +destiantions||destinations +destory||destroy +destoryed||destroyed +destorying||destroying +destorys||destroys +destrcut||destruct +destrcuted||destructed +destrcutor||destructor +destrcutors||destructors +destroi||destroy +destroied||destroyed +destroing||destroying +destrois||destroys +destry||destroy +destryed||destroyed +destryer||destroyer +destrying||destroying +destryiong||destroying +destryoed||destroyed +destryoing||destroying +destryong||destroying +destrys||destroys +desturtor||destructor +desturtors||destructors +detabase||database +detailled||detailed +detatch||detach +detatched||detached +detatches||detaches +detatching||detaching +detction||detection +detemined||determined +detemine||determine +detemines||determines +detemining||determining +determing||determining +deterministinc||deterministic +determins||determines +determinstically||deterministically +determinstic||deterministic +detremining||determining +detroy||destroy +detroyed||destroyed +detroying||destroying +detroys||destroys +deubug||debug +deubuging||debugging +devce||device +devcent||decent +develoment||development +develoments||developments +develope||develop +developement||development +developements||developments +developp||develop +developped||developed +developpe||develop +developpement||development +developper||developer +developpers||developers +developpment||development +develpment||development +deveolpment||development +deverloper||developer +deverlopers||developers +devided||divided +devide||divide +devides||divides +deviding||dividing +devirtualisaion||devirtualisation +devirtualisaiton||devirtualisation +devirtualizaion||devirtualization +devirtualizaiton||devirtualization +devirutalisation||devirtualisation +devirutalised||devirtualised +devirutalise||devirtualise +devirutalization||devirtualization +devirutalized||devirtualized +devirutalize||devirtualize +devloped||developed +devloper||developer +devlopers||developers +devloping||developing +devlopment||development +devlopper||developer +devloppers||developers +devritualisation||devirtualisation +devritualization||devirtualization +dgetttext||dgettext +diabled||disabled +diable||disable +diabler||disabler +diablers||disablers +diables||disables +diabling||disabling +diaciritc||diacritic +diaciritcs||diacritics +diagnotic||diagnostic +diagnotics||diagnostics +dialig||dialog +dialigs||dialogs +dianostic||diagnostic +dictioanries||dictionaries +dictioanry||dictionary +dictionay||dictionary +dictionnaries||dictionaries +dictionnary||dictionary +did'nt||didn't +didnt'||didn't +didnt||didn't +diferent||different +diferently||differently +diffcult||difficult +diffculties||difficulties +diffculty||difficulty +differance||difference +differances||differences +differant||different +differantiate||differentiate +differantiation||differentiation +differantiator||differentiator +differantion||differentiation +differate||differentiate +differenciated||differentiated +differenciate||differentiate +differenciates||differentiates +differenciating||differentiating +differents||different +differnce||difference +differnces||differences +differnciate||differentiate +differnec||difference +differnece||difference +differneces||differences +differnecs||differences +differnence||difference +differnences||differences +differnencing||differencing +differnent||different +differnet||different +differnetiated||differentiated +differnetiate||differentiate +differnetly||differently +differnt||different +differntiable||differentiable +differntial||differential +differntials||differentials +differntiated||differentiated +differntiate||differentiate +differntiates||differentiates +differntiating||differentiating +differntly||differently +differnty||different +differrent||different +difficutl||difficult +difficutly||difficulty +diffrent||different +diffrential||differential +diffrentiated||differentiated +diffrentiate||differentiate +diffrently||differently +diffrents||different +difinition||definition +difinitions||definitions +Digial||Digital +digitial||digital +dimenional||dimensional +dimenionalities||dimensionalities +dimenionality||dimensionality +dimenion||dimension +dimenionsal||dimensional +dimenionsalities||dimensionalities +dimenionsality||dimensionality +dimenions||dimensions +dimentional||dimensional +dimention||dimension +dimentionnal||dimensional +dimentionnals||dimensional +dimentions||dimensions +dinamically||dynamically +dinamicly||dynamically +diplay||display +diplayed||displayed +diplaying||displaying +diplays||displays +dirctories||directories +dirctory||directory +direcories||directories +direcory||directory +direcotries||directories +direcotry||directory +directd||directed +directgories||directories +directgory||directory +directoies||directories +directores||directories +directorys||directories +directoy||directory +directpries||directories +directpry||directory +directries||directories +directrly||directly +directroies||directories +directrories||directories +directrory||directory +directroy||directory +directry||directory +directtories||directories +directtory||directory +directy||directly +diretories||directories +diretory||directory +disalb||disable +disalbed||disabled +disalbe||disable +disalbes||disables +disapeard||disappeared +disapear||disappear +disapeared||disappeared +disapearing||disappearing +disapears||disappears +disapper||disappear +disappered||disappeared +disappering||disappearing +disappers||disappears +disbaled||disabled +disbale||disable +disbales||disables +disbaling||disabling +discconecct||disconnect +discconeccted||disconnected +discconeccting||disconnecting +discconecction||disconnection +discconecctions||disconnections +discconeccts||disconnects +discconect||disconnect +discconected||disconnected +discconecting||disconnecting +discconection||disconnection +discconections||disconnections +discconects||disconnects +discconeect||disconnect +discconeected||disconnected +discconeecting||disconnecting +discconeection||disconnection +discconeections||disconnections +discconeects||disconnects +discconenct||disconnect +discconencted||disconnected +discconencting||disconnecting +discconenction||disconnection +discconenctions||disconnections +discconencts||disconnects +discconet||disconnect +discconeted||disconnected +discconeting||disconnecting +discconetion||disconnection +discconetions||disconnections +discconets||disconnects +discernable||discernible +disconecct||disconnect +disconeccted||disconnected +disconeccting||disconnecting +disconecction||disconnection +disconecctions||disconnections +disconeccts||disconnects +disconect||disconnect +disconected||disconnected +disconecting||disconnecting +disconection||disconnection +disconections||disconnections +disconects||disconnects +disconeect||disconnect +disconeected||disconnected +disconeecting||disconnecting +disconeection||disconnection +disconeections||disconnections +disconeects||disconnects +disconenct||disconnect +disconencted||disconnected +disconencting||disconnecting +disconenction||disconnection +disconenctions||disconnections +disconencts||disconnects +disconet||disconnect +disconeted||disconnected +disconeting||disconnecting +disconetion||disconnection +disconetions||disconnections +disconets||disconnects +disconnet||disconnect +disconneted||disconnected +disconneting||disconnecting +disconnets||disconnects +discontigous||discontiguous +discontinous||discontinuous +discontinus||discontinuous +discourraged||discouraged +discourrage||discourage +discovr||discover +discovred||discovered +discovring||discovering +discovrs||discovers +discribes||describes +discription||description +discriptions||descriptions +disctionaries||dictionaries +disctionary||dictionary +discuassed||discussed +discusion||discussion +dislaimer||disclaimer +dislay||display +dislayed||displayed +dislaying||displaying +dislays||displays +dislpay||display +dislpayed||displayed +dislpaying||displaying +dislpays||displays +dispath||dispatch +dispathed||dispatched +dispathes||dispatches +dispathing||dispatching +dispertion||dispersion +dispite||despite +dissabled||disabled +dissable||disable +dissables||disables +dissabling||disabling +dissadvantage||disadvantage +dissadvantages||disadvantages +dissagregation||dissaggregation +dissallow||disallow +dissallowed||disallowed +dissallowing||disallowing +dissallows||disallows +dissalow||disallow +dissalowed||disallowed +dissalowing||disallowing +dissalows||disallows +dissambiguate||disambiguate +dissambled||disassembled +dissamble||disassemble +dissambler||disassembler +dissambles||disassembles +dissamblies||disassemblies +dissambling||disassembling +dissambly||disassembly +dissapate||dissipate +dissapates||dissipates +dissapeard||disappeared +dissapear||disappear +dissapeared||disappeared +dissapearing||disappearing +dissapears||disappears +dissaperd||disappeared +dissaper||disappear +dissapered||disappeared +dissapering||disappearing +dissapers||disappears +dissapoint||disappoint +dissapointed||disappointed +dissapointing||disappointing +dissapoints||disappoints +dissappeard||disappeared +dissappear||disappear +dissappeared||disappeared +dissappearing||disappearing +dissappears||disappears +dissapperd||disappeared +dissapper||disappear +dissappered||disappeared +dissappering||disappearing +dissappers||disappears +dissapprove||disapprove +dissapproves||disapproves +dissasembled||disassembled +dissasemble||disassemble +dissasembler||disassembler +dissasembles||disassembles +dissasemblies||disassemblies +dissasembling||disassembling +dissasembly||disassembly +dissasociated||disassociated +dissasociate||disassociate +dissasociates||disassociates +dissasociation||disassociation +dissassembled||disassembled +dissassemble||disassemble +dissassembler||disassembler +dissassembles||disassembles +dissassemblies||disassemblies +dissassembling||disassembling +dissassembly||disassembly +dissassociated||disassociated +dissassociate||disassociate +dissassociates||disassociates +dissassociating||disassociating +dissaster||disaster +dissasters||disasters +dissbled||disabled +dissble||disable +dissbles||disables +dissbling||disabling +dissconnect||disconnect +dissconnected||disconnected +dissconnects||disconnects +disscover||discover +disscovered||discovered +disscovering||discovering +disscovers||discovers +disscovery||discovery +dissct||dissect +disscted||dissected +disscting||dissecting +dissctor||dissector +dissctors||dissectors +disscts||dissects +disscus||discuss +disscused||discussed +disscuses||discusses +disscusing||discussing +disscusion||discussion +disscuss||discuss +disscussed||discussed +disscusses||discusses +disscussing||discussing +disscussion||discussion +disshearteningly||dishearteningly +dissimiliarity||dissimilarity +dissmantled||dismantled +dissmantle||dismantle +dissmantles||dismantles +dissmantling||dismantling +dissmis||dismiss +dissmised||dismissed +dissmises||dismisses +dissmising||dismissing +dissmiss||dismiss +dissmissed||dismissed +dissmisses||dismisses +dissmissing||dismissing +dissplay||display +dissrupt||disrupt +dissrupted||disrupted +dissrupting||disrupting +dissrupts||disrupts +disssembled||disassembled +disssemble||disassemble +disssembler||disassembler +disssembles||disassembles +disssemblies||disassemblies +disssembling||disassembling +disssembly||disassembly +disssociated||dissociated +disssociate||dissociate +disssociates||dissociates +disssociating||dissociating +distibuted||distributed +distibute||distribute +distibutes||distributes +distibuting||distributing +distibution||distribution +distibutions||distributions +distiction||distinction +distingush||distinguish +distingushed||distinguished +distingushes||distinguishes +distingushing||distinguishing +distnace||distance +distnaces||distances +distnce||distance +distnces||distances +distnct||distinct +distncte||distance +distnctes||distances +distnguish||distinguish +distnguished||distinguished +distniguish||distinguish +distniguished||distinguished +distrebuted||distributed +distribtion||distribution +distribtions||distributions +distribtuion||distribution +distribtuions||distributions +distribuited||distributed +distribuite||distribute +distribuiting||distributing +distribuition||distribution +distribuitng||distributing +distrobution||distribution +distrubuted||distributed +distrubute||distribute +distrubution||distribution +distrubutions||distributions +divertion||diversion +divertions||diversions +divison||division +divisons||divisions +divsion||division +divsions||divisions +docmenetation||documentation +docuement||document +docuements||documents +docuentation||documentation +documantation||documentation +documemt||document +documenation||documentation +documenetation||documentation +documenet||document +documenets||documents +documentaion||documentation +documentaiton||documentation +documention||documentation +documetation||documentation +documetnation||documentation +documment||document +documments||documents +doens't||doesn't +doese||does +doesen't||doesn't +doesent'||doesn't +doesent||doesn't +doese't||doesn't +does'nt||doesn't +doesnt'||doesn't +doesnt||doesn't +doesnt't||doesn't +does't||doesn't +doman||domain +domans||domains +donnot||do not +do'nt||don't +dont'||don't +dont||don't +dont't||don't +donwload||download +donwloaded||downloaded +donwloading||downloading +donwloads||downloads +dosens||dozens +dosen't||doesn't +dosent||doesn't +doube-click||double-click +doubeclick||doubleclick +doube-clicked||double-clicked +doubeclicked||doubleclicked +doube-clicks||double-clicks +doubeclicks||doubleclicks +doube||double +doubel||double +doubele-click||double-click +doubeleclick||doubleclick +doubele-clicked||double-clicked +doubeleclicked||doubleclicked +doubele-clicks||double-clicks +doubeleclicks||doubleclicks +doubely||doubly +doube-quoted||double-quoted +doube-quote||double-quote +doubes||doubles +doube-word||double-word +doube-wprd||double-word +dowgrade||downgrade +dowlink||downlink +dowlinks||downlinks +dowload||download +dowloaded||downloaded +dowloader||downloader +dowloaders||downloaders +dowloading||downloading +dowloads||downloads +downgrated||downgraded +downgrate||downgrade +downlad||download +downlads||downloads +downlod||download +downloding||downloading +downlods||downloads +dpendent||dependent +dpkg-buildpackge||dpkg-buildpackage +dpuble||double +dpubles||doubles +draconain||draconian +draging||dragging +drasticaly||drastically +droped||dropped +droppend||dropped +droppped||dropped +dropse||drops +dsfg||dfsg +dubios||dubious +dulicate||duplicate +dumplicated||duplicated +dumplicate||duplicate +dumplicates||duplicates +dumplicating||duplicating +duplacated||duplicated +duplacate||duplicate +duplacates||duplicates +duplacation||duplication +duplacted||duplicated +duplacte||duplicate +duplactes||duplicates +duplaction||duplication +duplaicated||duplicated +duplaicate||duplicate +duplaicates||duplicates +duplaication||duplication +duplated||duplicated +duplate||duplicate +duplates||duplicates +duplation||duplication +dupliacate||duplicate +dupliacates||duplicates +dupliace||duplicate +dupliacted||duplicated +dupliacte||duplicate +dupliactes||duplicates +dupliagte||duplicate +dupliate||duplicate +dupliates||duplicates +dupliation||duplication +dupplicated||duplicated +dupplicate||duplicate +dupplicates||duplicates +dupplicating||duplicating +dupplication||duplication +dupplications||duplications +duratition||duration +durring||during +dynamicly||dynamically +dynamlically||dynamically +dynamlic||dynamic +dynmaically||dynamically +dynmaic||dynamic +eagrely||eagerly +eaiser||easier +eample||example +eamples||examples +earpeice||earpiece +easilly||easily +ebaled||enabled +ebale||enable +ecept||except +eception||exception +eceptions||exceptions +eclise||eclipse +eclispe||eclipse +ecspecially||especially +edditable||editable +ediable||editable +editting||editing +efective||effective +efectively||effectively +effctive||effective +effctively||effectively +effectly||effectively +effekt||effect +efficency||efficiency +efficent||efficient +efficently||efficiently +effiency||efficiency +effient||efficient +effiently||efficiently +efford||effort +egde||edge +egdes||edges +egenral||general +egenralised||generalised +egenralise||generalise +egenralises||generalises +egenralized||generalized +egenralize||generalize +egenralizes||generalizes +egenrally||generally +ehanced||enhanced +ehance||enhance +ehancement||enhancement +ehancements||enhancements +eighter||either +elemenet||element +elemenets||elements +eletronic||electronic +eligable||eligible +elliminated||eliminated +elliminate||eliminate +elliminates||eliminates +elliminating||eliminating +elmenet||element +elmenets||elements +elment||element +elments||elements +elminated||eliminated +elminate||eliminate +elminates||eliminates +elminating||eliminating +elsewhwere||elsewhere +emailling||emailing +embarrased||embarrassed +embarrasing||embarrassing +embarrasingly||embarrassingly +embdedded||embedded +embeddded||embedded +embeddeding||embedding +embeded||embedded +emenet||element +emenets||elements +emited||emitted +emiting||emitting +emmit||emit +emmiting||emitting +emmits||emits +emmitted||emitted +emptry||empty +emtied||emptied +emties||empties +emtpy||empty +emty||empty +emtying||emptying +enalbed||enabled +enalbe||enable +enalbes||enables +enbaled||enabled +enbale||enable +enbales||enables +enbaling||enabling +enchanced||enhanced +enclosng||enclosing +enclosue||enclosure +enclosung||enclosing +enconding||encoding +encondings||encodings +encorporating||incorporating +encosed||enclosed +encose||enclose +encoses||encloses +encosing||enclosing +encoutner||encounter +encoutners||encounters +encouttering||encountering +encrpted||encrypted +encrpt||encrypt +encrption||encryption +encrytion||encryption +encyption||encryption +endianes||endianness +endianess||endianness +endiannes||endianness +enebaled||enabled +enebale||enable +enehanced||enhanced +eneumeration||enumeration +eneumerations||enumerations +eneumretaion||enumeration +eneumretaions||enumerations +enforcable||enforceable +enforcmement||enforcement +engeneer||engineer +engeneering||engineering +engieer||engineer +enhaced||enhanced +enhancment||enhancement +enhancments||enhancements +enironment||environment +enironments||environments +enitities||entities +enitity||entity +enivornment||environment +enivornments||environments +enlargment||enlargement +enlightnment||enlightenment +enocded||encoded +enouch||enough +enoucntered||encountered +enoucnter||encounter +enoucntering||encountering +enoucnters||encounters +enouf||enough +enoufh||enough +enought||enough +enoughts||enough +enouh||enough +enouhg||enough +enounctered||encountered +enouncter||encounter +enounctering||encountering +enouncters||encounters +enoung||enough +enoungh||enough +enountered||encountered +enounter||encounter +enountering||encountering +enounters||encounters +enouph||enough +enouraged||encouraged +enourage||encourage +enourages||encourages +enouraging||encouraging +enourmous||enormous +enourmously||enormously +enouth||enough +enouugh||enough +enrties||entries +enrtries||entries +enrty||entry +entended||intended +enterance||entrance +enterily||entirely +enthusiatic||enthusiastic +entireity||entirety +entites||entities +entitities||entities +entitity||entity +entrys||entries +enty||entry +enumarated||enumerated +enumarate||enumerate +enumarates||enumerates +enumarating||enumerating +envaluation||evaluation +enver||never +enviomental||environmental +envioment||environment +envioments||environments +envionmental||environmental +envionment||environment +envionments||environments +envioremental||environmental +enviorement||environment +enviorements||environments +enviorenmental||environmental +enviorenment||environment +enviorenments||environments +enviormental||environmental +enviorment||environment +enviorments||environments +enviornemntal||environmental +enviornemnt||environment +enviornemnts||environments +enviornmental||environmental +enviornment||environment +enviornments||environments +envioronmental||environmental +envioronment||environment +envioronments||environments +envireonment||environment +envirnmental||environmental +envirnment||environment +envirnments||environments +envirnoment||environment +envirnoments||environments +enviroiment||environment +enviromental||environmental +enviromentally||environmentally +enviroment||environment +enviroments||environments +environement||environment +environemntal||environmental +environemnt||environment +environemnts||environments +environent||environment +environmenet||environment +environmenets||environments +envrion||environ +envrionmental||environmental +envrionment||environment +envrionments||environments +envriron||environ +envrironmental||environmental +envrironment||environment +envrironments||environments +envvironment||environment +epected||expected +epectedly||expectedly +epect||expect +epecting||expecting +epects||expects +ephememeral||ephemeral +ephememeris||ephemeris +eploit||exploit +eploits||exploits +eqivalent||equivalent +equiped||equipped +equitorial||equatorial +equivalant||equivalent +equivelant||equivalent +equivilant||equivalent +equvalent||equivalent +eroneous||erroneous +eror||error +erorr||error +erorrs||errors +erors||errors +erroneus||erroneous +erroneusly||erroneously +erronous||erroneous +erronously||erroneously +errorneous||erroneous +errorneously||erroneously +errror||error +errrors||errors +esacped||escaped +esacpe||escape +esacpes||escapes +escased||escaped +esccaped||escaped +esccape||escape +esential||essential +esentially||essentially +espacially||especially +especailly||especially +especialy||especially +especialyl||especially +esseintially||essentially +essiential||essential +estbalishment||establishment +etherenet||ethernet +etiher||either +etsablishment||establishment +etsbalishment||establishment +evalutated||evaluated +evalutate||evaluate +evalutates||evaluates +evalutating||evaluating +evaluted||evaluated +evalute||evaluate +evalutes||evaluates +evaluting||evaluating +evaulated||evaluated +evaulate||evaluate +evaulates||evaluates +evaulation||evaluation +evaulator||evaluator +evaulted||evaluated +evauluated||evaluated +evauluate||evaluate +evauluates||evaluates +evauluation||evaluation +eventhough||even though +eventuall||eventually +everbody||everybody +everone||everyone +everthing||everything +everwhere||everywhere +everyhing||everything +everythign||everything +everythin||everything +everythings||everything +everytime||every time +everyting||everything +evironment||environment +evironments||environments +evovler||evolver +evovling||evolving +evrithing||everything +evrythign||everything +ewhwer||where +exacly||exactly +exactely||exactly +exagerated||exaggerated +exagerate||exaggerate +exagerates||exaggerates +exagerating||exaggerating +exapmle||example +exapmles||examples +exatcly||exactly +exatctly||exactly +excact||exact +excactly||exactly +excahcnge||exchange +excahnge||exchange +excahnges||exchanges +excat||exact +excatly||exactly +excecised||exercised +excecise||exercise +excecises||exercises +excecpt||except +excecptional||exceptional +excecption||exception +excecptions||exceptions +excectable||executable +excectables||executables +excected||executed +excectedly||expectedly +excecte||execute +excectes||executes +excect||except +excecting||executing +excectional||exceptional +excection||exception +excections||exceptions +excective||executive +excectives||executives +excector||executor +excectors||executors +excects||expects +excecutable||executable +excecutables||executables +excecuted||executed +excecute||execute +excecutes||executes +excecuting||executing +excecution||execution +excecutions||executions +excecutive||executive +excecutives||executives +excecutor||executor +excecutors||executors +excecuts||executes +excedded||exceeded +excedding||exceeding +exceded||exceeded +excedeed||exceeded +excede||exceed +excedes||exceeds +exced||exceed +exceding||exceeding +exceirpt||excerpt +exceirpts||excerpts +excellant||excellent +excempted||exempted +excempt||exempt +excemption||exemption +excemptions||exemptions +excempts||exempts +excentric||eccentric +excentricity||eccentricity +excentuating||accentuating +exceopted||exempted +exceopt||exempt +exceopts||exempts +exceotion||exemption +exceotions||exemptions +exceptation||expectation +excercised||exercised +excercise||exercise +excercises||exercises +excercising||exercising +excesed||exceeded +exces||excess +excesive||excessive +excesively||excessively +excesv||excessive +excesvly||excessively +excetional||exceptional +excetion||exception +excetions||exceptions +excetpional||exceptional +excetpion||exception +excetpions||exceptions +excetptional||exceptional +excetption||exception +excetptions||exceptions +excetra||etcetera +excetutable||executable +excetutables||executables +excetuted||executed +excetute||execute +excetutes||executes +excetuting||executing +excetution||execution +excetutions||executions +excetutive||executive +excetutives||executives +excetutor||executor +excetutors||executors +exceuctable||executable +exceuctables||executables +exceucted||executed +exceucte||execute +exceuctes||executes +exceucting||executing +exceuction||execution +exceuctions||executions +exceuctive||executive +exceuctives||executives +exceuctor||executor +exceuctors||executors +exceutable||executable +exceutables||executables +exceuted||executed +exceute||execute +exceutes||executes +exceuting||executing +exceution||execution +exceutions||executions +exceutive||executive +exceutives||executives +exceutor||executor +exceutors||executors +excewptional||exceptional +excewption||exception +excewptions||exceptions +exchaged||exchanged +exchage||exchange +exchages||exchanges +exchaging||exchanging +exchagned||exchanged +exchagne||exchange +exchagnes||exchanges +exchagnged||exchanged +exchagnge||exchange +exchagnges||exchanges +exchagnging||exchanging +exchagning||exchanging +exchanaged||exchanged +exchanage||exchange +exchanages||exchanges +exchanaging||exchanging +exchanced||exchanged +exchance||exchange +exchances||exchanges +exchanched||exchanged +exchanche||exchange +exchanches||exchanges +exchanching||exchanging +exchancing||exchanging +exchaned||exchanged +exchane||exchange +exchanes||exchanges +exchangable||exchangeable +exchaning||exchanging +exchausted||exhausted +exchaust||exhaust +exchausting||exhausting +exchaustive||exhaustive +exchausts||exhausts +exchenged||exchanged +exchenge||exchange +exchenges||exchanges +exchenging||exchanging +exchnaged||exchanged +exchnage||exchange +exchnages||exchanges +exchnaging||exchanging +exchngd||exchanged +exchnged||exchanged +exchnge||exchange +exchnges||exchanges +exchng||exchange +exchnging||exchanging +exchngng||exchanging +exchngs||exchanges +excisting||existing +excpected||expected +excpect||expect +excpecting||expecting +excpects||expects +excpetion||exception +excplicit||explicit +excplicitly||explicitly +excutable||executable +excutables||executables +excuted||executed +excute||execute +excutes||executes +excuting||executing +exeception||exception +execeptions||exceptions +exection||execution +exections||executions +exectuable||executable +exectuableness||executableness +exectuables||executables +exectution||execution +exectutions||executions +execuable||executable +execuables||executables +execuatable||executable +execuatables||executables +execuatble||executable +execuatbles||executables +execuated||executed +execuate||execute +execuates||executes +execuation||execution +execuations||executions +execubale||executable +execubales||executables +execucted||executed +execucte||execute +execuctes||executes +execuction||execution +execuctions||executions +execuctor||executor +execuctors||executors +execuded||executed +execude||execute +execudes||executes +execuding||executing +execued||executed +execue||execute +execues||executes +execuetd||executed +execueted||executed +execuete||execute +execuetes||executes +execuet||execute +execuets||executes +execuing||executing +execuion||execution +execuions||executions +execuitable||executable +execuitables||executables +execuited||executed +execuite||execute +execuites||executes +execuiting||executing +execuition||execution +execuitions||executions +execulatble||executable +execulatbles||executables +execultable||executable +execultables||executables +execulusive||exclusive +execuned||executed +execune||execute +execunes||executes +execurable||executable +execurables||executables +execured||executed +execure||execute +execures||executes +execused||executed +execuse||execute +execuses||executes +execusion||execution +execusions||executions +execusive||exclusive +execustion||execution +execustions||executions +executabable||executable +executabables||executables +executabe||executable +executabel||executable +executabels||executables +executabes||executables +executablble||executable +executabnle||executable +executabnles||executables +executation||execution +executations||executions +executbale||executable +executbales||executables +executble||executable +executbles||executables +executd||executed +executding||executing +executeable||executable +executeables||executables +executng||executing +executred||executed +executre||execute +executres||executes +executs||executes +executting||executing +executtion||execution +executtions||executions +executuable||executable +executuables||executables +executuble||executable +executubles||executables +executued||executed +executue||execute +executues||executes +executuing||executing +executuion||execution +executuions||executions +executung||executing +executuon||execution +executuons||executions +execututed||executed +executute||execute +execututes||executes +executution||execution +execututions||executions +exemple||example +exension||extension +exensions||extensions +exentended||extended +exepectation||expectation +exepectations||expectations +exepected||expected +exepectedly||expectedly +exepect||expect +exepecting||expecting +exepects||expects +exept||except +exeption||exception +exeptions||exceptions +exeucted||executed +exeucte||execute +exeuctes||executes +exhcuasted||exhausted +exhcuast||exhaust +exising||existing +exisiting||existing +existance||existence +existant||existent +existying||existing +exlcude||exclude +exlcusive||exclusive +exlicite||explicit +exlicitely||explicitly +exlicit||explicit +exlicitly||explicitly +exluded||excluded +exlude||exclude +exludes||excludes +exluding||excluding +exlusionary||exclusionary +exlusion||exclusion +exlusions||exclusions +exlusive||exclusive +exlusively||exclusively +exmained||examined +exmaine||examine +exmaines||examines +exmaple||example +exmaples||examples +expcted||expected +expctedly||expectedly +expct||expect +expcting||expecting +expecially||especially +expectes||expects +expection||exception +expections||exceptions +expeected||expected +expeectedly||expectedly +expeect||expect +expeecting||expecting +expeects||expects +expeense||expense +expeenses||expenses +expeensive||expensive +expeienced||experienced +expeience||experience +expeiences||experiences +expeiencing||experiencing +expeimental||experimental +expeimentally||experimentally +expeimentation||experimentation +expeimentations||experimentations +expeimented||experimented +expeimentel||experimental +expeimentelly||experimentally +expeimenter||experimenter +expeimenters||experimenters +expeiment||experiment +expeimenting||experimenting +expeiments||experiments +expeirimental||experimental +expeirimentally||experimentally +expeirimentation||experimentation +expeirimentations||experimentations +expeirimented||experimented +expeirimentel||experimental +expeirimentelly||experimentally +expeirimenter||experimenter +expeirimenters||experimenters +expeiriment||experiment +expeirimenting||experimenting +expeiriments||experiments +expemental||experimental +expementally||experimentally +expementation||experimentation +expementations||experimentations +expemented||experimented +expementel||experimental +expementelly||experimentally +expementer||experimenter +expementers||experimenters +expement||experiment +expementing||experimenting +expements||experiments +expemplar||exemplar +expemplars||exemplars +expemplary||exemplary +expempted||exempted +expempt||exempt +expemted||exempted +expemt||exempt +expemtion||exemption +expemtions||exemptions +expemts||exempts +expendeble||expendable +expepected||expected +expepectedly||expectedly +expepect||expect +expepecting||expecting +expepects||expects +expepted||expected +expeptedly||expectedly +expept||expect +expepting||expecting +expeption||exception +expeptions||exceptions +expepts||expects +experamental||experimental +experamentally||experimentally +experamentation||experimentation +experamentations||experimentations +experamented||experimented +experamentel||experimental +experamentelly||experimentally +experamenter||experimenter +experamenters||experimenters +experament||experiment +experamenting||experimenting +experaments||experiments +experation||expiration +expercted||expected +experct||expect +expercting||expecting +expercts||expects +expereinced||experienced +expereince||experience +expereinces||experiences +expereincing||experiencing +experemental||experimental +experementally||experimentally +experementation||experimentation +experementations||experimentations +experemented||experimented +experementel||experimental +experementelly||experimentally +experementer||experimenter +experementers||experimenters +experement||experiment +experementing||experimenting +experements||experiments +experenced||experienced +experence||experience +experences||experiences +experencing||experiencing +experesed||expressed +experes||express +experesion||expression +experesions||expressions +experessed||expressed +experesses||expresses +experess||express +experessing||expressing +experession||expression +experession's||expression's +experessions||expressions +experianced||experienced +experiance||experience +experiances||experiences +experiancing||experiencing +experiation||expiration +experiations||expirations +expericed||experienced +experice||experience +experices||experiences +expericing||experiencing +experimal||experimental +experimally||experimentally +experimanental||experimental +experimanentally||experimentally +experimanentation||experimentation +experimanentations||experimentations +experimanented||experimented +experimanentel||experimental +experimanentelly||experimentally +experimanenter||experimenter +experimanenters||experimenters +experimanent||experiment +experimanenting||experimenting +experimanents||experiments +experimanetal||experimental +experimanetally||experimentally +experimanetation||experimentation +experimanetations||experimentations +experimaneted||experimented +experimanetel||experimental +experimanetelly||experimentally +experimaneter||experimenter +experimaneters||experimenters +experimanet||experiment +experimaneting||experimenting +experimanets||experiments +experimantal||experimental +experimantally||experimentally +experimantation||experimentation +experimantations||experimentations +experimanted||experimented +experimantel||experimental +experimantelly||experimentally +experimanter||experimenter +experimanters||experimenters +experimant||experiment +experimanting||experimenting +experimants||experiments +experimation||experimentation +experimations||experimentations +experimdntal||experimental +experimdntally||experimentally +experimdntation||experimentation +experimdntations||experimentations +experimdnted||experimented +experimdntel||experimental +experimdntelly||experimentally +experimdnter||experimenter +experimdnters||experimenters +experimdnt||experiment +experimdnting||experimenting +experimdnts||experiments +experimed||experimented +experimel||experimental +experimelly||experimentally +experimenal||experimental +experimenally||experimentally +experimenatal||experimental +experimenatally||experimentally +experimenatation||experimentation +experimenatations||experimentations +experimenated||experimented +experimenatel||experimental +experimenatelly||experimentally +experimenater||experimenter +experimenaters||experimenters +experimenat||experiment +experimenating||experimenting +experimenation||experimentation +experimenations||experimentations +experimenats||experiments +experimened||experimented +experimenel||experimental +experimenelly||experimentally +experimener||experimenter +experimeners||experimenters +experimen||experiment +experimening||experimenting +experimens||experiments +experimentaal||experimental +experimentaally||experimentally +experimentaat||experiment +experimentaatl||experimental +experimentaatlly||experimentally +experimentaats||experiments +experimentaed||experimented +experimentaer||experimenter +experimentaing||experimenting +experimentaion||experimentation +experimentaions||experimentations +experimentaital||experimental +experimentaitally||experimentally +experimentaited||experimented +experimentaiter||experimenter +experimentaiters||experimenters +experimentait||experiment +experimentaitng||experimenting +experimentaiton||experimentation +experimentaitons||experimentations +experimentatal||experimental +experimentatally||experimentally +experimentatation||experimentation +experimentatations||experimentations +experimentated||experimented +experimentater||experimenter +experimentat||experimental +experimentating||experimenting +experimentatl||experimental +experimentatlly||experimentally +experimentatly||experimentally +experimentel||experimental +experimentelly||experimentally +experimentted||experimented +experimentter||experimenter +experimentters||experimenters +experimentt||experiment +experimentts||experiments +experimer||experimenter +experimers||experimenters +experimetal||experimental +experimetally||experimentally +experimetation||experimentation +experimetations||experimentations +experimeted||experimented +experimetel||experimental +experimetelly||experimentally +experimetental||experimental +experimetentally||experimentally +experimetentation||experimentation +experimetentations||experimentations +experimetented||experimented +experimetentel||experimental +experimetentelly||experimentally +experimetenter||experimenter +experimetenters||experimenters +experimetent||experiment +experimetenting||experimenting +experimetents||experiments +experimeter||experimenter +experimeters||experimenters +experimet||experiment +experimeting||experimenting +experimetnal||experimental +experimetnally||experimentally +experimetnation||experimentation +experimetnations||experimentations +experimetned||experimented +experimetnel||experimental +experimetnelly||experimentally +experimetner||experimenter +experimetners||experimenters +experimetn||experiment +experimetning||experimenting +experimetns||experiments +experimets||experiments +experim||experiment +experiming||experimenting +experimintal||experimental +experimintally||experimentally +experimintation||experimentation +experimintations||experimentations +experiminted||experimented +experimintel||experimental +experimintelly||experimentally +experiminter||experimenter +experiminters||experimenters +experimint||experiment +experiminting||experimenting +experimints||experiments +experimmental||experimental +experimmentally||experimentally +experimmentation||experimentation +experimmentations||experimentations +experimmented||experimented +experimmentel||experimental +experimmentelly||experimentally +experimmenter||experimenter +experimmenters||experimenters +experimment||experiment +experimmenting||experimenting +experimments||experiments +experimnetal||experimental +experimnetally||experimentally +experimnetation||experimentation +experimnetations||experimentations +experimneted||experimented +experimnetel||experimental +experimnetelly||experimentally +experimneter||experimenter +experimneters||experimenters +experimnet||experiment +experimneting||experimenting +experimnets||experiments +experimntal||experimental +experimntally||experimentally +experimntation||experimentation +experimntations||experimentations +experimnted||experimented +experimntel||experimental +experimntelly||experimentally +experimnter||experimenter +experimnters||experimenters +experimnt||experiment +experimnting||experimenting +experimnts||experiments +experims||experiments +experimtenal||experimental +experimtenally||experimentally +experimtenation||experimentation +experimtenations||experimentations +experimtened||experimented +experimtenel||experimental +experimtenelly||experimentally +experimtener||experimenter +experimteners||experimenters +experimten||experiment +experimtening||experimenting +experimtens||experiments +experineced||experienced +experinece||experience +experinemental||experimental +experinementally||experimentally +experinementation||experimentation +experinementations||experimentations +experinemented||experimented +experinementel||experimental +experinementelly||experimentally +experinementer||experimenter +experinementers||experimenters +experinement||experiment +experinementing||experimenting +experinements||experiments +experiration||expiration +experirations||expirations +expermenetal||experimental +expermenetally||experimentally +expermenetation||experimentation +expermenetations||experimentations +expermeneted||experimented +expermenetel||experimental +expermenetelly||experimentally +expermeneter||experimenter +expermeneters||experimenters +expermenet||experiment +expermeneting||experimenting +expermenets||experiments +expermental||experimental +expermentally||experimentally +expermentation||experimentation +expermentations||experimentations +expermented||experimented +expermentel||experimental +expermentelly||experimentally +expermenter||experimenter +expermenters||experimenters +experment||experiment +expermenting||experimenting +experments||experiments +expermiental||experimental +expermientally||experimentally +expermientation||experimentation +expermientations||experimentations +expermiented||experimented +expermientel||experimental +expermientelly||experimentally +expermienter||experimenter +expermienters||experimenters +expermient||experiment +expermienting||experimenting +expermients||experiments +expermimental||experimental +expermimentally||experimentally +expermimentation||experimentation +expermimentations||experimentations +expermimented||experimented +expermimentel||experimental +expermimentelly||experimentally +expermimenter||experimenter +expermimenters||experimenters +expermiment||experiment +expermimenting||experimenting +expermiments||experiments +experminental||experimental +experminentally||experimentally +experminentation||experimentation +experminentations||experimentations +experminent||experiment +experminents||experiments +expernal||external +expersed||expressed +experse||expense +experses||expresses +expers||express +expersing||expressing +expersion||expression +expersions||expressions +expersive||expensive +experssed||expressed +expersses||expresses +experss||express +experssing||expressing +experssion||expression +experssions||expressions +expese||expense +expeses||expenses +expesive||expensive +expesnce||expense +expesnces||expenses +expesncive||expensive +expessed||expressed +expesses||expresses +expess||express +expessing||expressing +expession||expression +expessions||expressions +expested||expected +expestedly||expectedly +expest||expect +expesting||expecting +expetced||expected +expetcedly||expectedly +expetc||expect +expetcing||expecting +expetcs||expects +expetcted||expected +expetctedly||expectedly +expetct||expect +expetcting||expecting +expetcts||expects +expetected||expected +expetectedly||expectedly +expetect||expect +expetecting||expecting +expetectly||expectedly +expetects||expects +expeted||expected +expetedly||expectedly +expet||expect +expetimental||experimental +expetimentally||experimentally +expetimentation||experimentation +expetimentations||experimentations +expetimented||experimented +expetimentel||experimental +expetimentelly||experimentally +expetimenter||experimenter +expetimenters||experimenters +expetiment||experiment +expetimenting||experimenting +expetiments||experiments +expeting||expecting +expets||expects +expewrimental||experimental +expewrimentally||experimentally +expewrimentation||experimentation +expewrimentations||experimentations +expewrimented||experimented +expewrimentel||experimental +expewrimentelly||experimentally +expewrimenter||experimenter +expewrimenters||experimenters +expewriment||experiment +expewrimenting||experimenting +expewriments||experiments +expexcted||expected +expexctedly||expectedly +expexct||expect +expexcting||expecting +expexcts||expects +expexnasion||expansion +expexnasions||expansions +expexted||expected +expextedly||expectedly +expext||expect +expexting||expecting +expexts||expects +expierience||experience +expieriences||experiences +expirimental||experimental +explaination||explanation +explainations||explanations +explaning||explaining +explantion||explanation +explantions||explanations +explecitely||explicitly +explecit||explicit +explecitily||explicitly +explecitly||explicitly +explenation||explanation +explicite||explicit +explicitely||explicitly +explicitily||explicitly +explicity||explicitly +explict||explicit +explictly||explicitly +explit||explicit +explitly||explicitly +explot||exploit +exploting||exploiting +expoential||exponential +expoentially||exponentially +expoerted||exported +expoert||export +expport||export +expresion||expression +expresions||expressions +expresssion||expression +expresssions||expressions +exprienced||experienced +exprience||experience +expriences||experiences +exprimental||experimental +exspected||expected +exspectedly||expectedly +exspect||expect +exspecting||expecting +extarnal||external +extarnally||externally +exteneded||extended +extened||extended +extensability||extensibility +extenstion||extension +extenstions||extensions +extented||extended +extention||extension +extentions||extensions +extepect||expect +extepecting||expecting +extepects||expects +extermporaneous||extemporaneous +extesion||extension +extesions||extensions +extnesion||extension +extrac||extract +extracing||extracting +extracter||extractor +extraenous||extraneous +extreamely||extremely +extream||extreme +extreamily||extremely +extreamly||extremely +extreams||extremes +extrememe||extreme +extrememely||extremely +extrememly||extremely +extremly||extremely +faciliated||facilitated +faciliate||facilitate +faciliates||facilitates +faciliating||facilitating +facirity||facility +faild||failed +failt||fail +failue||failure +failuer||failure +failues||failures +failured||failed +falg||flag +falgs||flags +faliure||failure +faliures||failures +familar||familiar +farmework||framework +fatser||faster +feasable||feasible +featue||feature +featues||features +feauture||feature +feautures||features +feeback||feedback +feeded||fed +fetaure||feature +fetaures||features +ficticious||fictitious +fileld||field +filelds||fields +filess||files +filessytem||filesystem +filessytems||filesystems +filesytem||filesystem +filesytems||filesystems +fileystem||filesystem +fileystems||filesystems +filsystem||filesystem +filsystems||filesystems +filterss||filters +finailse||finalise +finailze||finalize +finaly||finally +findout||find out +finsihed||finished +finsihes||finishes +finsih||finish +finsihing||finishing +finxed||fixed +finxing||fixing +firmwware||firmware +firts||first +fisrt||first +fitler||filter +fitlers||filters +flaged||flagged +flexability||flexibility +flexable||flexible +flie||file +floting||floating +flusing||flushing +foget||forget +fogot||forgot +fogotten||forgotten +foler||folder +folers||folders +folfer||folder +folfers||folders +folled||followed +foller||follower +follers||followers +follewed||followed +follewer||follower +follewers||followers +follew||follow +follewind||following +follewin||following +follewing||following +follewinwg||following +follewiong||following +follewiwng||following +follewong||following +follews||follows +foll||follow +follfowed||followed +follfower||follower +follfowers||followers +follfow||follow +follfowind||following +follfowin||following +follfowing||following +follfowinwg||following +follfowiong||following +follfowiwng||following +follfowong||following +follfows||follows +follind||following +follin||following +folling||following +follinwg||following +folliong||following +folliwed||followed +folliwer||follower +folliwers||followers +folliw||follow +folliwind||following +folliwin||following +folliwing||following +folliwinwg||following +folliwiong||following +folliwiwng||following +folliwng||following +folliwong||following +folliws||follows +folllowed||followed +folllower||follower +folllowers||followers +folllow||follow +folllowind||following +folllowin||following +folllowing||following +folllowinwg||following +folllowiong||following +folllowiwng||following +folllowong||following +folllows||follows +folloing||following +follong||following +folls||follows +follwed||followed +follwer||follower +follwers||followers +follw||follow +follwind||following +follwin||following +follwing||following +follwinwg||following +follwiong||following +follwiwng||following +follwoed||followed +follwoeed||followed +follwoeer||follower +follwoeers||followers +follwoe||follow +follwoeind||following +follwoein||following +follwoeing||following +follwoeinwg||following +follwoeiong||following +follwoeiwng||following +follwoeong||following +follwoer||follower +follwoers||followers +follwoes||follows +follwo||follow +follwoind||following +follwoin||following +follwoing||following +follwoinwg||following +follwoiong||following +follwoiwng||following +follwong||following +follwoong||following +follwos||follows +follwowed||followed +follwower||follower +follwowers||followers +follwow||follow +follwowind||following +follwowin||following +follwowing||following +follwowinwg||following +follwowiong||following +follwowiwng||following +follwowong||following +follwows||follows +follws||follows +follwwed||followed +follwwer||follower +follwwers||followers +follww||follow +follwwind||following +follwwin||following +follwwing||following +follwwinwg||following +follwwiong||following +follwwiwng||following +follwwong||following +follwws||follows +foloowed||followed +foloower||follower +foloowers||followers +foloow||follow +foloowind||following +foloowin||following +foloowing||following +foloowinwg||following +foloowiong||following +foloowiwng||following +foloowong||following +foloows||follows +folowed||followed +folower||follower +folowers||followers +folow||follow +folowind||following +folowin||following +folowing||following +folowinwg||following +folowiong||following +folowiwng||following +folowong||following +folows||follows +folowwed||followed +folowwer||follower +folowwers||followers +foloww||follow +folowwind||following +folowwin||following +folowwing||following +folowwinwg||following +folowwiong||following +folowwiwng||following +folowwong||following +folowws||follows +folse||false +folwoed||followed +folwoer||follower +folwoers||followers +folwo||follow +folwoind||following +folwoin||following +folwoing||following +folwoinwg||following +folwoiong||following +folwoiwng||following +folwoong||following +folwos||follows +folx||folks +fonctionnalies||functionalities +fonctionnalities||functionalities +fonctionnality||functionality +fonctionnaly||functionality +foppy||floppy +foppys||floppies +forbiden||forbidden +foreing||foreign +forementionned||aforementioned +forewarded||forwarded +forground||foreground +formaly||formally +formated||formatted +formating||formatting +formatteded||formatted +formely||formerly +formend||formed +formost||foremost +forseeable||foreseeable +forse||force +fortan||fortran +forthcomming||forthcoming +fortunatly||fortunately +fortunetly||fortunately +forunate||fortunate +forunately||fortunately +forutunate||fortunate +forutunately||fortunately +forver||forever +forwaded||forwarded +forwad||forward +forwading||forwarding +forwads||forwards +forwardig||forwarding +foudn||found +foudning||founding +fourty||forty +fowarded||forwarded +foward||forward +fowarding||forwarding +fowards||forwards +fragement||fragment +fragements||fragments +fragmenet||fragment +fragmenets||fragments +framwork||framework +framworks||frameworks +freee||free +freqencies||frequencies +freqency||frequency +frequncies||frequencies +frequncy||frequency +freze||freeze +frezes||freezes +fricton||friction +frontent||frontend +frontents||frontends +frop||drop +frops||drops +FTBS||FTBFS +fualt||fault +fualts||faults +fucntion||function +fucntions||functions +fuction||function +fuctions||functions +fullfiled||fulfilled +fullfil||fulfil +fullfiling||fulfilling +fullfilled||fulfilled +fullfill||fulfill +fullfilling||fulfilling +fullfills||fulfills +fullfils||fulfils +funcion||function +funcions||functions +funciton||function +funcitons||functions +functin||function +functins||functions +functionallity||functionality +functionaly||functionally +functionnality||functionality +functionning||functioning +functios||functions +functiosn||functions +functonality||functionality +functon||function +functons||functions +fundemantal||fundamental +fundemental||fundamental +fundementally||fundamentally +fundementals||fundamentals +funtional||functional +funtionalities||functionalities +funtionality||functionality +funtionallity||functionality +funtionally||functionally +funtionalty||functionality +funtion||function +funtions||functions +furether||further +furethermore||furthermore +furethest||furthest +furfill||fulfill +furher||further +furhermore||furthermore +furhest||furthest +furhter||further +furhtermore||furthermore +furhtest||furthest +furser||further +fursermore||furthermore +fursest||first +furst||first +fursther||further +fursthermore||furthermore +fursthest||furthest +furthur||further +furture||future +furure||future +furutre||future +furzzer||fuzzer +futher||further +futherize||further +futhermore||furthermore +fwirte||fwrite +gard||guard +garuanteed||guaranteed +garuantee||guarantee +garuantees||guarantees +garuantied||guaranteed +gauaranteed||guaranteed +gauarantee||guarantee +gauarenteed||guaranteed +gauarentee||guarantee +gauranteed||guaranteed +gaurantee||guarantee +gauranteeing||guaranteeing +gaurantees||guarantees +gausian||Gaussian +genarated||generated +genearal||general +genearally||generally +generaly||generally +generalyl||generally +generalyse||generalise +generater||generator +generaters||generators +genereated||generated +genereate||generate +genereates||generates +genereating||generating +genered||generated +genereic||generic +generilised||generalised +generilise||generalise +generilises||generalises +generilized||generalized +generilize||generalize +generilizes||generalizes +generiously||generously +genral||general +genralised||generalised +genralise||generalise +genralises||generalises +genralized||generalized +genralize||generalize +genralizes||generalizes +genrally||generally +genrated||generated +genrate||generate +genrates||generates +genratet||generated +genrating||generating +genration||generation +genrations||generations +genrator||generator +genrators||generators +genreated||generated +genreate||generate +genreates||generates +genreating||generating +genric||generic +genrics||generics +gental||gentle +geocentic||geocentric +geometrie||geometry +geomtry||geometry +georeferncing||georeferencing +geting||getting +get's||gets +gettetx||gettext +gettter||getter +gettters||getters +getttext||gettext +getttime||gettime +getttimeofday||gettimeofday +gettting||getting +ghostscritp||ghostscript +git-buildpackge||git-buildpackage +gived||given +gloabl||global +glpyh||glyph +glpyhs||glyphs +glyphes||glyphs +gnorung||ignoring +goind||going +govenor||governor +goverment||government +grabed||grabbed +grabing||grabbing +grahical||graphical +grahpical||graphical +gramar||grammar +gramatically||grammatically +grammartical||grammatical +grammer||grammar +grammers||grammars +grapic||graphic +gruop||group +gruops||groups +guage||gauge +guaranted||guaranteed +guaranteey||guaranty +guarbage||garbage +guareded||guarded +guared||guarded +guareented||guaranteed +guareenteed||guaranteed +guareentee||guarantee +guareenteeing||guaranteeing +guareentees||guarantees +guareente||guarantee +guareenteing||guaranteeing +guareentes||guarantees +guareenty||guaranty +guarented||guaranteed +guarenteeded||guaranteed +guarenteede||guarantee +guarenteedeing||guaranteeing +guarenteedes||guarantees +guarenteed||guaranteed +guarenteedy||guaranty +guarentee||guarantee +guarenteeing||guaranteeing +guarenteerd||guaranteed +guarenteer||guarantee +guarenteering||guaranteeing +guarenteers||guarantees +guarentees||guarantees +guarente||guarantee +guarenteing||guaranteeing +guarentes||guarantees +guarentied||guaranteed +guarentie||guarantee +guarentieing||guaranteeing +guarenties||guarantees +guarentyd||guaranteed +guarenty||guaranty +guarentying||guarantee +guarentyinging||guaranteeing +guarentys||guarantees +guarging||guarding +guarnanted||guaranteed +guarnanteed||guaranteed +guarnantee||guarantee +guarnanteeing||guaranteeing +guarnantees||guarantees +guarnante||guarantee +guarnanteing||guaranteeing +guarnantes||guarantees +guarnanty||guaranty +guarnated||guaranteed +guarnateed||guaranteed +guarnateeed||guaranteed +guarnateee||guarantee +guarnateeeing||guaranteeing +guarnateees||guarantees +guarnatee||guarantee +guarnateeing||guaranteeing +guarnatees||guarantees +guarnate||guarantee +guarnateing||guaranteeing +guarnates||guarantees +guarnatey||guaranty +guarnaty||guaranty +guarneted||guaranteed +guarneteed||guaranteed +guarnetee||guarantee +guarneteeing||guaranteeing +guarnetees||guarantees +guarnete||guarantee +guarneteing||guaranteeing +guarnetes||guarantees +guarnety||guaranty +guarnted||guaranteed +guarnteed||guaranteed +guarntee||guarantee +guarnteeing||guaranteeing +guarntees||guarantees +guarnte||guarantee +guarnteing||guaranteeing +guarntes||guarantees +guarnty||guaranty +guarranted||guaranteed +guarranteed||guaranteed +guarrantee||guarantee +guarranteeing||guaranteeing +guarrantees||guarantees +guarrante||guarantee +guarranteing||guaranteeing +guarrantes||guarantees +guarrantied||guaranteed +guarrantie||guarantee +guarrantieing||guaranteeing +guarranties||guarantees +guarrantyd||guaranteed +guarranty||guaranty +guarrantying||guaranteeing +guarrantys||guarantees +guarrented||guaranteed +guarrenteed||guaranteed +guarrentee||guarantee +guarrenteeing||guaranteeing +guarrentees||guarantees +guarrente||guarantee +guarrenteing||guaranteeing +guarrentes||guarantees +guarrenty||guaranty +guaruanted||guaranteed +guaruanteed||guaranteed +guaruantee||guarantee +guaruanteeing||guaranteeing +guaruantees||guarantees +guaruante||guarantee +guaruanteing||guaranteeing +guaruantes||guarantees +guaruanty||guaranty +guarunted||guaranteed +guarunteed||guaranteed +guaruntee||guarantee +guarunteeing||guaranteeing +guaruntees||guarantees +guarunte||guarantee +guarunteing||guaranteeing +guaruntes||guarantees +guarunty||guaranty +guassian||Gaussian +guidline||guideline +guidlines||guidelines +guranteed||guaranteed +gurantee||guarantee +guranteeing||guaranteeing +gurantees||guarantees +hadling||handling +hahve||have +halfs||halves +hander||handler +handfull||handful +handleing||handling +handshacke||handshake +handshackes||handshakes +handshacking||handshaking +handshage||handshake +handshages||handshakes +handshaging||handshaking +handshak||handshake +handshakng||handshaking +handshakre||handshake +handshakres||handshakes +handshakring||handshaking +handshaks||handshakes +handshale||handshake +handshales||handshakes +handshaling||handshaking +handshare||handshake +handshares||handshakes +handsharing||handshaking +handshke||handshake +handshkes||handshakes +handshk||handshake +handshking||handshaking +handshkng||handshaking +handshks||handshakes +handwirting||handwriting +hanlded||handled +hanlde||handle +hanlder||handler +hanlders||handlers +hanldes||handles +hanlding||handling +hanldle||handle +hanled||handled +hanle||handle +hanles||handles +hanling||handling +hanshake||handshake +hanshakes||handshakes +hapend||happened +hapends||happens +hapened||happened +hapen||happen +hapening||happening +hapenned||happened +hapenn||happen +hapenning||happening +hapenns||happens +hapens||happens +happend||happened +happenned||happened +harcoded||hardcoded +harcode||hardcode +harcodes||hardcodes +harcoding||hardcoding +hard-wirted||hard-wired +hardwirted||hardwired +harware||hardware +has'nt||hasn't +have'nt||haven't +havent||haven't +havn't||haven't +hazzle||hassle +heigher||higher +heigt||height +heigth||height +heirarchical||hierarchical +heirarchically||hierarchically +heirarchies||hierarchies +heirarchy||hierarchy +helpfull||helpful +helpfuly||helpfully +hexidecimal||hexadecimal +hiddden||hidden +hidding||hiding +hiearchies||hierarchies +hiearchy||hierarchy +hierachical||hierarchical +hierachies||hierarchies +hierachy||hierarchy +hierarchie||hierarchy +higer||higher +higest||highest +high-affort||high-effort +highlighing||highlighting +highlightning||highlighting +highligted||highlighted +highligt||highlight +highligting||highlighting +highligts||highlights +hightlighted||highlighted +hightlight||highlight +hightlighting||highlighting +hightlights||highlights +higlighted||highlighted +higlight||highlight +higlighting||highlighting +higlights||highlights +hilighted||highlighted +hilight||highlight +hilighting||highlighting +hilights||highlights +hipotetical||hypothetical +hisory||history +homapage||homepage +homogenoues||homogeneous +hoook||hook +hoooks||hooks +hopefulle||hopefully +hopefull||hopefully +hopefullly||hopefully +hopefullt||hopefully +hopefullu||hopefully +hopefuly||hopefully +hopeing||hoping +hopmepage||homepage +hopmepages||homepages +hoppefully||hopefully +horicontal||horizontal +horicontally||horizontally +horzontal||horizontal +horzontally||horizontally +hovewer||however +howerver||however +howver||however +hsell||shell +hsould'nt||shouldn't +hsouldn't||shouldn't +hsould||should +htacccess||htaccess +hundrets||hundreds +hvae||have +hybernate||hibernate +hypenated||hyphenated +hypenate||hyphenate +hypenates||hyphenates +hypenating||hyphenating +hypenation||hyphenation +hypen||hyphen +hypens||hyphens +hyptothetical||hypothetical +hyptothetically||hypothetically +hypvervisor||hypervisor +hypvervisors||hypervisors +hypvisor||hypervisor +hypvisors||hypervisors +icluding||including +idelogy||ideology +identation||indentation +identifer||identifier +identifers||identifiers +identifyable||identifiable +identtation||indentation +identties||identities +identtifier||identifier +identty||identity +idicated||indicated +idicate||indicate +idicates||indicates +idicating||indicating +ignord||ignored +ignorgable||ignorable +ignorgd||ignored +ignorged||ignored +ignorge||ignore +ignorgg||ignoring +ignorgig||ignoring +ignorging||ignoring +ignorgs||ignores +ignormable||ignorable +ignormd||ignored +ignormed||ignored +ignorme||ignore +ignormg||ignoring +ignormig||ignoring +ignorming||ignoring +ignorms||ignores +ignornable||ignorable +ignornd||ignored +ignorned||ignored +ignorne||ignore +ignorng||ignoring +ignornig||ignoring +ignorning||ignoring +ignorns||ignores +ignorrable||ignorable +ignorrd||ignored +ignorred||ignored +ignorre||ignore +ignorrg||ignoring +ignorrig||ignoring +ignorring||ignoring +ignorrs||ignores +ignors||ignores +ignortable||ignorable +ignortd||ignored +ignorted||ignored +ignorte||ignore +ignortg||ignoring +ignortig||ignoring +ignorting||ignoring +ignorts||ignores +ignory||ignore +igored||ignored +igore||ignore +igores||ignores +igoring||ignoring +iif||if +imcomming||incoming +imediate||immediate +imediately||immediately +imediatly||immediately +imilar||similar +imlicit||implicit +imlicitly||implicitly +immadiate||immediate +immadiately||immediately +immadiatly||immediately +immeadiate||immediate +immeadiately||immediately +immedate||immediate +immedately||immediately +immediatelly||immediately +immediatlye||immediately +immediatly||immediately +immidiate||immediate +immmediate||immediate +immmediately||immediately +impementaion||implementation +impementaions||implementations +impementation||implementation +impementations||implementations +impemented||implemented +impement||implement +impementing||implementing +impementling||implementing +impementor||implementer +impements||implements +implemantation||implementation +implemememntation||implementation +implemememnt||implement +implemementation||implementation +implemementations||implementations +implememented||implemented +implemement||implement +implemementing||implementing +implemements||implements +implememetation||implementation +implememtation||implementation +implememtations||implementations +implememted||implemented +implememt||implement +implememting||implementing +implememts||implements +implemenationa||implementation +implemenationd||implementation +implemenation||implementation +implemenations||implementations +implemend||implement +implemends||implements +implemenetaion||implementation +implemenetaions||implementations +implemenetation||implementation +implemenetations||implementations +implemenetd||implemented +implemeneted||implemented +implemeneter||implementer +implemenet||implement +implemeneting||implementing +implemenets||implements +implemen||implement +implementaion||implementation +implementaions||implementations +implementaiton||implementation +implementaitons||implementations +implementataion||implementation +implementatation||implementation +implementated||implemented +implementates||implements +implementatin||implementation +implementatins||implementations +implementation-spacific||implementation-specific +implementatoin||implementation +implementaton||implementation +implementator||implementer +implementators||implementers +implementattion||implementation +implemention||implementation +implemetation||implementation +implemeted||implemented +implemet||implement +implemeting||implementing +implemets||implements +implemntation||implementation +implemntations||implementations +implentation||implementation +implentations||implementations +implented||implemented +implent||implement +implenting||implementing +implentors||implementers +implents||implements +implicitely||implicitly +implicity||implicitly +implimentation||implementation +implimentations||implementations +implimentation-spacific||implementation-specific +implimented||implemented +impliment||implement +implimenting||implementing +implimention||implementation +implimentions||implementations +implimentor||implementor +impliments||implements +implmenetaion||implementation +implmenetaions||implementations +implmenetation||implementation +implmenetations||implementations +implmenetd||implemented +implmeneted||implemented +implmeneter||implementer +implmenet||implement +implmeneting||implementing +implmenets||implements +implmentation||implementation +implmentations||implementations +implmented||implemented +implment||implement +implmenting||implementing +implments||implements +impossiblble||impossible +impoved||improved +impove||improve +impoves||improves +impoving||improving +impresive||impressive +improoved||improved +improove||improve +improoves||improves +improoving||improving +improovment||improvement +improovments||improvements +improvemenet||improvement +improvemenets||improvements +improvmenet||improvement +improvmenets||improvements +improvment||improvement +improvments||improvements +inacccessible||inaccessible +inaccesible||inaccessible +inaccuraccies||inaccuracies +inaccuraccy||inaccuracy +inadvertant||inadvertent +inadvertantly||inadvertently +inappropiate||inappropriate +incase||in case +incidently||incidentally +inclding||including +incldued||included +incldue||include +incldues||includes +inclued||included +inclue||include +inclues||includes +incluing||including +inclusinve||inclusive +incomaptible||incompatible +incombatibilities||incompatibilities +incombatibility||incompatibility +incomming||incoming +incommplete||incomplete +incompatabable||incompatible +incompatabiity||incompatibility +incompatabile||incompatible +incompatabilities||incompatibilities +incompatability||incompatibility +incompatabillity||incompatibility +incompatabilty||incompatibility +incompatabily||incompatibility +incompatable||incompatible +incompatablie||incompatibly +incompatablility||incompatibility +incompatablities||incompatibilities +incompatablitiy||incompatibility +incompatablity||incompatibility +incompatably||incompatibly +incompataibility||incompatibility +incompataible||incompatible +incompataility||incompatibility +incompatatbility||incompatibility +incompatatble||incompatible +incompatatible||incompatible +incompatbility||incompatibility +incompatiability||incompatibility +incompatiblities||incompatibilities +incompatiblity||incompatibility +incompleate||incomplete +incompleete||incomplete +incomptible||incompatible +inconsisent||inconsistent +inconsisently||inconsistently +inconsistancy||inconsistency +inconsistant||inconsistent +inconsistenly||inconsistently +inconvertable||inconvertible +inconvienient||inconvenient +inconvineance||inconvenience +inconvineances||inconveniences +inconvinence||inconvenience +inconvinences||inconveniences +inconviniance||inconvenience +inconviniances||inconveniences +inconvinience||inconvenience +inconviniences||inconveniences +inconviniency||inconvenience +inconviniencys||inconveniences +incoporated||incorporated +incoporate||incorporate +incoporates||incorporates +incoporating||incorporating +incoropate||incorporate +incoropates||incorporates +incorperated||incorporated +incorperate||incorporate +incorperates||incorporates +incorperating||incorporating +incorperation||incorporation +incorreclty||incorrectly +incorreect||incorrect +incorreectly||incorrectly +incosistent||inconsistent +increas||increase +incremenetd||incremented +incremeneted||incremented +incremenet||increment +incrmenetd||incremented +incrmeneted||incremented +incrmenet||increment +incrmental||incremental +incrmentally||incrementally +incrmented||incremented +incrment||increment +incrmenting||incrementing +incrments||increments +incuded||included +incude||include +incudes||includes +incuding||including +incure||incur +indeces||indices +indecies||indices +indempotent||idempotent +indendation||indentation +indended||intended +indentended||indented +indentical||identical +indentification||identification +indentified||identified +indentifies||identifies +indentify||identify +indentifying||identifying +indepandance||independence +indepdence||independence +indepdencente||independence +indepdendant||independent +indepdendantly||independently +indepdendence||independence +indepdendent||independent +indepdendently||independently +indepdendet||independent +indepdendetly||independently +indepdenence||independence +indepdenent||independent +indepdenently||independently +indepdented||independent +indepdentedly||independently +indepdent||independent +indepdently||independently +independance||independence +independant||independent +independantly||independently +independed||independent +independend||independent +independ||independent +independly||independently +independnent||independent +independnet||independent +independnt||independent +independntly||independently +independt||independent +independtly||independently +indepenendence||independence +indepenent||independent +indepenently||independently +indiated||indicated +indiate||indicate +indiates||indicates +indiating||indicating +indiciated||indicated +indiciate||indicate +indiciates||indicates +indiciating||indicating +indicte||indicate +indictes||indicates +indipendent||independent +indipendently||independently +indistiguishable||indistinguishable +indivdual||individual +indivdually||individually +individuelly||individually +indivudual||individual +indivudually||individually +indpendent||independent +indpendently||independently +inefficency||inefficiency +ineffient||inefficient +ineffiently||inefficiently +inegrated||integrated +inegrate||integrate +infered||inferred +infering||inferring +inferrence||inference +inflexable||inflexible +influeced||influenced +influece||influence +influeces||influences +influecing||influencing +infomation||information +informaion||information +informatiom||information +informations||information +informaton||information +informtion||information +infrasctructure||infrastructure +infromation||information +ingored||ignored +ingore||ignore +ingores||ignores +ingoring||ignoring +inheritence||inheritance +initail||initial +initailisation||initialisation +initailised||initialised +initailise||initialise +initailiser||initialiser +initailisers||initialisers +initailises||initialises +initailising||initialising +initailization||initialization +initailized||initialized +initailize||initialize +initailizer||initializer +initailizers||initializers +initailizes||initializes +initailizing||initializing +initailly||initially +initailsation||initialisation +initailsed||initialised +initailse||initialise +initailsiation||initialisation +initails||initials +initaily||initially +initailzation||initialization +initailzed||initialized +initailze||initialize +initailziation||initialization +inital||initial +initalisation||initialisation +initalised||initialised +initalise||initialise +initalises||initialises +initalising||initialising +initalization||initialization +initalized||initialized +initalize||initialize +initalizer||initializer +initalizes||initializes +initalizing||initializing +initals||initials +initators||initiators +initiailize||initialize +initializiation||initialization +initialsed||initialised +initialse||initialise +initialses||initialises +initialysed||initialised +initialyse||initialise +initialyses||initialises +initialysing||initialising +initialyzed||initialized +initialyze||initialize +initialyzes||initializes +initialyzing||initializing +initialzed||initialized +initialze||initialize +initialzes||initializes +initialzing||initializing +initiliased||initialised +initiliase||initialise +initiliases||initialises +initiliasing||initialising +initiliazed||initialized +initiliaze||initialize +initiliazes||initializes +initiliazing||initializing +initilisation||initialisation +initilisations||initialisations +initilised||initialised +initilise||initialise +initilises||initialises +initilising||initialising +initilization||initialization +initilizations||initializations +initilized||initialized +initilize||initialize +initilizes||initializes +initilizing||initializing +initliazed||initialized +initliaze||initialize +initliazer||initializer +inlcluded||included +inlclude||include +inlcludes||includes +inlcluding||including +inlcludion||inclusion +inlclusive||inclusive +inlcuded||included +inlcude||include +inlcudes||includes +inlcuding||including +inlcusion||inclusion +inlcusive||inclusive +inluded||included +inlude||include +inludes||includes +inluding||including +inludung||including +inlusive||inclusive +inmediate||immediate +inmediatelly||immediately +inmediately||immediately +inmediatily||immediately +inmediatly||immediately +in-memeory||in-memory +innactive||inactive +innacurate||inaccurate +innacurately||inaccurately +inofficial||unofficial +inoquous||innocuous +inportant||important +inprooved||improved +inproove||improve +inprooves||improves +inprooving||improving +inproovment||improvement +inproovments||improvements +inproper||improper +inproperly||improperly +inreractive||interactive +inscpeting||inspecting +insde||inside +insensistive||insensitive +insensistively||insensitively +insensitve||insensitive +insepected||inspected +insepect||inspect +insepection||inspection +insepects||inspects +insependent||independent +inseperable||inseparable +instad||instead +instaead||instead +instaed||instead +instalation||installation +instalations||installations +installationa||installation +installe||installer +instanciated||instantiated +instanciate||instantiate +instanciates||instantiates +instanciating||instantiating +instanciation||instantiation +instanciations||instantiations +ins't||isn't +instnace||instance +instnaces||instances +instnance||instance +instnances||instances +instnatiated||instantiated +instnatiation||instantiation +instnatiations||instantiations +instnat||instant +instnce||instance +instnces||instances +instnsiated||instantiated +instnsiation||instantiation +instnsiations||instantiations +instnt||instant +instntly||instantly +instrcutino||instruction +instrcutinos||instructions +instrcut||instruct +instrcution||instruction +instrcutions||instructions +instrcuts||instructs +instruciton||instruction +instrucitons||instructions +instrumenetation||instrumentation +instrumenetd||instrumented +instrumeneted||instrumented +instrumenet||instrument +intall||install +intance||instance +intances||instances +intead||instead +intedned||intended +inteface||interface +integreated||integrated +integrety||integrity +integrey||integrity +intendet||intended +intentended||intended +intentially||intentionally +intepretable||interpretable +intepretation||interpretation +intepretations||interpretations +intepretator||interpreter +intepreted||interpreted +intepreter||interpreter +intepreters||interpreters +intepretes||interprets +intepreting||interpreting +intepret||interpret +inteprets||interprets +interace||interface +interaces||interfaces +interactuable||interactive +interal||internal +interally||internally +interals||internals +interanl||internal +interanlly||internally +interator||iterator +interators||iterators +intercahnged||interchanged +intercahnge||interchange +interchage||interchange +interchangable||interchangeable +interchangably||interchangeably +intereference||interference +intereferences||interferences +interesected||intersected +interesecting||intersecting +interesect||intersect +interesection||intersection +interesections||intersections +interesects||intersects +interespersed||interspersed +interesseted||interested +interessted||interested +interessting||interesting +interesst||interest +interferance||interference +interferred||interfered +interferring||interfering +intergerated||integrated +interger||integer +interger's||integer's +intergers||integers +intermidiate||intermediate +intermittant||intermittent +intermperance||intemperance +internation||international +internel||internal +internels||internals +interopeable||interoperable +interpeted||interpreted +interpeter||interpreter +interpeters||interpreters +interpeting||interpreting +interpet||interpret +interpets||interprets +interpolaed||interpolated +interpolaion||interpolation +interpolaiton||interpolation +interpolar||interpolator +interpolayed||interpolated +interpretes||interprets +interpretor||interpreter +interpretter||interpreter +interracting||interacting +interract||interact +interractive||interactive +interracts||interacts +interrrupted||interrupted +interrrupting||interrupting +interrrupt||interrupt +interrrupts||interrupts +interruped||interrupted +interruping||interrupting +interrups||interrupts +intersecrion||intersection +intersting||interesting +interst||interest +intersts||interests +interupted||interrupted +interupting||interrupting +interupt||interrupt +interupts||interrupts +intiailised||initialised +intiailise||initialise +intiailises||initialises +intiailising||initialising +intiailized||initialized +intiailize||initialize +intiailizes||initializes +intiailizing||initializing +intiale||initial +intial||initial +intialisation||initialisation +intialised||initialised +intialise||initialise +intialiser||initialiser +intialisers||initialisers +intialises||initialises +intialising||initialising +intialistion||initialisation +intialization||initialization +intializaze||initialize +intialized||initialized +intialize||initialize +intializer||initializer +intializers||initializers +intializes||initializes +intializing||initializing +intializtion||initialization +intiallisation||initialisation +intiallisations||initialisations +intiallised||initialised +intiallization||initialization +intiallizations||initializations +intiallized||initialized +intiallly||initially +intially||initially +intialsed||initialised +intialse||initialise +intialsing||initialising +intials||initials +intialte||initialise +intialy||initially +intialzed||initialized +intialze||initialize +intialzing||initializing +intraversion||introversion +intravert||introvert +intraverts||introverts +intregral||integral +intrested||interested +intresting||interesting +intrest||interest +introsepectable||introspectable +introsepection||introspection +intrrupted||interrupted +intrrupting||interrupting +intrrupt||interrupt +intrrupts||interrupts +intruction||instruction +intructions||instructions +intrumented||instrumented +intrumenting||instrumenting +intrument||instrument +intruments||instruments +intuative||intuitive +invaid||invalid +invalide||invalid +invalud||invalid +invarient||invariant +invesitgated||investigated +invesitgating||investigating +invesitgation||investigation +invesitgations||investigations +invididual||individual +invidual||individual +invidually||individually +invloved||involved +invlove||involve +invloves||involves +invokation||invocation +invokations||invocations +invokved||invoked +invokve||invoke +invokves||invokes +invokving||invoking +involvment||involvement +irregularties||irregularities +irregulier||irregular +irregulierties||irregularities +irrelavent||irrelevant +irrelevent||irrelevant +irreplacable||irreplaceable +irreplacalbe||irreplaceable +irreproducable||irreproducible +irresepective||irrespective +isntallation||installation +isntallations||installations +isntance||instance +isntances||instances +is'nt||isn't +isnt||isn't +isssued||issued +isssue||issue +isssues||issues +issueing||issuing +istalling||installing +istead||instead +iterface||interface +iterfaces||interfaces +itf-8||utf-8 +itialised||initialised +itialise||initialise +itialises||initialises +itialized||initialized +itialize||initialize +itializes||initializes +itializing||initializing +itnerest||interest +itnerface||interface +itnerfaces||interfaces +itsef||itself +itselfs||itself +itsel||itself +itslef||itself +janurary||january +japanses||Japanese +JavaSciript||JavaScript +javascritp||javascript +jave||java +keept||kept +kenrel||kernel +keybaord||keyboard +keybaords||keyboards +keyboaard||keyboard +keyboaards||keyboards +keyboad||keyboard +keyboads||keyboards +keybooard||keyboard +keybooards||keyboards +keyborad||keyboard +keyborads||keyboards +keybord||keyboard +keybords||keyboards +keybroad||keyboard +keybroads||keyboards +keyowrd||keyword +keyworkd||keyword +keyworkds||keywords +keywork||keyword +keywprd||keyword +knowlege||knowledge +knwon||known +konw||know +konwn||known +konws||knows +lable||label +lables||labels +laguage||language +langage||language +langauage||language +langauge||language +langauges||languages +languace||language +languaces||languages +languae||language +languaes||languages +language-spacific||language-specific +languahe||language +languahes||languages +languaje||language +languajes||languages +languale||language +languales||languages +langualge||language +langualges||languages +langual||lingual +languange||language +languanges||languages +languaqe||language +languaqes||languages +languate||language +languates||languages +languauge||language +languauges||languages +languege||language +langueges||languages +langugae||language +langugaes||languages +langugage||language +langugages||languages +languge||language +languges||languages +langugue||language +langugues||languages +laoded||loaded +laoding||loading +laod||load +laods||loads +lauched||launched +laucher||launcher +lauches||launches +lauching||launching +lauch||launch +launck||launch +lazyness||laziness +lcoal||local +lcoally||locally +lcuase||clause +leagacy||legacy +leagalise||legalise +leagality||legality +leagalize||legalize +leagal||legal +leagcy||legacy +leage||league +leagelise||legalise +leagelity||legality +leagelize||legalize +leagel||legal +leageue||league +leaglise||legalise +leaglity||legality +leaglize||legalize +leagl||legal +leat||least +leats||least +legalimate||legitimate +leightweight||lightweight +lengh||length +lenghs||lengths +lenghtend||lengthened +lenghtened||lengthened +lenghtening||lengthening +lenghten||lengthen +lenghthen||lengthen +lenghth||length +lenghths||lengths +lenghthy||lengthy +lenght||length +lenghtly||lengthy +lenghts||lengths +lenghty||lengthy +lengthes||lengths +lenth||length +lesstiff||lesstif +leyer||layer +libaries||libraries +libary||library +libraarie||library +libraaries||libraries +libraary||library +librabarie||library +librabaries||libraries +librabary||library +librabie||library +librabies||libraries +librabrie||library +librabries||libraries +librabry||library +libraby||library +libraie||library +libraier||library +libraies||libraries +libraiesr||libraries +libraire||library +libraires||libraries +librairies||libraries +librairy||library +libralie||library +libralies||libraries +libraly||library +libraris||libraries +libratie||library +libraties||libraries +libraty||library +libray||library +librayr||library +licenceing||licencing +licese||license +lient||client +lients||clients +lightweigh||lightweight +lightwight||lightweight +ligth||light +likelyhood||likelihood +likewis||likewise +lik||link +limitiaion||limitation +limitiaions||limitations +limitiation||limitation +limitiations||limitations +limitied||limited +limitier||limiter +limitiers||limiters +limitiing||limiting +limitimg||limiting +limition||limitation +limitions||limitations +limitis||limits +limititation||limitation +limititations||limitations +limitited||limited +limititer||limiter +limititers||limiters +limititing||limiting +limted||limited +lincesed||licensed +lincese||license +linceses||licenses +linkfy||linkify +lintain||lintian +lising||listing +litle||little +littele||little +littel-endian||little-endian +littel||little +litterally||literally +litterate||literate +litterature||literature +locae||locate +locaes||locates +locaiing||locating +locailty||locality +locaing||locating +locaion||location +locaions||locations +locaised||localised +locaise||localise +locaiser||localiser +locaises||localises +locaite||locate +locaites||locates +locaiting||locating +locaition||location +locaitions||locations +locaiton||location +locaitons||locations +locaized||localized +locaize||localize +locaizer||localizer +locaizes||localizes +localation||location +localtion||location +localtions||locations +loding||loading +loggging||logging +loggin||login +logile||logfile +longers||longer +long-runnign||long-running +lon||long +lookes||looks +loosly||loosely +losely||loosely +lsit||list +lsits||lists +mabye||maybe +machanism||mechanism +machanisms||mechanisms +machinary||machinery +maching||matching +macpakge||package +mahcine||machine +maillinglist||mailing list +maillinglists||mailing lists +mailling||mailing +maintainance||maintenance +maintainence||maintenance +maintaing||maintaining +maintance||maintenance +maintan||maintain +maitained||maintained +maitain||maintain +makeing||making +malicously||maliciously +malicous||malicious +malplaced||misplaced +malplace||misplace +mamory||memory +managable||manageable +managemenet||management +managmenet||management +managment||management +manangement||management +manaully||manually +manaul||manual +manauls||manuals +mandatatory||mandatory +maneouvring||manoeuvring +mangement||management +mangementt||management +manifacture||manufacture +manifacturer||manufacturer +manifacturers||manufacturers +manipulatin||manipulating +maniuplated||manipulated +maniuplate||manipulate +maniuplates||manipulates +maniuplating||manipulating +maniuplation||manipulation +maniuplations||manipulations +maniuplator||manipulator +maniuplators||manipulators +mannually||manually +mannual||manual +mannualy||manually +manoeuvering||maneuvering +manouevring||manoeuvring +mantained||maintained +mantainer||maintainer +mantaining||maintaining +mantain||maintain +mantains||maintains +manualyl||manually +manualy||manually +manualyy||manually +manully||manually +manupulation||manipulation +manupulations||manipulations +manyally||manually +manyal||manual +manyals||manuals +mappping||mapping +mapppings||mappings +mashine||machine +mashines||machines +mata-data||meta-data +matadata||metadata +matainer||maintainer +matainers||maintainers +matchign||matching +matchin||matching +matcing||matching +mathimatical||mathematical +mathimatic||mathematic +mathimatics||mathematics +mavrick||maverick +maximimum||maximum +maxium||maximum +mazilla||Mozilla +meachanism||mechanism +meaninful||meaningful +meaningfull||meaningful +meanin||meaning +measuremenet||measurement +measuremenets||measurements +measurmenet||measurement +measurmenets||measurements +meatadata||metadata +meausure||measure +meausures||measures +meber||member +mecahinsm||mechanism +mecahinsms||mechanisms +mecahnic||mechanic +mecahnics||mechanics +mecahnism||mechanism +mecanism||mechanism +mecanisms||mechanisms +mechamism||mechanism +mechamisms||mechanisms +mechine||machine +mechines||machines +meens||means +memcahed||memcached +memcahe||memcache +memeasurement||measurement +memebered||remembered +memeber||member +memebership||membership +memeberships||memberships +memebers||members +memebr||member +memebrof||memberof +memebrs||members +memember||remember +memembers||members +mememory||memory +mememto||memento +memeory||memory +memer||member +memership||membership +memerships||memberships +memery||memory +menetion||mention +menioned||mentioned +mentiond||mentioned +mentionned||mentioned +mentionning||mentioning +mentionnned||mentioned +ment||meant +menue||menu +menues||menus +meny||many +mercahnt||merchant +merly||merely +merory||memory +mesage||message +mesages||messages +messags||messages +messanger||messenger +messangers||messengers +messge||message +messges||messages +messsage||message +messsages||messages +meta-attrubute||meta-attribute +meta-attrubutes||meta-attributes +metacharater||metacharacter +metacharaters||metacharacters +metapackge||metapackage +metapackges||metapackages +meta-progamming||meta-programming +metaprogamming||metaprogramming +microoseconds||microseconds +microprocesspr||microprocessor +migth||might +mikrosecond||microsecond +mikroseconds||microseconds +milisecond||millisecond +miliseconds||milliseconds +milleneum||millennium +millenialism||millennialism +millenial||millennial +millenials||millennials +millenia||millennia +millenium||millennium +millisencond||millisecond +millisenconds||milliseconds +milliseonds||milliseconds +millsencond||millisecond +millsenconds||milliseconds +mimicing||mimicking +mimick||mimic +mimicks||mimics +mimimise||minimise +mimimum||minimum +minimun||minimum +mininum||minimum +minium||minimum +miniums||minimums +minumum||minimum +mirgated||migrated +mirgate||migrate +mirgates||migrates +mirro||mirror +miscelaneous||miscellaneous +miscellanous||miscellaneous +miscelleneous||miscellaneous +misconfiged||misconfigured +misformed||malformed +mis-intepreted||mis-interpreted +misintepreted||misinterpreted +mis-intepret||mis-interpret +misintepret||misinterpret +mismached||mismatched +mismaches||mismatches +mismaching||mismatching +mismach||mismatch +mispelled||misspelled +mispelt||misspelt +missconfiguration||misconfiguration +missconfigured||misconfigured +missconfigure||misconfigure +missconfigures||misconfigures +missconfiguring||misconfiguring +missleading||misleading +missmatched||mismatched +missmatches||mismatches +missmatching||mismatching +missmatch||mismatch +missunderstood||misunderstood +mixure||mixture +mmnemonic||mnemonic +modfiable||modifiable +modfication||modification +modfications||modifications +modfided||modified +modfide||modified +modfider||modifier +modfiders||modifiers +modfides||modifies +modfied||modified +modfieid||modified +modfieir||modifier +modfieirs||modifiers +modfieis||modifies +modfier||modifier +modfiers||modifiers +modfies||modifies +modfifiable||modifiable +modfification||modification +modfifications||modifications +modfified||modified +modfifier||modifier +modfifiers||modifiers +modfifies||modifies +modfifying||modifying +modfify||modify +modfiiable||modifiable +modfiication||modification +modfiications||modifications +modfitied||modified +modfitier||modifier +modfitiers||modifiers +modfities||modifies +modfitying||modifying +modfity||modify +modfiying||modifying +modfiy||modify +modfying||modifying +modfy||modify +modifable||modifiable +modifaction||modification +modifactions||modifications +modifation||modification +modifations||modifications +modifcation||modification +modifcations||modifications +modifciation||modification +modifciations||modifications +modifcication||modification +modifcications||modifications +modifdy||modify +modifed||modified +modifer||modifier +modifers||modifiers +modifes||modifies +modiffer||modifier +modiffers||modifiers +modificatioon||modification +modifing||modifying +modifled||modified +modifler||modifier +modiflers||modifiers +modift||modify +modifty||modify +modifuable||modifiable +modifued||modified +modifu||modify +modifx||modify +modprobbing||modprobing +modprobeing||modprobing +modulues||modules +momement||moment +monochorome||monochrome +monochromo||monochrome +monocrome||monochrome +montly||monthly +morever||moreover +mor||more +moutned||mounted +moutning||mounting +moutn||mount +moutnpoint||mountpoint +moutnpoints||mountpoints +moutns||mounts +movemement||movement +movemements||movements +movememnt||movement +movememnts||movements +movememt||movement +movememts||movements +movemet||movement +movemets||movements +movemment||movement +movemments||movements +movemnet||movement +movemnets||movements +movemnt||movement +movemnts||movements +mozila||Mozilla +mroe||more +mssing||missing +mulitple||multiple +mulitplied||multiplied +multible||multiple +multi-dimenional||multi-dimensional +multidimenional||multi-dimensional +multi-dimenionsal||multi-dimensional +multidimenionsal||multi-dimensional +multidimensionnal||multidimensional +multidimentionnal||multidimensional +multi-langual||multi-lingual +multilangual||multilingual +multilpe||multiple +multipe||multiple +multipes||multiples +multipled||multiplied +multi-presistion||multi-precision +multipresistion||multiprecision +multi-threded||multi-threaded +multivriate||multivariate +multple||multiple +multplied||multiplied +multplies||multiplies +multplying||multiplying +multply||multiply +mumber||number +mumbers||numbers +musn't||mustn't +mutches||matches +mutch||much +mutiple||multiple +mutliple||multiple +myabe||maybe +myslef||myself +namemespace||namespace +namepsace||namespace +namepsaces||namespaces +nam||name +nams||names +nanosencond||nanosecond +nanosenconds||nanoseconds +navagate||navigate +navagating||navigating +navagation||navigation +navagitation||navigation +nead||need +necause||because +neccecarily||necessarily +neccecary||necessary +neccesarily||necessarily +neccesary||necessary +neccessarily||necessarily +neccessary||necessary +necesarily||necessarily +necesarrily||necessarily +necesarry||necessary +necesary||necessary +necessarilly||necessarily +necessar||necessary +necessay||necessary +necesserily||necessarily +necessery||necessary +nedded||needed +neede||needed +neeeded||needed +neeeding||needing +neeed||need +neeeds||needs +negatiotiable||negotiable +negatiotiated||negotiated +negatiotiate||negotiate +negatiotiates||negotiates +negatiotiating||negotiating +negatiotiation||negotiation +negatiotiations||negotiations +negatiotiator||negotiator +negatiotiators||negotiators +negatve||negative +negligable||negligible +negoable||negotiable +negoated||negotiated +negoate||negotiate +negoates||negotiates +negoatiable||negotiable +negoatiated||negotiated +negoatiate||negotiate +negoatiates||negotiates +negoatiating||negotiating +negoatiation||negotiation +negoatiations||negotiations +negoatiator||negotiator +negoatiators||negotiators +negoating||negotiating +negoation||negotiation +negoations||negotiations +negoator||negotiator +negoators||negotiators +negociable||negotiable +negociated||negotiated +negociate||negotiate +negociates||negotiates +negociating||negotiating +negociation||negotiation +negociations||negotiations +negociator||negotiator +negociators||negotiators +negogtiable||negotiable +negogtiated||negotiated +negogtiate||negotiate +negogtiates||negotiates +negogtiating||negotiating +negogtiation||negotiation +negogtiations||negotiations +negogtiator||negotiator +negogtiators||negotiators +negoitable||negotiable +negoitated||negotiated +negoitate||negotiate +negoitates||negotiates +negoitating||negotiating +negoitation||negotiation +negoitations||negotiations +negoitator||negotiator +negoitators||negotiators +negoptionsotiable||negotiable +negoptionsotiated||negotiated +negoptionsotiate||negotiate +negoptionsotiates||negotiates +negoptionsotiating||negotiating +negoptionsotiation||negotiation +negoptionsotiations||negotiations +negoptionsotiator||negotiator +negoptionsotiators||negotiators +negosiable||negotiable +negosiated||negotiated +negosiate||negotiate +negosiates||negotiates +negosiating||negotiating +negosiation||negotiation +negosiations||negotiations +negosiator||negotiator +negosiators||negotiators +negotable||negotiable +negotaiable||negotiable +negotaiated||negotiated +negotaiate||negotiate +negotaiates||negotiates +negotaiating||negotiating +negotaiation||negotiation +negotaiations||negotiations +negotaiator||negotiator +negotaiators||negotiators +negotaible||negotiable +negotaited||negotiated +negotaite||negotiate +negotaites||negotiates +negotaiting||negotiating +negotaition||negotiation +negotaitions||negotiations +negotaitor||negotiator +negotaitors||negotiators +negotated||negotiated +negotate||negotiate +negotates||negotiates +negotatiable||negotiable +negotatiated||negotiated +negotatiate||negotiate +negotatiates||negotiates +negotatiating||negotiating +negotatiation||negotiation +negotatiations||negotiations +negotatiator||negotiator +negotatiators||negotiators +negotatible||negotiable +negotatied||negotiated +negotatie||negotiate +negotaties||negotiates +negotating||negotiating +negotation||negotiation +negotations||negotiations +negotatior||negotiator +negotatiors||negotiators +negotator||negotiator +negotators||negotiators +negothiable||negotiable +negothiated||negotiated +negothiate||negotiate +negothiates||negotiates +negothiating||negotiating +negothiation||negotiation +negothiations||negotiations +negothiator||negotiator +negothiators||negotiators +negotible||negotiable +negoticable||negotiable +negoticated||negotiated +negoticate||negotiate +negoticates||negotiates +negoticating||negotiating +negotication||negotiation +negotications||negotiations +negoticator||negotiator +negoticators||negotiators +negotioable||negotiable +negotioated||negotiated +negotioate||negotiate +negotioates||negotiates +negotioating||negotiating +negotioation||negotiation +negotioations||negotiations +negotioator||negotiator +negotioators||negotiators +negotioble||negotiable +negotionable||negotiable +negotionated||negotiated +negotionate||negotiate +negotionates||negotiates +negotionating||negotiating +negotionation||negotiation +negotionations||negotiations +negotionator||negotiator +negotionators||negotiators +negotion||negotiation +negotions||negotiations +negotiotable||negotiable +negotiotated||negotiated +negotiotate||negotiate +negotiotates||negotiates +negotiotating||negotiating +negotiotation||negotiation +negotiotations||negotiations +negotiotator||negotiator +negotiotators||negotiators +negotioted||negotiated +negotiote||negotiate +negotiotes||negotiates +negotioting||negotiating +negotiotion||negotiation +negotiotions||negotiations +negotiotor||negotiator +negotiotors||negotiators +negotitable||negotiable +negotitaed||negotiated +negotitae||negotiate +negotitaes||negotiates +negotitaing||negotiating +negotitaion||negotiation +negotitaions||negotiations +negotitaor||negotiator +negotitaors||negotiators +negotitated||negotiated +negotitate||negotiate +negotitates||negotiates +negotitating||negotiating +negotitation||negotiation +negotitations||negotiations +negotitator||negotiator +negotitators||negotiators +negotited||negotiated +negotite||negotiate +negotites||negotiates +negotiting||negotiating +negotition||negotiation +negotitions||negotiations +negotitor||negotiator +negotitors||negotiators +negoziable||negotiable +negoziated||negotiated +negoziate||negotiate +negoziates||negotiates +negoziating||negotiating +negoziation||negotiation +negoziations||negotiations +negoziator||negotiator +negoziators||negotiators +neigbourhood||neighbourhood +neighbarhood||neighborhood +neighbarhoods||neighborhoods +neighbaring||neighboring +neighbar||neighbor +neighbars||neighbors +neighbborhood||neighborhood +neighbborhoods||neighborhoods +neighbboring||neighboring +neighbbor||neighbor +neighbbors||neighbors +neighbeard||neighborhood +neighbeards||neighborhoods +neighbehood||neighborhood +neighbehoods||neighborhoods +neighbeing||neighboring +neighbeod||neighborhood +neighbeods||neighborhoods +neighbeordhood||neighborhood +neighbeordhoods||neighborhoods +neighbeorhod||neighborhood +neighbeorhods||neighborhoods +neighbeorhood||neighborhood +neighbeorhoods||neighborhoods +neighbeor||neighbor +neighbeors||neighbors +neighbergh||neighbor +neighberghs||neighbors +neighberhhod||neighborhood +neighberhhods||neighborhoods +neighberhhood||neighborhood +neighberhhoods||neighborhoods +neighberhing||neighboring +neighberhodd||neighborhood +neighberhodds||neighborhoods +neighberhod||neighborhood +neighberhods||neighborhoods +neighberhooding||neighboring +neighberhood||neighborhood +neighberhoods||neighborhoods +neighberhoof||neighborhood +neighberhoofs||neighborhoods +neighberhoood||neighborhood +neighberhooods||neighborhoods +neighberhoor||neighbor +neighberhoors||neighbors +neighberhoud||neighborhood +neighberhouds||neighborhoods +neighbering||neighboring +neighber||neighbor +neighbers||neighbors +neighbes||neighbors +neighbethood||neighborhood +neighbethoods||neighborhoods +neighbet||neighbor +neighbets||neighbors +neighbeuing||neighbouring +neighbeurgh||neighbour +neighbeurghs||neighbours +neighbeurhing||neighbouring +neighbeurhooding||neighbouring +neighbeurhoor||neighbour +neighbeurhoors||neighbours +neighbeus||neighbours +neighbeuthood||neighbourhood +neighbeuthoods||neighbourhoods +neighbeut||neighbour +neighbeuts||neighbours +neighbhorhood||neighborhood +neighbhorhoods||neighborhoods +neighbhoring||neighboring +neighbhor||neighbor +neighbhors||neighbors +neighboard||neighborhood +neighboards||neighborhoods +neighbohood||neighborhood +neighbohoods||neighborhoods +neighboing||neighboring +neighbood||neighborhood +neighboods||neighborhoods +neighboordhood||neighborhood +neighboordhoods||neighborhoods +neighboorhod||neighborhood +neighboorhods||neighborhoods +neighboorhood||neighborhood +neighboorhoods||neighborhoods +neighbooring||neighboring +neighboor||neighbor +neighboors||neighbors +neighborgh||neighbor +neighborghs||neighbors +neighborhhod||neighborhood +neighborhhods||neighborhoods +neighborhhood||neighborhood +neighborhhoods||neighborhoods +neighborhing||neighboring +neighborhodd||neighborhood +neighborhodds||neighborhoods +neighborhod||neighborhood +neighborhods||neighborhoods +neighborhooding||neighboring +neighborhoof||neighborhood +neighborhoofs||neighborhoods +neighborhoood||neighborhood +neighborhooods||neighborhoods +neighborhoor||neighbor +neighborhoors||neighbors +neighborhoud||neighborhood +neighborhouds||neighborhoods +neighbos||neighbors +neighbothood||neighborhood +neighbothoods||neighborhoods +neighbot||neighbor +neighbots||neighbors +neighbouing||neighbouring +neighbourgh||neighbour +neighbourghs||neighbours +neighbourhhod||neighbourhood +neighbourhhods||neighbourhoods +neighbourhhood||neighbourhood +neighbourhhoods||neighbourhoods +neighbourhing||neighbouring +neighbourhodd||neighbourhood +neighbourhodds||neighbourhoods +neighbourhod||neighbourhood +neighbourhods||neighbourhoods +neighbourhooding||neighbouring +neighbourhoof||neighbourhood +neighbourhoofs||neighbourhoods +neighbourhoood||neighbourhood +neighbourhooods||neighbourhoods +neighbourhoor||neighbour +neighbourhoors||neighbours +neighbourhoud||neighbourhood +neighbourhouds||neighbourhoods +neighbous||neighbours +neighbouthood||neighbourhood +neighbouthoods||neighbourhoods +neighbout||neighbour +neighbouts||neighbours +neighbr||neighbor +neighbrs||neighbors +neighburhood||neighborhood +neighburhoods||neighborhoods +neighburing||neighboring +neighbur||neighbor +neighburs||neighbors +neigher||neither +neighobrhood||neighborhood +neighobrhoods||neighborhoods +neighobring||neighboring +neighobr||neighbor +neighobrs||neighbors +neighorhood||neighborhood +neighorhoods||neighborhoods +neighoring||neighboring +neighor||neighbor +neighors||neighbors +neighourhood||neighbourhood +neighourhoods||neighbourhoods +neighouring||neighbouring +neighour||neighbour +neighours||neighbours +neighrorhood||neighbourhood +neighrorhoods||neighbourhoods +neighroring||neighbouring +neighror||neighbour +neighrors||neighbours +neighrourhood||neighbourhood +neighrourhoods||neighbourhoods +neighrouring||neighbouring +neighrour||neighbour +neighrours||neighbours +neightborhood||neighborhood +neightborhoods||neighborhoods +neightboring||neighboring +neightbor||neighbor +neightbors||neighbors +neightbourhood||neighbourhood +neightbourhoods||neighbourhoods +neightbouring||neighbouring +neightbour||neighbour +neightbours||neighbours +neighter||neither +neight||neither +neightobrhood||neighborhood +neightobrhoods||neighborhoods +neightobring||neighboring +neightobr||neighbor +neightobrs||neighbors +nescessarily||necessarily +nescessary||necessary +nesesarily||necessarily +nessasary||necessary +nessecarilt||necessarily +nessecarily||necessarily +nessecarry||necessary +nessecary||necessary +nessesarily||necessarily +nessesary||necessary +nessessarily||necessarily +nessessary||necessary +netiher||neither +netowrk||network +netowrks||networks +netwplit||netsplit +netwroked||networked +netwrok||network +netwroks||networks +nevere||never +nework||network +neworks||networks +newtork||network +non-bloking||non-blocking +nonbloking||non-blocking +non-compleeted||non-completed +non-complient||non-compliant +non-corelated||correlated +nonexistant||nonexistent +non-exluded||non-excluded +non-indentended||non-indented +non-inmediate||non-immediate +non-inreractive||non-interactive +non-instnat||non-instant +non-meausure||non-measure +non-negatiotiable||non-negotiable +non-negatiotiated||non-negotiated +non-negoable||non-negotiable +non-negoated||non-negotiated +non-negoatiable||non-negotiable +non-negoatiated||non-negotiated +non-negociable||non-negotiable +non-negociated||non-negotiated +non-negogtiable||non-negotiable +non-negogtiated||non-negotiated +non-negoitable||non-negotiable +non-negoitated||non-negotiated +non-negoptionsotiable||non-negotiable +non-negoptionsotiated||non-negotiated +non-negosiable||non-negotiable +non-negosiated||non-negotiated +non-negotable||non-negotiable +non-negotaiable||non-negotiable +non-negotaiated||non-negotiated +non-negotaible||non-negotiable +non-negotaited||non-negotiated +non-negotated||non-negotiated +non-negotatiable||non-negotiable +non-negotatiated||non-negotiated +non-negotatible||non-negotiable +non-negotatied||non-negotiated +non-negothiable||non-negotiable +non-negothiated||non-negotiated +non-negotible||non-negotiable +non-negoticable||non-negotiable +non-negoticated||non-negotiated +non-negotioable||non-negotiable +non-negotioated||non-negotiated +non-negotioble||non-negotiable +non-negotionable||non-negotiable +non-negotionated||non-negotiated +non-negotiotable||non-negotiable +non-negotiotated||non-negotiated +non-negotiote||non-negotiated +non-negotitable||non-negotiable +non-negotitaed||non-negotiated +non-negotitated||non-negotiated +non-negotited||non-negotiated +non-negoziable||non-negotiable +non-negoziated||non-negotiated +non-priviliged||non-privileged +non-replacable||non-replaceable +non-replacalbe||non-replaceable +non-reproducable||non-reproducible +non-seperable||non-separable +nonseperable||non-separable +nontheless||nonetheless +non-trasparent||non-transparent +non-virutal||non-virtual +noone||no one +normalyl||normally +normalyly||normally +normaly||normally +normalysed||normalised +normalyy||normally +normalyzed||normalized +normlly||normally +notfication||notification +notfications||notifications +nothern||northern +nothigng||nothing +nothign||nothing +noticable||noticeable +noticably||noticeably +notications||notifications +noticible||noticeable +notifcation||notification +notifcations||notifications +notifed||notified +notifiying||notifying +notifiy||notify +notmutch||notmuch +nott||not +nowdays||nowadays +ntification||notification +nubmer||number +nubmers||numbers +numberal||numeral +numberals||numerals +numebering||numbering +numeber||number +numebers||numbers +numebr||number +numebrs||numbers +numerial||numeral +numering||numbering +numner||number +numners||numbers +nunber||number +nunbers||numbers +obay||obey +obeserve||observe +objump||objdump +obselete||obsolete +observered||observed +obsolted||obsoleted +obsolte||obsolete +obsure||obscure +obtaiend||obtained +obvisously||obviously +obvisous||obvious +o'caml||OCaml +ocassional||occasional +occasionaly||occasionally +occassionally||occasionally +occationally||occasionally +occoured||occurred +occouring||occurring +occour||occur +occourring||occurring +occours||occurs +occuracy||accuracy +occurance||occurrence +occurances||occurrences +occurately||accurately +occured||occurred +occurence||occurrence +occurences||occurrences +occure||occur +occuring||occurring +occurrance||occurrence +occurrances||occurrences +ocorrence||ocurrence +ocorrences||ocurrences +octects||octets +ocupied||occupied +ocupies||occupies +ocupying||occupying +ocupy||occupy +ocurrence||occurrence +ocurrences||occurrences +odly||oddly +ofcource||of course +offerd||offered +offet||offset +offets||offsets +offical||official +officialy||officially +ofo||of +ofthe||of the +ohter||other +ohters||others +ohterwise||otherwise +oiginally||originally +oiginal||original +oiginals||originals +oiginating||originating +oigin||origin +oigins||origins +omiting||omitting +omitt||omit +ommited||omitted +ommiting||omitting +ommit||omit +ommits||omits +ommitted||omitted +ommitting||omitting +one-dimenional||one-dimensional +onedimenional||one-dimensional +one-dimenionsal||one-dimensional +onedimenionsal||one-dimensional +onself||oneself +ontain||contain +ontained||contained +ontainer||container +ontainers||containers +ontainging||containing +ontaining||containing +ontainor||container +ontainors||containers +ontains||contains +onthe||on the +ontrolled||controlled +opague||opaque +opeaaration||operation +opeaarations||operations +opeabcration||operation +opeabcrations||operations +opearand||operand +opearands||operands +opearate||operate +opearates||operates +opearating||operating +opearation||operation +opearations||operations +opearatios||operations +opearator||operator +opearators||operators +opearion||operation +opearions||operations +opearios||operations +opeariton||operation +opearitons||operations +opearitos||operations +opearnd||operand +opearnds||operands +opearor||operator +opearors||operators +opearted||operated +opearte||operate +opeartes||operates +opearting||operating +opeartion||operation +opeartions||operations +opeartios||operations +opeartor||operator +opeartors||operators +opeate||operate +opeates||operates +opeational||operational +opeation||operation +opeations||operations +opeatios||operations +opeator||operator +opeators||operators +opeatror||operator +opeatrors||operators +opeing||opening +opeings||openings +openened||opened +openned||opened +openning||opening +operatation||operation +operatations||operations +opertaion||operation +opertaions||operations +opion||option +opions||options +opiton||option +opitons||options +oppinion||opinion +oppinions||opinions +optet||opted +optimizier||optimizer +optinally||optionally +optinal||optional +optioinal||optional +optioin||option +optioins||options +optionaly||optionally +optionnal||optional +optionnaly||optionally +optio||option +optmisation||optimisation +optmisations||optimisations +optmization||optimization +optmizations||optimizations +orderd||ordered +orginally||originally +orginal||original +orginals||originals +orginated||originated +orginate||originate +orginates||originates +orginating||originating +orginially||originally +orginial||original +orginials||originals +orginiated||originated +orginiate||originate +orginiates||originates +orgininal||original +orgininals||originals +orginisation||organisation +orginisations||organisations +orginised||organised +orginization||organization +orginizations||organizations +orginized||organized +orgin||origin +orgins||origins +orginx||originx +orginy||originy +orientatied||orientated +oriente||oriented +orientied||oriented +originially||originally +originial||original +originiated||originated +originiating||originating +origininal||original +origininated||originated +origininate||originate +origininates||originates +origininating||originating +origining||originating +origionally||originally +origional||original +orignal||original +oscilated||oscillated +oscilate||oscillate +oscilating||oscillating +otehr||other +oter||other +otherise||otherwise +otheriwse||otherwise +otherwaise||otherwise +otherways||otherwise +otherweise||otherwise +otherweis||otherwise +otherwhere||elsewhere +otherwhile||otherwise +otherwhise||otherwise +otherwose||otherwise +otherwrite||overwrite +otherwse||otherwise +otherwsie||otherwise +otherwsise||otherwise +otherws||otherwise +otherwuise||otherwise +otherwwise||otherwise +otherwyse||otherwise +othewise||otherwise +othwerwise||otherwise +ot||to +ouptut||output +ouput||output +ouputs||outputs +ouputted||outputted +ouputting||outputting +ouside||outside +outperfoeming||outperforming +outperfoem||outperform +outperfomeing||outperforming +outperfome||outperform +outperfoming||outperforming +outperfom||outperform +outperfomring||outperforming +outperfomr||outperform +outpus||output +outpust||output +outpusts||outputs +outputing||outputting +outtermost||outermost +outter||outer +outut||output +outweight||outweigh +outweights||outweighs +oveflowed||overflowed +oveflowing||overflowing +oveflow||overflow +oveflows||overflows +overaall||overall +overal||overall +over-engeneering||over-engineering +overengeneering||overengineering +over-engeneer||over-engineer +overengeneer||overengineer +overiddden||overridden +overidden||overridden +overiden||overridden +overide||override +overides||overrides +overiding||overriding +overlaped||overlapped +overlaping||overlapping +overreidden||overridden +overreide||override +overreides||overrides +overridded||overridden +overridding||overriding +overrided||overridden +overriden||overridden +overrident||overridden +overrriddden||overridden +overrridden||overridden +overrriden||overridden +overrride||override +overrrides||overrides +overrriding||overriding +oversubscibed||oversubscribed +oversubscibe||oversubscribe +overun||overrun +overvride||override +overvrides||overrides +overvrite||overwrite +overvrites||overwrites +overwirte||overwrite +overwirting||overwriting +overwirtten||overwritten +overwite||overwrite +overwites||overwrites +overwitten||overwritten +overwriten||overwritten +ovride||override +ovrides||overrides +ovverridden||overridden +ovverride||override +ovverrides||overrides +ovverriding||overriding +owership||ownership +owervrite||overwrite +owervrites||overwrites +owerwrite||overwrite +owerwrites||overwrites +ownward||onward +ownwer||owner +ownwership||ownership +pacakge||package +pacakges||packages +pachage||package +pach||patch +pachtches||patches +pachtes||patches +pacht||patch +pacjage||package +pacjages||packages +packacge||package +packaege||package +packaeges||packages +packaeg||package +packaegs||packages +packege||package +packe||packed +packged||packaged +packgement||packaging +packge||package +packges'||packages' +packges||packages +packhage||package +packhages||packages +pakage||package +pakages||packages +pakge||package +pakvage||package +palete||palette +pallete||palette +pallette||palette +paniced||panicked +panicing||panicking +pannel||panel +pannels||panels +paralellism||parallelism +paralellization||parallelization +paralell||parallel +paralel||parallel +parallell||parallel +parallely||parallelly +parallization||parallelization +parallized||parallelized +parallize||parallelize +parallizes||parallelizes +parallizing||parallelizing +paramameters||parameters +paramater||parameter +paramaters||parameters +paramemeter||parameter +paramemeters||parameters +paramenet||parameter +paramenets||parameters +parametes||parameters +parametised||parametrised +paramter||parameter +paramters||parameters +parantheses||parentheses +paranthesis||parenthesis +paravirutalisation||paravirtualisation +paravirutalised||paravirtualised +paravirutalise||paravirtualise +paravirutalization||paravirtualization +paravirutalized||paravirtualized +paravirutalize||paravirtualize +paremeter||parameter +paremeters||parameters +paremter||parameter +paremters||parameters +parenthesed||parenthesized +parenthsis||parenthesis +paritial||partial +parititioning||partitioning +paritition||partition +parititions||partitions +parrallel||parallel +particalarly||particularly +particalar||particular +particale||particle +particales||particles +partically||partially +partical||partial +particals||particles +particaluarly||particularly +particaluar||particular +particalurly||particularly +particalur||particular +particant||participant +particaularly||particularly +particaular||particular +particaulrly||particularly +particaulr||particular +particuarly||particularly +particuar||particular +particularily||particularly +particulary||particularly +partioning||partitioning +partion||partition +partitial||partial +partiton||partition +pased||passed +pasteing||pasting +pasword||password +patcket||packet +patern||pattern +pathes||paths +pathign||pathing +pathnme||pathname +paticularly||particularly +paticular||particular +pecularities||peculiarities +pecularity||peculiarity +pedning||pending +peformance||performance +peicemeal||piecemeal +peice||piece +peices||pieces +peicewise||piecewise +penalities||penalties +penality||penalty +pendantic||pedantic +peprocessor||preprocessor +peraphs||perhaps +perfecctly||perfectly +perfecct||perfect +perfeclty||perfectly +perfecly||perfectly +perfec||perfect +perfectably||perfectly +perferable||preferable +perferably||preferably +perferance||preference +perferances||preferences +perferctly||perfectly +perferct||perfect +perferectly||perfectly +perferect||perfect +perfered||preferred +perference||preference +perferences||preferences +perfermance||performance +perfermances||performances +perfermence||performance +perfermences||performances +perferm||perform +perfer||prefer +perferrable||preferable +perferrably||preferably +perferrance||preference +perferrances||preferences +perferred||preferred +perferrence||preference +perferrences||preferences +perferrmance||performance +perferrmances||performances +perferrmence||performance +perferrmences||performances +perferrm||perform +perferr||prefer +perferrs||prefers +perfers||prefers +perfoemamce||performance +perfoemamces||performances +perfoemance||performance +perfoemanse||performance +perfoemanses||performances +perfoemant||performant +perfoemative||performative +perfoemed||performed +perfoemer||performer +perfoemers||performers +perfoeming||performing +perfoemnace||performance +perfoemnaces||performances +perfoem||perform +perfoems||performs +perfomamce||performance +perfomamces||performances +perfomance||performance +perfomanse||performance +perfomanses||performances +perfomant||performant +perfomative||performative +perfomeamce||performance +perfomeamces||performances +perfomeance||performance +perfomeanse||performance +perfomeanses||performances +perfomeant||performant +perfomeative||performative +perfomed||performed +perfomeed||performed +perfomeer||performer +perfomeers||performers +perfomeing||performing +perfomenace||performance +perfomenaces||performances +perfome||perform +perfomer||performer +perfomers||performers +perfomes||performs +perfoming||performing +perfomnace||performance +perfomnaces||performances +perfom||perform +perfomramce||performance +perfomramces||performances +perfomrance||performance +perfomranse||performance +perfomranses||performances +perfomrant||performant +perfomrative||performative +perfomred||performed +perfomrer||performer +perfomrers||performers +perfomring||performing +perfomrnace||performance +perfomrnaces||performances +perfomr||perform +perfomrs||performs +perfoms||performs +performace||performance +performnace||performance +perfromance||performance +perfromed||performed +perfroming||performing +perfrom||perform +perfroms||performs +peristent||persistent +perlciritc||perlcritic +permanantly||permanently +permanant||permanent +permision||permission +permisions||permissions +permissable||permissible +permissons||permissions +permuation||permutation +permuations||permutations +peroid||period +peroids||periods +perrror||perror +persepctive||perspective +persepective||perspective +persepectives||perspectives +persistance||persistence +persistant||persistent +personnal||personal +pertubation||perturbation +perviously||previously +pervious||previous +phasepsace||phasespace +phillipines||philippines +phisosophy||philosophy +phyiscally||physically +phyiscal||physical +phyiscs||physics +physicaly||physically +piggypacked||piggybacked +piority||priority +pitty||pity +placemenet||placement +placmenet||placement +plaform||platform +plaforms||platforms +plase||please +platfarm||platform +platfarms||platforms +platfform||platform +platfforms||platforms +platflorm||platform +platflorms||platforms +platform-spacific||platform-specific +platformt||platforms +platfrom||platform +platfroms||platforms +platofmr||platform +platofmrs||platforms +platofms||platform +platofmss||platforms +platoform||platform +platoforms||platforms +platofrm||platform +platofrms||platforms +plattform||platform +plattforms||platforms +playble||playable +pleaase||please +pleaee||please +pleae||please +pleaes||please +ploting||plotting +pluign||plugin +pluigns||plugins +poentially||potentially +poential||potential +poentials||potentials +poinnter||pointer +poiter||pointer +poiters||pointers +poluted||polluted +polute||pollute +polutes||pollutes +poluting||polluting +polution||pollution +poointed||pointed +poointer||pointer +pooint||point +pooints||points +popoen||popen +popullated||populated +popullate||populate +popuplarity||popularity +popuplar||popular +popuplated||populated +popuplate||populate +popuplates||populates +popuplating||populating +popuplation||population +porgrammeer||programmer +porgrammeers||programmers +porgramming||programming +porgram||program +porgrams||programs +porjection||projection +porject||project +porjects||projects +portguese||Portuguese +portugese||Portuguese +poseesions||possessions +posessing||possessing +posibilities||possibilities +posibility||possibility +posible||possible +positionned||positioned +positionn||position +positon||position +positons||positions +positve||positive +positves||positives +POSIX-complient||POSIX-compliant +possesion||possession +possibe||possible +possibile||possible +possibilites||possibilities +possibilties||possibilities +possibilty||possibility +possibily||possibly +possiblble||possible +possiblities||possibilities +possiblity||possibility +possiblly||possibly +possilbe||possible +possitive||positive +possitives||positives +postcondtion||postcondition +postcondtions||postconditions +postgressql||PostgreSQL +postion||position +postions||positions +postive||positive +postives||positives +post-morten||post-mortem +postscritp||postscript +potentailly||potentially +potentail||potential +potentails||potentials +potentally||potentially +potental||potential +powerfull||powerful +pracitcally||practically +pracitcal||practical +practicaly||practically +pratically||practically +pratical||practical +prcesses||processes +prcess||process +prdpagated||propagated +prdpagate||propagate +prdpagates||propagates +prdpagating||propagating +prdpagation||propagation +prdpagations||propagations +prdpagator||propagator +prdpagators||propagators +preambule||preamble +preaprooved||preapproved +precacheed||precached +preceeded||preceded +preceeding||preceding +preceed||precede +preceeds||precedes +precence||presence +precendance||precedence +precendances||precedences +precendece||precedence +precendeces||precedences +precendence||precedence +precendences||precedences +precendencies||precedences +precendent||precedent +precende||precedence +precendes||precedences +precending||preceding +precends||precedence +precenence||preference +precenences||preferences +precense||presence +precison||precision +precission||precision +pre-condifured||pre-configured +pre-condifure||pre-configure +precondtioner||preconditioner +precondtioners||preconditioners +precondtionner||preconditioner +precondtionners||preconditioners +precondtion||precondition +precondtions||preconditions +pre-confifured||pre-configured +pre-confifure||pre-configure +preconfiged||preconfigured +pre-confured||pre-configured +pre-confure||pre-configure +pre-congifured||pre-configured +pre-congifure||pre-configure +precuation||precaution +predeclarnig||predeclaring +pre-defiend||pre-defined +predefiend||predefined +pre-defiened||pre-defined +predefiened||predefined +predicitons||predictions +predifined||predefined +preesnt||present +prefectly||perfectly +prefered||preferred +preferrable||preferable +preferrably||preferably +prefferable||preferable +prefferably||preferably +preffered||prefered +preformance||performance +prepaired||prepared +prepartion||preparation +prepartions||preparations +pre-pre-realease||pre-pre-release +prepresented||represented +prepresent||represent +prepresents||represents +pre-realease||pre-release +pre-registeres||pre-registers +prerequisit||prerequisite +prerequisits||prerequisites +prerequsite||prerequisite +prerequsites||prerequisites +prescrition||prescription +prescritions||prescriptions +presense||presence +presistable||persistable +presistance||persistence +presistantly||persistently +presistant||persistent +presisted||persisted +presistence||persistence +presistency||persistency +presistently||persistently +presistent||persistent +presisting||persisting +presistion||precision +presist||persist +presists||persists +pressentation||presentation +pressented||presented +pressent||present +preverve||preserve +prevew||preview +prevews||previews +previlege||privilege +previos||previous +prevously||previously +prevous||previous +prferable||preferable +prferables||preferables +prference||preference +prfer||prefer +prferred||preferred +priciple||principle +priciples||principles +primative||primitive +princliple||principle +priorty||priority +priveleged||privileged +privelege||privilege +priveleges||privileges +privide||provide +privilaged||privileged +privilage||privilege +privilages||privileges +priviledge||privilege +priviledges||privileges +priviliged||privileged +privilige||privilege +priviliges||privileges +probaly||probably +probbably||probably +probbailities||probabilities +probbaility||probability +probbaly||probably +probbed||probed +probblem||problem +probblems||problems +probblez||problem +probblezs||problems +probbly||probably +probelmatic||problematic +probelm||problem +probelms||problems +proberly||properly +problably||probably +problimatic||problematic +problme||problem +problmes||problems +procceed||proceed +proccesors||processors +proccesses||processes +proccess||process +proceded||proceeded +procede||proceed +procedes||proceeds +proceding||proceeding +proceedure||procedure +proceedures||procedures +proceeeded||proceeded +proceeeding||proceeding +proceeed||proceed +proceeeds||proceeds +procesed||processed +proceses||processes +procesor||processor +proces||process +processessing||processing +processess||processes +processig||processing +processpr||processor +processsed||processed +processses||processes +processsing||processing +processs||process +procided||provided +procide||provide +proctected||protected +proctecting||protecting +proctect||protect +proctects||protects +procude||produce +producable||producible +producables||producibles +progagated||propagated +progagate||propagate +progagates||propagates +progagating||propagating +progagation||propagation +progagations||propagations +progagator||propagator +progagators||propagators +progamability||programmability +progamable||programmable +progamatically||programmatically +progamatic||programmatic +progamed||programmed +progamer||programmer +progamers||programmers +progaming||programming +progammability||programmability +progammable||programmable +progammatically||programmatically +progammatic||programmatic +progammed||programmed +progammer||programmer +progammers||programmers +progamming||programming +progamm||program +progamms||programs +progam||program +progams||programs +progapated||propagated +progapate||propagate +progapates||propagates +progapating||propagating +progapation||propagation +progapations||propagations +progapator||propagator +progapators||propagators +progarammability||programmability +progarammable||programmable +progarammatically||programmatically +progarammatic||programmatic +progarammed||programmed +progarammer||programmer +progarammers||programmers +progaramming||programming +progaramm||program +progaramms||programs +progarmability||programmability +progarmable||programmable +progarmatically||programmatically +progarmatic||programmatic +progarmed||programmed +progarmer||programmer +progarmers||programmers +progarming||programming +progarm||program +progarms||programs +progated||propagated +progate||propagate +progates||propagates +progating||propagating +progation||propagation +progations||propagations +progessbar||progressbar +progesses||progresses +progessive||progressive +progessor||progressor +progess||progress +progesss||progress +programatically||programmatically +programatic||programmatic +programemer||programmer +programemers||programmers +programmend||programmed +programm||program +programms||programs +progresss||progress +progrmae||program +prohibted||prohibited +prohibting||prohibiting +prohibt||prohibit +prohibts||prohibits +projction||projection +projctions||projections +projctor||projector +projctors||projectors +projct||project +projct's||project's +projcts||projects +promiscous||promiscuous +prommpt||prompt +prommpts||prompts +promps||prompts +promt||prompt +promts||prompts +pronnounced||pronounced +prononciation||pronunciation +pronouce||pronounce +pronounciation||pronunciation +pronunce||pronounce +proocecure||procedure +proocecures||procedures +proocedure||procedure +proocedures||procedures +proocessed||processed +proocesses||processes +proocessing||processing +proocess||process +proocol||protocol +proocols||protocols +prooduced||produced +prooduce||produce +prooduces||produces +prooduct||product +prooerties||properties +prooerty||property +prool||pool +prooof||proof +prooperly||properly +prooper||proper +prooperties||properties +prooperty||property +proosed||proposed +proose||propose +prooses||proposes +prooved||proved +prooven||proven +proove||prove +prooves||proves +prooving||proving +proovread||proofread +prooxies||proxies +prooxy||proxy +propator||propagator +propators||propagators +properies||properties +properteis||properties +propery||property +propigate||propagate +propigation||propagation +propogated||propagated +propogate||propagate +propogates||propagates +propogating||propagating +proprogated||propagated +proprogate||propagate +proprogates||propagates +proprogating||propagating +proprogation||propagation +proprogations||propagations +proprogator||propagator +proprogators||propagators +prosess||process +protable||portable +protcol||protocol +protecion||protection +protocal||protocol +protocals||protocols +protocoll||protocol +protoype||prototype +protoypes||prototypes +prposed||proposed +prpose||propose +prposer||proposer +prposers||proposers +prposes||proposes +prposiing||proposing +psace||space +psaces||spaces +psaswd||passwd +pseudopoential||pseudopotential +pseudopoentials||pseudopotentials +psuedo||pseudo +psychadelic||psychedelic +pthred||pthread +pthreds||pthreads +publcation||publication +publcise||publicise +publcize||publicize +publc||public +publicaly||publicly +publshed||published +publsher||publisher +publshing||publishing +publsh||publish +publsihed||published +publsiher||publisher +publsihing||publishing +publsih||publish +publucation||publication +publuc||public +puplarity||popularity +puplar||popular +puplated||populated +puplate||populate +puplates||populates +puplating||populating +puplation||population +purcahed||purchased +purcahse||purchase +pusehd||pushed +pyhon||python +pyrhon||python +pytnon||python +pytohn||python +pyton||python +pytyon||python +Pytyon||Python +qouted||quoted +qoute||quote +qoutes||quotes +qouting||quoting +quartically||quadratically +queing||queueing +quering||querying +quesitonable||questionable +quesiton||question +quesitons||questions +questoins||questions +quiting||quitting +quitt||quit +raspoberry||raspberry +rathern||rather +reacahable||reachable +reacahble||reachable +reachs||reaches +readabilty||readability +readapted||re-adapted +READEME||README +readiable||readable +realeased||released +realease||release +realeases||releases +realiy||really +reallllly||really +reallocae||reallocate +reallocaes||reallocates +reallocaiing||reallocating +reallocaing||reallocating +reallocaion||reallocation +reallocaions||reallocations +reallocaite||reallocate +reallocaites||reallocates +reallocaiting||reallocating +reallocaition||reallocation +reallocaitions||reallocations +reallocaiton||reallocation +reallocaitons||reallocations +realtion||relation +realtions||relations +reamde||README +reappered||reappeared +reappering||reappearing +reapper||reappear +rearranable||rearrangeable +rearraned||rearranged +rearranement||rearrangement +rearranements||rearrangements +rearranent||rearrangement +rearranents||rearrangements +rearrane||rearrange +rearranes||rearranges +rearrangable||rearrangeable +rearrangaeble||rearrangeable +rearrangaelbe||rearrangeable +rearrangde||rearranged +rearrangd||rearranged +rearrangent||rearrangement +rearrangents||rearrangements +rearrangmeent||rearrangement +rearrangmeents||rearrangements +rearrangmenet||rearrangement +rearrangmenets||rearrangements +rearrangment||rearrangement +rearrangments||rearrangements +rearrangnig||rearranging +rearrangning||rearranging +rearrang||rearrange +rearrangse||rearranges +rearrangs||rearranges +rearrangteable||rearrangeable +rearrangteables||rearrangeables +rearrangted||rearranged +rearrangtement||rearrangement +rearrangtements||rearrangements +rearrangte||rearrange +rearrangtes||rearranges +rearrangting||rearranging +rearrangt||rearrangement +rearrangts||rearrangements +rearraning||rearranging +rearranment||rearrangement +rearranments||rearrangements +rearrant||rearrangement +rearrants||rearrangements +reasearcher||researcher +reasearchers||researchers +reasearch||research +reasonble||reasonable +reasonbly||reasonably +reasonnable||reasonable +reasonnably||reasonably +re-attachement||re-attachment +reattachement||reattachment +rebuit||rebuilt +rebulding||rebuilding +rebuld||rebuild +rebulds||rebuilds +rebuliding||rebuilding +rebulid||rebuild +rebulids||rebuilds +rebulit||rebuilt +recahed||reached +reccommendation||recommendation +reccommendations||recommendations +reccommended||recommended +reccommending||recommending +reccommend||recommend +reccommends||recommends +recconeccted||reconnected +recconeccting||reconnecting +recconecction||reconnection +recconecctions||reconnections +recconecct||reconnect +recconeccts||reconnects +recconected||reconnected +recconecting||reconnecting +recconection||reconnection +recconections||reconnections +recconect||reconnect +recconects||reconnects +recconeected||reconnected +recconeecting||reconnecting +recconeection||reconnection +recconeections||reconnections +recconeect||reconnect +recconeects||reconnects +recconencted||reconnected +recconencting||reconnecting +recconenction||reconnection +recconenctions||reconnections +recconenct||reconnect +recconencts||reconnects +recconeted||reconnected +recconeting||reconnecting +recconetion||reconnection +recconetions||reconnections +recconet||reconnect +recconets||reconnects +receieved||received +receieve||receive +receieves||receives +receieving||receiving +recenet||recent +recenlty||recently +recenly||recently +recepient||recipient +recepients||recipients +receved||received +receve||receive +receves||receives +recevied||received +recevie||receive +recevies||receives +receving||receiving +rechek||recheck +recieved||received +recieve||receive +reciever||receiver +recieves||receives +recieving||receiving +recipies||recipes +reciprocoal||reciprocal +reciprocoals||reciprocals +recived||received +recive||receive +recives||receives +reciving||receiving +recod||record +recogized||recognized +recogize||recognize +recogizes||recognizes +recogizing||recognizing +recogniced||recognised +recogninse||recognise +recognizeable||recognizable +recomended||recommended +recomending||recommending +recomend||recommend +recomends||recommends +recommaded||recommended +recommad||recommend +recommanded||recommended +recommand||recommend +recommands||recommends +recommded||recommended +recommdended||recommended +recommdend||recommend +recommdends||recommends +recommd||recommend +recommds||recommends +recommeded||recommended +recommeding||recommending +recommed||recommend +recommeds||recommends +recommened||recommended +recommented||recommended +recommmended||recommended +recommmend||recommend +recommmends||recommends +recommnded||recommended +recommnd||recommend +recommnds||recommends +recommneded||recommended +recommned||recommend +recommneds||recommends +recommpiled||recompiled +recommpile||recompile +recondifure||reconfigure +reconeccted||reconnected +reconeccting||reconnecting +reconecction||reconnection +reconecctions||reconnections +reconecct||reconnect +reconeccts||reconnects +reconected||reconnected +reconecting||reconnecting +reconection||reconnection +reconections||reconnections +reconect||reconnect +reconects||reconnects +reconeected||reconnected +reconeecting||reconnecting +reconeection||reconnection +reconeections||reconnections +reconeect||reconnect +reconeects||reconnects +reconencted||reconnected +reconencting||reconnecting +reconenction||reconnection +reconenctions||reconnections +reconenct||reconnect +reconencts||reconnects +reconeted||reconnected +reconeting||reconnecting +reconetion||reconnection +reconetions||reconnections +reconet||reconnect +reconets||reconnects +reconfifure||reconfigure +reconfiged||reconfigured +reconfugire||reconfigure +reconfugre||reconfigure +reconfugure||reconfigure +reconfure||reconfigure +recongifure||reconfigure +reconsidder||reconsider +reconstrcuted||reconstructed +reconstrcution||reconstruction +reconstrcut||reconstruct +recource||resource +recources||resources +rectange||rectangle +rectanges||rectangles +recude||reduce +recurrance||recurrence +recursivly||recursively +recusion||recursion +recyled||recycled +recyle||recycle +recyles||recycles +recyling||recycling +redeable||readable +redefiende||redefined +re-defiend||re-defined +redefiend||redefined +redefintion||redefinition +redefintions||redefinitions +redircet||redirect +redirectd||redirected +redirectrion||redirection +redunant||redundant +reduntant||redundant +reencode||re-encode +re-engeneering||re-engineering +re-engeneer||re-engineer +re-evaulated||re-evaluated +reevaulating||reevaluating +refected||reflected +refecting||reflecting +refectoring||refactoring +refector||refactor +refect||reflect +refects||reflects +refence||reference +refences||references +referecence||reference +referecences||references +refered||referred +referene||reference +referenes||references +refering||referring +refernced||referenced +referncence||reference +referncences||references +refernce||reference +refernces||references +referncial||referential +referncing||referencing +referneced||referenced +refernece||reference +referneces||references +refertenced||referenced +refertence||reference +refertences||references +refeshed||refreshed +refeshes||refreshes +refeshing||refreshing +refesh||refresh +refinemenet||refinement +refinmenet||refinement +refrenced||referenced +refrence||reference +refrences||references +refrencing||referencing +refure||refuse +refures||refuses +regaring||regarding +regarless||regardless +regenarated||regenerated +regenrated||regenerated +regenratet||regenerated +regenrating||regenerating +regenration||regeneration +regenrative||regenerative +registed||registered +registeing||registering +registerd||registered +registe||register +registeresd||registered +registeres||registers +registes||registers +registraration||registration +registred||registered +regitered||registered +regitering||registering +regiter||register +regiters||registers +regresion||regression +regsitered||registered +regsitering||registering +regsiter||register +regsiters||registers +regstered||registered +regstering||registering +regster||register +regsters||registers +regualarly||regularly +regualar||regular +reguardless||regardless +reguarldess||regardless +reguarlise||regularise +reguarliser||regulariser +reguarlize||regularize +reguarlizer||regularizer +reguarly||regularly +regulaer||regular +regulamentation||regulation +regulamentations||regulations +regularily||regularly +regularlisation||regularisation +regularlised||regularised +regularlise||regularise +regularliser||regulariser +regularlises||regularises +regularlising||regularising +regularlization||regularization +regularlized||regularized +regularlize||regularize +regularlizer||regularizer +regularlizes||regularizes +regularlizing||regularizing +regularlly||regularly +regulary||regularly +regulax||regular +reguler||regular +regulr||regular +regultory||regulatory +reigstered||registered +reigstering||registering +reigster||register +reigsters||registers +reimplemenet||reimplement +reimplented||reimplemented +reimplents||reimplements +re-implimenting||re-implementing +reimplimenting||reimplementing +re-impliment||re-implement +reimpliment||reimplement +reimplmenet||reimplement +reimplmentation||reimplementation +reimplmented||reimplemented +reimplmenting||reimplementing +reimplment||reimplement +reimplments||reimplements +reinitailised||reinitialised +reinitailise||reinitialise +reinitailize||reinitialize +reintepreted||reinterpreted +reintepret||reinterpret +relaesed||released +relaese||release +relased||released +relase||release +relaser||releaser +relases||releases +relashionship||relationship +relashionships||relationships +relasing||releasing +relatdness||relatedness +relatd||related +relativly||relatively +relavant||relevant +relavent||relevant +releaased||released +releaase||release +releasse||release +releated||related +releating||relating +releation||relation +releationship||relationship +releationships||relationships +releations||relations +releative||relative +reletively||relatively +reletive||relative +relevabt||relevant +relevence||relevance +relevent||relevant +relocae||relocate +relocaes||relocates +relocaiing||relocating +relocaing||relocating +relocaion||relocation +relocaions||relocations +relocaite||relocate +relocaites||relocates +relocaiting||relocating +relocaition||relocation +relocaitions||relocations +relocaiton||relocation +relocaitons||relocations +relocateable||relocatable +relyable||reliable +relyably||reliably +relyed||relied +relyes||relies +relys||relies +remaing||remaining +remaning||remaining +remebered||remembered +remebering||remembering +remeber||remember +remebers||remembers +rememebered||remembered +rememebering||remembering +rememeber||remember +rememebers||remembers +rememebred||remembered +rememebr||remember +rememebrs||remembers +rememembered||remembered +rememember||remember +rememembers||remembers +rememered||remembered +rememer||remember +rememers||remembers +remining||remaining +remontly||remotely +remoote||remote +removeable||removable +renderering||rendering +re-negatiotiable||re-negotiable +renegatiotiable||renegotiable +re-negatiotiated||re-negotiated +renegatiotiated||renegotiated +re-negatiotiate||re-negotiate +renegatiotiate||renegotiate +re-negatiotiates||re-negotiates +renegatiotiates||renegotiates +re-negatiotiating||re-negotiating +renegatiotiating||renegotiating +re-negatiotiation||re-negotiation +renegatiotiation||renegotiation +re-negatiotiations||re-negotiations +renegatiotiations||renegotiations +re-negatiotiator||re-negotiator +renegatiotiator||renegotiator +re-negatiotiators||re-negotiators +renegatiotiators||renegotiators +re-negoable||re-negotiable +renegoable||renegotiable +re-negoated||re-negotiated +renegoated||renegotiated +re-negoate||re-negotiate +renegoate||renegotiate +re-negoates||re-negotiates +renegoates||renegotiates +re-negoatiable||re-negotiable +renegoatiable||renegotiable +re-negoatiated||re-negotiated +renegoatiated||renegotiated +re-negoatiate||re-negotiate +renegoatiate||renegotiate +re-negoatiates||re-negotiates +renegoatiates||renegotiates +re-negoatiating||re-negotiating +renegoatiating||renegotiating +re-negoatiation||re-negotiation +renegoatiation||renegotiation +re-negoatiations||re-negotiations +renegoatiations||renegotiations +re-negoatiator||re-negotiator +renegoatiator||renegotiator +re-negoatiators||re-negotiators +renegoatiators||renegotiators +re-negoating||re-negotiating +renegoating||renegotiating +re-negoation||re-negotiation +renegoation||renegotiation +re-negoations||re-negotiations +renegoations||renegotiations +re-negoator||re-negotiator +renegoator||renegotiator +re-negoators||re-negotiators +renegoators||renegotiators +re-negociable||re-negotiable +renegociable||renegotiable +re-negociated||re-negotiated +renegociated||renegotiated +re-negociate||re-negotiate +renegociate||renegotiate +re-negociates||re-negotiates +renegociates||renegotiates +re-negociating||re-negotiating +renegociating||renegotiating +re-negociation||re-negotiation +renegociation||renegotiation +re-negociations||re-negotiations +renegociations||renegotiations +re-negociator||re-negotiator +renegociator||renegotiator +re-negociators||re-negotiators +renegociators||renegotiators +re-negogtiable||re-negotiable +renegogtiable||renegotiable +re-negogtiated||re-negotiated +renegogtiated||renegotiated +re-negogtiate||re-negotiate +renegogtiate||renegotiate +re-negogtiates||re-negotiates +renegogtiates||renegotiates +re-negogtiating||re-negotiating +renegogtiating||renegotiating +re-negogtiation||re-negotiation +renegogtiation||renegotiation +re-negogtiations||re-negotiations +renegogtiations||renegotiations +re-negogtiator||re-negotiator +renegogtiator||renegotiator +re-negogtiators||re-negotiators +renegogtiators||renegotiators +re-negoitable||re-negotiable +renegoitable||renegotiable +re-negoitated||re-negotiated +renegoitated||renegotiated +re-negoitate||re-negotiate +renegoitate||renegotiate +re-negoitates||re-negotiates +renegoitates||renegotiates +re-negoitating||re-negotiating +renegoitating||renegotiating +re-negoitation||re-negotiation +renegoitation||renegotiation +re-negoitations||re-negotiations +renegoitations||renegotiations +re-negoitator||re-negotiator +renegoitator||renegotiator +re-negoitators||re-negotiators +renegoitators||renegotiators +re-negoptionsotiable||re-negotiable +renegoptionsotiable||renegotiable +re-negoptionsotiated||re-negotiated +renegoptionsotiated||renegotiated +re-negoptionsotiate||re-negotiate +renegoptionsotiate||renegotiate +re-negoptionsotiates||re-negotiates +renegoptionsotiates||renegotiates +re-negoptionsotiating||re-negotiating +renegoptionsotiating||renegotiating +re-negoptionsotiation||re-negotiation +renegoptionsotiation||renegotiation +re-negoptionsotiations||re-negotiations +renegoptionsotiations||renegotiations +re-negoptionsotiator||re-negotiator +renegoptionsotiator||renegotiator +re-negoptionsotiators||re-negotiators +renegoptionsotiators||renegotiators +re-negosiable||re-negotiable +renegosiable||renegotiable +re-negosiated||re-negotiated +renegosiated||renegotiated +re-negosiate||re-negotiate +renegosiate||renegotiate +re-negosiates||re-negotiates +renegosiates||renegotiates +re-negosiating||re-negotiating +renegosiating||renegotiating +re-negosiation||re-negotiation +renegosiation||renegotiation +re-negosiations||re-negotiations +renegosiations||renegotiations +re-negosiator||re-negotiator +renegosiator||renegotiator +re-negosiators||re-negotiators +renegosiators||renegotiators +re-negotable||re-negotiable +renegotable||renegotiable +re-negotaiable||re-negotiable +renegotaiable||renegotiable +re-negotaiated||re-negotiated +renegotaiated||renegotiated +re-negotaiate||re-negotiate +renegotaiate||renegotiate +re-negotaiates||re-negotiates +renegotaiates||renegotiates +re-negotaiating||re-negotiating +renegotaiating||renegotiating +re-negotaiation||re-negotiation +renegotaiation||renegotiation +re-negotaiations||re-negotiations +renegotaiations||renegotiations +re-negotaiator||re-negotiator +renegotaiator||renegotiator +re-negotaiators||re-negotiators +renegotaiators||renegotiators +re-negotaible||re-negotiable +renegotaible||renegotiable +re-negotaited||re-negotiated +renegotaited||renegotiated +re-negotaite||re-negotiate +renegotaite||renegotiate +re-negotaites||re-negotiates +renegotaites||renegotiates +re-negotaiting||re-negotiating +renegotaiting||renegotiating +re-negotaition||re-negotiation +renegotaition||renegotiation +re-negotaitions||re-negotiations +renegotaitions||renegotiations +re-negotaitor||re-negotiator +renegotaitor||renegotiator +re-negotaitors||re-negotiators +renegotaitors||renegotiators +re-negotated||re-negotiated +renegotated||renegotiated +re-negotate||re-negotiate +renegotate||renegotiate +re-negotates||re-negotiates +renegotates||renegotiates +re-negotatiable||re-negotiable +renegotatiable||renegotiable +re-negotatiated||re-negotiated +renegotatiated||renegotiated +re-negotatiate||re-negotiate +renegotatiate||renegotiate +re-negotatiates||re-negotiates +renegotatiates||renegotiates +re-negotatiating||re-negotiating +renegotatiating||renegotiating +re-negotatiation||re-negotiation +renegotatiation||renegotiation +re-negotatiations||re-negotiations +renegotatiations||renegotiations +re-negotatiator||re-negotiator +renegotatiator||renegotiator +re-negotatiators||re-negotiators +renegotatiators||renegotiators +re-negotatible||re-negotiable +renegotatible||renegotiable +re-negotatied||re-negotiated +renegotatied||renegotiated +re-negotatie||re-negotiate +renegotatie||renegotiate +re-negotaties||re-negotiates +renegotaties||renegotiates +re-negotating||re-negotiating +renegotating||renegotiating +re-negotation||re-negotiation +renegotation||renegotiation +re-negotations||re-negotiations +renegotations||renegotiations +re-negotatior||re-negotiator +renegotatior||renegotiator +re-negotatiors||re-negotiators +renegotatiors||renegotiators +re-negotator||re-negotiator +renegotator||renegotiator +re-negotators||re-negotiators +renegotators||renegotiators +re-negothiable||re-negotiable +renegothiable||renegotiable +re-negothiated||re-negotiated +renegothiated||renegotiated +re-negothiate||re-negotiate +renegothiate||renegotiate +re-negothiates||re-negotiates +renegothiates||renegotiates +re-negothiating||re-negotiating +renegothiating||renegotiating +re-negothiation||re-negotiation +renegothiation||renegotiation +re-negothiations||re-negotiations +renegothiations||renegotiations +re-negothiator||re-negotiator +renegothiator||renegotiator +re-negothiators||re-negotiators +renegothiators||renegotiators +re-negotible||re-negotiable +renegotible||renegotiable +re-negoticable||re-negotiable +renegoticable||renegotiable +re-negoticated||re-negotiated +renegoticated||renegotiated +re-negoticate||re-negotiate +renegoticate||renegotiate +re-negoticates||re-negotiates +renegoticates||renegotiates +re-negoticating||re-negotiating +renegoticating||renegotiating +re-negotication||re-negotiation +renegotication||renegotiation +re-negotications||re-negotiations +renegotications||renegotiations +re-negoticator||re-negotiator +renegoticator||renegotiator +re-negoticators||re-negotiators +renegoticators||renegotiators +re-negotioable||re-negotiable +renegotioable||renegotiable +re-negotioated||re-negotiated +renegotioated||renegotiated +re-negotioate||re-negotiate +renegotioate||renegotiate +re-negotioates||re-negotiates +renegotioates||renegotiates +re-negotioating||re-negotiating +renegotioating||renegotiating +re-negotioation||re-negotiation +renegotioation||renegotiation +re-negotioations||re-negotiations +renegotioations||renegotiations +re-negotioator||re-negotiator +renegotioator||renegotiator +re-negotioators||re-negotiators +renegotioators||renegotiators +re-negotioble||re-negotiable +renegotioble||renegotiable +re-negotionable||re-negotiable +renegotionable||renegotiable +re-negotionated||re-negotiated +renegotionated||renegotiated +re-negotionate||re-negotiate +renegotionate||renegotiate +re-negotionates||re-negotiates +renegotionates||renegotiates +re-negotionating||re-negotiating +renegotionating||renegotiating +re-negotionation||re-negotiation +renegotionation||renegotiation +re-negotionations||re-negotiations +renegotionations||renegotiations +re-negotionator||re-negotiator +renegotionator||renegotiator +re-negotionators||re-negotiators +renegotionators||renegotiators +re-negotion||re-negotiation +renegotion||renegotiation +re-negotions||re-negotiations +renegotions||renegotiations +re-negotiotable||re-negotiable +renegotiotable||renegotiable +re-negotiotated||re-negotiated +renegotiotated||renegotiated +re-negotiotate||re-negotiate +renegotiotate||renegotiate +re-negotiotates||re-negotiates +renegotiotates||renegotiates +re-negotiotating||re-negotiating +renegotiotating||renegotiating +re-negotiotation||re-negotiation +renegotiotation||renegotiation +re-negotiotations||re-negotiations +renegotiotations||renegotiations +re-negotiotator||re-negotiator +renegotiotator||renegotiator +re-negotiotators||re-negotiators +renegotiotators||renegotiators +re-negotioted||re-negotiated +renegotioted||renegotiated +re-negotiote||re-negotiate +renegotiote||renegotiate +re-negotiotes||re-negotiates +renegotiotes||renegotiates +re-negotioting||re-negotiating +renegotioting||renegotiating +re-negotiotion||re-negotiation +renegotiotion||renegotiation +re-negotiotions||re-negotiations +renegotiotions||renegotiations +re-negotiotor||re-negotiator +renegotiotor||renegotiator +re-negotiotors||re-negotiators +renegotiotors||renegotiators +re-negotitable||re-negotiable +renegotitable||renegotiable +re-negotitaed||re-negotiated +renegotitaed||renegotiated +re-negotitae||re-negotiate +renegotitae||renegotiate +re-negotitaes||re-negotiates +renegotitaes||renegotiates +re-negotitaing||re-negotiating +renegotitaing||renegotiating +re-negotitaion||re-negotiation +renegotitaion||renegotiation +re-negotitaions||re-negotiations +renegotitaions||renegotiations +re-negotitaor||re-negotiator +renegotitaor||renegotiator +re-negotitaors||re-negotiators +renegotitaors||renegotiators +re-negotitated||re-negotiated +renegotitated||renegotiated +re-negotitate||re-negotiate +renegotitate||renegotiate +re-negotitates||re-negotiates +renegotitates||renegotiates +re-negotitating||re-negotiating +renegotitating||renegotiating +re-negotitation||re-negotiation +renegotitation||renegotiation +re-negotitations||re-negotiations +renegotitations||renegotiations +re-negotitator||re-negotiator +renegotitator||renegotiator +re-negotitators||re-negotiators +renegotitators||renegotiators +re-negotited||re-negotiated +renegotited||renegotiated +re-negotite||re-negotiate +renegotite||renegotiate +re-negotites||re-negotiates +renegotites||renegotiates +re-negotiting||re-negotiating +renegotiting||renegotiating +re-negotition||re-negotiation +renegotition||renegotiation +re-negotitions||re-negotiations +renegotitions||renegotiations +re-negotitor||re-negotiator +renegotitor||renegotiator +re-negotitors||re-negotiators +renegotitors||renegotiators +re-negoziable||re-negotiable +renegoziable||renegotiable +re-negoziated||re-negotiated +renegoziated||renegotiated +re-negoziate||re-negotiate +renegoziate||renegotiate +re-negoziates||re-negotiates +renegoziates||renegotiates +re-negoziating||re-negotiating +renegoziating||renegotiating +re-negoziation||re-negotiation +renegoziation||renegotiation +re-negoziations||re-negotiations +renegoziations||renegotiations +re-negoziator||re-negotiator +renegoziator||renegotiator +re-negoziators||re-negotiators +renegoziators||renegotiators +reneweal||renewal +reoport||report +reorginised||reorganised +reorginized||reorganized +repaced||replaced +repace||replace +repaces||replaces +repacing||replacing +repackged||repackaged +repackge||repackage +repeatly||repeatedly +repectable||respectable +repected||respected +repecting||respecting +repectively||respectively +repective||respective +repect||respect +repects||respects +repesented||represented +repesenting||representing +repesent||represent +repesents||represents +repetion||repetition +repetions||repetitions +replacability||replaceability +replacable||replaceable +replacables||replaceables +replacacing||replacing +replacaiblity||replaceability +replacalbe||replaceable +replacalbes||replaceables +replacament||replacement +replacaments||replacements +replaca||replica +replacas||replicas +replacated||replicated +replacate||replicate +replacates||replicates +replacating||replicating +replacation||replication +replacd||replaced +replacemenet||replacement +replacmenet||replacement +replacment||replacement +replacments||replacements +replacong||replacing +replacted||replicated +replacte||replicate +replactes||replicates +replacting||replicating +replicae||replicate +replicaes||replicates +replicaiing||replicating +replicaion||replication +replicaions||replications +replicaite||replicate +replicaites||replicates +replicaiting||replicating +replicaition||replication +replicaitions||replications +replicaiton||replication +replicaitons||replications +replys||replies +reponse||response +reponses||responses +reponsibilities||responsibilities +reponsibility||responsibility +reponsible||responsible +reporitory||repository +repostiories||repositories +repostiory||repository +repport||report +repreesnted||represented +repreesnt||represent +repreesnts||represents +representaion||representation +representaions||representations +represneted||represented +represneting||representing +represnet||represent +represnets||represents +repressentation||representation +repressenting||representing +repressent||represent +repressents||represents +reprociblbe||reproducible +reproducability||reproducibility +reproducable||reproducible +reproducablitity||reproducibility +reproducably||reproducibly +repsonse||response +repsonses||responses +reqeust||request +reqeusts||requests +requestesd||requested +requestes||requests +requestested||requested +requestests||requests +requestying||requesting +requiered||required +requiere||require +requieres||requires +requiering||requiring +requiested||requested +requiesting||requesting +requiest||request +requiests||requests +requireing||requiring +requiremenet||requirement +requiremenets||requirements +requirment||requirement +requirments||requirements +requred||required +requrested||requested +requresting||requesting +requrest||request +requrests||requests +requried||required +requsted||requested +requsting||requesting +requst||request +requsts||requests +re-realease||re-release +resarch||research +resart||restart +resarts||restarts +rescource||resource +rescources||resources +rescrition||restriction +rescritions||restrictions +resemblence||resemblance +resepected||respected +resepecting||respecting +resepectively||respectively +resepective||respective +resepect||respect +resepects||respects +reserverd||reserved +resetable||resettable +reseted||reset +reseting||resetting +resetted||reset +reseved||reserved +resgister||register +resgisters||registers +resistence||resistance +resistent||resistant +resizeable||resizable +resloved||resolved +reslove||resolve +resloves||resolves +resloving||resolving +resoective||respective +resoect||respect +resoiurce||resource +resonable||reasonable +resorce||resource +resorces||resources +resouce||resource +resouces||resources +resoure||resource +resoures||resources +responce||response +responces||responses +responsabilities||responsibilities +responsability||responsibility +responsed||responded +responser||responder +responser's||responder's +responsers||responders +responsiblities||responsibilities +responsiblity||responsibility +responsing||responding +resposible||responsible +respositories||repositories +respository||repository +ressize||resize +ressource||resource +ressources||resources +ressurected||resurrected +ressurecting||resurrecting +ressurect||resurrect +ressurects||resurrects +restrcuture||restructure +restriced||restricted +restroing||restoring +resultion||resolution +resultions||resolutions +resulution||resolution +resursively||recursively +resursive||recursive +retanslate||retranslate +retored||restored +retore||restore +retores||restores +retoring||restoring +retransmited||retransmitted +retreived||retrieved +retreive||retrieve +retrived||retrieved +retrive||retrieve +retrives||retrieves +retriving||retrieving +retsart||restart +retsarts||restarts +retun||return +retuns||returns +retured||returned +returing||returning +returnd||returned +returnes||returns +retur||return +returs||returns +retyring||retrying +reuest||request +reuests||requests +re-upladad||re-uploaded +reupladad||reuploaded +re-upladed||re-uploaded +reupladed||reuploaded +re-uplader||re-uploader +reuplader||reuploader +re-upladers||re-uploaders +reupladers||reuploaders +re-uplading||re-uploading +reuplading||reuploading +re-uplad||re-upload +reuplad||reupload +re-uplads||re-uploads +reuplads||reuploads +re-uplaodad||re-uploaded +reuplaodad||reuploaded +re-uplaoded||re-uploaded +reuplaoded||reuploaded +re-uplaoder||re-uploader +reuplaoder||reuploader +re-uplaoders||re-uploaders +reuplaoders||reuploaders +re-uplaoding||re-uploading +reuplaoding||reuploading +re-uplaod||re-upload +reuplaod||reupload +re-uplaods||re-uploads +reuplaods||reuploads +re-uplodad||re-uploaded +reuplodad||reuploaded +re-uploded||re-uploaded +reuploded||reuploaded +re-uploder||re-uploader +reuploder||reuploader +re-uploders||re-uploaders +reuploders||reuploaders +re-uploding||re-uploading +reuploding||reuploading +re-uplod||re-upload +reuplod||reupload +re-uplods||re-uploads +reuplods||reuploads +reuqested||requested +reuqesting||requesting +reuqest||request +reuqests||requests +reverced||reversed +reverce||reverse +reverece||reference +revereces||references +reveresed||reversed +reverese||reverse +revereted||reverted +reveret||revert +reverse-engeneering||reverse-engineering +reverse-engeneer||reverse-engineer +reverse-engieer||reverse-engineer +reverved||reserved +reverve||reserve +revewrse||reverse +revoluion||revolution +revrese||reverse +revrieve||retrieve +revrieves||retrieves +rewirte||rewrite +rewitable||rewritable +rewrited||rewrote +rewriten||rewritten +rigth||right +rigths||rights +rigt||right +rmeoved||removed +rmeove||remove +rmeoves||removes +roiginally||originally +roiginal||original +roiginals||originals +roiginating||originating +roigin||origin +roigins||origins +ropeat||repeat +rouding||rounding +rougly||roughly +rouine||routine +rouines||routines +rountine||routine +rountines||routines +routins||routines +rovided||provided +rovide||provide +rovider||provider +rovides||provides +roviding||providing +rquested||requested +rquesting||requesting +rquest||request +rquests||requests +runing||running +runned||ran +runnging||running +runnigng||running +runnign||running +runnig||running +runnning||running +sacrifying||sacrificing +safeguared||safeguarded +safeing||saving +safe-pooint||safe-point +safepooint||safepoint +safe-pooints||safe-points +safepooints||safepoints +safly||safely +saftey||safety +safty||safety +santized||sanitized +santize||sanitize +santizes||sanitizes +santizing||sanitizing +sanytise||sanitise +sanytize||sanitize +satified||satisfied +satifies||satisfies +satifying||satisfying +satify||satisfy +satisfiabilty||satisfiability +satisifed||satisfied +satisified||satisfied +satisifies||satisfies +satisifying||satisfying +satisify||satisfy +satistying||satisfying +savable||saveable +savely||safely +savety||safety +scahr||schar +scaleable||scalable +scalled||scaled +scaned||scanned +scaning||scanning +scintiallation||scintillation +sciript||script +sciripts||scripts +scolling||scrolling +scopeing||scoping +scritp||script +scritps||scripts +scritpt||script +scritpts||scripts +scubscribed||subscribed +scubscriber||subscriber +scubscribes||subscribes +scubscribe||subscribe +seached||searched +seaches||searches +seaching||searching +seach||search +searcahble||searchable +searchs||searches +secion||section +secions||sections +secirity||security +seciton||section +secitons||sections +secodns||seconds +secrion||section +secruity||security +sectionning||sectioning +secuely||securely +secue||secure +secuity||security +secund||second +securly||securely +securrely||securely +securre||secure +securrly||securely +securtity||security +securtiy||security +securty||security +securuity||security +seesion||session +seesions||sessions +segement||segment +segements||segments +segfualt||segfault +segfualts||segfaults +segmenetd||segmented +segmeneted||segmented +segmenet||segment +segmenets||segments +segmetned||segmented +segmetn||segment +segmetns||segments +selction||selection +selctions||selections +selecton||selection +selectons||selections +self-comparisson||self-comparison +self-contianed||self-contained +sematically||semantically +sematical||semantical +sematic||semantic +sematics||semantics +sempahore||semaphore +sempahores||semaphores +senario||scenario +senarios||scenarios +sence||sense +sencondary||secondary +sencond||second +senconds||seconds +sensistively||sensitively +sensistive||sensitive +sensitve||sensitive +sentance||sentence +sentances||sentences +sentinal||sentinel +sentinals||sentinels +separatly||separately +separed||separated +separetedly||separately +separeted||separated +separetely||separately +separeter||separator +separete||separate +separetes||separates +separeting||separating +separetly||separately +separetor||separator +separted||separated +separte||separate +separtes||separates +separting||separating +sepatae||separate +sepcifically||specifically +sepcification||specification +sepcifications||specifications +sepcific||specific +sepcified||specified +sepcifier||specifier +sepcifies||specifies +sepcifying||specifying +sepcify||specify +sepearable||separable +sepearated||separated +sepearately||separately +sepearate||separate +sepearates||separates +sepearation||separation +sepearator||separator +sepearators||separators +sepearetly||separately +sepearet||separate +sepearted||separated +sepeartely||separately +sepearte||separate +sepeartes||separates +sepeartor||separator +sepeartors||separators +sepeated||separated +sepeate||separate +sepeates||separates +sepeator||separator +sepeators||separators +sepecially||especially +sepecial||special +sepecifed||specified +sepecification||specification +sepecific||specific +sepecified||specified +sepecifier||specifier +sepecifiers||specifiers +sepecifies||specifies +sepecify||specify +sepectral||spectral +sepeicfy||specify +sepending||depending +seperable||separable +seperaly||separately +seperaor||separator +seperaors||separators +seperared||separated +seperare||separate +seperares||separates +seperataed||separated +seperatally||separately +seperataly||separately +seperatated||separated +seperatd||separated +seperatedly||separately +seperated||separated +seperatedy||separated +seperateely||separately +seperateing||separating +seperatelly||separately +seperately||separately +seperater||separator +seperaters||separators +seperate||separate +seperates||separates +seperating||separating +seperation||separation +seperations||separations +seperatley||separately +seperatly||separately +seperator||separator +seperators||separators +sepereated||separated +sepereate||separate +sepereates||separates +sepererated||separated +sepererate||separate +sepererates||separates +sepereted||separated +seperete||separate +seperetes||separates +seperratly||separately +sepertator||separator +sepertators||separators +sepertor||separator +sepertors||separators +sepetaror||separator +sepetarors||separators +sepetated||separated +sepetately||separately +sepetate||separate +sepetates||separates +seporate||separate +sepperate||separate +seprator||separator +seprators||separators +sequece||sequence +sequeces||sequences +sequencially||sequentially +sequencial||sequential +serach||search +serailisation||serialisation +serailization||serialization +serie||series +seriuos||serious +serivce||service +serivces||services +sertificate||certificate +sertificates||certificates +serveral||several +sesssion||session +sesssions||sessions +setgit||setgid +setted||set +setts||sets +settter||setter +settters||setters +settting||setting +setttings||settings +severly||severely +sevrity||severity +shapshot||snapshot +sheduled||scheduled +shedule||schedule +shedules||schedules +sheduling||scheduling +shiped||shipped +short-cicruit||short-circuit +short-cicruits||short-circuits +shortcomming||shortcoming +shortcommings||shortcomings +shoudld||should +shoudln't||shouldn't +shoudlnt||shouldn't +shoudl||should +shoud||should +should'nt||shouldn't +shouldnt||shouldn't +should't||shouldn't +shoule||should +siginificantly||significantly +siginificant||significant +signficantly||significantly +signficant||significant +signifcantly||significantly +signifcant||significant +signle||single +silenty||silently +similarily||similarly +similary||similarly +similiarity||similarity +similiarly||similarly +similiar||similar +similiarty||similarity +similiary||similarity +simlarlity||similarity +simlarly||similarly +simlar||similar +simliar||similar +simlicity||simplicity +simmilar||similar +simplier||simpler +simpliest||simplest +simulantaneously||simultaneously +simulantaneous||simultaneous +simulataeously||simultaneously +simulataeous||simultaneous +simulataneity||simultaneity +simulataneously||simultaneously +simulataneous||simultaneous +simulataniously||simultaneously +simulatanious||simultaneous +simulatanously||simultaneously +simulatanous||simultaneous +simulatation||simulation +simultanously||simultaneously +simultanous||simultaneous +singal||signal +singed||signed +single-threded||single-threaded +singnalled||signalled +singnal||signal +singnals||signals +singuarity||singularity +singuarl||singular +sinply||simply +sitation||situation +sitations||situations +sitaution||situation +sitautions||situations +situration||situation +siturations||situations +situtaion||situation +situtaions||situations +situtation||situation +situtations||situations +siute||suite +siwtched||switched +siwtching||switching +siwtch||switch +skelton||skeleton +skept||skipped +skiped||skipped +skiping||skipping +slashs||slashes +sligthly||slightly +sligth||slight +sluggify||slugify +smae||same +smaple||sample +smaples||samples +smoothign||smoothing +snapsnot||snapshot +snapsnots||snapshots +snpashot||snapshot +snpashots||snapshots +softend||softened +softwares||software +sofware||software +sofwtare||software +soiurce||source +soket||socket +sokets||sockets +somehwat||somewhat +somehwere||somewhere +somes||some +somethign||something +sometiem||sometimes +sometiems||sometimes +sometihing||something +sometihng||something +sometiles||sometimes +sometines||sometimes +someting||something +sometinhg||something +somthign||something +somthing||something +somtimes||sometimes +somwhat||somewhat +sorrounding||surrounding +sotfware||software +souce||source +souces||sources +sould'nt||shouldn't +souldn't||shouldn't +sould||should +soundard||soundcard +soure||source +soures||sources +spacification||specification +spacific||specific +spacifics||specifics +spacified||specified +spacifies||specifies +sparately||separately +sparate||separate +spawed||spawned +spawing||spawning +spaw||spawn +spaws||spawns +speach||speech +spearator||separator +spearators||separators +specail||special +spec-complient||spec-compliant +specfication||specification +specfications||specifications +specfic||specific +specfied||specified +specfies||specifies +specfying||specifying +specfy||specify +specidic||specific +specied||specified +speciefied||specified +specifc||specific +specifed||specified +specificated||specified +specificateion||specification +specificatin||specification +specificaton||specification +specificiation||specification +specificiations||specifications +specificly||specifically +specifing||specifying +specifiying||specifying +specifiy||specify +specifyied||specified +speciries||specifies +speciry||specify +speciyfing||specifying +speciyfying||specifying +speciying||specifying +speciy||specify +spectularly||spectacularly +spectular||spectacular +speeaking||speaking +speeak||speak +speeped||sped +speeping||sleeping +speep||sleep +speep-up||speed-up +spefally||specially +spefation||separation +spefations||separations +spefcifiable||specifiable +spefcifically||specifically +spefcification||specification +spefcifications||specifications +spefcific||specific +spefcifics||specifics +spefcifieid||specified +spefcifieir||specifier +spefcifieirs||specifiers +spefcifieis||specifies +spefcifiying||specifying +spefcifiy||specify +spefeid||specified +spefeir||specifier +spefeirs||specifiers +spefeis||specifies +spefiable||specifiable +spefial||special +speficable||specifiable +spefically||specifically +spefication||specification +spefications||specifications +speficed||specified +speficeid||specified +speficeir||specifier +speficeirs||specifiers +speficeis||specifies +speficer||specifier +speficers||specifiers +spefices||specifies +speficiable||specifiable +speficiallally||specifically +speficiallation||specification +speficiallations||specifications +speficialleid||specified +speficialleir||specifier +speficialleirs||specifiers +speficialleis||specifies +speficialliable||specifiable +speficiallically||specifically +speficiallication||specification +speficiallications||specifications +speficiallic||specific +speficiallics||specifics +speficiallied||specified +speficiallier||specifier +speficialliers||specifiers +speficiallies||specifies +speficiallifed||specified +speficiallifer||specifier +speficiallifers||specifiers +speficiallifes||specifies +speficially||specifically +speficiation||specification +speficiations||specifications +speficically||specifically +speficication||specification +speficications||specifications +speficic||specific +speficics||specifics +speficied||specified +speficieid||specified +speficieir||specifier +speficieirs||specifiers +speficieis||specifies +speficier||specifier +speficiers||specifiers +speficies||specifies +speficifally||specifically +speficifation||specification +speficifations||specifications +speficifcally||specifically +speficifcation||specification +speficifcations||specifications +speficifc||specific +speficifcs||specifics +speficifed||specified +speficifeid||specified +speficifeir||specifier +speficifeirs||specifiers +speficifeis||specifies +speficifer||specifier +speficifers||specifiers +speficifes||specifies +speficifiable||specifiable +speficifically||specifically +speficification||specification +speficifications||specifications +speficific||specific +speficifics||specifics +speficified||specified +speficifier||specifier +speficifiers||specifiers +speficifies||specifies +speficififed||specified +speficififer||specifier +speficififers||specifiers +speficififes||specifies +speficifying||specifying +speficify||specify +speficiiable||specifiable +speficiically||specifically +speficiication||specification +speficiications||specifications +speficiic||specific +speficiics||specifics +speficiied||specified +speficiier||specifier +speficiiers||specifiers +speficiies||specifies +speficiifed||specified +speficiifer||specifier +speficiifers||specifiers +speficiifes||specifies +speficillally||specifically +speficillation||specification +speficillations||specifications +speficilleid||specified +speficilleir||specifier +speficilleirs||specifiers +speficilleis||specifies +speficilliable||specifiable +speficillically||specifically +speficillication||specification +speficillications||specifications +speficillic||specific +speficillics||specifics +speficillied||specified +speficillier||specifier +speficilliers||specifiers +speficillies||specifies +speficillifed||specified +speficillifer||specifier +speficillifers||specifiers +speficillifes||specifies +speficilly||specifically +speficitally||specifically +speficitation||specification +speficitations||specifications +speficiteid||specified +speficiteir||specifier +speficiteirs||specifiers +speficiteis||specifies +speficitiable||specifiable +speficitically||specifically +speficitication||specification +speficitications||specifications +speficitic||specific +speficitics||specifics +speficitied||specified +speficitier||specifier +speficitiers||specifiers +speficities||specificities +speficitifed||specified +speficitifer||specifier +speficitifers||specifiers +speficitifes||specifies +speficity||specificity +speficiying||specifying +speficiy||specify +spefic||specific +spefics||specifics +speficying||specifying +speficy||specify +spefied||specified +spefier||specifier +spefiers||specifiers +spefies||specifies +spefifally||specifically +spefifation||specification +spefifations||specifications +spefifed||specified +spefifeid||specified +spefifeir||specifier +spefifeirs||specifiers +spefifeis||specifies +spefifer||specifier +spefifers||specifiers +spefifes||specifies +spefifiable||specifiable +spefifically||specifically +spefification||specification +spefifications||specifications +spefific||specific +spefifics||specifics +spefified||specified +spefifier||specifier +spefifiers||specifiers +spefifies||specifies +spefififed||specified +spefififer||specifier +spefififers||specifiers +spefififes||specifies +spefifying||specifying +spefify||specify +spefiiable||specifiable +spefiically||specifically +spefiication||specification +spefiications||specifications +spefiic||specific +spefiics||specifics +spefiied||specified +spefiier||specifier +spefiiers||specifiers +spefiies||specifies +spefiifally||specifically +spefiifation||specification +spefiifations||specifications +spefiifeid||specified +spefiifeir||specifier +spefiifeirs||specifiers +spefiifeis||specifies +spefiifiable||specifiable +spefiifically||specifically +spefiification||specification +spefiifications||specifications +spefiific||specific +spefiifics||specifics +spefiified||specified +spefiifier||specifier +spefiifiers||specifiers +spefiifies||specifies +spefiififed||specified +spefiififer||specifier +spefiififers||specifiers +spefiififes||specifies +spefiifying||specifying +spefiify||specify +spefixally||specifically +spefixation||specification +spefixations||specifications +spefixeid||specified +spefixeir||specifier +spefixeirs||specifiers +spefixeis||specifies +spefixiable||specifiable +spefixically||specifically +spefixication||specification +spefixications||specifications +spefixic||specific +spefixics||specifics +spefixied||specified +spefixier||specifier +spefixiers||specifiers +spefixies||specifies +spefixifed||specified +spefixifer||specifier +spefixifers||specifiers +spefixifes||specifies +spefixying||specifying +spefixy||specify +spefiying||specifying +spefiy||specify +spefying||specifying +spefy||specify +speling||spelling +spellshecking||spellchecking +sperately||separately +sperate||separate +spliting||splitting +splitted||split +sponsered||sponsored +sponsership||sponsorship +sponser||sponsor +sponsers||sponsors +spported||supported +spporting||supporting +spports||supports +spport||support +spreaded||spread +sproon||spoon +spsace||space +spsaces||spaces +spurios||spurious +squashgin||squashing +srcipt||script +srcipts||scripts +sructures||structures +sructure||structure +staically||statically +standard-complient||standard-compliant +standardss||standards +standard-version||standards-version +standar||standard +standars-version||standards-version +standartds||standards +standartd||standard +standartisation||standardisation +standartisator||standardiser +standartised||standardised +standartization||standardization +standartizator||standardizer +standartized||standardized +standarts||standards +standart||standard +startting||starting +statamenets||statements +statamenet||statement +statemenets||statements +statemenet||statement +staticly||statically +statictics||statistics +statictic||statistic +statisfied||satisfied +statisfies||satisfies +statisfying||satisfying +statisfy||satisfy +statmenet||statement +statments||statements +statment||statement +stength||strength +stirngs||strings +stirng||string +stivks||sticks +stivk||stick +stocahstic||stochastic +stoped||stopped +stoping||stopping +stoppped||stopped +straighforward||straightforward +straightfoward||straightforward +straigth||straight +straigt||straight +strcutre||structure +strcutural||structural +strcutures||structures +strcuture||structure +streammed||streamed +streamming||streaming +streamm||stream +streched||stretched +streches||stretches +streching||stretching +strech||stretch +strenghts||strengths +strenght||strength +strenous||strenuous +strenth||strength +strerrror||strerror +strinsg||strings +stroing||storing +strored||stored +strores||stores +strore||store +stroring||storing +structres||structures +structre||structure +structual||structural +stucts||structs +stuct||struct +stuctures||structures +stucture||structure +sturctures||structures +sturcture||structure +styilistic||stylistic +stying||styling +subcirucit||subcircuit +subcribed||subscribed +subcribes||subscribes +subcribe||subscribe +subcribing||subscribing +subdirectoires||subdirectories +subdirectorys||subdirectories +subdirecty||subdirectory +subexperesions||subexpressions +subexperesion||subexpression +subexperessions||subexpressions +subexperession||subexpression +subexpersions||subexpressions +subexpersion||subexpression +subexperssions||subexpressions +subexperssion||subexpression +subexpessions||subexpressions +subexpession||subexpression +subexpresssions||subexpressions +subexpresssion||subexpression +subfolfers||subfolders +subfolfer||subfolder +sub-lcuase||sub-clause +sublcuase||subclause +suble||subtle +subnegatiotiations||subnegotiations +subnegatiotiation||subnegotiation +subnegoatiations||subnegotiations +subnegoatiation||subnegotiation +subnegoations||subnegotiations +subnegoation||subnegotiation +subnegociations||subnegotiations +subnegociation||subnegotiation +subnegogtiations||subnegotiations +subnegogtiation||subnegotiation +subnegoitations||subnegotiations +subnegoitation||subnegotiation +subnegoptionsotiations||subnegotiations +subnegoptionsotiation||subnegotiation +subnegosiations||subnegotiations +subnegosiation||subnegotiation +subnegotaiations||subnegotiations +subnegotaiation||subnegotiation +subnegotaitions||subnegotiations +subnegotaition||subnegotiation +subnegotatiations||subnegotiations +subnegotatiation||subnegotiation +subnegotations||subnegotiations +subnegotation||subnegotiation +subnegothiations||subnegotiations +subnegothiation||subnegotiation +subnegotications||subnegotiations +subnegotication||subnegotiation +subnegotioations||subnegotiations +subnegotioation||subnegotiation +subnegotionations||subnegotiations +subnegotionation||subnegotiation +subnegotions||subnegotiations +subnegotion||subnegotiation +subnegotiotations||subnegotiations +subnegotiotation||subnegotiation +subnegotiotions||subnegotiations +subnegotiotion||subnegotiation +subnegotitaions||subnegotiations +subnegotitaion||subnegotiation +subnegotitations||subnegotiations +subnegotitation||subnegotiation +subnegotitions||subnegotiations +subnegotition||subnegotiation +subnegoziations||subnegotiations +subnegoziation||subnegotiation +subpackges||subpackages +subpackge||subpackage +subporgram||subprogram +subpsace||subspace +subscibed||subscribed +subscibers||subscribers +subsciber||subscriber +subscibe||subscribe +subscritpions||subscriptions +subscritpion||subscription +subscritpitons||subscriptions +subscritpiton||subscription +subscritptions||subscriptions +subscritption||subscription +subscritpt||subscript +subsecrion||subsection +subseqent||subsequent +subsequest||subsequent +subsituents||substituents +subsituent||substituent +subsitutable||substitutable +subsitutatble||substitutable +subsituted||substituted +subsitutes||substitutes +subsitute||substitute +subsituting||substituting +subsitution||substitution +subsitutuents||substituents +subsitutuent||substituent +subsitututed||substituted +subsitututes||substitutes +subsitutute||substitute +subsitututing||substituting +subsitutution||substitution +substaintially||substantially +substituations||substitutions +substituation||substitution +substituded||substituted +substitudes||substitutes +substitude||substitute +substituding||substituting +substituions||substitutions +substituion||substitution +substiution||substitution +substracted||subtracted +substracting||subtracting +substraction||subtraction +substracts||subtracts +substract||subtract +subsysytems||subsystems +subsysytem||subsystem +subsytems||subsystems +subsytem||subsystem +subtituted||substituted +subtitutes||substitutes +subtitute||substitute +subtituting||substituting +subtitutions||substitutions +subtitution||substitution +subtsitutable||substitutable +subtsitutatble||substitutable +succcessfully||successfully +succcessful||successful +succcessors||successors +succcessor||successor +succcess||success +succcessully||successfully +succcessul||successful +succedded||succeeded +succedding||succeeding +succedds||succeeds +succedd||succeed +succeded||succeeded +succedes||succeeds +succede||succeed +succedfully||successfully +succeding||succeeding +succeds||succeeds +succed||succeed +succeedes||succeeds +succesfull||successful +succesfully||successfully +succesful||successful +succesive||successive +succesors||successors +succesor||successor +successfullies||successfully +successfullly||successfully +successfullness||successfulness +successfulln||successful +successfull||successful +successfullt||successfully +successfuly||successfully +succint||succinct +suceeded||succeeded +suceeding||succeeding +suceeds||succeeds +suceed||succeed +suceses||successes +sucesfull||successful +sucesfully||successfully +sucesful||successful +sucesfuly||successfully +sucesscient||sufficient +sucesseding||succeeding +sucessed||succeeded +sucessefully||successfully +sucessess||success +sucesses||successes +sucessflly||successfully +sucessfually||successfully +sucessfukk||successful +sucessfull||successful +sucessfully||successfully +sucessful||successful +sucessfuly||successfully +sucession||succession +sucessively||successively +sucessive||successive +sucessiv||successive +sucessors||successors +sucessor||successor +sucessses||successes +sucesssfull||successful +sucesssfully||successfully +sucesssful||successful +sucesssfuly||successfully +sucesss||success +sucess||success +suces||success +sucessufll||successful +sucessuflly||successfully +sucessully||successfully +sueful||useful +sufficently||sufficiently +sufficent||sufficient +sugestions||suggestions +sugestion||suggestion +sugests||suggests +summmary||summary +superceded||superseded +supercedes||supersedes +supercede||supersede +superceding||superseding +superflous||superfluous +superopeator||superoperator +supersed||superseded +superseeded||superseded +suplanted||supplanted +suplanting||supplanting +suplants||supplants +suplant||supplant +suplementary||supplementary +suplied||supplied +suported||supported +suporting||supporting +suports||supports +suport||support +suposed||supposed +suposes||supposes +supose||suppose +suposing||supposing +suppied||supplied +suppies||supplies +suppored||supported +supportd||supported +supportin||supporting +supposeded||supposed +supposedely||supposedly +supposeds||supposed +supposedy||supposedly +suppoted||supported +suppplied||supplied +suppported||supported +suppporting||supporting +suppports||supports +suppport||support +suppying||supplying +suppy||supply +supressed||suppressed +supresses||suppresses +supressible||suppressible +supressing||suppressing +supressions||suppressions +supression||suppression +supressors||suppressors +supressor||suppressor +supresssion||suppression +supress||suppress +suprised||surprised +suprises||surprises +suprise||surprise +suprising||surprising +surounded||surrounded +suroundings||surroundings +surounding||surrounding +surounds||surrounds +suround||surround +surported||supported +surport||support +surpressed||suppressed +surpresses||suppresses +surpressing||suppressing +surpress||suppress +surrouding||surrounding +susbsytems||subsystems +susbsytem||subsystem +suscribed||subscribed +suscribe||subscribe +susepect||suspect +suspicously||suspiciously +suspicous||suspicious +sustitutions||substitutions +sustitution||substitution +sutbype||subtype +suuported||supported +suuporting||supporting +suuports||supports +suuport||support +swaped||swapped +swaping||swapping +switchs||switches +swithcboard||switchboard +swithced||switched +swithces||switches +swithches||switches +swithching||switching +swithch||switch +swithcing||switching +swithcover||switchover +swithc||switch +swtich||switch +syles||styles +syle||style +sylog||syslog +symbsols||symbols +symbsol||symbol +symemetric||symmetric +symetric||symmetric +synax||syntax +synchonisation||synchronisation +synchonised||synchronised +synchonises||synchronises +synchonise||synchronise +synchonising||synchronising +synchonization||synchronization +synchonized||synchronized +synchonizes||synchronizes +synchonize||synchronize +synchonizing||synchronizing +synchroniously||synchronously +synchronious||synchronous +syncronised||synchronised +syncronises||synchronises +syncronise||synchronise +syncronising||synchronising +syncronizations||synchronizations +syncronization||synchronization +syncronized||synchronized +syncronizes||synchronizes +syncronize||synchronize +syncronizing||synchronizing +syncronously||synchronously +syncronous||synchronous +syncronus||synchronous +syncting||syncing +syntehsised||synthesised +syntehsise||synthesise +syntehsized||synthesized +syntehsize||synthesize +syntesis||synthesis +syntetized||synthesized +syntetize||synthesize +sypport||support +systen||system +syste||system +sytematic||systematic +sytemd||systemd +sytems||systems +sytem||system +sythesis||synthesis +sytled||styled +sytles||styles +sytle||style +sytling||styling +szenario||scenario +szenarios||scenarios +szes||sizes +tablepsaces||tablespaces +tablepsace||tablespace +tage||stage +taht||that +tanslated||translated +tanslates||translates +tanslate||translate +tanslations||translations +tanslation||translation +tanslator||translator +targetted||targeted +targettting||targeting +taylored||tailored +tcahce||cache +tcahces||caches +tcpdumpp||tcpdump +teached||taught +techincally||technically +techincal||technical +technlogy||technology +teh||the +temmporary||temporary +temorary||temporary +tempararily||temporarily +temparary||temporary +tempated||templated +tempates||templates +tempate||template +tempatied||templatized +tempation||temptation +tempatised||templatised +tempatized||templatized +tempature||temperature +temporarly||temporarily +tempories||temporaries +temporily||temporarily +tempororaries||temporaries +tempororarily||temporarily +tempororary||temporary +temporories||temporaries +tempororily||temporarily +temporory||temporary +temporraies||temporaries +temporraily||temporarily +temporraries||temporaries +temporrarily||temporarily +temporrary||temporary +temporray||temporary +temporries||temporaries +temporrily||temporarily +temporry||temporary +temportal||temporal +temportaries||temporaries +temportarily||temporarily +temportary||temporary +temporyries||temporaries +temporyrily||temporarily +temporyry||temporary +tempory||temporary +tempraaily||temporarily +tempraal||temporal +tempraarily||temporarily +tempraarly||temporarily +tempraary||temporary +tempraay||temporary +tempraily||temporarily +tempral||temporal +tempramental||temperamental +temprament||temperament +tempraraily||temporarily +tempraral||temporal +tempraraly||temporarily +temprararily||temporarily +temprararly||temporarily +temprarary||temporary +tempraray||temporary +temprarily||temporarily +temprary||temporary +tempray||temporary +tempremental||temperamental +temprement||temperament +temproaily||temporarily +temproal||temporal +temproarily||temporarily +temproarly||temporarily +temproary||temporary +temproay||temporary +temproily||temporarily +temprol||temporal +tempromental||temperamental +temproment||temperament +temproraily||temporarily +temproral||temporal +temproraly||temporarily +temprorarily||temporarily +temprorarly||temporarily +temprorary||temporary +temproray||temporary +temprorily||temporarily +temprory||temporary +temproy||temporary +tenatively||tentatively +tenative||tentative +terminaters||terminators +terminater||terminator +termperatues||temperatures +termperatue||temperature +termperatures||temperatures +termperature||temperature +termplated||templated +termplates||templates +termplate||template +termporal||temporal +termporaries||temporaries +termporarily||temporarily +termporary||temporary +tescases||testcases +tescase||testcase +texually||textually +texual||textual +tghe||the +thansk||thanks +thant||than +thast||that +thats||that's +theer||there +theoreticall||theoretically +therby||thereby +therefor||therefore +theres||there's +therfore||therefore +thether||whether +thetrahedron||tetrahedron +thev||the +theyre||they're +thier||their +thie||the +thigns||things +thign||thing +thigny||thingy +thiknesses||thicknesses +thikness||thickness +thiks||thinks +thik||think +thinkgs||things +thinkg||things +thouroughly||thoroughly +thourough||thorough +threasholds||thresholds +threashold||threshold +threded||threaded +thredhold||threshold +threding||threading +threds||threads +thred||thread +three-dimenional||three-dimensional +threedimenional||three-dimensional +three-dimenionsal||three-dimensional +threedimenionsal||three-dimensional +threhold||threshold +threshholds||thresholds +threshhold||threshold +throught||through +throug||through +throuth||through +thses||these +thsi||this +thsould||should +thtat||that +tiemstamp||timestamp +tiggered||triggered +tiggering||triggering +tiggers||triggers +tigger||trigger +tigthened||tightened +tigthening||tightening +tigthens||tightens +tigthen||tighten +tigthly||tightly +tigth||tight +tihs||this +timeing||timing +timeoutted||timed out +timestan||timespan +timestemps||timestamps +timestemp||timestamp +timetamps||timestamps +timetamp||timestamp +timming||timing +timout||timeout +tipically||typically +togehter||together +togheter||together +toghether||together +toglled||toggled +toglle||toggle +togther||together +tomorrrow||tomorrow +toogle||toggle +toughtful||thoughtful +toughtly||tightly +toughts||thoughts +tought||thought +touple||tuple +traditiona||traditional +traditionnal||traditional +trageted||targeted +trailling||trailing +tranceivers||transceivers +tranceiver||transceiver +tranfered||transfered +tranfering||transfering +tranfers||transfers +tranfer||transfer +tranformations||transformations +tranformation||transformation +tranformed||transformed +tranforming||transforming +tranforms||transforms +tranform||transform +tranlated||translated +tranlates||translates +tranlate||translate +tranlating||translating +tranlations||translations +tranlation||translation +tranparently||transparently +tranparent||transparent +tranport||transport +transaction-spacific||transaction-specific +transalte||translate +transations||transactions +transation||transaction +transciever||transceiver +transfered||transferred +transfering||transferring +transfromations||transformations +transfromation||transformation +transfromed||transformed +transfroming||transforming +transfroms||transforms +transfrom||transform +transisions||transitions +transision||transition +transisition||transition +transistions||transitions +transistion||transition +transitionned||transitioned +transitons||transitions +transiton||transition +translatied||translated +translatoins||translations +translatoin||translation +transmiters||transmitters +transmiter||transmitter +transmiting||transmitting +transmition||transmission +transmittion||transmission +transormed||transformed +transorming||transforming +transorms||transforms +transorm||transform +transpable||transposable +transpacencies||transparencies +transpacency||transparency +transpaerntly||transparently +transpaernt||transparent +transpancies||transparencies +transpancy||transparency +transpant||transplant +transparaently||transparently +transparaent||transparent +transparanceies||transparencies +transparancey||transparency +transparancies||transparencies +transparancy||transparency +transparanetly||transparently +transparanet||transparent +transparanies||transparencies +transparantly||transparently +transparant||transparent +transparany||transparency +transpararently||transparently +transpararent||transparent +transparcencies||transparencies +transparcency||transparency +transparcenies||transparencies +transparceny||transparency +transparities||transparencies +transparity||transparency +transparnecies||transparencies +transparnecy||transparency +transparntly||transparently +transparnt||transparent +transparrenly||transparently +transparrently||transparently +transparren||transparent +transparrent||transparent +transparts||transports +transpart||transport +transpatrently||transparently +transpatrent||transparent +transpencies||transparencies +transpency||transparency +transperancies||transparencies +transperancy||transparency +transperantly||transparently +transperant||transparent +transperencies||transparencies +transperency||transparency +transperently||transparently +transperent||transparent +transprencies||transparencies +transprency||transparency +transprently||transparently +transprent||transparent +transproted||transported +transprots||transports +transprot||transport +transprts||transports +transprt||transport +transpsition||transposition +transtions||transitions +transtion||transition +transtitions||transitions +transtition||transition +trasfers||transfers +trasfer||transfer +trasmission||transmission +trasparency||transparency +trasparently||transparently +trasparent||transparent +trasportable||transportable +trasported||transported +trasporter||transporter +trasports||transports +trasport||transport +trasposed||transposed +traspose||transpose +traspositions||transpositions +trasposition||transposition +traved||traversed +traveersal||traversal +traveersed||traversed +traveerses||traverses +traveerse||traverse +traveersing||traversing +traveral||traversal +travercal||traversal +traverced||traversed +traverces||traverses +traverce||traverse +travercing||traversing +travered||traversed +traveresal||traversal +traveresed||traversed +travereses||traverses +traverese||traverse +traveresing||traversing +traveres||traverse +travere||traverse +travering||traversing +traverls||travels +travesal||traversal +travesed||traversed +traveses||traverses +travese||traverse +travesing||traversing +treate||treat +treshold||threshold +trigerring||triggering +trigers||triggers +triggerd||triggered +triggerred||triggered +tright||right +trought||through +trucated||truncated +trucates||truncates +trucate||truncate +trucating||truncating +truely||truly +tryed||tried +tufure||future +tunned||tuned +tupples||tuples +tupple||tuple +turtorials||tutorials +turtorial||tutorial +two-dimenional||two-dimensional +twodimenional||two-dimensional +two-dimenionsal||two-dimensional +twodimenionsal||two-dimensional +tye||type +typicaly||typically +typles||tuples +typle||tuple +typoes||typos +typoe||typo +tyring||trying +ŧarballs||tarballs +ŧarball||tarball +ubutunu||Ubuntu +udpated||updated +udpates||updates +udpate||update +udpating||updating +ueful||useful +uesd||used +uglyness||ugliness +uites||suites +uite||suite +uknown||unknown +umbrealla||umbrella +uminportant||unimportant +umoutn||umount +unabailable||unavailable +unacceptible||unacceptable +unaccesible||unaccessible +unamed||unnamed +unarchving||unarchiving +unatteded||unattended +unauthenicated||unauthenticated +unavaiable||unavailable +unavaialable||unavailable +unavaialbale||unavailable +unavaialbel||unavailable +unavaialbe||unavailable +unavaialbility||unavailability +unavaialble||unavailable +unavaible||unavailable +unavailabel||unavailable +unavailible||unavailable +unavaoidable||unavoidable +unbeliveable||unbelievable +unbeliveably||unbelievably +unbelivebly||unbelievably +unbouinded||unbounded +unbouind||unbound +unbounaded||unbounded +unbounad||unbound +unbouned||unbounded +unbounnded||unbounded +unbounnd||unbound +unboun||unbound +unbouunded||unbounded +unbouund||unbound +uncahnged||unchanged +uncertainities||uncertainties +uncertainity||uncertainty +unchangable||unchangeable +uncheked||unchecked +uncomented||uncommented +uncomenting||uncommenting +uncoments||uncomments +uncoment||uncomment +uncommited||uncommitted +uncommmented||uncommented +uncommmenting||uncommenting +uncommments||uncomments +uncommment||uncomment +uncommmitted||uncommitted +uncommmon||uncommon +uncommpresed||uncompressed +uncommpresion||uncompression +uncommpressd||uncompressed +uncommpressed||uncompressed +uncommpression||uncompression +uncommtited||uncommitted +uncompetetive||uncompetitive +uncomplete||incomplete +unconditially||unconditionally +unconditial||unconditional +unconditianally||unconditionally +unconditianal||unconditional +unconditionaly||unconditionally +unconditionnal||unconditional +unconditionnaly||unconditionally +uncondtionally||unconditionally +uncondtional||unconditional +unconfiged||unconfigured +uncontrolable||uncontrollable +uncorelated||uncorrelated +uncorrect||incorrect +uncorrectly||incorrectly +uncorrolated||uncorrelated +uncoverted||unconverted +uncrypted||unencrypted +undefiend||undefined +undefuned||undefined +underlaying||underlying +understadning||understanding +understadn||understand +underuns||underruns +underun||underrun +undesireable||undesirable +undestand||understand +undestood||understood +undupplicated||unduplicated +unecessary||unnecessary +uneeded||unneeded +unencrpted||unencrypted +unencrpt||unencrypt +unenforcable||unenforceable +unepectedly||unexpectedly +unepected||unexpected +uner||under +unesacped||unescaped +unesacpe||unescape +unessecarry||unnecessary +unessecary||unnecessary +unexcectedly||unexpectedly +unexcected||unexpected +unexcpectedly||unexpectedly +unexcpected||unexpected +unexecptedly||unexpectedly +unexecpted||unexpected +unexectedly||unexpectedly +unexected||unexpected +unexepctedly||unexpectedly +unexepcted||unexpected +unexepectedly||unexpectedly +unexepected||unexpected +unexpctedly||unexpectedly +unexpcted||unexpected +unexpeectedly||unexpectedly +unexpeected||unexpected +unexpepectedly||unexpectedly +unexpepected||unexpected +unexpeptedly||unexpectedly +unexpepted||unexpected +unexperctedly||unexpectedly +unexpercted||unexpected +unexpestedly||unexpectedly +unexpested||unexpected +unexpetcedly||unexpectedly +unexpetced||unexpected +unexpetctedly||unexpectedly +unexpetcted||unexpected +unexpetctly||unexpectedly +unexpetct||unexpected +unexpetectedly||unexpectedly +unexpetected||unexpected +unexpetectly||unexpectedly +unexpetect||unexpected +unexpetedly||unexpectedly +unexpeted||unexpected +unexpexctedly||unexpectedly +unexpexcted||unexpected +unexpextedly||unexpectedly +unexpexted||unexpected +unexspectedly||unexpectedly +unexspected||unexpected +unfortuantely||unfortunately +unfortuante||unfortunate +unfortunatelly||unfortunately +unfortunatly||unfortunately +unfortunetly||unfortunately +unforunately||unfortunately +unforunate||unfortunate +unforutunately||unfortunately +unforutunate||unfortunate +uniformely||uniformly +unimpemented||unimplemented +unimplemeneted||unimplemented +unimplimented||unimplemented +uninitailised||uninitialised +uninitailized||uninitialized +uninitalized||uninitialized +uninstalable||uninstallable +unintentially||unintentionally +uninteressting||uninteresting +unintialised||uninitialised +unintialized||uninitialized +unintiallised||uninitialised +unintiallized||uninitialized +unintialsied||uninitialised +unintialzied||uninitialized +uniqe||unique +unitialized||uninitialized +unitialize||uninitialize +unitilised||uninitialised +unitilising||uninitialising +unitilized||uninitialized +unitilizing||uninitializing +univerities||universities +univerity||university +unknonw||unknown +unknow||unknown +unknwon||unknown +unkown||unknown +unles||unless +unlimitied||unlimited +unmainted||unmaintained +unmodfided||unmodified +unmodfide||unmodified +unmodfied||unmodified +unmodfieid||unmodified +unmodfified||unmodified +unmodfitied||unmodified +unmodifable||unmodifiable +unmodifed||unmodified +unmoutned||unmounted +unncessary||unnecessary +unneccecarily||unnecessarily +unneccecary||unnecessary +unneccesarily||unnecessarily +unneccesary||unnecessary +unneccessarily||unnecessarily +unneccessary||unnecessary +unnecesarily||unnecessarily +unnecesarrily||unnecessarily +unnecesarry||unnecessary +unnecesary||unnecessary +unnecessarilly||unnecessarily +unnecessar||unnecessary +unnecesserily||unnecessarily +unnecessery||unnecessary +unnedded||unneeded +unneedingly||unnecessarily +unnescessarily||unnecessarily +unnescessary||unnecessary +unnesesarily||unnecessarily +unnessasary||unnecessary +unnessecarily||unnecessarily +unnessecarry||unnecessary +unnessecary||unnecessary +unnessesarily||unnecessarily +unnessesary||unnecessary +unnessessarily||unnecessarily +unnessessary||unnecessary +unoffical||unofficial +unorderd||unordered +unpacke||unpacked +unprecendented||unprecedented +unpriviliged||unprivileged +unqouted||unquoted +unqoutes||unquotes +unqoute||unquote +unqouting||unquoting +unreacahable||unreachable +unreacahble||unreachable +unrealeased||unreleased +unrecogized||unrecognized +unreconized||unrecognized +unregisterd||unregistered +unregisteres||unregisters +unregiters||unregisters +unregiter||unregister +unrelatd||unrelated +unreleated||unrelated +unrelted||unrelated +unrelyable||unreliable +unrelying||underlying +unreplacable||unreplaceable +unreplacalbe||unreplaceable +unreproducable||unreproducible +unresonable||unreasonable +unscubscribed||subscribed +unscubscribe||subscribe +unsearcahble||unsearchable +unsepcified||unspecified +unsinged||unsigned +unspefcifieid||unspecified +unspefeid||unspecified +unspeficed||unspecified +unspeficeid||unspecified +unspeficialleid||unspecified +unspeficiallied||unspecified +unspeficiallifed||unspecified +unspeficied||unspecified +unspeficieid||unspecified +unspeficifed||unspecified +unspeficifeid||unspecified +unspeficified||unspecified +unspeficififed||unspecified +unspeficiied||unspecified +unspeficiifed||unspecified +unspeficilleid||unspecified +unspeficillied||unspecified +unspeficillifed||unspecified +unspeficiteid||unspecified +unspeficitied||unspecified +unspeficitifed||unspecified +unspefied||unspecified +unspefifed||unspecified +unspefifeid||unspecified +unspefified||unspecified +unspefififed||unspecified +unspefiied||unspecified +unspefiifeid||unspecified +unspefiified||unspecified +unspefiififed||unspecified +unspefixeid||unspecified +unspefixied||unspecified +unspefixifed||unspecified +unspported||unsupported +unsual||unusual +unsubscibed||unsubscribed +unsubscibe||unsubscribe +unsubscibing||unsubscribing +unsubscritpions||unsubscriptions +unsubscritpion||unsubscription +unsubscritpitons||unsubscriptions +unsubscritpiton||unsubscription +unsubscritptions||unsubscriptions +unsubscritption||unsubscription +unsucccessfully||unsuccessfully +unsucccessful||unsuccessful +unsucccessully||unsuccessfully +unsucccessul||unsuccessful +unsuccesfull||unsuccessful +unsuccesfully||unsuccessfully +unsuccesful||unsuccessful +unsuccessfullly||unsuccessfully +unsuccessfull||unsuccessful +unsucesfull||unsuccessful +unsucesfully||unsuccessfully +unsucesful||unsuccessful +unsucesfuly||unsuccessfully +unsucessefully||unsuccessfully +unsucessflly||unsuccessfully +unsucessfually||unsuccessfully +unsucessfull||unsuccessful +unsucessfully||unsuccessfully +unsucessful||unsuccessful +unsucessfuly||unsuccessfully +unsucesssfull||unsuccessful +unsucesssfully||unsuccessfully +unsucesssful||unsuccessful +unsucesssfuly||unsuccessfully +unsucessufll||unsuccessful +unsucessuflly||unsuccessfully +unsucessully||unsuccessfully +unsued||unused +unsuported||unsupported +unsupressed||unsuppressed +unsupresses||unsuppresses +unsupress||unsuppress +unswithced||unswitched +untill||until +untranslateable||untranslatable +untrasposed||untransposed +unued||unused +unusally||unusually +unusal||unusual +unuseable||unusable +unuseful||useless +unusuable||unusable +unvailable||unavailable +unversionned||unversioned +unversoned||unversioned +unxepectedly||unexpectedly +unxepected||unexpected +unziped||unzipped +upated||updated +upater||updater +upates||updates +upate||update +upating||updating +upcomming||upcoming +updata||update +updateded||updated +updateed||updated +updatees||updates +updateing||updating +updats||updates +updat||update +updgrade||upgrade +upgradingn||upgrading +upgreade||upgrade +upladaded||uploaded +upladad||uploaded +upladed||uploaded +upladers||uploaders +uplader||uploader +uplading||uploading +uplads||uploads +uplad||upload +uplaodaded||uploaded +uplaodad||uploaded +uplaoded||uploaded +uplaoders||uploaders +uplaoder||uploader +uplaoding||uploading +uplaods||uploads +uplaod||upload +uplodaded||uploaded +uplodad||uploaded +uploded||uploaded +uploders||uploaders +uploder||uploader +uploding||uploading +uplods||uploads +uplod||upload +uppstream||upstream +upsream||upstream +upsrteamed||upstreamed +upsrteams||upstreams +upsrteam||upstream +upsteam||upstream +upsteram||upstream +upstreamedd||upstreamed +upstreammed||upstreamed +upstreammer||upstreamer +upstreamming||upstreaming +upstrema||upstream +uptim||uptime +upto||up to +uptream||upstream +usally||usually +usal||usual +usefule||useful +usefullness||usefulness +usefull||useful +usege||usage +usera||users +user-defiend||user-defined +user-defiened||user-defined +userful||useful +userpsace||userspace +usersapce||userspace +usetnet||Usenet +usibility||usability +usuable||usable +usualy||usually +usueful||useful +ususally||usually +utilies||utilities +utilites||utilities +utillities||utilities +utilties||utilities +utiltity||utility +utitlty||utility +utlities||utilities +utlity||utility +vaguaries||vagaries +vaiables||variables +vaiable||variable +vaild||valid +validing||validating +valied||valid +valif||valid +valueable||valuable +varables||variables +varable||variable +varaibles||variables +varaible||variable +variabele||variable +variabes||variables +variabe||variable +variantions||variations +varibables||variables +varibable||variable +varibaless||variables +varibales||variables +varibale||variable +varibels||variables +varibel||variable +varibility||variability +variblaes||variables +variblae||variable +varibles||variables +varible||variable +varient||variant +varity||variety +vartically||vertically +vartical||vertical +vauled||valued +vaules||values +vaule||value +vauling||valuing +vebrose||verbose +velociries||velocities +velociry||velocity +verbouse||verbose +verbously||verbosely +verbous||verbose +verbse||verbose +veresions||versions +veresion||version +verfication||verification +veriftying||verifying +verifty||verify +verifyied||verified +verions||versions +verion||version +verious||various +verisoned||versioned +verisons||versions +verison||version +veritical||vertical +verry||very +versionned||versioned +versionning||versioning +versoned||versioned +versons||versions +verson||version +verticaly||vertically +verticies||vertices +veryified||verified +veryifies||verifies +veryifying||verifying +veryify||verify +vesions||versions +vesion||version +vicefersa||vice-versa +videostreamming||videostreaming +vietnamesea||Vietnamese +vioalte||violate +vioaltion||violation +violoated||violated +violoating||violating +violoations||violations +violoation||violation +virtualisaion||virtualisation +virtualisaiton||virtualisation +virtualizaion||virtualization +virtualizaiton||virtualization +virutalenv||virtualenv +virutalisation||virtualisation +virutalised||virtualised +virutalise||virtualise +virutalization||virtualization +virutalized||virtualized +virutalize||virtualize +virutally||virtually +virutals||virtuals +virutal||virtual +visiters||visitors +visuabisation||visualisation +visuabised||visualised +visuabises||visualises +visuabise||visualise +visuabization||visualization +visuabized||visualized +visuabizes||visualizes +visuabize||visualize +visuables||visuals +visuable||visible +visuably||visually +visuabs||visuals +visuab||visual +visuaisation||visualisation +visuaised||visualised +visuaises||visualises +visuaise||visualise +visuaization||visualization +visuaized||visualized +visuaizes||visualizes +visuaize||visualize +visuales||visuals +visuale||visual +visualy||visually +vitual||virtual +viusally||visually +volenteered||volunteered +volenteers||volunteers +volenteer||volunteer +vriables||variables +vriable||variable +vrifies||verifies +vrify||verify +vrilog||Verilog +vritualenv||virtualenv +vritualisation||virtualisation +vritualise||virtualise +vritualization||virtualization +vritualize||virtualize +vritual||virtual +vrituoso||virtuoso +vulacn||Vulcan +Vulacn||Vulcan +vulakn||Vulkan +Vulakn||Vulkan +vulerable||vulnerable +vulnarabilities||vulnerabilities +vulnarability||vulnerability +want's||wants +wan't||want +waranties||warranties +waranty||warranty +warnibgs||warnings +warnibg||warning +warnigns||warnings +warnign||warning +warnigs||warnings +warnig||warning +warniings||warnings +warniing||warning +warninds||warnings +warnind||warning +warninfs||warnings +warninf||warning +warninigs||warnings +warninig||warning +warninings||warnings +warnining||warning +warninngs||warnings +warninng||warning +warninsgs||warnings +warninsg||warnings +warnins||warnings +warnin||warning +warniongs||warnings +warniong||warning +wasnt||wasn't +was'nt||weren't +wasn||was +was't||wasn't +weaponary||weaponry +webiste||website +weigth||weight +weired||weird +were'nt||wasn't +werent||weren't +wether||whether +whataver||whatever +whatepsaces||whitespaces +whatepsace||whitespace +whcih||which +wheather||whether +whenver||whenever +wheras||whereas +whereever||wherever +wheter||whether +whe||when +whiped||wiped +whishlist||wishlist +whish||wish +whitch||which +whitepsaces||whitespaces +whitepsace||whitespace +whithout||without +whith||with +wich||which +widgit||widget +widht||width +widthdraw||withdraw +wierd||weird +wihich||which +wihout||without +wiht||with +wih||with +wiil||will +wikpedia||wikipedia +wilcards||wildcards +wilcard||wildcard +willl||will +wipoing||wiping +wirtable||writable +wirters||writers +wirter||writer +wirtes||writes +wirte||write +wirth||with +wirting||writing +wirtten||written +wirtual||virtual +witable||writeable +withe||with +withing||within +withoit||without +witholding||withholding +withold||withhold +withon||within +withoout||without +withotu||without +withot||without +withoud||without +withought||without +withough||without +withoug||without +withouht||without +withount||without +withourt||without +withour||without +withous||without +withouth||without +withouyt||without +withthe||with the +witht||with +witin||within +wnated||wanted +wnating||wanting +wnats||wants +wnat||want +woithout||without +workaroung||workaround +workarrounds||workarounds +workarround||workaround +workes||works +workpsaces||workspaces +workpsace||workspace +workspsaces||workspaces +workspsace||workspace +workstaiton||workstation +worthing||meriting +woudn't||wouldn't +woud||would +would'nt||wouldn't +would't||wouldn't +wraper||wrapper +wrappng||wrapping +writeing||writing +writen||written +writting||writing +wroked||worked +wroks||works +wrok||work +wth||with +xepected||expected +xepectedly||expectedly +xepect||expect +xepecting||expecting +xepects||expects +xgetttext||xgettext +xour||your +xwindows||X +yau||you +yeilded||yielded +yeilding||yielding +yeilds||yields +yeild||yield +yelded||yielded +yelding||yielding +yelds||yields +yeld||yield +ytf-8||utf-8 +yur||your +ziped||zipped +сontain||contain +сontained||contained +сontainer||container +сontainers||containers +сontaining||containing +сontainor||container +сontainors||containers +сontains||contains diff --git a/data/spelling/corrections-case b/data/spelling/corrections-case new file mode 100644 index 0000000..ac707a4 --- /dev/null +++ b/data/spelling/corrections-case @@ -0,0 +1,132 @@ +# Picky corrections, applied before lowercasing the word. These are only +# applied to things known to be entirely English text, such as package +# descriptions, and should not be applied to files that may contain +# configuration fragments or more informal files such as debian/copyright. +# +# The format of each line is: +# mistake||correction +# +# Please keep the list sorted using `make sort` in this directory. + +american||American +apache||Apache +api||API +Api||API +arabic||Arabic +british||British +cas||CAs +chinese||Chinese +confucius||Confucius +cyrillic||Cyrillic +czech||Czech +d-bus||D-Bus +dbus||D-Bus +D-BUS||D-Bus +debian||Debian +debian-edu||Debian Edu +Debian-Edu||Debian Edu +docbook||DocBook +Docbook||DocBook +EMacs||Emacs +english||English +esperanto||Esperanto +european||European +farsi||Farsi +finnish||Finnish +french||French +gconf||GConf +Gconf||GConf +german||German +Glee||GLee +gnome||GNOME +Gnome||GNOME +gnome-vfs||GnomeVFS +gnomevfs||GnomeVFS +Gnome-Vfs||GnomeVFS +GnomeVfs||GnomeVFS +Gnome-VFS||GnomeVFS +gnu||GNU +Gnu||GNU +gobject||GObject +Gobject||GObject +greek||Greek +gstreamer||GStreamer +Gstreamer||GStreamer +gtk+||GTK+ +hebrew||Hebrew +Http||HTTP +hungarian||Hungarian +italian||Italian +japanese||Japanese +kde||KDE +korean||Korean +latex||LaTeX +Latex||LaTeX +latin||Latin +linux||Linux +lua||Lua +LUA||Lua +meta-package||metapackage +mysql||MySQL +Mysql||MySQL +MYSQL||MySQL +nees||needs +norwegian||Norwegian +oAuth||OAuth +ocaml||OCaml +Ocaml||OCaml +OCAML||OCaml +openldap||OpenLDAP +Openldap||OpenLDAP +OpenLdap||OpenLDAP +openstreetmap||OpenStreetMap +Openstreetmap||OpenStreetMap +OpenStreetmap||OpenStreetMap +openSuse||openSUSE +openSuSE||openSUSE +OpenSuse||openSUSE +OpenSuSE||openSUSE +OpenSUSE||openSUSE +portuguese||Portuguese +postgresql||PostgreSQL +Postgresql||PostgreSQL +Pypi||PyPI +PyPi||PyPI +python||Python +russian||Russian +skolelinux||Skolelinux +SkoleLinux||Skolelinux +s-lang||S-Lang +S-lang||S-Lang +SLang||S-Lang +slavic||Slavic +spanish||Spanish +subversion||Subversion +swedish||Swedish +systemD||systemd +SystemD||systemd +tcl||Tcl +TCL||Tcl +tetex||teTeX +Tetex||teTeX +TeTeX||teTeX +tex-live||TeX Live +texlive||TeX Live +TeX-live||TeX Live +TeXlive||TeX Live +TeX-Live||TeX Live +TeXLive||TeX Live +Tex||TeX +TEX||TeX +tk||Tk +TK||Tk +wi-fi||Wi-Fi +wifi||Wi-Fi +Wi-fi||Wi-Fi +Wifi||Wi-Fi +WiFi||Wi-Fi +Xemacs||XEmacs +XEMacs||XEmacs +xfce||Xfce +XFce||Xfce +XFCE||Xfce diff --git a/data/spelling/corrections-multiword b/data/spelling/corrections-multiword new file mode 100644 index 0000000..7c0d1eb --- /dev/null +++ b/data/spelling/corrections-multiword @@ -0,0 +1,33 @@ +# A list of spelling corrections where the text to be corrected consists +# of multiple words and thus can't be corrected by the standard single word +# checks. +# +# The format of each line is: +# SPELLING_MISTAKE_REGEX||correction +# +# Please keep the list sorted using `make sort` in this directory. + +(?i)allows to||allows one to +(?i)allow to||allow one to +(?i)amount of times||number of times +(?i)an other||another +(?i)could brake||could break +(?i)debian/gnu linux||Debian GNU/Linux +(?i)gnu lesser public licen[cs]e||GNU Lesser General Public License +(?i)gnu library public licen[cs]e||GNU Library General Public License +(?i)gnu public licen[cs]e||GNU General Public License +(?i)have to be pass||have to pass +(?i)is not enable||is not enabled +(?i)lest strict||less strict +(?i)let's you||lets you +(?i)none existent||non-existent +(?i)none? the less||nonetheless +(?i)over ridden||overridden +(?i)permits to||permits one to +(?i)permit to||permit one to +(?i)per say||per se +(?i)pleases see||please see +(?i)seams like||seems like +(?i)these package||this package +(?i)this packages||these packages +(?i)will be remove||will be removed diff --git a/data/stylesheets/lintian.css b/data/stylesheets/lintian.css new file mode 100644 index 0000000..fe7b9a9 --- /dev/null +++ b/data/stylesheets/lintian.css @@ -0,0 +1,489 @@ +/* lintian.css -- Style sheet for lintian.debian.org pages. */ + +/* + # Table of Contents: + # + # 1. General styles (links, lists, titles, tables...) + # 2. Header + # 3. Navigation + # 4. Main content + # 5. Footer + # 6. Other + */ + +/* + # Order: + # + # example { + # display + # position + # width + # height + # margin + # padding + # background + # color + # font + # text + # line-height + # border + # } + */ + + +/* + * 1. General styles + */ + +* { + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; +} + +html, body { + margin: 0; + padding: 0; + + font-family: 'Roboto', serif; + color: #222; +} + +h1, h2 { + font-family: 'Roboto Condensed', sans-serif; + font-weight: 400; +} + +h1 { + margin-top: 0; +} + +article h1 { + font-size: 28px; +} + +h2 { + margin-top: 25px; + margin-bottom: 14px; + padding-bottom: 6px; + border-bottom: 2px solid #AAA; +} + +h3 { + margin: 5px 0 5px 10px; + color: #444; + font-size: 1.0em; +} + +a { + color: #3252B2; +} + +ul { + margin: 0; +} + +li { + color: #333; +} + +hr { + display: none; +} + +/* + * 2. Header title + */ + +body > header { + background: #F3F3F3 url("/images/logo-small.png") no-repeat right; + border-bottom: 1px solid #AAA; + + display: flex; + justify-content: space-between; + align-items: center; + + color: #333; + + height: 50px; + padding-right: 85px; /* space for logo */ +} + +body > header h1 { + font-family: 'Roboto', serif; + font-size: 1.2em; + margin: 20px 20px; +} + +body > header a { + color: inherit; + text-decoration: none; +} + +body > header nav ul { + list-style: none; + margin: 0; + padding: 0; +} + +body > header nav li { + display: inline-block; +} + +body > header nav a { + display: block; + padding: 3px 5px; + font-size: 0.9em; + border-bottom: 2px solid #f3f3f4; +} + +body > header nav a:hover { + border-bottom: 2px solid #D70751; +} + +/* + * 4. Main content + */ + +main { + margin: 40px 40px 0; + font-size: 0.9em; +} + +.showcase { + margin: 25px 0; + padding: 40px 20px; + background: #EFF4F8 url("/images/l.png") no-repeat left; + background-origin: content-box; + border: 1px solid #DFE4E8; +} + +.showcase p { + margin-left: 160px; + font-size: 1.1em; +} + +/* For smaller devices, we leave out the "icon" - it is fairly wide with + * little added value. + */ +@media (max-width: 700px) { + + .showcase { + margin: 25px 0; + padding: 20px; + background: #EFF4F8; + border: 1px solid #DFE4E8; + } + + .showcase p { + margin-left: 5%; + } +} + +li span { + margin: 0 0px 0 0; + padding: 1px 0px; +} + +/* E/W/I colors */ + +span.label { + font-family: 'Roboto Condensed', sans-serif; + font-weight: 700; +} + +article#hints { + margin-top: 20px; + padding-top: 10px; + border-top: 2px solid #AAA; + clear: both; +} + +.hint.tiny { + font-family: 'Roboto Condensed', sans-serif; + font-weight: 700; + font-size: 0.9em; +} + +.context.tiny { + font-family: 'Roboto', sans-serif; + font-style: italic; + font-size: 0.9em; +} + +.comment.tiny { + font-family: 'Roboto', sans-serif; + font-size: 0.9em; +} + +ul.minor { + list-style-type: none; +} + +ul.see-also { + padding-bottom: 1em; +} + +ul.taglist { + list-style-type: none; +} + +ul.screenlist { + list-style-type: none; +} + +ul.sourcelist { + list-style-type: none; +} + +ul.filelist { + list-style-type: disc; + margin-left: 2em; +} + +ul.hintlist { + list-style: none; + padding-left: 10px; +} + +ul.commentlist { + list-style: none; + padding-left: 0px; +} + +li.fileitem { + margin: 10px 0 5px 0; +} + +span.visibility-symbol { + font-family: monospace; + font-size: 1.1em; +} + +a.visibility-symbol { + text-decoration: none; +} + +a.visibility-symbol:hover { + filter: invert(100%); +} + +a.visibility-symbol.big { + padding: 1px 5px; + margin-right: 5px; + font-weight: normal; +} + +a.visibility-symbol.tiny { + font-weight: bold; + padding: 1px 3px; +} + +a.visibility-symbol::before { + border: 1px solid; + display: inline-block; + width: 1em; + font-family: monospace; + font-size: 1.1em; + text-align: center; +} + +a.visibility-symbol.error::before { + content: 'E'; + color: #fff; + border-color: #fff; + background-color: #fc0905; +} + +a.visibility-symbol.warning::before { + content: 'W'; + color: #111; + border-color: #888; + background-color: #fceb02; +} + +a.visibility-symbol.info::before { + content: 'I'; + color: #fff; + border-color: #fff; + background-color: #465efc; +} + +a.visibility-symbol.pedantic::before { + content: 'P'; + color: #fff; + border-color: #fff; + background-color: #00c627; +} + +a.visibility-symbol.experimental::before { + content: 'X'; + color: #fff; + border-color: #fff; + background-color: #9e8040; +} + +a.visibility-symbol.mask::before { + content: 'M'; + color: #111; + border-color: #444; + background-color: #ddd; +} + +a.visibility-symbol.override::before { + content: 'O'; + color: #fff; + border-color: #fff; + background-color: #444; +} + +a.visibility-symbol.classification::before { + content: 'C'; + color: #fff; + border-color: #fff; + background-color: #bc55fc; +} + +section.explanation { + padding: 8px 28px; + background-color: #EEE; + border: 1px solid #BBB; + float: left; + clear:left; +} + +.explanation.error { + background-color: #fccac9; + border: 1px solid #fc0905; +} + +.explanation.warning { + background-color: #fcf9c9; + border: 1px solid #fceb02; +} + +.explanation.info { + background-color: #dee2fc; + border: 1px solid #465efc; +} + +.explanation.pedantic { + background-color: #d4fcdc; + border: 1px solid #00c627; +} + +.explanation.experimental { + background-color: #fcf2de; + border: 1px solid #9e8040; +} + +.explanation.classification { + background-color: #f4e8fc; + border: 1px solid #bc55fc; +} + +section.auxiliary { + margin: 20px 0; + float: left; +} + +div.terminal { + margin-bottom: 1em; +} + +p.terminal { + font-family: monospace; + margin-top: 0; + margin-bottom: 0; +} + +article.version { + display: flex; + gap: 1em; + align-items: flex-start; +} + +article.version nav.version-selector { + flex: 0 auto; + order: 2; +} + +nav.version-selector { + background-color: #F3F3F3; + border: 1px solid #AAA; + padding: 0.8em; + margin: 0 0 20px 20px; + display: inline-block; + float: right; +} + +.version-selector h3 { + font-weight: bold; + text-align: center; + white-space: nowrap; + margin: 0; + margin-bottom: 0.5em; +} + +.version-selector ul { + list-style: none; + padding: 0; +} + +.version-selector li { + white-space: nowrap; +} + +.version-selector span.highlight { + color: #D70751; +} + +span.maintenance_links { + font-size: 0.6em; + margin-left: 1.2em; +} + +.liberty.main { +} + +.liberty.contrib { + color: red; +} + +.liberty.non-free { + color: red; +} + +span.release-list { + font-style: italic; +} + +span.quote { + font-style: italic; +} + +span.run-details { + font-style: italic; +} + +a.sample { + font-style: italic; +} + +/* + * 5. Footer + */ + +footer { + display: block; /* HTML5 compat */ + margin: 20px 20px; + padding: 10px 0 0 0; + font-family: 'Roboto Condensed', sans-serif; + font-size: 0.85em; + border-top: 1px solid #AAA; +} + +footer p { + margin: 0; + padding: 0; +} diff --git a/data/systemd/init-whitelist b/data/systemd/init-whitelist new file mode 100644 index 0000000..11403d2 --- /dev/null +++ b/data/systemd/init-whitelist @@ -0,0 +1,38 @@ +# Names provided/masked by systemd +# Generated from the systemd links +# sed -n -e 's|^.\+[[:space:]]\+/lib/systemd/system/\([^/]\+\)\.service$|\1|p' debian/systemd.links +urandom +procps +rc.local +module-init-tools +kmod +x11-common +hostname +rmnologin +bootmisc +fuse +bootlogd +stop-bootlogd-single +stop-bootlogd +hwclock +mountkernfs +mountdevsubfs +mountall +mountall-bootclean +mountnfs +mountnfs-bootclean +umountfs +umountnfs +umountroot +checkfs +checkroot +checkroot-bootclean +cryptdisks +cryptdisks-early +single +killprocs +sendsigs +halt +reboot +motd +bootlogs diff --git a/data/testsuite/known-obsolete-restrictions b/data/testsuite/known-obsolete-restrictions new file mode 100644 index 0000000..75e46c7 --- /dev/null +++ b/data/testsuite/known-obsolete-restrictions @@ -0,0 +1,3 @@ +# Known Restrictions in debian/tests/control that are obsolete + +needs-recommends diff --git a/data/testsuite/known-restrictions b/data/testsuite/known-restrictions new file mode 100644 index 0000000..75967e3 --- /dev/null +++ b/data/testsuite/known-restrictions @@ -0,0 +1,17 @@ +# Known Restrictions in debian/tests/control + +allow-stderr +breaks-testbed +build-needed +flaky +hint-testsuite-triggers +isolation-container +isolation-machine +needs-internet +needs-reboot +needs-recommends +needs-root +rw-build-tree +skip-not-installable +skippable +superficial diff --git a/data/testsuite/known-testsuites b/data/testsuite/known-testsuites new file mode 100644 index 0000000..a1a990e --- /dev/null +++ b/data/testsuite/known-testsuites @@ -0,0 +1,12 @@ +# Known Testsuite fields in dsc + +autopkgtest +autopkgtest-pkg-dkms +autopkgtest-pkg-elpa +autopkgtest-pkg-go +autopkgtest-pkg-nodejs +autopkgtest-pkg-octave +autopkgtest-pkg-perl +autopkgtest-pkg-python +autopkgtest-pkg-r +autopkgtest-pkg-ruby diff --git a/data/triggers/trigger-types b/data/triggers/trigger-types new file mode 100644 index 0000000..d2892fa --- /dev/null +++ b/data/triggers/trigger-types @@ -0,0 +1,19 @@ +# List of known/supported triggers. +# Format: +# <trigger-type> => key=value[, key2=value2, ...] +# +# Known key/values: +# await (bool): Whether this is an await trigger +# implicit-await (bool): Whether this is an implicit await trigger +# +# Manually sorted by name. +# + +activate => await=1, implicit-await=1 +activate-await => await=1 +activate-noawait => await=0 + +interest => await=1, implicit-await=1 +interest-await => await=1 +interest-noawait => await=0 + diff --git a/doc/CREDITS b/doc/CREDITS new file mode 100644 index 0000000..e57c9ed --- /dev/null +++ b/doc/CREDITS @@ -0,0 +1,67 @@ +In addition to those who have contributed substantial pieces of code +(they are already listed in the copyright file), Lintian has benefited +greatly from advice and comments by many people: + + Joey Hess <joeyh@master.debian.org> + James A. Treacy <treacy@debian.org> + Ray Dassen <jdassen@wi.leidenuniv.nl> + Yann Dirson <dirson@debian.org> + Darren Stalder <torin@daft.com> + Topi Miettinen <Topi.Miettinen@ml.tele.fi> + Gregor Hoffleit <flight@debian.org> + Santiago Vila <sanvila@ctv.es> + Holger Rusch + Joost Witteveen <joostje@debian.org> + James R. Van Zandt <jrv@vanzandt.mv.com> + Roman Hodek <Roman.Hodek@informatik.uni-erlangen.de> + Giuliano P Procida <gpp10@cam.ac.uk> + Michael Meskes <meskes@debian.org> + Christian Leutloff <leutloff@debian.org> + James Troup <james@nocrew.org> + Gregory S. Stark <gsstark@mit.edu> + Gordon Russell <gor@dcs.napier.ac.uk> + Adam P. Harris <aph@debian.org> + Fabrizio Polacco <fpolacco@debian.org> + Dirk Eddelbuettel <edd@debian.org> + Robert S. Edmonds <edmonds@freewwweb.com> + Roderick Schertler <roderick@argon.org> + Juan Cespedes <cespedes@debian.org> + Manoj Srivasta <srivasta@debian.org> + Oliver Elphick <Oliver.Elphick@lfix.co.uk> + Joel Klecker "Espy" <jk@espy.org> + Rob Browning <rlb@cs.utexas.edu> + Martin Schulze "Joey" <joey@debian.org> + Adrian Bridgett <adrian.bridgett@poboxes.com> + Marcus Brinkmann <brinkmds@rz.ruhr-uni-bochum.de> + Ruud de Rooij <ruud@debian.org> + Johnie Ingram <johnie@debian.org> + Brian Bassett <brianb@debian.org> + Charles Briscoe-Smith <cpbs@debian.org> + Julian Gilbey <jdg@maths.qmw.ac.uk> + Raphael Geissert <atomo64@gmail.com> + Adam D. Barratt <adam@adam-barratt.org.uk> + Charles Plessy <plessy@debian.org> + Daniel Kahn Gillmor <dkg@fifthhorseman.net> + Mathieu Parent <math.parent@gmail.com> + Jan Wagner <waja@cyconet.org> + Samuel Bronson <naesten@gmail.com> + Don Armstrong <don@debian.org> + Helmut Grohne <helmut@subdivi.de> + Guillem Jover <guillem@debian.org> + Marcelo Jorge Vieira <metal@alucinados.com> + Anders Jonsson <anders.jonsson@norsjovallen.se> + Piotr Ożarowski <piotr@debian.org> + Ivo De Decker <ivo.dedecker@ugent.be> + Tomasz Buchert <tomasz.buchert@inria.fr> + Paul Wise <pabs@debian.org> + Salvatore Bonaccorso <carnil@debian.org> + Niklas Fiekas <niklas.fiekas@tu-clausthal.de> + Damyan Ivanov <dmn@debian.org> + Sylvestre Ledru <sylvestre@debian.org> + Simon McVittie <smcv@debian.org> + Johannes Schauer <j.schauer@email.de> + Matt Kraai <kraai@ftbfs.org> + Chris Lamb <lamby@debian.org> + +And of course the entire Debian Project, without which Lintian would +have no raison to etre! diff --git a/doc/README.developers.pod b/doc/README.developers.pod new file mode 100644 index 0000000..640f629 --- /dev/null +++ b/doc/README.developers.pod @@ -0,0 +1,189 @@ +# -*- pod -*- +# +# Use "perldoc doc/README.developers.pod" to read it like a manpage. + +=head1 NAME + +README.developers.pod -- README file for developers of Lintian + +=head1 SYNOPSIS + +This document aims to give an overview of the Lintian internals +and is intended for people, who wants to develop or work on Lintian. + +For how to use Lintian, please refer to the (other) README, the manual +page lintian(1) or the User Manual. + +=head1 DESCRIPTION + +Lintian dissects Debian packages and tries to find bugs and policy +violations. It contains automated checks for many aspects of Debian +policy as well as some checks for common errors. + +This document describes how you can contribute to Lintian's +development as well as adapt it to your needs. + +Lintian has a large code base which has as its starting point the +directory "bin". This directory holds the "lintian" executable. +This is what gets called when a user calls lintian. This frontend +then calls the lintian checks which run over the Debian package +that Lintian is checking. + +=head2 The source code layout + +The source code is divided into self-contained groups. Here is a +quick overview. + +=over 4 + +=item checks + +contains the checks and the tag descriptions. + +=item collection + +contains unpacking scripts + +=item data + +Symlink to the data set for the Debian vendor profiles. See entry for +vendors below. + +=item debian + +contains Debian packaging + +=item doc + +contains the User Manuals and general docs (see man/ below) + +=item bin + +contains the frontends (e.g. code installed in /usr/bin) + +=item lib + +contains Perl modules/library for common tasks. + +=item man + +contains the manpages for tools in bin/ + +=item private + +various private helpers etc. + +=item profiles + +contains vendor profiles + +=item reporting + +tools/code for the lintian.d.o setup + +=item t + +the new test suite + +=item vendors + +Per vendor data sets used by checks (and Lintian::Architecture) via +the Lintian::Data API. Data set is stored in I<vendors/profilename/data>, +where I<profilename> is the "full name" of the profile (e.g. ubuntu/main). + +=back + +=head2 Core concepts in Lintian + +In Lintian there are a number of concepts (or terms), here is a list of the +most important ones: + +=over 4 + +=item Check + +A library checking specific aspects of a package, changes file, +etc. which usually can emit multiple tags. + +=item Emit (Tag) + +Tag that was not suppressed and was triggered. + +=item Lab(oratory) + +The Laboratory is Lintian's private little play-ground. When Lintian +is asked to process a package, it will generally unpack (parts of) the +package in the laboratory. The laboratories expire as soon as Lintian +is done with them, unless the option '--keep-lab' was specified. + +Note that the laboratory is usually abbreviated to "Lab". + +=item Overridden (Tag) + +Tag that was overridden by the maintainer. Usually it means that the +maintainer believes Lintian misdiagnosed the issue. In some cases it +is also used for tags that does not handle "corner-cases" + +Overridden tags are not displayed by default, but they are still +counted in statistics. This should not be confused with "Suppressed". + +=item Suppressed (Tag) + +Tags that are suppressed cannot be emitted. + +Note that suppressed tags are ignored by Lintian, so they are not +counted in statistics. Not to be confused with "Overridden". + +=item Tag + +Issue reported by Lintian. + +=item Test + +An internal test of Lintian. + +=back + +=head2 Useful tricks + +There is an extended description of tricks on +L<https://wiki.debian.org/Teams/Lintian/HackersGuide>, but some of them +are also listed here. + +=head3 Running lintian from the git repository + +Lintian was designed to be run directly from the git repository. This +allows you to quickly test your changes on a live package. In Lintian +2.5.18, the frontends will automatically detect when they are being +run from a source checkout and do the right thing. Earlier versions +need LINTIAN_BASE (or --root). The following shell snippet can be +used for 2.5.17 and earlier: + + #!/bin/sh + # ONLY FOR << 2.5.18~ OR EARLIER. Lintian (>= 2.5.18~) will DTRT. + LINTIAN_BASE="<INSERT PATH TO LINTIAN GIT DIR>" + export LINTIAN_BASE + exec "$LINTIAN_BASE/bin/lintian" "$@" + +Beware of two things: If LINTIAN_BASE is not set, Lintian (<< 2.5.18~) +will attempt to use the code from the installed version (in +/usr/share/lintian). + +The other issue is that Lintian needs a C.UTF-8 (or an en_US.UTF-8) +locale. If this is absent, it may trigger some issues with some +(e.g. manpage) checks. With libc-bin from Wheezy and Lintian 2.5.5, +this is no longer an issue. + +=head2 collections and checks + +Collections (as the names suggests) are used to extract or/and +structure data from a package. This data is then used by the checks +(usually via Lintian::Collect API) to examine the package. + +The check may be doing the extraction (or structuring) of data itself, +but it should generally be avoided for "heavy" tasks. Unlike checks, +collections can (and generally are) run in parallel to improve the +effective runtime. + +=cut + diff --git a/doc/examples/checks/my-vendor/another-check.desc b/doc/examples/checks/my-vendor/another-check.desc new file mode 100644 index 0000000..000580e --- /dev/null +++ b/doc/examples/checks/my-vendor/another-check.desc @@ -0,0 +1,7 @@ +Check-Script: my-vendor/another-check +Author: Niels Thykier <niels@thykier.net> +Type: binary +Info: An example binary check +Needs-Info: unpacked +Tags: + missing-some-important-file diff --git a/doc/examples/checks/my-vendor/some-check.desc b/doc/examples/checks/my-vendor/some-check.desc new file mode 100644 index 0000000..40e9cd3 --- /dev/null +++ b/doc/examples/checks/my-vendor/some-check.desc @@ -0,0 +1,6 @@ +Check-Script: my-vendor/some-check +Author: Niels Thykier <niels@thykier.net> +Type: source +Info: An example source check +Tags: + missing-build-depends-on-my-vendor-tools diff --git a/doc/examples/lintianrc b/doc/examples/lintianrc new file mode 100644 index 0000000..31c51f2 --- /dev/null +++ b/doc/examples/lintianrc @@ -0,0 +1,56 @@ +# /etc/lintianrc -- Lintian configuration file +# +# Note, that Lintian has reasonable default values for all variables +# specified below. Thus, you don't have to change this file unless you +# want something special. +# +# Also note, that this file uses a special syntax: +# Empty lines are allowed, comments are introduced by a hash sign (#). +# All other lines must have the format +# VAR=text +# or +# VAR="text" +# or +# VAR = text +# It is allowed to use `~' and `$HOME' in the variables, but not other +# shell/environment variables. + +# Enable info tags by default (--display info) +#display-info = yes + +# Limit the number of parallel unpacking jobs to X (--jobs) +#jobs = 8 + +# Enable pedantic tags by default (--pedantic) +#pedantic = yes + +# Enable experimental tags by default (--display-experimental) +#display-experimental = yes + +# Enable colored output for terminal output (--color) +#color = auto + +# Show overridden tags (--show-overrides) +#show-overrides = yes + +# Ignore all overrides (--no-override) +#override = no + +# Verbose output by default (--verbose) +#verbose = yes + +# Quiet by default (--quiet) +#quiet = yes + +# Use a different directory for temporary files - useful if /tmp is a +# tmpfs with "limited" capacity. +#TMPDIR="/var/tmp" + +# Suppress the listed tags (--suppress-tags) +#suppress-tags = debian-watch-does-not-check-openpgp-signature + +# Suppress the tags listed in the specified file (--suppress-tags-from-file) +#suppress-tags-from-file = /path/to/file.txt + +# Specify "tag per package" display limit (--tag-display-limit) +#tag-display-limit = 42 diff --git a/doc/examples/profiles/my-vendor/main.profile b/doc/examples/profiles/my-vendor/main.profile new file mode 100644 index 0000000..484e362 --- /dev/null +++ b/doc/examples/profiles/my-vendor/main.profile @@ -0,0 +1,18 @@ +# The default profile for "my-vendor" +Profile: my-vendor/main +# It has all the checks and settings from the "debian" profile +Extends: debian/main +# Add checks specific to "my-vendor" +Enable-Tags-From-Check: + my-vendor/some-check, + my-vendor/another-check, +# Disable a tag +Disable-Tags: dir-or-file-in-opt + +# Bump severity of no-md5sums-control-file +# and file-missing-in-md5sums and make them +# non-overridable +Tags: no-md5sums-control-file, + file-missing-in-md5sums, +Severity: serious +Overridable: no diff --git a/doc/examples/tags/m/missing-build-depends-on-my-vendor-tools.desc b/doc/examples/tags/m/missing-build-depends-on-my-vendor-tools.desc new file mode 100644 index 0000000..e43de8f --- /dev/null +++ b/doc/examples/tags/m/missing-build-depends-on-my-vendor-tools.desc @@ -0,0 +1,5 @@ +Tag: missing-build-depends-on-my-vendor-tools +Severity: serious +Certainty: certain +Info: The package name starts with "my-vendor-" and is missing a + Build-Depends on my-vendor-tools. diff --git a/doc/examples/tags/m/missing-some-important-file.desc b/doc/examples/tags/m/missing-some-important-file.desc new file mode 100644 index 0000000..8876e53 --- /dev/null +++ b/doc/examples/tags/m/missing-some-important-file.desc @@ -0,0 +1,5 @@ +Tag: missing-some-important-file +Severity: serious +Certainty: certain +Info: The package is missing a very important file, which + is required for all packages of my-vendor. diff --git a/doc/lintian.rst b/doc/lintian.rst new file mode 100644 index 0000000..24c7ea3 --- /dev/null +++ b/doc/lintian.rst @@ -0,0 +1,987 @@ +===================== +Lintian User's Manual +===================== +.. sectnum:: +.. contents:: + :depth: 3 + +.. _chapter-1: + +Introduction +============ + +.. _section-1.1: + +About Lintian +------------- + +Lintian is a Debian package checker. It can be used to check binary and +source packages for compliance with the Debian policy and for other +common packaging errors. + +Lintian uses an archive directory, called laboratory, in which it stores +information about the packages it examines. It can keep this information +between multiple invocations in order to avoid repeating expensive +data-collection operations. It's also possible to check the complete +Debian archive for bugs — in a timely manner. + +.. _section-1.2: + +The intention of Lintian +------------------------ + +Packaging has become complicated—not because dpkg is complicated +(indeed, dpkg-deb is very simple to use) but because of the high +requirements of our policy. If a developer releases a new package, she +has to consider hundreds of guidelines to make the package \`policy +compliant.' + +All parts of our policy have been introduced by the same procedure: Some +developer has a good idea how to make packages more \`unique' with +respect to a certain aspect—then the idea is discussed and a policy +proposal is prepared. If we have a consensus about the policy change, +it's introduced in our manuals. + +Therefore, our policy is *not* designed to make life harder for the +maintainers! The intention is to make Debian the best Linux distribution +out there. With this in mind, lots of policy changes are discussed on +the mailing lists each week. + +But changing the policy is only a small part of the story: Just having +some statement included in the manual does not make Debian any better. +What's needed is for that policy to become \`real life,' i.e., it's +*implemented* in our packages. And this is where Lintian comes in: +Lintian checks packages and reports possible policy violations. (Of +course, not everything can be checked mechanically — but a lot of +things can and this is what Lintian is for.) + +Thus, Lintian has the following goals: + +- *To give us some impression of the \`gap' between theory (written + policy) and praxis (current state of implementation).* + + From the results of the first two Lintian checks I implemented, I see + that there is a big need to make this gap smaller. Introducing more + policy aspects is worthless unless they are implemented. We first + should fix packages to comply with current policy before searching + for new ways to make policy more detailed. (Of course, there are also + important policy changes that need to be introduced — but this is + not what's meant here.) + +- *To make us re-think about certain aspects of our policy.* + + For example, it could turn out that some ideas that once sounded + great in theory are hard to implement in all our packages — in + which case we should rework this aspect of policy. + +- *To show us where to concentrate our efforts in order to make Debian + a higher quality distribution.* + + Most release requirements will be implemented through policy. Lintian + reports provide an easy way to compare *all* our packages against + policy and keep track of the fixing process by watching bug reports. + Note, that all this can be done *automatically*. + +- *To make us avoid making the same mistakes all over again.* + + Being humans, it's natural for us to make errors. Since we all have + the ability to learn from our mistakes, this is actually no big + problem. Once an important bug is discovered, a Lintian check could + be written to check for exactly this bug. This will prevent the bug + from appearing in any future revisions of any of our packages. + +.. _section-1.3: + +Design issues +------------- + +There are three fields of application for Lintian: + +- one person could use Lintian to check the whole Debian archive and + reports bugs, + +- each maintainer runs Lintian over her packages before uploading them, + +- dinstall checks packages which are uploaded to master before they are + installed in the archive. + +The authors of Lintian decided to use a very modular design to achieve +the following goals: + +- flexibility: Lintian can be used to check single packages or the + whole archive and to report and keep track of bug reports, etc. + +- completeness: Lintian will eventually include checks for (nearly) + everything that can be checked mechanically. + +- uptodateness: Lintian will be updated whenever policy is changed. + +- performance: Lintian should make it possible to check single packages + within seconds or check the full archive within 5 days. + +The design also has a number of constrains that limits the things +Lintian can check for and what tools it can use: + +- static analysis: The code in a package may be analyzed, but it should + *never* be executed. However, Lintian can (and does) use external + tools to analyze files in the package. + +- deterministic replay-ability: Checks should not rely on the state of + system caches or even the system time. These things makes it harder + for others to reproduce (the absence of) tags. + +- same source analysis: Lintian checks packages in small isolated + groups based on the source package. Requiring the presence of all the + dependencies to provide the full results make it harder to run + lintian (not to mention, it makes "deterministic replay-ability" a + lot harder as well). + +.. _section-1.4: + +Disclaimer +---------- + +Here is a list of important notes on how to use Lintian: + +1. Lintian is not finished yet and will probably never be. Please don't + use Lintian as a reference for Debian policy. Lintian might miss a + lot of policy violations while it might also report some violations + by mistake. If in doubt, please check out the policy manuals. + +2. The Debian policy gives the maintainers a lot of freedom. In most + cases, the guidelines included in the manuals allow exceptions. Thus, + if Lintian reports a policy violation on a package and you think this + is such an exception (or if you think Lintian has a bug) you can do + two things: If your package is a bit non-standard and weird in this + regard, you can install an override. If you think however that the + check is too easily or outright wrongly triggered, please file a bug + on the lintian package. + +3. Please DO NOT use Lintian to file bug reports (neither single ones + nor mass bug reports). This is done by the authors of Lintian already + and duplication of efforts and bug reports should be avoided! If you + think a certain bug is \`critical' and should be reported/fixed + immediately, please contact the maintainer of the corresponding + package and/or the Lintian maintainers. + +4. Any feedback about Lintian is welcome! Please send your comments to + the lintian maintainers lintian-maint@debian.org. + +.. _chapter-2: + +Getting started +=============== + +.. _section-2.1: + +Installing Lintian +------------------ + +Before you can start to check your packages with Lintian, you'll have to +install the lintian Debian package. + +Alternatively you can checkout Lintian from the source repository and +use that directly. By setting LINTIAN_BASE (or using the --root option) +lintian can be run from the source directory as if it had been installed +on your system. + +The only known caveat of using Lintian from the source directory is that +Lintian requires a C.UTF-8 (or en_US.UTF-8) locale to correctly process +some files. (Is that still true?) + +.. _section-2.2: + +Running lintian +--------------- + +After that, you can run Lintian on a changes file or any Debian binary, +udeb or source packages like this: + +:: + + $ lintian etm_3.2.30-1.1_all.deb + E: etm: appstream-metadata-legacy-format [usr/share/appdata/etm.appdata.xml] + W: etm: appstream-metadata-in-legacy-location [usr/share/appdata/etm.appdata.xml] + I: etm: package-contains-documentation-outside-usr-share-doc [usr/share/etm/etmTk/help/UserManual.html] + $ + +Please note that some checks are cross-package checks and can only be +(accurately) performed if the binary packages and the source are +processed together. If Lintian is passed a changes file, it will attempt +to process all packages listed in the changes file. + +Lintian supports a number of command line options, which are documented +in the manpage of lintian(1). Some of the options may appear in the +lintianrc file without leading dashes. + +.. _section-2.3: + +Lintian Tags +------------ + +Lintian uses a special format for all its error and warning messages. +With that it is very easy to write other programs which run Lintian and +interpret the displayed messages. + +The first character of each line indicates the type of message. +Currently, the following types are supported: + +*Errors (E)* + The displayed message indicates a policy violation or a packaging + error. For policy violations, Lintian will cite the appropriate + policy section when it is invoked with the ``-i`` option. + +*Warnings (W)* + The displayed message might be a policy violation or packaging error. + A warning is usually an indication that the check is known to + sometimes produce false positive alarms, because either the + corresponding rule in policy has many exceptions or the check uses + some sort of heuristic to find errors. + +*Info (I)* + The displayed message is meant to inform the maintainer about a + certain packaging aspect. Such messages do not usually indicate + errors, but might still be of interest to the curious. They are not + displayed unless the ``-I`` option is set. + +*Notes (N)* + The displayed message is a debugging message which informs you about + the current state of Lintian. + +*Experimental (X)* + The displayed message is one of the types listed above, but has been + flagged as \`experimental' by the Lintian maintainers. This means + that the code that generates this message is not as well tested as + the rest of Lintian, and might still give surprising results. Feel + free to ignore Experimental messages that do not seem to make sense, + though of course bug reports are always welcome. They are not + displayed unless the ``-E`` option is set. + +*Overridden (O)* + The displayed message indicates a previous *Warning* or *Error* + message which has been *overridden* (see below). They are not + displayed unless the ``--show-overrides`` option is set. + +*Pedantic (P)* + The displayed message indicates a message of Lintian at its most + pickiest and include checks for particular Debian packaging styles, + checks that are very frequently wrong, and checks that many people + disagree with. They are not displayed unless the ``--pedantic`` + option is set. + +The type indicator is followed by the name of the package and for +non-binary packages the type of the package. Then comes the *problem* +that was discovered, also known as a *tag* (for example, +``old-fsf-address-in-copyright-file``). + +Depending on which tag has been reported, the line may contain +additional arguments which tell you, for example, which files are +involved. + +If you do not understand what a certain tag is about, you can specify +the ``-i`` option when calling Lintian to get a detailed description of +the reported tags: + +:: + + $ lintian --info --tags appstream-metadata-in-legacy-location etm_3.2.30-1.1_all.deb + N: + W: etm: appstream-metadata-in-legacy-location [usr/share/appdata/etm.appdata.xml] + N: + N: AppStream metadata file was found in /usr/share/appdata/. The AppStream XML files should be placed in /usr/share/metainfo/. + N: + N: Please refer to https://wiki.debian.org/AppStream/Guidelines for details. + N: + N: Visibility: warning + N: Show-Always: no + N: Check: appstream-metadata + N: + $ + +In some cases, the messages contain some additional text with a leading +hash character (``#``). This text should be ignored by any other +programs which interpret Lintian's output because it doesn't follow a +unique format between different messages and it's only meant as +additional information for the maintainer. + +.. _section-2.4: + +Overrides +--------- + +In some cases, the checked package does not have a bug or does not +violate policy, but Lintian still reports an error or warning. This can +have the following reasons: Lintian has a bug itself, a specific Lintian +check is not smart enough to know about a special case allowed by +policy, or the policy does allow exceptions to some rule in general. + +In the first case (where Lintian has a bug) you should send a bug report +to the Debian bug tracking system and describe which package you +checked, which messages have been displayed, and why you think Lintian +has a bug. Best would be, if you would run Lintian again over your +packages using the ``-d`` (or ``--debug``) option, which will cause +Lintian to output much more information (debugging info), and include +these messages in your bug report. This will simplify the debugging +process for the authors of Lintian. + +In the other two cases (where the error is actually an exception to +policy), you should probably add an override. If you're unsure though +whether it's indeed a good case for an override, you should contact the +Lintian maintainers too, including the Lintian error message and a short +note, stating why you think this is an exception. This way, the Lintian +maintainers can be sure the problem is not actually a bug in Lintian or +an error in the author's reading of policy. Please do not override bugs +in lintian, they should rather be fixed than overridden. + +Once it has been decided that an override is needed, you can easily add +one by supplying an overrides file. If the override is for a binary or +udeb package, you have to place it at +``/usr/share/lintian/overrides/<package>`` inside the package. The tool +``dh_lintian`` from the Debian package debhelper may be useful for this +purpose. + +If the override is for a source package, you have to place it at +``debian/source/lintian-overrides`` or +``debian/source.lintian-overrides`` (the former path is preferred). With +that, Lintian will know about this exception and not report the problem +again when checking your package. (Actually, Lintian will report the +problem again, but with type *overridden*, see above.) + +Note that Lintian extracts the override file from the (u)deb and stores +it in the laboratory. The files currently installed on the system are +not used in current Lintian versions. + +.. _section-2.4.1: + +Format of override files +~~~~~~~~~~~~~~~~~~~~~~~~ + +The format of the overrides file is simple, it consists of one override +per line (and may contain empty lines and comments, starting with a +``#``, on others): ``[[<package>][ <archlist>][ <type>]: ]<lintian-tag>[ +[*]<context>[*]]``. <package> is the package name; +<archlist> is an architecture list (see Architecture specific overrides +for more info); <type> is one of ``binary``, ``udeb`` and ``source``, +and <context> is all additional information provided by Lintian +except for the tag. What's inside brackets is optional and may be +omitted if you want to match it all. An example file for a binary +package would look like: + +:: + + /usr/share/lintian/overrides/foo, where foo is the name of your package + + # We use a non-standard dir permission to only allow the webserver to look + # into this directory: + foo binary: non-standard-dir-perm + foo binary: FSSTND-dir-in-usr /usr/man/man1/foo.1.gz + +An example file for a source package would look like: + +:: + + debian/source/lintian-overrides in your base source directory + foo source: debian-files-list-in-source + # Upstream distributes it like this, repacking would be overkill though, so + # tell lintian to not complain: + foo source: configure-generated-file-in-source config.cache + +Many tags can occur more than once (e.g. if the same error is found in +more than one file). You can override a tag either completely by +specifying its name (first line in the examples) or only one occurrence +of it by specifying the additional info, too (second line in the +examples). If you add an asterisk (``*``) in the additional info, this +will match arbitrary strings similar to the shell wildcard. For example: + +:: + + # The "help text" must also be covered by the override + source-is-missing apidoc/html/api_data.js * + +.. _section-2.4.2: + +Documenting overrides +~~~~~~~~~~~~~~~~~~~~~ + +To assist reviewers, Lintian will extract the comments from the +overrides file and display the related comments next to the overridden +tags. + +Comments directly above an override will be shown next to all tags it +overrides. If an override for the same tags appears on the very next +line, it will inherit the comment from the override above it. + +:: + + # This comment will be shown above all tags overridden by the following + # two overrides, (because they apply to the same tag and there is no + # empty line between them) + foo source: some-tag exact match + foo source: some-tag wildcard * match + # This override has its own comment, and it is not shared with the + # override below (because there is an empty line in between them). + foo source: some-tag another exact match + + foo source: some-tag override without a comment + +Empty lines can be used to disassociate a comment from an override +following it. This can also be used to make a general comment about the +overrides that will not be displayed. + +:: + + # This is a general comment not connected to any override, since there + # is one (or more) empty lines after it. + + foo source: another-tag without any comments + +.. _section-2.4.3: + +Architecture specific overrides +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +In rare cases, Lintian tags may be architecture specific. It is possible +to mark overrides architecture specific by using the optional +architecture list. + +The architecture list has the same syntax as the architecture list in +the "Build-Depends" field of a source package. This is described in +detail in the `Debian Policy Manual +§7.1 <https://www.debian.org/doc/debian-policy/#s-controlsyntax>`__. +Examples: + +:: + + # This is an example override that only applies to the i386 + # architecture. + foo [i386] binary: some-tag optional-extra + + # An architecture wildcard would look like: + foo [any-i386] binary: another-tag optional-extra + + # Negation also works + foo [!amd64 !i386] binary: some-random-tag optional-extra + + # Negation even works for wildcards + foo [!any-i386] binary: some-tag-not-for-i386 optional-extra + + # The package name and the package type is optional, so this + # also works + [linux-any]: tag-only-for-linux optional-extra. + +An unknown architecture will trigger a packaging hint. So will an +architecture-specific override in an architecture-independent +installable. + +.. _section-2.5: + +Vendor Profiles +--------------- + +Vendor profiles allows vendors and users to customize Lintian without +having to modify the underlying code. If a profile is not explicitly +given, Lintian will derive the best possible profile for the current +vendor from dpkg-vendor. + +.. _section-2.5.1: + +Rules for profile names and location +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Profile names should only consist of the lower case characters ([a-z]), +underscore (_), dash (-) and forward slashes (/). Particularly note that +dot (.) are specifically *not* allowed in a profile name. + +The default profile for a vendor is called ``$VENDOR/main``. If Lintian +sees a profile name without a slash, it is taken as a short form of the +default profile for a vendor with that name. + +The filename for the profile is derived from the name by simply +concatenating it with ``.profile``, Lintian will then look for a file +with that name in the following directories: + +- ``$XDG_DATA_HOME/lintian/profiles`` + +- ``$HOME/.lintian/profiles`` + +- ``/etc/lintian/profiles`` + +- ``$LINTIAN_BASE/profiles`` + +Note that an implication of the handling of default vendor profiles +implies that profiles must be in subdirectories of the directories above +for Lintian to recognise them. + +The directories are checked in the listed order and the first file +matching the profile will be used. This allows users to override a +system profile by putting one with the same filename in +``$XDG_DATA_HOME/lintian/profiles`` or ``$HOME/.lintian/profiles``. + +.. _section-2.5.2: + +Profile syntax and semantics +~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Profiles are written in the same syntax as Debian control files as +described in the `Debian Policy Manual +§5.1 <https://www.debian.org/doc/debian-policy/#s-controlsyntax>`__. +Profiles allow comments as described in the Policy Manual. + +.. _section-2.5.2.1: + +Main profile paragraph +^^^^^^^^^^^^^^^^^^^^^^ + +The fields in the first paragraph are: + +*Profile* (simple, mandatory) + Name of the profile. + +*Extends* (simple, optional) + Name of the (parent) profile, which this profile extends. Lintian + will recursively process the extended profile before continuing with + processing this profile. In the absence of this field, the profile is + not based on another profile. + +*Load-Checks* (folded, optional) + Comma-separated list of checks. Lintian will ensure all checks listed + are loaded (allowing tags from them to be enabled or disabled via + Enable-Tags or Disable-Tags). + + If a given check was already loaded before this field is processed, + then it is silently ignored. Otherwise, the check is loaded and all + of its tags are disabled (as if it had been listed in + Disable-Tags-From-Check). + + This field is most likely only useful if the profile needs to enable + a list of tags from a check in addition to any tags already enabled + from that check (if any). + +*Enable-Tags-From-Check* (folded, optional) + Comma-separated list of checks. All tags from each check listed will + be enabled in this profile. The check will be loaded if it wasn't + already. + +*Disable-Tags-From-Check* (folded, optional) + Comma-separated list of checks. All tags from each check listed will + be disabled in this profile. The check will be loaded if it wasn't + already. + +*Enable-Tags* (folded, optional) + Comma-separated list of tags that should be enabled. It may only list + tags from checks already loaded or listed in one of the following + fields "Load-Checks", "Enable-Tags-From-Check" or + "Disable-Tags-From-Check" in the current profile. + +*Disable-Tags* (folded, optional) + Comma-separated list of tags that should be disabled. It may only + list tags from checks already loaded or listed in one of the + following fields "Load-Checks", "Enable-Tags-From-Check" or + "Disable-Tags-From-Check" in the current profile. + +The profile is invalid and is rejected, if Enable-Tags and Disable-Tags +lists the same tag twice - even if it is in the same field. This holds +analogously for checks and the three fields Load-Checks, +Enable-Tags-From-Check and Disable-Tags-From-Check. + +It is allowed to list a tag in Enable-Tags or Disable-Tags even if the +check that provides this tag is listed in the Disable-Tags-From-Check or +Enable-Tags-From-Check field. In case of conflict, Enable-Tags / +Disable-Tags shall overrule Disable-Tags-From-Check / +Enable-Tags-From-Check within the profile. + +Load-Checks, Enable-Tags-From-Check and Disable-Tags-From-Check can be +used to load third-party or vendor specific checks. + +It is not an error to load, enable or disable a check or tag that is +already loaded, enabled or disabled respectively (e.g. by a parent +profile). + +A profile is invalid if it directly or indirectly extends itself or if +it extends an invalid profile. + +By default the tags from the check "lintian" will be loaded as they +assist people in writing and maintaining their overrides file (e.g. by +emitting ``malformed-override``). However, they can be disabled by +explicitly adding the check ``lintian`` in the Disable-Tags-From-Check +field. + +.. _section-2.5.2.2: + +Tag alteration paragraphs +^^^^^^^^^^^^^^^^^^^^^^^^^ + +The fields in the secondary paragraphs are: + +*Tags* (folded, mandatory) + Comma separated list of tags affected by this paragraph. + +*Overridable* (simple, optional) + Either "Yes" or "No", which decides whether these tags can be + overridden. Lintian will print an informal message if it sees an + override for a tag marked as non-overridable (except if --quiet is + passed). + +*Visibility* (simple, optional) + The value must be a valid tag visibility other than "classification". + The visibility of the affected tags is set to this value. This cannot + be used on any tag that is defined as a "classification" tag. + + Note that *experimental* is not a visibility. + +The paragraph must contain at least one other field than the Tag field. + +.. _section-2.5.2.3: + +An example vendor profile +^^^^^^^^^^^^^^^^^^^^^^^^^ + +Below is a small example vendor profile for a fictive vendor called +"my-vendor". + +:: + + # The default profile for "my-vendor" + Profile: my-vendor/main + # It has all the checks and settings from the "debian" profile + Extends: debian/main + # Add checks specific to "my-vendor" + Enable-Tags-From-Check: + my-vendor/some-check, + my-vendor/another-check, + # Disable a tag + Disable-Tags: dir-or-file-in-opt + + # Bump visibility of no-md5sums-control-file + # and file-missing-in-md5sums and make them + # non-overridable + Tags: no-md5sums-control-file, + file-missing-in-md5sums, + Visibility: error + Overridable: no + +.. _section-2.6: + +Vendor specific data files +-------------------------- + +Lintian uses a number of data files for various checks, ranging from +common spelling mistakes to lists of architectures. While some of these +data files are generally applicable for all vendors (or Debian +derivatives), others are not. + +Lintian supports vendor specific data files. This allows vendors to deploy +their own data files tailored for their kind of system. Lintian supports +both extending an existing data file and completely overriding it. + +.. _section-2.6.1: + +Load paths and order +~~~~~~~~~~~~~~~~~~~~ + +Lintian will search the following directories in order for vendor +specific data files: + +- ``$XDG_DATA_HOME/lintian/vendors/PROFILENAME/data`` + +- ``$HOME/.lintian/vendors/PROFILENAME/data`` + +- ``/etc/lintian/vendors/PROFILENAME/data`` + +- ``$LINTIAN_BASE/vendors/PROFILENAME/data`` + +If none of the directories exists or none of them provide the data file +in question, Lintian will (recursively) retry with the parent of the +vendor (if any). If the vendor and none of its parents provide the data +file, Lintian will terminate with an error. + +.. _section-2.6.2: + +Basic syntax of data files +~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Generally, data files are read line by line. Leading whitespace of every +line is removed and (now) empty lines are ignored. Lines starting with a +``#`` are comments and are also ignored by the parser. Lines are +processed in the order they are read. + +If the first character of the line is a ``@``, the first word is parsed +as a special processing instruction. The rest of the line is a parameter +to that processing instruction. Please refer to `List of processing +instructions <#section-2.6.2.1>`__. + +All other lines are read as actual data. If the data file is a table (or +map), the lines will parsed as key-value pairs. If the data file is a +list (or set), the full line will be considered a single value of the +list. + +It is permissible to define the same key twice with a different value. +In this case, the value associated with the key is generally redefined. +There are very rare exceptions to this rule, where the data file is a +table of tables (of values). In this case, a recurring key is used to +generate the inner table. + +.. _section-2.6.2.1: + +List of processing instructions +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +The following processing instructions are recognised: + +*@delete ENTRY* + Removes a single entry denoted by ENTRY that has already been parsed. + + It is permissible to list a non-existent entry, in which case the + instruction has no effect. This instruction does *not* prevent the + entry from being (re-)defined later, it only affects the current + definition of the entry. + + For key-pair based data files, ENTRY must match the key. For single + value data files, ENTRY must match the line to remove. + +*@include-parent* + Processes parent data file of the current data file. + + The informal semantics of this instruction is that it reads the + "next" data file in the vendor "chain". The parsing of the parent is + comparable to a C-style include or sourcing a shell script. + + More formally, let CP be the name of the vendor profile that defines + the data file containing the instruction. Let the parent of CP be + referred to as PCP. + + Lintian will search for the data file provided by PCP using the rules + as specified in `Load paths and order <#section-2.6.1>`__. If no data + file is found, Lintian will terminate the parsing with an error. + Thus, this instruction can only be used by profiles that extends + other profiles. + +.. _chapter-3: + +Advanced usage +============== + +.. _section-3.1: + +How Lintian works +----------------- + +Lintian is divided into the following layers: + +*frontend* + the command line interface (currently, this layer consists of the + ``lintian`` program. + +*checks* + a set of modules that check different aspects of packages. + +*data collectors* + a set of scripts that prepares specific information about a package + needed by the check modules + +When you check a package with Lintian, the following steps are performed +(not exactly in this order—but the details aren't important now): + +1. An entry is created for the package in the *laboratory* (or just + *lab*). + +2. Some data is collected about the package. (That is done by the + so-called *data collector* scripts.) For example, the ``file`` + program is run on each file in the package and the output is stored + in the lab. + +3. The *checks* are run over the package and report any discovered + policy violations or other errors. These scripts don't access the + package contents directly, but use the collected data as input. + +4. Depending on the *lab mode* Lintian uses (see below), the whole lab + directory is removed again. If the lab is not removed, parts of the + data collected may be auto cleaned to reduce disk space. + +This separation of the *check* from the *data collector scripts* makes +it possible to run Lintian several times over a package without having +to recollect all the data each time. In addition, the checker scripts do +not have to worry about packaging details since this is abstracted away +by the collector scripts. + +.. _section-3.2: + +The laboratory +-------------- + +Lintian creates a temporary lab in ``/tmp`` which is removed again after +Lintian has completed its checks, unless the ``--keep-lab`` is used. + +.. _section-3.3: + +Writing your own Lintian checks +------------------------------- + +This section describes how to write and deploy your own Lintian checks. +Lintian will load checks from the following directories (in order): + +- ``$LINTIAN_BASE/checks`` + +Existing checks can be shadowed by placing a check with the same name in +a directory appearing earlier in the list. This also holds for the +checks provided by Lintian itself. + +Checks in Lintian consist of a Perl module implementing the actual check +(.pm). The files names of such checks are expected to be in CamelCase. For +the check name used on the command line, case transitions are replaced with +hyphens. Perl's two colons (::) are replaced with a slash. + +Vendors are recommended to use their vendor name before the first slash +(e.g. "ubuntu/fields"). + +.. _section-3.3.1: + +Check description file +~~~~~~~~~~~~~~~~~~~~~~ + +The check description file is written in the same syntax as Debian +control files as described in the `Debian Policy Manual +§5.1 <https://www.debian.org/doc/debian-policy/#s-controlsyntax>`__. +Check description files allow comments as described in the Policy +Manual. + +The check description file has two paragraph types. The first is the +check description itself and must be the first paragraph. The rest of +the descriptions describe tags, one tag per paragraph. + +.. _section-3.3.1.1: + +Check description paragraph +^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +The fields in the check description paragraph are: + +*Check-Script* (simple, mandatory) + Name of the check. This is used to determine the package name of the + Perl module implementing the check. + +*Type* (simple, mandatory) + Comma separated list of package types for which this check should be + run. Allowed values in the list are "binary" (.deb files), "changes" + (.changes files), "source" (.dsc files) and "udeb" (.udeb files). + +*Info* (multiline, optional) + A short description of what the check is for. + +*Author* (simple, optional) + Name and email of the person, who created (or implemented etc.) the + check. + +*Abbrev* (simple, optional) + Alternative or abbreviated name of the check. These can be used with + certain command line options as an alternative name for the check. + +.. _section-3.3.1.2: + +Tag description paragraph +^^^^^^^^^^^^^^^^^^^^^^^^^ + +The fields in the tag description paragraph are: + +*Tag* (simple, mandatory) + Name of the tag. It must consist entirely of the lower or/and upper + case characters ([a-zA-Z]), digits ([0-9]), underscore (_), dash (-) + and period (.). The tag name should be at most 68 characters long. + +*Severity* (simple, mandatory) + Determines the default value for the alert level. The value must be + one of "error", "warning", "info", "pedantic", or "classification". + This correlates directly to the one-letter code (of non-experimental + tags). + +*Info* (multiline, mandatory) + The tag descriptions can be found on Lintian's website + ("https://lintian.debian.org"). The description is in the standard + Markdown format. + + The symbols &, < and > must be escaped as &, < and > + (respectively). Please also escape _ as _ and * as *. + + Indented lines are considered "pre-formatted" and will not be line + wrapped. These lines are still subject to the allowed HTML tags and + above mentioned escape sequences. + +*Ref* (simple, optional) + A comma separated list of references. It can be used to refer to + extra documentation. It is primarily used for manual references, HTTP + links or Debian bug references. + + If a reference contains a space, it is taken as a manual reference + (e.g. "policy 4.14"). These references are recorded in the + "output/manual-references" data file. + + Other references include manpages ("lintian(1)"), ftp or http(s) + links ("https://lintian.debian.org"), file references + ("/usr/share/doc/lintian/changelog.gz") or Debian bug numbers + prefixed with a hash ("#651816"). + + Unknown references are (silently) ignored. + +*Experimental* (simple, optional) + Whether or not the tag is considered "experimental". Recognised + values are "no" (default) and "yes". Experimental tags always use "X" + as their "one-letter" code. + +.. _section-3.3.2: + +Check Perl module file +~~~~~~~~~~~~~~~~~~~~~~ + +This section describes the requirements for the Perl module implementing +a given check. + +The Perl package name of the check must be identical to the check name +(as defined by the "Check-Script" field in the description file) with +the following transformations: + +- All periods and dashes are replaced with underscores. + +- All forward slashes are replaced by two colons (::). + +- The resulting value is prefixed with "Lintian::". + +As an example, the check name ``contrib/hallo-world`` will result in the +Perl package name ``Lintian::contrib::hallo_world``. + +.. _section-3.3.2.1: + +API of the "run" sub +^^^^^^^^^^^^^^^^^^^^ + +The Perl module must implement the sub called ``run`` in that Perl +package. This sub will be run once for each package to be checked with 5 +arguments. These are (in order): + +- The package name. + +- The package type being checked in this run. This string is one of + "binary" (.deb), "changes" (.changes), "source" (.dsc) or "udeb" + (.udeb). + +- An instance of API Lintian::Collect. Its exact type depends on the + type being processed and is one of Lintian::Collect::Binary (.deb or + .udeb), Lintian::Collect::Changes (.changes) or + Lintian::Collect::Source (.dsc). + +- An instance of Lintian::Processable that represents the package being + processed. + +- An instance of Lintian::ProcessableGroup that represents the other + processables in the given group. An instance of the + Lintian::Collect::Group is available via its "info" method. + +Further arguments may be added in the future after the above mentioned +ones. Implementations should therefore ignore extra arguments beyond the +ones they know of. + +If the run sub returns "normally", the check was run successfully. +Implementations should ensure the return value is undefined. + +If the run sub invokes a trappable error (e.g. "die"), no further checks +are done on the package and Lintian will (eventually) exit with 1 to its +caller. The check may still be run on other packages. diff --git a/doc/releases.md b/doc/releases.md new file mode 100644 index 0000000..d9ac5df --- /dev/null +++ b/doc/releases.md @@ -0,0 +1,137 @@ +Lintian release management +========================== + + + +Preparing and doing a release +----------------------------- + +Run the full test suite while the distribution is still set to +UNRELEASED to ensure everything and all tests are green. Once +complete, replace the placeholder in the changelog with the +actual tags changed. The following command may be helpful: + + $ private/generate-tag-summary --in-place + +Then set the distribution (e.g. via `dch -r`) and run the "scripts" test +suite again. This may appear redundant at first, but some of the +tests react differently when the distribution is not UNRELEASED +(e.g. changelog-format checks that you remembered the step above). + +Build the package and run lintian on itself, cleaning up or overriding +issues that have not been fixed during development. If you do code +changes, remember to set the distribution back to UNRELEASED! +Otherwise, some checks on the code will be skipped (e.g. critic). + +Sign and upload the package. Furthermore, prepare a signed git +tag. This is generally done in the following way: + + * Take a copy of the signed `.changes` + * Optionally strip the signature from it. + * Add a tag message to the top of the file + * Tag with `git tag <VERSION> -u <KEYID> --file <FILE>` + +This method is used to provide a "trust" path between the tag and +the uploaded files. This is also why we use the signed `.changes` +(as signing the source package changes the checksums in the `.changes`). + +Once the upload has been accepted and the commit has been tagged, you +may want to "open" the next entry in the changelog. The rationale for +this is that it makes tests go back to "regular" development mode. At +the same time, the "tag-summary" reminder can be re-added. See commit +a9c67f2 as an example of how it is done. + + +To update lintian on lintian.debian.org, please see the README in +/srv/lintian.debian.org on lintian.debian.org. NOTE: if Lintian has +obtained any new dependencies, these must be installed by DSA before +updating lintian.debian.org (send a patch to DSA for their metapackage +for lintian.debian.org). + + +Updating lintian.debian.org +=========================== + +Once a new release is done and tagged, we can update the installation +on archive-wide processing server that generates "lintian.debian.org". +Historically, this server was the same as "lintian.debian.org". +However, these days the archive-wide processing happens on a separate +server called: + + lindsay.debian.org + (DD-accessible) + +In the rest of the this document, we will refer to this as the lintian-host. + + +The update is done in the following steps: + +Step 1 +------ + +Ensure that any new dependencies are installed. These must be +installed by DSA before updating lintian.debian.org (send a patch to +DSA for their metapackage for lintian.debian.org). + +Often there are no new dependencies meaning that this step can be +omitted. Please remember that you can request the dependencies before +the lintian release. + +Step 2 +------ + +Login to the lintian-host and ensure that lintian is not currectly +performing an archive-wide run and that you have "plenty" of time to +complete the upgrade. The entire upgrade can be done in less than 5 +minutes (but you may want to have a "slightly" larger window the first +few times). + +You can find lintian's crontab via either: + + sudo -ulintian crontab -l + +OR + + less /srv/lintian.debian.org/etc/cron + +If the archive-wide run is currently active, check the harness log +(`tail -f /srv/lintian.debian.org/logs/harness.log`). + + 1. If lintian is processing packages, then send a SIGTERM to the + "reporting-lintian-harness" process and it will gracefully + terminate lintian and commit the latest changes. A few seconds + after the signal has been sent, reporting-lintian-harness should + emit something like: + + [2018-01-07T14:26:25]: Signal SIGTERM acknowledged[...] + + 1. If "reporting-sync-state" is running then either kill it and + "harness" (if you do not mind triggering an error and possible + cron-noise). Alternatively, wait for "reporting-lintian-harness" + to start and kill it once lintian starts processing packages. + + 1. If "reporting-html-reports" is running, then just wait the 5-10 + minutes it takes for the entire run to complete. Otherwise, we + might end up with a broken report. + + + +Now that we are sure the lintian is not running and will not start in +the middle of the upgrade, we can perform the actual upgrade. + + cd /srv/lintian.debian.org/lintian + # Reset the directory in case there are out of band patches + # - alternative being "sudo -ulintian git stash" as long as you clean it up + sudo -ulintian git reset --hard + sudo -ulintian git fetch + # e.g. sudo -ulintian git checkout 2.5.67 + sudo -ulintian git checkout $LINTIAN_RELEASE_TAG + + # Update the manual + manpages + sudo -ulintian debian/rules clean + sudo -ulintian debian/rules rebuild-lintian.debian.org + +With this, the upgrade is complete. If the reporting framework needs +additional configuration, please remember to update +`/srv/lintian.debian.org/config.yaml` (Note it is *not* the one in the +reporting directory). diff --git a/doc/tutorial/Lintian/Tutorial.pod b/doc/tutorial/Lintian/Tutorial.pod new file mode 100644 index 0000000..3b088eb --- /dev/null +++ b/doc/tutorial/Lintian/Tutorial.pod @@ -0,0 +1,39 @@ +=head1 NAME + +Lintian::Tutorial -- The newcomer's guide to Lintian + +=head1 SYNOPSIS + +Getting started with lintian in 5 minutes... maybe 10. + +=head1 DESCRIPTION + +Depending on what you want to work with there are different ways to +approach Lintian and its code. + +=over 4 + +=item * L<Writing a Lintian check|Lintian::Tutorial::WritingChecks> + +=item * L<Running (parts of) the Lintian test suite|Lintian::Tutorial::TestSuite> + +=item * L<Writing new Lintian tests|Lintian::Tutorial::WritingTests> + +=item * Understanding Lintian + +To be written. + +=back + +=begin :man + +=head1 SEE ALSO + +L<Lintian::Tutorial::WritingChecks>, +L<Lintian::Tutorial::TestSuite>, +L<Lintian::Tutorial::WritingTests> + +=end :man + +=cut + diff --git a/doc/tutorial/Lintian/Tutorial/TestSuite.pod b/doc/tutorial/Lintian/Tutorial/TestSuite.pod new file mode 100644 index 0000000..3273388 --- /dev/null +++ b/doc/tutorial/Lintian/Tutorial/TestSuite.pod @@ -0,0 +1,115 @@ +=encoding utf-8 + +=head1 NAME + +Lintian::Tutorial::TestSuite -- Quick intro to running the Lintian testsuite + +=head1 SYNOPSIS + +Warning: This document may be out of date. + +This guide will quickly introduce you to running the Lintian test +suite and some tricks. The Lintian test suite is fairly large and +accordingly it can take a substantial amount of time to run. To speed +up development, there are various options to limit the tests to run. + +If you are looking for a guide on how to write tests, please consult +L<Lintian::Tutorial::WritingTests>. + +=head1 DESCRIPTION + +The Lintian test suite is an extensive collection of various test +cases. The test suite is divided into 4 "sub-suites". The majority +of tests are currently located in the "tests" sub-suite. + +To run the full suite: + + $ rm -rf debian/test-out; private/build-test-packages; private/runtests + +While writing a new tag (or check) you probably only want to run a +particular (subset of the) test(s). See L</Running a subset of the +tests> for the available options. + +=head2 Running a subset of the tests + +First, you have to build the test packages with: + + $ rm -rf debian/test-out; private/build-test-packages; + +Then, the following options are available: + +=over 4 + +=item Running a single test + +To run a single test by its name, use: + + $ private/runtests --onlyrun=test:$name + +=item Running all tests for a check + +To run all tests for a given check, use: + + $ private/runtests --onlyrun=check:$name + +$check must be the name of a check (it will test for +checks/$check.desc) or "legacy". This will run all tests that start +with "$check-". + +=item Running all tests designed for a specific tag + +To run all tests that have a "Test-For" or a "Test-Against" for a given +tag, use: + + $ private/runtests --onlyrun=tag:$name + +=back + +=head2 Running tests under coverage + +This feature is currently untested. + +It is possible to run most of the tests under L<Devel::Cover>. This is +done by passing I<--coverage> to I<private/runtests>. Example: + + $ private/runtests --coverage --dump-logs -j1 -k t debian/test-out + +Please note that L<Devel::Cover> does not seem to handle multiple +threads too well. You may see spurious warnings/errors if you run the +tests with 2 or more active worker threads. + +B<Caveat> 1: Coverage for collections (i.e. programs in I<collection/>) +does not seem to work at the moment. Therefore, they often end up with +(next to) zero coverage in the generated reports. + +B<Caveat> 2: L<Devel::Cover> sometimes changes the output of Lintian +or tools called by Lintian. Obviously, this leads to test +failures. Therefore, you may see weird test failures (or warnings) +when running under coverage. + +=head3 Collecting the coverage you want in a reasonable time + +Collecting coverage is excruciatingly slow. This is not helped by the +fact that it becomes unreliable when run under 2 or more threads. + +Fortunately, L<Devel::Cover> "appends" to its cover database. This +allows you to "slowly" build up the coverage database over multiple +runs. Example: + + $ private/runtests --coverage --dump-logs -j1 -k t debian/test-out suite:scripts + $ private/runtests --coverage --dump-logs -j1 -k t debian/test-out suite:debs + $ private/runtests --coverage --dump-logs -j1 -k t debian/test-out suite:source + ... + +Or: + + $ private/runtests --coverage --dump-logs -j1 -k t debian/test-out $check + $ private/runtests --coverage --dump-logs -j1 -k t debian/test-out legacy + + +=head1 SEE ALSO + +L<Lintian::Tutorial::WritingTests> + +=cut + diff --git a/doc/tutorial/Lintian/Tutorial/WritingChecks.pod b/doc/tutorial/Lintian/Tutorial/WritingChecks.pod new file mode 100644 index 0000000..b6642e1 --- /dev/null +++ b/doc/tutorial/Lintian/Tutorial/WritingChecks.pod @@ -0,0 +1,442 @@ +=encoding utf-8 + +=head1 NAME + +Lintian::Tutorial::WritingChecks -- Writing checks for Lintian + +=head1 SYNOPSIS + +Warning: This tutorial may be outdated. + +This guide will quickly guide you through the basics of writing a +Lintian check. Most of the work is in writing the two files: + + checks/<my-check>.pm + checks/<my-check>.desc + +And then either adding a Lintian profile or extending an existing +one. + +=head1 DESCRIPTION + +The basics of writing a check are outlined in the Lintian User Manual +(§3.3). This tutorial will focus on the act of writing the actual +check. In this tutorial, we will assume the name of the check to be +written is "deb/pkg-check". + +The tutorial will work with a "binary" and "udeb" check. Checking +source packages works in a similar fashion. + +=head2 Create a check I<.desc> file + +As mentioned, this tutorial will focus on the writing of a check. +Please see the Lintian User Manual (§3.3) for how to do this part. + +=head2 Create the Perl check module + +Start with the template: + + # deb/pkg-check is loaded as Lintian::deb::pkg_check + # - See Lintian User Manual §3.3 for more info + package Lintian::deb::pkg_check; + + use strict; + use warnings; + + sub run { + my ($pkg, $type, $info, $proc, $group) = @_; + return; + } + +The snippet above is a simple valid check that does "nothing at all". +We will extend it in just a moment, but first let us have a look at +the arguments at the setup. + +The I<run> sub is the entry point of our "deb/pkg-check" check; it +will be invoked once per package it should process. In our case, that +will be once per "binary" (.deb) and once per udeb package processed. + +It is given 5 arguments (in the future, possibly more), which are: + +=over 4 + +=item $pkg - The name of the package being processed. + +(Same as $proc->pkg_name) + +=item $type - The type of the package being processed. + +At the moment, $type is one of "binary" (.deb), "udeb", "source" +(.dsc) or "changes". This argument is mostly useful if certain checks +do not apply equally to all package types being processed. + +Generally it is advisable to check only binaries ("binary" and +"udeb"), sources or changes in a given check. But in rare cases, it +makes sense to lump multiple types together in the same check and this +argument helps you do that. + +(Current it is always identical to $proc->pkg_type) + +=item $info - Accessor to the data Lintian has extracted + +Basically all information you want about a given package comes from +the $info object. Sometimes referred to as either the "info object" or +(an instance of) L<Lintian::Collect>. + +This object (together with a properly set Needs-Info in the I<.desc> +file) will grant you access to all of the data Lintian has extracted +about this package. + +Based on the value of the $type argument, it will be one of +L<Lintian::Collect::Binary>, L<Lintian::Collect::Changes> or +L<Lintian::Collect::Source>. + +(Currently it is the same as $proc->info) + +=item $proc - Basic metadata about the package + +This is an instance of L<Lintian::Processable> and is useful for +trivially obtaining very basic package metadata. Particularly, the +name of source package and version of source package are readily +available through this object. + +=item $group - Group of processables from the same source + +If you want to do a cross-check between different packages built from +the same source, $group helps you access those other packages +(if they are available). + +This is an instance of L<Lintian::ProcessableGroup>. + +=back + +Now back to the coding. + +=head2 Accessing fields + +Let's do a slightly harder example. Assume we wanted to emit a tag for +all packages without a (valid) Multi-Arch field. This requires us to +A) identify if the package has a Multi-Arch field and B) identify if +the content of the field was valid. + +Starting from the top. All $info objects have a method called field, +which gives you access to a (raw) field from the control file of the +package. It returns C<undef> if said field is not present or the +content of said field otherwise. Note that field names must be given +in all lowercase letters (i.e. use "multi-arch", not "Multi-Arch"). + +This was the first half. Let's look at checking the value. Multi-arch +fields can (currently) be one of "no", "same", "foreign" or "allowed". +One way of checking this would be using the regex: + +Notice that Lintian automatically strips leading and trailing spaces +on the I<first> line in a field. It also strips trailing spaces from +all other lines, but leading spaces and the " ."-continuation markers +are kept as is. + +=head2 Checking dependencies + +Lintian can do some checking of dependencies. For most cases it works +similar to a normal dependency check, but keep in mind that Lintian +uses I<pure> logic to determine if dependencies are satisfied (i.e. it +will not look up relations like Provides for you). + +Suppose you wanted all packages with a multi-arch "same" field to +pre-depend on the package "multiarch-support". Well, we could use the +L<< $info->relation|Lintian::Collect::Binary/relation (FIELD) >> method for +this. + +$info->relation returns an instance of L<Lintian::Relation>. This +object has an "implies" method that can be used to check if a package +has an explicit dependency. Note that "implies" actually checks if +one relation "implies" another (i.e. if you satisfied relationA then +you definitely also satisfied relationB). + +As with the "field"-method, field names have to be given in all +lowercase. However "relation" will never return C<undef> (not even if the +field is missing). + +=head2 Using static data files + +Currently our check mixes data and code. Namely all the valid values +for the Multi-Arch field are currently hard-coded in our check. We can +move those out of the check by using a data file. + +Lintian natively supports data files that are either "sets" or +"tables" via L<Lintian::Data> (i.e. "unordered" collections). As an +added bonus, L<Lintian::Data> transparently supports vendor specific +data files for us. + +First we need to make a data file containing the values. Which could be: + + # A table of all the valid values for the multi-arch field. + no + same + foreign + allowed + +This can then be stored in the data directory as +I<data/deb/pkg-check/multiarch-values>. + +Now we can load it by using: + + use Lintian::Data; + + my $VALID_MULTI_ARCH_VALUES = + Lintian::Data->new('deb/pkg-check/multiarch-values'); + +Actually, this is not quite true. L<Lintian::Data> is lazy, so it +will not load anything before we force it to do so. Most of the time +this is just an added bonus. However, if you ever have to force it to +load something immediately, you can do so by invoking its "known" +method (with an arbitrary defined string and ignore the result). + +Data files work with 3 access methods, "all", "known" and "value". + +=over 4 + +=item all + +"all" (i.e. $data->all) returns a list of all the entries in the data +file (for key/value tables, all returns the keys). The list is not +sorted in any order (not even input order). + +=item known + +"known" (i.e. $data->known('item')) returns a truth value if a given +item or key is known (present) in the data set or table. For key/pair +tables, the value associated with the key can be retrieved with +"value" (see below). + +=item value + +"value" (i.e. $data->value('key')) returns a value associated with a +key for key/value tables. For unknown keys, it returns C<undef>. If +the data file is not a key/value table but just a set, value returns +a truth value for known keys. + +=back + +While we could use both "value" and "known", we will use the latter +for readability (and to remind ourselves that this is a data set and +not a data table). + +Basically we will be replacing: + + unless exists $VALID_MULTI_ARCH_VALUES{$multiarch}; + +with + + unless $VALID_MULTI_ARCH_VALUES->known($multiarch); + +=head2 Accessing contents of the package + +Another heavily used mechanism is to check for the presence (or absence) +of a given file. Generally this is what the +L<< $info->index|Lintian::Collect::Package/index (FILE) >> and +L<< $info->sorted_index|Lintian::Collect::Package/sorted_index >> methods +are for. The "index" method returns instances of L<Lintian::Path>, +which has a number of utility methods. + +If you want to loop over all files in a package, the sorted_index will +do this for you. If you are looking for a specific file (or directory), a +call to "index" will be much faster. For the contents of a specific directory, +you can use something like: + + if (my $dir = $info->index('path/to/dir/')) { + foreach my $elem ($dir->children) { + print $elem->name . " is a file" if $elem->is_file; + # ... + } + } + +Keep in mind that using the "index" or "sorted_index" method will +require that you put "unpacked" in Needs-Info. See L</Keeping Needs-Info +up to date>. + +There are also a pair of methods for accessing the control files of a +binary package. These are +L<< $info->control_index|Lintian::Collect::Package/control_index (FILE) >> and +L<< $info->sorted_control_index|Lintian::Collect::Package/sorted_control_index >>. + +=head3 Accessing contents of a file in a package + +When you actually want to see the contents of a file, you can use +L<open|Lintian::Path/open> (or L<open_gz|Lintian::Path/open_gz>) on +an object returned by e.g. +L<< $info->index|Lintian::Collect::Package/index (FILE) >>. These +methods will open the underlying file for reading (the latter +applying a gzip decompression). + +However, please do assert that the file is safe to read by calling +L<is_open_ok|Lintian::Path/is_open_ok> first. Generally, it will +only be true for files or safely resolvable symlinks pointing to +files. Should you attempt to open a path that does not satisfy +those criteria, L<Lintian::Path> will raise a trappable error at +runtime. + +Alternatively, if you access the underlying file object, you can +use the L<fs_path|Lintian::Path/fs_path> method. Usually, you will +want to test either L<is_open_ok|Lintian::Path/is_open_ok> or +L<is_valid_path|Lintian::Path/is_valid_path> first to ensure you do +not follow unsafe symlinks. The "is_open_ok" check will also assert +that it is not (e.g.) a named pipe or such. + +Should you call L<fs_path|Lintian::Path/fs_path> on a symlink that +escapes the package root, the method will throw a trappable error at +runtime. Once the path is returned, there are no more built-in +fail-safes. When you use the returned path, keep things like +"../../../../../etc/passwd"-symlink and "fifo" pipes in mind. + + +In some cases, you may even need to access the file system objects +I<without> using L<Lintian::Path>. This is, of course, discouraged +and suffers from the same issues above (all checking must be done +manually by you). Here you have to use the "unpacked", "debfiles" or +"control" methods from L<Lintian::Collect> or its subclasses. + + + +The following snippet may be useful for testing that a given path does +not escape the root. + + use Lintian::Util qw(is_ancestor_of); + + my $path = ...; + # The snippet applies equally well to $info->debfiles and + # $info->control (just remember to subst all occurrences of + # $info->unpacked). + my $unpacked_file = $info->unpacked($path); + if ( -f $unpacked_file && is_ancestor_of($info->unpacked, $unpacked_file)) { + # a file and contained within the package root. + } else { + # not a file or an unsafe path + } + +=head2 Keeping Needs-Info up to date + +Keeping the "Needs-Info" field of your I<.desc> file is a bit of +manual work. In the API description for the method there will +generally be a line looking something like: + + Needs-Info requirements for using methodx: Y + +Which means that the methodx requires Y to work. Here Y is a comma +separated list and each element of Y basically falls into 3 cases. + +=over 4 + +=item * The element is the word I<none> + +In this case, the method has no "external" requirements and can be +used without any changes to your Needs-Info. The "field" method +is an example of this. + +This only makes sense if it is the only element in the list. + +=item * The element is a link to a method + +In this case, the method uses another method to do its job. An example +is the +L<sorted_control_index|Lintian::Collect::Binary/sorted_control_index> +method, which uses the +L<control_index|Lintian::Collect::Binary/control_index (FILE)> +method. So using I<sorted_control_index> has the same requirements as +using I<control_index>. + +=item * The element is the name of a collection (e.g. "control_index"). + +In this case, the method needs the given collection to be run. So to +use (e.g.) L<control_index|Lintian::Collect::Binary/control_index (FILE)>, +you have to put "bin-pkg-control" in your Needs-Info. + +=back + +CAVEAT: Methods can have different requirements based on the type of +package! An example of this "changelog", which requires "changelog-file" +in binary packages and "Same as debfiles" in source packages. + +=head2 Avoiding security issues + +Over the years a couple of security issues have been discovered in +Lintian. The problem is that people can in theory create some really nasty +packages. Please keep the following in mind when writing a check: + +=over 4 + +=item * Avoid 2-arg open, system/exec($shellcmd), `$shellcmd` like the +plague. + +When you get any one of those wrong you introduce "arbitrary code +execution" vulnerabilities (we learned this the hard way via +CVE-2009-4014). + +Usually 3-arg open and the non-shell variant of system/exec are +enough. When you actually need a shell pipeline, consider using +L<Lintian::Command>. It also provides a I<safe_qx> command to assist +with capturing stdout as an alternative to `$cmd` (or qx/$cmd/). + +=item * Do not trust field values. + +This is especially true if you intend to use the value as part of a +file name. Verify that the field contains what you expect before you use +it. + +=item * Use L<Lintian::Path> (or, failing that, is_ancestor_of) + +You might be tempted to think that the following code is safe: + + use autodie; + + my $filename = 'some/file'; + my $ufile = $info->unpacked($filename); + if ( ! -l $ufile) { + # Looks safe, but isn't in general + open(my $fd, '<', $ufile); + ...; + } + +This is definitely unsafe if "$filename" contains at least one +directory segment. So, if in doubt, use +L<is_ancestor_of|Lintian::Util/is_ancestor_of(PARENTDIR, PATH)> to +verify that the requested file is indeed the file you think it is. A +better version of the above would be: + + use autodie, + use Lintian::Util qw(is_ancestor_of); + [...] + my $filename = 'some/file'; + my $ufile = $info->unpacked($filename); + if ( ! -l $ufile && -f $ufile && is_ancestor_of($info->unpacked, $ufile)) { + # $ufile is a file and it is contained within the package root. + open(m $fd, '<', $ufile); + ...; + } + +In some cases you can even drop the "! -l $ufile" part. + +Of course, it is much easier to use the L<Lintian::Path> object +(whenever possible). + + my $filename = 'some/file'; + my $ufile = $info->index($filename); + if ( $ufile && $ufile->is_file && $ufile->is_open_ok) { + my $fd = $ufile->open; + ...; + } + +Here you can drop the " && $ufile->is_file" if you want to permit +safe symlinks. + + +For more information on the is_ancestor_of check, see +L<is_ancestor_of|Lintian::Util/is_ancestor_of(PARENTDIR, PATH)> + + +=back + +=head1 SEE ALSO + +L<Lintian::Tutorial::WritingTests>, L<Lintian::Tutorial::TestSuite> + +=cut diff --git a/doc/tutorial/Lintian/Tutorial/WritingTests.pod b/doc/tutorial/Lintian/Tutorial/WritingTests.pod new file mode 100644 index 0000000..1011235 --- /dev/null +++ b/doc/tutorial/Lintian/Tutorial/WritingTests.pod @@ -0,0 +1,539 @@ +=encoding utf-8 + +=head1 NAME + +Lintian::Tutorial::WritingTests -- Short tutorial on writing tests + +=head1 SYNOPSIS + +Warning: This document may be out of date. + +This document attempts to be a short / quick tutorial to the Lintian +test suite from a test-writer's perspective. As such, it will only +cover the standard type of tests (from the "tests" suite). + +The guide will involve writing a test for the "deb/pkg-check" check, +which was documented in the L<Lintian::Tutorial::WritingChecks> +tutorial. + +For running tests, please see L<Lintian::Tutorial::TestSuite> instead. + +=head1 DESCRIPTION + +The Lintian test suite is divided into several parts. These are: + +=over 4 + +=item - + +scripts + +Small (Perl) "prove" tests. These assert that code style, data files +and/or self-contained code units (i.e. unit tests) work as intended. +They are B<not> used for testing Lintian tags. + +=item - + +tags + +These tests all test for the presence of tags after building test +packages using skeletons. For most cases, we recommend + + Skeleton: upload-non-native + +suites are small test suites that test some particular tags for +I<.changes>, I<.deb> or I<.dsc> files. Typically, you will find the +more exotic tags here, which require some special fiddling and cannot +be built by a "standard" dh7 + dpkg build. + +=item - + +literal + +These tests look to match the literal output of Lintian. These tests +are useful as general false positives. They also catch Lintian messages +unrelated to tags. + +=back + +With this in mind, let us move on to the scope. + +=head2 Scope of the tutorial + +WARNING: THE REMAINDER OF THIS TUTORIAL IS OUT OF DATE. + +The "tests" suite alone is fairly complex on its own. To keep things +simple, the tutorial will limit itself to creating a "native" +package with no special requirements in the "tests" suite. + +In particular, note that the tags I<must not> be I<pedantic> for this +to work. If you followed the check writing tutorial and made the tags +pedantic, please change them into "I", "W" or "E" tags. + +Once the basics are covered, you should be better equipped to deal +with the other ("tag testing") suites or using other features of the +"tests" suite (e.g. pedantic tags). + +=head2 The design of the Lintian test suite + +The basic design of the Lintian test suite can be summed up +as I<less is more>. The Debian build system is changing all the time +(albeit, slowly) and sometimes it deprecates or breaks existing +features. + +With over 400 tests all featuring the same basic parts, the test suite +features several tricks to keep up with the pace. It uses "skeletons" +(template) directories to seed the package structures and template +files to fill in the basic files (e.g. "debian/control" and +"debian/changelog"). + +This means that when a new standards-version comes along, debhelper +deprecates a feature or (more likely) Lintian adds a new tag, the +majority of the tests can quickly be adapted with only a minor effort. + +Since pedantic tags tend to require additional effort to avoid, most +Lintian tests do B<not> run with pedantic tags enabled. + +=head2 The basics of a "native" package in the "tests" suite + +For starters, you need 2 files and 1 directory, which will be placed +in I<< t/tests/<test-name> >>. + +=head3 The desc file (mandatory) + +This is the test description file. It is a deb822 file (i.e. same +syntax as I<debian/control>), which contains a number of fields. + +Let's start with the following template: + + Testname: pkg-deb-check-general + Version: 1.0 + Description: General test of the pkg/deb-check check + Test-For: + missing-multi-arch-field + missing-pre-depends-on-multiarch-support + +This defines the name of the test, its sequence number (i.e. how early +it should be run), the version of the I<generated> package, a +description and the tags you intend to test for. + +In case you were wondering why "invalid-multi-arch-field" is not +listed, then it is because dpkg will not allow us to use an invalid +Multi-Arch value. Therefore, that particular tag would have to be +tested in the "debs" suite instead. + +Note that the value of the Testname field (as Source field), Version +field and Description field (as the synopsis) I<will> be used in the +package. As such, they must obey the normal requirements for these +purposes. + +Please keep the following conventions in mind: + +=over 4 + +=item - + +The Testname should be "<check-name>-<test-name>" + +Note that regular Lintian checks do I<not> have a "/", so the naming +convention works slightly better there. + +=item - + +The Version should always be "1.0" unless the test requires anything else. + +For non-native packages, the default would be "1.0-1". + +=back + +=head3 The "tags" file (mandatory, but may be empty) + +This file contains the I<sorted> "expected" output of lintian. +Assuming all of the tags are "I" tags, the file should look something +like: + + I: pkg-deb-check-general-missing-ma: missing-multi-arch-field + I: pkg-deb-check-general-missing-pred: missing-pre-depends-on-multiarch-support + +=head3 The "debian/" directory (optional, but usually needed) + +The unpacked debian package in its full glory. Note that this means +that the (e.g.) I<debian/rules> file would be I<< +t/tests/<test-name>/debian/debian/rules >> (note the double +"debian/"). + +The directory is seeded from I<< t/templates/tests/<skeleton>/ >>, +where I<skeleton> is the value of the "Skeleton" field from the "desc" +file. + +For this test, you only need a specialized control file. This file +could look something like: + + Source: {$source} + Priority: extra + Section: {$section} + Maintainer: {$author} + Standards-Version: {$standards_version} + Build-Depends: {$build_depends} + + Package: {$source}-missing-ma + Architecture: {$architecture} + Depends: $\{shlibs:Depends\}, $\{misc:Depends\} + Description: {$description} (invalid) + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. + . + Missing M-A field. + + Package: {$source}-missing-pred + Architecture: any + Depends: $\{shlibs:Depends\}, $\{misc:Depends\} + Multi-arch: same + Description: {$description} (pre-depends) + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. + . + Missing Pre-Depends. + +=head3 Running the test + +At this point, the test is in fact ready to be executed. It can be +run by using: + + $ debian/rules runtests onlyrun=pkg-deb-check-general + + OR + + $ private/runtests --dump-logs t debian/test-out pkg-deb-check-general + +However, it will not emit the correct tags unless pkg/deb-check is +part of the debian/main lintian profile. If your check is a part of a +different profile, add the "Profile: <name>" field to the "desc" file. + +With this, the tutorial is over. Below you will find some more +resources that may be useful to your future test writing work. + +=head1 REFERENCES / APPENDIX + +=head2 A step-by-step guide of how a test case works + +Basically, the tag-testing test cases all involve building a package +and running lintian on the result. The "tests" suite does a full +build with dpkg-buildpackage, the other suites "hand-craft" only the +type of artifacts they are named after (e.g. "source" produces only +source packages). + +=head3 A test in the "tests" suite + +The basic process of a lintian test in the "tests" suite. + +=over 4 + +=item 1 + +Copy the "upstream" skeleton dir into the build dir (non-native only) + +=item 2 + +Copy the "upstream" dir from the test into the build dir (if present, non-native only) + +=item 3 + +Run the "pre_upstream" hook (if present, non-native only) + +=item 4 + +Assemble the upstream tarball (non-native only) + +=item 5 + +Copy the "debian" skeleton dir into the build dir + +=item 6 + +Copy the "debian" directory from the test into the build dir (if present) + +=item 7 + +Create debian/control and debian/changelog from "I<< <file> >>.in" if +they do not exist. + +=item 8 + +Create an empty watch file (if missing, non-native only) + +=item 9 + +Run the "pre_build" hook (if present) + +=item 10 + +Run dpkg-buildpackage + +=item 11 + +Run lintian on the build result + +=item 12 + +Run the "post_test" hook (if present) + +=item 13 + +Run the "test_calibration" hook (if present), which may produce +a new "expected output file". + +=item 14 + +Compare the result with the expected output. + +=back + +Note that the majority of the steps are conditional on +native/non-native packages or presence of hooks. + +=head3 A test in the "debs" and the "source" suite + +The "debs" and the "source" suite share the same basic steps, which +are: + +=over 4 + +=item 1 + +Copy the skeleton dir into the build dir + +=item 2 + +Copy the test directory files into the build dir + +=item 3 + +Create changelog, control, and (debs-only) Makefile from "I<< <file> +>>.in" if they do not exist. + +=item 4 + +Run make in the build dir + +=item 5 + +Run lintian on the produced artifact (there must be exactly one) + +=item 6 + +Compare the result with the expected output. + +=back + +=head3 A test in the "changes" suite + +The changes test is fairly simple as there is not much building. The +steps are as the following: + +=over 4 + +=item 1 + +Find or compute the test artifact as the following: + +=over 4 + +=item - + +If I<< <test-dir>/<test-name>.changes >> exists, it is used as the +artifact. + +=item - + +Otherwise, copy I<< <test-dir>/<test-name>.changes.in >> into the build dir +and use it as a template to create I<< <build-dir>/<test-name>.changes +>>. The result is then used as the artifact to test. + +=back + +=item 2 + +Run lintian run on the artifact + +=item 3 + +Compare the result with the expected output + +=back + +=head2 The full layout of a test in the "tests" suite + +Each test in the "tests" suite is placed in +I<< t/tests/<check>-<name> >>. In these you will find some +of the following files: + +=over 4 + +=item - + +desc (mandatory) + +This is the test description file. It is a deb822 file (i.e. same +syntax as I<debian/control>), which contains a number of fields. + +=item - + +tags (mandatory, but may be empty) + +This file contains the "expected" output of lintian. + +This is generally sorted, though a few tests rely on the order of +the output. This can be controlled via the "Sort" field in the "desc" +file. + +=item - + +debian/ (optional, but usually what you need) + +The unpacked debian package. For "native" package tests, this is +I<also> the "upstream" part. For "non-native" package tests, this can +be used to override files in the "upstream" part (rarely needed). + +The actual packaging files (e.g. I<debian/rules>) would be in + + I<< t/tests/<test-name>/debian/debian/rules >> + +Note the double "debian". + +This part is seeded from I<< t/templates/tests/<skeleton>/ >>, +where I<skeleton> is the value of the "Skeleton" field from the "desc" +file. + +=item - + +upstream/ (optional, rarely needed) + +This directory is the used to create the "upstream" tarball for +"non-native" package tests. Since most tags are emitted for both +"native" and "non-native" tests, it is simpler (and slightly faster) +to use "native" packages for most tests. + +The files here should also be present with the same contents in the +debian directory unless you're intentionally creating a diff. +However, as normal with a Debian package, you can omit files entirely +from the debian directory and the deletions will be ignored by +dpkg-buildpackage. + +The directory will be seeded from I<< +t/templates/tests/<skeleton>.upstream/ >>, where I<skeleton> is the +value of the "Skeleton" field from the "desc" file. + +=item - + +post_test (optional, rarely needed) + +This script (if present) is a sed script that can be used to "massage" +the output of lintian before comparing it with the "expected output". + +The most common use for this script is to remove the architecture +name, multi-arch path, drop hardening tags or exact standards-version +number from tags output. Here are some examples files used: + + # Remove the exact standards version, so the tags file will not need + # to be updated with every new standards-version + s/\(current is ([0-9]+\.)+[0-9]\)/(current is CURRENT)/ + + # Drop all hardening tags (they can differ between architectures) + /: hardening-.*/ d + + # Massage e.g. usr/lib/i386-linux-gnu/pkgconfig into a generic path + s, usr/lib/[^/]+/pkgconfig/, usr/lib/ARCH/pkgconfig/, + +It may be useful for other cases where the output of Lintian may +change on different systems. + +=item - + +pre_build / pre_upstream (optional, special case usage) + +If present and executable, these scripts can be used to mess with the +package directory and (what will become) the upstream tarball. + +Their common use case is to create files in the tarballs that cannot +(or preferably should not) be included in the revision control system. +Common cases include "binary", "minimized" files or files with "weird" +names such as backslashes or non UTF-8 characters. + +Both scripts receive a directory as first argument, which is the +directory they should work on. For: + +=over 4 + +=item - + +pre_upstream + +The script will be run before the upstream tarball is compiled. The +first argument is the directory that will be included in the upstream +tarball. + +=item - + +pre_build + +The script will be run before dpkg-buildpackage is invoked. The first +argument is the directory of the unpacked debian source package. + +=back + +=item - + +test_calibration (optional, special case usage) + +If present and executable, this script will be invoked B<after> +lintian I<and> post_test (if present) have been run. The script can +then modify the expected output I<and> the actual output. + +This is useful for those extremely rare cases where post_test is +insufficient to handle the requirements. So far, this has only been +needed for the hardening checks, where the output differs between +architectures. + +The script will be passed 3 arguments: + +=over 4 + +=item - + +Path to the "expected output" file (read-only) + +This is the "tags" file from the test suite and B<must not> be +modified. + +=item - + +Path to the "actual output" file (read-write) + +This is the file as lintian and post_test created it. + +=item - + +Path to the "calibrated expected output" (create+write) + +This file does not exist and should be created by the script, if it +wishes to change the "expected output". If this file exists when the +script terminates, this file will be used instead of the original +"expected output" file. + +=back + +=back + +=head1 SEE ALSO + +The READMEs in the suites: I<t/tests/README>, I<t/changes/README>, +I<t/debs/README> and I<t/source/README>. + +L<Lintian::Tutorial::WritingChecks>, L<Lintian::Tutorial::TestSuite> + +=cut diff --git a/lib/Lintian/Archive.pm b/lib/Lintian/Archive.pm new file mode 100644 index 0000000..b9652af --- /dev/null +++ b/lib/Lintian/Archive.pm @@ -0,0 +1,179 @@ +# Copyright (C) 2021 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Archive; + +use v5.20; +use warnings; +use utf8; + +use Const::Fast; +use IPC::Run3; +use Path::Tiny; +use Unicode::UTF8 qw(encode_utf8); + +use Moo; +use namespace::clean; + +const my $SLASH => q{/}; + +const my $WAIT_STATUS_SHIFT => 8; + +=head1 NAME + +Lintian::Archive -- Facilities for archive data + +=head1 SYNOPSIS + +use Lintian::Archive; + +=head1 DESCRIPTION + +A class for downloading and accessing archive information + +=head1 INSTANCE METHODS + +=over 4 + +=item mirror_base + +=item work_folder + +=item packages + +=cut + +has mirror_base => (is => 'rw', default => 'https://deb.debian.org/debian'); + +has work_folder => ( + is => 'rw', + lazy => 1, + default => sub { + my ($self) = @_; + + my $work_folder + = Path::Tiny->tempdir(TEMPLATE => 'lintian-archive-XXXXXXXXXX'); + + return $work_folder; + } +); + +has packages => (is => 'rw', default => sub { {} }); + +=item contents_gz + +=cut + +sub contents_gz { + my ($self, $release, $archive_liberty, $installable_architecture) = @_; + + my $relative + = "$release/$archive_liberty/Contents-$installable_architecture.gz"; + my $local_path = $self->work_folder . $SLASH . $relative; + + return $local_path + if -e $local_path; + + path($local_path)->parent->mkpath; + + my $url = $self->mirror_base . "/dists/$relative"; + + my $stderr; + run3([qw{wget --quiet}, "--output-document=$local_path", $url], + undef, \$stderr); + my $status = ($? >> $WAIT_STATUS_SHIFT); + + # stderr already in UTF-8 + die $stderr + if $status; + + return $local_path; +} + +=item deb822_packages_by_installable_name + +=cut + +sub deb822_packages_by_installable_name { + my ($self, $release, $archive_liberty, $port) = @_; + + return $self->packages->{$release}{$archive_liberty}{$port} + if exists $self->packages->{$release}{$archive_liberty}{$port}; + + my $relative_unzipped = "$release/$archive_liberty/binary-$port/Packages"; + my $local_path = $self->work_folder . $SLASH . $relative_unzipped; + + path($local_path)->parent->mkpath; + + my $url = $self->mirror_base . "/dists/$relative_unzipped.gz"; + + my $stderr; + + run3([qw{wget --quiet}, "--output-document=$local_path.gz", $url], + undef, \$stderr); + my $status = ($? >> $WAIT_STATUS_SHIFT); + + # stderr already in UTF-8 + die $stderr + if $status; + + run3(['gunzip', "$local_path.gz"], undef, \$stderr); + $status = ($? >> $WAIT_STATUS_SHIFT); + + # stderr already in UTF-8 + die $stderr + if $status; + + my $deb822 = Lintian::Deb822->new; + my @sections = $deb822->read_file($local_path); + + unlink($local_path) + or die encode_utf8("Cannot delete $local_path"); + + my %section_by_installable_name; + for my $section (@sections) { + + my $installable_name = $section->value('Package'); + $section_by_installable_name{$installable_name} = $section; + } + + $self->packages->{$release}{$archive_liberty}{$port} + = \%section_by_installable_name; + + return \%section_by_installable_name; +} + +=back + +=head1 AUTHOR + +Originally written by Felix Lechner <felix.lechner@lease-up.com> for Lintian. + +=head1 SEE ALSO + +lintian(1) + +=cut + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Changelog.pm b/lib/Lintian/Changelog.pm new file mode 100644 index 0000000..84854c3 --- /dev/null +++ b/lib/Lintian/Changelog.pm @@ -0,0 +1,380 @@ +# Copyright (C) 2019 Felix Lechner <felix.lechner@lease-up.com> +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Changelog; + +use v5.20; +use warnings; +use utf8; + +use Carp; +use Const::Fast; +use Date::Parse; + +use Lintian::Changelog::Entry; + +const my $EMPTY => q{}; +const my $SPACE => q{ }; +const my $ASTERISK => q{*}; +const my $UNKNOWN => q{unknown}; + +use Moo; +use namespace::clean; + +=head1 NAME + +Lintian::Changelog -- Parse a literal version string into its constituents + +=head1 SYNOPSIS + + use Lintian::Changelog; + + my $version = Lintian::Changelog->new; + $version->set('1.2.3-4', undef); + +=head1 DESCRIPTION + +A class for parsing literal version strings + +=head1 CLASS METHODS + +=over 4 + +=item new () + +Creates a new Lintian::Changelog object. + +=cut + +=item find_closes + +Takes one string as argument and finds "Closes: #123456, #654321" statements +as supported by the Debian Archive software in it. Returns all closed bug +numbers in an array reference. + +=cut + +sub find_closes { + my $changes = shift; + my @closes = (); + + while ( + $changes + && ($changes + =~ /(closes:\s*(?:bug)?\#?\s?\d+(?:,\s*(?:bug)?\#?\s?\d+)*)/ig) + ) { + push(@closes, $1 =~ /\#?\s?(\d+)/g); + } + + @closes = sort { $a <=> $b } @closes; + return \@closes; +} + +=back + +=head1 INSTANCE METHODS + +=over 4 + +=item parse (STRING) + +Parses STRING as the content of a debian/changelog file. + +=cut + +sub parse { + my ($self, $contents) = @_; + + $self->errors([]); + $self->entries([]); + + # careful with negative matching /m + unless ( + $contents =~ m{^ \S+ \s* [(] [^\)]+ [)] \s* (?:[^ \t;]+ \s*)+ ; }mx) { + + push(@{$self->errors}, [1, 'not a Debian changelog']); + return; + } + + my @lines = split(/\n/, $contents); + + # based on /usr/lib/dpkg/parsechangelog/debian + my $expect='first heading'; + my $entry = Lintian::Changelog::Entry->new; + my $blanklines = 0; + + # to make unknown version unique, for id + my $unknown_version_counter = 1; + + my $position = 1; + for my $line (@lines) { + + # trim end + $line =~ s/\s+\r?$//; + + # print encode_utf*(sprintf(STDERR "%-39.39s %-39.39s\n",$expect,$line)); + if ($line + =~ m/^(?<Source>\w[-+0-9a-z.]*) \((?<Version>[^\(\) \t]+)\)(?<Distribution>(?:\s+[-+0-9a-z.]+)+)\;\s*(?<kvpairs>.*)$/i + ){ + my $source = $+{Source}; + my $version = $+{Version}; + my $distribution = $+{Distribution}; + my $kvpairs = $+{kvpairs}; + + unless ($expect eq 'first heading' + || $expect eq 'next heading or eof') { + $entry->ERROR( + [ + $position, + "found start of entry where expected $expect",$line + ] + ); + push @{$self->errors}, $entry->ERROR; + } + + unless ($entry->is_empty) { + $entry->Closes(find_closes($entry->Changes)); + + push @{$self->entries}, $entry; + $entry = Lintian::Changelog::Entry->new; + } + + $entry->position($position); + + $entry->Header($line); + + $entry->Source($source); + $entry->Version($version); + + $distribution =~ s/^\s+//; + $entry->Distribution($distribution); + + my %kvdone; + for my $kv (split(/\s*,\s*/,$kvpairs)) { + $kv =~ m/^([-0-9a-z]+)\=\s*(.*\S)$/i + ||push @{$self->errors}, + [$position,"bad key-value after ';': '$kv'"]; + my $k = ucfirst $1; + my $v = $2; + $kvdone{$k}++ + && push @{$self->errors}, + [$position,"repeated key-value $k"]; + if ($k eq 'Urgency') { + $v =~ m/^([-0-9a-z]+)((\s+.*)?)$/i + ||push @{$self->errors}, + [$position,"badly formatted urgency value $v"]; + $entry->Urgency($1); + $entry->Urgency_LC(lc($1)); + $entry->Urgency_Comment($2); + } elsif ($k =~ m/^X[BCS]+-/i) { + # Extensions - XB for putting in Binary, + # XC for putting in Control, XS for putting in Source + $entry->{$k}= $v; + } else { + push @{$self->errors}, + [$position, + "unknown key-value key $k - copying to XS-$k"]; + $entry->{ExtraFields}{"XS-$k"} = $v; + } + } + $expect= 'start of change data'; + $blanklines = 0; + + } elsif ($line =~ /^(?:;;\s*)?Local variables:/i) { + last; # skip Emacs variables at end of file + + } elsif ($line =~ /^vim:/i) { + last; # skip vim variables at end of file + + } elsif ($line =~ /^\$\w+:.*\$/) { + next; # skip stuff that look like a CVS keyword + + } elsif ($line =~ /^\# /) { + next; # skip comments, even that's not supported + + } elsif ($line =~ m{^/\*.*\*/}) { + next; # more comments + + } elsif ($line + =~ m/^(?:\w+\s+\w+\s+\d{1,2} \d{1,2}:\d{1,2}:\d{1,2}\s+[\w\s]*\d{4})\s+(?:.*)\s+[<\(](?:.*)[\)>]/ + || $line + =~ m/^(?:\w+\s+\w+\s+\d{1,2},?\s*\d{4})\s+(?:.*)\s+[<\(](?:.*)[\)>]/ + || $line =~ m/^(?:\w[-+0-9a-z.]*) \((?:[^\(\) \t]+)\)\;?/i + || $line =~ m/^(?:[\w.+-]+)[- ]\S+ Debian \S+/i + || $line =~ m/^Changes from version (?:.*) to (?:.*):/i + || $line =~ m/^Changes for [\w.+-]+-[\w.+-]+:?$/i + || fc($line) eq fc('Old Changelog:') + || $line =~ m/^(?:\d+:)?\w[\w.+~-]*:?$/) { + # save entries on old changelog format verbatim + # we assume the rest of the file will be in old format once we + # hit it for the first time + last; + + } elsif ($line =~ m/^\S/) { + push @{$self->errors}, + [$position,'badly formatted heading line', $line]; + + } elsif ($line + =~ m/^ \-\- (?<name>.*) <(?<email>.*)>(?<sep> ?)(?<date>(?:\w+\,\s*)?\d{1,2}\s+\w+\s+\d{4}\s+\d{1,2}:\d\d:\d\d\s+[-+]\d{4}(?:\s+\([^\\\(\)]\))?)$/ + ) { + + my $name = $+{name}; + my $email = $+{email}; + my $separator = $+{sep}; + my $date = $+{date}; + + $expect eq 'more change data or trailer' + || push @{$self->errors}, + [$position,"found trailer where expected $expect", $line]; + if ($separator ne $SPACE . $SPACE) { + push @{$self->errors}, + [$position,'badly formatted trailer line', $line]; + } + $entry->Trailer($line); + $entry->Maintainer("$name <$email>") + unless length $entry->Maintainer; + + unless(length $entry->Date && defined $entry->Timestamp) { + $entry->Date($date); + $entry->Timestamp(str2time($date)); + unless (defined $entry->Timestamp) { + push @{$self->errors}, + [$position,"could not parse date $date"]; + } + } + $expect = 'next heading or eof'; + + } elsif ($line =~ m/^ \-\-/) { + $entry->{ERROR} + = [$position, 'badly formatted trailer line', $line]; + push @{$self->errors}, $entry->ERROR; + # $expect = 'next heading or eof' + # if $expect eq 'more change data or trailer'; + + } elsif ($line =~ m/^\s{2,}(\S)/) { + $expect eq 'start of change data' + || $expect eq 'more change data or trailer' + || do { + push @{$self->errors}, + [$position,"found change data where expected $expect",$line]; + if (($expect eq 'next heading or eof') + && !$entry->is_empty) { + # lets assume we have missed the actual header line + $entry->Closes(find_closes($entry->Changes)); + + push @{$self->entries}, $entry; + + $entry = Lintian::Changelog::Entry->new; + $entry->Source($UNKNOWN); + $entry->Distribution($UNKNOWN); + $entry->Urgency($UNKNOWN); + $entry->Urgency_LC($UNKNOWN); + $entry->Version($UNKNOWN . (++$unknown_version_counter)); + $entry->Urgency_Comment($EMPTY); + $entry->ERROR( + [ + $position, + "found change data where expected $expect",$line + ] + ); + } + }; + $entry->{'Changes'} .= (" \n" x $blanklines)." $line\n"; + if (!$entry->{Items} || $1 eq $ASTERISK) { + $entry->{Items} ||= []; + push @{$entry->{Items}}, "$line\n"; + } else { + $entry->{'Items'}[-1] .= (" \n" x $blanklines)." $line\n"; + } + $blanklines = 0; + $expect = 'more change data or trailer'; + + } elsif ($line !~ m/\S/) { + next + if $expect eq 'start of change data' + || $expect eq 'next heading or eof'; + $expect eq 'more change data or trailer' + || push @{$self->errors}, + [$position,"found blank line where expected $expect"]; + $blanklines++; + + } else { + push @{$self->errors}, [$position, 'unrecognised line', $line]; + ( $expect eq 'start of change data' + || $expect eq 'more change data or trailer') + && do { + # lets assume change data if we expected it + $entry->{'Changes'} .= (" \n" x $blanklines)." $line\n"; + if (!$entry->{Items}) { + $entry->{Items} ||= []; + push @{$entry->{Items}}, "$line\n"; + } else { + $entry->{'Items'}[-1] .= (" \n" x $blanklines)." $line\n"; + } + $blanklines = 0; + $expect = 'more change data or trailer'; + $entry->ERROR([$position, 'unrecognised line', $line]); + }; + } + + } continue { + ++$position; + } + + $expect eq 'next heading or eof' + || do { + $entry->ERROR([$position, "found eof where expected $expect"]); + push @{$self->errors}, $entry->ERROR; + }; + + unless ($entry->is_empty) { + $entry->Closes(find_closes($entry->Changes)); + push @{$self->entries}, $entry; + } + + return; +} + +=item errors + +=item entries + +=cut + +has errors => (is => 'rw', default => sub { [] }); +has entries => (is => 'rw', default => sub { [] }); + +=back + +=head1 AUTHOR + +Originally written by Felix Lechner <felix.lechner@lease-up.com> for Lintian. + +=head1 SEE ALSO + +lintian(1) + +=cut + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Changelog/Entry.pm b/lib/Lintian/Changelog/Entry.pm new file mode 100644 index 0000000..f36cb92 --- /dev/null +++ b/lib/Lintian/Changelog/Entry.pm @@ -0,0 +1,184 @@ +# +# Lintian::Changelog::Entry +# +# Copyright (C) 2005 Frank Lichtenheld <frank@lichtenheld.de> +# Copyright (C) 2019 Felix Lechner <felix.lechner@lease-up.com> +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# + +package Lintian::Changelog::Entry; + +use v5.20; +use warnings; +use utf8; + +use Const::Fast; + +use Moo; +use namespace::clean; + +const my $EMPTY => q{}; +const my $UNKNOWN => q{unknown}; + +has Changes => (is => 'rw', default => $EMPTY); +has Closes => (is => 'rw'); +has Date => (is => 'rw'); +has Distribution => (is => 'rw'); +has Header => (is => 'rw'); +#has Items => (is => 'rw', default => sub { [] }); +has Maintainer => (is => 'rw'); +has Source => (is => 'rw'); +has Timestamp => (is => 'rw'); +has Trailer => (is => 'rw'); +has Urgency => (is => 'rw', default => $UNKNOWN); +has Urgency_LC => (is => 'rw', default => $UNKNOWN); +has Urgency_Comment => (is => 'rw', default => $EMPTY); +has Version => (is => 'rw'); +has ERROR => (is => 'rw'); +has position => (is => 'rw'); + +=head1 NAME + +Lintian::Changelog::Entry - represents one entry in a Debian changelog + +=head1 SYNOPSIS + +=head1 DESCRIPTION + +=head2 Methods + +=head3 init + +Creates a new object, no options. + +=head3 new + +Alias for init. + +=head3 is_empty + +Checks if the object is actually initialized with data. Due to limitations +in Parse::DebianChangelog this currently simply checks if one of the +fields Source, Version, Maintainer, Date, or Changes is initialized. + +=head2 Accessors + +The following fields are available via accessor functions (all +fields are string values unless otherwise noted): + +=over 4 + +=item Source + +=item Version + +=item Distribution + +=item Urgency + +=item Urgency_Comment + +=item C<Urgency_LC> + +=item C<ExtraFields> + +Extra_Fields (all fields except for urgency as hash; POD spelling forces the underscore) + +=item Header + +Header (the whole header in verbatim form) + +=item Changes + +Changes (the actual content of the bug report, in verbatim form) + +=item Trailer + +Trailer (the whole trailer in verbatim form) + +=item Closes + +Closes (Array of bug numbers) + +=item Maintainer + +=item C<MaintainerEmail> + +=item Date + +=item Timestamp + +Timestamp (Date expressed in seconds since the epoch) + +=item ERROR + +Last parse error related to this entry in the format described +at Parse::DebianChangelog::get_parse_errors. + +=item position + +=back + +=begin Pod::Coverage + +Changes +Closes +Date +Distribution +Header +Maintainer +C<MaintainerEmail> +Source +Timestamp +Trailer + +=end Pod::Coverage + +=cut + +sub is_empty { + my ($self) = @_; + + return !(length $self->Changes + || length $self->Source + || length $self->Version + || length $self->Maintainer + || length $self->Date); +} + +1; +__END__ + +=head1 SEE ALSO + +Originally based on Parse::DebianChangelog by Frank Lichtenheld, E<lt>frank@lichtenheld.deE<gt> + +=head1 AUTHOR + +Written by Felix Lechner <felix.lechner@lease-up.com> for Lintian in response to #933134. + +=head1 COPYRIGHT AND LICENSE + +Please see in the code; FSF's standard short text triggered a POD spelling error +here. + +=cut + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Changelog/Version.pm b/lib/Lintian/Changelog/Version.pm new file mode 100644 index 0000000..d0e29f4 --- /dev/null +++ b/lib/Lintian/Changelog/Version.pm @@ -0,0 +1,250 @@ +# Copyright (C) 2019 Felix Lechner <felix.lechner@lease-up.com> +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Changelog::Version; + +use v5.20; +use warnings; +use utf8; + +use Carp; +use Const::Fast; +use Unicode::UTF8 qw(encode_utf8); + +use Moo; +use namespace::clean; + +const my $EMPTY => q{}; + +=head1 NAME + +Lintian::Changelog::Version -- Parse a literal version string into its constituents + +=head1 SYNOPSIS + + use Lintian::Changelog::Version; + + my $version = Lintian::Changelog::Version->new; + $version->assign('1.2.3-4', undef); + +=head1 DESCRIPTION + +A class for parsing literal version strings + +=head1 CLASS METHODS + +=over 4 + +=item new () + +Creates a new Lintian::Changelog::Version object. + +=cut + +=back + +=head1 INSTANCE METHODS + +=over 4 + +=item assign (LITERAL, NATIVE) + +Assign the various members in the Lintian::Changelog::Version object +using the LITERAL version string and the NATIVE boolean selector. + +=cut + +sub assign { + + my ($self, $literal, $native) = @_; + + croak encode_utf8('Literal version string required for version parsing') + unless defined $literal; + + croak encode_utf8('Native flag required for version parsing') + unless defined $native; + + my $epoch_pattern = qr/([0-9]+)/; + my $upstream_pattern = qr/([A-Za-z0-9.+\-~]+?)/; + my $maintainer_revision_pattern = qr/([A-Za-z0-9.+~]+?)/; + my $source_nmu_pattern = qr/([A-Za-z0-9.+~]+)/; + my $bin_nmu_pattern = qr/([0-9]+)/; + + my $source_pattern; + + # these capture three matches each + $source_pattern + = qr/$upstream_pattern/ + . qr/(?:-$maintainer_revision_pattern(?:\.$source_nmu_pattern)?)?/ + if !$native; + $source_pattern + = qr/()/ + . qr/$maintainer_revision_pattern/ + . qr/(?:\+nmu$source_nmu_pattern)?/ + if $native; + + my $pattern + = qr/^/ + . qr/(?:$epoch_pattern:)?/ + . qr/$source_pattern/ + . qr/(?:\+b$bin_nmu_pattern)?/. qr/$/; + + my ($epoch, $upstream, $maintainer_revision, $source_nmu, $binary_nmu) + = ($literal =~ $pattern); + + $epoch //= $EMPTY; + $upstream //= $EMPTY; + $maintainer_revision //= $EMPTY; + $source_nmu //= $EMPTY; + $binary_nmu //= $EMPTY; + + my $source_nmu_string = $EMPTY; + + $source_nmu_string = ($native ? "+nmu$source_nmu" : ".$source_nmu") + if length $source_nmu; + + my $debian_source = $maintainer_revision . $source_nmu_string; + + my $debian_no_epoch + = $debian_source . (length $binary_nmu ? "+b$binary_nmu" : $EMPTY); + + my $upstream_string = (length $upstream ? "$upstream-" : $EMPTY); + + my $no_epoch= $upstream_string . $debian_no_epoch; + + my $epoch_string = (length $epoch ? "$epoch:" : $EMPTY); + + my $reconstructed= $epoch_string . $no_epoch; + + croak encode_utf8( + "Failed to parse package version: $reconstructed ne $literal") + unless $reconstructed eq $literal; + + $self->literal($literal); + $self->epoch($epoch); + $self->no_epoch($no_epoch); + $self->upstream($upstream); + $self->maintainer_revision($maintainer_revision); + $self->debian_source($debian_source); + $self->debian_no_epoch($debian_no_epoch); + $self->source_nmu($source_nmu); + $self->binary_nmu($binary_nmu); + + my $without_source_nmu + = $epoch_string . $upstream_string . $maintainer_revision; + + $self->without_source_nmu($without_source_nmu); + + my $backport_pattern = qr/^(.*)[+~]deb(\d+)u(\d+)$/; + + my ($debian_without_backport, $backport_release, $backport_revision) + = ($self->maintainer_revision =~ $backport_pattern); + + $debian_without_backport //= $maintainer_revision; + $backport_release //= $EMPTY; + $backport_revision //= $EMPTY; + + $self->debian_without_backport($debian_without_backport); + $self->backport_release($backport_release); + $self->backport_revision($backport_revision); + + my $without_backport + = $epoch_string . $upstream_string . $debian_without_backport; + + $self->without_backport($without_backport); + + return; +} + +=item literal + +=item epoch + +=item no_epoch + +=item upstream + +=item maintainer_revision + +=item debian_source + +=item debian_no_epoch + +=item source_nmu + +=item binary_nmu + +=item without_source_nmu + +=item debian_without_backport + +=item backport_release + +=item backport_revision + +=item without_backport + +=cut + +has literal => (is => 'rw', default => $EMPTY); + +has epoch => (is => 'rw', default => $EMPTY); + +has no_epoch => (is => 'rw', default => $EMPTY); + +has upstream => (is => 'rw', default => $EMPTY); + +has maintainer_revision => (is => 'rw', default => $EMPTY); + +has debian_source => (is => 'rw', default => $EMPTY); + +has debian_no_epoch => (is => 'rw', default => $EMPTY); + +has source_nmu => (is => 'rw', default => $EMPTY); + +has binary_nmu => (is => 'rw', default => $EMPTY); + +has without_source_nmu => (is => 'rw', default => $EMPTY); + +has debian_without_backport => (is => 'rw', default => $EMPTY); + +has backport_release => (is => 'rw', default => $EMPTY); + +has backport_revision => (is => 'rw', default => $EMPTY); + +has without_backport => (is => 'rw', default => $EMPTY); + +=back + +=head1 AUTHOR + +Originally written by Felix Lechner <felix.lechner@lease-up.com> for Lintian. + +=head1 SEE ALSO + +lintian(1) + +=cut + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check.pm b/lib/Lintian/Check.pm new file mode 100644 index 0000000..02e459f --- /dev/null +++ b/lib/Lintian/Check.pm @@ -0,0 +1,232 @@ +# Copyright (C) 2012 Niels Thykier <niels@thykier.net> +# Copyright (C) 2017-2018 Chris Lamb <lamby@debian.org> +# Copyright (C) 2019-2021 Felix Lechner <felix.lechner@lease-up.com> +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check; + +use v5.20; +use warnings; +use utf8; + +use Const::Fast; +use Unicode::UTF8 qw(encode_utf8); + +use Lintian::Hint::Annotated; +use Lintian::Hint::Pointed; + +const my $EMPTY => q{}; +const my $SPACE => q{ }; +const my $UNDERSCORE => q{_}; + +use Moo::Role; +use namespace::clean; + +=head1 NAME + +Lintian::Check -- Common facilities for Lintian checks + +=head1 SYNOPSIS + + use Moo; + use namespace::clean; + + with('Lintian::Check'); + +=head1 DESCRIPTION + +A class for operating Lintian checks + +=head1 INSTANCE METHODS + +=over 4 + +=item name + +=item processable + +=item group + +=item profile + +=item hints + +=cut + +has name => (is => 'rw', default => $EMPTY); +has processable => (is => 'rw', default => sub { {} }); +has group => (is => 'rw', default => sub { {} }); +has profile => (is => 'rw'); + +has hints => (is => 'rw', default => sub { [] }); + +=item data + +=cut + +sub data { + my ($self) = @_; + + return $self->profile->data; +} + +=item visit_files + +=cut + +sub visit_files { + my ($self, $index) = @_; + + my $visit_hook = 'visit' . $UNDERSCORE . $index . $UNDERSCORE . 'files'; + + return + unless $self->can($visit_hook); + + my @items = @{$self->processable->$index->sorted_list}; + + # do not look inside quilt directory + @items = grep { $_->name !~ m{^\.pc/} } @items + if $index eq 'patched'; + + # exclude Lintian's test suite from source scans + @items = grep { $_->name !~ m{^t/} } @items + if $self->processable->name eq 'lintian' && $index eq 'patched'; + + $self->$visit_hook($_) for @items; + + return; +} + +=item run + +=cut + +sub run { + my ($self) = @_; + + # do not carry over any hints + $self->hints([]); + + my $type = $self->processable->type; + + if ($type eq 'source') { + + $self->visit_files('orig'); + $self->visit_files('patched'); + } + + if ($type eq 'binary' || $type eq 'udeb') { + + $self->visit_files('control'); + $self->visit_files('installed'); + + $self->installable + if $self->can('installable'); + } + + $self->$type + if $self->can($type); + + $self->always + if $self->can('always'); + + return @{$self->hints}; +} + +=item pointed_hint + +=cut + +sub pointed_hint { + my ($self, $tag_name, $pointer, @notes) = @_; + + my $hint = Lintian::Hint::Pointed->new; + + $hint->tag_name($tag_name); + $hint->issued_by($self->name); + + my $note = stringify(@notes); + $hint->note($note); + $hint->pointer($pointer); + + push(@{$self->hints}, $hint); + + return; +} + +=item hint + +=cut + +sub hint { + my ($self, $tag_name, @notes) = @_; + + my $hint = Lintian::Hint::Annotated->new; + + $hint->tag_name($tag_name); + $hint->issued_by($self->name); + + my $note = stringify(@notes); + $hint->note($note); + + push(@{$self->hints}, $hint); + + return; +} + +=item stringify + +=cut + +sub stringify { + my (@arguments) = @_; + + # skip empty arguments + my @meaningful = grep { length } @arguments; + + # trim both ends of each item + s{^ \s+ | \s+ $}{}gx for @meaningful; + + # concatenate with spaces + my $text = join($SPACE, @meaningful) // $EMPTY; + + # escape newlines; maybe add others + $text =~ s{\n}{\\n}g; + + return $text; +} + +=back + +=head1 AUTHOR + +Originally written by Felix Lechner <felix.lechner@lease-up.com> for Lintian. + +=head1 SEE ALSO + +lintian(1) + +=cut + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Apache2.pm b/lib/Lintian/Check/Apache2.pm new file mode 100644 index 0000000..b8dde2d --- /dev/null +++ b/lib/Lintian/Check/Apache2.pm @@ -0,0 +1,337 @@ +# apache2 -- lintian check script -*- perl -*- +# +# Copyright (C) 2012 Arno Toell +# Copyright (C) 2017-2018 Chris Lamb <lamby@debian.org> +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Apache2; + +use v5.20; +use warnings; +use utf8; + +use File::Basename; +use Unicode::UTF8 qw(encode_utf8); + +use Lintian::Relation; + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +# whether the package appears to be an Apache2 module/web application +has is_apache2_related => ( + is => 'rw', + lazy => 1, + default => sub { + my ($self) = @_; + + for my $item (@{$self->processable->installed->sorted_list}) { + + return 1 + if $item->name =~ m{^ usr/lib/apache2/modules/ }x + && $item->basename =~ m{ [.]so $}x; + + return 1 + if $item->name + =~ m{^ etc/apache2/ (?:conf|site) - (?:available|enabled) / }x; + + return 1 + if $item->name =~ m{^ etc/apache2/conf[.]d/}x; + } + + return 0; + } +); + +sub visit_installed_files { + my ($self, $item) = @_; + + # Do nothing if the package in question appears to be related to + # the web server itself + return + if $self->processable->name =~ m/^apache2(:?\.2)?(?:-\w+)?$/; + + # File is probably not relevant to us, ignore it + return + if $item->is_dir; + + return + if $item->name !~ m{^(?:usr/lib/apache2/modules/|etc/apache2/)}; + + # Package installs an unrecognized file - check this for all files + if ( $item->name !~ /\.conf$/ + && $item->name =~ m{^etc/apache2/(conf|site|mods)-available/(.*)$}){ + + my $temp_type = $1; + my $temp_file = $2; + + # ... except modules which are allowed to ship .load files + $self->pointed_hint('apache2-configuration-files-need-conf-suffix', + $item->pointer) + unless $temp_type eq 'mods' && $temp_file =~ /\.load$/; + } + + # Package appears to be a binary module + if ($item->name =~ m{^usr/lib/apache2/modules/(.*)\.so$}) { + + $self->check_module_package($item, $1); + } + + # Package appears to be a web application + elsif ($item->name =~ m{^etc/apache2/(conf|site)-available/(.*)$}) { + + $self->check_web_application_package($item, $1, $2); + } + + # Package appears to be a legacy web application + elsif ($item->name =~ m{^etc/apache2/conf\.d/(.*)$}) { + + $self->pointed_hint( + 'apache2-reverse-dependency-uses-obsolete-directory', + $item->pointer); + $self->check_web_application_package($item,'conf', $1); + } + + # Package does scary things + elsif ($item->name =~ m{^etc/apache2/(?:conf|sites|mods)-enabled/.*$}) { + + $self->pointed_hint( + 'apache2-reverse-dependency-ships-file-in-not-allowed-directory', + $item->pointer); + } + + return; +} + +sub installable { + my ($self) = @_; + + # Do nothing if the package in question appears to be related to + # the web server itself + return + if $self->processable->name =~ m/^apache2(:?\.2)?(?:-\w+)?$/; + + return; +} + +sub check_web_application_package { + my ($self, $item, $pkgtype, $webapp) = @_; + + my $pkg = $self->processable->name; + my $processable = $self->processable; + + $self->pointed_hint('non-standard-apache2-configuration-name', + $item->pointer, "$webapp != $pkg.conf") + if $webapp ne "$pkg.conf" + || $webapp =~ /^local-/; + + my $rel = $processable->relation('strong') + ->logical_and($processable->relation('Recommends')); + + # A web application must not depend on apache2-whatever + my $visit = sub { + if (m/^apache2(?:\.2)?-(?:common|data|bin)$/) { + $self->pointed_hint( + 'web-application-depends-on-apache2-data-package', + $item->pointer, $_, $webapp); + return 1; + } + return 0; + }; + $rel->visit($visit, Lintian::Relation::VISIT_STOP_FIRST_MATCH); + + # ... nor on apache2 only. Moreover, it should be in the form + # apache2 | httpd but don't worry about versions, virtual package + # don't support that + $self->pointed_hint('web-application-works-only-with-apache', + $item->pointer, $webapp) + if $rel->satisfies('apache2'); + + $self->inspect_conf_file($pkgtype, $item); + return; +} + +sub check_module_package { + my ($self, $item, $module) = @_; + + my $pkg = $self->processable->name; + my $processable = $self->processable; + + # We want packages to be follow our naming scheme. Modules should be named + # libapache2-mod-<foo> if it ships a mod_foo.so + # NB: Some modules have uppercase letters in them (e.g. Ruwsgi), but + # obviously the package should be in all lowercase. + my $expected_name = 'libapache2-' . lc($module); + + my $rel; + + $expected_name =~ tr/_/-/; + $self->pointed_hint('non-standard-apache2-module-package-name', + $item->pointer, "$pkg != $expected_name") + if $expected_name ne $pkg; + + $rel = $processable->relation('strong') + ->logical_and($processable->relation('Recommends')); + + $self->pointed_hint('apache2-module-does-not-depend-on-apache2-api', + $item->pointer) + if !$rel->matches(qr/^apache2-api-\d+$/); + + # The module is called mod_foo.so, thus the load file is expected to be + # named foo.load + my $load_file = $module; + my $conf_file = $module; + $load_file =~ s{^mod.(.*)$}{etc/apache2/mods-available/$1.load}; + $conf_file =~ s{^mod.(.*)$}{etc/apache2/mods-available/$1.conf}; + + if (my $f = $processable->installed->lookup($load_file)) { + $self->inspect_conf_file('mods', $f); + } else { + $self->pointed_hint('apache2-module-does-not-ship-load-file', + $item->pointer, $load_file); + } + + if (my $f = $processable->installed->lookup($conf_file)) { + $self->inspect_conf_file('mods', $f); + } + + return; +} + +sub visit_control_files { + my ($self, $item) = @_; + + return + unless $self->is_apache2_related; + + return + unless $item->is_maintainer_script; + + # skip anything but shell scripts + return + unless $item->is_shell_script; + + return + unless $item->is_open_ok; + + open(my $sfd, '<', $item->unpacked_path) + or die encode_utf8('Cannot open ' . $item->unpacked_path); + + my $position = 1; + while (my $line = <$sfd>) { + + # skip comments + next + if $line =~ /^ [#]/x; + + # Do not allow reverse dependencies to call "a2enmod" and friends + # directly + if ($line =~ m{ \b (a2(?:en|dis)(?:conf|site|mod)) \b }x) { + + my $command = $1; + + $self->pointed_hint( + 'apache2-reverse-dependency-calls-wrapper-script', + $item->pointer($position), $command); + } + + # Do not allow reverse dependencies to call "invoke-rc.d apache2 + $self->pointed_hint('apache2-reverse-dependency-calls-invoke-rc.d', + $item->pointer($position)) + if $line =~ /invoke-rc\.d\s+apache2/; + + # XXX: Check whether apache2-maintscript-helper is used + # unconditionally e.g. not protected by a [ -e ], [ -x ] or so. + # That's going to be complicated. Or not possible without grammar + # parser. + + } continue { + ++$position; + } + + return; +} + +sub inspect_conf_file { + my ($self, $conftype, $item) = @_; + + # Don't follow unsafe links + return + unless $item->is_open_ok; + + open(my $fd, '<', $item->unpacked_path) + or die encode_utf8('Cannot open ' . $item->unpacked_path); + + my $skip = 0; + + my $position = 1; + while (my $line = <$fd>) { + + ++$skip + if $line =~ m{<\s*IfModule.*!\s*mod_authz_core} + || $line =~ m{<\s*IfVersion\s+<\s*2\.3}; + + for my $directive ('Order', 'Satisfy', 'Allow', 'Deny', + qr{</?Limit.*?>}xsm, qr{</?LimitExcept.*?>}xsm) { + + if ($line =~ m{\A \s* ($directive) (?:\s+|\Z)}xsm && !$skip) { + + $self->pointed_hint('apache2-deprecated-auth-config', + $item->pointer($position), $1); + } + } + + if ($line =~ /^#\s*(Depends|Conflicts):\s+(.*?)\s*$/) { + my ($field, $value) = ($1, $2); + + $self->pointed_hint('apache2-unsupported-dependency', + $item->pointer($position), $field) + if $field eq 'Conflicts' && $conftype ne 'mods'; + + my @dependencies = split(/[\n\s]+/, $value); + for my $dep (@dependencies) { + + $self->pointed_hint('apache2-unparsable-dependency', + $item->pointer($position), $dep) + if $dep =~ /[^\w\.]/ + || $dep =~ /^mod\_/ + || $dep =~ /\.(?:conf|load)/; + } + } + + --$skip + if $line =~ m{<\s*/\s*If(Module|Version)}; + + } continue { + ++$position; + } + + close $fd; + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/ApplicationNotLibrary.pm b/lib/Lintian/Check/ApplicationNotLibrary.pm new file mode 100644 index 0000000..a598385 --- /dev/null +++ b/lib/Lintian/Check/ApplicationNotLibrary.pm @@ -0,0 +1,141 @@ +# application-not-library -- find applications packaged like a library -*- perl -*- +# +# Copyright (C) 2014-2015 Axel Beckert <abe@debian.org> +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::ApplicationNotLibrary; + +use v5.20; +use warnings; +use utf8; + +use List::SomeUtils qw(any); + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +sub installable { + my ($self) = @_; + + # big exception list for all tags + return + # perl itself + if $self->processable->name =~ /^perl(?:-base)?$/ + # ruby itself + || $self->processable->name =~ /^ruby[\d.]*$/ + # python itself + || $self->processable->name =~ /^python[\d.]*(?:-dev|-minimal)?$/ + # cpan related tools + || $self->processable->name =~ /^cpan/ + # perl module tools + || $self->processable->name =~ /^libmodule-.*-perl$/ + # perl debugging tools + || $self->processable->name =~ /^libdevel-.*-perl$/ + # perl-handling tools + || $self->processable->name =~ /^libperl.*-perl$/ + # perl testing tools + || $self->processable->name =~ /^libtest-.*-perl$/ + # python packaging stuff + || $self->processable->name =~ /^python[\d.]*-(?:stdeb|setuptools)$/ + # ruby packaging stuff + || $self->processable->name =~ /^gem2deb/ + # rendering engine + || $self->processable->name =~ /^xulrunner/ + # generic helpers + || $self->processable->name =~ /^lib.*-(?:utils|tools|bin|dev)/ + # whitelist + || ( + any { $self->processable->name eq $_ } + qw( + + rake + bundler + coderay + kdelibs-bin + libapp-options-perl + + ) + ); + + my @programs; + for my $searched_folder (qw{bin sbin usr/bin usr/sbin usr/games}) { + + my $directory_item + = $self->processable->installed->lookup("$searched_folder/"); + next + unless defined $directory_item; + + for my $program_item ($directory_item->children) { + + # ignore debhelper plugins + next + if $program_item->basename =~ /^dh_/; + + # ignore library configuration tools + next + if $program_item->name =~ /properties$/; + + # ignore library maintenance tools + next + if $program_item->name =~ /update$/; + + push(@programs, $program_item); + } + } + + return + unless @programs; + + # check for library style package names + if ( $self->processable->name =~ m{^ lib (?:.+) -perl $}x + || $self->processable->name =~ m{^ruby-}x + || $self->processable->name =~ m{^python[\d.]*-}x) { + + if ($self->processable->name =~ m{^ libapp (?:.+) -perl $}x) { + $self->pointed_hint('libapp-perl-package-name', $_->pointer) + for @programs; + + } else { + $self->pointed_hint('library-package-name-for-application', + $_->pointer) + for @programs; + } + } + + my $section = $self->processable->fields->value('Section'); + + # oldlibs is ok + if ($section =~ m{ perl | python | ruby | (?: ^ | / ) libs }x) { + + $self->pointed_hint('application-in-library-section', + $_->pointer, $section) + for @programs; + } + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/AppstreamMetadata.pm b/lib/Lintian/Check/AppstreamMetadata.pm new file mode 100644 index 0000000..53651ad --- /dev/null +++ b/lib/Lintian/Check/AppstreamMetadata.pm @@ -0,0 +1,266 @@ +# appstream-metadata -- lintian check script -*- perl -*- + +# Copyright (C) 2016 Petter Reinholdtsen +# Copyright (C) 2017-2018 Chris Lamb <lamby@debian.org> +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::AppstreamMetadata; + +# For .desktop files, the lintian check would be really easy: Check if +# .desktop file is there, check if matching file exists in +# /usr/share/metainfo, if not throw a warning. Maybe while we're at it +# also check for legacy locations (stuff in /usr/share/appdata) and +# legacy data (metainfo files starting with `<application>`). +# +# For modaliases, maybe udev rules could give some hints. +# Check modalias values to ensure hex numbers are using capital A-F. + +use v5.20; +use warnings; +use utf8; +use autodie qw(open); + +use File::Basename qw(basename); +use Syntax::Keyword::Try; +use XML::LibXML; + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +sub installable { + my ($self) = @_; + + my $pkg = $self->processable->name; + my $type = $self->processable->type; + my $processable = $self->processable; + my $group = $self->group; + + my (%desktopfiles, %metainfo, @udevrules); + my $found_modalias = 0; + my $modaliases = []; + if ( + defined( + my $dir + = $processable->installed->resolve_path( + 'usr/share/applications/') + ) + ) { + for my $item ($dir->descendants) { + $desktopfiles{$item} = 1 if ($item->is_file); + } + } + if ( + defined( + my $dir + = $processable->installed->resolve_path('usr/share/metainfo/') + ) + ) { + for my $item ($dir->children) { + if ($item->is_file) { + $metainfo{$item} = 1; + $found_modalias|= $self->check_modalias($item, $modaliases); + } + } + } + if ( + defined( + my $dir + = $processable->installed->resolve_path('usr/share/appdata/') + ) + ) { + for my $item ($dir->descendants) { + if ($item->is_file) { + + $self->pointed_hint('appstream-metadata-in-legacy-location', + $item->pointer); + $found_modalias|= $self->check_modalias($item, $modaliases); + } + } + } + if ( + defined( + my $dir= $processable->installed->resolve_path('lib/udev/rules.d/') + ) + ) { + for my $item ($dir->descendants) { + push(@udevrules, $item) if ($item->is_file); + } + } + + for my $udevrule (@udevrules) { + if ($self->check_udev_rules($udevrule, $modaliases) + && !$found_modalias) { + + $self->hint('appstream-metadata-missing-modalias-provide', + $udevrule); + } + } + return; +} + +sub check_modalias { + my ($self, $item, $modaliases) = @_; + + if (!$item->is_open_ok) { + # FIXME report this as an error + return 0; + } + + my $parser = XML::LibXML->new; + $parser->set_option('no_network', 1); + + my $doc; + try { + $doc = $parser->parse_file($item->unpacked_path); + + } catch { + + $self->pointed_hint('appstream-metadata-invalid',$item->pointer); + + return 0; + } + + return 0 + unless $doc; + + if ($doc->findnodes('/application')) { + + $self->pointed_hint('appstream-metadata-legacy-format',$item->pointer); + return 0; + } + + my @provides = $doc->findnodes('/component/provides'); + return 0 + unless @provides; + + # take first one + my $first = $provides[0]; + return 0 + unless $first; + + my @nodes = $first->getChildrenByTagName('modalias'); + return 0 + unless @nodes; + + for my $node (@nodes) { + + my $alias = $node->firstChild->data; + next + unless $alias; + + push(@{$modaliases}, $alias); + + $self->pointed_hint('appstream-metadata-malformed-modalias-provide', + $item->pointer, + "include non-valid hex digit in USB matching rule '$alias'") + if $alias =~ /^usb:v[0-9a-f]{4}p[0-9a-f]{4}d/i + && $alias !~ /^usb:v[0-9A-F]{4}p[0-9A-F]{4}d/; + } + + return 1; +} + +sub provides_user_device { + my ($self, $item, $position, $rule, $data) = @_; + + my $retval = 0; + + if ( $rule =~ /plugdev/ + || $rule =~ /uaccess/ + || $rule =~ /MODE=\"0666\"/) { + + $retval = 1; + } + + if ($rule =~ m/SUBSYSTEM=="usb"/) { + my ($vmatch, $pmatch); + if ($rule =~ m/ATTR\{idVendor\}=="([0-9a-fA-F]{4})"/) { + $vmatch = 'v' . uc($1); + } + + if ($rule =~ m/ATTR\{idProduct\}=="([0-9a-fA-F]{4})"/) { + $pmatch = 'p' . uc($1); + } + + if (defined $vmatch && defined $pmatch) { + my $match = "usb:${vmatch}${pmatch}d"; + my $foundmatch; + for my $aliasmatch (@{$data}) { + if (0 == index($aliasmatch, $match)) { + $foundmatch = 1; + } + } + + $self->pointed_hint( + 'appstream-metadata-missing-modalias-provide', + $item->pointer($position), + "match rule $match*" + ) unless $foundmatch; + } + } + + return $retval; +} + +sub check_udev_rules { + my ($self, $item, $data) = @_; + + open(my $fd, '<', $item->unpacked_path); + + my $cont; + my $retval = 0; + + my $position = 0; + while (my $line = <$fd>) { + + chomp $line; + + if (defined $cont) { + $line = $cont . $line; + $cont = undef; + } + + if ($line =~ /^(.*)\\$/) { + $cont = $1; + next; + } + + # skip comments + next + if $line =~ /^#.*/; + + $retval |= $self->provides_user_device($item, $position, $line, $data); + + } continue { + ++$position; + } + + close $fd; + + return $retval; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Apt.pm b/lib/Lintian/Check/Apt.pm new file mode 100644 index 0000000..08b5ce6 --- /dev/null +++ b/lib/Lintian/Check/Apt.pm @@ -0,0 +1,69 @@ +# apt -- lintian check script -*- perl -*- + +# Copyright (C) 1998 Christian Schwarz and Richard Braakman +# Copyright (C) 2021 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Apt; + +use v5.20; +use warnings; +use utf8; + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +sub visit_installed_files { + my ($self, $item) = @_; + + return + if $self->processable->source_name eq 'apt'; + + # /etc/apt/preferences + $self->pointed_hint('package-installs-apt-preferences', $item->pointer) + if $item->name =~ m{^ etc/apt/preferences (?: $ | [.]d / [^/]+ ) }x; + + # /etc/apt/sources + unless ($self->processable->name =~ m{ -apt-source $}x) { + + $self->pointed_hint('package-installs-apt-sources', $item->pointer) + if $item->name + =~ m{^ etc/apt/sources[.]list (?: $ | [.]d / [^/]+ ) }x; + } + + # /etc/apt/trusted.gpg + unless ( + $self->processable->name=~ m{ (?: -apt-source | -archive-keyring ) $}x) + { + + $self->pointed_hint('package-installs-apt-keyring', $item->pointer) + if $item->name=~ m{^ etc/apt/trusted[.]gpg (?: $ | [.]d / [^/]+ ) }x; + } + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Archive/File/Name/Length.pm b/lib/Lintian/Check/Archive/File/Name/Length.pm new file mode 100644 index 0000000..075149b --- /dev/null +++ b/lib/Lintian/Check/Archive/File/Name/Length.pm @@ -0,0 +1,89 @@ +# archive/file/name/length -- lintian check script -*- perl -*- + +# Copyright (C) 2011 Niels Thykier <niels@thykier.net> +# Copyright (C) 2021 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Archive::File::Name::Length; + +use v5.20; +use warnings; +use utf8; + +use Const::Fast; +use File::Basename; + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +const my $SPACE => q{ }; + +const my $FILENAME_LENGTH_LIMIT => 80; + +# We could derive this from data/fields/architectures, but that +# contains things like kopensolaris-sparc64 and kfreebsd-sparc64, +# neither of which Debian officially supports. +const my $LONGEST_ARCHITECTURE => length 'kfreebsd-amd64'; + +sub always { + my ($self) = @_; + + # Skip auto-generated packages (dbgsym) + return + if $self->processable->fields->declares('Auto-Built-Package'); + + my $basename = basename($self->processable->path); + + my $adjusted_length + = length($basename) + - length($self->processable->architecture) + + $LONGEST_ARCHITECTURE; + + $self->hint('package-has-long-file-name', $basename) + if $adjusted_length > $FILENAME_LENGTH_LIMIT; + + return; +} + +sub source { + my ($self) = @_; + + my @lines = $self->processable->fields->trimmed_list('Files', qr/\n/); + + for my $line (@lines) { + + my (undef, undef, $name) = split($SPACE, $line); + next + unless length $name; + + $self->hint('source-package-component-has-long-file-name', $name) + if length $name > $FILENAME_LENGTH_LIMIT; + } + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Archive/Liberty/Mismatch.pm b/lib/Lintian/Check/Archive/Liberty/Mismatch.pm new file mode 100644 index 0000000..18d8d91 --- /dev/null +++ b/lib/Lintian/Check/Archive/Liberty/Mismatch.pm @@ -0,0 +1,134 @@ +# archive/liberty/mismatch -- lintian check script -*- perl -*- +# +# Copyright (C) 2004 Marc Brockschmidt +# Copyright (C) 2020 Chris Lamb <lamby@debian.org> +# Copyright (C) 2020-2021 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Archive::Liberty::Mismatch; + +use v5.20; +use warnings; +use utf8; + +use Const::Fast; +use List::SomeUtils qw(all none); + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +const my $ARROW => q{->}; + +sub source { + my ($self) = @_; + + my $control = $self->processable->debian_control; + my $source_fields = $control->source_fields; + + # Check that every package is in the same archive area, except + # that sources in main can deliver both main and contrib packages. + # The source package may or may not have a section specified; if + # it doesn't, derive the expected archive area from the first + # binary package by leaving $source_liberty undefined until parsing the + # first binary section. Missing sections will be caught by other + # checks. + + my $source_section = $source_fields->value('Section'); + return + unless length $source_section; + + # see policy 2.4 + $source_section = "main/$source_section" + if $source_section !~ m{/}; + + my $source_liberty = $source_section; + $source_liberty =~ s{ / .* $}{}x; + + my %liberty_by_installable; + + for my $installable ($control->installables) { + + my $installable_fields = $control->installable_fields($installable); + + my $installable_section; + if ($installable_fields->declares('Section')) { + + $installable_section = $installable_fields->value('Section'); + + # see policy 2.4 + $installable_section = "main/$installable_section" + if $installable_section !~ m{/}; + } + + $installable_section ||= $source_section; + + my $installable_liberty = $installable_section; + $installable_liberty =~ s{ / .* $}{}x; + + $liberty_by_installable{$installable} = $installable_liberty; + + # special exception for contrib built from main + next + if $source_liberty eq 'main' && $installable_liberty eq 'contrib'; + + my $control_item= $self->processable->debian_control->item; + my $position = $installable_fields->position('Section'); + my $pointer = $control_item->pointer($position); + + $self->pointed_hint('archive-liberty-mismatch', $pointer, + "(in section for $installable)", + $installable_liberty, 'vs', $source_liberty) + if $source_liberty ne $installable_liberty; + } + + # in ascending order of liberty + for my $inferior_liberty ('non-free', 'contrib') { + + # must remain inferior + last + if $inferior_liberty eq $source_liberty; + + my $control_item= $self->processable->debian_control->item; + my $position = $source_fields->position('Section'); + my $pointer = $control_item->pointer($position); + + $self->pointed_hint('archive-liberty-mismatch', $pointer, + '(in source paragraph)', + $source_liberty,$ARROW, $inferior_liberty) + if ( + all { $liberty_by_installable{$_} eq $inferior_liberty } + keys %liberty_by_installable + ) + && ( + none { $liberty_by_installable{$_} eq $source_liberty } + keys %liberty_by_installable + ); + } + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Archive/NonFree/Autobuild.pm b/lib/Lintian/Check/Archive/NonFree/Autobuild.pm new file mode 100644 index 0000000..939f0fc --- /dev/null +++ b/lib/Lintian/Check/Archive/NonFree/Autobuild.pm @@ -0,0 +1,70 @@ +# archive/non-free/autobuild -- lintian check script -*- perl -*- +# +# Copyright (C) 2004 Marc Brockschmidt +# Copyright (C) 2020 Chris Lamb <lamby@debian.org> +# Copyright (C) 2020-2021 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Archive::NonFree::Autobuild; + +use v5.20; +use warnings; +use utf8; + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +sub source { + my ($self) = @_; + + return + unless $self->processable->is_non_free; + + my $control = $self->processable->debian_control; + my $source_fields = $control->source_fields; + + my $changes = $self->group->changes; + + # source-only upload + if (defined $changes + && $changes->fields->value('Architecture') eq 'source') { + + my $field = 'XS-Autobuild'; + + my $control_item= $self->processable->debian_control->item; + my $position = $source_fields->position($field); + my $pointer = $control_item->pointer($position); + + $self->pointed_hint('source-only-upload-to-non-free-without-autobuild', + $pointer, '(in the source paragraph)', $field) + if !$source_fields->declares($field) + || $source_fields->value($field) eq 'no'; + } + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Binaries.pm b/lib/Lintian/Check/Binaries.pm new file mode 100644 index 0000000..9e71f25 --- /dev/null +++ b/lib/Lintian/Check/Binaries.pm @@ -0,0 +1,73 @@ +# binaries -- lintian check script -*- perl -*- + +# Copyright (C) 1998 Christian Schwarz and Richard Braakman +# Copyright (C) 2012 Kees Cook +# Copyright (C) 2017-2020 Chris Lamb <lamby@debian.org> +# Copyright (C) 2021 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Binaries; + +use v5.20; +use warnings; +use utf8; + +use List::Compare; + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +sub visit_installed_files { + my ($self, $item) = @_; + + return + unless $item->is_file; + + return + unless $item->file_type =~ /^ [^,]* \b ELF \b /x; + + my @KNOWN_STRIPPED_SECTION_NAMES = qw{.note .comment}; + + my @elf_sections = values %{$item->elf->{'SECTION-HEADERS'}}; + my @have_section_names = map { $_->name } @elf_sections; + + my $lc_name = List::Compare->new(\@have_section_names, + \@KNOWN_STRIPPED_SECTION_NAMES); + + my @have_stripped_sections = $lc_name->get_intersection; + + # appropriately stripped, but is it stripped enough? + if ( $item->file_type !~ m{ \b not [ ] stripped \b }x + && $item->name !~ m{^ (?:usr/)? lib/ (?: debug | profile ) / }x) { + + $self->pointed_hint('binary-has-unneeded-section', $item->pointer, $_) + for @have_stripped_sections; + } + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Binaries/Architecture.pm b/lib/Lintian/Check/Binaries/Architecture.pm new file mode 100644 index 0000000..009b1f5 --- /dev/null +++ b/lib/Lintian/Check/Binaries/Architecture.pm @@ -0,0 +1,60 @@ +# binaries/architecture -- lintian check script -*- perl -*- + +# Copyright (C) 1998 Christian Schwarz and Richard Braakman +# Copyright (C) 2012 Kees Cook +# Copyright (C) 2017-2020 Chris Lamb <lamby@debian.org> +# Copyright (C) 2021 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Binaries::Architecture; + +use v5.20; +use warnings; +use utf8; + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +sub visit_installed_files { + my ($self, $item) = @_; + + return + unless $item->is_file; + + return + unless $item->file_type =~ m{^ [^,]* \b ELF \b }x + || $item->file_type =~ m{ \b current [ ] ar [ ] archive \b }x; + + my $architecture = $self->processable->fields->value('Architecture'); + + $self->pointed_hint('arch-independent-package-contains-binary-or-object', + $item->pointer) + if $architecture eq 'all'; + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Binaries/Architecture/Other.pm b/lib/Lintian/Check/Binaries/Architecture/Other.pm new file mode 100644 index 0000000..b40811f --- /dev/null +++ b/lib/Lintian/Check/Binaries/Architecture/Other.pm @@ -0,0 +1,141 @@ +# binaries/architecture/other -- lintian check script -*- perl -*- + +# Copyright (C) 1998 Christian Schwarz and Richard Braakman +# Copyright (C) 2012 Kees Cook +# Copyright (C) 2017-2020 Chris Lamb <lamby@debian.org> +# Copyright (C) 2021 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Binaries::Architecture::Other; + +use v5.20; +use warnings; +use utf8; + +use Const::Fast; + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +# Guile object files do not objdump/strip correctly, so exclude them +# from a number of tests. (#918444) +const my $GUILE_PATH_REGEX => qr{^usr/lib(?:/[^/]+)+/guile/[^/]+/.+\.go$}; + +has ARCH_REGEX => ( + is => 'rw', + lazy => 1, + default => sub { + my ($self) = @_; + + my %arch_regex; + + my $data = $self->data->load('binaries/arch-regex', qr/\s*\~\~/); + for my $architecture ($data->all) { + + my $pattern = $data->value($architecture); + $arch_regex{$architecture} = qr{$pattern}; + } + + return \%arch_regex; + } +); + +has ARCH_64BIT_EQUIVS => ( + is => 'rw', + lazy => 1, + default => sub { + my ($self) = @_; + + return $self->data->load('binaries/arch-64bit-equivs',qr/\s*\=\>\s*/); + } +); + +sub from_other_architecture { + my ($self, $item) = @_; + + my $architecture = $self->processable->fields->value('Architecture'); + + return 0 + if $architecture eq 'all'; + + # If it matches the architecture regex, it is good + return 0 + if exists $self->ARCH_REGEX->{$architecture} + && $item->file_type =~ $self->ARCH_REGEX->{$architecture}; + + # Special case - "old" multi-arch dirs + if ( $item->name =~ m{(?:^|/)lib(x?\d\d)/} + || $item->name =~ m{^emul/ia(\d\d)}) { + + my $bus_width = $1; + + return 0 + if exists $self->ARCH_REGEX->{$bus_width} + && $item->file_type =~ $self->ARCH_REGEX->{$bus_width}; + } + + # Detached debug symbols could be for a biarch library. + return 0 + if $item->name =~ m{^usr/lib/debug/\.build-id/}; + + # Guile binaries do not objdump/strip (etc.) correctly. + return 0 + if $item->name =~ $GUILE_PATH_REGEX; + + # Allow amd64 kernel modules to be installed on i386. + if ( $item->name =~ m{^lib/modules/} + && $self->ARCH_64BIT_EQUIVS->recognizes($architecture)) { + + my $equivalent_64 = $self->ARCH_64BIT_EQUIVS->value($architecture); + + return 0 + if $item->file_type =~ $self->ARCH_REGEX->{$equivalent_64}; + } + + # Ignore i386 binaries in amd64 packages for right now. + return 0 + if $architecture eq 'amd64' + && $item->file_type =~ $self->ARCH_REGEX->{i386}; + + return 1; +} + +sub visit_installed_files { + my ($self, $item) = @_; + + return + unless $item->is_file; + + return + unless $item->file_type =~ /^ [^,]* \b ELF \b /x; + + $self->pointed_hint('binary-from-other-architecture', $item->pointer) + if $self->from_other_architecture($item); + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Binaries/Corrupted.pm b/lib/Lintian/Check/Binaries/Corrupted.pm new file mode 100644 index 0000000..8b7ecc1 --- /dev/null +++ b/lib/Lintian/Check/Binaries/Corrupted.pm @@ -0,0 +1,91 @@ +# binaries/corrupted -- lintian check script -*- perl -*- + +# Copyright (C) 1998 Christian Schwarz and Richard Braakman +# Copyright (C) 2012 Kees Cook +# Copyright (C) 2017-2020 Chris Lamb <lamby@debian.org> +# Copyright (C) 2021 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Binaries::Corrupted; + +use v5.20; +use warnings; +use utf8; + +use List::SomeUtils qw(uniq); + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +sub visit_patched_files { + my ($self, $item) = @_; + + $self->check_elf_issues($item); + + return; +} + +sub visit_installed_files { + my ($self, $item) = @_; + + $self->check_elf_issues($item); + + return; +} + +sub check_elf_issues { + my ($self, $item) = @_; + + for (uniq @{$item->elf->{ERRORS} // []}) { + $self->pointed_hint('elf-error',$item->pointer, $_) + unless ( + m{In program headers: Unable to find program interpreter name} + and $item->name =~ m{^usr/lib/debug/}); + } + + $self->pointed_hint('elf-warning', $item->pointer, $_) + for uniq @{$item->elf->{WARNINGS} // []}; + + # static library + for my $member_name (keys %{$item->elf_by_member}) { + + my $member_elf = $item->elf_by_member->{$member_name}; + + $self->pointed_hint('elf-error', $item->pointer, $member_name, $_) + for uniq @{$member_elf->{ERRORS} // []}; + + $self->pointed_hint('elf-warning', $item->pointer, $member_name, $_) + for uniq @{$member_elf->{WARNINGS} // []}; + } + + $self->pointed_hint('binary-with-bad-dynamic-table', $item->pointer) + if $item->elf->{'BAD-DYNAMIC-TABLE'} + && $item->name !~ m{^usr/lib/debug/}; + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Binaries/DebugSymbols.pm b/lib/Lintian/Check/Binaries/DebugSymbols.pm new file mode 100644 index 0000000..4afe525 --- /dev/null +++ b/lib/Lintian/Check/Binaries/DebugSymbols.pm @@ -0,0 +1,72 @@ +# binaries/debug-symbols -- lintian check script -*- perl -*- + +# Copyright (C) 1998 Christian Schwarz and Richard Braakman +# Copyright (C) 2012 Kees Cook +# Copyright (C) 2017-2020 Chris Lamb <lamby@debian.org> +# Copyright (C) 2021 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Binaries::DebugSymbols; + +use v5.20; +use warnings; +use utf8; + +use Const::Fast; + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +# Guile object files do not objdump/strip correctly, so exclude them +# from a number of tests. (#918444) +const my $GUILE_PATH_REGEX => qr{^usr/lib(?:/[^/]+)+/guile/[^/]+/.+\.go$}; + +sub visit_installed_files { + my ($self, $item) = @_; + + return + unless $item->is_file; + + return + unless $item->file_type =~ /^ [^,]* \b ELF \b /x; + + # Is it an object file (which generally cannot be + # stripped), a kernel module, debugging symbols, or + # perhaps a debugging package? + $self->pointed_hint('unstripped-binary-or-object', $item->pointer) + if $item->file_type =~ m{ \b not [ ] stripped \b }x + && $item->name !~ m{ [.]k?o $}x + && $self->processable->name !~ m{ -dbg $}x + && $item->name !~ m{^ (?:usr/)? lib/debug/ }x + && $item->name !~ $GUILE_PATH_REGEX + && $item->name !~ m{ [.]gox $}x + && ( $item->file_type !~ m/executable/ + || $item->strings !~ m{^ Caml1999X0[0-9][0-9] $}mx); + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Binaries/DebugSymbols/Detached.pm b/lib/Lintian/Check/Binaries/DebugSymbols/Detached.pm new file mode 100644 index 0000000..b4f9a4f --- /dev/null +++ b/lib/Lintian/Check/Binaries/DebugSymbols/Detached.pm @@ -0,0 +1,86 @@ +# binaries/debug-symbols/detached -- lintian check script -*- perl -*- + +# Copyright (C) 1998 Christian Schwarz and Richard Braakman +# Copyright (C) 2012 Kees Cook +# Copyright (C) 2017-2020 Chris Lamb <lamby@debian.org> +# Copyright (C) 2021 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Binaries::DebugSymbols::Detached; + +use v5.20; +use warnings; +use utf8; + +use List::Compare; + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +sub visit_installed_files { + my ($self, $item) = @_; + + return + unless $item->is_file; + + return + unless $item->file_type =~ /^ [^,]* \b ELF \b /x; + + return + unless $item->file_type =~ m{ executable | shared [ ] object }x; + + # Detached debugging symbols directly in /usr/lib/debug. + $self->pointed_hint('debug-symbols-directly-in-usr-lib-debug', + $item->pointer) + if $item->dirname eq 'usr/lib/debug/'; + + return + unless $item->name + =~ m{^ usr/lib/debug/ (?:lib\d*|s?bin|usr|opt|dev|emul|\.build-id) / }x; + + $self->pointed_hint('debug-symbols-not-detached', $item->pointer) + if exists $item->elf->{NEEDED}; + + # Something other than detached debugging symbols in + # /usr/lib/debug paths. + my @KNOWN_DEBUG_SECTION_NAMES + = qw{.debug_line .zdebug_line .debug_str .zdebug_str}; + + my @elf_sections = values %{$item->elf->{'SECTION-HEADERS'}}; + my @have_section_names = map { $_->name } @elf_sections; + + my $lc_name + = List::Compare->new(\@have_section_names, \@KNOWN_DEBUG_SECTION_NAMES); + + my @have_debug_sections = $lc_name->get_intersection; + + $self->pointed_hint('debug-file-with-no-debug-symbols', $item->pointer) + unless @have_debug_sections; + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Binaries/Hardening.pm b/lib/Lintian/Check/Binaries/Hardening.pm new file mode 100644 index 0000000..55e70ac --- /dev/null +++ b/lib/Lintian/Check/Binaries/Hardening.pm @@ -0,0 +1,183 @@ +# binaries/hardening -- lintian check script -*- perl -*- + +# Copyright (C) 1998 Christian Schwarz and Richard Braakman +# Copyright (C) 2012 Kees Cook +# Copyright (C) 2017-2020 Chris Lamb <lamby@debian.org> +# Copyright (C) 2021 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Binaries::Hardening; + +use v5.20; +use warnings; +use utf8; + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +has HARDENED_FUNCTIONS => ( + is => 'rw', + lazy => 1, + default => sub { + my ($self) = @_; + + return $self->data->load('binaries/hardened-functions'); + } +); + +has recommended_hardening_features => ( + is => 'rw', + lazy => 1, + default => sub { + my ($self) = @_; + + my %recommended_hardening_features; + + my $hardening_buildflags = $self->data->hardening_buildflags; + my $architecture = $self->processable->fields->value('Architecture'); + + %recommended_hardening_features + = map { $_ => 1 } + @{$hardening_buildflags->recommended_features->{$architecture}} + if $architecture ne 'all'; + + return \%recommended_hardening_features; + } +); + +has built_with_golang => ( + is => 'rw', + lazy => 1, + default => sub { + my ($self) = @_; + + my $built_with_golang = $self->processable->name =~ m/^golang-/; + + my $source = $self->group->source; + + $built_with_golang + = $source->relation('Build-Depends-All') + ->satisfies('golang-go | golang-any') + if defined $source; + + return $built_with_golang; + } +); + +sub visit_installed_files { + my ($self, $item) = @_; + + my @elf_hardened; + my @elf_unhardened; + + for my $symbol (@{$item->elf->{SYMBOLS}}) { + + next + unless $symbol->section eq 'UND'; + + if ($symbol->name =~ /^__(\S+)_chk$/) { + + my $vulnerable = $1; + push(@elf_hardened, $vulnerable) + if $self->HARDENED_FUNCTIONS->recognizes($vulnerable); + + } else { + + push(@elf_unhardened, $symbol->name) + if $self->HARDENED_FUNCTIONS->recognizes($symbol->name); + } + } + + $self->pointed_hint('hardening-no-fortify-functions', $item->pointer) + if @elf_unhardened + && !@elf_hardened + && !$self->built_with_golang + && $self->recommended_hardening_features->{fortify}; + + for my $member_name (keys %{$item->elf_by_member}) { + + my @member_hardened; + my @member_unhardened; + + for my $symbol (@{$item->elf_by_member->{$member_name}{SYMBOLS}}) { + + next + unless $symbol->section eq 'UND'; + + if ($symbol->name =~ /^__(\S+)_chk$/) { + + my $vulnerable = $1; + push(@member_hardened, $vulnerable) + if $self->HARDENED_FUNCTIONS->recognizes($vulnerable); + + } else { + + push(@member_unhardened, $symbol->name) + if $self->HARDENED_FUNCTIONS->recognizes($symbol->name); + } + } + + $self->pointed_hint('hardening-no-fortify-functions', + $item->pointer, $member_name) + if @member_unhardened + && !@member_hardened + && !$self->built_with_golang + && $self->recommended_hardening_features->{fortify}; + } + + return + if $self->processable->type eq 'udeb'; + + return + unless $item->is_file; + + return + if $item->file_type !~ m{^ [^,]* \b ELF \b }x + || $item->file_type !~ m{ \b executable | shared [ ] object \b }x; + + # dynamically linked? + return + unless exists $item->elf->{NEEDED}; + + $self->pointed_hint('hardening-no-relro', $item->pointer) + if $self->recommended_hardening_features->{relro} + && !$self->built_with_golang + && !$item->elf->{PH}{RELRO}; + + $self->pointed_hint('hardening-no-bindnow', $item->pointer) + if $self->recommended_hardening_features->{bindnow} + && !$self->built_with_golang + && !exists $item->elf->{FLAGS_1}{NOW}; + + $self->pointed_hint('hardening-no-pie', $item->pointer) + if $self->recommended_hardening_features->{pie} + && !$self->built_with_golang + && $item->elf->{'ELF-HEADER'}{Type} =~ m{^ EXEC }x; + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Binaries/LargeFileSupport.pm b/lib/Lintian/Check/Binaries/LargeFileSupport.pm new file mode 100644 index 0000000..e64d727 --- /dev/null +++ b/lib/Lintian/Check/Binaries/LargeFileSupport.pm @@ -0,0 +1,108 @@ +# binaries/large-file-support -- lintian check script -*- perl -*- + +# Copyright (C) 1998 Christian Schwarz and Richard Braakman +# Copyright (C) 2012 Kees Cook +# Copyright (C) 2017-2020 Chris Lamb <lamby@debian.org> +# Copyright (C) 2021 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Binaries::LargeFileSupport; + +use v5.20; +use warnings; +use utf8; + +use List::SomeUtils qw(any); + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +has ARCH_REGEX => ( + is => 'rw', + lazy => 1, + default => sub { + my ($self) = @_; + + my %arch_regex; + + my $data = $self->data->load('binaries/arch-regex', qr/\s*\~\~/); + for my $architecture ($data->all) { + + my $pattern = $data->value($architecture); + $arch_regex{$architecture} = qr{$pattern}; + } + + return \%arch_regex; + } +); + +has LFS_SYMBOLS => ( + is => 'rw', + lazy => 1, + default => sub { + my ($self) = @_; + + return $self->data->load('binaries/lfs-symbols'); + } +); + +sub visit_installed_files { + my ($self, $item) = @_; + + return + unless $item->is_file; + + # The LFS check only works reliably for ELF files due to the + # architecture regex. + return + unless $item->is_elf; + + # Only 32bit ELF binaries can lack LFS. + return + unless $item->file_type =~ $self->ARCH_REGEX->{'32'}; + + return + if $item->name =~ m{^usr/lib/debug/}; + + my @unresolved_symbols; + for my $symbol (@{$item->elf->{SYMBOLS} // [] }) { + + # ignore if defined in the binary + next + unless $symbol->section eq 'UND'; + + push(@unresolved_symbols, $symbol->name); + } + + # Using a 32bit only interface call, some parts of the + # binary are built without LFS + $self->pointed_hint('binary-file-built-without-LFS-support',$item->pointer) + if any { $self->LFS_SYMBOLS->recognizes($_) } @unresolved_symbols; + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Binaries/Location.pm b/lib/Lintian/Check/Binaries/Location.pm new file mode 100644 index 0000000..c207ae0 --- /dev/null +++ b/lib/Lintian/Check/Binaries/Location.pm @@ -0,0 +1,138 @@ +# binaries/location -- lintian check script -*- perl -*- + +# Copyright (C) 1998 Christian Schwarz and Richard Braakman +# Copyright (C) 2012 Kees Cook +# Copyright (C) 2017-2020 Chris Lamb <lamby@debian.org> +# Copyright (C) 2021 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Binaries::Location; + +use v5.20; +use warnings; +use utf8; + +use Const::Fast; + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +const my $EMPTY => q{}; + +const my %PATH_DIRECTORIES => map { $_ => 1 } qw( + bin/ sbin/ usr/bin/ usr/sbin/ usr/games/ ); + +has DEB_HOST_MULTIARCH => ( + is => 'rw', + lazy => 1, + default => sub { + my ($self) = @_; + + return $self->data->architectures->deb_host_multiarch; + } +); + +has gnu_triplet_pattern => ( + is => 'rw', + lazy => 1, + default => sub { + my ($self) = @_; + + my $gnu_triplet_pattern = $EMPTY; + + my $architecture = $self->processable->fields->value('Architecture'); + my $madir = $self->DEB_HOST_MULTIARCH->{$architecture}; + + if (length $madir) { + $gnu_triplet_pattern = quotemeta $madir; + $gnu_triplet_pattern =~ s{^i386}{i[3-6]86}; + } + + return $gnu_triplet_pattern; + } +); + +has ruby_triplet_pattern => ( + is => 'rw', + lazy => 1, + default => sub { + my ($self) = @_; + + my $ruby_triplet_pattern = $self->gnu_triplet_pattern; + $ruby_triplet_pattern =~ s{linux\\-gnu$}{linux}; + $ruby_triplet_pattern =~ s{linux\\-gnu}{linux\\-}; + + return $ruby_triplet_pattern; + } +); + +sub visit_installed_files { + my ($self, $item) = @_; + + return + unless $item->is_file; + + return + unless $item->file_type =~ /^ [^,]* \b ELF \b /x + || $item->file_type =~ / \b current [ ] ar [ ] archive \b /x; + + $self->pointed_hint('binary-in-etc', $item->pointer) + if $item->name =~ m{^etc/}; + + $self->pointed_hint('arch-dependent-file-in-usr-share', $item->pointer) + if $item->name =~ m{^usr/share/}; + + my $fields = $self->processable->fields; + + my $architecture = $fields->value('Architecture'); + my $multiarch = $fields->value('Multi-Arch') || 'no'; + + my $gnu_triplet_pattern = $self->gnu_triplet_pattern; + my $ruby_triplet_pattern = $self->ruby_triplet_pattern; + + $self->pointed_hint('arch-dependent-file-not-in-arch-specific-directory', + $item->pointer) + if $multiarch eq 'same' + && length $gnu_triplet_pattern + && $item->name !~ m{\b$gnu_triplet_pattern(?:\b|_)} + && length $ruby_triplet_pattern + && $item->name !~ m{/$ruby_triplet_pattern/} + && $item->name !~ m{/java-\d+-openjdk-\Q$architecture\E/} + && $item->name !~ m{/[.]build-id/}; + + return + unless $item->file_type =~ /^ [^,]* \b ELF \b /x; + + $self->pointed_hint('development-package-ships-elf-binary-in-path', + $item->pointer) + if exists $PATH_DIRECTORIES{$item->dirname} + && $fields->value('Section') =~ m{ (?:^|/) libdevel $}x + && $fields->value('Multi-Arch') ne 'foreign'; + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Binaries/Obsolete/Crypt.pm b/lib/Lintian/Check/Binaries/Obsolete/Crypt.pm new file mode 100644 index 0000000..8813d8b --- /dev/null +++ b/lib/Lintian/Check/Binaries/Obsolete/Crypt.pm @@ -0,0 +1,90 @@ +# binaries/obsolete/crypt -- lintian check script -*- perl -*- + +# Copyright (C) 1998 Christian Schwarz and Richard Braakman +# Copyright (C) 2012 Kees Cook +# Copyright (C) 2017-2020 Chris Lamb <lamby@debian.org> +# Copyright (C) 2021 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Binaries::Obsolete::Crypt; + +use v5.20; +use warnings; +use utf8; + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +has OBSOLETE_CRYPT_FUNCTIONS => ( + is => 'rw', + lazy => 1, + default => sub { + my ($self) = @_; + + return $self->data->load('binaries/obsolete-crypt-functions', + qr/\s*\|\|\s*/); + } +); + +sub visit_installed_files { + my ($self, $item) = @_; + + for my $symbol (@{$item->elf->{SYMBOLS} // []}) { + + next + unless $symbol->section eq 'UND'; + + next + unless $self->OBSOLETE_CRYPT_FUNCTIONS->recognizes($symbol->name); + + my $tag = $self->OBSOLETE_CRYPT_FUNCTIONS->value($symbol->name); + + $self->pointed_hint($tag, $item->pointer, $symbol->name); + } + + for my $member_name (keys %{$item->elf_by_member}) { + + for + my $symbol (@{$item->elf_by_member->{$member_name}{SYMBOLS} // []}) { + + next + unless $symbol->section eq 'UND'; + + next + unless $self->OBSOLETE_CRYPT_FUNCTIONS->recognizes( + $symbol->name); + + my $tag = $self->OBSOLETE_CRYPT_FUNCTIONS->value($symbol->name); + + $self->pointed_hint($tag, $item->pointer, "($member_name)", + $symbol->name); + } + } + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Binaries/Prerequisites.pm b/lib/Lintian/Check/Binaries/Prerequisites.pm new file mode 100644 index 0000000..cdc5868 --- /dev/null +++ b/lib/Lintian/Check/Binaries/Prerequisites.pm @@ -0,0 +1,214 @@ +# binaries/prerequisites -- lintian check script -*- perl -*- + +# Copyright (C) 1998 Christian Schwarz and Richard Braakman +# Copyright (C) 2012 Kees Cook +# Copyright (C) 2017-2020 Chris Lamb <lamby@debian.org> +# Copyright (C) 2021 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Binaries::Prerequisites; + +use v5.20; +use warnings; +use utf8; + +use Const::Fast; +use List::SomeUtils qw(any none uniq); + +const my $SPACE => q{ }; +const my $LEFT_PARENTHESIS => q{(}; +const my $RIGHT_PARENTHESIS => q{)}; + +# Guile object files do not objdump/strip correctly, so exclude them +# from a number of tests. (#918444) +const my $GUILE_PATH_REGEX => qr{^usr/lib(?:/[^/]+)+/guile/[^/]+/.+\.go$}; + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +has built_with_octave => ( + is => 'rw', + lazy => 1, + default => sub { + my ($self) = @_; + + my $built_with_octave = $self->processable->name =~ m/^octave-/; + + my $source = $self->group->source; + + $built_with_octave + = $source->relation('Build-Depends')->satisfies('dh-octave:any') + if defined $source; + + return $built_with_octave; + } +); + +has files_by_library => (is => 'rw', default => sub { {} }); + +sub visit_installed_files { + my ($self, $item) = @_; + + return + if $self->processable->type eq 'udeb'; + + return + unless $item->is_file; + + return + unless $item->file_type =~ /^ [^,]* \b ELF \b /x; + + return + unless $item->file_type =~ m{ executable | shared [ ] object }x; + + my $is_shared = $item->file_type =~ m/(shared object|pie executable)/; + + for my $library (@{$item->elf->{NEEDED} // [] }) { + + $self->files_by_library->{$library} //= []; + push(@{$self->files_by_library->{$library}}, $item->name); + } + + # Some exceptions: kernel modules, syslinux modules, detached + # debugging information and the dynamic loader (which itself + # has no dependencies). + $self->pointed_hint('shared-library-lacks-prerequisites', $item->pointer) + if $is_shared + && !@{$item->elf->{NEEDED} // []} + && $item->name !~ m{^boot/modules/} + && $item->name !~ m{^lib/modules/} + && $item->name !~ m{^usr/lib/debug/} + && $item->name !~ m{\.(?:[ce]32|e64)$} + && $item->name !~ m{^usr/lib/jvm/.*\.debuginfo$} + && $item->name !~ $GUILE_PATH_REGEX + && $item->name !~ m{ + ^lib(?:|32|x32|64)/ + (?:[-\w/]+/)? + ld-[\d.]+\.so$ + }xsm; + + my $depends = $self->processable->relation('strong'); + + $self->pointed_hint('undeclared-elf-prerequisites', $item->pointer, + $LEFT_PARENTHESIS + . join($SPACE, sort +uniq @{$item->elf->{NEEDED} // []}) + . $RIGHT_PARENTHESIS) + if @{$item->elf->{NEEDED} // [] } + && $depends->is_empty; + + # If there is no libc dependency, then it is most likely a + # bug. The major exception is that some C++ libraries, + # but these tend to link against libstdc++ instead. (see + # #719806) + my $linked_with_libc + = any { m{^ libc[.]so[.] }x } @{$item->elf->{NEEDED} // []}; + + $self->pointed_hint('library-not-linked-against-libc', $item->pointer) + if !$linked_with_libc + && $is_shared + && @{$item->elf->{NEEDED} // [] } + && (none { /^libc[.]so[.]/ } @{$item->elf->{NEEDED} // [] }) + && $item->name !~ m{/libc\b} + && (!$self->built_with_octave + || $item->name !~ m/\.(?:oct|mex)$/); + + $self->pointed_hint('program-not-linked-against-libc', $item->pointer) + if !$linked_with_libc + && !$is_shared + && @{$item->elf->{NEEDED} // [] } + && (none { /^libstdc[+][+][.]so[.]/ }@{$item->elf->{NEEDED} // [] }) + && !$self->built_with_octave; + + return; +} + +sub installable { + my ($self) = @_; + + my $depends = $self->processable->relation('strong'); + return + if $depends->is_empty; + + my %libc_files; + for my $library (keys %{$self->files_by_library}) { + + # Match libcXX or libcXX-*, but not libc3p0. + next + unless $library =~ m{^ libc [.] so [.] (\d+ .*) $}x; + + my $package = "libc$1"; + + $libc_files{$package} //= []; + push(@{$libc_files{$package}}, @{$self->files_by_library->{$library}}); + } + + for my $package (keys %libc_files) { + + next + if $depends->matches(qr/^\Q$package\E\b/); + + my @sorted = sort +uniq @{$libc_files{$package}}; + + my $context = 'needed by ' . $sorted[0]; + $context .= ' and ' . (scalar @sorted - 1) . ' others' + if @sorted > 1; + + $self->hint('missing-dependency-on-libc', $context) + unless $self->processable->name =~ m{^ libc [\d.]+ (?:-|\z) }x; + } + + my %libcxx_files; + for my $library (keys %{$self->files_by_library}) { + + # Match libstdc++XX or libcstdc++XX-* + next + unless $library =~ m{^ libstdc[+][+] [.] so [.] (\d+) $}xsm; + + my $package = "libstdc++$1"; + + $libcxx_files{$package} //= []; + push(@{$libcxx_files{$package}}, + @{$self->files_by_library->{$library}}); + } + + for my $package (keys %libcxx_files) { + + next + if $depends->matches(qr/^\Q$package\E\b/); + + my @sorted = sort +uniq @{$libcxx_files{$package}}; + + my $context = 'needed by ' . $sorted[0]; + $context .= ' and ' . (scalar @sorted - 1) . ' others' + if @sorted > 1; + + $self->hint('missing-dependency-on-libstdc++', $context); + } + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Binaries/Prerequisites/Numpy.pm b/lib/Lintian/Check/Binaries/Prerequisites/Numpy.pm new file mode 100644 index 0000000..c9791c4 --- /dev/null +++ b/lib/Lintian/Check/Binaries/Prerequisites/Numpy.pm @@ -0,0 +1,106 @@ +# binaries/prerequisites/numpy -- lintian check script -*- perl -*- + +# Copyright (C) 1998 Christian Schwarz and Richard Braakman +# Copyright (C) 2012 Kees Cook +# Copyright (C) 2017-2020 Chris Lamb <lamby@debian.org> +# Copyright (C) 2021 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Binaries::Prerequisites::Numpy; + +use v5.20; +use warnings; +use utf8; + +use Const::Fast; + +use Lintian::Relation; + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +const my $NUMPY_REGEX => qr{ + \Qmodule compiled against ABI version \E (?:0x)?%x + \Q but this version of numpy is \E (?:0x)?%x +}x; + +has uses_numpy_c_abi => (is => 'rw', default => 0); + +sub visit_installed_files { + my ($self, $item) = @_; + + return + unless $item->is_file; + + return + if $item->file_type !~ m{^ [^,]* \b ELF \b }x + || $item->file_type !~ m{ \b executable | shared [ ] object \b }x; + + # Python extension using Numpy C ABI? + if ( $item->name=~ m{^usr/lib/(?:pyshared/)?python2\.\d+/.*(?<!_d)\.so$} + || $item->name + =~ m{^ usr/lib/python3(?:[.]\d+)? / \S+ [.]cpython- \d+ - \S+ [.]so $}x + ){ + $self->uses_numpy_c_abi(1) + if $item->strings =~ / numpy /msx + && $item->strings =~ $NUMPY_REGEX; + } + + return; +} + +sub installable { + my ($self) = @_; + + return + if $self->processable->type eq 'udeb'; + + my $depends = $self->processable->relation('strong'); + + # Check for dependency on python3-numpy-abiN dependency (or strict + # versioned dependency on python3-numpy) + # We do not allow alternatives as it would mostly likely + # defeat the purpose of this relation. Also, we do not allow + # versions for -abi as it is a virtual package. + $self->hint('missing-dependency-on-numpy-abi') + if $self->uses_numpy_c_abi + && !$depends->matches(qr/^python3?-numpy-abi\d+$/, + Lintian::Relation::VISIT_OR_CLAUSE_FULL) + && ( + !$depends->matches( + qr/^python3-numpy \(>[>=][^\|]+$/, + Lintian::Relation::VISIT_OR_CLAUSE_FULL + ) + || !$depends->matches( + qr/^python3-numpy \(<[<=][^\|]+$/, + Lintian::Relation::VISIT_OR_CLAUSE_FULL + ) + )&& $self->processable->name !~ m{\A python3?-numpy \Z}xsm; + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Binaries/Prerequisites/Perl.pm b/lib/Lintian/Check/Binaries/Prerequisites/Perl.pm new file mode 100644 index 0000000..a105d25 --- /dev/null +++ b/lib/Lintian/Check/Binaries/Prerequisites/Perl.pm @@ -0,0 +1,81 @@ +# binaries/prerequisites/perl -- lintian check script -*- perl -*- + +# Copyright (C) 1998 Christian Schwarz and Richard Braakman +# Copyright (C) 2012 Kees Cook +# Copyright (C) 2017-2020 Chris Lamb <lamby@debian.org> +# Copyright (C) 2021 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Binaries::Prerequisites::Perl; + +use v5.20; +use warnings; +use utf8; + +use Lintian::Relation; + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +has has_perl_lib => (is => 'rw', default => 0); + +sub visit_installed_files { + my ($self, $item) = @_; + + return + unless $item->is_file; + + return + if $item->file_type !~ m{^ [^,]* \b ELF \b }x + || $item->file_type !~ m{ \b executable | shared [ ] object \b }x; + + $self->has_perl_lib(1) + if $item->name =~ m{^ usr/lib/ (?:[^/]+/)? perl5/ .* [.]so $}x; + + return; +} + +sub installable { + my ($self) = @_; + + return + if $self->processable->type eq 'udeb'; + + my $depends = $self->processable->relation('strong'); + + # It is a virtual package, so no version is allowed and + # alternatives probably does not make sense here either. + $self->hint('missing-dependency-on-perlapi') + if $self->has_perl_lib + && !$depends->matches( + qr/^perlapi-[-\w.]+(?:\s*\[[^\]]+\])?$/, + Lintian::Relation::VISIT_OR_CLAUSE_FULL + ); + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Binaries/Prerequisites/Php.pm b/lib/Lintian/Check/Binaries/Prerequisites/Php.pm new file mode 100644 index 0000000..f4f9634 --- /dev/null +++ b/lib/Lintian/Check/Binaries/Prerequisites/Php.pm @@ -0,0 +1,80 @@ +# binaries/prerequisites/php -- lintian check script -*- perl -*- + +# Copyright (C) 1998 Christian Schwarz and Richard Braakman +# Copyright (C) 2012 Kees Cook +# Copyright (C) 2017-2020 Chris Lamb <lamby@debian.org> +# Copyright (C) 2021 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Binaries::Prerequisites::Php; + +use v5.20; +use warnings; +use utf8; + +use Lintian::Relation; + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +has has_php_ext => (is => 'rw', default => 0); + +sub visit_installed_files { + my ($self, $item) = @_; + + return + unless $item->is_file; + + return + if $item->file_type !~ m{^ [^,]* \b ELF \b }x + || $item->file_type !~ m{ \b executable | shared [ ] object \b }x; + + # PHP extension? + $self->has_php_ext(1) + if $item->name =~ m{^usr/lib/php\d/.*\.so(?:\.\d+)*$}; + + return; +} + +sub installable { + my ($self) = @_; + + return + if $self->processable->type eq 'udeb'; + + my $depends = $self->processable->relation('strong'); + + # It is a virtual package, so no version is allowed and + # alternatives probably does not make sense here either. + $self->hint('missing-dependency-on-phpapi') + if $self->has_php_ext + && !$depends->matches(qr/^phpapi-[\d\w+]+$/, + Lintian::Relation::VISIT_OR_CLAUSE_FULL); + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Binaries/Profiling.pm b/lib/Lintian/Check/Binaries/Profiling.pm new file mode 100644 index 0000000..4b52937 --- /dev/null +++ b/lib/Lintian/Check/Binaries/Profiling.pm @@ -0,0 +1,73 @@ +# binaries/profiling -- lintian check script -*- perl -*- + +# Copyright (C) 1998 Christian Schwarz and Richard Braakman +# Copyright (C) 2012 Kees Cook +# Copyright (C) 2017-2020 Chris Lamb <lamby@debian.org> +# Copyright (C) 2021 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Binaries::Profiling; + +use v5.20; +use warnings; +use utf8; + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +sub visit_installed_files { + my ($self, $item) = @_; + + my $architecture = $self->processable->fields->value('Architecture'); + + my $is_profiled = 0; + + for my $symbol (@{$item->elf->{SYMBOLS} // [] }) { + + # According to the binutils documentation[1], the profiling symbol + # can be named "mcount", "_mcount" or even "__mcount". + # [1] http://sourceware.org/binutils/docs/gprof/Implementation.html + $is_profiled = 1 + if $symbol->version =~ /^GLIBC_.*/ + && $symbol->name =~ m{\A _?+ _?+ (gnu_)?+mcount(_nc)?+ \Z}xsm + && ($symbol->section eq 'UND' || $symbol->section eq '.text'); + + # This code was used to detect profiled code in Wheezy and earlier + $is_profiled = 1 + if $symbol->section eq '.text' + && $symbol->version eq 'Base' + && $symbol->name eq '__gmon_start__' + && $architecture ne 'hppa'; + } + + $self->pointed_hint('binary-compiled-with-profiling-enabled', + $item->pointer) + if $is_profiled; + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Binaries/Rpath.pm b/lib/Lintian/Check/Binaries/Rpath.pm new file mode 100644 index 0000000..a4ecb93 --- /dev/null +++ b/lib/Lintian/Check/Binaries/Rpath.pm @@ -0,0 +1,145 @@ +# binaries/rpath -- lintian check script -*- perl -*- + +# Copyright (C) 1998 Christian Schwarz and Richard Braakman +# Copyright (C) 2012 Kees Cook +# Copyright (C) 2017-2020 Chris Lamb <lamby@debian.org> +# Copyright (C) 2021 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Binaries::Rpath; + +use v5.20; +use warnings; +use utf8; + +use Const::Fast; +use File::Spec; +use List::SomeUtils qw(any); + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +const my $SLASH => q{/}; + +has DEB_HOST_MULTIARCH => ( + is => 'rw', + lazy => 1, + default => sub { + my ($self) = @_; + + return $self->data->architectures->deb_host_multiarch; + } +); + +has multiarch_component => ( + is => 'rw', + lazy => 1, + default => sub { + my ($self) = @_; + + my $architecture = $self->processable->fields->value('Architecture'); + my $multiarch_component = $self->DEB_HOST_MULTIARCH->{$architecture}; + + return $multiarch_component; + } +); + +has private_folders => ( + is => 'rw', + lazy => 1, + default => sub { + my ($self) = @_; + + my @lib_folders = qw{lib}; + + push(@lib_folders, + map { $_ . $SLASH . $self->multiarch_component } @lib_folders) + if length $self->multiarch_component; + + my @usrlib_folders = qw{usr/lib}; + + push(@usrlib_folders, + map { $_ . $SLASH . $self->multiarch_component } @usrlib_folders) + if length $self->multiarch_component; + + my @game_folders = map { "$_/games" } @usrlib_folders; + + my @private_folders + = map { $_ . $SLASH . $self->processable->source_name } + (@lib_folders, @usrlib_folders, @game_folders); + + return \@private_folders; + } +); + +sub visit_installed_files { + my ($self, $item) = @_; + + return + unless $item->is_file; + + return + unless $item->file_type =~ /^ [^,]* \b ELF \b /x; + + for my $section (qw{RPATH RUNPATH}) { + + my @rpaths = keys %{$item->elf->{$section} // {}}; + + my @no_origin = grep { !m{^ \$ \{? ORIGIN \}? }x } @rpaths; + + my @canonical = map { File::Spec->canonpath($_) } @no_origin; + + my @custom; + for my $folder (@canonical) { + + # for shipped folders, would have to disallow system locations + next + if any { $folder =~ m{^ / \Q$_\E }x } @{$self->private_folders}; + + # GHC in Debian uses a scheme for RPATH (#914873) + next + if $folder =~ m{^ /usr/lib/ghc (?: / | $ ) }x; + + push(@custom, $folder); + } + + my @absolute = grep { m{^ / }x } @custom; + + $self->pointed_hint('custom-library-search-path', + $item->pointer, $section, $_) + for @absolute; + + my @relative = grep { m{^ [^/] }x } @custom; + + $self->pointed_hint('relative-library-search-path', + $item->pointer, $section, $_) + for @relative; + } + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Binaries/Spelling.pm b/lib/Lintian/Check/Binaries/Spelling.pm new file mode 100644 index 0000000..38a2529 --- /dev/null +++ b/lib/Lintian/Check/Binaries/Spelling.pm @@ -0,0 +1,86 @@ +# binaries/spelling -- lintian check script -*- perl -*- + +# Copyright (C) 1998 Christian Schwarz and Richard Braakman +# Copyright (C) 2012 Kees Cook +# Copyright (C) 2017-2020 Chris Lamb <lamby@debian.org> +# Copyright (C) 2021 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Binaries::Spelling; + +use v5.20; +use warnings; +use utf8; + +use Lintian::Spelling qw(check_spelling); + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +has BINARY_SPELLING_EXCEPTIONS => ( + is => 'rw', + lazy => 1, + default => sub { + my ($self) = @_; + + return $self->data->load('binaries/spelling-exceptions',qr/\s+/); + } +); + +sub spelling_tag_emitter { + my ($self, $tag_name, $item, @orig_args) = @_; + + return sub { + + my $pointer = $item->pointer($.); + + return $self->pointed_hint($tag_name, $pointer, @orig_args, @_); + }; +} + +sub visit_installed_files { + my ($self, $item) = @_; + + return + unless $item->is_file; + + return + unless $item->file_type =~ /^ [^,]* \b ELF \b /x; + + my @acceptable = ( + @{ $self->group->spelling_exceptions }, + $self->BINARY_SPELLING_EXCEPTIONS->all + ); + + my $tag_emitter + = $self->spelling_tag_emitter('spelling-error-in-binary', $item); + + check_spelling($self->data, $item->strings, \@acceptable, $tag_emitter, 0); + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Binaries/Static.pm b/lib/Lintian/Check/Binaries/Static.pm new file mode 100644 index 0000000..47eafb8 --- /dev/null +++ b/lib/Lintian/Check/Binaries/Static.pm @@ -0,0 +1,100 @@ +# binaries/static -- lintian check script -*- perl -*- + +# Copyright (C) 1998 Christian Schwarz and Richard Braakman +# Copyright (C) 2012 Kees Cook +# Copyright (C) 2017-2020 Chris Lamb <lamby@debian.org> +# Copyright (C) 2021 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Binaries::Static; + +use v5.20; +use warnings; +use utf8; + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +has built_with_golang => ( + is => 'rw', + lazy => 1, + default => sub { + my ($self) = @_; + + my $built_with_golang = $self->processable->name =~ m/^golang-/; + + my $source = $self->group->source; + + $built_with_golang + = $source->relation('Build-Depends-All') + ->satisfies('golang-go | golang-any') + if defined $source; + + return $built_with_golang; + } +); + +sub visit_installed_files { + my ($self, $item) = @_; + + return + if $self->processable->type eq 'udeb'; + + return + unless $item->is_file; + + return + unless $item->file_type =~ /^ [^,]* \b ELF \b /x; + + return + unless $item->file_type =~ m{ executable | shared [ ] object }x; + + my $is_shared = $item->file_type =~ m/(shared object|pie executable)/; + + # Some exceptions: files in /boot, /usr/lib/debug/*, + # named *-static or *.static, or *-static as + # package-name. + # Binaries built by the Go compiler are statically + # linked by default. + # klibc binaries appear to be static. + # Location of debugging symbols. + # ldconfig must be static. + $self->pointed_hint('statically-linked-binary', $item->pointer) + if !$is_shared + && !exists $item->elf->{NEEDED} + && $item->name !~ m{^boot/} + && $item->name !~ /[\.-]static$/ + && $self->processable->name !~ /-static$/ + && !$self->built_with_golang + && (!exists $item->elf->{INTERP} + || $item->elf->{INTERP} !~ m{/lib/klibc-\S+\.so}) + && $item->name !~ m{^usr/lib/debug/} + && $item->name ne 'sbin/ldconfig'; + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/BuildSystems/Automake.pm b/lib/Lintian/Check/BuildSystems/Automake.pm new file mode 100644 index 0000000..07a7d6d --- /dev/null +++ b/lib/Lintian/Check/BuildSystems/Automake.pm @@ -0,0 +1,54 @@ +# build-systems/automake -- lintian check script -*- perl -*- +# +# Copyright (C) 2013 Gautier Minster +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::BuildSystems::Automake; + +use v5.20; +use warnings; +use utf8; + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +sub source { + my ($self) = @_; + + # automake probably isn't used without a Makefile.am + my $makefile = $self->processable->patched->lookup('Makefile.am'); + return + unless defined $makefile; + + my $configure_in = $self->processable->patched->lookup('configure.in'); + + $self->pointed_hint('deprecated-configure-filename',$configure_in->pointer) + if defined $configure_in; + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/BuildSystems/Autotools.pm b/lib/Lintian/Check/BuildSystems/Autotools.pm new file mode 100644 index 0000000..cf40183 --- /dev/null +++ b/lib/Lintian/Check/BuildSystems/Autotools.pm @@ -0,0 +1,88 @@ +# Copyright (C) 1998 Christian Schwarz and Richard Braakman +# Copyright (C) 1999 Joey Hess +# Copyright (C) 2000 Sean 'Shaleh' Perry +# Copyright (C) 2002 Josip Rodin +# Copyright (C) 2007 Russ Allbery +# Copyright (C) 2013-2018 Bastien ROUCARIES +# Copyright (C) 2017-2020 Chris Lamb <lamby@debian.org> +# Copyright (C) 2020-2021 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::BuildSystems::Autotools; + +use v5.20; +use warnings; +use utf8; + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +sub visit_patched_files { + my ($self, $item) = @_; + + return + unless $item->is_file; + + if ( $item->name =~ /configure\.(in|ac)$/ + && $item->is_open_ok) { + + open(my $fd, '<', $item->unpacked_path) + or die encode_utf8('Cannot open ' . $item->unpacked_path); + + my $position = 1; + while (my $line = <$fd>) { + + next + if $line =~ m{^ \s* dnl }x; + + if ($line + =~ m{ (AC_PATH_PROG) \s* [(] [^,]+ , \s* \[? pkg-config \]? \s* , }x + ){ + + my $macro = $1; + $self->pointed_hint( + 'autotools-pkg-config-macro-not-cross-compilation-safe', + $item->pointer($position), $macro); + } + + } continue { + ++$position; + } + + close $fd; + } + + # Tests of autotools files are a special case. Ignore + # debian/config.cache as anyone doing that probably knows what + # they're doing and is using it as part of the build. + $self->pointed_hint('configure-generated-file-in-source', $item->pointer) + if $item->basename =~ m{\A config.(?:cache|log|status) \Z}xsm + && $item->name !~ m{^ debian/ }sx; + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/BuildSystems/Autotools/Libtool.pm b/lib/Lintian/Check/BuildSystems/Autotools/Libtool.pm new file mode 100644 index 0000000..3f0865a --- /dev/null +++ b/lib/Lintian/Check/BuildSystems/Autotools/Libtool.pm @@ -0,0 +1,99 @@ +# Copyright (C) 1998 Christian Schwarz and Richard Braakman +# Copyright (C) 1999 Joey Hess +# Copyright (C) 2000 Sean 'Shaleh' Perry +# Copyright (C) 2002 Josip Rodin +# Copyright (C) 2007 Russ Allbery +# Copyright (C) 2013-2018 Bastien ROUCARIES +# Copyright (C) 2017-2020 Chris Lamb <lamby@debian.org> +# Copyright (C) 2020-2021 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::BuildSystems::Autotools::Libtool; + +use v5.20; +use warnings; +use utf8; + +use Const::Fast; + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +const my $ACCEPTABLE_LIBTOOL_MAJOR => 5; +const my $ACCEPTABLE_LIBTOOL_MINOR => 2; +const my $ACCEPTABLE_LIBTOOL_DEBIAN => 2; + +# Check if the package build-depends on autotools-dev, automake, +# or libtool. +my $LIBTOOL = Lintian::Relation->new->load('libtool | dh-autoreconf'); +has libtool_in_build_depends => ( + is => 'rw', + lazy => 1, + default => sub { + my ($self) = @_; + + return $self->processable->relation('Build-Depends-All') + ->satisfies($LIBTOOL); + } +); + +sub visit_patched_files { + my ($self, $item) = @_; + + return + unless $item->is_file; + + $self->pointed_hint('ancient-libtool', $item->pointer) + if $item->basename eq 'ltconfig' + && $item->name !~ m{^ debian/ }sx + && !$self->libtool_in_build_depends; + + if ( $item->basename eq 'ltmain.sh' + && $item->name !~ m{^ debian/ }sx + && !$self->libtool_in_build_depends) { + + if ($item->bytes =~ /^VERSION=[\"\']?(1\.(\d)\.(\d+)(?:-(\d))?)/m) { + my ($version, $major, $minor, $debian)=($1, $2, $3, $4); + + $debian //= 0; + + $self->pointed_hint('ancient-libtool', $item->pointer, $version) + if $major < $ACCEPTABLE_LIBTOOL_MAJOR + || ( + $major == $ACCEPTABLE_LIBTOOL_MAJOR + && ( + $minor < $ACCEPTABLE_LIBTOOL_MINOR + || ( $minor == $ACCEPTABLE_LIBTOOL_MINOR + && $debian < $ACCEPTABLE_LIBTOOL_DEBIAN) + ) + ); + } + } + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/BuildSystems/Cmake.pm b/lib/Lintian/Check/BuildSystems/Cmake.pm new file mode 100644 index 0000000..0dfaf2c --- /dev/null +++ b/lib/Lintian/Check/BuildSystems/Cmake.pm @@ -0,0 +1,73 @@ +# build-systems/cmake -- lintian check script -*- perl -*- + +# Copyright (C) 1998 Christian Schwarz and Richard Braakman +# Copyright (C) 1999 Joey Hess +# Copyright (C) 2000 Sean 'Shaleh' Perry +# Copyright (C) 2002 Josip Rodin +# Copyright (C) 2007 Russ Allbery +# Copyright (C) 2013-2018 Bastien ROUCARIES +# Copyright (C) 2017-2020 Chris Lamb <lamby@debian.org> +# Copyright (C) 2020-2021 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::BuildSystems::Cmake; + +use v5.20; +use warnings; +use utf8; + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +sub visit_patched_files { + my ($self, $item) = @_; + + return + unless $item->is_file; + + # Check for CMake cache files. These embed the source path and hence + # will cause FTBFS on buildds, so they should never be present + $self->pointed_hint('source-contains-cmake-cache-file', $item->pointer) + if $item->basename eq 'CMakeCache.txt'; + + return; +} + +sub visit_installed_files { + my ($self, $item) = @_; + + return + unless $item->is_file; + + # /usr/share/cmake-* + $self->pointed_hint('package-contains-cmake-private-file', $item->pointer) + if $item->name =~ m{^ usr/share/cmake- \d+ [.] \d+ / }x + && $self->processable->source_name ne 'cmake'; + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/BuildSystems/Debhelper/MaintainerScript/Token.pm b/lib/Lintian/Check/BuildSystems/Debhelper/MaintainerScript/Token.pm new file mode 100644 index 0000000..7d54b79 --- /dev/null +++ b/lib/Lintian/Check/BuildSystems/Debhelper/MaintainerScript/Token.pm @@ -0,0 +1,80 @@ +# build-systems/debhelper/maintainer-script/token -- lintian check script -*- perl -*- +# +# Copyright (C) 1998 Richard Braakman +# Copyright (C) 2002 Josip Rodin +# Copyright (C) 2016-2019 Chris Lamb <lamby@debian.org> +# Copyright (C) 2021 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::BuildSystems::Debhelper::MaintainerScript::Token; + +use v5.20; +use warnings; +use utf8; + +use Unicode::UTF8 qw(encode_utf8); + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +sub visit_control_files { + my ($self, $item) = @_; + + return + unless $item->is_maintainer_script; + + return + unless length $item->interpreter; + + return + unless $item->is_open_ok; + + open(my $fd, '<', $item->unpacked_path) + or die encode_utf8('Cannot open ' . $item->unpacked_path); + + my $position = 1; + while (my $line = <$fd>) { + + next + unless $line =~ m{( [#] DEBHELPER [#] )}x; + + my $token = $1; + + my $pointer = $item->pointer($position); + + $self->pointed_hint('maintainer-script-has-unexpanded-debhelper-token', + $pointer, $token); + + } continue { + ++$position; + } + + close $fd; + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/BuildSystems/Libtool/LaFile.pm b/lib/Lintian/Check/BuildSystems/Libtool/LaFile.pm new file mode 100644 index 0000000..7431c41 --- /dev/null +++ b/lib/Lintian/Check/BuildSystems/Libtool/LaFile.pm @@ -0,0 +1,94 @@ +# build-systems/libtool/la-file -- lintian check script -*- perl -*- + +# Copyright (C) 1998 Christian Schwarz +# Copyright (C) 2018-2019 Chris Lamb <lamby@debian.org> +# Copyright (C) 2021 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::BuildSystems::Libtool::LaFile; + +use v5.20; +use warnings; +use utf8; + +use Const::Fast; + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +const my $SLASH => q{/}; + +sub visit_installed_files { + my ($self, $item) = @_; + + return + if $item->name !~ /[.]la$/ || length $item->link; + + my @lines = split(/\n/, $item->decoded_utf8); + + my $position = 1; + for my $line (@lines) { + + if ($line =~ /^ libdir=' (.+) ' $/x) { + + my $own_location = $1; + $own_location =~ s{^/+}{}; + $own_location =~ s{/*$}{/}; + + # python-central is a special case since the + # libraries are moved at install time. + next + if $own_location + =~ m{^ usr/lib/python [\d.]+ / (?:site|dist)-packages / }x + && $item->dirname =~ m{^ usr/share/pyshared/ }x; + + $self->pointed_hint( + 'incorrect-libdir-in-la-file', + $item->pointer($position), + "$own_location != " . $item->dirname + ) unless $own_location eq $item->dirname; + + } + + if ($line =~ /^ dependency_libs=' (.+) ' $/x){ + + my $prerequisites = $1; + + $self->pointed_hint( + 'non-empty-dependency_libs-in-la-file', + $item->pointer($position), + $prerequisites + ); + } + + } continue { + ++$position; + } + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/BuildSystems/Waf.pm b/lib/Lintian/Check/BuildSystems/Waf.pm new file mode 100644 index 0000000..4825a11 --- /dev/null +++ b/lib/Lintian/Check/BuildSystems/Waf.pm @@ -0,0 +1,87 @@ +# Copyright (C) 1998 Christian Schwarz and Richard Braakman +# Copyright (C) 1999 Joey Hess +# Copyright (C) 2000 Sean 'Shaleh' Perry +# Copyright (C) 2002 Josip Rodin +# Copyright (C) 2007 Russ Allbery +# Copyright (C) 2013-2018 Bastien ROUCARIES +# Copyright (C) 2017-2020 Chris Lamb <lamby@debian.org> +# Copyright (C) 2020-2021 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::BuildSystems::Waf; + +use v5.20; +use warnings; +use utf8; + +use Unicode::UTF8 qw(encode_utf8); + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +sub visit_patched_files { + my ($self, $item) = @_; + + return + unless $item->is_file; + + return + unless $item->basename =~ m{ \b waf $}x; + + return + unless $item->is_open_ok; + + open(my $fd, '<', $item->unpacked_path) + or die encode_utf8('Cannot open ' . $item->unpacked_path); + + my $marker = 0; + + while (my $line = <$fd>) { + + next + unless $line =~ m/^#/; + + if ($marker && $line =~ m/^#BZ[h0][0-9]/) { + + # waf is not allowed + $self->pointed_hint('source-contains-waf-binary', $item->pointer); + last; + } + + $marker = 1 + if $line =~ m/^#==>/; + + # We could probably stop here, but just in case + $marker = 0 + if $line =~ m/^#<==/; + } + + close $fd; + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/ChangesFile.pm b/lib/Lintian/Check/ChangesFile.pm new file mode 100644 index 0000000..617de64 --- /dev/null +++ b/lib/Lintian/Check/ChangesFile.pm @@ -0,0 +1,121 @@ +# changes-file -- lintian check script -*- perl -*- + +# Copyright (C) 1998 Christian Schwarz and Richard Braakman +# Copyright (C) 2017-2019 Chris Lamb <lamby@debian.org> +# +# This program is free software. It is distributed under the terms of +# the GNU General Public License as published by the Free Software +# Foundation; either version 2 of the License, or (at your option) any +# later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::ChangesFile; + +use v5.20; +use warnings; +use utf8; + +use Const::Fast; +use List::Compare; +use List::SomeUtils qw(uniq); +use Path::Tiny; + +use Lintian::Util qw(get_file_checksum); + +const my $NOT_EQUALS => q{!=}; + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +sub changes { + my ($self) = @_; + + my %count_by_algorithm; + + for my $basename (keys %{$self->processable->files}) { + + my $details = $self->processable->files->{$basename}; + + $self->hint('bad-section-in-changes-file', $basename, + $details->{section}) + if $details->{section} eq 'non-free' + || $details->{section} eq 'contrib'; + + # take from location near input file + my $physical_path + = path($self->processable->path)->sibling($basename)->stringify; + my $actual_size = -s $physical_path; + + # check size + $self->hint('file-size-mismatch-in-changes-file', + $basename, $details->{size}, $NOT_EQUALS, $actual_size) + unless $details->{size} == $actual_size; + + for my $algorithm (qw(Md5 Sha1 Sha256)) { + + my $checksum_info = $details->{checksums}{$algorithm}; + next + unless defined $checksum_info; + + $self->hint('file-size-mismatch-in-changes-file', + $basename,$details->{size}, $NOT_EQUALS, + $checksum_info->{filesize}) + unless $details->{size} == $checksum_info->{filesize}; + + my $actual_checksum= get_file_checksum($algorithm, $physical_path); + + $self->hint('checksum-mismatch-in-changes-file', + "Checksum-$algorithm", $basename) + unless $checksum_info->{sum} eq $actual_checksum; + + ++$count_by_algorithm{$algorithm}; + } + } + + my @installables= grep { m{ [.]deb $}x } keys %{$self->processable->files}; + my @installable_names = map { m{^ ([^_]+) _ }x } @installables; + my @stems = uniq map { m{^ (.+) -dbg (?:sym) $}x } @installable_names; + + for my $stem (@stems) { + + my @conflicting = ("$stem-dbg", "$stem-dbgsym"); + + my $lc = List::Compare->new(\@conflicting, \@installable_names); + $self->hint('package-builds-dbg-and-dbgsym-variants', + (sort @conflicting)) + if $lc->is_LsubsetR; + } + + # Check that we have a consistent number of checksums and files + for my $algorithm (keys %count_by_algorithm) { + + my $actual_count = $count_by_algorithm{$algorithm}; + my $expected_count = scalar keys %{$self->processable->files}; + + $self->hint('checksum-count-mismatch-in-changes-file', +"$actual_count Checksum-$algorithm checksums != $expected_count files" + ) if $actual_count != $expected_count; + } + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Conffiles.pm b/lib/Lintian/Check/Conffiles.pm new file mode 100644 index 0000000..076c17f --- /dev/null +++ b/lib/Lintian/Check/Conffiles.pm @@ -0,0 +1,136 @@ +# conffiles -- lintian check script -*- perl -*- + +# Copyright (C) 1998 Christian Schwarz +# Copyright (C) 2000 Sean 'Shaleh' Perry +# Copyright (C) 2017 Chris Lamb <lamby@debian.org> +# Copyright (C) 2021 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Conffiles; + +use v5.20; +use warnings; +use utf8; + +use Const::Fast; +use List::Compare; +use List::SomeUtils qw(any none); +use Path::Tiny; + +const my $SPACE => q{ }; + +const my @KNOWN_INSTRUCTIONS => qw(remove-on-upgrade); + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +sub visit_installed_files { + my ($self, $item) = @_; + + return + if $self->processable->type =~ 'udeb'; + + my $declared_conffiles = $self->processable->declared_conffiles; + + unless ($item->is_file) { + $self->pointed_hint('conffile-has-bad-file-type', $item->pointer) + if $declared_conffiles->is_known($item->name); + return; + } + + # files /etc must be conffiles, with some exceptions). + $self->pointed_hint('file-in-etc-not-marked-as-conffile',$item->pointer) + if $item->name =~ m{^etc/} + && !$declared_conffiles->is_known($item->name) + && $item->name !~ m{/README$} + && $item->name !~ m{^ etc/init[.]d/ (?: skeleton | rc S? ) $}x; + + return; +} + +sub binary { + my ($self) = @_; + + my $declared_conffiles = $self->processable->declared_conffiles; + for my $relative ($declared_conffiles->all) { + + my $item = $self->processable->conffiles_item; + + my @entries = @{$declared_conffiles->by_file->{$relative}}; + + my @positions = map { $_->position } @entries; + my $lines = join($SPACE, (sort { $a <=> $b } @positions)); + + $self->pointed_hint('duplicate-conffile', $item->pointer, + $relative, "(lines $lines)") + if @entries > 1; + + for my $entry (@entries) { + + my $conffiles_item = $self->processable->conffiles_item; + my $pointer = $conffiles_item->pointer($entry->position); + + $self->pointed_hint('relative-conffile', $pointer,$relative) + if $entry->is_relative; + + $self->pointed_hint('file-in-etc-rc.d-marked-as-conffile', + $pointer, $relative) + if $relative =~ m{^etc/rc.\.d/}; + + $self->pointed_hint('file-in-usr-marked-as-conffile', + $pointer, $relative) + if $relative =~ m{^usr/}; + + $self->pointed_hint('non-etc-file-marked-as-conffile', + $pointer, $relative) + unless $relative =~ m{^etc/}; + + my @instructions = @{$entry->instructions}; + + my $instruction_lc + = List::Compare->new(\@instructions, \@KNOWN_INSTRUCTIONS); + my @unknown = $instruction_lc->get_Lonly; + + $self->pointed_hint('unknown-conffile-instruction', $pointer, $_) + for @unknown; + + my $should_exist= none { $_ eq 'remove-on-upgrade' } @instructions; + my $may_not_exist= any { $_ eq 'remove-on-upgrade' } @instructions; + + my $shipped = $self->processable->installed->lookup($relative); + + $self->pointed_hint('missing-conffile', $pointer, $relative) + if $should_exist && !defined $shipped; + + $self->pointed_hint('unexpected-conffile', $pointer, $relative) + if $may_not_exist && defined $shipped; + } + } + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/ContinuousIntegration/Salsa.pm b/lib/Lintian/Check/ContinuousIntegration/Salsa.pm new file mode 100644 index 0000000..3faa978 --- /dev/null +++ b/lib/Lintian/Check/ContinuousIntegration/Salsa.pm @@ -0,0 +1,103 @@ +# continuous-integration/salsa -- lintian check script -*- perl -*- + +# Copyright (C) 2020 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::ContinuousIntegration::Salsa; + +use v5.20; +use warnings; +use utf8; + +use Data::DPath qw(dpath); +use List::SomeUtils qw(any); +use Scalar::Util qw(reftype); +use YAML::XS qw(LoadFile); + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +# ci is configured in gitlab and can be located anywere +# https://salsa.debian.org/salsa-ci-team/pipeline/-/issues/86 +my @KNOWN_LOCATIONS = qw( + debian/salsa-ci.yml + debian/gitlab-ci.yml + gitlab-ci.yml + .gitlab-ci.yml +); + +sub visit_patched_files { + my ($self, $item) = @_; + + return + unless $item->is_file; + + return + unless any { $item->name eq $_ } @KNOWN_LOCATIONS; + + $self->pointed_hint('specification', $item->pointer); + + return + unless $item->is_open_ok; + + my $yaml = LoadFile($item->unpacked_path); + return + unless defined $yaml; + +# traditionally examined via codesearch +# https://codesearch.debian.net/search?q=salsa-ci-team%2Fpipeline%2Fraw%2Fmaster%2Fsalsa-ci.yml&literal=1 + my @items = dpath('//include')->match($yaml); + + my @includes; + for my $item (@items) { + + my $item_type = reftype $item; + + if (!length $item_type) { + push(@includes, $item); + + } elsif ($item_type eq 'ARRAY') { + for my $element (@{$item}) { + + my $element_type = reftype $element; + if (!length $element_type) { + push(@includes, $element); + + } elsif ($element_type eq 'HASH') { + # new Gitlab style with desciptors + push(@includes, $element->{file}) + if exists $element->{file}; + } + } + } + } + + $self->pointed_hint('include', $item->pointer, $_) for @includes; + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/ControlFiles.pm b/lib/Lintian/Check/ControlFiles.pm new file mode 100644 index 0000000..d0c44a2 --- /dev/null +++ b/lib/Lintian/Check/ControlFiles.pm @@ -0,0 +1,132 @@ +# control-files -- lintian check script -*- perl -*- + +# Copyright (C) 1998 Christian Schwarz and Richard Braakman +# Copyright (C) 2017 Chris Lamb <lamby@debian.org> +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::ControlFiles; + +use v5.20; +use warnings; +use utf8; + +use Const::Fast; + +const my $SPACE => q{ }; +const my $SLASH => q{/}; + +const my $WIDELY_EXECUTABLE => oct(111); + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +has ships_ctrl_script => (is => 'rw', default => 0); + +sub visit_control_files { + my ($self, $item) = @_; + + my $type = $self->processable->type; + my $processable = $self->processable; + + my $DEB_PERMISSIONS + = $self->data->load('control-files/deb-permissions',qr/\s+/); + my $UDEB_PERMISSIONS + = $self->data->load('control-files/udeb-permissions',qr/\s+/); + + my $ctrl = $type eq 'udeb' ? $UDEB_PERMISSIONS : $DEB_PERMISSIONS; + my $ctrl_alt = $type eq 'udeb' ? $DEB_PERMISSIONS : $UDEB_PERMISSIONS; + + # the control.tar.gz should only contain files (and the "root" + # dir, but that is excluded from the index) + if (!$item->is_regular_file) { + + $self->pointed_hint('control-file-is-not-a-file', $item->pointer); + # Doing further checks is probably not going to yield anything + # remotely useful. + return; + } + + # valid control file? + unless ($ctrl->recognizes($item->name)) { + + if ($ctrl_alt->recognizes($item->name)) { + $self->pointed_hint('not-allowed-control-file', $item->pointer); + + } else { + $self->pointed_hint('unknown-control-file', $item->pointer); + } + + return; + } + + my $experm = oct($ctrl->value($item->name)); + + $self->pointed_hint('control-file-is-empty', $item->pointer) + if $item->size == 0 + && $item->basename ne 'md5sums'; + + # skip `control' control file (that's an exception: dpkg + # doesn't care and this file isn't installed on the systems + # anyways) + return + if $item->name eq 'control'; + + my $operm = $item->operm; + if ($item->is_executable || $experm & $WIDELY_EXECUTABLE) { + + $self->ships_ctrl_script(1); + $self->pointed_hint('ctrl-script', $item->pointer); + } + + # correct permissions? + unless ($operm == $experm) { + + $self->pointed_hint('control-file-has-bad-permissions', + $item->pointer,sprintf('%04o != %04o', $operm, $experm)); + } + + # correct owner? + unless ($item->identity eq 'root/root' || $item->identity eq '0/0') { + + $self->pointed_hint('control-file-has-bad-owner',$item->pointer, + $item->identity,'!= root/root (or 0/0)'); + } + + # for other maintainer scripts checks, see the scripts check + + return; +} + +sub installable { + my ($self) = @_; + + $self->hint('no-ctrl-scripts') + unless $self->ships_ctrl_script; + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Cron.pm b/lib/Lintian/Check/Cron.pm new file mode 100644 index 0000000..cca2420 --- /dev/null +++ b/lib/Lintian/Check/Cron.pm @@ -0,0 +1,67 @@ +# cron -- lintian check script -*- perl -*- + +# Copyright (C) 1998 Christian Schwarz and Richard Braakman +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Cron; + +use v5.20; +use warnings; +use utf8; + +use Const::Fast; + +const my $READ_WRITE_PERMISSIONS => oct(644); + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +sub visit_installed_files { + my ($self, $item) = @_; + + return + unless $item->name =~ m{^ etc/cron }x; + + # /etc/cron.daily, etc. + # NB: cron ships ".placeholder" files, which shouldn't be run. + $self->pointed_hint('run-parts-cron-filename-contains-illegal-chars', + $item->pointer) + if $item->name + =~ m{^ etc/cron[.] (?: daily | hourly | monthly | weekly |d ) / [^.] .* [+.] }x; + + # /etc/cron.d + # NB: cron ships ".placeholder" files in etc/cron.d, + # which we shouldn't tag. + $self->pointed_hint('bad-permissions-for-etc-cron.d-script', + $item->pointer, + sprintf('%04o != %04o', $item->operm, $READ_WRITE_PERMISSIONS)) + if $item->name =~ m{ ^ etc/cron\.d/ [^.] }msx + && $item->operm != $READ_WRITE_PERMISSIONS; + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Cruft.pm b/lib/Lintian/Check/Cruft.pm new file mode 100644 index 0000000..9f3efeb --- /dev/null +++ b/lib/Lintian/Check/Cruft.pm @@ -0,0 +1,836 @@ +# cruft -- lintian check script -*- perl -*- +# +# based on debhelper check, +# Copyright (C) 1999 Joey Hess +# Copyright (C) 2000 Sean 'Shaleh' Perry +# Copyright (C) 2002 Josip Rodin +# Copyright (C) 2007 Russ Allbery +# Copyright (C) 2013-2018 Bastien ROUCARIES +# Copyright (C) 2017-2020 Chris Lamb <lamby@debian.org> +# Copyright (C) 2020-2021 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Cruft; + +use v5.20; +use warnings; +use utf8; + +use Const::Fast; +use List::SomeUtils qw(any none); + +const my $EMPTY => q{}; +const my $ASTERISK => q{*}; +const my $DOT => q{.}; + +const my $ITEM_NOT_FOUND => -1; + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +# Half of the size used in the "sliding window" for detecting bad +# licenses like GFDL with invariant sections. +# NB: Keep in sync cruft-gfdl-fp-sliding-win/pre_build. +# not less than 8192 for source missing +use constant BLOCKSIZE => 16_384; +use Lintian::SlidingWindow; + +my %NVIDIA_LICENSE = ( + keywords => [qw{license intellectual retain property}], + sentences =>[ +'retain all intellectual property and proprietary rights in and to this software and related documentation' + ] +); + +my %NON_FREE_LICENSES = ( +# first field is tag +# second field is a list of keywords in lower case +# third field are lower case sentences to match the license. Notes that space are normalized before and formatting removed +# fourth field is a regex to use to match the license, use lower case and [ ] for space. +# 5th field is a function to call if the field 2th to 5th match. +# (see dispatch table %LICENSE_CHECK_DISPATCH_TABLE + + # json license + 'license-problem-json-evil' => { + keywords => [qw{software evil good}], + sentences => ['software shall be used for good'], + regex => +qr{software [ ] shall [ ] be [ ] used [ ] for [ ] good [ ]? ,? [ ]? not [ ] evil}msx + }, + # non free RFC old version + 'license-problem-non-free-RFC' => { + keywords => [qw{document purpose translate language}], + sentences => ['this document itself may not be modified in any way'], + regex => +qr{this [ ] document [ ] itself [ ] may [ ] not [ ] be [ ] modified [ ] in [ ] any [ ] way [ ]?, + [ ]? such [ ] as [ ] by [ ] removing [ ] the [ ] copyright [ ] notice [ ] or [ ] references + [ ] to [ ] .{0,256} [ ]? except [ ] as [ ] needed [ ] for [ ] the [ ] purpose [ ] of [ ] developing + [ ] .{0,128} [ ]? in [ ] which [ ] case [ ] the [ ] procedures [ ] for [ ] copyrights [ ] defined + [ ] in [ ] the [ ] .{0,128} [ ]? process [ ] must [ ] be [ ] followed[ ]?,[ ]? + or [ ] as [ ] required [ ] to [ ] translate [ ] it [ ] into [ ] languages [ ]}msx, + callsub => 'rfc_whitelist_filename' + }, + 'license-problem-non-free-RFC-BCP78' => { + keywords => [qw{license document bcp restriction}], + sentences => ['bcp 78'], + regex => +qr{this [ ] document [ ] is [ ] subject [ ] to [ ] (?:the [ ] rights [ ]?, [ ] licenses [ ] and [ ]restrictions [ ] contained [ ] in [ ])? bcp [ ] 78}msx, + callsub => 'rfc_whitelist_filename' + }, +# check GFDL block - The ".{0,1024}"-part in the regex +# will contain the "no invariants etc." part if +# it is a good use of the license. We include it +# here to ensure that we do not emit a false positive +# if the "redeeming" part is in the next block +# keyword document is here in order to benefit for other license keyword and a shortcut for documentation + 'license-problem-gfdl-invariants' => { + keywords => [qw{license document gnu copy documentation}], + sentences => ['gnu free documentation license'], + regex => +qr{(?'rawcontextbefore'(?:(?:(?!a [ ] copy [ ] of [ ] the [ ] license [ ] is).){1024}| +\A(?:(?!a [ ] copy [ ] of [ ] the [ ] license [ ] is).){0,1024}| +(?:[ ] copy [ ] of [ ] the [ ] license [ ] is.{0,1024}?))) gnu [ ] free [ ] +documentation [ ] license (?'rawgfdlsections'(?:(?!gnu [ ] free [ ] documentation +[ ] license).){0,1024}?) (?:a [ ] copy [ ] of [ ] the [ ] license [ ] is| +this [ ] document [ ] is [ ] distributed)}msx, + callsub => 'check_gfdl_license_problem' + }, + # php license + 'license-problem-php-license' => { + keywords => [qw{www.php.net group\@php.net phpfoo conjunction php}], + sentences => ['this product includes php'], + regex => qr{php [ ] license [ ]?[,;][ ]? version [ ] 3(?:\.\d+)?}msx, + callsub => 'php_source_whitelist' + }, + 'license-problem-bad-php-license' => { + keywords => [qw{www.php.net add-on conjunction}], + sentences => ['this product includes php'], + regex => qr{php [ ] license [ ]?[,;][ ]? version [ ] 2(?:\.\d+)?}msx, + callsub => 'php_source_whitelist' + }, + # cc by nc sa note that " is replaced by [ ] + 'license-problem-cc-by-nc-sa' => { + keywords => [qw{license by-nc-sa creativecommons.org}], + sentences => [ + '://creativecommons.org/licenses/by-nc-sa', + 'under attribution-noncommercial' + ], + regex => +qr{(?:license [ ] rdf:[^=:]+=[ ]* (?:ht|f)tps?://(?:[^/.]\.)??creativecommons\.org/licenses/by-nc-sa/\d+(?:\.\d+)?(?:/[[:alpha:]]+)?/? [ ]* >|available [ ] under [ ] attribution-noncommercial)}msx + }, + # not really a license but warn it: visual c++ generated file + 'source-contains-autogenerated-visual-c++-file' => { + keywords => [qw{microsoft visual generated}], + sentences => ['microsoft visual c++ generated'], + regex => +qr{microsoft [ ] visual [ ] c[+][+] [ ] generated (?![ ] by [ ] freeze\.py)}msx + }, + # not really a license but warn about it: gperf generated file + 'source-contains-autogenerated-gperf-data' => { + keywords => [qw{code produced gperf version}], + sentences => ['code produced by gperf version'], + regex => + qr{code [ ] produced [ ] by [ ] gperf [ ] version [ ] \d+\.\d+}msx + }, + # warn about copy of ieee-data + 'source-contains-data-from-ieee-data-oui-db' => { + keywords => [qw{struck scitex racore}], + sentences => ['dr. b. struck'], + regex => qr{dr. [ ] b. [ ] struck}msx + }, + # warn about unicode license for utf for convert utf + 'license-problem-convert-utf-code' => { + keywords => [qw{fall-through bytestowrite utf-8}], + sentences => ['the fall-through switches in utf-8 reading'], + regex => +qr{the [ ] fall-through [ ] switches [ ] in [ ] utf-8 [ ] reading [ ] code [ ] save}msx + } +); + +# get usual data about admissible/not admissible GFDL invariant part of license +has GFDL_FRAGMENTS => ( + is => 'rw', + lazy => 1, + default => sub { + my ($self) = @_; + + my %gfdl_fragments; + + my $data = $self->data->load('cruft/gfdl-license-fragments-checks', + qr/\s*\~\~\s*/); + + for my $gfdlsectionsregex ($data->all) { + + my $secondpart = $data->value($gfdlsectionsregex); + + # allow empty parameters + $secondpart //= $EMPTY; + my ($acceptonlyinfile,$applytag) + = split(/\s*\~\~\s*/, $secondpart, 2); + + $acceptonlyinfile //= $EMPTY; + $applytag //= $EMPTY; + + # trim both ends + $acceptonlyinfile =~ s/^\s+|\s+$//g; + $applytag =~ s/^\s+|\s+$//g; + + # accept all files if empty + $acceptonlyinfile ||= $DOT . $ASTERISK; + + my %ret = ( + 'gfdlsectionsregex' => qr/$gfdlsectionsregex/xis, + 'acceptonlyinfile' => qr/$acceptonlyinfile/xs, + ); + + $ret{'tag'} = $applytag + if length $applytag; + + $gfdl_fragments{$gfdlsectionsregex} = \%ret; + } + + return \%gfdl_fragments; + } +); + +sub visit_patched_files { + my ($self, $item) = @_; + + return + unless $item->is_file; + + # license string in debian/changelog are probably just change + # Ignore these strings in d/README.{Debian,source}. If they + # appear there it is probably just "file XXX got removed + # because of license Y". + $self->full_text_check($item) + unless $item->name eq 'debian/changelog' + && $item->name eq 'debian/README.Debian' + && $item->name eq 'debian/README.source'; + + return; +} + +# do basic license check against well known offender +# note that it does not replace licensecheck(1) +# and is only used for autoreject by ftp-master +sub full_text_check { + my ($self, $item) = @_; + + return undef + unless $item ->is_regular_file; + + open(my $fd, '<:raw', $item->unpacked_path) + or die encode_utf8('Cannot open ' . $item->unpacked_path); + + my $sfd = Lintian::SlidingWindow->new; + $sfd->handle($fd); + $sfd->blocksize(BLOCKSIZE); + $sfd->blocksub(sub { $_ = lc; }); + + unless (-T $fd) { + close($fd); + return undef; + } + + # we try to read this file in block and use a sliding window + # for efficiency. We store two blocks in @queue and the whole + # string to match in $block. Please emit license tags only once + # per file + BLOCK: + while (my $lowercase = $sfd->readwindow()) { + + my $blocknumber = $sfd->blocknumber(); + + my $clean = clean_text($lowercase); + + # Check for non-distributable files - this + # applies even to non-free, as we still need + # permission to distribute those. + # nvdia opencv infamous license + last BLOCK + if $self->check_for_single_bad_license($item, $lowercase, $clean, + 'license-problem-nvidia-intellectual', + \%NVIDIA_LICENSE); + + unless ($self->processable->is_non_free) { + + for my $tag_name (keys %NON_FREE_LICENSES) { + + last BLOCK + if $self->check_for_single_bad_license($item, $lowercase, + $clean,$tag_name, $NON_FREE_LICENSES{$tag_name}); + } + } + + # check javascript in html file + if ($item->basename =~ /\.(?:x?html?\d?|xht)$/i) { + + my $blockscript = $lowercase; + my $indexscript; + + while (($indexscript = index($blockscript, '<script')) + > $ITEM_NOT_FOUND){ + + $blockscript = substr($blockscript,$indexscript); + + # sourced script ok + if ($blockscript =~ m{\A<script\s+[^>]*?src="[^"]+?"[^>]*?>}sm) + { + + $blockscript = substr($blockscript,$+[0]); + next; + } + + # extract script + if ($blockscript =~ m{<script[^>]*?>(.*?)</script>}sm) { + + $blockscript = substr($blockscript,$+[0]); + + my $lcscript = $1; + + # check if js script is minified + my $firstline = $EMPTY; + for my $line (split /\n/, $lcscript) { + + if ($line =~ /^\s*$/) { + next; + + } else { + $firstline = $line; + last; + } + } + + if ($firstline + =~ m/.{0,20}((?:\bcopyright\b|[\(]c[\)]\s*\w|\N{COPYRIGHT SIGN}).{0,50})/ + ){ + + my $extract = $1; + $extract =~ s/^\s+|\s+$//g; + + $self->pointed_hint( + 'embedded-script-includes-copyright-statement', + $item->pointer, + 'extract of copyright statement:', + $extract + ); + } + + # clean up jslint craps line + my $cleaned = $lcscript; + $cleaned =~ s{^\s*/[*][^\n]*[*]/\s*$}{}gm; + $cleaned =~ s{^\s*//[^\n]*$}{}gm; + $cleaned =~ s/^\s+//gm; + + # strip indentation + $cleaned =~ s/^\s+//mg; + $cleaned = _strip_c_comments($cleaned); + # strip empty line + $cleaned =~ s/^\s*\n//mg; + # remove last \n + $cleaned =~ s/\n\Z//m; + +# detect browserified javascript (comment are removed here and code is stripped) + my $contiguous = $cleaned; + $contiguous =~ s/\n/ /msg; + + # get browserified regexp + my $BROWSERIFY_REGEX + = $self->data->load('cruft/browserify-regex', + qr/\s*\~\~\s*/); + + for my $condition ($BROWSERIFY_REGEX->all) { + + my $pattern = $BROWSERIFY_REGEX->value($condition); + if ($contiguous =~ m{$pattern}msx) { + + my $extra + = (defined $1) ? 'code fragment:'.$1 : $EMPTY; + $self->pointed_hint( + 'source-contains-browserified-javascript', + $item->pointer, $extra); + + last; + } + } + + next; + } + + last; + } + } + + # check if file is javascript but not minified + my $isjsfile = ($item->name =~ m/\.js$/) ? 1 : 0; + if ($isjsfile) { + my $minjsregexp + = qr/(?i)[-._](?:compiled|compressed|lite|min|pack(?:ed)?|prod|umd|yc)\.js$/; + $isjsfile = ($item->name =~ m{$minjsregexp}) ? 0 : 1; + } + + if ($isjsfile) { + # exception sphinx documentation + if ($item->basename eq 'searchindex.js') { + if ($lowercase =~ m/\A\s*search\.setindex\s* \s* \(\s*\{/xms) { + + $self->pointed_hint( + 'source-contains-prebuilt-sphinx-documentation', + $item->parent_dir->pointer); + last BLOCK; + } + } + + if ($item->basename eq 'search_index.js') { + if ($lowercase =~ m/\A\s*var\s*search_index\s*=/xms) { + + $self->pointed_hint( + 'source-contains-prebuilt-pandoc-documentation', + $item->parent_dir->pointer); + last BLOCK; + } + } + # false positive in dx package at least + elsif ($item->basename eq 'srchidx.js') { + + last BLOCK + if $lowercase + =~ m/\A\s*profiles \s* = \s* new \s* Array\s*\(/xms; + } + # https://github.com/rafaelp/css_browser_selector is actually the + # original source. (#874381) + elsif ($lowercase =~ m/css_browser_selector\(/) { + + last BLOCK; + } + # Avoid false-positives in Jush's syntax highlighting definition files. + elsif ($lowercase =~ m/jush\.tr\./) { + + last BLOCK; + } + + # now search hidden minified + + # clean up jslint craps line + my $cleaned = $lowercase; + $cleaned =~ s{^\s*/[*][^\n]*[*]/\s*$}{}gm; + $cleaned =~ s{^\s*//[^\n]*$}{}gm; + $cleaned =~ s/^\s+//gm; + + # strip indentation + $cleaned =~ s/^\s+//mg; + $cleaned = _strip_c_comments($cleaned); + # strip empty line + $cleaned =~ s/^\s*\n//mg; + # remove last \n + $cleaned =~ s/\n\Z//m; + +# detect browserified javascript (comment are removed here and code is stripped) + my $contiguous = $cleaned; + $contiguous =~ s/\n/ /msg; + + # get browserified regexp + my $BROWSERIFY_REGEX + = $self->data->load('cruft/browserify-regex',qr/\s*\~\~\s*/); + + for my $condition ($BROWSERIFY_REGEX->all) { + + my $pattern = $BROWSERIFY_REGEX->value($condition); + if ($contiguous =~ m{$pattern}msx) { + + my $extra = (defined $1) ? 'code fragment:'.$1 : $EMPTY; + $self->pointed_hint( + 'source-contains-browserified-javascript', + $item->pointer, $extra); + + last; + } + } + } + + # search link rel header + if ($lowercase =~ / \Q rel="copyright" \E /msx) { + + my $href = $lowercase; + $href =~ m{<link \s+ + rel="copyright" \s+ + href="([^"]+)" \s*/? \s*>}xmsi; + + my $url = $1 // $EMPTY; + + $self->pointed_hint('license-problem-cc-by-nc-sa', $item->pointer) + if $url =~ m{^https?://creativecommons.org/licenses/by-nc-sa/}; + } + last BLOCK; + } + return close($fd); +} + +# strip C comment +# warning block is at more 8192 char in order to be too slow +# and in order to avoid regex recursion +sub _strip_c_comments { + my ($lowercase) = @_; + + # from perl faq strip comments + $lowercase =~ s{ + # Strip /* */ comments + /\* [^*]*+ \*++ (?: [^/*][^*]*+\*++ ) */ + # Strip // comments (C++ style) + | // (?: [^\\] | [^\n][\n]? )*? (?=\n) + | ( + # Keep "/* */" (etc) as is + "(?: \\. | [^"\\]++)*" + # Keep '/**/' (etc) as is + | '(?: \\. | [^'\\]++)*' + # Keep anything else + | .[^/"'\\]*+ + ) + }{defined $1 ? $1 : ""}xgse; + + return $lowercase; +} + +# return True in case of license problem +sub check_gfdl_license_problem { + my ($self, $item, $tag_name, %matchedhash) = @_; + + my $rawgfdlsections = $matchedhash{rawgfdlsections} || $EMPTY; + my $rawcontextbefore = $matchedhash{rawcontextbefore} || $EMPTY; + + # strip punctuation + my $gfdlsections = _strip_punct($rawgfdlsections); + my $contextbefore = _strip_punct($rawcontextbefore); + + # remove line number at beginning of line + # see krusader/1:2.4.0~beta3-2/doc/en_US/advanced-functions.docbook/ + $gfdlsections =~ s{[ ]\d+[ ]}{ }gxsmo; + $gfdlsections =~ s{^\d+[ ]}{ }xsmo; + $gfdlsections =~ s{[ ]\d+$}{ }xsmo; + $gfdlsections =~ s{[ ]+}{ }xsmo; + + # remove classical and without meaning part of + # matched string + my $oldgfdlsections; + do { + $oldgfdlsections = $gfdlsections; + $gfdlsections =~ s{ \A \(?[ ]? g?fdl [ ]?\)?[ ]? [,\.;]?[ ]?}{}xsmo; + $gfdlsections =~ s{ \A (?:either[ ])? + version [ ] \d+(?:\.\d+)? [ ]?}{}xsmo; + $gfdlsections =~ s{ \A of [ ] the [ ] license [ ]?[,\.;][ ]?}{}xsmo; + $gfdlsections=~ s{ \A or (?:[ ]\(?[ ]? at [ ] your [ ] option [ ]?\)?)? + [ ] any [ ] later [ ] version[ ]?}{}xsmo; + $gfdlsections =~ s{ \A (as[ ])? published [ ] by [ ] + the [ ] free [ ] software [ ] foundation[ ]?}{}xsmo; + $gfdlsections =~ s{\(?[ ]? fsf [ ]?\)?[ ]?}{}xsmo; + $gfdlsections =~ s{\A [ ]? [,\.;]? [ ]?}{}xsmo; + $gfdlsections =~ s{[ ]? [,\.]? [ ]?\Z}{}xsmo; + } while ($oldgfdlsections ne $gfdlsections); + + $contextbefore =~ s{ + [ ]? (:?[,\.;]? [ ]?)? + permission [ ] is [ ] granted [ ] to [ ] copy [ ]?[,\.;]?[ ]? + distribute [ ]?[,\.;]?[ ]? and[ ]?/?[ ]?or [ ] modify [ ] + this [ ] document [ ] under [ ] the [ ] terms [ ] of [ ] the\Z}{}xsmo; + + # Treat ambiguous empty text + if ($gfdlsections eq $EMPTY) { + + # lie in order to check more part + $self->pointed_hint('license-problem-gfdl-invariants-empty', + $item->pointer); + + return 0; + } + + # official wording + if( + $gfdlsections =~ m{\A + with [ ] no [ ] invariant [ ] sections[ ]?, + [ ]? no [ ] front(?:[ ]?-[ ]?|[ ])cover [ ] texts[ ]?,? + [ ]? and [ ] no [ ] back(?:[ ]?-?[ ]?|[ ])cover [ ] texts + \Z}xs + ) { + return 0; + } + + # example are ok + if ( + $contextbefore =~ m{following [ ] is [ ] an [ ] example + (:?[ ] of [ ] the [ ] license [ ] notice [ ] to [ ] use + (?:[ ] after [ ] the [ ] copyright [ ] (?:line(?:\(s\)|s)?)? + (?:[ ] using [ ] all [ ] the [ ] features? [ ] of [ ] the [ ] gfdl)? + )? + )? [ ]? [,:]? \Z}xs + ){ + return 0; + } + + # GFDL license, assume it is bad unless it + # explicitly states it has no "bad sections". + for my $gfdl_fragment (keys %{$self->GFDL_FRAGMENTS}) { + + my $gfdl_data = $self->GFDL_FRAGMENTS->{$gfdl_fragment}; + my $gfdlsectionsregex = $gfdl_data->{'gfdlsectionsregex'}; + if ($gfdlsections =~ m{$gfdlsectionsregex}) { + + my $acceptonlyinfile = $gfdl_data->{'acceptonlyinfile'}; + if ($item->name =~ m{$acceptonlyinfile}) { + + my $applytag = $gfdl_data->{'tag'}; + + # lie will allow checking more blocks + $self->pointed_hint($applytag, $item->pointer, + 'invariant part is:', + $gfdlsections) + if defined $applytag; + + return 0; + + } else { + $self->pointed_hint( + 'license-problem-gfdl-invariants', + $item->pointer,'invariant part is:', + $gfdlsections + ); + return 1; + } + } + } + + # catch all + $self->pointed_hint( + 'license-problem-gfdl-invariants', + $item->pointer,'invariant part is:', + $gfdlsections + ); + + return 1; +} + +sub rfc_whitelist_filename { + my ($self, $item, $tag_name, %matchedhash) = @_; + + return 0 + if $item->name eq 'debian/copyright'; + + my $lcname = lc($item->basename); + + # prebuilt-file or forbidden file type + # specified separator protects against spaces in pattern + my $RFC_WHITELIST= $self->data->load('cruft/rfc-whitelist',qr/\s*\~\~\s*/); + + my @patterns = $RFC_WHITELIST->all; + + return 0 + if any { $lcname =~ m/ $_ /xms } @patterns; + + $self->pointed_hint($tag_name, $item->pointer); + + return 1; +} + +sub php_source_whitelist { + my ($self, $item, $tag_name, %matchedhash) = @_; + + my $copyright_path + = $self->processable->patched->resolve_path('debian/copyright'); + + return 0 + if defined $copyright_path + && $copyright_path->bytes + =~ m{^Source: https?://pecl.php.net/package/.*$}m; + + return 0 + if $self->processable->source_name =~ /^php\d*(?:\.\d+)?$/xms; + + $self->pointed_hint($tag_name, $item->pointer); + + return 1; +} + +sub clean_text { + my ($text) = @_; + + # be paranoiac replace gnu with texinfo by gnu + $text =~ s{ + (?:@[[:alpha:]]*?\{)?\s*gnu\s*\} # Texinfo cmd + }{ gnu }gxms; + + # pod2man formatting + $text =~ s{ \\ \* \( [LR] \" }{\"}gxsm; + $text =~ s{ \\ -}{-}gxsm; + + # replace some shortcut (clisp) + $text =~ s{\(&fdl;\)}{ }gxsm; + $text =~ s{&fsf;}{free software foundation}gxsm; + + # non breaking space + $text =~ s{ }{ }gxsm; + + # replace some common comment-marker/markup with space + $text =~ s{^\.\\\"}{ }gxms; # man comments + + # po comment may include html tag + $text =~ s/\"\s?\v\#~\s?\"//gxms; + + # strip .rtf paragraph marks (#892967) + $text =~ s/\\par\b//gxms; + + $text =~ s/\\url[{][^}]*?[}]/ /gxms; # (la)?tex url + $text =~ s/\\emph[{]/ /gxms; # (la)?tex emph + $text =~ s<\\href[{][^}]*?[}] + [{]([^}]*?)[}]>< $1 >gxms;# (la)?tex href + $text =~ s<\\hyperlink + [{][^}]*?[}] + [{]([^}]*?)[}]>< $1 >gxms; # (la)?tex hyperlink + $text =~ s{-\\/}{-}gxms; # tex strange hyphen + $text =~ s/\\char/ /gxms; # tex char command + + # Texinfo comment with end section + $text =~ s{\@c(?:omment)?\h+ + end \h+ ifman\s+}{ }gxms; + $text =~ s{\@c(?:omment)?\s+ + noman\s+}{ }gxms; # Texinfo comment no manual + + $text =~ s/\@c(?:omment)?\s+/ /gxms; # Texinfo comment + + # Texinfo bold,italic, roman, fixed width + $text =~ s/\@[birt][{]/ /gxms; + $text =~ s/\@sansserif[{]/ /gxms; # Texinfo sans serif + $text =~ s/\@slanted[{]/ /gxms; # Texinfo slanted + $text =~ s/\@var[{]/ /gxms; # Texinfo emphasis + + $text =~ s/\@(?:small)?example\s+/ /gxms; # Texinfo example + $text =~ s{\@end \h+ + (?:small)example\s+}{ }gxms; # Texinfo end example tag + $text =~ s/\@group\s+/ /gxms; # Texinfo group + $text =~ s/\@end\h+group\s+/ /gxms; # Texinfo end group + + $text =~ s/<!--/ /gxms; # XML comments + $text =~ s/-->/ /gxms; # end XML comment + + $text =~ s{</?a[^>]*?>}{ }gxms; # a link + $text =~ s{<br\s*/?>}{ }gxms; # (X)?HTML line + # breaks + $text =~ s{</?citetitle[^>]*?>}{ }gxms; # DocBook citation title + $text =~ s{</?div[^>]*?>}{ }gxms; # html style + $text =~ s{</?font[^>]*?>}{ }gxms; # bold + $text =~ s{</?b[^>]*?>}{ }gxms; # italic + $text =~ s{</?i[^>]*?>}{ }gxms; # italic + $text =~ s{</?link[^>]*?>}{ }gxms; # xml link + $text =~ s{</?p[^>]*?>}{ }gxms; # html paragraph + $text =~ s{</?quote[^>]*?>}{ }gxms; # xml quote + $text =~ s{</?span[^>]*?>}{ }gxms; # span tag + $text =~ s{</?ulink[^>]*?>}{ }gxms; # ulink DocBook + $text =~ s{</?var[^>]*?>}{ }gxms; # var used by texinfo2html + + $text =~ s{\&[lr]dquo;}{ }gxms; # html rquote + + $text =~ s{\(\*note.*?::\)}{ }gxms; # info file note + + # String array (e.g. "line1",\n"line2") + $text =~ s/\"\s*,/ /gxms; + # String array (e.g. "line1"\n ,"line2"), + $text =~ s/,\s*\"/ /gxms; + $text =~ s/\\n/ /gxms; # Verbatim \n in string array + + $text =~ s/\\&/ /gxms; # pod2man formatting + $text =~ s/\\s(?:0|-1)/ /gxms; # pod2man formatting + + $text =~ s/(?:``|'')/ /gxms; # quote like + + # diff/patch lines (should be after html tag) + $text =~ s/^[-\+!<>]/ /gxms; + $text =~ s{\@\@ \s* + [-+] \d+,\d+ \s+ + [-+] \d+,\d+ \s* + \@\@}{ }gxms; # patch line + + # Texinfo end tag (could be more clever but brute force is fast) + $text =~ s/}/ /gxms; + # Tex section titles + $text =~ s/^\s*\\(sub)*section\*?\{\s*\S+/ /gxms; + # single char at end + # String, C-style comment/javadoc indent, + # quotes for strings, pipe and backslash, tilde in some txt + $text =~ s/[%\*\"\|\\\#~]/ /gxms; + # delete double spacing now and normalize spacing + # to space character + $text =~ s{\s++}{ }gsm; + + # trim both ends + $text =~ s/^\s+|\s+$//g; + + return $text; +} + +# do not use space around punctuation +sub _strip_punct() { + my ($text) = @_; + # replace final punctuation + $text =~ s{(?: + \s*[,\.;]\s*\Z | # final punctuation + \A\s*[,\.;]\s* # punctuation at the beginning + )}{ }gxms; + + # delete double spacing now and normalize spacing + # to space character + $text =~ s{\s++}{ }gsm; + + # trim both ends + $text =~ s/^\s+|\s+$//g; + + return $text; +} + +sub check_for_single_bad_license { + my ($self, $item, $lowercase, $clean, $tag_name, $license_data) = @_; + + # do fast keyword search + # could make more sense as 'return 1 unless all' but does not work + return 0 + if none { $lowercase =~ / \Q$_\E /msx } @{$license_data->{keywords}}; + + return 0 + if none { $clean =~ / \Q$_\E /msx }@{$license_data->{sentences}}; + + my $regex = $license_data->{regex}; + return 0 + if defined $regex && $clean !~ $regex; + + my $callsub = $license_data->{callsub}; + if (!defined $callsub) { + + $self->pointed_hint($tag_name, $item->pointer); + return 1; + } + + return $self->$callsub($item, $tag_name, %+); +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/DebFormat.pm b/lib/Lintian/Check/DebFormat.pm new file mode 100644 index 0000000..57c57a4 --- /dev/null +++ b/lib/Lintian/Check/DebFormat.pm @@ -0,0 +1,227 @@ +# deb-format -- lintian check script -*- perl -*- + +# Copyright (C) 2009 Russ Allbery +# Copyright (C) 2018 Chris Lamb <lamby@debian.org> +# +# This program is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by the Free +# Software Foundation; either version 2 of the License, or (at your option) +# any later version. +# +# This program is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +# more details. +# +# You should have received a copy of the GNU General Public License along with +# this program. If not, see <http://www.gnu.org/licenses/>. + +package Lintian::Check::DebFormat; + +use v5.20; +use warnings; +use utf8; + +use Const::Fast; +use IPC::Run3; +use List::SomeUtils qw(first_index none); +use Path::Tiny; +use Unicode::UTF8 qw(decode_utf8); + +use Lintian::IPC::Run3 qw(safe_qx); + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +const my $SPACE => q{ }; + +const my $MINIMUM_DEB_ARCHIVE_MEMBERS => 3; +const my $INDEX_NOT_FOUND => -1; + +sub installable { + my ($self) = @_; + + my $EXTRA_MEMBERS = $self->data->load('deb-format/extra-members'); + + my $deb_path = $self->processable->path; + + # set to one when something is so bad that we can't continue + my $failed; + + my @command = ('ar', 't', $deb_path); + + my $stdout; + my $stderr; + + run3(\@command, \undef, \$stdout, \$stderr); + + unless ($?) { + my @members = split(/\n/, $stdout); + my $count = scalar(@members); + my ($ctrl_member, $data_member); + + if ($count < $MINIMUM_DEB_ARCHIVE_MEMBERS) { + $self->hint('malformed-deb-archive', +"found only $count members instead of $MINIMUM_DEB_ARCHIVE_MEMBERS" + ); + + } elsif ($members[0] ne 'debian-binary') { + $self->hint('malformed-deb-archive', + "first member $members[0] not debian-binary"); + + } elsif ($count == $MINIMUM_DEB_ARCHIVE_MEMBERS + && none {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 + # "extra" members, because they can trigger more tags + # (see below) + (undef, $ctrl_member, $data_member) = @members; + + } else { + my $ctrl_index + = first_index { substr($_, 0, 1) ne '_' } @members[1..$#members]; + my $data_index; + + if ($ctrl_index != $INDEX_NOT_FOUND) { + # Since we searched only a sublist of @members, we have to + # add 1 to $ctrl_index + $ctrl_index++; + $ctrl_member = $members[$ctrl_index]; + $data_index = first_index { substr($_, 0, 1) ne '_' } + @members[$ctrl_index+1..$#members]; + if ($data_index != $INDEX_NOT_FOUND) { + # Since we searched only a sublist of @members, we + # have to adjust $data_index + $data_index += $ctrl_index + 1; + $data_member = $members[$data_index]; + } + } + + # Extra members + # NB: We deliberately do not allow _extra member, + # since various tools seems to be unable to cope + # with them particularly dak + # see https://wiki.debian.org/Teams/Dpkg/DebSupport + for my $i (1..$#members) { + my $member = $members[$i]; + my $actual_index = $i; + my ($expected, $text); + next if $i == $ctrl_index or $i == $data_index; + $expected = $EXTRA_MEMBERS->value($member); + if (defined($expected)) { + next if $expected eq 'ANYWHERE'; + next if $expected == $actual_index; + $text = "expected at position $expected, but appeared"; + } elsif (substr($member,0,1) eq '_') { + $text = 'unexpected _member'; + } else { + $text = 'unexpected member'; + } + $self->hint('misplaced-extra-member-in-deb', + "$member ($text at position $actual_index)"); + } + } + + if (not defined($ctrl_member)) { + # Somehow I doubt we will ever get this far without a control + # file... :) + $self->hint('malformed-deb-archive', 'Missing control.tar member'); + $failed = 1; + } else { + if ( + $ctrl_member !~ m{\A + control\.tar(?:\.(?:gz|xz))? \Z}xsm + ) { + $self->hint( + 'malformed-deb-archive', + join($SPACE, + "second (official) member $ctrl_member", + 'not control.tar.(gz|xz)') + ); + $failed = 1; + } elsif ($ctrl_member eq 'control.tar') { + $self->hint('uses-no-compression-for-control-tarball'); + } + $self->hint('control-tarball-compression-format', + $ctrl_member =~ s/^control\.tar\.?//r || '(none)'); + } + + if (not defined($data_member)) { + # Somehow I doubt we will ever get this far without a data + # member (i.e. I suspect unpacked and index will fail), but + # mah + $self->hint('malformed-deb-archive', 'Missing data.tar member'); + $failed = 1; + } else { + if ( + $data_member !~ m{\A + data\.tar(?:\.(?:gz|bz2|xz|lzma))? \Z}xsm + ) { + # wasn't okay after all + $self->hint( + 'malformed-deb-archive', + join($SPACE, + "third (official) member $data_member", + 'not data.tar.(gz|xz|bz2|lzma)') + ); + $failed = 1; + } elsif ($self->processable->type eq 'udeb' + && $data_member !~ m/^data\.tar\.[gx]z$/) { + $self->hint( + 'udeb-uses-unsupported-compression-for-data-tarball'); + } elsif ($data_member eq 'data.tar.lzma') { + $self->hint('uses-deprecated-compression-for-data-tarball', + 'lzma'); + # Ubuntu's archive allows lzma packages. + $self->hint('lzma-deb-archive'); + } elsif ($data_member eq 'data.tar.bz2') { + $self->hint('uses-deprecated-compression-for-data-tarball', + 'bzip2'); + } elsif ($data_member eq 'data.tar') { + $self->hint('uses-no-compression-for-data-tarball'); + } + $self->hint('data-tarball-compression-format', + $data_member =~ s/^data\.tar\.?//r || '(none)'); + } + } else { + # unpack will probably fail so we'll never get here, but may as well be + # complete just in case. + $stderr =~ s/\n.*//s; + $stderr =~ s/^ar:\s*//; + $stderr =~ s/^deb:\s*//; + $self->hint('malformed-deb-archive', "ar error: $stderr"); + } + + # Check the debian-binary version number. We probably won't get + # here because dpkg-deb will decline to unpack the deb, but be + # thorough just in case. We may eventually have a case where dpkg + # supports a newer format but it's not permitted in the archive + # yet. + if (not defined($failed)) { + my $bytes = safe_qx('ar', 'p', $deb_path, 'debian-binary'); + if ($? != 0) { + $self->hint('malformed-deb-archive', + 'cannot read debian-binary member'); + } else { + my $output = decode_utf8($bytes); + if ($output !~ /^2\.\d+\n/) { + my ($version) = split(m/\n/, $output); + $self->hint('malformed-deb-archive', + "version $version not 2.0"); + } + } + } + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Debhelper.pm b/lib/Lintian/Check/Debhelper.pm new file mode 100644 index 0000000..3cee733 --- /dev/null +++ b/lib/Lintian/Check/Debhelper.pm @@ -0,0 +1,1083 @@ +# debhelper format -- lintian check script -*- perl -*- + +# Copyright (C) 1999 by Joey Hess +# Copyright (C) 2016-2020 Chris Lamb <lamby@debian.org> +# Copyright (C) 2021 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Debhelper; + +use v5.20; +use warnings; +use utf8; + +use Const::Fast; +use List::Compare; +use List::SomeUtils qw(any firstval); +use List::UtilsBy qw(min_by); +use Text::LevenshteinXS qw(distance); +use Unicode::UTF8 qw(encode_utf8); + +use Lintian::Relation; + +const my $EMPTY => q{}; +const my $SPACE => q{ }; +const my $DOLLAR => q{$}; +const my $UNDERSCORE => q{_}; +const my $HORIZONTAL_BAR => q{|}; + +const my $ARROW => q{=>}; + +# If there is no debian/compat file present but cdbs is being used, cdbs will +# create one automatically. Currently it always uses compatibility level 5. +# It may be better to look at what version of cdbs the package depends on and +# from that derive the compatibility level.... +const my $CDBS_COMPAT => 5; + +# minimum versions for features +const my $BRACE_EXPANSION => 5; +const my $USES_EXECUTABLE_FILES => 9; +const my $DH_PARALLEL_NOT_NEEDED => 10; +const my $REQUIRES_AUTOTOOLS => 10; +const my $USES_AUTORECONF => 10; +const my $INVOKES_SYSTEMD => 10; +const my $BETTER_SYSTEMD_INTEGRATION => 11; +const my $VERSIONED_PREREQUISITE_AVAILABLE => 11; + +const my $LEVENSHTEIN_TOLERANCE => 3; +const my $MANY_OVERRIDES => 20; + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +my $MISC_DEPENDS = Lintian::Relation->new->load($DOLLAR . '{misc:Depends}'); + +# Manually maintained list of dh_commands that requires a versioned +# dependency *AND* are not provided by debhelper. Commands provided +# by debhelper is handled in checks/debhelper. +# +# This overrules any thing listed in dh_commands (which is auto-generated). + +my %DH_COMMAND_MANUAL_PREREQUISITES = ( + dh_apache2 => 'dh-apache2:any | apache2-dev:any', + dh_autoreconf_clean => +'dh-autoreconf:any | debhelper:any (>= 9.20160403~) | debhelper-compat:any', + dh_autoreconf => +'dh-autoreconf:any | debhelper:any (>= 9.20160403~) | debhelper-compat:any', + dh_dkms => 'dkms:any | dh-sequence-dkms:any', + dh_girepository => 'gobject-introspection:any | dh-sequence-gir:any', + dh_gnome => 'gnome-pkg-tools:any | dh-sequence-gnome:any', + dh_gnome_clean => 'gnome-pkg-tools:any | dh-sequence-gnome:any', + dh_lv2config => 'lv2core:any', + dh_make_pgxs => 'postgresql-server-dev-all:any | postgresql-all:any', + dh_nativejava => 'gcj-native-helper:any | default-jdk-builddep:any', + dh_pgxs_test => 'postgresql-server-dev-all:any | postgresql-all:any', + dh_python2 => 'dh-python:any | dh-sequence-python2:any', + dh_python3 => 'dh-python:any | dh-sequence-python3:any', + dh_sphinxdoc => +'sphinx:any | python-sphinx:any | python3-sphinx:any | dh-sequence-sphinxdoc:any', + dh_xine => 'libxine-dev:any | libxine2-dev:any' +); + +# Manually maintained list of dependencies needed for dh addons. This overrides +# information from data/common/dh_addons (the latter file is automatically +# generated). +my %DH_ADDON_MANUAL_PREREQUISITES = ( + ada_library => 'dh-ada-library:any | dh-sequence-ada-library:any', + apache2 => 'dh-apache2:any | apache2-dev:any', + autoreconf => +'dh-autoreconf:any | debhelper:any (>= 9.20160403~) | debhelper-compat:any', + cli => 'cli-common-dev:any | dh-sequence-cli:any', + dwz => 'debhelper:any | debhelper-compat:any | dh-sequence-dwz:any', + installinitramfs => +'debhelper:any | debhelper-compat:any | dh-sequence-installinitramfs:any', + gnome => 'gnome-pkg-tools:any | dh-sequence-gnome:any', + lv2config => 'lv2core:any', + nodejs => 'pkg-js-tools:any | dh-sequence-nodejs:any', + perl_dbi => 'libdbi-perl:any | dh-sequence-perl-dbi:any', + perl_imager => 'libimager-perl:any | dh-sequence-perl-imager:any', + pgxs => 'postgresql-server-dev-all:any | postgresql-all:any', + pgxs_loop => 'postgresql-server-dev-all:any | postgresql-all:any', + pypy => 'dh-python:any | dh-sequence-pypy:any', + python2 => 'python2:any | python2-dev:any | dh-sequence-python2:any', + python3 => +'python3:any | python3-all:any | python3-dev:any | python3-all-dev:any | dh-sequence-python3:any', + scour => 'scour:any | python-scour:any | dh-sequence-scour:any', + sphinxdoc => +'sphinx:any | python-sphinx:any | python3-sphinx:any | dh-sequence-sphinxdoc:any', + systemd => +'debhelper:any (>= 9.20160709~) | debhelper-compat:any | dh-sequence-systemd:any | dh-systemd:any', +); + +sub visit_patched_files { + my ($self, $item) = @_; + + return + unless $item->dirname eq 'debian/'; + + return + if !$item->is_symlink && !$item->is_file; + + if ( $item->basename eq 'control' + || $item->basename =~ m/^(?:.*\.)?(?:copyright|changelog|NEWS)$/) { + + # Handle "control", [<pkg>.]copyright, [<pkg>.]changelog + # and [<pkg>.]NEWS + + # The permissions of symlinks are not really defined, so resolve + # $item to ensure we are not dealing with a symlink. + my $actual = $item->resolve_path; + + $self->pointed_hint('package-file-is-executable', $item->pointer) + if $actual && $actual->is_executable; + + return; + } + + return; +} + +sub source { + my ($self) = @_; + + my @MAINT_COMMANDS = @{$self->data->debhelper_commands->maint_commands}; + + my $FILENAME_CONFIGS= $self->data->load('debhelper/filename-config-files'); + + my $DEBHELPER_LEVELS = $self->data->debhelper_levels; + my $DH_ADDONS = $self->data->debhelper_addons; + my $DH_COMMANDS_DEPENDS= $self->data->debhelper_commands; + + my @KNOWN_DH_COMMANDS; + for my $command ($DH_COMMANDS_DEPENDS->all) { + for my $focus ($EMPTY, qw(-arch -indep)) { + for my $timing (qw(override execute_before execute_after)) { + + push(@KNOWN_DH_COMMANDS, + $timing . $UNDERSCORE . $command . $focus); + } + } + } + + my $debhelper_level; + my $dh_compat_variable; + my $maybe_skipping; + + my $uses_debhelper = 0; + my $uses_dh_exec = 0; + my $uses_autotools_dev_dh = 0; + + my $includes_cdbs = 0; + my $modifies_scripts = 0; + + my $seen_any_dh_command = 0; + my $seen_dh_sequencer = 0; + my $seen_dh_dynamic = 0; + my $seen_dh_systemd = 0; + my $seen_dh_parallel = 0; + my $seen_dh_clean_k = 0; + + my %command_by_prerequisite; + my %addon_by_prerequisite; + my %overrides; + + my $droot = $self->processable->patched->resolve_path('debian/'); + + my $drules; + $drules = $droot->child('rules') if $droot; + + return + unless $drules && $drules->is_open_ok; + + open(my $rules_fd, '<', $drules->unpacked_path) + or die encode_utf8('Cannot open ' . $drules->unpacked_path); + + my $command_prefix_pattern = qr/\s+[@+-]?(?:\S+=\S+\s+)*/; + + my $build_prerequisites_norestriction + = $self->processable->relation_norestriction('Build-Depends-All'); + my $build_prerequisites= $self->processable->relation('Build-Depends-All'); + + my %seen = ( + 'python2' => 0, + 'python3' => 0, + 'runit' => 0, + 'sphinxdoc' => 0, + ); + + for (qw(python2 python3)) { + + $seen{$_} = 1 + if $build_prerequisites_norestriction->satisfies( + "dh-sequence-$_:any"); + } + + my %build_systems; + + my $position = 1; + while (my $line = <$rules_fd>) { + + my $pointer = $drules->pointer($position); + + while ($line =~ s/\\$// && defined(my $cont = <$rules_fd>)) { + $line .= $cont; + } + + if ($line =~ /^ifn?(?:eq|def)\s/) { + $maybe_skipping++; + + } elsif ($line =~ /^endif\s/) { + $maybe_skipping--; + } + + next + if $line =~ /^\s*\#/; + + if ($line =~ /^$command_prefix_pattern(dh_(?!autoreconf)\S+)/) { + + my $dh_command = $1; + + $build_systems{'debhelper'} = 1 + unless exists $build_systems{'dh'}; + + $self->pointed_hint('dh_installmanpages-is-obsolete',$pointer) + if $dh_command eq 'dh_installmanpages'; + + if ( $dh_command eq 'dh_autotools-dev_restoreconfig' + || $dh_command eq 'dh_autotools-dev_updateconfig') { + + $self->pointed_hint( + 'debhelper-tools-from-autotools-dev-are-deprecated', + $pointer, $dh_command); + $uses_autotools_dev_dh = 1; + } + + # Record if we've seen specific helpers, special-casing + # "dh_python" as Python 2.x. + $seen{'python2'} = 1 if $dh_command eq 'dh_python2'; + for my $k (keys %seen) { + $seen{$k} = 1 if $dh_command eq "dh_$k"; + } + + $seen_dh_clean_k = 1 + if $dh_command eq 'dh_clean' + && $line =~ /\s+\-k(?:\s+.*)?$/s; + + # if command is passed -n, it does not modify the scripts + $modifies_scripts = 1 + if (any { $dh_command eq $_ } @MAINT_COMMANDS) + && $line !~ /\s+\-n\s+/; + + # If debhelper commands are wrapped in make conditionals, assume the + # maintainer knows what they're doing and don't check build + # dependencies. + unless ($maybe_skipping) { + + if (exists $DH_COMMAND_MANUAL_PREREQUISITES{$dh_command}) { + my $prerequisite + = $DH_COMMAND_MANUAL_PREREQUISITES{$dh_command}; + $command_by_prerequisite{$prerequisite} = $dh_command; + + } elsif ($DH_COMMANDS_DEPENDS->installed_by($dh_command)) { + + my @broadened = map { "$_:any" } + $DH_COMMANDS_DEPENDS->installed_by($dh_command); + my $prerequisite + = join($SPACE . $HORIZONTAL_BAR . $SPACE,@broadened); + $command_by_prerequisite{$prerequisite} = $dh_command; + } + } + + $seen_any_dh_command = 1; + $uses_debhelper = 1; + + } elsif ($line =~ m{^(?:$command_prefix_pattern)dh\s+}) { + + $build_systems{'dh'} = 1; + delete($build_systems{'debhelper'}); + + $seen_dh_sequencer = 1; + $seen_any_dh_command = 1; + + $seen_dh_dynamic = 1 + if $line =~ /\$[({]\w/; + + $seen_dh_parallel = $position + if $line =~ /--parallel/; + + $uses_debhelper = 1; + $modifies_scripts = 1; + + while ($line =~ /\s--with(?:=|\s+)(['"]?)(\S+)\1/g) { + + my $addon_list = $2; + + for my $addon (split(/,/, $addon_list)) { + + my $orig_addon = $addon; + + $addon =~ y,-,_,; + + my @broadened + = map { "$_:any" } $DH_ADDONS->installed_by($addon); + my $prerequisite = $DH_ADDON_MANUAL_PREREQUISITES{$addon} + || join($SPACE . $HORIZONTAL_BAR . $SPACE,@broadened); + + if ($addon eq 'autotools_dev') { + + $self->pointed_hint( +'debhelper-tools-from-autotools-dev-are-deprecated', + $pointer,"dh ... --with $orig_addon" + ); + $uses_autotools_dev_dh = 1; + } + + $seen_dh_systemd = $position + if $addon eq 'systemd'; + + $self->pointed_hint( + 'dh-quilt-addon-but-quilt-source-format', + $pointer,"dh ... --with $orig_addon") + if $addon eq 'quilt' + && $self->processable->fields->value('Format') eq + '3.0 (quilt)'; + + $addon_by_prerequisite{$prerequisite} = $addon + if defined $prerequisite; + + for my $k (keys %seen) { + $seen{$k} = 1 + if $addon eq $k; + } + } + } + + } elsif ($line =~ m{^include\s+/usr/share/cdbs/1/rules/debhelper.mk} + || $line =~ m{^include\s+/usr/share/R/debian/r-cran.mk}) { + + $build_systems{'cdbs-with-debhelper.mk'} = 1; + delete($build_systems{'cdbs-without-debhelper.mk'}); + + $seen_any_dh_command = 1; + $uses_debhelper = 1; + $modifies_scripts = 1; + $includes_cdbs = 1; + + # CDBS sets DH_COMPAT but doesn't export it. + $dh_compat_variable = $CDBS_COMPAT; + + } elsif ($line =~ /^\s*export\s+DH_COMPAT\s*:?=\s*([^\s]+)/) { + $debhelper_level = $1; + + } elsif ($line =~ /^\s*export\s+DH_COMPAT/) { + $debhelper_level = $dh_compat_variable + if $dh_compat_variable; + + } elsif ($line =~ /^\s*DH_COMPAT\s*:?=\s*([^\s]+)/) { + $dh_compat_variable = $1; + + # one can export and then set the value: + $debhelper_level = $1 + if $debhelper_level; + + } elsif ( + $line =~ /^[^:]*(override|execute_(?:after|before))\s+(dh_[^:]*):/) + { + $self->pointed_hint('typo-in-debhelper-override-target', + $pointer, "$1 $2",$ARROW, "$1_$2"); + + } elsif ($line =~ /^([^:]*_dh_[^:]*):/) { + + my $alltargets = $1; + # can be multiple targets per rule. + my @targets = split(/\s+/, $alltargets); + my @dh_targets = grep { /_dh_/ } @targets; + + # If maintainer is using wildcards, it's unlikely to be a typo. + my @no_wildcards = grep { !/%/ } @dh_targets; + + my $lc = List::Compare->new(\@no_wildcards, \@KNOWN_DH_COMMANDS); + my @unknown = $lc->get_Lonly; + + for my $target (@unknown) { + + my %distance + = map { $_ => distance($target, $_) } @KNOWN_DH_COMMANDS; + my @near = grep { $distance{$_} < $LEVENSHTEIN_TOLERANCE } + keys %distance; + my $nearest = min_by { $distance{$_} } @near; + + $self->pointed_hint('typo-in-debhelper-override-target', + $pointer, $target, $ARROW, $nearest) + if length $nearest; + } + + for my $target (@no_wildcards) { + + next + unless $target + =~ /^(override|execute_(?:before|after))_dh_([^\s]+?)(-arch|-indep|)$/; + + my $timing = $1; + my $command = $2; + my $focus = $3; + my $dh_command = "dh_$command"; + + $overrides{$dh_command} = [$position, $focus]; + $uses_debhelper = 1; + + next + if $DH_COMMANDS_DEPENDS->installed_by($dh_command); + + # Unknown command, so check for likely misspellings + my $missingauto = firstval { "dh_auto_$command" eq $_ } + $DH_COMMANDS_DEPENDS->all; + + $self->pointed_hint( + 'typo-in-debhelper-override-target',$pointer, + $timing . $UNDERSCORE . $dh_command,$ARROW, + $timing . $UNDERSCORE . $missingauto, + )if length $missingauto; + } + + } elsif ($line =~ m{^include\s+/usr/share/cdbs/}) { + + $includes_cdbs = 1; + + $build_systems{'cdbs-without-debhelper.mk'} = 1 + unless exists $build_systems{'cdbs-with-debhelper.mk'}; + + } elsif ( + $line =~m{ + ^include \s+ + /usr/share/(?: + dh-php/pkg-pecl\.mk + |blends-dev/rules + ) + }xsm + ) { + # All of these indirectly use dh. + $seen_any_dh_command = 1; + $build_systems{'dh'} = 1; + delete($build_systems{'debhelper'}); + + } elsif ( + $line =~m{ + ^include \s+ + /usr/share/pkg-kde-tools/qt-kde-team/\d+/debian-qt-kde\.mk + }xsm + ) { + + $includes_cdbs = 1; + $build_systems{'dhmk'} = 1; + delete($build_systems{'debhelper'}); + } + + } continue { + ++$position; + } + + close $rules_fd; + + # Variables could contain any add-ons; assume we have seen them all + %seen = map { $_ => 1 } keys %seen + if $seen_dh_dynamic; + + # Okay - d/rules does not include any file in /usr/share/cdbs/ + $self->pointed_hint('unused-build-dependency-on-cdbs', $drules->pointer) + if $build_prerequisites->satisfies('cdbs:any') + && !$includes_cdbs; + + if (%build_systems) { + + my @systems = sort keys %build_systems; + $self->pointed_hint('debian-build-system', $drules->pointer, + join(', ', @systems)); + + } else { + $self->pointed_hint('debian-build-system', $drules->pointer, 'other'); + } + + unless ($seen_any_dh_command || $includes_cdbs) { + + $self->pointed_hint('package-does-not-use-debhelper-or-cdbs', + $drules->pointer); + return; + } + + my @installable_names= $self->processable->debian_control->installables; + + for my $installable_name (@installable_names) { + + next + if $self->processable->debian_control->installable_package_type( + $installable_name) ne 'deb'; + + my $strong + = $self->processable->binary_relation($installable_name, 'strong'); + my $all= $self->processable->binary_relation($installable_name, 'all'); + + $self->hint('debhelper-but-no-misc-depends', $installable_name) + unless $all->satisfies($MISC_DEPENDS); + + $self->hint('weak-dependency-on-misc-depends', $installable_name) + if $all->satisfies($MISC_DEPENDS) + && !$strong->satisfies($MISC_DEPENDS); + } + + for my $installable ($self->group->get_installables) { + + next + if $installable->type eq 'udeb'; + + my $breaks + = $self->processable->binary_relation($installable->name, 'Breaks'); + my $strong + = $self->processable->binary_relation($installable->name, 'strong'); + + $self->pointed_hint('package-uses-dh-runit-but-lacks-breaks-substvar', + $drules->pointer,$installable->name) + if $seen{'runit'} + && $strong->satisfies('runit:any') + && (any { m{^ etc/sv/ }msx } @{$installable->installed->sorted_list}) + && !$breaks->satisfies($DOLLAR . '{runit:Breaks}'); + } + + my $virtual_compat; + + $build_prerequisites->visit( + sub { + return 0 + unless + m{^ debhelper-compat (?: : \S+ )? \s+ [(]= \s+ (\d+) [)] $}x; + + $virtual_compat = $1; + + return 1; + }, + Lintian::Relation::VISIT_PRED_FULL + | Lintian::Relation::VISIT_STOP_FIRST_MATCH + ); + + my $control_item=$self->processable->debian_control->item; + + $self->pointed_hint('debhelper-compat-virtual-relation', + $control_item->pointer, $virtual_compat) + if length $virtual_compat; + + # gives precedence to virtual compat + $debhelper_level = $virtual_compat + if length $virtual_compat; + + my $compat_file = $droot->child('compat'); + + $self->hint('debhelper-compat-file-is-missing') + unless ($compat_file && $compat_file->is_open_ok) + || $virtual_compat; + + my $from_compat_file = $self->check_compat_file; + + if (length $debhelper_level && length $from_compat_file) { + + $self->pointed_hint( + 'declares-possibly-conflicting-debhelper-compat-versions', + $compat_file->pointer,$from_compat_file,'vs elsewhere', + $debhelper_level); + } + + # this is not just to fill in the gap, but because debhelper + # prefers DH_COMPAT over debian/compat + $debhelper_level ||= $from_compat_file; + + $self->hint('debhelper-compat-level', $debhelper_level) + if length $debhelper_level; + + $debhelper_level ||= 1; + + $self->hint('package-uses-deprecated-debhelper-compat-version', + $debhelper_level) + if $debhelper_level < $DEBHELPER_LEVELS->value('deprecated'); + + $self->hint('package-uses-old-debhelper-compat-version', $debhelper_level) + if $debhelper_level >= $DEBHELPER_LEVELS->value('deprecated') + && $debhelper_level < $DEBHELPER_LEVELS->value('recommended'); + + $self->hint('package-uses-experimental-debhelper-compat-version', + $debhelper_level) + if $debhelper_level >= $DEBHELPER_LEVELS->value('experimental'); + + $self->pointed_hint('dh-clean-k-is-deprecated', $drules->pointer) + if $seen_dh_clean_k; + + for my $suffix (qw(enable start)) { + + my ($stored_position, $focus) + = @{$overrides{"dh_systemd_$suffix"} // []}; + + $self->pointed_hint( + 'debian-rules-uses-deprecated-systemd-override', + $drules->pointer($stored_position), + "override_dh_systemd_$suffix$focus" + ) + if $stored_position + && $debhelper_level >= $BETTER_SYSTEMD_INTEGRATION; + } + + my $num_overrides = scalar(keys %overrides); + + $self->hint('excessive-debhelper-overrides', $num_overrides) + if $num_overrides >= $MANY_OVERRIDES; + + $self->pointed_hint( + 'debian-rules-uses-unnecessary-dh-argument', + $drules->pointer($seen_dh_parallel), + 'dh ... --parallel' + )if $seen_dh_parallel && $debhelper_level >= $DH_PARALLEL_NOT_NEEDED; + + $self->pointed_hint( + 'debian-rules-uses-unnecessary-dh-argument', + $drules->pointer($seen_dh_systemd), + 'dh ... --with=systemd' + )if $seen_dh_systemd && $debhelper_level >= $INVOKES_SYSTEMD; + + for my $item ($droot->children) { + + next + if !$item->is_symlink && !$item->is_file; + + next + if $item->name eq $drules->name; + + if ($item->basename =~ m/^(?:(.*)\.)?(?:post|pre)(?:inst|rm)$/) { + + next + unless $modifies_scripts; + + # They need to have #DEBHELPER# in their scripts. Search + # for scripts that look like maintainer scripts and make + # sure the token is there. + my $installable_name = $1 || $EMPTY; + my $seentag = 0; + + $seentag = 1 + if $item->decoded_utf8 =~ /\#DEBHELPER\#/; + + if (!$seentag) { + + my $single_pkg = $EMPTY; + $single_pkg + = $self->processable->debian_control + ->installable_package_type($installable_names[0]) + if scalar @installable_names == 1; + + my $installable_type + = $self->processable->debian_control + ->installable_package_type($installable_name); + + my $is_udeb = 0; + + $is_udeb = 1 + if $installable_name && $installable_type eq 'udeb'; + + $is_udeb = 1 + if !$installable_name && $single_pkg eq 'udeb'; + + $self->pointed_hint('maintainer-script-lacks-debhelper-token', + $item->pointer) + unless $is_udeb; + } + + next; + } + + my $category = $item->basename; + $category =~ s/^.+\.//; + + next + unless length $category; + + # Check whether this is a debhelper config file that takes + # a list of filenames. + if ($FILENAME_CONFIGS->recognizes($category)) { + + # The permissions of symlinks are not really defined, so resolve + # $item to ensure we are not dealing with a symlink. + my $actual = $item->resolve_path; + next + unless defined $actual; + + $self->check_for_brace_expansion($item, $debhelper_level); + + # debhelper only use executable files in compat 9 + $self->pointed_hint('package-file-is-executable', $item->pointer) + if $actual->is_executable + && $debhelper_level < $USES_EXECUTABLE_FILES; + + if ($debhelper_level >= $USES_EXECUTABLE_FILES) { + + $self->pointed_hint( + 'executable-debhelper-file-without-being-executable', + $item->pointer) + if $actual->is_executable + && !length $actual->hashbang; + + # Only /usr/bin/dh-exec is allowed, even if + # /usr/lib/dh-exec/dh-exec-subst works too. + $self->pointed_hint('dh-exec-private-helper', $item->pointer) + if $actual->is_executable + && $actual->hashbang =~ m{^/usr/lib/dh-exec/}; + + # Do not make assumptions about the contents of an + # executable debhelper file, unless it's a dh-exec + # script. + if ($actual->hashbang =~ /dh-exec/) { + + $uses_dh_exec = 1; + $self->check_dh_exec($item, $category); + } + } + } + } + + $self->pointed_hint('package-uses-debhelper-but-lacks-build-depends', + $drules->pointer) + if $uses_debhelper + && !$build_prerequisites->satisfies('debhelper:any') + && !$build_prerequisites->satisfies('debhelper-compat:any'); + + $self->pointed_hint('package-uses-dh-exec-but-lacks-build-depends', + $drules->pointer) + if $uses_dh_exec + && !$build_prerequisites->satisfies('dh-exec:any'); + + for my $prerequisite (keys %command_by_prerequisite) { + + my $command = $command_by_prerequisite{$prerequisite}; + + # handled above + next + if $prerequisite eq 'debhelper:any'; + + next + if $debhelper_level >= $REQUIRES_AUTOTOOLS + && (any { $_ eq $prerequisite } + qw(autotools-dev:any dh-strip-nondeterminism:any)); + + $self->pointed_hint('missing-build-dependency-for-dh_-command', + $drules->pointer,$command, "(does not satisfy $prerequisite)") + unless $build_prerequisites_norestriction->satisfies($prerequisite); + } + + for my $prerequisite (keys %addon_by_prerequisite) { + + my $addon = $addon_by_prerequisite{$prerequisite}; + + next + if $debhelper_level >= $REQUIRES_AUTOTOOLS + && $addon eq 'autoreconf'; + + $self->pointed_hint('missing-build-dependency-for-dh-addon', + $drules->pointer,$addon, "(does not satisfy $prerequisite)") + unless ( + $build_prerequisites_norestriction->satisfies($prerequisite)); + + # As a special case, the python3 addon needs a dependency on + # dh-python unless the -dev packages are used. + my $python_source = 'dh-python:any | pybuild-plugin-pyproject:any'; + + $self->pointed_hint('missing-build-dependency-for-dh-addon', + $drules->pointer,$addon, "(does not satisfy $python_source)") + if $addon eq 'python3' + && $build_prerequisites_norestriction->satisfies($prerequisite) + && !$build_prerequisites_norestriction->satisfies( + 'python3-dev:any | python3-all-dev:any') + && !$build_prerequisites_norestriction->satisfies($python_source); + } + + $self->hint('no-versioned-debhelper-prerequisite', $debhelper_level) + unless $build_prerequisites->satisfies( + "debhelper:any (>= $debhelper_level~)") + || $build_prerequisites->satisfies( + "debhelper-compat:any (= $debhelper_level)"); + + if ($debhelper_level >= $USES_AUTORECONF) { + for my $autotools_source (qw(dh-autoreconf:any autotools-dev:any)) { + + next + if $autotools_source eq 'autotools-dev:any' + && $uses_autotools_dev_dh; + + $self->hint('useless-autoreconf-build-depends', + "(does not need to satisfy $autotools_source)") + if $build_prerequisites->satisfies($autotools_source); + } + } + + if ($seen_dh_sequencer && !$seen{'python2'}) { + + my %python_depends; + + for my $installable_name (@installable_names) { + + $python_depends{$installable_name} = 1 + if $self->processable->binary_relation($installable_name,'all') + ->satisfies($DOLLAR . '{python:Depends}'); + } + + $self->hint('python-depends-but-no-python-helper', + (sort keys %python_depends)) + if %python_depends; + } + + if ($seen_dh_sequencer && !$seen{'python3'}) { + + my %python3_depends; + + for my $installable_name (@installable_names) { + + $python3_depends{$installable_name} = 1 + if $self->processable->binary_relation($installable_name,'all') + ->satisfies($DOLLAR . '{python3:Depends}'); + } + + $self->hint('python3-depends-but-no-python3-helper', + (sort keys %python3_depends)) + if %python3_depends; + } + + if ($seen{'sphinxdoc'} && !$seen_dh_dynamic) { + + my $seen_sphinxdoc = 0; + + for my $installable_name (@installable_names) { + $seen_sphinxdoc = 1 + if $self->processable->binary_relation($installable_name,'all') + ->satisfies($DOLLAR . '{sphinxdoc:Depends}'); + } + + $self->pointed_hint('sphinxdoc-but-no-sphinxdoc-depends', + $drules->pointer) + unless $seen_sphinxdoc; + } + + return; +} + +sub check_for_brace_expansion { + my ($self, $item, $debhelper_level) = @_; + + return + unless $item->is_open_ok; + + open(my $fd, '<', $item->unpacked_path) + or die encode_utf8('Cannot open ' . $item->unpacked_path); + + my $position = 1; + while (my $line = <$fd>) { + + next + if $line =~ /^\s*$/; + + next + if $line =~ /^\#/ + && $debhelper_level >= $BRACE_EXPANSION; + + if ($line =~ /((?<!\\)\{(?:[^\s\\\}]*?,)+[^\\\}\s,]*,*\})/){ + my $expansion = $1; + + my $pointer = $item->pointer($position); + + $self->pointed_hint('brace-expansion-in-debhelper-config-file', + $pointer, $expansion); + + last; + } + + } continue { + ++$position; + } + + close $fd; + + return; +} + +sub check_compat_file { + my ($self) = @_; + + # Check the compat file. Do this separately from looping over all + # of the other files since we use the compat value when checking + # for brace expansion. + + my $compat_file + = $self->processable->patched->resolve_path('debian/compat'); + + # missing file is dealt with elsewhere + return $EMPTY + unless $compat_file && $compat_file->is_open_ok; + + my $debhelper_level; + + open(my $fd, '<', $compat_file->unpacked_path) + or die encode_utf8('Cannot open ' . $compat_file->unpacked_path); + + my $position = 1; + while (my $line = <$fd>) { + + if ($position == 1) { + + $debhelper_level = $line; + next; + } + + my $pointer = $compat_file->pointer($position); + + $self->pointed_hint('debhelper-compat-file-contains-multiple-levels', + $pointer) + if $line =~ /^\d/; + + } continue { + ++$position; + } + + close $fd; + + # trim both ends + $debhelper_level =~ s/^\s+|\s+$//g; + + if (!length $debhelper_level) { + + $self->pointed_hint('debhelper-compat-file-is-empty', + $compat_file->pointer); + return $EMPTY; + } + + my $DEBHELPER_LEVELS = $self->data->debhelper_levels; + + # Recommend people use debhelper-compat (introduced in debhelper + # 11.1.5~alpha1) over debian/compat, except for experimental/beta + # versions. + $self->pointed_hint('uses-debhelper-compat-file', $compat_file->pointer) + if $debhelper_level >= $VERSIONED_PREREQUISITE_AVAILABLE + && $debhelper_level < $DEBHELPER_LEVELS->value('experimental'); + + return $debhelper_level; +} + +sub check_dh_exec { + my ($self, $item, $category) = @_; + + return + unless $item->is_open_ok; + + my $dhe_subst = 0; + my $dhe_install = 0; + my $dhe_filter = 0; + + open(my $fd, '<', $item->unpacked_path) + or die encode_utf8('Cannot open ' . $item->unpacked_path); + + my $position = 1; + while (my $line = <$fd>) { + + chomp $line; + + my $pointer = $item->pointer($position); + + if ($line =~ /\$\{([^\}]+)\}/) { + + my $sv = $1; + $dhe_subst = 1; + + if ( + $sv !~ m{ \A + DEB_(?:BUILD|HOST)_(?: + ARCH (?: _OS|_CPU|_BITS|_ENDIAN )? + |GNU_ (?:CPU|SYSTEM|TYPE)|MULTIARCH + ) \Z}xsm + ) { + $self->pointed_hint('dh-exec-subst-unknown-variable', + $pointer, $sv); + } + } + + $dhe_install = 1 + if $line =~ /[ \t]=>[ \t]/; + + $dhe_filter = 1 + if $line =~ /\[[^\]]+\]/; + + $dhe_filter = 1 + if $line =~ /<[^>]+>/; + + if ( $line =~ /^usr\/lib\/\$\{([^\}]+)\}\/?$/ + || $line + =~ /^usr\/lib\/\$\{([^\}]+)\}\/?\s+\/usr\/lib\/\$\{([^\}]+)\}\/?$/ + || $line =~ /^usr\/lib\/\$\{([^\}]+)\}[^\s]+$/) { + + my $sv = $1; + my $dv = $2; + my $dhe_useless = 0; + + if ( + $sv =~ m{ \A + DEB_(?:BUILD|HOST)_(?: + ARCH (?: _OS|_CPU|_BITS|_ENDIAN )? + |GNU_ (?:CPU|SYSTEM|TYPE)|MULTIARCH + ) \Z}xsm + ) { + if (defined($dv)) { + $dhe_useless = ($sv eq $dv); + } else { + $dhe_useless = 1; + } + } + + $self->pointed_hint('dh-exec-useless-usage', $pointer, $line) + if $dhe_useless && $item =~ /debian\/.*(install|manpages)/; + } + + } continue { + ++$position; + } + + close $fd; + + $self->pointed_hint('dh-exec-script-without-dh-exec-features', + $item->pointer) + if !$dhe_subst + && !$dhe_install + && !$dhe_filter; + + $self->pointed_hint('dh-exec-install-not-allowed-here', $item->pointer) + if $dhe_install + && $category ne 'install' + && $category ne 'manpages'; + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Debhelper/Temporary.pm b/lib/Lintian/Check/Debhelper/Temporary.pm new file mode 100644 index 0000000..452d76c --- /dev/null +++ b/lib/Lintian/Check/Debhelper/Temporary.pm @@ -0,0 +1,55 @@ +# debhelper/temporary -- lintian check script -*- perl -*- + +# Copyright (C) 1999 by Joey Hess +# Copyright (C) 2016-2020 Chris Lamb <lamby@debian.org> +# Copyright (C) 2021 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Debhelper::Temporary; + +use v5.20; +use warnings; +use utf8; + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +sub visit_patched_files { + my ($self, $item) = @_; + + return + unless $item->dirname eq 'debian/'; + + # The regex matches "debhelper", but debhelper/Dh_Lib does not + # make those, so skip it. + $self->pointed_hint('temporary-debhelper-file', $item->pointer) + if $item->basename =~ m{ (?: ^ | [.] ) debhelper (?: [.]log )? $}x + && $item->basename ne 'debhelper'; + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Debian/Changelog.pm b/lib/Lintian/Check/Debian/Changelog.pm new file mode 100644 index 0000000..faa7890 --- /dev/null +++ b/lib/Lintian/Check/Debian/Changelog.pm @@ -0,0 +1,970 @@ +# debian/changelog -- lintian check script -*- perl -*- + +# Copyright (C) 1998 Christian Schwarz +# Copyright (C) 2019-2020 Chris Lamb <lamby@debian.org> +# Copyright (C) 2021 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Debian::Changelog; + +use v5.20; +use warnings; +use utf8; + +use Const::Fast; +use Data::Validate::Domain; +use Date::Format qw(time2str); +use Email::Address::XS; +use List::Util qw(first); +use List::SomeUtils qw(any all uniq); +use Path::Tiny; +use Syntax::Keyword::Try; +use Unicode::UTF8 qw(valid_utf8 decode_utf8 encode_utf8); + +use Lintian::Changelog; +use Lintian::Changelog::Version; +use Lintian::IPC::Run3 qw(safe_qx); +use Lintian::Relation::Version qw(versions_gt); +use Lintian::Spelling qw(check_spelling); + +const my $EMPTY => q{}; +const my $DOUBLE_QUOTE => q{"}; +const my $GREATER_THAN => q{>}; +const my $APPROXIMATELY_EQUAL => q{~}; + +const my $NOT_EQUALS => q{!=}; +const my $ARROW => q{->}; + +const my $MAXIMUM_WIDTH => 82; +const my $FIRST_ARCHIVED_BUG_NUMBER => 50_004; +const my $OUT_OF_REACH_BUG_NUMBER => 1_500_000; + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +sub spelling_tag_emitter { + my ($self, $tag_name, $item, @orig_args) = @_; + + my $pointer = $item->pointer($.); + + return sub { + return $self->pointed_hint($tag_name, $pointer, @orig_args, @_); + }; +} + +sub source { + my ($self) = @_; + + my $pkg = $self->processable->name; + my $processable = $self->processable; + my $group = $self->group; + + my $changelog = $processable->changelog; + return + unless defined $changelog; + + my @entries = @{$changelog->entries}; + return + unless @entries; + + my $latest_entry = $entries[0]; + + my $changelog_item = $self->processable->changelog_item; + my $latest_pointer = $changelog_item->pointer($latest_entry->position); + + my $changes = $group->changes; + if ($changes) { + my $contents = path($changes->path)->slurp; + # make sure dot matches newlines, as well + if ($contents =~ qr/BEGIN PGP SIGNATURE.*END PGP SIGNATURE/ms) { + + $self->pointed_hint('unreleased-changelog-distribution', + $latest_pointer) + if $latest_entry->Distribution eq 'UNRELEASED'; + } + } + + my $versionstring = $processable->fields->value('Version'); + my $latest_version = Lintian::Changelog::Version->new; + + try { + $latest_version->assign($versionstring, $processable->native); + + } catch { + my $indicator= ($processable->native ? $EMPTY : 'non-') . 'native'; + $self->pointed_hint('malformed-debian-changelog-version', + $latest_pointer,$versionstring, "(for $indicator)"); + undef $latest_version; + + # perlcritic 1.140-1 requires a semicolon on the next line + }; + + if (defined $latest_version) { + + $self->pointed_hint( + 'hyphen-in-upstream-part-of-debian-changelog-version', + $latest_pointer,$latest_version->upstream) + if !$processable->native && $latest_version->upstream =~ qr/-/; + + # unstable, testing, and stable shouldn't be used in Debian + # version numbers. unstable should get a normal version + # increment and testing and stable should get suite-specific + # versions. + # + # NMUs get a free pass because they need to work with the + # version number that was already there. + unless (length $latest_version->source_nmu) { + my $revision = $latest_version->maintainer_revision; + my $distribution = $latest_entry->Distribution; + + $self->pointed_hint('version-refers-to-distribution', + $latest_pointer,$latest_version->literal) + if ($revision =~ /testing|(?:un)?stable/i) + || ( + ($distribution eq 'unstable'|| $distribution eq 'experimental') + && $revision + =~ /woody|sarge|etch|lenny|squeeze|stretch|buster/); + } + + my $examine = $latest_version->maintainer_revision; + $examine = $latest_version->upstream + unless $processable->native; + + my $candidate_pattern = qr/rc|alpha|beta|pre(?:view|release)?/; + my $increment_pattern = qr/[^a-z].*|\Z/; + + my ($candidate_string, $increment_string) + = ($examine =~ m/[^~a-z]($candidate_pattern)($increment_pattern)/sm); + if (length $candidate_string && !length $latest_version->source_nmu) { + + $increment_string //= $EMPTY; + + # remove rc-part and any preceding symbol + my $expected = $examine; + $expected =~ s/[\.\+\-\:]?\Q$candidate_string\E.*//; + + my $suggestion = "$expected~$candidate_string$increment_string"; + + $self->pointed_hint( + 'rc-version-greater-than-expected-version', + $latest_pointer, + $examine, + $GREATER_THAN, + $expected, + "(consider using $suggestion)", + ) + if $latest_version->maintainer_revision eq '1' + || $latest_version->maintainer_revision=~ /^0(?:\.1|ubuntu1)?$/ + || $processable->native; + } + } + + if (@entries > 1) { + + my $previous_entry = $entries[1]; + my $latest_timestamp = $latest_entry->Timestamp; + my $previous_timestamp = $previous_entry->Timestamp; + + my $previous_version = Lintian::Changelog::Version->new; + try { + $previous_version->assign($previous_entry->Version, + $processable->native); + } catch { + my $indicator= ($processable->native ? $EMPTY : 'non-') . 'native'; + $self->pointed_hint( + 'odd-historical-debian-changelog-version', + $changelog_item->pointer($previous_entry->position), + $previous_entry->Version, + "(for $indicator)" + ); + undef $previous_version; + } + + if ($latest_timestamp && $previous_timestamp) { + + $self->pointed_hint( + 'latest-debian-changelog-entry-without-new-date', + $latest_pointer) + if $latest_timestamp <= $previous_timestamp + && lc($latest_entry->Distribution) ne 'unreleased'; + } + + if (defined $latest_version) { + + # skip first + for my $entry (@entries[1..$#entries]) { + + # cannot use parser; nativeness may differ + my ($no_epoch) = ($entry->Version =~ qr/^(?:[^:]+:)?([^:]+)$/); + + next + unless defined $no_epoch; + + # disallowed even if epochs differ; see tag description + if ( $latest_version->no_epoch eq $no_epoch + && $latest_entry->Source eq $entry->Source) { + + $self->pointed_hint( +'latest-debian-changelog-entry-reuses-existing-version', + $latest_pointer, + $latest_version->literal, + $APPROXIMATELY_EQUAL, + $entry->Version, + '(last used: '. $entry->Date . ')' + ); + + last; + } + } + } + + if (defined $latest_version && defined $previous_version) { + + # a reused version literal is caught by the broader previous check + + # start with a reasonable default + my $expected_previous = $previous_version->literal; + + $expected_previous = $latest_version->without_backport + if $latest_version->backport_release + && $latest_version->backport_revision + && $latest_version->debian_without_backport ne '0'; + + # find an appropriate prior version for a source NMU + if (length $latest_version->source_nmu) { + + # can only do first nmu for now + $expected_previous = $latest_version->without_source_nmu + if $latest_version->source_nmu eq '1' + &&$latest_version->maintainer_revision =~ qr/\d+/ + && $latest_version->maintainer_revision ne '0'; + } + + $self->pointed_hint( + 'changelog-file-missing-explicit-entry',$latest_pointer, + $previous_version->literal, $ARROW, + "$expected_previous (missing)", $ARROW, + $latest_version->literal + ) + unless $previous_version->literal eq $expected_previous + || $latest_entry->Distribution eq 'bullseye' + || $previous_entry->Distribution eq 'bullseye' + || $latest_entry->Distribution =~ /-security$/i; + + if ( $latest_version->epoch eq $previous_version->epoch + && $latest_version->upstream eq$previous_version->upstream + && $latest_entry->Source eq $previous_entry->Source + && !$processable->native) { + + $self->pointed_hint( + 'possible-new-upstream-release-without-new-version', + $latest_pointer) + if $latest_entry->Changes + =~ /^\s*\*\s+new\s+upstream\s+(?:\S+\s+)?release\b/im; + + my $non_consecutive = 0; + + $non_consecutive = 1 + if !length $latest_version->source_nmu + && $latest_version->maintainer_revision =~ /^\d+$/ + && $previous_version->maintainer_revision =~ /^\d+$/ + && $latest_version->maintainer_revision + != $previous_version->maintainer_revision + 1; + + $non_consecutive = 1 + if $latest_version->maintainer_revision eq + $previous_version->maintainer_revision + && $latest_version->source_nmu =~ /^\d+$/ + && $previous_version->source_nmu =~ /^\d+$/ + && $latest_version->source_nmu + != $previous_version->source_nmu + 1; + + $non_consecutive = 1 + if $latest_version->source_nmu =~ /^\d+$/ + && !length $previous_version->source_nmu + && $latest_version->source_nmu != 1; + + $self->pointed_hint( + 'non-consecutive-debian-revision', + $latest_pointer,$previous_version->literal, + $ARROW,$latest_version->literal + )if $non_consecutive; + } + + if ($latest_version->epoch ne $previous_version->epoch) { + $self->pointed_hint( + 'epoch-change-without-comment',$latest_pointer, + $previous_version->literal, $ARROW, + $latest_version->literal + )unless $latest_entry->Changes =~ /\bepoch\b/im; + + $self->pointed_hint( + 'epoch-changed-but-upstream-version-did-not-go-backwards', + $latest_pointer,$previous_version->literal, + $ARROW,$latest_version->literal + ) + unless $processable->native + || versions_gt($previous_version->upstream, + $latest_version->upstream); + } + } + } + + return; +} + +# no copyright in udebs +sub binary { + my ($self) = @_; + + my $pkg = $self->processable->name; + my $processable = $self->processable; + my $group = $self->group; + + my $is_symlink = 0; + my $native_pkg; + my $foreign_pkg; + my @doc_files; + + # skip packages which have a /usr/share/doc/$pkg -> foo symlink + my $docfile = $processable->installed->lookup("usr/share/doc/$pkg"); + return + if defined $docfile && $docfile->is_symlink; + + # trailing slash in indicates a directory + my $docdir = $processable->installed->lookup("usr/share/doc/$pkg/"); + @doc_files = grep { $_->is_file || $_->is_symlink } $docdir->children + if defined $docdir; + my @news_files + = grep { $_->basename =~ m{\A NEWS\.Debian (?:\.gz)? \Z}ixsm }@doc_files; + + $self->pointed_hint('debian-news-file-not-compressed', $_->pointer) + for grep { $_->basename !~ m{\.gz$} } @news_files; + + $self->pointed_hint('wrong-name-for-debian-news-file', $_->pointer) + for grep { $_->basename =~ m{\.gz$} && $_->basename ne 'NEWS.Debian.gz' } + @news_files; + + my @changelog_files = grep { + $_->basename =~ m{\A changelog (?:\.html|\.Debian)? (?:\.gz)? \Z}xsm + } @doc_files; + + # ubuntu permits symlinks; their profile suppresses the tag + $self->pointed_hint('debian-changelog-file-is-a-symlink', $_->pointer) + for grep { $_->is_symlink } @changelog_files; + + $self->pointed_hint('changelog-file-not-compressed', $_->pointer) + for grep { $_->basename !~ m{ \.gz \Z}xsm } @changelog_files; + + # Check if changelog files are compressed with gzip -9. + # It's a bit of an open question here what we should do + # with a file named ChangeLog. If there's also a + # changelog file, it might be a duplicate, or the packager + # may have installed NEWS as changelog intentionally. + for my $item (@changelog_files) { + + next + unless $item->basename =~ m{ \.gz \Z}xsm; + + my $resolved = $item->resolve_path; + next + unless defined $resolved; + + $self->pointed_hint('changelog-not-compressed-with-max-compression', + $item->pointer) + unless $resolved->file_type =~ /max compression/; + } + + my @html_changelogs + = grep { $_->basename =~ /^changelog\.html(?:\.gz)?$/ } @changelog_files; + my @text_changelogs + = grep { $_->basename =~ /^changelog(?:\.gz)?$/ } @changelog_files; + + if (!@text_changelogs) { + + $self->pointed_hint('html-changelog-without-text-version', $_->pointer) + for @html_changelogs; + } + + my $packagepath = 'usr/share/doc/' . $self->processable->name; + my $news_item + = $self->processable->installed->resolve_path( + "$packagepath/NEWS.Debian.gz"); + + my $news; + if (defined $news_item && $news_item->is_file) { + + my $bytes = safe_qx('gunzip', '-c', $news_item->unpacked_path); + + # another check complains about invalid encoding + if (valid_utf8($bytes)) { + + my $contents = decode_utf8($bytes); + my $newslog = Lintian::Changelog->new; + $newslog->parse($contents); + + for my $error (@{$newslog->errors}) { + + my $position = $error->[0]; + my $condition = $error->[1]; + + my $pointer = $news_item->pointer($position); + + $self->pointed_hint('syntax-error-in-debian-news-file', + $pointer, $DOUBLE_QUOTE . $condition . $DOUBLE_QUOTE); + } + + # Some checks on the most recent entry. + if ($newslog->entries && defined @{$newslog->entries}[0]) { + + $news = @{$newslog->entries}[0]; + + my $pointer = $news_item->pointer($news->position); + + $self->pointed_hint( + 'debian-news-entry-has-strange-distribution', + $pointer,$news->Distribution) + if length $news->Distribution + && $news->Distribution eq 'UNRELEASED'; + + check_spelling( + $self->data, + $news->Changes, + $group->spelling_exceptions, + $self->spelling_tag_emitter( + 'spelling-error-in-news-debian', $news_item + ) + ); + + $self->pointed_hint('debian-news-entry-uses-asterisk',$pointer) + if $news->Changes =~ /^ \s* [*] \s /x; + } + } + } + + # is this a native Debian package? + # If the version is missing, we assume it to be non-native + # as it is the most likely case. + my $source = $processable->fields->value('Source'); + my $source_version; + if ($processable->fields->declares('Source') && $source =~ m/\((.*)\)/) { + $source_version = $1; + } else { + $source_version = $processable->fields->value('Version'); + } + if (defined $source_version) { + $native_pkg = ($source_version !~ m/-/); + } else { + # We do not know, but assume it to non-native as it is + # the most likely case. + $native_pkg = 0; + } + $source_version = $processable->fields->value('Version') || '0-1'; + $foreign_pkg = (!$native_pkg && $source_version !~ m/-0\./); + # A version of 1.2.3-0.1 could be either, so in that + # case, both vars are false + + if ($native_pkg) { + # native Debian package + if (any { m/^changelog(?:\.gz)?$/} map { $_->basename } @doc_files) { + # everything is fine + } elsif (my $chg + = first {$_->basename =~ m/^changelog[.]debian(?:\.gz)$/i;} + @doc_files) { + $self->pointed_hint('wrong-name-for-changelog-of-native-package', + $chg->pointer); + + } else { + $self->hint( + 'no-changelog', + "usr/share/doc/$pkg/changelog.gz", + '(native package)' + ); + } + } else { + # non-native (foreign :) Debian package + + # 1. check for upstream changelog + my $found_upstream_text_changelog = 0; + if ( + any { m/^changelog(\.html)?(?:\.gz)?$/ } + map { $_->basename } @doc_files + ) { + $found_upstream_text_changelog = 1 unless $1; + # everything is fine + } else { + # search for changelogs with wrong file name + for my $item (@doc_files) { + + if ( $item->basename =~ m/^change/i + && $item->basename !~ m/debian/i) { + + $self->pointed_hint('wrong-name-for-upstream-changelog', + $item->pointer); + last; + } + } + } + + # 2. check for Debian changelog + if ( + any { m/^changelog\.Debian(?:\.gz)?$/ } + map { $_->basename } @doc_files + ) { + # everything is fine + } elsif (my $chg + = first {$_->basename =~ m/^changelog\.debian(?:\.gz)?$/i;} + @doc_files) { + $self->pointed_hint('wrong-name-for-debian-changelog-file', + $chg->pointer); + + } else { + if ($foreign_pkg && $found_upstream_text_changelog) { + $self->hint('debian-changelog-file-missing-or-wrong-name'); + + } elsif ($foreign_pkg) { + $self->hint( + 'no-changelog', + "usr/share/doc/$pkg/changelog.Debian.gz", + '(non-native package)' + ); + } + # TODO: if uncertain whether foreign or native, either + # changelog.gz or changelog.debian.gz should exists + # though... but no tests catches this (extremely rare) + # border case... Keep in mind this is only happening if we + # have a -0.x version number... So not my priority to fix + # --Jeroen + } + } + + my $changelog_item = $self->processable->changelog_item; + return + unless defined $changelog_item; + + # another check complains about invalid encoding + my $changelog = $processable->changelog; + + for my $error (@{$changelog->errors}) { + + my $position = $error->[0]; + my $condition = $error->[1]; + + my $pointer = $changelog_item->pointer($position); + + $self->pointed_hint('syntax-error-in-debian-changelog', + $pointer, $DOUBLE_QUOTE . $condition . $DOUBLE_QUOTE); + } + + # Check for some things in the raw changelog file and compute the + # "offset" to the first line of the first entry. We use this to + # report the line number of "too-long" lines. (#657402) + my $real_start = $self->check_dch($changelog_item); + + my @entries = @{$changelog->entries}; + + # all versions from the changelog + my %allversions + = map { $_ => 1 } grep { defined } map { $_->Version } @entries; + + # checks applying to all entries + for my $entry (@entries) { + + my $position = $entry->position; + my $version = $entry->Version; + + my $pointer = $changelog_item->pointer($position); + + if (length $entry->Maintainer) { + my ($parsed) = Email::Address::XS->parse($entry->Maintainer); + + unless ($parsed->is_valid) { + + $self->pointed_hint( + 'bogus-mail-host-in-debian-changelog', + $pointer,$entry->Maintainer,"(for version $version)", + ); + next; + } + + unless (all { length } + ($parsed->address, $parsed->user, $parsed->host)) { + $self->pointed_hint( + 'bogus-mail-host-in-debian-changelog', + $pointer,$parsed->format,"(for version $version)", + ); + next; + } + + $self->pointed_hint( + 'bogus-mail-host-in-debian-changelog', + $pointer, $parsed->address,"(for version $version)", + ) + unless is_domain($parsed->host, + {domain_disable_tld_validation => 1}); + } + } + + my $INVALID_DATES + = $self->data->load('changelog-file/invalid-dates',qr/\s*=\>\s*/); + + if (@entries) { + + # checks related to the latest entry + my $latest_entry = $entries[0]; + + my $latest_pointer = $changelog_item->pointer($latest_entry->position); + + my $latest_timestamp = $latest_entry->Timestamp; + + if ($latest_timestamp) { + + my $warned = 0; + my $longdate = $latest_entry->Date; + + for my $re ($INVALID_DATES->all()) { + if ($longdate =~ m/($re)/i) { + + my $match = $1; + my $repl = $INVALID_DATES->value($re); + + $self->pointed_hint('invalid-date-in-debian-changelog', + $latest_pointer,"($match", $ARROW, "$repl)"); + + $warned = 1; + } + } + + my ($weekday_declared, $numberportion) + = split(m/,\s*/, $longdate, 2); + $numberportion //= $EMPTY; + my ($tz, $weekday_actual); + + if ($numberportion =~ m/[ ]+ ([^ ]+)\Z/xsm) { + $tz = $1; + $weekday_actual = time2str('%a', $latest_timestamp, $tz); + } + + if (not $warned and $tz and $weekday_declared ne $weekday_actual) { + my $real_weekday = time2str('%A', $latest_timestamp, $tz); + my $short_date = time2str('%Y-%m-%d', $latest_timestamp, $tz); + $self->pointed_hint('debian-changelog-has-wrong-day-of-week', + $latest_pointer,"$short_date was a $real_weekday"); + } + } + + # there is more than one changelog entry + if (@entries > 1) { + + my $previous_entry = $entries[1]; + + my $previous_timestamp = $previous_entry->Timestamp; + + $self->pointed_hint('latest-changelog-entry-without-new-date', + $latest_pointer) + if defined $latest_timestamp + && defined $previous_timestamp + && $latest_timestamp <= $previous_timestamp + && $latest_entry->Distribution ne 'UNRELEASED'; + + my $latest_dist = lc $latest_entry->Distribution; + my $previous_dist = lc $previous_entry->Distribution; + + $self->pointed_hint('experimental-to-unstable-without-comment', + $latest_pointer) + if $latest_dist eq 'unstable' + && $previous_dist eq 'experimental' + && $latest_entry->Changes + !~ m{ \b to \s+ ['"\N{LEFT SINGLE QUOTATION MARK}\N{LEFT DOUBLE QUOTATION MARK}]? (?:unstable|sid) ['"\N{RIGHT SINGLE QUOTATION MARK}\N{RIGHT DOUBLE QUOTATION MARK}]? \b }imx; + + my $changes = $group->changes; + if ($changes) { + my $changes_dist= lc $changes->fields->value('Distribution'); + + my %codename; + $codename{'unstable'} = 'sid'; + my @normalized + = uniq map { $codename{$_} // $_ } + ($latest_dist, $changes_dist); + + $self->pointed_hint( + 'changelog-distribution-does-not-match-changes-file', + $latest_pointer,$latest_dist, + $NOT_EQUALS, $changes_dist + )unless @normalized == 1; + } + + } + + # Some checks should only be done against the most recent + # changelog entry. + my $changes = $latest_entry->Changes || $EMPTY; + + if (@entries == 1) { + + if ($latest_entry->Version && $latest_entry->Version =~ /-1$/) { + $self->pointed_hint('initial-upload-closes-no-bugs', + $latest_pointer) + unless @{ $latest_entry->Closes }; + + $self->pointed_hint( + 'new-package-uses-date-based-version-number', + $latest_pointer, + $latest_entry->Version, + '(better: 0~' . $latest_entry->Version .')' + )if $latest_entry->Version =~ m/^\d{8}/; + } + + $self->pointed_hint('changelog-is-dh_make-template', + $latest_pointer) + if $changes + =~ /(?:#?\s*)(?:\d|n)+ is the bug number of your ITP/i; + } + + while ($changes =~ /(closes[\s;]*(?:bug)?\#?\s?\d{6,})[^\w]/ig) { + + my $closes = $1; + + $self->pointed_hint('possible-missing-colon-in-closes', + $latest_pointer, $closes) + if length $closes; + } + + if ($changes =~ m/(TEMP-\d{7}-[0-9a-fA-F]{6})/) { + + my $temporary_cve = $1; + + $self->pointed_hint( + 'changelog-references-temp-security-identifier', + $latest_pointer, $temporary_cve); + } + + # check for bad intended distribution + if ( + $changes =~ m{uploads? \s+ to \s+ + (?'intended'testing|unstable|experimental|sid)}xi + ){ + my $intended = lc($+{intended}); + + $intended = 'unstable' + if $intended eq 'sid'; + + my $uploaded = $latest_entry->Distribution; + + $self->pointed_hint('bad-intended-distribution', $latest_pointer, + "intended for $intended but uploaded to $uploaded") + if $uploaded ne $intended + && $uploaded ne 'UNRELEASED'; + } + + if ($changes =~ m{ (Close: \s+ [#] \d+) }xi) { + + my $statement = $1; + + $self->pointed_hint('misspelled-closes-bug', $latest_pointer, + $statement); + } + + my $changesempty = $changes; + $changesempty =~ s/\W//gms; + + $self->pointed_hint('changelog-empty-entry', $latest_pointer) + if !length $changesempty + && $latest_entry->Distribution ne 'UNRELEASED'; + + # before bug 50004 bts removed bug instead of archiving + for my $bug (@{$latest_entry->Closes}) { + + $self->pointed_hint('improbable-bug-number-in-closes', + $latest_pointer, $bug) + if $bug < $FIRST_ARCHIVED_BUG_NUMBER + || $bug >= $OUT_OF_REACH_BUG_NUMBER; + } + + # Compare against NEWS.Debian if available. + for my $field (qw/Distribution Urgency/) { + + $self->pointed_hint( + 'changelog-news-debian-mismatch', + $news_item->pointer($news->position), + $field, + $latest_entry->$field, + $NOT_EQUALS, + $news->$field + ) + if defined $news + && length $news->Version + && $news->Version eq $latest_entry->Version + && $news->$field ne $latest_entry->$field; + } + + $self->pointed_hint( + 'debian-news-entry-has-unknown-version', + $news_item->pointer($news->position), + $news->Version + ) + if defined $news + && length $news->Version + && !exists $allversions{$news->Version}; + + # Parse::DebianChangelog adds an additional space to the + # beginning of each line, so we have to adjust for that in the + # length check. + my @lines = split(/\n/, $changes); + + # real start + my $position = $real_start; + for my $line (@lines) { + + my $pointer = $changelog_item->pointer($position); + + if ($line =~ /^ [*]\s(.{1,5})$/) { + + my $excerpt = $1; + + $self->pointed_hint('debian-changelog-line-too-short', + $pointer, $excerpt) + unless $1 =~ /:$/; + } + + $self->pointed_hint('debian-changelog-line-too-long', $pointer) + if length $line >= $MAXIMUM_WIDTH + && $line !~ /^ [\s.o*+-]* (?: [Ss]ee:?\s+ )? \S+ $/msx; + + } continue { + ++$position; + } + + # Strip out all lines that contain the word spelling to avoid false + # positives on changelog entries for spelling fixes. + $changes =~ s/^.*(?:spelling|typo).*\n//gm; + + check_spelling( + $self->data, + $changes, + $group->spelling_exceptions, + $self->spelling_tag_emitter( + 'spelling-error-in-changelog', $changelog_item + ) + ); + } + + return; +} + +# read the changelog itself and check for some issues we cannot find +# with Parse::DebianChangelog. Also return the "real" line number for +# the first line of text in the first entry. +# +sub check_dch { + my ($self) = @_; + + my $unresolved = $self->processable->changelog_item; + + # stop for dangling symbolic link + my $item = $unresolved->resolve_path; + return 0 + unless defined $item; + + # return empty changelog + return 0 + unless $item->is_file && $item->is_open_ok; + + # emacs only looks at the last "local variables" in a file, and only at + # one within 3000 chars of EOF and on the last page (^L), but that's a bit + # pesky to replicate. Demanding a match of $prefix and $suffix ought to + # be enough to avoid false positives. + + my $contents; + if ($item->basename =~ m{ [.]gz $}x) { + + my $bytes = safe_qx('gunzip', '-c', $item->unpacked_path); + + return 0 + unless valid_utf8($bytes); + + $contents = decode_utf8($bytes); + + } else { + + # empty unless valis UTF-8 + $contents = $item->decoded_utf8; + } + + my @lines = split(m{\n}, $contents); + + my $prefix; + my $suffix; + my $real_start = 0; + + my $saw_tab_lead = 0; + + my $position = 1; + for my $line (@lines) { + + ++$real_start + unless $saw_tab_lead; + + $saw_tab_lead = 1 + if $line =~ /^\s+\S/; + + my $pointer = $item->pointer($position); + + if ( + $line + =~ m{ closes: \s* (( (?:bug)? [#]? \s? \d*) [[:alpha:]] \w*) }ix + || $line =~ m{ closes: \s* (?:bug)? [#]? \s? \d+ + (?: , \s* (?:bug)? [#]? \s? \d+ )* + (?: , \s* (( (?:bug)? [#]? \s? \d* ) [[:alpha:]] \w*)) }ix + ) { + + my $bug = $1; + + $self->pointed_hint('wrong-bug-number-in-closes', $pointer, $bug) + if length $2; + } + + if ($line =~ /^(.*)Local\ variables:(.*)$/i) { + $prefix = $1; + $suffix = $2; + } + + # emacs allows whitespace between prefix and variable, hence \s* + $self->pointed_hint( + 'debian-changelog-file-contains-obsolete-user-emacs-settings', + $pointer) + if defined $prefix + && defined $suffix + && $line =~ /^\Q$prefix\E\s*add-log-mailing-address:.*\Q$suffix\E$/; + + } continue { + ++$position; + } + + return $real_start; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Debian/Control/Field/Adopted.pm b/lib/Lintian/Check/Debian/Control/Field/Adopted.pm new file mode 100644 index 0000000..d9d9379 --- /dev/null +++ b/lib/Lintian/Check/Debian/Control/Field/Adopted.pm @@ -0,0 +1,98 @@ +# debian/control/field/adopted -- lintian check script -*- perl -*- +# +# Copyright (C) 2004 Marc Brockschmidt +# Copyright (C) 2020 Chris Lamb <lamby@debian.org> +# Copyright (C) 2020-2021 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Debian::Control::Field::Adopted; + +use v5.20; +use warnings; +use utf8; + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +sub source { + my ($self) = @_; + + my $control = $self->processable->debian_control; + my $source_fields = $control->source_fields; + + my $KNOWN_SOURCE_FIELDS= $self->data->load('common/source-fields'); + my $KNOWN_BINARY_FIELDS= $self->data->load('fields/binary-fields'); + + for my $field ($source_fields->names) { + + my ($marker, $bare) = split(qr{-}, $field, 2); + + next + unless length $marker + && length $bare; + + my $control_item= $self->processable->debian_control->item; + my $position = $source_fields->position($field); + my $pointer = $control_item->pointer($position); + + # case-insensitive match + $self->pointed_hint( + 'adopted-extended-field',$pointer, + '(in section for source)', $field + ) + if $marker =~ m{^ X }ix + && $KNOWN_SOURCE_FIELDS->resembles($bare); + } + + for my $installable ($control->installables) { + my $installable_fields = $control->installable_fields($installable); + + for my $field ($installable_fields->names) { + + my ($marker, $bare) = split(qr{-}, $field, 2); + + next + unless length $marker + && length $bare; + + my $control_item= $self->processable->debian_control->item; + my $position = $installable_fields->position($field); + my $pointer = $control_item->pointer($position); + + # case-insensitive match + $self->pointed_hint( + 'adopted-extended-field', $pointer, + "(in section for $installable)", $field + ) + if $marker =~ m{^ X }ix + && $KNOWN_BINARY_FIELDS->resembles($bare); + } + } + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Debian/Control/Field/Architecture/Multiline.pm b/lib/Lintian/Check/Debian/Control/Field/Architecture/Multiline.pm new file mode 100644 index 0000000..dbb5dc2 --- /dev/null +++ b/lib/Lintian/Check/Debian/Control/Field/Architecture/Multiline.pm @@ -0,0 +1,63 @@ +# debian/control/field/architecture/multiline -- lintian check script -*- perl -*- +# +# Copyright (C) 2004 Marc Brockschmidt +# Copyright (C) 2020 Chris Lamb <lamby@debian.org> +# Copyright (C) 2020-2021 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Debian::Control::Field::Architecture::Multiline; + +use v5.20; +use warnings; +use utf8; + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +sub source { + my ($self) = @_; + + my $control = $self->processable->debian_control; + + for my $installable ($control->installables) { + + my $installable_fields = $control->installable_fields($installable); + + my $field = 'Architecture'; + + my $control_item= $self->processable->debian_control->item; + my $position = $installable_fields->position($field); + my $pointer = $control_item->pointer($position); + + $self->pointed_hint('multiline-architecture-field', + $pointer, $field,"(in section for $installable)") + if $installable_fields->value($field)=~ /\n./; + } + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Debian/Control/Field/BuildProfiles.pm b/lib/Lintian/Check/Debian/Control/Field/BuildProfiles.pm new file mode 100644 index 0000000..50e9663 --- /dev/null +++ b/lib/Lintian/Check/Debian/Control/Field/BuildProfiles.pm @@ -0,0 +1,110 @@ +# debian/control/field/build-profiles -- lintian check script -*- perl -*- +# +# Copyright (C) 2004 Marc Brockschmidt +# Copyright (C) 2020 Chris Lamb <lamby@debian.org> +# Copyright (C) 2020-2021 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Debian::Control::Field::BuildProfiles; + +use v5.20; +use warnings; +use utf8; + +use Lintian::Relation; + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +sub source { + my ($self) = @_; + + my $control = $self->processable->debian_control; + + my $KNOWN_BUILD_PROFILES= $self->data->load('fields/build-profiles'); + + for my $installable ($control->installables) { + my $installable_fields = $control->installable_fields($installable); + + my $field = 'Build-Profiles'; + + my $raw = $installable_fields->value($field); + next + unless $raw; + + my $control_item= $self->processable->debian_control->item; + my $position = $installable_fields->position($field); + my $pointer = $control_item->pointer($position); + + if ( + $raw!~ m{^\s* # skip leading whitespace + < # first list start + !?[^\s<>]+ # (possibly negated) term + (?: # any additional terms + \s+ # start with a space + !?[^\s<>]+ # (possibly negated) term + )* # zero or more additional terms + > # first list end + (?: # any additional restriction lists + \s+ # start with a space + < # additional list start + !?[^\s<>]+ # (possibly negated) term + (?: # any additional terms + \s+ # start with a space + !?[^\s<>]+ # (possibly negated) term + )* # zero or more additional terms + > # additional list end + )* # zero or more additional lists + \s*$ # trailing spaces at the end + }x + ) { + $self->pointed_hint( + 'invalid-restriction-formula-in-build-profiles-field', + $pointer, $raw,"(in section for $installable)"); + + } else { + # parse the field and check the profile names + $raw =~ s/^\s*<(.*)>\s*$/$1/; + + for my $restrlist (split />\s+</, $raw) { + for my $profile (split /\s+/, $restrlist) { + + $profile =~ s/^!//; + + $self->pointed_hint( + 'invalid-profile-name-in-build-profiles-field', + $pointer, $profile,"(in section for $installable)") + unless $KNOWN_BUILD_PROFILES->recognizes($profile) + || $profile =~ /^pkg\.[a-z0-9][a-z0-9+.-]+\../; + } + } + } + } + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Debian/Control/Field/BuiltUsing.pm b/lib/Lintian/Check/Debian/Control/Field/BuiltUsing.pm new file mode 100644 index 0000000..560f89b --- /dev/null +++ b/lib/Lintian/Check/Debian/Control/Field/BuiltUsing.pm @@ -0,0 +1,66 @@ +# debian/control/field/built-using -- lintian check script -*- perl -*- +# +# Copyright (C) 2004 Marc Brockschmidt +# Copyright (C) 2020 Chris Lamb <lamby@debian.org> +# Copyright (C) 2020-2021 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Debian::Control::Field::BuiltUsing; + +use v5.20; +use warnings; +use utf8; + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +sub source { + my ($self) = @_; + + my $control = $self->processable->debian_control; + + for my $installable ($control->installables) { + my $installable_fields= $control->installable_fields($installable); + + my $field = 'Built-Using'; + + my $control_item= $self->processable->debian_control->item; + my $position = $installable_fields->position($field); + my $pointer = $control_item->pointer($position); + + $self->pointed_hint( + 'built-using-field-on-arch-all-package',$pointer, + "(in section for $installable)", $field, + $installable_fields->value($field) + ) + if $installable_fields->declares($field) + && $installable_fields->value('Architecture') eq 'all'; + } + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Debian/Control/Field/Description/Duplicate.pm b/lib/Lintian/Check/Debian/Control/Field/Description/Duplicate.pm new file mode 100644 index 0000000..294893b --- /dev/null +++ b/lib/Lintian/Check/Debian/Control/Field/Description/Duplicate.pm @@ -0,0 +1,114 @@ +# debian/control/field/description/duplicate -- lintian check script -*- perl -*- +# +# Copyright (C) 2004 Marc Brockschmidt +# Copyright (C) 2020 Chris Lamb <lamby@debian.org> +# Copyright (C) 2020-2021 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Debian::Control::Field::Description::Duplicate; + +use v5.20; +use warnings; +use utf8; + +use Const::Fast; + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +const my $EMPTY => q{}; + +sub source { + my ($self) = @_; + + my $control = $self->processable->debian_control; + + my %installables_by_synopsis; + my %installables_by_exended; + + for my $installable ($control->installables) { + + next + if $control->installable_package_type($installable) eq 'udeb'; + + my $installable_fields = $control->installable_fields($installable); + + my $description = $installable_fields->untrimmed_value('Description'); + next + unless length $description; + + my ($synopsis, $extended) = split(/\n/, $description, 2); + + $synopsis //= $EMPTY; + $extended //= $EMPTY; + + # trim both ends + $synopsis =~ s/^\s+|\s+$//g; + $extended =~ s/^\s+|\s+$//g; + + if (length $synopsis) { + $installables_by_synopsis{$synopsis} //= []; + push(@{$installables_by_synopsis{$synopsis}}, $installable); + } + + if (length $extended) { + $installables_by_exended{$extended} //= []; + push(@{$installables_by_exended{$extended}}, $installable); + } + } + + # check for duplicate short description + for my $synopsis (keys %installables_by_synopsis) { + + # Assume that substvars are correctly handled + next + if $synopsis =~ m/\$\{.+\}/; + + $self->pointed_hint( + 'duplicate-short-description', + $control->item->pointer, + (sort @{$installables_by_synopsis{$synopsis}}) + )if scalar @{$installables_by_synopsis{$synopsis}} > 1; + } + + # check for duplicate long description + for my $extended (keys %installables_by_exended) { + + # Assume that substvars are correctly handled + next + if $extended =~ m/\$\{.+\}/; + + $self->pointed_hint( + 'duplicate-long-description', + $control->item->pointer, + (sort @{$installables_by_exended{$extended}}) + )if scalar @{$installables_by_exended{$extended}} > 1; + } + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Debian/Control/Field/DoubledUp.pm b/lib/Lintian/Check/Debian/Control/Field/DoubledUp.pm new file mode 100644 index 0000000..1e1e69a --- /dev/null +++ b/lib/Lintian/Check/Debian/Control/Field/DoubledUp.pm @@ -0,0 +1,83 @@ +# debian/control/field/doubled-up -- lintian check script -*- perl -*- +# +# Copyright (C) 2004 Marc Brockschmidt +# Copyright (C) 2020 Chris Lamb <lamby@debian.org> +# Copyright (C) 2020-2021 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Debian::Control::Field::DoubledUp; + +use v5.20; +use warnings; +use utf8; + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +sub source { + my ($self) = @_; + + my $control = $self->processable->debian_control; + my $source_fields = $control->source_fields; + + # something like "Maintainer: Maintainer: bad field" + my @doubled_up_source_fields + = grep { $source_fields->value($_) =~ m{^ \Q$_\E \s* : }ix } + $source_fields->names; + + for my $field (@doubled_up_source_fields) { + + my $control_item= $self->processable->debian_control->item; + my $position = $source_fields->position($field); + my $pointer = $control_item->pointer($position); + + $self->pointed_hint('debian-control-repeats-field-name-in-value', + $pointer, '(in section for source)', $field); + } + + for my $installable ($control->installables) { + my $installable_fields = $control->installable_fields($installable); + + # something like "Maintainer: Maintainer: bad field" + my @doubled_up_installable_fields + = grep { $installable_fields->value($_) =~ m{^ \Q$_\E \s* : }ix } + $installable_fields->names; + + for my $field (@doubled_up_installable_fields) { + + my $control_item= $self->processable->debian_control->item; + my $position = $installable_fields->position($field); + my $pointer = $control_item->pointer($position); + + $self->pointed_hint('debian-control-repeats-field-name-in-value', + $pointer,"(in section for $installable)", $field); + } + } + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Debian/Control/Field/Empty.pm b/lib/Lintian/Check/Debian/Control/Field/Empty.pm new file mode 100644 index 0000000..15b48ca --- /dev/null +++ b/lib/Lintian/Check/Debian/Control/Field/Empty.pm @@ -0,0 +1,84 @@ +# debian/control/field/empty -- lintian check script -*- perl -*- +# +# Copyright (C) 2004 Marc Brockschmidt +# Copyright (C) 2020 Chris Lamb <lamby@debian.org> +# Copyright (C) 2020-2021 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Debian::Control::Field::Empty; + +use v5.20; +use warnings; +use utf8; + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +sub source { + my ($self) = @_; + + my $control = $self->processable->debian_control; + my $source_fields = $control->source_fields; + + my @empty_source_fields + = grep { !length $source_fields->value($_) } $source_fields->names; + + for my $field (@empty_source_fields) { + + my $control_item= $self->processable->debian_control->item; + my $position = $source_fields->position($field); + my $pointer = $control_item->pointer($position); + + $self->pointed_hint( + 'debian-control-has-empty-field', $pointer, + '(in source paragraph)', $field + ); + } + + for my $installable ($control->installables) { + my $installable_fields = $control->installable_fields($installable); + + my @empty_installable_fields + = grep { !length $installable_fields->value($_) } + $installable_fields->names; + + for my $field (@empty_installable_fields) { + + my $control_item= $self->processable->debian_control->item; + my $position = $installable_fields->position($field); + my $pointer = $control_item->pointer($position); + + $self->pointed_hint( + 'debian-control-has-empty-field',$pointer, + "(in section for $installable)", $field + ); + } + } + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Debian/Control/Field/Misplaced.pm b/lib/Lintian/Check/Debian/Control/Field/Misplaced.pm new file mode 100644 index 0000000..743be38 --- /dev/null +++ b/lib/Lintian/Check/Debian/Control/Field/Misplaced.pm @@ -0,0 +1,67 @@ +# debian/control/field/misplaced -- lintian check script -*- perl -*- +# +# Copyright (C) 2004 Marc Brockschmidt +# Copyright (C) 2020 Chris Lamb <lamby@debian.org> +# Copyright (C) 2020-2021 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Debian::Control::Field::Misplaced; + +use v5.20; +use warnings; +use utf8; + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +sub source { + my ($self) = @_; + + my $control = $self->processable->debian_control; + my $source_fields = $control->source_fields; + + my @build_fields + =qw{Build-Depends Build-Depends-Indep Build-Conflicts Build-Conflicts-Indep}; + + for my $installable ($control->installables) { + my $installable_fields = $control->installable_fields($installable); + + for my $field (@build_fields) { + + my $control_item= $self->processable->debian_control->item; + my $position = $installable_fields->position($field); + my $pointer = $control_item->pointer($position); + + $self->pointed_hint('build-prerequisite-in-installable-section', + $pointer, $field,"(in section for $installable)") + if $installable_fields->declares($field); + } + } + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Debian/Control/Field/Redundant.pm b/lib/Lintian/Check/Debian/Control/Field/Redundant.pm new file mode 100644 index 0000000..9f78dd4 --- /dev/null +++ b/lib/Lintian/Check/Debian/Control/Field/Redundant.pm @@ -0,0 +1,68 @@ +# debian/control/field/redundant -- lintian check script -*- perl -*- +# +# Copyright (C) 2004 Marc Brockschmidt +# Copyright (C) 2020 Chris Lamb <lamby@debian.org> +# Copyright (C) 2020-2021 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Debian::Control::Field::Redundant; + +use v5.20; +use warnings; +use utf8; + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +sub source { + my ($self) = @_; + + my $control = $self->processable->debian_control; + my $source_fields = $control->source_fields; + + for my $installable ($control->installables) { + my $installable_fields = $control->installable_fields($installable); + + for my $field ($installable_fields->names) { + + my $control_item= $self->processable->debian_control->item; + my $position = $installable_fields->position($field); + my $pointer = $control_item->pointer($position); + + $self->pointed_hint( + 'installable-field-mirrors-source',$pointer, + "(in section for $installable)", $field + ) + if $source_fields->declares($field) + && $installable_fields->value($field) eq + $source_fields->value($field); + } + } + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Debian/Control/Field/Relation.pm b/lib/Lintian/Check/Debian/Control/Field/Relation.pm new file mode 100644 index 0000000..3047971 --- /dev/null +++ b/lib/Lintian/Check/Debian/Control/Field/Relation.pm @@ -0,0 +1,180 @@ +# debian/control/field/relation -- lintian check script -*- perl -*- +# +# Copyright (C) 2004 Marc Brockschmidt +# Copyright (C) 2020 Chris Lamb <lamby@debian.org> +# Copyright (C) 2020-2021 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Debian::Control::Field::Relation; + +use v5.20; +use warnings; +use utf8; + +use Lintian::Relation; + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +sub source { + my ($self) = @_; + + my $control = $self->processable->debian_control; + my $source_fields = $control->source_fields; + + # Check that fields which should be comma-separated or + # pipe-separated have separators. Places where this tends to + # cause problems are with wrapped lines such as: + # + # Depends: foo, bar + # baz + # + # or with substvars. If two substvars aren't separated by a + # comma, but at least one of them expands to an empty string, + # there will be a lurking bug. The result will be syntactically + # correct, but as soon as both expand into something non-empty, + # there will be a syntax error. + # + # The architecture list can contain things that look like packages + # separated by spaces, so we have to remove any architecture + # restrictions first. This unfortunately distorts our report a + # little, but hopefully not too much. + # + # Also check for < and > relations. dpkg-gencontrol warns about + # them and then transforms them in the output to <= and >=, but + # it's easy to miss the error message. Similarly, check for + # duplicates, which dpkg-source eliminates. + + for my $field ( + qw(Build-Depends Build-Depends-Indep + Build-Conflicts Build-Conflicts-Indep) + ) { + next + unless $source_fields->declares($field); + + my $control_item= $self->processable->debian_control->item; + my $position = $source_fields->position($field); + my $pointer = $control_item->pointer($position); + + my @values = $source_fields->trimmed_list($field, qr{ \s* , \s* }x); + my @obsolete = grep { m{ [(] [<>] \s* [^<>=]+ [)] }x } @values; + + $self->pointed_hint( + 'obsolete-relation-form-in-source', + $pointer, '(in source paragraph)', + $field, $_ + )for @obsolete; + + my $raw = $source_fields->value($field); + my $relation = Lintian::Relation->new->load($raw); + + for my $redundant_set ($relation->redundancies) { + + $self->pointed_hint('redundant-control-relation', $pointer, + '(in source paragraph)', + $field,join(', ', sort @{$redundant_set})); + } + + $self->check_separators($raw, $pointer, '(in source paragraph)'); + } + + for my $installable ($control->installables) { + my $installable_fields = $control->installable_fields($installable); + + for my $field ( + qw(Pre-Depends Depends Recommends Suggests Breaks + Conflicts Provides Replaces Enhances) + ) { + next + unless $installable_fields->declares($field); + + my $control_item= $self->processable->debian_control->item; + my $position = $installable_fields->position($field); + my $pointer = $control_item->pointer($position); + + my @values + = $installable_fields->trimmed_list($field, qr{ \s* , \s* }x); + my @obsolete = grep { m{ [(] [<>] \s* [^<>=]+ [)] }x } @values; + + $self->pointed_hint( + 'obsolete-relation-form-in-source', + $pointer, "(in section for $installable)", + $field, $_ + )for @obsolete; + + my $relation + = $self->processable->binary_relation($installable, $field); + + for my $redundant_set ($relation->redundancies) { + + $self->pointed_hint( + 'redundant-control-relation', $pointer, + "(in section for $installable)", $field, + join(', ', sort @{$redundant_set}) + ); + } + + my $raw = $installable_fields->value($field); + $self->check_separators($raw, $pointer, + "(in section for $installable)"); + } + } + + return; +} + +sub check_separators { + my ($self, $string, $pointer, $explainer) = @_; + + $string =~ s/\n(\s)/$1/g; + $string =~ s/\[[^\]]*\]//g; + + if ( + $string =~ m{(?:^|\s) + ( + (?:\w[^\s,|\$\(]+|\$\{\S+:Depends\})\s* + (?:\([^\)]*\)\s*)? + ) + \s+ + ( + (?:\w[^\s,|\$\(]+|\$\{\S+:Depends\})\s* + (?:\([^\)]*\)\s*)? + )}x + ) { + my ($prev, $next) = ($1, $2); + + # trim right + $prev =~ s/\s+$//; + $next =~ s/\s+$//; + + $self->pointed_hint('missing-separator-between-items', + $pointer,$explainer, "'$prev' and '$next'"); + } + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Debian/Control/Field/RulesRequiresRoot.pm b/lib/Lintian/Check/Debian/Control/Field/RulesRequiresRoot.pm new file mode 100644 index 0000000..b97a673 --- /dev/null +++ b/lib/Lintian/Check/Debian/Control/Field/RulesRequiresRoot.pm @@ -0,0 +1,99 @@ +# debian/control/field/rules-requires-root -- lintian check script -*- perl -*- +# +# Copyright (C) 2004 Marc Brockschmidt +# Copyright (C) 2020 Chris Lamb <lamby@debian.org> +# Copyright (C) 2020-2021 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Debian::Control::Field::RulesRequiresRoot; + +use v5.20; +use warnings; +use utf8; + +use List::SomeUtils qw(first_value); + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +sub source { + my ($self) = @_; + + my $control = $self->processable->debian_control; + my $source_fields = $control->source_fields; + + my @r3_misspelled = grep { $_ ne 'Rules-Requires-Root' } + grep { m{^ Rules? - Requires? - Roots? $}xi } $source_fields->names; + + for my $field (@r3_misspelled) { + + my $control_item= $self->processable->debian_control->item; + my $position = $source_fields->position($field); + my $pointer = $control_item->pointer($position); + + $self->pointed_hint('spelling-error-in-rules-requires-root', + $pointer, $field); + } + + my $control_item= $self->processable->debian_control->item; + my $position = $source_fields->position('Rules-Requires-Root'); + my $pointer = $control_item->pointer($position); + + $self->pointed_hint('rules-do-not-require-root', $pointer) + if $source_fields->value('Rules-Requires-Root') eq 'no'; + + $self->pointed_hint('rules-require-root-explicitly', $pointer) + if $source_fields->declares('Rules-Requires-Root') + && $source_fields->value('Rules-Requires-Root') ne 'no'; + + $self->pointed_hint('silent-on-rules-requiring-root', $pointer) + unless $source_fields->declares('Rules-Requires-Root'); + + if ( !$source_fields->declares('Rules-Requires-Root') + || $source_fields->value('Rules-Requires-Root') eq 'no') { + + for my $installable ($self->group->get_installables) { + + my $user_owned_item + = first_value { $_->owner ne 'root' || $_->group ne 'root' } + @{$installable->installed->sorted_list}; + + next + unless defined $user_owned_item; + + my $owner = $user_owned_item->owner; + my $group = $user_owned_item->group; + + $self->pointed_hint('rules-silently-require-root', + $pointer, $installable->name, + "($owner:$group)", $user_owned_item->name); + } + } + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Debian/Control/Field/Section.pm b/lib/Lintian/Check/Debian/Control/Field/Section.pm new file mode 100644 index 0000000..dd0ba52 --- /dev/null +++ b/lib/Lintian/Check/Debian/Control/Field/Section.pm @@ -0,0 +1,52 @@ +# debian/control/field/section -- lintian check script -*- perl -*- +# +# Copyright (C) 2004 Marc Brockschmidt +# Copyright (C) 2020 Chris Lamb <lamby@debian.org> +# Copyright (C) 2020-2021 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Debian::Control::Field::Section; + +use v5.20; +use warnings; +use utf8; + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +sub source { + my ($self) = @_; + + my $control = $self->processable->debian_control; + my $source_fields = $control->source_fields; + + $self->pointed_hint('no-source-section', $control->item->pointer) + unless $source_fields->declares('Section'); + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Debian/Control/Field/Spacing.pm b/lib/Lintian/Check/Debian/Control/Field/Spacing.pm new file mode 100644 index 0000000..070ebdf --- /dev/null +++ b/lib/Lintian/Check/Debian/Control/Field/Spacing.pm @@ -0,0 +1,78 @@ +# debian/control/field/spacing -- lintian check script -*- perl -*- +# +# Copyright (C) 2004 Marc Brockschmidt +# Copyright (C) 2020 Chris Lamb <lamby@debian.org> +# Copyright (C) 2020-2021 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Debian::Control::Field::Spacing; + +use v5.20; +use warnings; +use utf8; + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +sub source { + my ($self) = @_; + + my $item = $self->processable->debian_control->item; + return + unless defined $item; + + my @lines = split(/\n/, $item->decoded_utf8); + + my $position = 1; + while (defined(my $line = shift @lines)) { + + # strip leading spaces + $line =~ s{\s*$}{}; + + next + if $line =~ m{^ [#]}x; + + # line with field: + if ($line =~ m{^ (\S+) : }x) { + + my $field = $1; + + my $pointer = $item->pointer($position); + + $self->pointed_hint('debian-control-has-unusual-field-spacing', + $pointer, $field) + unless $line =~ m{^ \S+ : [ ] \S }x + || $line =~ m{^ \S+ : $}x; + } + + } continue { + ++$position; + } + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Debian/Control/Link.pm b/lib/Lintian/Check/Debian/Control/Link.pm new file mode 100644 index 0000000..5f3f751 --- /dev/null +++ b/lib/Lintian/Check/Debian/Control/Link.pm @@ -0,0 +1,57 @@ +# debian/control/link -- lintian check script -*- perl -*- +# +# Copyright (C) 2004 Marc Brockschmidt +# Copyright (C) 2020 Chris Lamb <lamby@debian.org> +# Copyright (C) 2020-2021 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Debian::Control::Link; + +use v5.20; +use warnings; +use utf8; + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +sub source { + my ($self) = @_; + + my $debian_dir = $self->processable->patched->resolve_path('debian/'); + return + unless $debian_dir; + + my $item = $debian_dir->child('control'); + return + unless $item; + + $self->pointed_hint('debian-control-file-is-a-symlink', $item->pointer) + if $item->is_symlink; + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Debian/Control/Prerequisite/Circular.pm b/lib/Lintian/Check/Debian/Control/Prerequisite/Circular.pm new file mode 100644 index 0000000..7cd78e5 --- /dev/null +++ b/lib/Lintian/Check/Debian/Control/Prerequisite/Circular.pm @@ -0,0 +1,74 @@ +# debian/control/prerequisite/circular -- lintian check script -*- perl -*- +# +# Copyright (C) 2004 Marc Brockschmidt +# Copyright (C) 2020 Chris Lamb <lamby@debian.org> +# Copyright (C) 2020-2021 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Debian::Control::Prerequisite::Circular; + +use v5.20; +use warnings; +use utf8; + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +sub source { + my ($self) = @_; + + my $control = $self->processable->debian_control; + + my @prerequisite_fields = qw(Pre-Depends Depends Recommends Suggests); + + for my $installable ($control->installables) { + my $installable_fields = $control->installable_fields($installable); + + for my $field (@prerequisite_fields) { + + next + unless $control->installable_fields($installable) + ->declares($field); + + my $relation + = $self->processable->binary_relation($installable, $field); + + my $control_item= $self->processable->debian_control->item; + my $position = $installable_fields->position($field); + my $pointer = $control_item->pointer($position); + + $self->pointed_hint( + 'circular-installation-prerequisite', + $pointer, "(in section for $installable)", + $field,$relation->to_string + )if $relation->satisfies($installable); + } + } + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Debian/Control/Prerequisite/Development.pm b/lib/Lintian/Check/Debian/Control/Prerequisite/Development.pm new file mode 100644 index 0000000..948076f --- /dev/null +++ b/lib/Lintian/Check/Debian/Control/Prerequisite/Development.pm @@ -0,0 +1,145 @@ +# debian/control/prerequisite/development -- lintian check script -*- perl -*- +# +# Copyright (C) 2004 Marc Brockschmidt +# Copyright (C) 2020 Chris Lamb <lamby@debian.org> +# Copyright (C) 2020-2021 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Debian::Control::Prerequisite::Development; + +use v5.20; +use warnings; +use utf8; + +use Const::Fast; +use List::SomeUtils qw(any); + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +const my $EMPTY => q{}; + +sub source { + my ($self) = @_; + + my $control = $self->processable->debian_control; + + for my $installable ($control->installables) { + my $installable_fields = $control->installable_fields($installable); + + next + unless $installable =~ /-dev$/; + + my $field = 'Depends'; + + next + unless $installable_fields->declares($field); + + my $control_item= $self->processable->debian_control->item; + my $position = $installable_fields->position($field); + my $pointer = $control_item->pointer($position); + + my @depends + = $installable_fields->trimmed_list($field, qr{ \s* , \s* }x); + + for my $other_name ($control->installables) { + + next + if $other_name =~ /-(?:dev|docs?|common)$/; + + next + unless $other_name =~ /^lib[\w.+-]+\d/; + + my @relevant + = grep { m{ (?: ^ | [\s|] ) \Q$other_name\E (?: [\s|(] | \z ) }x } + @depends; + + # If there are any alternatives here, something special is + # going on. Assume that the maintainer knows what they're + # doing. Otherwise, separate out just the versions. + next + if any { m{ [|] }x } @relevant; + + my @unsorted; + for my $package (@relevant) { + + $package =~ m{^ [\w.+-]+ \s* [(] ([^)]+) [)] }x; + push(@unsorted, ($1 // $EMPTY)); + } + + my @versions = sort @unsorted; + + my $context; + + # If there's only one mention of this package, the dependency + # should be tight. Otherwise, there should be both >>/>= and + # <</<= dependencies that mention the source, binary, or + # upstream version. If there are more than three mentions of + # the package, again something is weird going on, so we assume + # they know what they're doing. + if (@relevant == 1) { + unless ($versions[0] + =~ /^\s*=\s*\$\{(?:binary:Version|Source-Version)\}/) { + # Allow "pkg (= ${source:Version})" if (but only if) + # the target is an arch:all package. This happens + # with a lot of mono-packages. + # + # Note, we do not check if the -dev package is + # arch:all as well. The version-substvars check + # handles that for us. + next + if $control->installable_fields($other_name) + ->value('Architecture') eq 'all' + && $versions[0] + =~ m{^ \s* = \s* \$[{]source:Version[}] }x; + + $context = $relevant[0]; + } + + } elsif (@relevant == 2) { + unless ( + $versions[0] =~ m{^ \s* <[=<] \s* \$[{] + (?: (?:binary|source):(?:Upstream-)?Version + | Source-Version) [}] }xsm + && $versions[1] =~ m{^ \s* >[=>] \s* \$[{] + (?: (?:binary|source):(?:Upstream-)?Version + | Source-Version) [}] }xsm + ) { + $context = "$relevant[0], $relevant[1]"; + } + } + + $self->pointed_hint('weak-library-dev-dependency', + $pointer, "(in section for $installable)", + $field, $context) + if length $context; + } + } + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Debian/Control/Prerequisite/Redundant.pm b/lib/Lintian/Check/Debian/Control/Prerequisite/Redundant.pm new file mode 100644 index 0000000..08ea510 --- /dev/null +++ b/lib/Lintian/Check/Debian/Control/Prerequisite/Redundant.pm @@ -0,0 +1,99 @@ +# debian/control/prerequisitie/redundant -- lintian check script -*- perl -*- +# +# Copyright (C) 2004 Marc Brockschmidt +# Copyright (C) 2020 Chris Lamb <lamby@debian.org> +# Copyright (C) 2020-2021 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Debian::Control::Prerequisite::Redundant; + +use v5.20; +use warnings; +use utf8; + +use Const::Fast; + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +const my $ARROW => q{->}; + +sub source { + my ($self) = @_; + + my $control = $self->processable->debian_control; + + # Make sure that a stronger dependency field doesn't satisfy any of + # the elements of a weaker dependency field. dpkg-gencontrol will + # fix this up for us, but we want to check the source package + # since dpkg-gencontrol may silently "fix" something that's a more + # subtle bug. + + # ordered from stronger to weaker + my @ordered_fields = qw(Pre-Depends Depends Recommends Suggests); + + for my $installable ($control->installables) { + my $installable_fields = $control->installable_fields($installable); + + my @remaining_fields = @ordered_fields; + + for my $stronger (@ordered_fields) { + + shift @remaining_fields; + + next + unless $control->installable_fields($installable) + ->declares($stronger); + + my $control_item= $self->processable->debian_control->item; + my $position = $installable_fields->position($stronger); + my $pointer = $control_item->pointer($position); + + my $relation + = $self->processable->binary_relation($installable,$stronger); + + for my $weaker (@remaining_fields) { + + my @prerequisites = $control->installable_fields($installable) + ->trimmed_list($weaker, qr{\s*,\s*}); + + for my $prerequisite (@prerequisites) { + + $self->pointed_hint( + 'redundant-installation-prerequisite',$pointer, + "(in section for $installable)",$weaker, + $ARROW, $stronger, + $prerequisite + )if $relation->satisfies($prerequisite); + } + } + } + } + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Debian/Copyright.pm b/lib/Lintian/Check/Debian/Copyright.pm new file mode 100644 index 0000000..6eb8900 --- /dev/null +++ b/lib/Lintian/Check/Debian/Copyright.pm @@ -0,0 +1,586 @@ +# copyright -- lintian check script -*- perl -*- + +# Copyright (C) 1998 Christian Schwarz +# Copyright (C) 1998 Richard Braakman +# Copyright (C) 2011 Jakub Wilk +# Copyright (C) 2020 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Debian::Copyright; + +use v5.20; +use warnings; +use utf8; + +use Const::Fast; +use List::SomeUtils qw(any all none uniq); +use Path::Tiny; +use Syntax::Keyword::Try; +use Unicode::UTF8 qw(valid_utf8 decode_utf8 encode_utf8); + +use Lintian::Deb822; +use Lintian::IPC::Run3 qw(safe_qx); +use Lintian::Spelling qw(check_spelling); + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +const my $EMPTY => q{}; + +const my $APPROXIMATE_GPL_LENGTH => 12_000; +const my $APPROXIMATE_GFDL_LENGTH => 12_000; +const my $APPROXIMATE_APACHE_2_LENGTH => 10_000; + +sub spelling_tag_emitter { + my ($self, @orig_args) = @_; + + return sub { + return $self->hint(@orig_args, @_); + }; +} + +sub source { + my ($self) = @_; + + my $debian_dir = $self->processable->patched->resolve_path('debian/'); + return + unless defined $debian_dir; + + my @installables = $self->processable->debian_control->installables; + my @additional = map { $_ . '.copyright' } @installables; + + my @candidates = ('copyright', @additional); + my @files = grep { defined } map { $debian_dir->child($_) } @candidates; + + # look for <pkgname>.copyright for a single installable + if (@files == 1) { + my $single = $files[0]; + + $self->pointed_hint('named-copyright-for-single-installable', + $single->pointer) + unless $single->name eq 'debian/copyright'; + } + + $self->hint('no-debian-copyright-in-source') + unless @files; + + my @symlinks = grep { $_->is_symlink } @files; + $self->pointed_hint('debian-copyright-is-symlink', $_->pointer) + for @symlinks; + + return; +} + +# no copyright in udebs +sub binary { + my ($self) = @_; + + my $package = $self->processable->name; + + # looking up entry without slash first; index should not be so picky + my $doclink + = $self->processable->installed->lookup("usr/share/doc/$package"); + if ($doclink && $doclink->is_symlink) { + + # check if this symlink references a directory elsewhere + if ($doclink->link =~ m{^(?:\.\.)?/}s) { + $self->pointed_hint( + 'usr-share-doc-symlink-points-outside-of-usr-share-doc', + $doclink->pointer, $doclink->link); + return; + } + + # The symlink may point to a subdirectory of another + # /usr/share/doc directory. This is allowed if this + # package depends on link and both packages come from the + # same source package. + # + # Policy requires that packages be built from the same + # source if they're going to do this, which by my (rra's) + # reading means that we should have a strict version + # dependency. However, in practice the copyright file + # doesn't change a lot and strict version dependencies + # cause other problems (such as with arch: any / arch: all + # package combinations and binNMUs). + # + # We therefore just require the dependency for now and + # don't worry about the version number. + my $link = $doclink->link; + $link =~ s{/.*}{}; + + unless ($self->depends_on($self->processable, $link)) { + $self->hint('usr-share-doc-symlink-without-dependency', $link); + + return; + } + + # Check if the link points to a package from the same source. + $self->check_cross_link($link); + + return; + } + + # now with a slash; indicates directory + my $docdir + = $self->processable->installed->lookup("usr/share/doc/$package/"); + unless ($docdir) { + $self->hint('no-copyright-file'); + return; + } + + my $found = 0; + my $zipped = $docdir->child('copyright.gz'); + if (defined $zipped) { + + $self->pointed_hint('copyright-file-compressed', $zipped->pointer); + $found = 1; + } + + my $linked = 0; + + my $item = $docdir->child('copyright'); + if (defined $item) { + $found = 1; + + if ($item->is_symlink) { + + $self->pointed_hint('copyright-file-is-symlink', $item->pointer); + $linked = 1; + # fall through; coll/copyright-file prevents reading through evil link + } + } + + unless ($found) { + + # #522827: special exception for perl for now + $self->hint('no-copyright-file') + unless $package eq 'perl'; + + return; + } + + my $copyrigh_path; + + my $uncompressed + = $self->processable->installed->resolve_path( + "usr/share/doc/$package/copyright"); + $copyrigh_path = $uncompressed->unpacked_path + if defined $uncompressed; + + my $compressed + = $self->processable->installed->resolve_path( + "usr/share/doc/$package/copyright.gz"); + if (defined $compressed) { + + my $bytes = safe_qx('gunzip', '-c', $compressed->unpacked_path); + my $contents = decode_utf8($bytes); + + my $extracted + = path($self->processable->basedir)->child('copyright')->stringify; + path($extracted)->spew($contents); + + $copyrigh_path = $extracted; + } + + return + unless length $copyrigh_path; + + my $bytes = path($copyrigh_path)->slurp; + + # another check complains about invalid encoding + return + unless valid_utf8($bytes); + + # check contents of copyright file + my $contents = decode_utf8($bytes); + + $self->hint('copyright-has-crs') + if $contents =~ /\r/; + + my $wrong_directory_detected = 0; + + my $KNOWN_COMMON_LICENSES + = $self->data->load('copyright-file/common-licenses'); + + if ($contents =~ m{ (usr/share/common-licenses/ ( [^ \t]*? ) \.gz) }xsm) { + my ($path, $license) = ($1, $2); + if ($KNOWN_COMMON_LICENSES->recognizes($license)) { + $self->hint('copyright-refers-to-compressed-license', $path); + } + } + + # Avoid complaining about referring to a versionless license file + # if the word "version" appears nowhere in the copyright file. + # This won't catch all of our false positives for GPL references + # that don't include a specific version number, but it will get + # the obvious ones. + if ($contents =~ m{(usr/share/common-licenses/(L?GPL|GFDL))([^-])}i) { + my ($ref, $license, $separator) = ($1, $2, $3); + if ($separator =~ /[\d\w]/) { + $self->hint('copyright-refers-to-nonexistent-license-file', + "$ref$separator"); + } elsif ($contents =~ /\b(?:any|or)\s+later(?:\s+version)?\b/i + || $contents =~ /License: $license-[\d\.]+\+/i + || $contents =~ /as Perl itself/i + || $contents =~ /License-Alias:\s+Perl/ + || $contents =~ /License:\s+Perl/) { + $self->hint('copyright-refers-to-symlink-license', $ref); + } else { + $self->hint('copyright-refers-to-versionless-license-file', $ref) + if $contents =~ /\bversion\b/; + } + } + + # References to /usr/share/common-licenses/BSD are deprecated as of Policy + # 3.8.5. + if ($contents =~ m{/usr/share/common-licenses/BSD}) { + $self->hint('copyright-refers-to-deprecated-bsd-license-file'); + } + + if ($contents =~ m{(usr/share/common-licences)}) { + $self->hint('copyright-refers-to-incorrect-directory', $1); + $wrong_directory_detected = 1; + } + + if ($contents =~ m{usr/share/doc/copyright}) { + $self->hint('copyright-refers-to-old-directory'); + $wrong_directory_detected = 1; + } + + if ($contents =~ m{usr/doc/copyright}) { + $self->hint('copyright-refers-to-old-directory'); + $wrong_directory_detected = 1; + } + + # Lame check for old FSF zip code. Try to avoid false positives from other + # Cambridge, MA addresses. + if ($contents =~ m/(?:Free\s*Software\s*Foundation.*02139|02111-1307)/s) { + $self->hint('old-fsf-address-in-copyright-file'); + } + + # Whether the package is covered by the GPL, used later for the + # libssl check. + my $gpl; + + if ( + length $contents > $APPROXIMATE_GPL_LENGTH + && ( + $contents =~ m{ \b \QGNU GENERAL PUBLIC LICENSE\E \s* + \QTERMS AND CONDITIONS FOR COPYING,\E \s* + \QDISTRIBUTION AND MODIFICATION\E \b }msx + || ( + $contents =~ m{ \b \QGNU GENERAL PUBLIC LICENSE\E + \s* \QVersion 3\E }msx + && $contents =~ m{ \b \QTERMS AND CONDITIONS\E \s }msx + ) + ) + ) { + $self->hint('copyright-file-contains-full-gpl-license'); + $gpl = 1; + } + + if ( + length $contents > $APPROXIMATE_GFDL_LENGTH + && $contents =~ m{ \b \QGNU Free Documentation License\E + \s* \QVersion 1.2\E }msx + && $contents =~ m{ \b \Q1. APPLICABILITY AND DEFINITIONS\E }msx + ) { + + $self->hint('copyright-file-contains-full-gfdl-license'); + } + + if ( length $contents > $APPROXIMATE_APACHE_2_LENGTH + && $contents =~ m{ \b \QApache License\E \s+ \QVersion 2.0,\E }msx + && $contents + =~ m{ \QTERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\E }msx + ) { + + $self->hint('copyright-file-contains-full-apache-2-license'); + } + + # wtf? + if ( ($contents =~ m{common-licenses(/\S+)}) + && ($contents !~ m{/usr/share/common-licenses/})) { + $self->hint('copyright-does-not-refer-to-common-license-file', $1); + } + + # This check is a bit prone to false positives, since some other + # licenses mention the GPL. Also exclude any mention of the GPL + # following what looks like mail header fields, since sometimes + # e-mail discussions of licensing are included in the copyright + # file but aren't referring to the license of the package. + unless ( + $contents =~ m{/usr/share/common-licenses} + || $contents =~ m/Zope Public License/ + || $contents =~ m/LICENSE AGREEMENT FOR PYTHON 1.6.1/ + || $contents =~ m/LaTeX Project Public License/ + || $contents + =~ m/(?:^From:.*^To:|^To:.*^From:).*(?:GNU General Public License|GPL)/ms + || $contents =~ m/AFFERO GENERAL PUBLIC LICENSE/ + || $contents =~ m/GNU Free Documentation License[,\s]*Version 1\.1/ + || $contents =~ m/CeCILL FREE SOFTWARE LICENSE AGREEMENT/ #v2.0 + || $contents =~ m/FREE SOFTWARE LICENSING AGREEMENT CeCILL/ #v1.1 + || $contents =~ m/CNRI OPEN SOURCE GPL-COMPATIBLE LICENSE AGREEMENT/ + || $contents =~ m/compatible\s+with\s+(?:the\s+)?(?:GNU\s+)?GPL/ + || $contents =~ m/(?:GNU\s+)?GPL\W+compatible/ + || $contents + =~ m/was\s+previously\s+(?:distributed\s+)?under\s+the\s+GNU/ + || $contents + =~ m/means\s+either\s+the\s+GNU\s+General\s+Public\s+License/ + || $wrong_directory_detected + ) { + if ( + check_names_texts( + $contents, + qr/\b(?:GFDL|gnu[-_]free[-_]documentation[-_]license)\b/i, + qr/GNU Free Documentation License|(?-i:\bGFDL\b)/i + ) + ) { + $self->hint('copyright-not-using-common-license-for-gfdl'); + }elsif ( + check_names_texts( + $contents, +qr/\b(?:LGPL|gnu[-_](?:lesser|library)[-_]general[-_]public[-_]license)\b/i, +qr/GNU (?:Lesser|Library) General Public License|(?-i:\bLGPL\b)/i + ) + ) { + $self->hint('copyright-not-using-common-license-for-lgpl'); + }elsif ( + check_names_texts( + $contents, + qr/\b(?:GPL|gnu[-_]general[-_]public[-_]license)\b/i, + qr/GNU General Public License|(?-i:\bGPL\b)/i + ) + ) { + $self->hint('copyright-not-using-common-license-for-gpl'); + $gpl = 1; + }elsif ( + check_names_texts( + $contents,qr/\bapache[-_]2/i, + qr/\bApache License\s*,?\s*Version 2|\b(?-i:Apache)-2/i + ) + ) { + $self->hint('copyright-not-using-common-license-for-apache2'); + } + } + + if ( + check_names_texts( + $contents, + qr/\b(?:perl|artistic)\b/, + sub { + my ($text) = @_; + $text + =~ /(?:under )?(?:the )?(?:same )?(?:terms )?as Perl itself\b/i + && $text !~ m{usr/share/common-licenses/}; + } + ) + ) { + $self->hint('copyright-file-lacks-pointer-to-perl-license'); + } + + # Checks for various packaging helper boilerplate. + + $self->hint('helper-templates-in-copyright') + if $contents =~ m{<fill in (?:http/)?ftp site>} + || $contents =~ /<Must follow here>/ + || $contents =~ /<Put the license of the package here/ + || $contents =~ /<put author[\'\(]s\)? name and email here>/ + || $contents =~ /<Copyright \(C\) YYYY Name OfAuthor>/ + || $contents =~ /Upstream Author\(s\)/ + || $contents =~ /<years>/ + || $contents =~ /<special license>/ + || $contents + =~ /<Put the license of the package here indented by 1 space>/ + || $contents + =~ /<This follows the format of Description: lines\s*in control file>/ + || $contents =~ /<Including paragraphs>/ + || $contents =~ /<likewise for another author>/; + + # dh-make-perl + $self->hint('copyright-contains-automatically-extracted-boilerplate') + if $contents =~ /This copyright info was automatically extracted/; + + $self->hint('helper-templates-in-copyright') + if $contents =~ /<INSERT COPYRIGHT YEAR\(S\) HERE>/; + + $self->hint('copyright-has-url-from-dh_make-boilerplate') + if $contents =~ m{url://}; + + # dh-make boilerplate + my @dh_make_boilerplate = ( +"# Please also look if there are files or directories which have a\n# different copyright/license attached and list them here.", +"# If you want to use GPL v2 or later for the /debian/* files use\n# the following clauses, or change it to suit. Delete these two lines" + ); + + $self->hint('copyright-contains-dh_make-todo-boilerplate') + if any { $contents =~ /$_/ } @dh_make_boilerplate; + + $self->hint('copyright-with-old-dh-make-debian-copyright') + if $contents =~ /The\s+Debian\s+packaging\s+is\s+\(C\)\s+\d+/i; + + # Other flaws in the copyright phrasing or contents. + if ($found && !$linked) { + $self->hint('copyright-without-copyright-notice') + unless $contents + =~ m{(?:Copyright|Copr\.|\N{COPYRIGHT SIGN})(?:.*|[\(C\):\s]+)\b\d{4}\b + |\bpublic(?:\s+|-)domain\b}xi; + } + + check_spelling( + $self->data,$contents, + $self->group->spelling_exceptions, + $self->spelling_tag_emitter('spelling-error-in-copyright'), 0 + ); + + # Now, check for linking against libssl if the package is covered + # by the GPL. (This check was requested by ftp-master.) First, + # see if the package is under the GPL alone and try to exclude + # packages with a mix of GPL and LGPL or Artistic licensing or + # with an exception or exemption. + if (($gpl || $contents =~ m{/usr/share/common-licenses/GPL}) + &&$contents + !~ m{exception|exemption|/usr/share/common-licenses/(?!GPL)\S}){ + + my @depends + = split(/\s*,\s*/,$self->processable->fields->value('Depends')); + my @predepends + = split(/\s*,\s*/,$self->processable->fields->value('Pre-Depends')); + + $self->hint('possible-gpl-code-linked-with-openssl') + if any { /^libssl[0-9.]+(?:\s|\z)/ && !/\|/ }(@depends, @predepends); + } + + return; +} # </run> + +# ----------------------------------- + +# Returns true if the package whose information is in $processable depends $package +# or if $package is essential. +sub depends_on { + my ($self, $processable, $package) = @_; + + my $KNOWN_ESSENTIAL = $self->data->load('fields/essential'); + + return 1 + if $KNOWN_ESSENTIAL->recognizes($package); + + my $strong = $processable->relation('strong'); + return 1 + if $strong->satisfies($package); + + my $arch = $processable->architecture; + return 1 + if $arch ne 'all' and $strong->satisfies("${package}:${arch}"); + + return 0; +} + +# Checks cross pkg links for /usr/share/doc/$pkg links +sub check_cross_link { + my ($self, $foreign) = @_; + + my $source = $self->group->source; + if ($source) { + + # source package is available; check its list of binaries + return + if any { $foreign eq $_ } $source->debian_control->installables; + + $self->hint('usr-share-doc-symlink-to-foreign-package', $foreign); + + } else { + # The source package is not available, but the binary could + # be present anyway; If they are in the same group, they claim + # to have the same source (and source version) + return + if any { $_->name eq $foreign }$self->group->get_installables; + + # It was not, but since the source package was not present, we cannot + # tell if it is foreign or not at this point. + + $self->hint( +'cannot-check-whether-usr-share-doc-symlink-points-to-foreign-package' + ); + } + + return; +} + +# Checks the name and text of every license in the file against given name and +# text check coderefs, if the file is in the new format, if the file is in the +# old format only runs the text coderef against the whole file. +sub check_names_texts { + my ($contents, $name_check, $action) = @_; + + my $text_check; + + if ((ref($action) || $EMPTY) eq 'Regexp') { + $text_check = sub { + my ($textref) = @_; + return ${$textref} =~ $action; + }; + + } else { + $text_check = sub { + my ($textref) = @_; + return $action->(${$textref}); + }; + } + + my $deb822 = Lintian::Deb822->new; + + my @paragraphs; + try { + @paragraphs = $deb822->parse_string($contents); + + } catch { + # parse error: copyright not in new format, just check text + return $text_check->(\$contents); + } + + my @licenses = grep { length } map { $_->value('License') } @paragraphs; + for my $license (@licenses) { + + my ($name, $text) = ($license =~ /^\s*([^\r\n]+)\r?\n(.*)\z/s); + + next + unless length $text; + + next + if $text =~ /^[\s\r\n]*\z/; + + return 1 + if $name =~ $name_check + && $text_check->(\$text); + } + + # did not match anything + return 0; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Debian/Copyright/ApacheNotice.pm b/lib/Lintian/Check/Debian/Copyright/ApacheNotice.pm new file mode 100644 index 0000000..72e91b4 --- /dev/null +++ b/lib/Lintian/Check/Debian/Copyright/ApacheNotice.pm @@ -0,0 +1,105 @@ +# debian/copyright/apache-notice -- lintian check script -*- perl -*- + +# Copyright (C) 1998 Christian Schwarz +# Copyright (C) 2011 Jakub Wilk +# Copyright (C) 2020 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Debian::Copyright::ApacheNotice; + +use v5.20; +use warnings; +use utf8; + +use Const::Fast; +use List::SomeUtils qw(any); + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +const my $SPACE => q{ }; + +sub source { + my ($self) = @_; + + my $debian_dir = $self->processable->patched->resolve_path('debian/'); + return + unless defined $debian_dir; + + my @installables = $self->processable->debian_control->installables; + my @additional = map { $_ . '.copyright' } @installables; + + my @candidates = ('copyright', @additional); + my @files = grep { defined } map { $debian_dir->child($_) } @candidates; + + # another check complains about legacy encoding, if needed + my @valid_utf8 = grep { $_->is_valid_utf8 } @files; + + $self->check_apache_notice_files($_)for @valid_utf8; + + return; +} + +sub check_apache_notice_files { + my ($self, $file) = @_; + + my $contents = $file->decoded_utf8; + return + unless $contents =~ /apache[-\s]+2\./i; + + my @notice_files = grep { + $_->basename =~ /^NOTICE(\.txt)?$/ + and $_->is_open_ok + and $_->bytes =~ /apache/i + } @{$self->processable->patched->sorted_list}; + return + unless @notice_files; + + my @binaries = grep { $_->type ne 'udeb' } $self->group->get_installables; + return + unless @binaries; + + for my $binary (@binaries) { + + # look at all path names in the package + my @names = map { $_->name } @{$binary->installed->sorted_list}; + + # and also those shipped in jars + my @jars = grep { scalar keys %{$_->java_info} } + @{$binary->installed->sorted_list}; + push(@names, keys %{$_->java_info->{files}})for @jars; + + return + if any { m{/NOTICE(\.txt)?(\.gz)?$} } @names; + } + + $self->pointed_hint('missing-notice-file-for-apache-license', $_->pointer) + for @notice_files; + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Debian/Copyright/Dep5.pm b/lib/Lintian/Check/Debian/Copyright/Dep5.pm new file mode 100644 index 0000000..29bca3b --- /dev/null +++ b/lib/Lintian/Check/Debian/Copyright/Dep5.pm @@ -0,0 +1,944 @@ +# debian/copyright/dep5 -- lintian check script -*- perl -*- + +# Copyright (C) 1998 Christian Schwarz +# Copyright (C) 2011 Jakub Wilk +# Copyright (C) 2020 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Debian::Copyright::Dep5; + +use v5.20; +use warnings; +use utf8; + +use Const::Fast; +use List::Compare; +use List::SomeUtils qw(any all none uniq); +use Syntax::Keyword::Try; +use Regexp::Wildcards; +use Time::Piece; +use XML::LibXML; + +use Lintian::Deb822; +use Lintian::Relation::Version qw(versions_compare); +use Lintian::Util qw(match_glob); + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +const my $LAST_SIGNIFICANT_DEP5_CHANGE => '0+svn~166'; +const my $LAST_DEP5_OVERHAUL => '0+svn~148'; + +const my $EMPTY => q{}; +const my $SPACE => q{ }; +const my $SLASH => q{/}; +const my $COLON => q{:}; +const my $HYPHEN => q{-}; +const my $ASTERISK => q{*}; + +const my $MINIMUM_CREATIVE_COMMMONS_LENGTH => 20; +const my $LAST_ITEM => -1; + +const my %NEW_FIELD_NAMES => ( + 'Format-Specification' => 'Format', + 'Maintainer' => 'Upstream-Contact', + 'Upstream-Maintainer' => 'Upstream-Contact', + 'Contact' => 'Upstream-Contact', + 'Name' => 'Upstream-Name', +); + +sub source { + my ($self) = @_; + + my $debian_dir = $self->processable->patched->resolve_path('debian/'); + return + unless defined $debian_dir; + + my @installables = $self->processable->debian_control->installables; + my @additional = map { $_ . '.copyright' } @installables; + + my @candidates = ('copyright', @additional); + my @files = grep { defined $_ && !$_->is_symlink } + map { $debian_dir->child($_) } @candidates; + + # another check complains about legacy encoding, if needed + my @valid_utf8 = grep { $_->is_valid_utf8 } @files; + + $self->check_dep5_copyright($_) for @valid_utf8; + + return; +} + +# The policy states, since 4.0.0, that people should use "https://" for the +# format URI. This is checked later in check_dep5_copyright. +# return undef is not dep5 and '' if unknown version +sub find_dep5_version { + my ($self, $file, $original_uri) = @_; + + my $uri = $original_uri; + my $version; + + if ($uri =~ /\b(?:rev=REVISION|VERSIONED_FORMAT_URL)\b/) { + + $self->pointed_hint('boilerplate-copyright-format-uri', + $file->pointer,$uri); + return undef; + } + + if ( + $uri =~ s{ https?://wiki\.debian\.org/ + Proposals/CopyrightFormat\b}{}xsm + ){ + $version = '0~wiki'; + + $version = "$version~$1" + if $uri =~ /^\?action=recall&rev=(\d+)$/; + + return $version; + } + + if ($uri =~ m{^https?://dep(-team\.pages)?\.debian\.net/deps/dep5/?$}) { + + $version = '0+svn'; + return $version; + } + + if ( + $uri =~ s{\A https?://svn\.debian\.org/ + wsvn/dep/web/deps/dep5\.mdwn\b}{}xsm + ){ + $version = '0+svn'; + + $version = "$version~$1" + if $uri =~ /^\?(?:\S+[&;])?rev=(\d+)(?:[&;]\S+)?$/; + + return $version; + } + if ( + $uri =~ s{ \A https?://(?:svn|anonscm)\.debian\.org/ + viewvc/dep/web/deps/dep5\.mdwn\b}{}xsm + ){ + $version = '0+svn'; + $uri =~ m{\A \? (?:\S+[&;])? + (?:pathrev|revision|rev)=(\d+)(?:[&;]\S+)? + \Z}xsm + and $version = "$version~$1"; + return $version; + } + if ( + $uri =~ m{ \A + https?://www\.debian\.org/doc/ + (?:packaging-manuals/)?copyright-format/(\d+\.\d+)/? + \Z}xsm + ){ + $version = $1; + return $version; + } + + $self->pointed_hint('unknown-copyright-format-uri', + $file->pointer, $original_uri); + + return undef; +} + +sub check_dep5_copyright { + my ($self, $copyright_file) = @_; + + my $contents = $copyright_file->decoded_utf8; + + if ($contents =~ /^Files-Excluded:/m) { + + if ($contents + =~ m{^Format:.*/doc/packaging-manuals/copyright-format/1.0/?$}m) { + + $self->pointed_hint('repackaged-source-not-advertised', + $copyright_file->pointer) + unless $self->processable->repacked + || $self->processable->native; + + } else { + $self->pointed_hint('files-excluded-without-copyright-format-1.0', + $copyright_file->pointer); + } + } + + unless ( + $contents =~ m{ + (?:^ | \n) + (?i: format(?: [:] |[-\s]spec) ) + (?: . | \n\s+ )* + (?: /dep[5s]?\b | \bDEP ?5\b + | [Mm]achine-readable\s(?:license|copyright) + | /copyright-format/ | CopyrightFormat + | VERSIONED_FORMAT_URL + ) }x + ){ + + $self->pointed_hint('no-dep5-copyright', $copyright_file->pointer); + return; + } + + # get format before parsing as a debian control file + my $first_para = $contents; + $first_para =~ s/^#.*//mg; + $first_para =~ s/[ \t]+$//mg; + $first_para =~ s/^\n+//g; + $first_para =~ s/\n\n.*/\n/s; #;; hi emacs + $first_para =~ s/\n?[ \t]+/ /g; + + if ($first_para !~ /^Format(?:-Specification)?:\s*(\S+)\s*$/mi) { + $self->pointed_hint('unknown-copyright-format-uri', + $copyright_file->pointer); + return; + } + + my $uri = $1; + + # strip fragment identifier + $uri =~ s/^([^#\s]+)#/$1/; + + my $version = $self->find_dep5_version($copyright_file, $uri); + return + unless defined $version; + + if ($version =~ /wiki/) { + $self->pointed_hint('wiki-copyright-format-uri', + $copyright_file->pointer, $uri); + + } elsif ($version =~ /svn$/) { + $self->pointed_hint('unversioned-copyright-format-uri', + $copyright_file->pointer, $uri); + + } elsif (versions_compare($version, '<<', $LAST_SIGNIFICANT_DEP5_CHANGE)) { + $self->pointed_hint('out-of-date-copyright-format-uri', + $copyright_file->pointer, $uri); + + } elsif ($uri =~ m{^http://www\.debian\.org/}) { + $self->pointed_hint('insecure-copyright-format-uri', + $copyright_file->pointer, $uri); + } + + return + if versions_compare($version, '<<', $LAST_DEP5_OVERHAUL); + + # probably DEP 5 format; let's try more checks + my $deb822 = Lintian::Deb822->new; + + my @sections; + try { + @sections = $deb822->read_file($copyright_file->unpacked_path); + + } catch { + my $error = $@; + chomp $error; + $error =~ s{^syntax error in }{}; + + $self->pointed_hint('syntax-error-in-dep5-copyright', + $copyright_file->pointer, $@); + + return; + } + + return + unless @sections; + + my %found_standalone; + my %license_names_by_section; + my %license_text_by_section; + my %license_identifier_by_section; + + my @license_sections = grep { $_->declares('License') } @sections; + for my $section (@license_sections) { + + my $position = $section->position('License'); + my $pointer = $copyright_file->pointer($position); + + $self->pointed_hint('tab-in-license-text', $pointer) + if $section->untrimmed_value('License') =~ /\t/; + + my ($anycase_identifier, $license_text) + = split(/\n/, $section->untrimmed_value('License'), 2); + + $anycase_identifier //= $EMPTY; + $license_text //= $EMPTY; + + # replace some weird characters + $anycase_identifier =~ s/[(),]/ /g; + + # trim both ends + $anycase_identifier =~ s/^\s+|\s+$//g; + $license_text =~ s/^\s+|\s+$//g; + + my $license_identifier = lc $anycase_identifier; + + my @license_names + = grep { length } split(/\s+(?:and|or)\s+/, $license_identifier); + + $license_names_by_section{$section->position} = \@license_names; + $license_text_by_section{$section->position} = $license_text; + $license_identifier_by_section{$section->position} + = $license_identifier; + + $self->pointed_hint('empty-short-license-in-dep5-copyright', $pointer) + unless length $license_identifier; + + $self->pointed_hint('pipe-symbol-used-as-license-disjunction', + $pointer, $license_identifier) + if $license_identifier =~ m{\s+\|\s+}; + + for my $name (@license_names) { + if ($name =~ /\s/) { + + if($name =~ /[^ ]+ \s+ with \s+ (.*)/x) { + + my $exceptiontext = $1; + + $self->pointed_hint( + 'bad-exception-format-in-dep5-copyright', + $pointer, $name) + unless $exceptiontext =~ /[^ ]+ \s+ exception/x; + + } else { + + $self->pointed_hint( + 'space-in-std-shortname-in-dep5-copyright', + $pointer, $name); + } + } + + $self->pointed_hint('invalid-short-name-in-dep5-copyright', + $pointer, $name) + if $name =~ m{^(?:agpl|gpl|lgpl)[^-]?\d(?:\.\d)?\+?$} + || $name =~ m{^bsd(?:[^-]?[234][^-]?(?:clause|cluase))?$}; + + $self->pointed_hint('license-problem-undefined-license', + $pointer, $name) + if $name eq $HYPHEN + || $name + =~ m{\b(?:fixmes?|todos?|undefined?|unknown?|unspecified)\b}; + } + + # stand-alone license + if ( length $license_identifier + && length $license_text + && !$section->declares('Files')) { + + $found_standalone{$license_identifier} //= []; + push(@{$found_standalone{$license_identifier}}, $section); + } + + if ($license_identifier =~ /^cc-/ && length $license_text) { + + my $num_lines = $license_text =~ tr/\n//; + + $self->pointed_hint('incomplete-creative-commons-license', + $pointer, $license_identifier) + if $num_lines < $MINIMUM_CREATIVE_COMMMONS_LENGTH; + } + } + + my @not_unique + = grep { @{$found_standalone{$_}} > 1 } keys %found_standalone; + for my $name (@not_unique) { + + next + if $name eq 'public-domain'; + + for my $section (@{$found_standalone{$name}}) { + + my $position = $section->position('License'); + my $pointer = $copyright_file->pointer($position); + + $self->pointed_hint('dep5-copyright-license-name-not-unique', + $pointer, $name); + } + } + + my ($header, @followers) = @sections; + + my @obsolete_fields = grep { $header->declares($_) } keys %NEW_FIELD_NAMES; + for my $old_name (@obsolete_fields) { + + my $position = $header->position($old_name); + my $pointer = $copyright_file->pointer($position); + + $self->pointed_hint('obsolete-field-in-dep5-copyright', + $pointer, $old_name, $NEW_FIELD_NAMES{$old_name}); + } + + my $header_pointer = $copyright_file->pointer($header->position); + + $self->pointed_hint('missing-field-in-dep5-copyright', + $header_pointer, 'Format') + if none { $header->declares($_) } qw(Format Format-Specification); + + my $debian_control = $self->processable->debian_control; + + $self->pointed_hint('missing-explanation-for-contrib-or-non-free-package', + $header_pointer) + if $debian_control->source_fields->value('Section') + =~ m{^(?:contrib|non-free)(?:/.+)?$} + && (none { $header->declares($_) } qw{Comment Disclaimer}); + + $self->pointed_hint('missing-explanation-for-repacked-upstream-tarball', + $header_pointer) + if $self->processable->repacked + && $header->value('Source') =~ m{^https?://} + && (none { $header->declares($_) } qw{Comment Files-Excluded}); + + my @ambiguous_sections = grep { + $_->declares('License') + && $_->declares('Copyright') + && !$_->declares('Files') + } @followers; + + $self->pointed_hint( + 'ambiguous-paragraph-in-dep5-copyright', + $copyright_file->pointer($_->position) + )for @ambiguous_sections; + + my @unknown_sections + = grep {!$_->declares('License')&& !$_->declares('Files')} @followers; + + $self->pointed_hint( + 'unknown-paragraph-in-dep5-copyright', + $copyright_file->pointer($_->position) + )for @unknown_sections; + + my @shipped_items; + + if ($self->processable->native) { + @shipped_items = @{$self->processable->patched->sorted_list}; + + } else { + @shipped_items = @{$self->processable->orig->sorted_list}; + + # remove ./debian folder from orig, if any + @shipped_items = grep { !m{^debian/} } @shipped_items + if $self->processable->fields->value('Format') eq '3.0 (quilt)'; + + # add ./ debian folder from patched + my $debian_dir = $self->processable->patched->resolve_path('debian/'); + push(@shipped_items, $debian_dir->descendants) + if $debian_dir; + } + + my @shipped_names + = sort map { $_->name } grep { $_->is_file } @shipped_items; + + my @excluded; + for my $wildcard ($header->trimmed_list('Files-Excluded')) { + + my $position = $header->position('Files-Excluded'); + my $pointer = $copyright_file->pointer($position); + + my @offenders = escape_errors($wildcard); + + $self->pointed_hint('invalid-escape-sequence-in-dep5-copyright', + $pointer, '(Files-Excluded)', $_) + for @offenders; + + next + if @offenders; + + # also match dir/filename for Files-Excluded: dir + unless ($wildcard =~ /\*/ || $wildcard =~ /\?/) { + + my $candidate = $wildcard; + $candidate .= $SLASH + unless $candidate =~ m{/$}; + + my $item = $self->processable->orig->lookup($candidate); + + $wildcard = $candidate . $ASTERISK + if defined $item && $item->is_dir; + } + + my @match = match_glob($wildcard, @shipped_names); + + # do not flag missing matches; uscan already excluded them + push(@excluded, @match); + } + + my @included; + for my $wildcard ($header->trimmed_list('Files-Included')) { + + my $position = $header->position('Files-Included'); + my $pointer = $copyright_file->pointer($position); + + my @offenders = escape_errors($wildcard); + + $self->pointed_hint('invalid-escape-sequence-in-dep5-copyright', + $pointer, '(Files-Included)', $_) + for @offenders; + + next + if @offenders; + + # also match dir/filename for Files-Excluded: dir + unless ($wildcard =~ /\*/ || $wildcard =~ /\?/) { + + my $candidate = $wildcard; + $candidate .= $SLASH + unless $candidate =~ m{/$}; + + my $item = $self->processable->orig->lookup($candidate); + + $wildcard = $candidate . $ASTERISK + if defined $item && $item->is_dir; + } + + my @match = match_glob($wildcard, @shipped_names); + + $self->pointed_hint( + 'superfluous-file-pattern', $pointer, + '(Files-Included)', $wildcard + )unless @match; + + push(@included, @match); + } + + my $lc = List::Compare->new(\@included, \@excluded); + my @affirmed = $lc->get_Lonly; + my @unwanted = $lc->get_Ronly; + + # already unique + for my $name (@affirmed) { + + my $position = $header->position('Files-Included'); + my $pointer = $copyright_file->pointer($position); + + $self->pointed_hint('file-included-already', $pointer, $name); + } + + # already unique + for my $name (@unwanted) { + + my $position = $header->position('Files-Excluded'); + my $pointer = $copyright_file->pointer($position); + + $self->pointed_hint('source-ships-excluded-file',$pointer, $name) + unless $name =~ m{^(?:debian|\.pc)/}; + } + + my @notice_names= grep { m{(^|/)(COPYING[^/]*|LICENSE)$} } @shipped_names; + my @quilt_names = grep { m{^\.pc/} } @shipped_names; + + my @names_with_comma = grep { /,/ } @shipped_names; + my @fields_with_comma = grep { $_->value('Files') =~ /,/ } @followers; + + for my $section (@fields_with_comma) { + + my $position = $section->position('Files'); + my $pointer = $copyright_file->pointer($position); + + $self->pointed_hint('comma-separated-files-in-dep5-copyright',$pointer) + if !@names_with_comma; + } + + # only attempt to evaluate globbing if commas could be legal + my $check_wildcards = !@fields_with_comma || @names_with_comma; + + my @files_sections = grep {$_->declares('Files')} @followers; + + for my $section (@files_sections) { + + if (!length $section->value('Files')) { + + my $position = $section->position('Files'); + my $pointer = $copyright_file->pointer($position); + + $self->pointed_hint('missing-field-in-dep5-copyright', + $pointer,'(empty field)', 'Files'); + } + + my $section_pointer = $copyright_file->pointer($section->position); + + $self->pointed_hint('missing-field-in-dep5-copyright', + $section_pointer, 'License') + if !$section->declares('License'); + + $self->pointed_hint('missing-field-in-dep5-copyright', + $section_pointer, 'Copyright') + if !$section->declares('Copyright'); + + if ($section->declares('Copyright') + && !length $section->value('Copyright')) { + + my $position = $section->position('Copyright'); + my $pointer = $copyright_file->pointer($position); + + $self->pointed_hint('missing-field-in-dep5-copyright', + $pointer, '(empty field)', 'Copyright'); + } + } + + my %sections_by_wildcard; + my %wildcard_by_file; + my %required_standalone; + my %positions_by_debian_year; + my @redundant_wildcards; + + my $section_count = 0; + for my $section (@followers) { + + my $wildcard_pointer + = $copyright_file->pointer($section->position('Files')); + + my $copyright_pointer + = $copyright_file->pointer($section->position('Copyright')); + + my $license_pointer + = $copyright_file->pointer($section->position('License')); + + my @license_names + = @{$license_names_by_section{$section->position} // []}; + my $license_text = $license_text_by_section{$section->position}; + + if ($section->declares('Files') && !length $license_text) { + $required_standalone{$_} = $section for @license_names; + } + + my @wildcards; + + # If it is the first paragraph, it might be an instance of + # the (no-longer) optional "first Files-field". + if ( $section_count == 0 + && $section->declares('License') + && $section->declares('Copyright') + && !$section->declares('Files')) { + + @wildcards = ($ASTERISK); + + } else { + @wildcards = $section->trimmed_list('Files'); + } + + my @rightholders = $section->trimmed_list('Copyright', qr{ \n }x); + my @years = map { /(\d{4})/g } @rightholders; + + if (any { m{^ debian (?: / | $) }x } @wildcards) { + + my $position = $section->position('Copyright'); + + push(@{$positions_by_debian_year{$_}}, $position)for @years; + } + + for my $wildcard (@wildcards) { + $sections_by_wildcard{$wildcard} //= []; + push(@{$sections_by_wildcard{$wildcard}}, $section); + } + + $self->pointed_hint( + 'global-files-wildcard-not-first-paragraph-in-dep5-copyright', + $wildcard_pointer) + if (any { $_ eq $ASTERISK } @wildcards) && $section_count > 0; + + # stand-alone license paragraph + $self->pointed_hint('missing-license-text-in-dep5-copyright', + $license_pointer, $section->untrimmed_value('License')) + if !@wildcards + && $section->declares('License') + && !length $license_text; + + next + unless $check_wildcards; + + my %wildcards_same_section_by_file; + + for my $wildcard (@wildcards) { + + my @offenders = escape_errors($wildcard); + + $self->pointed_hint('invalid-escape-sequence-in-dep5-copyright', + $wildcard_pointer, $_) + for @offenders; + + next + if @offenders; + + my @covered = match_glob($wildcard, @shipped_names); + + for my $name (@covered) { + $wildcards_same_section_by_file{$name} //= []; + push(@{$wildcards_same_section_by_file{$name}}, $wildcard); + } + } + + my @overwritten = grep { length $wildcard_by_file{$_} } + keys %wildcards_same_section_by_file; + + for my $name (@overwritten) { + + my $winning_wildcard + = @{$wildcards_same_section_by_file{$name}}[$LAST_ITEM]; + my $loosing_wildcard = $wildcard_by_file{$name}; + + my $winner_depth = ($winning_wildcard =~ tr{/}{}); + my $looser_depth = ($loosing_wildcard =~ tr{/}{}); + + $self->pointed_hint('globbing-patterns-out-of-order', + $wildcard_pointer,$loosing_wildcard, $winning_wildcard, $name) + if $looser_depth > $winner_depth; + } + + # later matches have precendence; depends on section ordering + $wildcard_by_file{$_} + = @{$wildcards_same_section_by_file{$_}}[$LAST_ITEM] + for keys %wildcards_same_section_by_file; + + my @overmatched_same_section + = grep { @{$wildcards_same_section_by_file{$_}} > 1 } + keys %wildcards_same_section_by_file; + + for my $file (@overmatched_same_section) { + + my $patterns + = join($SPACE, sort @{$wildcards_same_section_by_file{$file}}); + + $self->pointed_hint('redundant-globbing-patterns', + $wildcard_pointer,"($patterns) for $file"); + } + + push(@redundant_wildcards, + map { @{$wildcards_same_section_by_file{$_}} } + @overmatched_same_section); + + } continue { + $section_count++; + } + + my @debian_years = keys %positions_by_debian_year; + my @changelog_entries = @{$self->processable->changelog->entries}; + + if (@debian_years && @changelog_entries) { + + my @descending = reverse sort { $a <=> $b } @debian_years; + my $most_recent_copyright = $descending[0]; + + my $tp = Time::Piece->strptime($changelog_entries[0]->Date, + '%a, %d %b %Y %T %z'); + my $most_recent_changelog = $tp->year; + + my @candidates = @{$positions_by_debian_year{$most_recent_copyright}}; + my @sorted = sort { $a <=> $b } @candidates; + + # pick the topmost, which should be the broadest pattern + my $position = $candidates[0]; + + $self->pointed_hint('update-debian-copyright', + $copyright_file->pointer($position), + $most_recent_copyright, 'vs', $most_recent_changelog) + if $most_recent_copyright < $most_recent_changelog; + } + + if ($check_wildcards) { + + my @duplicate_wildcards= grep { @{$sections_by_wildcard{$_}} > 1 } + keys %sections_by_wildcard; + + for my $wildcard (@duplicate_wildcards) { + + my $lines = join($SPACE, + map { $_->position('Files') } + @{$sections_by_wildcard{$wildcard}}); + + $self->pointed_hint('duplicate-globbing-patterns', + $copyright_file->pointer,$wildcard, "(lines $lines)"); + } + + # do not issue next tag for duplicates or redundant wildcards + my $wildcard_lc = List::Compare->new( + [keys %sections_by_wildcard], + [ + ( + values %wildcard_by_file, @duplicate_wildcards, + @redundant_wildcards + ) + ] + ); + my @matches_nothing = $wildcard_lc->get_Lonly; + + for my $wildcard (@matches_nothing) { + for my $section (@{$sections_by_wildcard{$wildcard}}) { + + my $position = $section->position('Files'); + my $pointer = $copyright_file->pointer($position); + + $self->pointed_hint('superfluous-file-pattern', $pointer, + $wildcard); + } + } + + my %sections_by_file; + for my $name (keys %wildcard_by_file) { + + $sections_by_file{$name} //= []; + my $wildcard = $wildcard_by_file{$name}; + + push( + @{$sections_by_file{$name}}, + @{$sections_by_wildcard{$wildcard}} + ); + } + + my %license_identifiers_by_file; + for my $name (keys %sections_by_file) { + + $license_identifiers_by_file{$name} //= []; + + push( + @{$license_identifiers_by_file{$name}}, + $license_identifier_by_section{$_->position} + ) for @{$sections_by_file{$name}}; + } + + my @xml_searchspace = keys %license_identifiers_by_file; + + # do not examine Lintian's test suite for appstream metadata + @xml_searchspace = grep { !m{t/} } @xml_searchspace + if $self->processable->name eq 'lintian'; + + for my $name (@xml_searchspace) { + + next + if $name =~ '^\.pc/'; + + next + unless $name =~ /\.xml$/; + + my $parser = XML::LibXML->new; + $parser->set_option('no_network', 1); + + my $file = $self->processable->patched->resolve_path($name); + my $doc; + try { + $doc = $parser->parse_file($file->unpacked_path); + + } catch { + next; + } + + next + unless $doc; + + my @nodes = $doc->findnodes('/component/metadata_license'); + next + unless @nodes; + + # take first one + my $first = $nodes[0]; + next + unless $first; + + my $seen = lc($first->firstChild->data // $EMPTY); + next + unless $seen; + + my @wanted = @{$license_identifiers_by_file{$name}}; + my @mismatched = grep { $_ ne $seen } @wanted; + + $self->pointed_hint('inconsistent-appstream-metadata-license', + $copyright_file->pointer, $name, "($seen != $_)") + for @mismatched; + } + + my @no_license_needed = (@quilt_names, @notice_names); + my $unlicensed_lc + = List::Compare->new(\@shipped_names, \@no_license_needed); + my @license_needed = $unlicensed_lc->get_Lonly; + + my @not_covered + = grep { !@{$sections_by_file{$_} // []} } @license_needed; + + $self->pointed_hint('file-without-copyright-information', + $copyright_file->pointer, $_) + for @not_covered; + } + + my $standalone_lc= List::Compare->new([keys %required_standalone], + [keys %found_standalone]); + my @missing_standalone = $standalone_lc->get_Lonly; + my @matched_standalone = $standalone_lc->get_intersection; + my @unused_standalone = $standalone_lc->get_Ronly; + + for my $license (@missing_standalone) { + + my $section = $required_standalone{$license}; + + my $position = $section->position('License'); + my $pointer = $copyright_file->pointer($position); + + $self->pointed_hint('missing-license-paragraph-in-dep5-copyright', + $pointer, $license); + } + + for my $license (grep { $_ ne 'public-domain' } @unused_standalone) { + + for my $section (@{$found_standalone{$license}}) { + + my $position = $section->position('License'); + my $pointer = $copyright_file->pointer($position); + + $self->pointed_hint('unused-license-paragraph-in-dep5-copyright', + $pointer, $license); + } + } + + for my $license (@matched_standalone) { + + my $section = $required_standalone{$license}; + + my $position = $section->position('Files'); + my $pointer = $copyright_file->pointer($position); + + $self->pointed_hint('dep5-file-paragraph-references-header-paragraph', + $pointer, $license) + if all { $_ == $header } @{$found_standalone{$license}}; + } + + # license files do not require their own entries in d/copyright. + my $license_lc + = List::Compare->new(\@notice_names, [keys %sections_by_wildcard]); + my @listed_licenses = $license_lc->get_intersection; + + $self->pointed_hint('license-file-listed-in-debian-copyright', + $copyright_file->pointer, $_) + for @listed_licenses; + + return; +} + +sub escape_errors { + my ($escaped) = @_; + + my @sequences = ($escaped =~ m{\\.?}g); + my @illegal = grep { !m{^\\[*?]$} } @sequences; + + return @illegal; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Debian/Copyright/Dep5/Components.pm b/lib/Lintian/Check/Debian/Copyright/Dep5/Components.pm new file mode 100644 index 0000000..453a40b --- /dev/null +++ b/lib/Lintian/Check/Debian/Copyright/Dep5/Components.pm @@ -0,0 +1,109 @@ +# debian/copyright/dep5/components -- lintian check script -*- perl -*- + +# Copyright (C) 2021 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Debian::Copyright::Dep5::Components; + +use v5.20; +use warnings; +use utf8; + +use List::Compare; +use Syntax::Keyword::Try; + +use Lintian::Deb822; + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +sub source { + my ($self) = @_; + + my $debian_dir = $self->processable->patched->resolve_path('debian/'); + return + unless defined $debian_dir; + + my @installables = $self->processable->debian_control->installables; + my @additional = map { $_ . '.copyright' } @installables; + + my @candidates = ('copyright', @additional); + my @files = grep { defined $_ && !$_->is_symlink } + map { $debian_dir->child($_) } @candidates; + + # another check complains about legacy encoding, if needed + my @valid_utf8 = grep { $_->is_valid_utf8 } @files; + + $self->check_dep5_copyright($_) for @valid_utf8; + + return; +} + +sub check_dep5_copyright { + my ($self, $copyright_file) = @_; + + my $deb822 = Lintian::Deb822->new; + + my @sections; + try { + @sections = $deb822->read_file($copyright_file->unpacked_path); + + } catch { + # may not be in DEP 5 format + return; + } + + return + unless @sections; + + my ($header, @followers) = @sections; + + my @initial_path_components; + + for my $section (@followers) { + + my @subdirs = $section->trimmed_list('Files'); + s{ / .* $}{}x for @subdirs; + + my @definite = grep { !/[*?]/ } @subdirs; + + push(@initial_path_components, grep { length } @definite); + } + + my @extra_source_components + = grep { length } values %{$self->processable->components}; + my $component_lc = List::Compare->new(\@extra_source_components, + \@initial_path_components); + + my @missing_components = $component_lc->get_Lonly; + + $self->pointed_hint('add-component-copyright', $copyright_file->pointer,$_) + for @missing_components; + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Debian/Debconf.pm b/lib/Lintian/Check/Debian/Debconf.pm new file mode 100644 index 0000000..6651dd6 --- /dev/null +++ b/lib/Lintian/Check/Debian/Debconf.pm @@ -0,0 +1,794 @@ +# debian/debconf -- lintian check script -*- perl -*- + +# Copyright (C) 2001 Colin Watson +# Copyright (C) 2020-21 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Debian::Debconf; + +use v5.20; +use warnings; +use utf8; + +use Const::Fast; +use List::SomeUtils qw(none); +use Path::Tiny; +use Syntax::Keyword::Try; +use Unicode::UTF8 qw(encode_utf8); + +use Lintian::Deb822; +use Lintian::Deb822::Constants qw(DCTRL_DEBCONF_TEMPLATE); +use Lintian::Relation; +use Lintian::Util qw($PKGNAME_REGEX); + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +const my $EMPTY => q{}; +const my $SPACE => q{ }; + +const my $MAXIMUM_TEMPLATE_SYNOPSIS => 75; +const my $MAXIMUM_LINE_LENGTH => 80; +const my $MAXIMUM_LINES => 20; +const my $ITEM_NOT_FOUND => -1; + +# From debconf-devel(7), section 'THE TEMPLATES FILE', up to date with debconf +# version 1.5.24. Added indices for cdebconf (indicates sort order for +# choices); debconf doesn't support it, but it ignores it, which is safe +# behavior. Likewise, help is supported as of cdebconf 0.143 but is not yet +# supported by debconf. +my %template_fields + = map { $_ => 1 } qw(Template Type Choices Indices Default Description Help); + +# From debconf-devel(7), section 'THE TEMPLATES FILE', up to date with debconf +# version 1.5.24. +my %valid_types = map { $_ => 1 } qw( + string + password + boolean + select + multiselect + note + error + title + text); + +# From debconf-devel(7), section 'THE DEBCONF PROTOCOL' under 'INPUT', up to +# date with debconf version 1.5.24. +my %valid_priorities = map { $_ => 1 } qw(low medium high critical); + +# All the packages that provide debconf functionality. Anything using debconf +# needs to have dependencies that satisfy one of these. +my $ANY_DEBCONF = Lintian::Relation->new->load( + join( + ' | ', qw(debconf debconf-2.0 cdebconf + cdebconf-udeb libdebconfclient0 libdebconfclient0-udeb) + ) +); + +sub source { + my ($self) = @_; + + my @catalogs= ( + 'templates', + map { "$_.templates" }$self->processable->debian_control->installables + ); + my @files = grep { defined } + map { $self->processable->patched->resolve_path("debian/$_") } @catalogs; + + my @utf8 = grep { $_->is_valid_utf8 } @files; + for my $item (@utf8) { + + my $deb822 = Lintian::Deb822->new; + + my @templates; + try { + @templates + = $deb822->read_file($item->unpacked_path, + DCTRL_DEBCONF_TEMPLATE); + + } catch { + my $error = $@; + chomp $error; + $error =~ s{^syntax error in }{}; + + $self->pointed_hint('syntax-error-in-debconf-template', + $item->pointer, $error); + + next; + } + + my @unsplit_choices + = grep {$_->declares('Template') && $_->declares('_Choices')} + @templates; + + $self->pointed_hint( + 'template-uses-unsplit-choices', + $item->pointer($_->position('_Choices')), + $_->value('Template') + )for @unsplit_choices; + } + + return; +} + +sub installable { + my ($self) = @_; + + my $usespreinst; + my $preinst = $self->processable->control->lookup('preinst'); + + if ($preinst and $preinst->is_file and $preinst->is_open_ok) { + + open(my $fd, '<', $preinst->unpacked_path) + or die encode_utf8('Cannot open ' . $preinst->unpacked_path); + + while (my $line = <$fd>) { + $line =~ s/\#.*//; # Not perfect for Perl, but should be OK + + if ( $line =~ m{/usr/share/debconf/confmodule} + || $line =~ /(?:Debconf|Debian::DebConf)::Client::ConfModule/){ + $usespreinst=1; + + last; + } + } + close($fd); + } + + my $seenconfig; + my $ctrl_config = $self->processable->control->lookup('config'); + if (defined $ctrl_config && $ctrl_config->is_file) { + + $self->pointed_hint('debconf-config-not-executable', + $ctrl_config->pointer) + unless $ctrl_config->is_executable; + + $seenconfig = 1; + } + + my $seentemplates; + my $ctrl_templates = $self->processable->control->lookup('templates'); + $seentemplates = 1 if $ctrl_templates and $ctrl_templates->is_file; + + # This still misses packages that use debconf only in the postrm. + # Packages that ask debconf questions in the postrm should load + # the confmodule in the postinst so that debconf can register + # their templates. + return + unless $seenconfig + or $seentemplates + or $usespreinst; + + # parse depends info for later checks + + # Consider every package to depend on itself. + my $selfrel; + if ($self->processable->fields->declares('Version')) { + my $version = $self->processable->fields->value('Version'); + $selfrel = $self->processable->name . " (= $version)"; + } else { + $selfrel = $self->processable->name; + } + + # Include self and provides as a package providing debconf presumably + # satisfies its own use of debconf (if any). + my $selfrelation + = $self->processable->relation('Provides')->logical_and($selfrel); + my $alldependencies + = $self->processable->relation('strong')->logical_and($selfrelation); + + # See if the package depends on dbconfig-common. Packages that do + # are allowed to have a config file with no templates, since they + # use the dbconfig-common templates. + my $usesdbconfig = $alldependencies->satisfies('dbconfig-common'); + + # Check that both debconf control area files are present. + if ($seenconfig and not $seentemplates and not $usesdbconfig) { + + $self->hint('no-debconf-templates'); + + } elsif ($seentemplates + and not $seenconfig + and not $usespreinst + and $self->processable->type ne 'udeb') { + + $self->hint('no-debconf-config'); + } + + # Lots of template checks. + + my @templates; + if ($seentemplates) { + + if ($ctrl_templates->is_valid_utf8) { + my $deb822 = Lintian::Deb822->new; + + try { + # $seentemplates (above) will be false if $ctrl_templates is a + # symlink or not a file, so this should be safe without + # (re-checking) with -f/-l. + @templates= $deb822->read_file($ctrl_templates->unpacked_path, + DCTRL_DEBCONF_TEMPLATE); + + } catch { + my $error = $@; + chomp $error; + $error =~ s{^syntax error in }{}; + + $self->pointed_hint('syntax-error-in-debconf-template', + $ctrl_templates->pointer, $error); + + @templates = (); + } + } + } + + my %template_by_name; + my %potential_db_abuse; + for my $template (@templates) { + + my $isselect = $EMPTY; + my $name = $template->value('Template'); + + if (!$template->declares('Template')) { + $self->pointed_hint('no-template-name', + $ctrl_templates->pointer($template->position)); + $name = 'no-template-name'; + + } else { + $template_by_name{$name} = $template; + + $self->pointed_hint('malformed-template-name', + $ctrl_templates->pointer($template->position('Template')), + $name) + unless $name =~ m{[A-Za-z0-9.+-](?:/[A-Za-z0-9.+-])}; + } + + my $type = $template->value('Type'); + if (!$template->declares('Type')) { + + $self->pointed_hint('no-template-type', + $ctrl_templates->pointer($template->position), $name); + + } elsif (!$valid_types{$type}) { + + # cdebconf has a special "entropy" type + $self->pointed_hint('unknown-template-type', + $ctrl_templates->pointer($template->position('Type')), $type) + unless $type eq 'entropy' + && $alldependencies->satisfies('cdebconf'); + + } elsif ($type eq 'select' || $type eq 'multiselect') { + $isselect = 1; + + } elsif ($type eq 'boolean') { + + my $default = $template->value('Default'); + + $self->pointed_hint( + 'boolean-template-has-bogus-default', + $ctrl_templates->pointer($template->position('Default')), + $name, $default + ) + if $template->declares('Default') + && (none { $default eq $_ } qw(true false)); + } + + my $choices = $template->value('Choices'); + if ($template->declares('Choices') && $choices !~ /^\s*$/) { + + my $nrchoices = count_choices($choices); + for my $key ($template->names) { + + if ($key =~ /^Choices-/) { + my $translated = $template->value($key); + + if (!length($translated) || $translated =~ /^\s*$/){ + $self->pointed_hint( + 'empty-translated-choices', + $ctrl_templates->pointer( + $template->position('Choices') + ), + $name, $key + ); + } + + if (count_choices($translated) != $nrchoices) { + $self->pointed_hint( + 'mismatch-translated-choices', + $ctrl_templates->pointer( + $template->position('Choices') + ), + $name,$key + ); + } + } + } + + $self->pointed_hint('select-with-boolean-choices', + $ctrl_templates->pointer($template->position('Choices')),$name) + if $choices =~ /^\s*(yes\s*,\s*no|no\s*,\s*yes)\s*$/i; + } + + $self->pointed_hint('select-without-choices', + $ctrl_templates->pointer($template->position), $name) + if $isselect && !$template->declares('Choices'); + + my $description = $template->value('Description'); + + $self->pointed_hint('no-template-description', + $ctrl_templates->pointer($template->position), $name) + unless length $description + || length $template->value('_Description'); + + if ($description =~ /^\s*(.*?)\s*?\n\s*\1\s*$/){ + + # Check for duplication. Should all this be folded into the + # description checks? + $self->pointed_hint('duplicate-long-description-in-template', + $ctrl_templates->pointer($template->position('Description')), + $name); + } + + my %languages; + for my $field ($template->names) { + # Tests on translations + my ($mainfield, $lang) = split m/-/, $field, 2; + if (defined $lang) { + $languages{$lang}{$mainfield}=1; + } + my $stripped = $mainfield; + $stripped =~ s/^_//; + unless ($template_fields{$stripped}) { + # Ignore language codes here + $self->pointed_hint('unknown-field-in-templates', + $ctrl_templates->pointer($template->position($field)), + $name, $field); + } + } + + if (length $name && length $type) { + $potential_db_abuse{$name} = 1 + if $type eq 'note' || $type eq 'text'; + } + + # Check the description against the best practices in the + # Developer's Reference, but skip all templates where the + # short description contains the string "for internal use". + my ($short, $extended); + if (length $description) { + ($short, $extended) = split(/\n/, $description, 2); + unless (defined $short) { + $short = $description; + $extended = $EMPTY; + } + } else { + $short = $EMPTY; + $extended = $EMPTY; + } + + my $ttype = $type; + unless ($short =~ /for internal use/i) { + + my $pointer + = $ctrl_templates->pointer($template->position('Description')); + + my $isprompt = grep { $_ eq $ttype } qw(string password); + if ($isprompt) { + if ( + $short + && ( $short !~ m/:$/ + || $short =~ m/^(what|who|when|where|which|how)/i) + ) { + $self->pointed_hint('malformed-prompt-in-templates', + $pointer, $name); + } + } + if ($isselect) { + if ($short =~ /^(Please|Cho+se|Enter|Select|Specify|Give)/) { + $self->pointed_hint('using-imperative-form-in-templates', + $pointer, $name); + } + } + if ($ttype eq 'boolean') { + if ($short !~ /\?/) { + $self->pointed_hint('malformed-question-in-templates', + $pointer, $name); + } + } + if (defined $extended && $extended =~ /[^\?]\?(\s+|$)/) { + $self->pointed_hint( + 'using-question-in-extended-description-in-templates', + $pointer, $name); + } + if ($ttype eq 'note') { + if ($short =~ /[.?;:]$/) { + $self->pointed_hint('malformed-title-in-templates', + $pointer, $name); + } + } + if (length $short > $MAXIMUM_TEMPLATE_SYNOPSIS) { + $self->pointed_hint('too-long-short-description-in-templates', + $pointer, $name) + unless $self->processable->type eq 'udeb' + && $ttype eq 'text'; + } + if (defined $description) { + if ($description + =~ /(\A|\s)(I|[Mm]y|[Ww]e|[Oo]ur|[Oo]urs|mine|myself|ourself|me|us)(\Z|\s)/ + ) { + $self->pointed_hint('using-first-person-in-templates', + $pointer,$name); + } + if ( $description =~ /[ \'\"]yes[ \'\",;.]/i + and $ttype eq 'boolean') { + + $self->pointed_hint( + 'making-assumptions-about-interfaces-in-templates', + $pointer, $name); + } + } + + # Check whether the extended description is too long. + if ($extended) { + + my $lines = 0; + for my $string (split(/\n/, $extended)) { + + while (length $string > $MAXIMUM_LINE_LENGTH) { + + my $index + = rindex($string, $SPACE, $MAXIMUM_LINE_LENGTH); + + if ($index == $ITEM_NOT_FOUND) { + $index = index($string, $SPACE); + } + + if ($index == $ITEM_NOT_FOUND) { + $string = $EMPTY; + + } else { + $string = substr($string, $index + 1); + $lines++; + } + } + + $lines++; + } + + if ($lines > $MAXIMUM_LINES) { + $self->pointed_hint( + 'too-long-extended-description-in-templates', + $pointer, $name); + } + } + } + } + + # Check the maintainer scripts. + + my ($config_calls_db_input, $db_purge); + my (%templates_used, %template_aliases); + for my $file (qw(config prerm postrm preinst postinst)) { + + my $potential_makedev = {}; + + my $item = $self->processable->control->lookup($file); + + if (defined $item && $item->is_file && $item->is_open_ok) { + + my ($usesconfmodule, $obsoleteconfmodule, $db_input, $isdefault); + + open(my $fd, '<', $item->unpacked_path) + or die encode_utf8('Cannot open ' . $item->unpacked_path); + + # Only check scripts. + my $fl = <$fd>; + unless ($fl && $fl =~ /^\#!/) { + close($fd); + next; + } + + my $position = 1; + while (my $line = <$fd>) { + + # not perfect for Perl, but should be OK + $line =~ s/#.*//; + + next + unless $line =~ /\S/; + + while ($line =~ s{\\$}{}) { + my $next = <$fd>; + ++$position; + + last + unless $next; + + $line .= $next; + } + + if ($line =~ m{(?:\.|source)\s+/usr/share/debconf/confmodule} + || $line=~ /(?:use|require)\s+Debconf::Client::ConfModule/) + { + $usesconfmodule=1; + } + + my $pointer = $item->pointer($position); + + if ( + !$obsoleteconfmodule + && $line =~ m{(/usr/share/debconf/confmodule\.sh| + Debian::DebConf::Client::ConfModule)}x + ) { + my $module = $1; + + $self->pointed_hint('loads-obsolete-confmodule', $pointer, + $module); + + $usesconfmodule = 1; + $obsoleteconfmodule = 1; + } + + if ($item->name eq 'config' && $line =~ /db_input/) { + $config_calls_db_input = 1; + } + + if ( $item->name eq 'postinst' + && !$db_input + && $line =~ /db_input/ + && !$config_calls_db_input) { + + # TODO: Perl? + $self->pointed_hint('postinst-uses-db-input', $pointer) + unless $self->processable->type eq 'udeb'; + $db_input=1; + } + + if ($line =~ m{/dev/}) { + $potential_makedev->{$position} = 1; + } + + if ( + $line =~m{\A \s*(?:db_input|db_text)\s+ + [\"\']? (\S+?) [\"\']? \s+ (\S+)\s}xsm + ) { + my $priority = $1; + my $unmangled = $2; + + $templates_used{$self->get_template_name($unmangled)}= 1; + + if ($priority !~ /^\$\S+$/) { + + $self->pointed_hint('unknown-debconf-priority', + $pointer, $priority) + unless ($valid_priorities{$priority}); + + $self->pointed_hint('possible-debconf-note-abuse', + $pointer, $unmangled) + if ( + $potential_db_abuse{$unmangled} + and ( + not($potential_makedev->{($position - 1)} + and ($priority eq 'low')) + ) + and ($priority eq 'low' || $priority eq 'medium') + ); + } + } + + if ( + $line =~m{ \A \s* (?:db_get|db_set(?:title)?) \s+ + [\"\']? (\S+?) [\"\']? (?:\s|\Z)}xsm + ) { + $templates_used{$self->get_template_name($1)} = 1; + } + + # Try to handle Perl somewhat. + if ($line =~ /^\s*(?:.*=\s*get|set)\s*\(\s*[\"\'](\S+?)[\"\']/ + || $line + =~ /\b(?:metaget|settitle)\s*\(\s*[\"\'](\S+?)[\"\']/) { + $templates_used{$1} = 1; + } + + if ($line=~ /^\s*db_register\s+[\"\']?(\S+?)[\"\']?\s+(\S+)\s/) + { + my ($template, $question) = ($1, $2); + push @{$template_aliases{$template}}, $question; + } + if (!$isdefault && $line =~ /db_fset.*isdefault/) { + # TODO: Perl? + $self->pointed_hint('isdefault-flag-is-deprecated', + $pointer); + $isdefault = 1; + } + + if (!$db_purge && $line =~ /db_purge/) { # TODO: Perl? + $db_purge = 1; + } + + } continue { + ++$position; + } + + close $fd; + + if ($self->processable->type ne 'udeb') { + if ($item->name eq 'config' + || ($seenconfig && $item->name eq 'postinst')){ + + $self->pointed_hint("$file-does-not-load-confmodule", + $item->pointer) + unless $usesconfmodule; + } + } + + if ($item->name eq 'postrm') { + # If we haven't seen db_purge we emit the tag unless the + # package is a debconf provider (in which case db_purge + # won't be available) + unless ($db_purge or $selfrelation->satisfies($ANY_DEBCONF)) { + + $self->pointed_hint('postrm-does-not-purge-debconf', + $item->pointer); + } + } + + } elsif ($file eq 'postinst') { + + $self->hint('postinst-does-not-load-confmodule', $file) + if $self->processable->type ne 'udeb' && $seenconfig; + + } elsif ($file eq 'postrm') { + # Make an exception for debconf providing packages as some of + # them (incl. "debconf" itself) cleans up in prerm and have no + # postrm script at all. + $self->hint('postrm-does-not-purge-debconf', $file) + unless $self->processable->type eq 'udeb' + or $selfrelation->satisfies($ANY_DEBCONF); + } + } + + for my $name (keys %template_by_name) { + + $name =~ s/\s+\Z//; + + my $used = 0; + + if ($templates_used{$name}) { + $used = 1; + } else { + foreach my $alias (@{$template_aliases{$name}}) { + if ($templates_used{$alias}) { + $used = 1; + last; + } + } + } + + my $template = $template_by_name{$name}; + my $position = $template->position('Template'); + my $pointer = $ctrl_templates->pointer($position); + + $self->pointed_hint('unused-debconf-template', $pointer, $name) + unless $name =~ m{^shared/packages-(wordlist|ispell)$} + || $name =~ m{/languages$} + || $used + || $self->processable->name eq 'debconf' + || $self->processable->type eq 'udeb'; + } + + # Check that the right dependencies are in the control file. Accept any + # package that might provide debconf functionality. + + if ($usespreinst) { + unless ($self->processable->relation('Pre-Depends') + ->satisfies($ANY_DEBCONF)){ + $self->hint('missing-debconf-dependency-for-preinst') + unless $self->processable->type eq 'udeb'; + } + } else { + unless ($alldependencies->satisfies($ANY_DEBCONF) or $usesdbconfig) { + $self->hint('missing-debconf-dependency'); + } + } + + # Now make sure that no scripts are using debconf as a registry. + # Unfortunately this requires us to unpack to level 2 and grep all the + # scripts in the package. + # the following checks is ignored if the package being checked is debconf + # itself. + + return + if ($self->processable->name eq 'debconf') + || ($self->processable->type eq 'udeb'); + + my @scripts + = grep { $_->is_script } @{$self->processable->installed->sorted_list}; + for my $item (@scripts) { + + next + unless $item->is_open_ok; + + open(my $fd, '<', $item->unpacked_path) + or die encode_utf8('Cannot open ' . $item->unpacked_path); + + my $position = 1; + while (my $line = <$fd>) { + + # Not perfect for Perl, but should be OK + $line =~ s/#.*//; + + if ( $line =~ m{/usr/share/debconf/confmodule} + || $line =~ /(?:Debconf|Debian::DebConf)::Client::ConfModule/){ + + $self->pointed_hint('debconf-is-not-a-registry', + $item->pointer($position)); + last; + } + + } continue { + ++$position; + } + + close $fd; + } + + return; +} # </run> + +# ----------------------------------- + +# Count the number of choices. Splitting code copied from debconf 1.5.8 +# (Debconf::Question). +sub count_choices { + my ($choices) = @_; + my @items; + my $item = $EMPTY; + for my $chunk (split /(\\[, ]|,\s+)/, $choices) { + if ($chunk =~ /^\\([, ])$/) { + $item .= $1; + } elsif ($chunk =~ /^,\s+$/) { + push(@items, $item); + $item = $EMPTY; + } else { + $item .= $chunk; + } + } + push(@items, $item) if $item ne $EMPTY; + return scalar(@items); +} + +# Manually interpolate shell variables, eg. $DPKG_MAINTSCRIPT_PACKAGE +sub get_template_name { + my ($self, $name) = @_; + + my $package = $self->processable->name; + return $name =~ s/^\$DPKG_MAINTSCRIPT_PACKAGE/$package/r; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Debian/DesktopEntries.pm b/lib/Lintian/Check/Debian/DesktopEntries.pm new file mode 100644 index 0000000..cff6042 --- /dev/null +++ b/lib/Lintian/Check/Debian/DesktopEntries.pm @@ -0,0 +1,58 @@ +# debian/desktop-entries -- lintian check script -*- perl -*- + +# Copyright (C) 2020 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Debian::DesktopEntries; + +use v5.20; +use warnings; +use utf8; + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +sub source { + my ($self) = @_; + + return + if $self->processable->native; + + my $debiandir = $self->processable->patched->resolve_path('debian'); + return + unless $debiandir; + + my @files = grep { $_->is_file } $debiandir->descendants; + my @nopatches = grep { $_->name !~ m{^debian/patches/} } @files; + + my @manpages = grep { $_->basename =~ m{\.desktop$} } @nopatches; + + $self->pointed_hint('maintainer-desktop-entry', $_->pointer) for @manpages; + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Debian/Filenames.pm b/lib/Lintian/Check/Debian/Filenames.pm new file mode 100644 index 0000000..c18b129 --- /dev/null +++ b/lib/Lintian/Check/Debian/Filenames.pm @@ -0,0 +1,78 @@ +# debian/filenames -- lintian check script -*- perl -*- + +# Copyright (C) 2019 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Debian::Filenames; + +use v5.20; +use warnings; +use utf8; + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +sub source { + my ($self) = @_; + + # names are different in installation packages (see #429510) + # README and TODO may be handled differently + + my @often_misnamed = ( + { correct => 'NEWS', problematic => 'NEWS.Debian' }, + { correct => 'NEWS', problematic => 'NEWS.debian' }, + { correct => 'TODO', problematic => 'TODO.Debian' }, + { correct => 'TODO', problematic => 'TODO.debian' } + ); + + for my $relative (@often_misnamed) { + + my $problematic_item = $self->processable->patched->resolve_path( + 'debian/' . $relative->{problematic}); + + next + unless defined $problematic_item; + + my $correct_name = 'debian/' . $relative->{correct}; + if ($self->processable->patched->resolve_path($correct_name)) { + + $self->pointed_hint('duplicate-packaging-file', + $problematic_item->pointer, + 'better:', $correct_name); + + } else { + $self->pointed_hint( + 'incorrect-packaging-filename', + $problematic_item->pointer, + 'better:', $correct_name + ); + } + } + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Debian/Files.pm b/lib/Lintian/Check/Debian/Files.pm new file mode 100644 index 0000000..921f48b --- /dev/null +++ b/lib/Lintian/Check/Debian/Files.pm @@ -0,0 +1,60 @@ +# debian/files -- lintian check script -*- perl -*- +# +# based on debhelper check, +# Copyright (C) 1999 Joey Hess +# Copyright (C) 2000 Sean 'Shaleh' Perry +# Copyright (C) 2002 Josip Rodin +# Copyright (C) 2007 Russ Allbery +# Copyright (C) 2013-2018 Bastien ROUCARIES +# Copyright (C) 2017-2020 Chris Lamb <lamby@debian.org> +# Copyright (C) 2020 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Debian::Files; + +use v5.20; +use warnings; +use utf8; + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +sub visit_patched_files { + my ($self, $item) = @_; + + return + unless $item->is_file; + + return + unless $item->name eq 'debian/files'; + + $self->pointed_hint('debian-files-list-in-source', $item->pointer) + if $item->size > 0; + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Debian/LineSeparators.pm b/lib/Lintian/Check/Debian/LineSeparators.pm new file mode 100644 index 0000000..3c174ab --- /dev/null +++ b/lib/Lintian/Check/Debian/LineSeparators.pm @@ -0,0 +1,62 @@ +# debian/line-separators -- lintian check script -*- perl -*- +# +# based on debhelper check, +# Copyright (C) 1999 Joey Hess +# Copyright (C) 2000 Sean 'Shaleh' Perry +# Copyright (C) 2002 Josip Rodin +# Copyright (C) 2007 Russ Allbery +# Copyright (C) 2013-2018 Bastien ROUCARIES +# Copyright (C) 2017-2020 Chris Lamb <lamby@debian.org> +# Copyright (C) 2020 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Debian::LineSeparators; + +use v5.20; +use warnings; +use utf8; + +use List::SomeUtils qw(none); + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +# files in ./debian to check for line terminators +my @CANDIDATES = qw(debian/control debian/changelog); + +sub visit_patched_files { + my ($self, $item) = @_; + + return + if none { $item->name eq $_ } @CANDIDATES; + + $self->pointed_hint('carriage-return-line-feed', $item->pointer) + if $item->bytes =~ m{\r\n\Z}m; + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Debian/LintianOverrides.pm b/lib/Lintian/Check/Debian/LintianOverrides.pm new file mode 100644 index 0000000..448e7f9 --- /dev/null +++ b/lib/Lintian/Check/Debian/LintianOverrides.pm @@ -0,0 +1,64 @@ +# debian/lintian-overrides -- lintian check script -*- perl -*- + +# Copyright (C) 1998 Christian Schwarz and Richard Braakman +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Debian::LintianOverrides; + +use v5.20; +use warnings; +use utf8; + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +sub visit_installed_files { + my ($self, $item) = @_; + + my $ppkg = quotemeta($self->processable->name); + + # misplaced overrides + if ($item->name =~ m{^usr/share/doc/$ppkg/override\.[lL]intian(?:\.gz)?$} + || $item->name =~ m{^usr/share/lintian/overrides/$ppkg/.+}) { + + $self->pointed_hint('override-file-in-wrong-location', $item->pointer); + + } elsif ($item->name =~ m{^usr/share/lintian/overrides/(.+)/.+$}) { + + my $expected = $1; + + $self->pointed_hint('override-file-in-wrong-package', + $item->pointer, $expected) + unless $self->processable->name eq $expected; + } + + $self->pointed_hint('old-source-override-location', $item->pointer) + if $item->name eq 'debian/source.lintian-overrides'; + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Debian/LintianOverrides/Comments.pm b/lib/Lintian/Check/Debian/LintianOverrides/Comments.pm new file mode 100644 index 0000000..11c0077 --- /dev/null +++ b/lib/Lintian/Check/Debian/LintianOverrides/Comments.pm @@ -0,0 +1,88 @@ +# debian/lintian-overrides/comments -- lintian check script -*- perl -*- + +# Copyright (C) 2020-2021 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Debian::LintianOverrides::Comments; + +use v5.20; +use warnings; +use utf8; + +use POSIX qw(ENOENT); + +use Lintian::Spelling qw(check_spelling check_spelling_picky); + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +sub always { + my ($self) = @_; + + my @declared_overrides = @{$self->processable->overrides}; + + for my $override (@declared_overrides) { + + next + unless length $override->justification; + + my $tag_name = $override->tag_name; + + # comments appear one or more lines before the override + # but they were concatenated + my $position = $override->position - 1; + + my $pointer= $self->processable->override_file->pointer($position); + + check_spelling( + $self->data, + $override->justification, + $self->group->spelling_exceptions, + $self->emitter('spelling-in-override-comment',$pointer, $tag_name) + ); + + check_spelling_picky( + $self->data, + $override->justification, + $self->emitter( + 'capitalization-in-override-comment', + $pointer,$tag_name + ) + ); + } + + return; +} + +sub emitter { + my ($self, @prefixed) = @_; + + return sub { + return $self->pointed_hint(@prefixed, @_); + }; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Debian/LintianOverrides/Duplicate.pm b/lib/Lintian/Check/Debian/LintianOverrides/Duplicate.pm new file mode 100644 index 0000000..e52d140 --- /dev/null +++ b/lib/Lintian/Check/Debian/LintianOverrides/Duplicate.pm @@ -0,0 +1,75 @@ +# debian/lintian-overrides/duplicate -- lintian check script -*- perl -*- + +# Copyright (C) 2021 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Debian::LintianOverrides::Duplicate; + +use v5.20; +use warnings; +use utf8; + +use Const::Fast; + +const my $SPACE => q{ }; + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +sub always { + my ($self) = @_; + + my %pattern_tracker; + for my $override (@{$self->processable->overrides}) { + + my $pattern = $override->pattern; + + # catch renames + my $tag_name = $self->profile->get_current_name($override->tag_name); + + push(@{$pattern_tracker{$tag_name}{$pattern}}, $override); + } + + for my $tag_name (keys %pattern_tracker) { + for my $pattern (keys %{$pattern_tracker{$tag_name}}) { + + my @overrides = @{$pattern_tracker{$tag_name}{$pattern}}; + + my @same_context = map { $_->position } @overrides; + my $line_numbers = join($SPACE, (sort @same_context)); + + my $override_item = $self->processable->override_file; + + $self->pointed_hint('duplicate-override-context', + $override_item->pointer,$tag_name,"(lines $line_numbers)") + if @overrides > 1; + } + } + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Debian/LintianOverrides/Malformed.pm b/lib/Lintian/Check/Debian/LintianOverrides/Malformed.pm new file mode 100644 index 0000000..3772889 --- /dev/null +++ b/lib/Lintian/Check/Debian/LintianOverrides/Malformed.pm @@ -0,0 +1,52 @@ +# debian/lintian-overrides/malformed -- lintian check script -*- perl -*- + +# Copyright (C) 2021 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Debian::LintianOverrides::Malformed; + +use v5.20; +use warnings; +use utf8; + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +sub always { + my ($self) = @_; + + for my $error (@{$self->processable->override_errors}) { + + my $message = $error->{message}; + my $pointer = $error->{pointer}; + + $self->pointed_hint('malformed-override', $pointer, $message); + } + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Debian/LintianOverrides/Mystery.pm b/lib/Lintian/Check/Debian/LintianOverrides/Mystery.pm new file mode 100644 index 0000000..92e6125 --- /dev/null +++ b/lib/Lintian/Check/Debian/LintianOverrides/Mystery.pm @@ -0,0 +1,65 @@ +# debian/lintian-overrides/mystery -- lintian check script -*- perl -*- + +# Copyright (C) 2021 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Debian::LintianOverrides::Mystery; + +use v5.20; +use warnings; +use utf8; + +use Const::Fast; + +const my $ARROW => q{=>}; + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +sub always { + my ($self) = @_; + + for my $override (@{$self->processable->overrides}) { + + my $override_item = $self->processable->override_file; + my $pointer = $override_item->pointer($override->position); + + my $mystery_name = $override->tag_name; + my $current_name = $self->profile->get_current_name($mystery_name); + + $self->pointed_hint('alien-tag', $pointer, $mystery_name) + if !length $current_name; + + $self->pointed_hint('renamed-tag', $pointer, $mystery_name, $ARROW, + $current_name) + if length $current_name + && $current_name ne $mystery_name; + } + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Debian/LintianOverrides/Restricted.pm b/lib/Lintian/Check/Debian/LintianOverrides/Restricted.pm new file mode 100644 index 0000000..cc2cda4 --- /dev/null +++ b/lib/Lintian/Check/Debian/LintianOverrides/Restricted.pm @@ -0,0 +1,80 @@ +# debian/lintian-overrides/restricted -- lintian check script -*- perl -*- + +# Copyright (C) 2021 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Debian::LintianOverrides::Restricted; + +use v5.20; +use warnings; +use utf8; + +use List::SomeUtils qw(true); + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +sub always { + my ($self) = @_; + + for my $override (@{$self->processable->overrides}) { + + my $override_item = $self->processable->override_file; + my $pointer = $override_item->pointer($override->position); + + my @architectures = @{$override->architectures}; + + if (@architectures && $self->processable->architecture eq 'all') { + $self->pointed_hint('invalid-override-restriction', + $pointer,'Architecture list in Arch:all installable'); + next; + } + + my @invalid + = grep { !$self->data->architectures->valid_restriction($_) } + @architectures; + $self->pointed_hint('invalid-override-restriction', + $pointer,"Unknown architecture wildcard $_") + for @invalid; + + next + if @invalid; + + # count negations + my $negations = true { /^!/ } @architectures; + + # confirm it is either all or none + if ($negations > 0 && $negations != @architectures) { + $self->pointed_hint('invalid-override-restriction', + $pointer,'Inconsistent architecture negation'); + next; + } + } + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Debian/Maintscript.pm b/lib/Lintian/Check/Debian/Maintscript.pm new file mode 100644 index 0000000..adee6be --- /dev/null +++ b/lib/Lintian/Check/Debian/Maintscript.pm @@ -0,0 +1,73 @@ +# debian/maintscript -- lintian check script -*- perl -*- + +# Copyright (C) 1999 by Joey Hess +# Copyright (C) 2016-2020 Chris Lamb <lamby@debian.org> +# Copyright (C) 2021 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Debian::Maintscript; + +use v5.20; +use warnings; +use utf8; + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +sub visit_patched_files { + my ($self, $item) = @_; + + return + unless $item->dirname eq 'debian/'; + + return + unless $item->basename =~ m{ (?: ^ | [.] ) maintscript $}x; + + return + unless $item->is_open_ok; + + open(my $fd, '<', $item->unpacked_path) + or die encode_utf8('Cannot open ' . $item->unpacked_path); + + my $position = 1; + while (my $line = <$fd>) { + + my $pointer = $item->pointer($position); + + $self->pointed_hint('maintscript-includes-maint-script-parameters', + $pointer) + if $line =~ /--\s+"\$(?:@|{@})"\s*$/; + + } continue { + ++$position; + } + + close $fd; + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Debian/ManualPages.pm b/lib/Lintian/Check/Debian/ManualPages.pm new file mode 100644 index 0000000..f1b654a --- /dev/null +++ b/lib/Lintian/Check/Debian/ManualPages.pm @@ -0,0 +1,67 @@ +# debian/manual-pages -- lintian check script -*- perl -*- + +# Copyright (C) 2020 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Debian::ManualPages; + +use v5.20; +use warnings; +use utf8; + +use List::SomeUtils qw{none}; + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +sub source { + my ($self) = @_; + + return + if $self->processable->native; + + my $debiandir = $self->processable->patched->resolve_path('debian'); + return + unless $debiandir; + + my @files = grep { $_->is_file } $debiandir->descendants; + my @nopatches = grep { $_->name !~ m{^debian/patches/} } @files; + + my @manual_pages = grep { $_->basename =~ m{\.\d$} } @nopatches; + + for my $item (@manual_pages) { + + my $command = $item->basename; + $command =~ s/ [.] \d $//x; + + $self->pointed_hint('maintainer-manual-page', $item->pointer) + if none { $command eq $_->basename } @files; + } + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Debian/NotInstalled.pm b/lib/Lintian/Check/Debian/NotInstalled.pm new file mode 100644 index 0000000..6e787b4 --- /dev/null +++ b/lib/Lintian/Check/Debian/NotInstalled.pm @@ -0,0 +1,74 @@ +# debian/not-installed -- lintian check script -*- perl -*- + +# Copyright (C) 2020-2021 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Debian::NotInstalled; + +use v5.20; +use warnings; +use utf8; + +use Unicode::UTF8 qw(encode_utf8); + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +sub visit_patched_files { + my ($self, $item) = @_; + + return + unless $item->name eq 'debian/not-installed'; + + return + unless $item->is_open_ok; + + open(my $fd, '<', $item->unpacked_path) + or die encode_utf8('Cannot open ' . $item->unpacked_path); + + my $position = 1; + while (my $line = <$fd>) { + + # disregard comments + next + if $line =~ m{^ \s* [#] }x; + + # architecture triplet + $self->pointed_hint('unwanted-path-too-specific', + $item->pointer($position), $line) + if $line =~ m{^ usr/lib/ [^/-]+ - [^/-]+ - [^/-]+ / }x + && $line !~ m{^ usr/lib/ [*] / }x; + + } continue { + ++$position; + } + + close $fd; + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Debian/Patches.pm b/lib/Lintian/Check/Debian/Patches.pm new file mode 100644 index 0000000..b9a3ec2 --- /dev/null +++ b/lib/Lintian/Check/Debian/Patches.pm @@ -0,0 +1,104 @@ +# debian/patches -- lintian check script -*- perl -*- +# +# Copyright (C) 2007 Marc Brockschmidt +# Copyright (C) 2008 Raphael Hertzog +# Copyright (C) 2018-2019 Chris Lamb <lamby@debian.org> +# Copyright (C) 2020 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Debian::Patches; + +use v5.20; +use warnings; +use utf8; + +use Path::Tiny; + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +sub source { + my ($self) = @_; + + my @patch_system; + + # Get build deps so we can decide which build system the + # maintainer meant to use: + my $build_deps = $self->processable->relation('Build-Depends-All'); + + # Get source package format + my $source_format = $self->processable->fields->value('Format'); + my $quilt_format = ($source_format =~ /3\.\d+ \(quilt\)/) ? 1 : 0; + + my $debian_dir = $self->processable->patched->resolve_path('debian/'); + return + unless defined $debian_dir; + + my $patch_dir = $debian_dir->resolve_path('patches'); + + # Find debian/patches/series, assuming debian/patches is a (symlink to a) + # dir. There are cases, where it is a file (ctwm: #778556) + my $patch_series; + $patch_series + = $self->processable->patched->resolve_path('debian/patches/series'); + + push(@patch_system, 'dpatch') + if $build_deps->satisfies('dpatch'); + + push(@patch_system, 'quilt') + if $quilt_format || $build_deps->satisfies('quilt'); + + $self->hint('patch-system', $_) for @patch_system; + + $self->hint('more-than-one-patch-system') + if @patch_system > 1; + + if (@patch_system && !$quilt_format) { + + my $readme = $debian_dir->resolve_path('README.source'); + $self->hint('patch-system-but-no-source-readme') + unless defined $readme; + } + + my @direct_changes + = grep { !m{^debian/} } keys %{$self->processable->diffstat}; + if (@direct_changes) { + + my $files = $direct_changes[0]; + $files .= " and $#direct_changes more" + if @direct_changes > 1; + + $self->hint('patch-system-but-direct-changes-in-diff', $files) + if @patch_system; + + $self->hint('direct-changes-in-diff-but-no-patch-system', $files) + unless @patch_system; + } + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Debian/Patches/Count.pm b/lib/Lintian/Check/Debian/Patches/Count.pm new file mode 100644 index 0000000..589e2ba --- /dev/null +++ b/lib/Lintian/Check/Debian/Patches/Count.pm @@ -0,0 +1,54 @@ +# debian/patches/count -- lintian check script -*- perl -*- +# +# Copyright (C) 2020 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Debian::Patches::Count; + +use v5.20; +use warnings; +use utf8; + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +sub visit_patched_files { + my ($self, $item) = @_; + + return + unless $item->name eq 'debian/patches/series'; + + my @lines = split(/\n/, $item->decoded_utf8); + + # remove lines containing only comments + my @patches = grep { !/^\s*(?:#|$)/ } @lines; + + $self->pointed_hint('number-of-patches', $item->pointer, scalar @patches); + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Debian/Patches/Dep3.pm b/lib/Lintian/Check/Debian/Patches/Dep3.pm new file mode 100644 index 0000000..6624a0c --- /dev/null +++ b/lib/Lintian/Check/Debian/Patches/Dep3.pm @@ -0,0 +1,105 @@ +# debian/patches/dep3 -- lintian check script -*- perl -*- + +# Copyright (C) 2020 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Debian::Patches::Dep3; + +use v5.20; +use warnings; +use utf8; + +use Const::Fast; +use List::SomeUtils qw(any none); +use Syntax::Keyword::Try; +use Unicode::UTF8 qw(valid_utf8 decode_utf8); + +use Lintian::Deb822; + +const my $EMPTY => q{}; + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +sub visit_patched_files { + my ($self, $item) = @_; + + return + unless $item->name =~ m{^debian/patches/}; + + return + unless $item->is_file; + + return + if $item->name eq 'debian/patches/series' + || $item->name eq 'debian/patches/README'; + + my $bytes = $item->bytes; + return + unless length $bytes; + + my ($headerbytes) = split(/^---/m, $bytes, 2); + + return + unless valid_utf8($headerbytes); + + my $header = decode_utf8($headerbytes); + return + unless length $header; + + my $deb822 = Lintian::Deb822->new; + + my @sections; + try { + @sections = $deb822->parse_string($header); + + } catch { + return; + } + + return + unless @sections; + + # use last mention when present multiple times + my $origin = $deb822->last_mention('Origin'); + + my ($category) = split(m{\s*,\s*}, $origin, 2); + $category //= $EMPTY; + return + if any { $category eq $_ } qw(upstream backport); + + $self->pointed_hint('patch-not-forwarded-upstream', $item->pointer) + if $deb822->last_mention('Forwarded') eq 'no' + || none { length } ( + $deb822->last_mention('Applied-Upstream'), + $deb822->last_mention('Bug'), + $deb822->last_mention('Forwarded') + ); + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Debian/Patches/Dpatch.pm b/lib/Lintian/Check/Debian/Patches/Dpatch.pm new file mode 100644 index 0000000..337fa53 --- /dev/null +++ b/lib/Lintian/Check/Debian/Patches/Dpatch.pm @@ -0,0 +1,150 @@ +# debian/patches -- lintian check script -*- perl -*- +# +# Copyright (C) 2007 Marc Brockschmidt +# Copyright (C) 2008 Raphael Hertzog +# Copyright (C) 2018-2019 Chris Lamb <lamby@debian.org> +# Copyright (C) 2020 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Debian::Patches::Dpatch; + +use v5.20; +use warnings; +use utf8; + +use Const::Fast; +use Unicode::UTF8 qw(encode_utf8); + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +const my $EMPTY => q{}; +const my $SPACE => q{ }; + +sub source { + my ($self) = @_; + + my $build_deps = $self->processable->relation('Build-Depends-All'); + return + unless $build_deps->satisfies('dpatch'); + + my $patch_dir + = $self->processable->patched->resolve_path('debian/patches/'); + return + unless defined $patch_dir; + + $self->hint('package-uses-deprecated-dpatch-patch-system'); + + my @list_files + = grep {$_->basename =~ m/^00list/ && $_->is_open_ok} + $patch_dir->children; + + $self->hint('dpatch-build-dep-but-no-patch-list') + unless @list_files; + + my $options_file = $patch_dir->resolve_path('00options'); + + my $list_uses_cpp = 0; + $list_uses_cpp = 1 + if defined $options_file + && $options_file->decoded_utf8 =~ /DPATCH_OPTION_CPP=1/; + + for my $file (@list_files) { + my @patches; + + open(my $fd, '<', $file->unpacked_path) + or die encode_utf8('Cannot open ' . $file->unpacked_path); + + while(my $line = <$fd>) { + chomp $line; + + #ignore comments or CPP directive + next + if $line =~ /^\#/; + + # remove C++ style comments + $line =~ s{//.*}{} + if $list_uses_cpp; + + if ($list_uses_cpp && $line =~ m{/\*}) { + + # remove C style comments + $line .= <$fd> while ($line !~ m{\*/}); + + $line =~ s{/\*[^*]*\*/}{}g; + } + + #ignore blank lines + next + if $line =~ /^\s*$/; + + push @patches, split($SPACE, $line); + } + close($fd); + + for my $patch_name (@patches) { + + my $patch_file = $patch_dir->child($patch_name); + $patch_file = $patch_dir->child("${patch_name}.dpatch") + unless defined $patch_file; + + unless (defined $patch_file) { + $self->hint('dpatch-index-references-non-existent-patch', + $patch_name); + next; + } + + next + unless $patch_file->is_open_ok; + + my $description = $EMPTY; + open(my $fd, '<', $patch_file->unpacked_path) + or die encode_utf8('Cannot open ' . $patch_file->unpacked_path); + + while (my $line = <$fd>) { + # stop if something looking like a patch + # starts: + last + if $line =~ /^---/; + # note comment if we find a proper one + $description .= $1 + if $line =~ /^\#+\s*DP:\s*(\S.*)$/ + && $1 !~ /^no description\.?$/i; + $description .= $1 + if $line =~ /^\# (?:Description|Subject): (.*)/; + } + close($fd); + + $self->pointed_hint('dpatch-missing-description', + $patch_file->pointer) + unless length $description; + } + } + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Debian/Patches/Quilt.pm b/lib/Lintian/Check/Debian/Patches/Quilt.pm new file mode 100644 index 0000000..2e78055 --- /dev/null +++ b/lib/Lintian/Check/Debian/Patches/Quilt.pm @@ -0,0 +1,290 @@ +# debian/patches/quilt -- lintian check script -*- perl -*- +# +# Copyright (C) 2007 Marc Brockschmidt +# Copyright (C) 2008 Raphael Hertzog +# Copyright (C) 2018-2019 Chris Lamb <lamby@debian.org> +# Copyright (C) 2020 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Debian::Patches::Quilt; + +use v5.20; +use warnings; +use utf8; + +use Const::Fast; +use List::SomeUtils qw(any); +use Unicode::UTF8 qw(decode_utf8 encode_utf8); + +use Lintian::IPC::Run3 qw(safe_qx); +use Lintian::Spelling qw(check_spelling); + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +const my $PATCH_DESC_TEMPLATE => + 'TODO: Put a short summary on the line above and replace this paragraph'; +const my $EMPTY => q{}; + +sub spelling_tag_emitter { + my ($self, $tag_name, $item, @orig_args) = @_; + + my $pointer = $item->pointer($.); + + return sub { + return $self->pointed_hint($tag_name, $pointer, @orig_args, @_); + }; +} + +sub source { + my ($self) = @_; + + my $build_deps = $self->processable->relation('Build-Depends-All'); + + my $source_format = $self->processable->fields->value('Format'); + my $quilt_format = ($source_format =~ /3\.\d+ \(quilt\)/) ? 1 : 0; + + my $debian_dir = $self->processable->patched->resolve_path('debian/'); + return + unless defined $debian_dir; + + my $patch_dir = $debian_dir->resolve_path('patches'); + my %known_files; + + # Find debian/patches/series, assuming debian/patches is a (symlink to a) + # dir. There are cases, where it is a file (ctwm: #778556) + my $patch_series; + $patch_series + = $self->processable->patched->resolve_path('debian/patches/series'); + + # 3.0 (quilt) sources do not need quilt + unless ($quilt_format) { + + $self->hint('quilt-build-dep-but-no-series-file') + if $build_deps->satisfies('quilt') + && (!defined $patch_series || !$patch_series->is_open_ok); + + $self->pointed_hint('quilt-series-but-no-build-dep', + $patch_series->pointer) + if $patch_series + && $patch_series->is_file + && !$build_deps->satisfies('quilt'); + } + + return + unless $quilt_format || $build_deps->satisfies('quilt'); + + if ($patch_series && $patch_series->is_open_ok) { + + my @patch_names; + + open(my $series_fd, '<', $patch_series->unpacked_path) + or die encode_utf8('Cannot open ' . $patch_series->unpacked_path); + + my $position = 1; + while (my $line = <$series_fd>) { + + # Strip comment + $line =~ s/(?:^|\s+)#.*$//; + + if (rindex($line,"\n") < 0) { + $self->pointed_hint('quilt-series-without-trailing-newline', + $patch_series->pointer); + } + + # trim both ends + $line =~ s/^\s+|\s+$//g; + + next + unless length $line; + + if ($line =~ m{^(\S+)\s+(\S.*)$}) { + + my $patch = $1; + my $patch_options = $2; + + push(@patch_names, $patch); + + $self->pointed_hint('quilt-patch-with-non-standard-options', + $patch_series->pointer($position), $line) + unless $patch_options eq '-p1'; + + } else { + push(@patch_names, $line); + } + + } continue { + ++$position; + } + + close $series_fd; + + my @patch_files; + for my $name (@patch_names) { + + my $item = $patch_dir->resolve_path($name); + + if (defined $item && $item->is_file) { + push(@patch_files, $item); + + } else { + $self->pointed_hint( + 'quilt-series-references-non-existent-patch', + $patch_series->pointer, $name); + } + } + + for my $item (@patch_files) { + + next + unless $item->is_open_ok; + + my $description = $EMPTY; + my $has_template_description = 0; + + open(my $patch_fd, '<', $item->unpacked_path) + or die encode_utf8('Cannot open ' . $item->unpacked_path); + + while (my $line = <$patch_fd>) { + + # stop if something looking like a patch starts: + last + if $line =~ /^---/; + + next + if $line =~ /^\s*$/; + + # Skip common "lead-in" lines + $description .= $line + unless $line =~ m{^(?:Index: |=+$|diff .+|index |From: )}; + + $has_template_description = 1 + if $line =~ / \Q$PATCH_DESC_TEMPLATE\E /msx; + } + close $patch_fd; + + $self->pointed_hint('quilt-patch-missing-description', + $item->pointer) + unless length $description; + + $self->pointed_hint('quilt-patch-using-template-description', + $item->pointer) + if $has_template_description; + + $self->check_patch($item, $description); + } + } + + if ($quilt_format) { # 3.0 (quilt) specific checks + # Format 3.0 packages may generate a debian-changes-$version patch + my $version = $self->processable->fields->value('Version'); + my $patch_header= $debian_dir->resolve_path('source/patch-header'); + my $versioned_patch; + + $versioned_patch= $patch_dir->resolve_path("debian-changes-$version") + if $patch_dir; + + if (defined $versioned_patch && $versioned_patch->is_file) { + + $self->pointed_hint('format-3.0-but-debian-changes-patch', + $versioned_patch->pointer) + if !defined $patch_header || !$patch_header->is_file; + } + } + + if ($patch_dir and $patch_dir->is_dir and $source_format ne '2.0') { + # Check all series files, including $vendor.series + for my $item ($patch_dir->children) { + next + unless $item->name =~ /\/(.+\.)?series$/; + next + unless $item->is_open_ok; + + $known_files{$item->basename}++; + + open(my $fd, '<', $item->unpacked_path) + or die encode_utf8('Cannot open ' . $item->unpacked_path); + + while (my $line = <$fd>) { + $known_files{$1}++ + if $line =~ m{^\s*(?:#+\s*)?(\S+)}; + } + close($fd); + + $self->pointed_hint('package-uses-vendor-specific-patch-series', + $item->pointer) + if $item->name =~ m{ [.]series $}x; + } + + for my $item ($patch_dir->descendants) { + next + if $item->basename =~ /^README(\.patches)?$/ + || $item->basename =~ /\.in/g; + + # Use path relative to debian/patches for "subdir/foo" + my $name = substr($item, length $patch_dir); + + $self->pointed_hint( + 'patch-file-present-but-not-mentioned-in-series', + $item->pointer) + unless $known_files{$name} || $item->is_dir; + } + } + + return; +} + +# Checks on patches common to all build systems. +sub check_patch { + my ($self, $item, $description) = @_; + + unless (any { /(spelling|typo)/i } ($item->name, $description)) { + my $tag_emitter + = $self->spelling_tag_emitter('spelling-error-in-patch-description', + $item); + check_spelling($self->data, $description, + $self->group->spelling_exceptions, + $tag_emitter, 0); + } + + # Use --strip=1 to strip off the first layer of directory in case + # the parent directory in which the patches were generated was + # named "debian". This will produce false negatives for --strip=0 + # patches that modify files in the debian/* directory, but as of + # 2010-01-01, all cases where the first level of the patch path is + # "debian/" in the archive are false positives. + my $bytes = safe_qx('lsdiff', '--strip=1', $item->unpacked_path); + my $output = decode_utf8($bytes); + + my @debian_files = ($output =~ m{^((?:\./)?debian/.*)$}ms); + + $self->pointed_hint('patch-modifying-debian-files', $item->pointer, $_) + for @debian_files; + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Debian/PoDebconf.pm b/lib/Lintian/Check/Debian/PoDebconf.pm new file mode 100644 index 0000000..333fee5 --- /dev/null +++ b/lib/Lintian/Check/Debian/PoDebconf.pm @@ -0,0 +1,391 @@ +# debian/po-debconf -- lintian check script -*- perl -*- + +# Copyright (C) 2002-2004 by Denis Barbier <barbier@linuxfr.org> +# Copyright (C) 2021 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Debian::PoDebconf; + +use v5.20; +use warnings; +use utf8; + +use Const::Fast; +use Cwd qw(realpath); +use File::Temp(); +use IPC::Run3; +use Syntax::Keyword::Try; +use Unicode::UTF8 qw(encode_utf8); + +use Lintian::IPC::Run3 qw(safe_qx); + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +const my $EMPTY => q{}; + +sub source { + my ($self) = @_; + + my $processable = $self->processable; + + my $has_template = 0; + my @lang_templates; + my $full_translation = 0; + + my $debian_dir = $processable->patched->resolve_path('debian/'); + return + unless $debian_dir; + + my $debian_po_dir = $debian_dir->resolve_path('po'); + my ($templ_pot_path, $potfiles_in_path); + + if ($debian_po_dir and $debian_po_dir->is_dir) { + $templ_pot_path = $debian_po_dir->resolve_path('templates.pot'); + $potfiles_in_path = $debian_po_dir->resolve_path('POTFILES.in'); + } + + # First, check whether this package seems to use debconf but not + # po-debconf. Read the templates file and look at the template + # names it provides, since some shared templates aren't + # translated. + for my $item ($debian_dir->children) { + next + unless $item->is_open_ok; + + if ($item->basename =~ m/^(.+\.)?templates(\..+)?$/) { + if ($item->basename =~ m/templates\.\w\w(_\w\w)?$/) { + push(@lang_templates, $item); + + open(my $fd, '<', $item->unpacked_path) + or die encode_utf8('Cannot open ' . $item->unpacked_path); + + while (my $line = <$fd>) { + + $self->pointed_hint('untranslatable-debconf-templates', + $item->pointer($.)) + if $line =~ /^Description: (.+)/i + && $1 !~/for internal use/; + } + + close $fd; + + } else { + open(my $fd, '<', $item->unpacked_path) + or die encode_utf8('Cannot open ' . $item->unpacked_path); + + my $in_template = 0; + my $saw_tl_note = 0; + while (my $line = <$fd>) { + chomp $line; + + $self->pointed_hint('translated-default-field', + $item->pointer($.)) + if $line =~ m{^_Default(?:Choice)?: [^\[]*$} + && !$saw_tl_note; + + $self->pointed_hint('untranslatable-debconf-templates', + $item->pointer($.)) + if $line =~ /^Description: (.+)/i + && $1 !~/for internal use/; + + if ($line =~ /^#/) { + # Is this a comment for the translators? + $saw_tl_note = 1 + if $line =~ /translators/i; + + next; + } + + # If it is not a continuous comment immediately before the + # _Default(Choice) field, we don't care about it. + $saw_tl_note = 0; + + if ($line =~ /^Template: (\S+)/i) { + my $template = $1; + next + if $template eq 'shared/packages-wordlist' + or $template eq 'shared/packages-ispell'; + + next + if $template =~ m{/languages$}; + + $in_template = 1; + + } elsif ($in_template && $line =~ /^_?Description: (.+)/i){ + my $description = $1; + next + if $description =~ /for internal use/; + $has_template = 1; + + } elsif ($in_template && !length($line)) { + $in_template = 0; + } + } + + close($fd); + } + } + } + + #TODO: check whether all templates are named in TEMPLATES.pot + if ($has_template) { + if (not $debian_po_dir or not $debian_po_dir->is_dir) { + $self->hint('not-using-po-debconf'); + return; + } + } else { + return; + } + + # If we got here, we're using po-debconf, so there shouldn't be any stray + # language templates left over from debconf-mergetemplate. + for my $item (@lang_templates) { + $self->pointed_hint('stray-translated-debconf-templates', + $item->pointer) + unless $item->basename =~ m{ templates[.]in$}x; + } + + my $missing_files = 0; + + if ($potfiles_in_path and $potfiles_in_path->is_open_ok) { + + open(my $fd, '<', $potfiles_in_path->unpacked_path) + or + die encode_utf8('Cannot open ' . $potfiles_in_path->unpacked_path); + + my $position = 1; + while (my $line = <$fd>) { + chomp $line; + + next + if $line =~ /^\s*\#/; + + $line =~ s/.*\]\s*//; + + # Cannot check files which are not under debian/ + # m,^\.\./, or + next + if $line eq $EMPTY; + + my $pointer = $potfiles_in_path->pointer($position); + + my $po_path = $debian_dir->resolve_path($line); + unless ($po_path and $po_path->is_file) { + + $self->pointed_hint('missing-file-from-potfiles-in', + $pointer, $line); + $missing_files = 1; + } + + } continue { + ++$position; + } + + close $fd; + + } else { + $self->hint('missing-potfiles-in'); + $missing_files = 1; + } + if (not $templ_pot_path or not $templ_pot_path->is_open_ok) { + # We use is_open_ok here, because if it is present, we will + # (have a subprocess) open it if the POTFILES.in file also + # existed. + $self->hint('missing-templates-pot'); + $missing_files = 1; + } + + if ($missing_files == 0) { + my $temp_obj + = File::Temp->newdir('lintian-po-debconf-XXXXXX',TMPDIR => 1); + my $abs_tempdir = realpath($temp_obj->dirname) + or croak('Cannot resolve ' . $temp_obj->dirname . ": $!"); + # We need an extra level of dirs, as intltool (in)directly + # tries to use files in ".." if they exist + # (e.g. ../templates.h). + # - In fact, we also need to copy debian/templates into + # this "fake package directory", since intltool-updates + # sometimes want to write files to "../templates" based + # on the contents of the package. (See #778558) + my $tempdir = "$abs_tempdir/po"; + my $test_pot = "$tempdir/test.pot"; + my $tempdir_templates = "${abs_tempdir}/templates"; + my $d_templates = $debian_dir->resolve_path('templates'); + + # Create our extra level + mkdir($tempdir) + or die encode_utf8('Cannot create directory ' . $tempdir); + + # Copy the templates dir because intltool-update might + # write to it. + safe_qx( + qw{cp -a --reflink=auto --}, + $d_templates->unpacked_path, + $tempdir_templates + )if $d_templates; + + my $error; + my %save = %ENV; + my $cwd = Cwd::getcwd; + + try { + $ENV{INTLTOOL_EXTRACT} + = '/usr/share/intltool-debian/intltool-extract'; + # use of $debian_po is safe; we accessed two children by now. + $ENV{srcdir} = $debian_po_dir->unpacked_path; + + chdir($tempdir) + or die encode_utf8('Cannot change directory ' . $tempdir); + + # generate a "test.pot" in a tempdir + my @intltool = ( + '/usr/share/intltool-debian/intltool-update', + '--gettext-package=test','--pot' + ); + safe_qx(@intltool); + die encode_utf8("system @intltool failed: $?") + if $?; + + } catch { + # catch any error + $error = $@; + + } finally { + # restore environment + %ENV = %save; + + # restore working directory + chdir($cwd) + or die encode_utf8('Cannot change directory ' . $cwd); + } + + # output could be helpful to user but is currently not printed + + if ($error) { + $self->pointed_hint('invalid-potfiles-in', + $potfiles_in_path->pointer); + return; + } + + # throw away output on the following commands + $error = undef; + + try { + # compare our "test.pot" with the existing "templates.pot" + my @testleft = ( + 'msgcmp', '--use-untranslated', + $test_pot, $templ_pot_path->unpacked_path + ); + safe_qx(@testleft); + die encode_utf8("system @testleft failed: $?") + if $?; + + # is this not equivalent to the previous command? - FL + my @testright = ( + 'msgcmp', '--use-untranslated', + $templ_pot_path->unpacked_path, $test_pot + ); + safe_qx(@testright); + die encode_utf8("system @testright failed: $?") + if $?; + + } catch { + # catch any error + $error = $@; + } + + $self->pointed_hint('newer-debconf-templates',$templ_pot_path->pointer) + if length $error; + } + + return + unless $debian_po_dir; + + for my $po_item ($debian_po_dir->children) { + + next + unless $po_item->basename =~ m/\.po$/ || $po_item->is_dir; + + $self->pointed_hint('misnamed-po-file', $po_item->pointer) + unless ( + $po_item->basename =~ /^[a-z]{2,3}(_[A-Z]{2})?(?:\@[^\.]+)?\.po$/); + + next + unless $po_item->is_open_ok; + + my $bytes = $po_item->bytes; + + $self->pointed_hint('debconf-translation-using-general-list', + $po_item->pointer) + if $bytes =~ /Language\-Team:.*debian-i18n\@lists\.debian\.org/i; + + unless ($bytes =~ /^msgstr/m) { + + $self->pointed_hint('invalid-po-file', $po_item->pointer); + next; + } + + if ($bytes =~ /charset=(.*?)\\n/) { + + my $charset = ($1 eq 'CHARSET' ? $EMPTY : $1); + + $self->pointed_hint('unknown-encoding-in-po-file', + $po_item->pointer) + unless length $charset; + } + + my $error; + + my $stats; + + delete local $ENV{$_} + for grep { $_ ne 'PATH' && $_ ne 'TMPDIR' } keys %ENV; + local $ENV{LC_ALL} = 'C'; + + my @command = ( + 'msgfmt', '-o', '/dev/null', '--statistics', + $po_item->unpacked_path + ); + + run3(\@command, \undef, \undef, \$stats); + + $self->pointed_hint('invalid-po-file', $po_item->pointer) + if $?; + + $stats //= $EMPTY; + + $full_translation = 1 + if $stats =~ m/^\w+ \w+ \w+\.$/; + } + + $self->hint('no-complete-debconf-translation') + if !$full_translation; + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Debian/Readme.pm b/lib/Lintian/Check/Debian/Readme.pm new file mode 100644 index 0000000..c8fd030 --- /dev/null +++ b/lib/Lintian/Check/Debian/Readme.pm @@ -0,0 +1,176 @@ +# debian/readme -- lintian check script -*- perl -*- + +# Copyright (C) 1998 Richard Braakman +# Copyright (C) 2021 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Debian::Readme; + +use v5.20; +use warnings; +use utf8; + +use Const::Fast; +use Unicode::UTF8 qw(encode_utf8); + +use Lintian::Spelling qw(check_spelling); + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +const my $EMPTY => q{}; +const my $VERTICAL_BAR => q{|}; + +sub spelling_tag_emitter { + my ($self, $tag_name, $item, @orig_args) = @_; + + my $pointer = $item->pointer($.); + + return sub { + return $self->pointed_hint($tag_name, $pointer, @orig_args, @_); + }; +} + +sub open_readme { + my ($pkg_name, $processable) = @_; + + my $doc_dir + = $processable->installed->resolve_path("usr/share/doc/${pkg_name}/"); + + if (defined $doc_dir) { + + for my $name ( + qw(README.Debian.gz README.Debian README.debian.gz README.debian)){ + + my $path = $doc_dir->child($name); + + next + unless $path && $path->is_open_ok; + + if ($name =~ m/\.gz$/) { + open(my $fd, '<:gzip', $path->unpacked_path) + or die encode_utf8('Cannot open ' . $path->unpacked_path); + + return $fd; + } + + open(my $fd, '<', $path->unpacked_path) + or die encode_utf8('Cannot open ' . $path->unpacked_path); + + return $fd; + } + } + + return undef; +} + +sub installable { + my ($self) = @_; + + my $pkg_name = $self->processable->name; + my $group = $self->group; + + my $doc_dir + = $self->processable->installed->resolve_path( + "usr/share/doc/${pkg_name}/"); + + return + unless defined $doc_dir; + + my $item; + my $fd; + + for my $name ( + qw(README.Debian.gz README.Debian README.debian.gz README.debian)){ + + $item = $doc_dir->child($name); + + next + unless $item && $item->is_open_ok; + + if ($name =~ m/\.gz$/) { + open($fd, '<:gzip', $item->unpacked_path) + or die encode_utf8('Cannot open ' . $item->unpacked_path); + + last; + } + + open($fd, '<', $item->unpacked_path) + or die encode_utf8('Cannot open ' . $item->unpacked_path); + + last; + } + + return + unless defined $item + && defined $fd; + + my $readme = $EMPTY; + + my $position = 1; + while (my $line = <$fd>) { + + my $pointer = $item->pointer($position); + + $self->pointed_hint('readme-debian-mentions-usr-doc', $pointer) + if $line =~ m{ /usr/doc \b }x; + + $readme .= $line; + + } continue { + ++$position; + } + + close $fd; + + my @template =( + 'Comments regarding the Package', + 'So far nothing to say', + '<possible notes regarding this package - if none, delete this file>', + 'Automatically generated by debmake' + ); + + my $regex = join($VERTICAL_BAR, @template); + + if ($readme =~ m/$regex/i) { + $self->pointed_hint('readme-debian-contains-debmake-template', + $item->pointer); + + } elsif ($readme =~ m/^\s*-- [^<]*<([^> ]+.\@[^>.]*)>/m) { + + my $address = $1; + + $self->pointed_hint('readme-debian-contains-invalid-email-address', + $item->pointer, $address); + } + + check_spelling($self->data,$readme,$group->spelling_exceptions, + $self->spelling_tag_emitter('spelling-error-in-readme-debian', $item)); + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Debian/Rules.pm b/lib/Lintian/Check/Debian/Rules.pm new file mode 100644 index 0000000..ffae6cb --- /dev/null +++ b/lib/Lintian/Check/Debian/Rules.pm @@ -0,0 +1,671 @@ +# debian/rules -- lintian check script -*- perl -*- + +# Copyright (C) 2006 Russ Allbery <rra@debian.org> +# Copyright (C) 2005 Rene van Bevern <rvb@pro-linux.de> +# Copyright (C) 2019-2020 Chris Lamb <lamby@debian.org> +# Copyright (C) 2021 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +package Lintian::Check::Debian::Rules; + +use v5.20; +use warnings; +use utf8; + +use Carp qw(croak); +use Const::Fast; +use List::Compare; +use List::SomeUtils qw(any none uniq); +use Unicode::UTF8 qw(encode_utf8); + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +const my $EMPTY => q{}; +const my $SPACE => q{ }; +const my $PERCENT => q{%}; + +my @py3versions = qw(3.4 3.5 3.6 3.7); + +my $PYTHON_DEPEND= 'python2:any | python2-dev:any'; +my $PYTHON3_DEPEND + = 'python3:any | python3-dev:any | python3-all:any | python3-all-dev:any'; +my $PYTHON2X_DEPEND = 'python2.7:any | python2.7-dev:any'; +my $PYTHON3X_DEPEND + = join(' | ',map { "python${_}:any | python${_}-dev:any" } @py3versions); +my $ANYPYTHON_DEPEND + = "$PYTHON_DEPEND | $PYTHON2X_DEPEND | $PYTHON3_DEPEND | $PYTHON3X_DEPEND"; +my $PYTHON3_ALL_DEPEND + = 'python3-all:any | python3-all-dev:any | python3-all-dbg:any'; + +my %TAG_FOR_POLICY_TARGET = ( + build => 'debian-rules-missing-required-target', + binary => 'debian-rules-missing-required-target', + 'binary-arch' => 'debian-rules-missing-required-target', + 'binary-indep' => 'debian-rules-missing-required-target', + clean => 'debian-rules-missing-required-target', + 'build-arch' => 'debian-rules-missing-required-target', + 'build-indep' => 'debian-rules-missing-required-target' +); + +# Rules about required debhelper command ordering. Each command is put into a +# class and the tag is issued if they're called in the wrong order for the +# classes. Unknown commands won't trigger this flag. +my %debhelper_order = ( + dh_makeshlibs => 1, + dh_shlibdeps => 2, + dh_installdeb => 2, + dh_gencontrol => 2, + dh_builddeb => 3 +); + +sub source { + my ($self) = @_; + + my $debian_dir = $self->processable->patched->resolve_path('debian'); + + my $rules; + $rules = $debian_dir->child('rules') + if defined $debian_dir; + + return + unless defined $rules; + + # Policy could be read as allowing debian/rules to be a symlink to + # some other file, and in a native Debian package it could be a + # symlink to a file that we didn't unpack. + $self->pointed_hint('debian-rules-is-symlink', $rules->pointer) + if $rules->is_symlink; + + # dereference symbolic links + $rules = $rules->follow; + + return + unless defined $rules; + + $self->pointed_hint('debian-rules-not-executable', $rules->pointer) + unless $rules->is_executable; + + my $KNOWN_MAKEFILES= $self->data->load('rules/known-makefiles', '\|\|'); + my $DEPRECATED_MAKEFILES= $self->data->load('rules/deprecated-makefiles'); + + my $architecture = $self->processable->fields->value('Architecture'); + + # If the version field is missing, we assume a neutral non-native one. + my $version = $self->processable->fields->value('Version') || '0-1'; + + # Check for required #!/usr/bin/make -f opening line. Allow -r or -e; a + # strict reading of Policy doesn't allow either, but they seem harmless. + $self->pointed_hint('debian-rules-not-a-makefile', $rules->pointer) + unless $rules->hashbang =~ m{^/usr/bin/make\s+-[re]?f[re]?$}; + + # Certain build tools must be listed in Build-Depends even if there are no + # arch-specific packages because they're required in order to run the clean + # rule. (See Policy 7.6.) The following is a list of package dependencies; + # regular expressions that, if they match anywhere in the debian/rules file, + # say that this package is allowed (and required) in Build-Depends; and + # optional tags to use for reporting the problem if some information other + # than the default is required. + my %GLOBAL_CLEAN_DEPENDS = ( + 'ant:any' => [qr{^include\s*/usr/share/cdbs/1/rules/ant\.mk}], + 'cdbs:any' => [ + qr{^include\s+/usr/share/cdbs/}, + qr{^include\s+/usr/share/R/debian/r-cran\.mk} + ], + 'dbs:any' => [qr{^include\s+/usr/share/dbs/}], + 'dh-make-php:any' => [qr{^include\s+/usr/share/cdbs/1/class/pear\.mk}], + 'debhelper:any | debhelper-compat:any' =>[ + qr{^include\s+/usr/share/cdbs/1/rules/debhelper\.mk}, + qr{^include\s+/usr/share/R/debian/r-cran\.mk} + ], + 'dpatch:any' => [ + qr{^include\s+/usr/share/dpatch/}, + qr{^include\s+/usr/share/cdbs/1/rules/dpatch\.mk} + ], + 'gnome-pkg-tools:any | dh-sequence-gnome:any' => + [qr{^include\s+/usr/share/gnome-pkg-tools/}], + 'quilt:any' => [ + qr{^include\s+/usr/share/quilt/}, + qr{^include\s+/usr/share/cdbs/1/rules/patchsys-quilt\.mk} + ], + 'mozilla-devscripts:any' => + [qr{^include\s+/usr/share/mozilla-devscripts/}], + 'ruby-pkg-tools:any' => + [qr{^include\s+/usr/share/ruby-pkg-tools/1/class/}], + 'r-base-dev:any' => [qr{^include\s+/usr/share/R/debian/r-cran\.mk}], + $ANYPYTHON_DEPEND =>[qr{/usr/share/cdbs/1/class/python-distutils\.mk}], + ); + + # A list of packages; regular expressions that, if they match anywhere in the + # debian/rules file, this package must be listed in either Build-Depends or + # Build-Depends-Indep as appropriate; and optional tags as above. + my %GLOBAL_DEPENDS = ( + 'dh-ocaml:any, ocaml-nox:any | ocaml:any' => + [qr/^\t\s*dh_ocaml(?:init|doc)\s/], + 'debhelper:any | debhelper-compat:any | dh-autoreconf:any' => + [qr/^\t\s*dh_autoreconf(?:_clean)?\s/], + ); + + # Similarly, this list of packages, regexes, and optional tags say that if the + # regex matches in one of clean, build-arch, binary-arch, or a rule they + # depend on, this package is allowed (and required) in Build-Depends. + my %RULE_CLEAN_DEPENDS =( + 'ant:any' => [qr/^\t\s*(\S+=\S+\s+)*ant\s/], + 'debhelper:any | debhelper-compat:any' => + [qr/^\t\s*dh_(?!autoreconf).+/], + 'dh-ocaml:any, ocaml-nox:any | ocaml:any' =>[qr/^\t\s*dh_ocamlinit\s/], + 'dpatch:any' => [qr/^\t\s*(\S+=\S+\s+)*dpatch\s/], + 'po-debconf:any' => [qr/^\t\s*debconf-updatepo\s/], + $PYTHON_DEPEND => [qr/^\t\s*python\s/], + $PYTHON3_DEPEND => [qr/^\t\s*python3\s/], + $ANYPYTHON_DEPEND => [qr/\ssetup\.py\b/], + 'quilt:any' => [qr/^\t\s*(\S+=\S+\s+)*quilt\s/], + ); + + my $build_all = $self->processable->relation('Build-Depends-All'); + my $build_all_norestriction + = $self->processable->relation_norestriction('Build-Depends-All'); + my $build_regular = $self->processable->relation('Build-Depends'); + my $build_indep = $self->processable->relation('Build-Depends-Indep'); + + # no need to look for items we have + delete %GLOBAL_DEPENDS{$_} + for grep { $build_regular->satisfies($_) } keys %GLOBAL_DEPENDS; + delete %GLOBAL_CLEAN_DEPENDS{$_} + for grep { $build_regular->satisfies($_) } keys %GLOBAL_CLEAN_DEPENDS; + delete %RULE_CLEAN_DEPENDS{$_} + for grep { $build_regular->satisfies($_) } keys %RULE_CLEAN_DEPENDS; + + my @needed; + my @needed_clean; + + # Scan debian/rules. We would really like to let make do this for + # us, but unfortunately there doesn't seem to be a way to get make + # to syntax-check and analyze a makefile without running at least + # $(shell) commands. + # + # We skip some of the rule analysis if debian/rules includes any + # other files, since to chase all includes we'd have to have all + # of its build dependencies installed. + local $_ = undef; + + my @arch_rules = map { qr/^$_$/ } qw(clean binary-arch build-arch); + my @indep_rules = qw(build build-indep binary-indep); + my @current_targets; + my %rules_per_target; + my %debhelper_group; + my %seen; + my %overridden; + my $maybe_skipping; + my @conditionals; + my %variables; + my $includes = 0; + + my $contents = $rules->decoded_utf8; + return + unless length $contents; + + my @lines = split(/\n/, $contents); + + my $continued = $EMPTY; + my $position = 1; + + for my $line (@lines) { + + my $pointer = $rules->pointer($position); + + $self->pointed_hint('debian-rules-is-dh_make-template', $pointer) + if $line =~ m/dh_make generated override targets/; + + next + if $line =~ /^\s*\#/; + + if (length $continued) { + $line = $continued . $line; + $continued = $EMPTY; + } + + if ($line =~ s/\\$//) { + $continued = $line; + next; + } + + if ($line =~ /^\s*[s-]?include\s+(\S++)/){ + my $makefile = $1; + my $targets = $KNOWN_MAKEFILES->value($makefile); + if (defined $targets){ + for my $target (split /\s*+,\s*+/, $targets){ + $seen{$target}++ if exists $TAG_FOR_POLICY_TARGET{$target}; + } + } else { + $includes = 1; + } + + $self->pointed_hint('debian-rules-uses-deprecated-makefile', + $pointer, $makefile) + if $DEPRECATED_MAKEFILES->recognizes($makefile); + } + + # problems occurring only outside targets + unless (%seen) { + + # Check for DH_COMPAT settings outside of any rule, which are now + # deprecated. It's a bit easier structurally to do this here than in + # debhelper. + $self->pointed_hint('debian-rules-sets-DH_COMPAT', $pointer) + if $line =~ /^\s*(?:export\s+)?DH_COMPAT\s*:?=/; + + $self->pointed_hint('debian-rules-sets-DEB_BUILD_OPTIONS',$pointer) + if $line =~ /^\s*(?:export\s+)?DEB_BUILD_OPTIONS\s*:?=/; + + if ( + $line =~m{^ + \s*(?:export\s+)? + (DEB_(?:HOST|BUILD|TARGET)_(?:ARCH|MULTIARCH|GNU)[A-Z_]*)\s*:?= + }x + ) { + my $variable = $1; + + $self->pointed_hint( + 'debian-rules-sets-dpkg-architecture-variable', + $pointer, $variable); + } + + } + + if ( $line =~ /^\t\s*-(?:\$[\(\{]MAKE[\}\)]|make)\s.*(?:dist)?clean/s + || $line + =~ /^\t\s*(?:\$[\(\{]MAKE[\}\)]|make)\s(?:.*\s)?-(\w*)i.*(?:dist)?clean/s + ) { + my $flags = $1 // $EMPTY; + + # Ignore "-C<dir>" (#671537) + $self->pointed_hint('debian-rules-ignores-make-clean-error', + $pointer) + unless $flags =~ /^C/; + } + + if ($line + =~ m{dh_strip\b.*(--(?:ddeb|dbgsym)-migration=(?:'[^']*'|\S*))}) { + + my $context = $1; + + $self->pointed_hint('debug-symbol-migration-possibly-complete', + $pointer, $context); + } + + $self->pointed_hint('debian-rules-passes-version-info-to-dh_shlibdeps', + $pointer) + if $line =~ m{dh_shlibdeps\b.*(?:--version-info|-V)\b}; + + $self->pointed_hint('debian-rules-updates-control-automatically', + $pointer) + if $line =~ m{^\s*DEB_AUTO_UPDATE_DEBIAN_CONTROL\s*=\s*yes}; + + $self->pointed_hint('debian-rules-uses-deb-build-opts', $pointer) + if $line =~ m{\$[\(\{]DEB_BUILD_OPTS[\)\}]}; + + if ($line =~ m{^\s*DH_EXTRA_ADDONS\s*=\s*(.*)$}) { + + my $context = $1; + + $self->pointed_hint('debian-rules-should-not-use-DH_EXTRA_ADDONS', + $pointer, $context); + } + + $self->pointed_hint('debian-rules-uses-wrong-environment-variable', + $pointer) + if $line =~ m{\bDEB_[^_ \t]+FLAGS_(?:SET|APPEND)\b}; + + $self->pointed_hint('debian-rules-calls-pwd', $pointer) + if $line =~ m{\$[\(\{]PWD[\)\}]}; + + $self->pointed_hint( + 'debian-rules-should-not-use-sanitize-all-buildflag',$pointer) + if $line + =~ m{^\s*(?:export\s+)?DEB_BUILD_MAINT_OPTIONS\s*:?=.*\bsanitize=\+all\b}; + + $self->pointed_hint('debian-rules-uses-special-shell-variable', + $pointer) + if $line =~ m{\$[\(\{]_[\)\}]}; + + if ($line =~ m{(dh_builddeb\b.*--.*-[zZS].*)$}) { + + my $context = $1; + + $self->pointed_hint('custom-compression-in-debian-rules', + $pointer, $context); + } + + if ($line =~ m{(py3versions\s+([\w\-\s]*--installed|-\w*i\w*))}) { + + my $context = $1; + + $self->pointed_hint('debian-rules-uses-installed-python-versions', + $pointer, $context); + } + + $self->pointed_hint('debian-rules-uses-as-needed-linker-flag',$pointer) + if $line =~ /--as-needed/ && $line !~ /--no-as-needed/; + + if ($line =~ /(py3versions\s+([\w\-\s]*--supported|-\w*s\w*))/) { + + my $context = $1; + + $self->pointed_hint( +'debian-rules-uses-supported-python-versions-without-python-all-build-depends', + $pointer, + $context + )unless $build_all_norestriction->satisfies($PYTHON3_ALL_DEPEND); + } + + # General assignment - save the variable + if ($line =~ /^\s*(?:\S+\s+)*?(\S+)\s*[:\?\+]?=\s*(.*+)?$/s) { + # This is far too simple from a theoretical PoV, but should do + # rather well. + my ($var, $value) = ($1, $2); + $variables{$var} = $value; + + $self->pointed_hint('unnecessary-source-date-epoch-assignment', + $pointer) + if $var eq 'SOURCE_DATE_EPOCH' + && !$build_all->satisfies( + 'dpkg-dev:any (>= 1.18.8) | debhelper:any (>= 10.10)'); + } + + # Keep track of whether this portion of debian/rules may be optional + if ($line =~ /^ifn?(?:eq|def)\s(.*)/) { + push(@conditionals, $1); + $maybe_skipping++; + + } elsif ($line =~ /^endif\s/) { + $maybe_skipping--; + } + + unless ($maybe_skipping) { + + for my $prerequisite (keys %GLOBAL_DEPENDS) { + + my @patterns = @{ $GLOBAL_DEPENDS{$prerequisite} }; + + push(@needed, $prerequisite) + if any { $line =~ $_ } @patterns; + } + + for my $prerequisite (keys %GLOBAL_CLEAN_DEPENDS) { + + my @patterns = @{ $GLOBAL_CLEAN_DEPENDS{$prerequisite} }; + + if (any { $line =~ $_ } @patterns) { + + push(@needed, $prerequisite); + push(@needed_clean, $prerequisite); + } + } + } + + # Listing a rule as a dependency of .PHONY is sufficient to make it + # present for the purposes of GNU make and therefore the Policy + # requirement. + if ($line =~ /^(?:[^:]+\s)?\.PHONY(?:\s[^:]+)?:(.+)/s) { + + my @targets = split($SPACE, $1); + for my $target (@targets) { + # Is it $(VAR) ? + if ($target =~ /^\$[\(\{]([^\)\}]++)[\)\}]$/) { + my $name = $1; + my $val = $variables{$name}; + if ($val) { + # we think we know what it will expand to - note + # we ought to "delay" it was a "=" variable rather + # than ":=" or "+=". + + # discards empty elements at end, effectively trimming right + for (split(/\s+/, $val)) { + $seen{$target}++ + if exists $TAG_FOR_POLICY_TARGET{$target}; + } + last; + } + # We don't know, so just mark the target as seen. + } + $seen{$target}++ + if exists $TAG_FOR_POLICY_TARGET{$target}; + } + + #.PHONY implies the rest will not match + next; + } + + if ( !$includes + && $line + =~ /dpkg-parsechangelog.*(?:Source|Version|Date|Timestamp)/s) { + + $self->pointed_hint('debian-rules-parses-dpkg-parsechangelog', + $pointer); + } + + if ($line !~ /^ifn?(?:eq|def)\s/ && $line =~ /^([^\s:][^:]*):+(.*)/s) { + my ($target_names, $target_dependencies) = ($1, $2); + @current_targets = split $SPACE, $target_names; + + my @quoted = map { quotemeta } split($SPACE, $target_dependencies); + s/\\\$\\\([^\):]+\\:([^=]+)\\=([^\)]+)\1\\\)/$2.*/g for @quoted; + + my @depends = map { qr/^$_$/ } @quoted; + + for my $target (@current_targets) { + $overridden{$1} = $position if $target =~ m/override_(.+)/; + if ($target =~ /%/) { + my $pattern = quotemeta $target; + $pattern =~ s/\\%/.*/g; + for my $rulebypolicy (keys %TAG_FOR_POLICY_TARGET) { + $seen{$rulebypolicy}++ if $rulebypolicy =~ m/$pattern/; + } + } else { + # Is it $(VAR) ? + if ($target =~ m/^\$[\(\{]([^\)\}]++)[\)\}]$/) { + my $name = $1; + my $val = $variables{$name}; + if ($val) { + # we think we know what it will expand to - note + # we ought to "delay" it was a "=" variable rather + # than ":=" or "+=". + local $_ = undef; + + # discards empty elements at end, effectively trimming right + for (split(/\s+/, $val)) { + $seen{$_}++ + if exists $TAG_FOR_POLICY_TARGET{$_}; + } + last; + } + # We don't know, so just mark the target as seen. + } + $seen{$target}++ if exists $TAG_FOR_POLICY_TARGET{$target}; + } + if (any { $target =~ /$_/ } @arch_rules) { + push(@arch_rules, @depends); + } + } + undef %debhelper_group; + + } elsif ($line =~ /^define /) { + # We don't want to think the body of the define is part of + # the previous rule or we'll get false positives on tags + # like binary-arch-rules-but-pkg-is-arch-indep. Treat a + # define as the end of the current rule, although that + # isn't very accurate either. + @current_targets = (); + + } else { + # If we have non-empty, non-comment lines, store them for + # all current targets and check whether debhelper programs + # are called in a reasonable order. + if ($line =~ /^\s+[^\#]/) { + my ($arch, $indep) = (0, 0); + for my $target (@current_targets) { + $rules_per_target{$target} ||= []; + push(@{$rules_per_target{$target}}, $line); + + $arch = 1 + if any { $target =~ /$_/ } @arch_rules; + + $indep = 1 + if any { $target eq $_ } @indep_rules; + + $indep = 1 + if $target eq $PERCENT; + + $indep = 1 + if $target =~ /^override_/; + } + + if (!$maybe_skipping && ($arch || $indep)) { + + for my $prerequisite (keys %RULE_CLEAN_DEPENDS) { + + my @patterns = @{ $RULE_CLEAN_DEPENDS{$prerequisite} }; + + if (any { $line =~ $_ } @patterns) { + + push(@needed, $prerequisite); + push(@needed_clean, $prerequisite) + if $arch; + } + } + } + + if ($line =~ /^\s+(dh_\S+)\b/ && $debhelper_order{$1}) { + my $command = $1; + my ($package) = ($line =~ /\s(?:-p|--package=)(\S+)/); + $package ||= $EMPTY; + my $group = $debhelper_order{$command}; + $debhelper_group{$package} ||= 0; + + if ($group < $debhelper_group{$package}) { + + $self->pointed_hint( + 'debian-rules-calls-debhelper-in-odd-order', + $pointer, $command); + + } else { + $debhelper_group{$package} = $group; + } + } + } + } + + } continue { + ++$position; + } + + my @missing_targets; + @missing_targets = grep { !$seen{$_} } keys %TAG_FOR_POLICY_TARGET + unless $includes; + + $self->pointed_hint($TAG_FOR_POLICY_TARGET{$_}, $rules->pointer, $_) + for @missing_targets; + + # Make sure we have no content for binary-arch if we are arch-indep: + $rules_per_target{'binary-arch'} ||= []; + if ($architecture eq 'all' && scalar @{$rules_per_target{'binary-arch'}}) { + + my $nonempty = 0; + for my $rule (@{$rules_per_target{'binary-arch'}}) { + # dh binary-arch is actually a no-op if there is no + # Architecture: any package in the control file + $nonempty = 1 + unless $rule =~ /^\s*dh\s+(?:binary-arch|\$\@)/; + } + + $self->pointed_hint('binary-arch-rules-but-pkg-is-arch-indep', + $rules->pointer) + if $nonempty; + } + + for my $cmd (qw(dh_clean dh_fixperms)) { + for my $suffix ($EMPTY, '-indep', '-arch') { + + my $memorized_position = $overridden{"$cmd$suffix"}; + next + unless defined $memorized_position; + + $self->pointed_hint( + "override_$cmd-does-not-call-$cmd", + $rules->pointer($memorized_position) + ) + if none { m/^\t\s*-?($cmd\b|\$\(overridden_command\))/ } + @{$rules_per_target{"override_$cmd$suffix"}}; + } + } + + if (my $memorized_position = $overridden{'dh_auto_test'}) { + + my @rules = grep { + !m{^\t\s*[\:\[]} + && !m{^\s*$} + && !m{\bdh_auto_test\b} + && ! +m{^\t\s*[-@]?(?:(?:/usr)?/bin/)?(?:cp|chmod|echo|ln|mv|mkdir|rm|test|true)} + } @{$rules_per_target{'override_dh_auto_test'}}; + + $self->pointed_hint( + 'override_dh_auto_test-does-not-check-DEB_BUILD_OPTIONS', + $rules->pointer($memorized_position)) + if @rules and none { m/(DEB_BUILD_OPTIONS|nocheck)/ } @conditionals; + } + + $self->pointed_hint( + 'debian-rules-contains-unnecessary-get-orig-source-target', + $rules->pointer) + if any { m/^\s+uscan\b/ } @{$rules_per_target{'get-orig-source'}}; + + my @clean_in_indep + = grep { $build_indep->satisfies($_) } uniq @needed_clean; + $self->pointed_hint( + 'missing-build-depends-for-clean-target-in-debian-rules', + $rules->pointer, "(does not satisfy $_)") + for @clean_in_indep; + + # another check complains when debhelper is missing from d/rules + my $combined_lc = List::Compare->new(\@needed, ['debhelper:any']); + + my @still_missing + = grep { !$build_all_norestriction->satisfies($_) } + $combined_lc->get_Lonly; + + $self->pointed_hint('rules-require-build-prerequisite', + $rules->pointer, "(does not satisfy $_)") + for @still_missing; + + $self->pointed_hint('debian-rules-should-not-set-CFLAGS-from-noopt', + $rules->pointer) + if $contents + =~ m{^ ifn?eq \s+ [(] , \$ [(] findstring \s+ noopt , \$ [(] DEB_BUILD_OPTIONS [)] [)] [)] \n+ + \t+ CFLAGS \s+ \+ = \s+ -O[02] \n+ + else \n+ + \t+ CFLAGS \s+ \+ = \s+ -O[02] \n+ + endif $}xsm; + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Debian/Rules/DhSequencer.pm b/lib/Lintian/Check/Debian/Rules/DhSequencer.pm new file mode 100644 index 0000000..bc2b239 --- /dev/null +++ b/lib/Lintian/Check/Debian/Rules/DhSequencer.pm @@ -0,0 +1,65 @@ +# debian/rules/dh-sequencer -- lintian check script -*- perl -*- + +# Copyright (C) 2019 Felix Lechner +# Copyright (C) 2020 Chris Lamb <lamby@debian.org> +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Debian::Rules::DhSequencer; + +use v5.20; +use warnings; +use utf8; + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +sub visit_patched_files { + my ($self, $item) = @_; + + return + unless $item->name eq 'debian/rules'; + + my $bytes = $item->bytes; + + # strip comments (see #960485) + $bytes =~ s/^\h#.*\R?//mg; + + my $plain = qr/\$\@/; + my $curly = qr/\$\{\@\}/; + my $asterisk = qr/\$\*/; + my $parentheses = qr/\$\(\@\)/; + my $rule_altern = qr/(?:$plain|$curly|$asterisk|$parentheses)/; + my $rule_target = qr/(?:$rule_altern|'$rule_altern'|"$rule_altern")/; + + $self->pointed_hint('no-dh-sequencer', $item->pointer) + unless $bytes =~ /^\t+(?:[\+@-])?(?:[^=]+=\S+ )?dh[ \t]+$rule_target/m + || $bytes =~ m{^\s*include\s+/usr/share/cdbs/1/class/hlibrary.mk\s*$}m + || $bytes =~ m{\bDEB_CABAL_PACKAGE\b}; + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Debian/Shlibs.pm b/lib/Lintian/Check/Debian/Shlibs.pm new file mode 100644 index 0000000..8e755d9 --- /dev/null +++ b/lib/Lintian/Check/Debian/Shlibs.pm @@ -0,0 +1,656 @@ +# debian/shlibs -- lintian check script -*- perl -*- + +# Copyright (C) 1998 Christian Schwarz +# Copyright (C) 2018-2019 Chris Lamb <lamby@debian.org> +# Copyright (C) 2021 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Debian::Shlibs; + +use v5.20; +use warnings; +use utf8; + +use Const::Fast; +use File::Basename; +use List::Compare; +use List::SomeUtils qw(any none uniq); + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +const my $EMPTY => q{}; +const my $SPACE => q{ }; +const my $SLASH => q{/}; +const my $EQUALS => q{=}; +const my $LEFT_PARENTHESIS => q{(}; +const my $RIGHT_PARENTHESIS => q{)}; + +my @known_meta_labels = qw{ + Build-Depends-Package + Build-Depends-Packages + Ignore-Blacklist-Groups +}; + +has soname_by_filename => ( + is => 'rw', + lazy => 1, + default => sub { + my ($self) = @_; + + my %soname_by_filename; + for my $item (@{$self->processable->installed->sorted_list}) { + + $soname_by_filename{$item->name}= $item->elf->{SONAME}[0] + if exists $item->elf->{SONAME}; + } + + return \%soname_by_filename; + } +); + +has shlibs_positions_by_pretty_soname => (is => 'rw', default => sub { {} }); +has symbols_positions_by_soname => (is => 'rw', default => sub { {} }); + +sub installable { + my ($self) = @_; + + $self->check_shlibs_file; + $self->check_symbols_file; + + my @pretty_sonames_from_shlibs + = keys %{$self->shlibs_positions_by_pretty_soname}; + my @pretty_sonames_from_symbols + = map { human_soname($_) } keys %{$self->symbols_positions_by_soname}; + + # Compare the contents of the shlibs and symbols control files, but exclude + # from this check shared libraries whose SONAMEs has no version. Those can + # only be represented in symbols files and aren't expected in shlibs files. + my $extra_lc = List::Compare->new(\@pretty_sonames_from_symbols, + \@pretty_sonames_from_shlibs); + + if (%{$self->shlibs_positions_by_pretty_soname}) { + + my @versioned = grep { m{ } } $extra_lc->get_Lonly; + + $self->hint('symbols-for-undeclared-shared-library', $_)for @versioned; + } + + return; +} + +sub check_shlibs_file { + my ($self) = @_; + + my @ldconfig_folders = @{$self->data->architectures->ldconfig_folders}; + + # Libraries with no version information can't be represented by + # the shlibs format (but can be represented by symbols). We want + # to warn about them if they appear in public directories. If + # they're in private directories, assume they're plugins or + # private libraries and are safe. + my @unversioned_libraries; + for my $file_name (keys %{$self->soname_by_filename}) { + + my $pretty_soname + = human_soname($self->soname_by_filename->{$file_name}); + next + if $pretty_soname =~ m{ }; + + push(@unversioned_libraries, $file_name); + $self->hint('shared-library-lacks-version', $file_name, $pretty_soname) + if any { (dirname($file_name) . $SLASH) eq $_ } @ldconfig_folders; + } + + my $versioned_lc = List::Compare->new([keys %{$self->soname_by_filename}], + \@unversioned_libraries); + my @versioned_libraries = $versioned_lc->get_Lonly; + + # 4th step: check shlibs control file + # $package_version may be undef in very broken packages + my $shlibs_file = $self->processable->control->lookup('shlibs'); + $shlibs_file = undef + if defined $shlibs_file && !$shlibs_file->is_file; + + # no shared libraries included in package, thus shlibs control + # file should not be present + $self->pointed_hint('empty-shlibs', $shlibs_file->pointer) + if defined $shlibs_file && !@versioned_libraries; + + # shared libraries included, thus shlibs control file has to exist + for my $file_name (@versioned_libraries) { + + # only public shared libraries + $self->hint('no-shlibs', $file_name) + if (any { (dirname($file_name) . $SLASH) eq $_ } @ldconfig_folders) + && !defined $shlibs_file + && $self->processable->type ne 'udeb' + && !is_nss_plugin($file_name); + } + + if (@versioned_libraries && defined $shlibs_file) { + + my @shlibs_prerequisites; + + my @lines = split(/\n/, $shlibs_file->decoded_utf8); + + my $position = 1; + for my $line (@lines) { + + next + if $line =~ m{^ \s* $}x + || $line =~ m{^ [#] }x; + + # We exclude udebs from the checks for correct shared library + # dependencies, since packages may contain dependencies on + # other udeb packages. + + my $udeb = $EMPTY; + $udeb = 'udeb: ' + if $line =~ s/^udeb:\s+//; + + my ($name, $version, @prerequisites) = split($SPACE, $line); + my $pretty_soname = "$udeb$name $version"; + + $self->shlibs_positions_by_pretty_soname->{$pretty_soname} //= []; + push( + @{$self->shlibs_positions_by_pretty_soname->{$pretty_soname}}, + $position + ); + + push(@shlibs_prerequisites, join($SPACE, @prerequisites)) + unless $udeb; + + } continue { + ++$position; + } + + my @duplicate_pretty_sonames + = grep { @{$self->shlibs_positions_by_pretty_soname->{$_}} > 1 } + keys %{$self->shlibs_positions_by_pretty_soname}; + + for my $pretty_soname (@duplicate_pretty_sonames) { + + my $indicator + = $LEFT_PARENTHESIS . 'lines' + . $SPACE + . join($SPACE, + sort { $a <=> $b } + @{$self->shlibs_positions_by_pretty_soname->{$pretty_soname}} + ). $RIGHT_PARENTHESIS; + + $self->pointed_hint('duplicate-in-shlibs', $shlibs_file->pointer, + $indicator,$pretty_soname); + } + + my @used_pretty_sonames; + for my $file_name (@versioned_libraries) { + + my $pretty_soname + = human_soname($self->soname_by_filename->{$file_name}); + + push(@used_pretty_sonames, $pretty_soname); + push(@used_pretty_sonames, "udeb: $pretty_soname"); + + # only public shared libraries + $self->pointed_hint('ships-undeclared-shared-library', + $shlibs_file->pointer,$pretty_soname, 'for', $file_name) + if (any { (dirname($file_name) . $SLASH) eq $_ } + @ldconfig_folders) + && !@{$self->shlibs_positions_by_pretty_soname->{$pretty_soname} + // []} + && !is_nss_plugin($file_name); + } + + my $unused_lc + = List::Compare->new( + [keys %{$self->shlibs_positions_by_pretty_soname}], + \@used_pretty_sonames); + + $self->pointed_hint('shared-library-not-shipped', + $shlibs_file->pointer, $_) + for $unused_lc->get_Lonly; + + my $fields = $self->processable->fields; + + # Check that all of the packages listed as dependencies in + # the shlibs file are satisfied by the current package or + # its Provides. Normally, packages should only declare + # dependencies in their shlibs that they themselves can + # satisfy. + my $provides = $self->processable->name; + $provides + .= $LEFT_PARENTHESIS + . $EQUALS + . $SPACE + . $fields->value('Version') + . $RIGHT_PARENTHESIS + if $fields->declares('Version'); + + $provides + = $self->processable->relation('Provides')->logical_and($provides); + + for my $prerequisite (uniq @shlibs_prerequisites) { + + $self->pointed_hint('distant-prerequisite-in-shlibs', + $shlibs_file->pointer, $prerequisite) + unless $provides->satisfies($prerequisite); + + $self->pointed_hint('outdated-relation-in-shlibs', + $shlibs_file->pointer, $prerequisite) + if $prerequisite =~ m/\(\s*[><](?![<>=])\s*/; + } + } + + return; +} + +sub check_symbols_file { + my ($self) = @_; + + my @ldconfig_folders = @{$self->data->architectures->ldconfig_folders}; + my @shared_libraries = keys %{$self->soname_by_filename}; + + my $fields = $self->processable->fields; + my $symbols_file = $self->processable->control->lookup('symbols'); + + if (!defined $symbols_file + && $self->processable->type ne 'udeb') { + + for my $file_name (@shared_libraries){ + + my $item = $self->processable->installed->lookup($file_name); + next + unless defined $item; + + my @symbols + = grep { $_->section eq '.text' || $_->section eq 'UND' } + @{$item->elf->{SYMBOLS} // []}; + + # only public shared libraries + # Skip Objective C libraries as instance/class methods do not + # appear in the symbol table + $self->hint('no-symbols-control-file', $file_name) + if (any { (dirname($file_name) . $SLASH) eq $_ } + @ldconfig_folders) + && (none { $_->name =~ m/^__objc_/ } @symbols) + && !is_nss_plugin($file_name); + } + } + + return + unless defined $symbols_file; + + # no shared libraries included in package, thus symbols + # control file should not be present + $self->pointed_hint('empty-shared-library-symbols', $symbols_file->pointer) + unless @shared_libraries; + + # Assume the version to be a non-native version to avoid + # uninitialization warnings later. + my $package_version = $fields->value('Version') || '0-1'; + + my $package_version_wo_rev = $package_version; + $package_version_wo_rev =~ s/^ (.+) - [^-]+ $/$1/x; + + my @sonames; + my %symbols_by_soname; + my %full_version_symbols_by_soname; + my %debian_revision_symbols_by_soname; + my %prerequisites_by_soname; + my %positions_by_soname_and_meta_label; + my @syntax_errors; + my $template_count = 0; + + my @lines = split(/\n/, $symbols_file->decoded_utf8); + + my $current_soname = $EMPTY; + my $position = 1; + for my $line (@lines) { + + next + if $line =~ m{^ \s* $}x + || $line =~ m{^ [#] }x; + + # soname, main dependency template + if ($line + =~ m{^ ([^\s|*]\S+) \s\S+\s* (?: [(] \S+\s+\S+ [)] | [#]MINVER[#] )? }x + ){ + + $current_soname = $1; + push(@sonames, $current_soname); + + $line =~ s/^\Q$current_soname\E\s*//; + + $self->symbols_positions_by_soname->{$current_soname} //= []; + push( + @{$self->symbols_positions_by_soname->{$current_soname}}, + $position + ); + + for my $conjunctive (split(m{ \s* , \s* }x, $line)) { + for my $disjunctive (split(m{ \s* [|] \s* }x, $conjunctive)){ + + $disjunctive + =~ m{^ (\S+) ( \s* (?: [(] \S+\s+\S+ [)] | [#]MINVER[#]))? $}x; + + my $package = $1; + my $version = $2 || $EMPTY; + + if (length $package) { + $prerequisites_by_soname{$current_soname} //= []; + push( + @{$prerequisites_by_soname{$current_soname}}, + $package . $version + ); + + } else { + push(@syntax_errors, $position); + } + } + } + + $template_count = 0; + + next; + } + + # alternative dependency template + if ($line + =~ m{^ [|] \s+\S+\s* (?: [(] \S+\s+\S+ [)] | [#]MINVER[#] )? }x) { + + my $error = 0; + + if (%{$positions_by_soname_and_meta_label{$current_soname} // {} } + || !length $current_soname) { + + push(@syntax_errors, $position); + $error = 1; + } + + $line =~ s{^ [|] \s* }{}x; + + for my $conjunctive (split(m{ \s* , \s* }x, $line)) { + for my $disjunctive (split(m{ \s* [|] \s* }x, $conjunctive)) { + + $disjunctive + =~ m{^ (\S+) ( \s* (?: [(] \S+ \s+ \S+ [)] | [#]MINVER[#] ) )? $}x; + + my $package = $1; + my $version = $2 || $EMPTY; + + if (length $package) { + $prerequisites_by_soname{$current_soname} //= []; + push( + @{$prerequisites_by_soname{$current_soname}}, + $package . $version + ); + + } else { + push(@syntax_errors, $position) + unless $error; + + $error = 1; + } + } + } + + $template_count++ unless $error; + + next; + } + + # meta-information + if ($line =~ m{^ [*] \s (\S+) : \s \S+ }x) { + + my $meta_label = $1; + + $positions_by_soname_and_meta_label{$current_soname}{$meta_label} + //= []; + push( + @{ + $positions_by_soname_and_meta_label{$current_soname} + {$meta_label} + }, + $position + ); + + push(@syntax_errors, $position) + if !defined $current_soname + || @{$symbols_by_soname{$current_soname} // [] }; + + next; + } + + # Symbol definition + if ($line =~ m{^\s+ (\S+) \s (\S+) (?:\s (\S+ (?:\s\S+)? ) )? $}x) { + + my $symbol = $1; + my $version = $2; + my $selector = $3 // $EMPTY; + + push(@syntax_errors, $position) + unless length $current_soname; + + $symbols_by_soname{$current_soname} //= []; + push(@{$symbols_by_soname{$current_soname}}, $symbol); + + if ($version eq $package_version && $package_version =~ m{-}) { + $full_version_symbols_by_soname{$current_soname} //= []; + push( + @{$full_version_symbols_by_soname{$current_soname}}, + $symbol + ); + + } elsif ($version =~ m{-} + && $version !~ m{~$} + && $version ne $package_version_wo_rev) { + + $debian_revision_symbols_by_soname{$current_soname} //= []; + push( + @{$debian_revision_symbols_by_soname{$current_soname}}, + $symbol + ); + } + + $self->pointed_hint('invalid-template-id-in-symbols-file', + $symbols_file->pointer($position),$selector) + if length $selector + && ($selector !~ m{^ \d+ $}x || $selector > $template_count); + + next; + } + + push(@syntax_errors, $position); + + } continue { + ++$position; + } + + my @duplicate_sonames + = grep { @{$self->symbols_positions_by_soname->{$_}} > 1 } + keys %{$self->symbols_positions_by_soname}; + + for my $soname (@duplicate_sonames) { + + my $indicator + = $LEFT_PARENTHESIS . 'lines' + . $SPACE + . join($SPACE, + sort { $a <=> $b }@{$self->symbols_positions_by_soname->{$soname}}) + . $RIGHT_PARENTHESIS; + + my $pretty_soname = human_soname($soname); + + $self->pointed_hint('duplicate-entry-in-symbols-control-file', + $symbols_file->pointer,$indicator,$pretty_soname); + } + + $self->pointed_hint('syntax-error-in-symbols-file', + $symbols_file->pointer($_)) + for uniq @syntax_errors; + + # Check that all of the packages listed as dependencies in the symbols + # file are satisfied by the current package or its Provides. + # Normally, packages should only declare dependencies in their symbols + # files that they themselves can satisfy. + my $provides = $self->processable->name; + $provides + .= $LEFT_PARENTHESIS + . $EQUALS + . $SPACE + . $fields->value('Version') + . $RIGHT_PARENTHESIS + if $fields->declares('Version'); + + $provides + = $self->processable->relation('Provides')->logical_and($provides); + + for my $soname (uniq @sonames) { + + my @used_meta_labels + = keys %{$positions_by_soname_and_meta_label{$soname} // {} }; + + my $meta_lc + = List::Compare->new(\@used_meta_labels, \@known_meta_labels); + + for my $meta_label ($meta_lc->get_Lonly) { + + $self->pointed_hint( + 'unknown-meta-field-in-symbols-file', + $symbols_file->pointer($_), + $meta_label, "($soname)" + ) + for @{$positions_by_soname_and_meta_label{$soname}{$meta_label}}; + } + + $self->pointed_hint('symbols-file-missing-build-depends-package-field', + $symbols_file->pointer,$soname) + if none { $_ eq 'Build-Depends-Package' } @used_meta_labels; + + my @full_version_symbols + = @{$full_version_symbols_by_soname{$soname} // [] }; + if (@full_version_symbols) { + + my @sorted = sort +uniq @full_version_symbols; + + my $context = 'on symbol ' . $sorted[0]; + $context .= ' and ' . (scalar @sorted - 1) . ' others' + if @sorted > 1; + + $self->pointed_hint( + 'symbols-file-contains-current-version-with-debian-revision', + $symbols_file->pointer,$context, "($soname)"); + } + + my @debian_revision_symbols + = @{$debian_revision_symbols_by_soname{$soname} // [] }; + if (@debian_revision_symbols) { + + my @sorted = sort +uniq @debian_revision_symbols; + + my $context = 'on symbol ' . $sorted[0]; + $context .= ' and ' . (scalar @sorted - 1) . ' others' + if @sorted > 1; + + $self->pointed_hint('symbols-file-contains-debian-revision', + $symbols_file->pointer,$context, "($soname)"); + } + + # Deduplicate the list of dependencies before warning so that we don't + # duplicate warnings. + for + my $prerequisite (uniq @{$prerequisites_by_soname{$soname} // [] }) { + + $prerequisite =~ s/ [ ] [#] MINVER [#] $//x; + $self->pointed_hint('symbols-declares-dependency-on-other-package', + $symbols_file->pointer,$prerequisite, "($soname)") + unless $provides->satisfies($prerequisite); + } + } + + my @used_pretty_sonames; + for my $filename (@shared_libraries) { + + my $soname = $self->soname_by_filename->{$filename}; + my $pretty_soname = human_soname($soname); + + push(@used_pretty_sonames, $pretty_soname); + push(@used_pretty_sonames, "udeb: $pretty_soname"); + + # only public shared libraries + $self->pointed_hint('shared-library-symbols-not-tracked', + $symbols_file->pointer,$pretty_soname,'for', $filename) + if (any { (dirname($filename) . $SLASH) eq $_ }@ldconfig_folders) + && !@{$self->symbols_positions_by_soname->{$soname}// [] } + && !is_nss_plugin($filename); + } + + my @available_pretty_sonames + = map { human_soname($_) } keys %{$self->symbols_positions_by_soname}; + + my $unused_lc + = List::Compare->new(\@available_pretty_sonames,\@used_pretty_sonames); + + $self->pointed_hint('surplus-shared-library-symbols', + $symbols_file->pointer, $_) + for $unused_lc->get_Lonly; + + return; +} + +# Extract the library name and the version from an SONAME and return them +# separated by a space. This code should match the split_soname function in +# dpkg-shlibdeps. +sub human_soname { + my ($string) = @_; + + # libfoo.so.X.X + # libfoo-X.X.so + if ( $string =~ m{^ (.*) [.]so[.] (.*) $}x + || $string =~ m{^ (.*) - (\d.*) [.]so $}x) { + + my $name = $1; + my $version = $2; + + return $name . $SPACE . $version; + } + + return $string; +} + +# Returns a truth value if the first argument appears to be the path +# to a libc nss plugin (libnss_<name>.so.$version). +sub is_nss_plugin { + my ($name) = @_; + + return 1 + if $name =~ m{^ (?:.*/)? libnss_[^.]+ [.]so[.] \d+ $}x; + + return 0; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Debian/Source/IncludeBinaries.pm b/lib/Lintian/Check/Debian/Source/IncludeBinaries.pm new file mode 100644 index 0000000..48e8926 --- /dev/null +++ b/lib/Lintian/Check/Debian/Source/IncludeBinaries.pm @@ -0,0 +1,77 @@ +# debian/source/include-binaries -- lintian check script -*- perl -*- + +# Copyright (C) 2019 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Debian::Source::IncludeBinaries; + +use v5.20; +use warnings; +use utf8; + +use Path::Tiny; + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +sub source { + my ($self) = @_; + + my $sourcedir= $self->processable->patched->resolve_path('debian/source/'); + return + unless $sourcedir; + + my $item = $sourcedir->child('include-binaries'); + return + unless $item && $item->is_open_ok; + + my @lines = path($item->unpacked_path)->lines({ chomp => 1 }); + + # format described in dpkg-source (1) + my $position = 1; + for my $line (@lines) { + + next + if $line =~ /^\s*$/; + + next + if $line =~ /^#/; + + # trim both ends + $line =~ s/^\s+|\s+$//g; + + $self->pointed_hint('unused-entry-in-debian-source-include-binaries', + $item->pointer($position), $line) + unless $self->processable->patched->resolve_path($line); + + } continue { + ++$position; + } + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Debian/SourceDir.pm b/lib/Lintian/Check/Debian/SourceDir.pm new file mode 100644 index 0000000..2fd2ebf --- /dev/null +++ b/lib/Lintian/Check/Debian/SourceDir.pm @@ -0,0 +1,170 @@ +# debian/source directory content -- lintian check script -*- perl -*- + +# Copyright (C) 2010 by Raphael Hertzog +# Copyright (C) 2021 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Debian::SourceDir; + +use v5.20; +use warnings; +use utf8; + +use Const::Fast; +use List::SomeUtils qw(any); +use Unicode::UTF8 qw(encode_utf8); + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +const my $EMPTY => q{}; +const my $SPACE => q{ }; + +our %KNOWN_FORMATS = map { $_ => 1 } + ('1.0', '2.0', '3.0 (quilt)', '3.0 (native)', '3.0 (git)', '3.0 (bzr)'); + +my %OLDER_FORMATS = map { $_ => 1 }('1.0'); + +sub source { + my ($self) = @_; + + my $processable = $self->processable; + + my $dsrc = $processable->patched->resolve_path('debian/source/'); + my ($format_file, $git_pfile, $format, $format_extra); + + $format_file = $dsrc->child('format') if $dsrc; + + if ($format_file and $format_file->is_open_ok) { + + open(my $fd, '<', $format_file->unpacked_path) + or die encode_utf8('Cannot open ' . $format_file->unpacked_path); + + $format = <$fd>; + chomp $format; + close($fd); + $format_extra = $EMPTY; + die encode_utf8("unknown source format $format") + unless $KNOWN_FORMATS{$format}; + } else { + $self->hint('missing-debian-source-format'); + $format = '1.0'; + $format_extra = 'implicit'; + } + if ($format eq '1.0') { + $format_extra .= $SPACE if $format_extra; + if (keys %{$processable->diffstat}) { + $format_extra .= 'non-native'; + } else { + $format_extra .= 'native'; + } + } + my $format_info = $format; + $format_info .= " [$format_extra]" + if $format_extra; + $self->hint('source-format', $format_info); + + $self->hint('older-source-format', $format) if $OLDER_FORMATS{$format}; + + return if not $dsrc; + + $git_pfile = $dsrc->child('git-patches'); + + if ($git_pfile and $git_pfile->is_open_ok and $git_pfile->size != 0) { + + open(my $git_patches_fd, '<', $git_pfile->unpacked_path) + or die encode_utf8('Cannot open ' . $git_pfile->unpacked_path); + + if (any { !/^\s*+#|^\s*+$/} <$git_patches_fd>) { + my $dpseries + = $processable->patched->resolve_path('debian/patches/series'); + # gitpkg does not create series as a link, so this is most likely + # a traversal attempt. + if (not $dpseries or not $dpseries->is_open_ok) { + + $self->pointed_hint('git-patches-not-exported', + $git_pfile->pointer); + + } else { + open(my $series_fd, '<', $dpseries->unpacked_path) + or + die encode_utf8('Cannot open ' . $dpseries->unpacked_path); + + my $comment_line = <$series_fd>; + my $count = grep { !/^\s*+\#|^\s*+$/ } <$series_fd>; + + $self->pointed_hint('git-patches-not-exported', + $dpseries->pointer) + unless ( + $count + && ($comment_line + =~ /^\s*\#.*quilt-patches-deb-export-hook/) + ); + + close $series_fd; + } + } + close $git_patches_fd; + } + + my $KNOWN_FILES= $self->data->load('debian-source-dir/known-files'); + + my @files = grep { !$_->is_dir } $dsrc->children; + for my $item (@files) { + + $self->pointed_hint('unknown-file-in-debian-source', $item->pointer) + unless $KNOWN_FILES->recognizes($item->basename); + } + + my $options = $processable->patched->resolve_path('debian/source/options'); + if ($options and $options->is_open_ok) { + + open(my $fd, '<', $options->unpacked_path) + or die encode_utf8('Cannot open ' . $options->unpacked_path); + + my $position = 1; + while (my $line = <$fd>) { + + if ($line =~ /^\s*(compression(?:-level)?\s*=\s+\S+)\n/) { + + my $level = $1; + + $self->pointed_hint( + 'custom-compression-in-debian-source-options', + $options->pointer($position), $level); + } + + } continue { + ++$position; + } + + close $fd; + } + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Debian/Substvars.pm b/lib/Lintian/Check/Debian/Substvars.pm new file mode 100644 index 0000000..d612783 --- /dev/null +++ b/lib/Lintian/Check/Debian/Substvars.pm @@ -0,0 +1,55 @@ +# Copyright (C) 1998 Christian Schwarz and Richard Braakman +# Copyright (C) 1999 Joey Hess +# Copyright (C) 2000 Sean 'Shaleh' Perry +# Copyright (C) 2002 Josip Rodin +# Copyright (C) 2007 Russ Allbery +# Copyright (C) 2013-2018 Bastien ROUCARIES +# Copyright (C) 2017-2020 Chris Lamb <lamby@debian.org> +# Copyright (C) 2020-2021 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Debian::Substvars; + +use v5.20; +use warnings; +use utf8; + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +sub visit_patched_files { + my ($self, $item) = @_; + + return + unless $item->is_file; + + $self->pointed_hint('source-contains-debian-substvars', $item->pointer) + if $item->name =~ m{^debian/(?:.+\.)?substvars$}s; + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Debian/Symbols.pm b/lib/Lintian/Check/Debian/Symbols.pm new file mode 100644 index 0000000..42b36fe --- /dev/null +++ b/lib/Lintian/Check/Debian/Symbols.pm @@ -0,0 +1,83 @@ +# debian/symbols -- lintian check script -*- perl -*- +# +# Copyright (C) 2019-2021 Felix Lechner +# +# Parts of the code were taken from the old check script, which +# was Copyright (C) 1998 Richard Braakman (also licensed under the +# GPL 2 or higher) +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Debian::Symbols; + +use v5.20; +use warnings; +use utf8; + +use Unicode::UTF8 qw(encode_utf8); + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +sub visit_patched_files { + my ($self, $item) = @_; + + # look at symbols files + return + unless $item->name =~ qr{^ debian/ (?:.+[.]) symbols $}x; + + return + unless $item->is_file && $item->is_open_ok; + + open(my $fd, '<', $item->unpacked_path) + or die encode_utf8('Cannot open ' . $item->unpacked_path); + + my $position = 1; + while (my $line = <$fd>) { + + chop $line; + next + if $line =~ /^\s*$/ + || $line =~ /^#/; + + # meta-information + if ($line =~ /^\*\s(\S+):\s+(\S+)/) { + + my $field = $1; + my $value = $2; + + $self->pointed_hint('package-placeholder-in-symbols-file', + $item->pointer($position)) + if $field eq 'Build-Depends-Package' && $value =~ /#PACKAGE#/; + } + + } continue { + ++$position; + } + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Debian/TrailingWhitespace.pm b/lib/Lintian/Check/Debian/TrailingWhitespace.pm new file mode 100644 index 0000000..465fa59 --- /dev/null +++ b/lib/Lintian/Check/Debian/TrailingWhitespace.pm @@ -0,0 +1,105 @@ +# debian/trailing-whitespace -- lintian check script -*- perl -*- +# +# based on debhelper check, +# Copyright (C) 1999 Joey Hess +# Copyright (C) 2000 Sean 'Shaleh' Perry +# Copyright (C) 2002 Josip Rodin +# Copyright (C) 2007 Russ Allbery +# Copyright (C) 2013-2018 Bastien ROUCARIES +# Copyright (C) 2017-2020 Chris Lamb <lamby@debian.org> +# Copyright (C) 2020 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Debian::TrailingWhitespace; + +use v5.20; +use warnings; +use utf8; + +use Const::Fast; + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +const my $KEEP_EMPTY_FIELDS => -1; +const my $LAST_ITEM => -1; + +# list of files to check for a trailing whitespace characters +my %PROHIBITED_TRAILS = ( + 'debian/changelog' => qr{\s+$}, + 'debian/control' => qr{\s+$}, + # allow trailing tabs in make + 'debian/rules' => qr{[ ]+$}, +); + +sub visit_patched_files { + my ($self, $item) = @_; + + return + unless exists $PROHIBITED_TRAILS{$item->name}; + + return + unless $item->is_valid_utf8; + + my $contents = $item->decoded_utf8; + my @lines = split(/\n/, $contents, $KEEP_EMPTY_FIELDS); + + my @trailing_whitespace; + my @empty_at_end; + + my $position = 1; + for my $line (@lines) { + + push(@trailing_whitespace, $position) + if $line =~ $PROHIBITED_TRAILS{$item->name}; + + # keeps track of any empty lines at the end + if (length $line) { + @empty_at_end = (); + } else { + push(@empty_at_end, $position); + } + + } continue { + ++$position; + } + + # require a newline at end and remove it + if (scalar @empty_at_end && $empty_at_end[$LAST_ITEM] == scalar @lines){ + pop @empty_at_end; + } else { + $self->pointed_hint('no-newline-at-end', $item->pointer); + } + + push(@trailing_whitespace, @empty_at_end); + + $self->pointed_hint('trailing-whitespace', $item->pointer($_)) + for @trailing_whitespace; + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Debian/Upstream/Metadata.pm b/lib/Lintian/Check/Debian/Upstream/Metadata.pm new file mode 100644 index 0000000..410733a --- /dev/null +++ b/lib/Lintian/Check/Debian/Upstream/Metadata.pm @@ -0,0 +1,191 @@ +# debian/upstream/metadata -- lintian check script -*- perl -*- + +# Copyright (C) 2016 Petter Reinholdtsen +# Copyright (C) 2020 Chris Lamb <lamby@debian.org> +# Copyright (C) 2021 Jelmer Vernooij +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Debian::Upstream::Metadata; + +use v5.20; +use warnings; +use utf8; + +use Const::Fast; +use List::Compare; +use List::Util qw(none); +use Syntax::Keyword::Try; +use YAML::XS; + +# default changed to false in 0.81; enable then in .perlcriticrc +$YAML::XS::LoadBlessed = 0; + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +const my $EMPTY => q{}; + +# Need 0.69 for $LoadBlessed (#861958) +const my $HAS_LOAD_BLESSED => 0.69; + +# taken from https://wiki.debian.org/UpstreamMetadata +my @known_fields = qw( + Archive + ASCL-Id + Bug-Database + Bug-Submit + Cite-As + Changelog + CPE + Documentation + Donation + FAQ + Funding + Gallery + Other-References + Reference + Registration + Registry + Repository + Repository-Browse + Screenshots + Security-Contact + Webservice +); + +# tolerated for packages not using DEP-5 copyright +my @tolerated_fields = qw( + Name + Contact +); + +sub source { + my ($self) = @_; + + my $item + = $self->processable->patched->resolve_path('debian/upstream/metadata'); + + if ($self->processable->native) { + + $self->pointed_hint('upstream-metadata-in-native-source', + $item->pointer) + if defined $item; + return; + } + + unless (defined $item) { + $self->hint('upstream-metadata-file-is-missing'); + return; + } + + $self->pointed_hint('upstream-metadata-exists', $item->pointer); + + unless ($item->is_open_ok) { + $self->pointed_hint('upstream-metadata-is-not-a-file', $item->pointer); + return; + } + + return + if $YAML::XS::VERSION < $HAS_LOAD_BLESSED; + + my $yaml; + try { + $yaml = YAML::XS::LoadFile($item->unpacked_path); + + die + unless defined $yaml; + + } catch { + + my $message = $@; + my ($reason, $document, $line, $column)= ( + $message =~ m{ + \AYAML::XS::Load\sError:\sThe\sproblem:\n + \n\s++(.+)\n + \n + was\sfound\sat\sdocument:\s(\d+),\sline:\s(\d+),\scolumn:\s(\d+)\n}x + ); + + $message + = "$reason (at document $document, line $line, column $column)" + if ( length $reason + && length $document + && length $line + && length $document); + + $self->pointed_hint('upstream-metadata-yaml-invalid', + $item->pointer, $message); + + return; + } + + unless (ref $yaml eq 'HASH') { + + $self->pointed_hint('upstream-metadata-not-yaml-mapping', + $item->pointer); + return; + } + + for my $field (keys %{$yaml}) { + + $self->pointed_hint('upstream-metadata', $item->pointer, $field, + $yaml->{$field}) + if ref($yaml->{$field}) eq $EMPTY; + } + + my $lc + = List::Compare->new([keys %{$yaml}],[@known_fields, @tolerated_fields]); + my @invalid_fields = $lc->get_Lonly; + + $self->pointed_hint('upstream-metadata-field-unknown', $item->pointer, $_) + for @invalid_fields; + + $self->pointed_hint('upstream-metadata-missing-repository', $item->pointer) + if none { defined $yaml->{$_} } qw(Repository Repository-Browse); + + $self->pointed_hint('upstream-metadata-missing-bug-tracking', + $item->pointer) + if none { defined $yaml->{$_} } qw(Bug-Database Bug-Submit); + + return; +} + +sub visit_patched_files { + my ($self, $item) = @_; + + return + unless $item->is_file; + + # here we check old upstream specification + # debian/upstream should be a directory + $self->pointed_hint('debian-upstream-obsolete-path', $item->pointer) + if $item->name eq 'debian/upstream' + || $item->name eq 'debian/upstream-metadata.yaml'; + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Debian/Upstream/SigningKey.pm b/lib/Lintian/Check/Debian/Upstream/SigningKey.pm new file mode 100644 index 0000000..686966c --- /dev/null +++ b/lib/Lintian/Check/Debian/Upstream/SigningKey.pm @@ -0,0 +1,173 @@ +# debian/upstream/signing-key -- lintian check script -*- perl -*- + +# Copyright (C) 2018 Felix Lechner +# +# This program is free software. It is distributed under the terms of +# the GNU General Public License as published by the Free Software +# Foundation; either version 2 of the License, or (at your option) any +# later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Debian::Upstream::SigningKey; + +use v5.20; +use warnings; +use utf8; + +use File::Temp; +use List::Util qw(pairs); +use Unicode::UTF8 qw(decode_utf8); + +use Lintian::IPC::Run3 qw(safe_qx); + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +sub source { + my ($self) = @_; + + my $SIGNING_KEY_FILENAMES + = $self->data->load('common/signing-key-filenames'); + + # Check all possible locations for signing keys + my %key_items; + for my $key_name ($SIGNING_KEY_FILENAMES->all) { + my $item + = $self->processable->patched->resolve_path("debian/$key_name"); + $key_items{$key_name} = $item + if $item && $item->is_file; + } + + # Check if more than one signing key is present + $self->hint('public-upstream-keys-in-multiple-locations', + (sort keys %key_items)) + if scalar keys %key_items > 1; + + # Go through signing keys and run checks for each + for my $key_name (sort keys %key_items) { + + # native packages should not have such keys + if ($self->processable->native) { + + $self->pointed_hint('public-upstream-key-in-native-package', + $key_items{$key_name}->pointer); + next; + } + + # set up a temporary directory for gpg + my $tempdir = File::Temp->newdir(); + + # get keys packets from gpg + my @command = ( + 'gpg', '--homedir', + $tempdir, '--batch', + '--attribute-fd', '1', + '--status-fd', '2', + '--with-colons', '--list-packets', + $key_items{$key_name}->unpacked_path + ); + my $bytes = safe_qx(@command); + + if ($?) { + $self->pointed_hint( + 'public-upstream-key-unusable', + $key_items{$key_name}->pointer, + 'cannot be processed' + ); + next; + } + + my $output = decode_utf8($bytes); + + # remove comments + $output =~ s/^#[^\n]*$//mg; + + # split into separate keys + my @keys = split(/^:public key packet:.*$/m, $output); + + # discard leading information + shift @keys; + + unless (scalar @keys) { + $self->pointed_hint( + 'public-upstream-key-unusable', + $key_items{$key_name}->pointer, + 'contains no keys' + ); + next; + } + + for my $key (@keys) { + + # parse each key into separate packets + my ($public_key, @pieces) = split(/^(:.+)$/m, $key); + my @packets = pairs @pieces; + + # require at least one packet + unless (length $public_key) { + $self->pointed_hint( + 'public-upstream-key-unusable', + $key_items{$key_name}->pointer, + 'has no public key' + ); + next; + } + + # look for key identifier + unless ($public_key =~ qr/^\s*keyid:\s+(\S+)$/m) { + $self->pointed_hint( + 'public-upstream-key-unusable', + $key_items{$key_name}->pointer, + 'has no keyid' + ); + next; + } + my $keyid = $1; + + # look for third-party signatures + my @thirdparty; + for my $packet (@packets) { + + my $header = $packet->[0]; + if ($header =~ qr/^:signature packet: algo \d+, keyid (\S*)$/){ + + my $signatory = $1; + push(@thirdparty, $signatory) + unless $signatory eq $keyid; + } + } + + # signatures by parties other than self + my $extrasignatures = scalar @thirdparty; + + # export-minimal strips such signatures + $self->pointed_hint( + 'public-upstream-key-not-minimal', + $key_items{$key_name}->pointer, + "has $extrasignatures extra signature(s) for keyid $keyid" + )if $extrasignatures; + } + } + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Debian/Variables.pm b/lib/Lintian/Check/Debian/Variables.pm new file mode 100644 index 0000000..31fa9a4 --- /dev/null +++ b/lib/Lintian/Check/Debian/Variables.pm @@ -0,0 +1,60 @@ +# debian/variables -- lintian check script -*- perl -*- + +# Copyright (C) 2006 Russ Allbery <rra@debian.org> +# Copyright (C) 2005 Rene van Bevern <rvb@pro-linux.de> +# Copyright (C) 2019-2020 Chris Lamb <lamby@debian.org> +# Copyright (C) 2021 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +package Lintian::Check::Debian::Variables; + +use v5.20; +use warnings; +use utf8; + +use Const::Fast; +use List::SomeUtils qw(none); + +const my @WANTED_FILES => (qr{ (.+ [.])? install }sx, qr{ (.+ [.])? links }sx); + +const my @ILLEGAL_VARIABLES => qw(DEB_BUILD_MULTIARCH); + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +sub visit_patched_files { + my ($self, $item) = @_; + + return + unless $item->name =~ m{^ debian/ }sx; + + return + if none { $item->name =~ m{ / $_ $}sx } @WANTED_FILES; + + for my $variable (@ILLEGAL_VARIABLES) { + + $self->pointed_hint('illegal-variable', $item->pointer, $variable) + if $item->decoded_utf8 =~ m{ \b $variable \b }msx; + } + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Debian/VersionSubstvars.pm b/lib/Lintian/Check/Debian/VersionSubstvars.pm new file mode 100644 index 0000000..e3789b8 --- /dev/null +++ b/lib/Lintian/Check/Debian/VersionSubstvars.pm @@ -0,0 +1,206 @@ +# debian/version-substvars -- lintian check script -*- perl -*- +# +# Copyright (C) 2006 Adeodato Simo +# Copyright (C) 2019 Chris Lamb <lamby@debian.org> +# Copyright (C) 2021 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +# SUMMARY +# ======= +# +# What breaks +# ----------- +# +# (b1) any -> any (= ${source:Version}) -> use b:V +# (b2) any -> all (= ${binary:Version}) [or S-V] -> use s:V +# (b3) all -> any (= ${either-of-them}) -> use (>= ${s:V}), +# optionally (<< ${s:V}.1~) +# +# Note (b2) also breaks if (>= ${binary:Version}) [or S-V] is used. +# +# Always warn on ${Source-Version} even if it doesn't break since the substvar +# is now considered deprecated. + +package Lintian::Check::Debian::VersionSubstvars; + +use v5.20; +use warnings; +use utf8; + +use Const::Fast; +use List::SomeUtils qw(any uniq); + +use Lintian::Relation; +use Lintian::Util qw($PKGNAME_REGEX); + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +const my $EMPTY => q{}; +const my $EQUAL => q{=}; + +sub source { + my ($self) = @_; + + my $debian_control = $self->processable->debian_control; + + my @provides; + push(@provides, + $debian_control->installable_fields($_) + ->trimmed_list('Provides', qr/\s*,\s*/)) + for $debian_control->installables; + + for my $installable ($debian_control->installables) { + + my $installable_control + = $debian_control->installable_fields($installable); + + for my $field ( + qw(Depends Pre-Depends Recommends Suggests Conflicts Replaces)) { + + next + unless $installable_control->declares($field); + + my $position = $installable_control->position($field); + + my $relation + = $self->processable->binary_relation($installable, $field); + + $self->pointed_hint( + 'substvar-source-version-is-deprecated', + $debian_control->item->pointer($position), + $installable, $field + )if $relation->matches(qr/\$[{]Source-Version[}]/); + + my %external; + my $visitor = sub { + my ($value) = @_; + + if ( + $value + =~m{^($PKGNAME_REGEX)(?: :[-a-z0-9]+)? \s* # pkg-name $1 + \(\s*[\>\<]?[=\>\<]\s* # REL + (\$[{](?:source:|binary:)(?:Upstream-)?Version[}]) # {subvar} + }x + ) { + my $other = $1; + my $substvar = $2; + + $external{$substvar} //= []; + push(@{ $external{$substvar} }, $other); + } + }; + $relation->visit($visitor, Lintian::Relation::VISIT_PRED_FULL); + + for my $substvar (keys %external) { + for my $other (uniq @{ $external{$substvar} }) { + + # We can't test dependencies on packages whose names are + # formed via substvars expanded during the build. Assume + # those maintainers know what they're doing. + $self->pointed_hint( + 'version-substvar-for-external-package', + $debian_control->item->pointer($position), + $field, + $substvar, + "$installable -> $other" + ) + unless $debian_control->installable_fields($other) + ->declares('Architecture') + || (any { "$other (= $substvar)" eq $_ } @provides) + || $other =~ /\$\{\S+\}/; + } + } + } + + my @pre_depends + = $installable_control->trimmed_list('Pre-Depends', qr/\s*,\s*/); + my @depends + = $installable_control->trimmed_list('Depends', qr/\s*,\s*/); + + for my $versioned (uniq(@pre_depends, @depends)) { + + next + unless $versioned + =~m{($PKGNAME_REGEX)(?: :any)? \s* # pkg-name + \(\s*([>]?=)\s* # rel + \$[{]((?:Source-|source:|binary:)Version)[}] # subvar + }x; + + my $prerequisite = $1; + my $operator = $2; + my $substvar = $3; + + my $prerequisite_control + = $debian_control->installable_fields($prerequisite); + + # external relation or subst var package; handled above + next + unless $prerequisite_control->declares('Architecture'); + + my $prerequisite_is_all + = ($prerequisite_control->value('Architecture') eq 'all'); + my $installable_is_all + = ($installable_control->value('Architecture') eq 'all'); + + my $context = "$installable -> $prerequisite"; + + # (b1) any -> any (= ${source:Version}) + $self->hint('not-binnmuable-any-depends-any', $context) + if !$installable_is_all + && !$prerequisite_is_all + && $operator eq $EQUAL + && $substvar eq 'source:Version'; + + # (b2) any -> all (= ${binary:Version}) [or S-V] + $self->hint('maybe-not-arch-all-binnmuable', $context) + if !$installable_is_all + && $prerequisite_is_all + && $operator eq $EQUAL + && $substvar eq 'source:Version'; + + # (b2) any -> all (* ${binary:Version}) [or S-V] + $self->hint('not-binnmuable-any-depends-all', $context) + if !$installable_is_all + && $prerequisite_is_all + && $substvar ne 'source:Version'; + + # (b3) all -> any (= ${either-of-them}) + $self->hint('not-binnmuable-all-depends-any', $context) + if $installable_is_all + && !$prerequisite_is_all + && $operator eq $EQUAL; + + # any -> any (>= ${source:Version}) + # technically this can be "binNMU'ed", though it is + # a bit weird. + } + } + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Debian/Watch.pm b/lib/Lintian/Check/Debian/Watch.pm new file mode 100644 index 0000000..2f891d3 --- /dev/null +++ b/lib/Lintian/Check/Debian/Watch.pm @@ -0,0 +1,379 @@ +# debian/watch -- lintian check script -*- perl -*- +# +# Copyright (C) 2008 Patrick Schoenfeld +# Copyright (C) 2008 Russ Allbery +# Copyright (C) 2008 Raphael Geissert +# Copyright (C) 2019 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Debian::Watch; + +use v5.20; +use warnings; +use utf8; + +use Const::Fast; +use List::SomeUtils qw(any firstval firstres); +use Path::Tiny; + +use Lintian::Util qw($PKGREPACK_REGEX); + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +const my $EMPTY => q{}; +const my $SPACE => q{ }; + +const my $URL_ACTION_FIELDS => 4; +const my $VERSION_ACTION_FIELDS => 3; + +const my $DMANGLES_AUTOMATICALLY => 4; + +sub source { + my ($self) = @_; + + my $item = $self->processable->patched->resolve_path('debian/watch'); + unless ($item && $item->is_file) { + + $self->hint('debian-watch-file-is-missing') + unless $self->processable->native; + + return; + } + + # Perform the other checks even if it is a native package + $self->pointed_hint('debian-watch-file-in-native-package', $item->pointer) + if $self->processable->native; + + # Check if the Debian version contains anything that resembles a repackaged + # source package sign, for fine grained version mangling check + # If the version field is missing, we assume a neutral non-native one. + + # upstream method returns empty for native packages + my $upstream = $self->processable->changelog_version->upstream; + my ($prerelease) = ($upstream =~ qr/(alpha|beta|rc)/i); + +# there is a good repack indicator in $processable->repacked but we need the text + my ($repack) = ($upstream =~ $PKGREPACK_REGEX); + + return + unless $item->is_open_ok; + + my $contents = $item->bytes; + + # each pattern marks a multi-line (!) selection for the tag message + my @templatepatterns + = (qr/^\s*#\s*(Example watch control file for uscan)/mi,qr/(<project>)/); + my $templatestring; + + for my $pattern (@templatepatterns) { + ($templatestring) = ($contents =~ $pattern); + last if defined $templatestring; + } + + $self->pointed_hint('debian-watch-contains-dh_make-template', + $item->pointer, $templatestring) + if length $templatestring; + + # remove backslash at end; uscan will catch it + $contents =~ s/(?<!\\)\\$//; + + my $standard; + + my @lines = split(/\n/, $contents); + + # look for watch file version + for my $line (@lines) { + + if ($line =~ /^\s*version\s*=\s*(\d+)\s*$/) { + if (length $1) { + $standard = $1; + last; + } + } + } + + return + unless defined $standard; + + # version 1 too broken to check + return + if $standard < 2; + + # allow spaces for all watch file versions (#950250, #950277) + my $separator = qr/\s*,\s*/; + + my $withpgpverification = 0; + my %dversions; + + my $position = 1; + my $continued = $EMPTY; + for my $line (@lines) { + + my $pointer = $item->pointer($position); + + # strip leading spaces + $line =~ s/^\s*//; + + # strip comments, if any + $line =~ s/^\#.*$//; + + unless (length $line) { + $continued = $EMPTY; + next; + } + + # merge continuation lines + if ($line =~ s/\\$//) { + $continued .= $line; + next; + } + + $line = $continued . $line + if length $continued; + + $continued = $EMPTY; + + next + if $line =~ /^version\s*=\s*\d+\s*$/; + + my $remainder = $line; + + my @options; + + # keep order; otherwise. alternative \S+ ends up with quotes + if ($remainder =~ s/opt(?:ion)?s=(?|\"((?:[^\"]|\\\")+)\"|(\S+))\s+//){ + @options = split($separator, $1); + } + + unless (length $remainder) { + + $self->pointed_hint('debian-watch-line-invalid', $pointer, $line); + next; + } + + my $repack_mangle = 0; + my $repack_dmangle = 0; + my $repack_dmangle_auto = 0; + my $prerelease_mangle = 0; + my $prerelease_umangle = 0; + + for my $option (@options) { + + if (length $repack) { + $repack_mangle = 1 + if $option + =~ /^[ud]?versionmangle\s*=\s*(?:auto|.*$repack.*)/; + $repack_dmangle = 1 + if $option =~ /^dversionmangle\s*=\s*(?:auto|.*$repack.*)/; + } + + if (length $prerelease) { + $prerelease_mangle = 1 + if $option =~ /^[ud]?versionmangle\s*=.*$prerelease/; + $prerelease_umangle = 1 + if $option =~ /^uversionmangle\s*=.*$prerelease/; + } + + $repack_dmangle_auto = 1 + if $option =~ /^dversionmangle\s*=.*(?:s\/\@DEB_EXT\@\/|auto)/ + && $standard >= $DMANGLES_AUTOMATICALLY; + + $withpgpverification = 1 + if $option =~ /^pgpsigurlmangle\s*=\s*/ + || $option =~ /^pgpmode\s*=\s*(?!none\s*$)\S.*$/; + + my ($name, $value) = split(m{ \s* = \s* }x, $option, 2); + + next + unless length $name; + + $value //= $EMPTY; + + $self->pointed_hint('prefer-uscan-symlink',$pointer, $name, $value) + if $name eq 'filenamemangle'; + } + + $self->pointed_hint( + 'debian-watch-file-uses-deprecated-sf-redirector-method', + $pointer,$remainder) + if $remainder =~ m{qa\.debian\.org/watch/sf\.php\?}; + + $self->pointed_hint('debian-watch-file-uses-deprecated-githubredir', + $pointer, $remainder) + if $remainder =~ m{githubredir\.debian\.net}; + + $self->pointed_hint('debian-watch-lacks-sourceforge-redirector', + $pointer, $remainder) + if $remainder =~ m{ (?:https?|ftp):// + (?:(?:.+\.)?dl|(?:pr)?downloads?|ftp\d?|upload) \. + (?:sourceforge|sf)\.net}xsm + || $remainder =~ m{https?://(?:www\.)?(?:sourceforge|sf)\.net + /project/showfiles\.php}xsm + || $remainder =~ m{https?://(?:www\.)?(?:sourceforge|sf)\.net + /projects/.+/files}xsm; + + if ($remainder =~ m{((?:http|ftp):(?!//sf.net/)\S+)}) { + $self->pointed_hint('debian-watch-uses-insecure-uri', $pointer,$1); + } + + # This bit is as-is from uscan.pl: + my ($base, $filepattern, $lastversion, $action) + = split($SPACE, $remainder, $URL_ACTION_FIELDS); + + # Per #765995, $base might be undefined. + if (defined $base) { + if ($base =~ s{/([^/]*\([^/]*\)[^/]*)$}{/}) { + # Last component of $base has a pair of parentheses, so no + # separate filepattern field; we remove the filepattern from the + # end of $base and rescan the rest of the line + $filepattern = $1; + (undef, $lastversion, $action) + = split($SPACE, $remainder, $VERSION_ACTION_FIELDS); + } + + $dversions{$lastversion} = 1 + if defined $lastversion; + + $lastversion = 'debian' + unless defined $lastversion; + } + + # If the version of the package contains dfsg, assume that it needs + # to be mangled to get reasonable matches with upstream. + my $needs_repack_mangling = ($repack && $lastversion eq 'debian'); + + $self->pointed_hint('debian-watch-not-mangling-version', + $pointer, $line) + if $needs_repack_mangling + && !$repack_mangle + && !$repack_dmangle_auto; + + $self->pointed_hint('debian-watch-mangles-debian-version-improperly', + $pointer, $line) + if $needs_repack_mangling + && $repack_mangle + && !$repack_dmangle; + + my $needs_prerelease_mangling + = ($prerelease && $lastversion eq 'debian'); + + $self->pointed_hint('debian-watch-mangles-upstream-version-improperly', + $pointer, $line) + if $needs_prerelease_mangling + && $prerelease_mangle + && !$prerelease_umangle; + + my $upstream_url = $remainder; + + # Keep only URL part + $upstream_url =~ s/(.*?\S)\s.*$/$1/; + + for my $option (@options) { + if ($option =~ /^ component = (.+) $/x) { + + my $component = $1; + + $self->pointed_hint('debian-watch-upstream-component', + $pointer, $upstream_url, $component); + } + } + + } continue { + ++$position; + } + + $self->pointed_hint('debian-watch-does-not-check-openpgp-signature', + $item->pointer) + unless $withpgpverification; + + my $SIGNING_KEY_FILENAMES + = $self->data->load('common/signing-key-filenames'); + + # look for upstream signing key + my @candidates + = map { $self->processable->patched->resolve_path("debian/$_") } + $SIGNING_KEY_FILENAMES->all; + my $keyfile = firstval {$_ && $_->is_file} @candidates; + + # check upstream key is present if needed + $self->pointed_hint('debian-watch-file-pubkey-file-is-missing', + $item->pointer) + if $withpgpverification && !$keyfile; + + # check upstream key is used if present + $self->pointed_hint('debian-watch-could-verify-download', + $item->pointer, $keyfile->name) + if $keyfile && !$withpgpverification; + + if (defined $self->processable->changelog && %dversions) { + + my %changelog_versions; + my $count = 1; + my $changelog = $self->processable->changelog; + for my $entry (@{$changelog->entries}) { + my $uversion = $entry->Version; + $uversion =~ s/-[^-]+$//; # revision + $uversion =~ s/^\d+://; # epoch + $changelog_versions{'orig'}{$entry->Version} = $count; + + # Preserve the first value here to correctly detect old versions. + $changelog_versions{'mangled'}{$uversion} = $count + unless (exists($changelog_versions{'mangled'}{$uversion})); + $count++; + } + + for my $dversion (sort keys %dversions) { + + next + if $dversion eq 'debian'; + + local $" = ', '; + + if (!$self->processable->native + && exists($changelog_versions{'orig'}{$dversion})) { + + $self->pointed_hint( + 'debian-watch-file-specifies-wrong-upstream-version', + $item->pointer, $dversion); + next; + } + + if (exists $changelog_versions{'mangled'}{$dversion} + && $changelog_versions{'mangled'}{$dversion} != 1) { + + $self->pointed_hint( + 'debian-watch-file-specifies-old-upstream-version', + $item->pointer, $dversion); + next; + } + } + } + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Debian/Watch/Standard.pm b/lib/Lintian/Check/Debian/Watch/Standard.pm new file mode 100644 index 0000000..129966d --- /dev/null +++ b/lib/Lintian/Check/Debian/Watch/Standard.pm @@ -0,0 +1,98 @@ +# debian/watch/standard -- lintian check script -*- perl -*- +# +# Copyright (C) 2020 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Debian::Watch::Standard; + +use v5.20; +use warnings; +use utf8; + +use Const::Fast; +use List::Compare; +use List::Util qw(max); + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +const my $SPACE => q{ }; + +const my @STANDARDS => (2, 3, 4); +const my $NEWLY_SUPERSEEDED => 3; + +sub visit_patched_files { + my ($self, $item) = @_; + + return + unless $item->name eq 'debian/watch'; + + my $contents = $item->bytes; + return + unless length $contents; + + # look for version + my @mentioned = ($contents =~ /^ version \s* = \s* (\d+) \s* $/gmsx); + + my $has_contents = !!($contents =~ m{^ \s* [^#] }gmx); + + if ($has_contents && !@mentioned) { + + $self->pointed_hint('missing-debian-watch-file-standard', + $item->pointer); + return; + } + + $self->pointed_hint('multiple-debian-watch-file-standards', + $item->pointer,join($SPACE, @mentioned)) + if @mentioned > 1; + + my $standard_lc = List::Compare->new(\@mentioned, \@STANDARDS); + my @unknown = $standard_lc->get_Lonly; + my @known = $standard_lc->get_intersection; + + $self->pointed_hint('unknown-debian-watch-file-standard', + $item->pointer, $_) + for @unknown; + + return + unless @known; + + my $highest = max(@known); + $self->pointed_hint('debian-watch-file-standard', $item->pointer,$highest); + + $self->pointed_hint('older-debian-watch-file-standard', + $item->pointer, $highest) + if $highest == $NEWLY_SUPERSEEDED; + + $self->pointed_hint('obsolete-debian-watch-file-standard', + $item->pointer, $highest) + if $highest < $NEWLY_SUPERSEEDED; + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Debug/Automatic.pm b/lib/Lintian/Check/Debug/Automatic.pm new file mode 100644 index 0000000..1bb803f --- /dev/null +++ b/lib/Lintian/Check/Debug/Automatic.pm @@ -0,0 +1,63 @@ +# debug/automatic -- lintian check script -*- perl -*- +# +# Copyright (C) 2004 Marc Brockschmidt +# Copyright (C) 2020 Chris Lamb <lamby@debian.org> +# Copyright (C) 2020-2021 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Debug::Automatic; + +use v5.20; +use warnings; +use utf8; + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +sub source { + my ($self) = @_; + + my $control = $self->processable->debian_control; + + for my $installable ($control->installables) { + my $installable_fields = $control->installable_fields($installable); + + my $field = 'Package'; + + my $control_item= $self->processable->debian_control->item; + my $position = $installable_fields->position($field); + my $pointer = $control_item->pointer($position); + + $self->pointed_hint( + 'debian-control-has-dbgsym-package',$pointer, + "(in section for $installable)", $field + )if $installable =~ m{ [-] dbgsym $}x; + } + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Debug/Obsolete.pm b/lib/Lintian/Check/Debug/Obsolete.pm new file mode 100644 index 0000000..77e9bba --- /dev/null +++ b/lib/Lintian/Check/Debug/Obsolete.pm @@ -0,0 +1,70 @@ +# debug/obsolete -- lintian check script -*- perl -*- +# +# Copyright (C) 2004 Marc Brockschmidt +# Copyright (C) 2020 Chris Lamb <lamby@debian.org> +# Copyright (C) 2020-2021 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Debug::Obsolete; + +use v5.20; +use warnings; +use utf8; + +use List::SomeUtils qw(none); + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +sub source { + my ($self) = @_; + + my $control = $self->processable->debian_control; + + my $KNOWN_LEGACY_DBG_PATTERNS= $self->data->load('common/dbg-pkg'); + + for my $installable ($control->installables) { + my $installable_fields = $control->installable_fields($installable); + + my $field = 'Package'; + + my $control_item= $self->processable->debian_control->item; + my $position = $installable_fields->position($field); + my $pointer = $control_item->pointer($position); + + $self->pointed_hint( + 'debian-control-has-obsolete-dbg-package',$pointer, + "(in section for $installable)", $field + ) + if $installable =~ m{ [-] dbg $}x + && (none { $installable =~ m{$_}xms } + $KNOWN_LEGACY_DBG_PATTERNS->all); + } + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Desktop/Dbus.pm b/lib/Lintian/Check/Desktop/Dbus.pm new file mode 100644 index 0000000..0e73a85 --- /dev/null +++ b/lib/Lintian/Check/Desktop/Dbus.pm @@ -0,0 +1,186 @@ +# desktop/dbus -- lintian check script, vaguely based on apache2 -*- perl -*- +# +# Copyright (C) 2012 Arno Toell +# Copyright (C) 2014 Collabora Ltd. +# Copyright (C) 2021 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Desktop::Dbus; + +use v5.20; +use warnings; +use utf8; + +use Const::Fast; +use List::UtilsBy qw(uniq_by); + +const my $EMPTY => q{}; + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +sub installable { + my ($self) = @_; + + my $index = $self->processable->installed; + + my @files; + for my $prefix (qw(etc/dbus-1 usr/share/dbus-1)) { + for my $suffix (qw(session system)) { + + my $folder = $index->resolve_path("${prefix}/${suffix}.d"); + next + unless defined $folder; + + push(@files, $folder->children); + } + } + + my @unique = uniq_by { $_->name } @files; + + $self->check_policy($_) for @unique; + + if (my $folder= $index->resolve_path('usr/share/dbus-1/services')) { + + $self->check_service($_, session => 1) for $folder->children; + } + + if (my $folder= $index->resolve_path('usr/share/dbus-1/system-services')) { + $self->check_service($_) for $folder->children; + } + + return; +} + +my $PROPERTIES = 'org.freedesktop.DBus.Properties'; + +sub check_policy { + my ($self, $item) = @_; + + my $xml = $item->decoded_utf8; + return + unless length $xml; + + # Parsing XML via regexes is evil, but good enough here... + # note that we are parsing the entire file as one big string, + # so that we catch <policy\nat_console="true"\n> or whatever. + + my @rules; + # a small rubbish state machine: we want to match a <policy> containing + # any <allow> or <deny> rule that is about sending + my $policy = $EMPTY; + while ($xml =~ m{(<policy[^>]*>)|(</policy\s*>)|(<(?:allow|deny)[^>]*>)}sg) + { + if (defined $1) { + $policy = $1; + + } elsif (defined $2) { + $policy = $EMPTY; + + } else { + push(@rules, $policy.$3); + } + } + + my $position = 1; + for my $rule (@rules) { + # normalize whitespace a bit so we can report it sensibly: + # typically it will now look like + # <policy context="default"><allow send_destination="com.example.Foo"/> + $rule =~ s{\s+}{ }g; + + if ($rule =~ m{send_} && $rule !~ m{send_destination=}) { + # It is about sending but does not specify a send-destination. + # This could be bad. + + if ($rule =~ m{[^>]*user=['"]root['"].*<allow}) { + # skip it: it's probably the "agent" pattern (as seen in + # e.g. BlueZ), and cannot normally be a security flaw + # because root can do anything anyway + + } else { + $self->pointed_hint('dbus-policy-without-send-destination', + $item->pointer($position), $rule); + + if ( $rule =~ m{send_interface=} + && $rule !~ m{send_interface=['"]\Q${PROPERTIES}\E['"]}) { + # That's undesirable, because it opens up communication + # with arbitrary services and can undo DoS mitigation + # efforts; but at least it's specific to an interface + # other than o.fd.DBus.Properties, so all that should + # happen is that the service sends back an error message. + # + # Properties doesn't count as an effective limitation, + # because it's a sort of meta-interface. + + } elsif ($rule =~ m{<allow}) { + # Looks like CVE-2014-8148 or similar. This is really bad; + # emit an additional tag. + $self->pointed_hint('dbus-policy-excessively-broad', + $item->pointer($position), $rule); + } + } + } + + $self->pointed_hint('dbus-policy-at-console', + $item->pointer($position), $rule) + if $rule =~ m{at_console=['"]true}; + + } continue { + ++$position; + } + + return; +} + +sub check_service { + my ($self, $item, %kwargs) = @_; + + my $text = $item->decoded_utf8; + return + unless length $text; + + while ($text =~ m{^Name=(.*)$}gm) { + + my $name = $1; + + next + if $item->basename eq "${name}.service"; + + if ($kwargs{session}) { + $self->pointed_hint('dbus-session-service-wrong-name', + $item->pointer,"better: ${name}.service"); + + } else { + $self->pointed_hint('dbus-system-service-wrong-name', + $item->pointer, "better: ${name}.service"); + } + } + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Desktop/Gnome.pm b/lib/Lintian/Check/Desktop/Gnome.pm new file mode 100644 index 0000000..16bb0d1 --- /dev/null +++ b/lib/Lintian/Check/Desktop/Gnome.pm @@ -0,0 +1,49 @@ +# desktop/gnome -- lintian check script -*- perl -*- + +# Copyright (C) 1998 Christian Schwarz and Richard Braakman +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Desktop::Gnome; + +use v5.20; +use warnings; +use utf8; + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +sub visit_installed_files { + my ($self, $item) = @_; + + # /etc/gconf/schemas + $self->pointed_hint('package-installs-into-etc-gconf-schemas', + $item->pointer) + if $item->name =~ m{^etc/gconf/schemas/\S}; + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Desktop/Gnome/Gir.pm b/lib/Lintian/Check/Desktop/Gnome/Gir.pm new file mode 100644 index 0000000..6f18594 --- /dev/null +++ b/lib/Lintian/Check/Desktop/Gnome/Gir.pm @@ -0,0 +1,166 @@ +# desktop/gnome/gir -- lintian check script for GObject-Introspection -*- perl -*- +# +# Copyright (C) 2012 Arno Toell +# Copyright (C) 2014 Collabora Ltd. +# Copyright (C) 2016 Simon McVittie +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Desktop::Gnome::Gir; + +use v5.20; +use warnings; +use utf8; + +use Const::Fast; + +const my $DOLLAR => q{$}; + +const my $NONE => q{NONE}; + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +sub source { + my ($self) = @_; + + my $debian_control = $self->processable->debian_control; + + for my $installable ($debian_control->installables) { + + $self->pointed_hint('typelib-missing-gir-depends', + $debian_control->item->pointer, $installable) + if $installable =~ m/^gir1\.2-/ + && !$self->processable->binary_relation($installable, 'strong') + ->satisfies($DOLLAR . '{gir:Depends}'); + } + + return; +} + +sub installable { + my ($self) = @_; + + my $DEB_HOST_MULTIARCH= $self->data->architectures->deb_host_multiarch; + my $triplet = $DEB_HOST_MULTIARCH->{$self->processable->architecture}; + + # Slightly contrived, but it might be Architecture: all, in which + # case this is the best we can do + $triplet = $DOLLAR . '{DEB_HOST_MULTIARCH}' + unless defined $triplet; + + my $xml_dir + = $self->processable->installed->resolve_path('usr/share/gir-1.0/'); + + my @girs; + @girs = grep { $_->name =~ m{ [.]gir $}x } $xml_dir->children + if defined $xml_dir; + + my @type_libs; + + my $old_dir + = $self->processable->installed->resolve_path( + 'usr/lib/girepository-1.0/'); + + if (defined $old_dir) { + + $self->pointed_hint('typelib-not-in-multiarch-directory', + $_->pointer,"usr/lib/$triplet/girepository-1.0") + for $old_dir->children; + + push(@type_libs, $old_dir->children); + } + + my $multiarch_dir= $self->processable->installed->resolve_path( + "usr/lib/$triplet/girepository-1.0"); + push(@type_libs, $multiarch_dir->children) + if defined $multiarch_dir; + + my $section = $self->processable->fields->value('Section'); + if ($section ne 'libdevel' && $section ne 'oldlibs') { + + $self->pointed_hint('gir-section-not-libdevel', $_->pointer, + $section || $NONE) + for @girs; + } + + if ($section ne 'introspection' && $section ne 'oldlibs') { + + $self->pointed_hint('typelib-section-not-introspection', + $_->pointer, $section || $NONE) + for @type_libs; + } + + if ($self->processable->architecture eq 'all') { + + $self->pointed_hint('gir-in-arch-all-package', $_->pointer)for @girs; + + $self->pointed_hint('typelib-in-arch-all-package', $_->pointer) + for @type_libs; + } + + GIR: for my $gir (@girs) { + + my $expected = 'gir1.2-' . lc($gir->basename); + $expected =~ s/\.gir$//; + $expected =~ tr/_/-/; + + for my $installable ($self->group->get_installables) { + next + unless $installable->name =~ m/^gir1\.2-/; + + my $name = $installable->name; + my $version = $installable->fields->value('Version'); + + next GIR + if $installable->relation('Provides')->satisfies($expected) + && $self->processable->relation('strong') + ->satisfies("$name (= $version)"); + } + + my $our_version = $self->processable->fields->value('Version'); + + $self->pointed_hint('gir-missing-typelib-dependency', + $gir->pointer, $expected) + unless $self->processable->relation('strong') + ->satisfies("$expected (= $our_version)"); + } + + for my $type_lib (@type_libs) { + + my $expected = 'gir1.2-' . lc($type_lib->basename); + $expected =~ s/\.typelib$//; + $expected =~ tr/_/-/; + + $self->pointed_hint('typelib-package-name-does-not-match', + $type_lib->pointer, $expected) + if $self->processable->name ne $expected + && !$self->processable->relation('Provides')->satisfies($expected); + } + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Desktop/Gnome/Gir/Substvars.pm b/lib/Lintian/Check/Desktop/Gnome/Gir/Substvars.pm new file mode 100644 index 0000000..d667717 --- /dev/null +++ b/lib/Lintian/Check/Desktop/Gnome/Gir/Substvars.pm @@ -0,0 +1,65 @@ +# desktop/gnome/gir/substvars -- lintian check script -*- perl -*- +# +# Copyright (C) 2004 Marc Brockschmidt +# Copyright (C) 2020 Chris Lamb <lamby@debian.org> +# Copyright (C) 2020-2021 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Desktop::Gnome::Gir::Substvars; + +use v5.20; +use warnings; +use utf8; + +use Const::Fast; + +const my $DOLLAR => q{$}; + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +sub source { + my ($self) = @_; + + my $debian_control = $self->processable->debian_control; + + for my $installable ($debian_control->installables) { + + next + unless $installable =~ m{ gir [\d.]+ - .* - [\d.]+ $}x; + + my $relation= $self->processable->binary_relation($installable, 'all'); + + $self->pointed_hint( + 'gobject-introspection-package-missing-depends-on-gir-depends', + $debian_control->item->pointer,$installable) + unless $relation->satisfies($DOLLAR . '{gir:Depends}'); + } + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Desktop/Icons.pm b/lib/Lintian/Check/Desktop/Icons.pm new file mode 100644 index 0000000..95565ed --- /dev/null +++ b/lib/Lintian/Check/Desktop/Icons.pm @@ -0,0 +1,69 @@ +# desktop/icons -- lintian check script -*- perl -*- + +# Copyright (C) 1998 Christian Schwarz and Richard Braakman +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Desktop::Icons; + +use v5.20; +use warnings; +use utf8; + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +sub visit_installed_files { + my ($self, $item) = @_; + + if ($item->name =~ m{/icons/[^/]+/(\d+)x(\d+)/(?!animations/).*\.png$}){ + + my $directory_width = $1; + my $directory_height = $2; + + my $resolved = $item->resolve_path; + + if ($resolved && $resolved->file_type =~ m/,\s*(\d+)\s*x\s*(\d+)\s*,/){ + + my $file_width = $1; + my $file_height = $2; + + my $width_delta = abs($directory_width - $file_width); + my $height_delta = abs($directory_height - $file_height); + + $self->pointed_hint('icon-size-and-directory-name-mismatch', + $item->pointer, $file_width.'x'.$file_height) + if $width_delta > 2 || $height_delta > 2; + } + } + + $self->pointed_hint('raster-image-in-scalable-directory', $item->pointer) + if $item->is_file + && $item->name =~ m{/icons/[^/]+/scalable/.*\.(?:png|xpm)$}; + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Desktop/X11.pm b/lib/Lintian/Check/Desktop/X11.pm new file mode 100644 index 0000000..4373980 --- /dev/null +++ b/lib/Lintian/Check/Desktop/X11.pm @@ -0,0 +1,94 @@ +# desktop/x11 -- lintian check script -*- perl -*- + +# Copyright (C) 1998 Christian Schwarz and Richard Braakman +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Desktop::X11; + +use v5.20; +use warnings; +use utf8; + +use List::SomeUtils qw(any none); + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +has fontdirs => (is => 'rw', default => sub { {} }); + +sub visit_installed_files { + my ($self, $item) = @_; + + # links to FHS locations are allowed + $self->pointed_hint('package-installs-file-to-usr-x11r6', $item->pointer) + if $item->name =~ m{^usr/X11R6/} && !$item->is_symlink; + + return + if $item->is_dir; + + # /usr/share/fonts/X11 + my ($subdir) = ($item->name =~ m{^usr/share/fonts/X11/([^/]+)/\S+}); + if (defined $subdir) { + + $self->fontdirs->{$subdir}++ + if any { $subdir eq $_ } qw(100dpi 75dpi misc); + + if (any { $subdir eq $_ } qw(PEX CID Speedo cyrillic)) { + $self->pointed_hint('file-in-discouraged-x11-font-directory', + $item->pointer); + + } elsif (none { $subdir eq $_ } + qw(100dpi 75dpi misc Type1 encodings util)) { + $self->pointed_hint('file-in-unknown-x11-font-directory', + $item->pointer); + + } elsif ($item->basename eq 'encodings.dir' + or $item->basename =~ m{fonts\.(dir|scale|alias)}) { + $self->pointed_hint('package-contains-compiled-font-file', + $item->pointer); + } + } + + return; +} + +sub installable { + my ($self) = @_; + + # X11 font directories with files + my %fontdirs = %{$self->fontdirs}; + + # check for multiple DPIs in the same X11 bitmap font package. + $self->hint('package-contains-multiple-dpi-fonts') + if $fontdirs{'100dpi'} && $fontdirs{'75dpi'}; + + $self->hint('package-mixes-misc-and-dpi-fonts') + if $fontdirs{misc} && keys %fontdirs > 1; + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Desktop/X11/Font/Update.pm b/lib/Lintian/Check/Desktop/X11/Font/Update.pm new file mode 100644 index 0000000..2315e7d --- /dev/null +++ b/lib/Lintian/Check/Desktop/X11/Font/Update.pm @@ -0,0 +1,159 @@ +# desktop/x11/font/update -- lintian check script -*- perl -*- +# +# Copyright (C) 1998 Richard Braakman +# Copyright (C) 2002 Josip Rodin +# Copyright (C) 2016-2019 Chris Lamb <lamby@debian.org> +# Copyright (C) 2021 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Desktop::X11::Font::Update; + +use v5.20; +use warnings; +use utf8; + +use Const::Fast; +use Unicode::UTF8 qw(encode_utf8); + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +const my $EMPTY => q{}; + +# 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. +const my $LEADING_PATTERN=> +'(?:(?:^|[`&;(|{])\s*|(?:if|then|do|while|!)\s+|env(?:\s+[[:alnum:]_]+=(?:\S+|\"[^"]*\"|\'[^\']*\'))*\s+)'; +const my $LEADING_REGEX => qr/$LEADING_PATTERN/; + +has x_fonts => ( + is => 'rw', + lazy => 1, + default => sub { + my ($self) = @_; + + my @x_fonts + = grep { m{^usr/share/fonts/X11/.*\.(?:afm|pcf|pfa|pfb)(?:\.gz)?$} } + @{$self->processable->installed->sorted_list}; + + return \@x_fonts; + } +); + +sub visit_control_files { + my ($self, $item) = @_; + + return + unless $item->is_maintainer_script; + + return + unless length $item->interpreter; + + return + unless $item->is_open_ok; + + open(my $fd, '<', $item->unpacked_path) + or die encode_utf8('Cannot open ' . $item->unpacked_path); + + my $stashed = $EMPTY; + + my $saw_update_fonts = 0; + + my $position = 1; + while (my $possible_continuation = <$fd>) { + + chomp $possible_continuation; + + # skip empty lines + next + if $possible_continuation =~ /^\s*$/; + + # skip comment lines + next + if $possible_continuation =~ /^\s*\#/; + + my $no_comment = remove_comments($possible_continuation); + + # Concatenate lines containing continuation character (\) + # at the end + if ($no_comment =~ s{\\$}{}) { + + $stashed .= $no_comment; + + next; + } + + my $line = $stashed . $no_comment; + $stashed = $EMPTY; + + $saw_update_fonts = 1 + if $line + =~ m{$LEADING_REGEX(?:/usr/bin/)?update-fonts-(?:alias|dir|scale)\s(\S+)}; + + } continue { + ++$position; + } + + close $fd; + + if ($item->name eq 'postinst' && !$saw_update_fonts) { + + $self->pointed_hint('missing-call-to-update-fonts', $item->pointer, $_) + for @{$self->x_fonts}; + } + + return; +} + +sub remove_comments { + my ($line) = @_; + + return $line + unless length $line; + + my $simplified = $line; + + # Remove quoted strings so we can more easily ignore comments + # inside them + $simplified =~ s/(^|[^\\](?:\\\\)*)\'(?:\\.|[^\\\'])+\'/$1''/g; + $simplified =~ s/(^|[^\\](?:\\\\)*)\"(?:\\.|[^\\\"])+\"/$1""/g; + + # If the remaining string contains what looks like a comment, + # eat it. In either case, swap the unmodified script line + # back in for processing (if required) and return it. + if ($simplified =~ m/(?:^|[^[\\])[\s\&;\(\)](\#.*$)/) { + + my $comment = $1; + + # eat comment + $line =~ s/\Q$comment\E//; + } + + return $line; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/DhMake.pm b/lib/Lintian/Check/DhMake.pm new file mode 100644 index 0000000..42f8d94 --- /dev/null +++ b/lib/Lintian/Check/DhMake.pm @@ -0,0 +1,83 @@ +# Copyright (C) 1998 Christian Schwarz and Richard Braakman +# Copyright (C) 1999 Joey Hess +# Copyright (C) 2000 Sean 'Shaleh' Perry +# Copyright (C) 2002 Josip Rodin +# Copyright (C) 2007 Russ Allbery +# Copyright (C) 2013-2018 Bastien ROUCARIES +# Copyright (C) 2017-2020 Chris Lamb <lamby@debian.org> +# Copyright (C) 2020-2021 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::DhMake; + +use v5.20; +use warnings; +use utf8; + +use Unicode::UTF8 qw(encode_utf8); + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +sub visit_patched_files { + my ($self, $item) = @_; + + return + unless $item->is_file; + + $self->pointed_hint('readme-source-is-dh_make-template', $item->pointer) + if $item->name eq 'debian/README.source' + && $item->bytes + =~ / \QYou WILL either need to modify or delete this file\E /isx; + + if ( $item->name =~ m{^debian/(README.source|copyright|rules|control)$} + && $item->is_open_ok) { + + open(my $fd, '<', $item->unpacked_path) + or die encode_utf8('Cannot open ' . $item->unpacked_path); + + my $position = 1; + while (my $line = <$fd>) { + + next + unless $line =~ m/(?<!")(FIX_?ME)(?!")/; + + my $placeholder = $1; + + $self->pointed_hint('file-contains-fixme-placeholder', + $item->pointer($position), $placeholder); + + } continue { + ++$position; + } + + close $fd; + } + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/DhMake/Template.pm b/lib/Lintian/Check/DhMake/Template.pm new file mode 100644 index 0000000..64c1f57 --- /dev/null +++ b/lib/Lintian/Check/DhMake/Template.pm @@ -0,0 +1,52 @@ +# dh-make/template -- lintian check script -*- perl -*- + +# Copyright (C) 1999 by Joey Hess +# Copyright (C) 2016-2020 Chris Lamb <lamby@debian.org> +# Copyright (C) 2021 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::DhMake::Template; + +use v5.20; +use warnings; +use utf8; + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +sub visit_patched_files { + my ($self, $item) = @_; + + return + unless $item->dirname eq 'debian/'; + + $self->pointed_hint('dh-make-template-in-source', $item->pointer) + if $item->basename =~ m{^ ex[.] | [.]ex $}ix; + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Documentation.pm b/lib/Lintian/Check/Documentation.pm new file mode 100644 index 0000000..c741b20 --- /dev/null +++ b/lib/Lintian/Check/Documentation.pm @@ -0,0 +1,230 @@ +# documentation -- lintian check script -*- perl -*- + +# Copyright (C) 1998 Christian Schwarz and Richard Braakman +# Copyright (C) 2020 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Documentation; + +use v5.20; +use warnings; +use utf8; + +use Const::Fast; +use List::SomeUtils qw(any); +use Unicode::UTF8 qw(encode_utf8); + +const my $VERTICAL_BAR => q{|}; + +# 276 is 255 bytes (maximal length for a filename) plus gzip overhead +const my $MAXIMUM_EMPTY_GZIP_SIZE => 276; + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +# a list of regex for detecting documentation file checked against basename (xi) +my @DOCUMENTATION_FILE_REGEXES = qw{ + [.]docx?$ + [.]html?$ + [.]info$ + [.]latex$ + [.]markdown$ + [.]md$ + [.]odt$ + [.]pdf$ + [.]readme$ + [.]rmd$ + [.]rst$ + [.]rtf$ + [.]tex$ + [.]txt$ + ^code[-_]of[-_]conduct$ + ^contribut(?:e|ing)$ + ^copyright$ + ^licen[sc]es?$ + ^howto$ + ^patents?$ + ^readme(?:[.]?first|[.]1st|[.]debian|[.]source)?$ + ^todos?$ +}; + +# an OR (|) regex of all compressed extension +has COMPRESS_FILE_EXTENSIONS_OR_ALL => ( + is => 'rw', + lazy => 1, + default => sub { + my ($self) = @_; + + my $COMPRESS_FILE_EXTENSIONS + = $self->data->load('files/compressed-file-extensions',qr/\s+/); + + my $text = join($VERTICAL_BAR, + (map { quotemeta } $COMPRESS_FILE_EXTENSIONS->all)); + + return qr/$text/; + } +); + +sub visit_installed_files { + my ($self, $item) = @_; + + my $ppkg = quotemeta($self->processable->name); + + if ( $self->processable->type eq 'udeb' + && $item->name =~ m{^usr/share/(?:doc|info)/\S}) { + + $self->pointed_hint('udeb-contains-documentation-file',$item->pointer); + return; + } + + $self->pointed_hint('package-contains-info-dir-file', $item->pointer) + if $item->name =~ m{^ usr/share/info/dir (?:[.]old)? (?:[.]gz)? $}x; + + # doxygen md5sum + $self->pointed_hint('useless-autogenerated-doxygen-file', $item->pointer) + if $item->name =~ m{^ usr/share/doc/ $ppkg / [^/]+ / .+ [.]md5$ }sx + && $item->parent_dir->child('doxygen.png'); + + my $regex = $self->COMPRESS_FILE_EXTENSIONS_OR_ALL; + + # doxygen compressed map + $self->pointed_hint('compressed-documentation', $item->pointer) + if $item->name + =~ m{^ usr/share/doc/ (?:.+/)? (?:doxygen|html) / .* [.]map [.] $regex }sx; + + if ($item->is_file + && any { $item->basename =~ m{$_}xi } @DOCUMENTATION_FILE_REGEXES) { + + $self->pointed_hint( + 'package-contains-documentation-outside-usr-share-doc', + $item->pointer) + unless $item->name =~ m{^etc/} + || $item->name =~ m{^usr/share/(?:doc|help)/} + # see Bug#981268 + # usr/lib/python3/dist-packages/*.dist-info/entry_points.txt + || $item->name =~ m{^ usr/lib/python3/dist-packages/ + .+ [.] dist-info/entry_points.txt $}sx + # No need for dh-r packages to automatically + # create overrides if we just allow them all to + # begin with. + || $item->dirname =~ 'usr/lib/R/site-library/' + # SNMP MIB files, see Bug#971427 + || $item->dirname eq 'usr/share/snmp/mibs/' + # see Bug#904852 + || $item->dirname =~ m{templates?(?:[.]d)?/} + || ( $item->basename =~ m{^README}xi + && $item->bytes =~ m{this directory}xi) + # see Bug#1009679, not documentation, just an unlucky suffix + || $item->name =~ m{^var/lib/ocaml/lintian/.+[.]info$} + # see Bug#970275 + || $item->name =~ m{^usr/share/gtk-doc/html/.+[.]html?$}; + } + + if ($item->name =~ m{^usr/share/doc/\S}) { + + # file not owned by root? + unless ($item->identity eq 'root/root' || $item->identity eq '0/0') { + $self->pointed_hint('bad-owner-for-doc-file', $item->pointer, + $item->identity,'!= root/root (or 0/0)'); + } + + # executable in /usr/share/doc ? + if ( $item->is_file + && $item->name !~ m{^usr/share/doc/(?:[^/]+/)?examples/} + && $item->is_executable) { + + if ($item->is_script) { + $self->pointed_hint('script-in-usr-share-doc', $item->pointer); + } else { + $self->pointed_hint('executable-in-usr-share-doc', + $item->pointer,(sprintf '%04o', $item->operm)); + } + } + + # zero byte file in /usr/share/doc/ + if ($item->is_regular_file and $item->size == 0) { + # Exceptions: examples may contain empty files for various + # reasons, Doxygen generates empty *.map files, and Python + # uses __init__.py to mark module directories. + unless ($item->name =~ m{^usr/share/doc/(?:[^/]+/)?examples/} + || $item->name + =~ m{^usr/share/doc/(?:.+/)?(?:doxygen|html)/.*[.]map$}s + || $item->name=~ m{^usr/share/doc/(?:.+/)?__init__[.]py$}s){ + + $self->pointed_hint('zero-byte-file-in-doc-directory', + $item->pointer); + } + } + + if ( $item->name =~ / [.]gz $/msx + && $item->is_regular_file + && $item->size <= $MAXIMUM_EMPTY_GZIP_SIZE + && $item->file_type =~ / gzip \s compressed /msx) { + + open(my $fd, '<:gzip', $item->unpacked_path) + or die encode_utf8('Cannot open ' . $item->unpacked_path); + + my $f = <$fd>; + close($fd); + + unless (defined $f and length $f) { + $self->pointed_hint('zero-byte-file-in-doc-directory', + $item->pointer); + } + } + } + + # file directly in /usr/share/doc ? + $self->pointed_hint('file-directly-in-usr-share-doc', $item->pointer) + if $item->is_file + && $item->name =~ m{^ usr/share/doc/ [^/]+ $}x; + + # contains an INSTALL file? + $self->pointed_hint('package-contains-upstream-installation-documentation', + $item->pointer) + if $item->name =~ m{^ usr/share/doc/ $ppkg / INSTALL (?: [.] .+ )* $}sx; + + # contains a README for another distribution/platform? + $self->pointed_hint('package-contains-readme-for-other-platform-or-distro', + $item->pointer) + if $item->name =~ m{^usr/share/doc/$ppkg/readme[.] + (?:apple|aix|atari|be|beos|bsd|bsdi + |cygwin|darwin|irix|gentoo|freebsd|mac|macos + |macosx|netbsd|openbsd|osf|redhat|sco|sgi + |solaris|suse|sun|vms|win32|win9x|windows + )(?:[.]txt)?(?:[.]gz)?$}xi; + + # contains a compressed version of objects.inv in + # sphinx-generated documentation? + $self->pointed_hint('compressed-documentation', $item->pointer) + if $item->name + =~ m{^ usr/share/doc/ $ppkg / (?: [^/]+ / )+ objects [.]inv [.]gz $}x + && $item->file_type =~ m{gzip compressed}; + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Documentation/Devhelp.pm b/lib/Lintian/Check/Documentation/Devhelp.pm new file mode 100644 index 0000000..cd186a5 --- /dev/null +++ b/lib/Lintian/Check/Documentation/Devhelp.pm @@ -0,0 +1,87 @@ +# documentation/devhelp -- lintian check script -*- perl -*- + +# Copyright (C) 1998 Christian Schwarz and Richard Braakman +# Copyright (C) 2022 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Documentation::Devhelp; + +use v5.20; +use warnings; +use utf8; + +use List::SomeUtils qw(none); + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +# *.devhelp and *.devhelp2 files must be accessible from a directory in +# the devhelp search path: /usr/share/devhelp/books and +# /usr/share/gtk-doc/html. We therefore look for any links in one of +# those directories to another directory. The presence of such a link +# blesses any file below that other directory. +has reachable_folders => ( + is => 'rw', + lazy => 1, + default => sub { + my ($self) = @_; + + my @reachable_folders; + + for my $item (@{$self->processable->installed->sorted_list}) { + + # in search path + next + unless $item->name + =~ m{^ usr/share/ (?: devhelp/books | gtk-doc/html ) / }x; + + next + unless length $item->link; + + my $followed = $item->link_normalized; + + # drop broken links + push(@reachable_folders, $followed) + if length $followed; + } + + return \@reachable_folders; + } +); + +sub visit_installed_files { + my ($self, $item) = @_; + + # locate Devhelp files not discoverable by Devhelp + $self->pointed_hint('stray-devhelp-documentation', $item->pointer) + if $item->name =~ m{ [.]devhelp2? (?: [.]gz )? $}x + && $item->name !~ m{^ usr/share/ (?: devhelp/books | gtk-doc/html ) / }x + && (none { $item->name =~ /^\Q$_\E/ } @{$self->reachable_folders}); + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Documentation/Devhelp/Standard.pm b/lib/Lintian/Check/Documentation/Devhelp/Standard.pm new file mode 100644 index 0000000..05d77db --- /dev/null +++ b/lib/Lintian/Check/Documentation/Devhelp/Standard.pm @@ -0,0 +1,47 @@ +# documentation/devhelp/standard -- lintian check script -*- perl -*- + +# Copyright (C) 2022 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Documentation::Devhelp::Standard; + +use v5.20; +use warnings; +use utf8; + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +sub visit_installed_files { + my ($self, $item) = @_; + + $self->pointed_hint('old-devhelp-standard', $item->pointer) + if $item->name =~ m{ [.]devhelp (?: [.]gz )? $}x; + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Documentation/Doxygen.pm b/lib/Lintian/Check/Documentation/Doxygen.pm new file mode 100644 index 0000000..206a4b8 --- /dev/null +++ b/lib/Lintian/Check/Documentation/Doxygen.pm @@ -0,0 +1,75 @@ +# Copyright (C) 1998 Christian Schwarz and Richard Braakman +# Copyright (C) 1999 Joey Hess +# Copyright (C) 2000 Sean 'Shaleh' Perry +# Copyright (C) 2002 Josip Rodin +# Copyright (C) 2007 Russ Allbery +# Copyright (C) 2013-2018 Bastien ROUCARIES +# Copyright (C) 2017-2020 Chris Lamb <lamby@debian.org> +# Copyright (C) 2020-2021 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Documentation::Doxygen; + +use v5.20; +use warnings; +use utf8; + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +sub visit_patched_files { + my ($self, $item) = @_; + + return + unless $item->is_file; + + $self->pointed_hint('source-contains-prebuilt-doxygen-documentation', + $item->parent_dir->pointer) + if $item->basename =~ m{^doxygen.(?:png|sty)$} + && $self->processable->source_name ne 'doxygen'; + + return + unless $item->basename =~ /\.(?:x?html?\d?|xht)$/i; + + my $contents = $item->decoded_utf8; + return + unless length $contents; + + my $lowercase = lc($contents); + + # Identify and ignore documentation templates by looking + # for the use of various interpolated variables. + # <http://www.doxygen.nl/manual/config.html#cfg_html_header> + $self->pointed_hint('source-contains-prebuilt-doxygen-documentation', + $item->pointer) + if $lowercase =~ m{<meta \s+ name="generator" \s+ content="doxygen}smx + && $lowercase + !~ /\$(?:doxygenversion|projectname|projectnumber|projectlogo)\b/; + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Documentation/Examples.pm b/lib/Lintian/Check/Documentation/Examples.pm new file mode 100644 index 0000000..4c1b84a --- /dev/null +++ b/lib/Lintian/Check/Documentation/Examples.pm @@ -0,0 +1,48 @@ +# documentation/examples -- lintian check script -*- perl -*- + +# Copyright (C) 1998 Christian Schwarz and Richard Braakman +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Documentation::Examples; + +use v5.20; +use warnings; +use utf8; + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +sub visit_installed_files { + my ($self, $item) = @_; + + $self->pointed_hint('nested-examples-directory', $item->pointer) + if $item->is_dir + && $item->name =~ m{^usr/share/doc/[^/]+/examples/examples/?$}; + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Documentation/Manual.pm b/lib/Lintian/Check/Documentation/Manual.pm new file mode 100644 index 0000000..2292733 --- /dev/null +++ b/lib/Lintian/Check/Documentation/Manual.pm @@ -0,0 +1,659 @@ +# documentation/manual -- lintian check script -*- perl -*- + +# Copyright (C) 1998 Christian Schwarz +# Copyright (C) 2019-2020 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Documentation::Manual; + +use v5.20; +use warnings; +use utf8; + +use Const::Fast; +use Cwd qw(getcwd); +use File::Basename; +use IO::Uncompress::Gunzip qw(gunzip $GunzipError); +use IPC::Run3; +use List::Compare; +use List::SomeUtils qw(any none); +use Path::Tiny; +use Text::Balanced qw(extract_delimited); +use Unicode::UTF8 qw(valid_utf8 decode_utf8 encode_utf8); + +use Lintian::Spelling qw(check_spelling); + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +const my $EMPTY => q{}; +const my $COLON => q{:}; +const my $COMMA => q{,}; +const my $DOT => q{.}; +const my $NEWLINE => qq{\n}; + +const my $USER_COMMAND_SECTION => 1; +const my $SYSTEM_COMMAND_SECTION => 8; + +const my $WAIT_STATUS_SHIFT => 8; +const my $MINIMUM_SHARED_OBJECT_SIZE => 256; +const my $WIDE_SCREEN => 120; + +has local_manpages => (is => 'rw', default => sub { {} }); + +sub spelling_tag_emitter { + my ($self, $tag_name, $pointer, @orig_args) = @_; + + return sub { + return $self->pointed_hint($tag_name, $pointer, @orig_args, @_); + }; +} + +my @user_locations= qw(bin/ usr/bin/ usr/bin/X11/ usr/bin/mh/ usr/games/); +my @admin_locations= qw(sbin/ usr/sbin/); + +sub visit_installed_files { + my ($self, $item) = @_; + + # no man pages in udebs + return + if $self->processable->type eq 'udeb'; + + if ($item->name =~ m{^usr/share/man/\S+}) { + + $self->pointed_hint('manual-page-in-udeb', $item->pointer) + if $self->processable->type eq 'udeb'; + + if ($item->is_dir) { + $self->pointed_hint('stray-folder-in-manual', $item->pointer) + unless $item->name + =~ m{^usr/(?:X11R6|share)/man/(?:[^/]+/)?(?:man\d/)?$}; + + } elsif ($item->is_file && $item->is_executable) { + $self->pointed_hint('executable-manual-page', $item->pointer); + } + } + + return + unless $item->is_file || $item->is_symlink; + + my ($manpage, $page_path, undef) = fileparse($item); + + if ($page_path eq 'usr/share/man/' && $manpage ne $EMPTY) { + $self->pointed_hint('odd-place-for-manual-page', $item->pointer); + return; + } + + # manual page? + my ($subdir) = ($page_path =~ m{^usr/share/man(/\S+)}); + return + unless defined $subdir; + + $self->pointed_hint('build-path-in-manual', $item->pointer) + if $item =~ m{/_build_} || $item =~ m{_tmp_buildd}; + + $self->pointed_hint('manual-page-with-generic-name', $item->pointer) + if $item =~ m{/README\.}; + + my ($section) = ($subdir =~ m{^.*man(\d)/$}); + unless (defined $section) { + $self->pointed_hint('odd-place-for-manual-page', $item->pointer); + return; + } + + my ($language) = ($subdir =~ m{^/([^/]+)/man\d/$}); + $language //= $EMPTY; + + # The country should not be part of the man page locale + # directory unless it's one of the known cases where the + # language is significantly different between countries. + $self->pointed_hint('country-in-manual', $item->pointer) + if $language =~ /_/ && $language !~ /^(?:pt_BR|zh_[A-Z][A-Z])$/; + + my @pieces = split(/\./, $manpage); + my $ext = pop @pieces; + + if ($ext ne 'gz') { + + push @pieces, $ext; + $self->pointed_hint('uncompressed-manual-page', $item->pointer); + + } elsif ($item->is_file) { # so it's .gz... files first; links later + + if ($item->file_type !~ m/gzip compressed data/) { + $self->pointed_hint('wrong-compression-in-manual-page', + $item->pointer); + + } elsif ($item->file_type !~ m/max compression/) { + $self->pointed_hint('poor-compression-in-manual-page', + $item->pointer); + } + } + + my $fn_section = pop @pieces; + my $section_num = $fn_section; + + if (scalar @pieces && $section_num =~ s/^(\d).*$/$1/) { + + my $bin = join($DOT, @pieces); + $self->local_manpages->{$bin} = [] + unless $self->local_manpages->{$bin}; + + push @{$self->local_manpages->{$bin}}, + { file => $item, language => $language, section => $section }; + + # number of directory and manpage extension equal? + if ($section_num != $section) { + $self->pointed_hint('odd-place-for-manual-page', $item->pointer); + } + + } else { + $self->pointed_hint('wrong-name-for-manual-page', $item->pointer); + } + + # check symbolic links to other manual pages + if ($item->is_symlink) { + if ($item->link =~ m{(^|/)undocumented}) { + # undocumented link in /usr/share/man -- possibilities + # undocumented... (if in the appropriate section) + # ../man?/undocumented... + # ../../man/man?/undocumented... + # ../../../share/man/man?/undocumented... + # ../../../../usr/share/man/man?/undocumented... + if ( + ( + $item->link =~ m{^undocumented\.([237])\.gz} + && $page_path =~ m{^usr/share/man/man$1} + ) + || $item->link =~ m{^\.\./man[237]/undocumented\.[237]\.gz$} + || $item->link + =~ m{^\.\./\.\./man/man[237]/undocumented\.[237]\.gz$} + || $item->link + =~ m{^\.\./\.\./\.\./share/man/man[237]/undocumented\.[237]\.gz$} + || $item->link + =~ m{^\.\./\.\./\.\./\.\./usr/share/man/man[237]/undocumented\.[237]\.gz$} + ) { + $self->pointed_hint('undocumented-manual-page',$item->pointer); + } else { + $self->pointed_hint('broken-link-to-undocumented', + $item->pointer); + } + } + } else { # not a symlink + + my $fd; + if ($item->file_type =~ m/gzip compressed/) { + + open($fd, '<:gzip', $item->unpacked_path) + or die encode_utf8('Cannot open ' . $item->unpacked_path); + + } else { + + open($fd, '<', $item->unpacked_path) + or die encode_utf8('Cannot open ' . $item->unpacked_path); + } + + my @manfile = <$fd>; + close $fd; + + # Is it a .so link? + if ($item->size < $MINIMUM_SHARED_OBJECT_SIZE) { + + my ($i, $first) = (0, $EMPTY); + do { + $first = $manfile[$i++] || $EMPTY; + } while ($first =~ /^\.\\"/ && $manfile[$i]); #"); + + unless ($first) { + $self->pointed_hint('empty-manual-page', $item->pointer); + return; + + } elsif ($first =~ /^\.so\s+(.+)?$/) { + my $dest = $1; + if ($dest =~ m{^([^/]+)/(.+)$}) { + + my ($manxorlang, $remainder) = ($1, $2); + + if ($manxorlang !~ /^man\d+$/) { + # then it's likely a language subdir, so let's run + # the other component through the same check + if ($remainder =~ m{^([^/]+)/(.+)$}) { + + my $rest = $2; + $self->pointed_hint( + 'bad-so-link-within-manual-page', + $item->pointer) + unless $rest =~ m{^[^/]+\.\d(?:\S+)?(?:\.gz)?$}; + + } else { + $self->pointed_hint( + 'bad-so-link-within-manual-page', + $item->pointer); + } + } + + } else { + $self->pointed_hint('bad-so-link-within-manual-page', + $item->pointer); + } + return; + } + } + + # If it's not a .so link, use lexgrog to find out if the + # man page parses correctly and make sure the short + # description is reasonable. + # + # This check is currently not applied to pages in + # language-specific hierarchies, because those pages are + # not currently scanned by mandb (bug #29448), and because + # lexgrog can't handle pages in all languages at the + # moment, leading to huge numbers of false negatives. When + # man-db is fixed, this limitation should be removed. + if ($page_path =~ m{/man/man\d/}) { + + delete local $ENV{$_} + for grep { $_ ne 'PATH' && $_ ne 'TMPDIR' } keys %ENV; + local $ENV{LC_ALL} = 'C.UTF-8'; + + my @command = ('lexgrog', $item->unpacked_path); + + my $stdout; + my $stderr; + + run3(\@command, \undef, \$stdout, \$stderr); + + my $exitcode = $?; + my $status = ($exitcode >> $WAIT_STATUS_SHIFT); + + $self->pointed_hint('bad-whatis-entry', $item->pointer) + if $status == 2; + + if ($status != 0 && $status != 2) { + my $message = "Non-zero status $status from @command"; + $message .= $COLON . $NEWLINE . $stderr + if length $stderr; + + warn encode_utf8($message); + + } else { + my $desc = $stdout; + $desc =~ s/^[^:]+: \"(.*)\"$/$1/; + + if ($desc =~ /(\S+)\s+-\s+manual page for \1/i) { + $self->pointed_hint('useless-whatis-entry',$item->pointer); + + } elsif ($desc =~ /\S+\s+-\s+programs? to do something/i) { + $self->pointed_hint('manual-page-from-template', + $item->pointer); + } + } + } + + # If it's not a .so link, run it through 'man' to check for errors. + # If it is in a directory with the standard man layout, cd to the + # parent directory before running man so that .so directives are + # processed properly. (Yes, there are man pages that include other + # pages with .so but aren't simple links; rbash, for instance.) + { + delete local $ENV{$_} + for grep { $_ ne 'PATH' && $_ ne 'TMPDIR' } keys %ENV; + local $ENV{LC_ALL} = 'C.UTF-8'; + + local $ENV{MANROFFSEQ} = $EMPTY; + + # set back to 80 when Bug#892423 is fixed in groff + local $ENV{MANWIDTH} = $WIDE_SCREEN; + + my $stdout; + my $stderr; + + my @command = qw(man --warnings -E UTF-8 -l -Tutf8 -Z); + push(@command, $item->unpacked_path); + + my $localdir = path($item->unpacked_path)->parent->stringify; + $localdir =~ s{^(.*)/man\d\b}{$1}s; + + my $savedir = getcwd; + chdir($localdir) + or die encode_utf8('Cannot change directory ' . $localdir); + + run3(\@command, \undef, \$stdout, \$stderr); + + my $exitcode = $?; + my $status = ($exitcode >> $WAIT_STATUS_SHIFT); + + my @lines = split(/\n/, $stderr); + + my $position = 1; + for my $line (@lines) { + + chomp $line; + + # Devel::Cover causes some annoying deep recursion + # warnings and sometimes in our child process. + # Filter them out, but only during coverage. + next + if $ENV{LINTIAN_COVERAGE} + && $line =~ m{ + \A Deep [ ] recursion [ ] on [ ] subroutine [ ] + "[^"]+" [ ] at [ ] .*B/Deparse.pm [ ] line [ ] + \d+}xsm; + + # ignore progress information from man + next + if $line =~ /^Reformatting/; + + next + if $line =~ /^\s*$/; + + # ignore errors from gzip; dealt with elsewhere + next + if $line =~ /^\bgzip\b/; + + # ignore wrapping failures for Asian man pages (groff problem) + if ($language =~ /^(?:ja|ko|zh)/) { + next + if $line =~ /warning \[.*\]: cannot adjust line/; + next + if $line =~ /warning \[.*\]: can\'t break line/; + } + + # ignore wrapping failures if they contain URLs (.UE is an + # extension for marking the end of a URL). + next + if $line + =~ /:(\d+): warning \[.*\]: (?:can\'t break|cannot adjust) line/ + && ( $manfile[$1 - 1] =~ m{(?:https?|ftp|file)://.+}i + || $manfile[$1 - 1] =~ m{^\s*\.\s*UE\b}); + + # ignore common undefined macros from pod2man << Perl 5.10 + next + if $line =~ /warning: (?:macro )?\'(?:Tr|IX)\' not defined/; + + $line =~ s/^[^:]+: //; + $line =~ s/^<standard input>://; + + $self->pointed_hint('groff-message', + $item->pointer($position), $line); + } continue { + ++$position; + } + + chdir($savedir) + or die encode_utf8('Cannot change directory ' . $savedir); + + } + + # Now we search through the whole man page for some common errors + my $position = 1; + my $seen_python_traceback; + for my $line (@manfile) { + + chomp $line; + + next + if $line =~ /^\.\\\"/; # comments .\" + + if ($line =~ /^\.TH\s/) { + + # title header + my $consumed = $line; + $consumed =~ s/ [.]TH \s+ //msx; + + my ($delimited, $after_names) = extract_delimited($consumed); + unless (length $delimited) { + $consumed =~ s/ ^ \s* \S+ , //gmsx; + $consumed =~ s/ ^ \s* \S+ //msx; + $after_names = $consumed; + } + + my ($th_section) = extract_delimited($after_names); + if (length $th_section) { + + # drop initial delimiter + $th_section =~ s/ ^. //msx; + + # drop final delimiter + $th_section =~ s/ .$ //msx; + + # unescape + $th_section =~ s/ [\\](.) /$1/gmsx; + + } elsif (length $after_names + && $after_names =~ / ^ \s* (\S+) /msx) { + $th_section = $1; + } + + $self->pointed_hint( + 'wrong-manual-section', + $item->pointer($position), + "$fn_section != $th_section" + )if length $th_section && fc($th_section) ne fc($fn_section); + } + + if ( ($line =~ m{(/usr/(dict|doc|etc|info|man|adm|preserve)/)}) + || ($line =~ m{(/var/(adm|catman|named|nis|preserve)/)})){ + # FSSTND dirs in man pages + # regexes taken from checks/files + $self->pointed_hint('FSSTND-dir-in-manual-page', + $item->pointer($position), $1); + } + + if ($line eq '.SH "POD ERRORS"') { + $self->pointed_hint('pod-conversion-message', + $item->pointer($position)); + } + + if ($line =~ /Traceback \(most recent call last\):/) { + $self->pointed_hint('python-traceback-in-manpage', + $item->pointer) + unless $seen_python_traceback; + $seen_python_traceback = 1; + } + + # Check for spelling errors if the manpage is English + my $stag_emitter + = $self->spelling_tag_emitter('typo-in-manual-page', + $item->pointer($position)); + check_spelling($self->data, $line, + $self->group->spelling_exceptions, + $stag_emitter, 0) + if $page_path =~ m{/man/man\d/}; + + } continue { + ++$position; + } + } + + # most man pages are zipped + my $bytes; + if ($item->file_type =~ /gzip compressed/) { + + my $path = $item->unpacked_path; + gunzip($path => \$bytes) + or die encode_utf8("gunzip $path failed: $GunzipError"); + + } elsif ($item->file_type =~ /^troff/ || $item->file_type =~ /text$/) { + $bytes = $item->bytes; + } + + return + unless length $bytes; + + # another check complains about invalid encoding + return + unless valid_utf8($bytes); + + my $contents = decode_utf8($bytes); + my @lines = split(/\n/, $contents); + + my $position = 1; + for my $line (@lines) { + + # see Bug#554897 and Bug#507673; exclude string variables + $self->pointed_hint('acute-accent-in-manual-page', + $item->pointer($position)) + if $line =~ /\\'/ && $line !~ /^\.\s*ds\s/; + + } continue { + $position++; + } + + return; +} + +sub installable { + my ($self) = @_; + + # no man pages in udebs + return + if $self->processable->type eq 'udeb'; + + my %local_user_executables; + my %local_admin_executables; + + for my $item (@{$self->processable->installed->sorted_list}) { + + next + unless $item->is_symlink || $item->is_file; + + my ($name, $path, undef) = fileparse($item->name); + + $local_user_executables{$name} = $item + if any { $path eq $_ } @user_locations; + + $local_admin_executables{$name} = $item + if any { $path eq $_ } @admin_locations; + } + + my %local_executables= (%local_user_executables, %local_admin_executables); + my @local_commands = keys %local_executables; + + my @direct_reliants + =@{$self->group->direct_reliants($self->processable) // []}; + my @reliant_files = map { @{$_->installed->sorted_list} } @direct_reliants; + + # for executables, look at packages relying on the current processable + my %distant_executables; + for my $item (@reliant_files) { + + next + unless $item->is_file || $item->is_symlink; + + my ($name, $path, undef) = fileparse($item, qr{\..+$}); + + $distant_executables{$name} = $item + if any { $path eq $_ } (@user_locations, @admin_locations); + } + + my @distant_commands = keys %distant_executables; + my @related_commands = (@local_commands, @distant_commands); + + my @direct_prerequisites + =@{$self->group->direct_dependencies($self->processable) // []}; + my@prerequisite_files + = map { @{$_->installed->sorted_list} } @direct_prerequisites; + + # for manpages, look at packages the current processable relies upon + my %distant_manpages; + for my $item (@prerequisite_files) { + + next + unless $item->is_file || $item->is_symlink; + + my ($name, $path, undef) = fileparse($item, qr{\..+$}); + + next + unless $path =~ m{^usr/share/man/\S+}; + + next + unless $path =~ m{man\d/$}; + + my ($language) = ($path =~ m{/([^/]+)/man\d/$}); + $language //= $EMPTY; + $language = $EMPTY if $language eq 'man'; + + $distant_manpages{$name} //= []; + + push @{$distant_manpages{$name}}, + {file => $item, language => $language}; + } + + my %local_manpages = %{$self->local_manpages}; + my %related_manpages = (%local_manpages, %distant_manpages); + + # provides sorted output + my $related + = List::Compare->new(\@local_commands, [keys %related_manpages]); + my @documented = $related->get_intersection; + my @manpage_missing = $related->get_Lonly; + + my @english_missing = grep { + none {$_->{language} eq $EMPTY} + @{$related_manpages{$_} // []} + } @documented; + + for my $command (keys %local_admin_executables) { + + my $item = $local_admin_executables{$command}; + my @manpages = @{$related_manpages{$command} // []}; + + my @sections = grep { defined } map { $_->{section} } @manpages; + $self->pointed_hint('manual-page-for-system-command', $item->pointer) + if $item->is_regular_file + && any { $_ == $USER_COMMAND_SECTION } @sections; + } + + $self->pointed_hint('no-english-manual-page', $_->pointer) + for map {$local_executables{$_}} @english_missing; + + $self->pointed_hint('no-manual-page', $_->pointer) + for map {$local_executables{$_}} @manpage_missing; + + # surplus manpages only for this package; provides sorted output + my $local = List::Compare->new(\@related_commands, [keys %local_manpages]); + my @surplus_manpages = $local->get_Ronly; + + # filter out sub commands, underscore for libreswan; see Bug#947258 + for my $command (@related_commands) { + @surplus_manpages = grep { !/^$command(?:\b|_)/ } @surplus_manpages; + } + + for my $manpage (map { @{$local_manpages{$_} // []} } @surplus_manpages) { + + my $item = $manpage->{file}; + my $section = $manpage->{section}; + + $self->pointed_hint('spare-manual-page', $item->pointer) + if $section == $USER_COMMAND_SECTION + || $section == $SYSTEM_COMMAND_SECTION; + } + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Documentation/Texinfo.pm b/lib/Lintian/Check/Documentation/Texinfo.pm new file mode 100644 index 0000000..cc4be39 --- /dev/null +++ b/lib/Lintian/Check/Documentation/Texinfo.pm @@ -0,0 +1,195 @@ +# documentation/texinfo -- lintian check script -*- perl -*- + +# Copyright (C) 1998 Christian Schwarz +# Copyright (C) 2001 Josip Rodin +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Documentation::Texinfo; + +use v5.20; +use warnings; +use utf8; + +use Const::Fast; +use Unicode::UTF8 qw(encode_utf8); +use List::SomeUtils qw(uniq); + +use Lintian::Util qw(normalize_link_target); + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +const my $EMPTY => q{}; + +sub binary { + my ($self) = @_; + + my $info_dir + = $self->processable->installed->resolve_path('usr/share/info/'); + return + unless $info_dir; + + # Read package contents... + for my $item ($info_dir->descendants) { + + next + unless $item->is_symlink + || $item->is_file; + + # Ignore dir files. That's a different error which we already catch in + # the files check. + next + if $item->basename =~ /^dir(?:\.old)?(?:\.gz)?/; + + # Analyze the file names making sure the documents are named + # properly. Note that Emacs 22 added support for images in + # info files, so we have to accept those and ignore them. + # Just ignore .png files for now. + my @fname_pieces = split(m{ [.] }x, $item->basename); + my $extension = pop @fname_pieces; + + if ($extension eq 'gz') { # ok! + if ($item->is_file) { + + # compressed with maximum compression rate? + if ($item->file_type !~ m/gzip compressed data/) { + $self->pointed_hint( + 'info-document-not-compressed-with-gzip', + $item->pointer); + + } else { + if ($item->file_type !~ m/max compression/) { + $self->pointed_hint( +'info-document-not-compressed-with-max-compression', + $item->pointer + ); + } + } + } + + } elsif ($extension =~ m/^(?:png|jpe?g)$/) { + next; + + } else { + push(@fname_pieces, $extension); + $self->pointed_hint('info-document-not-compressed',$item->pointer); + } + + my $infoext = pop @fname_pieces; + unless ($infoext && $infoext =~ /^info(-\d+)?$/) { # it's not foo.info + + # it's not foo{,-{1,2,3,...}} + $self->pointed_hint('info-document-has-wrong-extension', + $item->pointer) + if @fname_pieces; + } + + # If this is the main info file (no numeric extension). make + # sure it has appropriate dir entry information. + if ( $item->basename !~ /-\d+\.gz/ + && $item->file_type =~ /gzip compressed data/) { + + # unsafe symlink, skip. Actually, this should never + # be true as "$file_type" for symlinks will not be + # "gzip compressed data". But for good measure. + next + unless $item->is_open_ok; + + open(my $fd, '<:gzip', $item->unpacked_path) + or die encode_utf8('Cannot open ' . $item->unpacked_path); + + my ($section, $start, $end); + while (my $line = <$fd>) { + + $section = 1 + if $line =~ /^INFO-DIR-SECTION\s+\S/; + + $start = 1 + if $line =~ /^START-INFO-DIR-ENTRY\b/; + + $end = 1 + if $line =~ /^END-INFO-DIR-ENTRY\b/; + } + + close $fd; + + $self->pointed_hint('info-document-missing-dir-section', + $item->pointer) + unless $section; + + $self->pointed_hint('info-document-missing-dir-entry', + $item->pointer) + unless $start && $end; + } + + # Check each [image src=""] form in the info files. The src + # filename should be in the package. As of Texinfo 5 it will + # be something.png or something.jpg, but that's not enforced. + # + # See Texinfo manual (info "(texinfo)Info Format Image") for + # details of the [image] form. Bytes \x00,\x08 introduce it + # (and distinguishes it from [image] appearing as plain text). + # + # String src="..." part has \" for literal " and \\ for + # literal \, though that would be unlikely in filenames. For + # the tag() message show $src unbackslashed since that's the + # filename sought. + # + if ($item->is_file && $item->basename =~ /\.info(?:-\d+)?\.gz$/) { + + open(my $fd, '<:gzip', $item->unpacked_path) + or die encode_utf8('Cannot open ' . $item->unpacked_path); + + my $position = 1; + while (my $line = <$fd>) { + + my @missing; + while ($line =~ /[\0][\b]\[image src="((?:\\.|[^\"])+)"/smg) { + + my $src = $1; + $src =~ s/\\(.)/$1/g; # unbackslash + + push(@missing, $src) + unless $self->processable->installed->lookup( + normalize_link_target('usr/share/info', $src)); + } + + $self->pointed_hint('info-document-missing-image-file', + $item->pointer($position), $_) + for uniq @missing; + + } continue { + ++$position; + } + + close $fd; + } + } + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Emacs.pm b/lib/Lintian/Check/Emacs.pm new file mode 100644 index 0000000..6c6f94e --- /dev/null +++ b/lib/Lintian/Check/Emacs.pm @@ -0,0 +1,58 @@ +# emacs -- lintian check script -*- perl -*- + +# Copyright (C) 1998 Christian Schwarz and Richard Braakman +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Emacs; + +use v5.20; +use warnings; +use utf8; + +use Const::Fast; + +const my $WIDELY_READABLE => oct(644); + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +sub visit_installed_files { + my ($self, $item) = @_; + + # /etc/emacs.* + if ( $item->is_file + && $item->name =~ m{^etc/emacs.*/\S} + && $item->operm != $WIDELY_READABLE) { + + $self->pointed_hint('bad-permissions-for-etc-emacs-script', + $item->pointer, + sprintf('%04o != %04o', $item->operm, $WIDELY_READABLE)); + } + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Emacs/Elpa.pm b/lib/Lintian/Check/Emacs/Elpa.pm new file mode 100644 index 0000000..9b3528a --- /dev/null +++ b/lib/Lintian/Check/Emacs/Elpa.pm @@ -0,0 +1,51 @@ +# emacs/elpa -- lintian check script -*- perl -*- + +# Copyright (C) 2017 Sean Whitton +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Emacs::Elpa; + +use v5.20; +use warnings; +use utf8; + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +sub installable { + my ($self) = @_; + + $self->hint('emacsen-common-without-dh-elpa') + if defined $self->processable->installed->lookup( + 'usr/lib/emacsen-common/packages/install/') + && ! + defined $self->processable->installed->lookup( + 'usr/share/emacs/site-lisp/elpa-src/'); + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Examples.pm b/lib/Lintian/Check/Examples.pm new file mode 100644 index 0000000..ef9a452 --- /dev/null +++ b/lib/Lintian/Check/Examples.pm @@ -0,0 +1,82 @@ +# Check::Examples -- lintian check script -*- perl -*- +# +# based on debhelper check, +# Copyright (C) 1999 Joey Hess +# Copyright (C) 2000 Sean 'Shaleh' Perry +# Copyright (C) 2002 Josip Rodin +# Copyright (C) 2007 Russ Allbery +# Copyright (C) 2013-2018 Bastien ROUCARIES +# Copyright (C) 2017-2020 Chris Lamb <lamby@debian.org> +# Copyright (C) 2020-2021 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Examples; + +use v5.20; +use warnings; +use utf8; + +use List::SomeUtils qw(any); + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +has group_ships_examples => ( + is => 'rw', + lazy => 1, + default => sub { + my ($self) = @_; + + my @processables = $self->group->get_installables; + + # assume shipped examples if there is a package so named + return 1 + if any { $_->name =~ m{-examples$} } @processables; + + my @shipped = map { @{$_->installed->sorted_list} } @processables; + + # Check each package for a directory (or symlink) called "examples". + return 1 + if any { m{^usr/share/doc/(.+/)?examples/?$} } @shipped; + + return 0; + } +); + +sub visit_patched_files { + my ($self, $item) = @_; + + # some installation files must be present; see Bug#972614 + $self->pointed_hint('package-does-not-install-examples', $item->pointer) + if $item->basename eq 'examples' + && $item->dirname !~ m{(?:^|/)(?:vendor|third_party)/} + && $self->group->get_installables + && !$self->group_ships_examples; + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Executable.pm b/lib/Lintian/Check/Executable.pm new file mode 100644 index 0000000..37fcb67 --- /dev/null +++ b/lib/Lintian/Check/Executable.pm @@ -0,0 +1,59 @@ +# executable -- lintian check script -*- perl -*- +# +# Copyright (C) 1998 Richard Braakman +# Copyright (C) 2002 Josip Rodin +# Copyright (C) 2016-2019 Chris Lamb <lamby@debian.org> +# Copyright (C) 2021 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Executable; + +use v5.20; +use warnings; +use utf8; + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +sub visit_installed_files { + my ($self, $item) = @_; + + return + unless $item->is_file; + + $self->pointed_hint('executable-not-elf-or-script', $item->pointer) + if $item->is_executable + && $item->file_type !~ / ^ [^,]* \b ELF \b /msx + && !$item->is_script + && !$item->is_hardlink + && $item->name !~ m{^ usr(?:/X11R6)?/man/ }x + && $item->name !~ m/ [.]exe $/x # mono convention + && $item->name !~ m/ [.]jar $/x; # Debian Java policy 2.2 + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Fields/Architecture.pm b/lib/Lintian/Check/Fields/Architecture.pm new file mode 100644 index 0000000..caa5814 --- /dev/null +++ b/lib/Lintian/Check/Fields/Architecture.pm @@ -0,0 +1,132 @@ +# fields/architecture -- lintian check script (rewrite) -*- perl -*- +# +# Copyright (C) 2004 Marc Brockschmidt +# +# Parts of the code were taken from the old check script, which +# was Copyright (C) 1998 Richard Braakman (also licensed under the +# GPL 2 or higher) +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Fields::Architecture; + +use v5.20; +use warnings; +use utf8; + +use Const::Fast; +use List::Compare; +use List::SomeUtils qw(any); + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +const my $EMPTY => q{}; + +has installable_architecture => (is => 'rw', default => $EMPTY); + +sub installable { + my ($self) = @_; + + my @installable_architectures + = $self->processable->fields->trimmed_list('Architecture'); + return + unless @installable_architectures; + + for my $installable_architecture (@installable_architectures) { + $self->hint('arch-wildcard-in-binary-package', + $installable_architecture) + if $self->data->architectures->is_wildcard( + $installable_architecture); + } + + $self->hint('too-many-architectures', (sort @installable_architectures)) + if @installable_architectures > 1; + + my $installable_architecture = $installable_architectures[0]; + + $self->hint('aspell-package-not-arch-all') + if $self->processable->name =~ /^aspell-[a-z]{2}(?:-.*)?$/ + && $installable_architecture ne 'all'; + + $self->hint('documentation-package-not-architecture-independent') + if $self->processable->name =~ /-docs?$/ + && $installable_architecture ne 'all'; + + return; +} + +sub always { + my ($self) = @_; + + my @installable_architectures + = $self->processable->fields->trimmed_list('Architecture'); + for my $installable_architecture (@installable_architectures) { + + $self->hint('unknown-architecture', $installable_architecture) + unless $self->data->architectures->is_release_architecture( + $installable_architecture) + || $self->data->architectures->is_wildcard($installable_architecture) + || $installable_architecture eq 'all' + || ( + $installable_architecture eq 'source' + && ( $self->processable->type eq 'changes' + || $self->processable->type eq 'buildinfo') + ); + } + + # check for magic installable architecture combinations + if (@installable_architectures > 1) { + + my $magic_error = 0; + + if (any { $_ eq 'all' } @installable_architectures) { + $magic_error++ + unless any { $self->processable->type eq $_ } + qw(source changes buildinfo); + } + + my $anylc = List::Compare->new(\@installable_architectures, ['any']); + if ($anylc->get_intersection) { + + my @errorset = $anylc->get_Lonly; + + # Allow 'all' to be present in source packages as well + # (#626775) + @errorset = grep { $_ ne 'all' } @errorset + if any { $self->processable->type eq $_ } + qw(source changes buildinfo); + + $magic_error++ + if @errorset; + } + + $self->hint('magic-arch-in-arch-list') if $magic_error; + } + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Fields/Bugs.pm b/lib/Lintian/Check/Fields/Bugs.pm new file mode 100644 index 0000000..6485650 --- /dev/null +++ b/lib/Lintian/Check/Fields/Bugs.pm @@ -0,0 +1,62 @@ +# fields/bugs -- lintian check script (rewrite) -*- perl -*- +# +# Copyright (C) 2004 Marc Brockschmidt +# +# Parts of the code were taken from the old check script, which +# was Copyright (C) 1998 Richard Braakman (also licensed under the +# GPL 2 or higher) +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Fields::Bugs; + +use v5.20; +use warnings; +use utf8; + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +sub always { + my ($self) = @_; + + my $fields = $self->processable->fields; + + return + unless $fields->declares('Bugs'); + + my $bugs = $fields->unfolded_value('Bugs'); + + $self->hint('redundant-bugs-field') + if $bugs =~ m{^debbugs://bugs.debian.org/?$}i; + + $self->hint('bugs-field-does-not-refer-to-debian-infrastructure', $bugs) + unless $bugs =~ m{\.debian\.org} + || $self->processable->name =~ /[-]dbgsym$/; + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Fields/BuiltUsing.pm b/lib/Lintian/Check/Fields/BuiltUsing.pm new file mode 100644 index 0000000..5da9475 --- /dev/null +++ b/lib/Lintian/Check/Fields/BuiltUsing.pm @@ -0,0 +1,72 @@ +# fields/built-using -- lintian check script (rewrite) -*- perl -*- +# +# Copyright (C) 2004 Marc Brockschmidt +# +# Parts of the code were taken from the old check script, which +# was Copyright (C) 1998 Richard Braakman (also licensed under the +# GPL 2 or higher) +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Fields::BuiltUsing; + +use v5.20; +use warnings; +use utf8; + +use Lintian::Relation; +use Lintian::Util qw($PKGNAME_REGEX $PKGVERSION_REGEX); + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +sub always { + my ($self) = @_; + + my $processable = $self->processable; + + return + unless $processable->fields->declares('Built-Using'); + + my $built_using = $processable->fields->value('Built-Using'); + + my $built_using_rel = Lintian::Relation->new->load($built_using); + $built_using_rel->visit( + sub { + my ($package) = @_; + if ($package !~ /^$PKGNAME_REGEX \(= $PKGVERSION_REGEX\)$/) { + $self->hint('invalid-value-in-built-using-field', $package); + return 1; + } + return 0; + }, + Lintian::Relation::VISIT_OR_CLAUSE_FULL + | Lintian::Relation::VISIT_STOP_FIRST_MATCH + ); + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Fields/ChangedBy.pm b/lib/Lintian/Check/Fields/ChangedBy.pm new file mode 100644 index 0000000..4f58b1b --- /dev/null +++ b/lib/Lintian/Check/Fields/ChangedBy.pm @@ -0,0 +1,66 @@ +# changed-by -- lintian check script -*- perl -*- + +# Copyright (C) 1998 Christian Schwarz and Richard Braakman +# Copyright (C) 2017-2019 Chris Lamb <lamby@debian.org> +# Copyright (C) 2020 Felix Lechner +# +# This program is free software. It is distributed under the terms of +# the GNU General Public License as published by the Free Software +# Foundation; either version 2 of the License, or (at your option) any +# later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Fields::ChangedBy; + +use v5.20; +use warnings; +use utf8; + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +sub changes { + my ($self) = @_; + + # Changed-By is optional in Policy, but if set, must be + # syntactically correct. It's also used by dak. + return + unless $self->processable->fields->declares('Changed-By'); + + my $changed_by = $self->processable->fields->value('Changed-By'); + + my $DERIVATIVE_CHANGED_BY + = $self->data->load('common/derivative-changed-by',qr/\s*~~\s*/); + + for my $regex ($DERIVATIVE_CHANGED_BY->all) { + + next + if $changed_by =~ /$regex/; + + my $explanation = $DERIVATIVE_CHANGED_BY->value($regex); + $self->hint('changed-by-invalid-for-derivative', + $changed_by, "($explanation)"); + } + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Fields/Checksums.pm b/lib/Lintian/Check/Fields/Checksums.pm new file mode 100644 index 0000000..2ea745e --- /dev/null +++ b/lib/Lintian/Check/Fields/Checksums.pm @@ -0,0 +1,53 @@ +# fields/checksums -- lintian check script (rewrite) -*- perl -*- +# +# Copyright (C) 2004 Marc Brockschmidt +# +# Parts of the code were taken from the old check script, which +# was Copyright (C) 1998 Richard Braakman (also licensed under the +# GPL 2 or higher) +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Fields::Checksums; + +use v5.20; +use warnings; +use utf8; + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +sub source { + my ($self) = @_; + + my $processable = $self->processable; + + $self->hint('no-strong-digests-in-dsc') + unless $processable->fields->declares('Checksums-Sha256'); + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Fields/Deb822.pm b/lib/Lintian/Check/Fields/Deb822.pm new file mode 100644 index 0000000..d68fa6c --- /dev/null +++ b/lib/Lintian/Check/Fields/Deb822.pm @@ -0,0 +1,89 @@ +# fields/deb822 -- lintian check script -*- perl -*- +# +# Copyright (C) 2020 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Fields::Deb822; + +use v5.20; +use warnings; +use utf8; + +use Const::Fast; +use Syntax::Keyword::Try; + +use Lintian::Deb822; + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +const my $SECTION => qq{\N{SECTION SIGN}}; + +my @SOURCE_DEB822 = qw(debian/control); + +sub source { + my ($self) = @_; + + for my $location (@SOURCE_DEB822) { + + my $item = $self->processable->patched->resolve_path($location); + return + unless defined $item; + + my $deb822 = Lintian::Deb822->new; + + my @sections; + try { + @sections = $deb822->read_file($item->unpacked_path) + + } catch { + next; + } + + my $count = 1; + for my $section (@sections) { + + for my $field_name ($section->names) { + + my $field_value = $section->value($field_name); + + my $position = $section->position($field_name); + my $pointer = $item->pointer($position); + + $self->pointed_hint('trimmed-deb822-field', $pointer, + $SECTION . $count, + $field_name, $field_value); + } + + } continue { + $count++; + } + } + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Fields/Derivatives.pm b/lib/Lintian/Check/Fields/Derivatives.pm new file mode 100644 index 0000000..4f42765 --- /dev/null +++ b/lib/Lintian/Check/Fields/Derivatives.pm @@ -0,0 +1,88 @@ +# fields/derivatives -- lintian check script (rewrite) -*- perl -*- +# +# Copyright (C) 2004 Marc Brockschmidt +# +# Parts of the code were taken from the old check script, which +# was Copyright (C) 1998 Richard Braakman (also licensed under the +# GPL 2 or higher) +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Fields::Derivatives; + +use v5.20; +use warnings; +use utf8; + +use Const::Fast; + +const my $HYPHEN => q{-}; + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +has DERIVATIVE_FIELDS => ( + is => 'rw', + lazy => 1, + default => sub { + my ($self) = @_; + + my %fields; + + my $data= $self->data->load('fields/derivative-fields',qr/\s*\~\~\s*/); + + for my $key ($data->all) { + + my $value = $data->value($key); + my ($regexp, $explanation) = split(/\s*\~\~\s*/, $value, 2); + $fields{$key} = { + 'regexp' => qr/$regexp/, + 'explanation' => $explanation, + }; + } + + return \%fields; + } +); + +sub source { + my ($self) = @_; + + my $processable = $self->processable; + + for my $field (keys %{$self->DERIVATIVE_FIELDS}) { + + my $val = $processable->fields->value($field) || $HYPHEN; + my $data = $self->DERIVATIVE_FIELDS->{$field}; + + $self->hint('invalid-field-for-derivative', + "$field: $val ($data->{'explanation'})") + if $val !~ m/$data->{'regexp'}/; + } + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Fields/Description.pm b/lib/Lintian/Check/Fields/Description.pm new file mode 100644 index 0000000..9bfd5bc --- /dev/null +++ b/lib/Lintian/Check/Fields/Description.pm @@ -0,0 +1,323 @@ +# fields/description -- lintian check script -*- perl -*- + +# Copyright (C) 1998 Christian Schwarz +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Fields::Description; + +use v5.20; +use warnings; +use utf8; + +use Const::Fast; + +use Lintian::Spelling qw(check_spelling check_spelling_picky); + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +# Compared to a lower-case string, so it must be all lower-case +const my $DH_MAKE_PERL_TEMPLATE => +'this description was automagically extracted from the module by dh-make-perl'; + +const my $EMPTY => q{}; +const my $SLASH => q{/}; +const my $DOUBLE_COLON => q{::}; + +const my $MAXIMUM_WIDTH => 80; + +sub spelling_tag_emitter { + my ($self, @orig_args) = @_; + return sub { + return $self->hint(@orig_args, @_); + }; +} + +sub installable { + my ($self) = @_; + + my $pkg = $self->processable->name; + my $type = $self->processable->type; + my $processable = $self->processable; + my $group = $self->group; + + my $tabs = 0; + my $template = 0; + my $unindented_list = 0; + + return + unless $processable->fields->declares('Description'); + + my $full_description= $processable->fields->untrimmed_value('Description'); + + $full_description =~ m/^([^\n]*)\n(.*)$/s; + my ($synopsis, $extended) = ($1, $2); + unless (defined $synopsis) { + # The first line will always be completely stripped but + # continuations may have leading whitespace. Therefore we + # have to strip $full_description to restore this property, + # when we use it as a fall-back value of the synopsis. + $synopsis = $full_description; + + # trim both ends + $synopsis =~ s/^\s+|\s+$//g; + + $extended = $EMPTY; + } + + $extended //= $EMPTY; + + if ($synopsis =~ m/^\s*$/) { + $self->hint('description-synopsis-is-empty'); + } else { + if ($synopsis =~ m/^\Q$pkg\E\b/i) { + $self->hint('description-starts-with-package-name'); + } + if ($synopsis =~ m/^(an?|the)\s/i) { + $self->hint('description-synopsis-starts-with-article'); + } + if ($synopsis =~ m/(.*\.)(?:\s*$|\s+\S+)/i) { + $self->hint('synopsis-is-a-sentence',"\"$synopsis\"") + unless $1 =~ m/\s+etc\.$/ + or $1 =~ m/\s+e\.?g\.$/ + or $1 =~ m/(?<!\.)\.\.\.$/; + } + if ($synopsis =~ m/\t/) { + $self->hint('description-contains-tabs') unless $tabs++; + } + + $self->hint('odd-mark-in-description', + 'comma not followed by whitespace (synopsis)') + if $synopsis =~ /,[^\s\d]/; + + if ($synopsis =~ m/^missing\s*$/i) { + $self->hint('description-is-debmake-template') unless $template++; + } elsif ($synopsis =~ m/<insert up to 60 chars description>/) { + $self->hint('description-is-dh_make-template') unless $template++; + } + if ($synopsis !~ m/\s/) { + $self->hint('description-too-short', $synopsis); + } + my $pkg_fmt = lc $pkg; + my $synopsis_fmt = lc $synopsis; + # made a fuzzy match + $pkg_fmt =~ s/[-_]/ /g; + $synopsis_fmt =~ s{[-_/\\]}{ }g; + $synopsis_fmt =~ s/\s+/ /g; + if ($pkg_fmt eq $synopsis_fmt) { + $self->hint('description-is-pkg-name', $synopsis); + } + + $self->hint('synopsis-too-long') + if length $synopsis > $MAXIMUM_WIDTH; + } + + my $PLANNED_FEATURES= $self->data->load('description/planned-features'); + + my $flagged_homepage; + my @lines = split(/\n/, $extended); + + # count starts for extended description + my $position = 1; + for my $line (@lines) { + next + if $line =~ /^ \.\s*$/; + + if ($position == 1) { + my $firstline = lc $line; + my $lsyn = lc $synopsis; + if ($firstline =~ /^\Q$lsyn\E$/) { + $self->hint('description-synopsis-is-duplicated', + "line $position"); + } else { + $firstline =~ s/[^a-zA-Z0-9]+//g; + $lsyn =~ s/[^a-zA-Z0-9]+//g; + if ($firstline eq $lsyn) { + $self->hint('description-synopsis-is-duplicated', + "line $position"); + } + } + } + + if ($line =~ /^ \.\s*\S/ || $line =~ /^ \s+\.\s*$/) { + $self->hint('description-contains-invalid-control-statement', + "line $position"); + } elsif ($line =~ /^ [\-\*]/) { + # Print it only the second time. Just one is not enough to be sure that + # it's a list, and after the second there's no need to repeat it. + $self->hint('possible-unindented-list-in-extended-description', + "line $position") + if $unindented_list++ == 2; + } + + if ($line =~ /\t/) { + $self->hint('description-contains-tabs', "line $position") + unless $tabs++; + } + + if ($line =~ m{^\s*Homepage: <?https?://}i) { + $self->hint('description-contains-homepage', "line $position"); + $flagged_homepage = 1; + } + + if ($PLANNED_FEATURES->matches_any($line, 'i')) { + $self->hint('description-mentions-planned-features', + "(line $position)"); + } + + $self->hint('odd-mark-in-description', + "comma not followed by whitespace (line $position)") + if $line =~ /,[^\s\d]/; + + $self->hint('description-contains-dh-make-perl-template', + "line $position") + if lc($line) =~ / \Q$DH_MAKE_PERL_TEMPLATE\E /msx; + + my $first_person = $line; + my %seen; + while ($first_person + =~ m/(?:^|\s)(I|[Mm]y|[Oo]urs?|mine|myself|me|us|[Ww]e)(?:$|\s)/) { + my $word = $1; + $first_person =~ s/\Q$word//; + $self->hint('using-first-person-in-description', + "line $position: $word") + unless $seen{$word}++; + } + + if ($position == 1) { + # checks for the first line of the extended description: + if ($line =~ /^ \s/) { + $self->hint('description-starts-with-leading-spaces', + "line $position"); + } + if ($line =~ /^\s*missing\s*$/i) { + $self->hint('description-is-debmake-template',"line $position") + unless $template++; + } elsif ( + $line =~ /<insert long description, indented with spaces>/) { + $self->hint('description-is-dh_make-template',"line $position") + unless $template++; + } + } + + $self->hint('extended-description-line-too-long', "line $position") + if length $line > $MAXIMUM_WIDTH; + + } continue { + ++$position; + } + + if ($type ne 'udeb') { + if (@lines == 0) { + # Ignore debug packages with empty "extended" description + # "debug symbols for pkg foo" is generally descriptive + # enough. + $self->hint('extended-description-is-empty') + unless $processable->is_debug_package; + + } elsif (@lines < 2 && $synopsis !~ /(?:dummy|transition)/i) { + $self->hint('extended-description-is-probably-too-short') + unless $processable->is_transitional + || $processable->is_meta_package + || $pkg =~ m{-dbg\Z}xsm; + + } elsif ($extended =~ /^ \.\s*\n|\n \.\s*\n \.\s*\n|\n \.\s*\n?$/) { + $self->hint('extended-description-contains-empty-paragraph'); + } + } + + # Check for a package homepage in the description and no Homepage + # field. This is less accurate and more of a guess than looking + # for the old Homepage: convention in the body. + unless ($processable->fields->declares('Homepage') or $flagged_homepage) { + if ( + $extended =~ m{homepage|webpage|website|url|upstream|web\s+site + |home\s+page|further\s+information|more\s+info + |official\s+site|project\s+home}xi + && $extended =~ m{\b(https?://[a-z0-9][^>\s]+)}i + ) { + $self->hint('description-possibly-contains-homepage', $1); + } elsif ($extended =~ m{\b(https?://[a-z0-9][^>\s]+)>?\.?\s*\z}i) { + $self->hint('description-possibly-contains-homepage', $1); + } + } + + if ($synopsis) { + check_spelling( + $self->data, + $synopsis, + $group->spelling_exceptions, + $self->spelling_tag_emitter( + 'spelling-error-in-description-synopsis') + ); + # Auto-generated dbgsym packages will use the package name in + # their synopsis. Unfortunately, some package names trigger a + # capitalization error, such as "dbus" -> "D-Bus". Therefore, + # we exempt auto-generated packages from this check. + check_spelling_picky( + $self->data, + $synopsis, + $self->spelling_tag_emitter( + 'capitalization-error-in-description-synopsis') + ) unless $processable->is_auto_generated; + } + + if ($extended) { + check_spelling( + $self->data,$extended, + $group->spelling_exceptions, + $self->spelling_tag_emitter('spelling-error-in-description') + ); + check_spelling_picky($self->data, $extended, + $self->spelling_tag_emitter('capitalization-error-in-description') + ); + } + + if ($pkg =~ /^lib(.+)-perl$/) { + my $mod = $1; + my @mod_path_elements = split(/-/, $mod); + $mod = join($DOUBLE_COLON, map {ucfirst} @mod_path_elements); + my $mod_lc = lc($mod); + + my $pm_found = 0; + my $pmpath = join($SLASH, @mod_path_elements).'.pm'; + my $pm = $mod_path_elements[-1].'.pm'; + + for my $filepath (@{$processable->installed->sorted_list}) { + if ($filepath =~ m{\Q$pmpath\E\z|/\Q$pm\E\z}i) { + $pm_found = 1; + last; + } + } + + $self->hint('perl-module-name-not-mentioned-in-description', $mod) + if (index(lc($extended), $mod_lc) < 0 and $pm_found); + } + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Fields/Distribution.pm b/lib/Lintian/Check/Fields/Distribution.pm new file mode 100644 index 0000000..d3e21be --- /dev/null +++ b/lib/Lintian/Check/Fields/Distribution.pm @@ -0,0 +1,166 @@ +# fields/distribution -- lintian check script -*- perl -*- + +# Copyright (C) 1998 Christian Schwarz and Richard Braakman +# Copyright (C) 2017-2019 Chris Lamb <lamby@debian.org> +# Copyright (C) 2020 Felix Lechner +# +# This program is free software. It is distributed under the terms of +# the GNU General Public License as published by the Free Software +# Foundation; either version 2 of the License, or (at your option) any +# later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Fields::Distribution; + +use v5.20; +use warnings; +use utf8; + +use Const::Fast; +use List::SomeUtils qw(any none); + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +const my $EMPTY => q{}; +const my $SPACE => q{ }; + +sub changes { + my ($self) = @_; + + my @distributions + = $self->processable->fields->trimmed_list('Distribution'); + + $self->hint('multiple-distributions-in-changes-file', + join($SPACE, @distributions)) + if @distributions > 1; + + my @targets = grep { $_ ne 'UNRELEASED' } @distributions; + + # Strip common "extensions" for distributions + # (except sid and experimental, where they would + # make no sense) + my %major; + for my $target (@targets) { + + my $reduced = $target; + $reduced =~ s{- (?:backports(?:-sloppy)? + |lts + |proposed(?:-updates)? + |updates + |security + |volatile)$}{}xsm; + + $major{$target} = $reduced; + } + + my $KNOWN_DISTS = $self->data->load('changes-file/known-dists'); + + my @unknown = grep { !$KNOWN_DISTS->recognizes($major{$_}) } @targets; + $self->hint('bad-distribution-in-changes-file', $_) for @unknown; + + my @new_version = qw(sid unstable experimental); + my $upload_lc = List::Compare->new(\@targets, \@new_version); + + my @regular = $upload_lc->get_intersection; + my @special = $upload_lc->get_Lonly; + + # from Parse/DebianChangelog.pm + # the changelog entries in the changes file are in a + # different format than in the changelog, so the standard + # parsers don't work. We just need to know if there is + # info for more than 1 entry, so we just copy part of the + # parse code here + my $changes = $self->processable->fields->value('Changes'); + + # count occurrences + my @changes_versions + = ($changes =~/^(?: \.)?\s*\S+\s+\(([^\(\)]+)\)\s+\S+/mg); + + my $version = $self->processable->fields->value('Version'); + my $distnumber; + my $bpoversion; + if ($version=~ /~bpo(\d+)\+(\d+)$/) { + $distnumber = $1; + $bpoversion = $2; + + $self->hint('upload-has-backports-version-number', $version, $_) + for @regular; + } + + my @backports = grep { /backports/ } @targets; + for my $target (@backports) { + + $self->hint('backports-upload-has-incorrect-version-number', + $version, $target) + if (!defined $distnumber || !defined $bpoversion) + || ($major{$target} eq 'squeeze' && $distnumber ne '60') + || ($target eq 'wheezy-backports' && $distnumber ne '70') + || ($target eq 'wheezy-backports-sloppy' && $distnumber ne '7') + || ($major{$target} eq 'jessie' && $distnumber ne '8'); + + # for a ~bpoXX+2 or greater version, there + # probably will be only a single changelog entry + $self->hint('backports-changes-missing') + if ($bpoversion // 0) < 2 && @changes_versions == 1; + } + + my $first_line = $changes; + + # advance to first non-empty line + $first_line =~ s/^\s+//s; + + my $multiple; + if ($first_line =~ /^\s*\S+\s+\([^\(\)]+\)([^;]+);/){ + $multiple = $1; + } + + my @changesdists = split($SPACE, $multiple // $EMPTY); + return + unless @changesdists; + + # issue only when not mentioned in the Distribution field + if ((any { $_ eq 'UNRELEASED' } @changesdists) + && none { $_ eq 'UNRELEASED' } @distributions) { + + $self->hint('unreleased-changes'); + return; + } + + my $mismatch_lc = List::Compare->new(\@distributions, \@changesdists); + my @from_distribution = $mismatch_lc->get_Lonly; + my @from_changes = $mismatch_lc->get_Ronly; + + if (@from_distribution || @from_changes) { + + if (any { $_ eq 'experimental' } @from_changes) { + $self->hint('distribution-and-experimental-mismatch'); + + } else { + $self->hint('distribution-and-changes-mismatch', + join($SPACE, @from_distribution, @from_changes)); + } + } + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Fields/DmUploadAllowed.pm b/lib/Lintian/Check/Fields/DmUploadAllowed.pm new file mode 100644 index 0000000..6670587 --- /dev/null +++ b/lib/Lintian/Check/Fields/DmUploadAllowed.pm @@ -0,0 +1,60 @@ +# fields/dm-upload-allowed -- lintian check script (rewrite) -*- perl -*- +# +# Copyright (C) 2004 Marc Brockschmidt +# +# Parts of the code were taken from the old check script, which +# was Copyright (C) 1998 Richard Braakman (also licensed under the +# GPL 2 or higher) +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Fields::DmUploadAllowed; + +use v5.20; +use warnings; +use utf8; + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +sub always { + my ($self) = @_; + + my $fields = $self->processable->fields; + + return + unless $fields->declares('DM-Upload-Allowed'); + + $self->hint('dm-upload-allowed-is-obsolete'); + + my $dmupload = $fields->unfolded_value('DM-Upload-Allowed'); + + $self->hint('malformed-dm-upload-allowed', $dmupload) + unless $dmupload eq 'yes'; + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Fields/Empty.pm b/lib/Lintian/Check/Fields/Empty.pm new file mode 100644 index 0000000..184acd3 --- /dev/null +++ b/lib/Lintian/Check/Fields/Empty.pm @@ -0,0 +1,49 @@ +# fields/empty -- lintian check script (rewrite) -*- perl -*- +# +# Copyright (C) 2020 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Fields::Empty; + +use v5.20; +use warnings; +use utf8; + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +sub always { + my ($self) = @_; + + my @all = $self->processable->fields->names; + my @empty = grep { !length $self->processable->fields->value($_) } @all; + + $self->hint('empty-field', $_) for @empty; + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Fields/Essential.pm b/lib/Lintian/Check/Fields/Essential.pm new file mode 100644 index 0000000..87d43c3 --- /dev/null +++ b/lib/Lintian/Check/Fields/Essential.pm @@ -0,0 +1,79 @@ +# fields/essential -- lintian check script (rewrite) -*- perl -*- +# +# Copyright (C) 2004 Marc Brockschmidt +# +# Parts of the code were taken from the old check script, which +# was Copyright (C) 1998 Richard Braakman (also licensed under the +# GPL 2 or higher) +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Fields::Essential; + +use v5.20; +use warnings; +use utf8; + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +sub source { + my ($self) = @_; + + my $fields = $self->processable->fields; + + $self->hint('essential-in-source-package') + if $fields->declares('Essential'); + + return; +} + +sub always { + my ($self) = @_; + + my $fields = $self->processable->fields; + + return + unless $fields->declares('Essential'); + + my $essential = $fields->unfolded_value('Essential'); + + unless ($essential eq 'yes' || $essential eq 'no') { + $self->hint('unknown-essential-value'); + return; + } + + $self->hint('essential-no-not-needed') if $essential eq 'no'; + + my $KNOWN_ESSENTIAL = $self->data->load('fields/essential'); + + $self->hint('new-essential-package') + if $essential eq 'yes' + && !$KNOWN_ESSENTIAL->recognizes($self->processable->name); + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Fields/Format.pm b/lib/Lintian/Check/Fields/Format.pm new file mode 100644 index 0000000..2d7494a --- /dev/null +++ b/lib/Lintian/Check/Fields/Format.pm @@ -0,0 +1,78 @@ +# fields/format -- lintian check script (rewrite) -*- perl -*- +# +# Copyright (C) 2004 Marc Brockschmidt +# +# Parts of the code were taken from the old check script, which +# was Copyright (C) 1998 Richard Braakman (also licensed under the +# GPL 2 or higher) +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Fields::Format; + +use v5.20; +use warnings; +use utf8; + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +my @supported_source_formats = (qr/1\.0/, qr/3\.0\s*\((quilt|native)\)/); + +sub source { + my ($self) = @_; + + return + unless $self->processable->fields->declares('Format'); + + my $format = $self->processable->fields->unfolded_value('Format'); + + my $supported = 0; + for my $f (@supported_source_formats){ + + $supported = 1 + if $format =~ /^\s*$f\s*\z/; + } + + $self->hint('unsupported-source-format', $format) unless $supported; + + return; +} + +sub changes { + my ($self) = @_; + + my $format = $self->processable->fields->unfolded_value('Format'); + + # without a Format field something is wrong + unless (length $format) { + $self->hint('malformed-changes-file'); + return; + } + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Fields/Homepage.pm b/lib/Lintian/Check/Fields/Homepage.pm new file mode 100644 index 0000000..6e2ae87 --- /dev/null +++ b/lib/Lintian/Check/Fields/Homepage.pm @@ -0,0 +1,101 @@ +# fields/homepage -- lintian check script (rewrite) -*- perl -*- +# +# Copyright (C) 2004 Marc Brockschmidt +# +# Parts of the code were taken from the old check script, which +# was Copyright (C) 1998 Richard Braakman (also licensed under the +# GPL 2 or higher) +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Fields::Homepage; + +use v5.20; +use warnings; +use utf8; + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +sub source { + my ($self) = @_; + + return + if $self->processable->native; + + my $debian_control = $self->processable->debian_control; + + my @binaries_with_homepage_field + = grep { $debian_control->installable_fields($_)->declares('Homepage') } + $debian_control->installables; + + if (!$self->processable->fields->declares('Homepage')) { + + $self->hint('homepage-in-binary-package', $_) + for @binaries_with_homepage_field; + } + + $self->hint('no-homepage-field') + unless @binaries_with_homepage_field + || $self->processable->fields->declares('Homepage'); + + return; +} + +sub always { + my ($self) = @_; + + my $fields = $self->processable->fields; + + return + unless $fields->declares('Homepage'); + + my $homepage = $fields->unfolded_value('Homepage'); + + my $orig = $fields->value('Homepage'); + + if ($homepage =~ /^<(?:UR[LI]:)?.*>$/i) { + $self->hint('superfluous-clutter-in-homepage', $orig); + $homepage = substr($homepage, 1, length($homepage) - 2); + } + + require URI; + my $uri = URI->new($homepage); + + # not an absolute URI or (most likely) an invalid protocol + $self->hint('bad-homepage', $orig) + unless $uri->scheme && $uri->scheme =~ /^(?:ftp|https?|gopher)$/; + + my $BAD_HOMEPAGES = $self->data->load('fields/bad-homepages'); + + foreach my $line ($BAD_HOMEPAGES->all) { + my ($tag, $re) = split(/\s*~~\s*/, $line); + $self->hint($tag, $orig) if $homepage =~ m/$re/; + } + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Fields/InstallerMenuItem.pm b/lib/Lintian/Check/Fields/InstallerMenuItem.pm new file mode 100644 index 0000000..2b799d3 --- /dev/null +++ b/lib/Lintian/Check/Fields/InstallerMenuItem.pm @@ -0,0 +1,59 @@ +# fields/installer-menu-item -- lintian check script (rewrite) -*- perl -*- +# +# Copyright (C) 2004 Marc Brockschmidt +# +# Parts of the code were taken from the old check script, which +# was Copyright (C) 1998 Richard Braakman (also licensed under the +# GPL 2 or higher) +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Fields::InstallerMenuItem; + +use v5.20; +use warnings; +use utf8; + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +sub udeb { + my ($self) = @_; + + my $fields = $self->processable->fields; + + #---- Installer-Menu-Item (udeb) + + return + unless $fields->declares('Installer-Menu-Item'); + + my $menu_item = $fields->unfolded_value('Installer-Menu-Item'); + + $self->hint('bad-menu-item', $menu_item) unless $menu_item =~ /^\d+$/; + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Fields/Length.pm b/lib/Lintian/Check/Fields/Length.pm new file mode 100644 index 0000000..e9765bd --- /dev/null +++ b/lib/Lintian/Check/Fields/Length.pm @@ -0,0 +1,86 @@ +# fields/length -- lintian check script -*- perl -*- +# +# Copyright (C) 2019 Sylvestre Ledru +# Copyright (C) 2019-2020 Chris Lamb <lamby@debian.org> +# +# Parts of the code were taken from the old check script, which +# was Copyright (C) 1998 Richard Braakman (also licensed under the +# GPL 2 or higher) +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Fields::Length; + +use v5.20; +use warnings; +use utf8; + +use Const::Fast; +use List::Compare; +use List::SomeUtils qw(any); + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +const my $MAXIMUM_LENGTH => 5_000; + +my @ALLOWED_FIELDS = qw( + Build-Ids + Description + Package-List + Installed-Build-Depends + Checksums-Sha256 +); + +sub always { + my ($self) = @_; + + return + if any { $self->processable->type eq $_ } qw(changes buildinfo); + + # all fields + my @all = $self->processable->fields->names; + + # longer than maximum + my @long= grep { + length $self->processable->fields->untrimmed_value($_)> $MAXIMUM_LENGTH + }@all; + + # filter allowed fields + my $allowedlc = List::Compare->new(\@long, \@ALLOWED_FIELDS); + my @too_long = $allowedlc->get_Lonly; + + for my $name (@too_long) { + + my $length = length $self->processable->fields->value($name); + + $self->hint('field-too-long', $name, + "($length chars > $MAXIMUM_LENGTH)"); + } + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Fields/MailAddress.pm b/lib/Lintian/Check/Fields/MailAddress.pm new file mode 100644 index 0000000..02fd5f1 --- /dev/null +++ b/lib/Lintian/Check/Fields/MailAddress.pm @@ -0,0 +1,150 @@ +# fields/mail-address -- lintian check script (rewrite) -*- perl -*- +# +# Copyright (C) 2004 Marc Brockschmidt +# Copyright (C) 2020 Felix Lechner +# Copyright (C) 2020 Chris Lamb <lamby@debian.org> +# +# Parts of the code were taken from the old check script, which +# was Copyright (C) 1998 Richard Braakman (also licensed under the +# GPL 2 or higher) +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Fields::MailAddress; + +use v5.20; +use warnings; +use utf8; + +use Const::Fast; +use Data::Validate::Domain; +use Email::Address::XS; +use List::SomeUtils qw(any all); +use List::UtilsBy qw(uniq_by); + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +const my $QA_GROUP_PHRASE => 'Debian QA Group'; +const my $QA_GROUP_ADDRESS => 'packages@qa.debian.org'; +const my $ARROW => q{ -> }; + +# list of addresses known to bounce messages from role accounts +my @KNOWN_BOUNCE_ADDRESSES = qw( + ubuntu-devel-discuss@lists.ubuntu.com +); + +sub always { + my ($self) = @_; + + my @singles = qw(Maintainer Changed-By); + my @groups = qw(Uploaders); + + my @singles_present + = grep { $self->processable->fields->declares($_) } @singles; + my @groups_present + = grep { $self->processable->fields->declares($_) } @groups; + + my %parsed; + for my $role (@singles_present, @groups_present) { + + my $value = $self->processable->fields->value($role); + $parsed{$role} = [Email::Address::XS->parse($value)]; + } + + for my $role (keys %parsed) { + + my @invalid = grep { !$_->is_valid } @{$parsed{$role}}; + $self->hint('malformed-contact', $role, $_->original)for @invalid; + + my @valid = grep { $_->is_valid } @{$parsed{$role}}; + my @unique = uniq_by { $_->format } @valid; + + $self->check_single_address($role, $_) for @unique; + } + + for my $role (@singles_present) { + $self->hint('too-many-contacts', $role, + $self->processable->fields->value($role)) + if @{$parsed{$role}} > 1; + } + + for my $role (@groups_present) { + my @valid = grep { $_->is_valid } @{$parsed{$role}}; + my @addresses = map { $_->address } @valid; + + my %count; + $count{$_}++ for @addresses; + my @duplicates = grep { $count{$_} > 1 } keys %count; + + $self->hint('duplicate-contact', $role, $_) for @duplicates; + } + + return; +} + +sub check_single_address { + my ($self, $role, $parsed) = @_; + + $self->hint('mail-contact', $role, $parsed->format); + + unless (all { length } ($parsed->address, $parsed->user, $parsed->host)) { + $self->hint('incomplete-mail-address', $role, $parsed->format); + return; + } + + $self->hint('bogus-mail-host', $role, $parsed->address) + unless is_domain($parsed->host, {domain_disable_tld_validation => 1}); + + $self->hint('mail-address-loops-or-bounces',$role, $parsed->address) + if any { $_ eq $parsed->address } @KNOWN_BOUNCE_ADDRESSES; + + unless (length $parsed->phrase) { + $self->hint('no-phrase', $role, $parsed->format); + return; + } + + $self->hint('root-in-contact', $role, $parsed->format) + if $parsed->user eq 'root' || $parsed->phrase eq 'root'; + + # Debian QA Group + $self->hint('faulty-debian-qa-group-phrase', + $role, $parsed->phrase . $ARROW . $QA_GROUP_PHRASE) + if $parsed->address eq $QA_GROUP_ADDRESS + && $parsed->phrase ne $QA_GROUP_PHRASE; + + $self->hint('faulty-debian-qa-group-address', + $role, $parsed->address . $ARROW . $QA_GROUP_ADDRESS) + if ( $parsed->phrase =~ /\bdebian\s+qa\b/i + && $parsed->address ne $QA_GROUP_ADDRESS) + || $parsed->address eq 'debian-qa@lists.debian.org'; + + $self->hint('mailing-list-on-alioth', $role, $parsed->address) + if $parsed->host eq 'lists.alioth.debian.org'; + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Fields/Maintainer.pm b/lib/Lintian/Check/Fields/Maintainer.pm new file mode 100644 index 0000000..7267092 --- /dev/null +++ b/lib/Lintian/Check/Fields/Maintainer.pm @@ -0,0 +1,84 @@ +# fields/maintainer -- lintian check script (rewrite) -*- perl -*- +# +# Copyright (C) 2004 Marc Brockschmidt +# Copyright (C) 2020 Felix Lechner +# Copyright (C) 2020 Chris Lamb <lamby@debian.org> +# +# Parts of the code were taken from the old check script, which +# was Copyright (C) 1998 Richard Braakman (also licensed under the +# GPL 2 or higher) +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Fields::Maintainer; + +use v5.20; +use warnings; +use utf8; + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +sub source { + my ($self) = @_; + + return + unless $self->processable->fields->declares('Maintainer'); + + my $maintainer = $self->processable->fields->value('Maintainer'); + + my $is_list = $maintainer =~ /\@lists(?:\.alioth)?\.debian\.org\b/; + + $self->hint('no-human-maintainers') + if $is_list && !$self->processable->fields->declares('Uploaders'); + + return; +} + +sub changes { + my ($self) = @_; + + my $source = $self->group->source; + return + unless defined $source; + + my $changes_maintainer = $self->processable->fields->value('Maintainer'); + my $changes_distribution + = $self->processable->fields->value('Distribution'); + + my $source_maintainer = $source->fields->value('Maintainer'); + + my $KNOWN_DISTS = $self->data->load('changes-file/known-dists'); + + # not for derivatives; https://wiki.ubuntu.com/DebianMaintainerField + $self->hint('inconsistent-maintainer', + $changes_maintainer . ' (changes vs. source) ' .$source_maintainer) + if $changes_maintainer ne $source_maintainer + && $KNOWN_DISTS->recognizes($changes_distribution); + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Fields/Maintainer/Team.pm b/lib/Lintian/Check/Fields/Maintainer/Team.pm new file mode 100644 index 0000000..b068d9f --- /dev/null +++ b/lib/Lintian/Check/Fields/Maintainer/Team.pm @@ -0,0 +1,90 @@ +# Copyright (C) 2021 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Fields::Maintainer::Team; + +use v5.20; +use warnings; +use utf8; + +use Const::Fast; +use Email::Address::XS; +use List::SomeUtils qw(uniq first_value); + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +const my $ARROW => qq{ \N{RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK} }; + +my %team_names = ( + 'debian-go@lists.debian.org' => 'golang', + 'debian-clojure@lists.debian.org' => 'clojure', + 'pkg-java-maintainers@lists.alioth.debian.org' => 'java', + 'pkg-javascript-maintainers@lists.alioth.debian.org' => 'javascript', + 'pkg-perl-maintainers@lists.alioth.debian.org' => 'perl', + 'team+python@tracker.debian.org' => 'python' +); + +sub source { + my ($self) = @_; + + my $maintainer = $self->processable->fields->value('Maintainer'); + return + unless length $maintainer; + + my $parsed = Email::Address::XS->parse($maintainer); + return + unless $parsed->is_valid; + + return + unless length $parsed->address; + + my $team = $team_names{$parsed->address}; + return + unless length $team; + + return + if $self->name_contains($team); + + my @other_teams = uniq grep { $_ ne $team } values %team_names; + + my $name_suggests = first_value { $self->name_contains($_) } @other_teams; + return + unless length $name_suggests; + + $self->hint('wrong-team', $team . $ARROW . $name_suggests) + unless $name_suggests eq $team; + + return; +} + +sub name_contains { + my ($self, $string) = @_; + + return $self->processable->name =~ m{ \b \Q$string\E \b }sx; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Fields/MultiArch.pm b/lib/Lintian/Check/Fields/MultiArch.pm new file mode 100644 index 0000000..5b42f9f --- /dev/null +++ b/lib/Lintian/Check/Fields/MultiArch.pm @@ -0,0 +1,138 @@ +# fields/multi-arch -- lintian check script (rewrite) -*- perl -*- +# +# Copyright (C) 2004 Marc Brockschmidt +# +# Parts of the code were taken from the old check script, which +# was Copyright (C) 1998 Richard Braakman (also licensed under the +# GPL 2 or higher) +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Fields::MultiArch; + +use v5.20; +use warnings; +use utf8; + +use Const::Fast; +use List::SomeUtils qw(uniq any); +use Unicode::UTF8 qw(decode_utf8); + +use Lintian::IPC::Run3 qw(safe_qx); + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +const my $SPACE => q{ }; + +sub source { + my ($self) = @_; + + my $pkg = $self->processable->name; + my $processable = $self->processable; + + for my $bin ($processable->debian_control->installables) { + + next + unless ($processable->debian_control->installable_fields($bin) + ->value('Multi-Arch')) eq 'same'; + + my $wildcard = $processable->debian_control->installable_fields($bin) + ->value('Architecture'); + my @arches = split( + $SPACE, + decode_utf8( + safe_qx( + 'dpkg-architecture', '--match-wildcard', + $wildcard, '--list-known' + ) + ) + ); + + # include original wildcard + push(@arches, $wildcard); + + for my $port (uniq @arches) { + + my $specific = $processable->patched->resolve_path( + "debian/$bin.lintian-overrides.$port"); + next + unless defined $specific; + + $self->pointed_hint( + 'multi-arch-same-package-has-arch-specific-overrides', + $specific->pointer); + } + } + + return; +} + +sub installable { + my ($self) = @_; + + my $fields = $self->processable->fields; + + if ($self->processable->name =~ /^x?fonts-/) { + + my $multi = $fields->value('Multi-Arch') || 'no'; + + $self->hint('font-package-not-multi-arch-foreign') + unless any { $multi eq $_ } qw(foreign allowed); + } + + return + unless $fields->declares('Multi-Arch'); + + my $multi = $fields->unfolded_value('Multi-Arch'); + + if ($fields->declares('Architecture')) { + + my $architecture = $fields->unfolded_value('Architecture'); + + $self->hint('illegal-multi-arch-value', $architecture, $multi) + if $architecture eq 'all' && $multi eq 'same'; + } + + return; +} + +sub always { + my ($self) = @_; + + my $fields = $self->processable->fields; + + return + unless $fields->declares('Multi-Arch'); + + my $multi = $fields->unfolded_value('Multi-Arch'); + + $self->hint('unknown-multi-arch-value', $self->processable->name, $multi) + unless any { $multi eq $_ } qw(no foreign allowed same); + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Fields/MultiLine.pm b/lib/Lintian/Check/Fields/MultiLine.pm new file mode 100644 index 0000000..ca31cd5 --- /dev/null +++ b/lib/Lintian/Check/Fields/MultiLine.pm @@ -0,0 +1,89 @@ +# fields/multi-line -- lintian check script -*- perl -*- +# +# Copyright (C) 2019 Felix Lechner +# +# Parts of the code were taken from the old check script, which +# was Copyright (C) 1998 Richard Braakman (also licensed under the +# GPL 2 or higher) +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Fields::MultiLine; + +use v5.20; +use warnings; +use utf8; + +use Const::Fast; +use List::Compare; + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +const my $NEWLINE => qq{\n}; + +# based on policy 5.6 +my @always_single = ( + qw(Architecture Bugs Changed-By Closes Date Distribution Dm-Upload-Allowed), + qw(Essential Format Homepage Installed-Size Installer-Menu-Item Maintainer), + qw(Multi-Arch Origin Package Priority Section Source Standards-Version), + qw(Subarchitecture Urgency Version) +); + +my @package_relations + = ( + qw(Depends Pre-Depends Recommends Suggests Conflicts Provides Enhances Replaces Breaks) + ); + +sub always { + my ($self) = @_; + + my @banned = @always_single; + + # for package relations, multi-line only in source (policy 7.1) + push(@banned, @package_relations) + unless $self->processable->type eq 'source'; + + my @present = $self->processable->fields->names; + + my $single_lc = List::Compare->new(\@present, \@banned); + my @enforce = $single_lc->get_intersection; + + for my $name (@enforce) { + + my $value = $self->processable->fields->untrimmed_value($name); + + # remove a final newline, if any + $value =~ s/\n$//; + + # check if fields have newlines in them + $self->hint('multiline-field', $name) + if index($value, $NEWLINE) >= 0; + } + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Fields/Origin.pm b/lib/Lintian/Check/Fields/Origin.pm new file mode 100644 index 0000000..4d36793 --- /dev/null +++ b/lib/Lintian/Check/Fields/Origin.pm @@ -0,0 +1,57 @@ +# fields/origin -- lintian check script (rewrite) -*- perl -*- +# +# Copyright (C) 2004 Marc Brockschmidt +# +# Parts of the code were taken from the old check script, which +# was Copyright (C) 1998 Richard Braakman (also licensed under the +# GPL 2 or higher) +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Fields::Origin; + +use v5.20; +use warnings; +use utf8; + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +sub always { + my ($self) = @_; + + my $fields = $self->processable->fields; + + return + unless $fields->declares('Origin'); + + my $origin = $fields->unfolded_value('Origin'); + + $self->hint('redundant-origin-field') if lc($origin) eq 'debian'; + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Fields/Package.pm b/lib/Lintian/Check/Fields/Package.pm new file mode 100644 index 0000000..2ce436f --- /dev/null +++ b/lib/Lintian/Check/Fields/Package.pm @@ -0,0 +1,61 @@ +# fields/package -- lintian check script (rewrite) -*- perl -*- +# +# Copyright (C) 2004 Marc Brockschmidt +# +# Parts of the code were taken from the old check script, which +# was Copyright (C) 1998 Richard Braakman (also licensed under the +# GPL 2 or higher) +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Fields::Package; + +use v5.20; +use warnings; +use utf8; + +use Lintian::Util qw($PKGNAME_REGEX); + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +sub installable { + my ($self) = @_; + + return + unless $self->processable->fields->declares('Package'); + + my $name = $self->processable->fields->unfolded_value('Package'); + + $self->hint('bad-package-name') unless $name =~ /^$PKGNAME_REGEX$/i; + + $self->hint('package-not-lowercase') if $name =~ /[A-Z]/; + + $self->hint('unusual-documentation-package-name') if $name =~ /-docs$/; + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Fields/PackageRelations.pm b/lib/Lintian/Check/Fields/PackageRelations.pm new file mode 100644 index 0000000..eeb11c0 --- /dev/null +++ b/lib/Lintian/Check/Fields/PackageRelations.pm @@ -0,0 +1,794 @@ +# fields/package-relations -- lintian check script (rewrite) -*- perl -*- +# +# Copyright (C) 2004 Marc Brockschmidt +# Copyright (C) 2019-2020 Chris Lamb <lamby@debian.org> +# +# Parts of the code were taken from the old check script, which +# was Copyright (C) 1998 Richard Braakman (also licensed under the +# GPL 2 or higher) +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Fields::PackageRelations; + +use v5.20; +use warnings; +use utf8; + +use Const::Fast; +use Dpkg::Version qw(version_check); +use List::SomeUtils qw(any); + +use Lintian::Relation; + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +const my $EMPTY => q{}; +const my $EQUAL => q{=}; +const my $VERTICAL_BAR => q{|}; + +# Still in the archive but shouldn't be the primary Emacs dependency. +my @obsolete_emacs_versions = qw(21 22 23); +my @emacs_flavors = ($EMPTY, qw(-el -gtk -nox -lucid)); +my %known_obsolete_emacs; +for my $version (@obsolete_emacs_versions) { + for my $flavor (@emacs_flavors) { + + my $package = 'emacs' . $version . $flavor; + $known_obsolete_emacs{$package} = 1; + } +} + +my %known_libstdcs = map { $_ => 1 } qw( + libstdc++2.9-glibc2.1 + libstdc++2.10 + libstdc++2.10-glibc2.2 + libstdc++3 + libstdc++3.0 + libstdc++4 + libstdc++5 + libstdc++6 + lib64stdc++6 +); + +my %known_tcls = map { $_ => 1 } qw( + tcl74 + tcl8.0 + tcl8.2 + tcl8.3 + tcl8.4 + tcl8.5 +); + +my %known_tclxs = map { $_ => 1 } qw( + tclx76 + tclx8.0.4 + tclx8.2 + tclx8.3 + tclx8.4 +); + +my %known_tks = map { $_ => 1 } qw( + tk40 + tk8.0 + tk8.2 + tk8.3 + tk8.4 + tk8.5 +); + +my %known_libpngs = map { $_ => 1 } qw( + libpng12-0 + libpng2 + libpng3 +); + +my @known_java_pkg = map { qr/$_/ } ( + 'default-j(?:re|dk)(?:-headless)?', + # java-runtime and javaX-runtime alternatives (virtual) + 'java\d*-runtime(?:-headless)?', + # openjdk-X and sun-javaX + '(openjdk-|sun-java)\d+-j(?:re|dk)(?:-headless)?', + 'gcj-(?:\d+\.\d+-)?jre(?:-headless)?', 'gcj-(?:\d+\.\d+-)?jdk', # gcj + 'gij', + 'java-gcj-compat(?:-dev|-headless)?', # deprecated/transitional packages + 'kaffe', 'cacao', 'jamvm', + 'classpath', # deprecated packages (removed in Squeeze) +); + +# Python development packages that are used almost always just for building +# architecture-dependent modules. Used to check for unnecessary build +# dependencies for architecture-independent source packages. +our $PYTHON_DEV = join(' | ', + qw(python3-dev python3-all-dev), + map { "python$_-dev:any" } qw(2.7 3 3.7 3.8 3.9)); + +sub installable { + my ($self) = @_; + + my $pkg = $self->processable->name; + my $type = $self->processable->type; + my $processable = $self->processable; + my $group = $self->group; + + my $KNOWN_ESSENTIAL = $self->data->load('fields/essential'); + my $KNOWN_TOOLCHAIN = $self->data->load('fields/toolchain'); + my $KNOWN_METAPACKAGES = $self->data->load('fields/metapackages'); + + my $DH_ADDONS = $self->data->debhelper_addons; + my %DH_ADDONS_VALUES + = map { $_ => 1 } map { $DH_ADDONS->installed_by($_) } $DH_ADDONS->all; + + my $OBSOLETE_PACKAGES + = $self->data->load('fields/obsolete-packages',qr/\s*=>\s*/); + + my $VIRTUAL_PACKAGES= $self->data->load('fields/virtual-packages'); + + my $javalib = 0; + my $replaces = $processable->relation('Replaces'); + my %nag_once; + $javalib = 1 if($pkg =~ m/^lib.*-java$/); + for my $field ( + qw(Depends Pre-Depends Recommends Suggests Conflicts Provides Enhances Replaces Breaks) + ) { + next + unless $processable->fields->declares($field); + + # get data and clean it + my $data = $processable->fields->unfolded_value($field); + my $javadep = 0; + + my (@seen_libstdcs, @seen_tcls, @seen_tclxs,@seen_tks, @seen_libpngs); + + my $is_dep_field + = any { $field eq $_ } qw(Depends Pre-Depends Recommends Suggests); + + $self->hint('alternates-not-allowed', $field) + if ($data =~ /\|/ && !$is_dep_field); + $self->check_field($field, $data) if $is_dep_field; + + for my $dep (split /\s*,\s*/, $data) { + my (@alternatives, @seen_obsolete_packages); + push @alternatives, [_split_dep($_), $_] + for (split /\s*\|\s*/, $dep); + + if ($is_dep_field) { + push @seen_libstdcs, $alternatives[0][0] + if defined $known_libstdcs{$alternatives[0][0]}; + push @seen_tcls, $alternatives[0][0] + if defined $known_tcls{$alternatives[0][0]}; + push @seen_tclxs, $alternatives[0][0] + if defined $known_tclxs{$alternatives[0][0]}; + push @seen_tks, $alternatives[0][0] + if defined $known_tks{$alternatives[0][0]}; + push @seen_libpngs, $alternatives[0][0] + if defined $known_libpngs{$alternatives[0][0]}; + } + + # Only for (Pre-)?Depends. + $self->hint('virtual-package-depends-without-real-package-depends', + "$field: $alternatives[0][0]") + if ( + $VIRTUAL_PACKAGES->recognizes($alternatives[0][0]) + && ($field eq 'Depends' || $field eq 'Pre-Depends') + && ($pkg ne 'base-files' || $alternatives[0][0] ne 'awk') + # ignore phpapi- dependencies as adding an + # alternative, real, package breaks its purpose + && $alternatives[0][0] !~ m/^phpapi-/ + ); + + # Check defaults for transitions. Here, we only care + # that the first alternative is current. + $self->hint('depends-on-old-emacs', "$field: $alternatives[0][0]") + if ( $is_dep_field + && $known_obsolete_emacs{$alternatives[0][0]}); + + for my $part_d (@alternatives) { + my ($d_pkg, $d_march, $d_version, undef, undef, $rest, + $part_d_orig) + = @{$part_d}; + + $self->hint('invalid-versioned-provides', $part_d_orig) + if ( $field eq 'Provides' + && $d_version->[0] + && $d_version->[0] ne $EQUAL); + + $self->hint('bad-provided-package-name', $d_pkg) + if $d_pkg !~ /^[a-z0-9][-+\.a-z0-9]+$/; + + $self->hint('breaks-without-version', $part_d_orig) + if ( $field eq 'Breaks' + && !$d_version->[0] + && !$VIRTUAL_PACKAGES->recognizes($d_pkg) + && !$replaces->satisfies($part_d_orig)); + + $self->hint('conflicts-with-version', $part_d_orig) + if ($field eq 'Conflicts' && $d_version->[0]); + + $self->hint('obsolete-relation-form', "$field: $part_d_orig") + if ($d_version && any { $d_version->[0] eq $_ }('<', '>')); + + $self->hint('bad-version-in-relation', "$field: $part_d_orig") + if ($d_version->[0] && !version_check($d_version->[1])); + + $self->hint('package-relation-with-self', + "$field: $part_d_orig") + if ($pkg eq $d_pkg) + && (!$d_march) + && ( $field ne 'Conflicts' + && $field ne 'Replaces' + && $field ne 'Provides'); + + $self->hint('bad-relation', "$field: $part_d_orig") if $rest; + + push @seen_obsolete_packages, [$part_d_orig, $d_pkg] + if ( $OBSOLETE_PACKAGES->recognizes($d_pkg) + && $is_dep_field); + + $self->hint('depends-on-metapackage', "$field: $part_d_orig") + if ( $KNOWN_METAPACKAGES->recognizes($d_pkg) + && !$KNOWN_METAPACKAGES->recognizes($pkg) + && !$processable->is_transitional + && !$processable->is_meta_package + && $is_dep_field); + + # diffutils is a special case since diff was + # renamed to diffutils, so a dependency on + # diffutils effectively is a versioned one. + $self->hint( + 'depends-on-essential-package-without-using-version', + "$field: $part_d_orig") + if ( $KNOWN_ESSENTIAL->recognizes($d_pkg) + && !$d_version->[0] + && $is_dep_field + && $d_pkg ne 'diffutils' + && $d_pkg ne 'dash'); + + $self->hint('package-depends-on-an-x-font-package', + "$field: $part_d_orig") + if ( $field =~ /^(?:Pre-)?Depends$/ + && $d_pkg =~ /^xfont.*/ + && $d_pkg ne 'xfonts-utils' + && $d_pkg ne 'xfonts-encodings'); + + $self->hint('depends-on-packaging-dev',$field) + if (($field =~ /^(?:Pre-)?Depends$/|| $field eq 'Recommends') + && $d_pkg eq 'packaging-dev' + && !$processable->is_transitional + && !$processable->is_meta_package); + + $self->hint('needless-suggest-recommend-libservlet-java', + "$d_pkg") + if (($field eq 'Recommends' || $field eq 'Suggests') + && $d_pkg =~ m/libservlet[\d\.]+-java/); + + $self->hint('needlessly-depends-on-awk', $field) + if ( $d_pkg eq 'awk' + && !$d_version->[0] + && $is_dep_field + && $pkg ne 'base-files'); + + $self->hint('depends-on-libdb1-compat', $field) + if ( $d_pkg eq 'libdb1-compat' + && $pkg !~ /^libc(?:6|6.1|0.3)/ + && $field =~ /^(?:Pre-)?Depends$/); + + $self->hint('depends-on-python-minimal', $field,) + if ( $d_pkg =~ /^python[\d.]*-minimal$/ + && $is_dep_field + && $pkg !~ /^python[\d.]*-minimal$/); + + $self->hint('doc-package-depends-on-main-package', $field) + if ("$d_pkg-doc" eq $pkg + && $field =~ /^(?:Pre-)?Depends$/); + + $self->hint( + 'package-relation-with-perl-modules', "$field: $d_pkg" + # matches "perl-modules" (<= 5.20) as well as + # perl-modules-5.xx (>> 5.20) + ) + if $d_pkg =~ /^perl-modules/ + && $field ne 'Replaces' + && $processable->source_name ne 'perl'; + + $self->hint('depends-exclusively-on-makedev', $field,) + if ( $field eq 'Depends' + && $d_pkg eq 'makedev' + && @alternatives == 1); + + $self->hint('lib-recommends-documentation', + "$field: $part_d_orig") + if ( $field eq 'Recommends' + && $pkg =~ m/^lib/ + && $pkg !~ m/-(?:dev|docs?|tools|bin)$/ + && $part_d_orig =~ m/-docs?$/); + + $self->hint('binary-package-depends-on-toolchain-package', + "$field: $part_d_orig") + if $KNOWN_TOOLCHAIN->recognizes($d_pkg) + && $is_dep_field + && $pkg !~ /^dh-/ + && $pkg !~ /-(?:source|src)$/ + && !$processable->is_transitional + && !$processable->is_meta_package + && !$DH_ADDONS_VALUES{$pkg}; + + # default-jdk-doc must depend on openjdk-X-doc (or + # classpath-doc) to be useful; other packages + # should depend on default-jdk-doc if they want + # the Java Core API. + $self->hint('depends-on-specific-java-doc-package',$field) + if ( + $is_dep_field + && $pkg ne 'default-jdk-doc' + && ( $d_pkg eq 'classpath-doc' + || $d_pkg =~ /openjdk-\d+-doc/) + ); + + if ($javalib && $field eq 'Depends'){ + foreach my $reg (@known_java_pkg){ + if($d_pkg =~ m/$reg/){ + $javadep++; + last; + } + + } + } + } + + for my $d (@seen_obsolete_packages) { + my ($dep, $pkg_name) = @{$d}; + my $replacement = $OBSOLETE_PACKAGES->value($pkg_name) + // $EMPTY; + $replacement = ' => ' . $replacement + if $replacement ne $EMPTY; + if ($pkg_name eq $alternatives[0][0] + or scalar @seen_obsolete_packages== scalar @alternatives) { + $self->hint( + 'depends-on-obsolete-package', + "$field: $dep${replacement}" + ); + } else { + $self->hint( + 'ored-depends-on-obsolete-package', + "$field: $dep${replacement}" + ); + } + } + + # Only emit the tag if all the alternatives are + # JVM/JRE/JDKs + # - assume that <some-lib> | openjdk-X-jre-headless + # makes sense for now. + if (scalar(@alternatives) == $javadep + && !exists $nag_once{'needless-dependency-on-jre'}){ + $nag_once{'needless-dependency-on-jre'} = 1; + $self->hint('needless-dependency-on-jre'); + } + } + $self->hint('package-depends-on-multiple-libstdc-versions', + @seen_libstdcs) + if (scalar @seen_libstdcs > 1); + $self->hint('package-depends-on-multiple-tcl-versions', @seen_tcls) + if (scalar @seen_tcls > 1); + $self->hint('package-depends-on-multiple-tclx-versions', @seen_tclxs) + if (scalar @seen_tclxs > 1); + $self->hint('package-depends-on-multiple-tk-versions', @seen_tks) + if (scalar @seen_tks > 1); + $self->hint('package-depends-on-multiple-libpng-versions', + @seen_libpngs) + if (scalar @seen_libpngs > 1); + } + + # If Conflicts or Breaks is set, make sure it's not inconsistent with + # the other dependency fields. + for my $conflict (qw/Conflicts Breaks/) { + next + unless $processable->fields->declares($conflict); + + for my $field (qw(Depends Pre-Depends Recommends Suggests)) { + next + unless $processable->fields->declares($field); + + my $relation = $processable->relation($field); + for my $package (split /\s*,\s*/, + $processable->fields->value($conflict)) { + + $self->hint('conflicts-with-dependency', $field, $package) + if $relation->satisfies($package); + } + } + } + + return; +} + +sub source { + my ($self) = @_; + + my $pkg = $self->processable->name; + my $type = $self->processable->type; + my $processable = $self->processable; + my $group = $self->group; + + my $KNOWN_ESSENTIAL = $self->data->load('fields/essential'); + my $KNOWN_METAPACKAGES = $self->data->load('fields/metapackages'); + my $NO_BUILD_DEPENDS= $self->data->load('fields/no-build-depends'); + my $known_build_essential + = $self->data->load('fields/build-essential-packages'); + my $KNOWN_BUILD_PROFILES= $self->data->load('fields/build-profiles'); + + my $OBSOLETE_PACKAGES + = $self->data->load('fields/obsolete-packages',qr/\s*=>\s*/); + + my $VIRTUAL_PACKAGES= $self->data->load('fields/virtual-packages'); + + my @binpkgs = $processable->debian_control->installables; + + #Get number of arch-indep packages: + my $arch_indep_packages = 0; + my $arch_dep_packages = 0; + + for my $binpkg (@binpkgs) { + my $arch = $processable->debian_control->installable_fields($binpkg) + ->value('Architecture'); + + if ($arch eq 'all') { + $arch_indep_packages++; + } else { + $arch_dep_packages++; + } + } + + $self->hint('build-depends-indep-without-arch-indep') + if ( $processable->fields->declares('Build-Depends-Indep') + && $arch_indep_packages == 0); + + $self->hint('build-depends-arch-without-arch-dependent-binary') + if ( $processable->fields->declares('Build-Depends-Arch') + && $arch_dep_packages == 0); + + my %depend; + for my $field ( + qw(Build-Depends Build-Depends-Indep Build-Depends-Arch Build-Conflicts Build-Conflicts-Indep Build-Conflicts-Arch) + ) { + if ($processable->fields->declares($field)) { + + my $is_dep_field = any { $field eq $_ } + qw(Build-Depends Build-Depends-Indep Build-Depends-Arch); + + # get data and clean it + my $data = $processable->fields->unfolded_value($field); + + $self->check_field($field, $data); + $depend{$field} = $data; + + for my $dep (split /\s*,\s*/, $data) { + my (@alternatives, @seen_obsolete_packages); + push @alternatives, [_split_dep($_), $_] + for (split /\s*\|\s*/, $dep); + + $self->hint( + 'virtual-package-depends-without-real-package-depends', + "$field: $alternatives[0][0]") + if ( $VIRTUAL_PACKAGES->recognizes($alternatives[0][0]) + && $is_dep_field); + + for my $part_d (@alternatives) { + my ($d_pkg, undef, $d_version, $d_arch, $d_restr, + $rest,$part_d_orig) + = @{$part_d}; + + for my $arch (@{$d_arch->[0]}) { + $self->hint('invalid-arch-string-in-source-relation', + $arch, "[$field: $part_d_orig]") + if $arch eq 'all' + || ( + !$self->data->architectures + ->is_release_architecture( + $arch) + && !$self->data->architectures->is_wildcard($arch) + ); + } + + for my $restrlist (@{$d_restr}) { + for my $prof (@{$restrlist}) { + $prof =~ s/^!//; + $self->hint( + 'invalid-profile-name-in-source-relation', + "$prof [$field: $part_d_orig]" + ) + unless $KNOWN_BUILD_PROFILES->recognizes($prof) + or $prof =~ /^pkg\.[a-z0-9][a-z0-9+.-]+\../; + } + } + + if ( $d_pkg =~ /^openjdk-\d+-doc$/ + or $d_pkg eq 'classpath-doc'){ + $self->hint( + 'build-depends-on-specific-java-doc-package', + $d_pkg); + } + + if ($d_pkg eq 'java-compiler'){ + $self->hint( + 'build-depends-on-an-obsolete-java-package', + $d_pkg); + } + + if ( $d_pkg =~ /^libdb\d+\.\d+.*-dev$/ + and $is_dep_field) { + $self->hint('build-depends-on-versioned-berkeley-db', + "$field:$d_pkg"); + } + + $self->hint('conflicting-negation-in-source-relation', + "$field: $part_d_orig") + if ( $d_arch + && $d_arch->[1] != 0 + && $d_arch->[1] ne @{ $d_arch->[0] }); + + $self->hint('depends-on-packaging-dev', $field) + if ($d_pkg eq 'packaging-dev'); + + $self->hint('build-depends-on-build-essential', $field) + if ($d_pkg eq 'build-essential'); + + $self->hint( +'build-depends-on-build-essential-package-without-using-version', + "$d_pkg [$field: $part_d_orig]" + ) + if ($known_build_essential->recognizes($d_pkg) + && !$d_version->[1]); + + $self->hint( +'build-depends-on-essential-package-without-using-version', + "$field: $part_d_orig" + ) + if ( $KNOWN_ESSENTIAL->recognizes($d_pkg) + && !$d_version->[0] + && $d_pkg ne 'dash'); + push @seen_obsolete_packages, [$part_d_orig, $d_pkg] + if ( $OBSOLETE_PACKAGES->recognizes($d_pkg) + && $is_dep_field); + + $self->hint('build-depends-on-metapackage', + "$field: $part_d_orig") + if ( $KNOWN_METAPACKAGES->recognizes($d_pkg) + and $is_dep_field); + + $self->hint('build-depends-on-non-build-package', + "$field: $part_d_orig") + if ( $NO_BUILD_DEPENDS->recognizes($d_pkg) + and $is_dep_field); + + $self->hint('build-depends-on-1-revision', + "$field: $part_d_orig") + if ( $d_version->[0] eq '>=' + && $d_version->[1] =~ /-1$/ + && $is_dep_field); + + $self->hint('bad-relation', "$field: $part_d_orig") + if $rest; + + $self->hint('bad-version-in-relation', + "$field: $part_d_orig") + if ($d_version->[0] + && !version_check($d_version->[1])); + + $self->hint( + 'package-relation-with-perl-modules', + "$field: $part_d_orig" + # matches "perl-modules" (<= 5.20) as well as + # perl-modules-5.xx (>> 5.20) + ) + if $d_pkg =~ /^perl-modules/ + && $processable->source_name ne 'perl'; + } + + my $all_obsolete = 0; + $all_obsolete = 1 + if scalar @seen_obsolete_packages == @alternatives; + for my $d (@seen_obsolete_packages) { + my ($dep, $pkg_name) = @{$d}; + my $replacement = $OBSOLETE_PACKAGES->value($pkg_name) + // $EMPTY; + + $replacement = ' => ' . $replacement + if $replacement ne $EMPTY; + if ( $pkg_name eq $alternatives[0][0] + or $all_obsolete) { + $self->hint('build-depends-on-obsolete-package', + "$field: $dep${replacement}"); + } else { + $self->hint('ored-build-depends-on-obsolete-package', + "$field: $dep${replacement}"); + } + } + } + } + } + + # Check for redundancies. + my @to_check = ( + ['Build-Depends'], + ['Build-Depends', 'Build-Depends-Indep'], + ['Build-Depends', 'Build-Depends-Arch'] + ); + + for my $fields (@to_check) { + my $relation = Lintian::Relation->new->logical_and( + map { $processable->relation($_) }@{$fields}); + + for my $redundant_set ($relation->redundancies) { + + $self->hint( + 'redundant-build-prerequisites', + join(', ', sort @{$redundant_set}) + ); + } + } + + # Make sure build dependencies and conflicts are consistent. + my $build_all = $processable->relation('Build-Depends-All'); + + for my $field ( + qw{Build-Conflicts Build-Conflicts-Indep Build-Conflicts-Arch}) { + + my @conflicts= $processable->fields->trimmed_list($field, qr{\s*,\s*}); + my @contradictions = grep { $build_all->satisfies($_) } @conflicts; + + my $position = $processable->fields->position($field); + my $pointer = $processable->debian_control->item->pointer($position); + + $self->pointed_hint('build-conflicts-with-build-dependency', + $pointer, $field, $_) + for @contradictions; + } + + my (@arch_dep_pkgs, @dbg_pkgs); + for my $installable ($group->get_installables) { + + if ($installable->name =~ m/-dbg$/) { + push(@dbg_pkgs, $installable); + + } elsif ($installable->fields->value('Architecture') ne 'all'){ + push(@arch_dep_pkgs, $installable); + } + } + + my $dstr = join($VERTICAL_BAR, map { quotemeta($_->name) } @arch_dep_pkgs); + my $depregex = qr/^(?:$dstr)$/; + for my $dbg_proc (@dbg_pkgs) { + my $deps = $processable->binary_relation($dbg_proc->name, 'strong'); + my $missing = 1; + $missing = 0 + if $deps->matches($depregex, Lintian::Relation::VISIT_PRED_NAME); + if ($missing && $dbg_proc->is_transitional) { + # If it is a transitional package, allow it to depend + # on another -dbg instead. + $missing = 0 + if $deps->matches(qr/-dbg \Z/xsm, + Lintian::Relation::VISIT_PRED_NAME); + } + $self->hint('dbg-package-missing-depends', $dbg_proc->name) + if $missing; + } + + # Check for a python*-dev build dependency in source packages that + # build only arch: all packages. + if ($arch_dep_packages == 0 and $build_all->satisfies($PYTHON_DEV)) { + $self->hint('build-depends-on-python-dev-with-no-arch-any'); + } + + my $bdepends = $processable->relation('Build-Depends'); + + # libmodule-build-perl + # matches() instead of satisfies() because of possible OR relation + $self->hint('libmodule-build-perl-needs-to-be-in-build-depends') + if $processable->relation('Build-Depends-Indep') + ->equals('libmodule-build-perl', Lintian::Relation::VISIT_PRED_NAME) + && !$bdepends->equals('libmodule-build-perl', + Lintian::Relation::VISIT_PRED_NAME); + + # libmodule-build-tiny-perl + $self->hint('libmodule-build-tiny-perl-needs-to-be-in-build-depends') + if $processable->relation('Build-Depends-Indep') + ->satisfies('libmodule-build-tiny-perl') + && !$bdepends->satisfies('libmodule-build-tiny-perl:any'); + + return; +} + +# splits "foo:bar (>= 1.2.3) [!i386 ia64] <stage1 !nocheck> <cross>" into +# ( "foo", "bar", [ ">=", "1.2.3" ], [ [ "i386", "ia64" ], 1 ], [ [ "stage1", "!nocheck" ] , [ "cross" ] ], "" ) +# ^^^ ^^ +# count of negated arches, if ! was given || +# rest (should always be "" for valid dependencies) +sub _split_dep { + my $dep = shift; + my ($pkg, $dmarch, $version, $darch, $restr) + = ($EMPTY, $EMPTY, [$EMPTY,$EMPTY], [[], 0], []); + + if ($dep =~ s/^\s*([^<\s\[\(]+)\s*//) { + ($pkg, $dmarch) = split(/:/, $1, 2); + $dmarch //= $EMPTY; # Ensure it is defined (in case there is no ":") + } + + if (length $dep) { + if ($dep + =~ s/\s* \( \s* (<<|<=|>=|>>|[=<>]) \s* ([^\s(]+) \s* \) \s*//x) { + @{$version} = ($1, $2); + } + if ($dep && $dep =~ s/\s*\[([^\]]+)\]\s*//) { + my $t = $1; + $darch->[0] = [split /\s+/, $t]; + my $negated = 0; + for my $arch (@{ $darch->[0] }) { + $negated++ if $arch =~ s/^!//; + } + $darch->[1] = $negated; + } + while ($dep && $dep =~ s/\s*<([^>]+)>\s*//) { + my $t = $1; + push(@{$restr}, [split /\s+/, $t]); + } + } + + return ($pkg, $dmarch, $version, $darch, $restr, $dep); +} + +sub check_field { + my ($self, $field, $data) = @_; + + my $processable = $self->processable; + + my $has_default_mta + = $processable->relation($field) + ->equals('default-mta', Lintian::Relation::VISIT_PRED_NAME); + my $has_mail_transport_agent = $processable->relation($field) + ->equals('mail-transport-agent', Lintian::Relation::VISIT_PRED_NAME); + + $self->hint('default-mta-dependency-not-listed-first',"$field: $data") + if $processable->relation($field) + ->matches(qr/\|\s+default-mta/, Lintian::Relation::VISIT_OR_CLAUSE_FULL); + + if ($has_default_mta) { + $self->hint( + 'default-mta-dependency-does-not-specify-mail-transport-agent', + "$field: $data") + unless $has_mail_transport_agent; + } elsif ($has_mail_transport_agent) { + $self->hint( + 'mail-transport-agent-dependency-does-not-specify-default-mta', + "$field: $data") + unless $has_default_mta; + } + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Fields/PackageType.pm b/lib/Lintian/Check/Fields/PackageType.pm new file mode 100644 index 0000000..a8defcd --- /dev/null +++ b/lib/Lintian/Check/Fields/PackageType.pm @@ -0,0 +1,58 @@ +# fields/package_type -- lintian check script (rewrite) -*- perl -*- +# +# Copyright (C) 2004 Marc Brockschmidt +# +# Parts of the code were taken from the old check script, which +# was Copyright (C) 1998 Richard Braakman (also licensed under the +# GPL 2 or higher) +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Fields::PackageType; + +use v5.20; +use warnings; +use utf8; + +use Lintian::Util qw($PKGNAME_REGEX); + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +sub installable { + my ($self) = @_; + + return + unless $self->processable->fields->declares('Package-Type'); + + my $type = $self->processable->fields->value('Package-Type'); + + $self->hint('explicit-default-in-package-type') + if $type eq 'deb'; + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Fields/Priority.pm b/lib/Lintian/Check/Fields/Priority.pm new file mode 100644 index 0000000..91fa6bb --- /dev/null +++ b/lib/Lintian/Check/Fields/Priority.pm @@ -0,0 +1,82 @@ +# fields/priority -- lintian check script (rewrite) -*- perl -*- +# +# Copyright (C) 2004 Marc Brockschmidt +# +# Parts of the code were taken from the old check script, which +# was Copyright (C) 1998 Richard Braakman (also licensed under the +# GPL 2 or higher) +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Fields::Priority; + +use v5.20; +use warnings; +use utf8; + +use List::SomeUtils qw(any); + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +sub always { + my ($self) = @_; + + my $fields = $self->processable->fields; + + return + unless $fields->declares('Priority'); + + my $priority = $fields->unfolded_value('Priority'); + + if ($self->processable->type eq 'source' + || !$self->processable->is_auto_generated) { + + $self->hint('priority-extra-is-replaced-by-priority-optional') + if $priority eq 'extra'; + + # Re-map to optional to avoid an additional warning from + # lintian + $priority = 'optional' + if $priority eq 'extra'; + } + + my $KNOWN_PRIOS = $self->data->load('fields/priorities'); + + $self->hint('unknown-priority', $priority) + unless $KNOWN_PRIOS->recognizes($priority); + + $self->hint('excessive-priority-for-library-package', $priority) + if $self->processable->name =~ /^lib/ + && $self->processable->name !~ /-bin$/ + && $self->processable->name !~ /^libc[0-9.]+$/ + && (any { $_ eq $self->processable->fields->value('Section') } + qw(libdevel libs)) + && (any { $_ eq $priority } qw(required important standard)); + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Fields/Recommended.pm b/lib/Lintian/Check/Fields/Recommended.pm new file mode 100644 index 0000000..2c780b8 --- /dev/null +++ b/lib/Lintian/Check/Fields/Recommended.pm @@ -0,0 +1,142 @@ +# fields/recommended -- lintian check script -*- perl -*- +# +# Copyright (C) 2020-2021 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Fields::Recommended; + +use v5.20; +use warnings; +use utf8; + +use Const::Fast; +use Path::Tiny; + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +const my $AT => q{@}; + +# policy section 5.2 states unequivocally that the two fields Section +# and Priority are recommended not only in the source paragraph, but +# also in the binary paragraphs. + +# in the author's opinion, however, it does not make sense to flag them +# there because the same two fields in the source paragraph provide the +# default for the fields in the binary package paragraph. + +# moreover, such duplicate tags would then trigger the tag +# binary-control-field-duplicates-source elsewhere, which would be +# super confusing + +# policy 5.2 +my @DEBIAN_CONTROL_SOURCE = qw(Section Priority); +my @DEBIAN_CONTROL_INSTALLABLE = qw(); # Section Priority + +# policy 5.3 +my @INSTALLATION_CONTROL = qw(Section Priority); + +# policy 5.4 +my @DSC = qw(Package-List); + +# policy 5.5 +my @CHANGES = qw(Urgency); + +sub source { + my ($self) = @_; + + my $fields = $self->processable->fields; + my @missing_dsc = grep { !$fields->declares($_) } @DSC; + + my $dscfile = path($self->processable->path)->basename; + $self->hint('recommended-field', $dscfile, $_) for @missing_dsc; + + my $debian_control = $self->processable->debian_control; + my $control_item = $debian_control->item; + + # look at d/control source paragraph + my $source_fields = $debian_control->source_fields; + + my @missing_control_source + = grep { !$source_fields->declares($_) }@DEBIAN_CONTROL_SOURCE; + + my $source_position = $source_fields->position; + my $source_pointer = $control_item->pointer($source_position); + + $self->pointed_hint('recommended-field', $source_pointer, + '(in section for source)', $_) + for @missing_control_source; + + # look at d/control installable paragraphs + for my $installable ($debian_control->installables) { + + my $installable_fields + = $debian_control->installable_fields($installable); + + my @missing_control_installable + = grep {!$installable_fields->declares($_)} + @DEBIAN_CONTROL_INSTALLABLE; + + my $installable_position = $installable_fields->position; + my $installable_pointer= $control_item->pointer($installable_position); + + $self->pointed_hint('recommended-field', $installable_pointer, + "(in section for $installable)", $_) + for @missing_control_installable; + } + + return; +} + +sub installable { + my ($self) = @_; + + my $fields = $self->processable->fields; + + my @missing_installation_control + = grep { !$fields->declares($_) } @INSTALLATION_CONTROL; + + my $debfile = path($self->processable->path)->basename; + $self->hint('recommended-field', $debfile, $_) + for @missing_installation_control; + + return; +} + +sub changes { + my ($self) = @_; + + my $fields = $self->processable->fields; + + my @missing_changes = grep { !$fields->declares($_) } @CHANGES; + + my $changesfile = path($self->processable->path)->basename; + $self->hint('recommended-field', $changesfile, $_) for @missing_changes; + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Fields/Required.pm b/lib/Lintian/Check/Fields/Required.pm new file mode 100644 index 0000000..6821755 --- /dev/null +++ b/lib/Lintian/Check/Fields/Required.pm @@ -0,0 +1,141 @@ +# fields/required -- lintian check script -*- perl -*- +# +# Copyright (C) 2020 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Fields::Required; + +use v5.20; +use warnings; +use utf8; + +use Const::Fast; +use Path::Tiny; + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +const my $AT => q{@}; + +# policy 5.2 +my @DEBIAN_CONTROL_SOURCE = qw(Source Maintainer Standards-Version); +my @DEBIAN_CONTROL_INSTALLABLE = qw(Package Architecture Description); + +# policy 5.3 +my @INSTALLATION_CONTROL + = qw(Package Version Architecture Maintainer Description); + +# policy 5.4 +my @DSC = qw(Format Source Version Maintainer Standards-Version + Checksums-Sha1 Checksums-Sha256 Files); + +# policy 5.5 +# Binary and Description were removed, see Bug#963524 +my @CHANGES = qw(Format Date Source Architecture Version Distribution + Maintainer Changes Checksums-Sha1 Checksums-Sha256 Files); + +sub source { + my ($self) = @_; + + #my $all_udeb = 1; + #$all_udeb = 0 + # if any { + # $debian_control->installable_package_type($_) ne 'udeb' + # } + # $debian_control->installables; + + my $fields = $self->processable->fields; + my @missing_dsc = grep { !$fields->declares($_) } @DSC; + + my $dscfile = path($self->processable->path)->basename; + $self->hint('required-field', $dscfile, $_) for @missing_dsc; + + my $debian_control = $self->processable->debian_control; + my $control_item = $debian_control->item; + + # look at d/control source paragraph + my $source_fields = $debian_control->source_fields; + + my @missing_control_source + = grep { !$source_fields->declares($_) }@DEBIAN_CONTROL_SOURCE; + + my $source_position = $source_fields->position; + my $source_pointer = $control_item->pointer($source_position); + + $self->pointed_hint('required-field', $source_pointer, + '(in section for source)', $_) + for @missing_control_source; + + # look at d/control installable paragraphs + for my $installable ($debian_control->installables) { + + my $installable_fields + = $debian_control->installable_fields($installable); + + my @missing_control_installable + = grep {!$installable_fields->declares($_)} + @DEBIAN_CONTROL_INSTALLABLE; + + my $installable_position = $installable_fields->position; + my $installable_pointer= $control_item->pointer($installable_position); + + $self->pointed_hint('required-field', $installable_pointer, + "(in section for $installable)", $_) + for @missing_control_installable; + } + + return; +} + +sub installable { + my ($self) = @_; + + my $fields = $self->processable->fields; + + my @missing_installation_control + = grep { !$fields->declares($_) } @INSTALLATION_CONTROL; + + my $debfile = path($self->processable->path)->basename; + $self->hint('required-field', $debfile, $_) + for @missing_installation_control; + + return; +} + +sub changes { + my ($self) = @_; + + my $fields = $self->processable->fields; + + my @missing_changes = grep { !$fields->declares($_) } @CHANGES; + + my $changesfile = path($self->processable->path)->basename; + $self->hint('required-field', $changesfile, $_) for @missing_changes; + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Fields/Section.pm b/lib/Lintian/Check/Fields/Section.pm new file mode 100644 index 0000000..14bd934 --- /dev/null +++ b/lib/Lintian/Check/Fields/Section.pm @@ -0,0 +1,139 @@ +# fields/section -- lintian check script (rewrite) -*- perl -*- +# +# Copyright (C) 2004 Marc Brockschmidt +# +# Parts of the code were taken from the old check script, which +# was Copyright (C) 1998 Richard Braakman (also licensed under the +# GPL 2 or higher) +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Fields::Section; + +use v5.20; +use warnings; +use utf8; + +use Const::Fast; + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +const my $EMPTY => q{}; + +our %KNOWN_ARCHIVE_PARTS = map { $_ => 1 } qw(non-free contrib); + +sub udeb { + my ($self) = @_; + + my $section = $self->processable->fields->unfolded_value('Section'); + + $self->hint('wrong-section-for-udeb', $section) + unless $section eq 'debian-installer'; + + return; +} + +sub always { + my ($self) = @_; + + my $pkg = $self->processable->name; + + return + unless $self->processable->fields->declares('Section'); + + my $KNOWN_SECTIONS = $self->data->sections; + + # Mapping of package names to section names + my $NAME_SECTION_MAPPINGS + = $self->data->load('fields/name_section_mappings',qr/\s*=>\s*/); + + my $section = $self->processable->fields->unfolded_value('Section'); + + return + if $self->processable->type eq 'udeb'; + + my @parts = split(m{/}, $section, 2); + + my $division; + $division = $parts[0] + if @parts > 1; + + my $fraction = $parts[-1]; + + if (defined $division) { + $self->hint('unknown-section', $section) + unless $KNOWN_ARCHIVE_PARTS{$division}; + } + + if ($fraction eq 'unknown' && !length $division) { + $self->hint('section-is-dh_make-template'); + } else { + $self->hint('unknown-section', $section) + unless $KNOWN_SECTIONS->recognizes($fraction); + } + + # Check package name <-> section. oldlibs is a special case; let + # anything go there. + if ($fraction ne 'oldlibs') { + + for my $pattern ($NAME_SECTION_MAPPINGS->all()) { + + my $want = $NAME_SECTION_MAPPINGS->value($pattern); + + next + unless $pkg =~ m{$pattern}x; + + unless ($fraction eq $want) { + + my $better + = (defined $division ? "$division/" : $EMPTY) . $want; + $self->hint('wrong-section-according-to-package-name', + "$section => $better"); + } + + last; + } + } + + if ($fraction eq 'debug') { + + $self->hint('wrong-section-according-to-package-name', $section) + if $pkg !~ /-dbg(?:sym)?$/; + } + + if ($self->processable->is_transitional) { + + my $priority = $self->processable->fields->unfolded_value('Priority'); + + $self->hint('transitional-package-not-oldlibs-optional', + "$fraction/$priority") + unless $priority eq 'optional' && $fraction eq 'oldlibs'; + } + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Fields/Source.pm b/lib/Lintian/Check/Fields/Source.pm new file mode 100644 index 0000000..455bba3 --- /dev/null +++ b/lib/Lintian/Check/Fields/Source.pm @@ -0,0 +1,99 @@ +# fields/source -- lintian check script (rewrite) -*- perl -*- +# +# Copyright (C) 2004 Marc Brockschmidt +# +# Parts of the code were taken from the old check script, which +# was Copyright (C) 1998 Richard Braakman (also licensed under the +# GPL 2 or higher) +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Fields::Source; + +use v5.20; +use warnings; +use utf8; + +use Const::Fast; +use Path::Tiny; +use Unicode::UTF8 qw(encode_utf8); + +use Lintian::Util qw($PKGNAME_REGEX); + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +const my $UNDERSCORE => q{_}; + +sub source { + my ($self) = @_; + + my $fields = $self->processable->fields; + + # required in source packages, but dpkg-source already refuses to unpack + # without this field (and fields depends on unpacked) + return + unless $fields->declares('Source'); + + my $source = $fields->unfolded_value('Source'); + + my $basename = path($self->processable->path)->basename; + my ($stem) = split($UNDERSCORE, $basename, 2); + + die encode_utf8( + "Source field does not match package name $source != $stem") + if $source ne $stem; + + $self->hint('source-field-malformed', $source) + if $source !~ /^[a-z0-9][-+\.a-z0-9]+\z/; + + return; +} + +sub always { + my ($self) = @_; + + # treated separately above + return + if $self->processable->type eq 'source'; + + my $fields = $self->processable->fields; + + # optional in binary packages + return + unless $fields->declares('Source'); + + my $source = $fields->unfolded_value('Source'); + + $self->hint('source-field-malformed', $source) + unless $source =~ m{^ $PKGNAME_REGEX + \s* + # Optional Version e.g. (1.0) + (?:\((?:\d+:)?(?:[-\.+:a-zA-Z0-9~]+?)(?:-[\.+a-zA-Z0-9~]+)?\))?\s*$}x; + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Fields/StandardsVersion.pm b/lib/Lintian/Check/Fields/StandardsVersion.pm new file mode 100644 index 0000000..aae1442 --- /dev/null +++ b/lib/Lintian/Check/Fields/StandardsVersion.pm @@ -0,0 +1,164 @@ +# fields/standards-version -- lintian check script -*- perl -*- + +# Copyright (C) 1998 Christian Schwarz and Richard Braakman +# Copyright (C) 2008-2009 Russ Allbery +# Copyright (C) 2020 Chris Lamb <lamby@debian.org> +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Fields::StandardsVersion; + +use v5.20; +use warnings; +use utf8; + +use Const::Fast; +use Date::Parse qw(str2time); +use List::SomeUtils qw(any first_value); +use POSIX qw(strftime); +use Sort::Versions; +use Unicode::UTF8 qw(encode_utf8); + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +const my $EMPTY => q{}; +const my $DOT => q{.}; + +const my $MAXIMUM_COMPONENTS_ANALYZED => 3; + +const my $DATE_ONLY => '%Y-%m-%d'; +const my $DATE_AND_TIME => '%Y-%m-%d %H:%M:%S UTC'; + +sub source { + my ($self) = @_; + + return + unless $self->processable->fields->declares('Standards-Version'); + + my $compliance_standard + = $self->processable->fields->value('Standards-Version'); + + my @compliance_components = split(/[.]/, $compliance_standard); + if (@compliance_components < $MAXIMUM_COMPONENTS_ANALYZED + || any { !/^\d+$/ } @compliance_components) { + + $self->hint('invalid-standards-version', $compliance_standard); + return; + } + + $self->hint('standards-version', $compliance_standard); + + my ($compliance_major, $compliance_minor, $compliance_patch) + = @compliance_components; + my $compliance_normalized + = $compliance_major. $DOT. $compliance_minor. $DOT. $compliance_patch; + + my $policy_releases = $self->data->policy_releases; + my $latest_standard = $policy_releases->latest_version; + + my ($latest_major, $latest_minor, $latest_patch) + = split(/[.]/, $latest_standard, $MAXIMUM_COMPONENTS_ANALYZED); + + # a fourth digit is a non-normative change in policy + my $latest_normalized + = $latest_major . $DOT . $latest_minor . $DOT . $latest_patch; + + my $changelog_epoch; + my $distribution; + + my ($entry) = @{$self->processable->changelog->entries}; + if (defined $entry) { + $changelog_epoch = $entry->Timestamp; + $distribution = $entry->Distribution; + } + + # assume recent date if there is no changelog; activates most tags + $changelog_epoch //= $policy_releases->epoch($latest_standard); + $distribution //= $EMPTY; + + unless ($policy_releases->is_known($compliance_standard)) { + + # could be newer + if (versioncmp($compliance_standard, $latest_standard) == 1) { + + $self->hint('newer-standards-version', + "$compliance_standard (current is $latest_standard)") + unless $distribution =~ /backports/; + + } else { + $self->hint('invalid-standards-version', $compliance_standard); + } + + return; + } + + my $compliance_epoch = $policy_releases->epoch($compliance_standard); + + my $changelog_date = strftime($DATE_ONLY, gmtime $changelog_epoch); + my $compliance_date = strftime($DATE_ONLY, gmtime $compliance_epoch); + + my $changelog_timestamp= strftime($DATE_AND_TIME, gmtime $changelog_epoch); + my $compliance_timestamp + = strftime($DATE_AND_TIME, gmtime $compliance_epoch); + + # catch packages dated prior to release of their standard + if ($compliance_epoch > $changelog_epoch) { + + # show precision if needed + my $warp_illustration = "($changelog_date < $compliance_date)"; + $warp_illustration = "($changelog_timestamp < $compliance_timestamp)" + if $changelog_date eq $compliance_date; + + $self->hint('timewarp-standards-version', $warp_illustration) + unless $distribution eq 'UNRELEASED'; + } + + my @newer_versions = List::SomeUtils::before { + $policy_releases->epoch($_) <= $compliance_epoch + } + @{$policy_releases->ordered_versions}; + + # a fourth digit is a non-normative change in policy + my @newer_normative_versions + = grep { /^ \d+ [.] \d+ [.] \d+ (?:[.] 0)? $/sx } @newer_versions; + + my @newer_normative_epochs + = map { $policy_releases->epoch($_) } @newer_normative_versions; + + my @normative_epochs_then_known + = grep { $_ <= $changelog_epoch } @newer_normative_epochs; + + my $outdated_illustration + = "$compliance_standard (released $compliance_date) (current is $latest_standard)"; + + # use normative to prevent tag changes on minor new policy edits + $self->hint('out-of-date-standards-version', $outdated_illustration) + if @normative_epochs_then_known; + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Fields/Style.pm b/lib/Lintian/Check/Fields/Style.pm new file mode 100644 index 0000000..fe82d22 --- /dev/null +++ b/lib/Lintian/Check/Fields/Style.pm @@ -0,0 +1,84 @@ +# fields/style -- lintian check script -*- perl -*- +# +# Copyright (C) 2020-2021 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Fields::Style; + +use v5.20; +use warnings; +use utf8; + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +# the fields in d/control provide the values for many fields elsewhere +sub source { + my ($self) = @_; + + my $debian_control = $self->processable->debian_control; + my $control_item = $debian_control->item; + + # look at d/control source paragraph + my $source_fields = $debian_control->source_fields; + + $self->check_style($source_fields, $control_item); + + for my $installable ($debian_control->installables) { + + # look at d/control installable paragraphs + my $installable_fields + = $debian_control->installable_fields($installable); + + $self->check_style($installable_fields, $control_item); + } + + return; +} + +sub check_style { + my ($self, $fields, $item) = @_; + + for my $name ($fields->names) { + + # title-case the field name + my $standard = lc $name; + $standard =~ s/\b(\w)/\U$1/g; + + # capitalize up to three letters after an X, if followed by hyphen + $standard =~ s/^(X[SBC]{1,3})-/\U$1-/i; + + my $position = $fields->position($name); + my $pointer = $item->pointer($position); + + $self->pointed_hint('cute-field', $pointer, "$name vs $standard") + unless $name eq $standard; + } + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Fields/Subarchitecture.pm b/lib/Lintian/Check/Fields/Subarchitecture.pm new file mode 100644 index 0000000..185f601 --- /dev/null +++ b/lib/Lintian/Check/Fields/Subarchitecture.pm @@ -0,0 +1,55 @@ +# fields/subarchitecture -- lintian check script (rewrite) -*- perl -*- +# +# Copyright (C) 2004 Marc Brockschmidt +# +# Parts of the code were taken from the old check script, which +# was Copyright (C) 1998 Richard Braakman (also licensed under the +# GPL 2 or higher) +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Fields::Subarchitecture; + +use v5.20; +use warnings; +use utf8; + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +sub always { + my ($self) = @_; + + my $fields = $self->processable->fields; + + #---- Subarchitecture (udeb) + + # may trigger unfolding tag + my $subarch = $fields->unfolded_value('Subarchitecture'); + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Fields/TerminalControl.pm b/lib/Lintian/Check/Fields/TerminalControl.pm new file mode 100644 index 0000000..0d2b02b --- /dev/null +++ b/lib/Lintian/Check/Fields/TerminalControl.pm @@ -0,0 +1,62 @@ +# fields/terminal-control -- lintian check script -*- perl -*- +# +# Copyright (C) 2020 Felix Lechner +# +# Parts of the code were taken from the old check script, which +# was Copyright (C) 1998 Richard Braakman (also licensed under the +# GPL 2 or higher) +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Fields::TerminalControl; + +use v5.20; +use warnings; +use utf8; + +use Const::Fast; + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +const my $ESCAPE => qq{\033}; + +sub always { + my ($self) = @_; + + my @names = $self->processable->fields->names; + + # fields that contain ESC characters + my @escaped + = grep { index($self->processable->fields->value($_), $ESCAPE) >= 0 } + @names; + + $self->hint('ansi-escape', $_, $self->processable->fields->value($_)) + for @escaped; + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Fields/Trimmed.pm b/lib/Lintian/Check/Fields/Trimmed.pm new file mode 100644 index 0000000..24777f7 --- /dev/null +++ b/lib/Lintian/Check/Fields/Trimmed.pm @@ -0,0 +1,52 @@ +# fields/trimmed -- lintian check script -*- perl -*- +# +# Copyright (C) 2020 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Fields::Trimmed; + +use v5.20; +use warnings; +use utf8; + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +sub always { + my ($self) = @_; + + my @all = $self->processable->fields->names; + + for my $name (@all) { + + my $value = $self->processable->fields->value($name); + $self->hint('trimmed-field', $name, $value); + } + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Fields/Unknown.pm b/lib/Lintian/Check/Fields/Unknown.pm new file mode 100644 index 0000000..554537e --- /dev/null +++ b/lib/Lintian/Check/Fields/Unknown.pm @@ -0,0 +1,77 @@ +# fields/unknown -- lintian check script (rewrite) -*- perl -*- +# +# Copyright (C) 2004 Marc Brockschmidt +# +# Parts of the code were taken from the old check script, which +# was Copyright (C) 1998 Richard Braakman (also licensed under the +# GPL 2 or higher) +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Fields::Unknown; + +use v5.20; +use warnings; +use utf8; + +use Path::Tiny; + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +sub source { + my ($self) = @_; + + my $KNOWN_SOURCE_FIELDS= $self->data->load('common/source-fields'); + my @unknown= $self->processable->fields->extra($KNOWN_SOURCE_FIELDS->all); + + $self->hint('unknown-field', $_)for @unknown; + + return; +} + +sub binary { + my ($self) = @_; + + my $KNOWN_BINARY_FIELDS= $self->data->load('fields/binary-fields'); + my @unknown= $self->processable->fields->extra($KNOWN_BINARY_FIELDS->all); + + $self->hint('unknown-field', $_)for @unknown; + + return; +} + +sub udeb { + my ($self) = @_; + + my $KNOWN_UDEB_FIELDS = $self->data->load('fields/udeb-fields'); + my @unknown = $self->processable->fields->extra($KNOWN_UDEB_FIELDS->all); + + $self->hint('unknown-field', $_)for @unknown; + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Fields/Uploaders.pm b/lib/Lintian/Check/Fields/Uploaders.pm new file mode 100644 index 0000000..bfad0c4 --- /dev/null +++ b/lib/Lintian/Check/Fields/Uploaders.pm @@ -0,0 +1,71 @@ +# fields/uploaders -- lintian check script (rewrite) -*- perl -*- +# +# Copyright (C) 2004 Marc Brockschmidt +# +# Parts of the code were taken from the old check script, which +# was Copyright (C) 1998 Richard Braakman (also licensed under the +# GPL 2 or higher) +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Fields::Uploaders; + +use v5.20; +use warnings; +use utf8; + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +sub always { + my ($self) = @_; + + return + unless $self->processable->fields->declares('Uploaders'); + + my $uploaders = $self->processable->fields->value('Uploaders'); + + # Note, not expected to hit on uploaders anymore, as dpkg + # now strips newlines for the .dsc, and the newlines don't + # hurt in debian/control + + # check for empty field see #783628 + if ($uploaders =~ /,\s*,/) { + $self->hint('uploader-name-missing','you have used a double comma'); + $uploaders =~ s/,\s*,/,/g; + } + + if ($self->processable->fields->declares('Maintainer')) { + + my $maintainer = $self->processable->fields->value('Maintainer'); + + $self->hint('maintainer-also-in-uploaders') + if $uploaders =~ m/\Q$maintainer/; + } + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Fields/Urgency.pm b/lib/Lintian/Check/Fields/Urgency.pm new file mode 100644 index 0000000..7e87309 --- /dev/null +++ b/lib/Lintian/Check/Fields/Urgency.pm @@ -0,0 +1,60 @@ +# fields/urgency -- lintian check script -*- perl -*- + +# Copyright (C) 2020 Felix Lechner +# +# This program is free software. It is distributed under the terms of +# the GNU General Public License as published by the Free Software +# Foundation; either version 2 of the License, or (at your option) any +# later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Fields::Urgency; + +use v5.20; +use warnings; +use utf8; + +use List::SomeUtils qw(any); + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +sub changes { + my ($self) = @_; + + return + unless $self->processable->fields->declares('Urgency'); + + my $urgency = $self->processable->fields->value('Urgency'); + + # translate to lowercase + my $lowercase = lc $urgency; + + # discard anything after the first word + $lowercase =~ s/ .*//; + + $self->hint('bad-urgency-in-changes-file', $urgency) + unless any { $lowercase =~ $_ } qw(low medium high critical emergency); + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Fields/Vcs.pm b/lib/Lintian/Check/Fields/Vcs.pm new file mode 100644 index 0000000..54f6d49 --- /dev/null +++ b/lib/Lintian/Check/Fields/Vcs.pm @@ -0,0 +1,386 @@ +# fields/vcs -- lintian check script (rewrite) -*- perl -*- +# +# Copyright (C) 2004 Marc Brockschmidt +# Copyright (C) 2019 Chris Lamb <lamby@debian.org> +# +# Parts of the code were taken from the old check script, which +# was Copyright (C) 1998 Richard Braakman (also licensed under the +# GPL 2 or higher) +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Fields::Vcs; + +use v5.20; +use warnings; +use utf8; + +use Const::Fast; +use List::SomeUtils qw(any); + +const my $EMPTY => q{}; +const my $QUESTION_MARK => q{?}; + +const my $NOT_EQUALS => q{!=}; + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +my %VCS_EXTRACT = ( + Browser => sub { return @_;}, + Arch => sub { return @_;}, + Bzr => sub { return @_;}, + # cvs rootdir followed by optional module name: + Cvs => sub { return shift =~ /^(.+?)(?:\s+(\S*))?$/;}, + Darcs => sub { return @_;}, + # hg uri followed by optional -b branchname + Hg => sub { return shift =~ /^(.+?)(?:\s+-b\s+(\S*))?$/;}, + # git uri followed by optional "[subdir]", "-b branchname" etc. + Git => + sub { return shift =~ /^(.+?)(?:\s+\[(\S*)\])?(?:\s+-b\s+(\S*))?$/;}, + Svn => sub { return @_;}, + # New "mtn://host?branch" uri or deprecated "host branch". + Mtn => sub { return shift =~ /^(.+?)(?:\s+\S+)?$/;}, +); + +my %VCS_CANONIFY = ( + Browser => sub { + $_[0] =~ s{https?://svn\.debian\.org/wsvn/} + {https://anonscm.debian.org/viewvc/}; + $_[0] =~ s{https?\Q://git.debian.org/?p=\E} + {https://anonscm.debian.org/git/}; + $_[0] =~ s{https?\Q://bzr.debian.org/loggerhead/\E} + {https://anonscm.debian.org/loggerhead/}; + $_[0] =~ s{https?\Q://salsa.debian.org/\E([^/]+/[^/]+)\.git/?$} + {https://salsa.debian.org/$1}; + + if ($_[0] =~ m{https?\Q://anonscm.debian.org/viewvc/\E}xsm) { + if ($_[0] =~ s{\?(.*[;\&])?op=log(?:[;\&](.*))?\Z}{}xsm) { + my (@keep) = ($1, $2, $3); + my $final = join($EMPTY, grep {defined} @keep); + + $_[0] .= $QUESTION_MARK . $final + if $final ne $EMPTY; + + $_[1] = 'vcs-field-bitrotted'; + } + } + }, + Cvs => sub { + 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/}; + }, + Arch => sub { + $_[0] =~ s{https?\Q://arch.debian.org/arch/\E} + {https://anonscm.debian.org/arch/}; + }, + Bzr => sub { + $_[0] =~ s{https?\Q://bzr.debian.org/\E} + {https://anonscm.debian.org/bzr/}; + $_[0] =~ s{https?\Q://anonscm.debian.org/bzr/bzr/\E} + {https://anonscm.debian.org/bzr/}; + }, + Git => sub { + if ( + $_[0] =~ s{git://(?:git|anonscm)\.debian\.org/~} + {https://anonscm.debian.org/git/users/} + ) { + $_[1] = 'vcs-git-uses-invalid-user-uri'; + } + $_[0] =~ s{(https?://.*?\.git)(?:\.git)+$}{$1}; + $_[0] =~ s{https?\Q://git.debian.org/\E(?:git/?)?} + {https://anonscm.debian.org/git/}; + $_[0] =~ s{https?\Q://anonscm.debian.org/git/git/\E} + {https://anonscm.debian.org/git/}; + $_[0] =~ s{\Qgit://git.debian.org/\E(?:git/?)?} + {https://anonscm.debian.org/git/}; + $_[0] =~ s{\Qgit://anonscm.debian.org/git/\E} + {https://anonscm.debian.org/git/}; + $_[0] =~ s{https?\Q://salsa.debian.org/\E([^/]+/[^/\.]+)(?!\.git)$} + {https://salsa.debian.org/$1.git}; + }, + Hg => sub { + $_[0] =~ s{https?\Q://hg.debian.org/\E} + {https://anonscm.debian.org/hg/}; + $_[0] =~ s{https?\Q://anonscm.debian.org/hg/hg/\E} + {https://anonscm.debian.org/hg/}; + }, + Svn => sub { + $_[0] =~ s{\Qsvn://cvs.alioth.debian.org/\E} + {svn://anonscm.debian.org/}; + $_[0] =~ s{\Qsvn://svn.debian.org/\E} + {svn://anonscm.debian.org/}; + $_[0] =~ s{\Qsvn://anonscm.debian.org/svn/\E} + {svn://anonscm.debian.org/}; + }, +); + +# Valid URI formats for the Vcs-* fields +# currently only checks the protocol, not the actual format of the URI +my %VCS_RECOMMENDED_URIS = ( + Browser => qr{^https?://}, + Arch => qr{^https?://}, + Bzr => qr{^(?:lp:|(?:nosmart\+)?https?://)}, + Cvs => qr{^:(?:pserver:|ext:_?anoncvs)}, + Darcs => qr{^https?://}, + Hg => qr{^https?://}, + Git => qr{^(?:git|https?|rsync)://}, + Svn => qr{^(?:svn|(?:svn\+)?https?)://}, + Mtn => qr{^mtn://}, +); + +my %VCS_VALID_URIS = ( + Arch => qr{^https?://}, + Bzr => qr{^(?:sftp|(?:bzr\+)?ssh)://}, + Cvs => qr{^(?:-d\s*)?:(?:ext|pserver):}, + Hg => qr{^ssh://}, + Git => qr{^(?:git\+)?ssh://|^[\w.]+@[a-zA-Z0-9.]+:[/a-zA-Z0-9.]}, + Svn => qr{^(?:svn\+)?ssh://}, + Mtn => qr{^[\w.-]+$}, +); + +has VCS_HOSTERS_BY_PATTERN => ( + is => 'rw', + lazy => 1, + default => sub { + my ($self) = @_; + + my %vcs_hosters_by_pattern; + + my $KNOWN_VCS_HOSTERS + = $self->data->load('fields/vcs-hosters',qr/\s*~~\s*/); + + for my $pattern ($KNOWN_VCS_HOSTERS->all) { + + my @known_hosters + = split(m{,}, $KNOWN_VCS_HOSTERS->value($pattern)); + $vcs_hosters_by_pattern{$pattern} = \@known_hosters; + } + + return \%vcs_hosters_by_pattern; + } +); + +sub always { + my ($self) = @_; + + my $type = $self->processable->type; + my $processable = $self->processable; + + # team-maintained = maintainer or uploaders field contains a mailing list + my $is_teammaintained = 0; + my $team_email = $EMPTY; + # co-maintained = maintained by an informal group of people, + # i. e. >= 1 uploader and not team-maintained + my $is_comaintained = 0; + my $is_maintained_by_individual = 1; + my $num_uploaders = 0; + for my $field (qw(Maintainer Uploaders)) { + + next + unless $processable->fields->declares($field); + + my $maintainer = $processable->fields->unfolded_value($field); + + my $is_list + = $maintainer =~ /\b(\S+\@lists(?:\.alioth)?\.debian\.org)\b/; + if ($is_list) { + $is_teammaintained = 1; + $team_email = $1; + $is_maintained_by_individual = 0; + } + + if ($field eq 'Uploaders') { + + # check for empty field see #783628 + $maintainer =~ s/,\s*,/,/g + if $maintainer =~ m/,\s*,/; + + my @uploaders = map { split /\@\S+\K\s*,\s*/ } + split />\K\s*,\s*/, $maintainer; + + $num_uploaders = scalar @uploaders; + + if (@uploaders) { + $is_comaintained = 1 + unless $is_teammaintained; + $is_maintained_by_individual = 0; + } + + } + } + + $self->hint('package-is-team-maintained', $team_email, + "(with $num_uploaders uploaders)") + if $is_teammaintained; + $self->hint('package-is-co-maintained', "(with $num_uploaders uploaders)") + if $is_comaintained; + $self->hint('package-is-maintained-by-individual') + if $is_maintained_by_individual; + + my %seen_vcs; + for my $platform (keys %VCS_EXTRACT) { + + my $splitter = $VCS_EXTRACT{$platform}; + + my $fieldname = "Vcs-$platform"; + my $maintainer = $processable->fields->value('Maintainer'); + + next + unless $processable->fields->declares($fieldname); + + my $uri = $processable->fields->unfolded_value($fieldname); + + my @parts = $splitter->($uri); + if (not @parts or not $parts[0]) { + $self->hint('vcs-field-uses-unknown-uri-format', $platform, $uri); + } else { + if ( $VCS_RECOMMENDED_URIS{$platform} + and $parts[0] !~ $VCS_RECOMMENDED_URIS{$platform}) { + if ( $VCS_VALID_URIS{$platform} + and $parts[0] =~ $VCS_VALID_URIS{$platform}) { + $self->hint('vcs-field-uses-not-recommended-uri-format', + $platform, $uri); + } else { + $self->hint('vcs-field-uses-unknown-uri-format', + $platform,$uri); + } + } + + $self->hint('vcs-field-has-unexpected-spaces', $platform, $uri) + if (any { $_ and /\s/} @parts); + + $self->hint('vcs-field-uses-insecure-uri', $platform, $uri) + if $parts[0] =~ m{^(?:git|(?:nosmart\+)?http|svn)://} + || $parts[0] =~ m{^(?:lp|:pserver):}; + } + + if ($VCS_CANONIFY{$platform}) { + + my $canonicalized = $parts[0]; + my $tag = 'vcs-field-not-canonical'; + + foreach my $canonify ($VCS_CANONIFY{$platform}) { + $canonify->($canonicalized, $tag); + } + + $self->hint($tag, $platform, $parts[0], $canonicalized) + unless $canonicalized eq $parts[0]; + } + + if ($platform eq 'Browser') { + + $self->hint('vcs-browser-links-to-empty-view', $uri) + if $uri =~ /rev=0&sc=0/; + + } else { + $self->hint('vcs', lc $platform); + $self->hint('vcs-uri', $platform, $uri); + $seen_vcs{$platform}++; + + for my $pattern (keys %{$self->VCS_HOSTERS_BY_PATTERN}) { + + # warn once + my $known_hoster + = @{$self->VCS_HOSTERS_BY_PATTERN->{$pattern}}[0]; + + $self->hint('vcs-field-mismatch', + "Vcs-$platform", $NOT_EQUALS, "Vcs-$known_hoster",$uri) + if $uri =~ m/^ $pattern /xi + && $platform ne $known_hoster + && $platform ne 'Browser'; + } + } + + if ($uri =~ m{//(.+)\.debian\.org/}) { + + $self->hint('vcs-obsolete-in-debian-infrastructure', + $platform, $uri) + unless $1 =~ m{^(?:salsa|.*\.dgit)$}; + + } + + # orphaned + if ($maintainer =~ /packages\@qa.debian.org/ && $platform ne 'Browser') + { + if ($uri =~ m{//(?:.+)\.debian\.org/}) { + + $self->hint('orphaned-package-maintained-in-private-space', + $fieldname, $uri) + unless $uri =~ m{//salsa\.debian\.org/debian/} + || $uri =~ m{//git\.dgit\.debian\.org/}; + + } else { + + $self->hint( + 'orphaned-package-not-maintained-in-debian-infrastructure', + $fieldname, $uri + ); + } + } + + $self->hint('old-dpmt-vcs', $platform) + if $maintainer =~ m{python-modules-team\@lists\.alioth\.debian\.org} + and $uri !~ m{salsa.debian.org/python-team/packages/.+}; + + $self->hint('old-papt-vcs', $platform) + if $maintainer =~ m{python-apps-team\@lists\.alioth\.debian\.org} + and $uri !~ m{salsa.debian.org/python-team/packages/.+}; + } + + $self->hint('vcs-fields-use-more-than-one-vcs', + (sort map { lc } keys %seen_vcs)) + if keys %seen_vcs > 1; + + $self->hint('co-maintained-package-with-no-vcs-fields') + if $type eq 'source' + and ($is_comaintained or $is_teammaintained) + and not %seen_vcs; + + # Check for missing Vcs-Browser headers + unless ($processable->fields->declares('Vcs-Browser')) { + + for my $pattern (keys %{$self->VCS_HOSTERS_BY_PATTERN}) { + + # warn once + my $platform = @{$self->VCS_HOSTERS_BY_PATTERN->{$pattern}}[0]; + + my $fieldname = "Vcs-$platform"; + my $url = $processable->fields->value($fieldname); + + $self->hint('missing-vcs-browser-field', $fieldname, $url) + if $url =~ m/^ $pattern /xi; + } + } + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Fields/Version.pm b/lib/Lintian/Check/Fields/Version.pm new file mode 100644 index 0000000..77ee0f9 --- /dev/null +++ b/lib/Lintian/Check/Fields/Version.pm @@ -0,0 +1,100 @@ +# fields/version -- lintian check script (rewrite) -*- perl -*- +# +# Copyright (C) 2004 Marc Brockschmidt +# Copyright (C) 2021 Felix Lechner +# +# Parts of the code were taken from the old check script, which +# was Copyright (C) 1998 Richard Braakman (also licensed under the +# GPL 2 or higher) +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Fields::Version; + +use v5.20; +use warnings; +use utf8; + +use Dpkg::Version; + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +sub always { + my ($self) = @_; + + my $fields = $self->processable->fields; + + return + unless $fields->declares('Version'); + + my $version = $fields->unfolded_value('Version'); + + my $dversion = Dpkg::Version->new($version); + unless ($dversion->is_valid) { + $self->hint('bad-version-number', $version); + return; + } + + my ($epoch, $upstream, $debian) + = ($dversion->epoch, $dversion->version, $dversion->revision); + + # Dpkg::Version sets the debian revision to 0 if there is + # no revision. So we need to check if the raw version + # ends with "-0". + $self->hint('debian-revision-is-zero', $version) + if $version =~ /-0$/; + + my $ubuntu; + if($debian =~ /^(?:[^.]+)(?:\.[^.]+)?(?:\.[^.]+)?(\..*)?$/){ + my $extra = $1; + if ( + defined $extra + && $debian =~ m{\A + (?:[^.]+ubuntu[^.]+)(?:\.\d+){1,3}(\..*)? + \Z}xsm + ) { + $ubuntu = 1; + $extra = $1; + } + + $self->hint('debian-revision-not-well-formed', $version) + if defined $extra; + + } else { + $self->hint('debian-revision-not-well-formed', $version); + } + + if ($self->processable->type eq 'source') { + + $self->hint('binary-nmu-debian-revision-in-source', $version) + if ($debian =~ /^[^.-]+\.[^.-]+\./ && !$ubuntu) + || $version =~ /\+b\d+$/; + } + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Fields/Version/Derivative.pm b/lib/Lintian/Check/Fields/Version/Derivative.pm new file mode 100644 index 0000000..9385fa4 --- /dev/null +++ b/lib/Lintian/Check/Fields/Version/Derivative.pm @@ -0,0 +1,82 @@ +# fields/version/derivative -- lintian check script (rewrite) -*- perl -*- +# +# Copyright (C) 2004 Marc Brockschmidt +# Copyright (C) 2021 Felix Lechner +# +# Parts of the code were taken from the old check script, which +# was Copyright (C) 1998 Richard Braakman (also licensed under the +# GPL 2 or higher) +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Fields::Version::Derivative; + +use v5.20; +use warnings; +use utf8; + +use Dpkg::Version; + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +sub source { + my ($self) = @_; + + my $fields = $self->processable->fields; + + return + unless $fields->declares('Version'); + + my $version = $fields->unfolded_value('Version'); + + my $dversion = Dpkg::Version->new($version); + return + unless $dversion->is_valid; + + my ($epoch, $upstream, $debian) + = ($dversion->epoch, $dversion->version, $dversion->revision); + + my $DERIVATIVE_VERSIONS + = $self->data->load('fields/derivative-versions',qr/\s*~~\s*/); + + unless ($self->processable->native) { + + for my $pattern ($DERIVATIVE_VERSIONS->all) { + + next + if $version =~ m/$pattern/; + + my $explanation = $DERIVATIVE_VERSIONS->value($pattern); + + $self->hint('invalid-version-number-for-derivative', + $version,"($explanation)"); + } + } + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Fields/Version/Repack/Count.pm b/lib/Lintian/Check/Fields/Version/Repack/Count.pm new file mode 100644 index 0000000..c793385 --- /dev/null +++ b/lib/Lintian/Check/Fields/Version/Repack/Count.pm @@ -0,0 +1,65 @@ +# fields/version/repack/count -- lintian check script (rewrite) -*- perl -*- +# +# Copyright (C) 2021 Kentaro Hayashi +# +# Parts of the code were taken from the old check script, which +# was Copyright (C) 1998 Richard Braakman (also licensed under the +# GPL 2 or higher) +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Fields::Version::Repack::Count; + +use v5.20; +use warnings; +use utf8; + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +sub source { + my ($self) = @_; + + # repack counts in native packages are dealt with elsewhere + return + if $self->processable->native; + + my $fields = $self->processable->fields; + + return + unless $fields->declares('Version'); + + my $version = $fields->unfolded_value('Version'); + + $self->hint('anticipated-repack-count', $version) + if $version =~ m{ dfsg [01] - }x; + + $self->hint('dot-before-repack-count', $version) + if $version =~ / dfsg [.] \d+ /x; + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Fields/Version/Repack/Native.pm b/lib/Lintian/Check/Fields/Version/Repack/Native.pm new file mode 100644 index 0000000..6ca1602 --- /dev/null +++ b/lib/Lintian/Check/Fields/Version/Repack/Native.pm @@ -0,0 +1,63 @@ +# fields/version/repack/native -- lintian check script (rewrite) -*- perl -*- +# +# Copyright (C) 2004 Marc Brockschmidt +# Copyright (C) 2021 Felix Lechner +# +# Parts of the code were taken from the old check script, which +# was Copyright (C) 1998 Richard Braakman (also licensed under the +# GPL 2 or higher) +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Fields::Version::Repack::Native; + +use v5.20; +use warnings; +use utf8; + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +sub source { + my ($self) = @_; + + my $fields = $self->processable->fields; + + return + unless $fields->declares('Version'); + + my $version = $fields->unfolded_value('Version'); + + # Checks for the dfsg convention for repackaged upstream + # source. Only check these against the source package to not + # repeat ourselves too much. + $self->hint('dfsg-version-in-native-package', $version) + if $version =~ /dfsg/ + && $self->processable->native; + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Fields/Version/Repack/Period.pm b/lib/Lintian/Check/Fields/Version/Repack/Period.pm new file mode 100644 index 0000000..12e8928 --- /dev/null +++ b/lib/Lintian/Check/Fields/Version/Repack/Period.pm @@ -0,0 +1,60 @@ +# fields/version/repack/period -- lintian check script (rewrite) -*- perl -*- +# +# Copyright (C) 2004 Marc Brockschmidt +# Copyright (C) 2021 Felix Lechner +# +# Parts of the code were taken from the old check script, which +# was Copyright (C) 1998 Richard Braakman (also licensed under the +# GPL 2 or higher) +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Fields::Version::Repack::Period; + +use v5.20; +use warnings; +use utf8; + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +sub source { + my ($self) = @_; + + my $fields = $self->processable->fields; + + return + unless $fields->declares('Version'); + + my $version = $fields->unfolded_value('Version'); + + $self->hint('dfsg-version-with-period', $version) + if $version =~ m{ [.] dfsg }x + && !$self->processable->native; + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Fields/Version/Repack/Tilde.pm b/lib/Lintian/Check/Fields/Version/Repack/Tilde.pm new file mode 100644 index 0000000..206b288 --- /dev/null +++ b/lib/Lintian/Check/Fields/Version/Repack/Tilde.pm @@ -0,0 +1,60 @@ +# fields/version/repack/tilde -- lintian check script (rewrite) -*- perl -*- +# +# Copyright (C) 2004 Marc Brockschmidt +# Copyright (C) 2021 Kentaro Hayashi +# +# Parts of the code were taken from the old check script, which +# was Copyright (C) 1998 Richard Braakman (also licensed under the +# GPL 2 or higher) +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Fields::Version::Repack::Tilde; + +use v5.20; +use warnings; +use utf8; + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +sub source { + my ($self) = @_; + + my $fields = $self->processable->fields; + + return + unless $fields->declares('Version'); + + my $version = $fields->unfolded_value('Version'); + + $self->hint('dfsg-version-with-tilde', $version) + if $version =~ /~dfsg/ + && !$self->processable->native; + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Fields/Version/Repack/Typo.pm b/lib/Lintian/Check/Fields/Version/Repack/Typo.pm new file mode 100644 index 0000000..c466df2 --- /dev/null +++ b/lib/Lintian/Check/Fields/Version/Repack/Typo.pm @@ -0,0 +1,64 @@ +# fields/version/repack/typo -- lintian check script (rewrite) -*- perl -*- +# +# Copyright (C) 2004 Marc Brockschmidt +# Copyright (C) 2021 Felix Lechner +# +# Parts of the code were taken from the old check script, which +# was Copyright (C) 1998 Richard Braakman (also licensed under the +# GPL 2 or higher) +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Fields::Version::Repack::Typo; + +use v5.20; +use warnings; +use utf8; + +use Dpkg::Version qw(version_check); + +use Lintian::Relation::Version qw(versions_compare); + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +sub source { + my ($self) = @_; + + my $fields = $self->processable->fields; + + return + unless $fields->declares('Version'); + + my $version = $fields->unfolded_value('Version'); + + $self->hint('dfsg-version-misspelled', $version) + if $version =~ /dsfg/ + && !$self->processable->native; + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Files/Architecture.pm b/lib/Lintian/Check/Files/Architecture.pm new file mode 100644 index 0000000..70cab47 --- /dev/null +++ b/lib/Lintian/Check/Files/Architecture.pm @@ -0,0 +1,105 @@ +# files/architecture -- lintian check script -*- perl -*- + +# Copyright (C) 1998 Christian Schwarz and Richard Braakman +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Files::Architecture; + +use v5.20; +use warnings; +use utf8; + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +has TRIPLETS => ( + is => 'rw', + lazy => 1, + default => sub { + my ($self) = @_; + + my $DEB_HOST_MULTIARCH= $self->data->architectures->deb_host_multiarch; + my %triplets = map { $DEB_HOST_MULTIARCH->{$_} => $_ } + keys %{$DEB_HOST_MULTIARCH}; + + return \%triplets; + } +); + +has depends_on_architecture => (is => 'rw', default => 0); + +sub visit_installed_files { + my ($self, $item) = @_; + + # for directories + if ($item->name =~ m{^(?:usr/)?lib/([^/]+)/$}) { + + my $potential_triplet = $1; + + if (exists $self->TRIPLETS->{$potential_triplet}) { + + my $from_triplet = $self->TRIPLETS->{$potential_triplet}; + my $port = $self->processable->fields->value('Architecture'); + + $self->pointed_hint('triplet-dir-and-architecture-mismatch', + $item->pointer, "is for $from_triplet instead of $port") + unless $from_triplet eq $port; + } + } + + # for files + if ($item->dirname =~ m{^(?:usr)?/lib/([^/]+)/$}) { + + my $potential_triplet = $1; + + $self->depends_on_architecture(1) + if exists $self->TRIPLETS->{$potential_triplet}; + } + + $self->depends_on_architecture(1) + if $item->is_file + && $item->size > 0 + && $item->file_type !~ m/^very short file/ + && $item->file_type !~ m/\bASCII text\b/ + && $item->name !~ m{^usr/share/}; + + return; +} + +sub installable { + my ($self) = @_; + + $self->hint('package-contains-no-arch-dependent-files') + if !$self->depends_on_architecture + && $self->processable->fields->value('Architecture') ne 'all' + && $self->processable->type ne 'udeb' + && !$self->processable->is_transitional + && !$self->processable->is_meta_package; + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Files/Artifact.pm b/lib/Lintian/Check/Files/Artifact.pm new file mode 100644 index 0000000..5344cfc --- /dev/null +++ b/lib/Lintian/Check/Files/Artifact.pm @@ -0,0 +1,140 @@ +# files/artifact -- lintian check script -*- perl -*- +# +# based on debhelper check, +# Copyright (C) 1999 Joey Hess +# Copyright (C) 2000 Sean 'Shaleh' Perry +# Copyright (C) 2002 Josip Rodin +# Copyright (C) 2007 Russ Allbery +# Copyright (C) 2013-2018 Bastien ROUCARIES +# Copyright (C) 2017-2020 Chris Lamb <lamby@debian.org> +# Copyright (C) 2020-2021 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Files::Artifact; + +use v5.20; +use warnings; +use utf8; + +use List::SomeUtils qw(first_value); + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +# Directory checks. These regexes match a directory that shouldn't be in the +# source package and associate it with a tag (minus the leading +# source-contains or debian-adds). Note that only one of these regexes +# should trigger for any single directory. +my @directory_checks = ( + [qr{^(.+/)?CVS/?$} => 'cvs-control-dir'], + [qr{^(.+/)?\.svn/?$} => 'svn-control-dir'], + [qr{^(.+/)?\.bzr/?$} => 'bzr-control-dir'], + [qr{^(.+/)?\{arch\}/?$} => 'arch-control-dir'], + [qr{^(.+/)?\.arch-ids/?$} => 'arch-control-dir'], + [qr{^(.+/)?,,.+/?$} => 'arch-control-dir'], + [qr{^(.+/)?\.git/?$} => 'git-control-dir'], + [qr{^(.+/)?\.hg/?$} => 'hg-control-dir'], + [qr{^(.+/)?\.be/?$} => 'bts-control-dir'], + [qr{^(.+/)?\.ditrack/?$} => 'bts-control-dir'], + + # Special case (can only be triggered for diffs) + [qr{^(.+/)?\.pc/?$} => 'quilt-control-dir'], +); + +# File checks. These regexes match files that shouldn't be in the source +# package and associate them with a tag (minus the leading source-contains or +# debian-adds). Note that only one of these regexes should trigger for any +# given file. +my @file_checks = ( + [qr{^(.+/)?svn-commit\.(.+\.)?tmp$} => 'svn-commit-file'], + [qr{^(.+/)?svk-commit.+\.tmp$} => 'svk-commit-file'], + [qr{^(.+/)?\.arch-inventory$} => 'arch-inventory-file'], + [qr{^(.+/)?\.hgtags$} => 'hg-tags-file'], + [qr{^(.+/)?\.\#(.+?)\.\d+(\.\d+)*$} => 'cvs-conflict-copy'], + [qr{^(.+/)?(.+?)\.(r[1-9]\d*)$} => 'svn-conflict-file'], + [qr{\.(orig|rej)$} => 'patch-failure-file'], + [qr{((^|/)[^/]+\.swp|~)$} => 'editor-backup-file'], +); + +sub source { + my ($self) = @_; + + my @added_by_debian; + my $prefix; + if ($self->processable->native) { + + @added_by_debian = @{$self->processable->patched->sorted_list}; + $prefix = 'source-contains'; + + } else { + my $patched = $self->processable->patched; + my $orig = $self->processable->orig; + + @added_by_debian + = grep { !defined $orig->lookup($_->name) } @{$patched->sorted_list}; + + # remove root quilt control folder and all paths in it + # created when 3.0 (quilt) source packages are unpacked + @added_by_debian = grep { $_->name !~ m{^.pc/} } @added_by_debian + if $self->processable->source_format eq '3.0 (quilt)'; + + my @common_items + = grep { defined $orig->lookup($_->name) } @{$patched->sorted_list}; + my @touched_by_debian + = grep { $_->md5sum ne $orig->lookup($_->name)->md5sum } + @common_items; + + $self->hint('no-debian-changes') + unless @added_by_debian || @touched_by_debian; + + $prefix = 'debian-adds'; + } + + # ignore lintian test set; should use automatic loop in the future + @added_by_debian = grep { $_->name !~ m{^t/} } @added_by_debian + if $self->processable->source_name eq 'lintian'; + + my @directories = grep { $_->is_dir } @added_by_debian; + for my $directory (@directories) { + + my $rule = first_value { $directory->name =~ /$_->[0]/s } + @directory_checks; + $self->pointed_hint("${prefix}-$rule->[1]", $directory->pointer) + if defined $rule; + } + + my @files = grep { $_->is_file } @added_by_debian; + for my $item (@files) { + + my $rule = first_value { $item->name =~ /$_->[0]/s } @file_checks; + $self->pointed_hint("${prefix}-$rule->[1]", $item->pointer) + if defined $rule; + } + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Files/Banned.pm b/lib/Lintian/Check/Files/Banned.pm new file mode 100644 index 0000000..81b5ae7 --- /dev/null +++ b/lib/Lintian/Check/Files/Banned.pm @@ -0,0 +1,113 @@ +# files/banned -- lintian check script -*- perl -*- +# +# based on debhelper check, +# Copyright (C) 1999 Joey Hess +# Copyright (C) 2000 Sean 'Shaleh' Perry +# Copyright (C) 2002 Josip Rodin +# Copyright (C) 2007 Russ Allbery +# Copyright (C) 2013-2018 Bastien ROUCARIES +# Copyright (C) 2017-2020 Chris Lamb <lamby@debian.org> +# Copyright (C) 2020-2021 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Files::Banned; + +use v5.20; +use warnings; +use utf8; + +use Const::Fast; +use List::SomeUtils qw(any); +use Unicode::UTF8 qw(encode_utf8); + +const my $MD5SUM_DATA_FIELDS => 5; + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +sub _md5sum_based_lintian_data { + my ($self, $filename) = @_; + + my $data = $self->data->load($filename,qr/\s*\~\~\s*/); + + my %md5sum_data; + + for my $md5sum ($data->all) { + + my $value = $data->value($md5sum); + + my ($sha1, $sha256, $name, $reason, $link) + = split(/ \s* ~~ \s* /msx, $value, $MD5SUM_DATA_FIELDS); + + die encode_utf8("Syntax error in $filename $.") + if any { !defined } ($sha1, $sha256, $name, $reason, $link); + + $md5sum_data{$md5sum} = { + 'sha1' => $sha1, + 'sha256' => $sha256, + 'name' => $name, + 'reason' => $reason, + 'link' => $link, + }; + } + + return \%md5sum_data; +} + +has NON_DISTRIBUTABLE_FILES => ( + is => 'rw', + lazy => 1, + default => sub { + my ($self) = @_; + + return $self->_md5sum_based_lintian_data( + 'cruft/non-distributable-files'); + } +); + +sub visit_patched_files { + my ($self, $item) = @_; + + return + unless $item->is_file; + + my $banned = $self->NON_DISTRIBUTABLE_FILES->{$item->md5sum}; + if (defined $banned) { + my $usualname = $banned->{'name'}; + my $reason = $banned->{'reason'}; + my $link = $banned->{'link'}; + + $self->pointed_hint( + 'license-problem-md5sum-non-distributable-file', + $item->pointer, "usual name is $usualname.", + $reason, "See also $link." + ); + } + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Files/Banned/CompiledHelp.pm b/lib/Lintian/Check/Files/Banned/CompiledHelp.pm new file mode 100644 index 0000000..efb5eee --- /dev/null +++ b/lib/Lintian/Check/Files/Banned/CompiledHelp.pm @@ -0,0 +1,58 @@ +# Copyright (C) 1998 Christian Schwarz and Richard Braakman +# Copyright (C) 1999 Joey Hess +# Copyright (C) 2000 Sean 'Shaleh' Perry +# Copyright (C) 2002 Josip Rodin +# Copyright (C) 2007 Russ Allbery +# Copyright (C) 2013-2018 Bastien ROUCARIES +# Copyright (C) 2017-2020 Chris Lamb <lamby@debian.org> +# Copyright (C) 2020-2021 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Files::Banned::CompiledHelp; + +use v5.20; +use warnings; +use utf8; + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +sub visit_patched_files { + my ($self, $item) = @_; + + return + unless $item->is_file; + + # .chm files are usually generated by non-free software + $self->pointed_hint('source-contains-prebuilt-ms-help-file',$item->pointer) + if $item->basename =~ /\.chm$/i + && $item->file_type eq 'MS Windows HtmlHelp Data' + && $item->bytes !~ / Halibut, /msx; + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Files/Banned/Lenna.pm b/lib/Lintian/Check/Files/Banned/Lenna.pm new file mode 100644 index 0000000..3bfcb2c --- /dev/null +++ b/lib/Lintian/Check/Files/Banned/Lenna.pm @@ -0,0 +1,109 @@ +# Copyright (C) 1998 Christian Schwarz and Richard Braakman +# Copyright (C) 1999 Joey Hess +# Copyright (C) 2000 Sean 'Shaleh' Perry +# Copyright (C) 2002 Josip Rodin +# Copyright (C) 2007 Russ Allbery +# Copyright (C) 2013-2018 Bastien ROUCARIES +# Copyright (C) 2017-2020 Chris Lamb <lamby@debian.org> +# Copyright (C) 2020-2021 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Files::Banned::Lenna; + +use v5.20; +use warnings; +use utf8; + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +# known bad files +has LENNA_BLACKLIST => ( + is => 'rw', + lazy => 1, + default => sub { + my ($self) = @_; + + my %blacklist; + + my $data = $self->data->load('files/banned/lenna/blacklist', + qr/ \s* ~~ \s* /x); + + for my $md5sum ($data->all) { + + my $value = $data->value($md5sum); + + my ($sha1, $sha256, $name, $link) + = split(/ \s* ~~ \s* /msx, $value); + + $blacklist{$md5sum} = { + 'sha1' => $sha1, + 'sha256' => $sha256, + 'name' => $name, + 'link' => $link, + }; + } + + return \%blacklist; + } +); + +# known good files +has LENNA_WHITELIST => ( + is => 'rw', + lazy => 1, + default => sub { + my ($self) = @_; + + return $self->data->load('files/banned/lenna/whitelist'); + } +); + +sub visit_patched_files { + my ($self, $item) = @_; + + return + unless $item->is_file; + + return + unless $item->file_type =~ /\bimage\b/i + || $item->file_type =~ /^Matlab v\d+ mat/i + || $item->file_type =~ /\bbitmap\b/i + || $item->file_type =~ /^PDF Document\b/i + || $item->file_type =~ /^Postscript Document\b/i; + + return + if $self->LENNA_WHITELIST->recognizes($item->md5sum); + + # Lena Soderberg image + $self->pointed_hint('license-problem-non-free-img-lenna', $item->pointer) + if $item->basename =~ / ( \b | _ ) lenn?a ( \b | _ ) /ix + || exists $self->LENNA_BLACKLIST->{$item->md5sum}; + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Files/Bugs.pm b/lib/Lintian/Check/Files/Bugs.pm new file mode 100644 index 0000000..69432de --- /dev/null +++ b/lib/Lintian/Check/Files/Bugs.pm @@ -0,0 +1,50 @@ +# files/bugs -- lintian check script -*- perl -*- + +# Copyright (C) 1998 Christian Schwarz and Richard Braakman +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Files::Bugs; + +use v5.20; +use warnings; +use utf8; + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +sub visit_installed_files { + my ($self, $item) = @_; + + return + unless $item->is_dir; + + $self->pointed_hint('package-contains-bts-control-dir', $item->pointer) + if $item->name =~ m{/\.(?:be|ditrack)/?$}; + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Files/BuildPath.pm b/lib/Lintian/Check/Files/BuildPath.pm new file mode 100644 index 0000000..e6c73af --- /dev/null +++ b/lib/Lintian/Check/Files/BuildPath.pm @@ -0,0 +1,55 @@ +# files/build-path -- lintian check script -*- perl -*- + +# Copyright (C) 1998 Christian Schwarz and Richard Braakman +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Files::BuildPath; + +use v5.20; +use warnings; +use utf8; + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +sub visit_installed_files { + my ($self, $item) = @_; + + my $BUILD_PATH_REGEX + = $self->data->load('files/build-path-regex', qr/~~~~~/); + + for my $pattern ($BUILD_PATH_REGEX->all) { + + $self->pointed_hint('dir-or-file-in-build-tree', $item->pointer) + if $item->name =~ m{$pattern}xms + && $self->processable->source_name ne 'sbuild' + && $self->processable->source_name ne 'pbuilder'; + } + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Files/Compressed.pm b/lib/Lintian/Check/Files/Compressed.pm new file mode 100644 index 0000000..d64807f --- /dev/null +++ b/lib/Lintian/Check/Files/Compressed.pm @@ -0,0 +1,80 @@ +# files/compressed -- lintian check script -*- perl -*- + +# Copyright (C) 1998 Christian Schwarz and Richard Braakman +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Files::Compressed; + +use v5.20; +use warnings; +use utf8; + +use Const::Fast; + +const my $VERTICAL_BAR => q{|}; + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +# an OR (|) regex of all compressed extension +has COMPRESS_FILE_EXTENSIONS_OR_ALL => ( + is => 'rw', + lazy => 1, + default => sub { + my ($self) = @_; + + my $COMPRESS_FILE_EXTENSIONS + = $self->data->load('files/compressed-file-extensions',qr/\s+/); + + my $text = join($VERTICAL_BAR, + map { quotemeta }$COMPRESS_FILE_EXTENSIONS->all); + + return qr/$text/; + } +); + +sub visit_installed_files { + my ($self, $item) = @_; + + return + unless $item->is_file; + + my $regex = $self->COMPRESS_FILE_EXTENSIONS_OR_ALL; + + # see tag duplicated-compressed-file + my $DUPLICATED_COMPRESSED_FILE_REGEX= qr/^(.+)\.$regex$/; + + # both compressed and uncompressed present + if ($item->name =~ $DUPLICATED_COMPRESSED_FILE_REGEX) { + + $self->pointed_hint('compressed-duplicate', $item->pointer) + if $self->processable->installed->lookup($1); + } + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Files/Compressed/Bz2.pm b/lib/Lintian/Check/Files/Compressed/Bz2.pm new file mode 100644 index 0000000..25c8bc1 --- /dev/null +++ b/lib/Lintian/Check/Files/Compressed/Bz2.pm @@ -0,0 +1,57 @@ +# files/compressed/bz2 -- lintian check script -*- perl -*- + +# Copyright (C) 2020 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Files::Compressed::Bz2; + +use v5.20; +use warnings; +use utf8; + +use Lintian::IPC::Run3 qw(safe_qx); + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +sub visit_installed_files { + my ($self, $item) = @_; + + return + unless $item->is_file; + + if ($item->name =~ /\.bz2$/si) { + + safe_qx('bzip2', '--test', $item->unpacked_path); + + $self->pointed_hint('broken-bz2', $item->pointer) + if $?; + } + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Files/Compressed/Gz.pm b/lib/Lintian/Check/Files/Compressed/Gz.pm new file mode 100644 index 0000000..6290247 --- /dev/null +++ b/lib/Lintian/Check/Files/Compressed/Gz.pm @@ -0,0 +1,113 @@ +# files/compressed/gz -- lintian check script -*- perl -*- + +# Copyright (C) 2020 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Files::Compressed::Gz; + +use v5.20; +use warnings; +use utf8; + +use Const::Fast; +use Time::Piece; + +use Lintian::IPC::Run3 qw(safe_qx); + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +# get timestamp of first member; https://tools.ietf.org/html/rfc1952.html#page-5 +const my $GZIP_HEADER_SIZE => 8; + +has changelog_timestamp => ( + is => 'rw', + lazy => 1, + default => sub { + my ($self) = @_; + + # remains 0 if there is no timestamp + my $changelog = $self->processable->changelog; + if (defined $changelog) { + + my ($entry) = @{$changelog->entries}; + return $entry->Timestamp + if $entry && $entry->Timestamp; + } + + return 0; + } +); + +sub visit_installed_files { + my ($self, $item) = @_; + + return + unless $item->is_file; + + if ($item->name =~ /\.gz$/si) { + + safe_qx('gzip', '--test', $item->unpacked_path); + + $self->pointed_hint('broken-gz', $item->pointer) + if $?; + } + + # gzip files + if ($item->file_type =~ /gzip compressed/) { + + my $bytes = $item->magic($GZIP_HEADER_SIZE); + my (undef, $gziptime) = unpack('VV', $bytes); + + if (defined $gziptime && $gziptime != 0) { + + # see https://bugs.debian.org/762105 + my $time_from_build = $gziptime - $self->changelog_timestamp; + if ($time_from_build > 0) { + + my $architecture + = $self->processable->fields->value('Architecture'); + my $multiarch + = $self->processable->fields->value('Multi-Arch') || 'no'; + + if ($multiarch eq 'same' && $item->name !~ /\Q$architecture\E/) + { + $self->pointed_hint( + 'gzip-file-is-not-multi-arch-same-safe', + $item->pointer); + + } else { + $self->pointed_hint('package-contains-timestamped-gzip', + $item->pointer,gmtime($gziptime)->datetime); + } + } + } + } + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Files/Compressed/Lz.pm b/lib/Lintian/Check/Files/Compressed/Lz.pm new file mode 100644 index 0000000..defed97 --- /dev/null +++ b/lib/Lintian/Check/Files/Compressed/Lz.pm @@ -0,0 +1,77 @@ +# files/compressed/lz -- lintian check script -*- perl -*- + +# Copyright (C) 2020 Chris Lamb +# Copyright (C) 2020 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Files::Compressed::Lz; + +use v5.20; +use warnings; +use utf8; + +use List::SomeUtils qw(first_value); + +use Lintian::IPC::Run3 qw(safe_qx); +use Lintian::Util qw(locate_executable); + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +has lzip_command => ( + is => 'rw', + lazy => 1, + default => sub { + my ($self) = @_; + + my $command = first_value { locate_executable($_) } qw(lzip clzip); + + return $command; + } +); + +sub visit_installed_files { + my ($self, $item) = @_; + + return + unless $item->is_file; + + my $command = $self->lzip_command; + return + unless length $command; + + if ($item->name =~ /\.lz$/si) { + + safe_qx($command, '--test', $item->unpacked_path); + + $self->pointed_hint('broken-lz', $item->pointer) + if $?; + } + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Files/Compressed/Lzma.pm b/lib/Lintian/Check/Files/Compressed/Lzma.pm new file mode 100644 index 0000000..2f49853 --- /dev/null +++ b/lib/Lintian/Check/Files/Compressed/Lzma.pm @@ -0,0 +1,57 @@ +# files/compressed/lzma -- lintian check script -*- perl -*- + +# Copyright (C) 2020 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Files::Compressed::Lzma; + +use v5.20; +use warnings; +use utf8; + +use Lintian::IPC::Run3 qw(safe_qx); + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +sub visit_installed_files { + my ($self, $item) = @_; + + return + unless $item->is_file; + + if ($item->name =~ /\.lzma$/si) { + + safe_qx('lzma', '--test', $item->unpacked_path); + + $self->pointed_hint('broken-lzma', $item->pointer) + if $?; + } + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Files/Compressed/Lzo.pm b/lib/Lintian/Check/Files/Compressed/Lzo.pm new file mode 100644 index 0000000..5e6cdca --- /dev/null +++ b/lib/Lintian/Check/Files/Compressed/Lzo.pm @@ -0,0 +1,57 @@ +# files/compressed/lzo -- lintian check script -*- perl -*- + +# Copyright (C) 2020 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Files::Compressed::Lzo; + +use v5.20; +use warnings; +use utf8; + +use Lintian::IPC::Run3 qw(safe_qx); + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +sub visit_installed_files { + my ($self, $item) = @_; + + return + unless $item->is_file; + + if ($item->name =~ /\.lzo$/si) { + + safe_qx('lzop', '--test', $item->unpacked_path); + + $self->pointed_hint('broken-lzo', $item->pointer) + if $?; + } + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Files/Compressed/Xz.pm b/lib/Lintian/Check/Files/Compressed/Xz.pm new file mode 100644 index 0000000..6f3c6a0 --- /dev/null +++ b/lib/Lintian/Check/Files/Compressed/Xz.pm @@ -0,0 +1,57 @@ +# files/compressed/xz -- lintian check script -*- perl -*- + +# Copyright (C) 2020 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Files::Compressed::Xz; + +use v5.20; +use warnings; +use utf8; + +use Lintian::IPC::Run3 qw(safe_qx); + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +sub visit_installed_files { + my ($self, $item) = @_; + + return + unless $item->is_file; + + if ($item->name =~ /\.xz$/si) { + + safe_qx('xz', '--test', $item->unpacked_path); + + $self->pointed_hint('broken-xz', $item->pointer) + if $?; + } + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Files/Compressed/Zip.pm b/lib/Lintian/Check/Files/Compressed/Zip.pm new file mode 100644 index 0000000..68b9395 --- /dev/null +++ b/lib/Lintian/Check/Files/Compressed/Zip.pm @@ -0,0 +1,62 @@ +# files/compressed/zip -- lintian check script -*- perl -*- + +# Copyright (C) 2020 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Files::Compressed::Zip; + +use v5.20; +use warnings; +use utf8; + +use Lintian::IPC::Run3 qw(safe_qx); + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +sub visit_installed_files { + my ($self, $item) = @_; + + return + unless $item->is_file; + + if ($item->name =~ /\.zip$/si) { + + # maybe rewrite with Archive::Zip + + # may prompt for password with -t; piping yes '' does not work + safe_qx('unzip', '-l', $item->unpacked_path); + + $self->pointed_hint('broken-zip', $item->pointer) + if $?; + + # should issue a tag for encrypted members, see Bug#935292 + } + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Files/ConfigScripts.pm b/lib/Lintian/Check/Files/ConfigScripts.pm new file mode 100644 index 0000000..b5df56c --- /dev/null +++ b/lib/Lintian/Check/Files/ConfigScripts.pm @@ -0,0 +1,108 @@ +# files/config-scripts -- lintian check script -*- perl -*- + +# Copyright (C) 1998 Christian Schwarz and Richard Braakman +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Files::ConfigScripts; + +use v5.20; +use warnings; +use utf8; + +use Unicode::UTF8 qw(encode_utf8); + +use Lintian::SlidingWindow; + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +sub visit_installed_files { + my ($self, $item) = @_; + + my $architecture = $self->processable->fields->value('Architecture'); + my $multiarch = $self->processable->fields->value('Multi-Arch') || 'no'; + + # check old style config scripts + if ( $item->name =~ m{^usr/bin/} + && $item->name =~ m/-config$/ + && $item->is_script + && $item->is_regular_file) { + + # try to find some indication of + # config file (read only one block) + + open(my $fd, '<:raw', $item->unpacked_path) + or die encode_utf8('Cannot open ' . $item->unpacked_path); + + my $sfd = Lintian::SlidingWindow->new; + $sfd->handle($fd); + + my $block = $sfd->readwindow; + + # some common stuff found in config file + if ( + $block + && ( $block =~ / flag /msx + || $block =~ m{ /include/ }msx + || $block =~ / pkg-config /msx) + ) { + + $self->pointed_hint('old-style-config-script', $item->pointer); + + # could be ok but only if multi-arch: no + if ($multiarch ne 'no' || $architecture eq 'all') { + + # check multi-arch path + my $DEB_HOST_MULTIARCH + = $self->data->architectures->deb_host_multiarch; + for my $madir (values %{$DEB_HOST_MULTIARCH}) { + + next + unless $block =~ m{\W\Q$madir\E(\W|$)}xms; + + # allow files to begin with triplet if it matches arch + next + if $item->basename =~ m{^\Q$madir\E}xms; + + my $tag_name = 'old-style-config-script-multiarch-path'; + $tag_name .= '-arch-all' + if $architecture eq 'all'; + + $self->pointed_hint($tag_name, $item->pointer, + 'full text contains architecture specific dir',$madir); + + last; + } + } + } + + close $fd; + } + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Files/Contents.pm b/lib/Lintian/Check/Files/Contents.pm new file mode 100644 index 0000000..472c419 --- /dev/null +++ b/lib/Lintian/Check/Files/Contents.pm @@ -0,0 +1,150 @@ +# files/contents -- lintian check script -*- perl -*- + +# Copyright (C) 1998 Christian Schwarz and Richard Braakman +# Copyright (C) 2019 Chris Lamb <lamby@debian.org> +# Copyright (C) 2020 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Files::Contents; + +use v5.20; +use warnings; +use utf8; + +use Const::Fast; +use List::SomeUtils qw(any); + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +const my $EMPTY => q{}; +const my $SLASH => q{/}; +const my $ARROW => q{ -> }; + +my $SENSIBLE_REGEX + = qr{(?<!-)(?:select-editor|sensible-(?:browser|editor|pager))\b}; + +# with this Moo default, maintainer scripts are also checked +has switched_locations => ( + is => 'rw', + lazy => 1, + default => sub { + my ($self) = @_; + + my @files + = grep { $_->is_file } @{$self->processable->installed->sorted_list}; + + my @commands = grep { $_->name =~ m{^(?:usr/)?s?bin/} } @files; + + my %switched_locations; + for my $command (@commands) { + + my @variants = map { $_ . $SLASH . $command->basename } + qw(bin sbin usr/bin usr/sbin); + my @confused = grep { $_ ne $command->name } @variants; + + $switched_locations{$_} = $command->name for @confused; + } + + return \%switched_locations; + } +); + +sub build_path { + my ($self) = @_; + + my $buildinfo = $self->group->buildinfo; + + return $EMPTY + unless $buildinfo; + + return $buildinfo->fields->value('Build-Path'); +} + +sub check_item { + my ($self, $item) = @_; + + return + unless $item->is_file; + + unless ($self->processable->relation('all')->satisfies('sensible-utils') + || $self->processable->source_name eq 'sensible-utils') { + + my $sensible = $item->mentions_in_operation($SENSIBLE_REGEX); + $self->pointed_hint('missing-depends-on-sensible-utils', + $item->pointer, $sensible) + if length $sensible; + } + + unless ($self->processable->fields->value('Section') eq 'debian-installer' + || any { $_ eq $self->processable->source_name } qw(base-files dpkg)) { + + $self->pointed_hint('uses-dpkg-database-directly', $item->pointer) + if length $item->mentions_in_operation(qr{/var/lib/dpkg}); + } + + # if we have a /usr/sbin/foo, check for references to /usr/bin/foo + my %switched_locations = %{$self->switched_locations}; + for my $confused (keys %switched_locations) { + + # may not work as expected on ELF due to ld's SHF_MERGE + # but word boundaries are also superior in strings spanning multiple commands + my $correct = $switched_locations{$confused}; + $self->pointed_hint('bin-sbin-mismatch', $item->pointer, + $confused . $ARROW . $correct) + if length $item->mentions_in_operation(qr{ \B / \Q$confused\E \b }x); + } + + if (length $self->build_path) { + my $escaped_path = quotemeta($self->build_path); + $self->pointed_hint('file-references-package-build-path', + $item->pointer) + if $item->bytes_match(qr{$escaped_path}); + } + + return; +} + +sub visit_installed_files { + my ($self, $item) = @_; + + $self->check_item($item); + + return; +} + +sub visit_control_files { + my ($self, $item) = @_; + + return + unless $item->is_maintainer_script; + + $self->check_item($item); + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Files/Contents/LineLength.pm b/lib/Lintian/Check/Files/Contents/LineLength.pm new file mode 100644 index 0000000..3f8326a --- /dev/null +++ b/lib/Lintian/Check/Files/Contents/LineLength.pm @@ -0,0 +1,135 @@ +# files/contents/line-length -- lintian check script -*- perl -*- + +# Copyright (C) 1999 Joey Hess +# Copyright (C) 2000 Sean 'Shaleh' Perry +# Copyright (C) 2002 Josip Rodin +# Copyright (C) 2007 Russ Allbery +# Copyright (C) 2013-2018 Bastien ROUCARIES +# Copyright (C) 2017-2020 Chris Lamb <lamby@debian.org> +# Copyright (C) 2020-2021 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Files::Contents::LineLength; + +use v5.20; +use warnings; +use utf8; + +use Const::Fast; +use List::UtilsBy qw(max_by); +use Unicode::UTF8 qw(encode_utf8 decode_utf8 valid_utf8); + +const my $GREATER_THAN => q{>}; +const my $VERTICAL_BAR => q{|}; + +const my $VERY_LONG => 512; + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +# an OR (|) regex of all compressed extension +has BINARY_FILE_EXTENSIONS_OR_ALL => ( + is => 'rw', + lazy => 1, + default => sub { + my ($self) = @_; + + my $BINARY_FILE_EXTENSIONS + = $self->data->load('files/binary-file-extensions',qr/\s+/); + my $COMPRESSED_FILE_EXTENSIONS + = $self->data->load('files/compressed-file-extensions',qr/\s+/); + + my $text = join( + $VERTICAL_BAR, + ( + map { quotemeta } $BINARY_FILE_EXTENSIONS->all, + $COMPRESSED_FILE_EXTENSIONS->all + ) + ); + + return qr/$text/i; + } +); + +sub visit_patched_files { + my ($self, $item) = @_; + + # Skip if no regular file + return + unless $item->is_regular_file; + + # Skip if file has a known binary, XML or JSON suffix. + my $pattern = $self->BINARY_FILE_EXTENSIONS_OR_ALL; + return + if $item->basename + =~ qr{ [.] ($pattern | xml | sgml | svg | jsonl?) \s* $}x; + + # Skip if we can't open it. + return + unless $item->is_open_ok; + + # Skip if file is detected to be an image or JSON. + return + if $item->file_type =~ m{image|bitmap|JSON}; + + open(my $fd, '<', $item->unpacked_path) + or die encode_utf8('Cannot open ' . $item->unpacked_path); + + my %line_lengths; + + my $position = 1; + while (my $line = <$fd>) { + # Skip SQL insert and select statements + next if ($line =~ /^(INSERT|SELECT)\s/i + and $item->basename =~ /sql/i); + + # count codepoints, if possible + $line = decode_utf8($line) + if valid_utf8($line); + + $line_lengths{$position} = length $line; + + } continue { + ++$position; + } + + close $fd; + + my $longest = max_by { $line_lengths{$_} } keys %line_lengths; + + return + unless defined $longest; + + my $pointer = $item->pointer($longest); + + $self->pointed_hint('very-long-line-length-in-source-file', + $pointer, $line_lengths{$longest}, $GREATER_THAN, $VERY_LONG) + if $line_lengths{$longest} > $VERY_LONG; + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Files/Date.pm b/lib/Lintian/Check/Files/Date.pm new file mode 100644 index 0000000..3b1f479 --- /dev/null +++ b/lib/Lintian/Check/Files/Date.pm @@ -0,0 +1,66 @@ +# files/date -- lintian check script -*- perl -*- + +# Copyright (C) 1998 Christian Schwarz and Richard Braakman +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Files::Date; + +use v5.20; +use warnings; +use utf8; + +use Const::Fast; + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +# value from dak CVS: Dinstall::PastCutOffYear +const my $DINSTALL_CUTOFF_YEAR => 1975; + +has ALLOWED_ANCIENT_FILES => ( + is => 'rw', + lazy => 1, + default => sub { + my ($self) = @_; + + return $self->data->load('files/allowed-ancient-files'); + } +); + +sub visit_installed_files { + my ($self, $item) = @_; + + my ($year) = ($item->date =~ /^(\d{4})/); + + $self->pointed_hint('package-contains-ancient-file', + $item->pointer, $item->date) + if $year <= $DINSTALL_CUTOFF_YEAR + && !$self->ALLOWED_ANCIENT_FILES->matches_any($item->name); + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Files/Debug.pm b/lib/Lintian/Check/Files/Debug.pm new file mode 100644 index 0000000..9eead27 --- /dev/null +++ b/lib/Lintian/Check/Files/Debug.pm @@ -0,0 +1,55 @@ +# files/debug -- lintian check script -*- perl -*- + +# Copyright (C) 1998 Christian Schwarz and Richard Braakman +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Files::Debug; + +use v5.20; +use warnings; +use utf8; + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +has warned_already => (is => 'rw', default => 0); + +sub visit_installed_files { + my ($self, $item) = @_; + + if ($item->name =~ m{^usr/lib/debug/\S}) { + + $self->pointed_hint('debug-suffix-not-dbg', $item->pointer) + if !$self->processable->is_debug_package + && !$self->warned_already; + + $self->warned_already(1); + } + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Files/DebugPackages.pm b/lib/Lintian/Check/Files/DebugPackages.pm new file mode 100644 index 0000000..7f83816 --- /dev/null +++ b/lib/Lintian/Check/Files/DebugPackages.pm @@ -0,0 +1,50 @@ +# files/debug-packages -- lintian check script -*- perl -*- + +# Copyright (C) 2020 Chris Lamb <lamby@debian.org> +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Files::DebugPackages; + +use v5.20; +use warnings; +use utf8; + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +sub visit_installed_files { + my ($self, $item) = @_; + + $self->pointed_hint('non-debug-file-in-debug-package', $item->pointer) + if $item->is_file + && $item->name !~ /\.debug$/ + && $self->processable->is_debug_package + && $self->processable->is_auto_generated; + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Files/Desktop.pm b/lib/Lintian/Check/Files/Desktop.pm new file mode 100644 index 0000000..fca3006 --- /dev/null +++ b/lib/Lintian/Check/Files/Desktop.pm @@ -0,0 +1,57 @@ +# files/desktop -- lintian check script -*- perl -*- + +# Copyright (C) 1998 Christian Schwarz and Richard Braakman +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Files::Desktop; + +use v5.20; +use warnings; +use utf8; + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +sub visit_installed_files { + my ($self, $item) = @_; + + # .desktop files + # People have placed them everywhere, but nowadays the + # consensus seems to be to stick to the fd.org standard + # drafts, which says that .desktop files intended for + # menus should be placed in $XDG_DATA_DIRS/applications. + # The default for $XDG_DATA_DIRS is + # /usr/local/share/:/usr/share/, according to the + # basedir-spec on fd.org. As distributor, we should only + # allow /usr/share. + + $self->pointed_hint('desktop-file-in-wrong-dir', $item->pointer) + if $item->name =~ m{^usr/share/gnome/apps/.*\.desktop$}; + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Files/Duplicates.pm b/lib/Lintian/Check/Files/Duplicates.pm new file mode 100644 index 0000000..b1dc809 --- /dev/null +++ b/lib/Lintian/Check/Files/Duplicates.pm @@ -0,0 +1,88 @@ +# files/duplicates -- lintian check script -*- perl -*- + +# Copyright (C) 2011 Niels Thykier +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Files::Duplicates; + +use v5.20; +use warnings; +use utf8; + +use List::SomeUtils qw(any); + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +has md5map => (is => 'rw', default => sub{ {} }); + +sub visit_installed_files { + my ($self, $item) = @_; + + return + unless $item->is_regular_file; + + # Ignore empty files; in some cases (e.g. python) a file is + # required even if it is empty and we are never looking at a + # substantial gain in such a case. Also see #632789 + return + unless $item->size; + + my $calculated = $item->md5sum; + return + unless defined $calculated; + + return + unless $item->name =~ m{\A usr/share/doc/}xsm; + + $self->md5map->{$calculated} //= []; + + push(@{$self->md5map->{$calculated}}, $item); + + return; +} + +sub installable { + my ($self) = @_; + + for my $md5 (keys %{$self->md5map}){ + my @files = @{ $self->md5map->{$md5} }; + + next + if scalar @files < 2; + + if (any { m/changelog/i} @files) { + $self->hint('duplicate-changelog-files', (sort @files)); + + } else { + $self->hint('duplicate-files', (sort @files)); + } + } + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Files/EmptyDirectories.pm b/lib/Lintian/Check/Files/EmptyDirectories.pm new file mode 100644 index 0000000..52079cb --- /dev/null +++ b/lib/Lintian/Check/Files/EmptyDirectories.pm @@ -0,0 +1,67 @@ +# files/empty-directories -- lintian check script -*- perl -*- + +# Copyright (C) 1998 Christian Schwarz and Richard Braakman +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Files::EmptyDirectories; + +use v5.20; +use warnings; +use utf8; + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +sub visit_installed_files { + my ($self, $item) = @_; + + return + unless $item->is_dir; + + # skip base-files, which is a very special case. + return + if $self->processable->name eq 'base-files'; + + # ignore /var, which may hold dynamic data packages create, and /etc, + # which may hold configuration files generated by maintainer scripts + return + if $item->name =~ m{^var/} || $item->name =~ m{^etc/}; + + # Empty Perl directories are an ExtUtils::MakeMaker artifact that + # will be fixed in Perl 5.10, and people can cause more problems + # by trying to fix it, so just ignore them. + return + if $item->name =~ m{^usr/lib/(?:[^/]+/)?perl5/$} + || $item->name eq 'usr/share/perl5/'; + + # warn about empty directories + $self->pointed_hint('package-contains-empty-directory', $item->pointer) + if scalar $item->children == 0; + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Files/EmptyPackage.pm b/lib/Lintian/Check/Files/EmptyPackage.pm new file mode 100644 index 0000000..5b23846 --- /dev/null +++ b/lib/Lintian/Check/Files/EmptyPackage.pm @@ -0,0 +1,159 @@ +# files/empty-package -- lintian check script -*- perl -*- + +# Copyright (C) 1998 Christian Schwarz and Richard Braakman +# Copyright (C) 2019 Chris Lamb <lamby@debian.org> +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Files::EmptyPackage; + +use v5.20; +use warnings; +use utf8; + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +# Common files stored in /usr/share/doc/$pkg that aren't sufficient to +# consider the package non-empty. +has STANDARD_FILES => ( + is => 'rw', + lazy => 1, + default => sub { + my ($self) = @_; + + return $self->data->load('files/standard-files'); + } +); + +has is_empty => (is => 'rw', default => 1); +has is_dummy => ( + is => 'rw', + lazy => 1, + default => sub { + my ($self) = @_; + + # check if package is empty + return 1 + if $self->processable->is_transitional + || $self->processable->is_meta_package; + + return 0; + } +); + +sub visit_installed_files { + my ($self, $item) = @_; + + return + unless $self->is_empty; + + return + if $self->is_dummy; + + # ignore directories + return + if $item->is_dir; + + my $pkg = $self->processable->name; + my $ppkg = quotemeta($self->processable->name); + + # skip if file is outside /usr/share/doc/$pkg directory + if ($item->name !~ m{^usr/share/doc/\Q$pkg\E}) { + + # - except if it is a lintian override. + return + if $item->name =~ m{\A + # Except for: + usr/share/ (?: + # lintian overrides + lintian/overrides/$ppkg(?:\.gz)? + # reportbug scripts/utilities + | bug/$ppkg(?:/(?:control|presubj|script))? + )\Z}xsm; + + $self->is_empty(0); + + return; + } + + # skip if /usr/share/doc/$pkg has files in a subdirectory + if ($item->name =~ m{^usr/share/doc/\Q$pkg\E/[^/]+/}) { + + $self->is_empty(0); + + return; + } + + # skip /usr/share/doc/$pkg symlinks. + return + if $item->name eq "usr/share/doc/$pkg"; + + # For files directly in /usr/share/doc/$pkg, if the + # file isn't one of the uninteresting ones, the + # package isn't empty. + return + if $self->STANDARD_FILES->recognizes($item->basename); + + # ignore all READMEs + return + if $item->basename =~ m/^README(?:\..*)?$/i; + + my $pkg_arch = $self->processable->architecture; + unless ($pkg_arch eq 'all') { + + # binNMU changelog (debhelper) + return + if $item->basename eq "changelog.Debian.${pkg_arch}.gz"; + } + + # buildinfo file (dh-buildinfo) + return + if $item->basename eq "buildinfo_${pkg_arch}.gz"; + + $self->is_empty(0); + + return; +} + +sub installable { + my ($self) = @_; + + return + if $self->is_dummy; + + if ($self->is_empty) { + + $self->hint('empty-binary-package') + if $self->processable->type eq 'binary'; + + $self->hint('empty-udeb-package') + if $self->processable->type eq 'udeb'; + } + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Files/Encoding.pm b/lib/Lintian/Check/Files/Encoding.pm new file mode 100644 index 0000000..f175401 --- /dev/null +++ b/lib/Lintian/Check/Files/Encoding.pm @@ -0,0 +1,125 @@ +# files/encoding -- lintian check script -*- perl -*- + +# Copyright (C) 2020 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Files::Encoding; + +use v5.20; +use warnings; +use utf8; + +use IO::Uncompress::Gunzip qw(gunzip $GunzipError); +use Unicode::UTF8 qw(valid_utf8 encode_utf8); + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +sub visit_patched_files { + my ($self, $item) = @_; + + return + unless $item->name =~ m{^debian/}; + + return + unless $item->is_file; + + return + unless $item->file_type =~ /text$/; + + if ($item->name =~ m{^debian/patches/}) { + + my $bytes = $item->bytes; + return + unless length $bytes; + + my ($header)= split(/^---/m, $bytes, 2); + + $self->pointed_hint('national-encoding', $item->pointer,'DEP-3 header') + unless valid_utf8($header); + + } else { + $self->pointed_hint('national-encoding', $item->pointer) + unless $item->is_valid_utf8; + } + + return; +} + +sub visit_control_files { + my ($self, $item) = @_; + + return + unless $item->is_file; + + return + unless $item->file_type =~ /text$/ || $item->is_script; + + $self->pointed_hint('national-encoding', $item->pointer) + unless $item->is_valid_utf8; + + return; +} + +sub visit_installed_files { + my ($self, $item) = @_; + + return + unless $item->is_file; + + # this checks debs; most other nat'l encoding tags are for source + # Bug#796170 also suggests limiting paths and including gzip files + + # return + # unless $item->name =~ m{^(?:usr/)?s?bin/} + # || $item->name =~ m{^usr/games/} + # || $item->name =~ m{\.(?:p[myl]|php|rb|tcl|sh|txt)(?:\.gz)?$} + # || $item->name =~ m{^usr/share/doc}; + + if ($item->file_type =~ /text$/) { + + $self->pointed_hint('national-encoding', $item->pointer) + unless $item->is_valid_utf8; + } + + # for man pages also look at compressed files + if ( $item->name =~ m{^usr/share/man/} + && $item->file_type =~ /gzip compressed/) { + + my $bytes; + + my $path = $item->unpacked_path; + gunzip($path => \$bytes) + or die encode_utf8("gunzip $path failed: $GunzipError"); + + $self->pointed_hint('national-encoding', $item->pointer) + unless valid_utf8($bytes); + } + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Files/Generated.pm b/lib/Lintian/Check/Files/Generated.pm new file mode 100644 index 0000000..35c88d5 --- /dev/null +++ b/lib/Lintian/Check/Files/Generated.pm @@ -0,0 +1,83 @@ +# files/generated -- lintian check script -*- perl -*- + +# Copyright (C) 2021 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Files::Generated; + +use v5.20; +use warnings; +use utf8; + +use Const::Fast; +use Unicode::UTF8 qw(encode_utf8); + +use Moo; +use namespace::clean; + +const my $DOUBLE_QUOTE => q{"}; + +with 'Lintian::Check'; + +sub visit_patched_files { + my ($self, $item) = @_; + + # check all patched source files except the Debian patches + return + if $item->name =~ m{^ debian/patches/ }x; + + return + unless $item->is_open_ok; + + open(my $fd, '<', $item->unpacked_path) + or die encode_utf8('Cannot open ' . $item->unpacked_path); + + my $position = 1; + while (my $line = <$fd>) { + + if ($line + =~m{ ( This [ ] file [ ] (?: is | was ) [ ] autogenerated ) }xi + || $line + =~ m{ ( DO [ ] NOT [ ] EDIT [ ] (?: THIS [ ] FILE [ ] )? BY [ ] HAND ) }xi + ) { + + my $marker = $1; + + $self->pointed_hint( + 'generated-file', + $item->pointer($position), + $DOUBLE_QUOTE . $marker . $DOUBLE_QUOTE + ); + } + + } continue { + ++$position; + } + + close $fd; + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Files/HardLinks.pm b/lib/Lintian/Check/Files/HardLinks.pm new file mode 100644 index 0000000..f115897 --- /dev/null +++ b/lib/Lintian/Check/Files/HardLinks.pm @@ -0,0 +1,57 @@ +# files/hard-links -- lintian check script -*- perl -*- + +# Copyright (C) 1998 Christian Schwarz and Richard Braakman +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Files::HardLinks; + +use v5.20; +use warnings; +use utf8; + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +sub visit_installed_files { + my ($self, $item) = @_; + + return + unless $item->is_hardlink; + + my $target_dir = $item->link; + $target_dir =~ s{[^/]*$}{}; + + # link always sorts after target; hard links are calibrated + $self->pointed_hint('package-contains-hardlink', $item->pointer, + 'pointing to:', $item->link) + if $item->name =~ m{^etc/} + || $item->link =~ m{^etc/} + || $item->name !~ m{^\Q$target_dir\E[^/]*$}; + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Files/Hierarchy/Links.pm b/lib/Lintian/Check/Files/Hierarchy/Links.pm new file mode 100644 index 0000000..2402b5d --- /dev/null +++ b/lib/Lintian/Check/Files/Hierarchy/Links.pm @@ -0,0 +1,83 @@ +# files/symbolic-links/broken -- lintian check script -*- perl -*- +# +# Copyright (C) 2020 Felix Lechner +# Copyright (C) 2020 Chris Lamb <lamby@debian.org> +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Files::Hierarchy::Links; + +use v5.20; +use warnings; +use utf8; + +use Const::Fast; +use File::Basename; +use List::SomeUtils qw(any first_value); + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +const my $EMPTY => q{}; +const my $SLASH => q{/}; +const my $ARROW => q{ -> }; + +sub visit_installed_files { + my ($self, $item) = @_; + + # symbolic links only + return + unless $item->is_symlink; + + my $target = $item->link_normalized; + return + unless defined $target; + + my @ldconfig_folders = @{$self->data->architectures->ldconfig_folders}; + + my $origin_dirname= first_value { $item->dirname eq $_ } @ldconfig_folders; + + # look only at links originating in common ld.so load paths + return + unless length $origin_dirname; + + my $target_dirname + = first_value { (dirname($target) . $SLASH) eq $_ } @ldconfig_folders; + $target_dirname //= $EMPTY; + + # no subfolders + $self->pointed_hint('ldconfig-escape', $item->pointer, $target) + unless length $target_dirname; + + my @multiarch= values %{$self->data->architectures->deb_host_multiarch}; + + $self->pointed_hint('architecture-escape', $item->pointer, $target) + if (any { basename($origin_dirname) eq $_ } @multiarch) + && (any { $target_dirname eq "$_/" } qw{lib usr/lib usr/local/lib}); + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Files/Hierarchy/MergedUsr.pm b/lib/Lintian/Check/Files/Hierarchy/MergedUsr.pm new file mode 100644 index 0000000..ebd0d1c --- /dev/null +++ b/lib/Lintian/Check/Files/Hierarchy/MergedUsr.pm @@ -0,0 +1,48 @@ +# files/hierarchy/merged-usr -- lintian check script -*- perl -*- +# +# Copyright (C) 2021 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Files::Hierarchy::MergedUsr; + +use v5.20; +use warnings; +use utf8; + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +sub visit_installed_files { + my ($self, $item) = @_; + + $self->pointed_hint('unmerged-usr', $item->pointer) + if $item->is_file + && $item->name =~ m{^(?:lib|bin|sbin)}; + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Files/Hierarchy/PathSegments.pm b/lib/Lintian/Check/Files/Hierarchy/PathSegments.pm new file mode 100644 index 0000000..b9e5535 --- /dev/null +++ b/lib/Lintian/Check/Files/Hierarchy/PathSegments.pm @@ -0,0 +1,57 @@ +# files/hierarchy/path-segments -- lintian check script -*- perl -*- +# +# Copyright (C) 2020 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Files::Hierarchy::PathSegments; + +use v5.20; +use warnings; +use utf8; + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +sub visit_installed_files { + my ($self, $item) = @_; + + return + unless $item->is_dir; + + my @segments = split(m{/}, $item->name); + return + unless @segments; + + my $final = $segments[-1]; + my $count = scalar grep { $final eq $_ } @segments; + + $self->pointed_hint('repeated-path-segment', $item->pointer, $final) + if $count > 1; + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Files/Hierarchy/Standard.pm b/lib/Lintian/Check/Files/Hierarchy/Standard.pm new file mode 100644 index 0000000..e00955b --- /dev/null +++ b/lib/Lintian/Check/Files/Hierarchy/Standard.pm @@ -0,0 +1,262 @@ +# files/hierarchy/standard -- lintian check script -*- perl -*- + +# Copyright (C) 1998 Christian Schwarz and Richard Braakman +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Files::Hierarchy::Standard; + +use v5.20; +use warnings; +use utf8; + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +sub _is_tmp_path { + my ($path) = @_; + + return 1 + if $path =~ m{^tmp/.} + || $path =~ m{^(?:var|usr)/tmp/.} + || $path =~ m{^/dev/shm/}; + + return 0; +} + +sub visit_installed_files { + my ($self, $item) = @_; + + if ($item->name =~ m{^etc/opt/.}) { + + # /etc/opt + $self->pointed_hint('dir-or-file-in-etc-opt', $item->pointer); + + } elsif ($item->name =~ m{^usr/local/\S+}) { + # /usr/local + if ($item->is_dir) { + $self->pointed_hint('dir-in-usr-local', $item->pointer); + } else { + $self->pointed_hint('file-in-usr-local', $item->pointer); + } + + } elsif ($item->name =~ m{^usr/share/[^/]+$}) { + # /usr/share + $self->pointed_hint('file-directly-in-usr-share', $item->pointer) + if $item->is_file; + + } elsif ($item->name =~ m{^usr/bin/}) { + # /usr/bin + $self->pointed_hint('subdir-in-usr-bin', $item->pointer) + if $item->is_dir + && $item->name =~ m{^usr/bin/.} + && $item->name !~ m{^usr/bin/(?:X11|mh)/}; + + } elsif ($self->processable->type ne 'udeb' + && $item->name =~ m{^usr/[^/]+/$}) { + + # /usr subdirs + if ($item->name=~ m{^usr/(?:dict|doc|etc|info|man|adm|preserve)/}) { + # FSSTND dirs + $self->pointed_hint('FSSTND-dir-in-usr', $item->pointer); + } elsif ( + $item->name !~ m{^usr/(?:X11R6|X386| + bin|games|include| + lib| + local|sbin|share| + src|spool|tmp)/}x + ) { + # FHS dirs + if ($item->name =~ m{^usr/lib(?<libsuffix>64|x?32)/}) { + my $libsuffix = $+{libsuffix}; + # eglibc exception is due to FHS. Other are + # transitional, waiting for full + # implementation of multi-arch. Note that we + # allow (e.g.) "lib64" packages to still use + # these dirs, since their use appears to be by + # intention. + unless ($self->processable->source_name =~ m/^e?glibc$/ + or $self->processable->name =~ m/^lib$libsuffix/) { + + $self->pointed_hint('non-multi-arch-lib-dir', + $item->pointer); + } + } else { + # see Bug#834607 + $self->pointed_hint('non-standard-dir-in-usr', $item->pointer) + unless $item->name =~ m{^usr/libexec/}; + } + + } + + # unless $item =~ m,^usr/[^/]+-linuxlibc1/,; was tied + # into print above... + # Make an exception for the altdev dirs, which will go + # away at some point and are not worth moving. + } + + # /var subdirs + elsif ($self->processable->type ne 'udeb' + && $item->name =~ m{^var/[^/]+/$}) { + + if ($item->name =~ m{^var/(?:adm|catman|named|nis|preserve)/}) { + # FSSTND dirs + $self->pointed_hint('FSSTND-dir-in-var', $item->pointer); + + } elsif ($self->processable->name eq 'base-files' + && $item->name =~ m{^var/(?:backups|local)/}) { + # base-files is special + # ignore + + } elsif ( + $item->name !~ m{\A var/ + (?: account|lib|cache|crash|games + |lock|log|opt|run|spool|state + |tmp|www|yp)/ + }xsm + ) { + # FHS dirs with exception in Debian policy + $self->pointed_hint('non-standard-dir-in-var', $item->pointer); + } + + } elsif ($self->processable->type ne 'udeb' + && $item->name =~ m{^var/lib/games/.}) { + $self->pointed_hint('non-standard-dir-in-var', $item->pointer); + + } elsif ($self->processable->type ne 'udeb' + && $item->name =~ m{^var/lock/.}) { + # /var/lock + $self->pointed_hint('dir-or-file-in-var-lock', $item->pointer); + + } elsif ($self->processable->type ne 'udeb' + && $item->name =~ m{^var/run/.}) { + # /var/run + $self->pointed_hint('dir-or-file-in-var-run', $item->pointer); + + } elsif ($self->processable->type ne 'udeb' && $item->name =~ m{^run/.}) { + $self->pointed_hint('dir-or-file-in-run', $item->pointer); + + } elsif ($item->name =~ m{^var/www/\S+}) { + # /var/www + # Packages are allowed to create /var/www since it's + # historically been the default document root, but they + # shouldn't be installing stuff under that directory. + $self->pointed_hint('dir-or-file-in-var-www', $item->pointer); + + } elsif ($item->name =~ m{^opt/.}) { + # /opt + $self->pointed_hint('dir-or-file-in-opt', $item->pointer); + + } elsif ($item->name =~ m{^hurd/}) { + return; + + } elsif ($item->name =~ m{^servers/}) { + return; + + } elsif ($item->name =~ m{^home/.}) { + # /home + $self->pointed_hint('dir-or-file-in-home', $item->pointer); + + } elsif ($item->name =~ m{^root/.}) { + $self->pointed_hint('dir-or-file-in-home', $item->pointer); + + } elsif (_is_tmp_path($item->name)) { + # /tmp, /var/tmp, /usr/tmp + $self->pointed_hint('dir-or-file-in-tmp', $item->pointer); + + } elsif ($item->name =~ m{^mnt/.}) { + # /mnt + $self->pointed_hint('dir-or-file-in-mnt', $item->pointer); + + } elsif ($item->name =~ m{^bin/}) { + # /bin + $self->pointed_hint('subdir-in-bin', $item->pointer) + if $item->is_dir && $item->name =~ m{^bin/.}; + + } elsif ($item->name =~ m{^srv/.}) { + # /srv + $self->pointed_hint('dir-or-file-in-srv', $item->pointer); + + }elsif ( + $item->name =~ m{^[^/]+/$} + && $item->name !~ m{\A (?: + bin|boot|dev|etc|home|lib + |mnt|opt|root|run|sbin|srv|sys + |tmp|usr|var) / + }xsm + ) { + # FHS directory? + + # 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. + # (Specifically, /cdrom, /floppy, /initrd, and /proc are + # not mentioned in the FHS). + if ($item->name =~ m{^lib(?<libsuffix>64|x?32)/}) { + my $libsuffix = $+{libsuffix}; + + # see comments for ^usr/lib(?'libsuffix'64|x?32) + $self->pointed_hint('non-multi-arch-lib-dir', $item->pointer) + unless $self->processable->source_name =~ m/^e?glibc$/ + || $self->processable->name =~ m/^lib$libsuffix/; + + } else { + $self->pointed_hint('non-standard-toplevel-dir', $item->pointer) + unless $self->processable->name eq 'base-files' + || $self->processable->name eq 'hurd' + || $self->processable->name eq 'hurd-udeb' + || $self->processable->name =~ /^rootskel(?:-bootfloppy)?/; + } + } + + # compatibility symlinks should not be used + $self->pointed_hint('use-of-compat-symlink', $item->pointer) + if $item->name =~ m{^usr/(?:spool|tmp)/} + || $item->name =~ m{^usr/(?:doc|bin)/X11/} + || $item->name =~ m{^var/adm/}; + + # any files + $self->pointed_hint('file-in-unusual-dir', $item->pointer) + unless $item->is_dir + || $self->processable->type eq 'udeb' + || $item->name =~ m{^usr/(?:bin|dict|doc|games| + include|info|lib(?:x?32|64)?| + man|sbin|share|src|X11R6)/}x + || $item->name =~ m{^lib(?:x?32|64)?/(?:modules/|libc5-compat/)?} + || $item->name =~ m{^var/(?:games|lib|www|named)/} + || $item->name =~ m{^(?:bin|boot|dev|etc|sbin)/} + # non-FHS, but still usual + || $item->name =~ m{^usr/[^/]+-linux[^/]*/} + || $item->name =~ m{^usr/libexec/} # FHS 3.0 / #834607 + || $item->name =~ m{^usr/iraf/} + # not allowed, but tested individually + || $item->name =~ m{\A (?: + build|home|mnt|opt|root|run|srv + |(?:(?:usr|var)/)?tmp)|var/www/}xsm; + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Files/IeeeData.pm b/lib/Lintian/Check/Files/IeeeData.pm new file mode 100644 index 0000000..0c2ba68 --- /dev/null +++ b/lib/Lintian/Check/Files/IeeeData.pm @@ -0,0 +1,79 @@ +# files/ieee-data -- lintian check script -*- perl -*- + +# Copyright (C) 1998 Christian Schwarz and Richard Braakman +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Files::IeeeData; + +use v5.20; +use warnings; +use utf8; + +use Const::Fast; + +const my $VERTICAL_BAR => q{|}; + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +# an OR (|) regex of all compressed extension +has COMPRESS_FILE_EXTENSIONS_OR_ALL => ( + is => 'rw', + lazy => 1, + default => sub { + my ($self) = @_; + + my $COMPRESS_FILE_EXTENSIONS + = $self->data->load('files/compressed-file-extensions',qr/\s+/); + + my $text = join($VERTICAL_BAR, + map { quotemeta }$COMPRESS_FILE_EXTENSIONS->all); + + return qr/$text/; + } +); + +sub visit_installed_files { + my ($self, $item) = @_; + + my $regex = $self->COMPRESS_FILE_EXTENSIONS_OR_ALL; + + if ( $item->is_regular_file + && $item->name + =~ m{/(?:[^/]-)?(?:oui|iab)(?:\.(txt|idx|db))?(?:\.$regex)?\Z}x) { + + # see #785662 + if ($item->name =~ / oui /msx || $item->name =~ / iab /msx) { + + $self->pointed_hint('package-installs-ieee-data', $item->pointer) + unless $self->processable->source_name eq 'ieee-data'; + } + } + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Files/Includes.pm b/lib/Lintian/Check/Files/Includes.pm new file mode 100644 index 0000000..ec10bb8 --- /dev/null +++ b/lib/Lintian/Check/Files/Includes.pm @@ -0,0 +1,69 @@ +# files/includes -- lintian check script -*- perl -*- + +# Copyright (C) 1998 Christian Schwarz and Richard Braakman +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Files::Includes; + +use v5.20; +use warnings; +use utf8; + +use Const::Fast; +use List::SomeUtils qw{any}; + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +# case insensitive regular expressions for overly generic paths +const my @GENERIC_PATHS => ('^ util[s]? [.]h $'); + +sub visit_installed_files { + my ($self, $item) = @_; + + return + unless $item->is_file; + + my $consumed = $item->name; + return + unless $consumed =~ s{^usr/include/}{}; + + my @multiarch_folders + = values %{$self->data->architectures->deb_host_multiarch}; + + for my $tuple (@multiarch_folders) { + + last + if $consumed =~ s{^$tuple/}{}; + } + + $self->pointed_hint('header-has-overly-generic-name', $item->pointer) + if any { $consumed =~ m{ $_ }isx } @GENERIC_PATHS; + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Files/Init.pm b/lib/Lintian/Check/Files/Init.pm new file mode 100644 index 0000000..25ff77d --- /dev/null +++ b/lib/Lintian/Check/Files/Init.pm @@ -0,0 +1,79 @@ +# files/init -- lintian check script -*- perl -*- + +# Copyright (C) 1998 Christian Schwarz and Richard Braakman +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Files::Init; + +use v5.20; +use warnings; +use utf8; + +use Const::Fast; +use List::SomeUtils qw(none); + +const my $NOT_EQUAL => q{!=}; + +const my $EXECUTABLE_PERMISSIONS => oct(755); + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +sub visit_installed_files { + my ($self, $item) = @_; + + # /etc/init + $self->pointed_hint('package-installs-deprecated-upstart-configuration', + $item->pointer) + if $item->name =~ m{^etc/init/\S}; + + # /etc/init.d + $self->pointed_hint( + 'non-standard-file-permissions-for-etc-init.d-script', + $item->pointer, + $item->octal_permissions, + $NOT_EQUAL, + sprintf('%04o', $EXECUTABLE_PERMISSIONS) + ) + if $item->name =~ m{^etc/init\.d/\S} + && $item->name !~ m{^etc/init\.d/(?:README|skeleton)$} + && $item->operm != $EXECUTABLE_PERMISSIONS + && $item->is_file; + + # /etc/rc.d && /etc/rc?.d + $self->pointed_hint('package-installs-into-etc-rc.d', $item->pointer) + if $item->name =~ m{^etc/rc(?:\d|S)?\.d/\S} + && (none { $self->processable->name eq $_ } qw(sysvinit file-rc)) + && $self->processable->type ne 'udeb'; + + # /etc/rc.boot + $self->pointed_hint('package-installs-into-etc-rc.boot', $item->pointer) + if $item->name =~ m{^etc/rc\.boot/\S}; + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Files/LdSo.pm b/lib/Lintian/Check/Files/LdSo.pm new file mode 100644 index 0000000..2f0b9c1 --- /dev/null +++ b/lib/Lintian/Check/Files/LdSo.pm @@ -0,0 +1,48 @@ +# files/ld-so -- lintian check script -*- perl -*- + +# Copyright (C) 1998 Christian Schwarz and Richard Braakman +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Files::LdSo; + +use v5.20; +use warnings; +use utf8; + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +sub visit_installed_files { + my ($self, $item) = @_; + + $self->pointed_hint('package-modifies-ld.so-search-path', $item->pointer) + if $item->name =~ m{^etc/ld\.so\.conf\.d/.+$} + && $self->processable->name !~ /^libc/; + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Files/Licenses.pm b/lib/Lintian/Check/Files/Licenses.pm new file mode 100644 index 0000000..5ca61e4 --- /dev/null +++ b/lib/Lintian/Check/Files/Licenses.pm @@ -0,0 +1,112 @@ +# files/licenses -- lintian check script -*- perl -*- + +# Copyright (C) 1998 Christian Schwarz and Richard Braakman +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Files::Licenses; + +use v5.20; +use warnings; +use utf8; + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +sub visit_installed_files { + my ($self, $item) = @_; + + # license files + if ( + $item->basename =~ m{ \A + # Look for commonly used names for license files + (?: copying | licen[cs]e | l?gpl | bsd | artistic ) + # ... possibly followed by a version + [v0-9._-]* + (?:\. .* )? \Z + }xsmi + # Ignore some common extensions for source or compiled + # extension files. There was at least one file named + # "license.el". These are probably license-displaying + # code, not license files. Also ignore executable files + # in general. This means we get false-negatives for + # licenses files marked executable, but these will trigger + # a warning about being executable. (See #608866) + # + # Another exception is made for .html and .php because + # preserving working links is more important than saving + # some bytes, and because a package had an HTML form for + # licenses called like that. Another exception is made + # for various picture formats since those are likely to + # just be simply pictures. + # + # DTD files are excluded at the request of the Mozilla + # suite maintainers. Zope products include license files + # for runtime display. underXXXlicense.docbook files are + # from KDE. + # + # Ignore extra license files in examples, since various + # package building software includes example packages with + # licenses. + && !$item->is_executable + && $item->name !~ m{ \. (?: + # Common "non-license" file extensions... + el|[ch]|cc|p[ylmc]|[hu]i|p_hi|html|php|rb|xpm + |png|jpe?g|gif|svg|dtd|mk|lisp|yml|rs|ogg|xbm + ) \Z}xsm + && $item->name !~ m{^usr/share/zope/Products/.*\.(?:dtml|pt|cpt)$} + && $item->name !~ m{/under\S+License\.docbook$} + && $item->name !~ m{^usr/share/doc/[^/]+/examples/} + # liblicense has a manpage called license + && $item->name !~ m{^usr/share/man/(?:[^/]+/)?man\d/} + # liblicense (again) + && $item->name !~ m{^usr/share/pyshared-data/} + # Rust crate unmodified upstream sources + && $item->name !~ m{^usr/share/cargo/registry/} + # Some GNOME/GTK software uses these to show the "license + # header". + && $item->name !~ m{ + ^usr/share/(?:gnome/)?help/[^/]+/[^/]+/license\.page$ + }x + # base-files (which is required to ship them) + && $item->name !~ m{^usr/share/common-licenses/[^/]+$} + && !length($item->link) + # Sphinx includes various license files + && $item->name !~ m{/_sources/license(?:\.rst)?\.txt$}i + ) { + + # 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 + # case you hadn't guessed; liblicense) + + $self->pointed_hint('extra-license-file', $item->pointer) + unless $item->file_type =~ m/^[^,]*\bELF\b/ + || $item->file_type =~ m/\bcurrent ar archive\b/; + } + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Files/Locales.pm b/lib/Lintian/Check/Files/Locales.pm new file mode 100644 index 0000000..e645a83 --- /dev/null +++ b/lib/Lintian/Check/Files/Locales.pm @@ -0,0 +1,204 @@ +# files/locales -- lintian check script -*- perl -*- + +# Copyright (C) 1998 Christian Schwarz and Richard Braakman +# Copyright (C) 2013 Niels Thykier <niels@thykier.net> +# Copyright (C) 2019 Adam D. Barratt <adam@adam-barratt.org.uk> +# Copyright (C) 2021 Felix Lechner +# +# Based in part on a shell script that was: +# Copyright (C) 2010 Raphael Geissert <atomo64@gmail.com> +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Files::Locales; + +use v5.20; +use warnings; +use utf8; + +use Const::Fast; +use JSON::MaybeXS; +use List::SomeUtils qw(first_value); +use Path::Tiny; + +const my $EMPTY => q{}; + +const my $ARROW => q{->}; + +const my $RESERVED => $EMPTY; +const my $SPECIAL => q{S}; + +const my %CONFUSING_LANGUAGES => ( + # Albanian is sq, not al: + 'al' => 'sq', + # Chinese is zh, not cn: + 'cn' => 'zh', + # Czech is cs, not cz: + 'cz' => 'cs', + # Danish is da, not dk: + 'dk' => 'da', + # Greek is el, not gr: + 'gr' => 'el', + # Indonesian is id, not in: + 'in' => 'id', +); + +const my %CONFUSING_COUNTRIES => ( + # UK != GB + 'en_UK' => 'en_GB', +); +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +has ISO639_3_by_alpha3 => ( + is => 'rw', + lazy => 1, + default => sub { + my ($self) = @_; + + local $ENV{LC_ALL} = 'C'; + + my $bytes = path('/usr/share/iso-codes/json/iso_639-3.json')->slurp; + my $json = decode_json($bytes); + + my %iso639_3; + for my $entry (@{$json->{'639-3'}}) { + + my $alpha_3 = $entry->{alpha_3}; + + $iso639_3{$alpha_3} = $entry; + } + + return \%iso639_3; + } +); + +has LOCALE_CODES => ( + is => 'rw', + lazy => 1, + default => sub { + my ($self) = @_; + + local $ENV{LC_ALL} = 'C'; + + my %CODES; + for my $entry (values %{$self->ISO639_3_by_alpha3}) { + + my $type = $entry->{type}; + + # https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=692548#10 + next + if $type eq $RESERVED || $type eq $SPECIAL; + + # also have two letters, ISO 639-1 + my $two_letters; + $two_letters = $entry->{alpha_2} + if exists $entry->{alpha_2}; + + $CODES{$two_letters} = $EMPTY + if length $two_letters; + + # three letters, ISO 639-2 + my $three_letters = $entry->{alpha_3}; + + # a value indicates that two letters are preferred + $CODES{$three_letters} = $two_letters || $EMPTY; + } + + return \%CODES; + } +); + +sub visit_installed_files { + my ($self, $item) = @_; + + return + unless $item->is_dir; + + return + unless $item->name =~ m{^ usr/share/locale/ ([^/]+) / $}x; + + my $folder = $1; + + # without encoding + my ($with_country) = split(m/[.@]/, $folder); + + # special exception + return + if $with_country eq 'l10n'; + + # without country code + my ($two_or_three, $country) = split(m/_/, $with_country); + + $country //= $EMPTY; + + return + unless length $two_or_three; + + # check some common language errors + if (exists $CONFUSING_LANGUAGES{$two_or_three}) { + + my $fixed = $folder; + $fixed =~ s{^ $two_or_three }{$CONFUSING_LANGUAGES{$two_or_three}}x; + + $self->pointed_hint('incorrect-locale-code', $item->pointer, $folder, + $ARROW,$fixed); + return; + } + + # check some common country errors + if (exists $CONFUSING_COUNTRIES{$with_country}) { + + my $fixed = $folder; + $fixed =~ s{^ $with_country }{$CONFUSING_COUNTRIES{$with_country}}x; + + $self->pointed_hint('incorrect-locale-code', $item->pointer, $folder, + $ARROW,$fixed); + return; + } + + # check known codes + if (exists $self->LOCALE_CODES->{$two_or_three}) { + + my $replacement = $self->LOCALE_CODES->{$two_or_three}; + return + unless length $replacement; + + # a value indicates that two letters are preferred + my $fixed = $folder; + $fixed =~ s{^ $two_or_three }{$replacement}x; + + $self->pointed_hint('incorrect-locale-code', $item->pointer, $folder, + $ARROW,$fixed); + + return; + } + + $self->pointed_hint('unknown-locale-code', $item->pointer, $folder); + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Files/Missing.pm b/lib/Lintian/Check/Files/Missing.pm new file mode 100644 index 0000000..4c6eda5 --- /dev/null +++ b/lib/Lintian/Check/Files/Missing.pm @@ -0,0 +1,50 @@ +# files/missing -- lintian check script -*- perl -*- + +# Copyright (C) 1998 Christian Schwarz and Richard Braakman +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Files::Missing; + +use v5.20; +use warnings; +use utf8; + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +sub visit_installed_files { + my ($self, $item) = @_; + + if ( $item->is_dir + && $item->faux) { + + $self->pointed_hint('missing-intermediate-directory', $item->pointer); + } + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Files/MultiArch.pm b/lib/Lintian/Check/Files/MultiArch.pm new file mode 100644 index 0000000..5d6a2f0 --- /dev/null +++ b/lib/Lintian/Check/Files/MultiArch.pm @@ -0,0 +1,111 @@ +# files/multi-arch -- lintian check script -*- perl -*- + +# Copyright (C) 1998 Christian Schwarz and Richard Braakman +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Files::MultiArch; + +use v5.20; +use warnings; +use utf8; + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +has TRIPLETS => ( + is => 'rw', + lazy => 1, + default => sub { + my ($self) = @_; + + my $DEB_HOST_MULTIARCH= $self->data->architectures->deb_host_multiarch; + my %triplets = map { $DEB_HOST_MULTIARCH->{$_} => $_ } + keys %{$DEB_HOST_MULTIARCH}; + + return \%triplets; + } +); + +my %PATH_DIRECTORIES = map { $_ => 1 } qw( + bin/ sbin/ usr/bin/ usr/sbin/ usr/games/ ); + +has has_public_executable => (is => 'rw', default => 0); +has has_public_shared_library => (is => 'rw', default => 0); + +sub visit_installed_files { + my ($self, $item) = @_; + + my $architecture = $self->processable->fields->value('Architecture'); + my $multiarch = $self->processable->fields->value('Multi-Arch') || 'no'; + + my $DEB_HOST_MULTIARCH= $self->data->architectures->deb_host_multiarch; + my $multiarch_dir = $DEB_HOST_MULTIARCH->{$architecture}; + + if ( !$item->is_dir + && defined $multiarch_dir + && $multiarch eq 'foreign' + && $item->name =~ m{^usr/lib/\Q$multiarch_dir\E/(.*)$}) { + + my $tail = $1; + + $self->pointed_hint('multiarch-foreign-cmake-file', $item->pointer) + if $tail =~ m{^cmake/.+\.cmake$}; + + $self->pointed_hint('multiarch-foreign-pkgconfig', $item->pointer) + if $tail =~ m{^pkgconfig/[^/]+\.pc$}; + + $self->pointed_hint('multiarch-foreign-static-library', $item->pointer) + if $tail =~ m{^lib[^/]+\.a$}; + } + + if (exists($PATH_DIRECTORIES{$item->dirname})) { + $self->has_public_executable(1); + } + + if ($item->name =~ m{^(?:usr/)?lib/(?:([^/]+)/)?lib[^/]*\.so$}) { + $self->has_public_shared_library(1) + if (!defined($1) || exists $self->TRIPLETS->{$1}); + } + + return; +} + +sub installable { + my ($self) = @_; + + my $architecture = $self->processable->fields->value('Architecture'); + my $multiarch = $self->processable->fields->value('Multi-Arch') || 'no'; + + $self->hint('multiarch-foreign-shared-library') + if $architecture ne 'all' + and $multiarch eq 'foreign' + and $self->has_public_shared_library + and not $self->has_public_executable; + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Files/Names.pm b/lib/Lintian/Check/Files/Names.pm new file mode 100644 index 0000000..a6b022c --- /dev/null +++ b/lib/Lintian/Check/Files/Names.pm @@ -0,0 +1,163 @@ +# files/names -- lintian check script -*- perl -*- + +# Copyright (C) 1998 Christian Schwarz and Richard Braakman +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Files::Names; + +use v5.20; +use warnings; +use utf8; + +use List::Compare; +use Unicode::UTF8 qw(valid_utf8); + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +my %PATH_DIRECTORIES = map { $_ => 1 } qw( + bin/ sbin/ usr/bin/ usr/sbin/ usr/games/ ); + +sub visit_installed_files { + my ($self, $item) = @_; + + # unusual characters + $self->pointed_hint('file-name-ends-in-whitespace', $item->pointer) + if $item->name =~ /\s+\z/; + + $self->pointed_hint('star-file', $item->pointer) + if $item->name =~ m{/\*\z}; + + $self->pointed_hint('hyphen-file', $item->pointer) + if $item->name =~ m{/-\z}; + + $self->pointed_hint('file-name-contains-wildcard-character',$item->pointer) + if $item->name =~ m{[*?]}; + + $self->pointed_hint('package-contains-compiled-glib-schema',$item->pointer) + if $item->name + =~ m{^ usr/share/ glib-[^/]+ /schemas/ gschemas[.]compiled $}x; + + $self->pointed_hint('package-contains-file-in-etc-skel', $item->pointer) + if $item->dirname =~ m{^etc/skel/} + && $item->basename + !~ m{^ [.]bashrc | [.]bash_logout | [.]m?kshrc | [.]profile $}x; + + $self->pointed_hint('package-contains-file-in-usr-share-hal', + $item->pointer) + if $item->dirname =~ m{^usr/share/hal/}; + + $self->pointed_hint('package-contains-icon-cache-in-generic-dir', + $item->pointer) + if $item->name eq 'usr/share/icons/hicolor/icon-theme.cache'; + + $self->pointed_hint('package-contains-python-dot-directory',$item->pointer) + if $item->dirname + =~ m{^ usr/lib/python[^/]+ / (?:dist|site)-packages / }x + && $item->name =~ m{ / [.][^/]+ / }x; + + $self->pointed_hint('package-contains-python-coverage-file',$item->pointer) + if $item->basename eq '.coverage'; + + $self->pointed_hint('package-contains-python-doctree-file', $item->pointer) + if $item->basename =~ m{ [.]doctree (?:[.]gz)? $}x; + + $self->pointed_hint( + 'package-contains-python-header-in-incorrect-directory', + $item->pointer) + if $item->dirname =~ m{^ usr/include/python3[.][01234567]/ }x + && $item->name =~ m{ [.]h $}x; + + $self->pointed_hint('package-contains-python-hypothesis-example', + $item->pointer) + if $item->dirname =~ m{ /[.]hypothesis/examples/ }x; + + $self->pointed_hint('package-contains-python-tests-in-global-namespace', + $item->pointer) + if $item->name + =~ m{^ usr/lib/python[^\/]+ / (?:dist|site)-packages / test_.+[.]py $}x; + + $self->pointed_hint('package-contains-sass-cache-directory',$item->pointer) + if $item->name =~ m{ / [.]sass-cache / }x; + + $self->pointed_hint('package-contains-eslint-config-file', $item->pointer) + if $item->basename =~ m{^ [.]eslintrc }x; + + $self->pointed_hint('package-contains-npm-ignore-file', $item->pointer) + if $item->basename eq '.npmignore'; + + if (exists($PATH_DIRECTORIES{$item->dirname})) { + + $self->pointed_hint('file-name-in-PATH-is-not-ASCII', $item->pointer) + if $item->basename !~ m{\A [[:ascii:]]++ \Z}xsm; + + $self->pointed_hint('zero-byte-executable-in-path', $item->pointer) + if $item->is_regular_file + and $item->is_executable + and $item->size == 0; + + } elsif (!valid_utf8($item->name)) { + $self->pointed_hint('shipped-file-without-utf8-name', $item->pointer); + } + + return; +} + +sub source { + my ($self) = @_; + + unless ($self->processable->native) { + + my @orig_non_utf8 = grep { !valid_utf8($_->name) } + @{$self->processable->orig->sorted_list}; + + $self->pointed_hint('upstream-file-without-utf8-name', $_->pointer) + for @orig_non_utf8; + } + + my @patched = map { $_->name } @{$self->processable->patched->sorted_list}; + my @orig = map { $_->name } @{$self->processable->orig->sorted_list}; + + my $lc= List::Compare->new(\@patched, \@orig); + my @created = $lc->get_Lonly; + + my @non_utf8 = grep { !valid_utf8($_) } @created; + + # exclude quilt directory + my @maintainer_fault = grep { !m{^.pc/} } @non_utf8; + + if ($self->processable->native) { + $self->hint('native-source-file-without-utf8-name', $_) + for @maintainer_fault; + + } else { + $self->hint('patched-file-without-utf8-name', $_)for @maintainer_fault; + } + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Files/NonFree.pm b/lib/Lintian/Check/Files/NonFree.pm new file mode 100644 index 0000000..32e5e7f --- /dev/null +++ b/lib/Lintian/Check/Files/NonFree.pm @@ -0,0 +1,142 @@ +# files/non-free -- lintian check script -*- perl -*- + +# Copyright (C) 1998 Christian Schwarz and Richard Braakman +# Copyright (C) 1999 Joey Hess +# Copyright (C) 2000 Sean 'Shaleh' Perry +# Copyright (C) 2002 Josip Rodin +# Copyright (C) 2007 Russ Allbery +# Copyright (C) 2013-2018 Bastien ROUCARIES +# Copyright (C) 2017-2020 Chris Lamb <lamby@debian.org> +# Copyright (C) 2020-2021 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Files::NonFree; + +use v5.20; +use warnings; +use utf8; + +use Const::Fast; +use List::SomeUtils qw(any); +use Unicode::UTF8 qw(encode_utf8); + +const my $MD5SUM_DATA_FIELDS => 5; + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +sub _md5sum_based_lintian_data { + my ($self, $filename) = @_; + + my $data = $self->data->load($filename,qr/\s*\~\~\s*/); + + my %md5sum_data; + + for my $md5sum ($data->all) { + + my $value = $data->value($md5sum); + + my ($sha1, $sha256, $name, $reason, $link) + = split(/ \s* ~~ \s* /msx, $value, $MD5SUM_DATA_FIELDS); + + die encode_utf8("Syntax error in $filename $.") + if any { !defined } ($sha1, $sha256, $name, $reason, $link); + + $md5sum_data{$md5sum} = { + 'sha1' => $sha1, + 'sha256' => $sha256, + 'name' => $name, + 'reason' => $reason, + 'link' => $link, + }; + } + + return \%md5sum_data; +} + +has NON_FREE_FILES => ( + is => 'rw', + lazy => 1, + default => sub { + my ($self) = @_; + + return $self->_md5sum_based_lintian_data('cruft/non-free-files'); + } +); + +sub visit_patched_files { + my ($self, $item) = @_; + + return + unless $item->is_file; + + # skip packages that declare non-free contents + return + if $self->processable->is_non_free; + + my $nonfree = $self->NON_FREE_FILES->{$item->md5sum}; + if (defined $nonfree) { + my $usualname = $nonfree->{'name'}; + my $reason = $nonfree->{'reason'}; + my $link = $nonfree->{'link'}; + + $self->pointed_hint( + 'license-problem-md5sum-non-free-file', + $item->pointer, "usual name is $usualname.", + $reason, "See also $link." + ); + } + + return; +} + +# A list of known non-free flash executables +my @flash_nonfree = ( + qr/(?i)dewplayer(?:-\w+)?\.swf$/, + qr/(?i)(?:mp3|flv)player\.swf$/, + # Situation needs to be clarified: + # qr,(?i)multipleUpload\.swf$, + # qr,(?i)xspf_jukebox\.swf$, +); + +sub visit_installed_files { + my ($self, $item) = @_; + + return + unless $item->is_file; + + # skip packages that declare non-free contents + return + if $self->processable->is_non_free; + + # non-free .swf files + $self->pointed_hint('non-free-flash', $item->pointer) + if any { $item->name =~ m{/$_} } @flash_nonfree; + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Files/ObsoletePaths.pm b/lib/Lintian/Check/Files/ObsoletePaths.pm new file mode 100644 index 0000000..b1d2ddd --- /dev/null +++ b/lib/Lintian/Check/Files/ObsoletePaths.pm @@ -0,0 +1,92 @@ +# files/obsolete-paths -- lintian check script -*- perl -*- + +# Copyright (C) 1998 Christian Schwarz and Richard Braakman +# Copyright (C) 2021 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Files::ObsoletePaths; + +use v5.20; +use warnings; +use utf8; + +use Unicode::UTF8 qw(encode_utf8); + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +has OBSOLETE_PATHS => ( + is => 'rw', + lazy => 1, + default => sub { + my ($self) = @_; + + my %obsolete; + + my $data = $self->data->load('files/obsolete-paths',qr/\s*\->\s*/); + + for my $key ($data->all) { + + my $value = $data->value($key); + + my ($newdir, $moreinfo) = split(/\s*\~\~\s*/, $value, 2); + + $obsolete{$key} = { + 'newdir' => $newdir, + 'moreinfo' => $moreinfo, + 'match' => qr/$key/x, + 'olddir' => $key, + }; + } + + return \%obsolete; + } +); + +sub visit_installed_files { + my ($self, $item) = @_; + + # check for generic obsolete path + for my $obsolete_path (keys %{$self->OBSOLETE_PATHS}) { + + my $obs_data = $self->OBSOLETE_PATHS->{$obsolete_path}; + my $oldpathmatch = $obs_data->{'match'}; + + if ($item->name =~ m{$oldpathmatch}) { + + my $oldpath = $obs_data->{'olddir'}; + my $newpath = $obs_data->{'newdir'}; + my $moreinfo = $obs_data->{'moreinfo'}; + + $self->pointed_hint('package-installs-into-obsolete-dir', + $item->pointer,": $oldpath -> $newpath", $moreinfo); + } + } + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Files/Openpgp.pm b/lib/Lintian/Check/Files/Openpgp.pm new file mode 100644 index 0000000..dc421df --- /dev/null +++ b/lib/Lintian/Check/Files/Openpgp.pm @@ -0,0 +1,51 @@ +# files/openpgp -- lintian check script -*- perl -*- + +# Copyright (C) 2022 Guillem Jover <guillem@debian.org> +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Files::Openpgp; + +use v5.20; +use warnings; +use utf8; + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +sub visit_installed_files { + my ($self, $item) = @_; + + return + unless $item->is_file; + + $self->pointed_hint('openpgp-file-has-implementation-specific-extension', + $item->pointer) + if $item->name =~ m{\.gpg$}; + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Files/Ownership.pm b/lib/Lintian/Check/Files/Ownership.pm new file mode 100644 index 0000000..bbea4b9 --- /dev/null +++ b/lib/Lintian/Check/Files/Ownership.pm @@ -0,0 +1,74 @@ +# files/ownership -- lintian check script -*- perl -*- + +# Copyright (C) 1998 Christian Schwarz and Richard Braakman +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Files::Ownership; + +use v5.20; +use warnings; +use utf8; + +use Const::Fast; + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +const my $SLASH => q{/}; + +const my $MAXIMUM_LOW_RESERVED => 99; +const my $MAXIMUM_HIGH_RESERVED => 64_999; +const my $MINIMUM_HIGH_RESERVED => 60_000; +const my $NOBODY => 65_534; + +sub visit_installed_files { + my ($self, $item) = @_; + + $self->pointed_hint('wrong-file-owner-uid-or-gid', $item->pointer, + $item->uid . $SLASH . $item->gid) + if out_of_bounds($item->uid) + || out_of_bounds($item->gid); + + return; +} + +sub out_of_bounds { + my ($id) = @_; + + return 0 + if $id <= $MAXIMUM_LOW_RESERVED; + + return 0 + if $id == $NOBODY; + + return 0 + if $id >= $MINIMUM_HIGH_RESERVED + && $id <= $MAXIMUM_HIGH_RESERVED; + + return 1; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Files/P11Kit.pm b/lib/Lintian/Check/Files/P11Kit.pm new file mode 100644 index 0000000..a128fa0 --- /dev/null +++ b/lib/Lintian/Check/Files/P11Kit.pm @@ -0,0 +1,54 @@ +# files/p11-kit -- lintian check script -*- perl -*- + +# Copyright (C) 1998 Christian Schwarz and Richard Braakman +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Files::P11Kit; + +use v5.20; +use warnings; +use utf8; + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +sub visit_installed_files { + my ($self, $item) = @_; + + if ( + $item->name =~ m{^usr/share/p11-kit/modules/.} + && $item->name !~ m{\A usr/share/p11-kit/modules/ + [[:alnum:]][[:alnum:]_.-]*\.module\Z + }xsm + ) { + $self->pointed_hint('incorrect-naming-of-pkcs11-module', + $item->pointer); + } + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Files/Pam.pm b/lib/Lintian/Check/Files/Pam.pm new file mode 100644 index 0000000..c02cd4b --- /dev/null +++ b/lib/Lintian/Check/Files/Pam.pm @@ -0,0 +1,50 @@ +# files/pam -- lintian check script -*- perl -*- + +# Copyright (C) 1998 Christian Schwarz and Richard Braakman +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Files::Pam; + +use v5.20; +use warnings; +use utf8; + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +sub visit_installed_files { + my ($self, $item) = @_; + + # /etc/pam.conf + $self->pointed_hint('config-file-reserved', $item->pointer, + 'by libpam-runtime') + if $item->name =~ m{^etc/pam.conf$} + && $self->processable->name ne 'libpam-runtime'; + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Files/Permissions.pm b/lib/Lintian/Check/Files/Permissions.pm new file mode 100644 index 0000000..30cff5b --- /dev/null +++ b/lib/Lintian/Check/Files/Permissions.pm @@ -0,0 +1,249 @@ +# files/permissions -- lintian check script -*- perl -*- + +# Copyright (C) 1998 Christian Schwarz and Richard Braakman +# Copyright (C) 2020 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Files::Permissions; + +use v5.20; +use warnings; +use utf8; + +use Const::Fast; +use Path::Tiny; + +const my $NOT_EQUAL => q{!=}; + +const my $STANDARD_EXECUTABLE => oct(755); +const my $SETGID_EXECUTABLE => oct(4754); +const my $SET_USER_ID => oct(4000); +const my $SET_GROUP_ID => oct(2000); + +const my $STANDARD_FILE => oct(644); +const my $BACKUP_NINJA_FILE => oct(600); +const my $SUDOERS_FILE => oct(440); +const my $GAME_DATA => oct(664); + +const my $STANDARD_FOLDER => oct(755); +const my $GAME_FOLDER => oct(2775); +const my $VAR_LOCAL_FOLDER => oct(2775); +const my $VAR_LOCK_FOLDER => oct(1777); +const my $USR_SRC_FOLDER => oct(2775); + +const my $WORLD_READABLE => oct(444); + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +has component => ( + is => 'rw', + lazy => 1, + default => sub { + my ($self) = @_; + + return path($self->processable->path)->basename; + } +); + +has linked_against_libvga => ( + is => 'rw', + lazy => 1, + default => sub { + my ($self) = @_; + + my %linked_against_libvga; + + for my $item (@{$self->processable->installed->sorted_list}) { + + for my $library (@{$item->elf->{NEEDED} // []}){ + + $linked_against_libvga{$item->name} = 1 + if $library =~ m{^ libvga[.]so[.] }x; + } + } + + return \%linked_against_libvga; + } +); + +sub visit_installed_files { + my ($self, $item) = @_; + + if ($item->is_file) { + + if ( + $item->is_executable + && $item->identity eq 'root/games' + && ( !$item->is_setgid + || !$item->all_bits_set($STANDARD_EXECUTABLE)) + ) { + + $self->pointed_hint( + 'non-standard-game-executable-perm', + $item->pointer, + $item->octal_permissions, + $NOT_EQUAL, + sprintf('%04o', $SET_GROUP_ID | $STANDARD_EXECUTABLE) + ); + + return; + } + + $self->pointed_hint('executable-is-not-world-readable', + $item->pointer, $item->octal_permissions) + if $item->is_executable + && !$item->all_bits_set($WORLD_READABLE); + + if ($item->is_setuid || $item->is_setgid) { + + $self->pointed_hint('non-standard-setuid-executable-perm', + $item->pointer, $item->octal_permissions) + unless (($item->operm & ~($SET_USER_ID | $SET_GROUP_ID)) + == $STANDARD_EXECUTABLE) + || $item->operm == $SETGID_EXECUTABLE; + } + + # allow anything with suid in the name + return + if ($item->is_setuid || $item->is_setgid) + && $self->processable->name =~ / -suid /msx; + + # program is using svgalib + return + if $item->is_setuid + && !$item->is_setgid + && $item->owner eq 'root' + && exists $self->linked_against_libvga->{$item->name}; + + # program is a setgid game + return + if $item->is_setgid + && !$item->is_setuid + && $item->group eq 'games' + && $item->name =~ m{^ usr/ (?:lib/)? games/ \S+ }msx; + + if ($item->is_setuid || $item->is_setgid) { + $self->pointed_hint( + 'elevated-privileges', $item->pointer, + $item->octal_permissions, $item->identity + ); + + return; + } + + if ( $item->is_executable + && $item->operm != $STANDARD_EXECUTABLE) { + + $self->pointed_hint('non-standard-executable-perm', + $item->pointer, $item->octal_permissions, $NOT_EQUAL, + sprintf('%04o', $STANDARD_EXECUTABLE)); + + return; + } + + if (!$item->is_executable) { + + # game data + return + if $item->operm == $GAME_DATA + && $item->identity eq 'root/games' + && $item->name =~ m{^ var/ (?:lib/)? games/ \S+ }msx; + + # GNAT compiler wants read-only Ada library information. + if ( $item->name =~ m{^ usr/lib/ .* [.]ali $}msx + && $item->operm != $WORLD_READABLE) { + + $self->pointed_hint('bad-permissions-for-ali-file', + $item->pointer); + + return; + } + + # backupninja expects configurations files to be oct(600) + return + if $item->operm == $BACKUP_NINJA_FILE + && $item->name =~ m{^ etc/backup.d/ }msx; + + if ($item->name =~ m{^ etc/sudoers.d/ }msx) { + + # sudo requires sudoers files to be mode oct(440) + $self->pointed_hint( + 'bad-perm-for-file-in-etc-sudoers.d',$item->pointer, + $item->octal_permissions, $NOT_EQUAL, + sprintf('%04o', $SUDOERS_FILE) + )unless $item->operm == $SUDOERS_FILE; + + return; + } + + $self->pointed_hint( + 'non-standard-file-perm', $item->pointer, + $item->octal_permissions, $NOT_EQUAL, + sprintf('%04o', $STANDARD_FILE) + )unless $item->operm == $STANDARD_FILE; + } + + } + + if ($item->is_dir) { + + # game directory with setgid bit + return + if $item->operm == $GAME_FOLDER + && $item->identity eq 'root/games' + && $item->name =~ m{^ var/ (?:lib/)? games/ \S+ }msx; + + # shipping files here triggers warnings elsewhere + return + if $item->operm == $VAR_LOCK_FOLDER + && $item->identity eq 'root/root' + && ( $item->name =~ m{^ (?:var/)? tmp/ }msx + || $item->name eq 'var/lock/'); + + # shipping files here triggers warnings elsewhere + return + if $item->operm == $VAR_LOCAL_FOLDER + && $item->identity eq 'root/staff' + && $item->name eq 'var/local/'; + + # /usr/src created by base-files + return + if $item->operm == $USR_SRC_FOLDER + && $item->identity eq 'root/src' + && $item->name eq 'usr/src/'; + + $self->pointed_hint( + 'non-standard-dir-perm', $item->pointer, + $item->octal_permissions, $NOT_EQUAL, + sprintf('%04o', $STANDARD_FOLDER) + )unless $item->operm == $STANDARD_FOLDER; + } + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Files/Permissions/UsrLib.pm b/lib/Lintian/Check/Files/Permissions/UsrLib.pm new file mode 100644 index 0000000..e465310 --- /dev/null +++ b/lib/Lintian/Check/Files/Permissions/UsrLib.pm @@ -0,0 +1,54 @@ +# files/permissions/usr-lib -- lintian check script -*- perl -*- + +# Copyright (C) 2020 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Files::Permissions::UsrLib; + +use v5.20; +use warnings; +use utf8; + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +sub visit_installed_files { + my ($self, $item) = @_; + + # see Bug#959037 for details + return + if $self->processable->type eq 'udeb'; + + return + unless $item->name =~ m{^usr/lib/}; + + $self->pointed_hint('executable-in-usr-lib', $item->pointer) + if $item->is_file && $item->is_executable; + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Files/Pkgconfig.pm b/lib/Lintian/Check/Files/Pkgconfig.pm new file mode 100644 index 0000000..b2d555b --- /dev/null +++ b/lib/Lintian/Check/Files/Pkgconfig.pm @@ -0,0 +1,121 @@ +# files/pkgconfig -- lintian check script -*- perl -*- + +# Copyright (C) 1998 Christian Schwarz and Richard Braakman +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Files::Pkgconfig; + +use v5.20; +use warnings; +use utf8; + +use Const::Fast; +use Unicode::UTF8 qw(encode_utf8); + +use Lintian::SlidingWindow; + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +const my $EMPTY => q{}; + +has PKG_CONFIG_BAD_REGEX => ( + is => 'rw', + lazy => 1, + default => sub { + my ($self) = @_; + + return $self->data->load('files/pkg-config-bad-regex',qr/~~~~~/); + } +); + +sub visit_installed_files { + my ($self, $item) = @_; + + my $architecture = $self->processable->fields->value('Architecture'); + + # arch-indep pkgconfig + if ( $item->is_regular_file + && $item->name=~ m{^usr/(lib(/[^/]+)?|share)/pkgconfig/[^/]+\.pc$}){ + + my $prefix = $1; + my $pkg_config_arch = $2 // $EMPTY; + $pkg_config_arch =~ s{\A/}{}ms; + + $self->pointed_hint('pkg-config-unavailable-for-cross-compilation', + $item->pointer) + if $prefix eq 'lib'; + + open(my $fd, '<:raw', $item->unpacked_path) + or die encode_utf8('Cannot open ' . $item->unpacked_path); + + my $sfd = Lintian::SlidingWindow->new; + $sfd->handle($fd); + + BLOCK: + while (my $block = $sfd->readwindow) { + # remove comment line + $block =~ s/\#\V*//gsm; + # remove continuation line + $block =~ s/\\\n/ /gxsm; + # check if pkgconfig file include path point to + # arch specific dir + + my $DEB_HOST_MULTIARCH + = $self->data->architectures->deb_host_multiarch; + for my $madir (values %{$DEB_HOST_MULTIARCH}) { + + next + if $pkg_config_arch eq $madir; + + if ($block =~ m{\W\Q$madir\E(\W|$)}xms) { + + $self->pointed_hint('pkg-config-multi-arch-wrong-dir', + $item->pointer, + 'full text contains architecture specific dir',$madir); + + last; + } + } + + for my $pattern ($self->PKG_CONFIG_BAD_REGEX->all) { + + while($block =~ m{$pattern}xmsg) { + + my $context = $1; + + $self->pointed_hint('pkg-config-bad-directive', + $item->pointer,$context); + } + } + } + close($fd); + } + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Files/PrivacyBreach.pm b/lib/Lintian/Check/Files/PrivacyBreach.pm new file mode 100644 index 0000000..8d75623 --- /dev/null +++ b/lib/Lintian/Check/Files/PrivacyBreach.pm @@ -0,0 +1,420 @@ +# files/privacy-breach -- lintian check script -*- perl -*- + +# Copyright (C) 1998 Christian Schwarz and Richard Braakman +# Copyright (C) 2021 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Files::PrivacyBreach; + +use v5.20; +use warnings; +use utf8; + +use Const::Fast; +use Unicode::UTF8 qw(encode_utf8); + +use Lintian::SlidingWindow; + +const my $BLOCKSIZE => 16_384; +const my $EMPTY => q{}; + +const my $PRIVACY_BREAKER_WEBSITES_FIELDS => 3; + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +has PRIVACY_BREAKER_WEBSITES => ( + is => 'rw', + lazy => 1, + default => sub { + my ($self) = @_; + + my %website; + + my $data + = $self->data->load('files/privacy-breaker-websites',qr/\s*\~\~/); + + for my $key ($data->all) { + + my $value = $data->value($key); + + my ($pattern, $tag, $suggest) + = split(/ \s* ~~ \s* /msx, + $value,$PRIVACY_BREAKER_WEBSITES_FIELDS); + + $tag //= $EMPTY; + + # trim both ends + $tag =~ s/^\s+|\s+$//g; + + $tag = $key + unless length $tag; + + $website{$key} = { + 'tag' => $tag, + 'regexp' => qr/$pattern/xsm, + }; + + $website{$key}{'suggest'} = $suggest + if defined $suggest; + } + + return \%website; + } +); + +has PRIVACY_BREAKER_FRAGMENTS => ( + is => 'rw', + lazy => 1, + default => sub { + my ($self) = @_; + + my %fragment; + + my $data + = $self->data->load('files/privacy-breaker-fragments',qr/\s*\~\~/); + + for my $key ($data->all) { + + my $value = $data->value($key); + + my ($pattern, $tag) = split(/\s*\~\~\s*/, $value, 2); + + $fragment{$key} = { + 'keyword' => $key, + 'regex' => qr/$pattern/xsm, + 'tag' => $tag, + }; + } + + return \%fragment; + } +); + +has PRIVACY_BREAKER_TAG_ATTR => ( + is => 'rw', + lazy => 1, + default => sub { + my ($self) = @_; + + my %attribute; + + my $data + = $self->data->load('files/privacy-breaker-tag-attr',qr/\s*\~\~\s*/); + + for my $key ($data->all) { + + my $value = $data->value($key); + + my ($keywords,$pattern) = split(/\s*\~\~\s*/, $value, 2); + + $pattern =~ s/&URL/(?:(?:ht|f)tps?:)?\/\/[^"\r\n]*/g; + + my @keywordlist; + + my @keywordsorraw = split(/\s*\|\|\s*/,$keywords); + + for my $keywordor (@keywordsorraw) { + my @keywordsandraw = split(/\s*&&\s*/,$keywordor); + push(@keywordlist, \@keywordsandraw); + } + + $attribute{$key} = { + 'keywords' => \@keywordlist, + 'regex' => qr/$pattern/xsm, + }; + } + + return \%attribute; + } +); + +sub detect_privacy_breach { + my ($self, $file) = @_; + + my %privacybreachhash; + + return + unless $file->is_regular_file; + + open(my $fd, '<:raw', $file->unpacked_path) + or die encode_utf8('Cannot open ' . $file->unpacked_path); + + my $sfd = Lintian::SlidingWindow->new; + $sfd->handle($fd); + $sfd->blocksize($BLOCKSIZE); + $sfd->blocksub(sub { $_ = lc; }); + + while (my $lowercase = $sfd->readwindow) { + # strip comments + for my $x (qw(<!--(?!\[if).*?--\s*> /\*(?!@cc_on).*?\*/)) { + $lowercase =~ s/$x//gs; + } + + # keep sorted; otherwise 'exists' below produces inconsistent output + for my $keyword (sort keys %{$self->PRIVACY_BREAKER_FRAGMENTS}) { + + if ($lowercase =~ / \Q$keyword\E /msx) { + my $keyvalue= $self->PRIVACY_BREAKER_FRAGMENTS->{$keyword}; + my $regex = $keyvalue->{'regex'}; + + if ($lowercase =~ m{($regex)}) { + my $capture = $1; + my $breaker_tag = $keyvalue->{'tag'}; + + unless (exists $privacybreachhash{'tag-'.$breaker_tag}){ + + $privacybreachhash{'tag-'.$breaker_tag} = 1; + + $self->pointed_hint($breaker_tag, $file->pointer, + "(choke on: $capture)"); + } + } + } + } + + for my $x ( + 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 + unless $lowercase =~ / \Q$x\E /msx; + + $self->detect_generic_privacy_breach($lowercase, + \%privacybreachhash,$file); + + last; + } + } + + close($fd); + return; +} + +# According to html norm src attribute is used by tags: +# +# audio(v5+), embed (v5+), iframe (v4), frame, img, input, script, source, track(v5), video (v5) +# Add other tags with src due to some javascript code: +# div due to div.js +# div data-href due to jquery +# css with @import +sub detect_generic_privacy_breach { + my ($self, $block, $privacybreachhash, $file) = @_; + my %matchedkeyword; + + # now check generic tag + TYPE: + for my $type (sort keys %{$self->PRIVACY_BREAKER_TAG_ATTR}) { + my $keyvalue = $self->PRIVACY_BREAKER_TAG_ATTR->{$type}; + my $keywords = $keyvalue->{'keywords'}; + + my $orblockok = 0; + ORBLOCK: + for my $keywordor (@{$keywords}) { + ANDBLOCK: + for my $keyword (@{$keywordor}) { + + my $thiskeyword = $matchedkeyword{$keyword}; + if(!defined($thiskeyword)) { + if ($block =~ / \Q$keyword\E /msx) { + $matchedkeyword{$keyword} = 1; + $orblockok = 1; + }else { + $matchedkeyword{$keyword} = 0; + $orblockok = 0; + next ORBLOCK; + } + } + if($matchedkeyword{$keyword} == 0) { + $orblockok = 0; + next ORBLOCK; + }else { + $orblockok = 1; + } + } + if($orblockok == 1) { + last ORBLOCK; + } + } + if($orblockok == 0) { + next TYPE; + } + + my $regex = $keyvalue->{'regex'}; + + while($block=~m{$regex}g){ + $self->check_tag_url_privacy_breach($1, $2, $3,$privacybreachhash, + $file); + } + } + return; +} + +sub is_localhost { + my ($urlshort) = @_; + if( $urlshort =~ m{^(?:[^/]+@)?localhost(?:[:][^/]+)?/}i + || $urlshort =~ m{^(?:[^/]+@)?::1(?:[:][^/]+)?/}i + || $urlshort =~ m{^(?:[^/]+@)?127(?:\.\d{1,3}){3}(?:[:][^/]+)?/}i) { + return 1; + }else { + return 0; + } +} + +sub check_tag_url_privacy_breach { + my ($self, $fulltag, $tagattr, $url,$privacybreachhash, $file) = @_; + + my $website = $url; + # detect also "^//" trick + $website =~ s{^"?(?:(?:ht|f)tps?:)?//}{}; + $website =~ s/"?$//; + + if (is_localhost($website)){ + # do nothing ok + return; + } + + # reparse fulltag for rel + if ($tagattr eq 'link') { + + my $rel = $fulltag; + $rel =~ m{<link + (?:\s[^>]+)? \s+ + rel="([^"\r\n]*)" + [^>]* + >}xismog; + my $relcontent = $1; + + if (defined($relcontent)) { + # See, for example, https://www.w3schools.com/tags/att_link_rel.asp + my %allowed = ( + 'alternate' => 1, # #891301 + 'author' => 1, # #891301 + 'bookmark' => 1, # #746656 + 'canonical' => 1, # #762753 + 'copyright' => 1, # #902919 + 'edituri' => 1, # #902919 + 'generator' => 1, # #891301 + 'generator-home' => 1, # texinfo + 'help' => 1, # #891301 + 'license' => 1, # #891301 + 'next' => 1, # #891301 + 'prev' => 1, # #891301 + 'schema.dct' => 1, # #736992 + 'search' => 1, # #891301 + ); + + return + if ($allowed{$relcontent}); + + if ($relcontent eq 'alternate') { + my $type = $fulltag; + $type =~ m{<link + (?:\s[^>]+)? \s+ + type="([^"\r\n]*)" + [^>]* + >}xismog; + my $typecontent = $1; + if($typecontent eq 'application/rdf+xml') { + # see #79991 + return; + } + } + } + } + + # False positive + # legal.xml file of gnome + # could be replaced by a link to local file but not really a privacy breach + if( $file->basename eq 'legal.xml' + && $tagattr eq 'link' + && $website =~ m{^creativecommons.org/licenses/}) { + + return; + } + + # In Mallard XML, <link> is a clickable anchor that will not be + # followed automatically. + if( $file->basename =~ '.xml$' + && $tagattr eq 'link' + && $file->bytes=~ qr{ xmlns="http://projectmallard\.org/1\.0/"}) { + + return; + } + + # track well known site + for my $breaker (sort keys %{$self->PRIVACY_BREAKER_WEBSITES}) { + + my $value = $self->PRIVACY_BREAKER_WEBSITES->{$breaker}; + my $regex = $value->{'regexp'}; + + if ($website =~ m{$regex}mxs) { + + unless (exists $privacybreachhash->{'tag-'.$breaker}) { + + my $tag = $value->{'tag'}; + my $suggest = $value->{'suggest'} // $EMPTY; + + $privacybreachhash->{'tag-'.$breaker}= 1; + $self->pointed_hint($tag, $file->pointer, $suggest, "($url)"); + } + + # do not go to generic case + return; + } + } + + # generic case + unless (exists $privacybreachhash->{'tag-generic-'.$website}){ + + $self->pointed_hint('privacy-breach-generic', $file->pointer, + "[$fulltag]","($url)"); + $privacybreachhash->{'tag-generic-'.$website} = 1; + } + + return; +} + +sub visit_installed_files { + my ($self, $file) = @_; + + # html/javascript + if ( $file->is_file + && $file->name =~ m/\.(?:x?html?\d?|js|xht|xml|css)$/i) { + + if( $self->processable->source_name eq 'josm' + and $file->basename eq 'defaultpresets.xml') { + # false positive + + } else { + $self->detect_privacy_breach($file); + } + } + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Files/Scripts.pm b/lib/Lintian/Check/Files/Scripts.pm new file mode 100644 index 0000000..3dff34e --- /dev/null +++ b/lib/Lintian/Check/Files/Scripts.pm @@ -0,0 +1,57 @@ +# files/scripts -- lintian check script -*- perl -*- + +# Copyright (C) 1998 Christian Schwarz and Richard Braakman +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Files::Scripts; + +use v5.20; +use warnings; +use utf8; + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +sub visit_installed_files { + my ($self, $item) = @_; + + return + unless $item->is_file; + + # language extensions + if ( + $item->name =~ m{\A + (?:usr/)?(?:s?bin|games)/[^/]+\. + (?:p[ly]|php|rb|[bc]?sh|tcl) + \Z}xsm + ) { + $self->pointed_hint('script-with-language-extension', $item->pointer); + } + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Files/Sgml.pm b/lib/Lintian/Check/Files/Sgml.pm new file mode 100644 index 0000000..fd4ace2 --- /dev/null +++ b/lib/Lintian/Check/Files/Sgml.pm @@ -0,0 +1,48 @@ +# files/sgml -- lintian check script -*- perl -*- + +# Copyright (C) 1998 Christian Schwarz and Richard Braakman +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Files::Sgml; + +use v5.20; +use warnings; +use utf8; + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +sub visit_installed_files { + my ($self, $item) = @_; + + # /usr/lib/sgml + $self->pointed_hint('file-in-usr-lib-sgml', $item->pointer) + if $item->name =~ m{^usr/lib/sgml/\S}; + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Files/SourceMissing.pm b/lib/Lintian/Check/Files/SourceMissing.pm new file mode 100644 index 0000000..0714443 --- /dev/null +++ b/lib/Lintian/Check/Files/SourceMissing.pm @@ -0,0 +1,283 @@ +# files/source-missing -- lintian check script -*- perl -*- +# +# based on debhelper check, +# Copyright (C) 1999 Joey Hess +# Copyright (C) 2000 Sean 'Shaleh' Perry +# Copyright (C) 2002 Josip Rodin +# Copyright (C) 2007 Russ Allbery +# Copyright (C) 2013-2018 Bastien ROUCARIES +# Copyright (C) 2017-2020 Chris Lamb <lamby@debian.org> +# Copyright (C) 2020-2021 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Files::SourceMissing; + +use v5.20; +use warnings; +use utf8; + +use Const::Fast; +use File::Basename qw(basename); +use List::SomeUtils qw(first_value); +use List::UtilsBy qw(max_by); + +# very long line lengths +const my $VERY_LONG_LINE_LENGTH => 512; + +const my $EMPTY => q{}; +const my $DOLLAR => q{$}; +const my $DOT => q{.}; +const my $DOUBLE_DOT => q{..}; + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +sub visit_patched_files { + my ($self, $item) = @_; + + return + unless $item->is_file; + + # prebuilt-file or forbidden file type + $self->pointed_hint('source-contains-prebuilt-wasm-binary', $item->pointer) + if $item->file_type =~ m{^WebAssembly \s \(wasm\) \s binary \s module}x; + + $self->pointed_hint('source-contains-prebuilt-windows-binary', + $item->pointer) + if $item->file_type + =~ m{\b(?:PE(?:32|64)|(?:MS-DOS|COM)\s executable)\b}x; + + $self->pointed_hint('source-contains-prebuilt-silverlight-object', + $item->pointer) + if $item->file_type =~ m{^Zip \s archive \s data}x + && $item->name =~ m{(?i)\.xac$}x; + + if ($item->file_type =~ m{^python \s \d(\.\d+)? \s byte-compiled}x) { + + $self->pointed_hint('source-contains-prebuilt-python-object', + $item->pointer); + + $self->pointed_hint('source-is-missing', $item->pointer) + unless $self->find_source($item, + {'.py' => '(?i)(?:\.cpython-\d{2}|\.pypy)?\.py[co]$'}); + } + + if ($item->file_type =~ m{\bELF\b}x) { + $self->pointed_hint('source-contains-prebuilt-binary', $item->pointer); + + my %patterns = map { + $_ => +'(?i)(?:[\.-](?:bin|elf|e|hs|linux\d+|oo?|or|out|so(?:\.\d+)*)|static|_o\.golden)?$' + } qw(.asm .c .cc .cpp .cxx .f .F .i .ml .rc .S); + + $self->pointed_hint('source-is-missing', $item->pointer) + unless $self->find_source($item, \%patterns); + } + + if ($item->file_type =~ m{^Macromedia \s Flash}x) { + + $self->pointed_hint('source-contains-prebuilt-flash-object', + $item->pointer); + + $self->pointed_hint('source-is-missing', $item->pointer) + unless $self->find_source($item, {'.as' => '(?i)\.swf$'}); + } + + if ( $item->file_type =~ m{^Composite \s Document \s File}x + && $item->name =~ m{(?i)\.fla$}x) { + + $self->pointed_hint('source-contains-prebuilt-flash-project', + $item->pointer); + + $self->pointed_hint('source-is-missing', $item->pointer) + unless $self->find_source($item, {'.as' => '(?i)\.fla$'}); + } + + # see #745152 + # Be robust check also .js + if ($item->basename eq 'deployJava.js') { + if ( + lc $item->decoded_utf8 + =~ m/(?:\A|\v)\s*var\s+deployJava\s*=\s*function/xmsi) { + + $self->pointed_hint('source-is-missing', $item->pointer) + unless $self->find_source($item, + {'.txt' => '(?i)\.js$', $EMPTY => $EMPTY}); + + return; + } + } + + # do not forget to change also $JS_EXT in file.pm + if ($item->name + =~ m{(?i)[-._](?:compiled|compressed|lite|min|pack(?:ed)?|prod|umd|yc)\.js$}x + ) { + + $self->pointed_hint('source-contains-prebuilt-javascript-object', + $item->pointer); + my %patterns = map { + $_ => +'(?i)(?:[-._](?:compiled|compressed|lite|min|pack(?:ed)?|prod|umd|yc))?\.js$' + } qw(.js _orig.js .js.orig .src.js -src.js .debug.js -debug.js -nc.js); + + $self->pointed_hint('source-is-missing', $item->pointer) + unless $self->find_source($item, \%patterns); + + return; + } + + my @lines = split(/\n/, $item->bytes); + my %line_length; + my %semicolon_count; + + my $position = 1; + for my $line (@lines) { + + $line_length{$position} = length $line; + $semicolon_count{$position} = ($line =~ tr/;/;/); + + } continue { + ++$position; + } + + my $longest = max_by { $line_length{$_} } keys %line_length; + my $most = max_by { $semicolon_count{$_} } keys %semicolon_count; + + return + if !defined $longest || $line_length{$longest} <= $VERY_LONG_LINE_LENGTH; + + if ($item->basename =~ m{\.js$}i) { + + $self->pointed_hint('source-contains-prebuilt-javascript-object', + $item->pointer); + + # Check for missing source. It will check + # for the source file in well known directories + $self->pointed_hint('source-is-missing', $item->pointer) + unless $self->find_source( + $item, + { + '.debug.js' => '(?i)\.js$', + '-debug.js' => '(?i)\.js$', + $EMPTY => $EMPTY + } + ); + } + + if ($item->basename =~ /\.(?:x?html?\d?|xht)$/i) { + + # html file + $self->pointed_hint('source-is-missing', $item->pointer) + unless $self->find_source($item, {'.fragment.js' => $DOLLAR}); + } + + return; +} + +sub find_source { + my ($self, $item, $patternref) = @_; + + $patternref //= {}; + + return undef + unless $item->is_regular_file; + + return undef + if $self->processable->is_non_free; + + my %patterns = %{$patternref}; + + my @alternatives; + for my $replacement (keys %patterns) { + + my $newname = $item->basename; + + # empty pattern would repeat the last regex compiled + my $pattern = $patterns{$replacement}; + $newname =~ s/$pattern/$replacement/ + if length $pattern; + + push(@alternatives, $newname) + if length $newname; + } + + my $index = $self->processable->patched; + my @candidates; + + # add standard locations + push(@candidates, + $index->resolve_path('debian/missing-sources/' . $item->name)); + push(@candidates, + $index->resolve_path('debian/missing-sources/' . $item->basename)); + + my $dirname = $item->dirname; + my $parentname = basename($dirname); + + my @absolute = ( + # libtool + '.libs', + ".libs/$dirname", + # mathjax + 'unpacked', + # for missing source set in debian + 'debian', + 'debian/missing-sources', + "debian/missing-sources/$dirname" + ); + + for my $absolute (@absolute) { + push(@candidates, $index->resolve_path("$absolute/$_")) + for @alternatives; + } + + my @relative = ( + # likely in current dir + $DOT, + # for binary object built by libtool + $DOUBLE_DOT, + # maybe in src subdir + './src', + # maybe in ../src subdir + '../src', + "../../src/$parentname", + # emscripten + './flash-src/src/net/gimite/websocket', + ); + + for my $relative (@relative) { + push(@candidates, $item->resolve_path("$relative/$_")) + for @alternatives; + } + + my @found = grep { defined } @candidates; + + # careful with behavior around empty arrays + my $source = first_value { $_->name ne $item->name } @found; + + return $source; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Files/Special.pm b/lib/Lintian/Check/Files/Special.pm new file mode 100644 index 0000000..7a59006 --- /dev/null +++ b/lib/Lintian/Check/Files/Special.pm @@ -0,0 +1,50 @@ +# files/special -- lintian check script -*- perl -*- + +# Copyright (C) 1998 Christian Schwarz and Richard Braakman +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Files::Special; + +use v5.20; +use warnings; +use utf8; + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +sub visit_installed_files { + my ($self, $item) = @_; + + return + if $item->is_file || $item->is_dir || $item->is_symlink; + + $self->pointed_hint('special-file', $item->pointer, + sprintf('%04o',$item->operm)); + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Files/SymbolicLinks.pm b/lib/Lintian/Check/Files/SymbolicLinks.pm new file mode 100644 index 0000000..0edcde2 --- /dev/null +++ b/lib/Lintian/Check/Files/SymbolicLinks.pm @@ -0,0 +1,229 @@ +# files/symbolic-links -- lintian check script -*- perl -*- + +# Copyright (C) 1998 Christian Schwarz and Richard Braakman +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Files::SymbolicLinks; + +use v5.20; +use warnings; +use utf8; + +use Const::Fast; + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +const my $SLASH => q{/}; +const my $DOT => q{.}; +const my $DOUBLE_DOT => q{..}; +const my $VERTICAL_BAR => q{|}; +const my $ARROW => q{->}; + +# an OR (|) regex of all compressed extension +has COMPRESS_FILE_EXTENSIONS_OR_ALL => ( + is => 'rw', + lazy => 1, + default => sub { + my ($self) = @_; + + my $COMPRESS_FILE_EXTENSIONS + = $self->data->load('files/compressed-file-extensions',qr/\s+/); + + my $text = join($VERTICAL_BAR, + (map { quotemeta } $COMPRESS_FILE_EXTENSIONS->all)); + + return qr/$text/; + } +); + +sub visit_patched_files { + my ($self, $item) = @_; + + return + unless $item->is_symlink; + + # absolute links cannot be resolved + if ($item->link =~ m{^/}) { + + # allow /dev/null link target for masked systemd service files + $self->pointed_hint('absolute-symbolic-link-target-in-source', + $item->pointer, $item->link) + unless $item->link eq '/dev/null'; + } + + # some relative links cannot be resolved inside the source + $self->pointed_hint('wayward-symbolic-link-target-in-source', + $item->pointer, $item->link) + unless defined $_->link_normalized || $item->link =~ m{^/}; + + return; +} + +sub is_tmp_path { + my ($path) = @_; + + return 1 + if $path =~ m{^tmp/.} + || $path =~ m{^(?:var|usr)/tmp/.} + || $path =~ m{^/dev/shm/}; + + return 0; +} + +sub visit_installed_files { + my ($self, $item) = @_; + + return + unless $item->is_symlink; + + my $mylink = $item->link; + $self->pointed_hint('symlink-has-double-slash', $item->pointer,$item->link) + if $mylink =~ s{//+}{/}g; + + $self->pointed_hint('symlink-ends-with-slash', $item->pointer, $item->link) + if $mylink =~ s{(.)/$}{$1}; + + # determine top-level directory of file + $item->name =~ m{^/?([^/]*)}; + my $filetop = $1; + + if ($mylink =~ m{^/([^/]*)}) { + my $flinkname = substr($mylink,1); + # absolute link, including link to / + # determine top-level directory of link + my $linktop = $1; + + if ($self->processable->type ne 'udeb' and $filetop eq $linktop) { + # absolute links within one toplevel directory are _not_ ok! + $self->pointed_hint('absolute-symlink-in-top-level-folder', + $item->pointer, $item->link); + } + + my $BUILD_PATH_REGEX + = $self->data->load('files/build-path-regex',qr/~~~~~/); + + for my $pattern ($BUILD_PATH_REGEX->all) { + + $self->pointed_hint('symlink-target-in-build-tree', + $item->pointer, $mylink) + if $flinkname =~ m{$pattern}xms; + } + + $self->pointed_hint('symlink-target-in-tmp', $item->pointer,$mylink) + if is_tmp_path($flinkname); + + # Any other case is already definitely non-recursive + $self->pointed_hint('symlink-is-self-recursive', $item->pointer, + $item->link) + if $mylink eq $SLASH; + + } else { + # relative link, we can assume from here that the link + # starts nor ends with / + + my @filecomponents = split(m{/}, $item->name); + # chop off the name of the symlink + pop @filecomponents; + + my @linkcomponents = split(m{/}, $mylink); + + # handle `../' at beginning of $item->link + my ($lastpop, $linkcomponent); + while ($linkcomponent = shift @linkcomponents) { + if ($linkcomponent eq $DOT) { + $self->pointed_hint('symlink-contains-spurious-segments', + $item->pointer, $item->link) + unless $mylink eq $DOT; + next; + } + last if $linkcomponent ne $DOUBLE_DOT; + if (@filecomponents) { + $lastpop = pop @filecomponents; + } else { + $self->pointed_hint('symlink-has-too-many-up-segments', + $item->pointer, $item->link); + goto NEXT_LINK; + } + } + + if (!defined $linkcomponent) { + # After stripping all starting .. components, nothing left + $self->pointed_hint('symlink-is-self-recursive', $item->pointer, + $item->link); + } + + # does the link go up and then down into the same + # directory? (lastpop indicates there was a backref + # at all, no linkcomponent means the symlink doesn't + # get up anymore) + if ( defined $lastpop + && defined $linkcomponent + && $linkcomponent eq $lastpop) { + $self->pointed_hint('lengthy-symlink', $item->pointer,$item->link); + } + + unless (@filecomponents) { + # we've reached the root directory + if ( ($self->processable->type ne 'udeb') + && (!defined $linkcomponent) + || ($filetop ne $linkcomponent)) { + + # relative link into other toplevel directory. + # this hits a relative symbolic link in the root too. + $self->pointed_hint('relative-symlink', $item->pointer, + $item->link); + } + } + + # check additional segments for mistakes like `foo/../bar/' + foreach (@linkcomponents) { + if ($_ eq $DOUBLE_DOT || $_ eq $DOT) { + $self->pointed_hint('symlink-contains-spurious-segments', + $item->pointer, $item->link); + last; + } + } + } + NEXT_LINK: + + my $pattern = $self->COMPRESS_FILE_EXTENSIONS_OR_ALL; + + # symlink pointing to a compressed file + if ($item->link =~ qr{ [.] ($pattern) \s* $}x) { + + my $extension = $1; + + # symlink has correct extension? + $self->pointed_hint('compressed-symlink-with-wrong-ext', + $item->pointer, $item->link) + unless $item->name =~ qr{[.]$extension\s*$}; + } + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Files/SymbolicLinks/Broken.pm b/lib/Lintian/Check/Files/SymbolicLinks/Broken.pm new file mode 100644 index 0000000..39ae2d2 --- /dev/null +++ b/lib/Lintian/Check/Files/SymbolicLinks/Broken.pm @@ -0,0 +1,119 @@ +# files/symbolic-links/broken -- lintian check script -*- perl -*- +# +# Copyright (C) 2011 Niels Thykier +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Files::SymbolicLinks::Broken; + +use v5.20; +use warnings; +use utf8; + +use Const::Fast; +use File::Basename qw(dirname); +use List::SomeUtils qw(any); + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +const my $EMPTY => q{}; +const my $ASTERISK => q{*}; + +has wildcard_links => (is => 'rw', default => sub{ [] }); + +sub visit_installed_files { + my ($self, $item) = @_; + + return + unless $item->is_symlink; + + # target relative to the package root + my $path = $item->link_normalized; + + # unresolvable link + unless (defined $path) { + + $self->pointed_hint('package-contains-unsafe-symlink', $item->pointer); + return; + } + + # will always have links to the package root (although + # self-recursive and possibly not very useful) + return + if $path eq $EMPTY; + + # If it contains a "*" it probably a bad + # ln -s target/*.so link expansion. We do not bother looking + # for other broken symlinks as people keep adding new special + # cases and it is not worth it. + push(@{$self->wildcard_links}, $item) + if index($item->link, $ASTERISK) >= 0; + + return; +} + +sub installable { + my ($self) = @_; + + return + unless @{$self->wildcard_links}; + + # get prerequisites from same source package + my @prerequisites + = @{$self->group->direct_dependencies($self->processable)}; + + for my $item (@{$self->wildcard_links}){ + + # target relative to the package root + my $path = $item->link_normalized; + + # destination is in the package + next + if $self->processable->installed->lookup($path) + || $self->processable->installed->lookup("$path/"); + + # does the link point to any prerequisites in same source package + next + if + any {$_->installed->lookup($path) || $_->installed->lookup("$path/")} + @prerequisites; + + # link target + my $target = $item->link; + + # strip leading slashes for reporting + $target =~ s{^/+}{}; + + # nope - not found in any of our direct dependencies. Ergo it is + # a broken "ln -s target/*.so link" expansion. + $self->pointed_hint('package-contains-broken-symlink-wildcard', + $item->pointer, $target); + } + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Files/Unicode/Trojan.pm b/lib/Lintian/Check/Files/Unicode/Trojan.pm new file mode 100644 index 0000000..5c4f2e1 --- /dev/null +++ b/lib/Lintian/Check/Files/Unicode/Trojan.pm @@ -0,0 +1,134 @@ +# files/unicode/trojan -- lintian check script -*- perl -*- + +# Copyright (C) 1998 Christian Schwarz and Richard Braakman +# Copyright (C) 2019 Chris Lamb <lamby@debian.org> +# Copyright (C) 2020 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Files::Unicode::Trojan; + +use v5.20; +use warnings; +use utf8; + +use Const::Fast; +use Unicode::UTF8 qw(decode_utf8 encode_utf8 valid_utf8); + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +const my $DOUBLE_QUOTE => q{"}; + +const my %NAMES_BY_CHARACTER => ( + qq{\N{ARABIC LETTER MARK}} => 'ARABIC LETTER MARK', # U+061C + qq{\N{LEFT-TO-RIGHT MARK}} => 'LEFT-TO-RIGHT MARK', # U+200E + qq{\N{RIGHT-TO-LEFT MARK}} => 'RIGHT-TO-LEFT MARK', # U+200F + qq{\N{LEFT-TO-RIGHT EMBEDDING}} => 'LEFT-TO-RIGHT EMBEDDING', # U+202A + qq{\N{RIGHT-TO-LEFT EMBEDDING}} => 'RIGHT-TO-LEFT EMBEDDING', # U+202B + qq{\N{POP DIRECTIONAL FORMATTING}} =>'POP DIRECTIONAL FORMATTING', # U+202C + qq{\N{LEFT-TO-RIGHT OVERRIDE}} => 'LEFT-TO-RIGHT OVERRIDE', # U+202D + qq{\N{RIGHT-TO-LEFT OVERRIDE}} => 'RIGHT-TO-LEFT OVERRIDE', # U+202E + qq{\N{LEFT-TO-RIGHT ISOLATE}} => 'LEFT-TO-RIGHT ISOLATE', # U+2066 + qq{\N{RIGHT-TO-LEFT ISOLATE}} => 'RIGHT-TO-LEFT ISOLATE', # U+2067 + qq{\N{FIRST STRONG ISOLATE}} => 'FIRST STRONG ISOLATE', # U+2068 + qq{\N{POP DIRECTIONAL ISOLATE}} => 'POP DIRECTIONAL ISOLATE', # U+2069 +); + +sub visit_patched_files { + my ($self, $item) = @_; + + $self->check_for_trojan($item); + + return; +} + +sub visit_installed_files { + my ($self, $item) = @_; + + $self->check_for_trojan($item); + + return; +} + +sub check_for_trojan { + my ($self, $item) = @_; + + if (valid_utf8($item->name)) { + + my $decoded_name = decode_utf8($item->name); + + # all file names + for my $character (keys %NAMES_BY_CHARACTER) { + + $self->pointed_hint( + 'unicode-trojan', + $item->pointer, + 'File name', + sprintf('U+%vX', $character), + $DOUBLE_QUOTE. $NAMES_BY_CHARACTER{$character}. $DOUBLE_QUOTE + ) if $decoded_name =~ m{\Q$character\E}; + } + } + + return + unless $item->is_script; + + open(my $fd, '<', $item->unpacked_path) + or die encode_utf8('Cannot open ' . $item->unpacked_path); + + my $position = 1; + while (my $line = <$fd>) { + + chomp $line; + + next + unless valid_utf8($line); + + my $decoded = decode_utf8($line); + + my $pointer = $item->pointer($position); + + for my $character (keys %NAMES_BY_CHARACTER) { + + $self->pointed_hint( + 'unicode-trojan', + $pointer, + 'Contents', + sprintf('U+%vX', $character), + $DOUBLE_QUOTE. $NAMES_BY_CHARACTER{$character}. $DOUBLE_QUOTE + )if $decoded =~ m{\Q$character\E}; + } + + } continue { + ++$position; + } + + close $fd; + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Files/Unwanted.pm b/lib/Lintian/Check/Files/Unwanted.pm new file mode 100644 index 0000000..779e4f5 --- /dev/null +++ b/lib/Lintian/Check/Files/Unwanted.pm @@ -0,0 +1,55 @@ +# files/unwanted -- lintian check script -*- perl -*- + +# Copyright (C) 1998 Christian Schwarz and Richard Braakman +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Files::Unwanted; + +use v5.20; +use warnings; +use utf8; + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +sub visit_installed_files { + my ($self, $item) = @_; + + return + unless $item->is_file; + + $self->pointed_hint('backup-file-in-package', $item->pointer) + if $item->name =~ /~$/ + || $item->name =~ m{\#[^/]+\#$} + || $item->name =~ m{/\.[^/]+\.swp$}; + + $self->pointed_hint('nfs-temporary-file-in-package', $item->pointer) + if $item->name =~ m{/\.nfs[^/]+$}; + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Files/UsrMerge.pm b/lib/Lintian/Check/Files/UsrMerge.pm new file mode 100644 index 0000000..be5a06d --- /dev/null +++ b/lib/Lintian/Check/Files/UsrMerge.pm @@ -0,0 +1,53 @@ +# files/usr-merge -- lintian check script -*- perl -*- + +# Copyright (C) 1998 Christian Schwarz and Richard Braakman +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Files::UsrMerge; + +use v5.20; +use warnings; +use utf8; + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +sub visit_installed_files { + my ($self, $item) = @_; + + my $quotedpath = quotemeta($item->name); + + $self->pointed_hint('package-contains-usr-unmerged-pathnames', + $item->pointer) + if $item->name =~ m{^(?:bin|sbin|lib.*)/.+$} + && !$item->is_symlink + && !$item->is_dir + && $item->link !~ m{^usr/$quotedpath$}; + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Files/Vcs.pm b/lib/Lintian/Check/Files/Vcs.pm new file mode 100644 index 0000000..2f5b8f5 --- /dev/null +++ b/lib/Lintian/Check/Files/Vcs.pm @@ -0,0 +1,113 @@ +# files/vcs -- lintian check script -*- perl -*- + +# Copyright (C) 1998 Christian Schwarz and Richard Braakman +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Files::Vcs; + +use v5.20; +use warnings; +use utf8; + +use Const::Fast; + +const my $VERTICAL_BAR => q{|}; + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +# an OR (|) regex of all vcs files +has VCS_PATTERNS_ORED => ( + is => 'rw', + lazy => 1, + default => sub { + my ($self) = @_; + + my @vcs_patterns; + + my $COMPRESS_FILE_EXTENSIONS + = $self->data->load('files/compressed-file-extensions',qr/\s+/); + + my @quoted_extension_patterns + = map { quotemeta } $COMPRESS_FILE_EXTENSIONS->all; + my $ored_extension_patterns= ored_patterns(@quoted_extension_patterns); + + my $VCS_CONTROL_PATTERNS + = $self->data->load('files/vcs-control-files', qr/\s+/); + + for my $pattern ($VCS_CONTROL_PATTERNS->all) { + $pattern =~ s/\$[{]COMPRESS_EXT[}]/(?:$ored_extension_patterns)/g; + push(@vcs_patterns, $pattern); + } + + my $ored_vcs_patterns = ored_patterns(@vcs_patterns); + + return $ored_vcs_patterns; + } +); + +sub ored_patterns { + my (@patterns) = @_; + + my @protected = map { "(?:$_)" } @patterns; + + my $ored = join($VERTICAL_BAR, @protected); + + return $ored; +} + +sub visit_installed_files { + my ($self, $item) = @_; + + if ($item->is_file) { + + my $pattern = $self->VCS_PATTERNS_ORED; + + $self->pointed_hint('package-contains-vcs-control-file',$item->pointer) + if $item->name =~ m{$pattern}x + && $item->name !~ m{^usr/share/cargo/registry/}; + + if ($item->name =~ m/svn-commit.*\.tmp$/) { + $self->pointed_hint('svn-commit-file-in-package', $item->pointer); + } + + if ($item->name =~ m/svk-commit.+\.tmp$/) { + $self->pointed_hint('svk-commit-file-in-package', $item->pointer); + } + + } elsif ($item->is_dir) { + + $self->pointed_hint('package-contains-vcs-control-dir', $item->pointer) + if $item->name =~ m{/CVS/?$} + || $item->name =~ m{/\.(?:svn|bzr|git|hg)/?$} + || $item->name =~ m{/\.arch-ids/?$} + || $item->name =~ m{/\{arch\}/?$}; + } + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Fonts.pm b/lib/Lintian/Check/Fonts.pm new file mode 100644 index 0000000..edb5c5c --- /dev/null +++ b/lib/Lintian/Check/Fonts.pm @@ -0,0 +1,92 @@ +# fonts -- lintian check script -*- perl -*- + +# Copyright (C) 1998 Christian Schwarz and Richard Braakman +# Copyright (C) 2020 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Fonts; + +use v5.20; +use warnings; +use utf8; + +use Const::Fast; +use List::SomeUtils qw(any); + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +const my $SPACE => q{ }; +const my $LEFT_PARENTHESIS => q{(}; +const my $RIGHT_PARENTHESIS => q{)}; + +sub visit_installed_files { + my ($self, $item) = @_; + + return + unless $item->is_file; + + return + unless $item->basename + =~ m{ [\w-]+ [.] (?:[to]tf | pfb | woff2? | eot) (?:[.]gz)? $}ix; + + my $font = $item->basename; + + my $FONT_PACKAGES = $self->data->fonts; + + my @declared_shippers = $FONT_PACKAGES->installed_by($font); + + if (@declared_shippers) { + + # Fonts in xfonts-tipa are really shipped by tipa. + my @renamed + = map { $_ eq 'xfonts-tipa' ? 'tipa' : $_ } @declared_shippers; + + my $list + = $LEFT_PARENTHESIS + . join($SPACE, (sort @renamed)) + . $RIGHT_PARENTHESIS; + + $self->pointed_hint('duplicate-font-file', $item->pointer, 'also in', + $list) + unless (any { $_ eq $self->processable->name } @renamed) + || $self->processable->type eq 'udeb'; + + } else { + unless ($item->name =~ m{^usr/lib/R/site-library/}) { + + $self->pointed_hint('font-in-non-font-package', $item->pointer) + unless $self->processable->name =~ m/^(?:[ot]tf|t1|x?fonts)-/; + + $self->pointed_hint('font-outside-font-dir', $item->pointer) + unless $item->name =~ m{^usr/share/fonts/}; + } + } + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Fonts/Opentype.pm b/lib/Lintian/Check/Fonts/Opentype.pm new file mode 100644 index 0000000..9ea5dac --- /dev/null +++ b/lib/Lintian/Check/Fonts/Opentype.pm @@ -0,0 +1,95 @@ +# fonts/opentype -- lintian check script -*- perl -*- + +# Copyright (C) 2019 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Fonts::Opentype; + +use v5.20; +use warnings; +use utf8; +use autodie qw(open); + +use Const::Fast; +use Font::TTF::Font; + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +const my $SPACE => q{ }; +const my $COMMA => q{,}; + +const my $PERMISSIONS_MASK => 0x0f; +const my $NEVER_EMBED_FLAG => 0x02; +const my $PRINT_PREVIEW_ONLY_FLAG => 0x04; +const my $EDIT_ONLY_FLAG => 0x08; + +sub visit_installed_files { + my ($self, $file) = @_; + + return + unless $file->is_file; + + return + unless $file->file_type =~ /^OpenType font data/; + + $self->pointed_hint('opentype-font-wrong-filename', $file->pointer) + unless $file->name =~ /\.otf$/i; + + my $font = Font::TTF::Font->open($file->unpacked_path); + + my $os2 = defined $font ? $font->{'OS/2'} : undef; + my $table = defined $os2 ? $os2->read : undef; + my $fs_type = defined $table ? $table->{fsType} : undef; + + $font->release + if defined $font; + + return + unless defined $fs_type; + + my @clauses; + + my $permissions = $fs_type & $PERMISSIONS_MASK; + push(@clauses, 'never embed') + if $permissions & $NEVER_EMBED_FLAG; + push(@clauses, 'preview/print only') + if $permissions & $PRINT_PREVIEW_ONLY_FLAG; + push(@clauses, 'edit only') + if $permissions & $EDIT_ONLY_FLAG; + + my $terms; + $terms = join($COMMA . $SPACE, @clauses) + if @clauses; + + $self->pointed_hint('opentype-font-prohibits-installable-embedding', + $file->pointer, "($terms)") + if length $terms; + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Fonts/Postscript/Type1.pm b/lib/Lintian/Check/Fonts/Postscript/Type1.pm new file mode 100644 index 0000000..87cbef7 --- /dev/null +++ b/lib/Lintian/Check/Fonts/Postscript/Type1.pm @@ -0,0 +1,112 @@ +# fonts/postscript/type1 -- lintian check script -*- perl -*- + +# Copyright (C) 1998 Christian Schwarz and Richard Braakman +# Copyright (C) 2020 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Fonts::Postscript::Type1; + +use v5.20; +use warnings; +use utf8; + +use Const::Fast; +use Encode qw(decode); +use Syntax::Keyword::Try; + +use Lintian::IPC::Run3 qw(safe_qx); + +use Moo; +use namespace::clean; + +const my $SPACE => q{ }; +const my $COLON => q{:}; + +with 'Lintian::Check'; + +sub visit_installed_files { + my ($self, $item) = @_; + + return + unless $item->is_file; + + return + unless $item->file_type =~ m/PostScript Type 1 font program data/; + + my @command = ('t1disasm', $item->unpacked_path); + my $bytes = safe_qx(@command); + + my $output; + try { + # iso-8859-1 works too, but the Font 1 standard could be older + $output = decode('cp1252', $bytes, Encode::FB_CROAK); + + } catch { + die 'In file ' . $item->name . $COLON . $SPACE . $@; + } + + my @lines = split(/\n/, $output); + + my $foundadobeline = 0; + + for my $line (@lines) { + + if ($foundadobeline) { + if ( + $line =~ m{\A [%\s]* + All\s*Rights\s*Reserved\.?\s* + \Z}xsmi + ) { + $self->pointed_hint( + 'license-problem-font-adobe-copyrighted-fragment', + $item->pointer); + + last; + } + } + + $foundadobeline = 1 + if $line =~ m{\A + [%\s]*Copyright\s*\(c\) \s* + 19\d{2}[\-\s]19\d{2}\s* + Adobe\s*Systems\s*Incorporated\.?\s*\Z}xsmi; + + # If copy pasted from black book they are + # copyright adobe a few line before the only + # place where the startlock is documented is + # in the black book copyrighted fragment + if ($line =~ m/startlock\s*get\s*exec/) { + + $self->pointed_hint( + 'license-problem-font-adobe-copyrighted-fragment-no-credit', + $item->pointer); + + last; + } + } + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Fonts/Truetype.pm b/lib/Lintian/Check/Fonts/Truetype.pm new file mode 100644 index 0000000..71e120a --- /dev/null +++ b/lib/Lintian/Check/Fonts/Truetype.pm @@ -0,0 +1,95 @@ +# fonts/truetype -- lintian check script -*- perl -*- + +# Copyright (C) 2019 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Fonts::Truetype; + +use v5.20; +use warnings; +use utf8; +use autodie qw(open); + +use Const::Fast; +use Font::TTF::Font; + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +const my $SPACE => q{ }; +const my $COMMA => q{,}; + +const my $PERMISSIONS_MASK => 0x0f; +const my $NEVER_EMBED_FLAG => 0x02; +const my $PRINT_PREVIEW_ONLY_FLAG => 0x04; +const my $EDIT_ONLY_FLAG => 0x08; + +sub visit_installed_files { + my ($self, $file) = @_; + + return + unless $file->is_file; + + return + unless $file->file_type =~ /^TrueType Font data/; + + $self->pointed_hint('truetype-font-wrong-filename', $file->pointer) + unless $file->name =~ /\.ttf$/i; + + my $font = Font::TTF::Font->open($file->unpacked_path); + + my $os2 = defined $font ? $font->{'OS/2'} : undef; + my $table = defined $os2 ? $os2->read : undef; + my $fs_type = defined $table ? $table->{fsType} : undef; + + $font->release + if defined $font; + + return + unless defined $fs_type; + + my @clauses; + + my $permissions = $fs_type & $PERMISSIONS_MASK; + push(@clauses, 'never embed') + if $permissions & $NEVER_EMBED_FLAG; + push(@clauses, 'preview/print only') + if $permissions & $PRINT_PREVIEW_ONLY_FLAG; + push(@clauses, 'edit only') + if $permissions & $EDIT_ONLY_FLAG; + + my $terms; + $terms = join($COMMA . $SPACE, @clauses) + if @clauses; + + $self->pointed_hint('truetype-font-prohibits-installable-embedding', + $file->pointer, "($terms)") + if length $terms; + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/ForeignOperatingSystems.pm b/lib/Lintian/Check/ForeignOperatingSystems.pm new file mode 100644 index 0000000..7f9fd7d --- /dev/null +++ b/lib/Lintian/Check/ForeignOperatingSystems.pm @@ -0,0 +1,63 @@ +# foreign-operating-systems -- lintian check script -*- perl -*- + +# Copyright (C) 1998 Christian Schwarz and Richard Braakman +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::ForeignOperatingSystems; + +use v5.20; +use warnings; +use utf8; + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +sub visit_installed_files { + my ($self, $item) = @_; + + return + unless $item->is_file; + + # Windows development files + $self->pointed_hint('windows-devel-file-in-package', $item->pointer) + if $item->name =~ m{/.+\.(?:vcproj|sln|ds[pw])(?:\.gz)?$} + && $item->name !~ m{^usr/share/doc/}; + + # autogenerated databases from other OSes + $self->pointed_hint('windows-thumbnail-database-in-package',$item->pointer) + if $item->name =~ m{/Thumbs\.db(?:\.gz)?$}i; + + $self->pointed_hint('macos-ds-store-file-in-package', $item->pointer) + if $item->name =~ m{/\.DS_Store(?:\.gz)?$}; + + $self->pointed_hint('macos-resource-fork-file-in-package', $item->pointer) + if $item->name =~ m{/\._[^_/][^/]*$} + && $item->name !~ m/\.swp$/; + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Games.pm b/lib/Lintian/Check/Games.pm new file mode 100644 index 0000000..f9ca58a --- /dev/null +++ b/lib/Lintian/Check/Games.pm @@ -0,0 +1,90 @@ +# games -- lintian check script -*- perl -*- + +# Copyright (C) 1998 Christian Schwarz and Richard Braakman +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Games; + +use v5.20; +use warnings; +use utf8; + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +sub visit_installed_files { + my ($self, $item) = @_; + + # non-games-specific data in games subdirectory + if ($item->name=~ m{^usr/share/games/(?:applications|mime|icons|pixmaps)/} + && !$item->is_dir) { + + $self->pointed_hint('global-data-in-games-directory', $item->pointer); + } + + return; +} + +sub dir_counts { + my ($self, $filename) = @_; + + my $item = $self->processable->installed->lookup($filename); + + return 0 + unless $item; + + return scalar $item->children; +} + +sub installable { + my ($self) = @_; + + my $section = $self->processable->fields->value('Section'); + + # section games but nothing in /usr/games + # any binary counts to avoid game-data false positives: + my $games = $self->dir_counts('usr/games/'); + my $other = $self->dir_counts('bin/') + $self->dir_counts('usr/bin/'); + + if ($other) { + if ($section =~ m{games$}) { + + if ($games) { + $self->hint('package-section-games-but-has-usr-bin'); + + } else { + $self->hint('package-section-games-but-contains-no-game'); + } + } + + } elsif ($games > 0 and $section !~ m{games$}) { + $self->hint('game-outside-section'); + } + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/GroupChecks.pm b/lib/Lintian/Check/GroupChecks.pm new file mode 100644 index 0000000..79150a1 --- /dev/null +++ b/lib/Lintian/Check/GroupChecks.pm @@ -0,0 +1,282 @@ +# group-checks -- lintian check script -*- perl -*- + +# Copyright (C) 2011 Niels Thykier <niels@thykier.net> +# Copyright (C) 2018 Chris Lamb <lamby@debian.org> +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::GroupChecks; + +use v5.20; +use warnings; +use utf8; + +use List::SomeUtils qw(any); + +use Lintian::Relation; + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +sub source { + my ($self) = @_; + + my $group = $self->group; + + ## To find circular dependencies, we will first generate Strongly + ## Connected Components using Tarjan's algorithm + ## + ## We are not using DepMap, because it cannot tell how the circles + ## are made - only that there exists at least 1 circle. + + # The packages a.k.a. nodes + my (@nodes, %edges, $sccs); + my @installables = grep { $_->type ne 'udeb' } $group->get_installables; + + $self->check_file_overlap(@installables); + + for my $installable (@installables) { + + my $deps = $group->direct_dependencies($installable); + if (scalar @{$deps} > 0) { + # it depends on another package - it can cause + # a circular dependency + my $pname = $installable->name; + push @nodes, $pname; + $edges{$pname} = [map { $_->name } @{$deps}]; + $self->check_multiarch($installable, $deps); + } + } + + # Bail now if we do not have at least two packages depending + # on some other package from this source. + return if scalar @nodes < 2; + + $sccs= Lintian::Check::GroupChecks::Graph->new(\@nodes, \%edges)->tarjans; + + for my $comp (@{$sccs}) { + # It takes two to tango... erh. make a circular dependency. + next if scalar @{$comp} < 2; + + $self->hint('intra-source-package-circular-dependency', + (sort @{$comp})); + } + + return; +} + +sub check_file_overlap { + my ($self, @processables) = @_; + + # make a local copy to be modified + my @remaining = @processables; + + # avoids checking the same combo twice + while (@remaining > 1) { + + # avoids checking the same combo twice + my $one = shift @remaining; + + my @provides_one = $one->fields->trimmed_list('Provides', qr{,}); + my $relation_one = Lintian::Relation->new->load( + join(' | ', $one->name, @provides_one)); + + for my $two (@remaining) { + + # poor man's work-around for "Multi-arch: same" + next + if $one->name eq $two->name; + + my @provides_two = $two->fields->trimmed_list('Provides', qr{,}); + my $relation_two = Lintian::Relation->new->load( + join(' | ', $two->name, @provides_two)); + + # $two conflicts/replaces with $one + next + if $two->relation('Conflicts')->satisfies($relation_one); + next + if $two->relation('Replaces')->satisfies($one->name); + + # $one conflicts/replaces with $two + next + if $one->relation('Conflicts')->satisfies($relation_two); + next + if $one->relation('Replaces')->satisfies($two->name); + + for my $one_file (@{$one->installed->sorted_list}) { + + my $name = $one_file->name; + + $name =~ s{/$}{}; + my $two_file = $two->installed->lookup($name) + // $two->installed->lookup("$name/"); + next + unless defined $two_file; + + next + if $one_file->is_dir && $two_file->is_dir; + + $self->hint('binaries-have-file-conflict', + sort($one->name, $two->name), $name); + } + } + } + + return; +} + +sub check_multiarch { + my ($self, $processable, $deps) = @_; + + my $KNOWN_DBG_PACKAGE= $self->data->load('common/dbg-pkg',qr/\s*\~\~\s*/); + + my $ma = $processable->fields->value('Multi-Arch') || 'no'; + if ($ma eq 'same') { + for my $dep (@{$deps}) { + my $dma = $dep->fields->value('Multi-Arch') || 'no'; + if ($dma eq 'same' or $dma eq 'foreign') { + 1; # OK + } else { + $self->hint( + 'dependency-is-not-multi-archified', + join(q{ }, + $processable->name, 'depends on', + $dep->name, "(multi-arch: $dma)") + ); + } + } + } elsif ($ma ne 'same' + and ($processable->fields->value('Section') || 'none') + =~ m{(?:^|/)debug$}) { + # Debug package that isn't M-A: same, exploit that (non-debug) + # dependencies is (almost certainly) a package for which the + # debug carries debug symbols. + for my $dep (@{$deps}) { + my $dma = $dep->fields->value('Multi-Arch') || 'no'; + if ($dma eq 'same' + && ($dep->fields->value('Section') || 'none') + !~ m{(?:^|/)debug$}){ + + # Debug package isn't M-A: same, but depends on a + # package that is from same source that isn't a debug + # package and that is M-A same. Thus it is not + # possible to install debug symbols for all + # (architecture) variants of the binaries. + $self->hint( + 'debug-package-for-multi-arch-same-pkg-not-coinstallable', + $processable->name . ' => ' . $dep->name + ) + unless any { $processable->name =~ m/$_/xms } + $KNOWN_DBG_PACKAGE->all; + } + } + } + return; +} + +## Encapsulate Tarjan's algorithm in a class/object to keep +## the run sub somewhat sane. Allow this "extra" package as +## it is not a proper subclass. +#<<< no Perl tidy (it breaks the no critic comment) +package Lintian::Check::GroupChecks::Graph; ## no critic (Modules::ProhibitMultiplePackages) +#>>> + +use Const::Fast; + +const my $EMPTY => q{}; + +sub new { + my ($type, $nodes, $edges) = @_; + my $self = { nodes => $nodes, edges => $edges}; + bless $self, $type; + return $self; +} + +sub tarjans { + my ($self) = @_; + my $nodes = $self->{nodes}; + $self->{index} = 0; + $self->{scc} = []; + $self->{stack} = []; + $self->{on_stack} = {}; + # The information for each node: + # $self->{node_info}{$node}[X], where X is: + # 0 => index + # 1 => low_index + $self->{node_info} = {}; + for my $node (@{$nodes}) { + $self->_tarjans_sc($node) + unless defined $self->{node_info}{$node}; + } + return $self->{scc}; +} + +sub _tarjans_sc { + my ($self, $node) = @_; + my $index = $self->{index}; + my $stack = $self->{stack}; + my $ninfo = [$index, $index]; + my $on_stack = $self->{on_stack}; + $self->{node_info}{$node} = $ninfo; + $index++; + $self->{index} = $index; + push(@{$stack}, $node); + $on_stack->{$node} = 1; + + foreach my $neighbour (@{ $self->{edges}{$node} }){ + my $nb_info; + $nb_info = $self->{node_info}{$neighbour}; + if (!defined $nb_info){ + # First time visit + $self->_tarjans_sc($neighbour); + # refresh $nb_info + $nb_info = $self->{node_info}{$neighbour}; + # min($node.low_index, $neigh.low_index) + $ninfo->[1] = $nb_info->[1] if $nb_info->[1] < $ninfo->[1]; + } elsif (exists $on_stack->{$neighbour}) { + # Node is in this component + # min($node.low_index, $neigh.index) + $ninfo->[1] = $nb_info->[0] if $nb_info->[0] < $ninfo->[1]; + } + } + if ($ninfo->[0] == $ninfo->[1]){ + # the "root" node - create the SSC. + my $component = []; + my $scc = $self->{scc}; + my $elem = $EMPTY; + + do { + $elem = pop @{$stack}; + delete $on_stack->{$elem}; + push(@{$component}, $elem); + + } until $node eq $elem; + + push(@{$scc}, $component); + } + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/HugeUsrShare.pm b/lib/Lintian/Check/HugeUsrShare.pm new file mode 100644 index 0000000..0043586 --- /dev/null +++ b/lib/Lintian/Check/HugeUsrShare.pm @@ -0,0 +1,98 @@ +# huge-usr-share -- lintian check script -*- perl -*- + +# Copyright (C) 2004 Jeroen van Wolffelaar <jeroen@wolffelaar.nl> +# Copyright (C) 2018 Chris Lamb <lamby@debian.org> +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::HugeUsrShare; + +use v5.20; +use warnings; +use utf8; + +use Const::Fast; + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +# Threshold in kB of /usr/share to trigger this warning. Consider that the +# changelog alone can be quite big, and cannot be moved away. +const my $KIB_SIZE_FACTOR => 1024; +const my $THRESHOLD_SIZE_SOFT => 4096; +const my $THRESHOLD_SIZE_HARD => 8192; +const my $PERCENT => 100; +const my $THRESHOLD_PERCENTAGE => 50; + +has total_size => (is => 'rw', default => 0); +has usrshare_size => (is => 'rw', default => 0); + +sub visit_installed_files { + my ($self, $file) = @_; + + return + unless $file->is_regular_file; + + # space taken up by package + $self->total_size($self->total_size + $file->size); + + # space taken up in /usr/share. + $self->usrshare_size($self->usrshare_size + $file->size) + if $file =~ m{^usr/share/}; + + return; +} + +sub installable { + my ($self) = @_; + + # skip architecture-dependent packages. + my $arch = $self->processable->fields->value('Architecture'); + return + if $arch eq 'all'; + + # meaningless; prevents division by zero + return + if $self->total_size == 0; + + # convert the totals to kilobytes. + my $size = sprintf('%.0f', $self->total_size / $KIB_SIZE_FACTOR); + my $size_usrshare + = sprintf('%.0f', $self->usrshare_size / $KIB_SIZE_FACTOR); + my $percentage + = sprintf('%.0f', ($self->usrshare_size / $self->total_size) * $PERCENT); + + $self->hint( + 'arch-dep-package-has-big-usr-share', + "${size_usrshare}kB $percentage%" + ) + if ( $percentage > $THRESHOLD_PERCENTAGE + && $size_usrshare > $THRESHOLD_SIZE_SOFT) + || $size_usrshare > $THRESHOLD_SIZE_HARD; + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Images.pm b/lib/Lintian/Check/Images.pm new file mode 100644 index 0000000..47021d1 --- /dev/null +++ b/lib/Lintian/Check/Images.pm @@ -0,0 +1,49 @@ +# images -- lintian check script -*- perl -*- + +# Copyright (C) 1998 Christian Schwarz and Richard Braakman +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Images; + +use v5.20; +use warnings; +use utf8; + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +sub visit_installed_files { + my ($self, $item) = @_; + + $self->pointed_hint('image-file-in-usr-lib', $item->pointer) + if $item->name =~ m{^usr/lib/} + && $item->name =~ m{\.(?:bmp|gif|jpe?g|png|tiff|x[pb]m)$} + && !length $item->link; + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Images/Filenames.pm b/lib/Lintian/Check/Images/Filenames.pm new file mode 100644 index 0000000..d728cc6 --- /dev/null +++ b/lib/Lintian/Check/Images/Filenames.pm @@ -0,0 +1,126 @@ +# images/filenames -- lintian check script -*- perl -*- + +# Copyright (C) 2019 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Images::Filenames; + +use v5.20; +use warnings; +use utf8; + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +my @image_formats = ( + { + name => 'PNG', + file_type => qr/^PNG image data/, + good_name => sub { $_[0] =~ /\.(?:png|PNG)$/ } + }, + { + name => 'JPEG', + file_type => qr/^JPEG image data/, + good_name => sub { $_[0] =~ /\.(?:jpe?g|JPE?G)$/ } + }, + { + name => 'GIF', + file_type => qr/^GIF image data/, + good_name => sub { $_[0] =~ /\.(?:gif|GIF)$/ } + }, + { + name => 'TIFF', + file_type => qr/^TIFF image data/, + good_name => sub { $_[0] =~ /\.(?:tiff?|TIFF?)$/ } + }, + { + name => 'XPM', + file_type => qr/^X pixmap image/, + good_name => sub { $_[0] =~ /\.(?:xpm|XPM)$/ } + }, + { + name => 'Netpbm', + file_type => qr/^Netpbm image data/, + good_name => sub { $_[0] =~ /\.(?:p[bgpn]m|P[BGPN]M)$/ } + }, + { + name => 'SVG', + file_type => qr/^SVG Scalable Vector Graphics image/, + good_name => sub { $_[0] =~ /\.(?:svg|SVG)$/ } + }, +); + +# ICO format developed into a container and may contain PNG + +sub visit_installed_files { + my ($self, $item) = @_; + + return + unless $item->is_file; + + my $our_format; + + for my $format (@image_formats) { + + if ($item->file_type =~ $format->{file_type}) { + $our_format = $format; + last; + } + } + + # not an image + return + unless $our_format; + + return + if $our_format->{good_name}->($item->name); + + my $conflicting_format; + + my @other_formats = grep { $_ != $our_format } @image_formats; + for my $format (@other_formats) { + + if ($format->{good_name}->($item->name)) { + $conflicting_format = $format; + last; + } + } + + if ($conflicting_format) { + + $self->pointed_hint('image-file-has-conflicting-name', + $item->pointer, '(is ' . $our_format->{name} . ')') + unless $our_format->{good_name}->($item->name); + + } else { + $self->pointed_hint('image-file-has-unexpected-name', + $item->pointer, '(is ' . $our_format->{name} . ')'); + } + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Images/Thumbnails.pm b/lib/Lintian/Check/Images/Thumbnails.pm new file mode 100644 index 0000000..c8cc430 --- /dev/null +++ b/lib/Lintian/Check/Images/Thumbnails.pm @@ -0,0 +1,56 @@ +# images/thumbnails -- lintian check script -*- perl -*- + +# Copyright (C) 1998 Christian Schwarz and Richard Braakman +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Images::Thumbnails; + +use v5.20; +use warnings; +use utf8; + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +sub visit_installed_files { + my ($self, $item) = @_; + + if ( $item->is_dir + && $item->name =~ m{/\.xvpics/?$}) { + + $self->pointed_hint('package-contains-xvpics-dir', $item->pointer); + } + + if ( $item->is_dir + && $item->name =~ m{/\.thumbnails/?$}) { + + $self->pointed_hint('package-contains-thumbnails-dir', $item->pointer); + } + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Includes/ConfigH.pm b/lib/Lintian/Check/Includes/ConfigH.pm new file mode 100644 index 0000000..b854a31 --- /dev/null +++ b/lib/Lintian/Check/Includes/ConfigH.pm @@ -0,0 +1,56 @@ +# includes/config-h -- lintian check script -*- perl -*- + +# Copyright (C) 2019 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Includes::ConfigH; + +use v5.20; +use warnings; +use utf8; + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +sub visit_installed_files { + my ($self, $item) = @_; + + return + unless $item->is_file; + + return + unless $item->name =~ m{^ usr/include/ }x; + + return + unless $item->name =~ m{ /config.h $}x; + + $self->hint('package-name-defined-in-config-h', $item->name) + if $item->bytes =~ m{ \b PACKAGE_NAME \b }x; + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/InitD.pm b/lib/Lintian/Check/InitD.pm new file mode 100644 index 0000000..952fb1e --- /dev/null +++ b/lib/Lintian/Check/InitD.pm @@ -0,0 +1,762 @@ +# init.d -- lintian check script -*- perl -*- + +# Copyright (C) 1998 Christian Schwarz +# Copyright (C) 2016-2020 Chris Lamb <lamby@debian.org> +# Copyright (C) 2021 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::InitD; + +use v5.20; +use warnings; +use utf8; + +use Const::Fast; +use File::Basename qw(dirname); +use List::Compare; +use List::SomeUtils qw(any none); +use Unicode::UTF8 qw(encode_utf8); + +const my $EMPTY => q{}; +const my $SPACE => q{ }; +const my $DOLLAR => q{$}; + +const my $RUN_LEVEL_6 => 6; + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +# A list of valid LSB keywords. The value is 0 if optional and 1 if required. +my %LSB_KEYWORDS = ( + provides => 1, + 'required-start' => 1, + 'required-stop' => 1, + 'should-start' => 0, + 'should-stop' => 0, + 'default-start' => 1, + 'default-stop' => 1, + # These two are actually optional, but we mark + # them as required and give them a weaker tag if + # they are missing. + 'short-description' => 1, + 'description' => 1 +); + +# These init script names should probably not be used in dependencies. +# Instead, the corresponding virtual facility should be used. +# +# checkroot is not included here since cryptsetup needs the root file system +# mounted but not any other local file systems and therefore correctly depends +# on checkroot. There may be other similar situations. +my %implied_dependencies = ( + 'mountall' => $DOLLAR . 'local_fs', + 'mountnfs' => $DOLLAR . 'remote_fs', + + 'hwclock' => $DOLLAR . 'time', + 'portmap' => $DOLLAR . 'portmap', + 'named' => $DOLLAR . 'named', + 'bind9' => $DOLLAR . 'named', + 'networking' => $DOLLAR . 'network', + 'syslog' => $DOLLAR . 'syslog', + 'rsyslog' => $DOLLAR . 'syslog', + 'sysklogd' => $DOLLAR . 'syslog' +); + +# Regex to match names of init.d scripts; it is a bit more lax than +# package names (e.g. allows "_"). We do not allow it to start with a +# "dash" to avoid confusing it with a command-line option (also, +# update-rc.d does not allow this). +our $INITD_NAME_REGEX = qr/[\w\.\+][\w\-\.\+]*/; + +my $OPTS_R = qr/-\S+\s*/; +my $ACTION_R = qr/\w+/; +my $EXCLUDE_R = qr/if\s+\[\s+-x\s+\S*update-rc\.d/; + +sub installable { + my ($self) = @_; + + my $pkg = $self->processable->name; + my $processable = $self->processable; + + my $initd_dir = $processable->installed->resolve_path('etc/init.d/'); + my $postinst = $processable->control->lookup('postinst'); + my $preinst = $processable->control->lookup('preinst'); + my $postrm = $processable->control->lookup('postrm'); + my $prerm = $processable->control->lookup('prerm'); + + my (%initd_postinst, %initd_postrm); + + # These will never be regular initscripts. (see #918459, #933383 + # and #941140 etc.) + return + if $pkg eq 'initscripts' + || $pkg eq 'sysvinit'; + + # read postinst control file + if ($postinst and $postinst->is_file and $postinst->is_open_ok) { + + open(my $fd, '<', $postinst->unpacked_path) + or die encode_utf8('Cannot open ' . $postinst->unpacked_path); + + my $position = 1; + while (my $line = <$fd>) { + + next + if $line =~ /$EXCLUDE_R/; + + $line =~ s/\#.*$//; + + next + unless $line =~ m{^(?:.+;|^\s*system[\s\(\']+)?\s*update-rc\.d\s+ + (?:$OPTS_R)*($INITD_NAME_REGEX)\s+($ACTION_R)}x; + + my ($name,$opt) = ($1,$2); + next + if $opt eq 'remove'; + + my $pointer = $postinst->pointer($position); + + if ($initd_postinst{$name}++ == 1) { + + $self->pointed_hint('duplicate-updaterc.d-calls-in-postinst', + $pointer, $name); + next; + } + + $self->pointed_hint( + 'output-of-updaterc.d-not-redirected-to-dev-null', + $pointer, $name) + unless $line =~ m{>\s*/dev/null}; + + } continue { + ++$position; + } + + close $fd; + } + + # read preinst control file + if ($preinst and $preinst->is_file and $preinst->is_open_ok) { + + open(my $fd, '<', $preinst->unpacked_path) + or die encode_utf8('Cannot open ' . $preinst->unpacked_path); + + my $position = 1; + while (my $line = <$fd>) { + + next + if $line =~ /$EXCLUDE_R/; + + $line =~ s/\#.*$//; + next + unless $line =~ m{update-rc\.d \s+ + (?:$OPTS_R)*($INITD_NAME_REGEX) \s+ + ($ACTION_R)}x; + + my $name = $1; + my $option = $2; + next + if $option eq 'remove'; + + my $pointer = $preinst->pointer($position); + + $self->pointed_hint('preinst-calls-updaterc.d', + $pointer, $name, $option); + + } continue { + ++$position; + } + + close $fd; + } + + # read postrm control file + if ($postrm and $postrm->is_file and $postrm->is_open_ok) { + + open(my $fd, '<', $postrm->unpacked_path) + or die encode_utf8('Cannot open ' . $postrm->unpacked_path); + + my $position = 1; + while (my $line = <$fd>) { + + next + if $line =~ /$EXCLUDE_R/; + + $line =~ s/\#.*$//; + + next + unless $line =~ /update-rc\.d\s+(?:$OPTS_R)*($INITD_NAME_REGEX)/; + + my $name = $1; + + my $pointer = $postrm->pointer($position); + + if ($initd_postrm{$name}++ == 1) { + + $self->pointed_hint('duplicate-updaterc.d-calls-in-postrm', + $pointer, $name); + next; + } + + $self->pointed_hint( + 'output-of-updaterc.d-not-redirected-to-dev-null', + $pointer, $name) + unless $line =~ m{>\s*/dev/null}; + + } continue { + ++$position; + } + + close $fd; + } + + # read prerm control file + if ($prerm and $prerm->is_file and $prerm->is_open_ok) { + + open(my $fd, '<', $prerm->unpacked_path) + or die encode_utf8('Cannot open ' . $prerm->unpacked_path); + + my $position = 1; + while (my $line = <$fd>) { + + next + if $line =~ /$EXCLUDE_R/; + + $line =~ s/\#.*$//; + + next + unless $line =~ /update-rc\.d\s+(?:$OPTS_R)*($INITD_NAME_REGEX)/; + + my $name = $1; + + my $pointer = $prerm->pointer($position); + + $self->pointed_hint('prerm-calls-updaterc.d', $pointer, $name); + + } continue { + ++$position; + } + + close $fd; + } + + # init.d scripts have to be removed in postrm + for (keys %initd_postinst) { + if ($initd_postrm{$_}) { + delete $initd_postrm{$_}; + } else { + + $self->pointed_hint( + 'postrm-does-not-call-updaterc.d-for-init.d-script', + $postrm->pointer, "etc/init.d/$_"); + } + } + + for (keys %initd_postrm) { + $self->pointed_hint('postrm-contains-additional-updaterc.d-calls', + $postrm->pointer, "etc/init.d/$_"); + } + + for my $initd_file (keys %initd_postinst) { + + my $item; + $item = $initd_dir->child($initd_file) + if $initd_dir; + + unless ( + (defined $item && $item->resolve_path) + ||( defined $item + && $item->is_symlink + && $item->link eq '/lib/init/upstart-job') + ) { + + $self->hint('init.d-script-not-included-in-package', + "etc/init.d/$initd_file"); + + next; + } + + # init.d scripts have to be marked as conffiles unless they're + # symlinks. + $self->hint('init.d-script-not-marked-as-conffile', + "etc/init.d/$initd_file") + if !defined $item + || ( !$processable->declared_conffiles->is_known($item->name) + && !$item->is_symlink); + + # Check if file exists in package and check the script for + # other issues if it was included in the package. + $self->check_init($item); + } + $self->check_defaults; + + return + unless defined $initd_dir && $initd_dir->is_dir; + + # files actually installed in /etc/init.d should match our list :-) + for my $script ($initd_dir->children) { + + next + if !$script->is_dir + && (any {$script->basename eq $_}qw(README skeleton rc rcS)); + + my $tag_name = 'script-in-etc-init.d-not-registered-via-update-rc.d'; + + # In an upstart system, such as Ubuntu, init scripts are symlinks to + # upstart-job which are not registered with update-rc.d. + $tag_name= 'upstart-job-in-etc-init.d-not-registered-via-update-rc.d' + if $script->is_symlink + && $script->link eq '/lib/init/upstart-job'; + + # If $initd_postinst is true for this script, we already + # checked the syntax in the above loop. Check the syntax of + # unregistered scripts so that we get more complete Lintian + # coverage in the first pass. + unless ($initd_postinst{$script->basename}) { + + $self->pointed_hint($tag_name, $script->pointer); + $self->check_init($script); + } + } + + return; +} + +sub check_init { + my ($self, $item) = @_; + + my $processable = $self->processable; + + # In an upstart system, such as Ubuntu, init scripts are symlinks to + # upstart-job. It doesn't make sense to check the syntax of upstart-job, + # so skip the checks of the init script itself in that case. + return + if $item->is_symlink + && $item->link eq '/lib/init/upstart-job'; + + return + unless $item->is_open_ok; + + my %saw_command; + my %value_by_lsb_keyword; + my $in_file_test = 0; + my $needs_fs = 0; + + if ($item->interpreter eq '/lib/init/init-d-script') { + $saw_command{$_} = 1 for qw{start stop restart force-reload status}; + } + + $self->pointed_hint('init.d-script-uses-usr-interpreter', + $item->pointer(1), $item->interpreter) + if $item->interpreter =~ m{^ /usr/ }x; + + open(my $fd, '<', $item->unpacked_path) + or die encode_utf8('Cannot open ' . $item->unpacked_path); + + my $position = 1; + while (my $line = <$fd>) { + + $self->pointed_hint('init.d-script-contains-skeleton-template-content', + $item->pointer($position)) + if $line =~ m{Please remove the "Author" lines|Example initscript}; + + if ($line =~ m/^\#\#\# BEGIN INIT INFO/) { + + if (defined $value_by_lsb_keyword{BEGIN}) { + + $self->pointed_hint('init.d-script-has-duplicate-lsb-section', + $item->pointer($position)); + next; + } + + $value_by_lsb_keyword{BEGIN} = [1]; + my $final; + + # We have an LSB keyword section. Parse it and save the data + # in %value_by_lsb_keyword for analysis. + while (my $other_line = <$fd>) { + + # nested while + ++$position; + + if ($other_line =~ /^\#\#\# END INIT INFO/) { + $value_by_lsb_keyword{END} = [1]; + last; + + } elsif ($other_line !~ /^\#/) { + $self->pointed_hint( + 'init.d-script-has-unterminated-lsb-section', + $item->pointer($position)); + last; + + } elsif ($other_line =~ /^\# ([a-zA-Z-]+):\s*(.*?)\s*$/) { + + my $keyword = lc $1; + my $value = $2 // $EMPTY; + + $self->pointed_hint( + 'init.d-script-has-duplicate-lsb-keyword', + $item->pointer($position), $keyword) + if defined $value_by_lsb_keyword{$keyword}; + + $self->pointed_hint( + 'init.d-script-has-unknown-lsb-keyword', + $item->pointer($position), $keyword) + unless exists $LSB_KEYWORDS{$keyword} + || $keyword =~ /^x-/; + + $value_by_lsb_keyword{$keyword} = [split($SPACE, $value)]; + $final = $keyword; + + } elsif ($other_line =~ /^\#(\t| )/ + && $final eq 'description') { + + my $value = $other_line; + $value =~ s/^\#\s*//; + $value_by_lsb_keyword{description} .= $SPACE . $value; + + } else { + $self->pointed_hint('init.d-script-has-bad-lsb-line', + $item->pointer($position)); + } + } + } + + # Pretty dummy way to handle conditionals, but should be enough + # for simple init scripts + $in_file_test = 1 + if $line + =~ m{ \b if \s+ .*? (?:test|\[) (?: \s+ \! )? \s+ - [efr] \s+ }x; + + $in_file_test = 0 + if $line =~ m{ \b fi \b }x; + + if ( !$in_file_test + && $line =~ m{^\s*\.\s+["'"]?(/etc/default/[\$\w/-]+)}){ + my $sourced = $1; + + $self->pointed_hint('init.d-script-sourcing-without-test', + $item->pointer($position), $sourced); + } + + # Some init.d scripts source init-d-script, since (e.g.) + # kFreeBSD does not allow shell scripts as interpreters. + if ($line =~ m{\. /lib/init/init-d-script}) { + $saw_command{$_} = 1 + for qw{start stop restart force-reload status}; + } + + # This should be more sophisticated: ignore heredocs, ignore quoted + # text and the arguments to echo, etc. + $needs_fs = 1 + if $line =~ m{^[^\#]*/var/}; + + while ($line =~ s/^[^\#]*?(start|stop|restart|force-reload|status)//) { + $saw_command{$1} = 1; + } + + if ( + $line =~ m{^\s*\.\s+/lib/lsb/init-functions} + && !$processable->relation('strong')->satisfies('lsb-base:any') + && (none { $_->basename =~ m/\.service$/ && !$_->is_dir } + @{$processable->installed->sorted_list}) + ) { + $self->pointed_hint('init.d-script-needs-depends-on-lsb-base', + $item->pointer($position)); + } + + # nested while + } continue { + ++$position; + } + + close $fd; + + # Make sure all of the required keywords are present. + if (!defined $value_by_lsb_keyword{BEGIN}) { + $self->pointed_hint('init.d-script-missing-lsb-section', + $item->pointer); + + } else { + for my $keyword (keys %LSB_KEYWORDS) { + + if ($LSB_KEYWORDS{$keyword} + && !defined $value_by_lsb_keyword{$keyword}) { + + if ($keyword eq 'short-description') { + $self->pointed_hint( + 'init.d-script-missing-lsb-short-description', + $item->pointer); + + } elsif ($keyword eq 'description') { + next; + + } else { + $self->pointed_hint('init.d-script-missing-lsb-keyword', + $item->pointer, $keyword); + } + } + } + } + + # Check the runlevels. + my %start; + + for my $runlevel (@{$value_by_lsb_keyword{'default-start'} // []}) { + + if ($runlevel =~ /^[sS0-6]$/) { + + $start{lc $runlevel} = 1; + + $self->pointed_hint('init.d-script-starts-in-stop-runlevel', + $item->pointer, $runlevel) + if $runlevel eq '0' + || $runlevel eq '6'; + + } else { + $self->pointed_hint('init.d-script-has-bad-start-runlevel', + $item->pointer, $runlevel); + } + } + + # No script should start at one of the 2-5 runlevels but not at + # all of them + my $start = join($SPACE, (sort grep { /^[2-5]$/ } keys %start)); + + if (length($start) > 0 and $start ne '2 3 4 5') { + my @missing = grep { !exists $start{$_} } qw(2 3 4 5); + + $self->pointed_hint('init.d-script-missing-start', $item->pointer, + @missing); + } + + my %stop; + + for my $runlevel (@{$value_by_lsb_keyword{'default-stop'} // []}) { + + if ($runlevel =~ /^[sS0-6]$/) { + + $stop{$runlevel} = 1 + unless $runlevel =~ /[sS2-5]/; + + $self->pointed_hint('init.d-script-has-conflicting-start-stop', + $item->pointer, $runlevel) + if exists $start{$runlevel}; + + $self->pointed_hint('init-d-script-stops-in-s-runlevel', + $item->pointer) + if $runlevel =~ /[sS]/; + + } else { + $self->pointed_hint('init.d-script-has-bad-stop-runlevel', + $item->pointer, $runlevel); + } + } + + if (none { $item->basename eq $_ } qw(killprocs sendsigs halt reboot)) { + + my @required = (0, 1, $RUN_LEVEL_6); + my $stop_lc = List::Compare->new(\@required, [keys %stop]); + + my @have_some = $stop_lc->get_intersection; + my @missing = $stop_lc->get_Lonly; + + # Scripts that stop in any of 0, 1, or 6 probably should stop in all + # of them, with some special exceptions. + $self->pointed_hint('init.d-script-possible-missing-stop', + $item->pointer, (sort @missing)) + if @have_some + && @missing + && (%start != 1 || !exists $start{s}); + } + + my $provides_self = 0; + for my $facility (@{$value_by_lsb_keyword{'provides'} // []}) { + + $self->pointed_hint('init.d-script-provides-virtual-facility', + $item->pointer, $facility) + if $facility =~ /^\$/; + + $provides_self = 1 + if $item->basename =~/^\Q$facility\E(?:.sh)?$/; + } + + $self->pointed_hint('init.d-script-does-not-provide-itself',$item->pointer) + if defined $value_by_lsb_keyword{'provides'} + && !$provides_self; + + # Separately check Required-Start and Required-Stop, since while they're + # similar, they're not quite identical. This could use some further + # restructuring by pulling the regexes out as data tied to start/stop and + # remote/local and then combining the loops. + if (@{$value_by_lsb_keyword{'default-start'} // []}) { + + my @required = @{$value_by_lsb_keyword{'required-start'} // []}; + + if ($needs_fs) { + if (none { /^\$(?:local_fs|remote_fs|all)\z/ } @required) { + + $self->pointed_hint( + 'init.d-script-missing-dependency-on-local_fs', + $item->pointer, 'required-start'); + } + } + } + + if (@{$value_by_lsb_keyword{'default-stop'} // []}) { + + my @required = @{$value_by_lsb_keyword{'required-stop'} // []}; + + if ($needs_fs) { + if (none { /^(?:\$(?:local|remote)_fs|\$all|umountn?fs)\z/ } + @required) { + + $self->pointed_hint( + 'init.d-script-missing-dependency-on-local_fs', + $item->pointer, 'required-stop'); + } + } + } + + my $VIRTUAL_FACILITIES= $self->data->virtual_initd_facilities; + + # Check syntax rules that apply to all of the keywords. + for + my $keyword (qw(required-start should-start required-stop should-stop)){ + for my $prerequisite (@{$value_by_lsb_keyword{$keyword} // []}) { + + if (exists $implied_dependencies{$prerequisite}) { + + $self->pointed_hint('non-virtual-facility-in-initd-script', + $item->pointer, + "$prerequisite -> $implied_dependencies{$prerequisite}"); + + } elsif ($keyword =~ m/^required-/ && $prerequisite =~ m/^\$/) { + + $self->pointed_hint( + 'init.d-script-depends-on-unknown-virtual-facility', + $item->pointer, $prerequisite) + unless ($VIRTUAL_FACILITIES->recognizes($prerequisite)); + } + + $self->pointed_hint( + 'init.d-script-depends-on-all-virtual-facility', + $item->pointer, $keyword) + if $prerequisite =~ m/^\$all$/; + } + } + + my @required_commands = qw{start stop restart force-reload}; + my $command_lc + = List::Compare->new(\@required_commands, [keys %saw_command]); + my @missing_commands = $command_lc->get_Lonly; + + # all tags included in file? + $self->pointed_hint('init.d-script-does-not-implement-required-option', + $item->pointer, $_) + for @missing_commands; + + $self->pointed_hint('init.d-script-does-not-implement-status-option', + $item->pointer) + unless $saw_command{'status'}; + + return; +} + +sub check_defaults { + my ($self) = @_; + + my $processable = $self->processable; + + my $dir = $processable->installed->resolve_path('etc/default/'); + return + unless $dir && $dir->is_dir; + + for my $item ($dir->children) { + + return + unless $item->is_open_ok; + + open(my $fd, '<', $item->unpacked_path) + or die encode_utf8('Cannot open ' . $item->unpacked_path); + + my $position = 1; + while (my $line = <$fd>) { + + $self->pointed_hint('init.d-script-should-always-start-service', + $item->pointer($position)) + if $line + =~ m{^ \s* [#]* \s* (?:[A-Z]_)? (?:ENABLED|DISABLED|[A-Z]*RUN | (?:NO_)? START) = }x; + + } continue { + ++$position; + } + + close $fd; + } + + return; +} + +sub visit_installed_files { + my ($self, $item) = @_; + + # check for missing init.d script when alternative init system is present + + if ( $item =~ m{etc/sv/(?<svc>[^/]+)/run$} + || $item =~ m{(?<usr>usr/)?lib/systemd/system/(?<svc>[^/@]+)\.service}) + { + + my ($usr, $service) = ($+{usr} // $EMPTY, $+{svc}); + + $self->pointed_hint( + 'package-supports-alternative-init-but-no-init.d-script', + $item->pointer) + unless $self->processable->installed->resolve_path( + "etc/init.d/${service}") + || $self->processable->installed->resolve_path( + "${usr}lib/systemd/system/${service}.path") + || $self->processable->installed->resolve_path( + "${usr}lib/systemd/system/${service}.timer"); + } + + if ($item =~ m{etc/sv/([^/]+)/$}) { + + my $service = $1; + my $runfile + = $self->processable->installed->resolve_path( + "etc/sv/${service}/run"); + + $self->pointed_hint( + 'directory-in-etc-sv-directory-without-executable-run-script', + $item->pointer, $runfile) + unless defined $runfile && $runfile->is_executable; + } + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/InitD/MaintainerScript.pm b/lib/Lintian/Check/InitD/MaintainerScript.pm new file mode 100644 index 0000000..b44d103 --- /dev/null +++ b/lib/Lintian/Check/InitD/MaintainerScript.pm @@ -0,0 +1,147 @@ +# init-d/maintainer-script -- lintian check script -*- perl -*- +# +# Copyright (C) 1998 Richard Braakman +# Copyright (C) 2002 Josip Rodin +# Copyright (C) 2016-2019 Chris Lamb <lamby@debian.org> +# Copyright (C) 2021 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::InitD::MaintainerScript; + +use v5.20; +use warnings; +use utf8; + +use Const::Fast; +use Unicode::UTF8 qw(encode_utf8); + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +const my $EMPTY => q{}; + +sub visit_control_files { + my ($self, $item) = @_; + + return + unless $item->is_maintainer_script; + + return + unless length $item->interpreter; + + return + unless $item->is_open_ok; + + open(my $fd, '<', $item->unpacked_path) + or die encode_utf8('Cannot open ' . $item->unpacked_path); + + my $stashed = $EMPTY; + + my $saw_init = 0; + my $saw_invoke = 0; + + my $position = 1; + while (my $possible_continuation = <$fd>) { + + chomp $possible_continuation; + + # skip empty lines + next + if $possible_continuation =~ /^\s*$/; + + # skip comment lines + next + if $possible_continuation =~ /^\s*\#/; + + my $no_comment = remove_comments($possible_continuation); + + # Concatenate lines containing continuation character (\) + # at the end + if ($no_comment =~ s{\\$}{}) { + + $stashed .= $no_comment; + + next; + } + + my $line = $stashed . $no_comment; + $stashed = $EMPTY; + # Collect information about init script invocations to + # catch running init scripts directly rather than through + # invoke-rc.d. Since the script is allowed to run the + # init script directly if invoke-rc.d doesn't exist, only + # tag direct invocations where invoke-rc.d is never used + # in the same script. Lots of false negatives, but + # hopefully not many false positives. + $saw_init = $position + if $line =~ m{^\s*/etc/init\.d/(?:\S+)\s+[\"\']?(?:\S+)[\"\']?}; + + $saw_invoke = $position + if $line =~ m{^\s*invoke-rc\.d\s+}; + + } continue { + ++$position; + } + + if ($saw_init && !$saw_invoke) { + + my $pointer = $item->pointer($saw_init); + + $self->pointed_hint('maintainer-script-calls-init-script-directly', + $pointer); + } + + return; +} + +sub remove_comments { + my ($line) = @_; + + return $line + unless length $line; + + my $simplified = $line; + + # Remove quoted strings so we can more easily ignore comments + # inside them + $simplified =~ s/(^|[^\\](?:\\\\)*)\'(?:\\.|[^\\\'])+\'/$1''/g; + $simplified =~ s/(^|[^\\](?:\\\\)*)\"(?:\\.|[^\\\"])+\"/$1""/g; + + # If the remaining string contains what looks like a comment, + # eat it. In either case, swap the unmodified script line + # back in for processing (if required) and return it. + if ($simplified =~ m/(?:^|[^[\\])[\s\&;\(\)](\#.*$)/) { + + my $comment = $1; + + # eat comment + $line =~ s/\Q$comment\E//; + } + + return $line; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Languages/Fortran/Gfortran.pm b/lib/Lintian/Check/Languages/Fortran/Gfortran.pm new file mode 100644 index 0000000..6479d8a --- /dev/null +++ b/lib/Lintian/Check/Languages/Fortran/Gfortran.pm @@ -0,0 +1,94 @@ +# languages/fortran/gfortran -- lintian check script -*- perl -*- + +# Copyright (C) 2020 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Languages::Fortran::Gfortran; + +use v5.20; +use warnings; +use utf8; + +use Const::Fast; +use Unicode::UTF8 qw(encode_utf8); + +const my $NEWLINE => qq{\n}; + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +sub visit_installed_files { + my ($self, $item) = @_; + + # file-info would be great, but files are zipped + return + unless $item->name =~ m{\.mod$}; + + return + unless $item->name =~ m{^usr/lib/}; + + # do not look at flang, grub or libreoffice modules + return + if $item->name =~ m{/flang-\d+/} + || $item->name =~ m{^usr/lib/grub} + || $item->name =~ m{^usr/lib/libreoffice}; + + return + unless $item->is_file + && $item->is_open_ok + && $item->file_type =~ /\bgzip compressed\b/; + + my $module_version; + + open(my $fd, '<:gzip', $item->unpacked_path) + or die encode_utf8( + 'Cannot open gz file ' . $item->unpacked_path . $NEWLINE); + + while (my $line = <$fd>) { + next + if $line =~ /^\s*$/; + + ($module_version) = ($line =~ /^GFORTRAN module version '(\d+)'/); + last; + } + + close $fd; + + unless (length $module_version) { + $self->pointed_hint('gfortran-module-does-not-declare-version', + $item->pointer); + return; + } + + my $depends = $self->processable->fields->value('Depends'); + $self->pointed_hint('missing-prerequisite-for-gfortran-module', + $item->pointer) + unless $depends =~ /\bgfortran-mod-$module_version\b/; + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Languages/Golang/BuiltUsing.pm b/lib/Lintian/Check/Languages/Golang/BuiltUsing.pm new file mode 100644 index 0000000..79095d3 --- /dev/null +++ b/lib/Lintian/Check/Languages/Golang/BuiltUsing.pm @@ -0,0 +1,68 @@ +# languages/golang/built-using -- lintian check script -*- perl -*- +# +# Copyright (C) 2004 Marc Brockschmidt +# Copyright (C) 2020 Chris Lamb <lamby@debian.org> +# Copyright (C) 2020-2021 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Languages::Golang::BuiltUsing; + +use v5.20; +use warnings; +use utf8; + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +sub source { + my ($self) = @_; + + return + unless $self->processable->relation('Build-Depends') + ->satisfies('golang-go | golang-any'); + + my $control = $self->processable->debian_control; + + for my $installable ($control->installables) { + my $installable_fields= $control->installable_fields($installable); + + my $control_item= $self->processable->debian_control->item; + my $position = $installable_fields->position('Package'); + + $self->pointed_hint( + 'missing-built-using-field-for-golang-package', + $control_item->pointer($position), + "(in section for $installable)" + ) + if $installable_fields->value('Built-Using') + !~ m{ \$ [{] misc:Built-Using [}] }x + && $installable_fields->value('Architecture') ne 'all'; + } + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Languages/Golang/ImportPath.pm b/lib/Lintian/Check/Languages/Golang/ImportPath.pm new file mode 100644 index 0000000..210696b --- /dev/null +++ b/lib/Lintian/Check/Languages/Golang/ImportPath.pm @@ -0,0 +1,56 @@ +# languages/golang/import-path -- lintian check script -*- perl -*- +# +# Copyright (C) 2004 Marc Brockschmidt +# Copyright (C) 2020 Chris Lamb <lamby@debian.org> +# Copyright (C) 2020-2021 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Languages::Golang::ImportPath; + +use v5.20; +use warnings; +use utf8; + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +sub source { + my ($self) = @_; + + return + unless $self->processable->relation('Build-Depends') + ->satisfies('golang-go | golang-any'); + + my $control = $self->processable->debian_control; + my $source_fields = $control->source_fields; + + $self->hint('missing-xs-go-import-path-for-golang-package') + unless $source_fields->declares('XS-Go-Import-Path'); + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Languages/Java.pm b/lib/Lintian/Check/Languages/Java.pm new file mode 100644 index 0000000..4b26512 --- /dev/null +++ b/lib/Lintian/Check/Languages/Java.pm @@ -0,0 +1,315 @@ +# languages/java -- lintian check script -*- perl -*- + +# Copyright (C) 2011 Vincent Fourmond +# Copyright (C) 2021 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Languages::Java; + +use v5.20; +use warnings; +use utf8; + +use Const::Fast; +use File::Basename; +use List::SomeUtils qw(any none); + +use Lintian::Util qw(normalize_link_target $PKGNAME_REGEX $PKGVERSION_REGEX); + +const my $EMPTY => q{}; +const my $HYPHEN => q{-}; + +const my $ARROW => q{->}; + +const my $BYTE_CODE_VERSION_OFFSET => 44; + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +our $CLASS_REGEX = qr/\.(?:class|cljc?)/; + +sub visit_patched_files { + my ($self, $item) = @_; + + my $java_info = $item->java_info; + return + unless scalar keys %{$java_info}; + + my $files = $java_info->{files}; + + $self->pointed_hint('source-contains-prebuilt-java-object', $item->pointer) + if any { m/$CLASS_REGEX$/i } keys %{$files}; + + return; +} + +sub installable { + my ($self) = @_; + + my $missing_jarwrapper = 0; + my $has_public_jars = 0; + my $jmajlow = $HYPHEN; + + my $depends = $self->processable->relation('strong')->to_string; + + # Remove all libX-java-doc packages to avoid thinking they are java libs + # - note the result may not be a valid dependency listing + $depends =~ s/lib[^\s,]+-java-doc//g; + + my @java_lib_depends = ($depends =~ m/\b(lib[^\s,]+-java)\b/g); + + my $JAVA_BYTECODES= $self->data->load('java/constants', qr/\s*=\s*/); + + # We first loop over jar files to find problems + + for my $item (@{$self->processable->installed->sorted_list}) { + + my $java_info = $item->java_info; + next + unless scalar keys %{$java_info}; + + my $files = $java_info->{files}; + my $manifest = $java_info->{manifest}; + my $jar_dir = dirname($item->name); + my $classes = 0; + my $datafiles = 1; + my $class_path = $EMPTY; + my $bsname = $EMPTY; + + if (exists $java_info->{error}) { + $self->pointed_hint('zip-parse-error', $item->pointer, + $java_info->{error}); + next; + } + + # The Java Policy says very little about requires for (jars in) JVMs + next + if $item->name =~ m{^usr/lib/jvm(?:-exports)?/[^/]+/}; + + # Ignore Mozilla's jar files, see #635495 + next + if $item->name =~ m{^usr/lib/xul(?:-ext|runner[^/]*+)/}; + + if ($item->name =~ m{^usr/share/java/[^/]+\.jar$}) { + $has_public_jars = 1; + + # java policy requires package version too; see Bug#976681 + $self->pointed_hint('bad-jar-name', $item->pointer) + unless basename($item->name) + =~ /^$PKGNAME_REGEX-$PKGVERSION_REGEX\.jar$/; + } + + # check for common code files like .class or .clj (Clojure files) + for my $class (grep { m/$CLASS_REGEX$/i } sort keys %{$files}){ + + my $module_version = $files->{$class}; + (my $src = $class) =~ s/\.[^.]+$/\.java/; + + $self->pointed_hint('jar-contains-source', $item->pointer, $src) + if %{$files}{$src}; + + $classes = 1; + + next + if $class =~ m/\.cljc?$/; + + # .class but no major version? + next + if $module_version eq $HYPHEN; + + if ($module_version + < $JAVA_BYTECODES->value('lowest-known-bytecode-version') + || $module_version + > $JAVA_BYTECODES->value('highest-known-bytecode-version')) { + + # First public major version was 45 (Java1), latest + # version is 55 (Java11). + $self->pointed_hint('unknown-java-class-version', + $item->pointer,$class, $ARROW, $module_version); + + # Skip the rest of this Jar. + last; + } + + # Collect the "lowest" Class version used. We assume that + # mixed class formats implies special compat code for certain + # JVM cases. + if ($jmajlow eq $HYPHEN) { + # first; + $jmajlow = $module_version; + + } else { + $jmajlow = $module_version + if $module_version < $jmajlow; + } + } + + $datafiles = 0 + if none { /\.(?:xml|properties|x?html|xhp)$/i } keys %{$files}; + + if ($item->is_executable) { + + $self->pointed_hint('executable-jar-without-main-class', + $item->pointer) + unless $manifest && $manifest->{'Main-Class'}; + + # Here, we need to check that the package depends on + # jarwrapper. + $missing_jarwrapper = 1 + unless $self->processable->relation('strong') + ->satisfies('jarwrapper'); + + } elsif ($item->name !~ m{^usr/share/}) { + + $self->pointed_hint('jar-not-in-usr-share', $item->pointer); + } + + $class_path = $manifest->{'Class-Path'}//$EMPTY if $manifest; + $bsname = $manifest->{'Bundle-SymbolicName'}//$EMPTY if $manifest; + + if ($manifest) { + if (!$classes) { + + # Eclipse / OSGi bundles are sometimes source bundles + # these do not ship classes but java files and other sources. + # Javadoc jars deployed in the Maven repository also do not ship + # classes but HTML files, images and CSS files + if ( + ( + $bsname !~ m/\.source$/ + && $item->name + !~ m{^usr/share/maven-repo/.*-javadoc\.jar} + && $item->name !~ m{\.doc(?:\.(?:user|isv))?_[^/]+.jar} + && $item->name !~ m{\.source_[^/]+.jar} + ) + || $class_path + ) { + $self->pointed_hint('codeless-jar', $item->pointer); + } + } + + } elsif ($classes) { + $self->pointed_hint('missing-manifest', $item->pointer); + } + + if ($class_path) { + # Only run the tests when a classpath is present + my @relative; + my @paths = split(m/\s++/, $class_path); + for my $p (@paths) { + if ($p) { + # Strip leading ./ + $p =~ s{^\./+}{}g; + if ($p !~ m{^(?:file://)?/} && $p =~ m{/}) { + my $target = normalize_link_target($jar_dir, $p); + my $tinfo; + # Can it be normalized? + next unless defined($target); + # Relative link to usr/share/java ? Works if + # we are depending of a Java library. + next + if $target =~ m{^usr/share/java/[^/]+.jar$} + && @java_lib_depends; + $tinfo= $self->processable->installed->lookup($target); + # Points to file or link in this package, + # which is sometimes easier than + # re-writing the classpath. + next + if defined $tinfo + and ($tinfo->is_symlink or $tinfo->is_file); + # Relative path with subdirectories. + push @relative, $p; + } + # @todo add an info tag for relative paths, to educate + # maintainers ? + } + } + + $self->pointed_hint('classpath-contains-relative-path', + $item->pointer, join(', ', @relative)) + if @relative; + } + + # Trigger a warning when a maven plugin lib is installed in + # /usr/share/java/ + $self->pointed_hint('maven-plugin-in-usr-share-java', $item->pointer) + if $has_public_jars + && $self->processable->name =~ /^lib.*maven.*plugin.*/ + && $item->name !~ m{^usr/share/maven-repo/.*\.jar}; + } + + $self->hint('missing-dep-on-jarwrapper') if $missing_jarwrapper; + + if ($jmajlow ne $HYPHEN) { + # Byte code numbers: + # 45-49 -> Java1 - Java5 (Always ok) + # 50 -> Java6 + # 51 -> Java7 + # 52 -> Java8 + # 53 -> Java9 + # 54 -> Java10 + # 55 -> Java11 + my $bad = 0; + + # If the lowest version used is greater than the requested + # limit, then flag it. + $bad = 1 + if $jmajlow > $JAVA_BYTECODES->value('default-bytecode-version'); + + # Technically we ought to do some checks with Java6 class + # files and dependencies/package types, but for now just skip + # that. (See #673276) + + if ($bad) { + # Map the Class version to a Java version. + my $java_version = $jmajlow - $BYTE_CODE_VERSION_OFFSET; + + $self->hint('incompatible-java-bytecode-format', + "Java$java_version version (Class format: $jmajlow)"); + } + } + + if ( !$has_public_jars + && !$self->processable->is_transitional + && $self->processable->name =~ /^lib[^\s,]+-java$/){ + + # Skip this if it installs a symlink in usr/share/java + my $java_dir + = $self->processable->installed->resolve_path('usr/share/java/'); + + my $has_jars = 0; + $has_jars = 1 + if $java_dir + && (any { $_->name =~ m{^[^/]+\.jar$} } $java_dir->children); + + $self->hint('javalib-but-no-public-jars') + unless $has_jars; + } + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Languages/Java/Bytecode.pm b/lib/Lintian/Check/Languages/Java/Bytecode.pm new file mode 100644 index 0000000..14566a9 --- /dev/null +++ b/lib/Lintian/Check/Languages/Java/Bytecode.pm @@ -0,0 +1,58 @@ +# languages/java/bytecode -- lintian check script -*- perl -*- + +# Copyright (C) 1998 Christian Schwarz and Richard Braakman +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Languages::Java::Bytecode; + +use v5.20; +use warnings; +use utf8; + +use Const::Fast; + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +const my $MAGIC_BYTE_SIZE => 4; + +sub visit_installed_files { + my ($self, $item) = @_; + + # .class (compiled Java files) + if ( $item->name =~ /\.class$/ + && $item->name !~ /(?:WEB-INF|demo|doc|example|sample|test)/) { + + my $magic = $item->magic($MAGIC_BYTE_SIZE); + + $self->pointed_hint('package-installs-java-bytecode', $item->pointer) + if $magic eq "\xCA\xFE\xBA\xBE"; + } + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Languages/Javascript/Embedded.pm b/lib/Lintian/Check/Languages/Javascript/Embedded.pm new file mode 100644 index 0000000..84e969c --- /dev/null +++ b/lib/Lintian/Check/Languages/Javascript/Embedded.pm @@ -0,0 +1,141 @@ +# languages/javascript/embedded -- lintian check script -*- perl -*- + +# Copyright (C) 1998 Christian Schwarz and Richard Braakman +# Copyright (C) 2020 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Languages::Javascript::Embedded; + +use v5.20; +use warnings; +use utf8; + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +my %JS_MAGIC + = ('libjs-bootstrap' => qr{ var [ ] (?: Carousel | Typeahead ) }x,); + +my $JS_EXT + = qr{(?:(?i)[-._]?(?:compiled|lite|min|pack(?:ed)?|prod|umd|yc)?\.(js|css)(?:\.gz)?)$}; +my %JS_FILES = ( + 'ckeditor' => qr{(?i)/ckeditor} . $JS_EXT, + 'fckeditor' => qr{(?i)/fckeditor} . $JS_EXT, + 'libjs-async' => qr{(?i)/async} . $JS_EXT, + 'libjs-bootstrap' => qr{(?i)/bootstrap(?:-[\d\.]+)?} . $JS_EXT, + 'libjs-chai' => qr{(?i)/chai} . $JS_EXT, + 'libjs-cropper' => qr{(?i)/cropper(?:\.uncompressed)?} . $JS_EXT, + 'libjs-dojo-\w+' => qr{(?i)/(?:dojo|dijit)} . $JS_EXT, + 'libjs-excanvas' => qr{(?i)/excanvas(?:-r[0-9]+)?} . $JS_EXT, + 'libjs-jac' => qr{(?i)/jsjac} . $JS_EXT, + 'libjs-jquery' => qr{(?i)/jquery(?:-[\d\.]+)?} . $JS_EXT, + 'libjs-jquery-cookie' => qr{(?i)/jquery\.cookie} . $JS_EXT, + 'libjs-jquery-easing' => qr{(?i)/jquery\.easing} . $JS_EXT, + 'libjs-jquery-event-drag' => qr{(?i)/jquery\.event\.drap} . $JS_EXT, + 'libjs-jquery-event-drop' => qr{(?i)/jquery\.event\.drop} . $JS_EXT, + 'libjs-jquery-fancybox' => qr{(?i)/jquery\.fancybox} . $JS_EXT, + 'libjs-jquery-form' => qr{(?i)/jquery\.form} . $JS_EXT, + 'libjs-jquery-galleriffic' => qr{(?i)/jquery\.galleriffic} . $JS_EXT, + 'libjs-jquery-history' => qr{(?i)/jquery\.history} . $JS_EXT, + 'libjs-jquery-jfeed' => qr{(?i)/jquery\.jfeed} . $JS_EXT, + 'libjs-jquery-jush' => qr{(?i)/jquery\.jush} . $JS_EXT, + 'libjs-jquery-livequery' => qr{(?i)/jquery\.livequery} . $JS_EXT, + 'libjs-jquery-meiomask' => qr{(?i)/jquery\.meiomask} . $JS_EXT, + 'libjs-jquery-metadata' => qr{(?i)/jquery\.metadata} . $JS_EXT, + 'libjs-jquery-migrate-1' => qr{(?i)/jquery-migrate(?:-1[\d\.]*)} + . $JS_EXT, + 'libjs-jquery-mousewheel' => qr{(?i)/jquery\.mousewheel} . $JS_EXT, + 'libjs-jquery-opacityrollover' => qr{(?i)/jquery\.opacityrollover} + . $JS_EXT, + 'libjs-jquery-tablesorter' => qr{(?i)/jquery\.tablesorter} . $JS_EXT, + 'libjs-jquery-tipsy' => qr{(?i)/jquery\.tipsy} . $JS_EXT, + 'libjs-jquery-treetable' => qr{(?i)/jquery\.treetable} . $JS_EXT, + 'libjs-jquery-ui' => qr{(?i)/jquery[\.-](?:-[\d\.]+)?ui} + . $JS_EXT, + 'libjs-mocha' => qr{(?i)/mocha} . $JS_EXT, + 'libjs-mochikit' => qr{(?i)/mochikit} . $JS_EXT, + 'libjs-mootools' => +qr{(?i)/mootools(?:(?:\.v|-)[\d\.]+)?(?:-(?:(?:core(?:-server)?)|more)(?:-(?:yc|jm|nc))?)?} + . $JS_EXT, + 'libjs-mustache' => qr{(?i)/mustache} . $JS_EXT, +# libjs-normalize is provided by node-normalize.css but this is an implementation detail + 'libjs-normalize' => qr{(?i)/normalize(?:\.min)?\.css}, + 'libjs-prototype' => qr{(?i)/prototype(?:-[\d\.]+)?}. $JS_EXT, + 'libjs-raphael' => qr{(?i)/raphael(?:[\.-]min)?} . $JS_EXT, + 'libjs-scriptaculous' => qr{(?i)/scriptaculous} . $JS_EXT, + 'libjs-strophe' => qr{(?i)/strophe} . $JS_EXT, + 'libjs-underscore' => qr{(?i)/underscore} . $JS_EXT, + 'libjs-yui' => qr{(?i)/(?:yahoo|yui)-(?:dom-event)?} + . $JS_EXT, + # Disabled due to false positives. Needs a content check adding to verify + # that the file being checked is /the/ yahoo.js + # 'libjs-yui' => qr{(?i)/yahoo\.js(\.gz)?} . $JS_EXT, + 'jsmath' => qr{(?i)/jsMath(?:-fallback-\w+)?} + . $JS_EXT, + 'node-html5shiv' => qr{(?i)html5shiv(?:-printshiv)?} + . $JS_EXT, + 'sphinx' => + qr{(?i)/_static/(?:doctools|language_data|searchtools)} . $JS_EXT, + 'tinymce' => qr{(?i)/tiny_mce(?:_(?:popup|src))?} + . $JS_EXT, +# not yet available in unstable +# 'xinha' => qr{(?i)/(htmlarea|Xinha(Loader|Core))} . $JS_EXT, +); + +sub visit_installed_files { + my ($self, $item) = @_; + + return + unless $item->is_file; + + # ignore embedded jQuery libraries for Doxygen (#736360) + my $doxygen = $self->processable->installed->resolve_path( + $item->dirname . 'doxygen.css'); + return + if $item->basename eq 'jquery.js' + && defined $doxygen; + + # embedded javascript + for my $provider (keys %JS_FILES) { + + next + if $self->processable->name =~ /^$provider$/; + + next + unless $item->name =~ /$JS_FILES{$provider}/; + + next + if length $JS_MAGIC{$provider} + && !length $item->bytes_match($JS_MAGIC{$provider}); + + $self->pointed_hint('embedded-javascript-library', $item->pointer, + 'please use', $provider); + } + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Languages/Javascript/Nodejs.pm b/lib/Lintian/Check/Languages/Javascript/Nodejs.pm new file mode 100644 index 0000000..98a5d76 --- /dev/null +++ b/lib/Lintian/Check/Languages/Javascript/Nodejs.pm @@ -0,0 +1,262 @@ +# languages/javascript/nodejs -- lintian check script -*- perl -*- + +# Copyright (C) 2019-2020, Xavier Guimard <yadd@debian.org> +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Languages::Javascript::Nodejs; + +use v5.20; +use warnings; +use utf8; + +use Const::Fast; +use JSON::MaybeXS; +use List::SomeUtils qw(any none first_value); +use Path::Tiny; +use Syntax::Keyword::Try; +use Unicode::UTF8 qw(encode_utf8); + +use Lintian::Relation; + +const my $SLASH => q{/}; +const my $DOT => q{.}; + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +sub source { + my ($self) = @_; + + my $debian_control = $self->processable->debian_control; + + # debian/control check + my @testsuites + = split(m/\s*,\s*/,$debian_control->source_fields->value('Testsuite')); + + if (any { $_ eq 'autopkgtest-pkg-nodejs' } @testsuites) { + + my $item = $self->processable->patched->resolve_path( + 'debian/tests/pkg-js/test'); + if (defined $item) { + + $self->pointed_hint('pkg-js-autopkgtest-test-is-empty', + $item->pointer) + if none { /^[^#]*\w/m } $item->bytes; + + } else { + $self->hint('pkg-js-autopkgtest-test-is-missing'); + } + + # Ensure all files referenced in debian/tests/pkg-js/files exist + my $files + = $self->processable->patched->resolve_path( + 'debian/tests/pkg-js/files'); + if (defined $files) { + + my @patterns = path($files->unpacked_path)->lines; + + # trim leading and trailing whitespace + s/^\s+|\s+$//g for @patterns; + + my @notfound = grep { !$self->path_exists($_) } @patterns; + + $self->hint('pkg-js-autopkgtest-file-does-not-exist', $_) + for @notfound; + } + } + + # debian/rules check + my $droot = $self->processable->patched->resolve_path('debian/') + or return; + my $drules = $droot->child('rules') + or return; + + return + unless $drules->is_open_ok; + + open(my $rules_fd, '<', $drules->unpacked_path) + or die encode_utf8('Cannot open ' . $drules->unpacked_path); + + my $command_prefix_pattern = qr/\s+[@+-]?(?:\S+=\S+\s+)*/; + my ($seen_nodejs,$override_test,$seen_dh_dynamic); + my $bdepends = $self->processable->relation('Build-Depends-All'); + $seen_nodejs = 1 if $bdepends->satisfies('dh-sequence-nodejs'); + + while (my $line = <$rules_fd>) { + + # reconstitute splitted lines + while ($line =~ s/\\$// && defined(my $cont = <$rules_fd>)) { + $line .= $cont; + } + + # skip comments + next + if $line =~ /^\s*\#/; + + if ($line =~ m{^(?:$command_prefix_pattern)dh\s+}) { + $seen_dh_dynamic = 1 + if $line =~ /\$[({]\w/; + + while ($line =~ /\s--with(?:=|\s+)(['"]?)(\S+)\1/g) { + my @addons = split(m{,}, $2); + $seen_nodejs = 1 + if any { $_ eq 'nodejs' } @addons; + } + + } elsif ($line =~ /^([^:]*override_dh_[^:]*):/) { + $override_test = 1 + if $1 eq 'auto_test'; + } + } + + if( $seen_nodejs + && !$override_test + && !$seen_dh_dynamic) { + + # pkg-js-tools search build test in the following order + my @candidates = qw{debian/nodejs/test debian/tests/pkg-js/test}; + + my $item = first_value { defined } + map { $self->processable->patched->resolve_path($_) } @candidates; + + # Ensure test file contains something + if (defined $item) { + $self->pointed_hint('pkg-js-tools-test-is-empty', $item->pointer) + unless any { /^[^#]*\w/m } $item->bytes; + + } else { + $self->hint('pkg-js-tools-test-is-missing'); + } + } + + return; +} + +sub visit_installed_files { + my ($self, $item) = @_; + + return + if $item->is_dir; + + return + if $self->processable->name =~ /-dbg$/; + + # Warn if a file is installed in old nodejs root dir + $self->pointed_hint('nodejs-module-installed-in-usr-lib', $item->pointer) + if $item->name =~ m{^usr/lib/nodejs/.*}; + + # Warn if package is not installed in a subdirectory of nodejs root + # directories + $self->pointed_hint('node-package-install-in-nodejs-rootdir', + $item->pointer) + if $item->name + =~ m{^usr/(?:share|lib(?:/[^/]+)?)/nodejs/(?:package\.json|[^/]*\.js)$}; + + # Now we have to open package.json + return + unless $item->is_open_ok; + + # Return an error if a package-lock.json or a yanr.lock file is installed + $self->pointed_hint('nodejs-lock-file', $item->pointer) + if $item->name + =~ m{^usr/(?:share|lib(?:/[^/]+)?)/nodejs/([^/]+)(.*/)(package-lock\.json|yarn\.lock)$}; + + # Look only nodejs package.json files + return + unless $item->name + =~ m{^usr/(?:share|lib(?:/[^/]+)?)/nodejs/([^\@/]+|\@[^/]+/[^/]+)(.*/)package\.json$}; + + # First regexp arg: directory in /**/nodejs or @foo/bar when dir starts + # with '@', following npm registry policy + my $dirname = $1; + # Second regex arg: subpath in /**/nodejs/module/ (eg: node_modules/foo) + my $subpath = $2; + + my $declared = $self->processable->name; + my $version = $self->processable->fields->value('Version'); + $declared .= "( = $version)" + if length $version; + $version ||= '0-1'; + + my $provides + = $self->processable->relation('Provides')->logical_and($declared); + + my $content = $item->bytes; + + # Look only valid package.json files + my $pac; + try { + $pac = decode_json($content); + die + unless length $pac->{name}; + } catch { + return; + } + + # Store node module name & version (classification) + $self->pointed_hint('nodejs-module', $item->pointer, $pac->{name}, + $pac->{version} // 'undef'); + + # Warn if version is 0.0.0-development + $self->pointed_hint('nodejs-missing-version-override', + $item->pointer, $pac->{name}, $pac->{version}) + if $pac->{version} and $pac->{version} =~ /^0\.0\.0-dev/; + + # Warn if module name is not equal to nodejs directory + if ($subpath eq $SLASH && $dirname ne $pac->{name}) { + $self->pointed_hint('nodejs-module-installed-in-bad-directory', + $item->pointer, $pac->{name}, $dirname); + + } else { + # Else verify that module is declared at least in Provides: field + my $name = 'node-' . lc($pac->{name}); + # Normalize name following Debian policy + # (replace invalid characters by "-") + $name =~ s{[/_\@]}{-}g; + $name =~ s/-+/-/g; + + $self->pointed_hint('nodejs-module-not-declared', $item->pointer,$name) + if $subpath eq $SLASH + && !$provides->satisfies($name); + } + + return; +} + +sub path_exists { + my ($self, $expression) = @_; + + # replace asterisks with proper regex wildcard + $expression =~ s{ [*] }{[^/]*}gsx; + + return 1 + if any { m{^ $expression /? $}sx } + @{$self->processable->patched->sorted_list}; + + return 0; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Languages/Ocaml/ByteCode/Compiled.pm b/lib/Lintian/Check/Languages/Ocaml/ByteCode/Compiled.pm new file mode 100644 index 0000000..f916d68 --- /dev/null +++ b/lib/Lintian/Check/Languages/Ocaml/ByteCode/Compiled.pm @@ -0,0 +1,85 @@ +# languages/ocaml/byte-code/compiled -- lintian check script -*- perl -*- +# +# Copyright (C) 2009 Stephane Glondu +# Copyright (C) 2021 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Languages::Ocaml::ByteCode::Compiled; + +use v5.20; +use warnings; +use utf8; + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +has provided_o => ( + is => 'rw', + lazy => 1, + default => sub { + my ($self) = @_; + + my %provided_o; + + for my $item (@{$self->processable->installed->sorted_list}) { + + for my $count (keys %{$item->ar_info}) { + + my $member = $item->ar_info->{$count}{name}; + next + unless length $member; + + # dirname ends in a slash + my $virtual_path = $item->dirname . $member; + + # Note: a .o may be legitimately in several different .a + $provided_o{$virtual_path} = $item->name; + } + } + + return \%provided_o; + } +); + +sub visit_installed_files { + my ($self, $item) = @_; + + my $no_extension = $item->basename; + $no_extension =~ s{ [.] [^.]+ $}{}x; + + # The .cmx counterpart: for each .cmx file, there must be a + # matching .o file, which can be there by itself, or embedded in a + # .a file in the same directory + # dirname ends with a slash + $self->pointed_hint('ocaml-dangling-cmx', $item->pointer) + if $item->name =~ m{ [.]cmx $}x + && !$item->parent_dir->child($no_extension . '.o') + && !exists $self->provided_o->{$item->dirname . $no_extension . '.o'}; + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Languages/Ocaml/ByteCode/Interface.pm b/lib/Lintian/Check/Languages/Ocaml/ByteCode/Interface.pm new file mode 100644 index 0000000..8edeab1 --- /dev/null +++ b/lib/Lintian/Check/Languages/Ocaml/ByteCode/Interface.pm @@ -0,0 +1,63 @@ +# languages/ocaml/byte-code/interface -- lintian check script -*- perl -*- +# +# Copyright (C) 2009 Stephane Glondu +# Copyright (C) 2021 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Languages::Ocaml::ByteCode::Interface; + +use v5.20; +use warnings; +use utf8; + +use Const::Fast; + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +const my $LAST_ITEM => -1; + +sub visit_installed_files { + my ($self, $item) = @_; + + my $no_extension = $item->basename; + $no_extension =~ s{ [.] [^.]+ $}{}x; + + # for dune + my $interface_name = (split(/__/, $no_extension))[$LAST_ITEM]; + + # $somename.cmi should be shipped with $somename.mli or $somename.ml + $self->pointed_hint('ocaml-dangling-cmi', $item->pointer) + if $item->name =~ m{ [.]cmi $}x + && !$item->parent_dir->child($interface_name . '.mli') + && !$item->parent_dir->child(lc($interface_name) . '.mli') + && !$item->parent_dir->child($interface_name . '.ml') + && !$item->parent_dir->child(lc($interface_name) . '.ml'); + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Languages/Ocaml/ByteCode/Library.pm b/lib/Lintian/Check/Languages/Ocaml/ByteCode/Library.pm new file mode 100644 index 0000000..965f134 --- /dev/null +++ b/lib/Lintian/Check/Languages/Ocaml/ByteCode/Library.pm @@ -0,0 +1,58 @@ +# languages/ocaml/byte-code/library -- lintian check script -*- perl -*- +# +# Copyright (C) 2009 Stephane Glondu +# Copyright (C) 2021 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Languages::Ocaml::ByteCode::Library; + +use v5.20; +use warnings; +use utf8; + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +sub visit_installed_files { + my ($self, $item) = @_; + + my $no_extension = $item->basename; + $no_extension =~ s{ [.] [^.]+ $}{}x; + + # For each .cmxa file, there must be a matching .a file (#528367) + $self->pointed_hint('ocaml-dangling-cmxa', $item->pointer) + if $item->name =~ m{ [.]cmxa $}x + && !$item->parent_dir->child($no_extension . '.a'); + + # $somename.cmo should usually not be shipped with $somename.cma + $self->pointed_hint('ocaml-stray-cmo', $item->pointer) + if $item->name =~ m{ [.]cma $}x + && $item->parent_dir->child($no_extension . '.cmo'); + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Languages/Ocaml/ByteCode/Misplaced/Package.pm b/lib/Lintian/Check/Languages/Ocaml/ByteCode/Misplaced/Package.pm new file mode 100644 index 0000000..767f6b0 --- /dev/null +++ b/lib/Lintian/Check/Languages/Ocaml/ByteCode/Misplaced/Package.pm @@ -0,0 +1,126 @@ +# languages/ocaml/byte-code/misplaced/package -- lintian check script -*- perl -*- +# +# Copyright (C) 2009 Stephane Glondu +# Copyright (C) 2021 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Languages::Ocaml::ByteCode::Misplaced::Package; + +use v5.20; +use warnings; +use utf8; + +use Const::Fast; +use List::SomeUtils qw(first_value); + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +const my $EMPTY => q{}; +const my $SLASH => q{/}; + +has development_files => (is => 'rw', default => sub { [] }); + +has is_dev_package => ( + is => 'rw', + lazy => 1, + default => sub { + my ($self) = @_; + + # is it a development package? + return 1 + if ( + $self->processable->name =~ m{ + (?: -dev + |\A camlp[45](?:-extra)? + |\A ocaml (?: + -nox + |-interp + |-compiler-libs + )? + )\Z}xsm + ); + + return 0; + } +); + +sub visit_installed_files { + my ($self, $item) = @_; + + # .cma, .cmo and .cmxs are excluded because they can be plugins + push(@{$self->development_files}, $item->name) + if $item->name =~ m{ [.] cm (?: i | xa? ) $}x; + + return; +} + +sub installable { + my ($self) = @_; + + my $count = scalar @{$self->development_files}; + my $plural = ($count == 1) ? $EMPTY : 's'; + + my $prefix = longest_common_prefix(@{$self->development_files}); + + # strip trailing slash + $prefix =~ s{ / $}{}x + unless $prefix eq $SLASH; + + # non-dev packages should not ship .cmi, .cmx or .cmxa files + $self->hint('ocaml-dev-file-in-nondev-package', + "$count file$plural in $prefix") + if $count > 0 + && !$self->is_dev_package; + + return; +} + +sub longest_common_prefix { + my (@paths) = @_; + + my %prefixes; + + for my $path (@paths) { + + my $truncated = $path; + + # first operation drops the file name + while ($truncated =~ s{ / [^/]* $}{}x) { + ++$prefixes{$truncated}; + } + } + + my @by_descending_length = reverse sort keys %prefixes; + + my $common = first_value { $prefixes{$_} == @paths } @by_descending_length; + + $common ||= $SLASH; + + return $common; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Languages/Ocaml/ByteCode/Misplaced/Path.pm b/lib/Lintian/Check/Languages/Ocaml/ByteCode/Misplaced/Path.pm new file mode 100644 index 0000000..68e4f4f --- /dev/null +++ b/lib/Lintian/Check/Languages/Ocaml/ByteCode/Misplaced/Path.pm @@ -0,0 +1,105 @@ +# languages/ocaml/byte-code/misplaced/path -- lintian check script -*- perl -*- +# +# Copyright (C) 2009 Stephane Glondu +# Copyright (C) 2021 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Languages::Ocaml::ByteCode::Misplaced::Path; + +use v5.20; +use warnings; +use utf8; + +use Const::Fast; +use List::SomeUtils qw(first_value); + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +const my $EMPTY => q{}; +const my $SLASH => q{/}; + +has misplaced_files => (is => 'rw', default => sub { [] }); + +sub visit_installed_files { + my ($self, $item) = @_; + + # development files outside /usr/lib/ocaml (.cmi, .cmx, .cmxa) + return + if $item->name =~ m{^ usr/lib/ocaml/ }x; + + # .cma, .cmo and .cmxs are excluded because they can be plugins + push(@{$self->misplaced_files}, $item->name) + if $item->name =~ m{ [.] cm (?: i | xa? ) $}x; + + return; +} + +sub installable { + my ($self) = @_; + + my $count = scalar @{$self->misplaced_files}; + my $plural = ($count == 1) ? $EMPTY : 's'; + + my $prefix = longest_common_prefix(@{$self->misplaced_files}); + + # strip trailing slash + $prefix =~ s{ / $}{}x + unless $prefix eq $SLASH; + + $self->hint( + 'ocaml-dev-file-not-in-usr-lib-ocaml', + "$count file$plural in $prefix" + )if $count > 0; + + return; +} + +sub longest_common_prefix { + my (@paths) = @_; + + my %prefixes; + + for my $path (@paths) { + + my $truncated = $path; + + # first operation drops the file name + while ($truncated =~ s{ / [^/]* $}{}x) { + ++$prefixes{$truncated}; + } + } + + my @by_descending_length = reverse sort keys %prefixes; + + my $common = first_value { $prefixes{$_} == @paths } @by_descending_length; + + $common ||= $SLASH; + + return $common; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Languages/Ocaml/ByteCode/Plugin.pm b/lib/Lintian/Check/Languages/Ocaml/ByteCode/Plugin.pm new file mode 100644 index 0000000..ae14f6b --- /dev/null +++ b/lib/Lintian/Check/Languages/Ocaml/ByteCode/Plugin.pm @@ -0,0 +1,56 @@ +# languages/ocaml/byte-code/plugin -- lintian check script -*- perl -*- +# +# Copyright (C) 2009 Stephane Glondu +# Copyright (C) 2021 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Languages::Ocaml::ByteCode::Plugin; + +use v5.20; +use warnings; +use utf8; + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +sub visit_installed_files { + my ($self, $item) = @_; + + my $no_extension = $item->basename; + $no_extension =~ s{ [.] [^.]+ $}{}x; + + # For each .cmxs file, there must be a matching .cma or .cmo file + # (at least, in library packages) + $self->pointed_hint('ocaml-dangling-cmxs', $item->pointer) + if $item->name =~ m{ [.]cmxs $}x + && !$item->parent_dir->child($no_extension . '.cma') + && !$item->parent_dir->child($no_extension . '.cmo') + && $self->processable->name =~ /^lib/; + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Languages/Ocaml/CustomExecutable.pm b/lib/Lintian/Check/Languages/Ocaml/CustomExecutable.pm new file mode 100644 index 0000000..8ebad48 --- /dev/null +++ b/lib/Lintian/Check/Languages/Ocaml/CustomExecutable.pm @@ -0,0 +1,59 @@ +# languages/ocaml/custom-executable -- lintian check script -*- perl -*- + +# Copyright (C) 1998 Christian Schwarz and Richard Braakman +# Copyright (C) 2012 Kees Cook +# Copyright (C) 2017-2020 Chris Lamb <lamby@debian.org> +# Copyright (C) 2021 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Languages::Ocaml::CustomExecutable; + +use v5.20; +use warnings; +use utf8; + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +sub visit_installed_files { + my ($self, $item) = @_; + + return + unless $item->is_file; + + return + unless $item->file_type =~ /^ [^,]* \b ELF \b /x; + + # Check for OCaml custom executables (#498138) + $self->pointed_hint('ocaml-custom-executable', $item->pointer) + if $item->file_type =~ m{ \b not [ ] stripped \b }x + && $item->file_type =~ m{ \b executable \b }x + && $item->strings =~ m{^ Caml1999X0 [0-9] [0-9] $}mx; + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Languages/Ocaml/Meta.pm b/lib/Lintian/Check/Languages/Ocaml/Meta.pm new file mode 100644 index 0000000..0a9976b --- /dev/null +++ b/lib/Lintian/Check/Languages/Ocaml/Meta.pm @@ -0,0 +1,67 @@ +# languages/ocaml/meta -- lintian check script -*- perl -*- +# +# Copyright (C) 2009 Stephane Glondu +# Copyright (C) 2021 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Languages::Ocaml::Meta; + +use v5.20; +use warnings; +use utf8; + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +has has_meta => (is => 'rw', default => 0); + +sub visit_installed_files { + my ($self, $item) = @_; + + return + unless $item->name =~ m{^ usr/lib/ocaml/ }x; + + # does the package provide a META file? + $self->has_meta(1) + if $item->name =~ m{ / META (?: [.] | $ ) }x; + + return; +} + +sub installable { + my ($self) = @_; + + my $prerequisites = $self->processable->relation('all'); + + # If there is a META file, ocaml-findlib should at least be suggested. + $self->hint('ocaml-meta-without-suggesting-findlib') + if $self->has_meta + && !$prerequisites->satisfies('ocaml-findlib:any'); + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Languages/Perl.pm b/lib/Lintian/Check/Languages/Perl.pm new file mode 100644 index 0000000..c68af47 --- /dev/null +++ b/lib/Lintian/Check/Languages/Perl.pm @@ -0,0 +1,125 @@ +# languages/perl -- lintian check script -*- perl -*- + +# Copyright (C) 1998 Christian Schwarz and Richard Braakman +# Copyright (C) 2021 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Languages::Perl; + +use v5.20; +use warnings; +use utf8; + +use Unicode::UTF8 qw(encode_utf8); + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +has perl_sources_in_lib => (is => 'rw', default => sub { [] }); +has has_perl_binaries => (is => 'rw', default => 0); + +sub visit_installed_files { + my ($self, $item) = @_; + + # perllocal.pod + $self->pointed_hint('package-installs-perllocal-pod', $item->pointer) + if $item->name =~ m{^usr/lib/perl.*/perllocal.pod$}; + + # .packlist files + if ($item->name =~ m{^usr/lib/perl.*/.packlist$}) { + $self->pointed_hint('package-installs-packlist', $item->pointer); + + }elsif ($item->name =~ m{^usr/lib/(?:[^/]+/)?perl5/.*\.p[lm]$}) { + push @{$self->perl_sources_in_lib}, $item; + + }elsif ($item->name =~ m{^usr/lib/(?:[^/]+/)?perl5/.*\.(?:bs|so)$}) { + $self->has_perl_binaries(1); + } + + # perl modules + if ($item->name =~ m{^usr/(?:share|lib)/perl/\S}) { + + # check if it's the "perl" package itself + $self->pointed_hint('perl-module-in-core-directory', $item->pointer) + unless $self->processable->source_name eq 'perl'; + } + + # perl modules using old libraries + # we do the same check on perl scripts in checks/scripts + my $dep = $self->processable->relation('strong'); + if ( $item->is_file + && $item->name =~ /\.pm$/ + && !$dep->satisfies('libperl4-corelibs-perl | perl (<< 5.12.3-7)')) { + + open(my $fd, '<', $item->unpacked_path) + or die encode_utf8('Cannot open ' . $item->unpacked_path); + + my $position = 1; + while (my $line = <$fd>) { + if ( + $line =~ m{ (?:do|require)\s+['"] # do/require + + # Huge list of perl4 modules... + (abbrev|assert|bigfloat|bigint|bigrat + |cacheout|complete|ctime|dotsh|exceptions + |fastcwd|find|finddepth|flush|getcwd|getopt + |getopts|hostname|importenv|look|newgetopt + |open2|open3|pwd|shellwords|stat|syslog + |tainted|termcap|timelocal|validate) + # ... so they end with ".pl" rather than ".pm" + \.pl['"] + }xsm + ) { + my $module = $1; + + $self->pointed_hint('perl-module-uses-perl4-libs-without-dep', + $item->pointer($position), "$module.pl"); + } + + } continue { + ++$position; + } + + close $fd; + } + + return; +} + +sub installable { + my ($self) = @_; + + unless ($self->has_perl_binaries) { + + $self->pointed_hint('package-installs-nonbinary-perl-in-usr-lib-perl5', + $_->pointer) + for @{$self->perl_sources_in_lib}; + } + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Languages/Perl/Core/Provides.pm b/lib/Lintian/Check/Languages/Perl/Core/Provides.pm new file mode 100644 index 0000000..b0a3923 --- /dev/null +++ b/lib/Lintian/Check/Languages/Perl/Core/Provides.pm @@ -0,0 +1,83 @@ +# languages/perl/core/provides -- lintian check script (rewrite) -*- perl -*- +# +# Copyright (C) 2004 Marc Brockschmidt +# Copyright (C) 2021 Felix Lechner +# +# Parts of the code were taken from the old check script, which +# was Copyright (C) 1998 Richard Braakman (also licensed under the +# GPL 2 or higher) +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Languages::Perl::Core::Provides; + +use v5.20; +use warnings; +use utf8; + +use Dpkg::Version qw(version_check); + +use Lintian::Relation::Version qw(versions_compare); + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +sub always { + my ($self) = @_; + + my $fields = $self->processable->fields; + + return + unless $fields->declares('Version'); + + my $version = $fields->unfolded_value('Version'); + + my $dversion = Dpkg::Version->new($version); + return + unless $dversion->is_valid; + + my ($epoch, $upstream, $debian) + = ($dversion->epoch, $dversion->version, $dversion->revision); + + my $PERL_CORE_PROVIDES= $self->data->load('fields/perl-provides', '\s+'); + + my $name = $fields->value('Package'); + + return + unless $PERL_CORE_PROVIDES->recognizes($name); + + my $core_version = $PERL_CORE_PROVIDES->value($name); + + my $no_revision = "$epoch:$upstream"; + return + unless version_check($no_revision); + + $self->hint('package-superseded-by-perl', "with $core_version") + if versions_compare($core_version, '>=', $no_revision); + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Languages/Perl/Perl4/Prerequisites.pm b/lib/Lintian/Check/Languages/Perl/Perl4/Prerequisites.pm new file mode 100644 index 0000000..fb5e9be --- /dev/null +++ b/lib/Lintian/Check/Languages/Perl/Perl4/Prerequisites.pm @@ -0,0 +1,124 @@ +# languages/perl/perl4/prerequisites -- lintian check script -*- perl -*- +# +# Copyright (C) 1998 Richard Braakman +# Copyright (C) 2002 Josip Rodin +# Copyright (C) 2016-2019 Chris Lamb <lamby@debian.org> +# Copyright (C) 2021 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Languages::Perl::Perl4::Prerequisites; + +use v5.20; +use warnings; +use utf8; + +use Const::Fast; +use File::Basename; +use Unicode::UTF8 qw(encode_utf8); + +use Lintian::Relation; + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +# check for obsolete perl libraries +const my $PERL4_PREREQUISITES => + 'libperl4-corelibs-perl:any | perl:any (<< 5.12.3-7)'; + +has satisfies_perl4_prerequisites => ( + is => 'rw', + lazy => 1, + default => sub { + my ($self) = @_; + + return $self->processable->relation('strong') + ->satisfies($PERL4_PREREQUISITES); + } +); + +sub visit_installed_files { + my ($self, $item) = @_; + + # Consider /usr/src/ scripts as "documentation" + # - packages containing /usr/src/ tend to be "-source" .debs + # and usually come with overrides + # no checks necessary at all for scripts in /usr/share/doc/ + # unless they are examples + return + if ($item->name =~ m{^usr/share/doc/} || $item->name =~ m{^usr/src/}) + && $item->name !~ m{^usr/share/doc/[^/]+/examples/}; + + return + unless length $item->interpreter; + + my $basename = basename($item->interpreter); + return + unless $basename eq 'perl'; + + return + unless $item->is_open_ok; + + open(my $fd, '<', $item->unpacked_path) + or die encode_utf8('Cannot open ' . $item->unpacked_path); + + my $position = 1; + while (my $line = <$fd>) { + if ( + $line =~m{ (?:do|require)\s+['"] # do/require + + # Huge list of perl4 modules... + (abbrev|assert|bigfloat|bigint|bigrat + |cacheout|complete|ctime|dotsh|exceptions + |fastcwd|find|finddepth|flush|getcwd|getopt + |getopts|hostname|importenv|look|newgetopt + |open2|open3|pwd|shellwords|stat|syslog + |tainted|termcap|timelocal|validate) + # ... so they end with ".pl" rather than ".pm" + \.pl['"] + }xsm + ) { + + my $module = "$1.pl"; + + my $pointer = $item->pointer($position); + + $self->pointed_hint( + 'script-uses-perl4-libs-without-dep',$pointer, + "(does not satisfy $PERL4_PREREQUISITES)",$module + ) unless $self->satisfies_perl4_prerequisites; + + } + + } continue { + ++$position; + } + + close $fd; + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Languages/Perl/Perl5.pm b/lib/Lintian/Check/Languages/Perl/Perl5.pm new file mode 100644 index 0000000..8b138ab --- /dev/null +++ b/lib/Lintian/Check/Languages/Perl/Perl5.pm @@ -0,0 +1,61 @@ +# Copyright (C) 1998 Christian Schwarz and Richard Braakman +# Copyright (C) 1999 Joey Hess +# Copyright (C) 2000 Sean 'Shaleh' Perry +# Copyright (C) 2002 Josip Rodin +# Copyright (C) 2007 Russ Allbery +# Copyright (C) 2013-2018 Bastien ROUCARIES +# Copyright (C) 2017-2020 Chris Lamb <lamby@debian.org> +# Copyright (C) 2020-2021 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Languages::Perl::Perl5; + +use v5.20; +use warnings; +use utf8; + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +sub visit_patched_files { + my ($self, $item) = @_; + + return + unless $item->is_file; + + # Find mentioning of usr/lib/perl5 inside the packaging + $self->pointed_hint('mentions-deprecated-usr-lib-perl5-directory', + $item->pointer) + if $item->basename ne 'changelog' + && $item->name =~ m{^ debian/ }sx + && $item->name !~ m{^ debian/patches/ }sx + && $item->name !~ m{^ debian/ (?:.+\.)? install $}sx + && $item->bytes =~ m{^ [^#]* usr/lib/perl5 }msx; + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Languages/Perl/Yapp.pm b/lib/Lintian/Check/Languages/Perl/Yapp.pm new file mode 100644 index 0000000..adf3605 --- /dev/null +++ b/lib/Lintian/Check/Languages/Perl/Yapp.pm @@ -0,0 +1,55 @@ +# languages/perl/yapp -- lintian check script -*- perl -*- +# +# Copyright (C) 2019 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Languages::Perl::Yapp; + +use v5.20; +use warnings; +use utf8; + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +sub visit_patched_files { + my ($self, $item) = @_; + + return + unless $item->name =~ /\.pm$/; + + my $bytes = $item->bytes; + return + unless $bytes; + + $self->pointed_hint('source-contains-prebuilt-yapp-parser', $item->pointer) + if $bytes + =~ /^#\s+This file was generated using Parse::Yapp version [\d.]+/m; + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Languages/Php.pm b/lib/Lintian/Check/Languages/Php.pm new file mode 100644 index 0000000..948a7a3 --- /dev/null +++ b/lib/Lintian/Check/Languages/Php.pm @@ -0,0 +1,53 @@ +# languages/php -- lintian check script -*- perl -*- + +# Copyright (C) 1998 Christian Schwarz and Richard Braakman +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Languages::Php; + +use v5.20; +use warnings; +use utf8; + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +sub visit_installed_files { + my ($self, $item) = @_; + + # /etc/php/*/mods-available/*.ini + if ( $item->is_file + && $item->name =~ m{^etc/php/.*/mods-available/.+\.ini$}) { + + $self->pointed_hint('obsolete-comments-style-in-php-ini', + $item->pointer) + if $item->decoded_utf8 =~ /^\s*#/m; + } + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Languages/Php/Composer.pm b/lib/Lintian/Check/Languages/Php/Composer.pm new file mode 100644 index 0000000..142c1e8 --- /dev/null +++ b/lib/Lintian/Check/Languages/Php/Composer.pm @@ -0,0 +1,93 @@ +# languages/php/composer -- lintian check script -*- perl -*- +# +# Copyright (C) 2021 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Languages::Php::Composer; + +use v5.20; +use warnings; +use utf8; + +use Lintian::Relation; + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +sub source { + my ($self) = @_; + + my $control = $self->processable->debian_control; + my $source_fields = $control->source_fields; + + for my $field ( + qw(Build-Depends Build-Depends-Indep + Build-Conflicts Build-Conflicts-Indep) + ) { + next + unless $source_fields->declares($field); + + my $position = $source_fields->position($field); + my $pointer = $control->item->pointer($position); + + my $raw = $source_fields->value($field); + my $relation = Lintian::Relation->new->load($raw); + + my $condition = 'composer:any'; + + $self->pointed_hint('composer-prerequisite', $pointer, $field, + '(in source paragraph)') + if $relation->satisfies($condition); + } + + for my $installable ($control->installables) { + my $installable_fields = $control->installable_fields($installable); + + for my $field ( + qw(Pre-Depends Depends Recommends Suggests Breaks + Conflicts Provides Replaces Enhances) + ) { + next + unless $installable_fields->declares($field); + + my $position = $installable_fields->position($field); + my $pointer = $control->item->pointer($position); + + my $relation + = $self->processable->binary_relation($installable, $field); + + my $condition = 'composer:any'; + + $self->pointed_hint('composer-prerequisite', $pointer, $field, + "(in section for $installable)") + if $relation->satisfies($condition); + } + } + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Languages/Php/Embedded.pm b/lib/Lintian/Check/Languages/Php/Embedded.pm new file mode 100644 index 0000000..2287f09 --- /dev/null +++ b/lib/Lintian/Check/Languages/Php/Embedded.pm @@ -0,0 +1,92 @@ +# languages/php/embedded -- lintian check script -*- perl -*- + +# Copyright (C) 1998 Christian Schwarz and Richard Braakman +# Copyright (C) 2020 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Languages::Php::Embedded; + +use v5.20; +use warnings; +use utf8; + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +my $PHP_EXT = qr{(?i)\.(?:php|inc|dtd)$}; +my %PHP_FILES = ( + 'libphp-adodb' => qr{(?i)/adodb\.inc\.php$}, + 'smarty3?' => qr{(?i)/Smarty(?:_Compiler)?\.class\.php$}, + 'libphp-phpmailer' => qr{(?i)/class\.phpmailer(\.(?:php|inc))+$}, + 'phpsysinfo' => +qr{(?i)/phpsysinfo\.dtd|/class\.(?:Linux|(?:Open|Net|Free|)BSD)\.inc\.php$}, + 'php-openid' => qr{/Auth/(?:OpenID|Yadis/Yadis)\.php$}, + 'libphp-snoopy' => qr{(?i)/Snoopy\.class\.(?:php|inc)$}, + 'php-markdown' => qr{(?i)/markdown\.php$}, + 'php-geshi' => qr{(?i)/geshi\.php$}, + 'libphp-pclzip' =>qr{(?i)/(?:class[.-])?pclzip\.(?:inc|lib)?\.php$}, + 'libphp-phplayersmenu' => qr{(?i)/.*layersmenu.*/(lib/)?PHPLIB\.php$}, + 'libphp-phpsniff' => qr{(?i)/phpSniff\.(?:class|core)\.php$}, + 'libphp-jabber' => qr{(?i)/(?:class\.)?jabber\.php$}, + 'libphp-simplepie' => + qr{(?i)/(?:class[\.-])?simplepie(?:\.(?:php|inc))+$}, + 'libphp-jpgraph' => qr{(?i)/jpgraph\.php$}, + 'php-fpdf' => qr{(?i)/fpdf\.php$}, + 'php-getid3' => qr{(?i)/getid3\.(?:lib\.)?(?:\.(?:php|inc))+$}, + 'php-php-gettext' => qr{(?i)/(?<!pomo/)streams\.php$}, + 'libphp-magpierss' => qr{(?i)/rss_parse\.(?:php|inc)$}, + 'php-simpletest' => qr{(?i)/unit_tester\.php$}, + 'libsparkline-php' => qr{(?i)/Sparkline\.php$}, + 'libnusoap-php' => qr{(?i)/(?:class\.)?nusoap\.(?:php|inc)$}, + 'php-htmlpurifier' => qr{(?i)/HTMLPurifier\.php$}, + # not yet available in unstable:, + # 'libphp-ixr' => qr{(?i)/IXR_Library(?:\.inc|\.php)+$}, + # 'libphp-kses' => qr{(?i)/(?:class\.)?kses\.php$}, +); + +sub visit_installed_files { + my ($self, $item) = @_; + + return + unless $item->is_file; + + # embedded PHP + for my $provider (keys %PHP_FILES) { + + next + if $self->processable->name =~ /^$provider$/; + + next + unless $item->name =~ /$PHP_FILES{$provider}/; + + $self->pointed_hint('embedded-php-library', $item->pointer, + 'please use',$provider); + } + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Languages/Php/Pear.pm b/lib/Lintian/Check/Languages/Php/Pear.pm new file mode 100644 index 0000000..55fa14e --- /dev/null +++ b/lib/Lintian/Check/Languages/Php/Pear.pm @@ -0,0 +1,241 @@ +# langauges/php/pear -- lintian check script -*- perl -*- + +# Copyright (C) 2013 Mathieu Parent <math.parent@gmail.com> +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Languages::Php::Pear; + +use v5.20; +use warnings; +use utf8; + +use Const::Fast; +use List::SomeUtils qw(none); +use Unicode::UTF8 qw(encode_utf8); + +const my $DOLLAR => q{$}; + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +sub source { + my ($self) = @_; + + # Don't check package if it doesn't contain a .php file + if (none { $_->basename =~ m/\.php$/i && !$_->is_dir } + @{$self->processable->patched->sorted_list}){ + return; + } + + my $build_depends = $self->processable->relation('Build-Depends'); + my $package_type = 'unknown'; + + # PEAR or PECL package + my $package_xml = $self->processable->patched->lookup('package.xml'); + my $package2_xml = $self->processable->patched->lookup('package2.xml'); + + my $debian_control = $self->processable->debian_control; + + if (defined($package_xml) || defined($package2_xml)) { + # Checking source builddep + if (!$build_depends->satisfies('pkg-php-tools')) { + $self->hint('pear-package-without-pkg-php-tools-builddep'); + + } else { + # Checking first binary relations + my @binaries = $debian_control->installables; + my $binary = $binaries[0]; + + my $depends + = $self->processable->binary_relation($binary, 'Depends'); + my $recommends + = $self->processable->binary_relation($binary, 'Recommends'); + my $breaks= $self->processable->binary_relation($binary, 'Breaks'); + + $self->hint('pear-package-but-missing-dependency', 'Depends') + unless $depends->satisfies($DOLLAR . '{phppear:Debian-Depends}'); + + $self->hint('pear-package-but-missing-dependency','Recommends') + unless $recommends->satisfies( + $DOLLAR . '{phppear:Debian-Recommends}'); + + $self->hint('pear-package-but-missing-dependency', 'Breaks') + unless $breaks->satisfies($DOLLAR . '{phppear:Debian-Breaks}'); + + # checking description + my $description + = $debian_control->installable_fields($binary) + ->untrimmed_value('Description'); + + $self->hint( + 'pear-package-not-using-substvar', + $DOLLAR . '{phppear:summary}' + )if $description !~ /\$\{phppear:summary\}/; + + $self->hint( + 'pear-package-not-using-substvar', + $DOLLAR . '{phppear:description}' + )if $description !~ /\$\{phppear:description\}/; + + if (defined $package_xml && $package_xml->is_regular_file) { + + # Wild guess package type as in + # PEAR_PackageFile_v2::getPackageType() + open(my $package_xml_fd, '<', $package_xml->unpacked_path) + or die encode_utf8( + 'Cannot open ' . $package_xml->unpacked_path); + + while (my $line = <$package_xml_fd>) { + if ( + $line =~ m{\A \s* < + (php|extsrc|extbin|zendextsrc|zendextbin) + release \s* /? > }xsm + ) { + $package_type = $1; + last; + } + if ($line =~ /^\s*<bundle\s*\/?>/){ + $package_type = 'bundle'; + last; + } + } + + close $package_xml_fd; + + if ($package_type eq 'extsrc') { # PECL package + if (!$build_depends->satisfies('php-dev')) { + + $self->pointed_hint( + 'pecl-package-requires-build-dependency', + $package_xml->pointer,'php-dev'); + } + + if (!$build_depends->satisfies('dh-php')) { + $self->pointed_hint( + 'pecl-package-requires-build-dependency', + $package_xml->pointer,'dh-php'); + } + } + } + } + } + + # PEAR channel + my $channel_xml = $self->processable->patched->lookup('channel.xml'); + $self->pointed_hint('pear-channel-without-pkg-php-tools-builddep', + $channel_xml->pointer) + if defined $channel_xml + && !$build_depends->satisfies('pkg-php-tools'); + + # Composer package + my $composer_json = $self->processable->patched->lookup('composer.json'); + $self->pointed_hint('composer-package-without-pkg-php-tools-builddep', + $composer_json->pointer) + if defined $composer_json + && !$build_depends->satisfies('pkg-php-tools') + && !defined $package_xml + && !defined $package2_xml; + + # Check rules + if ( + $build_depends->satisfies('pkg-php-tools') + && ( defined $package_xml + || defined $package2_xml + || defined $channel_xml + || defined $composer_json) + ) { + my $rules = $self->processable->patched->resolve_path('debian/rules'); + if (defined $rules && $rules->is_open_ok) { + + my $has_buildsystem_phppear = 0; + my $has_addon_phppear = 0; + my $has_addon_phpcomposer= 0; + my $has_addon_php = 0; + + open(my $rules_fd, '<', $rules->unpacked_path) + or die encode_utf8('Cannot open ' . $rules->unpacked_path); + + while (my $line = <$rules_fd>) { + + while ($line =~ s/\\$// && defined(my $cont = <$rules_fd>)) { + $line .= $cont; + } + + next + if $line =~ /^\s*\#/; + + $has_buildsystem_phppear = 1 + if $line + =~ /^\t\s*dh\s.*--buildsystem(?:=|\s+)(?:\S+,)*phppear(?:,\S+)*\s/; + + $has_addon_phppear = 1 + if $line + =~ /^\t\s*dh\s.*--with(?:=|\s+)(?:\S+,)*phppear(?:,\S+)*\s/; + + $has_addon_phpcomposer = 1 + if $line + =~ /^\t\s*dh\s.*--with(?:=|\s+)(?:\S+,)*phpcomposer(?:,\S+)*\s/; + + $has_addon_php = 1 + if $line + =~ /^\t\s*dh\s.*--with(?:=|\s+)(?:\S+,)*php(?:,\S+)*\s/; + } + + close $rules_fd; + + if ( defined $package_xml + || defined $package2_xml + || defined $channel_xml) { + + $self->pointed_hint('missing-pkg-php-tools-buildsystem', + $rules->pointer, 'phppear') + unless $has_buildsystem_phppear; + + $self->pointed_hint('missing-pkg-php-tools-addon', + $rules->pointer, 'phppear') + unless $has_addon_phppear; + + $self->pointed_hint('missing-pkg-php-tools-addon', + $rules->pointer, 'php') + if $package_type eq 'extsrc' + && !$has_addon_php; + } + + if ( !defined $package_xml + && !defined $package2_xml + && defined $composer_json) { + + $self->pointed_hint('missing-pkg-php-tools-addon', + $rules->pointer, 'phpcomposer') + unless $has_addon_phpcomposer; + } + } + } + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Languages/Php/Pear/Embedded.pm b/lib/Lintian/Check/Languages/Php/Pear/Embedded.pm new file mode 100644 index 0000000..dfb1268 --- /dev/null +++ b/lib/Lintian/Check/Languages/Php/Pear/Embedded.pm @@ -0,0 +1,92 @@ +# languages/php/pear/embedded -- lintian check script -*- perl -*- + +# Copyright (C) 1998 Christian Schwarz and Richard Braakman +# Copyright (C) 2020 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Languages::Php::Pear::Embedded; + +use v5.20; +use warnings; +use utf8; + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +my $PEAR_MAGIC = qr{pear[/.]}; +my $PEAR_EXT = qr{(?i)\.php$}; +my %PEAR_FILES = ( + 'php-auth' => qr{/Auth} . $PEAR_EXT, + 'php-auth-http' => qr{/Auth/HTTP} . $PEAR_EXT, + 'php-benchmark' => qr{/Benchmark/(?:Timer|Profiler|Iterate)} + . $PEAR_EXT, + 'php-http' => qr{(?<!/Auth)/HTTP} . $PEAR_EXT, + 'php-cache' => qr{/Cache} . $PEAR_EXT, + 'php-cache-lite' => qr{/Cache/Lite} . $PEAR_EXT, + 'php-compat' => qr{/Compat} . $PEAR_EXT, + 'php-config' => qr{/Config} . $PEAR_EXT, + 'php-crypt-cbc' => qr{/CBC} . $PEAR_EXT, + 'php-date' => qr{/Date} . $PEAR_EXT, + 'php-db' => qr{(?<!/Container)/DB} . $PEAR_EXT, + 'php-file' => qr{(?<!/Container)/File} . $PEAR_EXT, + 'php-log' => + qr{(?:/Log/(?:file|error_log|null|syslog|sql\w*)|/Log)} . $PEAR_EXT, + 'php-mail' => qr{/Mail} . $PEAR_EXT, + 'php-mail-mime' => qr{(?i)/mime(Part)?} . $PEAR_EXT, + 'php-mail-mimedecode' => qr{/mimeDecode} . $PEAR_EXT, + 'php-net-ftp' => qr{/FTP} . $PEAR_EXT, + 'php-net-imap' => qr{(?<!/Container)/IMAP} . $PEAR_EXT, + 'php-net-ldap' => qr{(?<!/Container)/LDAP} . $PEAR_EXT, + 'php-net-smtp' => qr{/SMTP} . $PEAR_EXT, + 'php-net-socket' => qr{(?<!/FTP)/Socket} . $PEAR_EXT, +); + +sub visit_installed_files { + my ($self, $item) = @_; + + return + unless $item->is_file; + + # embedded PEAR + for my $provider (keys %PEAR_FILES) { + + next + if $self->processable->name =~ /^$provider$/; + + next + unless $item->name =~ /$PEAR_FILES{$provider}/; + + next + unless length $item->bytes_match($PEAR_MAGIC); + + $self->pointed_hint('embedded-pear-module', $item->pointer, + 'please use',$provider); + } + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Languages/Python.pm b/lib/Lintian/Check/Languages/Python.pm new file mode 100644 index 0000000..3b9d316 --- /dev/null +++ b/lib/Lintian/Check/Languages/Python.pm @@ -0,0 +1,509 @@ +# languages/python -- lintian check script -*- perl -*- +# +# Copyright (C) 2016 Chris Lamb +# Copyright (C) 2020 Louis-Philippe Veronneau <pollo@debian.org> +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Languages::Python; + +use v5.20; +use warnings; +use utf8; + +use Const::Fast; +use List::SomeUtils qw(any none); +use Unicode::UTF8 qw(encode_utf8); + +use Lintian::Relation; +use Lintian::Relation::Version qw(versions_lte); + +const my $EMPTY => q{}; +const my $ARROW => q{ -> }; +const my $DOLLAR => q{$}; + +const my $PYTHON3_MAJOR => 3; +const my $PYTHON2_MIGRATION_MAJOR => 2; +const my $PYTHON2_MIGRATION_MINOR => 6; + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +my @FIELDS = qw(Depends Pre-Depends Recommends Suggests); +my @IGNORE = qw(-dev$ -docs?$ -common$ -tools$); +my @PYTHON2 = qw(python2:any python2.7:any python2-dev:any); +my @PYTHON3 = qw(python3:any python3-dev:any); + +my %DJANGO_PACKAGES = ( + '^python3-django-' => 'python3-django', + '^python2?-django-' => 'python-django', +); + +my %REQUIRED_DEPENDS = ( + 'python2' => 'python2-minimal:any | python2:any', + 'python3' => 'python3-minimal:any | python3:any', +); + +my %MISMATCHED_SUBSTVARS = ( + '^python3-.+' => $DOLLAR . '{python:Depends}', + '^python2?-.+' => $DOLLAR . '{python3:Depends}', +); + +has ALLOWED_PYTHON_FILES => ( + is => 'rw', + lazy => 1, + default => sub { + my ($self) = @_; + + return $self->data->load('files/allowed-python-files'); + } +); +has GENERIC_PYTHON_MODULES => ( + is => 'rw', + lazy => 1, + default => sub { + my ($self) = @_; + + return $self->data->load('files/generic-python-modules'); + } +); + +my @VERSION_FIELDS = qw(X-Python-Version XS-Python-Version X-Python3-Version); + +has correct_location => (is => 'rw', default => sub { {} }); + +sub source { + my ($self) = @_; + + my @installable_names = $self->processable->debian_control->installables; + for my $installable_name (@installable_names) { + # Python 2 modules + if ($installable_name =~ /^python2?-(.*)$/) { + my $suffix = $1; + + next + if any { $installable_name =~ /$_/ } @IGNORE; + + next + if any { $_ eq "python3-${suffix}" } @installable_names; + + # Don't trigger if we ship any Python 3 module + next + if any { + $self->processable->binary_relation($_, 'all') + ->satisfies($DOLLAR . '{python3:Depends}') + }@installable_names; + + $self->hint('python-foo-but-no-python3-foo', $installable_name); + } + } + + my $build_all = $self->processable->relation('Build-Depends-All'); + $self->hint('build-depends-on-python-sphinx-only') + if $build_all->satisfies('python-sphinx') + && !$build_all->satisfies('python3-sphinx'); + + my $maintainer = $self->processable->fields->value('Maintainer'); + $self->hint('python-teams-merged', $maintainer) + if $maintainer =~ m{python-modules-team\@lists\.alioth\.debian\.org} + || $maintainer =~ m{python-apps-team\@lists\.alioth\.debian\.org}; + + $self->hint( + 'alternatively-build-depends-on-python-sphinx-and-python3-sphinx') + if $self->processable->fields->value('Build-Depends') + =~ /\bpython-sphinx\s+\|\s+python3-sphinx\b/; + + my $debian_control = $self->processable->debian_control; + + # Mismatched substvars + for my $regex (keys %MISMATCHED_SUBSTVARS) { + my $substvar = $MISMATCHED_SUBSTVARS{$regex}; + + for my $installable_name ($debian_control->installables) { + + next + if any { $installable_name =~ /$_/ } @IGNORE; + + next + if $installable_name !~ qr/$regex/; + + $self->hint('mismatched-python-substvar', $installable_name, + $substvar) + if $self->processable->binary_relation($installable_name, 'all') + ->satisfies($substvar); + } + } + + my $VERSIONS = $self->data->load('python/versions', qr/\s*=\s*/); + + for my $field (@VERSION_FIELDS) { + + next + unless $debian_control->source_fields->declares($field); + + my $pyversion= $debian_control->source_fields->value($field); + + my @valid = ( + ['\d+\.\d+', '\d+\.\d+'],['\d+\.\d+'], + ['\>=\s*\d+\.\d+', '\<\<\s*\d+\.\d+'],['\>=\s*\d+\.\d+'], + ['current', '\>=\s*\d+\.\d+'],['current'], + ['all'] + ); + + my @pyversion = split(/\s*,\s*/, $pyversion); + + if ($pyversion =~ m/^current/) { + $self->hint('python-version-current-is-deprecated', $field); + } + + if (@pyversion > 2) { + if (any { !/^\d+\.\d+$/ } @pyversion) { + $self->hint('malformed-python-version', $field, $pyversion); + } + } else { + my $okay = 0; + for my $rule (@valid) { + if ( + $pyversion[0] =~ /^$rule->[0]$/ + && ( + ( + $pyversion[1] + && $rule->[1] + && $pyversion[1] =~ /^$rule->[1]$/ + ) + || (!$pyversion[1] && !$rule->[1]) + ) + ) { + $okay = 1; + last; + } + } + $self->hint('malformed-python-version', $field, $pyversion) + unless $okay; + } + + if ($pyversion =~ /\b(([23])\.\d+)$/) { + my ($v, $major) = ($1, $2); + my $old = $VERSIONS->value("old-python$major"); + my $ancient = $VERSIONS->value("ancient-python$major"); + + if (versions_lte($v, $ancient)) { + $self->hint('ancient-python-version-field', $field, $v); + } elsif (versions_lte($v, $old)) { + $self->hint('old-python-version-field', $field, $v); + } + } + } + + $self->hint('source-package-encodes-python-version') + if $self->processable->name =~ m/^python\d-/ + && $self->processable->name ne 'python3-defaults'; + + my $build_depends = Lintian::Relation->new; + $build_depends->load_norestriction( + $self->processable->fields->value('Build-Depends')); + + my $pyproject= $self->processable->patched->resolve_path('pyproject.toml'); + if (defined $pyproject && $pyproject->is_open_ok) { + + my %PYPROJECT_PREREQUISITES = ( + 'poetry.core.masonry.api' => 'python3-poetry-core:any', + 'flit_core.buildapi' => 'flit:any', + 'setuptools.build_meta' => 'python3-setuptools:any' + ); + + open(my $fd, '<', $pyproject->unpacked_path) + or die encode_utf8('Cannot open ' . $pyproject->unpacked_path); + + my $position = 1; + while (my $line = <$fd>) { + + my $pointer = $pyproject->pointer($position); + + if ($line =~ m{^ \s* build-backend \s* = \s* "([^"]+)" }x) { + + my $backend = $1; + + $self->pointed_hint('uses-poetry-cli', $pointer) + if $backend eq 'poetry.core.masonry.api' + && $build_depends->satisfies('python3-poetry:any') + && !$build_depends->satisfies('python3-poetry-core:any'); + + if (exists $PYPROJECT_PREREQUISITES{$backend}) { + + my $prerequisites = $PYPROJECT_PREREQUISITES{$backend} + . ', pybuild-plugin-pyproject:any'; + + $self->pointed_hint( + 'missing-prerequisite-for-pyproject-backend', + $pointer, $backend,"(does not satisfy $prerequisites)") + if !$build_depends->satisfies($prerequisites); + } + } + + } continue { + ++$position; + } + + close $fd; + } + + return; +} + +sub visit_installed_files { + my ($self, $item) = @_; + + # .pyc/.pyo (compiled Python files) + # skip any file installed inside a __pycache__ directory + # - we have a separate check for that directory. + $self->pointed_hint('package-installs-python-bytecode', $item->pointer) + if $item->name =~ /\.py[co]$/ + && $item->name !~ m{/__pycache__/}; + + # __pycache__ (directory for pyc/pyo files) + $self->pointed_hint('package-installs-python-pycache-dir', $item->pointer) + if $item->is_dir + && $item->name =~ m{/__pycache__/}; + + if ( $item->is_file + && $item->name + =~ m{^usr/lib/debug/usr/lib/pyshared/(python\d?(?:\.\d+))/(.+)$}) { + + my $correct = "usr/lib/debug/usr/lib/pymodules/$1/$2"; + $self->pointed_hint('python-debug-in-wrong-location', + $item->pointer, "better: $correct"); + } + + # .egg (Python egg files) + $self->pointed_hint('package-installs-python-egg', $item->pointer) + if $item->name =~ /\.egg$/ + && ( $item->name =~ m{^usr/lib/python\d+(?:\.\d+/)} + || $item->name =~ m{^usr/lib/pyshared} + || $item->name =~ m{^usr/share/}); + + # /usr/lib/site-python + $self->pointed_hint('file-in-usr-lib-site-python', $item->pointer) + if $item->name =~ m{^usr/lib/site-python/\S}; + + # pythonX.Y extensions + if ( $item->name =~ m{^usr/lib/python\d\.\d/\S} + && $item->name !~ m{^usr/lib/python\d\.\d/(?:site|dist)-packages/}){ + + $self->pointed_hint('third-party-package-in-python-dir',$item->pointer) + unless $self->processable->source_name =~ m/^python(?:\d\.\d)?$/ + || $self->processable->source_name =~ m{\A python\d?- + (?:stdlib-extensions|profiler|old-doctools) \Z}xsm; + } + + # ---------------- Python file locations + # - The Python people kindly provided the following table. + # good: + # /usr/lib/python2.5/site-packages/ + # /usr/lib/python2.6/dist-packages/ + # /usr/lib/python2.7/dist-packages/ + # /usr/lib/python3/dist-packages/ + # + # bad: + # /usr/lib/python2.5/dist-packages/ + # /usr/lib/python2.6/site-packages/ + # /usr/lib/python2.7/site-packages/ + # /usr/lib/python3.*/*-packages/ + if ( + $item->name =~ m{\A + (usr/lib/debug/)? + usr/lib/python(\d+(?:\.\d+)?)/ + ((?:site|dist)-packages)/(.+) + \Z}xsm + ){ + my ($debug, $pyver, $actual_package_dir, $relative) = ($1, $2, $3, $4); + $debug //= $EMPTY; + + my ($pmaj, $pmin) = split(m{\.}, $pyver, 2); + $pmin //= 0; + + next + if $pmaj < $PYTHON2_MIGRATION_MAJOR; + + my ($module_name) = ($relative =~ m{^([^/]+)}); + + my $actual_python_libpath = "usr/lib/python$pyver/"; + my $specified_python_libpath = "usr/lib/python$pmaj/"; + + # for python 2.X, folder was python2.X and not python2 + $specified_python_libpath = $actual_python_libpath + if $pmaj < $PYTHON3_MAJOR; + + my $specified_package_dir = 'dist-packages'; + + # python 2.4 and 2.5 + $specified_package_dir = 'site-packages' + if $pmaj == $PYTHON2_MIGRATION_MAJOR + && $pmin < $PYTHON2_MIGRATION_MINOR; + + my $actual_module_path + = $debug. $actual_python_libpath. "$actual_package_dir/$module_name"; + my $specified_module_path + = $debug + . $specified_python_libpath + . "$specified_package_dir/$module_name"; + + $self->correct_location->{$actual_module_path} = $specified_module_path + unless $actual_module_path eq $specified_module_path; + + for my $regex ($self->GENERIC_PYTHON_MODULES->all) { + $self->pointed_hint('python-module-has-overly-generic-name', + $item->pointer, "($1)") + if $relative =~ m{^($regex)(?:\.py|/__init__\.py)$}i; + } + + $self->pointed_hint('unknown-file-in-python-module-directory', + $item->pointer) + if $item->is_file + && $relative eq $item->basename # "top-level" + &&!$self->ALLOWED_PYTHON_FILES->matches_any($item->basename, 'i'); + } + + return; +} + +sub installable { + my ($self) = @_; + + $self->hint( + 'python-module-in-wrong-location', + $_ . $ARROW . $self->correct_location->{$_} + )for keys %{$self->correct_location}; + + my $deps + = $self->processable->relation('all') + ->logical_and($self->processable->relation('Provides'), + $self->processable->name); + + my @entries + = $self->processable->changelog + ? @{$self->processable->changelog->entries} + : (); + + # Check for missing dependencies + if ($self->processable->name !~ /-dbg$/) { + for my $item (@{$self->processable->installed->sorted_list}) { + + if ( $item->is_file + && $item->name + =~ m{^usr/lib/(?<version>python[23])[\d.]*/(?:site|dist)-packages} + && !$deps->satisfies($REQUIRED_DEPENDS{$+{version}})) { + + $self->hint('python-package-missing-depends-on-python'); + + last; + } + } + } + + # Check for duplicate dependencies + for my $field (@FIELDS) { + my $dep = $self->processable->relation($field); + FIELD: for my $py2 (@PYTHON2) { + for my $py3 (@PYTHON3) { + + if ($dep->satisfies($py2) && $dep->satisfies($py3)) { + $self->hint('depends-on-python2-and-python3', + $field, "(satisfies $py2, $py3)"); + last FIELD; + } + } + } + } + + my $pkg = $self->processable->name; + + # Python 2 modules + $self->hint('new-package-should-not-package-python2-module', + $self->processable->name) + if $self->processable->name =~ / ^ python2? - /msx + && (none { $pkg =~ m{ $_ }x } @IGNORE) + && @entries == 1 + && $entries[0]->Changes + !~ / \b python [ ]? 2 (?:[.]x)? [ ] (?:variant|version) \b /imsx + && $entries[0]->Changes !~ / \Q$pkg\E /msx; + + # Python applications + if ($self->processable->name !~ /^python[23]?-/ + && (none { $_ eq $self->processable->name } @PYTHON2)) { + for my $field (@FIELDS) { + for my $dep (@PYTHON2) { + + $self->hint( + 'dependency-on-python-version-marked-for-end-of-life', + $field, "(satisfies $dep)") + if $self->processable->relation($field)->satisfies($dep); + } + } + } + + # Django modules + for my $regex (keys %DJANGO_PACKAGES) { + my $basepkg = $DJANGO_PACKAGES{$regex}; + + next + if $self->processable->name !~ /$regex/; + + next + if any { $self->processable->name =~ /$_/ } @IGNORE; + + $self->hint('django-package-does-not-depend-on-django', $basepkg) + unless $self->processable->relation('strong')->satisfies($basepkg); + } + + if ( + $self->processable->name =~ /^python([23]?)-/ + && (none { $self->processable->name =~ /$_/ } @IGNORE) + ) { + my $version = $1 || '2'; # Assume python-foo is a Python 2.x package + my @prefixes = ($version eq '2') ? 'python3' : qw(python python2); + + for my $field (@FIELDS) { + for my $prefix (@prefixes) { + + my $visit = sub { + my $rel = $_; + return if any { $rel =~ /$_/ } @IGNORE; + $self->hint( +'python-package-depends-on-package-from-other-python-variant', + "$field: $rel" + ) if /^$prefix-/; + }; + + $self->processable->relation($field) + ->visit($visit, Lintian::Relation::VISIT_PRED_NAME); + } + } + } + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Languages/Python/BogusPrerequisites.pm b/lib/Lintian/Check/Languages/Python/BogusPrerequisites.pm new file mode 100644 index 0000000..fe2df7f --- /dev/null +++ b/lib/Lintian/Check/Languages/Python/BogusPrerequisites.pm @@ -0,0 +1,88 @@ +# languages/python/bogus-prerequisites -- lintian check script -*- perl -*- +# +# Copyright (C) 2020 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Languages::Python::BogusPrerequisites; + +use v5.20; +use warnings; +use utf8; + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +sub installable { + my ($self) = @_; + + $self->what_is_python($self->processable->source_name, + qw{Depends Pre-Depends Recommends}); + + return; +} + +sub source { + my ($self) = @_; + + $self->what_is_python($self->processable->name, + qw{Build-Depends Build-Depends-Indep Build-Depends-Arch}); + + return; +} + +sub what_is_python { + my ($self, $source, @fields) = @_; + + # see Bug#973011 + my @WHAT_IS_PYTHON = qw( + python-is-python2:any + python-dev-is-python2:any + python-is-python3:any + python-dev-is-python3:any + ); + + my %BOGUS_PREREQUISITES; + + unless ($source eq 'what-is-python') { + + for my $unwanted (@WHAT_IS_PYTHON) { + + $BOGUS_PREREQUISITES{$unwanted} + = [grep {$self->processable->relation($_)->satisfies($unwanted)} + @fields]; + } + } + + for my $unwanted (keys %BOGUS_PREREQUISITES) { + + $self->hint('bogus-python-prerequisite', $_, "(satisfies $unwanted)") + for @{$BOGUS_PREREQUISITES{$unwanted}}; + } + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Languages/Python/DistOverrides.pm b/lib/Lintian/Check/Languages/Python/DistOverrides.pm new file mode 100644 index 0000000..2dadeb6 --- /dev/null +++ b/lib/Lintian/Check/Languages/Python/DistOverrides.pm @@ -0,0 +1,80 @@ +# languages/python/dist-overrides -- lintian check script -*- perl -*- +# +# Copyright (C) 2021 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Languages::Python::DistOverrides; + +use v5.20; +use warnings; +use utf8; + +use Const::Fast; +use List::SomeUtils qw(uniq); + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +const my $SPACE => q{ }; + +sub source { + my ($self) = @_; + + my $override_file + = $self->processable->patched->resolve_path('debian/py3dist-overrides'); + return + unless defined $override_file; + + my $contents = $override_file->decoded_utf8; + return + unless length $contents; + + # strip comments + $contents =~ s/^\s*\#.*$//mg; + + # strip empty lines + $contents =~ s/^\s*$//mg; + + # trim leading spaces + $contents =~ s/^\s*//mg; + + my @lines = split(/\n/, $contents); + + # get first component from each line + my @identifiers + = grep { defined } map { (split($SPACE, $_, 2))[0] } @lines; + + my %count; + $count{$_}++ for @identifiers; + + my @duplicates = grep { $count{$_} > 1 } uniq @identifiers; + + $self->hint('duplicate-p3dist-override', $_) for @duplicates; + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Languages/Python/Feedparser.pm b/lib/Lintian/Check/Languages/Python/Feedparser.pm new file mode 100644 index 0000000..da716e7 --- /dev/null +++ b/lib/Lintian/Check/Languages/Python/Feedparser.pm @@ -0,0 +1,54 @@ +# languages/python/feedparser -- lintian check script -*- perl -*- + +# Copyright (C) 1998 Christian Schwarz and Richard Braakman +# Copyright (C) 2020 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Languages::Python::Feedparser; + +use v5.20; +use warnings; +use utf8; + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +sub visit_installed_files { + my ($self, $item) = @_; + + return + unless $item->is_file; + + # embedded Feedparser library + $self->pointed_hint('embedded-feedparser-library', $item->pointer) + if $item->name =~ m{ / feedparser[.]py $}x + && $item->bytes =~ /Universal feed parser/ + && $self->processable->source_name ne 'feedparser'; + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Languages/Python/Homepage.pm b/lib/Lintian/Check/Languages/Python/Homepage.pm new file mode 100644 index 0000000..18a0470 --- /dev/null +++ b/lib/Lintian/Check/Languages/Python/Homepage.pm @@ -0,0 +1,59 @@ +# languages/python/homepage -- lintian check script (rewrite) -*- perl -*- +# +# Copyright (C) 2021 Felix Lechner +# +# Parts of the code were taken from the old check script, which +# was Copyright (C) 1998 Richard Braakman (also licensed under the +# GPL 2 or higher) +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Languages::Python::Homepage; + +use v5.20; +use warnings; +use utf8; + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +sub source { + my ($self) = @_; + + my $fields = $self->processable->fields; + if ($fields->declares('Homepage')) { + + my $homepage = $fields->value('Homepage'); + + # see Bug#981932 + $self->hint('pypi-homepage', $homepage) + if $homepage + =~ m{^http s? :// (?:www [.])? pypi (:?[.] python)? [.] org/}isx; + } + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Languages/Python/Obsolete.pm b/lib/Lintian/Check/Languages/Python/Obsolete.pm new file mode 100644 index 0000000..e810faa --- /dev/null +++ b/lib/Lintian/Check/Languages/Python/Obsolete.pm @@ -0,0 +1,63 @@ +# languages/python/obsolete -- lintian check script -*- perl -*- +# +# Copyright (C) 1999 Joey Hess +# Copyright (C) 2000 Sean 'Shaleh' Perry +# Copyright (C) 2002 Josip Rodin +# Copyright (C) 2007 Russ Allbery +# Copyright (C) 2013-2018 Bastien ROUCARIES +# Copyright (C) 2017-2020 Chris Lamb <lamby@debian.org> +# Copyright (C) 2020 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Languages::Python::Obsolete; + +use v5.20; +use warnings; +use utf8; + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +sub source { + my ($self) = @_; + + my $pycompat= $self->processable->patched->resolve_path('debian/pycompat'); + + $self->pointed_hint('debian-pycompat-is-obsolete', $pycompat->pointer) + if defined $pycompat + && $pycompat->is_file; + + my $pyversions + = $self->processable->patched->resolve_path('debian/pyversions'); + + $self->pointed_hint('debian-pyversions-is-obsolete', $pyversions->pointer) + if defined $pyversions + && $pyversions->is_file; + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Languages/Python/Scripts.pm b/lib/Lintian/Check/Languages/Python/Scripts.pm new file mode 100644 index 0000000..988b915 --- /dev/null +++ b/lib/Lintian/Check/Languages/Python/Scripts.pm @@ -0,0 +1,54 @@ +# languages/python/scripts -- lintian check script -*- perl -*- +# +# Copyright (C) 2016 Chris Lamb +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Languages::Python::Scripts; + +use v5.20; +use warnings; +use utf8; + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +sub visit_installed_files { + my ($self, $item) = @_; + + return + unless $item->name =~ m{(?:usr/)?bin/[^/]+}; + + return + unless $item->is_script; + + $self->pointed_hint('script-uses-unversioned-python-in-shebang', + $item->pointer) + if $item->interpreter =~ m{^(?:/usr/bin/)?python$}; + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Languages/R.pm b/lib/Lintian/Check/Languages/R.pm new file mode 100644 index 0000000..daa8462 --- /dev/null +++ b/lib/Lintian/Check/Languages/R.pm @@ -0,0 +1,74 @@ +# Copyright (C) 1998 Christian Schwarz and Richard Braakman +# Copyright (C) 1999 Joey Hess +# Copyright (C) 2000 Sean 'Shaleh' Perry +# Copyright (C) 2002 Josip Rodin +# Copyright (C) 2007 Russ Allbery +# Copyright (C) 2013-2018 Bastien ROUCARIES +# Copyright (C) 2017-2020 Chris Lamb <lamby@debian.org> +# Copyright (C) 2020-2021 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Languages::R; + +use v5.20; +use warnings; +use utf8; + +use Const::Fast; + +const my $RDATA_MAGIC_LENGTH => 4; + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +sub visit_patched_files { + my ($self, $item) = @_; + + return + unless $item->is_file; + + # Ensure we have a README.source for R data files + if ( $item->basename =~ /\.(?:rda|Rda|rdata|Rdata|RData)$/ + && $item->is_open_ok + && $item->file_type =~ /gzip compressed data/ + && !$self->processable->patched->resolve_path('debian/README.source')){ + + open(my $fd, '<:gzip', $item->unpacked_path) + or die encode_utf8('Cannot open ' . $item->unpacked_path); + + read($fd, my $magic, $RDATA_MAGIC_LENGTH) + or die encode_utf8('Cannot read from ' . $item->unpacked_path); + + close($fd); + + $self->pointed_hint('r-data-without-readme-source', $item->pointer) + if $magic eq 'RDX2'; + } + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Languages/R/Architecture.pm b/lib/Lintian/Check/Languages/R/Architecture.pm new file mode 100644 index 0000000..3ee0bd2 --- /dev/null +++ b/lib/Lintian/Check/Languages/R/Architecture.pm @@ -0,0 +1,69 @@ +# languages/r/architecture -- lintian check script (rewrite) -*- perl -*- +# +# Copyright (C) 2004 Marc Brockschmidt +# Copyright (C) 2021 Felix Lechner +# +# Parts of the code were taken from the old check script, which +# was Copyright (C) 1998 Richard Braakman (also licensed under the +# GPL 2 or higher) +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Languages::R::Architecture; + +use v5.20; +use warnings; +use utf8; + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +has have_r_files => (is => 'rw', default => 0); + +sub visit_installed_files { + my ($self, $item) = @_; + + return + if $item->is_dir; + + $self->have_r_files(1) + if $item->name =~ m{^usr/lib/R/.*/DESCRIPTION$} + && $item->decoded_utf8 =~ /^NeedsCompilation: no/m; + + return; +} + +sub installable { + my ($self) = @_; + + $self->hint('r-package-not-arch-all') + if $self->processable->name =~ /^r-(?:cran|bioc|other)-/ + && $self->have_r_files + && $self->processable->fields->value('Architecture') ne 'all'; + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Languages/R/SiteLibrary.pm b/lib/Lintian/Check/Languages/R/SiteLibrary.pm new file mode 100644 index 0000000..1ac6ac9 --- /dev/null +++ b/lib/Lintian/Check/Languages/R/SiteLibrary.pm @@ -0,0 +1,71 @@ +# languages/r/site-library -- lintian check script -*- perl -*- + +# Copyright (C) 2020 Dylan Aissi +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Languages::R::SiteLibrary; + +use v5.20; +use warnings; +use utf8; + +use Lintian::Relation; + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +has r_site_libraries => (is => 'rw', default => sub { [] }); + +sub visit_installed_files { + my ($self, $item) = @_; + + # R site libraries + if ($item->name =~ m{^usr/lib/R/site-library/(.*)/DESCRIPTION$}) { + push(@{$self->r_site_libraries}, $1); + } + + return; +} + +sub installable { + my ($self) = @_; + + $self->hint('ships-r-site-library', $_) for @{$self->r_site_libraries}; + + return + unless @{$self->r_site_libraries}; + + my $depends = $self->processable->relation('strong'); + + # no version allowed for virtual package; no alternatives + $self->hint('requires-r-api') + unless $depends->matches(qr/^r-api-[\w\d+-.]+$/, + Lintian::Relation::VISIT_OR_CLAUSE_FULL); + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Languages/Ruby.pm b/lib/Lintian/Check/Languages/Ruby.pm new file mode 100644 index 0000000..563f740 --- /dev/null +++ b/lib/Lintian/Check/Languages/Ruby.pm @@ -0,0 +1,72 @@ +# languages/ruby -- lintian check script (rewrite) -*- perl -*- +# +# Copyright (C) 2021 Felix Lechner +# +# Parts of the code were taken from the old check script, which +# was Copyright (C) 1998 Richard Braakman (also licensed under the +# GPL 2 or higher) +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Languages::Ruby; + +use v5.20; +use warnings; +use utf8; + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +sub source { + my ($self) = @_; + + my $fields = $self->processable->fields; + if ($fields->declares('Homepage')) { + + my $homepage = $fields->value('Homepage'); + + # rubygems itself is okay; see Bug#981935 + $self->hint('rubygem-homepage', $homepage) + if $homepage + =~ m{^http s? :// (?:www [.])? rubygems [.] org/gems/}isx; + } + + return; +} + +sub binary { + my ($self) = @_; + + my @prerequisites + = $self->processable->fields->trimmed_list('Depends', qr/,/); + + my @ruby_interpreter = grep { / \b ruby-interpreter \b /x } @prerequisites; + + $self->hint('ruby-interpreter-is-deprecated', $_)for @ruby_interpreter; + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Languages/Rust.pm b/lib/Lintian/Check/Languages/Rust.pm new file mode 100644 index 0000000..140134f --- /dev/null +++ b/lib/Lintian/Check/Languages/Rust.pm @@ -0,0 +1,69 @@ +# languages/rust -- lintian check script -*- perl -*- + +# Copyright (C) 2020 Sylvestre Ledru +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Languages::Rust; + +use v5.20; +use warnings; +use utf8; + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +sub source { + my ($self) = @_; + + my $debian_control = $self->processable->debian_control; + for my $installable ($debian_control->installables) { + + my $fields = $debian_control->installable_fields($installable); + my $extended = $fields->text('Description'); + + # drop synopsis + $extended =~ s/^ [^\n]* \n //sx; + + $self->hint('rust-boilerplate', $installable) + if $extended + =~ /^ \QThis package contains the following binaries built from the Rust crate\E /isx; + } + + return; +} + +sub installable { + my ($self) = @_; + + $self->hint('empty-rust-library-declares-provides') + if $self->processable->name =~ /^librust-/ + && $self->processable->not_just_docs + && length $self->processable->fields->value('Provides'); + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Libraries/DebugSymbols.pm b/lib/Lintian/Check/Libraries/DebugSymbols.pm new file mode 100644 index 0000000..4f04e6f --- /dev/null +++ b/lib/Lintian/Check/Libraries/DebugSymbols.pm @@ -0,0 +1,59 @@ +# libraries/debug-symbols -- lintian check script -*- perl -*- + +# Copyright (C) 1998 Christian Schwarz and Richard Braakman +# Copyright (C) 2012 Kees Cook +# Copyright (C) 2017-2020 Chris Lamb <lamby@debian.org> +# Copyright (C) 2021 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Libraries::DebugSymbols; + +use v5.20; +use warnings; +use utf8; + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +sub visit_installed_files { + my ($self, $item) = @_; + + return + unless $item->is_file; + + return + unless $item->file_type =~ /^ [^,]* \b ELF \b /x; + + # stripped but a debug or profiling library? + $self->pointed_hint('stripped-library', $item->pointer) + if $item->file_type !~ m{\bnot stripped\b} + && $item->name =~ m{^ (?:usr/)? lib/ (?: debug | profile ) / }x + && $item->size; + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Libraries/Embedded.pm b/lib/Lintian/Check/Libraries/Embedded.pm new file mode 100644 index 0000000..502af47 --- /dev/null +++ b/lib/Lintian/Check/Libraries/Embedded.pm @@ -0,0 +1,124 @@ +# libraries/embedded -- lintian check script -*- perl -*- + +# Copyright (C) 1998 Christian Schwarz and Richard Braakman +# Copyright (C) 2012 Kees Cook +# Copyright (C) 2017-2020 Chris Lamb <lamby@debian.org> +# Copyright (C) 2021 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Libraries::Embedded; + +use v5.20; +use warnings; +use utf8; + +use Const::Fast; +use List::Compare; +use Unicode::UTF8 qw(encode_utf8); + +const my $SPACE => q{ }; + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +has EMBEDDED_LIBRARIES => ( + is => 'rw', + lazy => 1, + default => sub { + my ($self) = @_; + + my %embedded_libraries; + + my $data + = $self->data->load('binaries/embedded-libs',qr{ \s*+ [|][|] }x); + + for my $label ($data->all) { + + my $details = $data->value($label); + + my ($pairs, $pattern) = split(m{ [|][|] }x, $details, 2); + + my %result; + for my $kvpair (split($SPACE, $pairs)) { + + my ($key, $value) = split(/=/, $kvpair, 2); + $result{$key} = $value; + } + + my $lc= List::Compare->new([keys %result], + [qw{libname source source-regex}]); + my @unknown = $lc->get_Lonly; + + die encode_utf8( +"Unknown options @unknown for $label (in binaries/embedded-libs)" + )if @unknown; + + die encode_utf8( +"Both source and source-regex used for $label (in binaries/embedded-libs)" + )if length $result{source} && length $result{'source-regex'}; + + $result{match} = qr/$pattern/; + + $result{libname} //= $label; + $result{source} //= $label; + + $embedded_libraries{$label} = \%result; + } + + return \%embedded_libraries; + } +); + +sub visit_installed_files { + my ($self, $item) = @_; + + return + unless $item->is_file; + + return + unless $item->file_type =~ /^ [^,]* \b ELF \b /x; + + for my $embedded_name (keys %{$self->EMBEDDED_LIBRARIES}) { + + my $library_data = $self->EMBEDDED_LIBRARIES->{$embedded_name}; + + next + if length $library_data->{'source-regex'} + && $self->processable->source_name=~ $library_data->{'source-regex'}; + + next + if length $library_data->{source} + && $self->processable->source_name eq $library_data->{source}; + + $self->pointed_hint('embedded-library', $item->pointer, + $library_data->{libname}) + if $item->strings =~ $library_data->{match}; + } + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Libraries/Shared/Exit.pm b/lib/Lintian/Check/Libraries/Shared/Exit.pm new file mode 100644 index 0000000..5788808 --- /dev/null +++ b/lib/Lintian/Check/Libraries/Shared/Exit.pm @@ -0,0 +1,72 @@ +# libraries/shared/exit -- lintian check script -*- perl -*- + +# Copyright (C) 1998 Christian Schwarz +# Copyright (C) 2018-2019 Chris Lamb <lamby@debian.org> +# Copyright (C) 2021 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Libraries::Shared::Exit; + +use v5.20; +use warnings; +use utf8; + +use List::SomeUtils qw(any none); + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +# not presently used +#my $UNKNOWN_SHARED_LIBRARY_EXCEPTIONS +# = $self->data->load('shared-libs/unknown-shared-library-exceptions'); + +sub visit_installed_files { + my ($self, $item) = @_; + + return + unless $item->is_file; + + # shared library + return + unless @{$item->elf->{SONAME} // [] }; + + my @symbols = grep { $_->section eq '.text' || $_->section eq 'UND' } + @{$item->elf->{SYMBOLS} // []}; + + my @symbol_names = map { $_->name } @symbols; + + # If it has an INTERP section it might be an application with + # a SONAME (hi openjdk-6, see #614305). Also see the comment + # for "shared-library-is-executable" below. + $self->pointed_hint('exit-in-shared-library', $item->pointer) + if (any { m/^_?exit$/ } @symbol_names) + && (none { $_ eq 'fork' } @symbol_names) + && !length $item->elf->{INTERP}; + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Libraries/Shared/FilePermissions.pm b/lib/Lintian/Check/Libraries/Shared/FilePermissions.pm new file mode 100644 index 0000000..663205e --- /dev/null +++ b/lib/Lintian/Check/Libraries/Shared/FilePermissions.pm @@ -0,0 +1,72 @@ +# libraries/shared/file-permissions -- lintian check script -*- perl -*- + +# Copyright (C) 1998 Christian Schwarz +# Copyright (C) 2018-2019 Chris Lamb <lamby@debian.org> +# Copyright (C) 2021 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Libraries::Shared::FilePermissions; + +use v5.20; +use warnings; +use utf8; + +use Const::Fast; + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +const my $WIDELY_READABLE => oct(644); + +sub visit_installed_files { + my ($self, $item) = @_; + + return + unless $item->is_file; + + # shared library + return + unless @{$item->elf->{SONAME} // [] }; + + # Yes. But if the library has an INTERP section, it's + # designed to do something useful when executed, so don't + # report an error. Also give ld.so a pass, since it's + # special. + $self->pointed_hint('shared-library-is-executable', + $item->pointer, $item->octal_permissions) + if $item->is_executable + && !$item->elf->{INTERP} + && $item->name !~ m{^lib.*/ld-[\d.]+\.so$}; + + $self->pointed_hint('odd-permissions-on-shared-library', + $item->pointer, $item->octal_permissions) + if !$item->is_executable + && $item->operm != $WIDELY_READABLE; + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Libraries/Shared/Links.pm b/lib/Lintian/Check/Libraries/Shared/Links.pm new file mode 100644 index 0000000..e25d3fd --- /dev/null +++ b/lib/Lintian/Check/Libraries/Shared/Links.pm @@ -0,0 +1,167 @@ +# libraries/shared/links -- lintian check script -*- perl -*- + +# Copyright (C) 1998 Christian Schwarz +# Copyright (C) 2018-2019 Chris Lamb <lamby@debian.org> +# Copyright (C) 2021 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Libraries::Shared::Links; + +use v5.20; +use warnings; +use utf8; + +use Const::Fast; +use List::SomeUtils qw(none); + +const my $ARROW => q{->}; + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +has development_packages => ( + is => 'rw', + lazy => 1, + default => sub { + my ($self) = @_; + + my @development_packages; + + for my $installable ($self->group->get_installables) { + + push(@development_packages, $installable) + if $installable->name =~ /-dev$/ + && $installable->relation('strong') + ->satisfies($self->processable->name); + } + + return \@development_packages; + } +); + +sub visit_installed_files { + my ($self, $item) = @_; + + return + unless $item->is_file; + + # shared library + return + unless @{$item->elf->{SONAME} // [] }; + + my $soname = $item->elf->{SONAME}[0]; + + my @ldconfig_folders = @{$self->data->architectures->ldconfig_folders}; + return + if none { $item->dirname eq $_ } @ldconfig_folders; + + my $installed = $self->processable->installed; + + my $versioned_name = $item->dirname . $soname; + my $versioned_item = $installed->lookup($versioned_name); + + my $unversioned_name = $versioned_name; + # libtool "-release" variant + $unversioned_name =~ s/-[\d\.]+\.so$/.so/; + # determine shlib link name (w/o version) + $unversioned_name =~ s/\.so.+$/.so/; + + $self->pointed_hint('lacks-versioned-link-to-shared-library', + $item->pointer, $versioned_name) + unless defined $versioned_item; + + $self->pointed_hint( + 'ldconfig-symlink-referencing-wrong-file', + $versioned_item->pointer,'should point to', + $versioned_item->link,'instead of',$item->basename + ) + if $versioned_name ne $item->name + && defined $versioned_item + && $versioned_item->is_symlink + && $versioned_item->link ne $item->basename; + + $self->pointed_hint( + 'ldconfig-symlink-is-not-a-symlink', + $versioned_item->pointer,'should point to', + $item->name + ) + if $versioned_name ne $item->name + && defined $versioned_item + && !$versioned_item->is_symlink; + + # shlib symlink may not exist. + # if shlib doesn't _have_ a version, then $unversioned_name and + # $item->name will be equal, and it's not a development link, + # so don't complain. + $self->pointed_hint( + 'link-to-shared-library-in-wrong-package', + $installed->lookup($unversioned_name)->pointer, + $item->name + ) + if $unversioned_name ne $item->name + && defined $installed->lookup($unversioned_name); + + # If the shared library is in /lib, we have to look for + # the dev symlink in /usr/lib + $unversioned_name = "usr/$unversioned_name" + unless $item->name =~ m{^usr/}; + + my @dev_links; + for my $dev_installable (@{$self->development_packages}) { + for my $dev_item (@{$dev_installable->installed->sorted_list}) { + + next + unless $dev_item->is_symlink; + + next + unless $dev_item->name =~ m{^ usr/lib/ }x; + + # try absolute first + my $resolved = $installed->resolve_path($dev_item->link); + + # otherwise relative + $resolved + = $installed->resolve_path($dev_item->dirname . $dev_item->link) + unless defined $resolved; + + next + unless defined $resolved; + + push(@dev_links, $dev_item) + if $resolved->name eq $item->name; + } + } + + # found -dev package; library needs a symlink + $self->pointed_hint('lacks-unversioned-link-to-shared-library', + $item->pointer, "example: $unversioned_name") + if @{$self->development_packages} + && (none { $_->name =~ m{ [.]so $}x } @dev_links); + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Libraries/Shared/MultiArch.pm b/lib/Lintian/Check/Libraries/Shared/MultiArch.pm new file mode 100644 index 0000000..52c1bc5 --- /dev/null +++ b/lib/Lintian/Check/Libraries/Shared/MultiArch.pm @@ -0,0 +1,79 @@ +# libraries/shared/multi-arch -- lintian check script -*- perl -*- + +# Copyright (C) 1998 Christian Schwarz +# Copyright (C) 2018-2019 Chris Lamb <lamby@debian.org> +# Copyright (C) 2021 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Libraries::Shared::MultiArch; + +use v5.20; +use warnings; +use utf8; + +use List::SomeUtils qw(none uniq); + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +has shared_libraries => (is => 'rw', default => sub { [] }); + +sub visit_installed_files { + my ($self, $item) = @_; + + return + unless $item->is_file; + + return + unless $item->file_type =~ m{^ [^,]* \b ELF \b }x; + + return + unless $item->file_type + =~ m{(?: shared [ ] object | pie [ ] executable )}x; + + my @ldconfig_folders = @{$self->data->architectures->ldconfig_folders}; + return + if none { $item->dirname eq $_ } @ldconfig_folders; + + push(@{$self->shared_libraries}, $item->name); + + return; +} + +sub installable { + my ($self) = @_; + + $self->hint( + 'shared-library-is-multi-arch-foreign', + (sort +uniq @{$self->shared_libraries}) + ) + if @{$self->shared_libraries} + && $self->processable->fields->value('Multi-Arch') eq 'foreign'; + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Libraries/Shared/Obsolete.pm b/lib/Lintian/Check/Libraries/Shared/Obsolete.pm new file mode 100644 index 0000000..699b70c --- /dev/null +++ b/lib/Lintian/Check/Libraries/Shared/Obsolete.pm @@ -0,0 +1,56 @@ +# libraries/shared/obsolete -- lintian check script -*- perl -*- + +# Copyright (C) 2020 Mo Zhou +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Libraries::Shared::Obsolete; + +use v5.20; +use warnings; +use utf8; + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +sub visit_installed_files { + my ($self, $item) = @_; + + return + unless $item->is_file; + + return + unless $item->file_type =~ /^[^,]*\bELF\b/; + + my @needed = @{$item->elf->{NEEDED} // []}; + my @obsolete = grep { /^libcblas\.so\.\d/ } @needed; + + $self->pointed_hint('linked-with-obsolete-library', $item->pointer, $_) + for @obsolete; + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Libraries/Shared/Relocation.pm b/lib/Lintian/Check/Libraries/Shared/Relocation.pm new file mode 100644 index 0000000..8c3dac9 --- /dev/null +++ b/lib/Lintian/Check/Libraries/Shared/Relocation.pm @@ -0,0 +1,58 @@ +# libraries/shared/relocation -- lintian check script -*- perl -*- + +# Copyright (C) 1998 Christian Schwarz +# Copyright (C) 2018-2019 Chris Lamb <lamby@debian.org> +# Copyright (C) 2021 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Libraries::Shared::Relocation; + +use v5.20; +use warnings; +use utf8; + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +sub visit_installed_files { + my ($self, $item) = @_; + + return + unless $item->is_file; + + # shared library + return + unless @{$item->elf->{SONAME} // [] }; + + # Now that we're sure this is really a shared library, report on + # non-PIC problems. + $self->pointed_hint('specific-address-in-shared-library', $item->pointer) + if $item->elf->{TEXTREL}; + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Libraries/Shared/Soname.pm b/lib/Lintian/Check/Libraries/Shared/Soname.pm new file mode 100644 index 0000000..9887e3b --- /dev/null +++ b/lib/Lintian/Check/Libraries/Shared/Soname.pm @@ -0,0 +1,123 @@ +# libraries/shared/soname -- lintian check script -*- perl -*- + +# Copyright (C) 1998 Christian Schwarz and Richard Braakman +# Copyright (C) 2012 Kees Cook +# Copyright (C) 2017-2020 Chris Lamb <lamby@debian.org> +# Copyright (C) 2021 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Libraries::Shared::Soname; + +use v5.20; +use warnings; +use utf8; + +use Const::Fast; +use List::SomeUtils qw(any none uniq); + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +const my $SPACE => q{ }; +const my $SLASH => q{/}; + +has DEB_HOST_MULTIARCH => ( + is => 'rw', + lazy => 1, + default => sub { + my ($self) = @_; + + return $self->data->architectures->deb_host_multiarch; + } +); + +sub installable { + my ($self) = @_; + + return + if $self->processable->type eq 'udeb'; + + my $architecture = $self->processable->fields->value('Architecture'); + my $multiarch_component = $self->DEB_HOST_MULTIARCH->{$architecture}; + + my @common_folders = qw{lib usr/lib}; + push(@common_folders, map { "$_/$multiarch_component" } @common_folders) + if length $multiarch_component; + + my @duplicated; + for my $item (@{$self->processable->installed->sorted_list}) { + + # For the package naming check, filter out SONAMEs where all the + # files are at paths other than /lib, /usr/lib and /usr/lib/<MA-DIR>. + # This avoids false positives with plugins like Apache modules, + # which may have their own SONAMEs but which don't matter for the + # purposes of this check. + next + if none { $item->dirname eq $_ . $SLASH } @common_folders; + + # Also filter out nsswitch modules + next + if $item->basename =~ m{^ libnss_[^.]+\.so(?:\.\d+) $}x; + + push(@duplicated, @{$item->elf->{SONAME} // []}); + } + + my @sonames = uniq @duplicated; + + # try to strip transition strings + my $shortened_name = $self->processable->name; + $shortened_name =~ s/c102\b//; + $shortened_name =~ s/c2a?\b//; + $shortened_name =~ s/\dg$//; + $shortened_name =~ s/gf$//; + $shortened_name =~ s/v[5-6]$//; # GCC-5 / libstdc++6 C11 ABI breakage + $shortened_name =~ s/-udeb$//; + $shortened_name =~ s/^lib64/lib/; + + my $match_found = 0; + for my $soname (@sonames) { + + $soname =~ s/ ([0-9]) [.]so[.] /$1-/x; + $soname =~ s/ [.]so (?:[.]|\z) //x; + $soname =~ s/_/-/g; + + my $lowercase = lc $soname; + + $match_found = any { $lowercase eq $_ } + ($self->processable->name, $shortened_name); + + last + if $match_found; + } + + $self->hint('package-name-doesnt-match-sonames', + join($SPACE, sort @sonames)) + if @sonames && !$match_found; + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Libraries/Shared/Soname/Missing.pm b/lib/Lintian/Check/Libraries/Shared/Soname/Missing.pm new file mode 100644 index 0000000..a01a878 --- /dev/null +++ b/lib/Lintian/Check/Libraries/Shared/Soname/Missing.pm @@ -0,0 +1,73 @@ +# libraries/shared/soname/missing -- lintian check script -*- perl -*- + +# Copyright (C) 1998 Christian Schwarz +# Copyright (C) 2018-2019 Chris Lamb <lamby@debian.org> +# Copyright (C) 2021 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Libraries::Shared::Soname::Missing; + +use v5.20; +use warnings; +use utf8; + +use List::SomeUtils qw(none); + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +sub visit_installed_files { + my ($self, $item) = @_; + + return + unless $item->is_file; + + return + unless $item->file_type =~ m{^ [^,]* \b ELF \b }x; + + return + unless $item->file_type + =~ m{(?: shared [ ] object | pie [ ] executable )}x; + + # does not have SONAME + return + if @{$item->elf->{SONAME} // [] }; + + my @ldconfig_folders = @{$self->data->architectures->ldconfig_folders}; + return + if none { $item->dirname eq $_ } @ldconfig_folders; + + # disregard executables + $self->pointed_hint('sharedobject-in-library-directory-missing-soname', + $item->pointer) + if !$item->is_executable + || !defined $item->elf->{DEBUG} + || $item->name =~ / [.]so (?: [.] | $ ) /msx; + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Libraries/Shared/Stack.pm b/lib/Lintian/Check/Libraries/Shared/Stack.pm new file mode 100644 index 0000000..4c5a78d --- /dev/null +++ b/lib/Lintian/Check/Libraries/Shared/Stack.pm @@ -0,0 +1,61 @@ +# libraries/shared/stack -- lintian check script -*- perl -*- + +# Copyright (C) 1998 Christian Schwarz +# Copyright (C) 2018-2019 Chris Lamb <lamby@debian.org> +# Copyright (C) 2021 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Libraries::Shared::Stack; + +use v5.20; +use warnings; +use utf8; + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +sub visit_installed_files { + my ($self, $item) = @_; + + return + unless $item->is_file; + + # shared library + return + unless @{$item->elf->{SONAME} // [] }; + + $self->pointed_hint('shared-library-lacks-stack-section',$item->pointer) + if $self->processable->fields->declares('Architecture') + && !exists $item->elf->{PH}{STACK}; + + $self->pointed_hint('executable-stack-in-shared-library', $item->pointer) + if exists $item->elf->{PH}{STACK} + && $item->elf->{PH}{STACK}{flags} ne 'rw-'; + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Libraries/Shared/Trigger/Ldconfig.pm b/lib/Lintian/Check/Libraries/Shared/Trigger/Ldconfig.pm new file mode 100644 index 0000000..66f5961 --- /dev/null +++ b/lib/Lintian/Check/Libraries/Shared/Trigger/Ldconfig.pm @@ -0,0 +1,131 @@ +# libraries/shared/trigger/ldconfig -- lintian check script -*- perl -*- + +# Copyright (C) 1998 Christian Schwarz +# Copyright (C) 2018-2019 Chris Lamb <lamby@debian.org> +# Copyright (C) 2021 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Libraries::Shared::Trigger::Ldconfig; + +use v5.20; +use warnings; +use utf8; + +use List::SomeUtils qw(any uniq); + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +has soname_by_filename => ( + is => 'rw', + lazy => 1, + default => sub { + my ($self) = @_; + + my %soname_by_filename; + for my $item (@{$self->processable->installed->sorted_list}) { + + $soname_by_filename{$item->name}= $item->elf->{SONAME}[0] + if exists $item->elf->{SONAME}; + } + + return \%soname_by_filename; + } +); + +has must_call_ldconfig => (is => 'rw', default => sub { [] }); + +sub visit_installed_files { + my ($self, $item) = @_; + + my $resolved_name = $item->name; + $resolved_name = $item->link_normalized + if length $item->link; + + # Installed in a directory controlled by the dynamic + # linker? We have to strip off directories named for + # hardware capabilities. + # yes! so postinst must call ldconfig + push(@{$self->must_call_ldconfig}, $resolved_name) + if exists $self->soname_by_filename->{$resolved_name} + && $self->needs_ldconfig($item); + + return; +} + +sub installable { + my ($self) = @_; + + # determine if the package had an ldconfig trigger + my $triggers = $self->processable->control->resolve_path('triggers'); + + my $we_trigger_ldconfig = 0; + $we_trigger_ldconfig = 1 + if defined $triggers + && $triggers->decoded_utf8 + =~ /^ \s* activate-noawait \s+ ldconfig \s* $/mx; + + $self->hint('package-has-unnecessary-activation-of-ldconfig-trigger') + if !@{$self->must_call_ldconfig} + && $we_trigger_ldconfig + && $self->processable->type ne 'udeb'; + + $self->hint('lacks-ldconfig-trigger', + (sort +uniq @{$self->must_call_ldconfig})) + if @{$self->must_call_ldconfig} + && !$we_trigger_ldconfig + && $self->processable->type ne 'udeb'; + + return; +} + +sub needs_ldconfig { + my ($self, $item) = @_; + + # Libraries that should only be used in the presence of certain capabilities + # may be located in subdirectories of the standard ldconfig search path with + # one of the following names. + my $HWCAP_DIRS = $self->data->load('shared-libs/hwcap-dirs'); + my @ldconfig_folders = @{$self->data->architectures->ldconfig_folders}; + + my $dirname = $item->dirname; + my $encapsulator; + do { + $dirname =~ s{ ([^/]+) / $}{}x; + $encapsulator = $1; + + } while ($encapsulator && $HWCAP_DIRS->recognizes($encapsulator)); + + $dirname .= "$encapsulator/" if $encapsulator; + + # yes! so postinst must call ldconfig + return 1 + if any { $dirname eq $_ } @ldconfig_folders; + + return 0; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Libraries/Static.pm b/lib/Lintian/Check/Libraries/Static.pm new file mode 100644 index 0000000..72c8b97 --- /dev/null +++ b/lib/Lintian/Check/Libraries/Static.pm @@ -0,0 +1,121 @@ +# libraries/static -- lintian check script -*- perl -*- + +# Copyright (C) 1998 Christian Schwarz and Richard Braakman +# Copyright (C) 2012 Kees Cook +# Copyright (C) 2017-2020 Chris Lamb <lamby@debian.org> +# Copyright (C) 2021 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Libraries::Static; + +use v5.20; +use warnings; +use utf8; + +use Const::Fast; +use List::Compare; +use List::SomeUtils qw(any none uniq); + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +const my $SPACE => q{ }; +const my $LEFT_PARENTHESIS => q{(}; +const my $RIGHT_PARENTHESIS => q{)}; + +sub visit_installed_files { + my ($self, $item) = @_; + + return + unless $item->is_file; + + return + unless $item->file_type =~ m{ \b current [ ] ar [ ] archive \b }x; + + my @unstripped_members; + my %stripped_sections_by_member; + + for my $member_name (keys %{$item->elf_by_member}) { + + my $member_elf = $item->elf_by_member->{$member_name}; + + my @elf_sections = values %{$member_elf->{'SECTION-HEADERS'}}; + my @have_section_names = map { $_->name } @elf_sections; + + # These are the ones file(1) looks for. The ".zdebug_info" being the + # compressed version of .debug_info. + # - Technically, file(1) also looks for .symtab, but that is apparently + # not strippable for static libs. Accordingly, it is omitted below. + my @KNOWN_DEBUG_SECTION_NAMES = qw{.debug_info .zdebug_info}; + my $lc_debug = List::Compare->new(\@have_section_names, + \@KNOWN_DEBUG_SECTION_NAMES); + + my @have_debug_sections = $lc_debug->get_intersection; + + if (@have_debug_sections) { + + push(@unstripped_members, $member_name); + next; + } + + my @KNOWN_STRIPPED_SECTION_NAMES = qw{.note .comment}; + my $lc_stripped = List::Compare->new(\@have_section_names, + \@KNOWN_STRIPPED_SECTION_NAMES); + + my @have_stripped_sections = $lc_stripped->get_intersection; + + $stripped_sections_by_member{$member_name} //= []; + push( + @{$stripped_sections_by_member{$member_name}}, + @have_stripped_sections + ); + } + + $self->pointed_hint('unstripped-static-library', $item->pointer, + $LEFT_PARENTHESIS + . join($SPACE, sort +uniq @unstripped_members) + . $RIGHT_PARENTHESIS) + if @unstripped_members + && $item->name !~ m{ _g [.]a $}x; + + # "libfoo_g.a" is usually a "debug" library, so ignore + # unneeded sections in those. + for my $member (keys %stripped_sections_by_member) { + + $self->pointed_hint( + 'static-library-has-unneeded-sections', + $item->pointer, + "($member)", + join($SPACE, sort +uniq @{$stripped_sections_by_member{$member}}) + ) + if @{$stripped_sections_by_member{$member}} + && $item->name !~ m{ _g [.]a $}x; + } + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Libraries/Static/LinkTimeOptimization.pm b/lib/Lintian/Check/Libraries/Static/LinkTimeOptimization.pm new file mode 100644 index 0000000..04e65e8 --- /dev/null +++ b/lib/Lintian/Check/Libraries/Static/LinkTimeOptimization.pm @@ -0,0 +1,70 @@ +# libraries/static/link-time-optimization -- lintian check script -*- perl -*- + +# Copyright (C) 2021 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Libraries::Static::LinkTimeOptimization; + +use v5.20; +use warnings; +use utf8; + +use List::SomeUtils qw(uniq); + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +sub visit_installed_files { + my ($self, $item) = @_; + + return + unless $item->is_file; + + # not sure if that captures everything GHC, or too much + return + if $item->name =~ m{^ usr/lib/ghc/ }x; + + return + unless $item->file_type =~ m{ \b current [ ] ar [ ] archive \b }x; + + for my $member_name (keys %{$item->elf_by_member}) { + + my $member_elf = $item->elf_by_member->{$member_name}; + + my @elf_sections = values %{$member_elf->{'SECTION-HEADERS'}}; + my @section_names = map { $_->name } @elf_sections; + + my @lto_section_names = grep { m{^ [.]gnu[.]lto }x } @section_names; + + $self->pointed_hint('static-link-time-optimization', + $item->pointer, $member_name) + if @lto_section_names; + } + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Libraries/Static/Name.pm b/lib/Lintian/Check/Libraries/Static/Name.pm new file mode 100644 index 0000000..a4c47d1 --- /dev/null +++ b/lib/Lintian/Check/Libraries/Static/Name.pm @@ -0,0 +1,61 @@ +# libraries/static/name -- lintian check script -*- perl -*- + +# Copyright (C) 1998 Christian Schwarz and Richard Braakman +# Copyright (C) 2012 Kees Cook +# Copyright (C) 2017-2020 Chris Lamb <lamby@debian.org> +# Copyright (C) 2021 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Libraries::Static::Name; + +use v5.20; +use warnings; +use utf8; + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +sub visit_installed_files { + my ($self, $item) = @_; + + return + unless $item->is_file; + + return + unless $item->file_type =~ m{ \b current [ ] ar [ ] archive \b }x; + + my $shortened = $item->name; + + if ($shortened =~ s{ _s[.]a $}{.a}x) { + + $self->pointed_hint('odd-static-library-name', $item->pointer) + unless defined $self->processable->installed->lookup($shortened); + } + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Libraries/Static/NoCode.pm b/lib/Lintian/Check/Libraries/Static/NoCode.pm new file mode 100644 index 0000000..0d2415a --- /dev/null +++ b/lib/Lintian/Check/Libraries/Static/NoCode.pm @@ -0,0 +1,95 @@ +# libraries/static/no-code -- lintian check script -*- perl -*- + +# Copyright (C) 2021 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Libraries::Static::NoCode; + +use v5.20; +use warnings; +use utf8; + +use Const::Fast; +use List::SomeUtils qw(any uniq); +use Unicode::UTF8 qw(encode_utf8); + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +const my $SPACE => q{ }; + +sub visit_installed_files { + my ($self, $item) = @_; + + return + unless $item->is_file; + + # not sure if that captures everything GHC, or too much + return + if $item->name =~ m{^ usr/lib/ghc/ }x; + + return + unless $item->file_type =~ m{ \b current [ ] ar [ ] archive \b }x; + + my @codeful_members; + for my $member_name (keys %{$item->elf_by_member}) { + + my $member_elf = $item->elf_by_member->{$member_name}; + + my @elf_sections = values %{$member_elf->{'SECTION-HEADERS'}}; + my @sections_with_size = grep { $_->size > 0 } @elf_sections; + + my @names_with_size = map { $_->name } @sections_with_size; + + my @KNOWN_ARRAY_SECTIONS = qw{.preinit_array .init_array .fini_array}; + my $lc_array + = List::Compare->new(\@names_with_size, \@KNOWN_ARRAY_SECTIONS); + + my @have_array_sections = $lc_array->get_intersection; + +# adapted from https://github.com/rpm-software-management/rpmlint/blob/main/rpmlint/checks/BinariesCheck.py#L242-L249 + my $has_code = 0; + + $has_code = 1 + if any { m{^ [.]text }x } @names_with_size; + + $has_code = 1 + if any { m{^ [.]data }x } @names_with_size; + + $has_code = 1 + if @have_array_sections; + + push(@codeful_members, $member_name) + if $has_code; + } + + $self->pointed_hint('no-code-sections', $item->pointer) + unless @codeful_members; + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Linda.pm b/lib/Lintian/Check/Linda.pm new file mode 100644 index 0000000..f7dcca8 --- /dev/null +++ b/lib/Lintian/Check/Linda.pm @@ -0,0 +1,47 @@ +# linda -- lintian check script -*- perl -*- + +# Copyright (C) 1998 Christian Schwarz and Richard Braakman +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Linda; + +use v5.20; +use warnings; +use utf8; + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +sub visit_installed_files { + my ($self, $item) = @_; + + $self->pointed_hint('package-contains-linda-override', $item->pointer) + if $item->name =~ m{^usr/share/linda/overrides/\S+}; + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Lintian.pm b/lib/Lintian/Check/Lintian.pm new file mode 100644 index 0000000..abfcccc --- /dev/null +++ b/lib/Lintian/Check/Lintian.pm @@ -0,0 +1,38 @@ +# Lintian -- lintian check script (rewrite) -*- perl -*- +# +# Copyright (C) 2020 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Lintian; + +use v5.20; +use warnings; +use utf8; + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Mailcap.pm b/lib/Lintian/Check/Mailcap.pm new file mode 100644 index 0000000..2588d43 --- /dev/null +++ b/lib/Lintian/Check/Mailcap.pm @@ -0,0 +1,108 @@ +# mailcap -- lintian check script -*- perl -*- + +# Copyright (C) 2019 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Mailcap; + +use v5.20; +use warnings; +use utf8; +use autodie qw(open); + +use Const::Fast; +use List::SomeUtils qw(uniq); +use Text::Balanced qw(extract_delimited extract_multiple); + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +const my $EMPTY => q{}; + +sub visit_installed_files { + my ($self, $item) = @_; + + return + unless $item->name =~ m{^usr/lib/mime/packages/}; + + return + unless $item->is_file && $item->is_open_ok; + + open(my $fd, '<', $item->unpacked_path); + + my @continuation; + + my $position = 1; + while (my $line = <$fd>) { + + unless (@continuation) { + # skip blank lines + next + if $line =~ /^\s*$/; + + # skip comments + next + if $line =~ /^\s*#/; + } + + # continuation line + if ($line =~ s/\\$//) { + push(@continuation, {string => $line, position => $position}); + next; + } + + push(@continuation, {string => $line, position => $position}); + + my $assembled = $EMPTY; + $assembled .= $_->{string} for @continuation; + + my $start_position = $continuation[0]->{position}; + + my @quoted + = extract_multiple($assembled, + [sub { extract_delimited($_[0], q{"'}, '[^\'"]*') }], + undef, 1); + + my @placeholders = uniq grep { /\%s/ } @quoted; + + $self->pointed_hint( + 'quoted-placeholder-in-mailcap-entry', + $item->pointer($start_position), + @placeholders + )if @placeholders; + + @continuation = (); + + } continue { + ++$position; + } + + close $fd; + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/MaintainerScripts/Adduser.pm b/lib/Lintian/Check/MaintainerScripts/Adduser.pm new file mode 100644 index 0000000..f8bbea4 --- /dev/null +++ b/lib/Lintian/Check/MaintainerScripts/Adduser.pm @@ -0,0 +1,96 @@ +# maintainer_scripts::adduser -- lintian check script -*- perl -*- + +# Copyright (C) 2020 Topi Miettinen +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::MaintainerScripts::Adduser; + +use v5.20; +use warnings; +use utf8; + +use Unicode::UTF8 qw(encode_utf8); + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +sub visit_control_files { + my ($self, $item) = @_; + + # get maintainer scripts + return + unless $item->is_maintainer_script; + + return + unless $item->is_open_ok; + + open(my $fd, '<', $item->unpacked_path) + or die encode_utf8('Cannot open ' . $item->unpacked_path); + + my $continuation = undef; + + my $position = 1; + while (my $line = <$fd>) { + + chomp $line; + + # merge lines ending with '\' + if (defined $continuation) { + $line = $continuation . $line; + $continuation = undef; + } + + if ($line =~ /\\$/) { + $continuation = $line; + $continuation =~ s/\\$/ /; + next; + } + + # trim right + $line =~ s/\s+$//; + + # skip empty lines + next + if $line =~ /^\s*$/; + + # skip comments + next + if $line =~ /^[#\n]/; + + $self->pointed_hint('adduser-with-home-var-run', + $item->pointer($position)) + if $line =~ /adduser .*--home +\/var\/run/; + + } continue { + ++$position; + } + + close $fd; + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/MaintainerScripts/AncientVersion.pm b/lib/Lintian/Check/MaintainerScripts/AncientVersion.pm new file mode 100644 index 0000000..85f0f6c --- /dev/null +++ b/lib/Lintian/Check/MaintainerScripts/AncientVersion.pm @@ -0,0 +1,180 @@ +# maintainer-scripts/ancient-version -- lintian check script -*- perl -*- +# +# Copyright (C) 1998 Richard Braakman +# Copyright (C) 2002 Josip Rodin +# Copyright (C) 2016-2019 Chris Lamb <lamby@debian.org> +# Copyright (C) 2021 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::MaintainerScripts::AncientVersion; + +use v5.20; +use warnings; +use utf8; + +use Const::Fast; +use POSIX qw(strftime); +use Unicode::UTF8 qw(encode_utf8); + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +const my $EMPTY => q{}; + +# date --date="Sat, 6 Jul 2019 20:53:14 -0400" +%s +# https://lists.debian.org/debian-announce/2019/msg00003.html +const my $OLDSTABLE_RELEASE_EPOCH => 1_562_460_794; + +# 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. +const my $LEADING_PATTERN=> +'(?:(?:^|[`&;(|{])\s*|(?:if|then|do|while|!)\s+|env(?:\s+[[:alnum:]_]+=(?:\S+|\"[^"]*\"|\'[^\']*\'))*\s+)'; +const my $LEADING_REGEX => qr/$LEADING_PATTERN/; + +has old_versions => ( + is => 'rw', + lazy => 1, + default => sub { + my ($self) = @_; + + my %old_versions; + for my $entry ( + $self->processable->changelog + ? @{$self->processable->changelog->entries} + : () + ) { + my $timestamp = $entry->Timestamp // $OLDSTABLE_RELEASE_EPOCH; + $old_versions{$entry->Version} = $timestamp + if $timestamp < $OLDSTABLE_RELEASE_EPOCH; + } + + return \%old_versions; + } +); + +sub visit_control_files { + my ($self, $item) = @_; + + return + unless $item->is_maintainer_script; + + return + unless length $item->interpreter; + + return + unless $item->is_open_ok; + + open(my $fd, '<', $item->unpacked_path) + or die encode_utf8('Cannot open ' . $item->unpacked_path); + + my $stashed = $EMPTY; + + my $position = 1; + while (my $possible_continuation = <$fd>) { + + chomp $possible_continuation; + + # skip empty lines + next + if $possible_continuation =~ /^\s*$/; + + # skip comment lines + next + if $possible_continuation =~ /^\s*\#/; + + my $no_comment = remove_comments($possible_continuation); + + # Concatenate lines containing continuation character (\) + # at the end + if ($no_comment =~ s{\\$}{}) { + + $stashed .= $no_comment; + + next; + } + + my $line = $stashed . $no_comment; + $stashed = $EMPTY; + + for my $old_version (keys %{$self->old_versions}) { + + next + if $old_version =~ /^\d+$/; + + if ($line + =~m{$LEADING_REGEX(?:/usr/bin/)?dpkg\s+--compare-versions\s+.*\b\Q$old_version\E(?!\.)\b} + ) { + my $date + = strftime('%Y-%m-%d', + gmtime $self->old_versions->{$old_version}); + my $epoch + = strftime('%Y-%m-%d', gmtime $OLDSTABLE_RELEASE_EPOCH); + + my $pointer = $item->pointer($position); + + $self->pointed_hint( + 'maintainer-script-supports-ancient-package-version', + $pointer, $old_version,"($date < $epoch)", + ); + } + } + + } continue { + ++$position; + } + + return; +} + +sub remove_comments { + my ($line) = @_; + + return $line + unless length $line; + + my $simplified = $line; + + # Remove quoted strings so we can more easily ignore comments + # inside them + $simplified =~ s/(^|[^\\](?:\\\\)*)\'(?:\\.|[^\\\'])+\'/$1''/g; + $simplified =~ s/(^|[^\\](?:\\\\)*)\"(?:\\.|[^\\\"])+\"/$1""/g; + + # If the remaining string contains what looks like a comment, + # eat it. In either case, swap the unmodified script line + # back in for processing (if required) and return it. + if ($simplified =~ m/(?:^|[^[\\])[\s\&;\(\)](\#.*$)/) { + + my $comment = $1; + + # eat comment + $line =~ s/\Q$comment\E//; + } + + return $line; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/MaintainerScripts/Diversion.pm b/lib/Lintian/Check/MaintainerScripts/Diversion.pm new file mode 100644 index 0000000..e786422 --- /dev/null +++ b/lib/Lintian/Check/MaintainerScripts/Diversion.pm @@ -0,0 +1,369 @@ +# maintainer-scripts/diversion -- lintian check script -*- perl -*- +# +# Copyright (C) 1998 Richard Braakman +# Copyright (C) 2002 Josip Rodin +# Copyright (C) 2016-2019 Chris Lamb <lamby@debian.org> +# Copyright (C) 2021 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::MaintainerScripts::Diversion; + +use v5.20; +use warnings; +use utf8; + +use Const::Fast; +use List::SomeUtils qw(any none); +use Unicode::UTF8 qw(encode_utf8); + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +const my $EMPTY => q{}; + +# 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. +const my $LEADING_PATTERN=> +'(?:(?:^|[`&;(|{])\s*|(?:if|then|do|while|!)\s+|env(?:\s+[[:alnum:]_]+=(?:\S+|\"[^"]*\"|\'[^\']*\'))*\s+)'; +const my $LEADING_REGEX => qr/$LEADING_PATTERN/; + +has added_diversions => (is => 'rw', default => sub { {} }); +has removed_diversions => (is => 'rw', default => sub { {} }); +has expand_diversions => (is => 'rw', default => 0); + +sub visit_control_files { + my ($self, $item) = @_; + + return + unless $item->is_maintainer_script; + + return + unless length $item->interpreter; + + return + unless $item->is_open_ok; + + open(my $fd, '<', $item->unpacked_path) + or die encode_utf8('Cannot open ' . $item->unpacked_path); + + my $stashed = $EMPTY; + + my $position = 1; + while (my $possible_continuation = <$fd>) { + + my $pointer = $item->pointer($position); + + chomp $possible_continuation; + + # skip empty lines + next + if $possible_continuation =~ /^\s*$/; + + # skip comment lines + next + if $possible_continuation =~ /^\s*\#/; + + my $no_comment = remove_comments($possible_continuation); + + # Concatenate lines containing continuation character (\) + # at the end + if ($no_comment =~ s{\\$}{}) { + + $stashed .= $no_comment; + + next; + } + + my $line = $stashed . $no_comment; + $stashed = $EMPTY; + + if ( $line =~ m{$LEADING_REGEX(?:/usr/sbin/)?dpkg-divert\s} + && $line !~ /--(?:help|list|truename|version)/) { + + $self->pointed_hint('package-uses-local-diversion',$pointer) + if $line =~ /--local/; + + my $mode = $line =~ /--remove/ ? 'remove' : 'add'; + + my ($divert) = ($line =~ /dpkg-divert\s*(.*)$/); + + $divert =~ s{\s*(?:\$[{]?[\w:=-]+[}]?)*\s* + # options without arguments + --(?:add|quiet|remove|rename|no-rename|test|local + # options with arguments + |(?:admindir|divert|package) \s+ \S+) + \s*}{}gxsm; + + # Remove unpaired opening or closing parenthesis + 1 while ($divert =~ m/\G.*?\(.+?\)/gc); + $divert =~ s/\G(.*?)[()]/$1/; + pos($divert) = undef; + + # Remove unpaired opening or closing braces + 1 while ($divert =~ m/\G.*?{.+?}/gc); + $divert =~ s/\G(.*?)[{}]/$1/; + pos($divert) = undef; + + # position after the last pair of quotation marks, if any + 1 while ($divert =~ m/\G.*?(["']).+?\1/gc); + + # Strip anything matching and after '&&', '||', ';', or '>' + # this is safe only after we are positioned after the last pair + # of quotation marks + $divert =~ s/\G.+?\K(?: && | \|\| | ; | \d*> ).*$//x; + pos($divert) = undef; + + # Remove quotation marks, they affect: + # * our var to regex trick + # * stripping the initial slash if the path was quoted + $divert =~ s/[\"\']//g; + + # remove the leading / because it's not in the index hash + $divert =~ s{^/}{}; + + # trim both ends + $divert =~ s/^\s+|\s+$//g; + + $divert = quotemeta($divert); + + # For now just replace variables, they will later be normalised + $self->expand_diversions(1) + if $divert =~ s/\\\$\w+/.+/g; + + $self->expand_diversions(1) + if $divert =~ s/\\\$\\[{]\w+.*?\\[}]/.+/g; + + # handle $() the same way: + $self->expand_diversions(1) + if $divert =~ s/\\\$\\\(.+?\\\)/.+/g; + + my %diversion; + $diversion{script} = $item; + $diversion{position} = $position; + + $self->added_diversions->{$divert} = \%diversion + if $mode eq 'add'; + + push(@{$self->removed_diversions->{$divert}}, \%diversion) + if $mode eq 'remove'; + + die encode_utf8("mode has unknown value: $mode") + if none { $mode eq $_ } qw{add remove}; + } + + } continue { + ++$position; + } + + return; +} + +sub installable { + my ($self) = @_; + + # If any of the maintainer scripts used a variable in the file or + # diversion name normalise them all + if ($self->expand_diversions) { + + for my $divert ( + keys %{$self->removed_diversions}, + keys %{$self->added_diversions} + ) { + + # if a wider regex was found, the entries might no longer be there + next + unless exists $self->removed_diversions->{$divert} + || exists $self->added_diversions->{$divert}; + + my $widerrx = $divert; + my $wider = $widerrx; + $wider =~ s/\\//g; + + # find the widest regex: + my @matches = grep { + my $lrx = $_; + my $l = $lrx; + $l =~ s/\\//g; + + if ($wider =~ m/^$lrx$/) { + $widerrx = $lrx; + $wider = $l; + 1; + } elsif ($l =~ m/^$widerrx$/) { + 1; + } else { + 0; + } + } ( + keys %{$self->removed_diversions}, + keys %{$self->added_diversions} + ); + + # replace all the occurrences with the widest regex: + for my $k (@matches) { + + next + if $k eq $widerrx; + + if (exists $self->removed_diversions->{$k}) { + + $self->removed_diversions->{$widerrx} + = $self->removed_diversions->{$k}; + + delete $self->removed_diversions->{$k}; + } + + if (exists $self->added_diversions->{$k}) { + + $self->added_diversions->{$widerrx} + = $self->added_diversions->{$k}; + + delete $self->added_diversions->{$k}; + } + } + } + } + + for my $divert (keys %{$self->removed_diversions}) { + + if (exists $self->added_diversions->{$divert}) { + # just mark the entry, because a --remove might + # happen in two branches in the script, i.e. we + # see it twice, which is not a bug + $self->added_diversions->{$divert}{removed} = 1; + + } else { + + for my $item (@{$self->removed_diversions->{$divert}}) { + + my $script = $item->{script}; + my $position = $item->{position}; + + next + unless $script->name eq 'postrm'; + + # Allow preinst and postinst to remove diversions the + # package doesn't add to clean up after previous + # versions of the package. + + my $unquoted = unquote($divert, $self->expand_diversions); + + my $pointer = $script->pointer($position); + + $self->pointed_hint('remove-of-unknown-diversion', $pointer, + $unquoted); + } + } + } + + for my $divert (keys %{$self->added_diversions}) { + + my $script = $self->added_diversions->{$divert}{script}; + my $position = $self->added_diversions->{$divert}{position}; + + my $pointer = $script->pointer($script); + $pointer->position($position); + + my $divertrx = $divert; + my $unquoted = unquote($divert, $self->expand_diversions); + + $self->pointed_hint('orphaned-diversion', $pointer, $unquoted) + unless exists $self->added_diversions->{$divertrx}{removed}; + + # Handle man page diversions somewhat specially. We may + # divert away a man page in one section without replacing that + # same file, since we're installing a man page in a different + # section. An example is diverting a man page in section 1 + # and replacing it with one in section 1p (such as + # libmodule-corelist-perl at the time of this writing). + # + # Deal with this by turning all man page diversions into + # wildcard expressions instead that match everything in the + # same numeric section so that they'll match the files shipped + # in the package. + if ($divertrx =~ m{^(usr\\/share\\/man\\/\S+\\/.*\\\.\d)\w*(\\\.gz\z)}) + { + $divertrx = "$1.*$2"; + $self->expand_diversions(1); + } + + if ($self->expand_diversions) { + + $self->pointed_hint('diversion-for-unknown-file', $pointer, + $unquoted) + unless (any { /$divertrx/ } + @{$self->processable->installed->sorted_list}); + + } else { + $self->pointed_hint('diversion-for-unknown-file', $pointer, + $unquoted) + unless $self->processable->installed->lookup($unquoted); + } + } + + return; +} + +sub remove_comments { + my ($line) = @_; + + return $line + unless length $line; + + my $simplified = $line; + + # Remove quoted strings so we can more easily ignore comments + # inside them + $simplified =~ s/(^|[^\\](?:\\\\)*)\'(?:\\.|[^\\\'])+\'/$1''/g; + $simplified =~ s/(^|[^\\](?:\\\\)*)\"(?:\\.|[^\\\"])+\"/$1""/g; + + # If the remaining string contains what looks like a comment, + # eat it. In either case, swap the unmodified script line + # back in for processing (if required) and return it. + if ($simplified =~ m/(?:^|[^[\\])[\s\&;\(\)](\#.*$)/) { + + my $comment = $1; + + # eat comment + $line =~ s/\Q$comment\E//; + } + + return $line; +} + +sub unquote { + my ($string, $replace_regex) = @_; + + $string =~ s{\\}{}g; + + $string =~ s{\.\+}{*}g + if $replace_regex; + + return $string; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/MaintainerScripts/DpkgStatoverride.pm b/lib/Lintian/Check/MaintainerScripts/DpkgStatoverride.pm new file mode 100644 index 0000000..6b8347c --- /dev/null +++ b/lib/Lintian/Check/MaintainerScripts/DpkgStatoverride.pm @@ -0,0 +1,148 @@ +# maintainer-scripts/dpkg-statoverride -- lintian check script -*- perl -*- +# +# Copyright (C) 1998 Richard Braakman +# Copyright (C) 2002 Josip Rodin +# Copyright (C) 2016-2019 Chris Lamb <lamby@debian.org> +# Copyright (C) 2021 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::MaintainerScripts::DpkgStatoverride; + +use v5.20; +use warnings; +use utf8; + +use Const::Fast; +use Unicode::UTF8 qw(encode_utf8); + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +const my $EMPTY => q{}; + +# 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. +const my $LEADING_PATTERN=> +'(?:(?:^|[`&;(|{])\s*|(?:if|then|do|while|!)\s+|env(?:\s+[[:alnum:]_]+=(?:\S+|\"[^"]*\"|\'[^\']*\'))*\s+)'; +const my $LEADING_REGEX => qr/$LEADING_PATTERN/; + +sub visit_control_files { + my ($self, $item) = @_; + + return + unless $item->is_maintainer_script; + + return + unless length $item->interpreter; + + return + unless $item->is_open_ok; + + open(my $fd, '<', $item->unpacked_path) + or die encode_utf8('Cannot open ' . $item->unpacked_path); + + my $stashed = $EMPTY; + + my $saw_statoverride_list = 0; + + my $position = 1; + while (my $possible_continuation = <$fd>) { + + my $pointer = $item->pointer($position); + + chomp $possible_continuation; + + # skip empty lines + next + if $possible_continuation =~ /^\s*$/; + + # skip comment lines + next + if $possible_continuation =~ /^\s*\#/; + + my $no_comment = remove_comments($possible_continuation); + + # Concatenate lines containing continuation character (\) + # at the end + if ($no_comment =~ s{\\$}{}) { + + $stashed .= $no_comment; + + next; + } + + my $line = $stashed . $no_comment; + $stashed = $EMPTY; + + if ($line =~ m{$LEADING_REGEX(?:/usr/bin/)?dpkg-statoverride\s}) { + + $saw_statoverride_list = 1 + if $line =~ /--list/; + + if ($line =~ /--add/) { + + $self->pointed_hint('unconditional-use-of-dpkg-statoverride', + $pointer) + unless $saw_statoverride_list; + } + } + + } continue { + ++$position; + } + + return; +} + +sub remove_comments { + my ($line) = @_; + + return $line + unless length $line; + + my $simplified = $line; + + # Remove quoted strings so we can more easily ignore comments + # inside them + $simplified =~ s/(^|[^\\](?:\\\\)*)\'(?:\\.|[^\\\'])+\'/$1''/g; + $simplified =~ s/(^|[^\\](?:\\\\)*)\"(?:\\.|[^\\\"])+\"/$1""/g; + + # If the remaining string contains what looks like a comment, + # eat it. In either case, swap the unmodified script line + # back in for processing (if required) and return it. + if ($simplified =~ m/(?:^|[^[\\])[\s\&;\(\)](\#.*$)/) { + + my $comment = $1; + + # eat comment + $line =~ s/\Q$comment\E//; + } + + return $line; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/MaintainerScripts/Empty.pm b/lib/Lintian/Check/MaintainerScripts/Empty.pm new file mode 100644 index 0000000..298eb0a --- /dev/null +++ b/lib/Lintian/Check/MaintainerScripts/Empty.pm @@ -0,0 +1,144 @@ +# maintainer-scripts/empty -- lintian check script -*- perl -*- +# +# Copyright (C) 1998 Richard Braakman +# Copyright (C) 2002 Josip Rodin +# Copyright (C) 2016-2019 Chris Lamb <lamby@debian.org> +# Copyright (C) 2021 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::MaintainerScripts::Empty; + +use v5.20; +use warnings; +use utf8; + +use Const::Fast; +use Unicode::UTF8 qw(encode_utf8); + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +const my $EMPTY => q{}; + +sub visit_control_files { + my ($self, $item) = @_; + + return + unless $item->is_maintainer_script; + + return + unless length $item->interpreter; + + return + unless $item->is_open_ok; + + open(my $fd, '<', $item->unpacked_path) + or die encode_utf8('Cannot open ' . $item->unpacked_path); + + my $stashed = $EMPTY; + + my $has_code = 0; + + my $position = 1; + while (my $possible_continuation = <$fd>) { + + chomp $possible_continuation; + + # skip empty lines + next + if $possible_continuation =~ /^\s*$/; + + # skip comment lines + next + if $possible_continuation =~ /^\s*\#/; + + my $no_comment = remove_comments($possible_continuation); + + # Concatenate lines containing continuation character (\) + # at the end + if ($no_comment =~ s{\\$}{}) { + + $stashed .= $no_comment; + + next; + } + + my $line = $stashed . $no_comment; + $stashed = $EMPTY; + + # Don't consider the standard dh-make boilerplate to be code. This + # means ignoring the framework of a case statement, the labels, the + # echo complaining about unknown arguments, and an exit. + if ( $line !~ /^\s*set\s+-\w+\s*$/ + && $line !~ /^\s*case\s+\"?\$1\"?\s+in\s*$/ + && $line !~ /^\s*(?:[a-z|-]+|\*)\)\s*$/ + && $line !~ /^\s*[:;]+\s*$/ + && $line !~ /^\s*echo\s+\"[^\"]+\"(?:\s*>&2)?\s*$/ + && $line !~ /^\s*esac\s*$/ + && $line !~ /^\s*exit\s+\d+\s*$/) { + + $has_code = 1; + last; + } + + } continue { + ++$position; + } + + $self->pointed_hint('maintainer-script-empty', $item->pointer) + unless $has_code; + + return; +} + +sub remove_comments { + my ($line) = @_; + + return $line + unless length $line; + + my $simplified = $line; + + # Remove quoted strings so we can more easily ignore comments + # inside them + $simplified =~ s/(^|[^\\](?:\\\\)*)\'(?:\\.|[^\\\'])+\'/$1''/g; + $simplified =~ s/(^|[^\\](?:\\\\)*)\"(?:\\.|[^\\\"])+\"/$1""/g; + + # If the remaining string contains what looks like a comment, + # eat it. In either case, swap the unmodified script line + # back in for processing (if required) and return it. + if ($simplified =~ m/(?:^|[^[\\])[\s\&;\(\)](\#.*$)/) { + + my $comment = $1; + + # eat comment + $line =~ s/\Q$comment\E//; + } + + return $line; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/MaintainerScripts/Generated.pm b/lib/Lintian/Check/MaintainerScripts/Generated.pm new file mode 100644 index 0000000..bf00910 --- /dev/null +++ b/lib/Lintian/Check/MaintainerScripts/Generated.pm @@ -0,0 +1,85 @@ +# maintainer-scripts/generated -- lintian check script -*- perl -*- +# +# Copyright (C) 2020 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::MaintainerScripts::Generated; + +use v5.20; +use warnings; +use utf8; + +use List::SomeUtils qw(uniq); +use Path::Tiny; + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +sub installable { + my ($self) = @_; + + my @tools_seen; + + # get maintainer scripts + my @control + = grep { $_->is_maintainer_script } + @{$self->processable->control->sorted_list}; + + for my $file (@control) { + + my $hashbang = $file->hashbang; + next + unless length $hashbang; + + next + unless $file->is_open_ok; + + my @lines = path($file->unpacked_path)->lines; + + # scan contents + for (@lines) { + + # skip empty lines + next + if /^\s*$/; + + if (/^# Automatically added by (\S+)\s*$/) { + my $tool = $1; +# remove trailing ":" from dh_python +# https://sources.debian.org/src/dh-python/4.20191017/dhpython/debhelper.py/#L200 + $tool =~ s/:\s*$//g; + push(@tools_seen, $tool); + } + } + } + + $self->hint('debhelper-autoscript-in-maintainer-scripts', $_) + for uniq @tools_seen; + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/MaintainerScripts/Helper/Dpkg.pm b/lib/Lintian/Check/MaintainerScripts/Helper/Dpkg.pm new file mode 100644 index 0000000..ef87c40 --- /dev/null +++ b/lib/Lintian/Check/MaintainerScripts/Helper/Dpkg.pm @@ -0,0 +1,183 @@ +# maintainer-scripts/helper/dpkg -- lintian check script -*- perl -*- +# +# Copyright (C) 1998 Richard Braakman +# Copyright (C) 2002 Josip Rodin +# Copyright (C) 2016-2019 Chris Lamb <lamby@debian.org> +# Copyright (C) 2021 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::MaintainerScripts::Helper::Dpkg; + +use v5.20; +use warnings; +use utf8; + +use Const::Fast; +use List::Compare; +use Unicode::UTF8 qw(encode_utf8); + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +const my $EMPTY => q{}; + +# 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. +const my $LEADING_PATTERN=> +'(?:(?:^|[`&;(|{])\s*|(?:if|then|do|while|!)\s+|env(?:\s+[[:alnum:]_]+=(?:\S+|\"[^"]*\"|\'[^\']*\'))*\s+)'; +const my $LEADING_REGEX => qr/$LEADING_PATTERN/; + +has seen_helper_commands => (is => 'rw', default => sub { {} }); + +sub visit_control_files { + my ($self, $item) = @_; + + return + unless $item->is_maintainer_script; + + return + unless length $item->interpreter; + + return + unless $item->is_open_ok; + + open(my $fd, '<', $item->unpacked_path) + or die encode_utf8('Cannot open ' . $item->unpacked_path); + + my $stashed = $EMPTY; + + my $position = 1; + while (my $possible_continuation = <$fd>) { + + chomp $possible_continuation; + + # skip empty lines + next + if $possible_continuation =~ /^\s*$/; + + # skip comment lines + next + if $possible_continuation =~ /^\s*\#/; + + my $no_comment = remove_comments($possible_continuation); + + # Concatenate lines containing continuation character (\) + # at the end + if ($no_comment =~ s{\\$}{}) { + + $stashed .= $no_comment; + + next; + } + + my $line = $stashed . $no_comment; + $stashed = $EMPTY; + + if ($line + =~ m{$LEADING_REGEX(?:/usr/bin/)?dpkg-maintscript-helper\s(\S+)}){ + + my $command = $1; + + $self->seen_helper_commands->{$command} //= []; + push(@{$self->seen_helper_commands->{$command}}, $item->name); + } + + } continue { + ++$position; + } + + close $fd; + + return; +} + +sub installable { + my ($self) = @_; + + for my $command (keys %{$self->seen_helper_commands}) { + + # entering the loop means there is at least one member + my @have = @{$self->seen_helper_commands->{$command} // [] }; + next + unless @have; + + # dpkg-maintscript-helper(1) recommends the snippets are in all + # maintainer scripts but they are not strictly required in prerm. + my @wanted = qw{preinst postinst postrm}; + + my $lc = List::Compare->new(\@wanted, \@have); + + my @missing = $lc->get_Lonly; + + for my $name (@missing) { + + my $item = $self->processable->control->lookup($name); + + if (defined $item) { + + $self->pointed_hint('missing-call-to-dpkg-maintscript-helper', + $item->pointer, $command); + + } else { + # file does not exist + $self->hint('missing-call-to-dpkg-maintscript-helper', + $command, "[$name]"); + } + } + } + + return; +} + +sub remove_comments { + my ($line) = @_; + + return $line + unless length $line; + + my $simplified = $line; + + # Remove quoted strings so we can more easily ignore comments + # inside them + $simplified =~ s/(^|[^\\](?:\\\\)*)\'(?:\\.|[^\\\'])+\'/$1''/g; + $simplified =~ s/(^|[^\\](?:\\\\)*)\"(?:\\.|[^\\\"])+\"/$1""/g; + + # If the remaining string contains what looks like a comment, + # eat it. In either case, swap the unmodified script line + # back in for processing (if required) and return it. + if ($simplified =~ m/(?:^|[^[\\])[\s\&;\(\)](\#.*$)/) { + + my $comment = $1; + + # eat comment + $line =~ s/\Q$comment\E//; + } + + return $line; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/MaintainerScripts/Killall.pm b/lib/Lintian/Check/MaintainerScripts/Killall.pm new file mode 100644 index 0000000..2c3dd09 --- /dev/null +++ b/lib/Lintian/Check/MaintainerScripts/Killall.pm @@ -0,0 +1,131 @@ +# maintainer-scripts/killall -- lintian check script -*- perl -*- +# +# Copyright (C) 1998 Richard Braakman +# Copyright (C) 2002 Josip Rodin +# Copyright (C) 2016-2019 Chris Lamb <lamby@debian.org> +# Copyright (C) 2021 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::MaintainerScripts::Killall; + +use v5.20; +use warnings; +use utf8; + +use Const::Fast; +use Unicode::UTF8 qw(encode_utf8); + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +const my $EMPTY => q{}; + +sub visit_control_files { + my ($self, $item) = @_; + + return + unless $item->is_maintainer_script; + + return + unless length $item->interpreter; + + return + unless $item->is_open_ok; + + open(my $fd, '<', $item->unpacked_path) + or die encode_utf8('Cannot open ' . $item->unpacked_path); + + my $stashed = $EMPTY; + + my $position = 1; + while (my $possible_continuation = <$fd>) { + + my $pointer = $item->pointer($position); + + chomp $possible_continuation; + + # skip empty lines + next + if $possible_continuation =~ /^\s*$/; + + # skip comment lines + next + if $possible_continuation =~ /^\s*\#/; + + my $no_comment = remove_comments($possible_continuation); + + # Concatenate lines containing continuation character (\) + # at the end + if ($no_comment =~ s{\\$}{}) { + + $stashed .= $no_comment; + + next; + } + + my $line = $stashed . $no_comment; + $stashed = $EMPTY; + + $self->pointed_hint('killall-is-dangerous', $pointer) + if $line =~ /^\s*killall(?:\s|\z)/; + + } continue { + ++$position; + } + + close $fd; + + return; +} + +sub remove_comments { + my ($line) = @_; + + return $line + unless length $line; + + my $simplified = $line; + + # Remove quoted strings so we can more easily ignore comments + # inside them + $simplified =~ s/(^|[^\\](?:\\\\)*)\'(?:\\.|[^\\\'])+\'/$1''/g; + $simplified =~ s/(^|[^\\](?:\\\\)*)\"(?:\\.|[^\\\"])+\"/$1""/g; + + # If the remaining string contains what looks like a comment, + # eat it. In either case, swap the unmodified script line + # back in for processing (if required) and return it. + if ($simplified =~ m/(?:^|[^[\\])[\s\&;\(\)](\#.*$)/) { + + my $comment = $1; + + # eat comment + $line =~ s/\Q$comment\E//; + } + + return $line; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/MaintainerScripts/Ldconfig.pm b/lib/Lintian/Check/MaintainerScripts/Ldconfig.pm new file mode 100644 index 0000000..22e64d2 --- /dev/null +++ b/lib/Lintian/Check/MaintainerScripts/Ldconfig.pm @@ -0,0 +1,60 @@ +# maintainer-scripts/ldconfig -- lintian check script -*- perl -*- + +# Copyright (C) 1998 Christian Schwarz +# Copyright (C) 2018-2019 Chris Lamb <lamby@debian.org> +# Copyright (C) 2021 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::MaintainerScripts::Ldconfig; + +use v5.20; +use warnings; +use utf8; + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +sub visit_control_files { + my ($self, $item) = @_; + + return + unless $item->is_maintainer_script; + + return + unless $item->decoded_utf8 =~ /^ [^\#]* \b ldconfig \b /mx; + + $self->pointed_hint('udeb-postinst-calls-ldconfig', $item->pointer) + if $item->name eq 'postinst' + && $self->processable->type eq 'udeb'; + + $self->pointed_hint('maintscript-calls-ldconfig', $item->pointer) + if $item->name ne 'postinst' + || $self->processable->type ne 'udeb'; + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/MaintainerScripts/Mknod.pm b/lib/Lintian/Check/MaintainerScripts/Mknod.pm new file mode 100644 index 0000000..e7269ea --- /dev/null +++ b/lib/Lintian/Check/MaintainerScripts/Mknod.pm @@ -0,0 +1,131 @@ +# maintainer-scripts/mknod -- lintian check script -*- perl -*- +# +# Copyright (C) 1998 Richard Braakman +# Copyright (C) 2002 Josip Rodin +# Copyright (C) 2016-2019 Chris Lamb <lamby@debian.org> +# Copyright (C) 2021 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::MaintainerScripts::Mknod; + +use v5.20; +use warnings; +use utf8; + +use Const::Fast; +use Unicode::UTF8 qw(encode_utf8); + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +const my $EMPTY => q{}; + +sub visit_control_files { + my ($self, $item) = @_; + + return + unless $item->is_maintainer_script; + + return + unless length $item->interpreter; + + return + unless $item->is_open_ok; + + open(my $fd, '<', $item->unpacked_path) + or die encode_utf8('Cannot open ' . $item->unpacked_path); + + my $stashed = $EMPTY; + + my $position = 1; + while (my $possible_continuation = <$fd>) { + + my $pointer = $item->pointer($position); + + chomp $possible_continuation; + + # skip empty lines + next + if $possible_continuation =~ /^\s*$/; + + # skip comment lines + next + if $possible_continuation =~ /^\s*\#/; + + my $no_comment = remove_comments($possible_continuation); + + # Concatenate lines containing continuation character (\) + # at the end + if ($no_comment =~ s{\\$}{}) { + + $stashed .= $no_comment; + + next; + } + + my $line = $stashed . $no_comment; + $stashed = $EMPTY; + + $self->pointed_hint('mknod-in-maintainer-script', $pointer) + if $line =~ /^\s*mknod(?:\s|\z)/ && $line !~ /\sp\s/; + + } continue { + ++$position; + } + + close $fd; + + return; +} + +sub remove_comments { + my ($line) = @_; + + return $line + unless length $line; + + my $simplified = $line; + + # Remove quoted strings so we can more easily ignore comments + # inside them + $simplified =~ s/(^|[^\\](?:\\\\)*)\'(?:\\.|[^\\\'])+\'/$1''/g; + $simplified =~ s/(^|[^\\](?:\\\\)*)\"(?:\\.|[^\\\"])+\"/$1""/g; + + # If the remaining string contains what looks like a comment, + # eat it. In either case, swap the unmodified script line + # back in for processing (if required) and return it. + if ($simplified =~ m/(?:^|[^[\\])[\s\&;\(\)](\#.*$)/) { + + my $comment = $1; + + # eat comment + $line =~ s/\Q$comment\E//; + } + + return $line; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/MaintainerScripts/Systemctl.pm b/lib/Lintian/Check/MaintainerScripts/Systemctl.pm new file mode 100644 index 0000000..c5e1654 --- /dev/null +++ b/lib/Lintian/Check/MaintainerScripts/Systemctl.pm @@ -0,0 +1,76 @@ +# masitainer-scripts/systemctl -- lintian check script -*- perl -*- +# +# Copyright (C) 2013 Michael Stapelberg +# Copyright (C) 2016-2020 Chris Lamb <lamby@debian.org> +# Copyright (C) 2021 Felix Lechner +# +# based on the apache2 checks file by: +# Copyright (C) 2012 Arno Toell +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::MaintainerScripts::Systemctl; + +use v5.20; +use warnings; +use utf8; + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +sub visit_control_files { + my ($self, $item) = @_; + + return + unless $item->is_maintainer_script; + + # look only at shell scripts + return + unless $item->hashbang =~ /^\S*sh\b/; + + my @lines = split(/\n/, $item->decoded_utf8); + + my $position = 1; + for my $line (@lines) { + + next + if $line =~ /^#/; + + my $pointer = $item->pointer($position); + + # systemctl should not be called in maintainer scripts at all, + # except for systemctl daemon-reload calls. + $self->pointed_hint('maintainer-script-calls-systemctl', $pointer) + if $line =~ /^(?:.+;)?\s*systemctl\b/ + && $line !~ /daemon-reload/; + + } continue { + ++$position; + } + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/MaintainerScripts/TemporaryFiles.pm b/lib/Lintian/Check/MaintainerScripts/TemporaryFiles.pm new file mode 100644 index 0000000..f6d1164 --- /dev/null +++ b/lib/Lintian/Check/MaintainerScripts/TemporaryFiles.pm @@ -0,0 +1,144 @@ +# maintainer-scripts/temporary-files -- lintian check script -*- perl -*- +# +# Copyright (C) 1998 Richard Braakman +# Copyright (C) 2002 Josip Rodin +# Copyright (C) 2016-2019 Chris Lamb <lamby@debian.org> +# Copyright (C) 2021 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::MaintainerScripts::TemporaryFiles; + +use v5.20; +use warnings; +use utf8; + +use Const::Fast; +use Unicode::UTF8 qw(encode_utf8); + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +const my $EMPTY => q{}; + +sub visit_control_files { + my ($self, $item) = @_; + + return + unless $item->is_maintainer_script; + + return + unless length $item->interpreter; + + return + unless $item->is_open_ok; + + open(my $fd, '<', $item->unpacked_path) + or die encode_utf8('Cannot open ' . $item->unpacked_path); + + my $stashed = $EMPTY; + + my $position = 1; + while (my $possible_continuation = <$fd>) { + + my $pointer = $item->pointer($position); + + chomp $possible_continuation; + + # skip empty lines + next + if $possible_continuation =~ /^\s*$/; + + # skip comment lines + next + if $possible_continuation =~ /^\s*\#/; + + my $no_comment = remove_comments($possible_continuation); + + # Concatenate lines containing continuation character (\) + # at the end + if ($no_comment =~ s{\\$}{}) { + + $stashed .= $no_comment; + + next; + } + + my $line = $stashed . $no_comment; + $stashed = $EMPTY; + + if ($line =~ m{ \W ( (?:/var)?/tmp | \$TMPDIR /[^)\]\}\s]+ ) }x) { + + my $indicator = $1; + + $self->pointed_hint( + 'possibly-insecure-handling-of-tmp-files-in-maintainer-script', + $pointer, + $indicator + ) + if $line !~ /\bmks?temp\b/ + && $line !~ /\btempfile\b/ + && $line !~ /\bmkdir\b/ + && $line !~ /\bXXXXXX\b/ + && $line !~ /\$RANDOM/; + } + + } continue { + ++$position; + } + + close $fd; + + return; +} + +sub remove_comments { + my ($line) = @_; + + return $line + unless length $line; + + my $simplified = $line; + + # Remove quoted strings so we can more easily ignore comments + # inside them + $simplified =~ s/(^|[^\\](?:\\\\)*)\'(?:\\.|[^\\\'])+\'/$1''/g; + $simplified =~ s/(^|[^\\](?:\\\\)*)\"(?:\\.|[^\\\"])+\"/$1""/g; + + # If the remaining string contains what looks like a comment, + # eat it. In either case, swap the unmodified script line + # back in for processing (if required) and return it. + if ($simplified =~ m/(?:^|[^[\\])[\s\&;\(\)](\#.*$)/) { + + my $comment = $1; + + # eat comment + $line =~ s/\Q$comment\E//; + } + + return $line; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Md5sums.pm b/lib/Lintian/Check/Md5sums.pm new file mode 100644 index 0000000..c62d9cd --- /dev/null +++ b/lib/Lintian/Check/Md5sums.pm @@ -0,0 +1,133 @@ +# md5sums -- lintian check script -*- perl -*- + +# Copyright (C) 1998 Christian Schwarz and Richard Braakman +# Copyright (C) 2020 Felix Lechner +# Copyright (C) 2018, 2020 Chris Lamb <lamby@debian.org> +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Md5sums; + +use v5.20; +use warnings; +use utf8; + +use List::Compare; +use Path::Tiny; + +use Lintian::Util qw(read_md5sums drop_relative_prefix); + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +has only_conffiles => (is => 'rw', default => 1); + +sub visit_installed_files { + my ($self, $item) = @_; + + # check if package contains non-conffiles + # debhelper doesn't create entries in md5sums + # for conffiles since this information would + # be redundant + + # Skip non-files, they will not appear in the md5sums file + return + unless $item->is_regular_file; + + $self->only_conffiles(0) + unless $self->processable->declared_conffiles->is_known($item->name); + + return; +} + +sub binary { + my ($self) = @_; + + my $control = $self->processable->control->lookup('md5sums'); + unless (defined $control) { + + # ignore if package contains no files + return + unless @{$self->processable->installed->sorted_list}; + + $self->hint('no-md5sums-control-file') + unless $self->only_conffiles; + + return; + } + + # The md5sums file should not be a symlink. If it is, the best + # we can do is to leave it alone. + return + if $control->is_symlink; + + return + unless $control->is_open_ok; + + # Is it empty? Then skip it. Tag will be issued by control-files + return + if $control->size == 0; + + my $text = $control->bytes; + + my ($md5sums, $errors) = read_md5sums($text); + + $self->pointed_hint('malformed-md5sums-control-file',$control->pointer, $_) + for @{$errors}; + + my %noprefix + = map { drop_relative_prefix($_) => $md5sums->{$_} } keys %{$md5sums}; + + my @listed = keys %noprefix; + my @found + = grep { $_->is_file} @{$self->processable->installed->sorted_list}; + + my $lc = List::Compare->new(\@listed, \@found); + + # find files that should exist but do not + $self->pointed_hint('md5sums-lists-nonexistent-file',$control->pointer, $_) + for $lc->get_Lonly; + + # find files that should be listed but are not + for my $name ($lc->get_Ronly) { + + $self->pointed_hint('file-missing-in-md5sums', $control->pointer,$name) + unless $self->processable->declared_conffiles->is_known($name) + || $name =~ m{^var/lib/[ai]spell/.}; + } + + # checksum should match for common files + for my $name ($lc->get_intersection) { + + my $item = $self->processable->installed->lookup($name); + + $self->pointed_hint('md5sum-mismatch', $control->pointer, $name) + unless $item->md5sum eq $noprefix{$name}; + } + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/MenuFormat.pm b/lib/Lintian/Check/MenuFormat.pm new file mode 100644 index 0000000..c9d40a8 --- /dev/null +++ b/lib/Lintian/Check/MenuFormat.pm @@ -0,0 +1,907 @@ +# menu format -- lintian check script -*- perl -*- + +# Copyright (C) 1998 by Joey Hess +# Copyright (C) 2017-2018 Chris Lamb <lamby@debian.org> +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +# This script also checks desktop entries, since they share quite a bit of +# code. At some point, it would make sense to try to refactor this so that +# shared code is in libraries. +# +# Further things that the desktop file validation should be checking: +# +# - Encoding of the file should be UTF-8. +# - Additional Categories should be associated with Main Categories. +# - List entries (MimeType, Categories) should end with a semicolon. +# - Check for GNOME/GTK/X11/etc. dependencies and require the relevant +# Additional Category to be present. +# - Check all the escape characters supported by Exec. +# - Review desktop-file-validate to see what else we're missing. + +package Lintian::Check::MenuFormat; + +use v5.20; +use warnings; +use utf8; + +use Const::Fast; +use File::Basename; +use List::SomeUtils qw(any first_value); +use Unicode::UTF8 qw(encode_utf8); + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +const my $EMPTY => q{}; +const my $SPACE => q{ }; +const my $SLASH => q{/}; + +const my $MAXIMUM_SIZE_STANDARD_ICON => 32; +const my $MAXIMUM_SIZE_32X32_ICON => 32; +const my $MAXIMUM_SIZE_16X16_ICON => 16; + +# This is a list of all tags that should be in every menu item. +my @req_tags = qw(needs section title command); + +# This is a list of all known tags. +my @known_tags = qw( + needs + section + title + sort + command + longtitle + icon + icon16x16 + icon32x32 + description + hotkey + hints +); + +# These 'needs' tags are always valid, no matter the context, and no other +# values are valid outside the Window Managers context (don't include wm here, +# in other words). It's case insensitive, use lower case here. +my @needs_tag_vals = qw(x11 text vc); + +has MENU_SECTIONS => ( + is => 'rw', + lazy => 1, + default => sub { + my ($self) = @_; + + my %menu_sections; + + my $data = $self->data->load('menu-format/menu-sections'); + + for my $key ($data->all) { + + my ($root, $under) = split(m{/}, $key, 2); + + $under //= $EMPTY; + + # $under is empty if this is just a root section + $menu_sections{$root}{$under} = 1; + } + + return \%menu_sections; + } +); + +# Authoritative source of desktop keys: +# https://specifications.freedesktop.org/desktop-entry-spec/latest/ +# +# This is a list of all keys that should be in every desktop entry. +my @req_desktop_keys = qw(Type Name); + +# This is a list of all known keys. +has KNOWN_DESKTOP_KEYS => ( + is => 'rw', + lazy => 1, + default => sub { + my ($self) = @_; + + return $self->data->load('menu-format/known-desktop-keys'); + } +); + +has DEPRECATED_DESKTOP_KEYS => ( + is => 'rw', + lazy => 1, + default => sub { + my ($self) = @_; + + return $self->data->load('menu-format/deprecated-desktop-keys'); + } +); + +# KDE uses some additional keys that should start with X-KDE but don't for +# historical reasons. +has KDE_DESKTOP_KEYS => ( + is => 'rw', + lazy => 1, + default => sub { + my ($self) = @_; + + return $self->data->load('menu-format/kde-desktop-keys'); + } +); + +# Known types of desktop entries. +# https://specifications.freedesktop.org/desktop-entry-spec/latest/ar01s06.html +my %known_desktop_types = map { $_ => 1 } qw( + Application + Link + Directory +); + +# Authoritative source of desktop categories: +# https://specifications.freedesktop.org/menu-spec/latest/apa.html + +# This is a list of all Main Categories for .desktop files. Application is +# added as an exception; it's not listed in the standard, but it's widely used +# and used as an example in the GNOME documentation. GNUstep is added as an +# exception since it's used by GNUstep packages. +my %main_categories = map { $_ => 1 } qw( + AudioVideo + Audio + Video + Development + Education + Game + Graphics + Network + Office + Science + Settings + System + Utility + Application + GNUstep +); + +# This is a list of all Additional Categories for .desktop files. Ideally we +# should be checking to be sure the associated Main Categories are present, +# but we don't have support for that yet. +has ADD_CATEGORIES => ( + is => 'rw', + lazy => 1, + default => sub { + my ($self) = @_; + + return $self->data->load('menu-format/add-categories'); + } +); + +# This is a list of Reserved Categories for .desktop files. To use one of +# these, the desktop entry must also have an OnlyShowIn key limiting the +# environment to one that supports this category. +my %reserved_categories = map { $_ => 1 } qw( + Screensaver + TrayIcon + Applet + Shell +); + +# Path in which to search for binaries referenced in menu entries. These must +# not have leading slashes. +my @path = qw(usr/local/bin/ usr/bin/ bin/ usr/games/); + +my %known_tags_hash = map { $_ => 1 } @known_tags; +my %needs_tag_vals_hash = map { $_ => 1 } @needs_tag_vals; + +# ----------------------------------- + +sub installable { + my ($self) = @_; + + my $index = $self->processable->installed; + + my (@menufiles, %desktop_cmds); + for my $dirname (qw(usr/share/menu/ usr/lib/menu/)) { + if (my $dir = $index->resolve_path($dirname)) { + push(@menufiles, $dir->children); + } + } + + # Find the desktop files in the package for verification. + my @desktop_files; + for my $subdir (qw(applications xsessions)) { + if (my $dir = $index->lookup("usr/share/$subdir/")) { + for my $item ($dir->children) { + next + unless $item->is_file; + + next + if $item->is_dir; + + next + unless $item->basename =~ /\.desktop$/; + + $self->pointed_hint('executable-desktop-file', $item->pointer, + $item->octal_permissions) + if $item->is_executable; + + push(@desktop_files, $item) + unless $item->name =~ / template /msx; + } + } + } + + # Verify all the desktop files. + for my $desktop_file (@desktop_files) { + $self->verify_desktop_file($desktop_file, \%desktop_cmds); + } + + # Now all the menu files. + for my $menufile (@menufiles) { + # Do not try to parse executables + next if $menufile->is_executable or not $menufile->is_open_ok; + + # README is a special case + next if $menufile->basename eq 'README' && !$menufile->is_dir; + my $menufile_line =$EMPTY; + + open(my $fd, '<', $menufile->unpacked_path) + or die encode_utf8('Cannot open ' . $menufile->unpacked_path); + + # line below is commented out in favour of the while loop + # do { $_=<IN>; } while defined && (m/^\s* \#/ || m/^\s*$/); + while (my $line = <$fd>) { + if ($line =~ /^\s*\#/ || $line =~ /^\s*$/) { + next; + + } else { + $menufile_line = $line; + last; + } + } + + # Check first line of file to see if it matches the new menu + # file format. + if ($menufile_line =~ m/^!C\s*menu-2/) { + # we can't parse that yet + close($fd); + next; + } + + # Parse entire file as a new format menu file. + my $line=$EMPTY; + my $lc=0; + do { + $lc++; + + # Ignore lines that are comments. + if ($menufile_line =~ m/^\s*\#/) { + next; + } + $line .= $menufile_line; + # Note that I allow whitespace after the continuation character. + # This is caught by verify_line(). + if (!($menufile_line =~ m/\\\s*?$/)) { + $self->verify_line($menufile, $line,$lc,\%desktop_cmds); + $line=$EMPTY; + } + } while ($menufile_line = <$fd>); + $self->verify_line($menufile, $line,$lc,\%desktop_cmds); + + close($fd); + } + + return; +} + +# ----------------------------------- + +# Pass this a line of a menu file, it sanitizes it and +# verifies that it is correct. +sub verify_line { + my ($self, $menufile, $line, $position,$desktop_cmds) = @_; + + my $pointer = $menufile->pointer($position); + my %vals; + + chomp $line; + + # Replace all line continuation characters with whitespace. + # (do not remove them completely, because update-menus doesn't) + $line =~ s/\\\n/ /mg; + + # This is in here to fix a common mistake: whitespace after a '\' + # character. + if ($line =~ s/\\\s+\n/ /mg) { + $self->pointed_hint('whitespace-after-continuation-character', + $pointer); + } + + # Ignore lines that are all whitespace or empty. + return if $line =~ m/^\s*$/; + + # Ignore lines that are comments. + return if $line =~ m/^\s*\#/; + + # Start by testing the package check. + if (not $line =~ m/^\?package\((.*?)\):/) { + $self->pointed_hint('bad-test-in-menu-item', $pointer); + return; + } + my $pkg_test = $1; + my %tested_packages = map { $_ => 1 } split(/\s*,\s*/, $pkg_test); + my $tested_packages = scalar keys %tested_packages; + unless (exists $tested_packages{$self->processable->name}) { + $self->pointed_hint('pkg-not-in-package-test', $pointer, $pkg_test); + } + $line =~ s/^\?package\(.*?\)://; + + # Now collect all the tag=value pairs. I've heavily commented + # the killer regexp that's responsible. + # + # The basic idea here is we start at the beginning of the line. + # Each loop pulls off one tag=value pair and advances to the next + # when we have no more matches, there should be no text left on + # the line - if there is, it's a parse error. + while ( + $line =~ m{ + \s*? # allow whitespace between pairs + ( # capture what follows in $1, it's our tag + [^\"\s=] # a non-quote, non-whitespace, character + * # match as many as we can + ) + = + ( # capture what follows in $2, it's our value + (?: + \" # this is a quoted string + (?: + \\. # any quoted character + | # or + [^\"] # a non-quote character + ) + * # repeat as many times as possible + \" # end of the quoted value string + ) + | # the other possibility is a non-quoted string + (?: + [^\"\s] # a non-quote, non-whitespace character + * # match as many times as we can + ) + ) + }gcx + ) { + my $tag = $1; + my $value = $2; + + if (exists $vals{$tag}) { + $self->pointed_hint('duplicate-tag-in-menu', $pointer, $1); + } + + # If the value was quoted, remove those quotes. + if ($value =~ m/^\"(.*)\"$/) { + $value = $1; + } else { + $self->pointed_hint('unquoted-string-in-menu-item',$pointer, $1); + } + + # If the value has escaped characters, remove the + # escapes. + $value =~ s/\\(.)/$1/g; + + $vals{$tag} = $value; + } + + # This is not really a no-op. Note the use of the /c + # switch - this makes perl keep track of the current + # search position. Notice, we did it above in the loop, + # too. (I have a /g here just so the /c takes affect.) + # We use this below when we look at how far along in the + # string we matched. So the point of this line is to allow + # trailing whitespace on the end of a line. + $line =~ m/\s*/gc; + + # If that loop didn't match up to end of line, we have a + # problem.. + if (pos($line) < length($line)) { + $self->pointed_hint('unparsable-menu-item', $pointer); + # Give up now, before things just blow up in our face. + return; + } + + # Now validate the data in the menu file. + + # Test for important tags. + for my $tag (@req_tags) { + unless (exists($vals{$tag}) && defined($vals{$tag})) { + $self->pointed_hint('menu-item-missing-required-tag', + $pointer, $tag); + # Just give up right away, if such an essential tag is missing, + # chance is high the rest doesn't make sense either. And now all + # following checks can assume those tags to be there + return; + } + } + + # Make sure all tags are known. + for my $tag (keys %vals) { + if (!$known_tags_hash{$tag}) { + $self->pointed_hint('menu-item-contains-unknown-tag', + $pointer, $tag); + } + } + + # Sanitize the section tag + my $section = $vals{'section'}; + $section =~ tr:/:/:s; # eliminate duplicate slashes. # Hallo emacs ;; + $section =~ s{/$}{} # remove trailing slash + unless $section eq $SLASH; # - except if $section is '/' + + # Be sure the command is provided by the package. + my ($okay, $command) + = $self->verify_cmd($pointer, $vals{'command'}); + + $self->pointed_hint('menu-command-not-in-package', $pointer, $command) + if !$okay + && length $command + && $tested_packages < 2 + && $section !~ m{^(?:WindowManagers/Modules|FVWM Modules|Window Maker)}; + + if (length $command) { + $command =~ s{^(?:usr/)?s?bin/}{}; + $command =~ s{^usr/games/}{}; + + $self->pointed_hint('command-in-menu-file-and-desktop-file', + $pointer, $command) + if $desktop_cmds->{$command}; + } + + $self->verify_icon('icon', $vals{'icon'},$MAXIMUM_SIZE_STANDARD_ICON, + $pointer); + $self->verify_icon('icon32x32', $vals{'icon32x32'}, + $MAXIMUM_SIZE_32X32_ICON, $pointer); + $self->verify_icon('icon16x16', $vals{'icon16x16'}, + $MAXIMUM_SIZE_16X16_ICON, $pointer); + + # needs is case insensitive + my $needs = lc($vals{'needs'}); + + if ($section =~ m{^(WindowManagers/Modules|FVWM Modules|Window Maker)}) { + # WM/Modules: needs must not be the regular ones nor wm + $self->pointed_hint('non-wm-module-in-wm-modules-menu-section', + $pointer, $needs) + if $needs_tag_vals_hash{$needs} || $needs eq 'wm'; + + } elsif ($section =~ m{^Window ?Managers}) { + # Other WM sections: needs must be wm + $self->pointed_hint('non-wm-in-windowmanager-menu-section', + $pointer, $needs) + unless $needs eq 'wm'; + + } else { + # Any other section: just only the general ones + if ($needs eq 'dwww') { + $self->pointed_hint('menu-item-needs-dwww', $pointer); + + } elsif (!$needs_tag_vals_hash{$needs}) { + $self->pointed_hint('menu-item-needs-tag-has-unknown-value', + $pointer, $needs); + } + } + + # Check the section tag + # Check for historical changes in the section tree. + if ($section =~ m{^Apps/Games}) { + $self->pointed_hint('menu-item-uses-apps-games-section', $pointer); + $section =~ s{^Apps/}{}; + } + + if ($section =~ m{^Apps/}) { + $self->pointed_hint('menu-item-uses-apps-section', $pointer); + $section =~ s{^Apps/}{Applications/}; + } + + if ($section =~ m{^WindowManagers}) { + $self->pointed_hint('menu-item-uses-windowmanagers-section', $pointer); + $section =~ s{^WindowManagers}{Window Managers}; + } + + # Check for Evil new root sections. + my ($rootsec, $sect) = split(m{/}, $section, 2); + + my $root_data = $self->MENU_SECTIONS->{$rootsec}; + + if (!defined $root_data) { + + my $pkg = $self->processable->name; + $self->pointed_hint('menu-item-creates-new-root-section', + $pointer, $rootsec) + unless $rootsec =~ /$pkg/i; + + } else { + + $self->pointed_hint('menu-item-creates-new-section', + $pointer, $vals{section}) + if (length $sect && !exists $root_data->{$sect}) + || (!length $sect && !exists $root_data->{$EMPTY}); + } + + return; +} + +sub verify_icon { + my ($self, $tag, $name, $size, $pointer)= @_; + + return + unless length $name; + + if ($name eq 'none') { + + $self->pointed_hint('menu-item-uses-icon-none', $pointer, $tag); + return; + } + + $self->pointed_hint('menu-icon-uses-relative-path', $pointer, $tag, $name) + unless $name =~ s{^/+}{}; + + if ($name !~ /\.xpm$/i) { + + $self->pointed_hint('menu-icon-not-in-xpm-format', + $pointer, $tag, $name); + return; + } + + my @packages = ( + $self->processable, + @{ $self->group->direct_dependencies($self->processable) } + ); + + my @candidates; + for my $processable (@packages) { + + push(@candidates, $processable->installed->resolve_path($name)); + push(@candidates, + $processable->installed->resolve_path("usr/share/pixmaps/$name")); + } + + my $iconfile = first_value { defined } @candidates; + + if (!defined $iconfile || !$iconfile->is_open_ok) { + + $self->pointed_hint('menu-icon-missing', $pointer, $tag, $name); + return; + } + + open(my $fd, '<', $iconfile->unpacked_path) + or die encode_utf8('Cannot open ' . $iconfile->unpacked_path); + + my $parse = 'XPM header'; + + my $line; + do { defined($line = <$fd>) or goto PARSE_ERROR; } + until ($line =~ /\/\*\s*XPM\s*\*\//); + + $parse = 'size line'; + + do { defined($line = <$fd>) or goto PARSE_ERROR; } + until ($line =~ /"\s*([0-9]+)\s*([0-9]+)\s*(?:[0-9]+)\s*(?:[0-9]+)\s*"/); + my $width = $1 + 0; + my $height = $2 + 0; + + if ($width > $size || $height > $size) { + $self->pointed_hint('menu-icon-too-big', $pointer, $tag, + "$name: ${width}x${height} > ${size}x${size}"); + } + + close($fd); + + return; + + PARSE_ERROR: + close($fd); + $self->pointed_hint('menu-icon-cannot-be-parsed', $pointer, $tag, + "$name: looking for $parse"); + + return; +} + +# Syntax-checks a .desktop file. +sub verify_desktop_file { + my ($self, $item, $desktop_cmds) = @_; + + my ($saw_first, $warned_cr, %vals, @pending); + open(my $fd, '<', $item->unpacked_path) + or die encode_utf8('Cannot open ' . $item->unpacked_path); + + my $position = 1; + while (my $line = <$fd>) { + + chomp $line; + + my $pointer = $item->pointer($position); + + next + if $line =~ /^\s*\#/ || $line =~ /^\s*$/; + + if ($line =~ s/\r//) { + $self->pointed_hint('desktop-entry-file-has-crs', $pointer) + unless $warned_cr; + $warned_cr = 1; + } + + # Err on the side of caution for now. If the first non-comment line + # is not the required [Desktop Entry] group, ignore this file. Also + # ignore any keys in other groups. + last + if $saw_first && $line =~ /^\[(.*)\]\s*$/; + + unless ($saw_first) { + return + unless $line =~ /^\[(KDE )?Desktop Entry\]\s*$/; + $saw_first = 1; + $self->pointed_hint('desktop-contains-deprecated-key', $pointer) + if $line =~ /^\[KDE Desktop Entry\]\s*$/; + } + + # Tag = Value. For most errors, just add the error to pending rather + # than warning on it immediately since we want to not warn on tag + # errors if we didn't know the file type. + # + # TODO: We do not check for properly formatted localised values for + # keys but might be worth checking if they are properly formatted (not + # their value) + if ($line =~ /^(.*?)\s*=\s*(.*)$/) { + my ($tag, $value) = ($1, $2); + my $basetag = $tag; + $basetag =~ s/\[([^\]]+)\]$//; + if (exists $vals{$tag}) { + $self->pointed_hint('duplicate-key-in-desktop', $pointer,$tag); + } elsif ($self->DEPRECATED_DESKTOP_KEYS->recognizes($basetag)) { + if ($basetag eq 'Encoding') { + push(@pending, + ['desktop-entry-contains-encoding-key',$pointer, $tag] + ); + } else { + push( + @pending, + [ + 'desktop-entry-contains-deprecated-key', + $pointer, $tag + ] + ); + } + } elsif (not $self->KNOWN_DESKTOP_KEYS->recognizes($basetag) + and not $self->KDE_DESKTOP_KEYS->recognizes($basetag) + and not $basetag =~ /^X-/) { + push(@pending, + ['desktop-entry-contains-unknown-key', $pointer, $tag]); + } + $vals{$tag} = $value; + } + + } continue { + ++$position; + } + + close($fd); + + # Now validate the data in the desktop file, but only if it's a known type. + # Warn if it's not. + my $type = $vals{'Type'}; + return + unless defined $type; + + unless ($known_desktop_types{$type}) { + $self->pointed_hint('desktop-entry-unknown-type', $item->pointer, + $type); + return; + } + + $self->pointed_hint(@{$_}) for @pending; + + # Test for important keys. + for my $tag (@req_desktop_keys) { + unless (defined $vals{$tag}) { + $self->pointed_hint('desktop-entry-missing-required-key', + $item->pointer, $tag); + } + } + + # test if missing Keywords (only if NoDisplay is not set) + if (!defined $vals{NoDisplay}) { + + $self->pointed_hint('desktop-entry-lacks-icon-entry', $item->pointer) + unless defined $vals{Icon}; + + $self->pointed_hint('desktop-entry-lacks-keywords-entry', + $item->pointer) + if !defined $vals{Keywords} && $vals{'Type'} eq 'Application'; + } + + # Only test whether the binary is in the package if the desktop file is + # directly under /usr/share/applications. Too many applications use + # desktop files for other purposes with custom paths. + # + # TODO: Should check quoting and the check special field + # codes in Exec for desktop files. + if ( $item->name =~ m{^usr/share/applications/} + && $vals{'Exec'} + && $vals{'Exec'} =~ /\S/) { + + my ($okay, $command) + = $self->verify_cmd($item->pointer, $vals{'Exec'}); + + $self->pointed_hint('desktop-command-not-in-package', + $item->pointer, $command) + unless $okay + || $command eq 'kcmshell'; + + $command =~ s{^(?:usr/)?s?bin/}{}; + $desktop_cmds->{$command} = 1 + unless $command =~ m/^(?:su-to-root|sux?|(?:gk|kde)su)$/; + } + + # Check the Category tag. + my $in_reserved; + if (defined $vals{'Categories'}) { + + my $saw_main; + + my @categories = split(/;/, $vals{'Categories'}); + for my $category (@categories) { + + next + if $category =~ /^X-/; + + if ($reserved_categories{$category}) { + $self->pointed_hint('desktop-entry-uses-reserved-category', + $item->pointer,$category) + unless $vals{'OnlyShowIn'}; + + $saw_main = 1; + $in_reserved = 1; + + } elsif (!$self->ADD_CATEGORIES->recognizes($category) + && !$main_categories{$category}) { + $self->pointed_hint('desktop-entry-invalid-category', + $item->pointer, $category); + + } elsif ($main_categories{$category}) { + $saw_main = 1; + } + } + + $self->pointed_hint('desktop-entry-lacks-main-category',$item->pointer) + unless $saw_main; + } + + # Check the OnlyShowIn tag. If this is not an application in a reserved + # category, warn about any desktop entry that specifies OnlyShowIn for + # more than one environment. In that case, the application probably + # should be using NotShowIn instead. + if (defined $vals{OnlyShowIn} and not $in_reserved) { + my @envs = split(/;/, $vals{OnlyShowIn}); + if (@envs > 1) { + $self->pointed_hint('desktop-entry-limited-to-environments', + $item->pointer); + } + } + + # Check that the Exec tag specifies how to pass a filename if MimeType + # tags are present. + if ($item->name =~ m{^usr/share/applications/} + && defined $vals{'MimeType'}) { + + $self->pointed_hint('desktop-mime-but-no-exec-code', $item->pointer) + unless defined $vals{'Exec'} + && $vals{'Exec'} =~ /(?:^|[^%])%[fFuU]/; + } + + return; +} + +# Verify whether a command is shipped as part of the package. Takes the full +# path to the file being checked (for error reporting) and the binary. +# Returns a list whose first member is true if the command is present and +# false otherwise, and whose second member is the command (minus any leading +# su-to-root wrapper). Shared between the desktop and menu code. +sub verify_cmd { + my ($self, $pointer, $exec) = @_; + + my $index = $self->processable->installed; + + # This routine handles su wrappers. The option parsing here is ugly and + # dead-simple, but it's hopefully good enough for what will show up in + # desktop files. su-to-root and sux require -c options, kdesu optionally + # allows one, and gksu has the command at the end of its arguments. + my @components = split($SPACE, $exec); + my $cmd; + + $self->pointed_hint('su-to-root-with-usr-sbin', $pointer) + if $components[0] && $components[0] eq '/usr/sbin/su-to-root'; + + if ( $components[0] + && $components[0] =~ m{^(?:/usr/s?bin/)?(su-to-root|gksu|kdesu|sux)$}){ + + my $wrapper = $1; + shift @components; + + while (@components) { + unless ($components[0]) { + shift @components; + next; + } + + if ($components[0] eq '-c') { + $cmd = $components[1]; + last; + + } elsif ( + $components[0] =~ /^-[Dfmupi]|^--(user|description|message)/) { + shift @components; + shift @components; + + } elsif ($components[0] =~ /^-/) { + shift @components; + + } else { + last; + } + } + + if (!$cmd && $wrapper =~ /^(gk|kde)su$/) { + if (@components) { + $cmd = $components[0]; + } else { + $cmd = $wrapper; + undef $wrapper; + } + } + + $self->pointed_hint('su-wrapper-without--c', $pointer, $wrapper) + unless $cmd; + + $self->pointed_hint('su-wrapper-not-su-to-root', $pointer, $wrapper) + if $wrapper + && $wrapper !~ /su-to-root/ + && $wrapper ne $self->processable->name; + + } else { + $cmd = $components[0]; + } + + my $cmd_file = $cmd; + if ($cmd_file) { + $cmd_file =~ s{^/}{}; + } + + my $okay = $cmd + && ( $cmd =~ /^[\'\"]/ + || $index->lookup($cmd_file) + || $cmd =~ m{^(/bin/)?sh} + || $cmd =~ m{^(/usr/bin/)?sensible-(pager|editor|browser)} + || any { $index->lookup($_ . $cmd) } @path); + + return ($okay, $cmd_file); +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Menus.pm b/lib/Lintian/Check/Menus.pm new file mode 100644 index 0000000..2e8f3d1 --- /dev/null +++ b/lib/Lintian/Check/Menus.pm @@ -0,0 +1,818 @@ +# menus -- lintian check script -*- perl -*- + +# somewhat of a misnomer -- it doesn't only check menus + +# Copyright (C) 1998 Christian Schwarz +# Copyright (C) 2018 Chris Lamb <lamby@debian.org> +# Copyright (C) 2021 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Menus; + +use v5.20; +use warnings; +use utf8; + +use Const::Fast; +use Path::Tiny; +use Unicode::UTF8 qw(encode_utf8); + +use Lintian::Spelling qw(check_spelling check_spelling_picky); + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +const my $EMPTY => q{}; +const my $SPACE => q{ }; +const my $SLASH => q{/}; +const my $DOT => q{.}; +const my $QUESTION_MARK => q{?}; + +# Supported documentation formats for doc-base files. +my %known_doc_base_formats + = map { $_ => 1 }qw(html text pdf postscript info dvi debiandoc-sgml); + +# Known fields for doc-base files. The value is 1 for required fields and 0 +# for optional fields. +my %KNOWN_DOCBASE_MAIN_FIELDS = ( + 'Document' => 1, + 'Title' => 1, + 'Section' => 1, + 'Abstract' => 0, + 'Author' => 0 +); + +my %KNOWN_DOCBASE_FORMAT_FIELDS = ( + 'Format' => 1, + 'Files' => 1, + 'Index' => 0 +); + +has menu_item => (is => 'rw'); +has menumethod_item => (is => 'rw'); +has documentation => (is => 'rw', default => 0); + +sub spelling_tag_emitter { + my ($self, @orig_args) = @_; + + return sub { + return $self->pointed_hint(@orig_args, @_); + }; +} + +sub visit_installed_files { + my ($self, $item) = @_; + + if ($item->is_file) { # file checks + # menu file? + if ($item->name =~ m{^usr/(lib|share)/menu/\S}){ # correct permissions? + + $self->pointed_hint('executable-menu-file', $item->pointer, + $item->octal_permissions) + if $item->is_executable; + + return + if $item->name =~ m{^usr/(?:lib|share)/menu/README$}; + + if ($item->name =~ m{^usr/lib/}) { + $self->pointed_hint('menu-file-in-usr-lib', $item->pointer); + } + + $self->menu_item($item); + + $self->pointed_hint('bad-menu-file-name', $item->pointer) + if $item->name =~ m{^usr/(?:lib|share)/menu/menu$} + && $self->processable->name ne 'menu'; + } + #menu-methods file? + elsif ($item->name =~ m{^etc/menu-methods/\S}) { + #TODO: we should test if the menu-methods file + # is made executable in the postinst as recommended by + # the menu manual + + my $menumethod_includes_menu_h = 0; + $self->menumethod_item($item); + + if ($item->is_open_ok) { + open(my $fd, '<', $item->unpacked_path) + or die encode_utf8('Cannot open ' . $item->unpacked_path); + + while (my $line = <$fd>) { + chomp $line; + if ($line =~ /^!include menu.h/) { + $menumethod_includes_menu_h = 1; + last; + } + } + close($fd); + } + + $self->pointed_hint('menu-method-lacks-include', $item->pointer) + unless $menumethod_includes_menu_h + or $self->processable->name eq 'menu'; + } + # package doc dir? + elsif ( + $item->name =~ m{ \A usr/share/doc/(?:[^/]+/)? + (.+\.(?:html|pdf))(?:\.gz)? + \Z}xsm + ) { + my $name = $1; + unless ($name =~ m/^changelog\.html$/ + or $name =~ m/^README[.-]/ + or $name =~ m/examples/) { + $self->documentation(1); + } + } + } + + return; +} + +sub installable { + my ($self) = @_; + + my $pkg = $self->processable->name; + my $processable = $self->processable; + my $group = $self->group; + + my (%all_files, %all_links); + + my %preinst; + my %postinst; + my %prerm; + my %postrm; + + $self->check_script($processable->control->lookup('preinst'),\%preinst); + $self->check_script($processable->control->lookup('postinst'),\%postinst); + $self->check_script($processable->control->lookup('prerm'),\%prerm); + $self->check_script($processable->control->lookup('postrm'),\%postrm); + + # Populate all_{files,links} from current package and its dependencies + for my $installable ($group->get_installables) { + next + unless $processable->name eq $installable->name + || $processable->relation('strong')->satisfies($installable->name); + + for my $item (@{$installable->installed->sorted_list}) { + add_file_link_info($installable, $item->name, \%all_files, + \%all_links); + } + } + + # prerm scripts should not call update-menus + $self->pointed_hint('prerm-calls-updatemenus',$prerm{'calls-updatemenus'}) + if defined $prerm{'calls-updatemenus'}; + + # postrm scripts should not call install-docs + $self->pointed_hint('postrm-calls-installdocs', + $postrm{'calls-installdocs'}) + if defined $postrm{'calls-installdocs'}; + $self->pointed_hint('postrm-calls-installdocs', + $postrm{'calls-installdocs-r'}) + if defined $postrm{'calls-installdocs-r'}; + + # preinst scripts should not call either update-menus nor installdocs + $self->pointed_hint('preinst-calls-updatemenus', + $preinst{'calls-updatemenus'}) + if defined $preinst{'calls-updatemenus'}; + + $self->pointed_hint('preinst-calls-installdocs', + $preinst{'calls-installdocs'}) + if defined $preinst{'calls-installdocs'}; + + my $anymenu_item = $self->menu_item || $self->menumethod_item; + + # No one needs to call install-docs any more; triggers now handles that. + $self->pointed_hint('postinst-has-useless-call-to-install-docs', + $postinst{'calls-installdocs'}) + if defined $postinst{'calls-installdocs'}; + $self->pointed_hint('postinst-has-useless-call-to-install-docs', + $postinst{'calls-installdocs-r'}) + if defined $postinst{'calls-installdocs-r'}; + + $self->pointed_hint('prerm-has-useless-call-to-install-docs', + $prerm{'calls-installdocs'}) + if defined $prerm{'calls-installdocs'}; + $self->pointed_hint('prerm-has-useless-call-to-install-docs', + $prerm{'calls-installdocs-r'}) + if defined $prerm{'calls-installdocs-r'}; + + # check consistency + # docbase file? + if (my $db_dir + = $processable->installed->resolve_path('usr/share/doc-base/')){ + for my $item ($db_dir->children) { + next + if !$item->is_open_ok; + + if ($item->resolve_path->is_executable) { + + $self->pointed_hint('executable-in-usr-share-docbase', + $item->pointer, $item->octal_permissions); + next; + } + + $self->check_doc_base_file($item, \%all_files,\%all_links); + } + } elsif ($self->documentation) { + if ($pkg =~ /^libghc6?-.*-doc$/) { + # This is the library documentation for a haskell library. Haskell + # libraries register their documentation via the ghc compiler's + # documentation registration mechanism. See bug #586877. + } else { + $self->hint('possible-documentation-but-no-doc-base-registration'); + } + } + + if ($anymenu_item) { + # postinst and postrm should not need to call update-menus + # unless there is a menu-method file. However, update-menus + # currently won't enable packages that have outstanding + # triggers, leading to an update-menus call being required for + # at least some packages right now. Until this bug is fixed, + # we still require it. See #518919 for more information. + # + # That bug does not require calling update-menus from postrm, + # but debhelper apparently currently still adds that to the + # maintainer script, so don't warn if it's done. + $self->pointed_hint('postinst-does-not-call-updatemenus', + $anymenu_item->pointer) + if !defined $postinst{'calls-updatemenus'}; + + $self->pointed_hint( + 'postrm-does-not-call-updatemenus', + $self->menumethod_item->pointer + ) + if defined $self->menumethod_item + && !defined $postrm{'calls-updatemenus'} + && $pkg ne 'menu'; + + } else { + $self->pointed_hint('postinst-has-useless-call-to-update-menus', + $postinst{'calls-updatemenus'}) + if defined $postinst{'calls-updatemenus'}; + + $self->pointed_hint('postrm-has-useless-call-to-update-menus', + $postrm{'calls-updatemenus'}) + if defined $postrm{'calls-updatemenus'}; + } + + return; +} + +# ----------------------------------- + +sub check_doc_base_file { + my ($self, $item, $all_files, $all_links) = @_; + + my $pkg = $self->processable->name; + my $group = $self->group; + + # another check complains about invalid encoding + return + unless ($item->is_valid_utf8); + + my $contents = $item->decoded_utf8; + my @lines = split(/\n/, $contents); + + my $knownfields = \%KNOWN_DOCBASE_MAIN_FIELDS; + my ($field, @vals); + my %sawfields; # local for each section of control file + my %sawformats; # global for control file + my $line = 0; # global + + my $position = 1; + while (defined(my $string = shift @lines)) { + chomp $string; + + # New field. check previous field, if we have any. + if ($string =~ /^(\S+)\s*:\s*(.*)$/) { + my (@new) = ($1, $2); + if ($field) { + $self->check_doc_base_field( + $item, $line, $field, + \@vals,\%sawfields, \%sawformats, + $knownfields,$all_files, $all_links + ); + } + + $field = $new[0]; + + @vals = ($new[1]); + $line = $position; + + # Continuation of previously defined field. + } elsif ($field && $string =~ /^\s+\S/) { + push(@vals, $string); + + # All tags will be reported on the last continuation line of the + # doc-base field. + $line = $position; + + # Sections' separator. + } elsif ($string =~ /^(\s*)$/) { + $self->pointed_hint('doc-base-file-separator-extra-whitespace', + $item->pointer($position)) + if $1; + next unless $field; # skip successive empty lines + + # Check previously defined field and section. + $self->check_doc_base_field( + $item, $line, $field, + \@vals,\%sawfields, \%sawformats, + $knownfields,$all_files, $all_links + ); + $self->check_doc_base_file_section($item, $line + 1,\%sawfields, + \%sawformats, $knownfields); + + # Initialize variables for new section. + undef $field; + undef $line; + @vals = (); + %sawfields = (); + + # Each section except the first one is format section. + $knownfields = \%KNOWN_DOCBASE_FORMAT_FIELDS; + + # Everything else is a syntax error. + } else { + $self->pointed_hint('doc-base-file-syntax-error', + $item->pointer($position)); + } + + } continue { + ++$position; + } + + # Check the last field/section of the control file. + if ($field) { + $self->check_doc_base_field( + $item, $line, $field, + \@vals, \%sawfields,\%sawformats, + $knownfields,$all_files,$all_links + ); + $self->check_doc_base_file_section($item, $line, \%sawfields, + \%sawformats,$knownfields); + } + + # Make sure we saw at least one format. + $self->pointed_hint('doc-base-file-no-format-section', $item->pointer) + unless %sawformats; + + return; +} + +# Checks one field of a doc-base control file. $vals is array ref containing +# all lines of the field. Modifies $sawfields and $sawformats. +sub check_doc_base_field { + my ( + $self, $item, $position, $field,$vals, + $sawfields, $sawformats,$knownfields,$all_files, $all_links + ) = @_; + + my $pkg = $self->processable->name; + my $group = $self->group; + + my $SECTIONS = $self->data->load('doc-base/sections'); + + $self->pointed_hint('doc-base-file-unknown-field', + $item->pointer($position), $field) + unless defined $knownfields->{$field}; + $self->pointed_hint('duplicate-field-in-doc-base', + $item->pointer($position), $field) + if $sawfields->{$field}; + $sawfields->{$field} = 1; + + # Index/Files field. + # + # Check if files referenced by doc-base are included in the package. The + # Index field should refer to only one file without wildcards. The Files + # field is a whitespace-separated list of files and may contain wildcards. + # We skip without validating wildcard patterns containing character + # classes since otherwise we'd need to deal with wildcards inside + # character classes and aren't there yet. + if ($field eq 'Index' or $field eq 'Files') { + my @files = map { split($SPACE) } @{$vals}; + + if ($field eq 'Index' && @files > 1) { + $self->pointed_hint('doc-base-index-references-multiple-files', + $item->pointer($position)); + } + for my $file (@files) { + next if $file =~ m{^/usr/share/doc/}; + next if $file =~ m{^/usr/share/info/}; + + $self->pointed_hint('doc-base-file-references-wrong-path', + $item->pointer($position), $file); + } + for my $file (@files) { + my $realfile = delink($file, $all_links); + # openoffice.org-dev-doc has thousands of files listed so try to + # use the hash if possible. + my $found; + if ($realfile =~ /[*?]/) { + my $regex = quotemeta($realfile); + unless ($field eq 'Index') { + next if $regex =~ /\[/; + $regex =~ s{\\\*}{[^/]*}g; + $regex =~ s{\\\?}{[^/]}g; + $regex .= $SLASH . $QUESTION_MARK; + } + $found = grep { /^$regex\z/ } keys %{$all_files}; + } else { + $found = $all_files->{$realfile} || $all_files->{"$realfile/"}; + } + unless ($found) { + $self->pointed_hint('doc-base-file-references-missing-file', + $item->pointer($position),$file); + } + } + undef @files; + + # Format field. + } elsif ($field eq 'Format') { + my $format = join($SPACE, @{$vals}); + + # trim both ends + $format =~ s/^\s+|\s+$//g; + + $format = lc $format; + $self->pointed_hint('doc-base-file-unknown-format', + $item->pointer($position), $format) + unless $known_doc_base_formats{$format}; + $self->pointed_hint('duplicate-format-in-doc-base', + $item->pointer($position), $format) + if $sawformats->{$format}; + $sawformats->{$format} = 1; + + # Save the current format for the later section check. + $sawformats->{' *current* '} = $format; + + # Document field. + } elsif ($field eq 'Document') { + $_ = join($SPACE, @{$vals}); + + $self->pointed_hint('doc-base-invalid-document-field', + $item->pointer($position), $_) + unless /^[a-z0-9+.-]+$/; + $self->pointed_hint('doc-base-document-field-ends-in-whitespace', + $item->pointer($position)) + if /[ \t]$/; + $self->pointed_hint('doc-base-document-field-not-in-first-line', + $item->pointer($position)) + unless $position == 1; + + # Title field. + } elsif ($field eq 'Title') { + if (@{$vals}) { + my $stag_emitter + = $self->spelling_tag_emitter( + 'spelling-error-in-doc-base-title-field', + $item->pointer($position)); + check_spelling( + $self->data, + join($SPACE, @{$vals}), + $group->spelling_exceptions, + $stag_emitter + ); + check_spelling_picky($self->data, join($SPACE, @{$vals}), + $stag_emitter); + } + + # Section field. + } elsif ($field eq 'Section') { + $_ = join($SPACE, @{$vals}); + unless ($SECTIONS->recognizes($_)) { + if (m{^App(?:lication)?s/(.+)$} && $SECTIONS->recognizes($1)) { + $self->pointed_hint('doc-base-uses-applications-section', + $item->pointer($position), $_); + } elsif (m{^(.+)/(?:[^/]+)$} && $SECTIONS->recognizes($1)) { + # allows creating a new subsection to a known section + } else { + $self->pointed_hint('doc-base-unknown-section', + $item->pointer($position), $_); + } + } + + # Abstract field. + } elsif ($field eq 'Abstract') { + # The three following variables are used for checking if the field is + # correctly phrased. We detect if each line (except for the first + # line and lines containing single dot) of the field starts with the + # same number of spaces, not followed by the same non-space character, + # and the number of spaces is > 1. + # + # We try to match fields like this: + # ||Abstract: The Boost web site provides free peer-reviewed portable + # || C++ source libraries. The emphasis is on libraries which work + # || well with the C++ Standard Library. One goal is to establish + # + # but not like this: + # ||Abstract: This is "Ding" + # || * a dictionary lookup program for Unix, + # || * DIctionary Nice Grep, + my $leadsp; # string with leading spaces from second line + my $charafter; # first non-whitespace char of second line + my $leadsp_ok = 1; # are spaces OK? + + # Intentionally skipping the first line. + for my $idx (1 .. $#{$vals}) { + $_ = $vals->[$idx]; + + if (/manage\s+online\s+manuals\s.*Debian/) { + $self->pointed_hint('doc-base-abstract-field-is-template', + $item->pointer($position)) + unless $pkg eq 'doc-base'; + + } elsif (/^(\s+)\.(\s*)$/ and ($1 ne $SPACE or $2)) { + $self->pointed_hint( + 'doc-base-abstract-field-separator-extra-whitespace', + $item->pointer($position - $#{$vals} + $idx) + ); + + } elsif (!$leadsp && /^(\s+)(\S)/) { + # The regexp should always match. + ($leadsp, $charafter) = ($1, $2); + $leadsp_ok = $leadsp eq $SPACE; + + } elsif (!$leadsp_ok && /^(\s+)(\S)/) { + # The regexp should always match. + undef $charafter if $charafter && $charafter ne $2; + $leadsp_ok = 1 + if ($1 ne $leadsp) || ($1 eq $leadsp && $charafter); + } + } + + unless ($leadsp_ok) { + $self->pointed_hint( + 'doc-base-abstract-might-contain-extra-leading-whitespace', + $item->pointer($position)); + } + + # Check spelling. + if (@{$vals}) { + my $stag_emitter + = $self->spelling_tag_emitter( + 'spelling-error-in-doc-base-abstract-field', + $item->pointer($position)); + check_spelling( + $self->data, + join($SPACE, @{$vals}), + $group->spelling_exceptions, + $stag_emitter + ); + check_spelling_picky($self->data, join($SPACE, @{$vals}), + $stag_emitter); + } + } + + return; +} + +# Checks the section of the doc-base control file. Tries to find required +# fields missing in the section. +sub check_doc_base_file_section { + my ($self, $item, $position, $sawfields, $sawformats, $knownfields) = @_; + + $self->pointed_hint('doc-base-file-no-format', $item->pointer($position)) + if ((defined $sawfields->{'Files'} || defined $sawfields->{'Index'}) + && !(defined $sawfields->{'Format'})); + + # The current format is set by check_doc_base_field. + if ($sawfields->{'Format'}) { + my $format = $sawformats->{' *current* '}; + $self->pointed_hint('doc-base-file-no-index',$item->pointer($position)) + if ( $format + && ($format eq 'html' || $format eq 'info') + && !$sawfields->{'Index'}); + } + for my $field (sort keys %{$knownfields}) { + $self->pointed_hint('doc-base-file-lacks-required-field', + $item->pointer($position), $field) + if ($knownfields->{$field} == 1 && !$sawfields->{$field}); + } + + return; +} + +# Add file and link to $all_files and $all_links. Note that both files and +# links have to include a leading /. +sub add_file_link_info { + my ($processable, $file, $all_files, $all_links) = @_; + + my $link = $processable->installed->lookup($file)->link; + my $ishard = $processable->installed->lookup($file)->is_hardlink; + + # make name absolute + $file = $SLASH . $file + unless $file =~ m{^/}; + + $file =~ s{/+}{/}g; # remove duplicated `/' + $all_files->{$file} = 1; + + if (length $link) { + + $link = $DOT . $SLASH . $link + if $link !~ m{^/}; + + if ($ishard) { + $link =~ s{^\./}{/}; + } elsif ($link !~ m{^/}) { # not absolute link + $link + = $SLASH + . $link; # make sure link starts with '/' + $link =~ s{/+\./+}{/}g; # remove all /./ parts + my $dcount = 1; + while ($link =~ s{^/+\.\./+}{/}) { #\ count & remove + $dcount++; #/ any leading /../ parts + } + my $f = $file; + while ($dcount--) { #\ remove last $dcount + $f=~ s{/[^/]*$}{}; #/ path components from $file + } + $link + = $f. $link; # now we should have absolute link + } + $all_links->{$file} = $link unless ($link eq $file); + } + + return; +} + +# Dereference all symlinks in file. +sub delink { + my ($file, $all_links) = @_; + + $file =~ s{/+}{/}g; # remove duplicated '/' + return $file + unless %{$all_links}; # package doesn't symlinks + + my $p1 = $EMPTY; + my $p2 = $file; + my %used_links; + + # In the loop below we split $file into two parts on each '/' until + # there's no remaining slashes. We try substituting the first part with + # corresponding symlink and if it succeeds, we start the procedure from + # beginning. + # + # Example: + # Let $all_links{"/a/b"} == "/d", and $file == "/a/b/c" + # Then 0) $p1 == "", $p2 == "/a/b/c" + # 1) $p1 == "/a", $p2 == "/b/c" + # 2) $p1 == "/a/b", $p2 == "/c" ; substitute "/d" for "/a/b" + # 3) $p1 == "", $p2 == "/d/c" + # 4) $p1 == "/d", $p2 == "/c" + # 5) $p1 == "/d/c", $p2 == "" + # + # Note that the algorithm supposes, that + # i) $all_links{$X} != $X for each $X + # ii) both keys and values of %all_links start with '/' + + while (($p2 =~ s{^(/[^/]*)}{}g) > 0) { + $p1 .= $1; + if (defined $all_links->{$p1}) { + return '!!! SYMLINK LOOP !!!' if defined $used_links{$p1}; + $p2 = $all_links->{$p1} . $p2; + $p1 = $EMPTY; + $used_links{$p1} = 1; + } + } + + # After the loop $p2 should be empty and $p1 should contain the target + # file. In some rare cases when $file contains no slashes, $p1 will be + # empty and $p2 will contain the result (which will be equal to $file). + return $p1 ne $EMPTY ? $p1 : $p2; +} + +sub check_script { + my ($self, $item, $pres) = @_; + + my $pkg = $self->processable->name; + + my ($no_check_menu, $no_check_installdocs); + + # control files are regular files and not symlinks, pipes etc. + return + unless defined $item; + + return + if $item->is_symlink; + + return + unless $item->is_open_ok; + + # nothing to do for ELF + return + if $item->is_elf; + + my $interpreter = $item->interpreter || 'unknown'; + + if ($item->is_shell_script) { + $interpreter = 'sh'; + + } elsif ($interpreter =~ m{^/usr/bin/perl}) { + $interpreter = 'perl'; + } + + open(my $fd, '<', $item->unpacked_path) + or die encode_utf8('Cannot open ' . $item->unpacked_path); + + my $position = 1; + while (my $line = <$fd>) { + # skip comments + $line =~ s/\#.*$//; + + ## + # update-menus will satisfy the checks that the menu file + # installed is properly used + ## + + # does the script check whether update-menus exists? + $pres->{'checks-for-updatemenus'} = $item->pointer($position) + if $line =~ /-x\s+\S*update-menus/ + || $line =~ /(?:which|type)\s+update-menus/ + || $line =~ /command\s+.*?update-menus/; + + # does the script call update-menus? + # TODO this regex-magic should be moved to some lib for checking + # whether a certain word is likely called as command... --Jeroen + if ( + $line =~m{ (?:^\s*|[;&|]\s*|(?:then|do|exec)\s+) + (?:\/usr\/bin\/)?update-menus + (?:\s|[;&|<>]|\Z)}xsm + ) { + # yes, it does. + $pres->{'calls-updatemenus'} = $item->pointer($position); + + # checked first? + if (not $pres->{'checks-for-updatemenus'} and $pkg ne 'menu') { + $self->pointed_hint( +'maintainer-script-does-not-check-for-existence-of-updatemenus', + $item->pointer($position) + ) unless $no_check_menu++; + } + } + + # does the script check whether install-docs exists? + $pres->{'checks-for-installdocs'} = $item->pointer($position) + if $line =~ s/-x\s+\S*install-docs// + || $line =~/(?:which|type)\s+install-docs/ + || $line =~ s/command\s+.*?install-docs//; + + # does the script call install-docs? + if ( + $line =~ m{ (?:^\s*|[;&|]\s*|(?:then|do)\s+) + (?:\/usr\/sbin\/)?install-docs + (?:\s|[;&|<>]|\Z) }xsm + ) { + # yes, it does. Does it remove or add a doc? + if ($line =~ /install-docs\s+(?:-r|--remove)\s/) { + $pres->{'calls-installdocs-r'} = $item->pointer($position); + } else { + $pres->{'calls-installdocs'} = $item->pointer($position); + } + + # checked first? + if (not $pres->{'checks-for-installdocs'}) { + $self->pointed_hint( +'maintainer-script-does-not-check-for-existence-of-installdocs', + $item->pointer($position) + ) unless $no_check_installdocs++; + } + } + + } continue { + ++$position; + } + + close($fd); + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Mimeinfo.pm b/lib/Lintian/Check/Mimeinfo.pm new file mode 100644 index 0000000..f24b73d --- /dev/null +++ b/lib/Lintian/Check/Mimeinfo.pm @@ -0,0 +1,61 @@ +# mimeinfo -- lintian check script -*- perl -*- + +# Copyright (C) 1998 Christian Schwarz and Richard Braakman +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Mimeinfo; + +use v5.20; +use warnings; +use utf8; + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +sub visit_installed_files { + my ($self, $item) = @_; + + if ($item->name =~ m{^usr/share/applications/mimeinfo.cache(?:\.gz)?$}){ + $self->pointed_hint('package-contains-mimeinfo.cache-file', + $item->pointer); + + }elsif ($item->name =~ m{^usr/share/mime/.+}) { + + if ($item->name =~ m{^usr/share/mime/[^/]+$}) { + $self->pointed_hint('package-contains-mime-cache-file', + $item->pointer); + + } elsif ($item->name !~ m{^usr/share/mime/packages/}) { + $self->pointed_hint( + 'package-contains-mime-file-outside-package-dir', + $item->pointer); + } + } + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Modprobe.pm b/lib/Lintian/Check/Modprobe.pm new file mode 100644 index 0000000..f9af6c7 --- /dev/null +++ b/lib/Lintian/Check/Modprobe.pm @@ -0,0 +1,61 @@ +# modprobe -- lintian check script -*- perl -*- + +# Copyright (C) 1998 Christian Schwarz and Richard Braakman +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Modprobe; + +use v5.20; +use warnings; +use utf8; + +use List::SomeUtils qw(uniq); + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +sub visit_installed_files { + my ($self, $item) = @_; + + if ( $item->name =~ m{^etc/modprobe\.d/ }x + && $item->name !~ m{ [.]conf $}x + && !$item->is_dir) { + + $self->pointed_hint('non-conf-file-in-modprobe.d', $item->pointer); + + } elsif ($item->name =~ m{^ etc/modprobe[.]d/ }x + || $item->name =~ m{^ etc/modules-load\.d/ }x) { + + my @obsolete = ($item->bytes =~ m{^ \s* ( install | remove ) }gmx); + $self->pointed_hint('obsolete-command-in-modprobe.d-file', + $item->pointer, $_) + for uniq @obsolete; + } + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Nmu.pm b/lib/Lintian/Check/Nmu.pm new file mode 100644 index 0000000..eccb692 --- /dev/null +++ b/lib/Lintian/Check/Nmu.pm @@ -0,0 +1,191 @@ +# nmu -- lintian check script -*- perl -*- + +# Copyright (C) 2004 Jeroen van Wolffelaar +# Copyright (C) 2017-2019 Chris Lamb <lamby@debian.org> +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Nmu; + +use v5.20; +use warnings; +use utf8; + +use Const::Fast; +use List::SomeUtils qw(any); +use List::Util qw(first); + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +const my $EMPTY => q{}; + +sub source { + my ($self) = @_; + + my $processable = $self->processable; + + my $changelog_mentions_nmu = 0; + my $changelog_mentions_local = 0; + my $changelog_mentions_qa = 0; + my $changelog_mentions_team_upload = 0; + + my $debian_dir = $processable->patched->resolve_path('debian/'); + + my $chf; + $chf = $debian_dir->child('changelog') if $debian_dir; + + # This isn't really an NMU check, but right now no other check + # looks at debian/changelog in source packages. Catch a + # debian/changelog file that's a symlink. + $self->pointed_hint('changelog-is-symlink', $chf->pointer) + if $chf && $chf->is_symlink; + + return + unless $processable->changelog; + + # Get some data from the changelog file. + my ($entry) = @{$processable->changelog->entries}; + + my $pointer = $chf->pointer($entry->position); + + my $uploader = canonicalize($entry->Maintainer // $EMPTY); + + # trim both ends + $self->pointed_hint('extra-whitespace-around-name-in-changelog-trailer', + $pointer) + if $uploader =~ s/^\s+|\s+$//g; + + my $changes = $entry->Changes; + $changes =~ s/^(\s*\n)+//; + my $firstline = first { /^\s*\*/ } split(/\n/, $changes); + + # Check the first line for QA, NMU or team upload mentions. + if ($firstline) { + local $_ = $firstline; + if (/\bnmu\b/i or /non-maintainer upload/i or m/LowThresholdNMU/i) { + unless ( + m{ + (?:ackno|\back\b|confir|incorporat).* + (?:\bnmu\b|non-maintainer)}xi + ) { + $changelog_mentions_nmu = 1; + } + } + $changelog_mentions_local = 1 if /\blocal\s+package\b/i; + $changelog_mentions_qa = 1 if /orphan/i or /qa (?:group )?upload/i; + $changelog_mentions_team_upload = 1 if /team upload/i; + } + + # If the version field is missing, assume it to be a native, + # maintainer upload as it is probably the most likely case. + my $version = $processable->fields->value('Version') || '0-1'; + my $maintainer= canonicalize($processable->fields->value('Maintainer')); + my $uploaders = $processable->fields->value('Uploaders'); + + my $version_nmuness = 0; + my $version_local = 0; + my $upload_is_backport = $version =~ m/~bpo(\d+)\+(\d+)$/; + + if ($version =~ /-[^.-]+(\.[^.-]+)?(\.[^.-]+)?$/) { + $version_nmuness = 1 if defined $1; + $version_nmuness = 2 if defined $2; + } + if ($version =~ /\+nmu\d+$/) { + $version_nmuness = 1; + } + if ($version =~ /\+b\d+$/) { + $version_nmuness = 2; + } + if ($version =~ /local/i) { + $version_local = 1; + } + + my $upload_is_nmu = $uploader ne $maintainer; + + my @uploaders = map { canonicalize($_) } split />\K\s*,\s*/,$uploaders; + $upload_is_nmu = 0 if any { $_ eq $uploader } @uploaders; + + # If the changelog entry is missing a maintainer (eg. "-- <blank>") + # assume it's an upload still work in progress. + $upload_is_nmu = 0 if not $uploader; + + if ($maintainer =~ /packages\@qa.debian.org/) { + + $self->pointed_hint('uploaders-in-orphan', $pointer) + if $processable->fields->declares('Uploaders'); + + $self->pointed_hint('qa-upload-has-incorrect-version-number', + $pointer, $version) + if $version_nmuness == 1; + + $self->pointed_hint('no-qa-in-changelog', $pointer) + unless $changelog_mentions_qa; + + } elsif ($changelog_mentions_team_upload) { + + $self->pointed_hint('team-upload-has-incorrect-version-number', + $pointer, $version) + if $version_nmuness == 1; + + $self->pointed_hint('unnecessary-team-upload', $pointer) + unless $upload_is_nmu; + + } else { + # Local packages may be either NMUs or not. + unless ($changelog_mentions_local || $version_local) { + + $self->pointed_hint('no-nmu-in-changelog', $pointer) + if !$changelog_mentions_nmu && $upload_is_nmu; + + $self->pointed_hint('source-nmu-has-incorrect-version-number', + $pointer, $version) + if $upload_is_nmu + && $version_nmuness != 1 + && !$upload_is_backport; + } + + $self->pointed_hint('nmu-in-changelog', $pointer) + if $changelog_mentions_nmu && !$upload_is_nmu; + + $self->pointed_hint('maintainer-upload-has-incorrect-version-number', + $pointer, $version) + if !$upload_is_nmu && $version_nmuness; + } + + return; +} + +# Canonicalize a maintainer address with respect to case. E-mail addresses +# are case-insensitive in the right-hand side. +sub canonicalize { + my ($maintainer) = @_; + + $maintainer =~ s/<([^>\@]+\@)([\w.-]+)>/<$1\L$2>/; + + return $maintainer; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/ObsoleteSites.pm b/lib/Lintian/Check/ObsoleteSites.pm new file mode 100644 index 0000000..976cdb2 --- /dev/null +++ b/lib/Lintian/Check/ObsoleteSites.pm @@ -0,0 +1,96 @@ +# obsolete-sites -- lintian check script -*- perl -*- + +# Copyright (C) 2015 Axel Beckert <abe@debian.org> +# Copyright (C) 2017-2018 Chris Lamb <lamby@debian.org> +# Copyright (C) 2021 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::ObsoleteSites; + +use v5.20; +use warnings; +use utf8; + +use List::SomeUtils qw(any); + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +my @interesting_files = qw( + control + copyright + watch + upstream + upstream/metadata + upstream-metadata.yaml +); + +sub visit_patched_files { + my ($self, $item) = @_; + + return + unless $item->is_regular_file; + + $self->search_for_obsolete_sites($item) + if any { $item->name =~ m{^ debian/$_ $}x } @interesting_files; + + return; +} + +sub search_for_obsolete_sites { + my ($self, $item) = @_; + + return + unless $item->is_open_ok; + + my $OBSOLETE_SITES= $self->data->load('obsolete-sites/obsolete-sites'); + + my $bytes = $item->bytes; + + # strip comments + $bytes =~ s/^ \s* [#] .* $//gmx; + + for my $site ($OBSOLETE_SITES->all) { + + if ($bytes + =~ m{ (\w+:// (?: [\w.]* [.] )? \Q$site\E [/:] [^\s"<>\$]* ) }ix) { + + my $url = $1; + $self->pointed_hint('obsolete-url-in-packaging', $item->pointer, + $url); + } + } + + if ($bytes =~ m{ (ftp:// (?:ftp|security) [.]debian[.]org) }ix) { + + my $url = $1; + $self->pointed_hint('obsolete-url-in-packaging', $item->pointer, $url); + } + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Origtar.pm b/lib/Lintian/Check/Origtar.pm new file mode 100644 index 0000000..47de793 --- /dev/null +++ b/lib/Lintian/Check/Origtar.pm @@ -0,0 +1,55 @@ +# origtar -- lintian check script -*- perl -*- +# +# Copyright (C) 2008 Bernhard R. Link +# Copyright (C) 2019 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Origtar; + +use v5.20; +use warnings; +use utf8; + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +sub source { + my ($self) = @_; + + my $processable = $self->processable; + + return + if $processable->native; + + my @origfiles = @{$processable->orig->sorted_list}; + + $self->hint('empty-upstream-sources') + unless @origfiles; + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Pe.pm b/lib/Lintian/Check/Pe.pm new file mode 100644 index 0000000..d5514d5 --- /dev/null +++ b/lib/Lintian/Check/Pe.pm @@ -0,0 +1,113 @@ +# pe -- lintian check script -*- perl -*- + +# Copyright (C) 2017-2019 Chris Lamb <lamby@debian.org> +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Pe; + +use v5.20; +use warnings; +use utf8; + +use Const::Fast; +use Syntax::Keyword::Try; +use Unicode::UTF8 qw(encode_utf8); + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +const my $SPACE => q{ }; + +const my $MAIN_HEADER => 0x3c; +const my $MAIN_HEADER_LENGTH_WORD_SIZE => 4; +const my $OPTIONAL_HEADER => 0x18; +const my $DLL_CHARACTERISTICS => 0x46; +const my $ASLR_FLAG => 0x40; +const my $DEP_NX_FLAG => 0x100; +const my $UNSAFE_SEH_FLAG => 0x400; + +sub visit_installed_files { + my ($self, $item) = @_; + + return + unless $item->is_file; + + return + unless $item->file_type =~ /^PE32\+? executable/; + + return + unless $item->is_open_ok; + + my $buf; + open(my $fd, '<', $item->unpacked_path) + or die encode_utf8('Cannot open ' . $item->unpacked_path); + + try { + # offset to main header + seek($fd, $MAIN_HEADER, 0) + or die encode_utf8("seek: $!"); + + read($fd, $buf, $MAIN_HEADER_LENGTH_WORD_SIZE) + or die encode_utf8("read: $!"); + + my $pe_offset = unpack('V', $buf); + + # 0x18 is index to "Optional Header"; 0x46 to DLL Characteristics + seek($fd, $pe_offset + $OPTIONAL_HEADER + $DLL_CHARACTERISTICS, 0) + or die encode_utf8("seek: $!"); + + # get DLLCharacteristics value + read($fd, $buf, 2) + or die encode_utf8("read: $!"); + + } catch { + die $@; + } + + my $characteristics = unpack('v', $buf); + my %features = ( + 'ASLR' => $characteristics & $ASLR_FLAG, + 'DEP/NX' => $characteristics & $DEP_NX_FLAG, + 'SafeSEH' => ~$characteristics & $UNSAFE_SEH_FLAG, # note negation + ); + + # Don't check for the x86-specific "SafeSEH" feature for code + # that is JIT-compiled by the Mono runtime. (#926334) + delete $features{'SafeSEH'} + if $item->file_type =~ / Mono\/.Net assembly, /; + + my @missing = grep { !$features{$_} } sort keys %features; + + $self->pointed_hint('portable-executable-missing-security-features', + $item->pointer,join($SPACE, @missing)) + if scalar @missing; + + close $fd; + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Script/Deprecated/Chown.pm b/lib/Lintian/Check/Script/Deprecated/Chown.pm new file mode 100644 index 0000000..e640e17 --- /dev/null +++ b/lib/Lintian/Check/Script/Deprecated/Chown.pm @@ -0,0 +1,96 @@ +# script/deprecated/chown -- lintian check script -*- perl -*- + +# Copyright (C) 2022 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Script::Deprecated::Chown; + +use v5.20; +use warnings; +use utf8; + +use Unicode::UTF8 qw(valid_utf8 encode_utf8); + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +sub check_item { + my ($self, $item) = @_; + + return + unless $item->is_file; + + return + unless $item->is_script; + + open(my $fd, '<', $item->unpacked_path) + or die encode_utf8('Cannot open ' . $item->unpacked_path); + + my $position = 1; + while (my $line = <$fd>) { + + chomp $line; + + next + if $line =~ /^#/; + + next + unless length $line; + + if ($line =~ m{ \b chown \s+ (?: -\S+ \s+ )* ( \S+ [.] \S+ ) \b }x) { + + my $ownership = $1; + + $self->pointed_hint('chown-with-dot', $item->pointer($position), + $ownership); + } + + } continue { + ++$position; + } + + close $fd; + + return; +} + +sub visit_control_files { + my ($self, $item) = @_; + + $self->check_item($item); + + return; +} + +sub visit_installed_files { + my ($self, $item) = @_; + + $self->check_item($item); + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Script/Syntax.pm b/lib/Lintian/Check/Script/Syntax.pm new file mode 100644 index 0000000..20188f1 --- /dev/null +++ b/lib/Lintian/Check/Script/Syntax.pm @@ -0,0 +1,224 @@ +# script/syntax -- lintian check script -*- perl -*- +# +# Copyright (C) 1998 Richard Braakman +# Copyright (C) 2002 Josip Rodin +# Copyright (C) 2016-2019 Chris Lamb <lamby@debian.org> +# Copyright (C) 2021 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Script::Syntax; + +use v5.20; +use warnings; +use utf8; + +use Const::Fast; +use File::Basename; + +use Lintian::IPC::Run3 qw(safe_qx); + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +const my $MAXIMUM_LINES_ANALYZED => 54; + +# exclude some shells. zsh -n is broken, see #485885 +const my %SYNTAX_CHECKERS => ( + sh => [qw{/bin/dash -n}], + bash => [qw{/bin/bash -n}] +); + +sub visit_installed_files { + my ($self, $item) = @_; + + # Consider /usr/src/ scripts as "documentation" + # - packages containing /usr/src/ tend to be "-source" .debs + # and usually come with overrides + # no checks necessary at all for scripts in /usr/share/doc/ + # unless they are examples + return + if ($item->name =~ m{^usr/share/doc/} || $item->name =~ m{^usr/src/}) + && $item->name !~ m{^usr/share/doc/[^/]+/examples/}; + + # Syntax-check most shell scripts, but don't syntax-check + # scripts that end in .dpatch. bash -n doesn't stop checking + # at exit 0 and goes on to blow up on the patch itself. + $self->pointed_hint('shell-script-fails-syntax-check',$item->pointer) + if $self->fails_syntax_check($item) + && $item->name !~ m{^usr/share/doc/[^/]+/examples/} + && $item->name !~ /\.dpatch$/ + && $item->name !~ /\.erb$/; + + $self->pointed_hint('example-shell-script-fails-syntax-check', + $item->pointer) + if $self->fails_syntax_check($item) + && $item->name =~ m{^usr/share/doc/[^/]+/examples/} + && $item->name !~ /\.dpatch$/ + && $item->name !~ /\.erb$/; + + return; +} + +sub visit_control_files { + my ($self, $item) = @_; + + $self->pointed_hint('maintainer-shell-script-fails-syntax-check', + $item->pointer) + if $self->fails_syntax_check($item); + + return; +} + +sub fails_syntax_check { + my ($self, $item) = @_; + + return 0 + unless length $item->interpreter; + + my $basename = basename($item->interpreter); + + my @command; + + # "Perl doesn't distinguish between restricted hashes and readonly hashes." + # https://metacpan.org/pod/Const::Fast#CAVEATS + @command = @{$SYNTAX_CHECKERS{$basename}} + if exists $SYNTAX_CHECKERS{$basename}; + + return 0 + unless @command; + + my $program = $command[0]; + return 0 + unless length $program + && -x $program; + + return 0 + unless $item->is_open_ok; + + return 0 + if script_looks_dangerous($item); + + # Given an interpreter and a file, run the interpreter on that file with the + # -n option to check syntax, discarding output and returning the exit status. + safe_qx(@command, $item->unpacked_path); + my $failed = $?; + + return $failed; +} + +# Returns non-zero if the given file is not actually a shell script, +# just looks like one. +sub script_looks_dangerous { + my ($item) = @_; + + my $result = 0; + my $shell_variable_name = '0'; + my $backgrounded = 0; + + open(my $fd, '<', $item->unpacked_path) + or die encode_utf8('Cannot open ' . $item->unpacked_path); + + my $position = 1; + while (my $line = <$fd>) { + + chomp $line; + + next + if $line =~ /^#/; + + next + unless length $line; + + last + if $position >= $MAXIMUM_LINES_ANALYZED; + + if ( + $line =~ m< + # the exec should either be "eval"ed or a new statement + (?:^\s*|\beval\s*[\'\"]|(?:;|&&|\b(?:then|else))\s*) + + # eat anything between the exec and $0 + exec\s*.+\s* + + # optionally quoted executable name (via $0) + .?\$$shell_variable_name.?\s* + + # optional "end of options" indicator + (?:--\s*)? + + # Match expressions of the form '${1+$@}', '${1:+"$@"', + # '"${1+$@', "$@", etc where the quotes (before the dollar + # sign(s)) are optional and the second (or only if the $1 + # clause is omitted) parameter may be $@ or $*. + # + # Finally the whole subexpression may be omitted for scripts + # which do not pass on their parameters (i.e. after re-execing + # they take their parameters (and potentially data) from stdin + .?(?:\$[{]1:?\+.?)?(?:\$[\@\*])?>x + ) { + $result = 1; + + last; + + } elsif ($line =~ /^\s*(\w+)=\$0;/) { + $shell_variable_name = $1; + + } elsif ( + $line =~ m< + # Match scripts which use "foo $0 $@ &\nexec true\n" + # Program name + \S+\s+ + + # As above + .?\$$shell_variable_name.?\s* + (?:--\s*)? + .?(?:\$[{]1:?\+.?)?(?:\$[\@\*])?.?\s*\&>x + ) { + + $backgrounded = 1; + + } elsif ( + $backgrounded + && $line =~ m{ + # the exec should either be "eval"ed or a new statement + (?:^\s*|\beval\s*[\'\"]|(?:;|&&|\b(?:then|else))\s*) + exec\s+true(?:\s|\Z)}x + ) { + + $result = 1; + last; + } + + } continue { + ++$position; + } + + close $fd; + + return $result; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Scripts.pm b/lib/Lintian/Check/Scripts.pm new file mode 100644 index 0000000..5539208 --- /dev/null +++ b/lib/Lintian/Check/Scripts.pm @@ -0,0 +1,1070 @@ +# scripts -- lintian check script -*- perl -*- +# +# Copyright (C) 1998 Richard Braakman +# Copyright (C) 2002 Josip Rodin +# Copyright (C) 2016-2019 Chris Lamb <lamby@debian.org> +# Copyright (C) 2021 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Scripts; + +use v5.20; +use warnings; +use utf8; + +use Const::Fast; +use File::Basename; +use List::SomeUtils qw(any none); +use Unicode::UTF8 qw(encode_utf8); + +use Lintian::IPC::Run3 qw(safe_qx); +use Lintian::Relation; + +const my $EMPTY => q{}; +const my $SPACE => q{ }; +const my $SLASH => q{/}; +const my $AT_SIGN => q{@}; +const my $ASTERISK => q{*}; +const my $DOT => q{.}; +const my $DOUBLE_QUOTE => q{"}; +const my $NOT_EQUAL => q{!=}; + +const my $BAD_MAINTAINER_COMMAND_FIELDS => 5; +const my $UNVERSIONED_INTERPRETER_FIELDS => 2; +const my $VERSIONED_INTERPRETER_FIELDS => 5; + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +# This is a map of all known interpreters. The key is the interpreter +# name (the binary invoked on the #! line). The value is an anonymous +# array of two elements. The first argument is the path on a Debian +# system where that interpreter would be installed. The second +# argument is the dependency that provides that interpreter. +# +# $INTERPRETERS maps names of (unversioned) interpreters to the path +# they are installed and what package to depend on to use them. +# +has INTERPRETERS => ( + is => 'rw', + lazy => 1, + default => sub { + my ($self) = @_; + + my %unversioned; + + my $data + = $self->data->load('scripts/interpreters',qr/ \s* => \s* /msx); + + for my $interpreter ($data->all) { + + my $remainder = $data->value($interpreter); + + my ($folder, $prerequisites)= split(/ \s* , \s* /msx, + $remainder, $UNVERSIONED_INTERPRETER_FIELDS); + + $prerequisites //= $EMPTY; + + $unversioned{$interpreter} = { + folder => $folder, + prerequisites => $prerequisites + }; + } + + return \%unversioned; + } +); + +# The more complex case of interpreters that may have a version number. +# +# This is a hash from the base interpreter name to a list. The base +# interpreter name may appear by itself or followed by some combination of +# dashes, digits, and periods. +# +# The list contains the following values: +# [<path>, <dependency-relation>, <regex>, <dependency-template>, <version-list>] +# +# Their meaning is documented in Lintian's scripts/versioned-interpreters +# file, though they are ordered differently and there are a few differences +# as described below: +# +# * <regex> has been passed through qr/^<value>$/ +# * If <dependency-relation> was left out, it has been substituted by the +# interpreter. +# * The magic values of <dependency-relation> are represented as: +# @SKIP_UNVERSIONED@ -> undef (i.e the undefined value) +# * <version-list> has been split into a list of versions. +# (e.g. "1.6 1.8" will be ["1.6", "1.8"]) +# +# A full example is: +# +# data: +# lua => /usr/bin, lua([\d.]+), 'lua$1', 40 50 5.1 +# +# $VERSIONED_INTERPRETERS->value ('lua') is +# [ '/usr/bin', 'lua', qr/^lua([\d.]+)$/, 'lua$1', ["40", "50", "5.1"] ] +# +has VERSIONED_INTERPRETERS => ( + is => 'rw', + lazy => 1, + default => sub { + my ($self) = @_; + + my %versioned; + + my $data = $self->data->load('scripts/versioned-interpreters', + qr/ \s* => \s* /msx); + + for my $interpreter ($data->all) { + + my $remainder = $data->value($interpreter); + + my ($folder, $pattern, $template, $version_list, $prerequisites) + = split(/ \s* , \s* /msx, + $remainder, $VERSIONED_INTERPRETER_FIELDS); + + my @versions = split(/ \s+ /msx, $version_list); + $prerequisites //= $EMPTY; + + if ($prerequisites eq $AT_SIGN . 'SKIP_UNVERSIONED' . $AT_SIGN) { + $prerequisites = undef; + + } elsif ($prerequisites =~ / @ /msx) { + die encode_utf8( +"Unknown magic value $prerequisites for versioned interpreter $interpreter" + ); + } + + $versioned{$interpreter} = { + folder => $folder, + prerequisites => $prerequisites, + regex => qr/^$pattern$/, + template => $template, + versions => \@versions + }; + } + + return \%versioned; + } +); + +# 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. +const my $LEADING_PATTERN=> +'(?:(?:^|[`&;(|{])\s*|(?:if|then|do|while|!)\s+|env(?:\s+[[:alnum:]_]+=(?:\S+|\"[^"]*\"|\'[^\']*\'))*\s+)'; +const my $LEADING_REGEX => qr/$LEADING_PATTERN/; + +#forbidden command in maintainer scripts +has BAD_MAINTAINER_COMMANDS => ( + is => 'rw', + lazy => 1, + default => sub { + my ($self) = @_; + + my %forbidden; + + my $data = $self->data->load('scripts/maintainer-script-bad-command', + qr/\s*\~\~/); + + for my $key ($data->all) { + + my $value = $data->value($key); + + my ($in_cat,$in_auto,$package_include_pattern, + $script_include_pattern,$command_pattern) + = split(/ \s* ~~ /msx, $value,$BAD_MAINTAINER_COMMAND_FIELDS); + + die encode_utf8( + "Syntax error in scripts/maintainer-script-bad-command: $.") + if any { !defined }( + $in_cat,$in_auto,$package_include_pattern, + $script_include_pattern,$command_pattern + ); + + # trim both ends + $in_cat =~ s/^\s+|\s+$//g; + $in_auto =~ s/^\s+|\s+$//g; + $package_include_pattern =~ s/^\s+|\s+$//g; + $script_include_pattern =~ s/^\s+|\s+$//g; + + $package_include_pattern ||= '\a\Z'; + + $script_include_pattern ||= $DOT . $ASTERISK; + + $command_pattern=~ s/\$[{]LEADING_PATTERN[}]/$LEADING_PATTERN/; + + $forbidden{$key} = { + ignore_automatic_sections => !!$in_auto, + in_cat_string => !!$in_cat, + package_exclude_regex => qr/$package_include_pattern/x, + script_include_regex => qr/$script_include_pattern/x, + command_pattern => $command_pattern, + }; + } + + return \%forbidden; + } +); + +# Appearance of one of these regexes in a maintainer script means that there +# must be a dependency (or pre-dependency) on the given package. The tag +# reported is maintainer-script-needs-depends-on-%s, so be sure to update +# scripts.desc when adding a new rule. +my %prerequisite_by_command_pattern = ( + '\badduser\s' => 'adduser', + '\bgconf-schemas\s' => 'gconf2', + '\bupdate-inetd\s' => +'update-inetd | inet-superserver | openbsd-inetd | inetutils-inetd | rlinetd | xinetd', + '\bucf\s' => 'ucf', + '\bupdate-xmlcatalog\s' => 'xml-core', + '\bupdate-fonts-(?:alias|dir|scale)\s' => 'xfonts-utils', +); + +# no dependency for install-menu, because the menu package specifically +# says not to depend on it. +has all_prerequisites => ( + is => 'rw', + lazy => 1, + default => sub { + my ($self) = @_; + + my $all_prerequisites + = $self->processable->relation('all') + ->logical_and($self->processable->relation('Provides'), + $self->processable->name); + + return $all_prerequisites; + } +); + +has strong_prerequisites => ( + is => 'rw', + lazy => 1, + default => sub { + my ($self) = @_; + + my $strong_prerequisites = $self->processable->relation('strong'); + + return $strong_prerequisites; + } +); + +sub visit_installed_files { + my ($self, $item) = @_; + + return + unless $item->is_script; + + # Consider /usr/src/ scripts as "documentation" + # - packages containing /usr/src/ tend to be "-source" .debs + # and usually comes with overrides for most of the checks + # below. + # Supposedly, they could be checked as examples, but there is + # a risk that the scripts need substitution to be complete + # (so, syntax checking is not as reliable). + + # no checks necessary at all for scripts in /usr/share/doc/ + # unless they are examples + return + if ($item->name =~ m{^usr/share/doc/} || $item->name =~ m{^usr/src/}) + && $item->name !~ m{^usr/share/doc/[^/]+/examples/}; + + my $basename = basename($item->interpreter); + + # Ignore Python scripts that are shipped under dist-packages; these + # files aren't supposed to be called as scripts. + return + if $basename eq 'python' + && $item->name =~ m{^usr/lib/python3/dist-packages/}; + + # allow exception for .in files that have stuff like #!@PERL@ + return + if $item->name =~ /\.in$/ + && $item->interpreter =~ /^(\@|<\<)[A-Z_]+(\@|>\>)$/; + + my $is_absolute = ($item->interpreter =~ m{^/} || $item->calls_env); + + # As a special-exception, Policy 10.4 states that Perl scripts must use + # /usr/bin/perl directly and not via /usr/bin/env, etc. + $self->pointed_hint( + 'incorrect-path-for-interpreter', + $item->pointer,'/usr/bin/env perl', + $NOT_EQUAL, '/usr/bin/perl' + ) + if $item->calls_env + && $item->interpreter eq 'perl' + && $item->name !~ m{^usr/share/doc/[^/]+/examples/}; + + $self->pointed_hint( + 'example-incorrect-path-for-interpreter', + $item->pointer,'/usr/bin/env perl', + $NOT_EQUAL, '/usr/bin/perl' + ) + if $item->calls_env + && $item->interpreter eq 'perl' + && $item->name =~ m{^usr/share/doc/[^/]+/examples/}; + + # Skip files that have the #! line, but are not executable and + # do not have an absolute path and are not in a bin/ directory + # (/usr/bin, /bin etc). They are probably not scripts after + # all. + return + if ( $item->name !~ m{(?:bin/|etc/init\.d/)} + && (!$item->is_file || !$item->is_executable) + && !$is_absolute + && $item->name !~ m{^usr/share/doc/[^/]+/examples/}); + + # Example directories sometimes contain Perl libraries, and + # some people use initial lines like #!perl or #!python to + # provide editor hints, so skip those too if they're not + # executable. Be conservative here, since it's not uncommon + # for people to both not set examples executable and not fix + # the path and we want to warn about that. + return + if ( $item->name =~ /\.pm\z/ + && (!$item->is_file || !$item->is_executable) + && !$is_absolute + && $item->name =~ m{^usr/share/doc/[^/]+/examples/}); + + # Skip upstream source code shipped in /usr/share/cargo/registry/ + return + if $item->name =~ m{^usr/share/cargo/registry/}; + + if ($item->interpreter eq $EMPTY) { + + $self->pointed_hint('script-without-interpreter', $item->pointer) + if $item->name !~ m{^usr/share/doc/[^/]+/examples/}; + + $self->pointed_hint('example-script-without-interpreter', + $item->pointer) + if $item->name =~ m{^usr/share/doc/[^/]+/examples/}; + + return; + } + + # Either they use an absolute path or they use '/usr/bin/env interp'. + $self->pointed_hint('interpreter-not-absolute', $item->pointer, + $item->interpreter) + if !$is_absolute + && $item->name !~ m{^usr/share/doc/[^/]+/examples/}; + + $self->pointed_hint('example-interpreter-not-absolute', + $item->pointer,$item->interpreter) + if !$is_absolute + && $item->name =~ m{^usr/share/doc/[^/]+/examples/}; + + my $bash_completion_regex= qr{^usr/share/bash-completion/completions/.*}; + + $self->pointed_hint('script-not-executable', $item->pointer) + if (!$item->is_file || !$item->is_executable) + && $item->name !~ m{^usr/(?:lib|share)/.*\.pm} + && $item->name !~ m{^usr/(?:lib|share)/.*\.py} + && $item->name !~ m{^usr/(?:lib|share)/ruby/.*\.rb} + && $item->name !~ m{^usr/share/debconf/confmodule(?:\.sh)?$} + && $item->name !~ /\.in$/ + && $item->name !~ /\.erb$/ + && $item->name !~ /\.ex$/ + && $item->name ne 'etc/init.d/skeleton' + && $item->name !~ m{^etc/menu-methods} + && $item->name !~ $bash_completion_regex + && $item->name !~ m{^etc/X11/Xsession\.d} + && $item->name !~ m{^usr/share/doc/} + && $item->name !~ m{^usr/src/}; + + return + unless $item->is_open_ok; + + # Try to find the expected path of the script to check. First + # check $INTERPRETERS and %versioned_interpreters. If not + # found there, see if it ends in a version number and the base + # is found in $VERSIONED_INTERPRETERS + my $interpreter_data = $self->INTERPRETERS->{$basename}; + + my $versioned = 0; + unless (defined $interpreter_data) { + + $interpreter_data = $self->VERSIONED_INTERPRETERS->{$basename}; + + if (!defined $interpreter_data && $basename =~ /^(.*[^\d.-])-?[\d.]+$/) + { + $interpreter_data = $self->VERSIONED_INTERPRETERS->{$1}; + undef $interpreter_data + unless $interpreter_data + && $basename =~ /$interpreter_data->{regex}/; + } + + $versioned = 1 + if defined $interpreter_data; + } + + if (defined $interpreter_data) { + my $expected = $interpreter_data->{folder} . $SLASH . $basename; + + my @context = ($item->interpreter, $NOT_EQUAL, $expected); + + $self->pointed_hint('wrong-path-for-interpreter', $item->pointer, + @context) + if $item->interpreter ne $expected + && !$item->calls_env + && $expected ne '/usr/bin/env perl' + && $item->name !~ m{^usr/share/doc/[^/]+/examples/}; + + $self->pointed_hint('example-wrong-path-for-interpreter', + $item->pointer, @context) + if $item->interpreter ne $expected + && !$item->calls_env + && $expected ne '/usr/bin/env perl' + && $item->name =~ m{^usr/share/doc/[^/]+/examples/}; + + $self->pointed_hint('incorrect-path-for-interpreter', + $item->pointer, @context) + if $item->interpreter ne $expected + && !$item->calls_env + && $expected eq '/usr/bin/env perl' + && $item->name !~ m{^usr/share/doc/[^/]+/examples/}; + + $self->pointed_hint('example-incorrect-path-for-interpreter', + $item->pointer, @context) + if $item->interpreter ne $expected + && !$item->calls_env + && $expected eq '/usr/bin/env perl' + && $item->name =~ m{^usr/share/doc/[^/]+/examples/}; + + } elsif ($item->interpreter =~ m{^/usr/local/}) { + + $self->pointed_hint('interpreter-in-usr-local', $item->pointer, + $item->interpreter) + if $item->name !~ m{^usr/share/doc/[^/]+/examples/}; + + $self->pointed_hint('example-interpreter-in-usr-local', + $item->pointer,$item->interpreter) + if $item->name =~ m{^usr/share/doc/[^/]+/examples/}; + + } elsif ($item->interpreter eq '/bin/env') { + + $self->pointed_hint('script-uses-bin-env', $item->pointer, + $item->interpreter) + if $item->name !~ m{^usr/share/doc/[^/]+/examples/}; + + $self->pointed_hint('example-script-uses-bin-env', $item->pointer, + $item->interpreter) + if $item->name =~ m{^usr/share/doc/[^/]+/examples/}; + + } elsif ($item->interpreter eq 'nodejs') { + + $self->pointed_hint('script-uses-deprecated-nodejs-location', + $item->pointer,$item->interpreter) + if $item->name !~ m{^usr/share/doc/[^/]+/examples/}; + + $self->pointed_hint('example-script-uses-deprecated-nodejs-location', + $item->pointer,$item->interpreter) + if $item->name =~ m{^usr/share/doc/[^/]+/examples/}; + + # Check whether we have correct dependendies on nodejs regardless. + $interpreter_data = $self->INTERPRETERS->{'node'}; + + } elsif ($basename =~ /^php/) { + + $self->pointed_hint('php-script-with-unusual-interpreter', + $item->pointer,$item->interpreter) + if $item->name !~ m{^usr/share/doc/[^/]+/examples/}; + + $self->pointed_hint('example-php-script-with-unusual-interpreter', + $item->pointer, $item->interpreter) + if $item->name =~ m{^usr/share/doc/[^/]+/examples/}; + + # This allows us to still perform the dependencies checks + # below even when an unusual interpreter has been found. + $interpreter_data = $self->INTERPRETERS->{'php'}; + + } else { + my @private_interpreters; + + # Check if the package ships the interpreter (and it is + # executable). + my $name = $item->interpreter; + if ($name =~ s{^/}{}) { + my $file = $self->processable->installed->lookup($name); + push(@private_interpreters, $file) + if defined $file; + + } elsif ($item->calls_env) { + my @files= map { + $self->processable->installed->lookup( + $_ . $SLASH . $item->interpreter) + }qw{bin usr/bin}; + push(@private_interpreters, grep { defined } @files); + } + + $self->pointed_hint('unusual-interpreter', $item->pointer, + $item->interpreter) + if (none { $_->is_file && $_->is_executable } @private_interpreters) + && $item->name !~ m{^usr/share/doc/[^/]+/examples/}; + + $self->pointed_hint('example-unusual-interpreter', $item->pointer, + $item->interpreter) + if (none { $_->is_file && $_->is_executable } @private_interpreters) + && $item->name =~ m{^usr/share/doc/[^/]+/examples/}; + } + + # If we found the interpreter and the script is executable, + # check dependencies. This should be the last thing we do in + # the loop so that we can use next for an early exit and + # reduce the nesting. + return + unless $interpreter_data; + + return + unless $item->is_file && $item->is_executable; + + return + if $item->name =~ m{^usr/share/doc/} || $item->name =~ m{^usr/src/}; + + if (!$versioned) { + my $depends = $interpreter_data->{prerequisites}; + + if ($depends && !$self->all_prerequisites->satisfies($depends)) { + + if ($basename =~ /^php/) { + + $self->pointed_hint('php-script-but-no-php-cli-dep', + $item->pointer, $item->interpreter, + "(does not satisfy $depends)"); + + } elsif ($basename =~ /^(python\d|ruby|[mg]awk)$/) { + + $self->pointed_hint( + ( + "$basename-script-but-no-$basename-dep", + $item->pointer, + $item->interpreter, + "(does not satisfy $depends)" + ) + ); + + } elsif ($basename eq 'csh' + && $item->name =~ m{^etc/csh/login\.d/}){ + # Initialization files for csh. + + } elsif ($basename eq 'fish' && $item->name =~ m{^etc/fish\.d/}) { + # Initialization files for fish. + + } elsif ( + $basename eq 'ocamlrun' + && $self->all_prerequisites->matches( + qr/^ocaml(?:-base)?(?:-nox)?-\d\.[\d.]+/) + ) { + # ABI-versioned virtual packages for ocaml + + } elsif ($basename eq 'escript' + && $self->all_prerequisites->matches(qr/^erlang-abi-[\d+\.]+$/) + ) { + # ABI-versioned virtual packages for erlang + + } else { + + $self->pointed_hint('missing-dep-for-interpreter', + $item->pointer, $item->interpreter, + "(does not satisfy $depends)"); + } + } + + } elsif (exists $self->VERSIONED_INTERPRETERS->{$basename}) { + my @versions = @{ $interpreter_data->{versions} }; + + my @depends; + for my $version (@versions) { + my $d = $interpreter_data->{template}; + $d =~ s/\$1/$version/g; + push(@depends, $d); + } + + unshift(@depends, $interpreter_data->{prerequisites}) + if length $interpreter_data->{prerequisites}; + + my $depends = join(' | ', @depends); + unless ($self->all_prerequisites->satisfies($depends)) { + if ($basename =~ /^(wish|tclsh)/) { + + my $shell_name = $1; + + $self->pointed_hint( + "$shell_name-script-but-no-$shell_name-dep", + $item->pointer, $item->interpreter, + "(does not satisfy $depends)"); + + } else { + + $self->pointed_hint('missing-dep-for-interpreter', + $item->pointer, $item->interpreter, + "(does not satisfy $depends)"); + } + } + + } else { + + my ($version) = ($basename =~ /$interpreter_data->{regex}/); + my $depends = $interpreter_data->{template}; + $depends =~ s/\$1/$version/g; + + unless ($self->all_prerequisites->satisfies($depends)) { + if ($basename =~ /^(python|ruby)/) { + + $self->pointed_hint("$1-script-but-no-$1-dep", + $item->pointer, $item->interpreter, + "(does not satisfy $depends)"); + + } else { + + $self->pointed_hint('missing-dep-for-interpreter', + $item->pointer, $item->interpreter, + "(does not satisfy $depends)"); + } + } + } + + return; +} + +sub visit_control_files { + my ($self, $item) = @_; + + return + unless $item->is_maintainer_script; + + if ($item->is_elf) { + + $self->pointed_hint('elf-maintainer-script', $item->pointer); + return; + } + + # keep 'env', if present + my $interpreter = $item->hashbang; + + # keep base command without options + $interpreter =~ s/^(\S+).*/$1/; + + if ($interpreter eq $EMPTY) { + + $self->pointed_hint('script-without-interpreter', $item->pointer); + return; + } + + # tag for statistics + $self->pointed_hint('maintainer-script-interpreter', + $item->pointer, $interpreter); + + $self->pointed_hint('interpreter-not-absolute', $item->pointer, + $interpreter) + unless $interpreter =~ m{^/}; + + my $basename = basename($interpreter); + + if ($interpreter =~ m{^/usr/local/}) { + $self->pointed_hint('control-interpreter-in-usr-local', + $item->pointer, $interpreter); + + } elsif ($basename eq 'sh' || $basename eq 'bash' || $basename eq 'perl') { + my $expected + = $self->INTERPRETERS->{$basename}->{folder}. $SLASH. $basename; + + my $tag_name + = ($expected eq '/usr/bin/env perl') + ? + 'incorrect-path-for-interpreter' + : 'wrong-path-for-interpreter'; + + $self->pointed_hint( + $tag_name, $item->pointer, $interpreter, + $NOT_EQUAL, $expected + )unless $interpreter eq $expected; + + } elsif ($item->name eq 'config') { + $self->pointed_hint('forbidden-config-interpreter', + $item->pointer, $interpreter); + + } elsif ($item->name eq 'postrm') { + $self->pointed_hint('forbidden-postrm-interpreter', + $item->pointer, $interpreter); + + } elsif (exists $self->INTERPRETERS->{$basename}) { + + my $interpreter_data = $self->INTERPRETERS->{$basename}; + my $expected = $interpreter_data->{folder} . $SLASH . $basename; + + my $tag_name + = ($expected eq '/usr/bin/env perl') + ? + 'incorrect-path-for-interpreter' + : 'wrong-path-for-interpreter'; + + $self->pointed_hint( + $tag_name, $item->pointer, $interpreter, + $NOT_EQUAL, $expected + )unless $interpreter eq $expected; + + $self->pointed_hint('unusual-control-interpreter', $item->pointer, + $interpreter); + + # Interpreters used by preinst scripts must be in + # Pre-Depends. Interpreters used by postinst or prerm + # scripts must be in Depends. + if ($interpreter_data->{prerequisites}) { + + my $depends = Lintian::Relation->new->load( + $interpreter_data->{prerequisites}); + + if ($item->name eq 'preinst') { + + $self->pointed_hint( + 'control-interpreter-without-predepends', + $item->pointer, + $interpreter, + '(does not satisfy ' . $depends->to_string . ')' + ) + unless $self->processable->relation('Pre-Depends') + ->satisfies($depends); + + } else { + + $self->pointed_hint( + 'control-interpreter-without-depends', + $item->pointer, + $interpreter, + '(does not satisfy ' . $depends->to_string . ')' + ) + unless $self->processable->relation('strong') + ->satisfies($depends); + } + } + + } else { + $self->pointed_hint('unknown-control-interpreter', $item->pointer, + $interpreter); + + # no use doing further checks if it's not a known interpreter + return; + } + + return + unless $item->is_open_ok; + + # now scan the file contents themselves + open(my $fd, '<', $item->unpacked_path) + or die encode_utf8('Cannot open ' . $item->unpacked_path); + + my $saw_debconf; + my $saw_bange; + my $saw_sete; + my $saw_udevadm_guard; + + my $cat_string = $EMPTY; + + my $previous_line = $EMPTY; + my $in_automatic_section = 0; + + my $position = 1; + while (my $line = <$fd>) { + + my $pointer = $item->pointer($position); + + $saw_bange = 1 + if $position == 1 + && $item->is_shell_script + && $line =~ m{/$basename\s*.*\s-\w*e\w*\b}; + + $in_automatic_section = 1 + if $line =~ /^# Automatically added by \S+\s*$/; + + $in_automatic_section = 0 + if $line eq '# End automatically added section'; + + # skip empty lines + next + if $line =~ /^\s*$/; + + # skip comment lines + next + if $line =~ /^\s*\#/; + + $line = remove_comments($line); + + # Concatenate lines containing continuation character (\) + # at the end + if ($item->is_shell_script && $line =~ /\\$/) { + + $line =~ s/\\//; + chomp $line; + $previous_line .= $line; + + next; + } + + chomp $line; + + $line = $previous_line . $line; + $previous_line = $EMPTY; + + $saw_sete = 1 + if $item->is_shell_script + && $line =~ /${LEADING_REGEX}set\s*(?:\s+-(?:-.*|[^e]+))*\s-\w*e/; + + $saw_udevadm_guard = 1 + if $line =~ /\b(if|which|command)\s+.*udevadm/g; + + if ($line =~ m{$LEADING_REGEX(?:/bin/)?udevadm\s} && $saw_sete) { + + $self->pointed_hint('udevadm-called-without-guard',$pointer) + unless $saw_udevadm_guard + || $line =~ m{\|\|} + || $self->strong_prerequisites->satisfies('udev:any'); + } + + if ($item->is_shell_script) { + + $cat_string = $EMPTY + if $cat_string ne $EMPTY + && $line =~ /^\Q$cat_string\E$/; + + my $within_another_shell = 0; + + $within_another_shell = 1 + if $item->interpreter !~ m{(?:^|/)sh$} + && $item->interpreter_with_options =~ /\S+\s+-c/; + + if (!$cat_string) { + + $self->generic_check_bad_command($item, $line, + $position, 0,$in_automatic_section); + + $saw_debconf = 1 + if $line =~ m{/usr/share/debconf/confmodule}; + + $self->pointed_hint('read-in-maintainer-script',$pointer) + if $line =~ /^\s*read(?:\s|\z)/ && !$saw_debconf; + + $self->pointed_hint('multi-arch-same-package-calls-pycompile', + $pointer) + if $line =~ /^\s*py3?compile(?:\s|\z)/ + &&$self->processable->fields->value('Multi-Arch') eq 'same'; + + $self->pointed_hint('maintainer-script-modifies-inetd-conf', + $pointer) + if $line =~ m{>\s*/etc/inetd\.conf(?:\s|\Z)} + && !$self->processable->relation('Provides') + ->satisfies('inet-superserver:any'); + + $self->pointed_hint('maintainer-script-modifies-inetd-conf', + $pointer) + if $line=~ m{^\s*(?:cp|mv)\s+(?:.*\s)?/etc/inetd\.conf\s*$} + && !$self->processable->relation('Provides') + ->satisfies('inet-superserver:any'); + + # Check for running commands with a leading path. + # + # Unfortunately, our $LEADING_REGEX string doesn't work + # well for this in the presence of commands that + # contain backquoted expressions because it can't + # tell the difference between the initial backtick + # and the closing backtick. We therefore first + # extract all backquoted expressions and check + # them separately, and then remove them from a + # copy of a string and then check it for bashisms. + while ($line =~ /\`([^\`]+)\`/g) { + + my $mangled = $1; + + if ( + $mangled =~ m{ $LEADING_REGEX + (/(?:usr/)?s?bin/[\w.+-]+) + (?:\s|;|\Z)}xsm + ) { + my $command = $1; + + $self->pointed_hint( + 'command-with-path-in-maintainer-script', + $pointer, $command,'(in backticks)') + unless $in_automatic_section; + } + } + + # check for test syntax + if( + $line =~ m{\[\s+ + (?:!\s+)? -x \s+ + (/(?:usr/)?s?bin/[\w.+-]+) + \s+ \]}xsm + ){ + my $command = $1; + + $self->pointed_hint( + 'command-with-path-in-maintainer-script', + $pointer, $command,'(in test syntax)') + unless $in_automatic_section; + } + + my $mangled = $line; + $mangled =~ s/\`[^\`]+\`//g; + + if ($mangled + =~ m{$LEADING_REGEX(/(?:usr/)?s?bin/[\w.+-]+)(?:\s|;|$)}){ + my $command = $1; + + $self->pointed_hint( + 'command-with-path-in-maintainer-script', + $pointer, $command, '(plain script)') + unless $in_automatic_section; + } + } + } + + for my $pattern (keys %prerequisite_by_command_pattern) { + + next + unless $line =~ /($pattern)/; + + my $command = $1; + + next + if $line =~ /-x\s+\S*$pattern/ + || $line =~ /(?:which|type)\s+$pattern/ + || $line =~ /command\s+.*?$pattern/ + || $line =~ m{ [|][|] \s* true \b }x; + + my $requirement = $prerequisite_by_command_pattern{$pattern}; + + my $first_alternative = $requirement; + $first_alternative =~ s/[ \(].*//; + + $self->pointed_hint( + "maintainer-script-needs-depends-on-$first_alternative", + $pointer, $command,"(does not satisfy $requirement)") + unless $self->processable->relation('strong') + ->satisfies($requirement) + || $self->processable->name eq $first_alternative + || $item->name eq 'postrm'; + } + + $self->generic_check_bad_command($item, $line, $position, 1, + $in_automatic_section); + + if ($line =~ m{$LEADING_REGEX(?:/usr/sbin/)?update-inetd\s}) { + + $self->pointed_hint( + 'maintainer-script-has-invalid-update-inetd-options', + $pointer, '(--pattern with --add)') + if $line =~ /--pattern/ + && $line =~ /--add/; + + $self->pointed_hint( + 'maintainer-script-has-invalid-update-inetd-options', + $pointer, '(--group without --add)') + if $line =~ /--group/ + && $line !~ /--add/; + } + + } continue { + ++$position; + } + + close $fd; + + $self->pointed_hint('maintainer-script-without-set-e', $item->pointer) + if $item->is_shell_script && !$saw_sete && $saw_bange; + + $self->pointed_hint('maintainer-script-ignores-errors', $item->pointer) + if $item->is_shell_script && !$saw_sete && !$saw_bange; + + return; +} + +sub generic_check_bad_command { + my ($self, $script, $line, $position, $find_in_cat_string, + $in_automatic_section) + = @_; + + for my $tag_name (keys %{$self->BAD_MAINTAINER_COMMANDS}) { + + my $command_data= $self->BAD_MAINTAINER_COMMANDS->{$tag_name}; + + next + if $in_automatic_section + && $command_data->{ignore_automatic_sections}; + + next + unless $script->name =~ $command_data->{script_include_regex}; + + next + unless $find_in_cat_string == $command_data->{in_cat_string}; + + if ($line =~ m{ ( $command_data->{command_pattern} ) }x) { + + my $bad_command = $1 // $EMPTY; + + # trim both ends + $bad_command =~ s/^\s+|\s+$//g; + + my $pointer = $script->pointer($position); + + $self->pointed_hint($tag_name, $pointer, + $DOUBLE_QUOTE . $bad_command . $DOUBLE_QUOTE) + unless $self->processable->name + =~ $command_data->{package_exclude_regex}; + } + } + + return; +} + +sub remove_comments { + my ($line) = @_; + + return $line + unless length $line; + + my $simplified = $line; + + # Remove quoted strings so we can more easily ignore comments + # inside them + $simplified =~ s/(^|[^\\](?:\\\\)*)\'(?:\\.|[^\\\'])+\'/$1''/g; + $simplified =~ s/(^|[^\\](?:\\\\)*)\"(?:\\.|[^\\\"])+\"/$1""/g; + + # If the remaining string contains what looks like a comment, + # eat it. In either case, swap the unmodified script line + # back in for processing (if required) and return it. + if ($simplified =~ m/(?:^|[^[\\])[\s\&;\(\)](\#.*$)/) { + + my $comment = $1; + + # eat comment + $line =~ s/\Q$comment\E//; + } + + return $line; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Shell/Bash/Completion.pm b/lib/Lintian/Check/Shell/Bash/Completion.pm new file mode 100644 index 0000000..4b0584e --- /dev/null +++ b/lib/Lintian/Check/Shell/Bash/Completion.pm @@ -0,0 +1,54 @@ +# shell/bash/completion -- lintian check script -*- perl -*- +# +# Copyright (C) 1998 Richard Braakman +# Copyright (C) 2002 Josip Rodin +# Copyright (C) 2016-2019 Chris Lamb <lamby@debian.org> +# Copyright (C) 2021 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Shell::Bash::Completion; + +use v5.20; +use warnings; +use utf8; + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +sub visit_installed_files { + my ($self, $item) = @_; + + return + unless $item->name =~ m{^ usr/share/bash-completion/completions/ }x; + + $self->pointed_hint('bash-completion-with-hashbang', + $item->pointer(1), $item->hashbang) + if length $item->hashbang; + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Shell/Csh.pm b/lib/Lintian/Check/Shell/Csh.pm new file mode 100644 index 0000000..f84d374 --- /dev/null +++ b/lib/Lintian/Check/Shell/Csh.pm @@ -0,0 +1,89 @@ +# shell/csh -- lintian check script -*- perl -*- +# +# Copyright (C) 1998 Richard Braakman +# Copyright (C) 2002 Josip Rodin +# Copyright (C) 2016-2019 Chris Lamb <lamby@debian.org> +# Copyright (C) 2021 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Shell::Csh; + +use v5.20; +use warnings; +use utf8; + +use File::Basename; + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +sub visit_installed_files { + my ($self, $item) = @_; + + # Consider /usr/src/ scripts as "documentation" + # - packages containing /usr/src/ tend to be "-source" .debs + # and usually come with overrides + # no checks necessary at all for scripts in /usr/share/doc/ + # unless they are examples + return + if ($item->name =~ m{^usr/share/doc/} || $item->name =~ m{^usr/src/}) + && $item->name !~ m{^usr/share/doc/[^/]+/examples/}; + + $self->pointed_hint('csh-considered-harmful', $item->pointer(1), + $item->interpreter) + if $self->is_csh_script($item) + && $item->name !~ m{^ etc/csh/login[.]d/ }x; + + return; +} + +sub visit_control_files { + my ($self, $item) = @_; + + # perhaps we should warn about *csh even if they're somehow screwed, + # but that's not really important... + $self->pointed_hint('csh-considered-harmful', $item->pointer(1), + $item->interpreter) + if $self->is_csh_script($item); + + return; +} + +sub is_csh_script { + my ($self, $item) = @_; + + return 0 + unless length $item->interpreter; + + my $basename = basename($item->interpreter); + + return 1 + if $basename eq 'csh' || $basename eq 'tcsh'; + + return 0; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Shell/NonPosix/BashCentric.pm b/lib/Lintian/Check/Shell/NonPosix/BashCentric.pm new file mode 100644 index 0000000..024ea6a --- /dev/null +++ b/lib/Lintian/Check/Shell/NonPosix/BashCentric.pm @@ -0,0 +1,348 @@ +# shell/non-posix/bash-centric -- lintian check script -*- perl -*- +# +# Copyright (C) 1998 Richard Braakman +# Copyright (C) 2002 Josip Rodin +# Copyright (C) 2016-2019 Chris Lamb <lamby@debian.org> +# Copyright (C) 2021 Felix Lechner +# Copyright (C) 2021 Rafael Laboissiere +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +# bashism sounded too much like fascism +package Lintian::Check::Shell::NonPosix::BashCentric; + +use v5.20; +use warnings; +use utf8; + +use Const::Fast; +use File::Basename; +use List::SomeUtils qw(uniq); +use Unicode::UTF8 qw(encode_utf8); + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +const my $EMPTY => q{}; +const my $SLASH => q{/}; + +# 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. +const my $LEADING_PATTERN=> +'(?:(?:^|[`&;(|{])\s*|(?:if|then|do|while|!)\s+|env(?:\s+[[:alnum:]_]+=(?:\S+|\"[^"]*\"|\'[^\']*\'))*\s+)'; +const my $LEADING_REGEX => qr/$LEADING_PATTERN/; + +my @bashism_single_quote_regexes = ( + $LEADING_REGEX + . qr{echo\s+(?:-[^e\s]+\s+)?\'[^\']*(\\[abcEfnrtv0])+.*?[\']}, + # unsafe echo with backslashes + $LEADING_REGEX . qr{source\s+[\"\']?(?:\.\/|[\/\$\w~.-])\S*}, + # should be '.', not 'source' +); + +my @bashism_string_regexes = ( + qr/\$\[\w+\]/, # arith not allowed + qr/\$\{\w+\:\d+(?::\d+)?\}/, # ${foo:3[:1]} + qr/\$\{\w+(\/.+?){1,2}\}/, # ${parm/?/pat[/str]} + qr/\$\{\#?\w+\[[0-9\*\@]+\]\}/,# bash arrays, ${name[0|*|@]} + qr/\$\{!\w+[\@*]\}/, # ${!prefix[*|@]} + qr/\$\{!\w+\}/, # ${!name} + qr/(\$\(|\`)\s*\<\s*\S+\s*([\)\`])/, # $(\< foo) should be $(cat foo) + qr/\$\{?RANDOM\}?\b/, # $RANDOM + qr/\$\{?(OS|MACH)TYPE\}?\b/, # $(OS|MACH)TYPE + qr/\$\{?HOST(TYPE|NAME)\}?\b/, # $HOST(TYPE|NAME) + qr/\$\{?DIRSTACK\}?\b/, # $DIRSTACK + qr/\$\{?EUID\}?\b/, # $EUID should be "id -u" + qr/\$\{?UID\}?\b/, # $UID should be "id -ru" + qr/\$\{?SECONDS\}?\b/, # $SECONDS + qr/\$\{?BASH_[A-Z]+\}?\b/, # $BASH_SOMETHING + qr/\$\{?SHELLOPTS\}?\b/, # $SHELLOPTS + qr/\$\{?PIPESTATUS\}?\b/, # $PIPESTATUS + qr/\$\{?SHLVL\}?\b/, # $SHLVL + qr/<<</, # <<< here string + $LEADING_REGEX + . qr/echo\s+(?:-[^e\s]+\s+)?\"[^\"]*(\\[abcEfnrtv0])+.*?[\"]/, + # unsafe echo with backslashes +); + +my @bashism_regexes = ( + qr/(?:^|\s+)function \w+(\s|\(|\Z)/, # function is useless + qr/(test|-o|-a)\s*[^\s]+\s+==\s/, # should be 'b = a' + qr/\[\s+[^\]]+\s+==\s/, # should be 'b = a' + qr/\s(\|\&)/, # pipelining is not POSIX + qr/[^\\\$]\{(?:[^\s\\\}]*?,)+[^\\\}\s]*\}/, # brace expansion + qr/(?:^|\s+)\w+\[\d+\]=/, # bash arrays, H[0] + $LEADING_REGEX . qr/read\s+(?:-[a-qs-zA-Z\d-]+)/, + # read with option other than -r + $LEADING_REGEX . qr/read\s*(?:-\w+\s*)*(?:\".*?\"|[\'].*?[\'])?\s*(?:;|$)/, + # read without variable + qr/\&>/, # cshism + qr/(<\&|>\&)\s*((-|\d+)[^\s;|)`&\\\\]|[^-\d\s]+)/, # should be >word 2>&1 + qr/\[\[(?!:)/, # alternative test command + $LEADING_REGEX . qr/select\s+\w+/, # 'select' is not POSIX + $LEADING_REGEX . qr/echo\s+(-n\s+)?-n?en?/, # echo -e + $LEADING_REGEX . qr/exec\s+-[acl]/, # exec -c/-l/-a name + qr/(?:^|\s+)let\s/, # let ... + qr/(?<![\$\(])\(\(.*\)\)/, # '((' should be '$((' + qr/\$\[[^][]+\]/, # '$[' should be '$((' + qr/(\[|test)\s+-a/, # test with unary -a (should be -e) + qr{/dev/(tcp|udp)}, # /dev/(tcp|udp) + $LEADING_REGEX . qr/\w+\+=/, # should be "VAR="${VAR}foo" + $LEADING_REGEX . qr/suspend\s/, + $LEADING_REGEX . qr/caller\s/, + $LEADING_REGEX . qr/complete\s/, + $LEADING_REGEX . qr/compgen\s/, + $LEADING_REGEX . qr/declare\s/, + $LEADING_REGEX . qr/typeset\s/, + $LEADING_REGEX . qr/disown\s/, + $LEADING_REGEX . qr/builtin\s/, + $LEADING_REGEX . qr/set\s+-[BHT]+/, # set -[BHT] + $LEADING_REGEX . qr/alias\s+-p/, # alias -p + $LEADING_REGEX . qr/unalias\s+-a/, # unalias -a + $LEADING_REGEX . qr/local\s+-[a-zA-Z]+/, # local -opt + qr/(?:^|\s+)\s*\(?\w*[^\(\w\s]+\S*?\s*\(\)\s*([\{|\(]|\Z)/, + # function names should only contain [a-z0-9_] + $LEADING_REGEX . qr/(push|pop)d(\s|\Z)/, # (push|pod)d + $LEADING_REGEX . qr/export\s+-[^p]/, # export only takes -p as an option + $LEADING_REGEX . qr/ulimit(\s|\Z)/, + $LEADING_REGEX . qr/shopt(\s|\Z)/, + $LEADING_REGEX . qr/time\s/, + $LEADING_REGEX . qr/dirs(\s|\Z)/, + qr/(?:^|\s+)[<>]\(.*?\)/, # <() process substitution + qr/(?:^|\s+)readonly\s+-[af]/, # readonly -[af] + $LEADING_REGEX . qr/(sh|\$\{?SHELL\}?) -[rD]/, # sh -[rD] + $LEADING_REGEX . qr/(sh|\$\{?SHELL\}?) --\w+/, # sh --long-option + $LEADING_REGEX . qr/(sh|\$\{?SHELL\}?) [-+]O/, # sh [-+]O +); + +sub visit_installed_files { + my ($self, $item) = @_; + + return + unless length $item->interpreter; + + my $basename = basename($item->interpreter); + + return + unless $basename eq 'sh'; + + $self->check_bash_centric($item, 'bash-term-in-posix-shell'); + + return; +} + +sub visit_control_files { + my ($self, $item) = @_; + + return + unless length $item->interpreter; + + my $basename = basename($item->interpreter); + + return + unless $basename eq 'sh'; + + $self->check_bash_centric($item, 'possible-bashism-in-maintainer-script'); + + return; +} + +sub check_bash_centric { + my ($self, $item, $tag_name) = @_; + + return + unless $item->is_open_ok; + + open(my $fd, '<', $item->unpacked_path) + or die encode_utf8('Cannot open ' . $item->unpacked_path); + + my $stashed = $EMPTY; + + my $position = 1; + while (my $possible_continuation = <$fd>) { + + chomp $possible_continuation; + + # skip empty lines + next + if $possible_continuation =~ /^\s*$/; + + # skip comment lines + next + if $possible_continuation =~ /^\s*\#/; + + my $no_comment = remove_comments($possible_continuation); + + # Concatenate lines containing continuation character (\) + # at the end + if ($no_comment =~ s{\\$}{}) { + + $stashed .= $no_comment; + + next; + } + + my $line = $stashed . $no_comment; + $stashed = $EMPTY; + + # see Bug#999756 and tclsh(1) + last + if $line =~ m{^ exec \s }x; + + my $pointer = $item->pointer($position); + + my @matches = uniq +$self->check_line($line); + + for my $match (@matches) { + + my $printable = "'$match'"; + $printable = '{hex:' . sprintf('%vX', $match) . '}' + if $match =~ /\P{XPosixPrint}/; + + $self->pointed_hint($tag_name, $pointer, $printable); + } + + } continue { + ++$position; + } + + close $fd; + + return; +} + +sub check_line { + my ($self, $line) = @_; + + my @matches; + + # since this test is ugly, I have to do it by itself + # detect source (.) trying to pass args to the command it runs + # The first expression weeds out '. "foo bar"' + if ( + $line !~ m{\A \s*\.\s+ + (?:\"[^\"]+\"|\'[^\']+\')\s* + (?:[\&\|<;]|\d?>|\Z)}xsm + && $line =~ /^\s*(\.\s+[^\s;\`:]+\s+([^\s;]+))/ + ) { + + my ($dot_command, $extra) = ($1, $2); + + push(@matches, $dot_command) + if length $dot_command + && $extra !~ m{^ & | [|] | < | \d? > }x; + } + + my $modified = $line; + + for my $regex (@bashism_single_quote_regexes) { + if ($modified =~ $regex) { + + # on unmodified line + my ($match) = ($line =~ /($regex)/); + + push(@matches, $match) + if length $match; + } + } + + # Ignore anything inside single quotes; it could be an + # argument to grep or the like. + + # Remove "quoted quotes". They're likely to be + # inside another pair of quotes; we're not + # interested in them for their own sake and + # removing them makes finding the limits of + # the outer pair far easier. + $modified =~ s/(^|[^\\\'\"])\"\'\"/$1/g; + $modified =~ s/(^|[^\\\'\"])\'\"\'/$1/g; + + $modified =~ s/(^|[^\\\"](?:\\\\)*)\'(?:\\.|[^\\\'])+\'/$1''/g; + + for my $regex (@bashism_string_regexes) { + if ($modified =~ $regex) { + + # on unmodified line + my ($match) = ($line =~ /($regex)/); + + $match //= $EMPTY; + + push(@matches, $match) + if length $match; + } + } + + $modified =~ s/(^|[^\\\'](?:\\\\)*)\"(?:\\.|[^\\\"])+\"/$1""/g; + + for my $regex (@bashism_regexes) { + if ($modified =~ $regex) { + + # on unmodified line + my ($match) = ($line =~ /($regex)/); + + $match //= $EMPTY; + + push(@matches, $match) + if length $match; + } + } + + # trim both ends of each element + s/^\s+|\s+$//g for @matches; + + my @meaningful = grep { length } @matches; + + return @meaningful; +} + +sub remove_comments { + my ($line) = @_; + + return $line + unless length $line; + + my $simplified = $line; + + # Remove quoted strings so we can more easily ignore comments + # inside them + $simplified =~ s/(^|[^\\](?:\\\\)*)\'(?:\\.|[^\\\'])+\'/$1''/g; + $simplified =~ s/(^|[^\\](?:\\\\)*)\"(?:\\.|[^\\\"])+\"/$1""/g; + + # If the remaining string contains what looks like a comment, + # eat it. In either case, swap the unmodified script line + # back in for processing (if required) and return it. + if ($simplified =~ m/(?:^|[^[\\])[\s\&;\(\)](\#.*$)/) { + + my $comment = $1; + + # eat comment + $line =~ s/\Q$comment\E//; + } + + return $line; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Substvars/Libc.pm b/lib/Lintian/Check/Substvars/Libc.pm new file mode 100644 index 0000000..db97ee5 --- /dev/null +++ b/lib/Lintian/Check/Substvars/Libc.pm @@ -0,0 +1,86 @@ +# substvars/libc -- lintian check script -*- perl -*- +# +# Copyright (C) 2004 Marc Brockschmidt +# Copyright (C) 2020 Chris Lamb <lamby@debian.org> +# Copyright (C) 2020-2021 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Substvars::Libc; + +use v5.20; +use warnings; +use utf8; + +use Const::Fast; + +use Lintian::Relation; + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +# The list of libc packages, used for checking for a hard-coded dependency +# rather than using ${shlibs:Depends}. +const my @LIBCS => qw(libc6:any libc6.1:any libc0.1:any libc0.3:any); + +my $LIBC_RELATION = Lintian::Relation->new->load(join(' | ', @LIBCS)); + +sub source { + my ($self) = @_; + + my $control = $self->processable->debian_control; + + my @prerequisite_fields = qw(Pre-Depends Depends Recommends Suggests); + + for my $installable ($control->installables) { + my $installable_fields = $control->installable_fields($installable); + + for my $field (@prerequisite_fields) { + + next + unless $control->installable_fields($installable) + ->declares($field); + + my $relation + = $self->processable->binary_relation($installable,$field); + + my $control_item= $self->processable->debian_control->item; + my $position = $installable_fields->position($field); + my $pointer = $control_item->pointer($position); + + $self->pointed_hint( + 'package-depends-on-hardcoded-libc', + $pointer,"(in section for $installable)", + $field, $relation->to_string + ) + if $relation->satisfies($LIBC_RELATION) + && $self->processable->name !~ /^e?glibc$/; + } + } + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Substvars/Misc/PreDepends.pm b/lib/Lintian/Check/Substvars/Misc/PreDepends.pm new file mode 100644 index 0000000..6172aca --- /dev/null +++ b/lib/Lintian/Check/Substvars/Misc/PreDepends.pm @@ -0,0 +1,64 @@ +# substvars/misc/pre-depends -- lintian check script -*- perl -*- +# +# Copyright (C) 2004 Marc Brockschmidt +# Copyright (C) 2020 Chris Lamb <lamby@debian.org> +# Copyright (C) 2020-2021 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Substvars::Misc::PreDepends; + +use v5.20; +use warnings; +use utf8; + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +sub source { + my ($self) = @_; + + my $control = $self->processable->debian_control; + + for my $installable ($control->installables) { + my $installable_fields = $control->installable_fields($installable); + + my $field = 'Depends'; + + my $depends= $control->installable_fields($installable)->value($field); + + my $control_item= $self->processable->debian_control->item; + my $position = $installable_fields->position($field); + my $pointer = $control_item->pointer($position); + + $self->pointed_hint('depends-on-misc-pre-depends', $pointer,$depends, + "(in section for $installable)") + if $depends =~ m/\$\{misc:Pre-Depends\}/; + } + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Systemd.pm b/lib/Lintian/Check/Systemd.pm new file mode 100644 index 0000000..39487e0 --- /dev/null +++ b/lib/Lintian/Check/Systemd.pm @@ -0,0 +1,530 @@ +# systemd -- lintian check script -*- perl -*- +# +# Copyright (C) 2013 Michael Stapelberg +# Copyright (C) 2016-2020 Chris Lamb <lamby@debian.org> +# Copyright (C) 2021 Felix Lechner +# +# based on the apache2 checks file by: +# Copyright (C) 2012 Arno Toell +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Systemd; + +use v5.20; +use warnings; +use utf8; + +use Const::Fast; +use Data::Validate::URI qw(is_uri); +use List::Compare; +use List::SomeUtils qw(any none); +use Text::ParseWords qw(shellwords); + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +const my $EMPTY => q{}; + +# "Usual" targets for WantedBy +const my @WANTEDBY_WHITELIST => qw{ + default.target + graphical.target + multi-user.target + network-online.target + sleep.target + sysinit.target +}; + +# Known hardening flags in [Service] section +const my @HARDENING_FLAGS => qw{ + CapabilityBoundingSet + DeviceAllow + DynamicUser + IPAddressDeny + InaccessiblePaths + KeyringMode + LimitNOFILE + LockPersonality + MemoryDenyWriteExecute + MountFlags + NoNewPrivileges + PrivateDevices + PrivateMounts + PrivateNetwork + PrivateTmp + PrivateUsers + ProtectControlGroups + ProtectHome + ProtectHostname + ProtectKernelLogs + ProtectKernelModules + ProtectKernelTunables + ProtectSystem + ReadOnlyPaths + RemoveIPC + RestrictAddressFamilies + RestrictNamespaces + RestrictRealtime + RestrictSUIDSGID + SystemCallArchitectures + SystemCallFilter + UMask +}; + +# init scripts that do not need a service file +has PROVIDED_BY_SYSTEMD => ( + is => 'rw', + lazy => 1, + default =>sub { + my ($self) = @_; + + return $self->data->load('systemd/init-whitelist'); + } +); + +# array of names provided by the service files. +# This includes Alias= directives, so after parsing +# NetworkManager.service, it will contain NetworkManager and +# network-manager. +has service_names => (is => 'rw', default => sub { [] }); + +has timer_files => (is => 'rw', default => sub { [] }); + +has init_files_by_service_name => (is => 'rw', default => sub { {} }); +has cron_scripts => (is => 'rw', default => sub { [] }); + +has is_rcs_script_by_name => (is => 'rw', default => sub { {} }); + +sub visit_installed_files { + my ($self, $item) = @_; + + if ($item->name =~ m{/systemd/system/.*\.service$}) { + + $self->check_systemd_service_file($item); + + my $service_name = $item->basename; + $service_name =~ s/@?\.service$//; + + push(@{$self->service_names}, $service_name); + + my @aliases + = $self->extract_service_file_values($item, 'Install', 'Alias'); + + for my $alias (@aliases) { + + $self->pointed_hint('systemd-service-alias-without-extension', + $item->pointer) + if $alias !~ m/\.service$/; + + # maybe issue a tag for duplicates? + + $alias =~ s{ [.]service $}{}x; + push(@{$self->service_names}, $alias); + } + } + + push(@{$self->timer_files}, $item) + if $item->name =~ m{^(?:usr/)?lib/systemd/system/[^\/]+\.timer$}; + + push(@{$self->cron_scripts}, $item) + if $item->dirname =~ m{^ etc/cron[.][^\/]+ / $}x; + + if ( + $item->dirname eq 'etc/init.d/' + && !$item->is_dir + && (none { $item->basename eq $_} qw{README skeleton rc rcS}) + && $self->processable->name ne 'initscripts' + && $item->link ne 'lib/init/upstart-job' + ) { + + unless ($item->is_file) { + + $self->pointed_hint('init-script-is-not-a-file', $item->pointer); + return; + } + + # sysv generator drops the .sh suffix + my $service_name = $item->basename; + $service_name =~ s{ [.]sh $}{}x; + + $self->init_files_by_service_name->{$service_name} //= []; + push(@{$self->init_files_by_service_name->{$service_name}}, $item); + + $self->is_rcs_script_by_name->{$item->name} + = $self->check_init_script($item); + } + + if ($item->name =~ m{ /systemd/system/ .*[.]socket $}x) { + + my @values + = $self->extract_service_file_values($item,'Socket','ListenStream'); + + $self->pointed_hint('systemd-service-file-refers-to-var-run', + $item->pointer, 'ListenStream', $_) + for grep { m{^/var/run/} } @values; + } + + return; +} + +sub installable { + my ($self) = @_; + + my $lc = List::Compare->new([keys %{$self->init_files_by_service_name}], + $self->service_names); + + my @missing_service_names = $lc->get_Lonly; + + for my $service_name (@missing_service_names) { + + next + if $self->PROVIDED_BY_SYSTEMD->recognizes($service_name); + + my @init_files + = @{$self->init_files_by_service_name->{$service_name} // []}; + + for my $init_file (@init_files) { + + # rcS scripts are particularly bad; always tag + $self->pointed_hint( + 'missing-systemd-service-for-init.d-rcS-script', + $init_file->pointer, $service_name) + if $self->is_rcs_script_by_name->{$init_file->name}; + + $self->pointed_hint('omitted-systemd-service-for-init.d-script', + $init_file->pointer, $service_name) + if @{$self->service_names} + && !$self->is_rcs_script_by_name->{$init_file->name}; + + $self->pointed_hint('missing-systemd-service-for-init.d-script', + $init_file->pointer, $service_name) + if !@{$self->service_names} + && !$self->is_rcs_script_by_name->{$init_file->name}; + } + } + + if (!@{$self->timer_files}) { + + $self->pointed_hint('missing-systemd-timer-for-cron-script', + $_->pointer) + for @{$self->cron_scripts}; + } + + return; +} + +# Verify that each init script includes /lib/lsb/init-functions, +# because that is where the systemd diversion happens. +sub check_init_script { + my ($self, $item) = @_; + + my $lsb_source_seen; + my $is_rcs_script = 0; + + my @lines = split(/\n/, $item->decoded_utf8); + + my $position = 1; + for my $line (@lines) { + + # trim left + $line =~ s/^\s+//; + + $lsb_source_seen = 1 + if $position == 1 + && $line + =~ m{\A [#]! \s* (?:/usr/bin/env)? \s* /lib/init/init-d-script}xsm; + + $is_rcs_script = 1 + if $line =~ m{#.*Default-Start:.*S}; + + next + if $line =~ /^#/; + + $lsb_source_seen = 1 + if $line + =~ m{(?:\.|source)\s+/lib/(?:lsb/init-functions|init/init-d-script)}; + + } continue { + ++$position; + } + + $self->pointed_hint('init.d-script-does-not-source-init-functions', + $item->pointer) + unless $lsb_source_seen; + + return $is_rcs_script; +} + +sub check_systemd_service_file { + my ($self, $item) = @_; + + # ambivalent about /lib or /usr/lib + $self->pointed_hint('systemd-service-in-odd-location', $item->pointer) + if $item =~ m{^etc/systemd/system/}; + + unless ($item->is_open_ok + || ($item->is_symlink && $item->link eq '/dev/null')) { + + $self->pointed_hint('service-file-is-not-a-file', $item->pointer); + return 0; + } + + my @values = $self->extract_service_file_values($item, 'Unit', 'After'); + my @obsolete = grep { /^(?:syslog|dbus)\.target$/ } @values; + + $self->pointed_hint('systemd-service-file-refers-to-obsolete-target', + $item->pointer, $_) + for @obsolete; + + $self->pointed_hint('systemd-service-file-refers-to-obsolete-bindto', + $item->pointer) + if $self->extract_service_file_values($item, 'Unit', 'BindTo'); + + for my $key ( + qw(ExecStart ExecStartPre ExecStartPost ExecReload ExecStop ExecStopPost) + ) { + $self->pointed_hint('systemd-service-file-wraps-init-script', + $item->pointer, $key) + if any { m{^/etc/init\.d/} } + $self->extract_service_file_values($item, 'Service', $key); + } + + unless ($item->link eq '/dev/null') { + + my @wanted_by + = $self->extract_service_file_values($item, 'Install', 'WantedBy'); + my $is_oneshot = any { $_ eq 'oneshot' } + $self->extract_service_file_values($item, 'Service', 'Type'); + + # We are a "standalone" service file if we have no .path or .timer + # equivalent. + my $is_standalone = 1; + if ($item =~ m{^(usr/)?lib/systemd/system/([^/]*?)@?\.service$}) { + + my ($usr, $service) = ($1 // $EMPTY, $2); + + $is_standalone = 0 + if $self->processable->installed->resolve_path( + "${usr}lib/systemd/system/${service}.path") + || $self->processable->installed->resolve_path( + "${usr}lib/systemd/system/${service}.timer"); + } + + for my $target (@wanted_by) { + + $self->pointed_hint( + 'systemd-service-file-refers-to-unusual-wantedby-target', + $item->pointer, $target) + unless (any { $target eq $_ } @WANTEDBY_WHITELIST) + || $self->processable->name eq 'systemd'; + } + + my @documentation + = $self->extract_service_file_values($item, 'Unit','Documentation'); + + $self->pointed_hint('systemd-service-file-missing-documentation-key', + $item->pointer) + unless @documentation; + + for my $documentation (@documentation) { + + my @uris = split(m{\s+}, $documentation); + + my @invalid = grep { !is_uri($_) } @uris; + + $self->pointed_hint('invalid-systemd-documentation', + $item->pointer, $_) + for @invalid; + } + + my @kill_modes + = $self->extract_service_file_values($item, 'Service','KillMode'); + + for my $kill_mode (@kill_modes) { + + # trim both ends + $kill_mode =~ s/^\s+|\s+$//g; + + $self->pointed_hint('kill-mode-none',$item->pointer, $_) + if $kill_mode eq 'none'; + } + + if ( !@wanted_by + && !$is_oneshot + && $is_standalone + && $item =~ m{^(?:usr/)?lib/systemd/[^\/]+/[^\/]+\.service$} + && $item !~ m{@\.service$}) { + + $self->pointed_hint('systemd-service-file-missing-install-key', + $item->pointer) + unless $self->extract_service_file_values($item, 'Install', + 'RequiredBy') + || $self->extract_service_file_values($item, 'Install', 'Also'); + } + + my @pidfile + = $self->extract_service_file_values($item,'Service','PIDFile'); + for my $x (@pidfile) { + $self->pointed_hint('systemd-service-file-refers-to-var-run', + $item->pointer, 'PIDFile', $x) + if $x =~ m{^/var/run/}; + } + + my $seen_hardening + = any { $self->extract_service_file_values($item, 'Service', $_) } + @HARDENING_FLAGS; + + $self->pointed_hint('systemd-service-file-missing-hardening-features', + $item->pointer) + unless $seen_hardening + || $is_oneshot + || any { 'sleep.target' eq $_ } @wanted_by; + + if ( + $self->extract_service_file_values( + $item, 'Unit', 'DefaultDependencies', 1 + ) + ) { + my @before + = $self->extract_service_file_values($item, 'Unit','Before'); + my @conflicts + = $self->extract_service_file_values($item, 'Unit','Conflicts'); + + $self->pointed_hint('systemd-service-file-shutdown-problems', + $item->pointer) + if (none { $_ eq 'shutdown.target' } @before) + && (any { $_ eq 'shutdown.target' } @conflicts); + } + + my %bad_users = ( + 'User' => 'nobody', + 'Group' => 'nogroup', + ); + + for my $key (keys %bad_users) { + + my $value = $bad_users{$key}; + + $self->pointed_hint('systemd-service-file-uses-nobody-or-nogroup', + $item->pointer, "$key=$value") + if any { $_ eq $value } + $self->extract_service_file_values($item, 'Service',$key); + } + + for my $key (qw(StandardError StandardOutput)) { + for my $value (qw(syslog syslog-console)) { + + $self->pointed_hint( + 'systemd-service-file-uses-deprecated-syslog-facility', + $item->pointer, "$key=$value") + if any { $_ eq $value } + $self->extract_service_file_values($item, 'Service',$key); + } + } + } + + return 1; +} + +sub service_file_lines { + my ($item) = @_; + + my @output; + + return @output + if $item->is_symlink and $item->link eq '/dev/null'; + + my @lines = split(/\n/, $item->decoded_utf8); + my $continuation = $EMPTY; + + my $position = 1; + for my $line (@lines) { + + $line = $continuation . $line; + $continuation = $EMPTY; + + if ($line =~ s/\\$/ /) { + $continuation = $line; + next; + } + + # trim right + $line =~ s/\s+$//; + + next + unless length $line; + + next + if $line =~ /^[#;\n]/; + + push(@output, $line); + } + + return @output; +} + +# Extracts the values of a specific Key from a .service file +sub extract_service_file_values { + my ($self, $item, $extract_section, $extract_key) = @_; + + return () + unless length $extract_section && length $extract_key; + + my @values; + my $section; + + my @lines = service_file_lines($item); + for my $line (@lines) { + # section header + if ($line =~ /^\[([^\]]+)\]$/) { + $section = $1; + next; + } + + if (!defined($section)) { + # Assignment outside of section. Ignoring. + next; + } + + my ($key, $value) = ($line =~ m{^(.*)\s*=\s*(.*)$}); + if ( defined($key) + && $section eq $extract_section + && $key eq $extract_key) { + + if (length $value) { + push(@values, shellwords($value)); + + } else { + # Empty assignment resets the list + @values = (); + } + } + } + + return @values; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Systemd/Native/Prerequisites.pm b/lib/Lintian/Check/Systemd/Native/Prerequisites.pm new file mode 100644 index 0000000..5a2480f --- /dev/null +++ b/lib/Lintian/Check/Systemd/Native/Prerequisites.pm @@ -0,0 +1,146 @@ +# systemd/native/prerequisites -- lintian check script -*- perl -*- +# +# Copyright (C) 1998 Richard Braakman +# Copyright (C) 2002 Josip Rodin +# Copyright (C) 2016-2019 Chris Lamb <lamby@debian.org> +# Copyright (C) 2021 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Systemd::Native::Prerequisites; + +use v5.20; +use warnings; +use utf8; + +use Const::Fast; +use List::SomeUtils qw(any none); +use Unicode::UTF8 qw(encode_utf8); + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +const my $EMPTY => q{}; + +const my $SYSTEMD_NATIVE_PREREQUISITES => 'init-system-helpers:any'; + +has satisfies_systemd_native_prerequisites => ( + is => 'rw', + lazy => 1, + default => sub { + my ($self) = @_; + + my $pre_depends = $self->processable->relation('Pre-Depends'); + + return $pre_depends->satisfies($SYSTEMD_NATIVE_PREREQUISITES); + } +); + +sub visit_control_files { + my ($self, $item) = @_; + + return + unless $item->is_maintainer_script; + + return + unless length $item->interpreter; + + return + unless $item->is_open_ok; + + open(my $fd, '<', $item->unpacked_path) + or die encode_utf8('Cannot open ' . $item->unpacked_path); + + my $stashed = $EMPTY; + + my $position = 1; + while (my $possible_continuation = <$fd>) { + + chomp $possible_continuation; + + # skip empty lines + next + if $possible_continuation =~ /^\s*$/; + + # skip comment lines + next + if $possible_continuation =~ /^\s*\#/; + + my $no_comment = remove_comments($possible_continuation); + + # Concatenate lines containing continuation character (\) + # at the end + if ($no_comment =~ s{\\$}{}) { + + $stashed .= $no_comment; + + next; + } + + my $line = $stashed . $no_comment; + $stashed = $EMPTY; + + my $pointer = $item->pointer($position); + + $self->pointed_hint('skip-systemd-native-flag-missing-pre-depends', + $pointer,"(does not satisfy $SYSTEMD_NATIVE_PREREQUISITES)") + if $line =~ /invoke-rc.d\b.*--skip-systemd-native\b/ + && !$self->satisfies_systemd_native_prerequisites; + + } continue { + ++$position; + } + + return; +} + +sub remove_comments { + my ($line) = @_; + + return $line + unless length $line; + + my $simplified = $line; + + # Remove quoted strings so we can more easily ignore comments + # inside them + $simplified =~ s/(^|[^\\](?:\\\\)*)\'(?:\\.|[^\\\'])+\'/$1''/g; + $simplified =~ s/(^|[^\\](?:\\\\)*)\"(?:\\.|[^\\\"])+\"/$1""/g; + + # If the remaining string contains what looks like a comment, + # eat it. In either case, swap the unmodified script line + # back in for processing (if required) and return it. + if ($simplified =~ m/(?:^|[^[\\])[\s\&;\(\)](\#.*$)/) { + + my $comment = $1; + + # eat comment + $line =~ s/\Q$comment\E//; + } + + return $line; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Systemd/Tmpfiles.pm b/lib/Lintian/Check/Systemd/Tmpfiles.pm new file mode 100644 index 0000000..dc86628 --- /dev/null +++ b/lib/Lintian/Check/Systemd/Tmpfiles.pm @@ -0,0 +1,57 @@ +# systemd -- lintian check script -*- perl -*- +# +# Copyright (C) 2013 Michael Stapelberg +# Copyright (C) 2016-2020 Chris Lamb <lamby@debian.org> +# Copyright (C) 2021 Felix Lechner +# +# based on the apache2 checks file by: +# Copyright (C) 2012 Arno Toell +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Systemd::Tmpfiles; + +use v5.20; +use warnings; +use utf8; + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +sub visit_installed_files { + my ($self, $item) = @_; + + $self->pointed_hint('systemd-tmpfile-in-var-run', $item->pointer) + if $item->name =~ m{^ usr/lib/tmpfiles[.]d/ .* [.]conf $}sx + && $item->decoded_utf8 =~ m{^ d \s+ /var/run/ }msx; + + $self->pointed_hint('misplaced-systemd-tmpfiles', $item->pointer) + if $item->name =~ m{^ etc/tmpfiles[.]d/ .* [.]conf $}sx + && $item->is_file; + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Team/PkgJs/Deprecated.pm b/lib/Lintian/Check/Team/PkgJs/Deprecated.pm new file mode 100644 index 0000000..e04099d --- /dev/null +++ b/lib/Lintian/Check/Team/PkgJs/Deprecated.pm @@ -0,0 +1,76 @@ +# team/pkg-js/deprecated -- lintian check script for deprecated javascript -*- perl -*- +# +# Copyright (C) 2019 Xavier Guimard <yadd@debian.org> +# Copyright (C) 2020 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Team::PkgJs::Deprecated; + +use v5.20; +use warnings; +use utf8; + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +has javascript_team_maintained => ( + is => 'rw', + lazy => 1, + coerce => sub { my ($boolean) = @_; return ($boolean // 0); }, + default => sub { + my ($self) = @_; + + my $maintainer = $self->processable->fields->value('Maintainer'); + + # only for pkg-perl packages + return 1 + if $maintainer + =~ /pkg-javascript-maintainers\@lists\.alioth\.debian\.org/; + + return 0; + } +); + +sub visit_installed_files { + my ($self, $item) = @_; + + return + unless $self->javascript_team_maintained; + + return + unless $item->name =~ /\.js$/; + + my $bytes = $item->bytes; + return + unless length $bytes; + + $self->pointed_hint('nodejs-bad-buffer-usage', $item->pointer) + if $bytes =~ /\bnew\s+Buffer\(/; + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Team/PkgJs/Testsuite.pm b/lib/Lintian/Check/Team/PkgJs/Testsuite.pm new file mode 100644 index 0000000..2920fe0 --- /dev/null +++ b/lib/Lintian/Check/Team/PkgJs/Testsuite.pm @@ -0,0 +1,73 @@ +# team/pkg-js/testsuite -- lintian check script for detecting a missing Testsuite header -*- perl -*- +# +# Copyright (C) 2013 Niels Thykier <niels@thykier.net> +# Copyright (C) 2013 gregor herrmann <gregoa@debian.org> +# Copyright (C) 2014 Niko Tyni <ntyni@debian.org> +# Copyright (C) 2018 Florian Schlichting <fsfs@debian.org> +# Copyright (C) 2019 Xavier Guimard <yadd@debian.org> +# Copyright (C) 2020 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Team::PkgJs::Testsuite; + +use v5.20; +use warnings; +use utf8; + +use List::SomeUtils qw(none); + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +sub source { + my ($self) = @_; + + my $maintainer = $self->processable->fields->value('Maintainer'); + + # only for pkg-perl packages + return + unless $maintainer + =~ /pkg-javascript-maintainers\@lists\.alioth\.debian\.org/; + + unless ($self->processable->fields->declares('Testsuite')) { + + $self->hint('no-testsuite-header'); + return; + } + + my @testsuites + = $self->processable->fields->trimmed_list('Testsuite', qr/,/); + + if (none { $_ eq 'autopkgtest-pkg-perl' } @testsuites) { + + $self->hint('no-team-tests'); + return; + } + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Team/PkgJs/Vcs.pm b/lib/Lintian/Check/Team/PkgJs/Vcs.pm new file mode 100644 index 0000000..e4d4bec --- /dev/null +++ b/lib/Lintian/Check/Team/PkgJs/Vcs.pm @@ -0,0 +1,78 @@ +# team/pkg-js/debhelper -- lintian check script for checking Vcs-* headers -*- perl -*- +# +# Copyright (C) 2013 Niels Thykier <niels@thykier.net> +# Copyright (C) 2013 gregor herrmann <gregoa@debian.org> +# Copyright (C) 2013 Axel Beckert <abe@debian.org> +# Copyright (C) 2019 Xavier Guimard <yadd@debian.org> +# Copyright (C) 2020 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Team::PkgJs::Vcs; + +use v5.20; +use warnings; +use utf8; + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +my @NON_GIT_VCS_FIELDS + = qw(Vcs-Arch Vcs-Bzr Vcs-Cvs Vcs-Darcs Vcs-Hg Vcs-Mtn Vcs-Svn); +my @VCS_FIELDS = (@NON_GIT_VCS_FIELDS, qw(Vcs-Git Vcs-Browser)); + +sub source { + my ($self) = @_; + + my $fields = $self->processable->fields; + + # only for pkg-perl packages + my $maintainer = $fields->value('Maintainer'); + return + unless $maintainer + =~ /pkg-javascript-maintainers\@lists\.alioth\.debian\.org/; + + my @non_git = grep { $fields->declares($_) } @NON_GIT_VCS_FIELDS; + $self->hint('no-git', $_) for @non_git; + + # check for team locations + for my $name (@VCS_FIELDS) { + + next + unless $fields->declares($name); + + my $value = $fields->value($name); + + # get actual capitalization + my $original_name = $fields->literal_name($name); + + $self->hint('no-team-url', $original_name, $value) + unless $value=~ m{^https://salsa.debian.org/js-team}i; + } + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Team/PkgPerl/Testsuite.pm b/lib/Lintian/Check/Team/PkgPerl/Testsuite.pm new file mode 100644 index 0000000..2bf6776 --- /dev/null +++ b/lib/Lintian/Check/Team/PkgPerl/Testsuite.pm @@ -0,0 +1,78 @@ +# team/pkg-perl/no-testsuite -- lintian check script for detecting a missing Testsuite header -*- perl -*- +# +# Copyright (C) 2013 Niels Thykier <niels@thykier.net> +# Copyright (C) 2013 gregor herrmann <gregoa@debian.org> +# Copyright (C) 2014 Niko Tyni <ntyni@debian.org> +# Copyright (C) 2018 Florian Schlichting <fsfs@debian.org> +# Copyright (C) 2020 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Team::PkgPerl::Testsuite; + +use v5.20; +use warnings; +use utf8; + +use List::SomeUtils qw(none); + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +sub source { + my ($self) = @_; + + # only for pkg-perl packages + my $maintainer = $self->processable->fields->value('Maintainer'); + return + unless $maintainer=~ /pkg-perl-maintainers\@lists\.alioth\.debian\.org/; + + unless ($self->processable->fields->declares('Testsuite')) { + + $self->hint('no-testsuite-header'); + return; + } + + my @testsuites + = $self->processable->fields->trimmed_list('Testsuite', qr/,/); + + if (none { $_ eq 'autopkgtest-pkg-perl' } @testsuites) { + + $self->hint('no-team-tests'); + return; + } + + my $metajson = $self->processable->patched->lookup('META.json'); + my $metayml = $self->processable->patched->lookup('META.yml'); + + $self->hint('autopkgtest-needs-use-name') + unless (defined $metajson && $metajson->size) + || (defined $metayml && $metayml->size) + || $self->processable->patched->lookup('debian/tests/pkg-perl/use-name'); + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Team/PkgPerl/Vcs.pm b/lib/Lintian/Check/Team/PkgPerl/Vcs.pm new file mode 100644 index 0000000..2818b78 --- /dev/null +++ b/lib/Lintian/Check/Team/PkgPerl/Vcs.pm @@ -0,0 +1,77 @@ +# team/pkg-perl/debhelper -- lintian check script for checking Vcs-* headers -*- perl -*- +# +# Copyright (C) 2013 Niels Thykier <niels@thykier.net> +# Copyright (C) 2013 gregor herrmann <gregoa@debian.org> +# Copyright (C) 2013 Axel Beckert <abe@debian.org> +# Copyright (C) 2020 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Team::PkgPerl::Vcs; + +use v5.20; +use warnings; +use utf8; + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +my @NON_GIT_VCS_FIELDS + = qw(Vcs-Arch Vcs-Bzr Vcs-Cvs Vcs-Darcs Vcs-Hg Vcs-Mtn Vcs-Svn); +my @VCS_FIELDS = (@NON_GIT_VCS_FIELDS, qw(Vcs-Git Vcs-Browser)); + +sub source { + my ($self) = @_; + + my $fields = $self->processable->fields; + + # only for pkg-perl packages + my $maintainer = $fields->value('Maintainer'); + return + unless $maintainer=~ /pkg-perl-maintainers\@lists\.alioth\.debian\.org/; + + my @non_git = grep { $fields->declares($_) } @NON_GIT_VCS_FIELDS; + $self->hint('no-git', $_) for @non_git; + + # check for team locations + for my $name (@VCS_FIELDS) { + + next + unless $fields->declares($name); + + my $value = $fields->value($name); + + # get actual capitalization + my $original_name = $fields->literal_name($name); + + $self->hint('no-team-url', $original_name, $value) + unless $value + =~ m{^https://salsa\.debian\.org/perl-team/modules/packages}i; + } + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Team/PkgPerl/XsAbi.pm b/lib/Lintian/Check/Team/PkgPerl/XsAbi.pm new file mode 100644 index 0000000..bb6ea56 --- /dev/null +++ b/lib/Lintian/Check/Team/PkgPerl/XsAbi.pm @@ -0,0 +1,95 @@ +# team/pkg-perl/xs-abi -- lintian check script for XS target directory -*- perl -*- +# +# Copyright (C) 2014 Damyan Ivanov <dmn@debian.org> +# Copyright (C) 2014 Axel Beckert <abe@debian.org> +# Copyright (C) 2020 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Team::PkgPerl::XsAbi; + +use v5.20; +use warnings; +use utf8; + +use Dpkg::Version; + +use Lintian::Relation; + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +has relies_on_modern_api => ( + is => 'rw', + lazy => 1, + coerce => sub { my ($boolean) = @_; return ($boolean // 0); }, + default => sub { + my ($self) = @_; + + return 0 + if $self->processable->fields->value('Architecture') eq 'all'; + + my $depends = $self->processable->relation('strong'); + + my $api_version = $depends->visit( + sub { + my ($prerequisite) = @_; + + if ($prerequisite =~ /^perlapi-(\d[\d.]*)$/) { + return $1; + } + + return; + }, + Lintian::Relation::VISIT_OR_CLAUSE_FULL + | Lintian::Relation::VISIT_STOP_FIRST_MATCH + ); + + return 0 + unless defined $api_version; + + return 1 + if version_compare_relation($api_version, REL_GE, '5.19.11'); + + return 0; + } +); + +sub visit_installed_files { + my ($self, $item) = @_; + + return + unless $item->is_file; + + return + unless $item->name =~ m{^usr/lib/perl5/}; + + $self->pointed_hint('legacy-vendorarch-directory', $item->pointer) + if $self->relies_on_modern_api; + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Template/DhMake/Control/Vcs.pm b/lib/Lintian/Check/Template/DhMake/Control/Vcs.pm new file mode 100644 index 0000000..11bf366 --- /dev/null +++ b/lib/Lintian/Check/Template/DhMake/Control/Vcs.pm @@ -0,0 +1,77 @@ +# template/dh-make/control/vcs -- lintian check script -*- perl -*- +# +# Copyright (C) 2004 Marc Brockschmidt +# Copyright (C) 2020 Chris Lamb <lamby@debian.org> +# Copyright (C) 2020-2021 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Template::DhMake::Control::Vcs; + +use v5.20; +use warnings; +use utf8; + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +sub source { + my ($self) = @_; + + my $item = $self->processable->debian_control->item; + return + unless defined $item; + + my @lines = split(/\n/, $item->decoded_utf8); + + my $line; + my $position = 1; + while (defined($line = shift @lines)) { + + $line =~ s{\s*$}{}; + + if ( + $line =~ m{\A \# \s* Vcs-(?:Git|Browser): \s* + (?:git|http)://git\.debian\.org/ + (?:\?p=)?collab-maint/<pkg>\.git}smx + ) { + + my $pointer = $item->pointer($position); + + $self->pointed_hint('control-file-contains-dh-make-vcs-comment', + $pointer, $line); + + # once per source + last; + } + + } continue { + ++$position; + } + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Testsuite.pm b/lib/Lintian/Check/Testsuite.pm new file mode 100644 index 0000000..c049527 --- /dev/null +++ b/lib/Lintian/Check/Testsuite.pm @@ -0,0 +1,351 @@ +# testsuite -- lintian check script -*- perl -*- + +# Copyright (C) 2013 Nicolas Boulenguez <nicolas@debian.org> +# Copyright (C) 2017-2020 Chris Lamb <lamby@debian.org> +# Copyright (C) 2021 Felix Lechner + +# This file is part of lintian. + +# Lintian is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. + +# Lintian is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with Lintian. If not, see <http://www.gnu.org/licenses/>. + +package Lintian::Check::Testsuite; + +use v5.20; +use warnings; +use utf8; + +use Const::Fast; +use List::Compare; +use List::SomeUtils qw(any none uniq); +use Path::Tiny; +use Unicode::UTF8 qw(encode_utf8); + +use Lintian::Deb822; +use Lintian::Deb822::Constants qw(DCTRL_COMMENTS_AT_EOL); +use Lintian::Relation; + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +const my $DOT => q{.}; +const my $DOUBLE_QUOTE => q{"}; + +const my @KNOWN_FIELDS => qw( + Tests + Restrictions + Features + Depends + Tests-Directory + Test-Command + Architecture + Classes +); + +my %KNOWN_FEATURES = map { $_ => 1 } qw(); + +our $PYTHON3_ALL_DEPEND + = 'python3-all:any | python3-all-dev:any | python3-all-dbg:any'; + +my %KNOWN_SPECIAL_DEPENDS = map { $_ => 1 } qw( + @ + @builddeps@ +); + +sub source { + my ($self) = @_; + + my $KNOWN_TESTSUITES= $self->data->load('testsuite/known-testsuites'); + + my $debian_control = $self->processable->debian_control; + + my $testsuite = $debian_control->source_fields->value('Testsuite'); + my @testsuites = split(/\s*,\s*/, $testsuite); + + my $lc = List::Compare->new(\@testsuites, [$KNOWN_TESTSUITES->all]); + my @unknown = $lc->get_Lonly; + + my $control_position + = $debian_control->source_fields->position('Testsuite'); + my $control_pointer = $debian_control->item->pointer($control_position); + + $self->pointed_hint('unknown-testsuite', $control_pointer, $_)for @unknown; + + my $tests_control + = $self->processable->patched->resolve_path('debian/tests/control'); + + # field added automatically since dpkg 1.17 when d/tests/control is present + $self->pointed_hint('unnecessary-testsuite-autopkgtest-field', + $control_pointer) + if (any { $_ eq 'autopkgtest' } @testsuites) && defined $tests_control; + + # need d/tests/control for plain autopkgtest + $self->pointed_hint('missing-tests-control', $control_pointer) + if (any { $_ eq 'autopkgtest' } @testsuites) && !defined $tests_control; + + die encode_utf8('debian tests control is not a regular file') + if defined $tests_control && !$tests_control->is_regular_file; + + if (defined $tests_control && $tests_control->is_valid_utf8) { + + # another check complains about invalid encoding + my $contents = $tests_control->decoded_utf8; + + my $control_file = Lintian::Deb822->new; + $control_file->parse_string($contents, DCTRL_COMMENTS_AT_EOL); + + my @sections = @{$control_file->sections}; + + $self->pointed_hint('empty-debian-tests-control', + $tests_control->pointer) + unless @sections; + + $self->check_control_paragraph($tests_control, $_) for @sections; + + my @thorough + = grep { $_->value('Restrictions') !~ m{\bsuperficial\b} } @sections; + $self->pointed_hint('superficial-tests', $tests_control->pointer) + if @sections && !@thorough; + + if (scalar @sections == 1) { + + my $section = $sections[0]; + + my $command = $section->unfolded_value('Test-Command'); + my $position = $section->position('Test-Command'); + my $pointer = $tests_control->pointer($position); + + $self->pointed_hint('no-op-testsuite', $pointer) + if $command =~ m{^ \s* (?:/bin/)? true \s* $}sx; + } + } + + my $control_autodep8 + = $self->processable->patched->resolve_path( + 'debian/tests/control.autodep8'); + $self->pointed_hint('debian-tests-control-autodep8-is-obsolete', + $control_autodep8->pointer) + if defined $control_autodep8; + + return; +} + +sub check_control_paragraph { + my ($self, $tests_control, $section) = @_; + + my $section_pointer = $tests_control->pointer($section->position); + + $self->pointed_hint('no-tests', $section_pointer) + unless $section->declares('Tests') || $section->declares('Test-Command'); + + $self->pointed_hint('conflicting-test-fields', $section_pointer, 'Tests', + 'Test-Command') + if $section->declares('Tests') && $section->declares('Test-Command'); + + my @lowercase_names = map { lc } $section->names; + my @lowercase_known = map { lc } @KNOWN_FIELDS; + + my $lc = List::Compare->new(\@lowercase_names, \@lowercase_known); + my @lowercase_unknown = $lc->get_Lonly; + + my @unknown = map { $section->literal_name($_) } @lowercase_unknown; + $self->pointed_hint('unknown-runtime-tests-field', + $tests_control->pointer($section->position($_)), $_) + for @unknown; + + my @features = $section->trimmed_list('Features', qr/ \s* , \s* | \s+ /x); + for my $feature (@features) { + + my $position = $section->position('Features'); + my $pointer = $tests_control->pointer($position); + + $self->pointed_hint('unknown-runtime-tests-feature',$pointer, $feature) + unless exists $KNOWN_FEATURES{$feature} + || $feature =~ m/^test-name=\S+/; + } + + my $KNOWN_RESTRICTIONS= $self->data->load('testsuite/known-restrictions'); + my $KNOWN_OBSOLETE_RESTRICTIONS + = $self->data->load('testsuite/known-obsolete-restrictions'); + + my @restrictions + = $section->trimmed_list('Restrictions', qr/ \s* , \s* | \s+ /x); + for my $restriction (@restrictions) { + + my $position = $section->position('Restrictions'); + my $pointer = $tests_control->pointer($position); + + $self->pointed_hint('unknown-runtime-tests-restriction', + $pointer, $restriction) + unless $KNOWN_RESTRICTIONS->recognizes($restriction); + + $self->pointed_hint('obsolete-runtime-tests-restriction', + $pointer, $restriction) + if $KNOWN_OBSOLETE_RESTRICTIONS->recognizes($restriction); + } + + my $test_command = $section->unfolded_value('Test-Command'); + + # trim both sides + $test_command =~ s/^\s+|\s+$//g; + + $self->pointed_hint('backgrounded-test-command', + $tests_control->pointer($section->position('Test-Command')), + $test_command) + if $test_command =~ / & $/x; + + my $directory = $section->unfolded_value('Tests-Directory') + || 'debian/tests'; + + my $tests_position = $section->position('Tests'); + my $tests_pointer = $tests_control->pointer($tests_position); + + my @tests = uniq +$section->trimmed_list('Tests', qr/ \s* , \s* | \s+ /x); + + my @illegal_names = grep { !m{^ [ [:alnum:] \+ \- \. / ]+ $}x } @tests; + $self->pointed_hint('illegal-runtime-test-name', $tests_pointer, $_) + for @illegal_names; + + my @paths; + if ($directory eq $DOT) { + + # Special case with "Tests-Directory: ." (see #849880) + @paths = @tests; + + } else { + @paths = map { "$directory/$_" } @tests; + } + + my $debian_control = $self->processable->debian_control; + + my $depends_norestriction = Lintian::Relation->new; + $depends_norestriction->load($section->unfolded_value('Depends')); + + my $all_tests_use_supported = 1; + + for my $path (@paths) { + + my $item = $self->processable->patched->resolve_path($path); + if (!defined $item) { + + $self->pointed_hint('missing-runtime-test-file', $tests_pointer, + $path); + next; + } + + if (!$item->is_open_ok) { + + $self->pointed_hint('runtime-test-file-is-not-a-regular-file', + $tests_pointer, $path); + next; + } + + my $queries_all_python_versions = 0; + + open(my $fd, '<', $item->unpacked_path) + or die encode_utf8('Cannot open ' . $item->unpacked_path); + + my $position = 1; + while (my $line = <$fd>) { + + my $pointer = $item->pointer($position); + + $self->pointed_hint('uses-deprecated-adttmp', $pointer) + if $line =~ /ADTTMP/; + + if ($line =~ /(py3versions)((?:\s+--?\w+)*)/) { + + my $command = $1 . $2; + my $options = $2; + + $self->pointed_hint( + 'runtime-test-file-uses-installed-python-versions', + $pointer, $command) + if $options =~ /\s(?:-\w*i|--installed)/; + + $self->pointed_hint( +'runtime-test-file-uses-supported-python-versions-without-test-depends', + $pointer, + $command + ) + if $options =~ /\s(?:-\w*s|--supported)/ + && !$depends_norestriction->satisfies($PYTHON3_ALL_DEPEND); + + $self->pointed_hint('declare-python-versions-for-test', + $pointer, $command) + if $options =~ m{ \s (?: -\w*r | --requested ) }x + && !$debian_control->source_fields->declares( + 'X-Python3-Version'); + + $queries_all_python_versions = 1 + if $options =~ m{ \s (?: -\w*s | --supported ) }x; + } + + } continue { + ++$position; + } + + close $fd; + + $all_tests_use_supported = 0 + if !$queries_all_python_versions; + + $self->pointed_hint('test-leaves-python-version-untested', + $item->pointer) + if $depends_norestriction->satisfies($PYTHON3_ALL_DEPEND) + && !$queries_all_python_versions; + } + + if ( $debian_control->source_fields->declares('X-Python3-Version') + && $all_tests_use_supported) { + + my $position + = $debian_control->source_fields->position('X-Python3-Version'); + my $pointer = $debian_control->item->pointer($position); + + $self->pointed_hint('drop-python-version-declaration',$pointer); + } + + if ($section->declares('Depends')) { + + my $depends = $section->unfolded_value('Depends'); + + # trim both sides + $depends =~ s/^\s+|\s+$//g; + + my $relation = Lintian::Relation->new->load($depends); + + # autopkgtest allows @ as predicate as an exception + my @unparsable = grep { !exists $KNOWN_SPECIAL_DEPENDS{$_} } + $relation->unparsable_predicates; + + my $position = $section->position('Depends'); + my $pointer = $tests_control->pointer($position); + + $self->pointed_hint('testsuite-dependency-has-unparsable-elements', + $pointer, $DOUBLE_QUOTE . $_ . $DOUBLE_QUOTE) + for @unparsable; + } + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Triggers.pm b/lib/Lintian/Check/Triggers.pm new file mode 100644 index 0000000..738f3c6 --- /dev/null +++ b/lib/Lintian/Check/Triggers.pm @@ -0,0 +1,145 @@ +# triggers -- lintian check script -*- perl -*- + +# Copyright (C) 2017 Niels Thykier +# Copyright (C) 2021 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Triggers; + +use v5.20; +use warnings; +use utf8; +use autodie qw(open); + +use Const::Fast; +use List::SomeUtils qw(all); +use Unicode::UTF8 qw(encode_utf8); + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +const my $SPACE => q{ }; +const my $LEFT_PARENTHESIS => q{(}; +const my $RIGHT_PARENTHESIS => q{)}; + +has TRIGGER_TYPES => ( + is => 'rw', + lazy => 1, + default => sub { + my ($self) = @_; + + my %trigger_types; + + my $data + = $self->data->load('triggers/trigger-types',qr{ \s* => \s* }x); + for my $type ($data->all) { + + my $attributes = $data->value($type); + + my %one_type; + + for my $pair (split(m{ \s* , \s* }x, $attributes)) { + + my ($flag, $setting) = split(m{ \s* = \s* }x, $pair, 2); + $one_type{$flag} = $setting; + } + + die encode_utf8( +"Invalid trigger-types: $type is defined as implicit-await but not await" + ) + if $one_type{'implicit-await'} + && !$one_type{await}; + + $trigger_types{$type} = \%one_type; + } + + return \%trigger_types; + } +); + +sub visit_control_files { + my ($self, $item) = @_; + + return + unless $item->name eq 'triggers'; + + my @lines = split(m{\n}, $item->decoded_utf8); + + my %positions_by_trigger_name; + + my $position = 1; + while (defined(my $line = shift @lines)) { + + # trim both ends + $line =~ s/^\s+|\s+$//g; + + next + if $line =~ m/^(?:\s*)(?:#.*)?$/; + + my ($trigger_type, $trigger_name) = split($SPACE, $line, 2); + next + unless all { length } ($trigger_type, $trigger_name); + + $positions_by_trigger_name{$trigger_name} //= []; + push(@{$positions_by_trigger_name{$trigger_name}}, $position); + + my $trigger_info = $self->TRIGGER_TYPES->{$trigger_type}; + if (!$trigger_info) { + + $self->pointed_hint('unknown-trigger', $item->pointer($position), + $trigger_type); + next; + } + + $self->pointed_hint('uses-implicit-await-trigger', + $item->pointer($position), + $trigger_type) + if $trigger_info->{'implicit-await'}; + + } continue { + ++$position; + } + + my @duplicates= grep { @{$positions_by_trigger_name{$_}} > 1 } + keys %positions_by_trigger_name; + + for my $trigger_name (@duplicates) { + + my $indicator + = $LEFT_PARENTHESIS . 'lines' + . $SPACE + . join($SPACE, + sort { $a <=> $b }@{$positions_by_trigger_name{$trigger_name}}) + . $RIGHT_PARENTHESIS; + + $self->pointed_hint('repeated-trigger-name', $item->pointer, + $trigger_name, $indicator); + } + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Udev.pm b/lib/Lintian/Check/Udev.pm new file mode 100644 index 0000000..ca3eac7 --- /dev/null +++ b/lib/Lintian/Check/Udev.pm @@ -0,0 +1,169 @@ +# udev -- lintian check script -*- perl -*- + +# Copyright (C) 2016 Petter Reinholdtsen +# Copyright (C) 2018 Chris Lamb <lamby@debian.org> +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Udev; + +use v5.20; +use warnings; +use utf8; +use autodie qw(open); + +use Const::Fast; + +const my $EMPTY => q{}; + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +# Check /lib/udev/rules.d/, detect use of MODE="0666" and use of +# GROUP="plugdev" without TAG+="uaccess". + +sub installable { + my ($self) = @_; + + my $rules_dir + = $self->processable->installed->resolve_path('lib/udev/rules.d/'); + return + unless $rules_dir; + + for my $item ($rules_dir->children) { + + if (!$item->is_open_ok) { + + $self->pointed_hint('udev-rule-unreadable', $item->pointer); + next; + } + + $self->check_udev_rules($item); + } + + return; +} + +sub check_rule { + my ($self, $item, $position, $in_goto, $rule) = @_; + + # for USB, if everyone or the plugdev group members are + # allowed access, the uaccess tag should be used too. + $self->pointed_hint( + 'udev-rule-missing-uaccess', + $item->pointer($position), + 'user accessible device missing TAG+="uaccess"' + ) + if $rule =~ m/SUBSYSTEM=="usb"/ + && ( $rule =~ m/GROUP="plugdev"/ + || $rule =~ m/MODE="0666"/) + && $rule !~ m/ENV\{COLOR_MEASUREMENT_DEVICE\}/ + && $rule !~ m/ENV\{DDC_DEVICE\}/ + && $rule !~ m/ENV\{ID_CDROM\}/ + && $rule !~ m/ENV\{ID_FFADO\}/ + && $rule !~ m/ENV\{ID_GPHOTO2\}/ + && $rule !~ m/ENV\{ID_HPLIP\}/ + && $rule !~ m/ENV\{ID_INPUT_JOYSTICK\}/ + && $rule !~ m/ENV\{ID_MAKER_TOOL\}/ + && $rule !~ m/ENV\{ID_MEDIA_PLAYER\}/ + && $rule !~ m/ENV\{ID_PDA\}/ + && $rule !~ m/ENV\{ID_REMOTE_CONTROL\}/ + && $rule !~ m/ENV\{ID_SECURITY_TOKEN\}/ + && $rule !~ m/ENV\{ID_SMARTCARD_READER\}/ + && $rule !~ m/ENV\{ID_SOFTWARE_RADIO\}/ + && $rule !~ m/TAG\+="uaccess"/; + + # Matching rules mentioning vendor/product should also specify + # subsystem, as vendor/product is subsystem specific. + $self->pointed_hint( + 'udev-rule-missing-subsystem', + $item->pointer($position), + 'vendor/product matching missing SUBSYSTEM specifier' + ) + if $rule =~ m/ATTR\{idVendor\}=="[0-9a-fA-F]+"/ + && $rule =~ m/ATTR\{idProduct\}=="[0-9a-fA-F]*"/ + && !$in_goto + && $rule !~ m/SUBSYSTEM=="[^"]+"/; + + return 0; +} + +sub check_udev_rules { + my ($self, $item) = @_; + + my $contents = $item->decoded_utf8; + my @lines = split(/\n/, $contents); + + my $continued = $EMPTY; + my $in_goto = $EMPTY; + my $result = 0; + + my $position = 1; + while (defined(my $line = shift @lines)) { + + if (length $continued) { + $line = $continued . $line; + $continued = $EMPTY; + } + + if ($line =~ /^(.*)\\$/) { + $continued = $1; + next; + } + + # Skip comments + next + if $line =~ /^#.*/; + + $in_goto = $EMPTY + if $line =~ /LABEL="[^"]+"/; + + $in_goto = $line + if $line =~ /SUBSYSTEM!="[^"]+"/ + && $line =~ /GOTO="[^"]+"/; + + $result |= $self->check_rule($item, $position, $in_goto, $line); + + } continue { + $position++; + } + + return $result; +} + +sub visit_installed_files { + my ($self, $item) = @_; + + return + unless $item->name =~ m{^etc/udev/}; + + # /etc/udev/rules.d + $self->pointed_hint('udev-rule-in-etc', $item->pointer) + if $item->name =~ m{^etc/udev/rules\.d/\S}; + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Unpack.pm b/lib/Lintian/Check/Unpack.pm new file mode 100644 index 0000000..9395942 --- /dev/null +++ b/lib/Lintian/Check/Unpack.pm @@ -0,0 +1,67 @@ +# unpack -- lintian check script -*- perl -*- + +# Copyright (C) 2021 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Unpack; + +use v5.20; +use warnings; +use utf8; + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +sub source { + my ($self) = @_; + + my $processable = $self->processable; + + $self->hint('unpack-message-for-source', $_) + for @{$processable->patched->unpack_messages}; + + # empty for native + $self->hint('unpack-message-for-orig', $_) + for @{$processable->orig->unpack_messages}; + + return; +} + +sub installable { + my ($self) = @_; + + my $processable = $self->processable; + + $self->hint('unpack-message-for-deb-data', $_) + for @{$processable->installed->unpack_messages}; + + $self->hint('unpack-message-for-deb-control', $_) + for @{$processable->control->unpack_messages}; + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/UpstreamSignature.pm b/lib/Lintian/Check/UpstreamSignature.pm new file mode 100644 index 0000000..ec8590b --- /dev/null +++ b/lib/Lintian/Check/UpstreamSignature.pm @@ -0,0 +1,121 @@ +# upstream-signature -- lintian check script -*- perl -*- +# +# Copyright (C) 2019 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::UpstreamSignature; + +use v5.20; +use warnings; +use utf8; + +use Path::Tiny; + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +sub source { + my ($self) = @_; + + my $SIGNING_KEY_FILENAMES + = $self->data->load('common/signing-key-filenames'); + + my @keynames = $SIGNING_KEY_FILENAMES->all; + my @keypaths + = map { $self->processable->patched->resolve_path("debian/$_") } + @keynames; + my @keys = grep { $_ && $_->is_file } @keypaths; + + # in uscan's gittag mode,signature will never match + my $watch = $self->processable->patched->resolve_path('debian/watch'); + my $gittag = $watch && $watch->bytes =~ /pgpmode=gittag/; + + my @filenames = sort keys %{$self->processable->files}; + my @origtar= grep { /^.*\.orig(?:-[A-Za-z\d-]+)?\.tar\./ } + grep { !/\.asc$/ }@filenames; + + my %signatures; + for my $filename (@origtar) { + + my ($uncompressed) = ($filename =~ /(^.*\.tar)/); + + my @componentsigs; + for my $tarball ($filename, $uncompressed) { + my $signaturename = "$tarball.asc"; + push(@componentsigs, $signaturename) + if exists $self->processable->files->{$signaturename}; + } + + $signatures{$filename} = \@componentsigs; + } + + # orig tarballs should be signed if upstream's public key is present + if (@keys && !$self->processable->repacked && !$gittag) { + + for my $filename (@origtar) { + + $self->hint('orig-tarball-missing-upstream-signature', $filename) + unless scalar @{$signatures{$filename}}; + } + } + + my $parentdir = path($self->processable->path)->parent->stringify; + + # check signatures + my @allsigs = map { @{$signatures{$_}} } @origtar; + for my $signature (@allsigs) { + + # take from location near input file + my $contents = path($parentdir)->child($signature)->slurp; + + if ($contents =~ /^-----BEGIN PGP ARMORED FILE-----/m) { + + if ($contents =~ /^LS0tLS1CRUd/m) { + # doubly armored + $self->hint('doubly-armored-upstream-signature', $signature); + + } else { + # non standard armored header + $self->hint('explicitly-armored-upstream-signature', + $signature); + } + + my @spurious = ($contents =~ /\n([^:\n]+):/g); + $self->hint('spurious-fields-in-upstream-signature', + $signature, @spurious) + if @spurious; + } + + # multiple signatures in one file + $self->hint('concatenated-upstream-signatures', $signature) + if $contents + =~ m/(?:-----BEGIN PGP SIGNATURE-----[^-]*-----END PGP SIGNATURE-----\s*){2,}/; + } + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Usrmerge.pm b/lib/Lintian/Check/Usrmerge.pm new file mode 100644 index 0000000..a435470 --- /dev/null +++ b/lib/Lintian/Check/Usrmerge.pm @@ -0,0 +1,66 @@ +# usrmerge -- lintian check script -*- perl -*- + +# Copyright (C) 2016 Marco d'Itri +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Usrmerge; + +use v5.20; +use warnings; +use utf8; + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +sub visit_installed_files { + my ($self, $item) = @_; + + return + unless $item->name =~ m{^(?:s?bin|lib(?:|[ox]?32|64))/}; + + my $usrfile = $self->processable->installed->lookup("usr/$item"); + + return + unless defined $usrfile; + + return + if $item->is_dir and $usrfile->is_dir; + + if ($item =~ m{^lib.+\.(?:so[\.0-9]*|a)$}) { + $self->pointed_hint('library-in-root-and-usr', $item->pointer, + 'already in:', $usrfile->name); + + } else { + $self->pointed_hint( + 'file-in-root-and-usr', $item->pointer, + 'already in:', $usrfile->name + ); + } + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Vim.pm b/lib/Lintian/Check/Vim.pm new file mode 100644 index 0000000..ef889f5 --- /dev/null +++ b/lib/Lintian/Check/Vim.pm @@ -0,0 +1,53 @@ +# vim -- lintian check script -*- perl -*- + +# Copyright (C) 1998 Christian Schwarz and Richard Braakman +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Vim; + +use v5.20; +use warnings; +use utf8; + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +sub visit_installed_files { + my ($self, $item) = @_; + + if ($item->name =~ m{^usr/share/vim/vim(?:current|\d\d)/([^/]+)}){ + my $is_vimhelp + = $1 eq 'doc' && $self->processable->name =~ /^vimhelp-\w+$/; + my $is_vim = $self->processable->source_name =~ /vim/; + + $self->pointed_hint('vim-addon-within-vim-runtime-path',$item->pointer) + unless $is_vim || $is_vimhelp; + } + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Check/Vim/Addons.pm b/lib/Lintian/Check/Vim/Addons.pm new file mode 100644 index 0000000..9823f0c --- /dev/null +++ b/lib/Lintian/Check/Vim/Addons.pm @@ -0,0 +1,48 @@ +# vim -- lintian check script -*- perl -*- + +# Copyright (C) Louis-Philippe Veronneau +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Check::Vim::Addons; + +use v5.20; +use warnings; +use utf8; + +use Moo; +use namespace::clean; + +with 'Lintian::Check'; + +sub installable { + my ($self) = @_; + + $self->hint('obsolete-vim-addon-manager') + if $self->processable->relation('strong') + ->satisfies('vim-addon-manager'); + + return; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Conffiles.pm b/lib/Lintian/Conffiles.pm new file mode 100644 index 0000000..1daa2c4 --- /dev/null +++ b/lib/Lintian/Conffiles.pm @@ -0,0 +1,162 @@ +# -*- perl -*- Lintian::Processable::Installable::Conffiles +# +# Copyright (C) 2019 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by the Free +# Software Foundation; either version 2 of the License, or (at your option) +# any later version. +# +# This program is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +# more details. +# +# You should have received a copy of the GNU General Public License along with +# this program. If not, see <http://www.gnu.org/licenses/>. + +package Lintian::Conffiles; + +use v5.20; +use warnings; +use utf8; + +use Const::Fast; + +use Lintian::Conffiles::Entry; + +const my $SPACE => q{ }; +const my $NEWLINE => qq{\n}; + +const my $TRUE => 1; +const my $FALSE => 0; + +use Moo; +use namespace::clean; + +=head1 NAME + +Lintian::Conffiles - access to collected control data for conffiles + +=head1 SYNOPSIS + + use Lintian::Processable; + +=head1 DESCRIPTION + +Lintian::Conffiles provides an interface to control data for conffiles. + +=head1 INSTANCE METHODS + +=over 4 + +=item by_file + +=cut + +has by_file => (is => 'rw', default => sub { {} }); + +=item parse + +=cut + +sub parse { + my ($self, $item) = @_; + + return + unless $item && $item->is_valid_utf8; + + my @lines = split($NEWLINE, $item->decoded_utf8); + + # dpkg strips whitespace (using isspace) from the right hand + # side of the file name. + + # trim right + s/\s+$// for @lines; + + my $position = 1; + for my $line (@lines) { + + next + unless length $line; + + my @words = split($SPACE, $line); + my $relative = pop @words; + + my $conffile = Lintian::Conffiles::Entry->new; + + # path must be absolute + if ($relative =~ s{^ / }{}x) { + $conffile->is_relative($FALSE); + } else { + $conffile->is_relative($TRUE); + } + + $conffile->instructions(\@words); + $conffile->position($position); + + # but use relative path as key + $self->by_file->{$relative} //= []; + push(@{$self->by_file->{$relative}}, $conffile); + + } continue { + ++$position; + } + + return; +} + +=item all + +Returns a list of absolute filenames found for conffiles. + +=cut + +sub all { + my ($self) = @_; + + return keys %{$self->by_file}; +} + +=item is_known (FILE) + +Returns a truth value if FILE is listed in the conffiles control file. +If the control file is not present or FILE is not listed in it, it +returns C<undef>. + +Note that FILE should be the filename relative to the package root +(even though the control file uses absolute paths). If the control +file does relative paths, they are assumed to be relative to the +package root as well (and used without warning). + +=cut + +sub is_known { + my ($self, $relative) = @_; + + return 1 + if exists $self->by_file->{$relative}; + + return 0; +} + +=back + +=head1 AUTHOR + +Originally written by Felix Lechner <felix.lechner@lease-up.com> for +Lintian. + +=head1 SEE ALSO + +lintian(1) + +=cut + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Conffiles/Entry.pm b/lib/Lintian/Conffiles/Entry.pm new file mode 100644 index 0000000..488cd99 --- /dev/null +++ b/lib/Lintian/Conffiles/Entry.pm @@ -0,0 +1,72 @@ +# -*- perl -*- Lintian::Conffiles::Entry +# +# Copyright (C) 2021 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by the Free +# Software Foundation; either version 2 of the License, or (at your option) +# any later version. +# +# This program is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +# more details. +# +# You should have received a copy of the GNU General Public License along with +# this program. If not, see <http://www.gnu.org/licenses/>. + +package Lintian::Conffiles::Entry; + +use v5.20; +use warnings; +use utf8; + +use Moo; +use namespace::clean; + +=head1 NAME + +Lintian::Conffiles::Entry - access to collected control data for conffiles + +=head1 SYNOPSIS + + use Lintian::Processable; + +=head1 DESCRIPTION + +Lintian::Conffiles::Entry provides an interface to control data for conffiles. + +=head1 INSTANCE METHODS + +=over 4 + +=item instructions +=item is_relative +=item position + +=cut + +has instructions => (is => 'rw', default => sub { [] }); +has is_relative => (is => 'rw'); +has position => (is => 'rw'); + +=back + +=head1 AUTHOR + +Originally written by Felix Lechner <felix.lechner@lease-up.com> for +Lintian. + +=head1 SEE ALSO + +lintian(1) + +=cut + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Data.pm b/lib/Lintian/Data.pm new file mode 100644 index 0000000..e7cb626 --- /dev/null +++ b/lib/Lintian/Data.pm @@ -0,0 +1,353 @@ +# Copyright (C) 2011 Niels Thykier <niels@thykier.net> +# Copyright (C) 2018 Chris Lamb <lamby@debian.org> +# Copyright (C) 2021 Felix Lechner +# Copyright (C) 2022 Axel Beckert +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Data; + +use v5.20; +use warnings; +use utf8; + +use Carp qw(croak); +use Unicode::UTF8 qw(encode_utf8); + +use Lintian::Data::Architectures; +use Lintian::Data::Archive::AutoRejection; +use Lintian::Data::Archive::Sections; +use Lintian::Data::Buildflags::Hardening; +use Lintian::Data::Debhelper::Addons; +use Lintian::Data::Debhelper::Commands; +use Lintian::Data::Debhelper::Levels; +use Lintian::Data::Fonts; +use Lintian::Data::InitD::VirtualFacilities; +use Lintian::Data::Policy::Releases; +use Lintian::Data::Provides::MailTransportAgent; +use Lintian::Data::Stylesheet; +use Lintian::Data::Traditional; + +use Moo; +use namespace::clean; + +with 'Lintian::Data::Authorities'; + +=head1 NAME + +Lintian::Data - Data parser for Lintian + +=head1 SYNOPSIS + + my $profile = Lintian::Data->new (vendor => 'debian'); + +=head1 DESCRIPTION + +Lintian::Data handles finding, parsing and implementation of Lintian Data + +=head1 INSTANCE METHODS + +=over 4 + +=item vendor + +=item data_paths + +=item data_cache + +=cut + +has vendor => (is => 'rw'); + +has data_paths => ( + is => 'rw', + coerce => sub { my ($arrayref) = @_; return ($arrayref // []); }, + default => sub { [] } +); + +has data_cache => ( + is => 'rw', + coerce => sub { my ($hashref) = @_; return ($hashref // {}); }, + default => sub { {} } +); + +=item load + +=cut + +sub load { + my ($self, $location, $separator) = @_; + + croak encode_utf8('no data type specified') + unless $location; + + unless (exists $self->data_cache->{$location}) { + + my $cache = Lintian::Data::Traditional->new; + $cache->location($location); + $cache->separator($separator); + + $cache->load($self->data_paths, $self->vendor); + + $self->data_cache->{$location} = $cache; + } + + return $self->data_cache->{$location}; +} + +=item all_sources + +=cut + +sub all_sources { + my ($self) = @_; + + my @sources = ( + $self->architectures,$self->auto_rejection, + $self->debhelper_addons,$self->debhelper_commands, + $self->debhelper_levels,$self->fonts, + $self->hardening_buildflags,$self->mail_transport_agents, + $self->policy_releases,$self->sections, + $self->style_sheet,$self->virtual_initd_facilities + ); + + return @sources; +} + +=item architectures + +=cut + +has architectures => ( + is => 'rw', + lazy => 1, + default => sub { + my ($self) = @_; + + my $architectures = Lintian::Data::Architectures->new; + $architectures->load($self->data_paths, $self->vendor); + + return $architectures; + } +); + +=item auto_rejection + +=cut + +has auto_rejection => ( + is => 'rw', + lazy => 1, + default => sub { + my ($self) = @_; + + my $auto_rejection = Lintian::Data::Archive::AutoRejection->new; + $auto_rejection->load($self->data_paths, $self->vendor); + + return $auto_rejection; + } +); + +=item debhelper_addons + +=cut + +has debhelper_addons => ( + is => 'rw', + lazy => 1, + default => sub { + my ($self) = @_; + + my $addons = Lintian::Data::Debhelper::Addons->new; + $addons->load($self->data_paths, $self->vendor); + + return $addons; + } +); + +=item debhelper_commands + +=cut + +has debhelper_commands => ( + is => 'rw', + lazy => 1, + default => sub { + my ($self) = @_; + + my $commands = Lintian::Data::Debhelper::Commands->new; + $commands->load($self->data_paths, $self->vendor); + + return $commands; + } +); + +=item debhelper_levels + +=cut + +has debhelper_levels => ( + is => 'rw', + lazy => 1, + default => sub { + my ($self) = @_; + + my $levels = Lintian::Data::Debhelper::Levels->new; + $levels->load($self->data_paths, $self->vendor); + + return $levels; + } +); + +=item fonts + +=cut + +has fonts => ( + is => 'rw', + lazy => 1, + default => sub { + my ($self) = @_; + + my $fonts = Lintian::Data::Fonts->new; + $fonts->load($self->data_paths, $self->vendor); + + return $fonts; + } +); + +=item hardening_buildflags + +=cut + +has hardening_buildflags => ( + is => 'rw', + lazy => 1, + default => sub { + my ($self) = @_; + + my $buildflags = Lintian::Data::Buildflags::Hardening->new; + $buildflags->load($self->data_paths, $self->vendor); + + return $buildflags; + } +); + +=item mail_transport_agents + +=cut + +has mail_transport_agents => ( + is => 'rw', + lazy => 1, + default => sub { + my ($self) = @_; + + my $manual = Lintian::Data::Provides::MailTransportAgent->new; + $manual->load($self->data_paths, $self->vendor); + + return $manual; + } +); + +=item policy_releases + +=cut + +has policy_releases => ( + is => 'rw', + lazy => 1, + default => sub { + my ($self) = @_; + + my $releases = Lintian::Data::Policy::Releases->new; + $releases->load($self->data_paths, $self->vendor); + + return $releases; + } +); + +=item sections + +=cut + +has sections => ( + is => 'rw', + lazy => 1, + default => sub { + my ($self) = @_; + + my $sections = Lintian::Data::Archive::Sections->new; + $sections->load($self->data_paths, $self->vendor); + + return $sections; + } +); + +=item style_sheet + +=cut + +has style_sheet => ( + is => 'rw', + lazy => 1, + default => sub { + my ($self) = @_; + + my $releases = Lintian::Data::Stylesheet->new; + $releases->load($self->data_paths, $self->vendor); + + return $releases; + } +); + +=item virtual_initd_facilities + +=cut + +has virtual_initd_facilities => ( + is => 'rw', + lazy => 1, + default => sub { + my ($self) = @_; + + my $facilities = Lintian::Data::InitD::VirtualFacilities->new; + $facilities->load($self->data_paths, $self->vendor); + + return $facilities; + } +); + +=back + +=head1 AUTHOR + +Originally written by Niels Thykier <niels@thykier.net> for Lintian. + +=head1 SEE ALSO + +lintian(1) + +=cut + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Data/Architectures.pm b/lib/Lintian/Data/Architectures.pm new file mode 100644 index 0000000..c45ced4 --- /dev/null +++ b/lib/Lintian/Data/Architectures.pm @@ -0,0 +1,441 @@ +# -*- perl -*- + +# Copyright (C) 2011-2012 Niels Thykier <niels@thykier.net> +# - Based on a shell script by Raphael Geissert <atomo64@gmail.com> +# Copyright (C) 2020-2021 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by the Free +# Software Foundation; either version 2 of the License, or (at your option) +# any later version. +# +# This program is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +# more details. +# +# You should have received a copy of the GNU General Public License along with +# this program. If not, see <http://www.gnu.org/licenses/>. + +package Lintian::Data::Architectures; + +use v5.20; +use warnings; +use utf8; + +use Const::Fast; +use List::SomeUtils qw(first_value); +use Unicode::UTF8 qw(decode_utf8); + +use Lintian::IPC::Run3 qw(safe_qx); + +const my $EMPTY => q{}; +const my $SLASH => q{/}; + +const my $HOST_VARIABLES => q{host_variables}; + +use Moo; +use namespace::clean; + +with 'Lintian::Data::PreambledJSON'; + +=encoding utf-8 + +=head1 NAME + +Lintian::Data::Architectures -- Lintian API for handling architectures and wildcards + +=head1 SYNOPSIS + + use Lintian::Data::Architectures; + +=head1 DESCRIPTION + +Lintian API for checking and expanding architectures and architecture +wildcards. The functions are backed by a L<data|Lintian::Data> file, +so it may be out of date (use private/refresh-archs to update it). + +Generally all architecture names are in the format "$os-$architecture" and +wildcards are "$os-any" or "any-$cpu", though there are exceptions: + +Note that the architecture and cpu name are not always identical +(example architecture "armhf" has cpu name "arm"). + +=head1 INSTANCE METHODS + +=over 4 + +=item title + +=item location + +=item host_variables + +=item C<wildcards> + +=item C<names> + +=cut + +has title => ( + is => 'rw', + default => 'DEB_HOST_* Variables from Dpkg' +); + +has location => ( + is => 'rw', + default => 'architectures/host.json' +); + +has host_variables => ( + is => 'rw', + default => sub { {} }, + coerce => sub { my ($hashref) = @_; return ($hashref // {}); } +); + +has deb_host_multiarch => ( + is => 'rw', + lazy => 1, + coerce => sub { my ($hashref) = @_; return ($hashref // {}); }, + default => sub { + my ($self) = @_; + + my %deb_host_multiarch; + + $deb_host_multiarch{$_} + = $self->host_variables->{$_}{DEB_HOST_MULTIARCH} + for keys %{$self->host_variables}; + + return \%deb_host_multiarch; + } +); + +# The list of directories searched by default by the dynamic linker. +# Packages installing shared libraries into these directories must call +# ldconfig, must have shlibs files, and must ensure those libraries have +# proper SONAMEs. +# +# Directories listed here must not have leading slashes. +# +# On the topic of multi-arch dirs. Hopefully including the ones not +# native to the local platform won't hurt. +# +# See Bug#469301 and Bug#464796 for more details. +# +has ldconfig_folders => ( + is => 'rw', + lazy => 1, + coerce => sub { my ($arrayref) = @_; return ($arrayref // {}); }, + default => sub { + my ($self) = @_; + + my @multiarch = values %{$self->deb_host_multiarch}; + my @ldconfig_folders = map { ("lib/$_", "usr/lib/$_") } @multiarch; + + my @always = qw{ + lib + lib32 + lib64 + libx32 + usr/lib + usr/lib32 + usr/lib64 + usr/libx32 + usr/local/lib + }; + push(@ldconfig_folders, @always); + + my @with_slash = map { $_ . $SLASH } @ldconfig_folders; + + return \@with_slash; + } +); + +# Valid architecture wildcards. +has wildcards => ( + is => 'rw', + lazy => 1, + coerce => sub { my ($hashref) = @_; return ($hashref // {}); }, + default => sub { + my ($self) = @_; + + my %wildcards; + + for my $hyphenated (keys %{$self->host_variables}) { + + my $variables = $self->host_variables->{$hyphenated}; + + # NB: "$os-$cpu" is not always equal to $hyphenated + my $abi = $variables->{DEB_HOST_ARCH_ABI}; + my $libc = $variables->{DEB_HOST_ARCH_LIBC}; + my $os = $variables->{DEB_HOST_ARCH_OS}; + my $cpu = $variables->{DEB_HOST_ARCH_CPU}; + + # map $os-any (e.g. "linux-any") and any-$architecture (e.g. "any-amd64") to + # the relevant architectures. + $wildcards{'any'}{$hyphenated} = 1; + + $wildcards{'any-any'}{$hyphenated} = 1; + $wildcards{"any-$cpu"}{$hyphenated} = 1; + $wildcards{"$os-any"}{$hyphenated} = 1; + + $wildcards{'any-any-any'}{$hyphenated} = 1; + $wildcards{"any-any-$cpu"}{$hyphenated} = 1; + $wildcards{"any-$os-any"}{$hyphenated} = 1; + $wildcards{"any-$os-$cpu"}{$hyphenated} = 1; + $wildcards{"$libc-any-any"}{$hyphenated} = 1; + $wildcards{"$libc-any-$cpu"}{$hyphenated} = 1; + $wildcards{"$libc-$os-any"}{$hyphenated} = 1; + + $wildcards{'any-any-any-any'}{$hyphenated} = 1; + $wildcards{"any-any-any-$cpu"}{$hyphenated} = 1; + $wildcards{"any-any-$os-any"}{$hyphenated} = 1; + $wildcards{"any-any-$os-$cpu"}{$hyphenated} = 1; + $wildcards{"any-$libc-any-any"}{$hyphenated} = 1; + $wildcards{"any-$libc-any-$cpu"}{$hyphenated} = 1; + $wildcards{"any-$libc-$os-any"}{$hyphenated} = 1; + $wildcards{"any-$libc-$os-$cpu"}{$hyphenated} = 1; + $wildcards{"$abi-any-any-any"}{$hyphenated} = 1; + $wildcards{"$abi-any-any-$cpu"}{$hyphenated} = 1; + $wildcards{"$abi-any-$os-any"}{$hyphenated} = 1; + $wildcards{"$abi-any-$os-$cpu"}{$hyphenated} = 1; + $wildcards{"$abi-$libc-any-any"}{$hyphenated} = 1; + $wildcards{"$abi-$libc-any-$cpu"}{$hyphenated} = 1; + $wildcards{"$abi-$libc-$os-any"}{$hyphenated} = 1; + } + + return \%wildcards; + } +); + +# Maps aliases to the "original" arch name. +# (e.g. "linux-amd64" => "amd64") +has names => ( + is => 'rw', + lazy => 1, + coerce => sub { my ($hashref) = @_; return ($hashref // {}); }, + default => sub { + my ($self) = @_; + + my %names; + + for my $hyphenated (keys %{$self->host_variables}) { + + my $variables = $self->host_variables->{$hyphenated}; + + $names{$hyphenated} = $hyphenated; + + # NB: "$os-$cpu" ne $hyphenated in some cases + my $os = $variables->{DEB_HOST_ARCH_OS}; + my $cpu = $variables->{DEB_HOST_ARCH_CPU}; + + if ($os eq 'linux') { + + # Per Policy section 11.1 (3.9.3): + # + #"""[architecture] strings are in the format "os-arch", though + # the OS part is sometimes elided, as when the OS is Linux.""" + # + # i.e. "linux-amd64" and "amd64" are aliases, so handle them + # as such. Currently, dpkg-architecture -L gives us "amd64" + # but in case it changes to "linux-amd64", we are prepared. + + if ($hyphenated =~ /^linux-/) { + # It may be temping to use $cpu here, but it does not work + # for (e.g.) arm based architectures. Instead extract the + # "short" architecture name from $hyphenated + my (undef, $short) = split(/-/, $hyphenated, 2); + $names{$short} = $hyphenated; + + } else { + # short string in $hyphenated + my $long = "$os-$hyphenated"; + $names{$long} = $hyphenated; + } + } + } + + return \%names; + } +); + +=item is_wildcard ($wildcard) + +Returns a truth value if $wildcard is a known architecture wildcard. + +Note: 'any' is considered a wildcard and not an architecture. + +=cut + +sub is_wildcard { + my ($self, $wildcard) = @_; + + return exists $self->wildcards->{$wildcard}; +} + +=item is_release_architecture ($architecture) + +Returns a truth value if $architecture is (an alias of) a Debian machine +architecture. It returns a false value for +architecture wildcards (including "any") and unknown architectures. + +=cut + +sub is_release_architecture { + my ($self, $architecture) = @_; + + return exists $self->names->{$architecture}; +} + +=item expand_wildcard ($wildcard) + +Returns a list of architectures that this wildcard expands to. No +order is guaranteed (even between calls). Returned values must not be +modified. + +Note: This list is based on the architectures in Lintian's data file. +However, many of these are not supported or used in Debian or any of +its derivatives. + +The returned values matches the list generated by dpkg-architecture -L, +so the returned list may use (e.g.) "amd64" for "linux-amd64". + +=cut + +sub expand_wildcard { + my ($self, $wildcard) = @_; + + return keys %{ $self->wildcards->{$wildcard} // {} }; +} + +=item wildcard_includes ($wildcard, $architecture) + +Returns a truth value if $architecture is included in the list of +architectures that $wildcard expands to. + +This is generally faster than + + grep { $_ eq $architecture } expand_arch_wildcard ($wildcard) + +It also properly handles cases like "linux-amd64" and "amd64" being +aliases. + +=cut + +sub wildcard_includes { + my ($self, $wildcard, $architecture) = @_; + + $architecture = $self->names->{$architecture} + if exists $self->names->{$architecture}; + + return exists $self->wildcards->{$wildcard}{$architecture}; +} + +=item valid_restriction + +=cut + +sub valid_restriction { + my ($self, $restriction) = @_; + + # strip any negative prefix + $restriction =~ s/^!//; + + return + $self->is_release_architecture($restriction) + || $self->is_wildcard($restriction) + || $restriction eq 'all'; +} + +=item restriction_matches + +=cut + +sub restriction_matches { + my ($self, $restriction, $architecture) = @_; + + # look for negative prefix and strip + my $match_wanted = !($restriction =~ s/^!//); + + return $match_wanted + if $restriction eq $architecture; + + return $match_wanted + if $self->is_wildcard($restriction) + && $self->wildcard_includes($restriction, $architecture); + + return !$match_wanted; +} + +=item load + +=cut + +sub load { + my ($self, $search_space, $our_vendor) = @_; + + my @candidates = map { $_ . $SLASH . $self->location } @{$search_space}; + my $path = first_value { -e } @candidates; + + my $host_variables; + + return 0 + unless $self->read_file($path, \$host_variables); + + $self->host_variables($host_variables); + + return 1; +} + +=item refresh + +=cut + +sub refresh { + my ($self, $archive, $basedir) = @_; + + local $ENV{LC_ALL} = 'C'; + delete local $ENV{DEB_HOST_ARCH}; + + my @architectures + = split(/\n/, decode_utf8(safe_qx(qw{dpkg-architecture --list-known}))); + chomp for @architectures; + + my %host_variables; + for my $architecture (@architectures) { + + my @lines= split( + /\n/, + decode_utf8( + safe_qx(qw{dpkg-architecture --host-arch}, $architecture) + ) + ); + + for my $line (@lines) { + my ($key, $value) = split(/=/, $line, 2); + + $host_variables{$architecture}{$key} = $value + if $key =~ /^DEB_HOST_/; + } + } + + $self->cargo('host_variables'); + + my $data_path = "$basedir/" . $self->location; + my $status + = $self->write_file($HOST_VARIABLES, \%host_variables, $data_path); + + return $status; +} + +=back + +=cut + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Data/Archive/AutoRejection.pm b/lib/Lintian/Data/Archive/AutoRejection.pm new file mode 100644 index 0000000..d05ae51 --- /dev/null +++ b/lib/Lintian/Data/Archive/AutoRejection.pm @@ -0,0 +1,154 @@ +# -*- perl -*- +# +# Copyright (C) 2021 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by the Free +# Software Foundation; either version 2 of the License, or (at your option) +# any later version. +# +# This program is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +# more details. +# +# You should have received a copy of the GNU General Public License along with +# this program. If not, see <http://www.gnu.org/licenses/>. + +package Lintian::Data::Archive::AutoRejection; + +use v5.20; +use warnings; +use utf8; + +use Carp qw(carp); +use Const::Fast; +use HTTP::Tiny; +use List::SomeUtils qw(first_value uniq); +use Path::Tiny; +use Unicode::UTF8 qw(encode_utf8); +use YAML::XS qw(LoadFile); + +const my $EMPTY => q{}; +const my $SLASH => q{/}; + +use Moo; +use namespace::clean; + +=head1 NAME + +Lintian::Data::Archive::AutoRejection - Lintian interface to the archive's auto-rejection tags + +=head1 SYNOPSIS + + use Lintian::Data::Archive::AutoRejection; + +=head1 DESCRIPTION + +This module provides a way to load data files for the archive's auto-rejection tags + +=head1 INSTANCE METHODS + +=over 4 + +=item title + +=item location + +=item certain + +=item preventable + +=cut + +has title => ( + is => 'rw', + default => 'Archive Auto-Rejection Tags' +); + +has location => ( + is => 'rw', + default => 'archive/auto-rejection.yaml' +); + +has certain => (is => 'rw', default => sub { [] }); +has preventable => (is => 'rw', default => sub { [] }); + +=item load + +=cut + +sub load { + my ($self, $search_space, $our_vendor) = @_; + + my @candidates = map { $_ . $SLASH . $self->location } @{$search_space}; + my $path = first_value { -e } @candidates; + + unless (length $path) { + carp encode_utf8('Unknown data file: ' . $self->location); + return; + } + + my $yaml = LoadFile($path); + die encode_utf8('Could not parse YAML file ' . $self->location) + unless defined $yaml; + + my $base = $yaml->{lintian}; + die encode_utf8('Could not parse document base for ' . $self->location) + unless defined $base; + + my @certain = uniq @{ $base->{fatal} // [] }; + my @preventable = uniq @{ $base->{nonfatal} // [] }; + + $self->certain(\@certain); + $self->preventable(\@preventable); + + return; +} + +=item refresh + +=cut + +sub refresh { + my ($self, $archive, $basedir) = @_; + + my $auto_rejection_url + = 'https://ftp-master.debian.org/static/lintian.tags'; + + my $response = HTTP::Tiny->new->get($auto_rejection_url); + die encode_utf8("Failed to get $auto_rejection_url!\n") + unless $response->{success}; + + my $auto_rejection_yaml = $response->{content}; + + my $data_path = "$basedir/" . $self->location; + my $parent_dir = path($data_path)->parent->stringify; + path($parent_dir)->mkpath + unless -e $parent_dir; + + # already in UTF-8 + path($data_path)->spew($auto_rejection_yaml); + + return 1; +} + +=back + +=head1 AUTHOR + +Originally written by Felix Lechner <felix.lechner@lease-up.com> for Lintian. + +=head1 SEE ALSO + +lintian(1) + +=cut + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Data/Archive/Sections.pm b/lib/Lintian/Data/Archive/Sections.pm new file mode 100644 index 0000000..24a99c7 --- /dev/null +++ b/lib/Lintian/Data/Archive/Sections.pm @@ -0,0 +1,133 @@ +# -*- perl -*- +# +# Copyright (C) 2021 Felix Lechner +# Copyright (C) 2022 Axel Beckert +# +# This program is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by the Free +# Software Foundation; either version 2 of the License, or (at your option) +# any later version. +# +# This program is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +# more details. +# +# You should have received a copy of the GNU General Public License along with +# this program. If not, see <http://www.gnu.org/licenses/>. + +package Lintian::Data::Archive::Sections; + +use v5.20; +use warnings; +use utf8; + +use Carp qw(carp); +use Const::Fast; +use HTTP::Tiny; +use List::SomeUtils qw(first_value uniq); +use Path::Tiny; +use Unicode::UTF8 qw(encode_utf8); +use Lintian::Deb822; + +const my $EMPTY => q{}; +const my $SLASH => q{/}; + +use Moo; +use namespace::clean; + +with 'Lintian::Data::JoinedLines'; + +=head1 NAME + +Lintian::Data::Archive::Sections - Lintian interface to the archive's sections + +=head1 SYNOPSIS + + use Lintian::Data::Archive::Sections; + +=head1 DESCRIPTION + +This module provides a way to load the data file for the archive's section. + +=head1 INSTANCE METHODS + +=over 4 + +=item title + +=cut + +has title => ( + is => 'rw', + default => 'Archive Sections' +); + +=item location + +=cut + +has location => ( + is => 'rw', + default => 'fields/archive-sections' +); + +=item separator + +=cut + +has separator => (is => 'rw'); + +=item refresh + +=cut + +sub refresh { + my ($self, $archive, $basedir) = @_; + + my $sections_url = 'https://metadata.ftp-master.debian.org/sections.822'; + + my $response = HTTP::Tiny->new->get($sections_url); + die encode_utf8("Failed to get $sections_url!\n") + unless $response->{success}; + + my $sections_822 = $response->{content}; + + # TODO: We should probably save this in the original format and + # parse it with Lintian::Deb822 at some time. + my $sections = join("\n", + map { s/^Section: //r } + grep { m{^Section: [^/]*$} } + split(/\n/, $sections_822)) + ."\n"; + + my $data_path = "$basedir/" . $self->location; + my $parent_dir = path($data_path)->parent->stringify; + path($parent_dir)->mkpath + unless -e $parent_dir; + + # already in UTF-8 + path($data_path)->spew($sections); + + return 1; +} + +=back + +=head1 AUTHOR + +Originally written by Axel Beckert <abe@debian.org> for Lintian. + +=head1 SEE ALSO + +lintian(1) + +=cut + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Data/Authorities.pm b/lib/Lintian/Data/Authorities.pm new file mode 100644 index 0000000..fdb77cd --- /dev/null +++ b/lib/Lintian/Data/Authorities.pm @@ -0,0 +1,330 @@ +# Copyright (C) 2011 Niels Thykier <niels@thykier.net> +# Copyright (C) 2018 Chris Lamb <lamby@debian.org> +# Copyright (C) 2021 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Data::Authorities; + +use v5.20; +use warnings; +use utf8; + +use Const::Fast; + +use Lintian::Data::Authority::DebconfSpecification; +use Lintian::Data::Authority::DebianPolicy; +use Lintian::Data::Authority::DeveloperReference; +use Lintian::Data::Authority::DocBaseManual; +use Lintian::Data::Authority::FilesystemHierarchy; +use Lintian::Data::Authority::JavaPolicy; +use Lintian::Data::Authority::LintianManual; +use Lintian::Data::Authority::MenuPolicy; +use Lintian::Data::Authority::MenuManual; +use Lintian::Data::Authority::NewMaintainer; +use Lintian::Data::Authority::PerlPolicy; +use Lintian::Data::Authority::PythonPolicy; +use Lintian::Data::Authority::VimPolicy; + +const my $EMPTY => q{}; + +use Moo::Role; +use namespace::clean; + +=head1 NAME + +Lintian::Data::Authorities - Lintian's Reference Authorities + +=head1 SYNOPSIS + + my $data = Lintian::Data->new; + +=head1 DESCRIPTION + +Lintian::Data::Authorities handles finding, parsing and implementation of Lintian reference authorities + +=head1 INSTANCE METHODS + +=over 4 + +=item markdown_authority_reference + +=cut + +sub markdown_authority_reference { + my ($self, $volume, $section) = @_; + + my @MARKDOWN_CAPABLE = ( + $self->new_maintainer,$self->menu_policy, + $self->perl_policy,$self->python_policy, + $self->java_policy,$self->vim_policy, + $self->lintian_manual,$self->developer_reference, + $self->policy_manual,$self->debconf_specification, + $self->menu_manual,$self->doc_base_manual, + $self->filesystem_hierarchy_standard, + ); + + my %by_shorthand = map { $_->shorthand => $_ } @MARKDOWN_CAPABLE; + + return $EMPTY + unless exists $by_shorthand{$volume}; + + my $manual = $by_shorthand{$volume}; + + return $manual->markdown_citation($section); +} + +=item debconf_specification + +=cut + +has debconf_specification => ( + is => 'rw', + lazy => 1, + default => sub { + my ($self) = @_; + + my $manual = Lintian::Data::Authority::DebconfSpecification->new; + $manual->load($self->data_paths, $self->vendor); + + return $manual; + } +); + +=item developer_reference + +=cut + +has developer_reference => ( + is => 'rw', + lazy => 1, + default => sub { + my ($self) = @_; + + my $manual = Lintian::Data::Authority::DeveloperReference->new; + $manual->load($self->data_paths, $self->vendor); + + return $manual; + } +); + +=item doc_base_manual + +=cut + +has doc_base_manual => ( + is => 'rw', + lazy => 1, + default => sub { + my ($self) = @_; + + my $manual = Lintian::Data::Authority::DocBaseManual->new; + $manual->load($self->data_paths, $self->vendor); + + return $manual; + } +); + +=item filesystem_hierarchy_standard + +=cut + +has filesystem_hierarchy_standard => ( + is => 'rw', + lazy => 1, + default => sub { + my ($self) = @_; + + my $manual= Lintian::Data::Authority::FilesystemHierarchy->new; + $manual->load($self->data_paths, $self->vendor); + + return $manual; + } +); + +=item java_policy + +=cut + +has java_policy => ( + is => 'rw', + lazy => 1, + default => sub { + my ($self) = @_; + + my $manual = Lintian::Data::Authority::JavaPolicy->new; + $manual->load($self->data_paths, $self->vendor); + + return $manual; + } +); + +=item lintian_manual + +=cut + +has lintian_manual => ( + is => 'rw', + lazy => 1, + default => sub { + my ($self) = @_; + + my $manual = Lintian::Data::Authority::LintianManual->new; + $manual->load($self->data_paths, $self->vendor); + + return $manual; + } +); + +=item menu_manual + +=cut + +has menu_manual => ( + is => 'rw', + lazy => 1, + default => sub { + my ($self) = @_; + + my $manual = Lintian::Data::Authority::MenuManual->new; + $manual->load($self->data_paths, $self->vendor); + + return $manual; + } +); + +=item menu_policy + +=cut + +has menu_policy => ( + is => 'rw', + lazy => 1, + default => sub { + my ($self) = @_; + + my $manual = Lintian::Data::Authority::MenuPolicy->new; + $manual->load($self->data_paths, $self->vendor); + + return $manual; + } +); + +=item menu_policy + +=cut + +has new_maintainer => ( + is => 'rw', + lazy => 1, + default => sub { + my ($self) = @_; + + my $manual = Lintian::Data::Authority::NewMaintainer->new; + $manual->load($self->data_paths, $self->vendor); + + return $manual; + } +); + +=item perl_policy + +=cut + +has perl_policy => ( + is => 'rw', + lazy => 1, + default => sub { + my ($self) = @_; + + my $manual = Lintian::Data::Authority::PerlPolicy->new; + $manual->load($self->data_paths, $self->vendor); + + return $manual; + } +); + +=item policy_manual + +=cut + +has policy_manual => ( + is => 'rw', + lazy => 1, + default => sub { + my ($self) = @_; + + my $manual = Lintian::Data::Authority::DebianPolicy->new; + $manual->load($self->data_paths, $self->vendor); + + return $manual; + } +); + +=item python_policy + +=cut + +has python_policy => ( + is => 'rw', + lazy => 1, + default => sub { + my ($self) = @_; + + my $manual = Lintian::Data::Authority::PythonPolicy->new; + $manual->load($self->data_paths, $self->vendor); + + return $manual; + } +); + +=item vim_policy + +=cut + +has vim_policy => ( + is => 'rw', + lazy => 1, + default => sub { + my ($self) = @_; + + my $manual = Lintian::Data::Authority::VimPolicy->new; + $manual->load($self->data_paths, $self->vendor); + + return $manual; + } +); + +=back + +=head1 AUTHOR + +Originally written by Felix Lechner <felix.lechner@lease-up.com> for Lintian. + +=head1 SEE ALSO + +lintian(1) + +=cut + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Data/Authority/DebconfSpecification.pm b/lib/Lintian/Data/Authority/DebconfSpecification.pm new file mode 100644 index 0000000..661d11e --- /dev/null +++ b/lib/Lintian/Data/Authority/DebconfSpecification.pm @@ -0,0 +1,328 @@ +# -*- perl -*- +# +# Copyright (C) 1998 Christian Schwarz and Richard Braakman +# Copyright (C) 2001 Colin Watson +# Copyright (C) 2008 Jorda Polo +# Copyright (C) 2009 Russ Allbery +# Copyright (C) 2017-2019 Chris Lamb <lamby@debian.org> +# Copyright (C) 2020-2021 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by the Free +# Software Foundation; either version 2 of the License, or (at your option) +# any later version. +# +# This program is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +# more details. +# +# You should have received a copy of the GNU General Public License along with +# this program. If not, see <http://www.gnu.org/licenses/>. + +package Lintian::Data::Authority::DebconfSpecification; + +use v5.20; +use warnings; +use utf8; + +use Carp qw(croak); +use Const::Fast; +use File::Basename qw(dirname); +use Path::Tiny; +use Unicode::UTF8 qw(encode_utf8); +use WWW::Mechanize (); + +use Lintian::Output::Markdown qw(markdown_authority); + +const my $EMPTY => q{}; +const my $SPACE => q{ }; +const my $SLASH => q{/}; +const my $COLON => q{:}; +const my $UNDERSCORE => q{_}; +const my $LEFT_PARENTHESIS => q{(}; +const my $RIGHT_PARENTHESIS => q{)}; + +const my $TWO_PARTS => 2; + +const my $VOLUME_KEY => $UNDERSCORE; +const my $SEPARATOR => $COLON x 2; + +use Moo; +use namespace::clean; + +with 'Lintian::Data::JoinedLines'; + +=head1 NAME + +Lintian::Data::Authority::DebconfSpecification - Lintian interface for manual references + +=head1 SYNOPSIS + + use Lintian::Data::Authority::DebconfSpecification; + +=head1 DESCRIPTION + +Lintian::Data::Authority::DebconfSpecification provides a way to load data files for +manual references. + +=head1 CLASS METHODS + +=over 4 + +=item title + +=item shorthand + +=item location + +=item separator + +=cut + +has title => ( + is => 'rw', + default => 'Debconf Specification' +); + +has shorthand => ( + is => 'rw', + default => 'debconf-specification' +); + +has location => ( + is => 'rw', + lazy => 1, + default => sub { + my ($self) = @_; + + return 'authority/' . $self->shorthand; + } +); + +has separator => ( + is => 'rw', + default => sub { qr/::/ } +); + +=item consumer + +=cut + +sub consumer { + my ($self, $key, $remainder, $previous) = @_; + + return undef + if defined $previous; + + my ($title, $url)= split($self->separator, $remainder, $TWO_PARTS); + + my %entry; + $entry{title} = $title; + $entry{url} = $url; + + return \%entry; +} + +=item markdown_citation + +=cut + +sub markdown_citation { + my ($self, $section_key) = @_; + + croak "Invalid section $section_key" + if $section_key eq $VOLUME_KEY; + + my $volume_entry = $self->value($VOLUME_KEY); + + # start with the citation to the overall manual. + my $volume_title = $volume_entry->{title}; + my $volume_url = $volume_entry->{url}; + + my $section_title; + my $section_url; + + if ($self->recognizes($section_key)) { + + my $section_entry = $self->value($section_key); + + $section_title = $section_entry->{title}; + $section_url = $section_entry->{url}; + } + + return markdown_authority( + $volume_title, $volume_url,$section_key, + $section_title, $section_url + ); +} + +=item write_line + +=cut + +sub write_line { + my ($data_fd, $section_key, $section_title, $destination) = @_; + + # drop final dots + $section_key =~ s{ [.]+ $}{}x; + + # reduce consecutive whitespace + $section_title =~ s{ \s+ }{ }gx; + + my $line= join($SEPARATOR,$section_key, $section_title, $destination); + + say {$data_fd} encode_utf8($line); + + return; +} + +=item write_data_file + +=cut + +sub write_data_file { + my ($self, $basedir, $generated) = @_; + + my $header =<<"HEADER"; +# Data about titles, sections, and URLs of manuals, used to expand references +# in tag descriptions and add links for HTML output. Each line of this file +# has three fields separated by double colons: +# +# <section> :: <title> :: <url> +# +# If <section> is an underscore, that line specifies the title and URL for the +# whole manual. + +HEADER + + my $data_path = "$basedir/" . $self->location; + my $parent_dir = path($data_path)->parent->stringify; + path($parent_dir)->mkpath + unless -e $parent_dir; + + my $output = encode_utf8($header) . $generated; + path($data_path)->spew($output); + + return; +} + +=item extract_sections_from_links + +=cut + +sub extract_sections_from_links { + my ($self, $data_fd, $base_url, $page_name)= @_; + + my $page_url = $base_url . $page_name; + + my $mechanize = WWW::Mechanize->new(); + $mechanize->get($page_url); + + my $page_title = $mechanize->title; + + # strip explanatory remark + $page_title =~ s{ \s* \N{EM DASH} .* $}{}x; + + # underscore is a token for the whole page + write_line($data_fd, $VOLUME_KEY, $page_title, $page_url); + + my %by_section_key; + my $in_appendix = 0; + + # https://stackoverflow.com/a/254687 + for my $link ($mechanize->links) { + + next + unless length $link->text; + + next + if $link->text !~ qr{^ \s* ([.\d]+) \s+ (.+) $}x; + + my $section_key = $1; + my $section_title = $2; + + # drop final dots + $section_key =~ s{ [.]+ $}{}x; + + # reduce consecutive whitespace + $section_title =~ s{ \s+ }{ }gx; + + my $relative_destination = $link->url; + + my $destination_base = $page_url; + $destination_base = dirname($page_url) . $SLASH + unless $destination_base =~ m{ / $}x + || $relative_destination =~ m{^ [#] }x; + + my $full_destination = $destination_base . $relative_destination; + + next + if exists $by_section_key{$section_key} + && ( $by_section_key{$section_key}{title} eq $section_title + || $by_section_key{$section_key}{destination} eq$full_destination); + + # Some manuals reuse section numbers for different references, + # e.g. the Debian Policy's normal and appendix sections are + # numbers that clash with each other. Track if we've already + # seen a section pointing to some other URL than the current one, + # and prepend it with an indicator + $in_appendix = 1 + if exists $by_section_key{$section_key} + && $by_section_key{$section_key}{destination} ne$full_destination; + + $section_key = "appendix-$section_key" + if $in_appendix; + + $by_section_key{$section_key}{title} = $section_title; + $by_section_key{$section_key}{destination} = $full_destination; + + write_line($data_fd, $section_key, $section_title, $full_destination); + } + + return; +} + +=item refresh + +=cut + +sub refresh { + my ($self, $archive, $basedir) = @_; + + # single page + my $base_url = 'https://www.debian.org/doc/packaging-manuals/'; + my $index_name = 'debconf_specification.html'; + + my $generated; + open(my $memory_fd, '>', \$generated) + or die encode_utf8('Cannot open scalar'); + + $self->extract_sections_from_links($memory_fd, $base_url, $index_name); + + close $memory_fd; + + $self->write_data_file($basedir, $generated); + + return; +} + +=back + +=head1 AUTHOR + +Originally written by Felix Lechner <felix.lechner@lease-up.com> for Lintian. + +=head1 SEE ALSO + +lintian(1) + +=cut + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Data/Authority/DebianPolicy.pm b/lib/Lintian/Data/Authority/DebianPolicy.pm new file mode 100644 index 0000000..177b07d --- /dev/null +++ b/lib/Lintian/Data/Authority/DebianPolicy.pm @@ -0,0 +1,321 @@ +# -*- perl -*- +# +# Copyright (C) 1998 Christian Schwarz and Richard Braakman +# Copyright (C) 2001 Colin Watson +# Copyright (C) 2008 Jorda Polo +# Copyright (C) 2009 Russ Allbery +# Copyright (C) 2017-2019 Chris Lamb <lamby@debian.org> +# Copyright (C) 2020-2021 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by the Free +# Software Foundation; either version 2 of the License, or (at your option) +# any later version. +# +# This program is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +# more details. +# +# You should have received a copy of the GNU General Public License along with +# this program. If not, see <http://www.gnu.org/licenses/>. + +package Lintian::Data::Authority::DebianPolicy; + +use v5.20; +use warnings; +use utf8; + +use Carp qw(croak); +use Const::Fast; +use Path::Tiny; +use Unicode::UTF8 qw(encode_utf8); +use WWW::Mechanize (); + +use Lintian::Output::Markdown qw(markdown_authority); + +const my $EMPTY => q{}; +const my $SPACE => q{ }; +const my $SLASH => q{/}; +const my $COLON => q{:}; +const my $UNDERSCORE => q{_}; +const my $LEFT_PARENTHESIS => q{(}; +const my $RIGHT_PARENTHESIS => q{)}; + +const my $TWO_PARTS => 2; + +const my $VOLUME_KEY => $UNDERSCORE; +const my $SEPARATOR => $COLON x 2; + +use Moo; +use namespace::clean; + +with 'Lintian::Data::JoinedLines'; + +=head1 NAME + +Lintian::Data::Authority::DebianPolicy - Lintian interface for manual references + +=head1 SYNOPSIS + + use Lintian::Data::Authority::DebianPolicy; + +=head1 DESCRIPTION + +Lintian::Data::Authority::DebianPolicy provides a way to load data files for +manual references. + +=head1 CLASS METHODS + +=over 4 + +=item title + +=item shorthand + +=item location + +=item separator + +=cut + +has title => ( + is => 'rw', + default => 'Debian Policy' +); + +has shorthand => ( + is => 'rw', + default => 'debian-policy' +); + +has location => ( + is => 'rw', + lazy => 1, + default => sub { + my ($self) = @_; + + return 'authority/' . $self->shorthand; + } +); + +has separator => ( + is => 'rw', + default => sub { qr/::/ } +); + +=item consumer + +=cut + +sub consumer { + my ($self, $key, $remainder, $previous) = @_; + + return undef + if defined $previous; + + my ($title, $url)= split($self->separator, $remainder, $TWO_PARTS); + + my %entry; + $entry{title} = $title; + $entry{url} = $url; + + return \%entry; +} + +=item markdown_citation + +=cut + +sub markdown_citation { + my ($self, $section_key) = @_; + + croak "Invalid section $section_key" + if $section_key eq $VOLUME_KEY; + + my $volume_entry = $self->value($VOLUME_KEY); + + # start with the citation to the overall manual. + my $volume_title = $volume_entry->{title}; + my $volume_url = $volume_entry->{url}; + + my $section_title; + my $section_url; + + if ($self->recognizes($section_key)) { + + my $section_entry = $self->value($section_key); + + $section_title = $section_entry->{title}; + $section_url = $section_entry->{url}; + } + + return markdown_authority( + $volume_title, $volume_url,$section_key, + $section_title, $section_url + ); +} + +=item write_line + +=cut + +sub write_line { + my ($data_fd, $section_key, $section_title, $destination) = @_; + + # drop final dots + $section_key =~ s{ [.]+ $}{}x; + + # reduce consecutive whitespace + $section_title =~ s{ \s+ }{ }gx; + + my $line= join($SEPARATOR,$section_key, $section_title, $destination); + + say {$data_fd} encode_utf8($line); + + return; +} + +=item write_data_file + +=cut + +sub write_data_file { + my ($self, $basedir, $generated) = @_; + + my $header =<<"HEADER"; +# Data about titles, sections, and URLs of manuals, used to expand references +# in tag descriptions and add links for HTML output. Each line of this file +# has three fields separated by double colons: +# +# <section> :: <title> :: <url> +# +# If <section> is an underscore, that line specifies the title and URL for the +# whole manual. + +HEADER + + my $data_path = "$basedir/" . $self->location; + my $parent_dir = path($data_path)->parent->stringify; + path($parent_dir)->mkpath + unless -e $parent_dir; + + my $output = encode_utf8($header) . $generated; + path($data_path)->spew($output); + + return; +} + +=item extract_sections_from_links + +=cut + +sub extract_sections_from_links { + my ($self, $data_fd, $base_url)= @_; + + my $mechanize = WWW::Mechanize->new(); + $mechanize->get($base_url); + + my $page_title = $mechanize->title; + + # strip explanatory remark + $page_title =~ s{ \s* \N{EM DASH} .* $}{}x; + + # underscore is a token for the whole page + write_line($data_fd, $VOLUME_KEY, $page_title, $base_url); + + my %by_section_key; + my $in_appendix = 0; + + # https://stackoverflow.com/a/254687 + for my $link ($mechanize->links) { + + next + unless length $link->text; + + next + if $link->text !~ qr{^ \s* ([.\d]+) \s+ (.+) $}x; + + my $section_key = $1; + my $section_title = $2; + + # drop final dots + $section_key =~ s{ [.]+ $}{}x; + + # reduce consecutive whitespace + $section_title =~ s{ \s+ }{ }gx; + + my $destination = $base_url . $link->url; + + next + if exists $by_section_key{$section_key} + && ( $by_section_key{$section_key}{title} eq $section_title + || $by_section_key{$section_key}{destination} eq $destination); + + # Some manuals reuse section numbers for different references, + # e.g. the Debian Policy's normal and appendix sections are + # numbers that clash with each other. Track if we've already + # seen a section pointing to some other URL than the current one, + # and prepend it with an indicator + $in_appendix = 1 + if exists $by_section_key{$section_key} + && $by_section_key{$section_key}{destination} ne $destination; + + $section_key = "appendix-$section_key" + if $in_appendix; + + # do not collect the upgrading checklists in appendix 10 of policy + # the numbering changes all the time + next + if $section_key =~ m{^ appendix-10 [.] }x; + + $by_section_key{$section_key}{title} = $section_title; + $by_section_key{$section_key}{destination} = $destination; + + write_line($data_fd, $section_key, $section_title, $destination); + } + + return; +} + +=item refresh + +=cut + +sub refresh { + my ($self, $archive, $basedir) = @_; + + my $base_url = 'https://www.debian.org/doc/debian-policy/'; + + my $generated; + open(my $memory_fd, '>', \$generated) + or die encode_utf8('Cannot open scalar'); + + $self->extract_sections_from_links($memory_fd, $base_url); + + close $memory_fd; + + $self->write_data_file($basedir, $generated); + + return; +} + +=back + +=head1 AUTHOR + +Originally written by Felix Lechner <felix.lechner@lease-up.com> for Lintian. + +=head1 SEE ALSO + +lintian(1) + +=cut + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Data/Authority/DeveloperReference.pm b/lib/Lintian/Data/Authority/DeveloperReference.pm new file mode 100644 index 0000000..676cbf4 --- /dev/null +++ b/lib/Lintian/Data/Authority/DeveloperReference.pm @@ -0,0 +1,319 @@ +# -*- perl -*- +# +# Copyright (C) 1998 Christian Schwarz and Richard Braakman +# Copyright (C) 2001 Colin Watson +# Copyright (C) 2008 Jorda Polo +# Copyright (C) 2009 Russ Allbery +# Copyright (C) 2017-2019 Chris Lamb <lamby@debian.org> +# Copyright (C) 2020-2021 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by the Free +# Software Foundation; either version 2 of the License, or (at your option) +# any later version. +# +# This program is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +# more details. +# +# You should have received a copy of the GNU General Public License along with +# this program. If not, see <http://www.gnu.org/licenses/>. + +package Lintian::Data::Authority::DeveloperReference; + +use v5.20; +use warnings; +use utf8; + +use Carp qw(croak); +use Const::Fast; +use Path::Tiny; +use Unicode::UTF8 qw(encode_utf8); +use WWW::Mechanize (); + +use Lintian::Output::Markdown qw(markdown_authority); + +const my $EMPTY => q{}; +const my $SPACE => q{ }; +const my $SLASH => q{/}; +const my $COLON => q{:}; +const my $UNDERSCORE => q{_}; +const my $LEFT_PARENTHESIS => q{(}; +const my $RIGHT_PARENTHESIS => q{)}; + +const my $TWO_PARTS => 2; + +const my $VOLUME_KEY => $UNDERSCORE; +const my $SEPARATOR => $COLON x 2; + +use Moo; +use namespace::clean; + +with 'Lintian::Data::JoinedLines'; + +=head1 NAME + +Lintian::Data::Authority::DeveloperReference - Lintian interface for manual references + +=head1 SYNOPSIS + + use Lintian::Data::Authority::DeveloperReference; + +=head1 DESCRIPTION + +Lintian::Data::Authority::DeveloperReference provides a way to load data files for +manual references. + +=head1 CLASS METHODS + +=over 4 + +=item title + +=item shorthand + +=item location + +=item separator + +=cut + +has title => ( + is => 'rw', + default => q{Developer's Reference} +); + +has shorthand => ( + is => 'rw', + default => 'developer-reference' +); + +has location => ( + is => 'rw', + lazy => 1, + default => sub { + my ($self) = @_; + + return 'authority/' . $self->shorthand; + } +); + +has separator => ( + is => 'rw', + default => sub { qr/::/ } +); + +=item consumer + +=cut + +sub consumer { + my ($self, $key, $remainder, $previous) = @_; + + return undef + if defined $previous; + + my ($title, $url)= split($self->separator, $remainder, $TWO_PARTS); + + my %entry; + $entry{title} = $title; + $entry{url} = $url; + + return \%entry; +} + +=item markdown_citation + +=cut + +sub markdown_citation { + my ($self, $section_key) = @_; + + croak "Invalid section $section_key" + if $section_key eq $VOLUME_KEY; + + my $volume_entry = $self->value($VOLUME_KEY); + + # start with the citation to the overall manual. + my $volume_title = $volume_entry->{title}; + my $volume_url = $volume_entry->{url}; + + my $section_title; + my $section_url; + + if ($self->recognizes($section_key)) { + + my $section_entry = $self->value($section_key); + + $section_title = $section_entry->{title}; + $section_url = $section_entry->{url}; + } + + return markdown_authority( + $volume_title, $volume_url,$section_key, + $section_title, $section_url + ); +} + +=item write_line + +=cut + +sub write_line { + my ($data_fd, $section_key, $section_title, $destination) = @_; + + # drop final dots + $section_key =~ s{ [.]+ $}{}x; + + # reduce consecutive whitespace + $section_title =~ s{ \s+ }{ }gx; + + my $line= join($SEPARATOR,$section_key, $section_title, $destination); + + say {$data_fd} encode_utf8($line); + + return; +} + +=item write_data_file + +=cut + +sub write_data_file { + my ($self, $basedir, $generated) = @_; + + my $header =<<"HEADER"; +# Data about titles, sections, and URLs of manuals, used to expand references +# in tag descriptions and add links for HTML output. Each line of this file +# has three fields separated by double colons: +# +# <section> :: <title> :: <url> +# +# If <section> is an underscore, that line specifies the title and URL for the +# whole manual. + +HEADER + + my $data_path = "$basedir/" . $self->location; + my $parent_dir = path($data_path)->parent->stringify; + path($parent_dir)->mkpath + unless -e $parent_dir; + + my $output = encode_utf8($header) . $generated; + path($data_path)->spew($output); + + return; +} + +=item extract_sections_from_links + +=cut + +sub extract_sections_from_links { + my ($self, $data_fd, $base_url)= @_; + + my $mechanize = WWW::Mechanize->new(); + $mechanize->get($base_url); + + my $page_title = $mechanize->title; + + # strip explanatory remark + $page_title =~ s{ \s* \N{EM DASH} .* $}{}x; + + # underscore is a token for the whole page + write_line($data_fd, $VOLUME_KEY, $page_title, $base_url); + + my %by_section_key; + my $in_appendix = 0; + + # https://stackoverflow.com/a/254687 + for my $link ($mechanize->links) { + + next + unless length $link->text; + + next + if $link->text !~ qr{^ \s* ([.\d]+) \s+ (.+) $}x; + + my $section_key = $1; + my $section_title = $2; + + # drop final dots + $section_key =~ s{ [.]+ $}{}x; + + # reduce consecutive whitespace + $section_title =~ s{ \s+ }{ }gx; + + my $destination = $base_url . $link->url; + + # developers reference likes to return locale specific pages + $destination =~ s{ [.]\w{2}[.]html }{.html}x; + + next + if exists $by_section_key{$section_key} + && ( $by_section_key{$section_key}{title} eq $section_title + || $by_section_key{$section_key}{destination} eq $destination); + + # Some manuals reuse section numbers for different references, + # e.g. the Debian Policy's normal and appendix sections are + # numbers that clash with each other. Track if we've already + # seen a section pointing to some other URL than the current one, + # and prepend it with an indicator + $in_appendix = 1 + if exists $by_section_key{$section_key} + && $by_section_key{$section_key}{destination} ne $destination; + + $section_key = "appendix-$section_key" + if $in_appendix; + + $by_section_key{$section_key}{title} = $section_title; + $by_section_key{$section_key}{destination} = $destination; + + write_line($data_fd, $section_key, $section_title, $destination); + } + + return; +} + +=item refresh + +=cut + +sub refresh { + my ($self, $archive, $basedir) = @_; + + my $base_url = 'https://www.debian.org/doc/developers-reference/'; + + my $generated; + open(my $memory_fd, '>', \$generated) + or die encode_utf8('Cannot open scalar'); + + $self->extract_sections_from_links($memory_fd, $base_url); + + close $memory_fd; + + $self->write_data_file($basedir, $generated); + + return; +} + +=back + +=head1 AUTHOR + +Originally written by Felix Lechner <felix.lechner@lease-up.com> for Lintian. + +=head1 SEE ALSO + +lintian(1) + +=cut + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Data/Authority/DocBaseManual.pm b/lib/Lintian/Data/Authority/DocBaseManual.pm new file mode 100644 index 0000000..53cfbcb --- /dev/null +++ b/lib/Lintian/Data/Authority/DocBaseManual.pm @@ -0,0 +1,431 @@ +# -*- perl -*- +# +# Copyright (C) 1998 Christian Schwarz and Richard Braakman +# Copyright (C) 2001 Colin Watson +# Copyright (C) 2008 Jorda Polo +# Copyright (C) 2009 Russ Allbery +# Copyright (C) 2017-2019 Chris Lamb <lamby@debian.org> +# Copyright (C) 2020-2021 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by the Free +# Software Foundation; either version 2 of the License, or (at your option) +# any later version. +# +# This program is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +# more details. +# +# You should have received a copy of the GNU General Public License along with +# this program. If not, see <http://www.gnu.org/licenses/>. + +package Lintian::Data::Authority::DocBaseManual; + +use v5.20; +use warnings; +use utf8; + +use Carp qw(croak); +use Const::Fast; +use File::Basename qw(dirname basename); +use IPC::Run3; +use Path::Tiny; +use Unicode::UTF8 qw(encode_utf8); +use WWW::Mechanize (); + +use Lintian::Output::Markdown qw(markdown_authority); + +const my $EMPTY => q{}; +const my $SPACE => q{ }; +const my $SLASH => q{/}; +const my $COLON => q{:}; +const my $INDENT => $SPACE x 4; +const my $UNDERSCORE => q{_}; +const my $LEFT_PARENTHESIS => q{(}; +const my $RIGHT_PARENTHESIS => q{)}; + +const my $TWO_PARTS => 2; + +const my $VOLUME_KEY => $UNDERSCORE; +const my $SEPARATOR => $COLON x 2; + +const my $WAIT_STATUS_SHIFT => 8; + +use Moo; +use namespace::clean; + +with 'Lintian::Data::JoinedLines'; + +=head1 NAME + +Lintian::Data::Authority::DocBaseManual - Lintian interface for manual references + +=head1 SYNOPSIS + + use Lintian::Data::Authority::DocBaseManual; + +=head1 DESCRIPTION + +Lintian::Data::Authority::DocBaseManual provides a way to load data files for +manual references. + +=head1 CLASS METHODS + +=over 4 + +=item title + +=item shorthand + +=item location + +=item separator + +=cut + +has title => ( + is => 'rw', + default => 'Doc-Base Manual' +); + +has shorthand => ( + is => 'rw', + default => 'doc-base-manual' +); + +has location => ( + is => 'rw', + lazy => 1, + default => sub { + my ($self) = @_; + + return 'authority/' . $self->shorthand; + } +); + +has separator => ( + is => 'rw', + default => sub { qr/::/ } +); + +=item consumer + +=cut + +sub consumer { + my ($self, $key, $remainder, $previous) = @_; + + return undef + if defined $previous; + + my ($title, $url)= split($self->separator, $remainder, $TWO_PARTS); + + my %entry; + $entry{title} = $title; + $entry{url} = $url; + + return \%entry; +} + +=item markdown_citation + +=cut + +sub markdown_citation { + my ($self, $section_key) = @_; + + croak "Invalid section $section_key" + if $section_key eq $VOLUME_KEY; + + my $volume_entry = $self->value($VOLUME_KEY); + + # start with the citation to the overall manual. + my $volume_title = $volume_entry->{title}; + my $volume_url = $volume_entry->{url}; + + my $section_title; + my $section_url; + + if ($self->recognizes($section_key)) { + + my $section_entry = $self->value($section_key); + + $section_title = $section_entry->{title}; + $section_url = $section_entry->{url}; + } + + return markdown_authority( + $volume_title, $volume_url,$section_key, + $section_title, $section_url + ); +} + +=item write_line + +=cut + +sub write_line { + my ($data_fd, $section_key, $section_title, $destination) = @_; + + # drop final dots + $section_key =~ s{ [.]+ $}{}x; + + # reduce consecutive whitespace + $section_title =~ s{ \s+ }{ }gx; + + my $line= join($SEPARATOR,$section_key, $section_title, $destination); + + say {$data_fd} encode_utf8($line); + + return; +} + +=item write_data_file + +=cut + +sub write_data_file { + my ($self, $basedir, $generated) = @_; + + my $header =<<"HEADER"; +# Data about titles, sections, and URLs of manuals, used to expand references +# in tag descriptions and add links for HTML output. Each line of this file +# has three fields separated by double colons: +# +# <section> :: <title> :: <url> +# +# If <section> is an underscore, that line specifies the title and URL for the +# whole manual. + +HEADER + + my $data_path = "$basedir/" . $self->location; + my $parent_dir = path($data_path)->parent->stringify; + path($parent_dir)->mkpath + unless -e $parent_dir; + + my $output = encode_utf8($header) . $generated; + path($data_path)->spew($output); + + return; +} + +=item find_installable_name + +=cut + +sub find_installable_name { + my ($self, $archive, $port, $requested_path) = @_; + + my @installed_by; + + # find installable package + for my $installable_architecture ('all', $port) { + + my $local_path + = $archive->contents_gz('sid', 'main', $installable_architecture); + + open(my $fd, '<:gzip', $local_path) + or die encode_utf8("Cannot open $local_path."); + + while (my $line = <$fd>) { + + chomp $line; + + my ($path, $finder) = split($SPACE, $line, 2); + next + unless length $path + && length $finder; + + if ($path eq $requested_path) { + + my $name = $1; + + my @locations = split(m{,}, $finder); + for my $location (@locations) { + + my ($section, $installable)= split(m{/}, $location, 2); + + push(@installed_by, $installable); + } + + next; + } + } + + close $fd; + } + + die encode_utf8( + "The path $requested_path is not installed by any package.") + if @installed_by < 1; + + if (@installed_by > 1) { + warn encode_utf8( + "The path $requested_path is installed by multiple packages:\n"); + warn encode_utf8($INDENT . "- $_\n")for @installed_by; + } + + my $installable_name = shift @installed_by; + + return $installable_name; +} + +=item refresh + +=cut + +sub refresh { + my ($self, $archive, $basedir) = @_; + + # shipped as part of the doc-base installable + my $shipped_base = 'usr/share/doc/doc-base/doc-base.html/'; + my $index_name = 'index.html'; + + my $shipped_path = $shipped_base . $index_name; + my $stored_uri = "file:///$shipped_path"; + + # neutral sort order + local $ENV{LC_ALL} = 'C'; + + my $port = 'amd64'; + my $installable_name + = $self->find_installable_name($archive, $port, $shipped_path); + + my $deb822_by_installable_name + = $archive->deb822_packages_by_installable_name('sid', 'main', $port); + + my $work_folder + = Path::Tiny->tempdir(TEMPLATE => 'refresh-doc-base-manual-XXXXXXXXXX'); + + die encode_utf8("Installable $installable_name not shipped in port $port") + unless exists $deb822_by_installable_name->{$installable_name}; + + my $deb822 = $deb822_by_installable_name->{$installable_name}; + + my $pool_path = $deb822->value('Filename'); + + my $deb_filename = basename($pool_path); + my $deb_local_path = "$work_folder/$deb_filename"; + my $deb_url = $archive->mirror_base . $SLASH . $pool_path; + + my $stderr; + run3([qw{wget --quiet}, "--output-document=$deb_local_path", $deb_url], + undef, \$stderr); + my $status = ($? >> $WAIT_STATUS_SHIFT); + + # stderr already in UTF-8 + die $stderr + if $status; + + my $extract_folder = "$work_folder/unpacked/$pool_path"; + path($extract_folder)->mkpath; + + run3([qw{dpkg-deb --extract}, $deb_local_path, $extract_folder], + undef, \$stderr); + $status = ($? >> $WAIT_STATUS_SHIFT); + + # stderr already in UTF-8 + die $stderr + if $status; + + unlink($deb_local_path) + or die encode_utf8("Cannot delete $deb_local_path"); + + my $generated; + open(my $memory_fd, '>', \$generated) + or die encode_utf8('Cannot open scalar'); + + my $mechanize = WWW::Mechanize->new(); + + my $fresh_uri = URI::file->new_abs("/$extract_folder/$shipped_path"); + $mechanize->get($fresh_uri); + + my $page_title = $mechanize->title; + + # strip explanatory remark + $page_title =~ s{ \s* \N{EM DASH} .* $}{}x; + + # underscore is a token for the whole page + write_line($memory_fd, $VOLUME_KEY, $page_title, $stored_uri); + + my %by_section_key; + my $in_appendix = 0; + + # https://stackoverflow.com/a/254687 + for my $link ($mechanize->links) { + + next + unless length $link->text; + + next + if $link->text !~ qr{^ \s* ([.\d]+) \s+ (.+) $}x; + + my $section_key = $1; + my $section_title = $2; + + # drop final dots + $section_key =~ s{ [.]+ $}{}x; + + # reduce consecutive whitespace + $section_title =~ s{ \s+ }{ }gx; + + my $relative_destination = $link->url; + + my $destination_base = $stored_uri; + $destination_base = dirname($stored_uri) . $SLASH + unless $destination_base =~ m{ / $}x + || $relative_destination =~ m{^ [#] }x; + + my $full_destination = $destination_base . $relative_destination; + + next + if exists $by_section_key{$section_key} + && ( $by_section_key{$section_key}{title} eq $section_title + || $by_section_key{$section_key}{destination} eq$full_destination); + + # Some manuals reuse section numbers for different references, + # e.g. the Debian Policy's normal and appendix sections are + # numbers that clash with each other. Track if we've already + # seen a section pointing to some other URL than the current one, + # and prepend it with an indicator + $in_appendix = 1 + if exists $by_section_key{$section_key} + && $by_section_key{$section_key}{destination} ne$full_destination; + + $section_key = "appendix-$section_key" + if $in_appendix; + + $by_section_key{$section_key}{title} = $section_title; + $by_section_key{$section_key}{destination} = $full_destination; + + write_line($memory_fd, $section_key, $section_title,$full_destination); + } + + close $memory_fd; + + $self->write_data_file($basedir, $generated); + + return; +} + +=back + +=head1 AUTHOR + +Originally written by Felix Lechner <felix.lechner@lease-up.com> for Lintian. + +=head1 SEE ALSO + +lintian(1) + +=cut + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Data/Authority/FilesystemHierarchy.pm b/lib/Lintian/Data/Authority/FilesystemHierarchy.pm new file mode 100644 index 0000000..89fb677 --- /dev/null +++ b/lib/Lintian/Data/Authority/FilesystemHierarchy.pm @@ -0,0 +1,333 @@ +# -*- perl -*- +# +# Copyright (C) 1998 Christian Schwarz and Richard Braakman +# Copyright (C) 2001 Colin Watson +# Copyright (C) 2008 Jorda Polo +# Copyright (C) 2009 Russ Allbery +# Copyright (C) 2017-2019 Chris Lamb <lamby@debian.org> +# Copyright (C) 2020-2021 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by the Free +# Software Foundation; either version 2 of the License, or (at your option) +# any later version. +# +# This program is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +# more details. +# +# You should have received a copy of the GNU General Public License along with +# this program. If not, see <http://www.gnu.org/licenses/>. + +package Lintian::Data::Authority::FilesystemHierarchy; + +use v5.20; +use warnings; +use utf8; + +use Carp qw(croak); +use Const::Fast; +use File::Basename qw(dirname); +use Path::Tiny; +use Unicode::UTF8 qw(encode_utf8); +use WWW::Mechanize (); + +use Lintian::Output::Markdown qw(markdown_authority); + +const my $EMPTY => q{}; +const my $SPACE => q{ }; +const my $SLASH => q{/}; +const my $COLON => q{:}; +const my $UNDERSCORE => q{_}; +const my $LEFT_PARENTHESIS => q{(}; +const my $RIGHT_PARENTHESIS => q{)}; + +const my $THREE_PARTS => 3; + +const my $VOLUME_KEY => $UNDERSCORE; +const my $SEPARATOR => $COLON x 2; + +use Moo; +use namespace::clean; + +with 'Lintian::Data::JoinedLines'; + +=head1 NAME + +Lintian::Data::Authority::FilesystemHierarchy - Lintian interface for manual references + +=head1 SYNOPSIS + + use Lintian::Data::Authority::FilesystemHierarchy; + +=head1 DESCRIPTION + +Lintian::Data::Authority::FilesystemHierarchy provides a way to load data files for +manual references. + +=head1 CLASS METHODS + +=over 4 + +=item title + +=item shorthand + +=item location + +=item separator + +=cut + +has title => ( + is => 'rw', + default => 'Filesystem Hierarchy Standard' +); + +has shorthand => ( + is => 'rw', + default => 'filesystem-hierarchy' +); + +has location => ( + is => 'rw', + lazy => 1, + default => sub { + my ($self) = @_; + + return 'authority/' . $self->shorthand; + } +); + +has separator => ( + is => 'rw', + default => sub { qr/::/ } +); + +=item consumer + +=cut + +sub consumer { + my ($self, $key, $remainder, $previous) = @_; + + return undef + if defined $previous; + + my ($number, $title, $url) + = split($self->separator, $remainder, $THREE_PARTS); + + my %entry; + $entry{title} = $title; + $entry{number} = $number; + $entry{url} = $url; + + return \%entry; +} + +=item markdown_citation + +=cut + +sub markdown_citation { + my ($self, $section_key) = @_; + + croak "Invalid section $section_key" + if $section_key eq $VOLUME_KEY; + + my $volume_entry = $self->value($VOLUME_KEY); + + # start with the citation to the overall manual. + my $volume_title = $volume_entry->{title}; + my $volume_url = $volume_entry->{url}; + + my $section_title; + my $section_number; + my $section_url; + + if ($self->recognizes($section_key)) { + + my $section_entry = $self->value($section_key); + + $section_title = $section_entry->{title}; + $section_number = $section_entry->{number}; + $section_url = $section_entry->{url}; + } + + return markdown_authority( + $volume_title, $volume_url,$section_number, + $section_title, $section_url + ); +} + +=item write_line + +=cut + +sub write_line { + my ($data_fd, $section_key, $section_number, $section_title, $destination) + = @_; + + # drop final dots + $section_key =~ s{ [.]+ $}{}x; + + # reduce consecutive whitespace + $section_title =~ s{ \s+ }{ }gx; + + my $line= join($SEPARATOR, + $section_key, $section_number, $section_title, $destination); + + say {$data_fd} encode_utf8($line); + + return; +} + +=item write_data_file + +=cut + +sub write_data_file { + my ($self, $basedir, $generated) = @_; + + my $header =<<"HEADER"; +# Data about titles, sections, and URLs of manuals, used to expand references +# in tag descriptions and add links for HTML output. Each line of this file +# has three fields separated by double colons: +# +# <section> :: <title> :: <url> +# +# If <section> is an underscore, that line specifies the title and URL for the +# whole manual. + +HEADER + + my $data_path = "$basedir/" . $self->location; + my $parent_dir = path($data_path)->parent->stringify; + path($parent_dir)->mkpath + unless -e $parent_dir; + + my $output = encode_utf8($header) . $generated; + path($data_path)->spew($output); + + return; +} + +=item extract_sections_from_links + +=cut + +sub extract_sections_from_links { + my ($self, $data_fd, $base_url, $page_name)= @_; + + my $page_url = $base_url . $page_name; + + my $mechanize = WWW::Mechanize->new(); + $mechanize->get($page_url); + + my $page_title = $mechanize->title; + + # strip explanatory remark + $page_title =~ s{ \s* \N{EM DASH} .* $}{}x; + + # underscore is a token for the whole page + write_line($data_fd, $VOLUME_KEY, $EMPTY, $page_title, $page_url); + + my %by_section_key; + my $in_appendix = 0; + + # https://stackoverflow.com/a/254687 + for my $link ($mechanize->links) { + + next + unless length $link->url; + + # make lowercase + my $section_key = lc($link->url); + + # strip hash; it's a fragment; + $section_key =~ s{^ [#] }{}x; + + next + unless length $link->text; + + next + if $link->text !~ qr{^ \s* ([.\d]+) \s+ (.+) $}x; + + my $section_number = $1; + my $section_title = $2; + + # drop final dot + $section_number =~ s{ [.]+ $}{}x; + + # reduce consecutive whitespace + $section_title =~ s{ \s+ }{ }gx; + + # includes hash + my $relative_destination = $link->url; + + my $destination_base = $page_url; + $destination_base = dirname($page_url) . $SLASH + unless $destination_base =~ m{ / $}x + || $relative_destination =~ m{^ [#] }x; + + my $full_destination = $destination_base . $relative_destination; + + next + if exists $by_section_key{$section_key}; + + $by_section_key{$section_key}{title} = $section_title; + $by_section_key{$section_key}{number} = $section_number; + $by_section_key{$section_key}{destination} = $full_destination; + + write_line($data_fd, $section_key, $section_number, + $section_title, $full_destination); + } + + return; +} + +=item refresh + +=cut + +sub refresh { + my ($self, $archive, $basedir) = @_; + + # single page version + # plain directory shows a file list + my $base_url = 'https://refspecs.linuxfoundation.org/FHS_3.0/'; + my $index_name = 'fhs-3.0.html'; + + my $generated; + open(my $memory_fd, '>', \$generated) + or die encode_utf8('Cannot open scalar'); + + $self->extract_sections_from_links($memory_fd, $base_url, $index_name); + + close $memory_fd; + + $self->write_data_file($basedir, $generated); + + return; +} + +=back + +=head1 AUTHOR + +Originally written by Felix Lechner <felix.lechner@lease-up.com> for Lintian. + +=head1 SEE ALSO + +lintian(1) + +=cut + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Data/Authority/JavaPolicy.pm b/lib/Lintian/Data/Authority/JavaPolicy.pm new file mode 100644 index 0000000..eaa6704 --- /dev/null +++ b/lib/Lintian/Data/Authority/JavaPolicy.pm @@ -0,0 +1,290 @@ +# -*- perl -*- +# +# Copyright (C) 1998 Christian Schwarz and Richard Braakman +# Copyright (C) 2001 Colin Watson +# Copyright (C) 2008 Jorda Polo +# Copyright (C) 2009 Russ Allbery +# Copyright (C) 2017-2019 Chris Lamb <lamby@debian.org> +# Copyright (C) 2020-2021 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by the Free +# Software Foundation; either version 2 of the License, or (at your option) +# any later version. +# +# This program is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +# more details. +# +# You should have received a copy of the GNU General Public License along with +# this program. If not, see <http://www.gnu.org/licenses/>. + +package Lintian::Data::Authority::JavaPolicy; + +use v5.20; +use warnings; +use utf8; + +use Carp qw(croak); +use Const::Fast; +use List::SomeUtils qw(any first_value); +use Path::Tiny; +use Unicode::UTF8 qw(encode_utf8); +use WWW::Mechanize (); + +use Lintian::Output::Markdown qw(markdown_authority); + +const my $SLASH => q{/}; +const my $UNDERSCORE => q{_}; + +const my $VOLUME_KEY => $UNDERSCORE; +const my $SECTIONS => 'sections'; + +use Moo; +use namespace::clean; + +with 'Lintian::Data::PreambledJSON'; + +=head1 NAME + +Lintian::Data::Authority::JavaPolicy - Lintian interface for manual references + +=head1 SYNOPSIS + + use Lintian::Data::Authority::JavaPolicy; + +=head1 DESCRIPTION + +Lintian::Data::Authority::JavaPolicy provides a way to load data files for +manual references. + +=head1 CLASS METHODS + +=over 4 + +=item title + +=item shorthand + +=item location + +=item by_section_key + +=cut + +has title => ( + is => 'rw', + default => 'Java Policy' +); + +has shorthand => ( + is => 'rw', + default => 'java-policy' +); + +has location => ( + is => 'rw', + lazy => 1, + default => sub { + my ($self) = @_; + + return 'authority/' . $self->shorthand . '.json'; + } +); + +has by_section_key => (is => 'rw', default => sub { {} }); + +=item markdown_citation + +=cut + +sub markdown_citation { + my ($self, $section_key) = @_; + + croak "Invalid section $section_key" + if $section_key eq $VOLUME_KEY; + + my $volume_entry = $self->value($VOLUME_KEY); + + # start with the citation to the overall manual. + my $volume_title = $volume_entry->{title}; + my $volume_url = $volume_entry->{destination}; + + my $section_title; + my $section_url; + + if ($self->recognizes($section_key)) { + + my $section_entry = $self->value($section_key); + + $section_title = $section_entry->{title}; + $section_url = $section_entry->{destination}; + } + + return markdown_authority( + $volume_title, $volume_url,$section_key, + $section_title, $section_url + ); +} + +=item recognizes (KEY) + +Returns true if KEY is known, and false otherwise. + +=cut + +sub recognizes { + my ($self, $key) = @_; + + return 0 + unless length $key; + + return 1 + if exists $self->by_section_key->{$key}; + + return 0; +} + +=item value (KEY) + +Returns the value attached to KEY if it was listed in the data +file represented by this Lintian::Data instance and the undefined value +otherwise. + +=cut + +sub value { + my ($self, $key) = @_; + + return undef + unless length $key; + + return $self->by_section_key->{$key}; +} + +=item load + +=cut + +sub load { + my ($self, $search_space, $our_vendor) = @_; + + my @candidates = map { $_ . $SLASH . $self->location } @{$search_space}; + my $path = first_value { -e } @candidates; + + my $reference; + + return 0 + unless $self->read_file($path, \$reference); + + my @sections = @{$reference // []}; + + for my $section (@sections) { + + my $key = $section->{key}; + + # only store first value for duplicates + # silently ignore later values + $self->by_section_key->{$key} //= $section; + } + + return 1; +} + +=item refresh + +=cut + +sub refresh { + my ($self, $archive, $basedir) = @_; + + my $base_url = 'https://www.debian.org/doc/packaging-manuals/java-policy/'; + + my $mechanize = WWW::Mechanize->new(); + $mechanize->get($base_url); + + my $page_title = $mechanize->title; + + my @sections; + + # underscore is a token for the whole page + my %volume; + $volume{key} = $VOLUME_KEY; + $volume{title} = $page_title; + $volume{destination} = $base_url; + + # store array to resemble web layout + # may contain duplicates + push(@sections, \%volume); + + my $in_appendix = 0; + + # https://stackoverflow.com/a/254687 + for my $link ($mechanize->links) { + + next + unless length $link->text; + + next + if $link->text !~ qr{^ \s* ([.\d]+) \s+ (.+) $}x; + + my $section_key = $1; + my $section_title = $2; + + # drop final dots + $section_key =~ s{ [.]+ $}{}x; + + # reduce consecutive whitespace + $section_title =~ s{ \s+ }{ }gx; + + my $destination = $base_url . $link->url; + + my @similar = grep { $_->{key} eq $section_key } @sections; + next + if (any { $_->{title} eq $section_title } @similar) + || (any { $_->{destination} eq $destination } @similar); + + # Some manuals reuse section numbers for different references, + # e.g. the Debian Policy's normal and appendix sections are + # numbers that clash with each other. Track if we've already + # seen a section pointing to some other URL than the current one, + # and prepend it with an indicator + $in_appendix = 1 + if any { $_->{destination} ne $destination } @similar; + + $section_key = "appendix-$section_key" + if $in_appendix; + + my %section; + $section{key} = $section_key; + $section{title} = $section_title; + $section{destination} = $destination; + push(@sections, \%section); + } + + my $data_path = "$basedir/" . $self->location; + my $status = $self->write_file($SECTIONS, \@sections, $data_path); + + return $status; +} + +=back + +=head1 AUTHOR + +Originally written by Felix Lechner <felix.lechner@lease-up.com> for Lintian. + +=head1 SEE ALSO + +lintian(1) + +=cut + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Data/Authority/LintianManual.pm b/lib/Lintian/Data/Authority/LintianManual.pm new file mode 100644 index 0000000..3fc7bd0 --- /dev/null +++ b/lib/Lintian/Data/Authority/LintianManual.pm @@ -0,0 +1,324 @@ +# -*- perl -*- +# +# Copyright (C) 1998 Christian Schwarz and Richard Braakman +# Copyright (C) 2001 Colin Watson +# Copyright (C) 2008 Jorda Polo +# Copyright (C) 2009 Russ Allbery +# Copyright (C) 2017-2019 Chris Lamb <lamby@debian.org> +# Copyright (C) 2020-2021 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by the Free +# Software Foundation; either version 2 of the License, or (at your option) +# any later version. +# +# This program is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +# more details. +# +# You should have received a copy of the GNU General Public License along with +# this program. If not, see <http://www.gnu.org/licenses/>. + +package Lintian::Data::Authority::LintianManual; + +use v5.20; +use warnings; +use utf8; + +use Carp qw(croak); +use Const::Fast; +use IPC::Run3; +use Path::Tiny; +use Unicode::UTF8 qw(encode_utf8); +use URI::file; +use WWW::Mechanize (); + +use Lintian::Output::Markdown qw(markdown_authority); + +const my $EMPTY => q{}; +const my $SPACE => q{ }; +const my $SLASH => q{/}; +const my $COLON => q{:}; +const my $UNDERSCORE => q{_}; +const my $LEFT_PARENTHESIS => q{(}; +const my $RIGHT_PARENTHESIS => q{)}; + +const my $TWO_PARTS => 2; + +const my $VOLUME_KEY => $UNDERSCORE; +const my $SEPARATOR => $COLON x 2; + +const my $WAIT_STATUS_SHIFT => 8; + +use Moo; +use namespace::clean; + +with 'Lintian::Data::JoinedLines'; + +=head1 NAME + +Lintian::Data::Authority::LintianManual - Lintian interface for manual references + +=head1 SYNOPSIS + + use Lintian::Data::Authority::LintianManual; + +=head1 DESCRIPTION + +Lintian::Data::Authority::LintianManual provides a way to load data files for +manual references. + +=head1 CLASS METHODS + +=over 4 + +=item title + +=item shorthand + +=item location + +=item separator + +=cut + +has title => ( + is => 'rw', + default => 'Lintian Manual' +); + +has shorthand => ( + is => 'rw', + default => 'lintian-manual' +); + +has location => ( + is => 'rw', + lazy => 1, + default => sub { + my ($self) = @_; + + return 'authority/' . $self->shorthand; + } +); + +has separator => ( + is => 'rw', + default => sub { qr/::/ } +); + +=item consumer + +=cut + +sub consumer { + my ($self, $key, $remainder, $previous) = @_; + + return undef + if defined $previous; + + my ($title, $url)= split($self->separator, $remainder, $TWO_PARTS); + + my %entry; + $entry{title} = $title; + $entry{url} = $url; + + return \%entry; +} + +=item markdown_citation + +=cut + +sub markdown_citation { + my ($self, $section_key) = @_; + + croak "Invalid section $section_key" + if $section_key eq $VOLUME_KEY; + + my $volume_entry = $self->value($VOLUME_KEY); + + # start with the citation to the overall manual. + my $volume_title = $volume_entry->{title}; + my $volume_url = $volume_entry->{url}; + + my $section_title; + my $section_url; + + if ($self->recognizes($section_key)) { + + my $section_entry = $self->value($section_key); + + $section_title = $section_entry->{title}; + $section_url = $section_entry->{url}; + } + + return markdown_authority( + $volume_title, $volume_url,$section_key, + $section_title, $section_url + ); +} + +=item write_line + +=cut + +sub write_line { + my ($data_fd, $section_key, $section_title, $destination) = @_; + + # drop final dots + $section_key =~ s{ [.]+ $}{}x; + + # reduce consecutive whitespace + $section_title =~ s{ \s+ }{ }gx; + + my $line= join($SEPARATOR,$section_key, $section_title, $destination); + + say {$data_fd} encode_utf8($line); + + return; +} + +=item write_data_file + +=cut + +sub write_data_file { + my ($self, $basedir, $generated) = @_; + + my $header =<<"HEADER"; +# Data about titles, sections, and URLs of manuals, used to expand references +# in tag descriptions and add links for HTML output. Each line of this file +# has three fields separated by double colons: +# +# <section> :: <title> :: <url> +# +# If <section> is an underscore, that line specifies the title and URL for the +# whole manual. + +HEADER + + my $data_path = "$basedir/" . $self->location; + my $parent_dir = path($data_path)->parent->stringify; + path($parent_dir)->mkpath + unless -e $parent_dir; + + my $output = encode_utf8($header) . $generated; + path($data_path)->spew($output); + + return; +} + +=item refresh + +=cut + +sub refresh { + my ($self, $archive, $basedir) = @_; + + # WWW::Mechanize will not parse page title without the suffix + my $temp_tiny = Path::Tiny->tempfile( + TEMPLATE => 'lintian-manual-XXXXXXXX', + SUFFIX => '.html' + ); + my $local_uri = URI::file->new_abs($temp_tiny->stringify); + + # for rst2html + local $ENV{LC_ALL} = 'en_US.UTF-8'; + + my $stderr; + run3(['rst2html', "$ENV{LINTIAN_BASE}/doc/lintian.rst"], + undef, $local_uri->file, \$stderr); + my $status = ($? >> $WAIT_STATUS_SHIFT); + + # stderr already in UTF-8 + die $stderr + if $status; + + my $generated; + open(my $memory_fd, '>', \$generated) + or die encode_utf8("Cannot open scalar: $!"); + + my $page_url = 'https://lintian.debian.org/manual/index.html'; + + my $mechanize = WWW::Mechanize->new(); + $mechanize->get($local_uri); + + my $page_title = $mechanize->title; + + # underscore is a token for the whole page + write_line($memory_fd, $VOLUME_KEY, $page_title, $page_url); + + my %by_section_key; + my $in_appendix = 0; + + # https://stackoverflow.com/a/254687 + for my $link ($mechanize->links) { + + next + unless length $link->text; + + next + if $link->text !~ qr{^ \s* ([.\d]+) \s+ (.+) $}x; + + my $section_key = $1; + my $section_title = $2; + + # drop final dots + $section_key =~ s{ [.]+ $}{}x; + + # reduce consecutive whitespace + $section_title =~ s{ \s+ }{ }gx; + + my $destination = $page_url . $link->url; + + next + if exists $by_section_key{$section_key} + && ( $by_section_key{$section_key}{title} eq $section_title + || $by_section_key{$section_key}{destination} eq $destination); + + # Some manuals reuse section numbers for different references, + # e.g. the Debian Policy's normal and appendix sections are + # numbers that clash with each other. Track if we've already + # seen a section pointing to some other URL than the current one, + # and prepend it with an indicator + $in_appendix = 1 + if exists $by_section_key{$section_key} + && $by_section_key{$section_key}{destination} ne $destination; + + $section_key = "appendix-$section_key" + if $in_appendix; + + $by_section_key{$section_key}{title} = $section_title; + $by_section_key{$section_key}{destination} = $destination; + + write_line($memory_fd, $section_key, $section_title, $destination); + } + + close $memory_fd; + + $self->write_data_file($basedir, $generated); + + return; +} + +=back + +=head1 AUTHOR + +Originally written by Felix Lechner <felix.lechner@lease-up.com> for Lintian. + +=head1 SEE ALSO + +lintian(1) + +=cut + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Data/Authority/MenuManual.pm b/lib/Lintian/Data/Authority/MenuManual.pm new file mode 100644 index 0000000..c8a2878 --- /dev/null +++ b/lib/Lintian/Data/Authority/MenuManual.pm @@ -0,0 +1,316 @@ +# -*- perl -*- +# +# Copyright (C) 1998 Christian Schwarz and Richard Braakman +# Copyright (C) 2001 Colin Watson +# Copyright (C) 2008 Jorda Polo +# Copyright (C) 2009 Russ Allbery +# Copyright (C) 2017-2019 Chris Lamb <lamby@debian.org> +# Copyright (C) 2020-2021 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by the Free +# Software Foundation; either version 2 of the License, or (at your option) +# any later version. +# +# This program is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +# more details. +# +# You should have received a copy of the GNU General Public License along with +# this program. If not, see <http://www.gnu.org/licenses/>. + +package Lintian::Data::Authority::MenuManual; + +use v5.20; +use warnings; +use utf8; + +use Carp qw(croak); +use Const::Fast; +use Path::Tiny; +use Unicode::UTF8 qw(encode_utf8); +use WWW::Mechanize (); + +use Lintian::Output::Markdown qw(markdown_authority); + +const my $EMPTY => q{}; +const my $SPACE => q{ }; +const my $SLASH => q{/}; +const my $COLON => q{:}; +const my $UNDERSCORE => q{_}; +const my $LEFT_PARENTHESIS => q{(}; +const my $RIGHT_PARENTHESIS => q{)}; + +const my $TWO_PARTS => 2; + +const my $VOLUME_KEY => $UNDERSCORE; +const my $SEPARATOR => $COLON x 2; + +use Moo; +use namespace::clean; + +with 'Lintian::Data::JoinedLines'; + +=head1 NAME + +Lintian::Data::Authority::MenuManual - Lintian interface for manual references + +=head1 SYNOPSIS + + use Lintian::Data::Authority::MenuManual; + +=head1 DESCRIPTION + +Lintian::Data::Authority::MenuManual provides a way to load data files for +manual references. + +=head1 CLASS METHODS + +=over 4 + +=item title + +=item shorthand + +=item location + +=item separator + +=cut + +has title => ( + is => 'rw', + default => 'Menu Manual' +); + +has shorthand => ( + is => 'rw', + default => 'menu-manual' +); + +has location => ( + is => 'rw', + lazy => 1, + default => sub { + my ($self) = @_; + + return 'authority/' . $self->shorthand; + } +); + +has separator => ( + is => 'rw', + default => sub { qr/::/ } +); + +=item consumer + +=cut + +sub consumer { + my ($self, $key, $remainder, $previous) = @_; + + return undef + if defined $previous; + + my ($title, $url)= split($self->separator, $remainder, $TWO_PARTS); + + my %entry; + $entry{title} = $title; + $entry{url} = $url; + + return \%entry; +} + +=item markdown_citation + +=cut + +sub markdown_citation { + my ($self, $section_key) = @_; + + croak "Invalid section $section_key" + if $section_key eq $VOLUME_KEY; + + my $volume_entry = $self->value($VOLUME_KEY); + + # start with the citation to the overall manual. + my $volume_title = $volume_entry->{title}; + my $volume_url = $volume_entry->{url}; + + my $section_title; + my $section_url; + + if ($self->recognizes($section_key)) { + + my $section_entry = $self->value($section_key); + + $section_title = $section_entry->{title}; + $section_url = $section_entry->{url}; + } + + return markdown_authority( + $volume_title, $volume_url,$section_key, + $section_title, $section_url + ); +} + +=item write_line + +=cut + +sub write_line { + my ($data_fd, $section_key, $section_title, $destination) = @_; + + # drop final dots + $section_key =~ s{ [.]+ $}{}x; + + # reduce consecutive whitespace + $section_title =~ s{ \s+ }{ }gx; + + my $line= join($SEPARATOR,$section_key, $section_title, $destination); + + say {$data_fd} encode_utf8($line); + + return; +} + +=item write_data_file + +=cut + +sub write_data_file { + my ($self, $basedir, $generated) = @_; + + my $header =<<"HEADER"; +# Data about titles, sections, and URLs of manuals, used to expand references +# in tag descriptions and add links for HTML output. Each line of this file +# has three fields separated by double colons: +# +# <section> :: <title> :: <url> +# +# If <section> is an underscore, that line specifies the title and URL for the +# whole manual. + +HEADER + + my $data_path = "$basedir/" . $self->location; + my $parent_dir = path($data_path)->parent->stringify; + path($parent_dir)->mkpath + unless -e $parent_dir; + + my $output = encode_utf8($header) . $generated; + path($data_path)->spew($output); + + return; +} + +=item extract_sections_from_links + +=cut + +sub extract_sections_from_links { + my ($self, $data_fd, $base_url)= @_; + + my $mechanize = WWW::Mechanize->new(); + $mechanize->get($base_url); + + my $page_title = $mechanize->title; + + # strip explanatory remark + $page_title =~ s{ \s* \N{EM DASH} .* $}{}x; + + # underscore is a token for the whole page + write_line($data_fd, $VOLUME_KEY, $page_title, $base_url); + + my %by_section_key; + my $in_appendix = 0; + + # https://stackoverflow.com/a/254687 + for my $link ($mechanize->links) { + + next + unless length $link->text; + + next + if $link->text !~ qr{^ \s* ([.\d]+) \s+ (.+) $}x; + + my $section_key = $1; + my $section_title = $2; + + # drop final dots + $section_key =~ s{ [.]+ $}{}x; + + # reduce consecutive whitespace + $section_title =~ s{ \s+ }{ }gx; + + my $destination = $base_url . $link->url; + + next + if exists $by_section_key{$section_key} + && ( $by_section_key{$section_key}{title} eq $section_title + || $by_section_key{$section_key}{destination} eq $destination); + + # Some manuals reuse section numbers for different references, + # e.g. the Debian Policy's normal and appendix sections are + # numbers that clash with each other. Track if we've already + # seen a section pointing to some other URL than the current one, + # and prepend it with an indicator + $in_appendix = 1 + if exists $by_section_key{$section_key} + && $by_section_key{$section_key}{destination} ne $destination; + + $section_key = "appendix-$section_key" + if $in_appendix; + + $by_section_key{$section_key}{title} = $section_title; + $by_section_key{$section_key}{destination} = $destination; + + write_line($data_fd, $section_key, $section_title, $destination); + } + + return; +} + +=item refresh + +=cut + +sub refresh { + my ($self, $archive, $basedir) = @_; + + my $base_url = 'https://www.debian.org/doc/packaging-manuals/menu.html/'; + + my $generated; + open(my $memory_fd, '>', \$generated) + or die encode_utf8('Cannot open scalar'); + + $self->extract_sections_from_links($memory_fd, $base_url); + + close $memory_fd; + + $self->write_data_file($basedir, $generated); + + return; +} + +=back + +=head1 AUTHOR + +Originally written by Felix Lechner <felix.lechner@lease-up.com> for Lintian. + +=head1 SEE ALSO + +lintian(1) + +=cut + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Data/Authority/MenuPolicy.pm b/lib/Lintian/Data/Authority/MenuPolicy.pm new file mode 100644 index 0000000..e0f710a --- /dev/null +++ b/lib/Lintian/Data/Authority/MenuPolicy.pm @@ -0,0 +1,316 @@ +# -*- perl -*- +# +# Copyright (C) 1998 Christian Schwarz and Richard Braakman +# Copyright (C) 2001 Colin Watson +# Copyright (C) 2008 Jorda Polo +# Copyright (C) 2009 Russ Allbery +# Copyright (C) 2017-2019 Chris Lamb <lamby@debian.org> +# Copyright (C) 2020-2021 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by the Free +# Software Foundation; either version 2 of the License, or (at your option) +# any later version. +# +# This program is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +# more details. +# +# You should have received a copy of the GNU General Public License along with +# this program. If not, see <http://www.gnu.org/licenses/>. + +package Lintian::Data::Authority::MenuPolicy; + +use v5.20; +use warnings; +use utf8; + +use Carp qw(croak); +use Const::Fast; +use Path::Tiny; +use Unicode::UTF8 qw(encode_utf8); +use WWW::Mechanize (); + +use Lintian::Output::Markdown qw(markdown_authority); + +const my $EMPTY => q{}; +const my $SPACE => q{ }; +const my $SLASH => q{/}; +const my $COLON => q{:}; +const my $UNDERSCORE => q{_}; +const my $LEFT_PARENTHESIS => q{(}; +const my $RIGHT_PARENTHESIS => q{)}; + +const my $TWO_PARTS => 2; + +const my $VOLUME_KEY => $UNDERSCORE; +const my $SEPARATOR => $COLON x 2; + +use Moo; +use namespace::clean; + +with 'Lintian::Data::JoinedLines'; + +=head1 NAME + +Lintian::Data::Authority::MenuPolicy - Lintian interface for manual references + +=head1 SYNOPSIS + + use Lintian::Data::Authority::MenuPolicy; + +=head1 DESCRIPTION + +Lintian::Data::Authority::MenuPolicy provides a way to load data files for +manual references. + +=head1 CLASS METHODS + +=over 4 + +=item title + +=item shorthand + +=item location + +=item separator + +=cut + +has title => ( + is => 'rw', + default => 'Menu Policy' +); + +has shorthand => ( + is => 'rw', + default => 'menu-policy' +); + +has location => ( + is => 'rw', + lazy => 1, + default => sub { + my ($self) = @_; + + return 'authority/' . $self->shorthand; + } +); + +has separator => ( + is => 'rw', + default => sub { qr/::/ } +); + +=item consumer + +=cut + +sub consumer { + my ($self, $key, $remainder, $previous) = @_; + + return undef + if defined $previous; + + my ($title, $url)= split($self->separator, $remainder, $TWO_PARTS); + + my %entry; + $entry{title} = $title; + $entry{url} = $url; + + return \%entry; +} + +=item markdown_citation + +=cut + +sub markdown_citation { + my ($self, $section_key) = @_; + + croak "Invalid section $section_key" + if $section_key eq $VOLUME_KEY; + + my $volume_entry = $self->value($VOLUME_KEY); + + # start with the citation to the overall manual. + my $volume_title = $volume_entry->{title}; + my $volume_url = $volume_entry->{url}; + + my $section_title; + my $section_url; + + if ($self->recognizes($section_key)) { + + my $section_entry = $self->value($section_key); + + $section_title = $section_entry->{title}; + $section_url = $section_entry->{url}; + } + + return markdown_authority( + $volume_title, $volume_url,$section_key, + $section_title, $section_url + ); +} + +=item write_line + +=cut + +sub write_line { + my ($data_fd, $section_key, $section_title, $destination) = @_; + + # drop final dots + $section_key =~ s{ [.]+ $}{}x; + + # reduce consecutive whitespace + $section_title =~ s{ \s+ }{ }gx; + + my $line= join($SEPARATOR,$section_key, $section_title, $destination); + + say {$data_fd} encode_utf8($line); + + return; +} + +=item write_data_file + +=cut + +sub write_data_file { + my ($self, $basedir, $generated) = @_; + + my $header =<<"HEADER"; +# Data about titles, sections, and URLs of manuals, used to expand references +# in tag descriptions and add links for HTML output. Each line of this file +# has three fields separated by double colons: +# +# <section> :: <title> :: <url> +# +# If <section> is an underscore, that line specifies the title and URL for the +# whole manual. + +HEADER + + my $data_path = "$basedir/" . $self->location; + my $parent_dir = path($data_path)->parent->stringify; + path($parent_dir)->mkpath + unless -e $parent_dir; + + my $output = encode_utf8($header) . $generated; + path($data_path)->spew($output); + + return; +} + +=item extract_sections_from_links + +=cut + +sub extract_sections_from_links { + my ($self, $data_fd, $base_url)= @_; + + my $mechanize = WWW::Mechanize->new(); + $mechanize->get($base_url); + + my $page_title = $mechanize->title; + + # strip explanatory remark + $page_title =~ s{ \s* \N{EM DASH} .* $}{}x; + + # underscore is a token for the whole page + write_line($data_fd, $VOLUME_KEY, $page_title, $base_url); + + my %by_section_key; + my $in_appendix = 0; + + # https://stackoverflow.com/a/254687 + for my $link ($mechanize->links) { + + next + unless length $link->text; + + next + if $link->text !~ qr{^ \s* ([.\d]+) \s+ (.+) $}x; + + my $section_key = $1; + my $section_title = $2; + + # drop final dots + $section_key =~ s{ [.]+ $}{}x; + + # reduce consecutive whitespace + $section_title =~ s{ \s+ }{ }gx; + + my $destination = $base_url . $link->url; + + next + if exists $by_section_key{$section_key} + && ( $by_section_key{$section_key}{title} eq $section_title + || $by_section_key{$section_key}{destination} eq $destination); + + # Some manuals reuse section numbers for different references, + # e.g. the Debian Policy's normal and appendix sections are + # numbers that clash with each other. Track if we've already + # seen a section pointing to some other URL than the current one, + # and prepend it with an indicator + $in_appendix = 1 + if exists $by_section_key{$section_key} + && $by_section_key{$section_key}{destination} ne $destination; + + $section_key = "appendix-$section_key" + if $in_appendix; + + $by_section_key{$section_key}{title} = $section_title; + $by_section_key{$section_key}{destination} = $destination; + + write_line($data_fd, $section_key, $section_title, $destination); + } + + return; +} + +=item refresh + +=cut + +sub refresh { + my ($self, $archive, $basedir) = @_; + + my $base_url = 'https://www.debian.org/doc/packaging-manuals/menu-policy/'; + + my $generated; + open(my $memory_fd, '>', \$generated) + or die encode_utf8('Cannot open scalar'); + + $self->extract_sections_from_links($memory_fd, $base_url); + + close $memory_fd; + + $self->write_data_file($basedir, $generated); + + return; +} + +=back + +=head1 AUTHOR + +Originally written by Felix Lechner <felix.lechner@lease-up.com> for Lintian. + +=head1 SEE ALSO + +lintian(1) + +=cut + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Data/Authority/NewMaintainer.pm b/lib/Lintian/Data/Authority/NewMaintainer.pm new file mode 100644 index 0000000..bd8c933 --- /dev/null +++ b/lib/Lintian/Data/Authority/NewMaintainer.pm @@ -0,0 +1,290 @@ +# -*- perl -*- +# +# Copyright (C) 1998 Christian Schwarz and Richard Braakman +# Copyright (C) 2001 Colin Watson +# Copyright (C) 2008 Jorda Polo +# Copyright (C) 2009 Russ Allbery +# Copyright (C) 2017-2019 Chris Lamb <lamby@debian.org> +# Copyright (C) 2020-2021 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by the Free +# Software Foundation; either version 2 of the License, or (at your option) +# any later version. +# +# This program is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +# more details. +# +# You should have received a copy of the GNU General Public License along with +# this program. If not, see <http://www.gnu.org/licenses/>. + +package Lintian::Data::Authority::NewMaintainer; + +use v5.20; +use warnings; +use utf8; + +use Carp qw(croak); +use Const::Fast; +use List::SomeUtils qw(any first_value); +use Path::Tiny; +use Unicode::UTF8 qw(encode_utf8); +use WWW::Mechanize (); + +use Lintian::Output::Markdown qw(markdown_authority); + +const my $SLASH => q{/}; +const my $UNDERSCORE => q{_}; + +const my $VOLUME_KEY => $UNDERSCORE; +const my $SECTIONS => 'sections'; + +use Moo; +use namespace::clean; + +with 'Lintian::Data::PreambledJSON'; + +=head1 NAME + +Lintian::Data::Authority::NewMaintainer - Lintian interface for manual references + +=head1 SYNOPSIS + + use Lintian::Data::Authority::NewMaintainer; + +=head1 DESCRIPTION + +Lintian::Data::Authority::NewMaintainer provides a way to load data files for +manual references. + +=head1 CLASS METHODS + +=over 4 + +=item title + +=item shorthand + +=item location + +=item by_section_key + +=cut + +has title => ( + is => 'rw', + default => 'New Maintainer\'s Guide' +); + +has shorthand => ( + is => 'rw', + default => 'new-maintainer' +); + +has location => ( + is => 'rw', + lazy => 1, + default => sub { + my ($self) = @_; + + return 'authority/' . $self->shorthand . '.json'; + } +); + +has by_section_key => (is => 'rw', default => sub { {} }); + +=item markdown_citation + +=cut + +sub markdown_citation { + my ($self, $section_key) = @_; + + croak "Invalid section $section_key" + if $section_key eq $VOLUME_KEY; + + my $volume_entry = $self->value($VOLUME_KEY); + + # start with the citation to the overall manual. + my $volume_title = $volume_entry->{title}; + my $volume_url = $volume_entry->{destination}; + + my $section_title; + my $section_url; + + if ($self->recognizes($section_key)) { + + my $section_entry = $self->value($section_key); + + $section_title = $section_entry->{title}; + $section_url = $section_entry->{destination}; + } + + return markdown_authority( + $volume_title, $volume_url,$section_key, + $section_title, $section_url + ); +} + +=item recognizes (KEY) + +Returns true if KEY is known, and false otherwise. + +=cut + +sub recognizes { + my ($self, $key) = @_; + + return 0 + unless length $key; + + return 1 + if exists $self->by_section_key->{$key}; + + return 0; +} + +=item value (KEY) + +Returns the value attached to KEY if it was listed in the data +file represented by this Lintian::Data instance and the undefined value +otherwise. + +=cut + +sub value { + my ($self, $key) = @_; + + return undef + unless length $key; + + return $self->by_section_key->{$key}; +} + +=item load + +=cut + +sub load { + my ($self, $search_space, $our_vendor) = @_; + + my @candidates = map { $_ . $SLASH . $self->location } @{$search_space}; + my $path = first_value { -e } @candidates; + + my $reference; + + return 0 + unless $self->read_file($path, \$reference); + + my @sections = @{$reference // []}; + + for my $section (@sections) { + + my $key = $section->{key}; + + # only store first value for duplicates + # silently ignore later values + $self->by_section_key->{$key} //= $section; + } + + return 1; +} + +=item refresh + +=cut + +sub refresh { + my ($self, $archive, $basedir) = @_; + + my $base_url = 'https://www.debian.org/doc/manuals/maint-guide/index.html'; + + my $mechanize = WWW::Mechanize->new(); + $mechanize->get($base_url); + + my $page_title = $mechanize->title; + + my @sections; + + # underscore is a token for the whole page + my %volume; + $volume{key} = $VOLUME_KEY; + $volume{title} = $page_title; + $volume{destination} = $base_url; + + # store array to resemble web layout + # may contain duplicates + push(@sections, \%volume); + + my $in_appendix = 0; + + # https://stackoverflow.com/a/254687 + for my $link ($mechanize->links) { + + next + unless length $link->text; + + next + if $link->text !~ qr{^ \s* ([.\d[:upper:]]+) \s+ (.+) $}x; + + my $section_key = $1; + my $section_title = $2; + + # drop final dots + $section_key =~ s{ [.]+ $}{}x; + + # reduce consecutive whitespace + $section_title =~ s{ \s+ }{ }gx; + + my $destination = $base_url . $link->url; + + my @similar = grep { $_->{key} eq $section_key } @sections; + next + if (any { $_->{title} eq $section_title } @similar) + || (any { $_->{destination} eq $destination } @similar); + + # Some manuals reuse section numbers for different references, + # e.g. the Debian Policy's normal and appendix sections are + # numbers that clash with each other. Track if we've already + # seen a section pointing to some other URL than the current one, + # and prepend it with an indicator + $in_appendix = 1 + if any { $_->{destination} ne $destination } @similar; + + $section_key = "appendix-$section_key" + if $in_appendix; + + my %section; + $section{key} = $section_key; + $section{title} = $section_title; + $section{destination} = $destination; + push(@sections, \%section); + } + + my $data_path = "$basedir/" . $self->location; + my $status = $self->write_file($SECTIONS, \@sections, $data_path); + + return $status; +} + +=back + +=head1 AUTHOR + +Originally written by Felix Lechner <felix.lechner@lease-up.com> for Lintian. + +=head1 SEE ALSO + +lintian(1) + +=cut + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Data/Authority/PerlPolicy.pm b/lib/Lintian/Data/Authority/PerlPolicy.pm new file mode 100644 index 0000000..92dc31a --- /dev/null +++ b/lib/Lintian/Data/Authority/PerlPolicy.pm @@ -0,0 +1,316 @@ +# -*- perl -*- +# +# Copyright (C) 1998 Christian Schwarz and Richard Braakman +# Copyright (C) 2001 Colin Watson +# Copyright (C) 2008 Jorda Polo +# Copyright (C) 2009 Russ Allbery +# Copyright (C) 2017-2019 Chris Lamb <lamby@debian.org> +# Copyright (C) 2020-2021 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by the Free +# Software Foundation; either version 2 of the License, or (at your option) +# any later version. +# +# This program is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +# more details. +# +# You should have received a copy of the GNU General Public License along with +# this program. If not, see <http://www.gnu.org/licenses/>. + +package Lintian::Data::Authority::PerlPolicy; + +use v5.20; +use warnings; +use utf8; + +use Carp qw(croak); +use Const::Fast; +use Path::Tiny; +use Unicode::UTF8 qw(encode_utf8); +use WWW::Mechanize (); + +use Lintian::Output::Markdown qw(markdown_authority); + +const my $EMPTY => q{}; +const my $SPACE => q{ }; +const my $SLASH => q{/}; +const my $COLON => q{:}; +const my $UNDERSCORE => q{_}; +const my $LEFT_PARENTHESIS => q{(}; +const my $RIGHT_PARENTHESIS => q{)}; + +const my $TWO_PARTS => 2; + +const my $VOLUME_KEY => $UNDERSCORE; +const my $SEPARATOR => $COLON x 2; + +use Moo; +use namespace::clean; + +with 'Lintian::Data::JoinedLines'; + +=head1 NAME + +Lintian::Data::Authority::PerlPolicy - Lintian interface for manual references + +=head1 SYNOPSIS + + use Lintian::Data::Authority::PerlPolicy; + +=head1 DESCRIPTION + +Lintian::Data::Authority::PerlPolicy provides a way to load data files for +manual references. + +=head1 CLASS METHODS + +=over 4 + +=item title + +=item shorthand + +=item location + +=item separator + +=cut + +has title => ( + is => 'rw', + default => 'Perl Policy' +); + +has shorthand => ( + is => 'rw', + default => 'perl-policy' +); + +has location => ( + is => 'rw', + lazy => 1, + default => sub { + my ($self) = @_; + + return 'authority/' . $self->shorthand; + } +); + +has separator => ( + is => 'rw', + default => sub { qr/::/ } +); + +=item consumer + +=cut + +sub consumer { + my ($self, $key, $remainder, $previous) = @_; + + return undef + if defined $previous; + + my ($title, $url)= split($self->separator, $remainder, $TWO_PARTS); + + my %entry; + $entry{title} = $title; + $entry{url} = $url; + + return \%entry; +} + +=item markdown_citation + +=cut + +sub markdown_citation { + my ($self, $section_key) = @_; + + croak "Invalid section $section_key" + if $section_key eq $VOLUME_KEY; + + my $volume_entry = $self->value($VOLUME_KEY); + + # start with the citation to the overall manual. + my $volume_title = $volume_entry->{title}; + my $volume_url = $volume_entry->{url}; + + my $section_title; + my $section_url; + + if ($self->recognizes($section_key)) { + + my $section_entry = $self->value($section_key); + + $section_title = $section_entry->{title}; + $section_url = $section_entry->{url}; + } + + return markdown_authority( + $volume_title, $volume_url,$section_key, + $section_title, $section_url + ); +} + +=item write_line + +=cut + +sub write_line { + my ($data_fd, $section_key, $section_title, $destination) = @_; + + # drop final dots + $section_key =~ s{ [.]+ $}{}x; + + # reduce consecutive whitespace + $section_title =~ s{ \s+ }{ }gx; + + my $line= join($SEPARATOR,$section_key, $section_title, $destination); + + say {$data_fd} encode_utf8($line); + + return; +} + +=item write_data_file + +=cut + +sub write_data_file { + my ($self, $basedir, $generated) = @_; + + my $header =<<"HEADER"; +# Data about titles, sections, and URLs of manuals, used to expand references +# in tag descriptions and add links for HTML output. Each line of this file +# has three fields separated by double colons: +# +# <section> :: <title> :: <url> +# +# If <section> is an underscore, that line specifies the title and URL for the +# whole manual. + +HEADER + + my $data_path = "$basedir/" . $self->location; + my $parent_dir = path($data_path)->parent->stringify; + path($parent_dir)->mkpath + unless -e $parent_dir; + + my $output = encode_utf8($header) . $generated; + path($data_path)->spew($output); + + return; +} + +=item extract_sections_from_links + +=cut + +sub extract_sections_from_links { + my ($self, $data_fd, $base_url)= @_; + + my $mechanize = WWW::Mechanize->new(); + $mechanize->get($base_url); + + my $page_title = $mechanize->title; + + # strip explanatory remark + $page_title =~ s{ \s* \N{EM DASH} .* $}{}x; + + # underscore is a token for the whole page + write_line($data_fd, $VOLUME_KEY, $page_title, $base_url); + + my %by_section_key; + my $in_appendix = 0; + + # https://stackoverflow.com/a/254687 + for my $link ($mechanize->links) { + + next + unless length $link->text; + + next + if $link->text !~ qr{^ \s* ([A-Z]|[A-Z]?[.\d]+) \s+ (.+) $}x; + + my $section_key = $1; + my $section_title = $2; + + # drop final dots + $section_key =~ s{ [.]+ $}{}x; + + # reduce consecutive whitespace + $section_title =~ s{ \s+ }{ }gx; + + my $destination = $base_url . $link->url; + + next + if exists $by_section_key{$section_key} + && ( $by_section_key{$section_key}{title} eq $section_title + || $by_section_key{$section_key}{destination} eq $destination); + + # Some manuals reuse section numbers for different references, + # e.g. the Debian Policy's normal and appendix sections are + # numbers that clash with each other. Track if we've already + # seen a section pointing to some other URL than the current one, + # and prepend it with an indicator + $in_appendix = 1 + if exists $by_section_key{$section_key} + && $by_section_key{$section_key}{destination} ne $destination; + + $section_key = "appendix-$section_key" + if $in_appendix; + + $by_section_key{$section_key}{title} = $section_title; + $by_section_key{$section_key}{destination} = $destination; + + write_line($data_fd, $section_key, $section_title, $destination); + } + + return; +} + +=item refresh + +=cut + +sub refresh { + my ($self, $archive, $basedir) = @_; + + my $base_url = 'https://www.debian.org/doc/packaging-manuals/perl-policy/'; + + my $generated; + open(my $memory_fd, '>', \$generated) + or die encode_utf8('Cannot open scalar'); + + $self->extract_sections_from_links($memory_fd, $base_url); + + close $memory_fd; + + $self->write_data_file($basedir, $generated); + + return; +} + +=back + +=head1 AUTHOR + +Originally written by Felix Lechner <felix.lechner@lease-up.com> for Lintian. + +=head1 SEE ALSO + +lintian(1) + +=cut + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Data/Authority/PythonPolicy.pm b/lib/Lintian/Data/Authority/PythonPolicy.pm new file mode 100644 index 0000000..ebeda04 --- /dev/null +++ b/lib/Lintian/Data/Authority/PythonPolicy.pm @@ -0,0 +1,317 @@ +# -*- perl -*- +# +# Copyright (C) 1998 Christian Schwarz and Richard Braakman +# Copyright (C) 2001 Colin Watson +# Copyright (C) 2008 Jorda Polo +# Copyright (C) 2009 Russ Allbery +# Copyright (C) 2017-2019 Chris Lamb <lamby@debian.org> +# Copyright (C) 2020-2021 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by the Free +# Software Foundation; either version 2 of the License, or (at your option) +# any later version. +# +# This program is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +# more details. +# +# You should have received a copy of the GNU General Public License along with +# this program. If not, see <http://www.gnu.org/licenses/>. + +package Lintian::Data::Authority::PythonPolicy; + +use v5.20; +use warnings; +use utf8; + +use Carp qw(croak); +use Const::Fast; +use Path::Tiny; +use Unicode::UTF8 qw(encode_utf8); +use WWW::Mechanize (); + +use Lintian::Output::Markdown qw(markdown_authority); + +const my $EMPTY => q{}; +const my $SPACE => q{ }; +const my $SLASH => q{/}; +const my $COLON => q{:}; +const my $UNDERSCORE => q{_}; +const my $LEFT_PARENTHESIS => q{(}; +const my $RIGHT_PARENTHESIS => q{)}; + +const my $TWO_PARTS => 2; + +const my $VOLUME_KEY => $UNDERSCORE; +const my $SEPARATOR => $COLON x 2; + +use Moo; +use namespace::clean; + +with 'Lintian::Data::JoinedLines'; + +=head1 NAME + +Lintian::Data::Authority::PythonPolicy - Lintian interface for manual references + +=head1 SYNOPSIS + + use Lintian::Data::Authority::PythonPolicy; + +=head1 DESCRIPTION + +Lintian::Data::Authority::PythonPolicy provides a way to load data files for +manual references. + +=head1 CLASS METHODS + +=over 4 + +=item title + +=item shorthand + +=item location + +=item separator + +=cut + +has title => ( + is => 'rw', + default => 'Python Policy' +); + +has shorthand => ( + is => 'rw', + default => 'python-policy' +); + +has location => ( + is => 'rw', + lazy => 1, + default => sub { + my ($self) = @_; + + return 'authority/' . $self->shorthand; + } +); + +has separator => ( + is => 'rw', + default => sub { qr/::/ } +); + +=item consumer + +=cut + +sub consumer { + my ($self, $key, $remainder, $previous) = @_; + + return undef + if defined $previous; + + my ($title, $url)= split($self->separator, $remainder, $TWO_PARTS); + + my %entry; + $entry{title} = $title; + $entry{url} = $url; + + return \%entry; +} + +=item markdown_citation + +=cut + +sub markdown_citation { + my ($self, $section_key) = @_; + + croak "Invalid section $section_key" + if $section_key eq $VOLUME_KEY; + + my $volume_entry = $self->value($VOLUME_KEY); + + # start with the citation to the overall manual. + my $volume_title = $volume_entry->{title}; + my $volume_url = $volume_entry->{url}; + + my $section_title; + my $section_url; + + if ($self->recognizes($section_key)) { + + my $section_entry = $self->value($section_key); + + $section_title = $section_entry->{title}; + $section_url = $section_entry->{url}; + } + + return markdown_authority( + $volume_title, $volume_url,$section_key, + $section_title, $section_url + ); +} + +=item write_line + +=cut + +sub write_line { + my ($data_fd, $section_key, $section_title, $destination) = @_; + + # drop final dots + $section_key =~ s{ [.]+ $}{}x; + + # reduce consecutive whitespace + $section_title =~ s{ \s+ }{ }gx; + + my $line= join($SEPARATOR,$section_key, $section_title, $destination); + + say {$data_fd} encode_utf8($line); + + return; +} + +=item write_data_file + +=cut + +sub write_data_file { + my ($self, $basedir, $generated) = @_; + + my $header =<<"HEADER"; +# Data about titles, sections, and URLs of manuals, used to expand references +# in tag descriptions and add links for HTML output. Each line of this file +# has three fields separated by double colons: +# +# <section> :: <title> :: <url> +# +# If <section> is an underscore, that line specifies the title and URL for the +# whole manual. + +HEADER + + my $data_path = "$basedir/" . $self->location; + my $parent_dir = path($data_path)->parent->stringify; + path($parent_dir)->mkpath + unless -e $parent_dir; + + my $output = encode_utf8($header) . $generated; + path($data_path)->spew($output); + + return; +} + +=item extract_sections_from_links + +=cut + +sub extract_sections_from_links { + my ($self, $data_fd, $base_url)= @_; + + my $mechanize = WWW::Mechanize->new(); + $mechanize->get($base_url); + + my $page_title = $mechanize->title; + + # strip explanatory remark + $page_title =~ s{ \s* \N{EM DASH} .* $}{}x; + + # underscore is a token for the whole page + write_line($data_fd, $VOLUME_KEY, $page_title, $base_url); + + my %by_section_key; + my $in_appendix = 0; + + # https://stackoverflow.com/a/254687 + for my $link ($mechanize->links) { + + next + unless length $link->text; + + next + if $link->text !~ qr{^ \s* ([.\d]+) \s+ (.+) $}x; + + my $section_key = $1; + my $section_title = $2; + + # drop final dots + $section_key =~ s{ [.]+ $}{}x; + + # reduce consecutive whitespace + $section_title =~ s{ \s+ }{ }gx; + + my $destination = $base_url . $link->url; + + next + if exists $by_section_key{$section_key} + && ( $by_section_key{$section_key}{title} eq $section_title + || $by_section_key{$section_key}{destination} eq $destination); + + # Some manuals reuse section numbers for different references, + # e.g. the Debian Policy's normal and appendix sections are + # numbers that clash with each other. Track if we've already + # seen a section pointing to some other URL than the current one, + # and prepend it with an indicator + $in_appendix = 1 + if exists $by_section_key{$section_key} + && $by_section_key{$section_key}{destination} ne $destination; + + $section_key = "appendix-$section_key" + if $in_appendix; + + $by_section_key{$section_key}{title} = $section_title; + $by_section_key{$section_key}{destination} = $destination; + + write_line($data_fd, $section_key, $section_title, $destination); + } + + return; +} + +=item refresh + +=cut + +sub refresh { + my ($self, $archive, $basedir) = @_; + + my $base_url + = 'https://www.debian.org/doc/packaging-manuals/python-policy/'; + + my $generated; + open(my $memory_fd, '>', \$generated) + or die encode_utf8('Cannot open scalar'); + + $self->extract_sections_from_links($memory_fd, $base_url); + + close $memory_fd; + + $self->write_data_file($basedir, $generated); + + return; +} + +=back + +=head1 AUTHOR + +Originally written by Felix Lechner <felix.lechner@lease-up.com> for Lintian. + +=head1 SEE ALSO + +lintian(1) + +=cut + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Data/Authority/VimPolicy.pm b/lib/Lintian/Data/Authority/VimPolicy.pm new file mode 100644 index 0000000..6ffbe91 --- /dev/null +++ b/lib/Lintian/Data/Authority/VimPolicy.pm @@ -0,0 +1,459 @@ +# -*- perl -*- +# +# Copyright (C) 1998 Christian Schwarz and Richard Braakman +# Copyright (C) 2001 Colin Watson +# Copyright (C) 2008 Jorda Polo +# Copyright (C) 2009 Russ Allbery +# Copyright (C) 2017-2019 Chris Lamb <lamby@debian.org> +# Copyright (C) 2020-2021 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by the Free +# Software Foundation; either version 2 of the License, or (at your option) +# any later version. +# +# This program is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +# more details. +# +# You should have received a copy of the GNU General Public License along with +# this program. If not, see <http://www.gnu.org/licenses/>. + +package Lintian::Data::Authority::VimPolicy; + +use v5.20; +use warnings; +use utf8; + +use Carp qw(croak); +use Const::Fast; +use File::Basename qw(basename); +use IPC::Run3; +use HTML::TokeParser::Simple; +use Path::Tiny; +use Unicode::UTF8 qw(encode_utf8); + +use Lintian::Output::Markdown qw(markdown_authority); + +const my $EMPTY => q{}; +const my $SPACE => q{ }; +const my $SLASH => q{/}; +const my $COLON => q{:}; +const my $INDENT => $SPACE x 4; +const my $UNDERSCORE => q{_}; +const my $LEFT_PARENTHESIS => q{(}; +const my $RIGHT_PARENTHESIS => q{)}; + +const my $TWO_PARTS => 2; + +const my $VOLUME_KEY => $UNDERSCORE; +const my $SEPARATOR => $COLON x 2; + +const my $WAIT_STATUS_SHIFT => 8; + +use Moo; +use namespace::clean; + +with 'Lintian::Data::JoinedLines'; + +=head1 NAME + +Lintian::Data::Authority::VimPolicy - Lintian interface for manual references + +=head1 SYNOPSIS + + use Lintian::Data::Authority::VimPolicy; + +=head1 DESCRIPTION + +Lintian::Data::Authority::VimPolicy provides a way to load data files for +manual references. + +=head1 CLASS METHODS + +=over 4 + +=item title + +=item shorthand + +=item location + +=item separator + +=cut + +has title => ( + is => 'rw', + default => 'Vim Policy' +); + +has shorthand => ( + is => 'rw', + default => 'vim-policy' +); + +has location => ( + is => 'rw', + lazy => 1, + default => sub { + my ($self) = @_; + + return 'authority/' . $self->shorthand; + } +); + +has separator => ( + is => 'rw', + default => sub { qr/::/ } +); + +=item consumer + +=cut + +sub consumer { + my ($self, $key, $remainder, $previous) = @_; + + return undef + if defined $previous; + + my ($title, $url)= split($self->separator, $remainder, $TWO_PARTS); + + my %entry; + $entry{title} = $title; + $entry{url} = $url; + + return \%entry; +} + +=item markdown_citation + +=cut + +sub markdown_citation { + my ($self, $section_key) = @_; + + croak "Invalid section $section_key" + if $section_key eq $VOLUME_KEY; + + my $volume_entry = $self->value($VOLUME_KEY); + + # start with the citation to the overall manual. + my $volume_title = $volume_entry->{title}; + my $volume_url = $volume_entry->{url}; + + my $section_title; + my $section_url; + + if ($self->recognizes($section_key)) { + + my $section_entry = $self->value($section_key); + + $section_title = $section_entry->{title}; + $section_url = $section_entry->{url}; + } + + return markdown_authority( + $volume_title, $volume_url,$section_key, + $section_title, $section_url + ); +} + +=item write_line + +=cut + +sub write_line { + my ($data_fd, $section_key, $section_title, $destination) = @_; + + # drop final dots + $section_key =~ s{ [.]+ $}{}x; + + # reduce consecutive whitespace + $section_title =~ s{ \s+ }{ }gx; + + my $line= join($SEPARATOR,$section_key, $section_title, $destination); + + say {$data_fd} encode_utf8($line); + + return; +} + +=item write_data_file + +=cut + +sub write_data_file { + my ($self, $basedir, $generated) = @_; + + my $header =<<"HEADER"; +# Data about titles, sections, and URLs of manuals, used to expand references +# in tag descriptions and add links for HTML output. Each line of this file +# has three fields separated by double colons: +# +# <section> :: <title> :: <url> +# +# If <section> is an underscore, that line specifies the title and URL for the +# whole manual. + +HEADER + + my $data_path = "$basedir/" . $self->location; + my $parent_dir = path($data_path)->parent->stringify; + path($parent_dir)->mkpath + unless -e $parent_dir; + + my $output = encode_utf8($header) . $generated; + path($data_path)->spew($output); + + return; +} + +=item find_installable_name + +=cut + +sub find_installable_name { + my ($self, $archive, $release, $liberty, $port, $requested_path) = @_; + + my @installed_by; + + # find installable package + for my $installable_architecture ('all', $port) { + + my $local_path + = $archive->contents_gz($release, $liberty, + $installable_architecture); + + open(my $fd, '<:gzip', $local_path) + or die encode_utf8("Cannot open $local_path."); + + while (my $line = <$fd>) { + + chomp $line; + + my ($path, $finder) = split($SPACE, $line, 2); + next + unless length $path + && length $finder; + + if ($path eq $requested_path) { + + my $name = $1; + + my @locations = split(m{,}, $finder); + for my $location (@locations) { + + my ($section, $installable)= split(m{/}, $location, 2); + + push(@installed_by, $installable); + } + + next; + } + } + + close $fd; + } + + die encode_utf8( + "The path $requested_path is not installed by any package.") + if @installed_by < 1; + + if (@installed_by > 1) { + warn encode_utf8( + "The path $requested_path is installed by multiple packages:\n"); + warn encode_utf8($INDENT . "- $_\n")for @installed_by; + } + + my $installable_name = shift @installed_by; + + return $installable_name; +} + +=item refresh + +=cut + +sub refresh { + my ($self, $archive, $basedir) = @_; + + # shipped as part of the vim installable + my $shipped_base = 'usr/share/doc/vim/vim-policy.html/'; + my $index_name = 'index.html'; + + my $shipped_path = $shipped_base . $index_name; + my $stored_uri = "file:///$shipped_base"; + + # neutral sort order + local $ENV{LC_ALL} = 'C'; + + my $release = 'stable'; + my $port = 'amd64'; + + my $installable_name + = $self->find_installable_name($archive, $release, 'main', $port, + $shipped_path); + + my $deb822_by_installable_name + = $archive->deb822_packages_by_installable_name($release, 'main', $port); + + my $work_folder + = Path::Tiny->tempdir( + TEMPLATE => 'refresh-doc-base-specification-XXXXXXXXXX'); + + die encode_utf8("Installable $installable_name not shipped in port $port") + unless exists $deb822_by_installable_name->{$installable_name}; + + my $deb822 = $deb822_by_installable_name->{$installable_name}; + + my $pool_path = $deb822->value('Filename'); + + my $deb_filename = basename($pool_path); + my $deb_local_path = "$work_folder/$deb_filename"; + my $deb_url = $archive->mirror_base . $SLASH . $pool_path; + + my $stderr; + run3([qw{wget --quiet}, "--output-document=$deb_local_path", $deb_url], + undef, \$stderr); + my $status = ($? >> $WAIT_STATUS_SHIFT); + + # stderr already in UTF-8 + die $stderr + if $status; + + my $extract_folder = "$work_folder/unpacked/$pool_path"; + path($extract_folder)->mkpath; + + run3([qw{dpkg-deb --extract}, $deb_local_path, $extract_folder], + undef, \$stderr); + $status = ($? >> $WAIT_STATUS_SHIFT); + + # stderr already in UTF-8 + die $stderr + if $status; + + unlink($deb_local_path) + or die encode_utf8("Cannot delete $deb_local_path"); + + my $generated; + open(my $memory_fd, '>', \$generated) + or die encode_utf8("Cannot open scalar: $!"); + + my $fresh_uri = URI::file->new_abs("/$extract_folder/$shipped_path"); + + my $parser = HTML::TokeParser::Simple->new(url => $fresh_uri); + my $in_title = 0; + my $in_dt_tag = 0; + my $after_a_tag = 0; + + my $page_title = $EMPTY; + my $section_key = $EMPTY; + my $section_title = $EMPTY; + my $relative_destination = $EMPTY; + + while (my $token = $parser->get_token) { + + if (length $token->get_tag) { + + if ($token->get_tag eq 'h1') { + + $in_title = ($token->is_start_tag + && $token->get_attr('class') eq 'title'); + + # not yet leaving title + next + if $in_title; + + # trim both ends + $page_title =~ s/^\s+|\s+$//g; + + # underscore is a token for the whole page + write_line($memory_fd, $VOLUME_KEY, $page_title, + $stored_uri . $index_name) + if length $page_title; + + $page_title = $EMPTY; + } + + if ($token->get_tag eq 'dt') { + + $in_dt_tag = $token->is_start_tag; + + # not yet leaving dt tag + next + if $in_dt_tag; + + # trim both ends + $section_key =~ s/^\s+|\s+$//g; + $section_title =~ s/^\s+|\s+$//g; + + my $full_destination = $stored_uri . $relative_destination; + + write_line( + $memory_fd, $section_key, + $section_title,$full_destination + )if length $section_title; + + $section_key = $EMPTY; + $section_title = $EMPTY; + $relative_destination = $EMPTY; + } + + if ($token->get_tag eq 'a') { + + $after_a_tag = $token->is_start_tag; + + $relative_destination = $token->get_attr('href') + if $token->is_start_tag; + } + + } else { + + # concatenate span objects + $page_title .= $token->as_is + if length $token->as_is + && $in_title + && $after_a_tag; + + $section_key = $token->as_is + if length $token->as_is + && $in_dt_tag + && !$after_a_tag; + + # concatenate span objects + $section_title .= $token->as_is + if length $token->as_is + && $in_dt_tag + && $after_a_tag; + } + } + + close $memory_fd; + + $self->write_data_file($basedir, $generated); + + return; +} + +=back + +=head1 AUTHOR + +Originally written by Felix Lechner <felix.lechner@lease-up.com> for Lintian. + +=head1 SEE ALSO + +lintian(1) + +=cut + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Data/Buildflags/Hardening.pm b/lib/Lintian/Data/Buildflags/Hardening.pm new file mode 100644 index 0000000..75056df --- /dev/null +++ b/lib/Lintian/Data/Buildflags/Hardening.pm @@ -0,0 +1,154 @@ +# -*- perl -*- + +# Copyright (C) 2011-2012 Niels Thykier <niels@thykier.net> +# - Based on a shell script by Raphael Geissert <atomo64@gmail.com> +# Copyright (C) 2021 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by the Free +# Software Foundation; either version 2 of the License, or (at your option) +# any later version. +# +# This program is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +# more details. +# +# You should have received a copy of the GNU General Public License along with +# this program. If not, see <http://www.gnu.org/licenses/>. + +package Lintian::Data::Buildflags::Hardening; + +use v5.20; +use warnings; +use utf8; + +use Const::Fast; +use List::SomeUtils qw(first_value uniq); +use Unicode::UTF8 qw(decode_utf8); + +use Lintian::Deb822; +use Lintian::IPC::Run3 qw(safe_qx); + +use Moo; +use namespace::clean; + +const my $EMPTY => q{}; +const my $SLASH => q{/}; + +const my $RECOMMENDED_FEATURES => q{recommended_features}; + +with 'Lintian::Data::PreambledJSON'; + +=encoding utf-8 + +=head1 NAME + +Lintian::Data::Buildflags::Hardening -- Lintian API for hardening build flags + +=head1 SYNOPSIS + + use Lintian::Data::Buildflags::Hardening; + +=head1 DESCRIPTION + +Lintian API for hardening build flags. + +=head1 INSTANCE METHODS + +=over 4 + +=item title + +=item location + +=item recommended_features + +=cut + +has title => ( + is => 'rw', + default => 'Hardening Flags from Dpkg' +); + +has location => ( + is => 'rw', + default => 'buildflags/hardening.json' +); + +has recommended_features => ( + is => 'rw', + default => sub { {} }, + coerce => sub { my ($hashref) = @_; return ($hashref // {}); } +); + +=item load + +=cut + +sub load { + my ($self, $search_space, $our_vendor) = @_; + + my @candidates = map { $_ . $SLASH . $self->location } @{$search_space}; + my $path = first_value { -e } @candidates; + + my $recommended_features; + return 0 + unless $self->read_file($path, \$recommended_features); + + $self->recommended_features($recommended_features); + + return 1; +} + +=item refresh + +=cut + +sub refresh { + my ($self, $archive, $basedir) = @_; + + # find all recommended hardening features + local $ENV{LC_ALL} = 'C'; + local $ENV{DEB_BUILD_MAINT_OPTIONS} = 'hardening=+all'; + + my @architectures + = split(/\n/, decode_utf8(safe_qx('dpkg-architecture', '-L'))); + chomp for @architectures; + + my %recommended_features; + for my $architecture (@architectures) { + + local $ENV{DEB_HOST_ARCH} = $architecture; + + my @command = qw{dpkg-buildflags --query-features hardening}; + my $feature_output = decode_utf8(safe_qx(@command)); + + my $deb822 = Lintian::Deb822->new; + my @sections = $deb822->parse_string($feature_output); + + my @enabled = grep { $_->value('Enabled') eq 'yes' } @sections; + my @features = uniq map { $_->value('Feature') } @enabled; + + $recommended_features{$architecture} = [sort @features]; + } + + my $data_path = "$basedir/" . $self->location; + my $status + = $self->write_file($RECOMMENDED_FEATURES, \%recommended_features, + $data_path); + + return $status; +} + +=back + +=cut + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Data/Debhelper/Addons.pm b/lib/Lintian/Data/Debhelper/Addons.pm new file mode 100644 index 0000000..3b8dbb1 --- /dev/null +++ b/lib/Lintian/Data/Debhelper/Addons.pm @@ -0,0 +1,215 @@ +# -*- perl -*- +# +# Copyright (C) 2008 by Raphael Geissert <atomo64@gmail.com> +# Copyright (C) 2017-2018 Chris Lamb <lamby@debian.org> +# Copyright (C) 2021 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by the Free +# Software Foundation; either version 2 of the License, or (at your option) +# any later version. +# +# This program is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +# more details. +# +# You should have received a copy of the GNU General Public License along with +# this program. If not, see <http://www.gnu.org/licenses/>. + +package Lintian::Data::Debhelper::Addons; + +use v5.20; +use warnings; +use utf8; + +use Carp qw(croak); +use Const::Fast; +use List::SomeUtils qw(first_value any uniq); +use PerlIO::gzip; +use Unicode::UTF8 qw(encode_utf8); + +const my $SPACE => q{ }; +const my $SLASH => q{/}; + +const my $WAIT_STATUS_SHIFT => 8; + +const my $ADD_ONS => 'add_ons'; + +use Moo; +use namespace::clean; + +with 'Lintian::Data::PreambledJSON'; + +=head1 NAME + +Lintian::Data::Debhelper::Addons - Lintian interface for debhelper addons. + +=head1 SYNOPSIS + + use Lintian::Data::Debhelper::Addons; + +=head1 DESCRIPTION + +This module provides a way to load data files for debhelper. + +=head1 INSTANCE METHODS + +=over 4 + +=item title + +=item location + +=item installable_names_by_add_on + +=cut + +has title => ( + is => 'rw', + default => 'Debhelper Add-ons' +); + +has location => ( + is => 'rw', + default => 'debhelper/add_ons.json' +); + +has installable_names_by_add_on => (is => 'rw', default => sub { {} }); + +=item all + +=cut + +sub all { + my ($self) = @_; + + return keys %{$self->installable_names_by_add_on}; +} + +=item installed_by + +=cut + +sub installed_by { + my ($self, $name) = @_; + + return () + unless exists $self->installable_names_by_add_on->{$name}; + + my @installed_by = @{$self->installable_names_by_add_on->{$name} // []}; + + push(@installed_by, 'debhelper-compat') + if any { $_ eq 'debhelper' } @installed_by; + + return @installed_by; +} + +=item load + +=cut + +sub load { + my ($self, $search_space, $our_vendor) = @_; + + my @candidates = map { $_ . $SLASH . $self->location } @{$search_space}; + my $path = first_value { -e } @candidates; + + my $reference; + return 0 + unless $self->read_file($path, \$reference); + + my %add_ons = %{$reference // {}}; + my %installable_names_by_add_on; + + for my $name (keys %add_ons) { + + my @installable_names; + push(@installable_names, @{$add_ons{$name}{installed_by}}); + + $installable_names_by_add_on{$name} = \@installable_names; + } + + $self->installable_names_by_add_on(\%installable_names_by_add_on); + + return 1; +} + +=item refresh + +=cut + +sub refresh { + my ($self, $archive, $basedir) = @_; + + # neutral sort order + local $ENV{LC_ALL} = 'C'; + + my $port = 'amd64'; + + my %add_ons; + + for my $installable_architecture ('all', $port) { + + my $local_path + = $archive->contents_gz('sid', 'main', $installable_architecture); + + open(my $fd, '<:gzip', $local_path) + or die encode_utf8("Cannot open $local_path."); + + while (my $line = <$fd>) { + + chomp $line; + + my ($path, $finder) = split($SPACE, $line, 2); + next + unless length $path + && length $finder; + + if ($path + =~ m{^ usr/share/perl5/Debian/Debhelper/Sequence/ (\S+) [.]pm $}x + ) { + + my $name = $1; + + my @locations = split(m{,}, $finder); + for my $location (@locations) { + + my ($section, $installable)= split(m{/}, $location, 2); + + $add_ons{$name}{installed_by} //= []; + push(@{$add_ons{$name}{installed_by}}, $installable); + } + + next; + } + } + + close $fd; + } + + my $data_path = "$basedir/" . $self->location; + my $status = $self->write_file($ADD_ONS, \%add_ons,$data_path); + + return $status; +} + +=back + +=head1 AUTHOR + +Originally written by Felix Lechner <felix.lechner@lease-up.com> for Lintian. + +=head1 SEE ALSO + +lintian(1) + +=cut + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Data/Debhelper/Commands.pm b/lib/Lintian/Data/Debhelper/Commands.pm new file mode 100644 index 0000000..bd1ea67 --- /dev/null +++ b/lib/Lintian/Data/Debhelper/Commands.pm @@ -0,0 +1,306 @@ +# -*- perl -*- +# +# Copyright (C) 2008 by Raphael Geissert <atomo64@gmail.com> +# Copyright (C) 2017-2018 Chris Lamb <lamby@debian.org> +# Copyright (C) 2021 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by the Free +# Software Foundation; either version 2 of the License, or (at your option) +# any later version. +# +# This program is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +# more details. +# +# You should have received a copy of the GNU General Public License along with +# this program. If not, see <http://www.gnu.org/licenses/>. + +package Lintian::Data::Debhelper::Commands; + +use v5.20; +use warnings; +use utf8; + +use Const::Fast; +use File::Basename; +use IPC::Run3; +use List::SomeUtils qw(first_value any uniq); +use Path::Tiny; +use PerlIO::gzip; +use Unicode::UTF8 qw(encode_utf8); + +const my $SPACE => q{ }; +const my $SLASH => q{/}; + +const my $WAIT_STATUS_SHIFT => 8; + +const my $COMMANDS => 'commands'; + +use Moo; +use namespace::clean; + +with 'Lintian::Data::PreambledJSON'; + +=head1 NAME + +Lintian::Data::Debhelper::Commands - Lintian interface for debhelper commands. + +=head1 SYNOPSIS + + use Lintian::Data::Debhelper::Commands; + +=head1 DESCRIPTION + +This module provides a way to load data files for debhelper. + +=head1 INSTANCE METHODS + +=over 4 + +=item title + +=item location + +=item installable_names_by_command + +=item maint_commands + +=item misc_depends_commands + +=cut + +has title => ( + is => 'rw', + default => 'Debhelper Commands' +); + +has location => ( + is => 'rw', + default => 'debhelper/commands.json' +); + +has installable_names_by_command => (is => 'rw', default => sub { {} }); +has maint_commands => (is => 'rw', default => sub { [] }); +has misc_depends_commands => (is => 'rw', default => sub { [] }); + +=item all + +=cut + +sub all { + my ($self) = @_; + + return keys %{$self->installable_names_by_command}; +} + +=item installed_by + +=cut + +sub installed_by { + my ($self, $name) = @_; + + return () + unless exists $self->installable_names_by_command->{$name}; + + my @installed_by = @{$self->installable_names_by_command->{$name} // []}; + + push(@installed_by, 'debhelper-compat') + if any { $_ eq 'debhelper' } @installed_by; + + return @installed_by; +} + +=item load + +=cut + +sub load { + my ($self, $search_space, $our_vendor) = @_; + + my @candidates = map { $_ . $SLASH . $self->location } @{$search_space}; + my $path = first_value { -e } @candidates; + + my $reference; + return 0 + unless $self->read_file($path, \$reference); + + my %commands = %{$reference // {}}; + + my %installable_names_by_command; + my @maint_commands; + my @misc_depends_commands; + + for my $name (keys %commands) { + + my @installable_names; + push(@installable_names, @{$commands{$name}{installed_by}}); + + $installable_names_by_command{$name} = \@installable_names; + + push(@maint_commands, $name) + if $commands{$name}{uses_autoscript}; + + push(@misc_depends_commands, $name) + if $commands{$name}{uses_misc_depends} + && $name ne 'dh_gencontrol'; + } + + $self->installable_names_by_command(\%installable_names_by_command); + $self->maint_commands(\@maint_commands); + $self->misc_depends_commands(\@misc_depends_commands); + + return 1; +} + +=item refresh + +=cut + +sub refresh { + my ($self, $archive, $basedir) = @_; + + # neutral sort order + local $ENV{LC_ALL} = 'C'; + + my $port = 'amd64'; + + my %commands; + + for my $installable_architecture ('all', $port) { + + my $local_path + = $archive->contents_gz('sid', 'main', $installable_architecture); + + open(my $fd, '<:gzip', $local_path) + or die encode_utf8("Cannot open $local_path."); + + while (my $line = <$fd>) { + + chomp $line; + + my ($path, $finder) = split($SPACE, $line, 2); + next + unless length $path + && length $finder; + + if ($path =~ m{^ usr/bin/ (dh_ \S+) $}x) { + + my $name = $1; + + my @locations = split(m{,}, $finder); + for my $location (@locations) { + + my ($section, $installable)= split(m{/}, $location, 2); + + $commands{$name}{installed_by} //= []; + push(@{$commands{$name}{installed_by}}, $installable); + } + + next; + } + } + + close $fd; + } + + my $deb822_by_installable_name + = $archive->deb822_packages_by_installable_name('sid', 'main', $port); + + my $work_folder + = Path::Tiny->tempdir( + TEMPLATE => 'refresh-debhelper-add-ons-XXXXXXXXXX'); + + my @uses_autoscript; + my @uses_misc_depends; + + my @installable_names= uniq map { @{$_->{installed_by}} }values %commands; + + for my $installable_name (sort @installable_names) { + + next + unless exists $deb822_by_installable_name->{$installable_name}; + + my $deb822 = $deb822_by_installable_name->{$installable_name}; + + my $pool_path = $deb822->value('Filename'); + + my $deb_filename = basename($pool_path); + my $deb_local_path = "$work_folder/$deb_filename"; + my $deb_url = $archive->mirror_base . $SLASH . $pool_path; + + my $stderr; + run3( + [qw{wget --quiet}, "--output-document=$deb_local_path", $deb_url], + undef, \$stderr + ); + my $status = ($? >> $WAIT_STATUS_SHIFT); + + # stderr already in UTF-8 + die $stderr + if $status; + + my $extract_folder = "$work_folder/pool/$pool_path"; + path($extract_folder)->mkpath; + + run3([qw{dpkg-deb --extract}, $deb_local_path, $extract_folder], + undef, \$stderr); + $status = ($? >> $WAIT_STATUS_SHIFT); + + # stderr already in UTF-8 + die $stderr + if $status; + + unlink($deb_local_path) + or die encode_utf8("Cannot delete $deb_local_path"); + + my $autoscript_rule = File::Find::Rule->file; + $autoscript_rule->name(qr{^dh_}); + $autoscript_rule->grep(qr{autoscript}); + my @autoscript_matches + = $autoscript_rule->in("$extract_folder/usr/bin"); + + push(@uses_autoscript, map { basename($_) } @autoscript_matches); + + my $misc_depends_rule = File::Find::Rule->file; + $misc_depends_rule->name(qr{^dh_}); + $misc_depends_rule->grep(qr{misc:Depends}); + my @misc_depends_matches + = $misc_depends_rule->in("$extract_folder/usr/bin"); + + push(@uses_misc_depends, map { basename($_) } @misc_depends_matches); + + path("$work_folder/pool")->remove_tree; + } + + $commands{$_}{uses_autoscript} = 1 for @uses_autoscript; + + $commands{$_}{uses_misc_depends} = 1 for @uses_misc_depends; + + my $data_path = "$basedir/" . $self->location; + my $status = $self->write_file($COMMANDS, \%commands,$data_path); + + return $status; +} + +=back + +=head1 AUTHOR + +Originally written by Felix Lechner <felix.lechner@lease-up.com> for Lintian. + +=head1 SEE ALSO + +lintian(1) + +=cut + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Data/Debhelper/Levels.pm b/lib/Lintian/Data/Debhelper/Levels.pm new file mode 100644 index 0000000..571ce2c --- /dev/null +++ b/lib/Lintian/Data/Debhelper/Levels.pm @@ -0,0 +1,89 @@ +# -*- perl -*- +# +# Copyright (C) 1998 Christian Schwarz and Richard Braakman +# Copyright (C) 2009 Russ Allbery +# Copyright (C) 2020 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by the Free +# Software Foundation; either version 2 of the License, or (at your option) +# any later version. +# +# This program is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +# more details. +# +# You should have received a copy of the GNU General Public License along with +# this program. If not, see <http://www.gnu.org/licenses/>. + +package Lintian::Data::Debhelper::Levels; + +use v5.20; +use warnings; +use utf8; + +use Moo; +use namespace::clean; + +with 'Lintian::Data::JoinedLines'; + +=head1 NAME + +Lintian::Data::Debhelper::Levels - Lintian interface for debhelper +compat levels. + +=head1 SYNOPSIS + + use Lintian::Data::Debhelper::Levels; + +=head1 DESCRIPTION + +This module provides a way to load data files for debhelper. + +=head1 INSTANCE METHODS + +=over 4 + +=item title + +=item location + +=item separator + +=cut + +has title => ( + is => 'rw', + default => 'Debhelper Levels' +); + +has location => ( + is => 'rw', + default => 'debhelper/compat-level' +); + +has separator => ( + is => 'rw', + default => sub { qr/=/ } +); + +=back + +=head1 AUTHOR + +Originally written by Felix Lechner <felix.lechner@lease-up.com> for Lintian. + +=head1 SEE ALSO + +lintian(1) + +=cut + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Data/Fonts.pm b/lib/Lintian/Data/Fonts.pm new file mode 100644 index 0000000..4820439 --- /dev/null +++ b/lib/Lintian/Data/Fonts.pm @@ -0,0 +1,216 @@ +# -*- perl -*- +# +# Copyright (C) 2021 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by the Free +# Software Foundation; either version 2 of the License, or (at your option) +# any later version. +# +# This program is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +# more details. +# +# You should have received a copy of the GNU General Public License along with +# this program. If not, see <http://www.gnu.org/licenses/>. + +package Lintian::Data::Fonts; + +use v5.20; +use warnings; +use utf8; + +use Const::Fast; +use File::Basename; +use List::SomeUtils qw(first_value uniq); +use PerlIO::gzip; +use Unicode::UTF8 qw(encode_utf8); + +const my $SPACE => q{ }; +const my $SLASH => q{/}; + +const my $FONTS => 'fonts'; + +use Moo; +use namespace::clean; + +with 'Lintian::Data::PreambledJSON'; + +=head1 NAME + +Lintian::Data::Fonts - Lintian interface for fonts. + +=head1 SYNOPSIS + + use Lintian::Data::Fonts; + +=head1 DESCRIPTION + +This module provides a way to load data files for fonts. + +=head1 INSTANCE METHODS + +=over 4 + +=item title + +=item location + +=item installable_names_by_font + +=cut + +has title => ( + is => 'rw', + default => 'Fonts Available for Installation' +); + +has location => ( + is => 'rw', + default => 'fonts.json' +); + +has installable_names_by_font => (is => 'rw', default => sub { {} }); + +=item all + +=cut + +sub all { + my ($self) = @_; + + return keys %{$self->installable_names_by_font}; +} + +=item installed_by + +=cut + +sub installed_by { + my ($self, $name) = @_; + + my $lowercase = lc $name; + + return () + unless exists $self->installable_names_by_font->{$lowercase}; + + my @installed_by = @{$self->installable_names_by_font->{$lowercase} // []}; + + return @installed_by; +} + +=item load + +=cut + +sub load { + my ($self, $search_space, $our_vendor) = @_; + + my @candidates = map { $_ . $SLASH . $self->location } @{$search_space}; + my $path = first_value { -e } @candidates; + + my $reference; + return 0 + unless $self->read_file($path, \$reference); + + my %fonts = %{$reference // {}}; + my %installable_names_by_font; + + for my $name (keys %fonts) { + + my @installable_names; + push(@installable_names, @{$fonts{$name}{installed_by}}); + + $installable_names_by_font{$name} = \@installable_names; + } + + $self->installable_names_by_font(\%installable_names_by_font); + + return 1; +} + +=item refresh + +=cut + +sub refresh { + my ($self, $archive, $basedir) = @_; + + # neutral sort order + local $ENV{LC_ALL} = 'C'; + + my $port = 'amd64'; + + my %fonts; + + for my $installable_architecture ('all', $port) { + + my $local_path + = $archive->contents_gz('sid', 'main', $installable_architecture); + + open(my $fd, '<:gzip', $local_path) + or die encode_utf8("Cannot open $local_path."); + + while (my $line = <$fd>) { + + chomp $line; + + my ($path, $finder) = split($SPACE, $line, 2); + next + unless length $path + && length $finder; + + if ($path =~ m{ [.] (?:[to]tf|pfb) $}ix) { + + my @locations = split(m{,}, $finder); + for my $location (@locations) { + + my ($section, $installable_name) + = split(m{/}, $location, 2); + + # Record only packages starting with ttf-, otf-, t1-, xfonts- or fonts- + next + unless $installable_name + =~ m{^ (?: [to]tf | t1 | x?fonts ) - }x; + + my $basename = basename($path); + my $lowercase = lc $basename; + + $fonts{$lowercase}{installed_by} //= []; + push(@{$fonts{$lowercase}{installed_by}}, + $installable_name); + } + + next; + } + } + + close $fd; + } + + my $data_path = "$basedir/" . $self->location; + my $status = $self->write_file($FONTS, \%fonts,$data_path); + + return $status; +} + +=back + +=head1 AUTHOR + +Originally written by Felix Lechner <felix.lechner@lease-up.com> for Lintian. + +=head1 SEE ALSO + +lintian(1) + +=cut + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Data/InitD/VirtualFacilities.pm b/lib/Lintian/Data/InitD/VirtualFacilities.pm new file mode 100644 index 0000000..fbb4030 --- /dev/null +++ b/lib/Lintian/Data/InitD/VirtualFacilities.pm @@ -0,0 +1,256 @@ +# -*- perl -*- +# +# Copyright (C) 2008, 2010 by Raphael Geissert <atomo64@gmail.com> +# Copyright (C) 2017 Chris Lamb <lamby@debian.org> +# Copyright (C) 2021 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by the Free +# Software Foundation; either version 2 of the License, or (at your option) +# any later version. +# +# This program is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +# more details. +# +# You should have received a copy of the GNU General Public License along with +# this program. If not, see <http://www.gnu.org/licenses/>. + +package Lintian::Data::InitD::VirtualFacilities; + +use v5.20; +use warnings; +use utf8; + +use Const::Fast; +use File::Basename; +use IPC::Run3; +use List::SomeUtils qw(first_value uniq); +use Path::Tiny; +use PerlIO::gzip; +use Unicode::UTF8 qw(encode_utf8); + +const my $EMPTY => q{}; +const my $SPACE => q{ }; +const my $SLASH => q{/}; +const my $DOLLAR => q{$}; + +const my $NEWLINE => qq{\n}; + +const my $WAIT_STATUS_SHIFT => 8; + +use Moo; +use namespace::clean; + +with 'Lintian::Data::JoinedLines'; + +=head1 NAME + +Lintian::Data::InitD::VirtualFacilities - Lintian interface for init.d virtual facilities + +=head1 SYNOPSIS + + use Lintian::Data::InitD::VirtualFacilities; + +=head1 DESCRIPTION + +This module provides a way to load data files for init.d. + +=head1 INSTANCE METHODS + +=over 4 + +=item title + +=item location + +=item separator + +=cut + +has title => ( + is => 'rw', + default => 'Init.d Virtual Facilities' +); + +has location => ( + is => 'rw', + default => 'init.d/virtual_facilities' +); + +has separator => ( + is => 'rw', + default => sub { qr{ \s+ }x } +); + +=item refresh + +=cut + +sub refresh { + my ($self, $archive, $basedir) = @_; + + # neutral sort order + local $ENV{LC_ALL} = 'C'; + + my $port = 'amd64'; + + my %paths_by_installable_names; + + for my $installable_architecture ('all', $port) { + + my $local_path + = $archive->contents_gz('sid', 'main', $installable_architecture); + + open(my $fd, '<:gzip', $local_path) + or die encode_utf8("Cannot open $local_path."); + + while (my $line = <$fd>) { + + chomp $line; + + my ($path, $finder) = split($SPACE, $line, 2); + next + unless length $path + && length $finder; + + # catch both monolithic and split configurations + if ($path =~ m{^ etc/insserv[.]conf (?: $ | [.]d / )? }x) { + + my @locations = split(m{,}, $finder); + for my $location (@locations) { + + my ($section, $installable)= split(m{/}, $location, 2); + + $paths_by_installable_names{$installable} //= []; + push(@{$paths_by_installable_names{$installable}}, $path); + } + + next; + } + } + + close $fd; + } + + my $deb822_by_installable_name + = $archive->deb822_packages_by_installable_name('sid', 'main', $port); + + my $work_folder + = Path::Tiny->tempdir( + TEMPLATE => 'refresh-debhelper-add-ons-XXXXXXXXXX'); + + my @virtual_facilities; + + my @installable_names = keys %paths_by_installable_names; + + for my $installable_name (sort @installable_names) { + + next + unless exists $deb822_by_installable_name->{$installable_name}; + + my $deb822 = $deb822_by_installable_name->{$installable_name}; + + my $pool_path = $deb822->value('Filename'); + + my $deb_filename = basename($pool_path); + my $deb_local_path = "$work_folder/$deb_filename"; + my $deb_url = $archive->mirror_base . $SLASH . $pool_path; + + my $stderr; + run3( + [qw{wget --quiet}, "--output-document=$deb_local_path", $deb_url], + undef, \$stderr + ); + my $status = ($? >> $WAIT_STATUS_SHIFT); + + # stderr already in UTF-8 + die $stderr + if $status; + + my $extract_folder = "$work_folder/pool/$pool_path"; + path($extract_folder)->mkpath; + + run3([qw{dpkg-deb --extract}, $deb_local_path, $extract_folder], + undef, \$stderr); + $status = ($? >> $WAIT_STATUS_SHIFT); + + # stderr already in UTF-8 + die $stderr + if $status; + + unlink($deb_local_path) + or die encode_utf8("Cannot delete $deb_local_path"); + + my $monolithic_rule = File::Find::Rule->file; + $monolithic_rule->name('insserv.conf'); + my @files= $monolithic_rule->in("$extract_folder/etc"); + + my $split_files_rule = File::Find::Rule->file; + push(@files, + $split_files_rule->in("$extract_folder/etc/insserv.conf.d")); + + for my $path (@files) { + + open(my $fd, '<', $path) + or die encode_utf8("Cannot open $path."); + + while (my $line = <$fd>) { + + if ($line =~ m{^ ( \$\S+ ) }x) { + + my $virtual = $1; + push(@virtual_facilities, $virtual); + } + } + + close $fd; + } + + path("$work_folder/pool")->remove_tree; + } + + push(@virtual_facilities, $DOLLAR . 'all'); + + my $generated = $EMPTY; + + # still in UTF-8 + $generated .= $_ . $NEWLINE for sort +uniq @virtual_facilities; + + my $header =<<"HEADER"; +# The list of known virtual facilities that init scripts may depend on. +# + +HEADER + + my $data_path = "$basedir/" . $self->location; + my $parent_dir = path($data_path)->parent->stringify; + path($parent_dir)->mkpath + unless -e $parent_dir; + + my $output = encode_utf8($header) . $generated; + path($data_path)->spew($output); + + return 1; +} + +=back + +=head1 AUTHOR + +Originally written by Felix Lechner <felix.lechner@lease-up.com> for Lintian. + +=head1 SEE ALSO + +lintian(1) + +=cut + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Data/JoinedLines.pm b/lib/Lintian/Data/JoinedLines.pm new file mode 100644 index 0000000..a753430 --- /dev/null +++ b/lib/Lintian/Data/JoinedLines.pm @@ -0,0 +1,369 @@ +# -*- perl -*- +# Lintian::Data::JoinedLines -- interface to query lists of keywords + +# Copyright (C) 2008 Russ Allbery +# Copyright (C) 2017-2018 Chris Lamb <lamby@debian.org> +# Copyright (C) 2021 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by the Free +# Software Foundation; either version 2 of the License, or (at your option) +# any later version. +# +# This program is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +# more details. +# +# You should have received a copy of the GNU General Public License along with +# this program. If not, see <http://www.gnu.org/licenses/>. + +package Lintian::Data::JoinedLines; + +use v5.20; +use warnings; +use utf8; + +use Carp qw(carp croak); +use Const::Fast; +use List::SomeUtils qw(any); +use Unicode::UTF8 qw(encode_utf8); + +use Moo::Role; +use namespace::clean; + +const my $EMPTY => q{}; +const my $SLASH => q{/}; + +=head1 NAME + +Lintian::Data::JoinedLines - Lintian interface to query lists of keywords + +=head1 SYNOPSIS + + my $keyword; + my $list = Lintian::Data::JoinedLines->new('type'); + if ($list->recognizes($keyword)) { + # do something ... + } + my $hash = Lintian::Data::JoinedLines->new('another-type', qr{\s++}); + if ($hash->value($keyword) > 1) { + # do something ... + } + if ($list->value($keyword) > 1) { + # do something ... + } + my @keywords = $list->all; + if ($list->matches_any($keyword)) { + # do something ... + } + +=head1 DESCRIPTION + +Lintian::Data::JoinedLines provides a way of loading a list of keywords or key/value +pairs from a file in the Lintian root and then querying that list. +The lists are stored in the F<data> directory of the Lintian root and +consist of one keyword or key/value pair per line. Blank lines and +lines beginning with C<#> are ignored. Leading and trailing whitespace +is stripped. + +If requested, the lines are split into key/value pairs with a given +separator regular expression. Otherwise, keywords are taken verbatim +as they are listed in the file and may include spaces. + +This module allows lists such as menu sections, doc-base sections, +obsolete packages, package fields, and so forth to be stored in simple, +easily editable files. + +NB: By default Lintian::Data::JoinedLines is lazy and defers loading of the data +file until it is actually needed. + +=head2 Interface for the CODE argument + +This section describes the interface between for the CODE argument +for the class method new. + +The sub will be called once for each key/pair with three arguments, +KEY, VALUE and CURVALUE. The first two are the key/value pair parsed +from the data file and CURVALUE is current value associated with the +key. CURVALUE will be C<undef> the first time the sub is called with +that KEY argument. + +The sub can then modify VALUE in some way and return the new value for +that KEY. If CURVALUE is not C<undef>, the sub may return C<undef> to +indicate that the current value should still be used. It is not +permissible for the sub to return C<undef> if CURVALUE is C<undef>. + +Where Perl semantics allow it, the sub can modify CURVALUE and the +changes will be reflected in the result. As an example, if CURVALUE +is a hashref, new keys can be inserted etc. + +=head1 INSTANCE METHODS + +=over 4 + +=item dataset + +=item C<keyorder> + +=cut + +has dataset => ( + is => 'rw', + coerce => sub { my ($hashref) = @_; return ($hashref // {}); }, + default => sub { {} } +); + +has keyorder => ( + is => 'rw', + coerce => sub { my ($arrayref) = @_; return ($arrayref // []); }, + default => sub { [] } +); + +=item all + +Returns all keywords listed in the data file as a list in original order. +In a scalar context, returns the number of keywords. + +=cut + +sub all { + my ($self) = @_; + + return @{$self->keyorder}; +} + +=item recognizes (KEY) + +Returns true if KEY was listed in the data file represented by this +Lintian::Data::JoinedLines instance and false otherwise. + +=cut + +sub recognizes { + my ($self, $key) = @_; + + return 0 + unless length $key; + + return 1 + if exists $self->dataset->{$key}; + + return 0; +} + +=item resembles (KEY) + +Returns true if the data file contains a key that is a case-insensitive match +to KEY, and false otherwise. + +=cut + +sub resembles { + my ($self, $key) = @_; + + return 0 + unless length $key; + + return 1 + if $self->recognizes($key); + + return 1 + if any { m{^\Q$key\E$}i } keys %{$self->dataset}; + + return 0; +} + +=item value (KEY) + +Returns the value attached to KEY if it was listed in the data +file represented by this Lintian::Data::JoinedLines instance and the undefined value +otherwise. + +=cut + +sub value { + my ($self, $key) = @_; + + return undef + unless length $key; + + return $self->dataset->{$key}; +} + +=item matches_any(KEYWORD[, MODIFIERS]) + +Returns true if KEYWORD matches any regular expression listed in the +data file. The optional MODIFIERS serve as modifiers on all regexes. + +=cut + +sub matches_any { + my ($self, $wanted, $modifiers) = @_; + + return 0 + unless length $wanted; + + $modifiers //= $EMPTY; + + return 1 + if any { $wanted =~ /(?$modifiers)$_/ } $self->all; + + return 0; +} + +=item load + +=cut + +sub load { + my ($self, $search_space, $our_vendor) = @_; + + my @remaining_lineage = @{$search_space // []}; + unless (@remaining_lineage) { + + carp encode_utf8('Unknown data file: ' . $self->location); + return 0; + } + + my $directory = shift @remaining_lineage; + + my $path = $directory . $SLASH . $self->location; + + return $self->load(\@remaining_lineage, $our_vendor) + unless -e $path; + + open(my $fd, '<:utf8_strict', $path) + or die encode_utf8("Cannot open $path: $!"); + + my $position = 1; + while (my $line = <$fd>) { + + # trim both ends + $line =~ s/^\s+|\s+$//g; + + next + unless length $line; + + next + if $line =~ m{^\#}; + + # a command + if ($line =~ s/^\@//) { + + my ($directive, $value) = split(/\s+/, $line, 2); + if ($directive eq 'delete') { + + croak encode_utf8( + "Missing key after \@delete in $path at line $position") + unless length $value; + + @{$self->keyorder} = grep { $_ ne $value } @{$self->keyorder}; + delete $self->dataset->{$value}; + + } elsif ($directive eq 'include-parent') { + + $self->load(\@remaining_lineage, $our_vendor) + or croak encode_utf8("No ancestor data file for $path"); + + } elsif ($directive eq 'if-vendor-is' + || $directive eq 'if-vendor-is-not') { + + my ($specified_vendor, $remain) = split(/\s+/, $value, 2); + + croak encode_utf8("Missing vendor name after \@$directive") + unless length $specified_vendor; + croak encode_utf8( + "Missing command after vendor name for \@$directive") + unless length $remain; + + $our_vendor =~ s{/.*$}{}; + + next + if $directive eq 'if-vendor-is' + && $our_vendor ne $specified_vendor; + + next + if $directive eq 'if-vendor-is-not' + && $our_vendor eq $specified_vendor; + + $line = $remain; + redo; + + } else { + croak encode_utf8( + "Unknown operation \@$directive in $path at line $position" + ); + } + next; + } + + my $key = $line; + my $remainder; + + ($key, $remainder) = split($self->separator, $line, 2) + if defined $self->separator; + + # do not autovivify; 'exists' below + my $previous; + $previous = $self->dataset->{$key} + if exists $self->dataset->{$key}; + + my $value; + if ($self->can('consumer')) { + + $value = $self->consumer($key, $remainder, $previous); + next + unless defined $value; + + } else { + $value = $remainder; + } + + push(@{$self->keyorder}, $key) + unless exists $self->dataset->{$key}; + + $self->dataset->{$key} = $value; + + } continue { + ++$position; + } + + close $fd; + + return 1; +} + +=back + +=head1 FILES + +=over 4 + +=item LINTIAN_INCLUDE_DIR/data + +The files loaded by this module must be located in this directory. +Relative paths containing a C</> are permitted, so files may be organized +in subdirectories in this directory. + +Note that lintian supports multiple LINTIAN_INCLUDE_DIRs. + +=back + +=head1 AUTHOR + +Originally written by Russ Allbery <rra@debian.org> for Lintian. + +=head1 SEE ALSO + +lintian(1), L<https://lintian.debian.org/manual/section-2.6.html> + +=cut + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Data/Policy/Releases.pm b/lib/Lintian/Data/Policy/Releases.pm new file mode 100644 index 0000000..540da13 --- /dev/null +++ b/lib/Lintian/Data/Policy/Releases.pm @@ -0,0 +1,274 @@ +# -*- perl -*- +# +# Copyright (C) 1998 Christian Schwarz and Richard Braakman +# Copyright (C) 2009 Russ Allbery +# Copyright (C) 2020 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by the Free +# Software Foundation; either version 2 of the License, or (at your option) +# any later version. +# +# This program is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +# more details. +# +# You should have received a copy of the GNU General Public License along with +# this program. If not, see <http://www.gnu.org/licenses/>. + +package Lintian::Data::Policy::Releases; + +use v5.20; +use warnings; +use utf8; + +use Const::Fast; +use Date::Parse qw(str2time); +use List::SomeUtils qw(first_value); +use IPC::Run3; +use HTTP::Tiny; +use List::SomeUtils qw(minmax); +use List::UtilsBy qw(rev_nsort_by); +use Path::Tiny; +use Time::Moment; +use Unicode::UTF8 qw(decode_utf8 encode_utf8); + +const my $SLASH => q{/}; + +const my $RELEASES => q{releases}; + +const my $WAIT_STATUS_SHIFT => 8; + +use Moo; +use namespace::clean; + +with 'Lintian::Data::PreambledJSON'; + +=head1 NAME + +Lintian::Data::Policy::Releases - Lintian interface for policy releases + +=head1 SYNOPSIS + + use Lintian::Data::Policy::Releases; + +=head1 DESCRIPTION + +This module provides a way to load data files for policy releases. + +=head1 INSTANCE METHODS + +=over 4 + +=item title + +=item location + +=item ordered_versions + +=item by_version + +=item max_dots + +=cut + +has title => ( + is => 'rw', + default => 'Debian Policy Releases' +); + +has location => ( + is => 'rw', + default => 'debian-policy/releases.json' +); + +has ordered_versions => (is => 'rw', default => sub { [] }); +has by_version => (is => 'rw', default => sub { {} }); +has max_dots => (is => 'rw'); + +=item latest_version + +=cut + +sub latest_version { + my ($self) = @_; + + return $self->ordered_versions->[0]; +} + +=item normalize + +=cut + +sub normalize { + my ($self, $version) = @_; + + my $have = $version =~ tr{\.}{}; + my $need = $self->max_dots - $have; + + $version .= '.0' for (1..$need); + + return $version; +} + +=item is_known + +=cut + +sub is_known { + my ($self, $version) = @_; + + my $normalized = $self->normalize($version); + + return exists $self->by_version->{$normalized}; +} + +=item epoch + +=cut + +sub epoch { + my ($self, $version) = @_; + + my $normalized = $self->normalize($version); + + my $release = $self->by_version->{$normalized}; + return undef + unless defined $release; + + return $release->{epoch}; +} + +=item author + +=cut + +sub author { + my ($self, $version) = @_; + + my $normalized = $self->normalize($version); + + my $release = $self->by_version->{$normalized}; + return undef + unless defined $release; + + return $release->{author}; +} + +=item load + +=cut + +sub load { + my ($self, $search_space, $our_vendor) = @_; + + my @candidates = map { $_ . $SLASH . $self->location } @{$search_space}; + my $path = first_value { -e } @candidates; + + my $reference; + return 0 + unless $self->read_file($path, \$reference); + + my @releases = @{$reference // []}; + + my @sorted = rev_nsort_by { $_->{epoch} } @releases; + my @ordered_versions = map { $_->{version} } @sorted; + $self->ordered_versions(\@ordered_versions); + + my @dot_count = map { tr{\.}{} } @ordered_versions; + my (undef, $max_dots) = minmax @dot_count; + $self->max_dots($max_dots); + + # normalize versions + $_->{version} = $self->normalize($_->{version}) for @releases; + + my %by_version; + $by_version{$_->{version}} = $_ for @releases; + + $self->by_version(\%by_version); + + return 1; +} + +=item refresh + +=cut + +sub refresh { + my ($self, $archive, $basedir) = @_; + + my $changelog_url + = 'https://salsa.debian.org/dbnpolicy/policy/-/raw/master/debian/changelog?inline=false'; + + my $response = HTTP::Tiny->new->get($changelog_url); + die encode_utf8("Failed to get $changelog_url!\n") + unless $response->{success}; + + my $tempfile_tiny = Path::Tiny->tempfile; + $tempfile_tiny->spew($response->{content}); + + my @command = ( + qw{dpkg-parsechangelog --format rfc822 --all --file}, + $tempfile_tiny->stringify + ); + my $rfc822; + my $stderr; + run3(\@command, \undef, \$rfc822, \$stderr); + my $dpkg_status = ($? >> $WAIT_STATUS_SHIFT); + + # already in UTF-8 + die $stderr + if $dpkg_status; + + my $deb822 = Lintian::Deb822->new; + my @sections = $deb822->parse_string(decode_utf8($rfc822)); + + my @releases; + for my $section (@sections) { + + my $epoch = str2time($section->value('Date'), 'GMT'); + my $moment = Time::Moment->from_epoch($epoch); + my $timestamp = $moment->strftime('%Y-%m-%dT%H:%M:%S%Z'); + + my @closes = sort { $a <=> $b } $section->trimmed_list('Closes'); + my @changes = split(/\n/, $section->text('Changes')); + + my %release; + $release{version} = $section->value('Version'); + $release{timestamp} = $timestamp; + $release{epoch} = $epoch; + $release{closes} = \@closes; + $release{changes} = \@changes; + $release{author} = $section->value('Maintainer'); + + push(@releases, \%release); + } + + my @sorted = rev_nsort_by { $_->{epoch} } @releases; + + my $data_path = "$basedir/" . $self->location; + my $write_status = $self->write_file($RELEASES, \@releases, $data_path); + + return $write_status; +} + +=back + +=head1 AUTHOR + +Originally written by Felix Lechner <felix.lechner@lease-up.com> for Lintian. + +=head1 SEE ALSO + +lintian(1) + +=cut + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Data/PreambledJSON.pm b/lib/Lintian/Data/PreambledJSON.pm new file mode 100644 index 0000000..e2af970 --- /dev/null +++ b/lib/Lintian/Data/PreambledJSON.pm @@ -0,0 +1,164 @@ +# -*- perl -*- + +# Copyright (C) 2021 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by the Free +# Software Foundation; either version 2 of the License, or (at your option) +# any later version. +# +# This program is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +# more details. +# +# You should have received a copy of the GNU General Public License along with +# this program. If not, see <http://www.gnu.org/licenses/>. + +package Lintian::Data::PreambledJSON; + +use v5.20; +use warnings; +use utf8; + +use Carp qw(carp); +use Const::Fast; +use JSON::MaybeXS; +use Path::Tiny; +use Time::Piece; +use Unicode::UTF8 qw(encode_utf8); + +use Moo::Role; +use namespace::clean; + +const my $EMPTY => q{}; + +const my $PREAMBLE => q{preamble}; +const my $TITLE => q{title}; +const my $CARGO => q{cargo}; + +=encoding utf-8 + +=head1 NAME + +Lintian::Data::PreambledJSON -- Data in preambled JSON format + +=head1 SYNOPSIS + + use Lintian::Data::PreambledJSON; + +=head1 DESCRIPTION + +Routines for access and management of preambled JSON data files. + +=head1 INSTANCE METHODS + +=over 4 + +=item last_modified + +=cut + +has cargo => ( + is => 'rw', + coerce => sub { my ($scalar) = @_; return ($scalar // $EMPTY); } +); + +=item read_file + +=cut + +sub read_file { + my ($self, $path, $double_reference) = @_; + + if (!length $path || !-e $path) { + + carp encode_utf8("Unknown data file: $path"); + return 0; + } + + my $json = path($path)->slurp; + my $data = decode_json($json); + + my %preamble = %{$data->{$PREAMBLE}}; + my $stored_title = $preamble{$TITLE}; + my $storage_key = $preamble{$CARGO}; + + unless (length $stored_title && length $storage_key) { + warn encode_utf8("Please refresh data file $path: invalid format"); + return 0; + } + + unless ($stored_title eq $self->title) { + warn encode_utf8( + "Please refresh data file $path: wrong title $stored_title"); + return 0; + } + + if ($storage_key eq $PREAMBLE) { + warn encode_utf8( + "Please refresh data file $path: disallowed cargo key $storage_key" + ); + return 0; + } + + if (!exists $data->{$storage_key}) { + warn encode_utf8( + "Please refresh data file $path: cargo key $storage_key not found" + ); + return 0; + } + + ${$double_reference} = $data->{$storage_key}; + + return 1; +} + +=item write_file + +=cut + +sub write_file { + my ($self, $storage_key, $reference, $path) = @_; + + die +"Cannot write preambled JSON data file $path: disallowed cargo key $storage_key" + if $storage_key eq $PREAMBLE; + + my %preamble; + $preamble{$TITLE} = $self->title; + $preamble{$CARGO} = $storage_key; + + my %combined; + $combined{$PREAMBLE} = \%preamble; + $combined{$storage_key} = $reference; + + # convert to UTF-8 prior to encoding in JSON + my $encoder = JSON->new; + $encoder->canonical; + $encoder->utf8; + $encoder->pretty; + + my $json = $encoder->encode(\%combined); + + my $parentdir = path($path)->parent->stringify; + path($parentdir)->mkpath + unless -e $parentdir; + + # already in UTF-8 + path($path)->spew($json); + + return 1; +} + +=back + +=cut + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Data/Provides/MailTransportAgent.pm b/lib/Lintian/Data/Provides/MailTransportAgent.pm new file mode 100644 index 0000000..51818f2 --- /dev/null +++ b/lib/Lintian/Data/Provides/MailTransportAgent.pm @@ -0,0 +1,193 @@ +# -*- perl -*- +# +# Copyright (C) 2008 Niko Tyni +# Copyright (C) 2018 Chris Lamb <lamby@debian.org> +# Copyright (C) 2021 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by the Free +# Software Foundation; either version 2 of the License, or (at your option) +# any later version. +# +# This program is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +# more details. +# +# You should have received a copy of the GNU General Public License along with +# this program. If not, see <http://www.gnu.org/licenses/>. + +package Lintian::Data::Provides::MailTransportAgent; + +use v5.20; +use warnings; +use utf8; + +use Carp qw(carp); +use Const::Fast; +use List::SomeUtils qw(first_value any); +use Path::Tiny; +use Unicode::UTF8 qw(encode_utf8); + +use Moo; +use namespace::clean; + +const my $SLASH => q{/}; + +const my $NEWLINE => qq{\n}; + +=head1 NAME + +Lintian::Data::Provides::MailTransportAgent - Lintian interface for mail transport agents. + +=head1 SYNOPSIS + + use Lintian::Data::Provides::MailTransportAgent; + +=head1 DESCRIPTION + +This module provides a way to load data files for mail transport agents. + +=head1 INSTANCE METHODS + +=over 4 + +=item title + +=item location + +=item mail_transport_agents + +=item deb822_by_installable_name + +=cut + +has title => ( + is => 'rw', + default => 'Mail Transport Agents' +); + +has location => ( + is => 'rw', + default => 'fields/mail-transport-agents' +); + +has mail_transport_agents => (is => 'rw', default => sub { [] }); + +=item all + +=cut + +sub all { + my ($self) = @_; + + return keys %{$self->mail_transport_agents}; +} + +=item load + +=cut + +sub load { + my ($self, $search_space, $our_vendor) = @_; + + my @candidates = map { $_ . $SLASH . $self->location } @{$search_space}; + my $path = first_value { -e } @candidates; + + unless (length $path) { + carp encode_utf8('Unknown data file: ' . $self->location); + return 0; + } + + open(my $fd, '<:utf8_strict', $path) + or die encode_utf8("Cannot open $path: $!"); + + my $position = 1; + while (my $line = <$fd>) { + + # trim both ends + $line =~ s/^\s+|\s+$//g; + + next + unless length $line; + + next + if $line =~ m{^ [#]}x; + + my $agent = $line; + + push(@{$self->mail_transport_agents}, $agent); + + } continue { + ++$position; + } + + close $fd; + + return 1; +} + +=item refresh + +=cut + +sub refresh { + my ($self, $archive, $basedir) = @_; + + my @mail_transport_agents; + + # neutral sort order + local $ENV{LC_ALL} = 'C'; + + my $port = 'amd64'; + + my $deb822_by_installable_name + = $archive->deb822_packages_by_installable_name('sid', 'main', $port); + + for my $installable_name (keys %{$deb822_by_installable_name}) { + + my $deb822 = $deb822_by_installable_name->{$installable_name}; + + my @provides = $deb822->trimmed_list('Provides', qr{ \s* , \s* }x); + + push(@mail_transport_agents, $installable_name) + if any { $_ eq 'mail-transport-agent' } @provides; + } + + my $text = encode_utf8(<<'EOF'); +# Packages that provide mail-transport-agent +# +EOF + + $text .= encode_utf8($_ . $NEWLINE)for sort @mail_transport_agents; + + my $datapath = "$basedir/" . $self->location; + my $parentdir = path($datapath)->parent->stringify; + path($parentdir)->mkpath + unless -e $parentdir; + + # already in UTF-8 + path($datapath)->spew($text); + + return 1; +} + +=back + +=head1 AUTHOR + +Originally written by Felix Lechner <felix.lechner@lease-up.com> for Lintian. + +=head1 SEE ALSO + +lintian(1) + +=cut + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Data/Stylesheet.pm b/lib/Lintian/Data/Stylesheet.pm new file mode 100644 index 0000000..bfc8c5b --- /dev/null +++ b/lib/Lintian/Data/Stylesheet.pm @@ -0,0 +1,139 @@ +# -*- perl -*- +# +# Copyright (C) 2021 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by the Free +# Software Foundation; either version 2 of the License, or (at your option) +# any later version. +# +# This program is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +# more details. +# +# You should have received a copy of the GNU General Public License along with +# this program. If not, see <http://www.gnu.org/licenses/>. + +package Lintian::Data::Stylesheet; + +use v5.20; +use warnings; +use utf8; + +use Carp qw(carp); +use Const::Fast; +use HTTP::Tiny; +use List::SomeUtils qw(first_value); +use Path::Tiny; +use Unicode::UTF8 qw(encode_utf8); + +const my $EMPTY => q{}; +const my $SLASH => q{/}; + +use Moo; +use namespace::clean; + +=head1 NAME + +Lintian::Data::Stylesheet - Lintian interface to CSS style sheets + +=head1 SYNOPSIS + + use Lintian::Data::Stylesheet; + +=head1 DESCRIPTION + +This module provides a way to load data files to CSS style sheets + +=head1 INSTANCE METHODS + +=over 4 + +=item title + +=item location + +=item C<css> + +=cut + +has title => ( + is => 'rw', + default => 'Lintian CSS Style Sheet' +); + +has location => ( + is => 'rw', + default => 'stylesheets/lintian.css' +); + +has css => (is => 'rw', default => $EMPTY); + +=item load + +=cut + +sub load { + my ($self, $search_space, $our_vendor) = @_; + + my @candidates = map { $_ . $SLASH . $self->location } @{$search_space}; + my $path = first_value { -e } @candidates; + + unless (length $path) { + carp encode_utf8('Unknown data file: ' . $self->location); + return 0; + } + + my $style_sheet = path($path)->slurp_utf8; + + $self->css($style_sheet); + + return 1; +} + +=item refresh + +=cut + +sub refresh { + my ($self, $archive, $basedir) = @_; + + my $css_url = 'https://lintian.debian.org/stylesheets/lintian.css'; + + my $response = HTTP::Tiny->new->get($css_url); + die encode_utf8("Failed to get $css_url!\n") + unless $response->{success}; + + my $style_sheet = $response->{content}; + + my $data_path = "$basedir/" . $self->location; + my $parent_dir = path($data_path)->parent->stringify; + path($parent_dir)->mkpath + unless -e $parent_dir; + + # already in UTF-8 + path($data_path)->spew($style_sheet); + + return 1; +} + +=back + +=head1 AUTHOR + +Originally written by Felix Lechner <felix.lechner@lease-up.com> for Lintian. + +=head1 SEE ALSO + +lintian(1) + +=cut + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Data/Traditional.pm b/lib/Lintian/Data/Traditional.pm new file mode 100644 index 0000000..9deaf12 --- /dev/null +++ b/lib/Lintian/Data/Traditional.pm @@ -0,0 +1,73 @@ +# -*- perl -*- +# +# Copyright (C) 2020 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by the Free +# Software Foundation; either version 2 of the License, or (at your option) +# any later version. +# +# This program is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +# more details. +# +# You should have received a copy of the GNU General Public License along with +# this program. If not, see <http://www.gnu.org/licenses/>. + +package Lintian::Data::Traditional; + +use v5.20; +use warnings; +use utf8; + +use Moo; +use namespace::clean; + +with 'Lintian::Data::JoinedLines'; + +=head1 NAME + +Lintian::Data::Traditional - Lintian interface for generic data + +=head1 SYNOPSIS + + use Lintian::Data::Traditional; + +=head1 DESCRIPTION + +Lintian::Data::Traditional provides a way to load generic, traditional +data files. + +=head1 CLASS METHODS + +=over 4 + +=item location + +=item separator + +=cut + +has location => (is => 'rw'); +has separator => (is => 'rw'); + +=back + +=head1 AUTHOR + +Originally written by Felix Lechner <felix.lechner@lease-up.com> for Lintian. + +=head1 SEE ALSO + +lintian(1) + +=cut + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Deb822.pm b/lib/Lintian/Deb822.pm new file mode 100644 index 0000000..c153415 --- /dev/null +++ b/lib/Lintian/Deb822.pm @@ -0,0 +1,692 @@ +# Copyright (C) 1998 Christian Schwarz +# Copyright (C) 2020 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Deb822; + +use v5.20; +use warnings; +use utf8; + +use Const::Fast; +use Path::Tiny; +use Syntax::Keyword::Try; +use Unicode::UTF8 qw(encode_utf8); + +use Lintian::Deb822::Constants qw(:constants); +use Lintian::Deb822::Section; + +const my $EMPTY => q{}; +const my $NUMBER_SIGN => q{#}; + +use Moo; +use namespace::clean; + +=encoding utf-8 + +=head1 NAME + +Lintian::Deb822 -- A deb822 control file + +=head1 SYNOPSIS + + use Lintian::Deb822; + +=head1 DESCRIPTION + +Represents a paragraph in a Deb822 control file. + +=head1 INSTANCE METHODS + +=over 4 + +=item sections + +Array of Deb822::Section objects in order of their original appearance. + +=item positions + +Line positions + +=cut + +has sections => (is => 'rw', default => sub { [] }); +has positions => (is => 'rw', default => sub { [] }); + +=item first_mention + +=cut + +sub first_mention { + my ($self, $name) = @_; + + my $earliest; + + # empty when field not present + $earliest ||= $_->value($name) for @{$self->sections}; + + return ($earliest // $EMPTY); +} + +=item last_mention + +=cut + +sub last_mention { + my ($self, $name) = @_; + + my $latest; + + for my $section (@{$self->sections}) { + + # empty when field not present + $latest = $section->value($name) + if $section->declares($name); + } + + return ($latest // $EMPTY); +} + +=item read_file + +=cut + +sub read_file { + my ($self, $path, $flags) = @_; + + my $contents = path($path)->slurp_utf8; + + return $self->parse_string($contents, $flags); +} + +=item parse_string + +=cut + +sub parse_string { + my ($self, $contents, $flags) = @_; + + my (@paragraphs, @positions); + + try { + @paragraphs= parse_dpkg_control_string($contents, $flags,\@positions); + + } catch { + # ignore syntax errors here + die map { encode_utf8($_) } $@ + unless $@ =~ /syntax error/; + } + + my $index = 0; + for my $paragraph (@paragraphs) { + + my $section = Lintian::Deb822::Section->new; + $section->verbatim($paragraph); + $section->positions($positions[$index]); + + push(@{$self->sections}, $section); + + } continue { + $index++; + } + + return @{$self->sections}; +} + +=back + +=head1 FUNCTIONS + +=head2 Debian control parsers + +At first glance, this module appears to contain several debian control +parsers. In practise, there is only one real parser +(L</visit_dpkg_paragraph_string>) - the rest are convenience functions around +it. + +=over 4 + +=item read_dpkg_control(FILE[, FLAGS[, LINES]]) + +This is a convenience function to ease using L</parse_dpkg_control> +with paths to files (rather than open handles). The first argument +must be the path to a FILE, which should be read as a debian control +file. If the file is empty, an empty list is returned. + +Otherwise, this behaves like: + + use autodie; + + open(my $fd, '<:encoding(UTF-8)', FILE); # or '<' + my @p = parse_dpkg_control($fd, FLAGS, LINES); + close($fd); + return @p; + +This goes without saying that may fail with any of the messages that +L</parse_dpkg_control(HANDLE[, FLAGS[, LINES]])> do. It can also emit +autodie exceptions if open or close fails. + +=cut + +sub read_dpkg_control { + my ($file, $flags, $field_starts) = @_; + + open(my $handle, '<:utf8_strict', $file) + or die encode_utf8("Cannot open $file"); + + local $/ = undef; + my $string = <$handle>; + close $handle; + + my @result; + + my $visitor = sub { + my ($paragraph, $line) = @_; + + push(@result, $paragraph); + push(@{$field_starts}, $line) if defined $field_starts; + }; + + visit_dpkg_paragraph_string($visitor, $string, $flags); + + return @result; +} + +=item read_dpkg_control_lc(FILE[, FLAGS[, LINES]]) + +=cut + +sub read_dpkg_control_lc { + my ($file, $flags, $field_starts) = @_; + + my @result = read_dpkg_control($file, $flags, $field_starts); + + lowercase_field_names(\@result); + lowercase_field_names($field_starts); + + return @result; +} + +=item parse_dpkg_control_string(STRING[, FLAGS[, LINES]]) + +Reads debian control data from STRING and returns a list of +paragraphs in it. A paragraph is represented via a hashref, which +maps (lower cased) field names to their values. + +FLAGS (if given) is a bitmask of the I<DCTRL_*> constants. Please +refer to L</CONSTANTS> for the list of constants and their meaning. +The default value for FLAGS is 0. + +If LINES is given, it should be a reference to an empty list. On +return, LINES will be populated with a hashref for each paragraph (in +the same order as the returned list). Each hashref will also have a +special key "I<START-OF-PARAGRAPH>" that gives the line number of the +first field in that paragraph. These hashrefs will map the field name +of the given paragraph to the line number where the field name +appeared. + +This is a convenience sub around L</visit_dpkg_paragraph> and can +therefore produce the same errors as it. Please see +L</visit_dpkg_paragraph> for the finer semantics of how the +control file is parsed. + +NB: parse_dpkg_control does I<not> close the handle for the caller. + +=cut + +sub parse_dpkg_control_string { + my ($string, $flags, $field_starts) = @_; + my @result; + + my $c = sub { + my ($para, $line) = @_; + + push(@result, $para); + push(@{$field_starts}, $line) + if defined $field_starts; + }; + + visit_dpkg_paragraph_string($c, $string, $flags); + + return @result; +} + +=item parse_dpkg_control_string_lc(STRING[, FLAGS[, LINES]]) + +=cut + +sub parse_dpkg_control_string_lc { + my ($string, $flags, $field_starts) = @_; + + my @result = parse_dpkg_control_string($string, $flags, $field_starts); + + lowercase_field_names(\@result); + lowercase_field_names($field_starts); + + return @result; +} + +=item lowercase_field_names + +=cut + +sub lowercase_field_names { + my ($arrayref) = @_; + + return + unless $arrayref; + + for my $paragraph (@{$arrayref}) { + + # magic marker should only appear in field starts + my @fields = grep { $_ ne 'START-OF-PARAGRAPH' } keys %{$paragraph}; + my @mixedcase = grep { $_ ne lc } @fields; + + for my $old (@mixedcase) { + $paragraph->{lc $old} = $paragraph->{$old}; + delete $paragraph->{$old}; + } + } + + return; +} + +=item visit_dpkg_paragraph_string (CODE, STRING[, FLAGS]) + +Reads debian control data from STRING and passes each paragraph to +CODE. A paragraph is represented via a hashref, which maps (lower +cased) field names to their values. + +FLAGS (if given) is a bitmask of the I<DCTRL_*> constants. Please +refer to L</CONSTANTS> for the list of constants and their meaning. +The default value for FLAGS is 0. + +If the file is empty (i.e. it contains no paragraphs), the method will +contain an I<empty> list. The deb822 contents may be inside a +I<signed> PGP message with a signature. + +visit_dpkg_paragraph will require the PGP headers to be correct (if +present) and require that the entire file is covered by the signature. +However, it will I<not> validate the signature (in fact, the contents +of the PGP SIGNATURE part can be empty). The signature should be +validated separately. + +visit_dpkg_paragraph will pass paragraphs to CODE as they are +completed. If CODE can process the paragraphs as they are seen, very +large control files can be processed without keeping all the +paragraphs in memory. + +As a consequence of how the file is parsed, CODE may be passed a +number of (valid) paragraphs before parsing is stopped due to a syntax +error. + +NB: visit_dpkg_paragraph does I<not> close the handle for the caller. + +CODE is expected to be a callable reference (e.g. a sub) and will be +invoked as the following: + +=over 4 + +=item CODE->(PARA, LINE_NUMBERS) + +The first argument, PARA, is a hashref to the most recent paragraph +parsed. The second argument, LINE_NUMBERS, is a hashref mapping each +of the field names to the line number where the field name appeared. +LINE_NUMBERS will also have a special key "I<START-OF-PARAGRAPH>" that +gives the line number of the first field in that paragraph. + +The return value of CODE is ignored. + +If the CODE invokes die (or similar) the error is propagated to the +caller. + +=back + + +I<On syntax errors>, visit_dpkg_paragraph will call die with the +following string: + + "syntax error at line %d: %s\n" + +Where %d is the line number of the issue and %s is one of: + +=over + +=item Duplicate field %s + +The field appeared twice in the paragraph. + +=item Continuation line outside a paragraph (maybe line %d should be " .") + +A continuation line appears outside a paragraph - usually caused by an +unintended empty line before it. + +=item Whitespace line not allowed (possibly missing a ".") + +An empty continuation line was found. This usually means that a +period is missing to denote an "empty line" in (e.g.) the long +description of a package. + +=item Cannot parse line "%s" + +Generic error containing the text of the line that confused the +parser. Note that all non-printables in %s will be replaced by +underscores. + +=item Comments are not allowed + +A comment line appeared and FLAGS contained DCTRL_NO_COMMENTS. + +=item PGP signature seen before start of signed message + +A "BEGIN PGP SIGNATURE" header is seen and a "BEGIN PGP MESSAGE" has +not been seen yet. + +=item Two PGP signatures (first one at line %d) + +Two "BEGIN PGP SIGNATURE" headers are seen in the same file. + +=item Unexpected %s header + +A valid PGP header appears (e.g. "BEGIN PUBLIC KEY BLOCK"). + +=item Malformed PGP header + +An invalid or malformed PGP header appears. + +=item Expected at most one signed message (previous at line %d) + +Two "BEGIN PGP MESSAGE" headers appears in the same message. + +=item End of file but expected an "END PGP SIGNATURE" header + +The file ended after a "BEGIN PGP SIGNATURE" header without being +followed by an "END PGP SIGNATURE". + +=item PGP MESSAGE header must be first content if present + +The file had content before PGP MESSAGE. + +=item Data after the PGP SIGNATURE + +The file had data after the PGP SIGNATURE block ended. + +=item End of file before "BEGIN PGP SIGNATURE" + +The file had a "BEGIN PGP MESSAGE" header, but no signature was +present. + +=back + +=cut + +sub visit_dpkg_paragraph_string { + my ($code, $string, $flags) = @_; + $flags//=0; + my $field_starts = {}; + my $section = {}; + my $open_section = 0; + my $last_tag; + my $debconf = $flags & DCTRL_DEBCONF_TEMPLATE; + my $signed = 0; + my $signature = 0; + + my @lines = split(/\n/, $string); + + my $position = 1; + + my $line; + while (defined($line = shift @lines)) { + chomp $line; + + if (substr($line, 0, 1) eq $NUMBER_SIGN) { + next + unless $flags & DCTRL_NO_COMMENTS; + die encode_utf8("No comments allowed (line $position).\n"); + } + + # empty line? + if ($line eq $EMPTY || (!$debconf && $line =~ /^\s*$/)) { + if ($open_section) { # end of current section + # pass the current section to the handler + $code->($section, $field_starts); + $section = {}; + $field_starts = {}; + $open_section = 0; + } + } + # pgp sig? Be strict here (due to #696230) + # According to http://tools.ietf.org/html/rfc4880#section-6.2 + # The header MUST start at the beginning of the line and MUST NOT have + # any other text (except whitespace) after the header. + elsif ($line =~ m/^-----BEGIN PGP SIGNATURE-----[ \r\t]*$/) + { # skip until end of signature + my $saw_end = 0; + + die encode_utf8("PGP signature before message (line $position).\n") + unless $signed; + + die encode_utf8( +"Found two PGP signatures (line $signature and line $position).\n" + )if $signature; + + $signature = $position; + while (defined($line = shift @lines)) { + if ($line =~ /^-----END PGP SIGNATURE-----[ \r\t]*$/) { + $saw_end = 1; + last; + } + }continue { + ++$position; + } + + # The "at line X" may seem a little weird, but it keeps the + # message format identical. + die encode_utf8("Cannot find END PGP SIGNATURE header.\n") + unless $saw_end; + } + # other pgp control? + elsif ($line =~ /^-----(?:BEGIN|END) PGP/) { + # At this point it could be a malformed PGP header or one + # of the following valid headers (RFC4880): + # * BEGIN PGP MESSAGE + # - Possibly a signed Debian CTRL, so okay (for now) + # * BEGIN PGP {PUBLIC,PRIVATE} KEY BLOCK + # - Valid header, but not a Debian CTRL file. + # * BEGIN PGP MESSAGE, PART X{,/Y} + # - Valid, but we don't support partial messages, so + # bail on those. + + unless ($line =~ /^-----BEGIN PGP SIGNED MESSAGE-----[ \r\t]*$/) { + # Not a (full) PGP MESSAGE; reject. + + my $key = qr/(?:BEGIN|END) PGP (?:PUBLIC|PRIVATE) KEY BLOCK/; + my $msgpart = qr{BEGIN PGP MESSAGE, PART \d+(?:/\d+)?}; + my $msg + = qr/(?:BEGIN|END) PGP (?:(?:COMPRESSED|ENCRYPTED) )?MESSAGE/; + + if ($line =~ /^-----($key|$msgpart|$msg)-----[ \r\t]*$/) { + die encode_utf8( + "Unexpected $1 header (line $position).\n"); + } + + die encode_utf8("Malformed PGP header (line $position).\n"); + + } else { + die encode_utf8( +"Multiple PGP messages (line $signed and line $position).\n" + )if $signed; + + # NB: If you remove this, keep in mind that it may + # allow two paragraphs to merge. Consider: + # + # Field-P1: some-value + # -----BEGIN PGP SIGNATURE----- + # + # Field-P2: another value + # + # At the time of writing: If $open_section is + # true, it will remain so until the empty line + # after the PGP header. + die encode_utf8( + "Expected PGP MESSAGE header (line $position).\n") + if $last_tag; + + $signed = $position; + } + + # skip until the next blank line + while (defined($line = shift @lines)) { + last + if $line =~ /^\s*$/; + }continue { + ++$position; + } + } + # did we see a signature already? We allow all whitespace/comment lines + # outside the signature. + elsif ($signature) { + # Accept empty lines after the signature. + next + if $line =~ /^\s*$/; + + # NB: If you remove this, keep in mind that it may allow + # two paragraphs to merge. Consider: + # + # Field-P1: some-value + # -----BEGIN PGP SIGNATURE----- + # [...] + # -----END PGP SIGNATURE----- + # Field-P2: another value + # + # At the time of writing: If $open_section is true, it + # will remain so until the empty line after the PGP + # header. + die encode_utf8("Data after PGP SIGNATURE (line $position).\n"); + } + # new empty field? + elsif ($line =~ /^([^: \t]+):\s*$/) { + $field_starts->{'START-OF-PARAGRAPH'} = $position + unless $open_section; + $open_section = 1; + + my $tag = $1; + $section->{$tag} = $EMPTY; + $field_starts->{$tag} = $position; + + $last_tag = $tag; + } + # new field? + elsif ($line =~ /^([^: \t]+):\s*(.*)$/) { + $field_starts->{'START-OF-PARAGRAPH'} = $position + unless $open_section; + $open_section = 1; + + # Policy: Horizontal whitespace (spaces and tabs) may occur + # immediately before or after the value and is ignored there. + my $tag = $1; + my $value = $2; + + # trim right + $value =~ s/\s+$//; + + if (exists $section->{$tag}) { + # Policy: A paragraph must not contain more than one instance + # of a particular field name. + die encode_utf8("Duplicate field $tag (line $position).\n"); + } + $value =~ s/#.*$// + if $flags & DCTRL_COMMENTS_AT_EOL; + $section->{$tag} = $value; + $field_starts->{$tag} = $position; + + $last_tag = $tag; + } + + # continued field? + elsif ($line =~ /^([ \t].*\S.*)$/) { + die encode_utf8( +"Continuation line not in paragraph (line $position). Missing a dot on the previous line?\n" + )unless $open_section; + + # Policy: Many fields' values may span several lines; in this case + # each continuation line must start with a space or a tab. Any + # trailing spaces or tabs at the end of individual lines of a + # field value are ignored. + my $value = $1; + + # trim right + $value =~ s/\s+$//; + + $value =~ s/#.*$// + if $flags & DCTRL_COMMENTS_AT_EOL; + $section->{$last_tag} .= "\n" . $value; + } + # None of the above => syntax error + else { + + die encode_utf8( + "Unexpected whitespace (line $position). Missing a dot?\n") + if $line =~ /^\s+$/; + + # Replace non-printables and non-space characters with + # "_" - just in case. + $line =~ s/[^[:graph:][:space:]]/_/g; + + die encode_utf8("Cannot parse line $position: $line\n"); + } + + }continue { + ++$position; + } + + # pass the last section (if not already done). + $code->($section, $field_starts) + if $open_section; + + # Given the API, we cannot use this check to prevent any + # paragraphs from being emitted to the code argument, so we might + # as well just do this last. + + die encode_utf8("Cannot find BEGIN PGP SIGNATURE\n.") + if $signed && !$signature; + + return; +} + +=back + +=head1 AUTHOR + +Originally written Christian Schwarz and many other people. + +Moo version by Felix Lechner <felix.lechner@lease-up.com> for Lintian. + +=head1 SEE ALSO + +lintian(1) + +=cut + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Deb822/Constants.pm b/lib/Lintian/Deb822/Constants.pm new file mode 100644 index 0000000..a30e117 --- /dev/null +++ b/lib/Lintian/Deb822/Constants.pm @@ -0,0 +1,87 @@ +# Hey emacs! This is a -*- Perl -*- script! +# Lintian::Deb822::Constants -- Perl utility functions for parsing deb822 files + +# Copyright (C) 1998 Christian Schwarz +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Deb822::Constants; + +use v5.20; +use warnings; +use utf8; + +use constant { + DCTRL_DEBCONF_TEMPLATE => 1, + DCTRL_NO_COMMENTS => 2, + DCTRL_COMMENTS_AT_EOL => 4, +}; + +our %EXPORT_TAGS = (constants => + [qw(DCTRL_DEBCONF_TEMPLATE DCTRL_NO_COMMENTS DCTRL_COMMENTS_AT_EOL)],); + +our @EXPORT_OK = (@{ $EXPORT_TAGS{constants} }); + +use Exporter qw(import); + +=head1 NAME + +Lintian::Deb822::Constants - Lintian's generic Deb822 constants + +=head1 SYNOPSIS + + use Lintian::Deb822::Constants qw(DCTRL_NO_COMMENTS); + +=head1 DESCRIPTION + +This module contains a number of utility subs that are nice to have, +but on their own did not warrant their own module. + +Most subs are imported only on request. + +=head1 CONSTANTS + +The following constants can be passed to the Debian control file +parser functions to alter their parsing flag. + +=over 4 + +=item DCTRL_DEBCONF_TEMPLATE + +The file should be parsed as debconf template. These have slightly +syntax rules for whitespace in some cases. + +=item DCTRL_NO_COMMENTS + +The file do not allow comments. With this flag, any comment in the +file is considered a syntax error. + +=back + +=head1 SEE ALSO + +lintian(1) + +=cut + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Deb822/Section.pm b/lib/Lintian/Deb822/Section.pm new file mode 100644 index 0000000..5950ee4 --- /dev/null +++ b/lib/Lintian/Deb822/Section.pm @@ -0,0 +1,373 @@ +# Copyright (C) 2020 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Deb822::Section; + +use v5.20; +use warnings; +use utf8; + +use Const::Fast; +use List::Compare; + +const my $EMPTY => q{}; + +const my $UNKNOWN_POSITION => -1; + +use Moo; +use namespace::clean; + +=encoding utf-8 + +=head1 NAME + +Lintian::Deb822::Section -- A paragraph in a control file + +=head1 SYNOPSIS + + use Lintian::Deb822::Section; + +=head1 DESCRIPTION + +Represents a paragraph in a Deb822 control file. + +=head1 INSTANCE METHODS + +=over 4 + +=item legend + +Returns exact field names for their lowercase versions. + +=item verbatim + +Returns a hash to the raw, unedited and verbatim field values. + +=item unfolded + +Returns a hash to unfolded field values. Continuations lines +have been connected. + +=item positions + +The original line positions. + +=cut + +has legend => ( + is => 'rw', + lazy => 1, + default => sub { + my ($self) = @_; + + my %legend; + + for my $key (keys %{$self->verbatim}) { + + my $lowercase = lc $key; + $legend{$lowercase} = $key; + } + + return \%legend; + } +); + +has verbatim => (is => 'rw', default => sub { {} }); +has unfolded => (is => 'rw', default => sub { {} }); +has positions => (is => 'rw', default => sub { {} }); + +=item trimmed_list(FIELD [, SEPARATOR]) + +=cut + +sub trimmed_list { + my ($self, $name, $regex) = @_; + + $regex //= qr/\s+/; + + my $value = $self->value($name); + + # trim both ends + $value =~ s/^\s+|\s+$//g; + + my @list = split($regex, $value); + + # trim both ends of each element + s/^\s+|\s+$//g for @list; + + return grep { length } @list; +} + +=item unfolded_value (FIELD) + +This method returns the unfolded value of the control field FIELD in +the control file for the package. For a source package, this is the +*.dsc file; for a binary package, this is the control file in the +control section of the package. + +If FIELD is passed but not present, then this method returns undef. + +=cut + +sub unfolded_value { + my ($self, $name) = @_; + + return $EMPTY + unless length $name; + + my $lowercase = lc $name; + + my $unfolded = $self->unfolded->{$lowercase}; + return $unfolded + if defined $unfolded; + + my $value = $self->value($name); + + # will also replace a newline at the very end + $value =~ s/\n//g; + + # Remove leading space as it confuses some of the other checks + # that are anchored. This happens if the field starts with a + # space and a newline, i.e ($ marks line end): + # + # Vcs-Browser: $ + # http://somewhere.com/$ + $value =~ s/^\s*+//; + + $self->unfolded->{$lowercase} = $value; + + return $value; +} + +=item value (FIELD) + +If FIELD is given, this method returns the value of the control field +FIELD. + +=cut + +sub value { + my ($self, $name) = @_; + + return $EMPTY + unless length $name; + + my $exact = $self->legend->{lc $name}; + return $EMPTY + unless length $exact; + + my $trimmed = $self->verbatim->{$exact} // $EMPTY; + + # trim both ends + $trimmed =~ s/^\s+|\s+$//g; + + return $trimmed; +} + +=item untrimmed_value (FIELD) + +If FIELD is given, this method returns the value of the control field +FIELD. + +=cut + +sub untrimmed_value { + my ($self, $name) = @_; + + return $EMPTY + unless length $name; + + my $exact = $self->legend->{lc $name}; + return $EMPTY + unless length $exact; + + return $self->verbatim->{$exact} // $EMPTY; +} + +=item text (FIELD) + +=cut + +sub text { + my ($self, $name) = @_; + + my $text = $self->untrimmed_value($name); + + # remove leading space in each line + $text =~ s/^[ \t]//mg; + + # remove dot place holder for empty lines + $text =~ s/^\.$//mg; + + return $text; +} + +=item store (FIELD, VALUE) + +=cut + +sub store { + my ($self, $name, $value) = @_; + + $value //= $EMPTY; + + return + unless length $name; + + my $exact = $self->legend->{lc $name}; + + # add new value if key not found + unless (defined $exact) { + + $exact = $name; + + # update legend with exact spelling + $self->legend->{lc $exact} = $exact; + + # remove any old position + $self->positions->{$exact} = $UNKNOWN_POSITION; + } + + $self->verbatim->{$exact} = $value; + + # remove old unfolded value, if any + delete $self->unfolded->{$exact}; + + return; +} + +=item drop (FIELD) + +=cut + +sub drop { + my ($self, $name) = @_; + + return + unless length $name; + + my $exact = $self->legend->{lc $name}; + return + unless length $exact; + + delete $self->legend->{lc $exact}; + + delete $self->verbatim->{$exact}; + delete $self->unfolded->{$exact}; + delete $self->positions->{$exact}; + + return; +} + +=item declares (NAME) + +Returns a boolean for whether the named field exists. + +=cut + +sub declares { + my ($self, $name) = @_; + + return 1 + if defined $self->legend->{lc $name}; + + return 0; +} + +=item names + +Returns an array with the literal field names. + +=cut + +sub names { + my ($self) = @_; + + return keys %{$self->verbatim}; +} + +=item literal_name + +Returns an array with the literal, true case field names. + +=cut + +sub literal_name { + my ($self, $anycase) = @_; + + return $self->legend->{ lc $anycase }; +} + +=item position + +With an argument, returns the starting line of the named field. + +Without an argument, return the starting line of the paragraph. + +=cut + +sub position { + my ($self, $field) = @_; + + return $self->positions->{'START-OF-PARAGRAPH'} + unless length $field; + + my $exact = $self->legend->{lc $field}; + return undef + unless length $exact; + + return $self->positions->{$exact}; +} + +=item extra + +=cut + +sub extra { + my ($self, @reference) = @_; + + my @lowercase = map { lc } @reference; + + my $extra_lc + = List::Compare->new([keys %{$self->legend}], \@lowercase); + my @extra_lowercase = $extra_lc->get_Lonly; + + my @extra = map { $self->literal_name($_) } @extra_lowercase; + + return @extra; +} + +=back + +=head1 AUTHOR + +Originally written by Felix Lechner <felix.lechner@lease-up.com> for Lintian. + +=head1 SEE ALSO + +lintian(1) + +=cut + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Debian/Control.pm b/lib/Lintian/Debian/Control.pm new file mode 100644 index 0000000..cd99302 --- /dev/null +++ b/lib/Lintian/Debian/Control.pm @@ -0,0 +1,198 @@ +# -*- perl -*- +# Lintian::Debian::Control -- object for fields in d/control + +# Copyright (C) 2008 Russ Allbery +# Copyright (C) 2009 Raphael Geissert +# Copyright (C) 2020 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by the Free +# Software Foundation; either version 2 of the License, or (at your option) +# any later version. +# +# This program is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +# more details. +# +# You should have received a copy of the GNU General Public License along with +# this program. If not, see <http://www.gnu.org/licenses/>. + +package Lintian::Debian::Control; + +use v5.20; +use warnings; +use utf8; + +use Path::Tiny; +use Syntax::Keyword::Try; +use Unicode::UTF8 qw(valid_utf8 decode_utf8 encode_utf8); + +use Lintian::Deb822; +use Lintian::Deb822::Section; +use Lintian::Util qw($PKGNAME_REGEX); + +use Moo; +use namespace::clean; + +=head1 NAME + +Lintian::Debian::Control - Lintian interface to d/control fields + +=head1 SYNOPSIS + + use Lintian::Debian::Control; + +=head1 DESCRIPTION + +Lintian::Debian::Control provides access to fields in d/control. + +=head1 INSTANCE METHODS + +=over 4 + +=item item +=item source_fields +=item installable_fields_by_name + +=cut + +has item => (is => 'rw'); + +has source_fields => ( + is => 'rw', + default => sub { return Lintian::Deb822::Section->new; }, + coerce => sub { + my ($blessedref) = @_; + return ($blessedref // Lintian::Deb822::Section->new); + }, +); + +has installable_fields_by_name => ( + is => 'rw', + default => sub { {} }, + coerce => sub { my ($hashref) = @_; return ($hashref // {}); }, +); + +=item load + +=cut + +sub load { + my ($self, $item) = @_; + + return + unless defined $item; + + $self->item($item); + + return + unless -r $item->unpacked_path; + + my $deb822 = Lintian::Deb822->new; + + my @sections; + try { + @sections = $deb822->read_file($item->unpacked_path); + + } catch { + # If it is a syntax error, ignore it (we emit + # syntax-error-in-control-file in this case via + # control-file). + die map { encode_utf8($_) } $@ + unless $@ =~ /syntax error/; + + return; + } + + # in theory, one could craft a package in which d/control is empty + my $source = shift @sections; + $self->source_fields($source); + + my @named + = grep { $_->value('Package') =~ m{\A $PKGNAME_REGEX \Z}x }@sections; + + my %by_name = map { $_->value('Package') => $_ } @named; + + $self->installable_fields_by_name(\%by_name); + + return; +} + +=item installables + +Returns a list of the binary and udeb packages listed in the +F<debian/control>. + +=cut + +sub installables { + my ($self) = @_; + + return keys %{$self->installable_fields_by_name}; +} + +=item installable_package_type (NAME) + +Returns package type based on value of the Package-Type (or if absent, +X-Package-Type) field. If the field is omitted, the default value +"deb" is used. + +If NAME is not an installable listed in the source packages +F<debian/control> file, this method return C<undef>. + +=cut + +sub installable_package_type { + my ($self, $name) = @_; + + my $type; + + my $fields = $self->installable_fields_by_name->{$name}; + + $type = $fields->value('Package-Type') || $fields->value('XC-Package-Type') + if defined $fields; + + $type ||= 'deb'; + + return lc $type; +} + +=item installable_fields (PACKAGE) + +Returns the Deb822::Section object for the installable. Returns an +empty object if the installable does not exist. + +=cut + +sub installable_fields { + my ($self, $package) = @_; + + my $per_package; + + $per_package = $self->installable_fields_by_name->{$package} + if length $package; + + return ($per_package // Lintian::Deb822::Section->new); +} + +=back + +=head1 AUTHOR + +Originally written by Russ Allbery <rra@debian.org> for Lintian. +Amended by Felix Lechner <felix.lechner@lease-up.com> for Lintian. + +=head1 SEE ALSO + +lintian(1) + +=cut + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Elf/Section.pm b/lib/Lintian/Elf/Section.pm new file mode 100644 index 0000000..f5ff7af --- /dev/null +++ b/lib/Lintian/Elf/Section.pm @@ -0,0 +1,156 @@ +# Copyright (C) 2021 Felix Lechner <felix.lechner@lease-up.com> +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Elf::Section; + +use v5.20; +use warnings; +use utf8; + +use Const::Fast; + +const my $EMPTY => q{}; + +use Moo; +use namespace::clean; + +=head1 NAME + +Lintian::Elf::Section -- ELF Sections + +=head1 SYNOPSIS + + use Lintian::Elf::Section; + +=head1 DESCRIPTION + +A class for storing ELF section data + +=head1 INSTANCE METHODS + +=over 4 + +=item number + +=item name + +=item type + +=item address + +=item offset + +=item size + +=item entry_size + +=item flags + +=item index_link + +=item index_info + +=item alignment + +=cut + +has number => ( + is => 'rw', + coerce => sub { my ($number) = @_; return ($number // 0); }, + default => 0 +); + +has name => ( + is => 'rw', + coerce => sub { my ($text) = @_; return ($text // $EMPTY); }, + default => $EMPTY +); + +has type => ( + is => 'rw', + coerce => sub { my ($text) = @_; return ($text // $EMPTY); }, + default => $EMPTY +); + +has address => ( + is => 'rw', + coerce => sub { my ($number) = @_; return ($number // 0); }, + default => 0 +); + +has offset => ( + is => 'rw', + coerce => sub { my ($number) = @_; return ($number // 0); }, + default => 0 +); + +has size => ( + is => 'rw', + coerce => sub { my ($number) = @_; return ($number // 0); }, + default => 0 +); + +has entry_size => ( + is => 'rw', + coerce => sub { my ($number) = @_; return ($number // 0); }, + default => 0 +); + +has flags => ( + is => 'rw', + coerce => sub { my ($text) = @_; return ($text // $EMPTY); }, + default => $EMPTY +); + +has index_link => ( + is => 'rw', + coerce => sub { my ($number) = @_; return ($number // 0); }, + default => 0 +); + +has index_info => ( + is => 'rw', + coerce => sub { my ($number) = @_; return ($number // 0); }, + default => 0 +); + +has alignment => ( + is => 'rw', + coerce => sub { my ($text) = @_; return ($text // $EMPTY); }, + default => $EMPTY +); + +=back + +=head1 AUTHOR + +Originally written by Felix Lechner <felix.lechner@lease-up.com> for Lintian. + +=head1 SEE ALSO + +lintian(1) + +=cut + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Elf/Symbol.pm b/lib/Lintian/Elf/Symbol.pm new file mode 100644 index 0000000..ae20dd0 --- /dev/null +++ b/lib/Lintian/Elf/Symbol.pm @@ -0,0 +1,90 @@ +# Copyright (C) 2021 Felix Lechner <felix.lechner@lease-up.com> +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Elf::Symbol; + +use v5.20; +use warnings; +use utf8; + +use Const::Fast; + +const my $EMPTY => q{}; + +use Moo; +use namespace::clean; + +=head1 NAME + +Lintian::Elf::Symbol -- ELF Symbols + +=head1 SYNOPSIS + + use Lintian::Elf::Symbol; + +=head1 DESCRIPTION + +A class for storing ELF symbol data + +=head1 INSTANCE METHODS + +=over 4 + +=item name + +=item version + +=item section + +=cut + +has name => ( + is => 'rw', + coerce => sub { my ($text) = @_; return ($text // $EMPTY); }, + default => $EMPTY +); +has version => ( + is => 'rw', + coerce => sub { my ($text) = @_; return ($text // $EMPTY); }, + default => $EMPTY +); +has section => ( + is => 'rw', + coerce => sub { my ($text) = @_; return ($text // $EMPTY); }, + default => $EMPTY +); + +=back + +=head1 AUTHOR + +Originally written by Felix Lechner <felix.lechner@lease-up.com> for Lintian. + +=head1 SEE ALSO + +lintian(1) + +=cut + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Group.pm b/lib/Lintian/Group.pm new file mode 100644 index 0000000..010f42e --- /dev/null +++ b/lib/Lintian/Group.pm @@ -0,0 +1,794 @@ +# Copyright (C) 2011 Niels Thykier <niels@thykier.net> +# Copyright (C) 2019-2021 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Group; + +use v5.20; +use warnings; +use utf8; + +use Carp qw(croak); +use Const::Fast; +use Cwd; +use Devel::Size qw(total_size); +use Email::Address::XS; +use File::Spec; +use List::Compare; +use List::SomeUtils qw(any none uniq firstval true); +use List::UtilsBy qw(sort_by); +use POSIX qw(ENOENT); +use Syntax::Keyword::Try; +use Time::HiRes qw(gettimeofday tv_interval); +use Time::Piece; +use Unicode::UTF8 qw(encode_utf8); + +use Lintian::Hint::Pointed; +use Lintian::Mask; +use Lintian::Util qw(human_bytes match_glob); + +const my $EMPTY => q{}; +const my $SPACE => q{ }; +const my $UNDERSCORE => q{_}; + +const my $EXTRA_VERBOSE => 3; + +# A private table of supported types. +const my %SUPPORTED_TYPES => ( + 'binary' => 1, + 'buildinfo' => 1, + 'changes' => 1, + 'source' => 1, + 'udeb' => 1, +); + +use Moo; +use namespace::clean; + +=head1 NAME + +Lintian::Group -- A group of objects that Lintian can process + +=head1 SYNOPSIS + + use Lintian::Group; + + my $group = Lintian::Group->new('lintian_2.5.0_i386.changes'); + +=head1 DESCRIPTION + +Instances of this perl class are sets of +L<processables|Lintian::Processable>. It allows at most one source +and one changes or buildinfo package per set, but multiple binary packages +(provided that the binary is not already in the set). + +=head1 METHODS + +=over 4 + +=item $group->pooldir + +Returns or sets the pool directory used by this group. + +=item $group->source_name + +=item $group->source_version + +=item $group->binary + +Returns a hash reference to the binary processables in this group. + +=item $group->buildinfo + +Returns the buildinfo processable in this group. + +=item $group->changes + +Returns the changes processable in this group. + +=item $group->source + +Returns the source processable in this group. + +=item $group->udeb + +Returns a hash reference to the udeb processables in this group. + +=item jobs + +Returns or sets the max number of jobs to be processed in parallel. + +If the limit is 0, then there is no limit for the number of parallel +jobs. + +=item processing_start + +=item processing_end + +=item cache + +Cache for some items. + +=item profile + +Hash with active jobs. + +=item C<saved_direct_dependencies> + +=item C<saved_direct_reliants> + +=cut + +has pooldir => (is => 'rw', default => $EMPTY); +has source_name => (is => 'rw', default => $EMPTY); +has source_version => (is => 'rw', default => $EMPTY); + +has binary => (is => 'rw', default => sub{ {} }); +has buildinfo => (is => 'rw'); +has changes => (is => 'rw'); +has source => (is => 'rw'); +has udeb => (is => 'rw', default => sub{ {} }); + +has jobs => (is => 'rw', default => 1); +has processing_start => (is => 'rw', default => $EMPTY); +has processing_end => (is => 'rw', default => $EMPTY); + +has cache => (is => 'rw', default => sub { {} }); +has profile => (is => 'rw', default => sub { {} }); + +=item $group->name + +Returns a unique identifier for the group based on source and version. + +=cut + +sub name { + my ($self) = @_; + + return $EMPTY + unless length $self->source_name && length $self->source_version; + + return $self->source_name . $UNDERSCORE . $self->source_version; +} + +=item process + +Process group. + +=cut + +sub process { + my ($self, $ignored_overrides, $option)= @_; + + my $groupname = $self->name; + local $SIG{__WARN__} + = sub { warn encode_utf8("Warning in group $groupname: $_[0]") }; + + my $savedir = getcwd; + + $self->processing_start(gmtime->datetime . 'Z'); + say {*STDERR} encode_utf8('Starting on group ' . $self->name) + if $option->{debug}; + my $group_timer = [gettimeofday]; + + my $success = 1; + for my $processable ($self->get_processables){ + + my $path = $processable->path; + local $SIG{__WARN__} + = sub { warn encode_utf8("Warning in processable $path: $_[0]") }; + + my @hints; + my %enabled_overrides; + + say {*STDERR} + encode_utf8( + 'Base directory for processable: '. $processable->basedir) + if $option->{debug}; + + unless ($option->{'no-override'}) { + + say {*STDERR} encode_utf8('Loading overrides file (if any) ...') + if $option->{debug}; + + for my $override (@{$processable->overrides}) { + + my $pattern = $override->pattern; + + # catch renames + my $tag_name + = $self->profile->get_current_name($override->tag_name); + + # catches unknown tags + next + unless length $tag_name; + + next + unless $self->profile->tag_is_enabled($tag_name); + + my @architectures = @{$override->architectures}; + + # count negations + my $negations = true { /^!/ } @architectures; + + # strip negations if present + s/^!// for @architectures; + + # enable overrides for this architecture + # proceed when none specified + my $data = $self->profile->data; + next + if @architectures + && ( + $negations xor none { + $data->architectures->restriction_matches($_, + $processable->architecture) + }@architectures + ); + + if ($self->profile->is_durable($tag_name)) { + + ++$ignored_overrides->{$tag_name}; + next; + } + + $enabled_overrides{$tag_name}{$pattern} = $override; + } + } + + my @check_names = sort $self->profile->enabled_checks; + + my @from_checks; + for my $name (@check_names) { + + my $absolute = $self->profile->check_path_by_name->{$name}; + require $absolute; + + my $module = $self->profile->check_module_by_name->{$name}; + my $check = $module->new; + + $check->name($name); + $check->processable($processable); + $check->group($self); + $check->profile($self->profile); + + my $timer = [gettimeofday]; + my $procid = $processable->identifier; + say {*STDERR} encode_utf8("Running check: $name on $procid ...") + if $option->{debug}; + + try { + my @found_here = $check->run; + push(@from_checks, @found_here); + + } catch { + my $message = $@; + $message + .= "warning: cannot run $name check on package $procid\n"; + $message .= "skipping check of $procid\n"; + warn encode_utf8($message); + + $success = 0; + + next; + } + + my $raw_res = tv_interval($timer); + my $tres = sprintf('%.3fs', $raw_res); + + say {*STDERR} encode_utf8("Check $name for $procid done ($tres)") + if $option->{debug}; + say {*STDERR} encode_utf8("$procid,check/$name,$raw_res") + if $option->{'perf-output'}; + } + + my %context_tracker; + my %used_overrides; + + for my $hint (@from_checks) { + + my $as_issued = $hint->tag_name; + + croak encode_utf8('No tag name') + unless length $as_issued; + + my $issuer = $hint->issued_by; + + # try local name space + my $tag = $self->profile->get_tag("$issuer/$as_issued"); + + warn encode_utf8( +"Using tag $as_issued as name spaced while not so declared (in check $issuer)." + )if defined $tag && !$tag->name_spaced; + + # try global name space + $tag ||= $self->profile->get_tag($as_issued); + + unless (defined $tag) { + warn encode_utf8( + "Tried to issue unknown tag $as_issued in check $issuer."); + next; + } + + if ( !$tag->name_spaced && $tag->name ne $as_issued + || $tag->name_spaced && $tag->name ne "$issuer/$as_issued") { + + my $current_name = $tag->name; + warn encode_utf8( +"Tried to issue renamed tag $as_issued (current name $current_name) in check $issuer." + ); + + next; + } + + my $owner = $tag->check; + if ($issuer ne $owner) { + warn encode_utf8( + "Check $issuer has no tag $as_issued (but $owner does)."); + next; + } + + # pull name from tag; could be name-spaced + $hint->tag_name($tag->name); + my $tag_name = $hint->tag_name; + + # skip disabled tags + next + unless $self->profile->tag_is_enabled($tag_name); + + my $context = $hint->context; + + if (exists $context_tracker{$tag_name}{$context}) { + warn encode_utf8( +"Tried to issue duplicate hint in check $issuer: $tag_name $context\n" + ); + next; + } + + $context_tracker{$tag_name}{$context} = 1; + + my @masks; + for my $screen (@{$tag->screens}) { + + next + unless $screen->suppress($processable, $hint); + + my $mask = Lintian::Mask->new; + $mask->screen($screen->name); + + push(@masks, $mask); + } + + my @screen_names = map { $_->screen } @masks; + my $screen_list = join($SPACE, (sort @screen_names)); + + warn encode_utf8("Crossing screens for $tag_name ($screen_list)") + if @masks > 1; + + $hint->masks(\@masks) + if !$tag->show_always; + + if (exists $enabled_overrides{$tag_name}) { + + my $for_tag = $enabled_overrides{$tag_name}; + + if (exists $for_tag->{$EMPTY}) { + $hint->override($for_tag->{$EMPTY}); + + } else { + + # overrides without context handled above + my @patterns = grep { length } keys %{$for_tag}; + + # try short ones first + my @by_length = sort_by { length } @patterns; + + my $match = firstval { + match_glob($_, $hint->context) + } + @by_length; + + $hint->override($for_tag->{$match}) + if defined $match; + } + } + + # new hash values autovivify to 0 + ++$used_overrides{$tag_name}{$hint->override->pattern} + if defined $hint->override; + + push(@hints, $hint); + } + + # look for unused overrides + for my $tag_name (keys %enabled_overrides) { + + my @declared_patterns = keys %{$enabled_overrides{$tag_name}}; + my @used_patterns = keys %{$used_overrides{$tag_name} // {}}; + + my $pattern_lc + = List::Compare->new(\@declared_patterns, \@used_patterns); + my @unused_patterns = $pattern_lc->get_Lonly; + + for my $pattern (@unused_patterns) { + + my $override = $enabled_overrides{$tag_name}{$pattern}; + + my $override_item = $processable->override_file; + my $position = $override->position; + my $pointer = $override_item->pointer($position); + + my $unused = Lintian::Hint::Pointed->new; + $unused->issued_by('lintian'); + + $unused->tag_name('unused-override'); + $unused->tag_name('mismatched-override') + if exists $context_tracker{$tag_name}; + + # use the original name, in case the tag was renamed + my $original_name = $override->tag_name; + $unused->note($original_name . $SPACE . $pattern); + + $unused->pointer($pointer); + + # cannot be overridden or suppressed + push(@hints, $unused); + } + } + + # carry hints into the output modules + $processable->hints(\@hints); + } + + $self->processing_end(gmtime->datetime . 'Z'); + + my $raw_res = tv_interval($group_timer); + my $tres = sprintf('%.3fs', $raw_res); + say {*STDERR} + encode_utf8('Checking all of group ' . $self->name . " done ($tres)") + if $option->{debug}; + say {*STDERR} encode_utf8($self->name . ",total-group-check,$raw_res") + if $option->{'perf-output'}; + + if ($option->{'debug'} > 2) { + + # suppress warnings without reliable sizes + local $Devel::Size::warn = 0; + + my @processables = $self->get_processables; + my $pivot = shift @processables; + my $group_id + = $pivot->source_name . $UNDERSCORE . $pivot->source_version; + my $group_usage + = human_bytes(total_size([map { $_ } $self->get_processables])); + say {*STDERR} + encode_utf8("Memory usage [group:$group_id]: $group_usage") + if $option->{debug} >= $EXTRA_VERBOSE; + + for my $processable ($self->get_processables) { + my $id = $processable->identifier; + my $usage = human_bytes(total_size($processable)); + + say {*STDERR} encode_utf8("Memory usage [$id]: $usage") + if $option->{debug} >= $EXTRA_VERBOSE; + } + } + + # change to known folder; ealier failures could prevent removal below + chdir $savedir + or warn encode_utf8("Cannot change to directory $savedir"); + + return $success; +} + +=item $group->add_processable($proc) + +Adds $proc to $group. At most one source and one changes $proc can be +in a $group. There can be multiple binary $proc's, as long as they +are all unique. Successive buildinfo $proc's are silently ignored. + +This will error out if an additional source or changes $proc is added +to the group. Otherwise it will return a truth value if $proc was +added. + +=cut + +sub add_processable { + my ($self, $processable) = @_; + + if ($processable->tainted) { + warn encode_utf8( + sprintf( + "warning: tainted %1\$s package '%2\$s', skipping\n", + $processable->type, $processable->name + ) + ); + return 0; + } + + $self->source_name($processable->source_name) + unless length $self->source_name; + $self->source_version($processable->source_version) + unless length $self->source_version; + + return 0 + if $self->source_name ne $processable->source_name + || $self->source_version ne $processable->source_version; + + croak encode_utf8('Please set pool directory first.') + unless $self->pooldir; + + $processable->pooldir($self->pooldir); + + croak encode_utf8('Not a supported type (' . $processable->type . ')') + unless exists $SUPPORTED_TYPES{$processable->type}; + + if ($processable->type eq 'changes') { + die encode_utf8('Cannot add another ' . $processable->type . ' file') + if $self->changes; + $self->changes($processable); + + } elsif ($processable->type eq 'buildinfo') { + # Ignore multiple .buildinfo files; use the first one + $self->buildinfo($processable) + unless $self->buildinfo; + + } elsif ($processable->type eq 'source'){ + die encode_utf8('Cannot add another source package') + if $self->source; + $self->source($processable); + + } else { + my $type = $processable->type; + die encode_utf8('Unknown type ' . $type) + unless $type eq 'binary' || $type eq 'udeb'; + + # check for duplicate; should be rewritten with arrays + my $id = $processable->identifier; + return 0 + if exists $self->$type->{$id}; + + $self->$type->{$id} = $processable; + } + + return 1; +} + +=item get_processables + +Returns an array of all processables in $group. + +=cut + +sub get_processables { + my ($self) = @_; + + my @processables; + + push(@processables, $self->changes) + if defined $self->changes; + + push(@processables, $self->source) + if defined $self->source; + + push(@processables, $self->buildinfo) + if defined $self->buildinfo; + + push(@processables, $self->get_installables); + + return @processables; +} + +=item get_installables + +Returns all binary (and udeb) processables in $group. + +If $group does not have any binary processables then an empty list is +returned. + +=cut + +sub get_installables { + my ($self) = @_; + + my @installables; + + push(@installables, values %{$self->binary}); + push(@installables, values %{$self->udeb}); + + return @installables; +} + +=item direct_dependencies (PROC) + +If PROC is a part of the underlying processable group, this method +returns a listref containing all the direct dependencies of PROC. If +PROC is not a part of the group, this returns undef. + +Note: Only strong dependencies (Pre-Depends and Depends) are +considered. + +Note: Self-dependencies (if any) are I<not> included in the result. + +=cut + +has saved_direct_dependencies => (is => 'rw', default => sub { {} }); + +sub direct_dependencies { + my ($self, $processable) = @_; + + unless (keys %{$self->saved_direct_dependencies}) { + + my @processables = $self->get_installables; + + my %dependencies; + for my $that (@processables) { + + my $relation = $that->relation('strong'); + my @specific; + + for my $this (@processables) { + + # Ignore self deps - we have checks for that and it + # will just end up complicating "correctness" of + # otherwise simple checks. + next + if $this->name eq $that->name; + + push @specific, $this + if $relation->satisfies($this->name); + } + $dependencies{$that->name} = \@specific; + } + + $self->saved_direct_dependencies(\%dependencies); + } + + return $self->saved_direct_dependencies->{$processable->name} + if $processable; + + return $self->saved_direct_dependencies; +} + +=item direct_reliants (PROC) + +If PROC is a part of the underlying processable group, this method +returns a listref containing all the packages in the group that rely +on PROC. If PROC is not a part of the group, this returns undef. + +Note: Only strong dependencies (Pre-Depends and Depends) are +considered. + +Note: Self-dependencies (if any) are I<not> included in the result. + +=cut + +has saved_direct_reliants => (is => 'rw', default => sub { {} }); + +sub direct_reliants { + my ($self, $processable) = @_; + + unless (keys %{$self->saved_direct_reliants}) { + + my @processables = $self->get_installables; + + my %reliants; + foreach my $that (@processables) { + + my @specific; + foreach my $this (@processables) { + + # Ignore self deps - we have checks for that and it + # will just end up complicating "correctness" of + # otherwise simple checks. + next + if $this->name eq $that->name; + + my $relation = $this->relation('strong'); + push @specific, $this + if $relation->satisfies($that->name); + } + $reliants{$that->name} = \@specific; + } + + $self->saved_direct_reliants(\%reliants); + } + + return $self->saved_direct_reliants->{$processable->name} + if $processable; + + return $self->saved_direct_reliants; +} + +=item spelling_exceptions + +Returns a hashref of words, which the spell checker should ignore. +These words are generally based on the package names in the group to +avoid false-positive "spelling error" when packages have "fun" names. + +Example: Package alot-doc (#687464) + +=cut + +has spelling_exceptions => ( + is => 'rw', + lazy => 1, + default => sub { + my ($self) = @_; + + my @acceptable; + + # this run may not have all types + for my $processable ($self->get_processables) { + + # all processables have those + my @package_names= ($processable->name, $processable->source_name); + + # for sources we have d/control + push(@package_names, $processable->debian_control->installables) + if $processable->type eq 'source'; + + push(@acceptable, @package_names); + + # exempt pieces, too + my @package_pieces = map { split(m{-}) } @package_names; + push(@acceptable, @package_pieces); + + my @people_names; + for my $role (qw(Maintainer Uploaders Changed-By)) { + + my $value = $processable->fields->value($role); + for my $parsed (Email::Address::XS->parse($value)) { + + push(@people_names, $parsed->phrase) + if length $parsed->phrase; + } + } + + push(@acceptable, @people_names); + + # exempt first and last name separately, too + my @people_pieces = map { split($SPACE) } @people_names; + push(@acceptable, @people_pieces); + } + + return [uniq @acceptable]; + } +); + +=back + +=head1 AUTHOR + +Originally written by Niels Thykier <niels@thykier.net> for Lintian. + +=head1 SEE ALSO + +lintian(1) + +L<Lintian::Processable> + +=cut + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Hint.pm b/lib/Lintian/Hint.pm new file mode 100644 index 0000000..ee45393 --- /dev/null +++ b/lib/Lintian/Hint.pm @@ -0,0 +1,88 @@ +# Copyright (C) 2019-2021 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Hint; + +use v5.20; +use warnings; +use utf8; + +use Const::Fast; + +const my $EMPTY => q{}; +const my $SPACE => q{ }; + +use Moo::Role; +use namespace::clean; + +=head1 NAME + +Lintian::Hint -- Common facilities for Lintian tags found and to be issued + +=head1 SYNOPSIS + + use Moo; + use namespace::clean; + + with 'Lintian::Hint'; + +=head1 DESCRIPTION + +Common facilities for Lintian tags found and to be issued + +=head1 INSTANCE METHODS + +=over 4 + +=item tag_name + +=item issued_by + +=item override + +=item masks + +=cut + +has tag_name => (is => 'rw', default => $EMPTY); +has issued_by => (is => 'rw', default => $EMPTY); + +has override => (is => 'rw'); +has masks => (is => 'rw', default => sub { [] }); + +no namespace::clean; + +=back + +=head1 AUTHOR + +Originally written by Felix Lechner <felix.lechner@lease-up.com> for Lintian. + +=head1 SEE ALSO + +lintian(1) + +=cut + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Hint/Annotated.pm b/lib/Lintian/Hint/Annotated.pm new file mode 100644 index 0000000..137f8fe --- /dev/null +++ b/lib/Lintian/Hint/Annotated.pm @@ -0,0 +1,78 @@ +# Copyright (C) 2019-2021 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Hint::Annotated; + +use v5.20; +use warnings; +use utf8; + +use Const::Fast; + +const my $EMPTY => q{}; + +use Moo; +use namespace::clean; + +with 'Lintian::Hint'; + +=head1 NAME + +Lintian::Hint::Annotated - standard tag with arguments concatenated by space + +=head1 SYNOPSIS + + use Lintian::Hint::Annotated; + +=head1 DESCRIPTION + +Provides a standard tag whose arguments are concatenated by a space. + +=head1 INSTANCE METHODS + +=over 4 + +=item note + +=cut + +has note => (is => 'rw', default => $EMPTY); + +=item context + +=cut + +sub context { + my ($self) = @_; + + return $self->note; +} + +=back + +=cut + +1; + +__END__ + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Hint/Pointed.pm b/lib/Lintian/Hint/Pointed.pm new file mode 100644 index 0000000..be59731 --- /dev/null +++ b/lib/Lintian/Hint/Pointed.pm @@ -0,0 +1,88 @@ +# Copyright (C) 2021 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Hint::Pointed; + +use v5.20; +use warnings; +use utf8; + +use Const::Fast; + +const my $EMPTY => q{}; +const my $SPACE => q{ }; + +use Moo; +use namespace::clean; + +with 'Lintian::Hint'; + +=head1 NAME + +Lintian::Hint::Pointed - pointed tag with arguments concatenated by space + +=head1 SYNOPSIS + + use Lintian::Hint::Pointed; + +=head1 DESCRIPTION + +Provides a pointed tag whose arguments are concatenated by a space. + +=head1 INSTANCE METHODS + +=over 4 + +=item note + +=cut + +has note => (is => 'rw', default => $EMPTY); + +=item pointer + +=cut + +has pointer => (is => 'rw'); + +=item context + +=cut + +sub context { + my ($self) = @_; + + my $pointer = $self->pointer->to_string; + my @pieces = grep { length } ($self->note, "[$pointer]"); + + return join($SPACE, @pieces); +} + +=back + +=cut + +1; + +__END__ + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/IO/Select.pm b/lib/Lintian/IO/Select.pm new file mode 100644 index 0000000..fec6a1e --- /dev/null +++ b/lib/Lintian/IO/Select.pm @@ -0,0 +1,259 @@ +# Hey emacs! This is a -*- Perl -*- script! +# +# Lintian::IO::Select -- Perl utility functions for lintian +# +# Copyright (C) 2020 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::IO::Select; + +use v5.20; +use warnings; +use utf8; + +use Exporter qw(import); + +our @EXPORT_OK; + +BEGIN { + + @EXPORT_OK = qw( + unpack_and_index_piped_tar + ); +} + +use Const::Fast; +use IPC::Open3; +use IO::Select; +use Symbol; +use Syntax::Keyword::Try; +use Unicode::UTF8 qw(encode_utf8); + +# read up to 40kB at a time. this happens to be 4096 "tar records" +# (with a block-size of 512 and a block factor of 20, which appear to +# be the defaults). when we do full reads and writes of READ_SIZE (the +# OS willing), the receiving end will never be with an incomplete +# record. +const my $TAR_RECORD_SIZE => 20 * 512; + +# using 4096 * $TAR_RECORD_SIZE tripped up older kernels < 5.7 +const my $READ_CHUNK => 4 * 1024; + +const my $EMPTY => q{}; + +=head1 NAME + +Lintian::IO::Select - process functions based on IO::Select + +=head1 SYNOPSIS + + use Lintian::IO::Select; + +=head1 DESCRIPTION + +This module contains process functions based on IO::Select. + +=head1 FUNCTIONS + +=over 4 + +=item unpack_and_index_piped_tar + +=cut + +sub unpack_and_index_piped_tar { + my ($command, $basedir) = @_; + + my @pids; + + my $select = IO::Select->new; + + my $produce_stdin; + my $produce_stdout; + my $produce_stderr = gensym; + + my @produce_command = @{$command}; + + my $produce_pid; + try { + $produce_pid = open3( + $produce_stdin, $produce_stdout, + $produce_stderr, @produce_command + ); + } catch { + die map { encode_utf8($_) } $@; + } + + close $produce_stdin; + + push(@pids, $produce_pid); + + $select->add($produce_stdout, $produce_stderr); + + my $extract_stdin; + my $extract_stdout; + my $extract_stderr = gensym; + + my @extract_command = ( + qw(tar --no-same-owner --no-same-permissions --touch --extract --file - -C), + $basedir + ); + + my $extract_pid; + try { + $extract_pid = open3( + $extract_stdin, $extract_stdout, + $extract_stderr, @extract_command + ); + } catch { + die map { encode_utf8($_) } $@; + } + + push(@pids, $extract_pid); + + $select->add($extract_stdout, $extract_stderr); + + my @index_options + = qw(--list --verbose --utc --full-time --quoting-style=c --file -); + + my $named_stdin; + my $named_stdout; + my $named_stderr = gensym; + + my @named_command = ('tar', @index_options); + + my $named_pid; + try { + $named_pid + = open3($named_stdin, $named_stdout, $named_stderr, @named_command); + } catch { + die map { encode_utf8($_) } $@; + } + + push(@pids, $named_pid); + + $select->add($named_stdout, $named_stderr); + + my $numeric_stdin; + my $numeric_stdout; + my $numeric_stderr = gensym; + + my @numeric_command = ('tar', '--numeric-owner', @index_options); + + my $numeric_pid; + try { + $numeric_pid = open3( + $numeric_stdin, $numeric_stdout, + $numeric_stderr, @numeric_command + ); + } catch { + die map { encode_utf8($_) } $@; + } + + push(@pids, $numeric_pid); + + $select->add($numeric_stdout, $numeric_stderr); + + my $named = $EMPTY; + my $numeric = $EMPTY; + + my $produce_errors = $EMPTY; + my $extract_errors = $EMPTY; + my $named_errors = $EMPTY; + + while (my @ready = $select->can_read) { + + for my $handle (@ready) { + + my $buffer; + my $length = sysread($handle, $buffer, $READ_CHUNK); + + die encode_utf8("Error from child: $!\n") + unless defined $length; + + if ($length == 0){ + if ($handle == $produce_stdout) { + close $extract_stdin; + close $named_stdin; + close $numeric_stdin; + } + $select->remove($handle); + next; + } + + if ($handle == $produce_stdout) { + print {$extract_stdin} $buffer; + print {$named_stdin} $buffer; + print {$numeric_stdin} $buffer; + + } elsif ($handle == $named_stdout) { + $named .= $buffer; + + } elsif ($handle == $numeric_stdout) { + $numeric .= $buffer; + + } elsif ($handle == $produce_stderr) { + $produce_errors .= $buffer; + + } elsif ($handle == $extract_stderr) { + $extract_errors .= $buffer; + + } elsif ($handle == $named_stderr) { + $named_errors .= $buffer; + + # } else { + # die encode_utf8("Shouldn't be here\n"); + } + } + } + + close $produce_stdout; + close $produce_stderr; + + close $extract_stdout; + close $extract_stderr; + + close $named_stdout; + close $named_stderr; + + close $numeric_stdout; + close $numeric_stderr; + + waitpid($_, 0) for @pids; + + my $tar_errors = ($produce_errors // $EMPTY) . ($extract_errors // $EMPTY); + my $index_errors = $named_errors; + + return ($named, $numeric, $tar_errors, $index_errors); +} + +=back + +=head1 SEE ALSO + +lintian(1) + +=cut + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/IPC/Run3.pm b/lib/Lintian/IPC/Run3.pm new file mode 100644 index 0000000..e762be5 --- /dev/null +++ b/lib/Lintian/IPC/Run3.pm @@ -0,0 +1,135 @@ +# Hey emacs! This is a -*- Perl -*- script! +# +# Lintian::IPC::Run3 -- Perl utility functions for lintian +# +# Copyright (C) 2020 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::IPC::Run3; + +use v5.20; +use warnings; +use utf8; + +use Exporter qw(import); + +our @EXPORT_OK; + +BEGIN { + + @EXPORT_OK = qw( + safe_qx + xargs + ); +} + +use Const::Fast; +use IPC::Run3; + +const my $EMPTY => q{}; +const my $NULL => qq{\0}; + +const my $WAIT_STATUS_SHIFT => 8; + +=head1 NAME + +Lintian::IPC::Run3 - process functions based on IPC::Run3 + +=head1 SYNOPSIS + + use Lintian::IPC::Run3 qw(safe_qx); + +=head1 DESCRIPTION + +This module contains process functions based on IPC::Run3. + +=head1 FUNCTIONS + +=over 4 + +=item C<safe_qx(@cmd)> + +Emulates the C<qx()> operator but with array argument only. + +=cut + +sub safe_qx { + my @command = @_; + + my $stdout; + my $stderr; + + run3(\@command, \undef, \$stdout, \$stderr); + + my $exitcode = $?; + my $status = ($exitcode >> $WAIT_STATUS_SHIFT); + + $? = $status; + + return $stdout . $stderr + if $?; + + return $stdout; +} + +=item C<xargs> + +=cut + +sub xargs { + my ($command, $arguments, $processor) = @_; + + $command //= []; + $arguments //= []; + + return + unless @{$arguments}; + + my $input = $EMPTY; + $input .= $_ . $NULL for @{$arguments}; + + my $stdout; + my $stderr; + + my @combined = (qw(xargs --null --no-run-if-empty), @{$command}); + + run3(\@combined, \$input, \$stdout, \$stderr); + + my $exitcode = $?; + my $status = ($exitcode >> $WAIT_STATUS_SHIFT); + + $processor->($stdout, $stderr, $status, @{$arguments}); + + return; +} + +=back + +=head1 SEE ALSO + +lintian(1) + +=cut + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Index.pm b/lib/Lintian/Index.pm new file mode 100644 index 0000000..b442455 --- /dev/null +++ b/lib/Lintian/Index.pm @@ -0,0 +1,878 @@ +# -*- perl -*- Lintian::Index +# +# Copyright (C) 2020 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by the Free +# Software Foundation; either version 2 of the License, or (at your option) +# any later version. +# +# This program is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +# more details. +# +# You should have received a copy of the GNU General Public License along with +# this program. If not, see <http://www.gnu.org/licenses/>. + +package Lintian::Index; + +use v5.20; +use warnings; +use utf8; + +use Carp; +use Const::Fast; +use Cwd; +use IPC::Run3; +use List::SomeUtils qw(any); +use Path::Tiny; +use Unicode::UTF8 qw(encode_utf8 decode_utf8); + +use Lintian::Index::Item; +use Lintian::IO::Select qw(unpack_and_index_piped_tar); +use Lintian::IPC::Run3 qw(safe_qx); + +use Lintian::Util qw(perm2oct); + +const my $EMPTY => q{}; +const my $SPACE => q{ }; +const my $SLASH => q{/}; +const my $BACKSLASH => q{\\}; +const my $ZERO => q{0}; +const my $HYPHEN => q{-}; +const my $PERCENT => q{%}; +const my $NEWLINE => qq{\n}; + +const my $WAIT_STATUS_SHIFT => 8; +const my $NO_LIMIT => -1; +const my $LINES_PER_FILE => 3; +const my $WIDELY_READABLE_FOLDER => oct(755); +const my $WORLD_WRITABLE_FOLDER => oct(777); + +use Moo; +use namespace::clean; + +with + 'Lintian::Index::Ar', + 'Lintian::Index::Elf', + 'Lintian::Index::FileTypes', + 'Lintian::Index::Java', + 'Lintian::Index::Md5sums', + 'Lintian::Index::Strings'; + +my %FILE_CODE2LPATH_TYPE = ( + $HYPHEN => Lintian::Index::Item::TYPE_FILE + | Lintian::Index::Item::OPEN_IS_OK, + 'h' => Lintian::Index::Item::TYPE_HARDLINK + | Lintian::Index::Item::OPEN_IS_OK, + 'd' => Lintian::Index::Item::TYPE_DIR| Lintian::Index::Item::FS_PATH_IS_OK, + 'l' => Lintian::Index::Item::TYPE_SYMLINK, + 'b' => Lintian::Index::Item::TYPE_BLOCK_DEV, + 'c' => Lintian::Index::Item::TYPE_CHAR_DEV, + 'p' => Lintian::Index::Item::TYPE_PIPE, +); + +=head1 NAME + +Lintian::Index - access to collected data about the upstream (orig) sources + +=head1 SYNOPSIS + + use Lintian::Index; + +=head1 DESCRIPTION + +Lintian::Processable::Source::Orig::Index provides an interface to collected data about the upstream (orig) sources. + +=head1 INSTANCE METHODS + +=over 4 + +=item identifier + +=item catalog + +Returns a reference to a hash with elements catalogued by path names. + +=item C<basedir> + +Returns the base directory for file references. + +=item C<anchored> + +=item unpack_messages + +=cut + +has identifier => (is => 'rw', default => 'unnamed'); + +has catalog => ( + is => 'rw', + default => sub { + my ($self) = @_; + + # create an empty root + my $root = Lintian::Index::Item->new; + + # associate with this index + $root->index($self); + + my %catalog; + $catalog{$EMPTY} = $root; + + return \%catalog; + } +); + +has basedir => ( + is => 'rw', + trigger => sub { + my ($self, $folder) = @_; + + return + unless length $folder; + + # create directory + path($folder)->mkpath({ chmod => $WORLD_WRITABLE_FOLDER }) + unless -e $folder; + }, + default => $EMPTY +); + +has anchored => (is => 'rw', default => 0); +has unpack_messages => (is => 'rw', default => sub { [] }); + +has sorted_list => ( + is => 'ro', + lazy => 1, + default => sub { + my ($self) = @_; + + my @sorted = sort { $a->name cmp $b->name } values %{$self->catalog}; + + # remove automatic root dir; list is sorted + shift @sorted; + + const my @IMMUTABLE => @sorted; + + return \@IMMUTABLE; + } +); + +=item lookup (FILE) + +Like L</index> except orig_index is based on the "orig tarballs" of +the source packages. + +For native packages L</index> and L</orig_index> are generally +identical. + +NB: If sorted_index includes a debian packaging, it is was +contained in upstream part of the source package (or the package is +native). + +=cut + +sub lookup { + my ($self, $name) = @_; + + # get root dir by default + $name //= $EMPTY; + + croak encode_utf8($self->identifier . ': Name is not a string') + unless ref $name eq $EMPTY; + + my $found = $self->catalog->{$name}; + + return $found + if defined $found; + + return undef; +} + +=item resolve_path + +=cut + +sub resolve_path { + my ($self, $name) = @_; + + return $self->lookup->resolve_path($name); +} + +=item create_from_basedir + +=cut + +sub create_from_basedir { + my ($self) = @_; + + my $savedir = getcwd; + chdir($self->basedir) + or die encode_utf8( + $self->identifier . ': Cannot change to directory ' . $self->basedir); + + # get times in UTC + my $TIME_STAMP + = $PERCENT . q{M} . $SPACE . $PERCENT . q{s} . $SPACE . $PERCENT . q{A+}; + my $FILE_NAME = $PERCENT . q{p}; + my $LINK_DESTINATION = $PERCENT . q{l}; + my $NULL_BREAK = $BACKSLASH . $ZERO; + + my @REQUESTED_FIELDS + = map { $_ . $NULL_BREAK } ($TIME_STAMP, $FILE_NAME, $LINK_DESTINATION); + + my @index_command + = ('env', 'TZ=UTC', 'find', '-printf', join($EMPTY, @REQUESTED_FIELDS)); + my $index_output; + my $index_errors; + + run3(\@index_command, \undef, \$index_output, \$index_errors); + + chdir($savedir) + or die encode_utf8( + $self->identifier . ": Cannot change to directory $savedir"); + + # allow processing of file names with non UTF-8 bytes + $index_errors = decode_utf8($index_errors) + if length $index_errors; + + my $permissionspattern = qr/\S{10}/; + my $sizepattern = qr/\d+/; + my $datepattern = qr/\d{4}-\d{2}-\d{2}/; + my $timepattern = qr/\d{2}:\d{2}:\d{2}\.\d+/; + my $pathpattern = qr/[^\0]*/; + + my %all; + + $index_output =~ s/\0$//; + + my @lines = split(/\0/, $index_output, $NO_LIMIT); + die encode_utf8($self->identifier + . ": Did not get a multiple of $LINES_PER_FILE lines from find.") + unless @lines % $LINES_PER_FILE == 0; + + while (defined(my $first = shift @lines)) { + + my $entry = Lintian::Index::Item->new; + $entry->index($self); + + $first + =~ /^($permissionspattern)\ ($sizepattern)\ ($datepattern)\+($timepattern)$/s; + + $entry->perm($1); + $entry->size($2); + $entry->date($3); + $entry->time($4); + + my $name = shift @lines; + + my $linktarget = shift @lines; + + # for non-links, string is empty + $entry->link($linktarget) + if length $linktarget; + + # find prints single dot for base; removed in next step + $name =~ s{^\.$}{\./}s; + + # strip relative prefix + $name =~ s{^\./+}{}s; + + # make sure directories end with a slash, except root + $name .= $SLASH + if length $name + && $entry->perm =~ /^d/ + && $name !~ m{ /$ }msx; + $entry->name($name); + + $all{$entry->name} = $entry; + } + + $self->catalog(\%all); + + my $load_errors = $self->load; + + return $index_errors . $load_errors; +} + +=item create_from_piped_tar + +=cut + +sub create_from_piped_tar { + my ($self, $command) = @_; + + my $extract_dir = $self->basedir; + + my ($named, $numeric, $extract_errors, $index_errors) + = unpack_and_index_piped_tar($command, $extract_dir); + + # fix permissions + safe_qx('chmod', '-R', 'u+rwX,go-w', $extract_dir); + + # allow processing of file names with non UTF-8 bytes + my @named_owner = split(/\n/, $named); + my @numeric_owner = split(/\n/, $numeric); + + my %catalog; + + for my $line (@named_owner) { + + my $entry = Lintian::Index::Item->new; + $entry->init_from_tar_output($line); + $entry->index($self); + + $catalog{$entry->name} = $entry; + } + + # get numerical owners from second list + for my $line (@numeric_owner) { + + # entry not used outside this loop + my $entry = Lintian::Index::Item->new; + $entry->init_from_tar_output($line); + + die encode_utf8($self->identifier + . ': Numerical index lists extra files for file name ' + . $entry->name) + unless exists $catalog{$entry->name}; + + # keep numerical uid and gid + $catalog{$entry->name}->uid($entry->owner); + $catalog{$entry->name}->gid($entry->group); + } + + # tar produces spurious root entry when stripping slashes from member names + delete $catalog{$SLASH} + unless $self->anchored; + + $self->catalog(\%catalog); + + my $load_errors = $self->load; + + return $extract_errors . $index_errors . $load_errors; +} + +=item load + +=cut + +sub load { + my ($self) = @_; + + my $errors = $EMPTY; + + my %all = %{$self->catalog}; + + # set internal permissions flags + for my $entry (values %all) { + + my $raw_type = substr($entry->perm, 0, 1); + + my $operm = perm2oct($entry->perm); + $entry->path_info( + $operm | ( + $FILE_CODE2LPATH_TYPE{$raw_type} + // Lintian::Index::Item::TYPE_OTHER + ) + ); + } + + # find all entries that are not regular files + my @nosize + = grep { !$_->path_info & Lintian::Index::Item::TYPE_FILE } values %all; + + # reset size for anything but regular files + $_->size(0) for @nosize; + + if ($self->anchored) { + + my %relative; + for my $name (keys %all) { + my $entry = $all{$name}; + + # remove leading slash from absolute names + my $name = $entry->name; + $name =~ s{^/+}{}s; + $entry->name($name); + + # remove leading slash from absolute hardlink targets + if ($entry->is_hardlink) { + my $target = $entry->link; + $target =~ s{^/+}{}s; + $entry->link($target); + } + + $relative{$name} = $entry; + } + + %all = %relative; + } + + # disallow absolute names + die encode_utf8($self->identifier . ': Index contains absolute path names') + if any { $_->name =~ m{^/}s } values %all; + + # disallow absolute hardlink targets + die encode_utf8( + $self->identifier . ': Index contains absolute hardlink targets') + if any { $_->link =~ m{^/}s } grep { $_->is_hardlink } values %all; + + # add entries for missing directories + for my $entry (values %all) { + + my $current = $entry; + my $parentname; + + # travel up the directory tree + do { + $parentname = $current->dirname; + + # insert new entry for missing intermediate directories + unless (exists $all{$parentname}) { + + my $added = Lintian::Index::Item->new; + $added->index($self); + + $added->name($parentname); + $added->path_info( + $FILE_CODE2LPATH_TYPE{'d'} | $WIDELY_READABLE_FOLDER); + + # random but fixed date; hint, it's a good read. :) + $added->date('1998-01-25'); + $added->time('22:55:34'); + $added->faux(1); + + $all{$parentname} = $added; + } + + $current = $all{$parentname}; + + } while ($parentname ne $EMPTY); + } + + # insert root for empty tarfies like suckless-tools_45.orig.tar.xz + unless (exists $all{$EMPTY}) { + + my $root = Lintian::Index::Item->new; + $root->index($self); + + $root->name($EMPTY); + $root->path_info($FILE_CODE2LPATH_TYPE{'d'} | $WIDELY_READABLE_FOLDER); + + # random but fixed date; hint, it's a good read. :) + $root->date('1998-01-25'); + $root->time('22:55:34'); + $root->faux(1); + + $all{$EMPTY} = $root; + } + + my @directories + = grep { $_->path_info & Lintian::Index::Item::TYPE_DIR } values %all; + + # make space for children + my %children; + $children{$_->name} = [] for @directories; + + # record children + for my $entry (values %all) { + + my $parentname = $entry->dirname; + + # Ensure the "root" is not its own child. It is not really helpful + # from an analysis PoV and it creates ref cycles (and by extension + # leaks like #695866). + push(@{ $children{$parentname} }, $entry) + unless $parentname eq $entry->name; + } + + foreach my $entry (@directories) { + my %childnames + = map {$_->basename => $_->name }@{ $children{$entry->name} }; + $entry->childnames(\%childnames); + } + + # ensure root is not its own child; may create leaks like #695866 + die encode_utf8($self->identifier . ': Root directory is its own parent') + if defined $all{$EMPTY} && defined $all{$EMPTY}->parent_dir; + + # find all hard links + my @hardlinks + = grep { $_->path_info & Lintian::Index::Item::TYPE_HARDLINK } + values %all; + + # catalog where they point + my %backlinks; + push(@{$backlinks{$_->link}}, $_) for @hardlinks; + + # add the master files for proper sort results + push(@{$backlinks{$_}}, $all{$_}) for keys %backlinks; + + # point hard links to shortest path + for my $mastername (keys %backlinks) { + + my @group = @{$backlinks{$mastername}}; + + # sort for path length + my @links = sort { $a->name cmp $b->name } @group; + + # pick the shortest path + my $preferred = shift @links; + + # get the previous master entry + my $master = $all{$mastername}; + + # skip if done + next + if $preferred->name eq $master->name; + + # unset link for preferred + $preferred->link($EMPTY); + + # copy size from original + $preferred->size($master->size); + + $preferred->path_info( + ($preferred->path_info& ~Lintian::Index::Item::TYPE_HARDLINK) + | Lintian::Index::Item::TYPE_FILE); + + foreach my $pointer (@links) { + + # turn into a hard link + $pointer->path_info( + ($pointer->path_info & ~Lintian::Index::Item::TYPE_FILE) + | Lintian::Index::Item::TYPE_HARDLINK); + + # set link to preferred path + $pointer->link($preferred->name); + + # no size for hardlinks + $pointer->size(0); + } + } + + # make sure recorded names match hash keys + $all{$_}->name($_) for keys %all; + + $self->catalog(\%all); + + $errors .= $self->add_md5sums; + $errors .= $self->add_file_types; + + $errors .= $self->add_ar; + $errors .= $self->add_elf; + $errors .= $self->add_java; + $errors .= $self->add_strings; + + return $errors; +} + +=item merge_in + +=cut + +sub merge_in { + my ($self, $other) = @_; + + die encode_utf8($self->identifier + . ': Need same base directory (' + . $self->basedir . ' vs ' + . $other->basedir . ')') + unless $self->basedir eq $other->basedir; + + die encode_utf8($self->identifier . ': Need same anchoring status') + unless $self->anchored == $other->anchored; + + # associate all new items with this index + $_->index($self) for values %{$other->catalog}; + + for my $item (values %{$other->catalog}) { + + # do not transfer root + next + if $item->name eq $EMPTY; + + # duplicates on disk are dropped with basedir segments + $self->catalog->{$item->name} = $item; + + # when adding folder, delete potential file entry + my $noslash = $item->name; + if ($noslash =~ s{/$}{}) { + delete $self->catalog->{$noslash}; + } + } + + # add children that came from other root to current + my @other_childnames = keys %{$other->catalog->{$EMPTY}->childnames}; + for my $name (@other_childnames) { + + $self->catalog->{$EMPTY}->childnames->{$name} + = $self->catalog->{$name}; + } + + # remove items from other index + $other->catalog({}); + + # unset other base directory + $other->basedir($EMPTY); + + return; +} + +=item capture_common_prefix + +=cut + +sub capture_common_prefix { + my ($self) = @_; + + my $new_basedir = path($self->basedir)->parent; + + # do nothing in root + return + if $new_basedir eq $SLASH; + + my $segment = path($self->basedir)->basename; + die encode_utf8($self->identifier . ': Common path segment has no length') + unless length $segment; + + my $prefix; + if ($self->anchored) { + $prefix = $SLASH . $segment; + } else { + $prefix = $segment . $SLASH; + } + + my $new_root = Lintian::Index::Item->new; + + # associate new item with this index + $new_root->index($self); + + $new_root->name($EMPTY); + $new_root->childnames({ $segment => $prefix }); + + # random but fixed date; hint, it's a good read. :) + $new_root->date('1998-01-25'); + $new_root->time('22:55:34'); + $new_root->path_info($FILE_CODE2LPATH_TYPE{'d'} | $WIDELY_READABLE_FOLDER); + $new_root->faux(1); + + my %new_catalog; + for my $item (values %{$self->catalog}) { + + # drop common prefix from name + my $new_name = $prefix . $item->name; + $item->name($new_name); + + if (length $item->link) { + + # add common prefix from link target + my $new_link = $prefix . $item->link; + $item->link($new_link); + } + + # adjust references to children + for my $basename (keys %{$item->childnames}) { + $item->childnames->{$basename} + = $prefix . $item->childnames->{$basename}; + } + + $new_catalog{$new_name} = $item; + } + + $new_catalog{$EMPTY} = $new_root; + $new_catalog{$prefix}->parent_dir($new_root); + + $self->catalog(\%new_catalog); + + # remove segment from base directory + $self->basedir($new_basedir); + + return; +} + +=item drop_common_prefix + +=cut + +sub drop_common_prefix { + my ($self) = @_; + + my $errors = $EMPTY; + + my @childnames = keys %{$self->catalog->{$EMPTY}->childnames}; + + die encode_utf8($self->identifier . ': Not exactly one top-level child') + unless @childnames == 1; + + my $segment = $childnames[0]; + die encode_utf8($self->identifier . ': Common path segment has no length') + unless length $segment; + + my $new_root = $self->lookup($segment . $SLASH); + die encode_utf8($self->identifier . ': New root is not a directory') + unless $new_root->is_dir; + + my $prefix; + if ($self->anchored) { + $prefix = $SLASH . $segment; + } else { + $prefix = $segment . $SLASH; + } + + my $regex = quotemeta($prefix); + + delete $self->catalog->{$EMPTY}; + + my %new_catalog; + for my $item (values %{$self->catalog}) { + + # drop common prefix from name + my $new_name = $item->name; + $new_name =~ s{^$regex}{}; + $item->name($new_name); + + if (length $item->link) { + + # drop common prefix from link target + my $new_link = $item->link; + $new_link =~ s{^$regex}{}; + $item->link($new_link); + } + + # adjust references to children + for my $basename (keys %{$item->childnames}) { + $item->childnames->{$basename} =~ s{^$regex}{}; + } + + # unsure this works, but orig not anchored + $new_name = $EMPTY + if $new_name eq $SLASH && $self->anchored; + + $new_catalog{$new_name} = $item; + } + + $self->catalog(\%new_catalog); + + # add dropped segment to base directory + $self->basedir($self->basedir . $SLASH . $segment); + + my $other_errors = $self->drop_basedir_segment; + + return $errors . $other_errors; +} + +=item drop_basedir_segment + +=cut + +sub drop_basedir_segment { + my ($self) = @_; + + my $errors = $EMPTY; + + my $obsolete = path($self->basedir)->basename; + die encode_utf8($self->identifier . ': Base directory has no name') + unless length $obsolete; + + my $parent_dir = path($self->basedir)->parent->stringify; + die encode_utf8($self->identifier . ': Base directory has no parent') + if $parent_dir eq $SLASH; + + my $grandparent_dir = path($parent_dir)->parent->stringify; + die encode_utf8( + $self->identifier . ': Will not do anything in file system root') + if $grandparent_dir eq $SLASH; + + # destroyed when object is lost + my $tempdir_tiny + = path($grandparent_dir)->tempdir(TEMPLATE => 'customXXXXXXXX'); + + my $tempdir = $tempdir_tiny->stringify; + + # avoids conflict in case of repeating path segments + for my $child (path($self->basedir)->children) { + my $old_name = $child->stringify; + + # Perl unicode bug + utf8::downgrade $old_name; + utf8::downgrade $tempdir; + + my @command = ('mv', $old_name, $tempdir); + my $stderr; + run3(\@command, \undef, \undef, \$stderr); + my $status = ($? >> $WAIT_STATUS_SHIFT); + + # already in UTF-8 + die $stderr + if $status; + } + + rmdir $self->basedir; + $self->basedir($parent_dir); + + for my $child ($tempdir_tiny->children) { + my $old_name = $child->stringify; + + my $target_dir = $parent_dir . $SLASH . $child->basename; + + # Perl unicode bug + utf8::downgrade $target_dir; + + if (-e $target_dir) { + + # catalog items were dropped when index was merged + my @command = (qw{rm -rf}, $target_dir); + my $stderr; + run3(\@command, \undef, \undef, \$stderr); + my $status = ($? >> $WAIT_STATUS_SHIFT); + + # already in UTF-8 + die $stderr + if $status; + + my $display_dir + = path($parent_dir)->basename . $SLASH . $child->basename; + $errors .= "removed existing $display_dir" . $NEWLINE; + } + + # Perl unicode bug + utf8::downgrade $old_name; + utf8::downgrade $parent_dir; + + my @command = ('mv', $old_name, $parent_dir); + my $stderr; + run3(\@command, \undef, \undef, \$stderr); + my $status = ($? >> $WAIT_STATUS_SHIFT); + + # already in UTF-8 + die $stderr + if $status; + } + + return $errors; +} + +=back + +=head1 AUTHOR + +Originally written by Felix Lechner <felix.lechner@lease-up.com> for +Lintian. + +=head1 SEE ALSO + +lintian(1) + +=cut + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Index/Ar.pm b/lib/Lintian/Index/Ar.pm new file mode 100644 index 0000000..01f3e6b --- /dev/null +++ b/lib/Lintian/Index/Ar.pm @@ -0,0 +1,128 @@ +# -*- perl -*- Lintian::Index::Ar +# +# Copyright (C) 2020 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by the Free +# Software Foundation; either version 2 of the License, or (at your option) +# any later version. +# +# This program is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +# more details. +# +# You should have received a copy of the GNU General Public License along with +# this program. If not, see <http://www.gnu.org/licenses/>. + +package Lintian::Index::Ar; + +use v5.20; +use warnings; +use utf8; + +use Const::Fast; +use Cwd; +use Path::Tiny; +use Unicode::UTF8 qw(decode_utf8 encode_utf8); + +use Lintian::IPC::Run3 qw(safe_qx); + +use Moo::Role; +use namespace::clean; + +const my $EMPTY => q{}; +const my $NEWLINE => qq{\n}; + +=head1 NAME + +Lintian::Index::Ar - binary symbol information. + +=head1 SYNOPSIS + + use Lintian::Index; + +=head1 DESCRIPTION + +Lintian::Index::Ar binary symbol information. + +=head1 INSTANCE METHODS + +=over 4 + +=item add_ar + +=cut + +sub add_ar { + my ($self) = @_; + + my $savedir = getcwd; + chdir($self->basedir) + or die encode_utf8( + $self->identifier . ': Cannot change to directory ' . $self->basedir); + + my $errors = $EMPTY; + + my @archives + = grep { $_->name =~ / [.]a $/msx && $_->is_regular_file } + @{$self->sorted_list}; + + for my $archive (@archives) { + + # skip empty archives to avoid ar error message; happens in tests + next + unless $archive->size; + + my %ar_info; + + # fails silently for non-ar files (#934899); probably creates empty entries + my $bytes = safe_qx(qw{ar t}, $archive); + if ($?) { + $errors .= "ar failed for $archive" . $NEWLINE; + next; + } + + my $output = decode_utf8($bytes); + my @members = split(/\n/, $output); + + my $count = 1; + for my $member (@members) { + + # more info could be added with -v above + $ar_info{$count}{name} = $member; + + } continue { + $count++; + } + + $archive->ar_info(\%ar_info); + } + + chdir($savedir) + or die encode_utf8( + $self->identifier . ": Cannot change to directory $savedir"); + + return $errors; +} + +=back + +=head1 AUTHOR + +Originally written by Felix Lechner <felix.lechner@lease-up.com> for +Lintian. + +=head1 SEE ALSO + +lintian(1) + +=cut + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Index/Elf.pm b/lib/Lintian/Index/Elf.pm new file mode 100644 index 0000000..1fe4d7a --- /dev/null +++ b/lib/Lintian/Index/Elf.pm @@ -0,0 +1,739 @@ +# -*- perl -*- Lintian::Index::Elf +# +# Copyright (C) 1998 Christian Schwarz +# Copyright (C) 2008 Adam D. Barratt +# Copyright (C) 2017-2018 Chris Lamb <lamby@debian.org> +# Copyright (C) 2020-2022 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by the Free +# Software Foundation; either version 2 of the License, or (at your option) +# any later version. +# +# This program is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +# more details. +# +# You should have received a copy of the GNU General Public License along with +# this program. If not, see <http://www.gnu.org/licenses/>. + +package Lintian::Index::Elf; + +use v5.20; +use warnings; +use utf8; + +use bignum qw(hex); + +use Const::Fast; +use Cwd; +use IPC::Run3; +use Unicode::UTF8 qw(encode_utf8 valid_utf8 decode_utf8); + +use Lintian::Elf::Section; +use Lintian::Elf::Symbol; +use Lintian::Storage::MLDBM; + +use Moo::Role; +use namespace::clean; + +const my $EMPTY => q{}; +const my $SPACE => q{ }; +const my $HYPHEN => q{-}; +const my $NEWLINE => qq{\n}; + +const my $LINES_PER_FILE => 3; + +=head1 NAME + +Lintian::Index::Elf - binary symbol information. + +=head1 SYNOPSIS + + use Lintian::Index; + +=head1 DESCRIPTION + +Lintian::Index::Elf binary symbol information. + +=head1 INSTANCE METHODS + +=over 4 + +=item elf_storage + +=cut + +has elf_storage => ( + is => 'rw', + lazy => 1, + default => sub { + my ($self) = @_; + + my $storage = Lintian::Storage::MLDBM->new; + $storage->create('elf'); + + return $storage; + } +); + +=item elf_storage_by_member + +=cut + +has elf_storage_by_member => ( + is => 'rw', + lazy => 1, + default => sub { + my ($self) = @_; + + my $storage = Lintian::Storage::MLDBM->new; + $storage->create('elf-by-member'); + + return $storage; + } +); + +=item add_elf + +=cut + +sub add_elf { + my ($self) = @_; + + my $savedir = getcwd; + chdir($self->basedir) + or die encode_utf8( + $self->identifier . ': Cannot change to directory ' . $self->basedir); + + my $errors = $EMPTY; + + my @files = grep { $_->is_file } @{$self->sorted_list}; + + # must be ELF or static library + my @with_objects = grep { + $_->file_type =~ /\bELF\b/ + || ( $_->file_type =~ /\bcurrent ar archive\b/ + && $_->name =~ /\.a$/) + } @files; + + for my $file (@with_objects) { + + local $SIG{__WARN__}= sub { + warn encode_utf8($self->identifier + . ': Warning while running readelf on' + . $file->name + . ": $_[0]"); + }; + + my @command = (qw{readelf --all --wide}, $file->name); + my $combined_bytes; + + run3(\@command, \undef, \$combined_bytes, \$combined_bytes); + + next + unless length $combined_bytes; + + my $combined_output; + + if (valid_utf8($combined_bytes)) { + $combined_output = decode_utf8($combined_bytes); + + } else { + $combined_output = $combined_bytes; + $errors .= "Output from '@command' is not valid UTF-8" . $NEWLINE; + } + + # each object file in an archive gets its own File section + my @per_files = split(/^(File): (.*)$/m, $combined_output); + shift @per_files while @per_files && $per_files[0] ne 'File'; + + @per_files = ($combined_output) + unless @per_files; + + # Special case - readelf will not prefix the output with "File: + # $name" if it only gets one ELF file argument, so act as if it did... + # (but it does "the right thing" if passed a static lib >.>) + # + # - In fact, if readelf always emitted that File: header, we could + # simply use xargs directly on readelf and just parse its output + # in the loop below. + if (@per_files == 1) { + unshift(@per_files, $file->name); + unshift(@per_files, 'File'); + } + + unless (@per_files % $LINES_PER_FILE == 0) { + + $errors + .= "Parsed data from readelf is not a multiple of $LINES_PER_FILE for $file" + . $NEWLINE; + next; + } + + while (defined(my $fixed = shift @per_files)) { + + my $recorded_name = shift @per_files; + my $per_file = shift @per_files; + + unless ($fixed eq 'File') { + $errors .= "Unknown output from readelf for $file" . $NEWLINE; + next; + } + + unless (length $recorded_name) { + $errors .= "No file name from readelf for $file" . $NEWLINE; + next; + } + + my ($container, $member) = ($recorded_name =~ /^(.*)\(([^)]+)\)$/); + + $container = $recorded_name + unless defined $container && defined $member; + + unless ($container eq $file->name) { + $errors + .= "Container not same as file name ($container vs $file)" + . $NEWLINE; + next; + } + + # ignore empty archives, such as in musl-dev_1.2.1-1_amd64.deb + next + unless length $per_file; + + my $object_name; + if ($recorded_name =~ m{^(?:.+)\(([^/\)]+)\)$}){ + + # object file in a static lib. + $object_name = $1; + } + + parse_per_file($file, $object_name, $per_file); + } + } + + chdir($savedir) + or die encode_utf8( + $self->identifier . ": Cannot change to directory $savedir"); + + return $errors; +} + +=item parse_per_file + +=cut + +sub parse_per_file { + my ($file, $object_name, $from_readelf) = @_; + + my %by_object; + + $by_object{READELF} = $from_readelf; + + # sometimes there are three blank lines; seen on armhf + my @paragraphs = split(/\n{2,}/, $from_readelf); + + for my $paragraph (@paragraphs) { + + my ($first, $bulk) = split(m{\n}, $paragraph, 2); + + if ($first =~ /^ELF Header:/) { + elf_header($bulk, \%by_object); + next; + } + + if ($first =~ /^Program Headers:/) { + program_headers($bulk, \%by_object); + next; + } + + if ($first =~ /^Dynamic section at offset .*:/) { + dynamic_section($bulk, \%by_object); + next; + } + + if ($first =~ /^Section Headers:/) { + section_headers($bulk, \%by_object); + next; + } + + if ($first =~ /^Symbol table '.dynsym'/) { + symbol_table($bulk, \%by_object); + next; + } + + if ($first =~ /^Version symbols section /) { + version_symbols($bulk, \%by_object); + next; + } + + if ($first =~ /^There is no dynamic section in this file/) { + # a dynamic section was declared but it's empty. + $by_object{'BAD-DYNAMIC-TABLE'} = 1 + if exists $by_object{PH}{DYNAMIC}; + next; + } + } + + my %section_name_by_number; + for my $name (keys %{$by_object{SH} // {}}) { + + my $number = $by_object{SH}{$name}{number}; + $section_name_by_number{$number} = $name; + } + + for my $symbol_number (keys %{$by_object{'DYNAMIC-SYMBOLS'}}) { + + my $symbol_name + = $by_object{'DYNAMIC-SYMBOLS'}{$symbol_number}{symbol_name}; + my $section_number + = $by_object{'DYNAMIC-SYMBOLS'}{$symbol_number}{section_number}; + + my $symbol_version; + + if ($symbol_name =~ m{^ (.*) @ (.*) \s [(] .* [)] $}x) { + + $symbol_name = $1; + $symbol_version = $2; + + } else { + $symbol_version = $by_object{'SYMBOL-VERSIONS'}{$symbol_number} + // $EMPTY; + + if ( $symbol_version eq '*local*' + || $symbol_version eq '*global*'){ + + if ($section_number eq 'UND') { + $symbol_version = $EMPTY; + + } else { + $symbol_version = 'Base'; + } + + } elsif ($symbol_version eq '()') { + $symbol_version = '(Base)'; + } + } + + # happens once or twice for regular binaries + next + unless length $symbol_name; + + # look up numbered section + my $section_name = $section_name_by_number{$section_number} + // $section_number; + + my $symbol = Lintian::Elf::Symbol->new; + $symbol->section($section_name); + $symbol->version($symbol_version); + $symbol->name($symbol_name); + + push(@{ $by_object{SYMBOLS} }, $symbol); + } + + if (length $object_name) { + + # object file in a static lib. + $file->elf_by_member($object_name, \%by_object); + + } else { + $file->elf(\%by_object); + } + + return; +} + +=item elf_header + +=cut + +sub elf_header { + my ($text, $by_object) = @_; + + my @lines = split(m{\n}, $text); + + for my $line (@lines) { + + next + if divert_error('ELF header', $line, $by_object); + + my ($field, $value) = split(/:/, $line, 2); + + # trim both ends + $field =~ s/^\s+|\s+$//g; + $value =~ s/^\s+|\s+$//g; + + next + unless length $field && length $value; + + $by_object->{'ELF-HEADER'}{$field} = $value; + } + + return; +} + +=item program_headers + +=cut + +sub program_headers { + my ($text, $by_object) = @_; + + my @lines = split(m{\n}, $text); + + while (defined(my $line = shift @lines)) { + + next + if divert_error('program headers', $line, $by_object); + + if ($line =~ m{^ \s* (\S+) \s* (?:(?:\S+\s+){4}) \S+ \s (...) }x) { + + my $header = $1; + my $flags = $2; + + $header =~ s/^GNU_//g; + + next + if $header eq 'Type'; + + my $newflags = $EMPTY; + $newflags .= ($flags =~ /R/) ? 'r' : $HYPHEN; + $newflags .= ($flags =~ /W/) ? 'w' : $HYPHEN; + $newflags .= ($flags =~ /E/) ? 'x' : $HYPHEN; + + $by_object->{PH}{$header}{flags} = $newflags; + + if ($header eq 'INTERP' && @lines) { + # Check if the next line is the "requesting an interpreter" + # (readelf appears to always emit on the next line if at all) + my $next_line = $lines[0]; + + if ($next_line + =~ m{ [[] Requesting \s program \s interpreter: \s ([^\]]+) []] }x + ){ + + my $interpreter = $1; + + $by_object->{INTERP} = $interpreter; + + # discard line + shift @lines; + } + } + } + } + + return; +} + +=item dynamic_section + +=cut + +sub dynamic_section { + my ($text, $by_object) = @_; + + my @lines = split(m{\n}, $text); + + while (defined(my $line = shift @lines)) { + + next + if divert_error('dynamic section', $line, $by_object); + + if ($line + =~ m{^ \s* 0x (?:[0-9A-F]+) \s+ [(] (.*?) [)] \s+ ([\x21-\x7f][\x20-\x7f]*) \Z}ix + ) { + + my $type = $1; + my $remainder = $2; + + my $keep = 0; + + if ($type eq 'RPATH' || $type eq 'RUNPATH') { + $remainder =~ s{^ .* [[] }{}x; + $remainder =~ s{ []] \s* $}{}x; + $keep = 1; + + } elsif ($type eq 'TEXTREL' || $type eq 'DEBUG') { + $keep = 1; + + } elsif ($type eq 'FLAGS_1') { + # Will contain "NOW" if the binary was built with -Wl,-z,now + $remainder =~ s/^Flags:\s*//i; + $keep = 1; + + } elsif (($type eq 'FLAGS' && $remainder =~ m/\bBIND_NOW\b/) + || $type eq 'BIND_NOW') { + + # Variants of bindnow + $type = 'FLAGS_1'; + $remainder = 'NOW'; + $keep = 1; + } + + $keep = 1 + if $remainder + =~ s{^ (?: Shared \s library | Library \s soname ) : \s [[] (.*) []] }{$1}x; + + next + unless $keep; + + # Here we just need RPATH and NEEDS, so ignore the rest for now + if ($type eq 'RPATH' || $type eq 'RUNPATH') { + + # RPATH is like PATH + my @components = split(/:/, $remainder); + $by_object->{$type}{$_} = 1 for @components; + + } elsif ($type eq 'NEEDED' || $type eq 'SONAME') { + push(@{ $by_object->{$type} }, $remainder); + + } elsif ($type eq 'TEXTREL' || $type eq 'DEBUG') { + $by_object->{$type} = 1; + + } elsif ($type eq 'FLAGS_1') { + + my @flags = split(/\s+/, $remainder); + $by_object->{$type}{$_} = 1 for @flags; + } + } + } + + return; +} + +=item section_headers + +=cut + +sub section_headers { + my ($text, $by_object) = @_; + + const my $TOTAL_FIELDS => 11; + + my @lines = split(m{\n}, $text); + + die 'No column labels.' + unless @lines; + + my $first = shift @lines; + + my %labels_by_column; + + my $column = 1; + for my $label (split($SPACE, $first)) { + + $label =~ s{^ [[] }{}x; + $label =~ s{ []] $}{}x; + + $labels_by_column{$column} = $label; + + } continue { + ++$column; + } + + die 'Not enough column labels.' + if keys %labels_by_column != $TOTAL_FIELDS; + + my $row = 1; + while (defined(my $line = shift @lines)) { + + next + if divert_error('section headers', $line, $by_object); + + last + if $line =~ /^Key to Flags:/; + + my %section_header; + + my @matches = ( + $line =~ m{^ \s* + [[] \s* (\S+) []] \s # Nr + (\S+)? \s+ # Name + (\S+) \s+ # Type + ([0-9a-f]+) \s # Address/Addr + ([0-9a-f]+) \s # Off + ([0-9a-f]+) \s # Size + (\S+) \s+ # ES + (\S+)? \s+ # Flg + (\S+) \s+ # Lk + (\S+) \s+ # Inf + (\S+) # Al + $}x + ); + + if (@matches != $TOTAL_FIELDS) { + + warn "Parse error in readelf section headers [row $row]: $line"; + next; + } + + for my $column (keys %labels_by_column) { + + my $label = $labels_by_column{$column}; + my $value = $matches[$column -1] // $EMPTY; + + $section_header{$label} = $value; + } + + # http://sco.com/developers/gabi/latest/ch4.sheader.html + my $section = Lintian::Elf::Section->new; + $section->number($section_header{Nr}); + $section->name($section_header{Name}); + $section->type($section_header{Type}); + + # readelf uses both + $section->address( + hex($section_header{Address} // $section_header{Addr})); + $section->offset(hex($section_header{Off})); + $section->size(hex($section_header{Size})); + $section->entry_size(hex($section_header{ES})); + $section->flags($section_header{Flg}); + $section->index_link(hex($section_header{Lk})); + $section->index_info(hex($section_header{Inf})); + $section->alignment(hex($section_header{Al})); + + die 'No section number.' + unless length $section->number; + + $by_object->{'SECTION-HEADERS'}{$section->number} = $section; + + } continue { + ++$row; + } + + return; +} + +=item symbol_table + +=cut + +sub symbol_table { + my ($text, $by_object) = @_; + + # We (sometimes) need to read the "Version symbols section" first to + # use this data and readelf tends to print after this section, so + # save for later. + + my @lines = split(m{\n}, $text); + + while (defined(my $line = shift @lines)) { + + next + if divert_error('symbol table', $line, $by_object); + + if ($line + =~ m{^ \s* (\d+) : \s* [0-9a-f]+ \s+ \d+ \s+ (?:(?:\S+\s+){3}) (?: [[] .* []] \s+)? (\S+) \s+ (.*) \Z}x + ) { + + my $symbol_number = $1; + my $section_number = $2; + my $symbol_name = $3; + + $by_object->{'DYNAMIC-SYMBOLS'}{$symbol_number}{section_number} + = $section_number; + $by_object->{'DYNAMIC-SYMBOLS'}{$symbol_number}{symbol_name} + = $symbol_name; + } + } + + return; +} + +=item version_symbols + +=cut + +sub version_symbols { + my ($text, $by_object) = @_; + + my @lines = split(m{\n}, $text); + + while (defined(my $line = shift @lines)) { + + next + if divert_error('version symbols', $line, $by_object); + + if ($line + =~ m{^ \s* [0-9a-f]+ : \s* \S+ \s* (?: [(] \S+ [)] )? (?: \s | \Z ) }xi + ){ + + while ($line + =~ m{ ([0-9a-f]+ h?) \s* (?: [(] (\S+) [)] )? (?: \s | \Z ) }cgix + ) { + + my $symbol_number = $1; + my $symbol_version = $2; + + # for libfuse2_2.9.9-3_amd64.deb + next + unless length $symbol_version; + + $symbol_version = "($symbol_version)" + if $symbol_number =~ m{ h $}x; + + $by_object->{'SYMBOL-VERSIONS'}{$symbol_number} + = $symbol_version; + } + } + } + + return; +} + +=item divert_error + +=cut + +sub divert_error { + my ($section, $line, $by_object) = @_; + + return 0 + unless $line =~ s{^ readelf: \s+ }{}x; + + if ($line =~ s{^ Error: \s+ }{}x) { + + my $message = "In $section: $line"; + + $by_object->{ERRORS} //= []; + push(@{$by_object->{ERRORS}}, $message); + + return 1; + } + + if ($line =~ s{^ Warning: \s+ }{}x) { + + my $message = "In $section: $line"; + + $by_object->{WARNINGS} //= []; + push(@{$by_object->{WARNINGS}}, $message); + + return 1; + } + + return 0; +} + +=back + +=head1 AUTHOR + +Originally written by Felix Lechner <felix.lechner@lease-up.com> for +Lintian. + +=head1 SEE ALSO + +lintian(1) + +=cut + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Index/FileTypes.pm b/lib/Lintian/Index/FileTypes.pm new file mode 100644 index 0000000..ef2e4fd --- /dev/null +++ b/lib/Lintian/Index/FileTypes.pm @@ -0,0 +1,195 @@ +# -*- perl -*- Lintian::Index::FileTypes +# +# Copyright (C) 2020-2021 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by the Free +# Software Foundation; either version 2 of the License, or (at your option) +# any later version. +# +# This program is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +# more details. +# +# You should have received a copy of the GNU General Public License along with +# this program. If not, see <http://www.gnu.org/licenses/>. + +package Lintian::Index::FileTypes; + +use v5.20; +use warnings; +use utf8; + +use Const::Fast; +use Cwd; +use Unicode::UTF8 qw(encode_utf8 decode_utf8); + +use Lintian::IPC::Run3 qw(xargs); + +use Moo::Role; +use namespace::clean; + +const my $EMPTY => q{}; +const my $SPACE => q{ }; +const my $COMMA => q{,}; +const my $NEWLINE => qq{\n}; + +const my $KEEP_EMPTY_FIELDS => -1; +const my $GZIP_MAGIC_SIZE => 9; +const my $GZIP_MAGIC_BYTES => 0x1f8b; + +=head1 NAME + +Lintian::Index::FileTypes - determine file type via magic. + +=head1 SYNOPSIS + + use Lintian::Index; + +=head1 DESCRIPTION + +Lintian::Index::FileTypes determine file type via magic. + +=head1 INSTANCE METHODS + +=over 4 + +=item add_file_types + +=cut + +sub add_file_types { + my ($self) = @_; + + my $savedir = getcwd; + chdir $self->basedir + or die encode_utf8( + $self->identifier . ': Cannot change to directory ' . $self->basedir); + + my $errors = $EMPTY; + + my @files = grep { $_->is_file } @{$self->sorted_list}; + my @names = map { $_->name } @files; + + my @command = qw(file --no-pad --print0 --print0 --); + + my %file_types; + + xargs( + \@command, + \@names, + sub { + my ($stdout, $stderr, $status, @partial) = @_; + + # ignore failures if possible; file returns non-zero and + # "ERROR" on parse errors but output is still usable + + # undecoded split allows names with non UTF-8 bytes + $stdout =~ s{ \0 $}{}x; + + my @lines = split(m{\0}, $stdout, $KEEP_EMPTY_FIELDS); + + unless (@lines % 2 == 0) { + $errors + .= 'Did not get an even number lines from file command.' + . $NEWLINE; + return; + } + + while (defined(my $path = shift @lines)) { + + my $type = shift @lines; + + unless (length $path && length $type) { + $errors + .= "syntax error in file-info output: '$path' '$type'" + . $NEWLINE; + next; + } + + # drop relative prefix, if present + $path =~ s{^ [.]/ }{}x; + + $file_types{$path} = $self->adjust_type($path, $type); + } + + return; + } + ); + + $_->file_type($file_types{$_->name}) for @files; + + chdir $savedir + or die encode_utf8( + $self->identifier . ": Cannot change to directory $savedir"); + + return $errors; +} + +=item adjust_type + +=cut + +# some files need to be corrected +sub adjust_type { + my ($self, $name, $file_type) = @_; + + if ($name =~ m{ [.]gz $}ix && $file_type !~ /compressed/) { + + my $item = $self->lookup($name); + + die encode_utf8("Cannot find file $name in index") + unless $item; + + my $buffer = $item->magic($GZIP_MAGIC_SIZE); + if (length $buffer) { + + # translation of the unpack + # nn nn , NN NN NN NN, nn nn, cc - bytes read + # $magic, __ __ __ __, __ __, $comp - variables + my ($magic, undef, undef, $compression) = unpack('nNnc', $buffer); + + # gzip file magic + if ($magic == $GZIP_MAGIC_BYTES) { + + my $augment = 'gzip compressed data'; + + # 2 for max compression; RFC1952 suggests this is a + # flag and not a value, hence bit operation + $augment .= $COMMA . $SPACE . 'max compression' + if $compression & 2; + + return $file_type . $COMMA . $SPACE . $augment; + } + } + } + + # some TFMs are categorized as gzip, see Bug#963589 + return 'data' + if $name =~ m{ [.]tfm $}ix + && $file_type =~ /gzip compressed data/; + + return $file_type; +} + +=back + +=head1 AUTHOR + +Originally written by Felix Lechner <felix.lechner@lease-up.com> for +Lintian. + +=head1 SEE ALSO + +lintian(1) + +=cut + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Index/Item.pm b/lib/Lintian/Index/Item.pm new file mode 100644 index 0000000..7ef6c09 --- /dev/null +++ b/lib/Lintian/Index/Item.pm @@ -0,0 +1,1567 @@ +# -*- perl -*- +# Lintian::Index::Item -- Representation of path entry in a package +# +# Copyright (C) 2011 Niels Thykier +# Copyright (C) 2020 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by the Free +# Software Foundation; either version 2 of the License, or (at your option) +# any later version. +# +# This program is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +# more details. +# +# You should have received a copy of the GNU General Public License along with +# this program. If not, see <http://www.gnu.org/licenses/>. + +package Lintian::Index::Item; + +use v5.20; +use warnings; +use utf8; +use autodie qw(open); + +use Carp qw(croak confess); +use Const::Fast; +use Date::Parse qw(str2time); +use List::SomeUtils qw(all); +use Path::Tiny; +use Syntax::Keyword::Try; +use Text::Balanced qw(extract_delimited); +use Unicode::UTF8 qw(valid_utf8 decode_utf8 encode_utf8); + +use Lintian::Pointer::Item; +use Lintian::SlidingWindow; +use Lintian::Util qw(normalize_link_target); + +use Moo; +use namespace::clean; + +use constant { + TYPE_FILE => 0x00_01_00_00, + TYPE_HARDLINK => 0x00_02_00_00, + TYPE_DIR => 0x00_04_00_00, + TYPE_SYMLINK => 0x00_08_00_00, + TYPE_BLOCK_DEV => 0x00_10_00_00, + TYPE_CHAR_DEV => 0x00_20_00_00, + TYPE_PIPE => 0x00_40_00_00, + TYPE_OTHER => 0x00_80_00_00, + TYPE_MASK => 0x00_ff_00_00, + + UNSAFE_PATH => 0x01_00_00_00, + FS_PATH_IS_OK => 0x02_00_00_00, + OPEN_IS_OK => 0x06_00_00_00, # Implies FS_PATH_IS_OK + ACCESS_INFO => 0x07_00_00_00, + # 0o6777 == 0xdff, which covers set[ug]id + sticky bit. Accordingly, + # 0xffff should be more than sufficient for the foreseeable future. + OPERM_MASK => 0x00_00_ff_ff, +}; + +use overload ( + q{""} => \&_as_string, + 'qr' => \&_as_regex_ref, + 'bool' => \&_bool, + q{!} => \&_bool_not, + q{.} => \&_str_concat, + 'cmp' => \&_str_cmp, + 'eq' => \&_str_eq, + 'ne' => \&_str_ne, + 'fallback' => 0, +); + +const my $EMPTY => q{}; +const my $SPACE => q{ }; +const my $SLASH => q{/}; +const my $DOT => q{.}; +const my $DOUBLE_DOT => q{..}; +const my $DOUBLE_QUOTE => q{"}; +const my $BACKSLASH => q{\\}; +const my $HASHBANG => q{#!}; + +const my $MAXIMUM_LINK_DEPTH => 18; + +const my $BYTE_MAXIMUM => 255; +const my $SINGLE_OCTAL_MASK => oct(7); +const my $DUAL_OCTAL_MASK => oct(77); + +const my $ELF_MAGIC_SIZE => 4; +const my $LINCITY_MAGIC_SIZE => 6; +const my $SHELL_SCRIPT_MAGIC_SIZE => 2; + +const my $READ_BITS => oct(444); +const my $WRITE_BITS => oct(222); +const my $EXECUTABLE_BITS => oct(111); + +const my $SETUID => oct(4000); +const my $SETGID => oct(2000); + +=head1 NAME + +Lintian::Index::Item - Lintian representation of a path entry in a package + +=head1 SYNOPSIS + + my ($name, $type, $dir) = ('lintian', 'source', '/path/to/entry'); + +=head1 INSTANCE METHODS + +=over 4 + +=item init_from_tar_output + +=item get_quoted_filename + +=item unescape_c_style + +=cut + +my $datepattern = qr/\d{4}-\d{2}-\d{2}/; +my $timepattern = qr/\d{2}\:\d{2}(?:\:\d{2}(?:\.\d+)?)?/; +my $symlinkpattern = qr/\s+->\s+/; +my $hardlinkpattern = qr/\s+link\s+to\s+/; + +# adapted from https://www.perlmonks.org/?node_id=1056606 +my %T = ( + (map {chr() => chr} 0..$BYTE_MAXIMUM), + (map {sprintf('%o',$_) => chr} 0..($BYTE_MAXIMUM & $SINGLE_OCTAL_MASK)), + (map {sprintf('%02o',$_) => chr} 0..($BYTE_MAXIMUM & $DUAL_OCTAL_MASK)), + (map {sprintf('%03o',$_) => chr} 0..$BYTE_MAXIMUM), + (split //, "r\rn\nb\ba\af\ft\tv\013") +); + +sub unescape_c_style { + my ($escaped) = @_; + + (my $result = $escaped) =~ s/\\([0-7]{1,3}|.)/$T{$1}/g; + + return $result; +} + +sub get_quoted_filename { + my ($unknown, $skip) = @_; + + # extract quoted file name + my ($delimited, $extra) + = extract_delimited($unknown, $DOUBLE_QUOTE, $skip, $BACKSLASH); + + return (undef, undef) + unless defined $delimited; + + # drop quotes + my $cstylename = substr($delimited, 1, (length $delimited) - 2); + + # convert c-style escapes + my $name = unescape_c_style($cstylename); + + return ($name, $extra); +} + +sub init_from_tar_output { + my ($self, $line) = @_; + + chomp $line; + + # allow spaces in ownership and filenames (#895175 and #950589) + + my ($initial, $size, $date, $time, $remainder) + = split(/\s+(\d+)\s+($datepattern)\s+($timepattern)\s+/, $line,2); + + die encode_utf8( + $self->index->identifier . ": Cannot parse tar output: $line") + unless all { defined } ($initial, $size, $date, $time, $remainder); + + $self->size($size); + $self->date($date); + $self->time($time); + + my ($permissions, $ownership) = split(/\s+/, $initial, 2); + die encode_utf8($self->index->identifier + .": Cannot parse permissions and ownership in tar output: $line") + unless all { defined } ($permissions, $ownership); + + $self->perm($permissions); + + my ($owner, $group) = split(qr{/}, $ownership, 2); + die encode_utf8($self->index->identifier + . ": Cannot parse owner and group in tar output: $line") + unless all { defined } ($owner, $group); + + $self->owner($owner); + $self->group($group); + + my ($name, $extra) = get_quoted_filename($remainder, $EMPTY); + die encode_utf8($self->index->identifier + . ": Cannot parse file name in tar output: $line") + unless all { defined } ($name, $extra); + + # strip relative prefix + $name =~ s{^\./+}{}s; + + # slashes cannot appear in names but are sometimes doubled + # as in emboss-explorer_2.2.0-10.dsc + # better implemented in a Moo trigger on the attribute + $name =~ s{/+}{/}g; + + # make sure directories end with a slash, except root + $name .= $SLASH + if length $name + && $self->perm =~ / ^d /msx + && $name !~ m{ /$ }msx; + + $self->name($name); + + # look for symbolic link target + if ($self->perm =~ /^l/) { + + my ($linktarget, undef) = get_quoted_filename($extra, $symlinkpattern); + die encode_utf8($self->index->identifier + .": Cannot parse symbolic link target in tar output: $line") + unless defined $linktarget; + + # do not remove multiple slashes from symlink targets + # caught by symlink-has-double-slash, which is tested + # leaves resolution of these links unsolved + + # do not strip relative prefix for symbolic links + $self->link($linktarget); + } + + # look for hard link target + if ($self->perm =~ /^h/) { + + my ($linktarget, undef)= get_quoted_filename($extra, $hardlinkpattern); + die encode_utf8($self->index->identifier + . ": Cannot parse hard link target in tar output: $line") + unless defined $linktarget; + + # strip relative prefix + $linktarget =~ s{^\./+}{}s; + + # slashes cannot appear in names but are sometimes doubled + # as in emboss-explorer_2.2.0-10.dsc + # better implemented in a Moo trigger on the attribute, but requires + # separate attributes for hard and symbolic link targets + $linktarget =~ s{/+}{/}g; + + $self->link($linktarget); + } + + return; +} + +=item bytes_match(REGEX) + +Returns the matched string if REGEX matches the file's byte contents, +or $EMPTY otherwise. + +=cut + +sub bytes_match { + my ($self, $regex) = @_; + + return $EMPTY + unless $self->is_file; + + return $EMPTY + unless $self->is_open_ok; + + return $EMPTY + unless length $regex; + + open(my $fd, '<:raw', $self->unpacked_path); + my $sfd = Lintian::SlidingWindow->new; + $sfd->handle($fd); + + my $match; + while (my $block = $sfd->readwindow) { + + if ($block =~ /($regex)/) { + + $match = $1; + last; + } + } + + close $fd; + + return $match // $EMPTY; +} + +=item mentions_in_operation(REGEX) + +Returns the matched string if REGEX matches in a file location +that is likely an operation (vs text), or $EMPTY otherwise. + +=cut + +sub mentions_in_operation { + my ($self, $regex) = @_; + + # prefer strings(1) output (eg. for ELF) if we have it + # may not work as expected on ELF due to ld's SHF_MERGE + my $match; + if (length $self->strings && $self->strings =~ /($regex)/) { + $match = $1; + + } elsif ($self->is_script) { + $match = $self->bytes_match($regex); + } + + return $match // $EMPTY; +} + +=item magic(COUNT) + +Returns the specified COUNT of magic bytes for the file. + +=cut + +sub magic { + my ($self, $count) = @_; + + return $EMPTY + if length $self->link; + + return $EMPTY + if $self->size < $count; + + return $EMPTY + unless $self->is_open_ok; + + my $magic; + + open(my $fd, '<', $self->unpacked_path); + die encode_utf8($self->index->identifier + . ": Could not read $count bytes from " + . $self->name) + unless read($fd, $magic, $count) == $count; + close $fd; + + return $magic; +} + +=item C<hashbang> + +Returns the C<hashbang> for the file if it is a script. + +=cut + +has hashbang => ( + is => 'rw', + lazy => 1, + default => sub { + my ($self) = @_; + + return $EMPTY + unless $self->is_script; + + my $trimmed_bytes = $EMPTY; + my $magic; + + open(my $fd, '<', $self->unpacked_path); + if (read($fd, $magic, 2) && $magic eq $HASHBANG && !eof($fd)) { + $trimmed_bytes = <$fd>; + } + close $fd; + + # decoding UTF-8 fails on magyarispell_1.6.1-2.dsc and ldc_1.24.0-1.dsc + + # remove comment, if any + $trimmed_bytes =~ s/^([^#]*)/$1/; + + # trim both ends + $trimmed_bytes =~ s/^\s+|\s+$//g; + + return $trimmed_bytes; + } +); + +=item interpreter_with_options + +Returns the interpreter requested by a script with options +after stripping C<env>. + +=cut + +has interpreter_with_options => ( + is => 'rw', + lazy => 1, + default => sub { + my ($self) = @_; + + my $with_options = $self->hashbang; + + $with_options =~ s{^/usr/bin/env\s+}{}; + + return $with_options; + } +); + +=item interpreter + +Returns the interpreter requested by a script but strips C<env>. + +=cut + +has interpreter => ( + is => 'rw', + lazy => 1, + default => sub { + my ($self) = @_; + + my $interpreter = $self->interpreter_with_options; + + # keep base command without options + $interpreter =~ s/^(\S+).*/$1/; + + return $interpreter; + } +); + +=item C<calls_env> + +Returns true if file is a script that calls C<env>. + +=cut + +has calls_env => ( + is => 'rw', + lazy => 1, + default => sub { + my ($self) = @_; + + # must return a boolean success value #943724 + return 1 + if $self->hashbang =~ m{^/usr/bin/env\s+}; + + return 0; + } +); + +=item C<is_shell_script> + +Returns true if file is a script requesting a recognized shell +interpreter. + +=cut + +has is_shell_script => ( + is => 'rw', + lazy => 1, + default => sub { + my ($self) = @_; + + my $interpreter = $self->interpreter; + + # keep basename + my ($basename) = ($interpreter =~ m{([^/]*)/?$}s); + + return 1 + if $basename =~ /^(?:[bd]?a|t?c|(?:pd|m)?k|z)?sh$/; + + return 0; + } +); + +=item is_elf + +Returns true if file is an ELF executable, and false otherwise. + +=cut + +has is_elf => ( + is => 'rw', + lazy => 1, + default => sub { + my ($self) = @_; + + return 1 + if $self->magic($ELF_MAGIC_SIZE) eq "\x7FELF"; + + return 0; + } +); + +=item is_script + +Returns true if file is a script and false otherwise. + +=cut + +has is_script => ( + is => 'rw', + lazy => 1, + default => sub { + my ($self) = @_; + + # skip lincity data files; magic: #!#!#! + return 0 + if $self->magic($LINCITY_MAGIC_SIZE) eq '#!#!#!'; + + return 0 + unless $self->magic($SHELL_SCRIPT_MAGIC_SIZE) eq $HASHBANG; + + return 1; + } +); + +=item is_maintainer_script + +Returns true if file is a maintainer script and false otherwise. + +=cut + +has is_maintainer_script => ( + is => 'rw', + lazy => 1, + default => sub { + my ($self) = @_; + + return 1 + if $self->name =~ /^ config | (?:pre|post)(?:inst|rm) $/x + && $self->is_open_ok; + + return 0; + } +); + +=item identity + +Returns the owner and group of the path, separated by a slash. + +NB: If only numerical owner information is available in the package, +this may return a numerical owner (except uid 0 is always mapped to +"root") + +=cut + +sub identity { + my ($self) = @_; + + return $self->owner . $SLASH . $self->group; +} + +=item operm + +Returns the file permissions of this object in octal (e.g. 0644). + +NB: This is only well defined for file entries that are subject to +permissions (e.g. files). Particularly, the value is not well defined +for symlinks. + +=cut + +sub operm { + my ($self) = @_; + + return $self->path_info & OPERM_MASK; +} + +=item octal_permissions + +=cut + +sub octal_permissions { + my ($self) = @_; + + return sprintf('%04o', $self->operm); +} + +=item children + +Returns a list of children (as Lintian::File::Path objects) of this entry. +The list and its contents should not be modified. + +Only returns direct children of this directory. The entries are sorted by name. + +NB: Returns the empty list for non-dir entries. + +=cut + +sub children { + my ($self) = @_; + + croak encode_utf8('No index in ' . $self->name) + unless defined $self->index; + + my @names = values %{$self->childnames}; + + return map { $self->index->lookup($_) } @names; +} + +=item descendants + +Returns a list of children (as Lintian::File::Path objects) of this entry. +The list and its contents should not be modified. + +Descends recursively into subdirectories and return the descendants in +breadth-first order. Children of a given directory will be sorted by +name. + +NB: Returns the empty list for non-dir entries. + +=cut + +sub descendants { + my ($self) = @_; + + my @descendants = $self->children; + + my @directories = grep { $_->is_dir } @descendants; + push(@descendants, $_->descendants) for @directories; + + return @descendants; +} + +=item timestamp + +Returns a Unix timestamp for the given path. This is a number of +seconds since the start of Unix epoch in UTC. + +=cut + +sub timestamp { + my ($self) = @_; + + my $timestamp = $self->date . $SPACE . $self->time; + + return str2time($timestamp, 'GMT'); +} + +=item child(BASENAME) + +Returns the child named BASENAME if it is a child of this directory. +Otherwise, this method returns C<undef>. + +Even for directories, BASENAME should not end with a slash. + +When invoked on non-dirs, this method always returns C<undef>. + +Example: + + $dir_entry->child('foo') => $entry OR undef + +=cut + +sub child { + my ($self, $basename) = @_; + + croak encode_utf8('No index in ' . $self->name) + unless defined $self->index; + + croak encode_utf8($self->index->identifier . ': Basename is required') + unless length $basename; + + my $childname = $self->childnames->{$basename}; + return undef + unless $childname; + + return $self->index->lookup($childname); +} + +=item is_symlink + +Returns a truth value if this entry is a symlink. + +=item is_hardlink + +Returns a truth value if this entry is a hardlink to a regular file. + +NB: The target of a hardlink is always a regular file (and not a dir etc.). + +=item is_dir + +Returns a truth value if this entry is a dir. + +NB: Unlike the "-d $dir" operator this will never return true for +symlinks, even if the symlink points to a dir. + +=item is_file + +Returns a truth value if this entry is a regular file (or a hardlink to one). + +NB: Unlike the "-f $file" operator this will never return true for +symlinks, even if the symlink points to a file (or hardlink). + +=item is_regular_file + +Returns a truth value if this entry is a regular file. + +This is eqv. to $path->is_file and not $path->is_hardlink. + +NB: Unlike the "-f $file" operator this will never return true for +symlinks, even if the symlink points to a file. + +=cut + +sub is_symlink { + my ($self) = @_; + + return $self->path_info & TYPE_SYMLINK ? 1 : 0; +} + +sub is_hardlink { + my ($self) = @_; + + return $self->path_info & TYPE_HARDLINK ? 1 : 0; +} + +sub is_dir { + my ($self) = @_; + + return $self->path_info & TYPE_DIR ? 1 : 0; +} + +sub is_file { + my ($self) = @_; + + return $self->path_info & (TYPE_FILE | TYPE_HARDLINK) ? 1 : 0; +} + +sub is_regular_file { + my ($self) = @_; + + return $self->path_info & TYPE_FILE ? 1 : 0; +} + +=item link_normalized + +Returns the target of the link normalized against it's directory name. +If the link cannot be normalized or normalized path might escape the +package root, this method returns C<undef>. + +NB: This method will return the empty string for links pointing to the +root dir of the package. + +Only available on "links" (i.e. symlinks or hardlinks). On non-links +this will croak. + +I<Symlinks only>: If you want the symlink target as a L<Lintian::File::Path> +object, use the L<resolve_path|/resolve_path([PATH])> method with no +arguments instead. + +=cut + +has link_normalized => ( + is => 'rw', + lazy => 1, + default => sub { + my ($self) = @_; + + my $name = $self->name; + my $link = $self->link; + + croak encode_utf8($self->index->identifier . ": $name is not a link") + unless length $link; + + my $dir = $self->dirname; + + # hardlinks are always relative to the package root + $dir = $SLASH + if $self->is_hardlink; + + my $target = normalize_link_target($dir, $link); + + return $target; + } +); + +=item is_readable + +Returns a truth value if the permission bits of this entry have +at least one bit denoting readability set (bitmask 0444). + +=item is_writable + +Returns a truth value if the permission bits of this entry have +at least one bit denoting writability set (bitmask 0222). + +=item is_executable + +Returns a truth value if the permission bits of this entry have +at least one bit denoting executability set (bitmask 0111). + +=cut + +sub is_readable { + my ($self) = @_; + + return $self->path_info & $READ_BITS; +} + +sub is_writable { + my ($self) = @_; + + return $self->path_info & $WRITE_BITS; +} + +sub is_executable { + my ($self) = @_; + + return $self->path_info & $EXECUTABLE_BITS; +} + +=item all_bits_set + +=cut + +sub all_bits_set { + my ($self, $bits) = @_; + + return ($self->operm & $bits) == $bits; +} + +=item is_setuid + +=cut + +sub is_setuid { + my ($self) = @_; + + return $self->operm & $SETUID; +} + +=item is_setgid + +=cut + +sub is_setgid { + my ($self) = @_; + + return $self->operm & $SETGID; +} + +=item unpacked_path + +Returns the path to this object on the file system, which must be a +regular file, a hardlink or a directory. + +This method may fail if: + +=over 4 + +=item * The object is neither a directory or a file-like object (e.g. a +named pipe). + +=item * If the object is dangling symlink or the path traverses a symlink +outside the package root. + +=back + +To test if this is safe to call, if the target is (supposed) to be a: + +=over 4 + +=item * file or hardlink then test with L</is_open_ok>. + +=item * dir then assert L<resolve_path|/resolve_path([PATH])> returns a +defined entry, for which L</is_dir> returns a truth value. + +=back + +=cut + +sub unpacked_path { + my ($self) = @_; + + $self->_check_access; + + croak encode_utf8('No index in ' . $self->name) + unless defined $self->index; + + my $basedir = $self->index->basedir; + + croak encode_utf8($self->index->identifier . ': No base directory') + unless length $basedir; + + my $unpacked = path($basedir)->child($self->name)->stringify; + + # bug in perl, file operator should not care but does + # https://github.com/Perl/perl5/issues/10550 + # also, https://github.com/Perl/perl5/issues/9674 + utf8::downgrade $unpacked; + + return $unpacked; +} + +=item is_open_ok + +Returns a truth value if it is safe to attempt open a read handle to +the underlying file object. + +Returns a truth value if the path may be opened. + +=cut + +sub is_open_ok { + my ($self) = @_; + + my $path_info = $self->path_info; + + return 1 + if ($path_info & OPEN_IS_OK) == OPEN_IS_OK; + + return 0 + if $path_info & ACCESS_INFO; + + try { + $self->_check_open; + + } catch { + return 0; + + # perlcritic 1.140-1 requires the semicolon on the next line + }; + + return 1; +} + +sub _check_access { + my ($self) = @_; + + my $path_info = $self->path_info; + + return 1 + if ($path_info & FS_PATH_IS_OK) == FS_PATH_IS_OK; + + return 0 + if $path_info & ACCESS_INFO; + + my $resolvable = $self->resolve_path; + unless ($resolvable) { + $self->path_info($self->path_info | UNSAFE_PATH); + # NB: We are deliberately vague here to avoid suggesting + # whether $path exists. In some cases (e.g. lintian.d.o) + # the output is readily available to wider public. + confess encode_utf8($self->index->identifier + .': Attempt to access through broken or unsafe symlink: ' + . $self->name); + } + + $self->path_info($self->path_info | FS_PATH_IS_OK); + + return 1; +} + +sub _check_open { + my ($self) = @_; + + $self->_check_access; + + # Symlinks can point to a "non-file" object inside the + # package root + # Leave "_path_access" here as _check_access marks it either as + # "UNSAFE_PATH" or "FS_PATH_IS_OK" + + confess encode_utf8($self->index->identifier + .': Opening of irregular file not supported: ' + . $self->name) + unless $self->is_file || ($self->is_symlink && -e $self->unpacked_path); + + $self->path_info($self->path_info | OPEN_IS_OK); + + return 1; +} + +=item follow + +Return dereferenced link if applicable + +=cut + +sub follow { + my ($self, $maxlinks) = @_; + + return $self + unless length $self->link; + + return $self->dereferenced + if defined $self->dereferenced; + + # set limit + $maxlinks //= $MAXIMUM_LINK_DEPTH; + + # catch recursive links + return undef + if $maxlinks <= 0; + + # reduce counter + $maxlinks--; + + my $reference; + + croak encode_utf8('No index in ' . $self->name) + unless defined $self->index; + + if ($self->is_hardlink) { + # hard links are resolved against package root + $reference = $self->index->lookup; + + } else { + # otherwise resolve against the parent + $reference = $self->parent_dir; + } + + croak encode_utf8($self->index->identifier + . ': No parent reference for link in ' + . $self->name) + unless defined $reference; + + # follow link + my $dereferenced = $reference->resolve_path($self->link, $maxlinks); + $self->dereferenced($dereferenced); + + return $self->dereferenced; +} + +=item resolve_path([PATH]) + +Resolve PATH relative to this path entry. + +If PATH starts with a slash and the file hierarchy has a well-defined +root directory, then PATH will instead be resolved relatively to the +root dir. If the file hierarchy does not have a well-defined root dir +(e.g. for source packages), this method will return C<undef>. + +If PATH is omitted, then the entry is resolved and the target is +returned if it is valid. Except for symlinks, all entries always +resolve to themselves. NB: hardlinks also resolve as themselves. + +It is an error to attempt to resolve a PATH against a non-directory +and non-symlink entry - as such resolution would always fail +(i.e. foo/../bar is an invalid path unless foo is a directory or a +symlink to a dir). + + +The resolution takes symlinks into account and following them provided +that the target path is valid (and can be followed safely). If the +path is invalid or circular (symlinks), escapes the root directory or +follows an unsafe symlink, the method returns C<undef>. Otherwise, it +returns the path entry that denotes the target path. + + +If PATH contains at least one path segment and ends with a slash, then +the resolved path will end in a directory (or fail). Otherwise, the +resolved PATH can end in any entry I<except> a symlink. + +Examples: + + $symlink_entry->resolve_path => $nonsymlink_entry OR undef + + $x->resolve_path => $x + + For directory or symlink entries (dol), you can also resolve a path: + + $dol_entry->resolve_path('some/../where') => $nonsymlink_entry OR undef + + # Note the trailing slash + $dol_entry->resolve_path('some/../where/') => $dir_entry OR undef + +=cut + +sub resolve_path { + my ($self, $request, $maxlinks) = @_; + + croak encode_utf8('No index in ' . $self->name) + unless defined $self->index; + + croak encode_utf8( + $self->index->identifier . ': Can only resolve string arguments') + if defined $request && ref($request) ne $EMPTY; + + $request //= $EMPTY; + + if (length $self->link) { + # follow the link + my $dereferenced = $self->follow($maxlinks); + return undef + unless defined $dereferenced; + + # and use that to resolve the request + return $dereferenced->resolve_path($request, $maxlinks); + } + + my $reference; + + # check for absolute reference; remove slash + if ($request =~ s{^/+}{}s) { + + # require anchoring for absolute references + return undef + unless $self->index->anchored; + + # get root entry + $reference = $self->index->lookup; + + } elsif ($self->is_dir) { + # directories are their own starting point + $reference = $self; + + } else { + # otherwise, use parent directory + $reference = $self->parent_dir; + } + + return undef + unless defined $reference; + + # read first segment; strip all trailing slashes for recursive use + if ($request =~ s{^([^/]+)/*}{}) { + + my $segment = $1; + + # single dot, or two slashes in a row + return $reference->resolve_path($request, $maxlinks) + if $segment eq $DOT || !length $segment; + + # for double dot, go up a level + if ($segment eq $DOUBLE_DOT) { + my $parent = $reference->parent_dir; + return undef + unless defined $parent; + + return $parent->resolve_path($request, $maxlinks); + } + + # look for child otherwise + my $child = $reference->child($segment); + return undef + unless defined $child; + + return $child->resolve_path($request, $maxlinks); + } + + croak encode_utf8($self->index->identifier + . ": Cannot parse path resolution request: $request") + if length $request; + + # nothing else to resolve + return $self; +} + +=item name + +Returns the name of the file (relative to the package root). + +NB: It will never have any leading "./" (or "/") in it. + +=item basename + +Returns the "filename" part of the name, similar basename(1) or +File::Basename::basename (without passing a suffix to strip in either +case). + +NB: Returns the empty string for the "root" dir. + +=item dirname + +Returns the "directory" part of the name, similar to dirname(1) or +File::Basename::dirname. The dirname will end with a trailing slash +(except the "root" dir - see below). + +NB: Returns the empty string for the "root" dir. + +=item link + +If this is a link (i.e. is_symlink or is_hardlink returns a truth +value), this method returns the target of the link. + +If this is not a link, then this returns undef. + +If the path is a symlink this method can be used to determine if the +symlink is relative or absolute. This is I<not> true for hardlinks, +where the link target is always relative to the root. + +NB: Even for symlinks, a leading "./" will be stripped. + +=item normalized + +=item faux + +Returns a truth value if this entry absent in the package. This can +happen if a package does not include all intermediate directories. + +=item size + +Returns the size of the path in bytes. + +NB: Only regular files can have a non-zero file size. + +=item date + +Return the modification date as YYYY-MM-DD. + +=item time + +=item perm + +=item path_info + +=item owner + +Returns the owner of the path entry as a username. + +NB: If only numerical owner information is available in the package, +this may return a numerical owner (except uid 0 is always mapped to +"root") + +=item group + +Returns the group of the path entry as a username. + +NB: If only numerical owner information is available in the package, +this may return a numerical group (except gid 0 is always mapped to +"root") + +=item uid + +Returns the uid of the owner of the path entry. + +NB: If the uid is not available, 0 will be returned. +This usually happens if the numerical data is not collected (e.g. in +source packages) + +=item gid + +Returns the gid of the owner of the path entry. + +NB: If the gid is not available, 0 will be returned. +This usually happens if the numerical data is not collected (e.g. in +source packages) + +=item file_type + +Return the data from L<file(1)> if it has been collected. + +Note this is only defined for files as Lintian only runs L<file(1)> on +files. + +=item java_info + +=item strings + +=item C<basedir> + +=item index + +=item parent_dir + +=item child_table + +=item sorted_children + +Returns the parent directory entry of this entry as a +L<Lintian::File::Path>. + +NB: Returns C<undef> for the "root" dir. + +=item C<childnames> + +=item parent_dir + +Return the parent dir entry of this the path entry. + +=item dereferenced + +=cut + +has name => ( + is => 'rw', + lazy => 1, + coerce => sub { my ($string) = @_; return $string // $EMPTY;}, + trigger => sub { + my ($self, $name) = @_; + + my ($basename) = ($name =~ m{([^/]*)/?$}s); + $self->basename($basename); + + # allow newline in names; need /s for dot matching (#929729) + my ($dirname) = ($name =~ m{^(.+/)?(?:[^/]+/?)$}s); + $self->dirname($dirname); + }, + default => $EMPTY +); +has basename => ( + is => 'rw', + lazy => 1, + coerce => sub { my ($string) = @_; return $string // $EMPTY;}, + default => $EMPTY +); +has dirname => ( + is => 'rw', + lazy => 1, + coerce => sub { my ($string) = @_; return $string // $EMPTY;}, + default => $EMPTY +); + +has link => ( + is => 'rw', + coerce => sub { my ($string) = @_; return $string // $EMPTY;}, + default => $EMPTY +); +has normalized => ( + is => 'rw', + coerce => sub { my ($string) = @_; return $string // $EMPTY;}, + default => $EMPTY +); +has faux => (is => 'rw', default => 0); + +has size => (is => 'rw', default => 0); +has date => ( + is => 'rw', + default => sub { + my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = gmtime; + return sprintf('%04d-%02d-%02d', $year, $mon, $mday); + } +); +has time => ( + is => 'rw', + default => sub { + my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = gmtime; + return sprintf('%02d:%02d:%02d', $hour, $min, $sec); + } +); + +has perm => (is => 'rw'); +has path_info => (is => 'rw'); + +has owner => ( + is => 'rw', + coerce => sub { my ($string) = @_; return $string // 'root'; }, + default => 'root' +); +has group => ( + is => 'rw', + coerce => sub { my ($string) = @_; return $string // 'root'; }, + default => 'root' +); +has uid => ( + is => 'rw', + coerce => sub { my ($value) = @_; return int($value // 0); }, + default => 0 +); +has gid => ( + is => 'rw', + coerce => sub { my ($value) = @_; return int($value // 0); }, + default => 0 +); + +has md5sum => ( + is => 'rw', + coerce => sub { my ($checksum) = @_; return ($checksum // 0); }, + default => 0 +); +has file_type => ( + is => 'rw', + coerce => sub { my ($text) = @_; return ($text // $EMPTY); }, + default => $EMPTY +); +has java_info => ( + is => 'rw', + coerce => sub { my ($hashref) = @_; return ($hashref // {}); }, + default => sub { {} } +); +has strings => ( + is => 'rw', + coerce => sub { my ($text) = @_; return ($text // $EMPTY); }, + default => $EMPTY +); +has ar_info => ( + is => 'rw', + coerce => sub { my ($hashref) = @_; return ($hashref // {}); }, + default => sub { {} } +); + +has index => (is => 'rw'); +has childnames => (is => 'rw', default => sub { {} }); +has parent_dir => ( + is => 'rw', + lazy => 1, + default => sub { + my ($self) = @_; + + # do not return root as its own parent + return + if $self->name eq $EMPTY; + + croak encode_utf8('No index in ' . $self->name) + unless defined $self->index; + + # returns root by default + return $self->index->lookup($self->dirname); + } +); +has dereferenced => (is => 'rw'); + +=item elf + +=cut + +sub elf { + my ($self, @args) = @_; + + if (@args) { + + $self->index->elf_storage->{$self->name} = $args[0]; + + return (); + } + + my %copy = %{$self->index->elf_storage->{$self->name} // {} }; + + return \%copy; +} + +=item elf_by_member + +=cut + +sub elf_by_member { + my ($self, @args) = @_; + + if (@args) { + + my $object_name = $args[0]; + my $by_object = $args[1]; + + my $tmp = $self->index->elf_storage_by_member->{$self->name} // {}; + $tmp->{$object_name} = $by_object; + $self->index->elf_storage_by_member->{$self->name} = $tmp; + + return (); + } + + my %copy = %{$self->index->elf_storage_by_member->{$self->name} // {} }; + + return \%copy; +} + +=item pointer + +=cut + +sub pointer { + my ($self, $position) = @_; + + my $pointer = Lintian::Pointer::Item->new; + $pointer->item($self); + $pointer->position($position); + + return $pointer; +} + +=item bytes + +Returns verbatim file contents as a scalar. + +=item is_valid_utf8 + +Boolean true if file contents are valid UTF-8. + +=item decoded_utf8 + +Returns a decoded, wide-character string if file contents are valid UTF-8. + +=cut + +sub bytes { + my ($self) = @_; + + return $EMPTY + unless $self->is_open_ok; + + my $bytes = path($self->unpacked_path)->slurp; + + return $bytes; +} + +sub is_valid_utf8 { + my ($self) = @_; + + my $bytes = $self->bytes; + return 0 + unless defined $bytes; + + return valid_utf8($bytes); +} + +sub decoded_utf8 { + my ($self) = @_; + + return $EMPTY + unless $self->is_valid_utf8; + + return decode_utf8($self->bytes); +} + +### OVERLOADED OPERATORS ### + +# overload apparently does not like the mk_ro_accessor, so use a level +# of indirection + +sub _as_regex_ref { + my ($self) = @_; + my $name = $self->name; + return qr{ \Q$name\E }xsm; +} + +sub _as_string { + my ($self) = @_; + return $self->name; +} + +sub _bool { + # Always true (used in "if ($info->index('some/path')) {...}") + return 1; +} + +sub _bool_not { + my ($self) = @_; + return !$self->_bool; +} + +sub _str_cmp { + my ($self, $str, $swap) = @_; + return $str cmp $self->name if $swap; + return $self->name cmp $str; +} + +sub _str_concat { + my ($self, $str, $swap) = @_; + return $str . $self->name if $swap; + return $self->name . $str; +} + +sub _str_eq { + my ($self, $str) = @_; + return $self->name eq $str; +} + +sub _str_ne { + my ($self, $str) = @_; + return $self->name ne $str; +} + +=back + +=head1 AUTHOR + +Originally written by Niels Thykier <niels@thykier.net> for Lintian. + +=head1 SEE ALSO + +lintian(1) + +=cut + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et + diff --git a/lib/Lintian/Index/Java.pm b/lib/Lintian/Index/Java.pm new file mode 100644 index 0000000..4b33bec --- /dev/null +++ b/lib/Lintian/Index/Java.pm @@ -0,0 +1,258 @@ +# -*- perl -*- Lintian::Index::Java +# +# Copyright (C) 2020 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by the Free +# Software Foundation; either version 2 of the License, or (at your option) +# any later version. +# +# This program is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +# more details. +# +# You should have received a copy of the GNU General Public License along with +# this program. If not, see <http://www.gnu.org/licenses/>. + +package Lintian::Index::Java; + +use v5.20; +use warnings; +use utf8; + +use Archive::Zip qw( :ERROR_CODES :CONSTANTS ); +use Const::Fast; +use Cwd; +use Path::Tiny; +use Unicode::UTF8 qw(encode_utf8); + +use Moo::Role; +use namespace::clean; + +const my $EMPTY => q{}; +const my $NEWLINE => qq{\n}; +const my $SPACE => q{ }; +const my $DASH => q{-}; + +const my $JAVA_MAGIC_SIZE => 8; +const my $JAVA_MAGIC_BYTES => 0xCAFEBABE; + +=head1 NAME + +Lintian::Index::Java - java information. + +=head1 SYNOPSIS + + use Lintian::Index; + +=head1 DESCRIPTION + +Lintian::Index::Java java information. + +=head1 INSTANCE METHODS + +=over 4 + +=item add_java + +=cut + +sub add_java { + my ($self) = @_; + + my $savedir = getcwd; + chdir($self->basedir) + or die encode_utf8( + $self->identifier . ': Cannot change to directory ' . $self->basedir); + + my $errors = $EMPTY; + + my @files = grep { $_->is_file } @{$self->sorted_list}; + + # Wheezy's version of file calls "jar files" for "Zip archive". + # Newer versions seem to call them "Java Jar file". + # Jessie also introduced "Java archive data (JAR)"... + my @java_files = grep { + $_->file_type=~ m{ + Java [ ] (?:Jar [ ] file|archive [ ] data) + | Zip [ ] archive + | JAR }x; + } @files; + + my @lines; + for my $file (@java_files) { + + push(@lines, parse_jar($file->name)) + if $file->name =~ /\S+\.jar$/i; + } + + my $file; + my $file_list; + my $manifest = 0; + local $_ = undef; + + my %java_info; + + for my $line (@lines) { + chomp $line; + next if $line =~ /^\s*$/; + + if ($line =~ /^-- ERROR:\s*(\S.+)$/) { + $java_info{$file}{error} = $1; + + } elsif ($line =~ m{^-- MANIFEST: (?:\./)?(?:.+)$}) { + # TODO: check $file == $1 ? + $java_info{$file}{manifest} = {}; + $manifest = $java_info{$file}{manifest}; + $file_list = 0; + + } elsif ($line =~ m{^-- (?:\./)?(.+)$}) { + $file = $1; + $java_info{$file}{files} = {}; + $file_list = $java_info{$file}{files}; + $manifest = 0; + } else { + if ($manifest && $line =~ m{^ (\S+):\s(.*)$}) { + $manifest->{$1} = $2; + } elsif ($file_list) { + my ($fname, $clmajor) = ($line =~ m{^([^-].*):\s*([-\d]+)$}); + $file_list->{$fname} = $clmajor; + } + } + } + + $_->java_info($java_info{$_->name}) for @java_files; + + chdir($savedir) + or die encode_utf8( + $self->identifier . ": Cannot change to directory $savedir"); + + return $errors; +} + +=item parse_jar + +=cut + +sub parse_jar { + my ($path) = @_; + + my @lines; + + # This script needs unzip, there's no way around. + push(@lines, "-- $path"); + + # Without this Archive::Zip will emit errors to standard error for + # faulty zip files - but that is not what we want. AFAICT, it is + # the only way to get a textual error as well, so (ab)use it for + # this purpose while we are at it. + my $errorhandler = sub { + my ($err) = @_; + $err =~ s/\r?\n/ /g; + + # trim right + $err =~ s/\s+$//; + + push(@lines, "-- ERROR: $err"); + }; + my $oldhandler = Archive::Zip::setErrorHandler($errorhandler); + + my $azip = Archive::Zip->new; + if($azip->read($path) == AZ_OK) { + + # save manifest for the end + my $manifest; + + # file list comes first + foreach my $member ($azip->members) { + my $name = $member->fileName; + + next + if $member->isDirectory; + + # store for later processing + $manifest = $member + if $name =~ m{^META-INF/MANIFEST.MF$}i; + + # add version if we can find it + my $jversion; + if ($name =~ /\.class$/) { + # Collect the Major version of the class file. + my ($contents, $zerr) = $member->contents; + + # bug in Archive::Zip; seen in android-platform-libcore_10.0.0+r36-1.dsc + last + unless defined $zerr; + + last + unless $zerr == AZ_OK; + + # Ensure we can read at least 8 bytes for the unpack. + next + if length $contents < $JAVA_MAGIC_SIZE; + + # translation of the unpack + # NN NN NN NN, nn nn, nn nn - bytes read + # $magic , __ __, $major - variables + my ($magic, undef, $major) = unpack('Nnn', $contents); + $jversion = $major + if $magic == $JAVA_MAGIC_BYTES; + } + push(@lines, "$name: " . ($jversion // $DASH)); + } + + if ($manifest) { + push(@lines, "-- MANIFEST: $path"); + + my ($contents, $zerr) = $manifest->contents; + + # bug in Archive::Zip; seen in android-platform-libcore_10.0.0+r36-1.dsc + return () + unless defined $zerr; + + if ($zerr == AZ_OK) { + my $partial = $EMPTY; + my $first = 1; + my @list = split($NEWLINE, $contents); + foreach my $line (@list) { + + # remove DOS type line feeds + $line =~ s/\r//g; + + if ($line =~ /^(\S+:)\s*(.*)/) { + push(@lines, $SPACE . $SPACE . "$1 $2"); + } + if ($line =~ /^ (.*)/) { + push(@lines, $1); + } + } + } + } + } + + Archive::Zip::setErrorHandler($oldhandler); + + return @lines; +} + +=back + +=head1 AUTHOR + +Originally written by Felix Lechner <felix.lechner@lease-up.com> for +Lintian. + +=head1 SEE ALSO + +lintian(1) + +=cut + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Index/Md5sums.pm b/lib/Lintian/Index/Md5sums.pm new file mode 100644 index 0000000..c1d0583 --- /dev/null +++ b/lib/Lintian/Index/Md5sums.pm @@ -0,0 +1,127 @@ +# -*- perl -*- Lintian::Index::Md5sums +# +# Copyright (C) 2020 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by the Free +# Software Foundation; either version 2 of the License, or (at your option) +# any later version. +# +# This program is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +# more details. +# +# You should have received a copy of the GNU General Public License along with +# this program. If not, see <http://www.gnu.org/licenses/>. + +package Lintian::Index::Md5sums; + +use v5.20; +use warnings; +use utf8; + +use Const::Fast; +use Cwd; +use Unicode::UTF8 qw(encode_utf8 decode_utf8); + +use Lintian::IPC::Run3 qw(xargs); +use Lintian::Util qw(read_md5sums); + +use Moo::Role; +use namespace::clean; + +const my $EMPTY => q{}; +const my $NEWLINE => qq{\n}; + +const my $WAIT_STATUS_SHIFT => 8; +const my $NULL => qq{\0}; + +=head1 NAME + +Lintian::Index::Md5sums - calculate checksums for index. + +=head1 SYNOPSIS + + use Lintian::Index; + +=head1 DESCRIPTION + +Lintian::Index::Md5sums calculates checksums for an index. + +=head1 INSTANCE METHODS + +=over 4 + +=item add_md5sums + +=cut + +sub add_md5sums { + my ($self) = @_; + + my $savedir = getcwd; + chdir($self->basedir) + or die encode_utf8( + $self->identifier . ': Cannot change to directory ' . $self->basedir); + + my $errors = $EMPTY; + + # get the regular files in the index + my @files = grep { $_->is_file } @{$self->sorted_list}; + my @names = map { $_->name } @files; + + my @command = qw(md5sum --); + + my %md5sums; + + xargs( + \@command, + \@names, + sub { + my ($stdout, $stderr, $status, @partial) = @_; + + $stderr = decode_utf8($stderr) + if length $stderr; + + if ($status) { + $errors .= "Cannot run @command: $stderr" . $NEWLINE; + return; + } + + # undecoded split allows names with non UTF-8 bytes + my ($partial_sums, undef) = read_md5sums($stdout); + + $md5sums{$_} = $partial_sums->{$_}for @partial; + } + ); + + $_->md5sum($md5sums{$_->name}) for @files; + + chdir($savedir) + or die encode_utf8( + $self->identifier . ": Cannot change to directory $savedir"); + + return $errors; +} + +=back + +=head1 AUTHOR + +Originally written by Felix Lechner <felix.lechner@lease-up.com> for +Lintian. + +=head1 SEE ALSO + +lintian(1) + +=cut + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Index/Strings.pm b/lib/Lintian/Index/Strings.pm new file mode 100644 index 0000000..f0e4fa1 --- /dev/null +++ b/lib/Lintian/Index/Strings.pm @@ -0,0 +1,99 @@ +# -*- perl -*- Lintian::Index::Strings +# +# Copyright (C) 2020 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by the Free +# Software Foundation; either version 2 of the License, or (at your option) +# any later version. +# +# This program is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +# more details. +# +# You should have received a copy of the GNU General Public License along with +# this program. If not, see <http://www.gnu.org/licenses/>. + +package Lintian::Index::Strings; + +use v5.20; +use warnings; +use utf8; + +use Const::Fast; +use Path::Tiny; +use Unicode::UTF8 qw(decode_utf8); + +use Lintian::IPC::Run3 qw(safe_qx); + +use Moo::Role; +use namespace::clean; + +const my $EMPTY => q{}; + +=head1 NAME + +Lintian::Index::Strings - strings in binary files. + +=head1 SYNOPSIS + + use Lintian::Index; + +=head1 DESCRIPTION + +Lintian::Index::Strings strings in binary files. + +=head1 INSTANCE METHODS + +=over 4 + +=item add_strings + +=cut + +sub add_strings { + my ($self) = @_; + + my $errors = $EMPTY; + + my @files = grep { $_->is_file } @{$self->sorted_list}; + for my $file (@files) { + + next + if $file->name =~ m{^usr/lib/debug/}; + + # skip non-binaries + next + unless $file->file_type =~ /\bELF\b/; + + # prior implementations sometimes made the list unique + my $allstrings + = decode_utf8(safe_qx(qw{strings --all --}, $file->unpacked_path)); + + $file->strings($allstrings); + } + + return $errors; +} + +=back + +=head1 AUTHOR + +Originally written by Felix Lechner <felix.lechner@lease-up.com> for +Lintian. + +=head1 SEE ALSO + +lintian(1) + +=cut + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Mask.pm b/lib/Lintian/Mask.pm new file mode 100644 index 0000000..475e65c --- /dev/null +++ b/lib/Lintian/Mask.pm @@ -0,0 +1,76 @@ +# -*- perl -*- Lintian::Mask +# +# Copyright (C) 2021 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by the Free +# Software Foundation; either version 2 of the License, or (at your option) +# any later version. +# +# This program is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +# more details. +# +# You should have received a copy of the GNU General Public License along with +# this program. If not, see <http://www.gnu.org/licenses/>. + +package Lintian::Mask; + +use v5.20; +use warnings; +use utf8; + +use Const::Fast; + +const my $EMPTY => q{}; + +use Moo; +use namespace::clean; + +=head1 NAME + +Lintian::Mask - access to mask data + +=head1 SYNOPSIS + + use Lintian::Mask; + +=head1 DESCRIPTION + +Lintian::Mask provides access to mask data. + +=head1 INSTANCE METHODS + +=over 4 + +=item screen + +=item excuse + +=cut + +has screen => (is => 'rw', default => $EMPTY); + +has excuse => (is => 'rw', default => $EMPTY); + +=back + +=head1 AUTHOR + +Originally written by Felix Lechner <felix.lechner@lease-up.com> for +Lintian. + +=head1 SEE ALSO + +lintian(1) + +=cut + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Output/EWI.pm b/lib/Lintian/Output/EWI.pm new file mode 100644 index 0000000..af0fac6 --- /dev/null +++ b/lib/Lintian/Output/EWI.pm @@ -0,0 +1,614 @@ +# Copyright (C) 2008 Frank Lichtenheld <frank@lichtenheld.de> +# Copyright (C) 2021 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Output::EWI; + +use v5.20; +use warnings; +use utf8; + +use Const::Fast; +use HTML::HTML5::Entities; +use List::Compare; +use Term::ANSIColor (); +use Text::Wrap; +use Unicode::UTF8 qw(encode_utf8); + +use Lintian::Output::Markdown qw(markdown_citation); + +# for tty hyperlinks +const my $OSC_HYPERLINK => qq{\033]8;;}; +const my $OSC_DONE => qq{\033\\}; +const my $BEL => qq{\a}; + +const my $EMPTY => q{}; +const my $SPACE => q{ }; +const my $COLON => q{:}; +const my $DOT => q{.}; +const my $NEWLINE => qq{\n}; +const my $PARAGRAPH_BREAK => $NEWLINE x 2; + +const my $YES => q{yes}; +const my $NO => q{no}; + +const my $COMMENT_PREFIX => q{N:} . $SPACE; + +const my $DESCRIPTION_INDENTATION => 2; +const my $DESCRIPTION_PREFIX => $COMMENT_PREFIX + . $SPACE x $DESCRIPTION_INDENTATION; + +const my $SCREEN_INDENTATION => 4; +const my $SCREEN_PREFIX => $COMMENT_PREFIX . $SPACE x $SCREEN_INDENTATION; + +const my %COLORS => ( + 'E' => 'bright_white on_bright_red', + 'W' => 'black on_bright_yellow', + 'I' => 'bright_white on_bright_blue', + 'P' => 'bright_white on_green', + 'C' => 'bright_white on_bright_magenta', + 'X' => 'bright_white on_yellow', + 'O' => 'bright_white on_bright_black', + 'M' => 'bright_black on_bright_white', +); + +const my %CODE_PRIORITY => ( + 'E' => 30, + 'W' => 40, + 'I' => 50, + 'P' => 60, + 'X' => 70, + 'C' => 80, + 'O' => 90, + 'M' => 100, +); + +const my %TYPE_PRIORITY => ( + 'source' => 30, + 'binary' => 40, + 'udeb' => 50, + 'changes' => 60, + 'buildinfo' => 70, +); + +use Moo; +use namespace::clean; + +with 'Lintian::Output::Grammar'; + +=head1 NAME + +Lintian::Output::EWI - standard hint output + +=head1 SYNOPSIS + + use Lintian::Output::EWI; + +=head1 DESCRIPTION + +Provides standard hint output. + +=head1 INSTANCE METHODS + +=over 4 + +=item tag_count_by_processable + +=cut + +has tag_count_by_processable => (is => 'rw', default => sub { {} }); + +=item issue_hints + +=cut + +sub issue_hints { + my ($self, $profile, $groups, $option) = @_; + + my %sorter; + for my $group (@{$groups // []}) { + + for my $processable ($group->get_processables) { + + my $type = $processable->type; + my $type_priority = $TYPE_PRIORITY{$type}; + + for my $hint (@{$processable->hints}) { + + my $tag = $profile->get_tag($hint->tag_name); + + my $override_status = 0; + $override_status = 1 + if defined $hint->override || @{$hint->masks}; + + my $ranking_code = $tag->code; + $ranking_code = 'X' + if $tag->experimental; + $ranking_code = 'O' + if defined $hint->override; + $ranking_code = 'M' + if @{$hint->masks}; + + my $code_priority = $CODE_PRIORITY{$ranking_code}; + + my %for_output; + $for_output{hint} = $hint; + $for_output{processable} = $processable; + + push( + @{ + $sorter{$override_status}{$code_priority}{$tag->name} + {$type_priority}{$processable->name}{$hint->context} + }, + \%for_output + ); + } + } + } + + for my $override_status (sort keys %sorter) { + + my %by_code_priority = %{$sorter{$override_status}}; + + for my $code_priority (sort { $a <=> $b } keys %by_code_priority) { + + my %by_tag_name = %{$by_code_priority{$code_priority}}; + + for my $tag_name (sort keys %by_tag_name) { + + my %by_type_priority = %{$by_tag_name{$tag_name}}; + + for + my $type_priority (sort { $a <=> $b }keys %by_type_priority){ + + my %by_processable_name + = %{$by_type_priority{$type_priority}}; + + for my $processable_name (sort keys %by_processable_name) { + + my %by_context + = %{$by_processable_name{$processable_name}}; + + for my $context (sort keys %by_context) { + + my $for_output + = $sorter{$override_status}{$code_priority} + {$tag_name}{$type_priority}{$processable_name} + {$context}; + + for my $each (@{$for_output}) { + + my $hint = $each->{hint}; + my $processable = $each->{processable}; + + $self->print_hint($profile, $hint, + $processable,$option) + if ( !defined $hint->override + && !@{$hint->masks}) + || $option->{'show-overrides'}; + } + } + } + } + } + } + } + + return; +} + +=item C<print_hint> + +=cut + +sub print_hint { + my ($self, $profile, $hint, $processable, $option) = @_; + + my $tag_name = $hint->tag_name; + my $tag = $profile->get_tag($tag_name); + + my @want_references = @{$option->{'display-source'} // []}; + my @have_references = @{$tag->see_also}; + + # keep only the first word + s{^ ([\w-]+) \s }{$1}x for @have_references; + + # drop anything in parentheses at the end + s{ [(] \S+ [)] $}{}x for @have_references; + + # check if hint refers to the selected references + my $reference_lc= List::Compare->new(\@have_references, \@want_references); + + my @found_references = $reference_lc->get_intersection; + + return + if @want_references + && !@found_references; + + my $information = $hint->context; + $information = $SPACE . $self->_quote_print($information) + unless $information eq $EMPTY; + + # Limit the output so people do not drown in hints. Some hints are + # insanely noisy (hi static-library-has-unneeded-section) + my $limit = $option->{'tag-display-limit'}; + if ($limit) { + + my $processable_id = $processable->identifier; + my $emitted_count + = $self->tag_count_by_processable->{$processable_id}{$tag_name}++; + + return + if $emitted_count >= $limit; + + my $msg + = ' ... use "--tag-display-limit 0" to see all (or pipe to a file/program)'; + $information = $self->_quote_print($msg) + if $emitted_count >= $limit-1; + } + + say encode_utf8('N:') + if $option->{info}; + + my $text = $tag_name; + + my $code = $tag->code; + $code = 'X' if $tag->experimental; + $code = 'O' if defined $hint->override; + $code = 'M' if @{$hint->masks}; + + my $tag_color = $COLORS{$code}; + + $text = Term::ANSIColor::colored($tag_name, $tag_color) + if $option->{color}; + + my $output; + if ($option->{hyperlinks} && $option->{color}) { + my $target= 'https://lintian.debian.org/tags/' . $tag_name; + $output .= $self->osc_hyperlink($text, $target); + } else { + $output .= $text; + } + + local $Text::Wrap::columns + = $option->{'output-width'} - length $COMMENT_PREFIX; + + # do not wrap long words such as urls; see #719769 + local $Text::Wrap::huge = 'overflow'; + + if ($hint->override && length $hint->override->justification) { + + my $wrapped = wrap($COMMENT_PREFIX, $COMMENT_PREFIX, + $hint->override->justification); + say encode_utf8($wrapped); + } + + for my $mask (@{$hint->masks}) { + + say encode_utf8($COMMENT_PREFIX . 'masked by screen ' . $mask->screen); + + next + unless length $mask->excuse; + + my $wrapped= wrap($COMMENT_PREFIX, $COMMENT_PREFIX, $mask->excuse); + say encode_utf8($wrapped); + } + + my $type = $EMPTY; + $type = $SPACE . $processable->type + unless $processable->type eq 'binary'; + + say encode_utf8($code + . $COLON + . $SPACE + . $processable->name + . $type + . $COLON + . $SPACE + . $output + . $information); + + if ($option->{info}) { + + # show only on first issuance + $self->describe_tag($profile->data, $tag, $option->{'output-width'}) + unless $self->issued_tag($tag->name); + } + + return; +} + +=item C<_quote_print($string)> + +Called to quote a string. By default it will replace all +non-printables with "?". Sub-classes can override it if +they allow non-ascii printables etc. + +=cut + +sub _quote_print { + my ($self, $string) = @_; + + $string =~ s/[^[:print:]]/?/g; + + return $string; +} + +=item C<osc_hyperlink> + +=cut + +sub osc_hyperlink { + my ($self, $text, $target) = @_; + + my $start = $OSC_HYPERLINK . $target . $BEL; + my $end = $OSC_HYPERLINK . $BEL; + + return $start . $text . $end; +} + +=item issuedtags + +Hash containing the names of tags which have been issued. + +=cut + +has issuedtags => (is => 'rw', default => sub { {} }); + +=item C<issued_tag($tag_name)> + +Indicate that the named tag has been issued. Returns a boolean value +indicating whether the tag had previously been issued by the object. + +=cut + +sub issued_tag { + my ($self, $tag_name) = @_; + + return $self->issuedtags->{$tag_name}++ ? 1 : 0; +} + +=item describe_tags + +=cut + +sub describe_tags { + my ($self, $data, $tags, $columns) = @_; + + for my $tag (@{$tags}) { + + my $name; + my $code; + + if (defined $tag) { + $name = $tag->name; + $code = $tag->code; + + } else { + $name = 'unknown-tag'; + $code = 'N'; + } + + say encode_utf8('N:'); + say encode_utf8("$code: $name"); + + $self->describe_tag($data, $tag, $columns); + } + + return; +} + +=item describe_tag + +=cut + +sub describe_tag { + my ($self, $data, $tag, $columns) = @_; + + local $Text::Wrap::columns = $columns; + + # do not wrap long words such as urls; see #719769 + local $Text::Wrap::huge = 'overflow'; + + my $wrapped = $COMMENT_PREFIX . $NEWLINE; + + if (defined $tag) { + + my $plain_explanation = markdown_to_plain($tag->explanation, + $columns - length $DESCRIPTION_PREFIX); + + $wrapped .= $DESCRIPTION_PREFIX . $_ . $NEWLINE + for split(/\n/, $plain_explanation); + + if (@{$tag->see_also}) { + + $wrapped .= $COMMENT_PREFIX . $NEWLINE; + + my @see_also_markdown + = map { markdown_citation($data, $_) } @{$tag->see_also}; + my $markdown + = 'Please refer to ' + . $self->oxford_enumeration('and', @see_also_markdown) + . ' for details.' + . $NEWLINE; + my $plain = markdown_to_plain($markdown, + $columns - length $DESCRIPTION_PREFIX); + + $wrapped .= $DESCRIPTION_PREFIX . $_ . $NEWLINE + for split(/\n/, $plain); + } + + $wrapped .= $COMMENT_PREFIX . $NEWLINE; + + my $visibility_prefix = 'Visibility: '; + $wrapped.= wrap( + $DESCRIPTION_PREFIX . $visibility_prefix, + $DESCRIPTION_PREFIX . $SPACE x length $visibility_prefix, + $tag->visibility . $NEWLINE + ); + + $wrapped .= wrap($DESCRIPTION_PREFIX, $DESCRIPTION_PREFIX, + 'Show-Always: '. ($tag->show_always ? $YES : $NO) . $NEWLINE); + + my $check_prefix = 'Check: '; + $wrapped .= wrap( + $DESCRIPTION_PREFIX . $check_prefix, + $DESCRIPTION_PREFIX . $SPACE x length $check_prefix, + $tag->check . $NEWLINE + ); + + if (@{$tag->renamed_from}) { + + $wrapped .= wrap($DESCRIPTION_PREFIX, $DESCRIPTION_PREFIX, + 'Renamed from: ' + . join($SPACE, @{$tag->renamed_from}) + . $NEWLINE); + } + + $wrapped + .= wrap($DESCRIPTION_PREFIX, $DESCRIPTION_PREFIX, + 'This tag is experimental.' . $NEWLINE) + if $tag->experimental; + + $wrapped .= wrap($DESCRIPTION_PREFIX, $DESCRIPTION_PREFIX, + 'This tag is a classification. There is no issue in your package.' + . $NEWLINE) + if $tag->visibility eq 'classification'; + + for my $screen (@{$tag->screens}) { + + $wrapped .= $COMMENT_PREFIX . $NEWLINE; + + $wrapped + .= wrap($DESCRIPTION_PREFIX, $DESCRIPTION_PREFIX, + 'Screen: ' . $screen->name . $NEWLINE); + + $wrapped .= wrap($SCREEN_PREFIX, $SCREEN_PREFIX, + 'Advocates: '. join(', ', @{$screen->advocates}). $NEWLINE); + + my $combined = $screen->reason . $NEWLINE; + if (@{$screen->see_also}) { + + $combined .= $NEWLINE; + + my @see_also_markdown + = map { markdown_citation($data, $_) } @{$screen->see_also}; + $combined + .= 'Read more in ' + . $self->oxford_enumeration('and', @see_also_markdown) + . $DOT + . $NEWLINE; + } + + my $reason_prefix = 'Reason: '; + my $plain = markdown_to_plain($combined, + $columns - length($SCREEN_PREFIX . $reason_prefix)); + + my @lines = split(/\n/, $plain); + $wrapped + .= $SCREEN_PREFIX . $reason_prefix . (shift @lines) . $NEWLINE; + $wrapped + .= $SCREEN_PREFIX + . $SPACE x (length $reason_prefix) + . $_ + . $NEWLINE + for @lines; + } + + } else { + $wrapped + .= wrap($DESCRIPTION_PREFIX, $DESCRIPTION_PREFIX, 'Unknown tag.'); + } + + $wrapped .= $COMMENT_PREFIX . $NEWLINE; + + print encode_utf8($wrapped); + + return; +} + +=item markdown_to_plain + +=cut + +sub markdown_to_plain { + my ($markdown, $columns) = @_; + + # use angular brackets for emphasis + $markdown =~ s{<i>|<em>}{<}g; + $markdown =~ s{</i>|</em>}{>}g; + + # drop Markdown hyperlinks + $markdown =~ s{\[([^\]]+)\]\([^\)]+\)}{$1}g; + + # drop all HTML tags except Markdown shorthand <$url> + $markdown =~ s{<(?![a-z]+://)[^>]+>}{}g; + + # drop brackets around Markdown shorthand <$url> + $markdown =~ s{<([a-z]+://[^>]+)>}{$1}g; + + # substitute HTML entities + my $plain = decode_entities($markdown); + + local $Text::Wrap::columns = $columns + if defined $columns; + + # do not wrap long words such as urls; see #719769 + local $Text::Wrap::huge = 'overflow'; + + my @paragraphs = split(/\n{2,}/, $plain); + + my @lines; + for my $paragraph (@paragraphs) { + + # do not wrap preformatted paragraphs + unless ($paragraph =~ /^\s/) { + + # reduce whitespace throughout, including newlines + $paragraph =~ s/\s+/ /g; + + # trim beginning and end of each line + $paragraph =~ s/^\s+|\s+$//mg; + + $paragraph = wrap($EMPTY, $EMPTY, $paragraph); + } + + push(@lines, $EMPTY); + push(@lines, split(/\n/, $paragraph)); + } + + # drop leading blank line + shift @lines; + + my $wrapped; + $wrapped .= $_ . $NEWLINE for @lines; + + return $wrapped; +} + +=back + +=cut + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Output/Grammar.pm b/lib/Lintian/Output/Grammar.pm new file mode 100644 index 0000000..e9d62bd --- /dev/null +++ b/lib/Lintian/Output/Grammar.pm @@ -0,0 +1,84 @@ +# Copyright (C) 2021 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Output::Grammar; + +use v5.20; +use warnings; +use utf8; + +use Const::Fast; + +use Moo::Role; +use namespace::clean; + +const my $EMPTY => q{}; +const my $SPACE => q{ }; +const my $COMMA => q{,}; + +=head1 NAME + +Lintian::Output::Grammar - sentence helpers + +=head1 SYNOPSIS + + use Lintian::Output::Grammar; + +=head1 DESCRIPTION + +Helps with human readable output. + +=head1 INSTANCE METHODS + +=over 4 + +=item oxford_enumeration + +=cut + +sub oxford_enumeration { + my ($self, $conjunctive, @alternatives) = @_; + + return $EMPTY + unless @alternatives; + + # remove and save last element + my $final = pop @alternatives; + + my $maybe_comma = (@alternatives > 1 ? $COMMA : $EMPTY); + + my $text = $EMPTY; + $text = join($COMMA . $SPACE, @alternatives) . "$maybe_comma $conjunctive " + if @alternatives; + + $text .= $final; + + return $text; +} + +=back + +=cut + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Output/HTML.pm b/lib/Lintian/Output/HTML.pm new file mode 100644 index 0000000..8fd1126 --- /dev/null +++ b/lib/Lintian/Output/HTML.pm @@ -0,0 +1,331 @@ +# Copyright (C) 2020-2021 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Output::HTML; + +use v5.20; +use warnings; +use utf8; + +use Const::Fast; +use Path::Tiny; +use Text::Markdown::Discount qw(markdown); +use Text::Xslate qw(mark_raw); +use Time::Duration; +use Time::Moment; +use Unicode::UTF8 qw(encode_utf8); + +use Lintian::Output::Markdown qw(markdown_citation); + +const my $EMPTY => q{}; +const my $SPACE => q{ }; +const my $NEWLINE => qq{\n}; +const my $PARAGRAPH_BREAK => $NEWLINE x 2; + +const my %CODE_PRIORITY => ( + 'E' => 30, + 'W' => 40, + 'I' => 50, + 'P' => 60, + 'X' => 70, + 'C' => 80, + 'O' => 90, + 'M' => 100, +); + +use Moo; +use namespace::clean; + +with 'Lintian::Output::Grammar'; + +=head1 NAME + +Lintian::Output::HTML - standalone HTML hint output + +=head1 SYNOPSIS + + use Lintian::Output::HTML; + +=head1 DESCRIPTION + +Provides standalone HTML hint output. + +=head1 INSTANCE METHODS + +=over 4 + +=item issue_hints + +Print all hints passed in array. A separate arguments with processables +is necessary to report in case no hints were found. + +=cut + +sub issue_hints { + my ($self, $profile, $groups) = @_; + + $groups //= []; + + my %output; + + my $lintian_version = $ENV{LINTIAN_VERSION}; + $output{'lintian-version'} = $lintian_version; + + my @allgroups_output; + $output{groups} = \@allgroups_output; + + for my $group (sort { $a->name cmp $b->name } @{$groups}) { + + my %group_output; + + $group_output{'group-id'} = $group->name; + $group_output{name} = $group->source_name; + $group_output{version} = $group->source_version; + + my $start = Time::Moment->from_string($group->processing_start); + my $end = Time::Moment->from_string($group->processing_end); + $group_output{start} = $start->strftime('%c'); + $group_output{end} = $end->strftime('%c'); + $group_output{duration} = duration($start->delta_seconds($end)); + + my @processables = $group->get_processables; + my $any_processable = shift @processables; + $group_output{'maintainer'} + = $any_processable->fields->value('Maintainer'); + + push(@allgroups_output, \%group_output); + + my @allfiles_output; + $group_output{'input-files'} = \@allfiles_output; + + for my $processable (sort {$a->path cmp $b->path} + $group->get_processables) { + my %file_output; + $file_output{filename} = path($processable->path)->basename; + $file_output{hints} + = $self->hintlist($profile, $processable->hints); + push(@allfiles_output, \%file_output); + } + } + + my $style_sheet = $profile->data->style_sheet->css; + + my $templatedir = "$ENV{LINTIAN_BASE}/templates"; + my $tx = Text::Xslate->new(path => [$templatedir]); + my $page = $tx->render( + 'standalone-html.tx', + { + title => 'Lintian Tags', + style_sheet => mark_raw($style_sheet), + output => \%output, + } + ); + + print encode_utf8($page); + + return; +} + +=item C<hintlist> + +=cut + +sub hintlist { + my ($self, $profile, $arrayref) = @_; + + my %sorter; + for my $hint (@{$arrayref // []}) { + + my $tag = $profile->get_tag($hint->tag_name); + + my $override_status = 0; + $override_status = 1 + if defined $hint->override || @{$hint->masks}; + + my $ranking_code = $tag->code; + $ranking_code = 'X' + if $tag->experimental; + $ranking_code = 'O' + if defined $hint->override; + $ranking_code = 'M' + if @{$hint->masks}; + + my $code_priority = $CODE_PRIORITY{$ranking_code}; + + push( + @{ + $sorter{$override_status}{$code_priority}{$tag->name} + {$hint->context} + }, + $hint + ); + } + + my @sorted; + for my $override_status (sort keys %sorter) { + my %by_code_priority = %{$sorter{$override_status}}; + + for my $code_priority (sort { $a <=> $b } keys %by_code_priority) { + my %by_tag_name = %{$by_code_priority{$code_priority}}; + + for my $tag_name (sort keys %by_tag_name) { + my %by_context = %{$by_tag_name{$tag_name}}; + + for my $context (sort keys %by_context) { + + my $hints + = $sorter{$override_status}{$code_priority}{$tag_name} + {$context}; + + push(@sorted, $_)for @{$hints}; + } + } + } + } + + my @html_hints; + for my $hint (@sorted) { + + my $tag = $profile->get_tag($hint->tag_name); + + my %html_hint; + push(@html_hints, \%html_hint); + + $html_hint{tag_name} = $hint->tag_name; + + $html_hint{url} = 'https://lintian.debian.org/tags/' . $hint->tag_name; + + $html_hint{context} = $hint->context + if length $hint->context; + + $html_hint{visibility} = $tag->visibility; + + $html_hint{visibility} = 'experimental' + if $tag->experimental; + + my @comments; + if ($hint->override) { + + $html_hint{visibility} = 'override'; + + push(@comments, $hint->override->justification) + if length $hint->override->justification; + } + + # order matters + $html_hint{visibility} = 'mask' + if @{ $hint->masks }; + + for my $mask (@{$hint->masks}) { + + push(@comments, 'masked by screen ' . $mask->screen); + push(@comments, $mask->excuse) + if length $mask->excuse; + } + + $html_hint{comments} = \@comments + if @comments; + } + + return \@html_hints; +} + +=item describe_tags + +=cut + +sub describe_tags { + my ($self, $data, $tags) = @_; + + for my $tag (@{$tags}) { + + say encode_utf8('<p>Name: ' . $tag->name . '</p>'); + say encode_utf8($EMPTY); + + print encode_utf8(markdown($self->markdown_description($data, $tag))); + } + + return; +} + +=item markdown_description + +=cut + +sub markdown_description { + my ($self, $data, $tag) = @_; + + my $description = $tag->explanation; + + my @extras; + + if (@{$tag->see_also}) { + + my @markdown + = map { markdown_citation($data, $_) } @{$tag->see_also}; + my $references + = 'Please refer to ' + . $self->oxford_enumeration('and', @markdown) + . ' for details.'; + + push(@extras, $references); + } + + push(@extras, 'Visibility: '. $tag->visibility); + + push(@extras, 'Check: ' . $tag->check) + if length $tag->check; + + push(@extras, 'Renamed from: ' . join($SPACE, @{$tag->renamed_from})) + if @{$tag->renamed_from}; + + push(@extras, 'This tag is experimental.') + if $tag->experimental; + + push(@extras, + 'This tag is a classification. There is no issue in your package.') + if $tag->visibility eq 'classification'; + + for my $screen (@{$tag->screens}) { + + my $screen_description = 'Screen: ' . $screen->name . $NEWLINE; + $screen_description + .= 'Advocates: ' . join(', ', @{$screen->advocates}) . $NEWLINE; + $screen_description .= 'Reason: ' . $screen->reason . $NEWLINE; + + $screen_description .= 'See-Also: ' . $NEWLINE; + + push(@extras, $screen_description); + } + + $description .= $PARAGRAPH_BREAK . $_ for @extras; + + return $description; +} + +=back + +=cut + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Output/JSON.pm b/lib/Lintian/Output/JSON.pm new file mode 100644 index 0000000..08996e2 --- /dev/null +++ b/lib/Lintian/Output/JSON.pm @@ -0,0 +1,322 @@ +# Copyright (C) 2020-2021 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Output::JSON; + +use v5.20; +use warnings; +use utf8; + +use Const::Fast; +use Time::Piece; +use JSON::MaybeXS; + +use Lintian::Output::Markdown qw(markdown_citation); + +const my $EMPTY => q{}; + +const my %CODE_PRIORITY => ( + 'E' => 30, + 'W' => 40, + 'I' => 50, + 'P' => 60, + 'X' => 70, + 'C' => 80, + 'O' => 90, + 'M' => 100, +); + +use Moo; +use namespace::clean; + +=head1 NAME + +Lintian::Output::JSON - JSON hint output + +=head1 SYNOPSIS + + use Lintian::Output::JSON; + +=head1 DESCRIPTION + +Provides JSON hint output. + +=head1 INSTANCE METHODS + +=over 4 + +=item issue_hints + +Print all hints passed in array. A separate arguments with processables +is necessary to report in case no hints were found. + +=cut + +sub issue_hints { + my ($self, $profile, $groups) = @_; + + $groups //= []; + + my %output; + + $output{lintian_version} = $ENV{LINTIAN_VERSION}; + + my @allgroups_output; + $output{groups} = \@allgroups_output; + + for my $group (sort { $a->name cmp $b->name } @{$groups}) { + + my %group_output; + $group_output{group_id} = $group->name; + $group_output{source_name} = $group->source_name; + $group_output{source_version} = $group->source_version; + + push(@allgroups_output, \%group_output); + + my @allfiles_output; + $group_output{input_files} = \@allfiles_output; + + for my $processable (sort {$a->path cmp $b->path} + $group->get_processables) { + + my %file_output; + $file_output{path} = $processable->path; + $file_output{hints} + = $self->hintlist($profile, $processable->hints); + + push(@allfiles_output, \%file_output); + } + } + + # convert to UTF-8 prior to encoding in JSON + my $encoder = JSON->new; + $encoder->canonical; + $encoder->utf8; + $encoder->pretty; + + my $json = $encoder->encode(\%output); + + # output encoded JSON; is already in UTF-8 + print $json; + + return; +} + +=item C<hintlist> + +=cut + +sub hintlist { + my ($self, $profile, $arrayref) = @_; + + my %sorter; + for my $hint (@{$arrayref // []}) { + + my $tag = $profile->get_tag($hint->tag_name); + + my $override_status = 0; + $override_status = 1 + if defined $hint->override || @{$hint->masks}; + + my $ranking_code = $tag->code; + $ranking_code = 'X' + if $tag->experimental; + $ranking_code = 'O' + if defined $hint->override; + $ranking_code = 'M' + if @{$hint->masks}; + + my $code_priority = $CODE_PRIORITY{$ranking_code}; + + push( + @{ + $sorter{$override_status}{$code_priority}{$tag->name} + {$hint->context} + }, + $hint + ); + } + + my @sorted; + for my $override_status (sort keys %sorter) { + my %by_code_priority = %{$sorter{$override_status}}; + + for my $code_priority (sort { $a <=> $b } keys %by_code_priority) { + my %by_tag_name = %{$by_code_priority{$code_priority}}; + + for my $tag_name (sort keys %by_tag_name) { + my %by_context = %{$by_tag_name{$tag_name}}; + + for my $context (sort keys %by_context) { + + my $hints + = $sorter{$override_status}{$code_priority}{$tag_name} + {$context}; + + push(@sorted, $_)for @{$hints}; + } + } + } + } + + my @hint_dictionaries; + for my $hint (@sorted) { + + my $tag = $profile->get_tag($hint->tag_name); + + my %hint_dictionary; + push(@hint_dictionaries, \%hint_dictionary); + + $hint_dictionary{tag} = $tag->name; + $hint_dictionary{note} = $hint->note; + + if ($hint->can('pointer')) { + my $pointer = $hint->pointer; + + my %pointer_dictionary; + + if ($pointer->can('item')) { + my $item = $pointer->item; + + my %item_dictionary; + $item_dictionary{name} = $item->name; + $item_dictionary{index} = $item->index->identifier; + + $pointer_dictionary{item} = \%item_dictionary; + + # numerify to force JSON integer + # https://metacpan.org/pod/JSON::XS#simple-scalars + $pointer_dictionary{line_position} = $pointer->position + 0; + } + + $hint_dictionary{pointer} = \%pointer_dictionary; + } + + $hint_dictionary{visibility} = $tag->visibility; + $hint_dictionary{experimental} + = ($tag->experimental ? JSON()->true : JSON()->false); + + for my $mask (@{ $hint->masks }) { + + my %mask_dictionary; + $mask_dictionary{screen} = $mask->screen; + $mask_dictionary{excuse} = $mask->excuse; + + push(@{$hint_dictionary{masks}}, \%mask_dictionary); + } + + if ($hint->override) { + + my %override_dictionary; + $override_dictionary{justification} + = $hint->override->justification; + + $hint_dictionary{override} = \%override_dictionary; + } + } + + return \@hint_dictionaries; +} + +=item describe_tags + +=cut + +sub describe_tags { + my ($self, $data, $tags) = @_; + + my @tag_dictionaries; + + for my $tag (@{$tags}) { + + my %tag_dictionary; + push(@tag_dictionaries, \%tag_dictionary); + + $tag_dictionary{name} = $tag->name; + $tag_dictionary{name_spaced} + = ($tag->name_spaced ? JSON()->true : JSON()->false); + $tag_dictionary{show_always} + = ($tag->show_always ? JSON()->true : JSON()->false); + + $tag_dictionary{explanation} = $tag->explanation; + + my @tag_see_also_markdown + = map { markdown_citation($data, $_) } @{$tag->see_also}; + $tag_dictionary{see_also} = \@tag_see_also_markdown; + + $tag_dictionary{check} = $tag->check; + $tag_dictionary{visibility} = $tag->visibility; + $tag_dictionary{experimental} + = ($tag->experimental ? JSON()->true : JSON()->false); + + $tag_dictionary{renamed_from} = $tag->renamed_from; + + my @screen_dictionaries; + + for my $screen (@{$tag->screens}) { + + my %screen_dictionary; + push(@screen_dictionaries, \%screen_dictionary); + + $screen_dictionary{name} = $screen->name; + + my @advocate_emails = map { $_->format } @{$screen->advocates}; + $screen_dictionary{advocates} = \@advocate_emails; + + $screen_dictionary{reason} = $screen->reason; + + my @screen_see_also_markdown + = map { markdown_citation($data, $_) } @{$screen->see_also}; + $screen_dictionary{see_also} = \@screen_see_also_markdown; + } + + $tag_dictionary{screens} = \@screen_dictionaries; + + $tag_dictionary{lintian_version} = $ENV{LINTIAN_VERSION}; + } + + # convert to UTF-8 prior to encoding in JSON + my $encoder = JSON->new; + $encoder->canonical; + $encoder->utf8; + $encoder->pretty; + + # encode single tags without array bracketing + my $object = \@tag_dictionaries; + $object = shift @tag_dictionaries + if @tag_dictionaries == 1; + + my $json = $encoder->encode($object); + + # output encoded JSON; is already in UTF-8 + print $json; + + return; +} + +=back + +=cut + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Output/Markdown.pm b/lib/Lintian/Output/Markdown.pm new file mode 100644 index 0000000..5786612 --- /dev/null +++ b/lib/Lintian/Output/Markdown.pm @@ -0,0 +1,224 @@ +# -*- perl -*- +# +# Copyright (C) 1998 Christian Schwarz and Richard Braakman +# Copyright (C) 2009 Russ Allbery +# Copyright (C) 2020-2021 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by the Free +# Software Foundation; either version 2 of the License, or (at your option) +# any later version. +# +# This program is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +# more details. +# +# You should have received a copy of the GNU General Public License along with +# this program. If not, see <http://www.gnu.org/licenses/>. + +package Lintian::Output::Markdown; + +use v5.20; +use warnings; +use utf8; + +use Exporter qw(import); + +our @EXPORT_OK = qw( + markdown_citation + markdown_authority + markdown_bug + markdown_manual_page + markdown_uri + markdown_hyperlink +); + +use Const::Fast; + +const my $EMPTY => q{}; +const my $SPACE => q{ }; + +=head1 NAME + +Lintian::Output::Markdown - Lintian interface for markdown output + +=head1 SYNOPSIS + + use Lintian::Output::Markdown; + +=head1 DESCRIPTION + +Lintian::Output::Markdown provides functions for Markdown output. + +=head1 FUNCTIONS + +=over 4 + +=item markdown_citation + +=cut + +sub markdown_citation { + my ($data, $citation) = @_; + + if ($citation =~ m{^ ([\w-]+) \s+ (.+) $}x) { + + my $volume = $1; + my $section = $2; + + my $markdown = $data->markdown_authority_reference($volume, $section); + + $markdown ||= $citation; + + return $markdown; + } + + if ($citation =~ m{^ ([\w.-]+) [(] (\d\w*) [)] $}x) { + + my $name = $1; + my $section = $2; + + return markdown_manual_page($name, $section); + } + + if ($citation =~ m{^(?:Bug)?#(\d+)$}) { + + my $number = $1; + return markdown_bug($number); + } + + # turn bare file into file uris + $citation =~ s{^ / }{file://}x; + + # strip scheme from uri + if ($citation =~ s{^ (\w+) : // }{}x) { + + my $scheme = $1; + + return markdown_uri($scheme, $citation); + } + + return $citation; +} + +=item markdown_authority + +=cut + +sub markdown_authority { + my ($volume_title, $volume_url, $section_key, $section_title,$section_url) + = @_; + + my $directed_link; + $directed_link = markdown_hyperlink($section_title, $section_url) + if length $section_title + && length $section_url; + + my $pointer; + if (length $section_key) { + + if ($section_key =~ /^[A-Z]+$/ || $section_key =~ /^appendix-/) { + $pointer = "Appendix $section_key"; + + } elsif ($section_key =~ /^\d+$/) { + $pointer = "Chapter $section_key"; + + } else { + $pointer = "Section $section_key"; + } + } + + # overall manual. + my $volume_link = markdown_hyperlink($volume_title, $volume_url); + + if (length $directed_link) { + + return "$directed_link ($pointer) in the $volume_title" + if length $pointer; + + return "$directed_link in the $volume_title"; + } + + return "$pointer of the $volume_link" + if length $pointer; + + return "the $volume_link"; +} + +=item markdown_bug + +=cut + +sub markdown_bug { + my ($number) = @_; + + return markdown_hyperlink("Bug#$number","https://bugs.debian.org/$number"); +} + +=item markdown_manual_page + +=cut + +sub markdown_manual_page { + my ($name, $section) = @_; + + my $url + ="https://manpages.debian.org/cgi-bin/man.cgi?query=$name&sektion=$section"; + my $hyperlink = markdown_hyperlink("$name($section)", $url); + + return "the $hyperlink manual page"; +} + +=item markdown_uri + +=cut + +sub markdown_uri { + my ($scheme, $locator) = @_; + + my $url = "$scheme://$locator"; + + # use plain path as label for files + return markdown_hyperlink($locator, $url) + if $scheme eq 'file'; + + # or nothing for everything else + return markdown_hyperlink($EMPTY, $url); +} + +=item markdown_hyperlink + +=cut + +sub markdown_hyperlink { + my ($text, $url) = @_; + + return $text + unless length $url; + + return "<$url>" + unless length $text; + + return "[$text]($url)"; +} + +=back + +=head1 AUTHOR + +Originally written by Felix Lechner <felix.lechner@lease-up.com> for Lintian. + +=head1 SEE ALSO + +lintian(1) + +=cut + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Output/Universal.pm b/lib/Lintian/Output/Universal.pm new file mode 100644 index 0000000..a16da49 --- /dev/null +++ b/lib/Lintian/Output/Universal.pm @@ -0,0 +1,151 @@ +# Copyright (C) 2019-2021 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Output::Universal; + +use v5.20; +use warnings; +use utf8; + +use Carp; +use Const::Fast; +use List::SomeUtils qw(all); +use Unicode::UTF8 qw(encode_utf8); + +const my $SPACE => q{ }; +const my $COLON => q{:}; +const my $LEFT_PARENTHESIS => q{(}; +const my $RIGHT_PARENTHESIS => q{)}; + +use Moo; +use namespace::clean; + +=head1 NAME + +Lintian::Output::Universal -- Facilities for printing universal hints + +=head1 SYNOPSIS + + use Lintian::Output::Universal; + +=head1 DESCRIPTION + +A class for printing hints using the 'universal' format. + +=head1 INSTANCE METHODS + +=over 4 + +=item issue_hints + +Passing all groups with all processables in case no hints were found. + +=cut + +sub issue_hints { + my ($self, $profile, $groups) = @_; + + for my $group (@{$groups // []}) { + + my @by_group; + for my $processable ($group->get_processables) { + + for my $hint (@{$processable->hints}) { + + my $line + = $processable->name + . $SPACE + . $LEFT_PARENTHESIS + . $processable->type + . $RIGHT_PARENTHESIS + . $COLON + . $SPACE + . $hint->tag_name; + + $line .= $SPACE . $hint->context + if length $hint->context; + + push(@by_group, $line); + } + } + + my @sorted + = reverse sort { order($a) cmp order($b) } @by_group; + + say encode_utf8($_) for @sorted; + } + + return; +} + +=item order + +=cut + +sub order { + my ($line) = @_; + + return package_type($line) . $line; +} + +=item package_type + +=cut + +sub package_type { + my ($line) = @_; + + my (undef, $type, undef, undef) = parse_line($line); + return $type; +} + +=item parse_line + +=cut + +sub parse_line { + my ($line) = @_; + + my ($package, $type, $name, $details) + = $line =~ qr/^(\S+)\s+\(([^)]+)\):\s+(\S+)(?:\s+(.*))?$/; + + croak encode_utf8("Cannot parse line $line") + unless all { length } ($package, $type, $name); + + return ($package, $type, $name, $details); +} + +=back + +=head1 AUTHOR + +Originally written by Felix Lechner <felix.lechner@lease-up.com> for Lintian. + +=head1 SEE ALSO + +lintian(1) + +=cut + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Override.pm b/lib/Lintian/Override.pm new file mode 100644 index 0000000..c62788d --- /dev/null +++ b/lib/Lintian/Override.pm @@ -0,0 +1,86 @@ +# -*- perl -*- Lintian::Override +# +# Copyright (C) 2021 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by the Free +# Software Foundation; either version 2 of the License, or (at your option) +# any later version. +# +# This program is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +# more details. +# +# You should have received a copy of the GNU General Public License along with +# this program. If not, see <http://www.gnu.org/licenses/>. + +package Lintian::Override; + +use v5.20; +use warnings; +use utf8; + +use Const::Fast; + +const my $EMPTY => q{}; + +use Moo; +use namespace::clean; + +=head1 NAME + +Lintian::Override - access to override data + +=head1 SYNOPSIS + + use Lintian::Override; + +=head1 DESCRIPTION + +Lintian::Override provides access to override data. + +=head1 INSTANCE METHODS + +=over 4 + +=item tag_name + +=item architectures + +=item pattern + +=item justification + +=item position + +=cut + +has tag_name => (is => 'rw', default => $EMPTY); +has architectures => (is => 'rw', default => sub { [] }); + +has pattern => (is => 'rw', default => $EMPTY); + +has justification => (is => 'rw', default => $EMPTY); +has position => (is => 'rw'); + +=back + +=head1 AUTHOR + +Originally written by Felix Lechner <felix.lechner@lease-up.com> for +Lintian. + +=head1 SEE ALSO + +lintian(1) + +=cut + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Pointer/Item.pm b/lib/Lintian/Pointer/Item.pm new file mode 100644 index 0000000..6622fc8 --- /dev/null +++ b/lib/Lintian/Pointer/Item.pm @@ -0,0 +1,100 @@ +# Copyright (C) 2021 Felix Lechner <felix.lechner@lease-up.com> +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Pointer::Item; + +use v5.20; +use warnings; +use utf8; + +use Carp qw(croak); +use Const::Fast; +use Unicode::UTF8 qw(encode_utf8); + +use Moo; +use namespace::clean; + +const my $EMPTY => q{}; +const my $COLON => q{:}; + +=head1 NAME + +Lintian::Pointer::Item -- Facilities for pointing into specific index items + +=head1 SYNOPSIS + +use Lintian::Pointer::Item; + +=head1 DESCRIPTION + +A class for item pointers + +=head1 INSTANCE METHODS + +=over 4 + +=item item + +=item position + +=cut + +has item => (is => 'rw'); +has position => ( + is => 'rw', + coerce => sub { my ($number) = @_; return $number // 0;}, + default => 0 +); + +=item to_string + +=cut + +sub to_string { + my ($self) = @_; + + croak encode_utf8('No item') + unless defined $self->item; + + my $text = $self->item->name; + + $text .= $COLON . $self->position + if $self->position > 0; + + return $text; +} + +=back + +=head1 AUTHOR + +Originally written by Felix Lechner <felix.lechner@lease-up.com> for Lintian. + +=head1 SEE ALSO + +lintian(1) + +=cut + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Pool.pm b/lib/Lintian/Pool.pm new file mode 100644 index 0000000..4f6b7cf --- /dev/null +++ b/lib/Lintian/Pool.pm @@ -0,0 +1,413 @@ +# Copyright (C) 2011 Niels Thykier <niels@thykier.net> +# Copyright (C) 2020-2021 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +## Represents a pool of processables (Lintian::Processable) +package Lintian::Pool; + +use v5.20; +use warnings; +use utf8; + +use Const::Fast; +use Cwd qw(getcwd); +use List::SomeUtils qw(any); +use Time::HiRes qw(gettimeofday tv_interval); +use Path::Tiny; +use POSIX qw(:sys_wait_h); +use Proc::ProcessTable; +use Unicode::UTF8 qw(encode_utf8); + +use Lintian::Group; + +const my $SPACE => q{ }; +const my $COMMA => q{,}; +const my $SEMICOLON => q{;}; +const my $LEFT_PARENS => q{(}; +const my $RIGHT_PARENS => q{)}; +const my $PLURAL_S => q{s}; + +const my $ANY_CHILD => -1; +const my $WORLD_WRITABLE_FOLDER => oct(777); + +use Moo; +use namespace::clean; + +=head1 NAME + +Lintian::Pool -- Pool of processables + +=head1 SYNOPSIS + + use Lintian::Pool; + + my $pool = Lintian::Pool->new; + $pool->add_file('foo.changes'); + $pool->add_file('bar.dsc'); + $pool->add_file('baz.deb'); + $pool->add_file('qux.buildinfo'); + foreach my $gname ($pool->get_group_names){ + my $group = $pool->get_group($gname); + process($gname, $group); + } + +=head1 METHODS + +=over 4 + +=item $pool->groups + +Returns a hash reference to the list of processable groups that are currently +in the pool. The key is a unique identifier based on name and version. + +=item C<savedir> + +=cut + +has groups => (is => 'rw', default => sub{ {} }); + +has savedir => (is => 'rw', default => sub{ getcwd; }); + +# must be absolute; frontend/lintian depends on it +has basedir => ( + is => 'rw', + default => sub { + + my $absolute + = Path::Tiny->tempdir(TEMPLATE => 'lintian-pool-XXXXXXXXXX'); + + $absolute->mkpath({mode => $WORLD_WRITABLE_FOLDER}); + + return $absolute; + } +); + +=item $pool->basedir + +Returns the base directory for the pool. Most likely it's a temporary directory. + +=item $pool->add_group($group) + +Adds a group to the pool. + +=cut + +sub add_group { + my ($self, $group) = @_; + + my $name = $group->name; + + unless (exists $self->groups->{$name}){ + + # group does not exist; just add whole + $self->groups->{$name} = $group; + + return 1; + } + + # group exists; merge & accept all new + my $added = 0; + + my $old = $self->groups->{$name}; + + for my $type (qw/source buildinfo changes/) { + + if (!defined $old->$type && defined $group->$type) { + $old->add_processable($group->$type); + $added = 1; + } + } + + for my $installable ($group->get_installables){ + # New binary package ? + my $was_new = $old->add_processable($installable); + $added ||= $was_new; + } + + return $added; +} + +=item $pool->process + +Process the pool. + +=cut + +sub process{ + my ($self, $PROFILE, $exit_code_ref, $option)= @_; + + if ($self->empty) { + say {*STDERR} encode_utf8('No packages selected.'); + return; + } + + my %reported_count; + my %override_count; + my %ignored_overrides; + my $unused_overrides = 0; + + for my $group (values %{$self->groups}) { + + my $total_start = [gettimeofday]; + + $group->profile($PROFILE); + $group->jobs($option->{'jobs'}); + + my $success= $group->process(\%ignored_overrides, $option); + + for my $processable ($group->get_processables){ + + my @keep; + for my $hint (@{$processable->hints}) { + + my $tag = $PROFILE->get_tag($hint->tag_name); + + # discard experimental tags + next + if $tag->experimental + && !$option->{'display-experimental'}; + + # discard overridden tags + next + if defined $hint->override + && !$option->{'show-overrides'}; + + # discard outside the selected display level + next + unless $PROFILE->display_level_for_tag($hint->tag_name); + + if (!defined $hint->override + || $option->{'show-overrides'}) { + + ++$reported_count{$tag->visibility} + if !$tag->experimental; + + ++$reported_count{experimental} + if $tag->experimental; + } + + ++$reported_count{override} + if defined $hint->override; + + ++$unused_overrides + if $hint->tag_name eq 'unused-override' + || $hint->tag_name eq 'mismatched-override'; + + push(@keep, $hint); + } + + $processable->hints(\@keep); + } + + ${$exit_code_ref} = 2 + if $success && any { $reported_count{$_} } @{$option->{'fail-on'}}; + + # interruptions can leave processes behind (manpages); wait and reap + if (${$exit_code_ref} == 1) { + 1 while waitpid($ANY_CHILD, WNOHANG) > 0; + } + + if ($option->{debug}) { + my $process_table = Proc::ProcessTable->new; + my @leftover= grep { $_->ppid == $$ } @{$process_table->table}; + + # announce left over processes, see commit 3bbcc3b + if (@leftover) { + warn encode_utf8( + "\nSome processes were left over (maybe unreaped):\n"); + + my $FORMAT = ' %-12s %-12s %-8s %-24s %s'; + say encode_utf8( + sprintf( + $FORMAT,'PID', 'TTY', 'STATUS', 'START', 'COMMAND' + ) + ); + + say encode_utf8( + sprintf($FORMAT, + $_->pid,$_->ttydev, + $_->state,scalar(localtime($_->start)), + $_->cmndline) + )for @leftover; + + ${$exit_code_ref} = 1; + die encode_utf8("Aborting.\n"); + } + } + + my $total_raw_res = tv_interval($total_start); + my $total_tres = sprintf('%.3fs', $total_raw_res); + + my $status = $success ? 'complete' : 'error'; + say {*STDERR} + encode_utf8($status . $SPACE . $group->name . " ($total_tres)") + if $option->{'status-log'}; + say {*STDERR} encode_utf8('Finished processing group ' . $group->name) + if $option->{debug}; + + ${$exit_code_ref} = 1 + unless $success; + } + + my $OUTPUT; + if ($option->{'output-format'} eq 'html') { + require Lintian::Output::HTML; + $OUTPUT = Lintian::Output::HTML->new; + } elsif ($option->{'output-format'} eq 'json') { + require Lintian::Output::JSON; + $OUTPUT = Lintian::Output::JSON->new; + } elsif ($option->{'output-format'} eq 'universal') { + require Lintian::Output::Universal; + $OUTPUT = Lintian::Output::Universal->new; + } else { + require Lintian::Output::EWI; + $OUTPUT = Lintian::Output::EWI->new; + } + + # pass everything, in case some groups or processables have no hints + $OUTPUT->issue_hints($PROFILE, [values %{$self->groups}], $option); + + my $errors = $override_count{error} // 0; + my $warnings = $override_count{warning} // 0; + my $info = $override_count{info} // 0; + my $total = $errors + $warnings + $info; + + if ( $option->{'output-format'} eq 'ewi' + && !$option->{'no-override'} + && !$option->{'show-overrides'} + && ($total > 0 || $unused_overrides > 0)) { + + my @details; + push(@details, quantity($errors, 'error')) + if $errors; + push(@details, quantity($warnings, 'warning')) + if $warnings; + push(@details, "$info info") + if $info; + + my $text = quantity($total, 'hint') . ' overridden'; + $text + .= $SPACE + . $LEFT_PARENS + . join($COMMA . $SPACE, @details) + . $RIGHT_PARENS + if @details; + $text + .= $SEMICOLON + . $SPACE + . quantity($unused_overrides, 'unused override'); + + say encode_utf8("N: $text"); + } + + if ($option->{'output-format'} eq 'ewi' && %ignored_overrides) { + say encode_utf8('N: Some overrides were ignored.'); + + if ($option->{verbose}) { + say encode_utf8( +'N: The following tags had at least one override but are mandatory:' + ); + say encode_utf8("N: - $_") for sort keys %ignored_overrides; + + } else { + say encode_utf8('N: Use --verbose for more information.'); + } + } + + path($self->basedir)->remove_tree + if length $self->basedir && -d $self->basedir; + + return; +} + +=item quantity + +=cut + +sub quantity { + my ($count, $unit) = @_; + + my $text = $count . $SPACE . $unit; + $text .= $PLURAL_S + unless $count == 1; + + return $text; +} + +=item $pool->get_group_names + +Returns the name of all the groups in this pool. + +Do not modify the list nor its contents. + +=cut + +sub get_group_names{ + my ($self) = @_; + + return keys %{ $self->groups }; +} + +=item $pool->get_group($name) + +Returns the group called $name or C<undef> +if there is no group called $name. + +=cut + +sub get_group{ + my ($self, $group) = @_; + + return $self->groups->{$group}; +} + +=item $pool->empty + +Returns true if the pool is empty. + +=cut + +sub empty{ + my ($self) = @_; + + return scalar keys %{$self->groups} == 0; +} + +=back + +=head1 AUTHOR + +Originally written by Niels Thykier <niels@thykier.net> for Lintian. + +=head1 SEE ALSO + +lintian(1) + +L<Lintian::Processable> + +L<Lintian::Group> + +=cut + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Processable.pm b/lib/Lintian/Processable.pm new file mode 100644 index 0000000..c89a1fc --- /dev/null +++ b/lib/Lintian/Processable.pm @@ -0,0 +1,302 @@ +# Copyright (C) 2011 Niels Thykier <niels@thykier.net> +# Copyright (C) 2019-2020 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Processable; + +use v5.20; +use warnings; +use utf8; +use warnings::register; + +use Const::Fast; +use File::Basename; +use Path::Tiny; + +use Moo::Role; +use MooX::Aliases; +use namespace::clean; + +const my $EMPTY => q{}; +const my $COLON => q{:}; +const my $SLASH => q{/}; +const my $UNDERSCORE => q{_}; +const my $EVIL_CHARACTERS => qr{[/&|;\$"'<>]}; + +=encoding utf-8 + +=head1 NAME + +Lintian::Processable -- An (abstract) object that Lintian can process + +=head1 SYNOPSIS + + use Lintian::Processable; + +=head1 DESCRIPTION + +Instances of this perl class are objects that Lintian can process (e.g. +deb files). Multiple objects can then be combined into +L<groups|Lintian::Group>, which Lintian will process +together. + +=head1 INSTANCE METHODS + +=over 4 + +=item name + +Returns the name of the package. + +=item type + +Returns the type of package (e.g. binary, source, udeb ...) + +=item hints + +=item $proc->version + +Returns the version of the package. + +=item $proc->path + +Returns the path to the packaged version of actual package. This path +is used in case the data needs to be extracted from the package. + +=item basename + +Returns the basename of the package path. + +=item $proc->architecture + +Returns the architecture(s) of the package. May return multiple values +from changes processables. For source processables it is "source". + +=item $proc->source_name + +Returns the name of the source package. + +=item $proc->source_version + +Returns the version of the source package. + +=item $proc->tainted + +Returns a truth value if one or more fields in this Processable is +tainted. On a best effort basis tainted fields will be sanitized +to less dangerous (but possibly invalid) values. + +=item fields + +Lintian::Deb822::Section with primary field values. + +=item $proc->pooldir + +Returns a reference to lab this Processable is in. + +=item $proc->basedir + +Returns the base directory of this package inside the lab. + +=cut + +has path => ( + is => 'rw', + default => $EMPTY, + trigger => sub { + my ($self, $path) = @_; + + my $basename = basename($path); + $self->basename($basename); + } +); +has basename => (is => 'rw', default => $EMPTY); +has type => (is => 'rw', default => $EMPTY); + +has hints => (is => 'rw', default => sub { [] }); + +has architecture => ( + is => 'rw', + coerce => sub { + my ($value) = @_; + return clean_field($value); + }, + default => $EMPTY +); +has name => ( + is => 'rw', + coerce => sub { + my ($value) = @_; + return clean_field($value); + }, + default => $EMPTY +); +has source_name => ( + is => 'rw', + coerce => sub { + my ($value) = @_; + return clean_field($value); + }, + default => $EMPTY +); +has source_version =>( + is => 'rw', + coerce => sub { + my ($value) = @_; + return clean_field($value); + }, + default => $EMPTY +); +has version => ( + is => 'rw', + coerce => sub { + my ($value) = @_; + return clean_field($value); + }, + default => $EMPTY +); + +has tainted => (is => 'rw', default => 0); + +has fields => (is => 'rw', default => sub { Lintian::Deb822::Section->new; }); + +has pooldir => (is => 'rw', default => $EMPTY); +has basedir => ( + is => 'rw', + lazy => 1, + trigger => sub { + my ($self, $folder) = @_; + + return + unless length $folder; + + # create directory + path($folder)->mkpath + unless -e $folder; + }, + default => sub { + my ($self) = @_; + + my $path + = $self->source_name + . $SLASH + . $self->name + . $UNDERSCORE + . $self->version; + $path .= $UNDERSCORE . $self->architecture + unless $self->type eq 'source'; + $path .= $UNDERSCORE . $self->type; + + # architectures can contain spaces in changes files + $path =~ s/\s/-/g; + + # colon can be a path separator + $path =~ s/:/_/g; + + my $basedir = $self->pooldir . "/$path"; + + return $basedir; + } +); + +=item C<identifier> + +Produces an identifier for this processable. The identifier is +based on the type, name, version and architecture of the package. + +=cut + +sub identifier { + my ($self) = @_; + + my $id = $self->type . $COLON . $self->name . $UNDERSCORE . $self->version; + + # add architecture unless it is source + $id .= $UNDERSCORE . $self->architecture + unless $self->type eq 'source'; + + $id =~ s/\s+/_/g; + + return $id; +} + +=item clean_field + +Cleans a field of evil characters to prevent traversal or worse. + +=cut + +sub clean_field { + my ($value) = @_; + + # make sure none of the fields can cause traversal + my $clean = $value; + $clean =~ s/${$EVIL_CHARACTERS}/_/g; + + return $clean; +} + +=item guess_name + +=cut + +sub guess_name { + my ($self, $path) = @_; + + my $guess = path($path)->basename; + + # drop extension, to catch fields-general-missing.deb + $guess =~ s/\.[^.]*$//; + + # drop everything after the first underscore, if any + $guess =~ s/_.*$//; + + # 'path/lintian_2.5.2_amd64.changes' became 'lintian' + return $guess; +} + +=back + +=head1 AUTHOR + +Originally written by Niels Thykier <niels@thykier.net> for Lintian. +Substantial portions written by Russ Allbery <rra@debian.org> for Lintian. + +=head1 SEE ALSO + +lintian(1) + +L<Lintian::Processable::Installable> + +L<Lintian::Processable::Buildinfo> + +L<Lintian::Processable::Changes> + +L<Lintian::Processable::Source> + +L<Lintian::Group> + +=cut + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Processable/Buildinfo.pm b/lib/Lintian/Processable/Buildinfo.pm new file mode 100644 index 0000000..f5983fa --- /dev/null +++ b/lib/Lintian/Processable/Buildinfo.pm @@ -0,0 +1,133 @@ +# Copyright (C) 2019-2020 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Processable::Buildinfo; + +use v5.20; +use warnings; +use utf8; + +use Carp qw(croak); +use Unicode::UTF8 qw(encode_utf8); + +use Lintian::Deb822; + +use Moo; +use namespace::clean; + +with + 'Lintian::Processable', + 'Lintian::Processable::Fields::Files', + 'Lintian::Processable::Buildinfo::Overrides'; + +=for Pod::Coverage BUILDARGS + +=head1 NAME + +Lintian::Processable::Buildinfo -- A buildinfo file Lintian can process + +=head1 SYNOPSIS + + use Lintian::Processable::Buildinfo; + + my $processable = Lintian::Processable::Buildinfo->new; + $processable->init_from_file('path'); + +=head1 DESCRIPTION + +This class represents a 'buildinfo' file that Lintian can process. Objects +of this kind are often part of a L<Lintian::Group>, which +represents all the files in a changes or buildinfo file. + +=head1 INSTANCE METHODS + +=over 4 + +=item init_from_file (PATH) + +Initializes a new object from PATH. + +=cut + +sub init_from_file { + my ($self, $file) = @_; + + croak encode_utf8("File $file does not exist") + unless -e $file; + + $self->path($file); + $self->type('buildinfo'); + + my $primary = Lintian::Deb822->new; + my @sections = $primary->read_file($self->path) + or croak encode_utf8( + $self->path. ' is not a valid '. $self->type . ' file'); + + $self->fields($sections[0]); + + my $name = $self->fields->value('Source'); + my $version = $self->fields->value('Version'); + my $architecture = $self->fields->value('Architecture'); + + unless (length $name) { + $name = $self->guess_name($self->path); + croak encode_utf8('Cannot determine the name from '. $self->path) + unless length $name; + } + + my $source_name = $name; + my $source_version = $version; + + $self->name($name); + $self->version($version); + $self->architecture($architecture); + $self->source_name($source_name); + $self->source_version($source_version); + + # make sure none of these fields can cause traversal + $self->tainted(1) + if $self->name ne $name + || $self->version ne $version + || $self->architecture ne $architecture + || $self->source_name ne $source_name + || $self->source_version ne $source_version; + + return; +} + +=back + +=head1 AUTHOR + +Originally written by Felix Lechner <felix.lechner@lease-up.com> for Lintian. + +=head1 SEE ALSO + +lintian(1) + +L<Lintian::Processable> + +=cut + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Processable/Buildinfo/Overrides.pm b/lib/Lintian/Processable/Buildinfo/Overrides.pm new file mode 100644 index 0000000..136c01c --- /dev/null +++ b/lib/Lintian/Processable/Buildinfo/Overrides.pm @@ -0,0 +1,94 @@ +# -*- perl -*- Lintian::Processable::Buildinfo::Overrides +# +# Copyright (C) 2021 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by the Free +# Software Foundation; either version 2 of the License, or (at your option) +# any later version. +# +# This program is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +# more details. +# +# You should have received a copy of the GNU General Public License along with +# this program. If not, see <http://www.gnu.org/licenses/>. + +package Lintian::Processable::Buildinfo::Overrides; + +use v5.20; +use warnings; +use utf8; + +use Moo::Role; +use namespace::clean; + +with 'Lintian::Processable::Overrides'; + +=head1 NAME + +Lintian::Processable::Buildinfo::Overrides - access to override data + +=head1 SYNOPSIS + + use Lintian::Processable; + +=head1 DESCRIPTION + +Lintian::Processable::Buildinfo::Overrides provides an interface for overrides. + +=head1 INSTANCE METHODS + +=over 4 + +=item override_file + +=cut + +has override_file => ( + is => 'rw', + lazy => 1, + default => sub { + my ($self) = @_; + + return undef; + } +); + +=item overrides + +=cut + +has overrides => ( + is => 'rw', + lazy => 1, + default => sub { + my ($self) = @_; + + my @overrides; + + return \@overrides; + } +); + +1; + +=back + +=head1 AUTHOR + +Originally written by Felix Lechner <felix.lechner@lease-up.com> for +Lintian. + +=head1 SEE ALSO + +lintian(1) + +=cut + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Processable/Changelog/Version.pm b/lib/Lintian/Processable/Changelog/Version.pm new file mode 100644 index 0000000..7721b17 --- /dev/null +++ b/lib/Lintian/Processable/Changelog/Version.pm @@ -0,0 +1,108 @@ +# -*- perl -*- +# Lintian::Processable::Changelog::Version -- interface to source package data collection + +# Copyright (C) 2008 Russ Allbery +# Copyright (C) 2009 Raphael Geissert +# Copyright (C) 2020 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by the Free +# Software Foundation; either version 2 of the License, or (at your option) +# any later version. +# +# This program is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +# more details. +# +# You should have received a copy of the GNU General Public License along with +# this program. If not, see <http://www.gnu.org/licenses/>. + +package Lintian::Processable::Changelog::Version; + +use v5.20; +use warnings; +use utf8; + +use Syntax::Keyword::Try; + +use Lintian::Changelog::Version; + +use Moo::Role; +use namespace::clean; + +=head1 NAME + +Lintian::Processable::Changelog::Version - Lintian interface to source package data collection + +=head1 SYNOPSIS + + my ($name, $type, $dir) = ('foobar', 'source', '/path/to/lab-entry'); + my $collect = Lintian::Processable::Changelog::Version->new($name); + if ($collect->native) { + print "Package is native\n"; + } + +=head1 DESCRIPTION + +Lintian::Processable::Changelog::Version provides an interface to package data for source +packages. It implements data collection methods specific to source +packages. + +This module is in its infancy. Most of Lintian still reads all data from +files in the laboratory whenever that data is needed and generates that +data via collect scripts. The goal is to eventually access all data about +source packages via this module so that the module can cache data where +appropriate and possibly retire collect scripts in favor of caching that +data in memory. + +=head1 INSTANCE METHODS + +=over 4 + +=item changelog_version + +Returns a fully parsed Lintian::Changelog::Version for the +source package's version string. + +=cut + +has changelog_version => ( + is => 'rw', + lazy => 1, + default => sub { + my ($self) = @_; + + my $versionstring = $self->fields->value('Version'); + + my $version = Lintian::Changelog::Version->new; + try { + $version->assign($versionstring, $self->native); + + } catch { + } + + return $version; + } +); + +=back + +=head1 AUTHOR + +Originally written by Russ Allbery <rra@debian.org> for Lintian. +Amended by Felix Lechner <felix.lechner@lease-up.com> for Lintian. + +=head1 SEE ALSO + +lintian(1) + +=cut + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Processable/Changes.pm b/lib/Lintian/Processable/Changes.pm new file mode 100644 index 0000000..65eb8e4 --- /dev/null +++ b/lib/Lintian/Processable/Changes.pm @@ -0,0 +1,145 @@ +# Copyright (C) 2019-2020 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Processable::Changes; + +use v5.20; +use warnings; +use utf8; + +use Carp qw(croak); +use Path::Tiny; +use Unicode::UTF8 qw(valid_utf8 decode_utf8 encode_utf8); + +use Lintian::Deb822; + +use Moo; +use namespace::clean; + +with + 'Lintian::Processable', + 'Lintian::Processable::Fields::Files', + 'Lintian::Processable::Changes::Overrides'; + +=for Pod::Coverage BUILDARGS + +=head1 NAME + +Lintian::Processable::Changes -- A changes file Lintian can process + +=head1 SYNOPSIS + + use Lintian::Processable::Changes; + + my $processable = Lintian::Processable::Changes->new; + $processable->init_from_file('path'); + +=head1 DESCRIPTION + +This class represents a 'changes' file that Lintian can process. Objects +of this kind are often part of a L<Lintian::Group>, which +represents all the files in a changes or buildinfo file. + +=head1 INSTANCE METHODS + +=over 4 + +=item init_from_file (PATH) + +Initializes a new object from PATH. + +=cut + +sub init_from_file { + my ($self, $file) = @_; + + croak encode_utf8("File $file does not exist") + unless -e $file; + + $self->path($file); + $self->type('changes'); + + # dpkg will include news items in national encoding + my $bytes = path($self->path)->slurp; + + my $contents; + if (valid_utf8($bytes)) { + $contents = decode_utf8($bytes); + } else { + # try to proceed with nat'l encoding; stopping here breaks tests + $contents = $bytes; + } + + my $primary = Lintian::Deb822->new; + my @sections = $primary->parse_string($contents) + or croak encode_utf8( + $self->path. ' is not a valid '. $self->type . ' file'); + + $self->fields($sections[0]); + + my $name = $self->fields->value('Source'); + my $version = $self->fields->value('Version'); + my $architecture = $self->fields->value('Architecture'); + + unless (length $name) { + $name = $self->guess_name($self->path); + croak encode_utf8('Cannot determine the name from ' . $self->path) + unless length $name; + } + + my $source_name = $name; + my $source_version = $version; + + $self->name($name); + $self->version($version); + $self->architecture($architecture); + $self->source_name($source_name); + $self->source_version($source_version); + + # make sure none of these fields can cause traversal + $self->tainted(1) + if $self->name ne $name + || $self->version ne $version + || $self->architecture ne $architecture + || $self->source_name ne $source_name + || $self->source_version ne $source_version; + + return; +} + +=back + +=head1 AUTHOR + +Originally written by Felix Lechner <felix.lechner@lease-up.com> for Lintian. + +=head1 SEE ALSO + +lintian(1) + +L<Lintian::Processable> + +=cut + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Processable/Changes/Overrides.pm b/lib/Lintian/Processable/Changes/Overrides.pm new file mode 100644 index 0000000..78bd04d --- /dev/null +++ b/lib/Lintian/Processable/Changes/Overrides.pm @@ -0,0 +1,94 @@ +# -*- perl -*- Lintian::Processable::Changes::Overrides +# +# Copyright (C) 2021 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by the Free +# Software Foundation; either version 2 of the License, or (at your option) +# any later version. +# +# This program is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +# more details. +# +# You should have received a copy of the GNU General Public License along with +# this program. If not, see <http://www.gnu.org/licenses/>. + +package Lintian::Processable::Changes::Overrides; + +use v5.20; +use warnings; +use utf8; + +use Moo::Role; +use namespace::clean; + +with 'Lintian::Processable::Overrides'; + +=head1 NAME + +Lintian::Processable::Changes::Overrides - access to override data + +=head1 SYNOPSIS + + use Lintian::Processable; + +=head1 DESCRIPTION + +Lintian::Processable::Changes::Overrides provides an interface for overrides. + +=head1 INSTANCE METHODS + +=over 4 + +=item override_file + +=cut + +has override_file => ( + is => 'rw', + lazy => 1, + default => sub { + my ($self) = @_; + + return undef; + } +); + +=item overrides + +=cut + +has overrides => ( + is => 'rw', + lazy => 1, + default => sub { + my ($self) = @_; + + my @overrides; + + return \@overrides; + } +); + +1; + +=back + +=head1 AUTHOR + +Originally written by Felix Lechner <felix.lechner@lease-up.com> for +Lintian. + +=head1 SEE ALSO + +lintian(1) + +=cut + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Processable/Debian/Control.pm b/lib/Lintian/Processable/Debian/Control.pm new file mode 100644 index 0000000..a4c1cf9 --- /dev/null +++ b/lib/Lintian/Processable/Debian/Control.pm @@ -0,0 +1,90 @@ +# -*- perl -*- +# Lintian::Processable::Debian::Control -- interface to source package data collection + +# Copyright (C) 2008 Russ Allbery +# Copyright (C) 2009 Raphael Geissert +# Copyright (C) 2020 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by the Free +# Software Foundation; either version 2 of the License, or (at your option) +# any later version. +# +# This program is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +# more details. +# +# You should have received a copy of the GNU General Public License along with +# this program. If not, see <http://www.gnu.org/licenses/>. + +package Lintian::Processable::Debian::Control; + +use v5.20; +use warnings; +use utf8; + +use Lintian::Debian::Control; + +use Moo::Role; +use namespace::clean; + +=head1 NAME + +Lintian::Processable::Debian::Control - Lintian interface to d/control fields + +=head1 SYNOPSIS + + use Lintian::Processable; + +=head1 DESCRIPTION + +Lintian::Processable::Debian::Control provides an interface to package data +from d/control. + +=head1 INSTANCE METHODS + +=over 4 + +=item debian_control + +=cut + +has debian_control => ( + is => 'rw', + lazy => 1, + default => sub { + my ($self) = @_; + + my $control = Lintian::Debian::Control->new; + + my $item = $self->patched->resolve_path('debian/control'); + return $control + unless defined $item; + + $control->load($item); + + return $control; + } +); + +=back + +=head1 AUTHOR + +Originally written by Russ Allbery <rra@debian.org> for Lintian. +Amended by Felix Lechner <felix.lechner@lease-up.com> for Lintian. + +=head1 SEE ALSO + +lintian(1) + +=cut + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Processable/Diffstat.pm b/lib/Lintian/Processable/Diffstat.pm new file mode 100644 index 0000000..82a3b28 --- /dev/null +++ b/lib/Lintian/Processable/Diffstat.pm @@ -0,0 +1,162 @@ +# -*- perl -*- Lintian::Processable::Diffstat -- access to collected diffstat data +# +# Copyright (C) 1998 Richard Braakman +# Copyright (C) 2019-2020 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by the Free +# Software Foundation; either version 2 of the License, or (at your option) +# any later version. +# +# This program is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +# more details. +# +# You should have received a copy of the GNU General Public License along with +# this program. If not, see <http://www.gnu.org/licenses/>. + +package Lintian::Processable::Diffstat; + +use v5.20; +use warnings; +use utf8; + +use Const::Fast; +use IPC::Run3; +use Path::Tiny; +use Unicode::UTF8 qw(encode_utf8 decode_utf8); + +use Moo::Role; +use namespace::clean; + +const my $COLON => q{:}; +const my $UNDERSCORE => q{_}; +const my $NEWLINE => qq{\n}; + +const my $OPEN_PIPE => q{-|}; +const my $WAIT_STATUS_SHIFT => 8; + +=head1 NAME + +Lintian::Processable::Diffstat - access to collected diffstat data + +=head1 SYNOPSIS + + use Lintian::Processable; + +=head1 DESCRIPTION + +Lintian::Processable::Diffstat provides an interface to diffstat data. + +=head1 INSTANCE METHODS + +=over 4 + +=item diffstat + +Returns the path to diffstat output run on the Debian packaging diff +(a.k.a. the "diff.gz") for 1.0 non-native packages. For source +packages without a "diff.gz" component, this returns the path to an +empty file (this may be a device like /dev/null). + +=cut + +has diffstat => ( + is => 'rw', + lazy => 1, + default => sub { + my ($self) = @_; + + my $noepoch = $self->fields->value('Version'); + + # strip epoch + $noepoch =~ s/^\d://; + + # look for a format 1.0 diff.gz near the input file + my $diffname = $self->name . $UNDERSCORE . $noepoch . '.diff.gz'; + return {} + unless exists $self->files->{$diffname}; + + my $diffpath = path($self->path)->parent->child($diffname)->stringify; + return {} + unless -e $diffpath; + + my @gunzip_command = ('gunzip', '--stdout', $diffpath); + my $gunzip_pid = open(my $from_gunzip, $OPEN_PIPE, @gunzip_command) + or die encode_utf8("Cannot run @gunzip_command: $!"); + + my $stdout; + my $stderr; + my @diffstat_command = qw(diffstat -p1); + run3(\@diffstat_command, $from_gunzip, \$stdout, \$stderr); + my $status = ($? >> $WAIT_STATUS_SHIFT); + + $stdout = decode_utf8($stdout) + if length $stdout; + $stderr = decode_utf8($stderr) + if length $stderr; + + if ($status) { + + my $message= "Non-zero status $status from @diffstat_command"; + $message .= $COLON . $NEWLINE . $stderr + if length $stderr; + + die encode_utf8($message); + } + + close $from_gunzip + or + warn encode_utf8("close failed for handle from @gunzip_command: $!"); + + waitpid($gunzip_pid, 0); + + # remove summary in last line + chomp $stdout; + $stdout =~ s/.*\Z//; + + my %diffstat; + + my @lines = split(/\n/, $stdout); + for my $line (@lines) { + + next + unless $line =~ s/\|\s*([^|]*)\s*$//; + + my $stats = $1; + my $file = $line; + + # trim both ends + $file =~ s/^\s+|\s+$//g; + + die encode_utf8("syntax error in diffstat file: $line") + unless length $file; + + $diffstat{$file} = $stats; + } + + return \%diffstat; + } +); + +1; + +=back + +=head1 AUTHOR + +Originally written by Felix Lechner <felix.lechner@lease-up.com> for +Lintian. + +=head1 SEE ALSO + +lintian(1) + +=cut + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Processable/Fields/Files.pm b/lib/Lintian/Processable/Fields/Files.pm new file mode 100644 index 0000000..df21352 --- /dev/null +++ b/lib/Lintian/Processable/Fields/Files.pm @@ -0,0 +1,181 @@ +# -*- perl -*- +# Lintian::Processable::Fields::Files -- interface to .buildinfo file data collection +# +# Copyright (C) 2010 Adam D. Barratt +# Copyright (C) 2018 Chris Lamb +# Copyright (C) 2019-2020 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by the Free +# Software Foundation; either version 2 of the License, or (at your option) +# any later version. +# +# This program is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +# more details. +# +# You should have received a copy of the GNU General Public License along with +# this program. If not, see <http://www.gnu.org/licenses/>. + +package Lintian::Processable::Fields::Files; + +use v5.20; +use warnings; +use utf8; + +use Moo::Role; +use namespace::clean; + +=head1 NAME + +Lintian::Processable::Fields::Files - Lintian interface to .buildinfo or changes file data collection + +=head1 SYNOPSIS + + use Moo; + + with 'Lintian::Processable::Fields::Files'; + +=head1 DESCRIPTION + +Lintian::Processable::Fields::Files provides an interface to data for .buildinfo +and changes files. It implements data collection methods specific to .buildinfo +and changes files. + +=head1 INSTANCE METHODS + +=over 4 + +=item files + +Returns a reference to a hash containing information about files listed +in the .buildinfo file. Each hash may have the following keys: + +=over 4 + +=item name + +Name of the file. + +=item size + +The size of the file in bytes. + +=item section + +The archive section to which the file belongs. + +=item priority + +The priority of the file. + +=item checksums + +A hash with the keys being checksum algorithms and the values themselves being +hashes containing + +=over 4 + +=item sum + +The result of applying the given algorithm to the file. + +=item filesize + +The size of the file as given in the .buildinfo section relating to the given +checksum. + +=back + +=back + +=cut + +has files => ( + is => 'rw', + lazy => 1, + default => + + sub { + my ($self) = @_; + + my %files; + + my @files_lines = split(/\n/, $self->fields->value('Files')); + + # trim both ends of each line + s/^\s+|\s+$//g for @files_lines; + + for my $line (grep { length } @files_lines) { + + my @fields = split(/\s+/, $line); + my $basename = $fields[-1]; + + # ignore traversals + next + if $basename =~ m{/}; + + my ($md5sum, $size, $section, $priority) = @fields; + + $files{$basename}{checksums}{Md5} = { + 'sum' => $md5sum, + 'filesize' => $size, + }; + + $files{$basename}{name} = $basename; + $files{$basename}{size} = $size; + + unless ($self->type eq 'source') { + + $files{$basename}{section} = $section; + $files{$basename}{priority} = $priority; + } + } + + for my $algorithm (qw(Sha1 Sha256)) { + + my @lines + = split(/\n/, $self->fields->value("Checksums-$algorithm")); + + # trim both ends of each line + s/^\s+|\s+$//g for @lines; + + for my $line (grep { length } @lines) { + + my ($checksum, $size, $basename) = split(/\s+/, $line); + + # ignore traversals + next + if $basename =~ m{/}; + + $files{$basename}{checksums}{$algorithm} = { + 'sum' => $checksum, + 'filesize' => $size + }; + } + } + + return \%files; + } +); + +=back + +=head1 AUTHOR + +Originally written by Adam D. Barratt <adsb@debian.org> for Lintian. + +=head1 SEE ALSO + +lintian(1), L<Lintian::Processable> + +=cut + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Processable/Hardening.pm b/lib/Lintian/Processable/Hardening.pm new file mode 100644 index 0000000..4bf24bd --- /dev/null +++ b/lib/Lintian/Processable/Hardening.pm @@ -0,0 +1,105 @@ +# -*- perl -*- Lintian::Processable::Hardening +# +# Copyright (C) 2019 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by the Free +# Software Foundation; either version 2 of the License, or (at your option) +# any later version. +# +# This program is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +# more details. +# +# You should have received a copy of the GNU General Public License along with +# this program. If not, see <http://www.gnu.org/licenses/>. + +package Lintian::Processable::Hardening; + +use v5.20; +use warnings; +use utf8; + +use Path::Tiny; +use Unicode::UTF8 qw(encode_utf8); + +use Moo::Role; +use namespace::clean; + +=head1 NAME + +Lintian::Processable::Hardening - access to collected hardening data + +=head1 SYNOPSIS + + use Lintian::Processable; + +=head1 DESCRIPTION + +Lintian::Processable::Hardening provides an interface to collected hardening data. + +=head1 INSTANCE METHODS + +=over 4 + +=item hardening_info + +Returns a hashref mapping a FILE to its hardening issues. + +NB: This is generally only useful for checks/binaries to emit the +hardening-no-* tags. + +=cut + +sub hardening_info { + my ($self) = @_; + + return $self->{hardening_info} + if exists $self->{hardening_info}; + + my $hardf = path($self->basedir)->child('hardening-info')->stringify; + + my %hardening_info; + + if (-e $hardf) { + open(my $idx, '<:utf8_strict', $hardf) + or die encode_utf8("Cannot open $hardf"); + + while (my $line = <$idx>) { + chomp($line); + + if ($line =~ m{^([^:]+):(?:\./)?(.*)$}) { + my ($tag, $file) = ($1, $2); + + push(@{$hardening_info{$file}}, $tag); + } + } + close($idx); + } + + $self->{hardening_info} = \%hardening_info; + + return $self->{hardening_info}; +} + +=back + +=head1 AUTHOR + +Originally written by Felix Lechner <felix.lechner@lease-up.com> for +Lintian. + +=head1 SEE ALSO + +lintian(1) + +=cut + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Processable/Installable.pm b/lib/Lintian/Processable/Installable.pm new file mode 100644 index 0000000..54ae406 --- /dev/null +++ b/lib/Lintian/Processable/Installable.pm @@ -0,0 +1,201 @@ +# Copyright (C) 2019-2020 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Processable::Installable; + +use v5.20; +use warnings; +use utf8; + +use Carp qw(croak); +use Const::Fast; +use IPC::Run3; +use Unicode::UTF8 qw(encode_utf8 decode_utf8 valid_utf8); + +use Lintian::Deb822; + +use Moo; +use namespace::clean; + +with + 'Lintian::Processable', + 'Lintian::Processable::Installable::Changelog', + 'Lintian::Processable::Installable::Class', + 'Lintian::Processable::Installable::Conffiles', + 'Lintian::Processable::Installable::Control', + 'Lintian::Processable::Installable::Installed', + 'Lintian::Processable::Installable::Overrides', + 'Lintian::Processable::Installable::Relation', + 'Lintian::Processable::IsNonFree', + 'Lintian::Processable::Hardening', + 'Lintian::Processable::NotJustDocs'; + +# read up to 40kB at a time. this happens to be 4096 "tar records" +# (with a block-size of 512 and a block factor of 20, which appear to +# be the defaults). when we do full reads and writes of READ_SIZE (the +# OS willing), the receiving end will never be with an incomplete +# record. +const my $TAR_RECORD_SIZE => 20 * 512; + +const my $COLON => q{:}; +const my $NEWLINE => qq{\n}; +const my $OPEN_PIPE => q{-|}; + +const my $WAIT_STATUS_SHIFT => 8; + +=for Pod::Coverage BUILDARGS + +=head1 NAME + +Lintian::Processable::Installable -- An installation package Lintian can process + +=head1 SYNOPSIS + + use Lintian::Processable::Installable; + + my $processable = Lintian::Processable::Installable->new; + $processable->init_from_file('path'); + +=head1 DESCRIPTION + +This class represents a 'deb' or 'udeb' file that Lintian can process. Objects +of this kind are often part of a L<Lintian::Group>, which +represents all the files in a changes or buildinfo file. + +=head1 INSTANCE METHODS + +=over 4 + +=item init_from_file (PATH) + +Initializes a new object from PATH. + +=cut + +sub init_from_file { + my ($self, $file) = @_; + + croak encode_utf8("File $file does not exist") + unless -e $file; + + $self->path($file); + + # get control.tar.gz; dpkg-deb -f $file is slow; use tar instead + my @dpkg_command = ('dpkg-deb', '--ctrl-tarfile', $self->path); + + my $dpkg_pid = open(my $from_dpkg, $OPEN_PIPE, @dpkg_command) + or die encode_utf8("Cannot run @dpkg_command: $!"); + + # would like to set buffer size to 4096 & $TAR_RECORD_SIZE + + # get binary control file + my $stdout_bytes; + my $stderr_bytes; + my @tar_command = qw{tar --wildcards -xO -f - *control}; + run3(\@tar_command, $from_dpkg, \$stdout_bytes, \$stderr_bytes); + my $status = ($? >> $WAIT_STATUS_SHIFT); + + if ($status) { + + my $message= "Non-zero status $status from @tar_command"; + $message .= $COLON . $NEWLINE . decode_utf8($stderr_bytes) + if length $stderr_bytes; + + croak encode_utf8($message); + } + + close $from_dpkg + or warn encode_utf8("close failed for handle from @dpkg_command: $!"); + + waitpid($dpkg_pid, 0); + + croak encode_utf8('Nationally encoded control data in ' . $self->path) + unless valid_utf8($stdout_bytes); + + my $stdout = decode_utf8($stdout_bytes); + + my $deb822 = Lintian::Deb822->new; + my @sections = $deb822->parse_string($stdout); + croak encode_utf8( + 'Not exactly one section with installable control data in ' + . $self->path) + unless @sections == 1; + + $self->fields($sections[0]); + + my $name = $self->fields->value('Package'); + my $version = $self->fields->value('Version'); + my $architecture = $self->fields->value('Architecture'); + my $source_name = $self->fields->value('Source'); + + my $source_version = $version; + + unless (length $name) { + $name = $self->guess_name($self->path); + croak encode_utf8('Cannot determine the name from ' . $self->path) + unless length $name; + } + + # source may be left out if same as $name + $source_name = $name + unless length $source_name; + + # source probably contains the version in parentheses + if ($source_name =~ m/(\S++)\s*\(([^\)]+)\)/){ + $source_name = $1; + $source_version = $2; + } + + $self->name($name); + $self->version($version); + $self->architecture($architecture); + $self->source_name($source_name); + $self->source_version($source_version); + + # make sure none of these fields can cause traversal + $self->tainted(1) + if $self->name ne $name + || $self->version ne $version + || $self->architecture ne $architecture + || $self->source_name ne $source_name + || $self->source_version ne $source_version; + + return; +} + +=back + +=head1 AUTHOR + +Originally written by Felix Lechner <felix.lechner@lease-up.com> for Lintian. + +=head1 SEE ALSO + +lintian(1) + +L<Lintian::Processable> + +=cut + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Processable/Installable/Changelog.pm b/lib/Lintian/Processable/Installable/Changelog.pm new file mode 100644 index 0000000..c43a17b --- /dev/null +++ b/lib/Lintian/Processable/Installable/Changelog.pm @@ -0,0 +1,151 @@ +# -*- perl -*- Lintian::Processable::Installable::Changelog -- access to collected changelog data +# +# Copyright (C) 1998 Richard Braakman +# Copyright (C) 2019-2021 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by the Free +# Software Foundation; either version 2 of the License, or (at your option) +# any later version. +# +# This program is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +# more details. +# +# You should have received a copy of the GNU General Public License along with +# this program. If not, see <http://www.gnu.org/licenses/>. + +package Lintian::Processable::Installable::Changelog; + +use v5.20; +use warnings; +use utf8; + +use File::Copy qw(copy); +use List::SomeUtils qw(first_value); +use Path::Tiny; +use Unicode::UTF8 qw(valid_utf8 decode_utf8 encode_utf8); + +use Lintian::IPC::Run3 qw(safe_qx); + +use Moo::Role; +use namespace::clean; + +=head1 NAME + +Lintian::Processable::Installable::Changelog - access to collected changelog data + +=head1 SYNOPSIS + + use Lintian::Processable; + +=head1 DESCRIPTION + +Lintian::Processable::Installable::Changelog provides an interface to changelog data. + +=head1 INSTANCE METHODS + +=over 4 + +=item changelog_item + +=cut + +has changelog_item => ( + is => 'rw', + lazy => 1, + default => sub { + my ($self) = @_; + + my @candidate_names = ( + 'changelog.Debian.gz','changelog.Debian', + 'changelog.debian.gz','changelog.debian', + 'changelog.gz','changelog', + ); + + my $package_path = 'usr/share/doc/' . $self->name; + my @candidate_items = grep { defined } + map { $self->installed->lookup("$package_path/$_") }@candidate_names; + + # pick the first existing file + my $item + = first_value { $_->is_file || length $_->link } @candidate_items; + + return $item; + } +); + +=item changelog + +For binary: + +Returns the changelog of the binary package as a Parse::DebianChangelog +object, or an empty object if the changelog doesn't exist. The changelog-file +collection script must have been run to create the changelog file, which +this method expects to find in F<changelog>. + +=cut + +has changelog => ( + is => 'rw', + lazy => 1, + default => sub { + my ($self) = @_; + + my $changelog = Lintian::Changelog->new; + + my $unresolved = $self->changelog_item; + return $changelog + unless defined $unresolved; + + # stop for dangling symbolic link + my $item = $unresolved->resolve_path; + return $changelog + unless defined $item; + + # return empty changelog + return $changelog + unless $item->is_file && $item->is_open_ok; + + if ($item->basename =~ m{ [.]gz $}x) { + + my $bytes = safe_qx('gunzip', '-c', $item->unpacked_path); + + return $changelog + unless valid_utf8($bytes); + + $changelog->parse(decode_utf8($bytes)); + + return $changelog; + } + + return $changelog + unless $item->is_valid_utf8; + + $changelog->parse($item->decoded_utf8); + + return $changelog; + } +); + +1; + +=back + +=head1 AUTHOR + +Originally written by Felix Lechner <felix.lechner@lease-up.com> for +Lintian. + +=head1 SEE ALSO + +lintian(1) + +=cut + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Processable/Installable/Class.pm b/lib/Lintian/Processable/Installable/Class.pm new file mode 100644 index 0000000..00520be --- /dev/null +++ b/lib/Lintian/Processable/Installable/Class.pm @@ -0,0 +1,139 @@ +# -*- perl -*- +# Lintian::Processable::Installable::Class -- interface to binary package data collection + +# Copyright (C) 2008, 2009 Russ Allbery +# Copyright (C) 2008 Frank Lichtenheld +# Copyright (C) 2012 Kees Cook +# Copyright (C) 2020-2021 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by the Free +# Software Foundation; either version 2 of the License, or (at your option) +# any later version. +# +# This program is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +# more details. +# +# You should have received a copy of the GNU General Public License along with +# this program. If not, see <http://www.gnu.org/licenses/>. + +package Lintian::Processable::Installable::Class; + +use v5.20; +use warnings; +use utf8; + +use Moo::Role; +use namespace::clean; + +=head1 NAME + +Lintian::Processable::Installable::Class - Lintian interface to binary package data collection + +=head1 SYNOPSIS + + my ($name, $type, $dir) = ('foobar', 'binary', '/path/to/lab-entry'); + my $collect = Lintian::Processable::Installable::Class->new($name); + +=head1 DESCRIPTION + +Lintian::Processable::Installable::Class provides an interface to package data for binary +packages. + +=head1 INSTANCE METHODS + +=over 4 + +=item is_debug_package + +The package probably contains only debug symbols. + +=cut + +sub is_debug_package { + my ($self) = @_; + + return 1 + if $self->name =~ /-dbg(?:sym)?/; + + return 0; +} + +=item is_auto_generated + +The package was probably generated automatically. + +=cut + +sub is_auto_generated { + my ($self) = @_; + + return 1 + if $self->fields->declares('Auto-Built-Package'); + + return 0; +} + +=item is_transitional + +The package is probably transitional, i.e. it probably depends + on stuff will eventually disappear. + +=cut + +sub is_transitional { + my ($self) = @_; + + return 1 + if $self->fields->value('Description') =~ /transitional package/i; + + return 0; +} + +=item is_meta_package + +This package is probably some kind of meta or task package. A meta +package is usually empty and just depend on stuff. It also returns +a true value for "tasks" (i.e. tasksel "tasks"). + +=cut + +sub is_meta_package { + my ($self) = @_; + + return 1 + if $self->fields->value('Description') + =~ /meta[ -]?package|(?:dependency|dummy|empty) package/i; + + # section "tasks" or "metapackages" qualifies too + return 1 + if $self->fields->value('Section') =~ m{(?:^|/)(?:tasks|metapackages)$}; + + return 1 + if $self->name =~ /^task-/; + + return 0; +} + +=back + +=head1 AUTHOR + +Originally written by Frank Lichtenheld <djpig@debian.org> for Lintian. +Amended by Felix Lechner <felix.lechner@lease-up.com> for Lintian. + +=head1 SEE ALSO + +lintian(1) + +=cut + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Processable/Installable/Conffiles.pm b/lib/Lintian/Processable/Installable/Conffiles.pm new file mode 100644 index 0000000..50db7f7 --- /dev/null +++ b/lib/Lintian/Processable/Installable/Conffiles.pm @@ -0,0 +1,97 @@ +# -*- perl -*- Lintian::Processable::Installable::Conffiles +# +# Copyright (C) 2019-2021 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by the Free +# Software Foundation; either version 2 of the License, or (at your option) +# any later version. +# +# This program is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +# more details. +# +# You should have received a copy of the GNU General Public License along with +# this program. If not, see <http://www.gnu.org/licenses/>. + +package Lintian::Processable::Installable::Conffiles; + +use v5.20; +use warnings; +use utf8; + +use Lintian::Conffiles; + +use Moo::Role; +use namespace::clean; + +=head1 NAME + +Lintian::Processable::Installable::Conffiles - access to collected control data for conffiles + +=head1 SYNOPSIS + + use Lintian::Processable; + +=head1 DESCRIPTION + +Lintian::Processable::Installable::Conffiles provides an interface to control data for conffiles. + +=head1 INSTANCE METHODS + +=over 4 + +=item conffiles_item + +=cut + +has conffiles_item => ( + is => 'rw', + lazy => 1, + default => sub { + my ($self) = @_; + + return $self->control->resolve_path('conffiles'); + } +); + +=item declared_conffiles + +=cut + +has declared_conffiles => ( + is => 'rw', + lazy => 1, + default => sub { + my ($self) = @_; + + my $item = $self->conffiles_item; + + my $conffiles = Lintian::Conffiles->new; + $conffiles->parse($item, $self); + + return $conffiles; + } +); + +=back + +=head1 AUTHOR + +Originally written by Felix Lechner <felix.lechner@lease-up.com> for +Lintian. + +=head1 SEE ALSO + +lintian(1) + +=cut + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Processable/Installable/Control.pm b/lib/Lintian/Processable/Installable/Control.pm new file mode 100644 index 0000000..b6a72d8 --- /dev/null +++ b/lib/Lintian/Processable/Installable/Control.pm @@ -0,0 +1,99 @@ +# -*- perl -*- Lintian::Processable::Installable::Control +# +# Copyright (C) 2020 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by the Free +# Software Foundation; either version 2 of the License, or (at your option) +# any later version. +# +# This program is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +# more details. +# +# You should have received a copy of the GNU General Public License along with +# this program. If not, see <http://www.gnu.org/licenses/>. + +package Lintian::Processable::Installable::Control; + +use v5.20; +use warnings; +use utf8; + +use Const::Fast; +use List::SomeUtils qw(uniq); + +use Lintian::Index; + +const my $SLASH => q{/}; + +use Moo::Role; +use namespace::clean; + +=head1 NAME + +Lintian::Processable::Installable::Control - access to collected control file data + +=head1 SYNOPSIS + + use Lintian::Processable; + +=head1 DESCRIPTION + +Lintian::Processable::Installable::Control provides an interface to control file data. + +=head1 INSTANCE METHODS + +=over 4 + +=item control + +Returns the index for a binary control file. + +=cut + +has control => ( + is => 'rw', + lazy => 1, + default => sub { + my ($self) = @_; + + my $index = Lintian::Index->new; + my $archive = $self->basename; + $index->identifier("$archive (control)"); + $index->basedir($self->basedir . $SLASH . 'control'); + + # control files are not installed relative to the system root + # disallow absolute paths and symbolic links + + my @command = (qw(dpkg-deb --ctrl-tarfile), $self->path); + my $errors = $index->create_from_piped_tar(\@command); + + my @messages = uniq split(/\n/, $errors); + push(@{$index->unpack_messages}, @messages); + + return $index; + } +); + +=back + +=head1 AUTHOR + +Originally written by Felix Lechner <felix.lechner@lease-up.com> for +Lintian. + +=head1 SEE ALSO + +lintian(1) + +=cut + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Processable/Installable/Installed.pm b/lib/Lintian/Processable/Installable/Installed.pm new file mode 100644 index 0000000..61444ac --- /dev/null +++ b/lib/Lintian/Processable/Installable/Installed.pm @@ -0,0 +1,103 @@ +# -*- perl -*- Lintian::Processable::Installable::Installed +# +# Copyright (C) 2008, 2009 Russ Allbery +# Copyright (C) 2008 Frank Lichtenheld +# Copyright (C) 2012 Kees Cook +# Copyright (C) 2020 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by the Free +# Software Foundation; either version 2 of the License, or (at your option) +# any later version. +# +# This program is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +# more details. +# +# You should have received a copy of the GNU General Public License along with +# this program. If not, see <http://www.gnu.org/licenses/>. + +package Lintian::Processable::Installable::Installed; + +use v5.20; +use warnings; +use utf8; + +use Const::Fast; +use List::SomeUtils qw(uniq); + +use Lintian::Index; + +const my $SLASH => q{/}; + +use Moo::Role; +use namespace::clean; + +=head1 NAME + +Lintian::Processable::Installable::Installed - access to collected data about the upstream (orig) sources + +=head1 SYNOPSIS + + use Lintian::Processable; + +=head1 DESCRIPTION + +Lintian::Processable::Installable::Installed provides an interface to collected data about the upstream (orig) sources. + +=head1 INSTANCE METHODS + +=over 4 + +=item installed + +Returns a index object representing installed files from a binary package. + +=cut + +has installed => ( + is => 'rw', + lazy => 1, + default => sub { + my ($self) = @_; + + my $index = Lintian::Index->new; + my $archive = $self->basename; + $index->identifier("$archive (installed)"); + $index->basedir($self->basedir . $SLASH . 'unpacked'); + + # binary packages are anchored to the system root + # allow absolute paths and symbolic links + $index->anchored(1); + + my @command = (qw(dpkg-deb --fsys-tarfile), $self->path); + my $errors = $index->create_from_piped_tar(\@command); + + my @messages = uniq split(/\n/, $errors); + push(@{$index->unpack_messages}, @messages); + + return $index; + } +); + +=back + +=head1 AUTHOR + +Originally written by Felix Lechner <felix.lechner@lease-up.com> for +Lintian. + +=head1 SEE ALSO + +lintian(1) + +=cut + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Processable/Installable/Overrides.pm b/lib/Lintian/Processable/Installable/Overrides.pm new file mode 100644 index 0000000..0da551f --- /dev/null +++ b/lib/Lintian/Processable/Installable/Overrides.pm @@ -0,0 +1,131 @@ +# -*- perl -*- Lintian::Processable::Installable::Overrides +# +# Copyright (C) 2019-2021 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by the Free +# Software Foundation; either version 2 of the License, or (at your option) +# any later version. +# +# This program is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +# more details. +# +# You should have received a copy of the GNU General Public License along with +# this program. If not, see <http://www.gnu.org/licenses/>. + +package Lintian::Processable::Installable::Overrides; + +use v5.20; +use warnings; +use utf8; + +use Const::Fast; +use PerlIO::gzip; +use List::SomeUtils qw(first_value); +use Unicode::UTF8 qw(valid_utf8 decode_utf8 encode_utf8); + +use Moo::Role; +use namespace::clean; + +with 'Lintian::Processable::Overrides'; + +const my $EMPTY => q{}; + +=head1 NAME + +Lintian::Processable::Installable::Overrides - access to override data + +=head1 SYNOPSIS + + use Lintian::Processable; + +=head1 DESCRIPTION + +Lintian::Processable::Installable::Overrides provides an interface for overrides. + +=head1 INSTANCE METHODS + +=over 4 + +=item override_file + +=cut + +has override_file => ( + is => 'rw', + lazy => 1, + default => sub { + my ($self) = @_; + + my $unzipped = 'usr/share/lintian/overrides/' . $self->name; + + my @candidates = map { $unzipped . $_ } ($EMPTY, '.gz'); + + # pick the first + my $override_item= first_value { defined } + map { $self->installed->lookup($_) } @candidates; + + return $override_item; + } +); + +=item overrides + +=cut + +has overrides => ( + is => 'rw', + lazy => 1, + default => sub { + my ($self) = @_; + + return [] + unless defined $self->override_file; + + my $contents = $EMPTY; + + if ($self->override_file->name =~ m{ [.]gz $}x) { + + my $local_path = $self->override_file->unpacked_path; + + open(my $fd, '<:gzip', $local_path) + or die encode_utf8("Cannot open $local_path."); + + local $/ = undef; + my $bytes = <$fd>; + + $contents = decode_utf8($bytes) + if valid_utf8($bytes); + + close $fd; + + } else { + $contents = $self->override_file->decoded_utf8; + } + + return $self->parse_overrides($contents); + } +); + +1; + +=back + +=head1 AUTHOR + +Originally written by Felix Lechner <felix.lechner@lease-up.com> for +Lintian. + +=head1 SEE ALSO + +lintian(1) + +=cut + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Processable/Installable/Relation.pm b/lib/Lintian/Processable/Installable/Relation.pm new file mode 100644 index 0000000..ac94489 --- /dev/null +++ b/lib/Lintian/Processable/Installable/Relation.pm @@ -0,0 +1,154 @@ +# -*- perl -*- +# Lintian::Processable::Installable::Relation -- interface to binary package data collection + +# Copyright (C) 2008, 2009 Russ Allbery +# Copyright (C) 2008 Frank Lichtenheld +# Copyright (C) 2012 Kees Cook +# Copyright (C) 2020 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by the Free +# Software Foundation; either version 2 of the License, or (at your option) +# any later version. +# +# This program is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +# more details. +# +# You should have received a copy of the GNU General Public License along with +# this program. If not, see <http://www.gnu.org/licenses/>. + +package Lintian::Processable::Installable::Relation; + +use v5.20; +use warnings; +use utf8; + +use Carp qw(croak); +use Unicode::UTF8 qw(encode_utf8); + +use Lintian::Relation; + +use Moo::Role; +use namespace::clean; + +=head1 NAME + +Lintian::Processable::Installable::Relation - Lintian interface to binary package data collection + +=head1 SYNOPSIS + + my ($name, $type, $dir) = ('foobar', 'binary', '/path/to/lab-entry'); + my $collect = Lintian::Processable::Installable::Relation->new($name); + +=head1 DESCRIPTION + +Lintian::Processable::Installable::Relation provides an interface to package data for binary +packages. It implements data collection methods specific to binary +packages. + +This module is in its infancy. Most of Lintian still reads all data from +files in the laboratory whenever that data is needed and generates that +data via collect scripts. The goal is to eventually access all data about +binary packages via this module so that the module can cache data where +appropriate and possibly retire collect scripts in favor of caching that +data in memory. + +Native heuristics are only available in source packages. + +=head1 INSTANCE METHODS + +=over 4 + +=item relation (FIELD) + +Returns a L<Lintian::Relation> object for the specified FIELD, which should +be one of the possible relationship fields of a Debian package or one of +the following special values: + +=over 4 + +=item All + +The concatenation of Pre-Depends, Depends, Recommends, and Suggests. + +=item Strong + +The concatenation of Pre-Depends and Depends. + +=item Weak + +The concatenation of Recommends and Suggests. + +=back + +If FIELD isn't present in the package, the returned Lintian::Relation +object will be empty (always present and satisfies nothing). + +=item saved_relations + +=cut + +has saved_relations => ( + is => 'rw', + coerce => sub { my ($hashref) = @_; return ($hashref // {}); }, + default => sub { {} } +); + +my %alias = ( + all => [qw(Pre-Depends Depends Recommends Suggests)], + strong => [qw(Pre-Depends Depends)], + weak => [qw(Recommends Suggests)] +); + +my %known = map { $_ => 1 } + qw(pre-depends depends recommends suggests enhances breaks + conflicts provides replaces); + +sub relation { + my ($self, $name) = @_; + + my $lowercase = lc $name; + + my $relation = $self->saved_relations->{$lowercase}; + unless (defined $relation) { + + if (exists $alias{$lowercase}) { + $relation + = Lintian::Relation->new->logical_and(map { $self->relation($_) } + @{ $alias{$lowercase} }); + } else { + croak encode_utf8("unknown relation field $name") + unless $known{$lowercase}; + + my $value = $self->fields->value($name); + $relation = Lintian::Relation->new->load($value); + } + + $self->saved_relations->{$lowercase} = $relation; + } + + return $relation; +} + +=back + +=head1 AUTHOR + +Originally written by Frank Lichtenheld <djpig@debian.org> for Lintian. +Amended by Felix Lechner <felix.lechner@lease-up.com> for Lintian. + +=head1 SEE ALSO + +lintian(1) + +=cut + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Processable/IsNonFree.pm b/lib/Lintian/Processable/IsNonFree.pm new file mode 100644 index 0000000..e87ba90 --- /dev/null +++ b/lib/Lintian/Processable/IsNonFree.pm @@ -0,0 +1,108 @@ +# -*- perl -*- +# Lintian::Processable::IsNonFree -- interface to source package data collection + +# Copyright (C) 2008 Russ Allbery +# Copyright (C) 2009 Raphael Geissert +# Copyright (C) 2020 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by the Free +# Software Foundation; either version 2 of the License, or (at your option) +# any later version. +# +# This program is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +# more details. +# +# You should have received a copy of the GNU General Public License along with +# this program. If not, see <http://www.gnu.org/licenses/>. + +package Lintian::Processable::IsNonFree; + +use v5.20; +use warnings; +use utf8; + +use Moo::Role; +use namespace::clean; + +=head1 NAME + +Lintian::Processable::IsNonFree - Lintian interface to source package data collection + +=head1 SYNOPSIS + + my ($name, $type, $dir) = ('foobar', 'source', '/path/to/lab-entry'); + my $collect = Lintian::Processable::IsNonFree->new($name); + if ($collect->native) { + print encode_utf8("Package is native\n"); + } + +=head1 DESCRIPTION + +Lintian::Processable::IsNonFree provides an interface to package data for source +packages. It implements data collection methods specific to source +packages. + +This module is in its infancy. Most of Lintian still reads all data from +files in the laboratory whenever that data is needed and generates that +data via collect scripts. The goal is to eventually access all data about +source packages via this module so that the module can cache data where +appropriate and possibly retire collect scripts in favor of caching that +data in memory. + +=head1 INSTANCE METHODS + +=over 4 + +=item is_non_free + +Returns a truth value if the package appears to be non-free (based on +the section field; "non-free/*" and "restricted/*") + +=cut + +has is_non_free => ( + is => 'rw', + lazy => 1, + default => sub { + my ($self) = @_; + + my $section; + + if ($self->type eq 'source') { + $section = $self->debian_control->source_fields->value('Section'); + } else { + $section = $self->fields->value('Section'); + } + + $section ||= 'main'; + + return 1 + if $section =~ m{^(?:non-free|restricted|multiverse)/}; + + return 0; + } +); + +=back + +=head1 AUTHOR + +Originally written by Russ Allbery <rra@debian.org> for Lintian. +Amended by Felix Lechner <felix.lechner@lease-up.com> for Lintian. + +=head1 SEE ALSO + +lintian(1) + +=cut + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Processable/NotJustDocs.pm b/lib/Lintian/Processable/NotJustDocs.pm new file mode 100644 index 0000000..1e08760 --- /dev/null +++ b/lib/Lintian/Processable/NotJustDocs.pm @@ -0,0 +1,112 @@ +# -*- perl -*- +# Lintian::Processable::NotJustDocs + +# Copyright (C) 2020 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by the Free +# Software Foundation; either version 2 of the License, or (at your option) +# any later version. +# +# This program is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +# more details. +# +# You should have received a copy of the GNU General Public License along with +# this program. If not, see <http://www.gnu.org/licenses/>. + +package Lintian::Processable::NotJustDocs; + +use v5.20; +use warnings; +use utf8; + +use Moo::Role; +use namespace::clean; + +=head1 NAME + +Lintian::Processable::NotJustDocs - Lintian interface to installable package data collection + +=head1 SYNOPSIS + + my $processable = Lintian::Processable::Installable->new; + + my $is_empty = $processable->not_just_docs; + +=head1 DESCRIPTION + +Lintian::Processable::NotJustDocs provides an interface to package data for installation +packages. + +=head1 INSTANCE METHODS + +=over 4 + +=item not_just_docs + +Returns a truth value if the package appears to be empty. + +=cut + +has not_just_docs => ( + is => 'rw', + lazy => 1, + default => sub { + my ($self) = @_; + + my $quoted_name = quotemeta($self->name); + + my $empty = 1; + for my $item (@{$self->installed->sorted_list}) { + + # ignore directories + next + if $item->is_dir; + + # skip /usr/share/doc/$name symlinks. + next + if $item->name eq 'usr/share/doc/' . $self->name; + + # only look outside /usr/share/doc/$name directory + next + if $item->name =~ m{^usr/share/doc/$quoted_name}; + + # except if it is a lintian override. + next + if $item->name =~ m{\A + # Except for: + usr/share/ (?: + # lintian overrides + lintian/overrides/$quoted_name(?:\.gz)? + # reportbug scripts/utilities + | bug/$quoted_name(?:/(?:control|presubj|script))? + )\Z}xsm; + + return 0; + } + + return 1; + } +); + +=back + +=head1 AUTHOR + +Originally written by Felix Lechner <felix.lechner@lease-up.com> for Lintian. + +=head1 SEE ALSO + +lintian(1) + +=cut + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Processable/Overrides.pm b/lib/Lintian/Processable/Overrides.pm new file mode 100644 index 0000000..0de05a4 --- /dev/null +++ b/lib/Lintian/Processable/Overrides.pm @@ -0,0 +1,219 @@ +# -*- perl -*- Lintian::Processable::Overrides +# +# Copyright (C) 2019-2021 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by the Free +# Software Foundation; either version 2 of the License, or (at your option) +# any later version. +# +# This program is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +# more details. +# +# You should have received a copy of the GNU General Public License along with +# this program. If not, see <http://www.gnu.org/licenses/>. + +package Lintian::Processable::Overrides; + +use v5.20; +use warnings; +use utf8; + +use Const::Fast; + +use Lintian::Override; + +const my $EMPTY => q{}; +const my $SPACE => q{ }; + +use Moo::Role; +use namespace::clean; + +=head1 NAME + +Lintian::Processable::Overrides - access to override data + +=head1 SYNOPSIS + + use Lintian::Processable; + +=head1 DESCRIPTION + +Lintian::Processable::Overrides provides an interface to overrides. + +=head1 INSTANCE METHODS + +=over 4 + +=item override_errors + +=cut + +has override_errors => (is => 'rw', default => sub { [] }); + +=item parse_overrides + +=cut + +sub parse_overrides { + my ($self, $contents) = @_; + + $contents //= $EMPTY; + + my @declared_overrides; + + my $justification = $EMPTY; + my $previous = Lintian::Override->new; + + my @lines = split(/\n/, $contents); + + my $position = 1; + for my $line (@lines) { + + my $remaining = $line; + + # trim both ends + $remaining =~ s/^\s+|\s+$//g; + + if ($remaining eq $EMPTY) { + # Throw away comments, as they are not attached to a tag + # also throw away the option of "carrying over" the last + # comment + $justification = $EMPTY; + $previous = Lintian::Override->new; + next; + } + + if ($remaining =~ s{^ [#] \s* }{}x) { + + if (length $remaining) { + + $justification .= $SPACE + if length $justification; + + $justification .= $remaining; + } + + next; + } + + # reduce white space + $remaining =~ s/\s+/ /g; + + # [[pkg-name] [arch-list] [pkg-type]:] <tag> [context] + my $require_colon = 0; + my @architectures; + + # strip package name, if present; require name + # parsing overrides is ambiguous (see #699628) + my $package = $self->name; + if ($remaining =~ s/^\Q$package\E(?=\s|:)//) { + + # both spaces or colon were unmatched lookhead + $remaining =~ s/^\s+//; + $require_colon = 1; + } + + # remove architecture list + if ($remaining =~ s{^ \[ ([^\]]*) \] (?=\s|:)}{}x) { + + my $list = $1; + + @architectures = split($SPACE, $list); + + # both spaces or colon were unmatched lookhead + $remaining =~ s/^\s+//; + $require_colon = 1; + } + + # remove package type + my $type = $self->type; + if ($remaining =~ s/^\Q$type\E(?=\s|:)//) { + + # both spaces or colon were unmatched lookhead + $remaining =~ s/^\s+//; + $require_colon = 1; + } + + my $pointer = $self->override_file->pointer($position); + + # require and remove colon when any package details are present + if ($require_colon && $remaining !~ s/^\s*:\s*//) { + + my %error; + $error{message} = 'Expected a colon'; + $error{pointer} = $pointer; + push(@{$self->override_errors}, \%error); + + next; + } + + my $hint_like = $remaining; + + my ($tag_name, $pattern) = split($SPACE, $hint_like, 2); + + if (!length $tag_name) { + + my %error; + $error{message} = "Cannot parse line: $line"; + $error{pointer} = $pointer; + push(@{$self->override_errors}, \%error); + + next; + } + + $pattern //= $EMPTY; + + # There are no new comments, no "empty line" in between and + # this tag is the same as the last, so we "carry over" the + # comment from the previous override (if any). + $justification = $previous->justification + if !length $justification + && $tag_name eq $previous->tag_name; + + my $current = Lintian::Override->new; + + $current->tag_name($tag_name); + $current->architectures(\@architectures); + $current->pattern($pattern); + $current->position($position); + + # combine successive white space + $justification =~ s{ \s+ }{ }gx; + + $current->justification($justification); + $justification = $EMPTY; + + push(@declared_overrides, $current); + + $previous = $current; + + } continue { + $position++; + } + + return \@declared_overrides; +} + +1; + +=back + +=head1 AUTHOR + +Originally written by Felix Lechner <felix.lechner@lease-up.com> for +Lintian. + +=head1 SEE ALSO + +lintian(1) + +=cut + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Processable/Source.pm b/lib/Lintian/Processable/Source.pm new file mode 100644 index 0000000..e4dc001 --- /dev/null +++ b/lib/Lintian/Processable/Source.pm @@ -0,0 +1,142 @@ +# Copyright (C) 2019-2020 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Processable::Source; + +use v5.20; +use warnings; +use utf8; + +use Carp qw(croak); +use File::Spec; +use Unicode::UTF8 qw(encode_utf8); + +use Lintian::Deb822; + +use Moo; +use namespace::clean; + +with + 'Lintian::Processable', + 'Lintian::Processable::Diffstat', + 'Lintian::Processable::Changelog::Version', + 'Lintian::Processable::Debian::Control', + 'Lintian::Processable::Fields::Files', + 'Lintian::Processable::IsNonFree', + 'Lintian::Processable::Source::Changelog', + 'Lintian::Processable::Source::Components', + 'Lintian::Processable::Source::Format', + 'Lintian::Processable::Source::Orig', + 'Lintian::Processable::Source::Overrides', + 'Lintian::Processable::Source::Patched', + 'Lintian::Processable::Source::Relation', + 'Lintian::Processable::Source::Repacked'; + +=for Pod::Coverage BUILDARGS + +=head1 NAME + +Lintian::Processable::Source -- A dsc source package Lintian can process + +=head1 SYNOPSIS + + use Lintian::Processable::Source; + + my $processable = Lintian::Processable::Source->new; + $processable->init_from_file('path'); + +=head1 DESCRIPTION + +This class represents a 'dsc' file that Lintian can process. Objects +of this kind are often part of a L<Lintian::Group>, which +represents all the files in a changes or buildinfo file. + +=head1 INSTANCE METHODS + +=over 4 + +=item init_from_file (PATH) + +Initializes a new object from PATH. + +=cut + +sub init_from_file { + my ($self, $file) = @_; + + croak encode_utf8("File $file does not exist") + unless -e $file; + + $self->path($file); + $self->type('source'); + + my $primary = Lintian::Deb822->new; + my @sections = $primary->read_file($self->path) + or croak encode_utf8($self->path . ' is not valid dsc file'); + + $self->fields($sections[0]); + + my $name = $self->fields->value('Source'); + my $version = $self->fields->value('Version'); + my $architecture = 'source'; + + # it is its own source package + my $source_name = $name; + my $source_version = $version; + + croak encode_utf8($self->path . ' is missing Source field') + unless length $name; + + $self->name($name); + $self->version($version); + $self->architecture($architecture); + $self->source_name($source_name); + $self->source_version($source_version); + + # make sure none of these fields can cause traversal + $self->tainted(1) + if $self->name ne $name + || $self->version ne $version + || $self->architecture ne $architecture + || $self->source_name ne $source_name + || $self->source_version ne $source_version; + + return; +} + +=back + +=head1 AUTHOR + +Originally written by Felix Lechner <felix.lechner@lease-up.com> for Lintian. + +=head1 SEE ALSO + +lintian(1) + +L<Lintian::Processable> + +=cut + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Processable/Source/Changelog.pm b/lib/Lintian/Processable/Source/Changelog.pm new file mode 100644 index 0000000..a781057 --- /dev/null +++ b/lib/Lintian/Processable/Source/Changelog.pm @@ -0,0 +1,109 @@ +# -*- perl -*- Lintian::Processable::Source::Changelog -- access to collected changelog data +# +# Copyright (C) 1998 Richard Braakman +# Copyright (C) 2019-2021 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by the Free +# Software Foundation; either version 2 of the License, or (at your option) +# any later version. +# +# This program is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +# more details. +# +# You should have received a copy of the GNU General Public License along with +# this program. If not, see <http://www.gnu.org/licenses/>. + +package Lintian::Processable::Source::Changelog; + +use v5.20; +use warnings; +use utf8; + +use Moo::Role; +use namespace::clean; + +=head1 NAME + +Lintian::Processable::Source::Changelog - access to collected changelog data + +=head1 SYNOPSIS + + use Lintian::Processable; + +=head1 DESCRIPTION + +Lintian::Processable::Source::Changelog provides an interface to changelog data. + +=head1 INSTANCE METHODS + +=over 4 + +=item changelog_item + +=cut + +has changelog_item => ( + is => 'rw', + lazy => 1, + default => sub { + my ($self) = @_; + + my $item = $self->patched->resolve_path('debian/changelog'); + + return $item; + } +); + +=item changelog + +Returns the changelog of the source package as a Parse::DebianChangelog +object, or an empty object if the changelog cannot be resolved safely. + +=cut + +has changelog => ( + is => 'rw', + lazy => 1, + default => sub { + my ($self) = @_; + + my $changelog = Lintian::Changelog->new; + + my $item = $self->changelog_item; + + # return empty changelog + return $changelog + unless defined $item && $item->is_open_ok; + + return $changelog + unless $item->is_valid_utf8; + + $changelog->parse($item->decoded_utf8); + + return $changelog; + } +); + +1; + +=back + +=head1 AUTHOR + +Originally written by Felix Lechner <felix.lechner@lease-up.com> for +Lintian. + +=head1 SEE ALSO + +lintian(1) + +=cut + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Processable/Source/Components.pm b/lib/Lintian/Processable/Source/Components.pm new file mode 100644 index 0000000..1541abe --- /dev/null +++ b/lib/Lintian/Processable/Source/Components.pm @@ -0,0 +1,126 @@ +# -*- perl -*- +# Lintian::Processable::Source::Components -- interface to orig tag components +# +# Copyright (C) 2020 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by the Free +# Software Foundation; either version 2 of the License, or (at your option) +# any later version. +# +# This program is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +# more details. +# +# You should have received a copy of the GNU General Public License along with +# this program. If not, see <http://www.gnu.org/licenses/>. + +package Lintian::Processable::Source::Components; + +use v5.20; +use warnings; +use utf8; + +use Const::Fast; +use Unicode::UTF8 qw(encode_utf8); + +use Moo::Role; +use namespace::clean; + +const my $EMPTY => q{}; + +=head1 NAME + +Lintian::Processable::Source::Components - interface to orig tar components + +=head1 SYNOPSIS + + use Moo; + + with 'Lintian::Processable::Source::Components'; + +=head1 DESCRIPTION + +Lintian::Processable::Source::Components provides an interface to data for +upstream source components. Most sources only use one tarball. + +=head1 INSTANCE METHODS + +=over 4 + +=item components + +Returns a reference to a hash containing information about source components +listed in the .dsc file. The key is the filename, and the value is the name +of the component. + +=cut + +has components => ( + is => 'rw', + lazy => 1, + default => sub { + my ($self) = @_; + + # determine source and version; handle missing fields + my $name = $self->fields->value('Source'); + my $version = $self->fields->value('Version'); + my $architecture = 'source'; + + # it is its own source package + my $source = $name; + my $source_version = $version; + + # version handling based on Dpkg::Version::parseversion. + my $noepoch = $source_version; + if ($noepoch =~ /:/) { + $noepoch =~ s/^(?:\d+):(.+)/$1/ + or die encode_utf8("Bad version number '$noepoch'"); + } + + my $baserev = $source . '_' . $noepoch; + + # strip debian revision + $noepoch =~ s/(.+)-(?:.*)$/$1/; + my $base = $source . '_' . $noepoch; + + my $files = $self->files; + + my %components; + for my $name (keys %{$files}) { + + # Look for $pkg_$version.orig(-$comp)?.tar.$ext (non-native) + # or $pkg_$version.tar.$ext (native) + # - This deliberately does not look for the debian packaging + # even when this would be a tarball. + if ($name + =~ /^(?:\Q$base\E\.orig(?:-(.*))?|\Q$baserev\E)\.tar\.(?:gz|bz2|lzma|xz)$/ + ) { + $components{$name} = $1 // $EMPTY; + } + } + + return \%components; + } +); + +=back + +=head1 AUTHOR + +Originally written by Adam D. Barratt <adsb@debian.org> for Lintian. + +=head1 SEE ALSO + +lintian(1), L<Lintian::Processable> + +=cut + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Processable/Source/Format.pm b/lib/Lintian/Processable/Source/Format.pm new file mode 100644 index 0000000..551f93e --- /dev/null +++ b/lib/Lintian/Processable/Source/Format.pm @@ -0,0 +1,136 @@ +# -*- perl -*- +# Lintian::Processable::Source::Format -- interface to source package data collection + +# Copyright (C) 2008 Russ Allbery +# Copyright (C) 2009 Raphael Geissert +# Copyright (C) 2020 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by the Free +# Software Foundation; either version 2 of the License, or (at your option) +# any later version. +# +# This program is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +# more details. +# +# You should have received a copy of the GNU General Public License along with +# this program. If not, see <http://www.gnu.org/licenses/>. + +package Lintian::Processable::Source::Format; + +use v5.20; +use warnings; +use utf8; + +use Const::Fast; +use Path::Tiny; + +use Moo::Role; +use namespace::clean; + +const my $UNDERSCORE => q{_}; + +=head1 NAME + +Lintian::Processable::Source::Format - Lintian interface to source format + +=head1 SYNOPSIS + + my $collect = Lintian::Processable::Source::Format->new; + +=head1 DESCRIPTION + +Lintian::Processable::Source::Format provides an interface to source format +information. + +=head1 INSTANCE METHODS + +=over 4 + +=item source_format + +=cut + +has source_format => ( + is => 'rw', + lazy => 1, + default => sub { + my ($self) = @_; + + my $format = $self->fields->value('Format') || '1.0'; + + return $format; + } +); + +=item native + +Returns true if the source package is native and false otherwise. +This is generally determined from the source format, though in the 1.0 +case the nativeness is determined by looking for the diff.gz (using +the name of the source package and its version). + +If the source format is 1.0 and the version number is absent, this +will return false (as native packages are a lot rarer than non-native +ones). + +Note if the source format is missing, it is assumed to be a 1.0 +package. + +=cut + +has native => ( + is => 'rw', + lazy => 1, + default => sub { + my ($self) = @_; + + my $format = $self->source_format; + + return 0 + if $format =~ /^\s*2\.0\s*$/; + + return 0 + if $format =~ /^\s*3\.0\s+\(quilt|git\)\s*$/; + + return 1 + if $format =~ /^\s*3\.0\s+\(native\)\s*$/; + + my $version = $self->fields->value('Version'); + return 0 + unless length $version; + + # strip epoch + $version =~ s/^\d+://; + + my $diffname = $self->name . $UNDERSCORE . "$version.diff.gz"; + + return 0 + if exists $self->files->{$diffname}; + + return 1; + } +); + +=back + +=head1 AUTHOR + +Originally written by Russ Allbery <rra@debian.org> for Lintian. +Amended by Felix Lechner <felix.lechner@lease-up.com> for Lintian. + +=head1 SEE ALSO + +lintian(1), Lintian::Relation(3) + +=cut + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Processable/Source/Orig.pm b/lib/Lintian/Processable/Source/Orig.pm new file mode 100644 index 0000000..022fa94 --- /dev/null +++ b/lib/Lintian/Processable/Source/Orig.pm @@ -0,0 +1,200 @@ +# -*- perl -*- Lintian::Processable::Source::Orig +# +# Copyright (C) 2020 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by the Free +# Software Foundation; either version 2 of the License, or (at your option) +# any later version. +# +# This program is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +# more details. +# +# You should have received a copy of the GNU General Public License along with +# this program. If not, see <http://www.gnu.org/licenses/>. + +package Lintian::Processable::Source::Orig; + +use v5.20; +use warnings; +use utf8; + +use Const::Fast; +use List::SomeUtils qw(uniq); +use List::UtilsBy qw(sort_by); +use Path::Tiny; +use Unicode::UTF8 qw(encode_utf8); + +use Lintian::Index; + +const my $EMPTY => q{}; +const my $SPACE => q{ }; +const my $SLASH => q{/}; + +use Moo::Role; +use namespace::clean; + +=head1 NAME + +Lintian::Processable::Source::Orig - access to collected data about the upstream (orig) sources + +=head1 SYNOPSIS + + use Lintian::Processable; + +=head1 DESCRIPTION + +Lintian::Processable::Source::Orig provides an interface to collected data about the upstream (orig) sources. + +=head1 INSTANCE METHODS + +=over 4 + +=item orig + +Returns the index for orig.tar.gz. + +=cut + +my %DECOMPRESS_COMMAND = ( + 'gz' => 'gzip --decompress --stdout', + 'bz2' => 'bzip2 --decompress --stdout', + 'xz' => 'xz --decompress --stdout', +); + +has orig => ( + is => 'rw', + lazy => 1, + default => sub { + my ($self) = @_; + + my $index = Lintian::Index->new; + my $archive = $self->basename; + $index->identifier("$archive (orig)"); + $index->basedir($self->basedir . $SLASH . 'orig'); + + return $index + if $self->native; + + # source packages can be unpacked anywhere; no anchored roots + $index->anchored(0); + + my %components = %{$self->components}; + + # keep sort order; root is missing below otherwise + my @tarballs = sort_by { $components{$_} } keys %components; + + for my $tarball (@tarballs) { + + my $component = $components{$tarball}; + + # so far, all archives with components had an extra level + my $component_dir = $index->basedir; + $component_dir .= $SLASH . $component + if length $component; + + my $subindex = Lintian::Index->new; + $subindex->basedir($component_dir); + + # source packages can be unpacked anywhere; no anchored roots + $index->anchored(0); + + my ($extension) = ($tarball =~ /\.([^.]+)$/); + die encode_utf8("Source component $tarball has no file exension\n") + unless length $extension; + + my $decompress = $DECOMPRESS_COMMAND{lc $extension}; + die encode_utf8("Don't know how to decompress $tarball") + unless $decompress; + + my @command + = (split($SPACE, $decompress), + $self->basedir . $SLASH . $tarball); + + my $errors = $subindex->create_from_piped_tar(\@command); + + push(@{$index->unpack_messages}, "$tarball . $_") + for uniq split(/\n/, $errors); + + # treat hard links like regular files + my @hardlinks = grep { $_->is_hardlink } @{$subindex->sorted_list}; + for my $item (@hardlinks) { + + my $target = $subindex->lookup($item->link); + + $item->unpacked_path($target->unpacked_path); + $item->size($target->size); + $item->link($EMPTY); + + # turn into a regular file + my $perm = $item->perm; + $perm =~ s/^-/h/; + $item->perm($perm); + + $item->path_info( + ($item->path_info & ~Lintian::Index::Item::TYPE_HARDLINK) + | Lintian::Index::Item::TYPE_FILE); + } + + my @prefixes = @{$subindex->sorted_list}; + + # keep top level prefixes; no trailing slashes + s{^([^/]+).*$}{$1}s for @prefixes; + + # squash identical values; ignore root entry ('') + my @unique = grep { length } uniq @prefixes; + + # check for single common value + if (@unique == 1) { + + # no trailing slash for directories + my $common = $unique[0]; + + # proceed if no file with that name (lacks slash) + my $conflict = $subindex->lookup($common); + unless (defined $conflict) { + + if ($common ne $component || length $component) { + + # shortens paths; keeps same base directory + my $sub_errors = $subindex->drop_common_prefix; + + push(@{$index->unpack_errors}, "$tarball . $_") + for uniq split(/\n/, $sub_errors); + } + } + } + + # lowers base directory to match index being merged into + $subindex->capture_common_prefix + if length $component; + + $index->merge_in($subindex); + } + + return $index; + } +); + +=back + +=head1 AUTHOR + +Originally written by Felix Lechner <felix.lechner@lease-up.com> for +Lintian. + +=head1 SEE ALSO + +lintian(1) + +=cut + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Processable/Source/Overrides.pm b/lib/Lintian/Processable/Source/Overrides.pm new file mode 100644 index 0000000..d4c446f --- /dev/null +++ b/lib/Lintian/Processable/Source/Overrides.pm @@ -0,0 +1,109 @@ +# -*- perl -*- Lintian::Processable::Source::Overrides +# +# Copyright (C) 2019-2021 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by the Free +# Software Foundation; either version 2 of the License, or (at your option) +# any later version. +# +# This program is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +# more details. +# +# You should have received a copy of the GNU General Public License along with +# this program. If not, see <http://www.gnu.org/licenses/>. + +package Lintian::Processable::Source::Overrides; + +use v5.20; +use warnings; +use utf8; + +use List::SomeUtils qw(first_value); + +use Moo::Role; +use namespace::clean; + +with 'Lintian::Processable::Overrides'; + +=head1 NAME + +Lintian::Processable::Source::Overrides - access to override data + +=head1 SYNOPSIS + + use Lintian::Processable; + +=head1 DESCRIPTION + +Lintian::Processable::Source::Overrides provides an interface to overrides. + +=head1 INSTANCE METHODS + +=over 4 + +=item override_file + +=cut + +has override_file => ( + is => 'rw', + lazy => 1, + default => sub { + my ($self) = @_; + + # prefer source/lintian-overrides to source.lintian-overrides + my @candidates = ( + 'debian/source/lintian-overrides', + 'debian/source.lintian-overrides' + ); + + # pick the first + my $override_item= first_value { defined } + map { $self->patched->lookup($_) } @candidates; + + return $override_item; + } +); + +=item overrides + +=cut + +has overrides => ( + is => 'rw', + lazy => 1, + default => sub { + my ($self) = @_; + + return [] + unless defined $self->override_file; + + my $contents = $self->override_file->decoded_utf8; + + return $self->parse_overrides($contents); + } +); + +1; + +=back + +=head1 AUTHOR + +Originally written by Felix Lechner <felix.lechner@lease-up.com> for +Lintian. + +=head1 SEE ALSO + +lintian(1) + +=cut + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Processable/Source/Patched.pm b/lib/Lintian/Processable/Source/Patched.pm new file mode 100644 index 0000000..8d76770 --- /dev/null +++ b/lib/Lintian/Processable/Source/Patched.pm @@ -0,0 +1,161 @@ +# -*- perl -*- Lintian::Processable::Source::Patched +# +# Copyright (C) 2008 Russ Allbery +# Copyright (C) 2009 Raphael Geissert +# Copyright (C) 2020 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by the Free +# Software Foundation; either version 2 of the License, or (at your option) +# any later version. +# +# This program is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +# more details. +# +# You should have received a copy of the GNU General Public License along with +# this program. If not, see <http://www.gnu.org/licenses/>. + +package Lintian::Processable::Source::Patched; + +use v5.20; +use warnings; +use utf8; + +use Const::Fast; +use Cwd; +use List::SomeUtils qw(uniq); +use IPC::Run3; +use Path::Tiny; +use Unicode::UTF8 qw(encode_utf8 decode_utf8); + +use Lintian::Index; +use Lintian::Index::Item; + +const my $COLON => q{:}; +const my $SLASH => q{/}; +const my $NEWLINE => qq{\n}; + +const my $NO_UMASK => 0000; +const my $WAIT_STATUS_SHIFT => 8; + +use Moo::Role; +use namespace::clean; + +=head1 NAME + +Lintian::Processable::Source::Patched - access to sources with Debian patches applied + +=head1 SYNOPSIS + + use Lintian::Processable; + +=head1 DESCRIPTION + +Lintian::Processable::Source::Patched provides an interface to collected data about patched sources. + +=head1 INSTANCE METHODS + +=over 4 + +=item patched + +Returns a index object representing a patched source tree. + +=cut + +has patched => ( + is => 'rw', + lazy => 1, + default => sub { + my ($self) = @_; + + my $index = Lintian::Index->new; + my $archive = $self->basename; + $index->identifier("$archive (patched)"); + $index->basedir($self->basedir . $SLASH . 'unpacked'); + + # source packages can be unpacked anywhere; no anchored roots + $index->anchored(0); + + path($index->basedir)->remove_tree + if -d $index->basedir; + + print encode_utf8("N: Using dpkg-source to unpack\n") + if $ENV{'LINTIAN_DEBUG'}; + + my $saved_umask = umask; + umask $NO_UMASK; + + my @unpack_command= ( + qw(dpkg-source -q --no-check --extract), + $self->path, $index->basedir + ); + + # ignore STDOUT; older versions are not completely quiet with -q + my $unpack_errors; + + run3(\@unpack_command, \undef, \undef, \$unpack_errors); + my $status = ($? >> $WAIT_STATUS_SHIFT); + + $unpack_errors = decode_utf8($unpack_errors) + if length $unpack_errors; + + if ($status) { + my $message = "Non-zero status $status from @unpack_command"; + $message .= $COLON . $NEWLINE . $unpack_errors + if length $unpack_errors; + + die encode_utf8($message); + } + + umask $saved_umask; + + my $index_errors = $index->create_from_basedir; + + my $savedir = getcwd; + chdir($index->basedir) + or die encode_utf8('Cannot change to directory ' . $index->basedir); + + # fix permissions + my @permissions_command + = ('chmod', '-R', 'u+rwX,o+rX,o-w', $index->basedir); + my $permissions_errors; + + run3(\@permissions_command, \undef, \undef, \$permissions_errors); + + $permissions_errors = decode_utf8($permissions_errors) + if length $permissions_errors; + + chdir($savedir) + or die encode_utf8("Cannot change to directory $savedir"); + + my @messages + = split(/\n/, $unpack_errors . $index_errors . $permissions_errors); + push(@{$index->unpack_messages}, @messages); + + return $index; + } +); + +=back + +=head1 AUTHOR + +Originally written by Felix Lechner <felix.lechner@lease-up.com> for +Lintian. + +=head1 SEE ALSO + +lintian(1) + +=cut + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Processable/Source/Relation.pm b/lib/Lintian/Processable/Source/Relation.pm new file mode 100644 index 0000000..e66297c --- /dev/null +++ b/lib/Lintian/Processable/Source/Relation.pm @@ -0,0 +1,267 @@ +# -*- perl -*- +# Lintian::Processable::Source::Relation -- interface to source package data collection + +# Copyright (C) 2008 Russ Allbery +# Copyright (C) 2009 Raphael Geissert +# Copyright (C) 2020 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by the Free +# Software Foundation; either version 2 of the License, or (at your option) +# any later version. +# +# This program is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +# more details. +# +# You should have received a copy of the GNU General Public License along with +# this program. If not, see <http://www.gnu.org/licenses/>. + +package Lintian::Processable::Source::Relation; + +use v5.20; +use warnings; +use utf8; + +use Carp qw(croak); +use Unicode::UTF8 qw(encode_utf8); + +use Lintian::Relation; + +use Moo::Role; +use namespace::clean; + +=head1 NAME + +Lintian::Processable::Source::Relation - Lintian interface to source package data collection + +=head1 SYNOPSIS + + my ($name, $type, $dir) = ('foobar', 'source', '/path/to/lab-entry'); + my $collect = Lintian::Processable::Source::Relation->new($name); + if ($collect->native) { + print encode_utf8("Package is native\n"); + } + +=head1 DESCRIPTION + +Lintian::Processable::Source::Relation provides an interface to package data for source +packages. It implements data collection methods specific to source +packages. + +This module is in its infancy. Most of Lintian still reads all data from +files in the laboratory whenever that data is needed and generates that +data via collect scripts. The goal is to eventually access all data about +source packages via this module so that the module can cache data where +appropriate and possibly retire collect scripts in favor of caching that +data in memory. + +=head1 INSTANCE METHODS + +=over 4 + +=item binary_relation (PACKAGE, FIELD) + +Returns a L<Lintian::Relation> object for the specified FIELD in the +binary package PACKAGE in the F<debian/control> file. FIELD should be +one of the possible relationship fields of a Debian package or one of +the following special values: + +=over 4 + +=item All + +The concatenation of Pre-Depends, Depends, Recommends, and Suggests. + +=item Strong + +The concatenation of Pre-Depends and Depends. + +=item Weak + +The concatenation of Recommends and Suggests. + +=back + +If FIELD isn't present in the package, the returned Lintian::Relation +object will be empty (present but satisfies nothing). + +Any substvars in F<debian/control> will be represented in the returned +relation as packages named after the substvar. + +=item saved_binary_relations + +=cut + +has saved_binary_relations => ( + is => 'rw', + coerce => sub { my ($hashref) = @_; return ($hashref // {}); }, + default => sub { {} } +); + +my %alias = ( + all => [qw(Pre-Depends Depends Recommends Suggests)], + strong => [qw(Pre-Depends Depends)], + weak => [qw(Recommends Suggests)] +); + +my %known = map { $_ => 1 } + qw(pre-depends depends recommends suggests enhances breaks + conflicts provides replaces); + +sub binary_relation { + my ($self, $package, $name) = @_; + + return undef + unless length $name; + + my $lowercase = lc $name; + + return undef + unless length $package; + + my $relation = $self->saved_binary_relations->{$package}{$lowercase}; + unless (defined $relation) { + + if (length $alias{$lowercase}) { + $relation + = Lintian::Relation->new->logical_and( + map { $self->binary_relation($package, $_) } + @{ $alias{$lowercase} }); + + } else { + croak encode_utf8("unknown relation field $name") + unless $known{$lowercase}; + + my $value + = $self->debian_control->installable_fields($package) + ->value($name); + $relation = Lintian::Relation->new->load($value); + } + + $self->saved_binary_relations->{$package}{$lowercase} = $relation; + } + + return $relation; +} + +=item relation (FIELD) + +Returns a L<Lintian::Relation> object for the given build relationship +field FIELD. In addition to the normal build relationship fields, the +following special field names are supported: + +=over 4 + +=item Build-Depends-All + +The concatenation of Build-Depends, Build-Depends-Arch and +Build-Depends-Indep. + +=item Build-Conflicts-All + +The concatenation of Build-Conflicts, Build-Conflicts-Arch and +Build-Conflicts-Indep. + +=back + +If FIELD isn't present in the package, the returned Lintian::Relation +object will be empty (present but satisfies nothing). + +=item saved_relation + +=cut + +has saved_relations => ( + is => 'rw', + coerce => sub { my ($hashref) = @_; return ($hashref // {}); }, + default => sub { {} } +); + +sub relation { + my ($self, $name) = @_; + + return undef + unless length $name; + + my $lowercase = lc $name; + + my $relation = $self->saved_relations->{$lowercase}; + unless (defined $relation) { + + if ($name =~ /^Build-(Depends|Conflicts)-All$/i) { + my $type = $1; + my @fields + = ("Build-$type", "Build-$type-Indep", "Build-$type-Arch"); + $relation + = Lintian::Relation->new->logical_and(map { $self->relation($_) } + @fields); + + } elsif ($name =~ /^Build-(Depends|Conflicts)(?:-(?:Arch|Indep))?$/i){ + my $value = $self->fields->value($name); + $relation = Lintian::Relation->new->load($value); + + } else { + croak encode_utf8("unknown relation field $name"); + } + + $self->saved_relations->{$lowercase} = $relation; + } + + return $relation; +} + +=item relation_norestriction (FIELD) + +The same as L</relation (FIELD)>, but ignores architecture +restrictions and build profile restrictions in the FIELD field. + +=item saved_relations_norestriction + +=cut + +has saved_relations_norestriction => ( + is => 'rw', + coerce => sub { my ($hashref) = @_; return ($hashref // {}); }, + default => sub { {} } +); + +sub relation_norestriction { + my ($self, $name) = @_; + + return undef + unless length $name; + + my $lowercase = lc $name; + + my $relation = $self->saved_relations_norestriction->{$lowercase}; + unless (defined $relation) { + + $relation = $self->relation($name)->restriction_less; + $self->saved_relations_norestriction->{$lowercase} = $relation; + } + + return $relation; +} + +=back + +=head1 AUTHOR + +Originally written by Russ Allbery <rra@debian.org> for Lintian. +Amended by Felix Lechner <felix.lechner@lease-up.com> for Lintian. + +=head1 SEE ALSO + +lintian(1) + +=cut + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Processable/Source/Repacked.pm b/lib/Lintian/Processable/Source/Repacked.pm new file mode 100644 index 0000000..4cf057b --- /dev/null +++ b/lib/Lintian/Processable/Source/Repacked.pm @@ -0,0 +1,99 @@ +# -*- perl -*- +# Lintian::Processable::Source::Repacked -- interface to source package data collection + +# Copyright (C) 2008 Russ Allbery +# Copyright (C) 2009 Raphael Geissert +# Copyright (C) 2020 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by the Free +# Software Foundation; either version 2 of the License, or (at your option) +# any later version. +# +# This program is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +# more details. +# +# You should have received a copy of the GNU General Public License along with +# this program. If not, see <http://www.gnu.org/licenses/>. + +package Lintian::Processable::Source::Repacked; + +use v5.20; +use warnings; +use utf8; + +use Lintian::Util qw($PKGREPACK_REGEX); + +use Moo::Role; +use namespace::clean; + +=head1 NAME + +Lintian::Processable::Source::Repacked - Lintian interface to source package data collection + +=head1 SYNOPSIS + + my ($name, $type, $dir) = ('foobar', 'source', '/path/to/lab-entry'); + my $collect = Lintian::Processable::Source::Repacked->new($name); + if ($collect->native) { + print encode_utf8("Package is native\n"); + } + +=head1 DESCRIPTION + +Lintian::Processable::Source::Repacked provides an interface to package data for source +packages. It implements data collection methods specific to source +packages. + +This module is in its infancy. Most of Lintian still reads all data from +files in the laboratory whenever that data is needed and generates that +data via collect scripts. The goal is to eventually access all data about +source packages via this module so that the module can cache data where +appropriate and possibly retire collect scripts in favor of caching that +data in memory. + +=head1 INSTANCE METHODS + +=over 4 + +=item repacked + +Returns true if the source package has been "repacked" and false otherwise. +This is determined from the version name containing "dfsg" or similar. + +=cut + +has repacked => ( + is => 'rw', + lazy => 1, + default => sub { + my ($self) = @_; + + my $upstream = $self->changelog_version->upstream; + + return $upstream =~ $PKGREPACK_REGEX; + } +); + +=back + +=head1 AUTHOR + +Originally written by Russ Allbery <rra@debian.org> for Lintian. +Amended by Felix Lechner <felix.lechner@lease-up.com> for Lintian. + +=head1 SEE ALSO + +lintian(1) + +=cut + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Profile.pm b/lib/Lintian/Profile.pm new file mode 100644 index 0000000..643e21f --- /dev/null +++ b/lib/Lintian/Profile.pm @@ -0,0 +1,941 @@ +# Copyright (C) 2011 Niels Thykier <niels@thykier.net> +# Copyright (C) 2018 Chris Lamb <lamby@debian.org> +# Copyright (C) 2021 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Profile; + +use v5.20; +use warnings; +use utf8; + +use Carp qw(carp croak); +use Const::Fast; +use Cwd qw(realpath); +use File::BaseDir qw(config_home config_files data_home); +use File::Find::Rule; +use List::Compare; +use List::SomeUtils qw(any none uniq first_value); +use Path::Tiny; +use POSIX qw(ENOENT); +use Unicode::UTF8 qw(encode_utf8); + +use Dpkg::Vendor qw(get_current_vendor get_vendor_info); + +use Lintian::Data; +use Lintian::Deb822; +use Lintian::Tag; +use Lintian::Util qw(match_glob); + +const my $EMPTY => q{}; +const my $SPACE => q{ }; +const my $HYPHEN => q{-}; +const my $EQUAL => q{=}; + +const my $FIELD_SEPARATOR => qr/ \s+ | \s* , \s* /sx; + +const my @VALID_HEADER_FIELDS => qw( + Profile + Extends + Enable-Tags-From-Check + Disable-Tags-From-Check + Enable-Tags + Disable-Tags +); + +const my @VALID_BODY_FIELDS => qw( + Tags + Overridable +); + +use Moo; +use namespace::clean; + +=head1 NAME + +Lintian::Profile - Profile parser for Lintian + +=head1 SYNOPSIS + + my $profile = Lintian::Profile->new ('debian'); + +=head1 DESCRIPTION + +Lintian::Profile handles finding, parsing and implementation of +Lintian Profiles as well as loading the relevant Lintian checks. + +=head1 INSTANCE METHODS + +=over 4 + +=item $prof->known_aliases() + +Returns a hash with old names that have new names. + +=item $prof->profile_list + +Returns a list ref of the (normalized) names of the profile and its +parents. The first element of the list is the name of the profile +itself, the second is its parent and so on. + +Note: This list is a reference. The contents should not be modified. + +=item our_vendor + +=item $prof->name + +Returns the name of the profile, which may differ from the name used +to create this instance of the profile (e.g. due to symlinks). + +=cut + +has known_aliases => ( + is => 'rw', + coerce => sub { my ($hashref) = @_; return ($hashref // {}); }, + default => sub { {} } +); + +has check_module_by_name => ( + is => 'rw', + coerce => sub { my ($hashref) = @_; return ($hashref // {}); }, + default => sub { {} } +); + +has check_path_by_name => ( + is => 'rw', + coerce => sub { my ($hashref) = @_; return ($hashref // {}); }, + default => sub { {} } +); + +has tag_names_for_check => ( + is => 'rw', + coerce => sub { my ($hashref) = @_; return ($hashref // {}); }, + default => sub { {} } +); + +has display_level_lookup => ( + is => 'rw', + coerce => sub { my ($hashref) = @_; return ($hashref // {}); }, + default => sub { + { + classification => 0, + pedantic => 0, + info => 0, + warning => 1, + error => 1, + } + } +); + +has enabled_checks_by_name => ( + is => 'rw', + coerce => sub { my ($hashref) = @_; return ($hashref // {}); }, + default => sub { {} } +); + +has enabled_tags_by_name => ( + is => 'rw', + coerce => sub { my ($hashref) = @_; return ($hashref // {}); }, + default => sub { {} } +); + +has files => ( + is => 'rw', + coerce => sub { my ($hashref) = @_; return ($hashref // {}); }, + default => sub { {} } +); + +has known_tags_by_name => ( + is => 'rw', + coerce => sub { my ($hashref) = @_; return ($hashref // {}); }, + default => sub { {} } +); + +has name => ( + is => 'rw', + coerce => sub { my ($string) = @_; return $string // $EMPTY;}, + default => $EMPTY +); + +has durable_tags_by_name => ( + is => 'rw', + coerce => sub { my ($hashref) = @_; return ($hashref // {}); }, + default => sub { {} } +); + +has data => ( + is => 'rw', + lazy => 1, + default => sub { + my ($self) = @_; + + my $data = Lintian::Data->new; + + my @DATA_PATHS = $self->search_space('data'); + $data->data_paths(\@DATA_PATHS); + $data->vendor($self->our_vendor); + + return $data; + } +); + +has parent_map => ( + is => 'rw', + coerce => sub { my ($hashref) = @_; return ($hashref // {}); }, + default => sub { {} } +); + +has profile_list => ( + is => 'rw', + coerce => sub { my ($arrayref) = @_; return ($arrayref // []); }, + default => sub { [] } +); + +has our_vendor => (is => 'rw'); + +has include_dirs => ( + is => 'rw', + coerce => sub { my ($arrayref) = @_; return ($arrayref // []); }, + default => sub { [] } +); + +# Temporary until aptdaemon (etc.) has been upgraded to handle +# Lintian loading code from user dirs. +# LP: #1162947 +has safe_include_dirs => ( + is => 'rw', + coerce => sub { my ($arrayref) = @_; return ($arrayref // []); }, + default => sub { [] } +); + +has known_vendors => ( + is => 'rw', + lazy => 1, + coerce => sub { my ($arrayref) = @_; return ($arrayref // []); }, + default => sub { + + my $vendor = Dpkg::Vendor::get_current_vendor(); + croak encode_utf8('Could not determine the current vendor') + unless $vendor; + + my @vendors; + push(@vendors, lc $vendor); + + while ($vendor) { + my $info = Dpkg::Vendor::get_vendor_info($vendor); + # Cannot happen atm, but in case Dpkg::Vendor changes its internals + # or our code changes + croak encode_utf8("Could not look up the parent vendor of $vendor") + unless $info; + + $vendor = $info->{'Parent'}; + push(@vendors, lc $vendor) + if $vendor; + } + + return \@vendors; + } +); + +has user_dirs => ( + is => 'ro', + lazy => 1, + coerce => sub { my ($arrayref) = @_; return ($arrayref // []); }, + default => sub { + my ($self) = @_; + + my @user_data; + + # XDG user data + push(@user_data, data_home('lintian')); + + # legacy per-user data + push(@user_data, "$ENV{HOME}/.lintian") + if length $ENV{HOME}; + + # system wide user data + push(@user_data, '/etc/lintian'); + + const my @IMMUTABLE => grep { length && -e } @user_data; + + return \@IMMUTABLE; + } +); + +=item load ([$profname[, $ipath[, $extra]]]) + +Loads a new profile. $profname is the name of the profile and $ipath +is a list reference containing the path to one (or more) Lintian +"roots". + +If $profname is C<undef>, the default vendor will be loaded based on +Dpkg::Vendor::get_current_vendor. + +If $ipath is not given, a default one will be used. + +=cut + +sub load { + my ($self, $profile_name, $requested_dirs, $allow_user_dirs) = @_; + + $requested_dirs //= []; + + my @distribution_dirs = ($ENV{LINTIAN_BASE} // '/usr/share/lintian'); + + const my @SAFE_INCLUDE_DIRS => (@{$requested_dirs}, @distribution_dirs); + $self->safe_include_dirs(\@SAFE_INCLUDE_DIRS); + + my @all_dirs; + + push(@all_dirs, @{$self->user_dirs}) + if $allow_user_dirs && @{$self->user_dirs}; + + push(@all_dirs, @{$self->safe_include_dirs}); + + const my @ALL_INCLUDE_DIRS => @all_dirs; + $self->include_dirs(\@ALL_INCLUDE_DIRS); + + for + my $tagdir (map { ($_ // q{.}) . '/tags' } @{$self->safe_include_dirs}) { + + next + unless -d $tagdir; + + my @tagpaths + = File::Find::Rule->file->name(qw(*.tag *.desc))->in($tagdir); + for my $tagpath (@tagpaths) { + + my $tag = Lintian::Tag->new; + $tag->load($self, $tagpath); + + die encode_utf8("Tag in $tagpath is not associated with a check") + unless length $tag->check; + + next + if exists $self->known_tags_by_name->{$tag->name}; + + $self->known_tags_by_name->{$tag->name} = $tag; + $self->tag_names_for_check->{$tag->check} //= []; + push(@{$self->tag_names_for_check->{$tag->check}},$tag->name); + + # record known aliases + my @taken + = grep { exists $self->known_aliases->{$_} } + @{$tag->renamed_from}; + + die encode_utf8('These aliases of the tag ' + . $tag->name + . ' are taken already: ' + . join($SPACE, @taken)) + if @taken; + + for my $old_name (@{$tag->renamed_from}) { + + if (exists $self->known_aliases->{$old_name}) { + + my $taken = $self->known_aliases->{$old_name}; + my $tag_name = $tag->name; + warn encode_utf8( +"Alias $old_name for $tag_name ignored; already taken by $taken" + ); + + } else { + $self->known_aliases->{$old_name} = $tag->name; + } + } + } + } + + my @check_bases + = map {(($_ // q{.}).'/lib/Lintian/Check', ($_ // q{.}).'/checks')} + @{$self->safe_include_dirs}; + for my $check_base (@check_bases) { + + next + unless -d $check_base; + + my @check_paths= File::Find::Rule->file->name('*.pm')->in($check_base); + + for my $absolute (@check_paths) { + + my $relative = path($absolute)->relative($check_base)->stringify; + $relative =~ s{\.pm$}{}; + + my $name = $relative; + $name =~ s{([[:upper:]])}{-\L$1}g; + $name =~ s{^-}{}; + $name =~ s{/-}{/}g; + + # ignore duplicates + next + if exists $self->check_module_by_name->{$name}; + + $self->check_path_by_name->{$name} = $absolute; + + my $module = $relative; + + # replace slashes with double colons + $module =~ s{/}{::}g; + + $self->check_module_by_name->{$name} = "Lintian::Check::$module"; + } + } + + $self->read_profile($profile_name); + + return; +} + +=item $prof->known_tags + +=cut + +sub known_tags { + my ($self) = @_; + + return keys %{ $self->known_tags_by_name }; +} + +=item $prof->enabled_tags + +=cut + +sub enabled_tags { + my ($self) = @_; + + return keys %{ $self->enabled_tags_by_name }; +} + +=item $prof->get_tag ($name) + +Returns the Lintian::Tag for $tag if known. +Otherwise it returns undef. + +=cut + +sub get_tag { + my ($self, $maybe_historical) = @_; + + my $name = $self->get_current_name($maybe_historical); + return undef + unless length $name; + + return $self->known_tags_by_name->{$name} + if exists $self->known_tags_by_name->{$name}; + + return undef; +} + +=item get_current_name + +=cut + +sub get_current_name { + my ($self, $tag_name) = @_; + + return $self->known_aliases->{$tag_name} + if exists $self->known_aliases->{$tag_name}; + + return $tag_name + if exists $self->known_tags_by_name->{$tag_name}; + + return $EMPTY; +} + +=item set_durable ($tag) + +=cut + +sub set_durable { + my ($self, $maybe_historical, $status) = @_; + + my $tag = $self->get_tag($maybe_historical); + croak encode_utf8("Unknown tag $maybe_historical.") + unless defined $tag; + + $self->durable_tags_by_name->{$tag->name} = 1 + if $status; + + # settings from tag govern + delete $self->durable_tags_by_name->{$tag->name} + if !$status && !$tag->show_always; + + return; +} + +=item $prof->is_durable ($tag) + +Returns a false value if the tag has been marked as +"non-overridable". Otherwise it returns a truth value. + +=cut + +sub is_durable { + my ($self, $maybe_historical) = @_; + + my $tag = $self->get_tag($maybe_historical); + croak encode_utf8("Unknown tag $maybe_historical.") + unless defined $tag; + + return 1 + if $tag->show_always + || exists $self->durable_tags_by_name->{$tag->name}; + + return 0; +} + +=item $prof->known_checks + +=cut + +sub known_checks { + my ($self) = @_; + + return keys %{ $self->check_module_by_name }; +} + +=item $prof->enabled_checks + +=cut + +sub enabled_checks { + my ($self) = @_; + + return keys %{ $self->enabled_checks_by_name }; +} + +=item $prof->enable_tag ($name) + +Enables a tag. + +=cut + +sub enable_tag { + my ($self, $maybe_historical) = @_; + + my $tag = $self->get_tag($maybe_historical); + croak encode_utf8("Unknown tag $maybe_historical.") + unless defined $tag; + + $self->enabled_checks_by_name->{$tag->check}++ + unless exists $self->enabled_tags_by_name->{$tag->name}; + + $self->enabled_tags_by_name->{$tag->name} = 1; + + return; +} + +=item $prof->disable_tag ($name) + +Disable a tag. + +=cut + +sub disable_tag { + my ($self, $maybe_historical) = @_; + + my $tag = $self->get_tag($maybe_historical); + croak encode_utf8("Unknown tag $maybe_historical.") + unless defined $tag; + + delete $self->enabled_checks_by_name->{$tag->check} + unless exists $self->enabled_tags_by_name->{$tag->name} + && --$self->enabled_checks_by_name->{$tag->check}; + + delete $self->enabled_tags_by_name->{$tag->name}; + + return; +} + +=item read_profile + +=cut + +sub read_profile { + my ($self, $requested_name) = @_; + + my @search_space; + + if (!defined $requested_name) { + @search_space = map { "$_/main" } @{$self->known_vendors}; + + } elsif ($requested_name !~ m{/}) { + @search_space = ("$requested_name/main"); + + } elsif ($requested_name =~ m{^[^.]+/[^/.]+$}) { + @search_space = ($requested_name); + + } else { + croak encode_utf8("$requested_name is not a valid profile name"); + } + + my @candidates; + for my $include_dir ( map { ($_ // q{.}) . '/profiles' } + @{$self->include_dirs} ) { + push(@candidates, map { "$include_dir/$_.profile" } @search_space); + } + + my $path = first_value { -e } @candidates; + + croak encode_utf8( + 'Could not find a profile matching: ' . join($SPACE, @search_space)) + unless length $path; + + my $deb822 = Lintian::Deb822->new; + my @paragraphs = $deb822->read_file($path); + + my ($header, @sections) = @paragraphs; + + croak encode_utf8("Profile has no header in $path") + unless defined $header; + + my $profile_name = $header->unfolded_value('Profile'); + croak encode_utf8("Profile has no name in $path") + unless length $profile_name; + + croak encode_utf8("Invalid Profile field in $path") + if $profile_name =~ m{^/} || $profile_name =~ m{\.}; + + # normalize name + $profile_name .= '/main' + unless $profile_name =~ m{/}; + + croak encode_utf8("Recursive definition of $profile_name") + if exists $self->parent_map->{$profile_name}; + + # Mark as being loaded. + $self->parent_map->{$profile_name} = 0; + + $self->name($profile_name) + unless length $self->name; + + $self->read_profile($header->unfolded_value('Extends')) + if $header->declares('Extends'); + + # prepend profile name after loading any parent + unshift(@{$self->profile_list}, $profile_name); + + my @have_comma + = grep { $header->value($_) =~ / , /sx } @VALID_HEADER_FIELDS; + for my $section (@sections) { + push(@have_comma, + grep { $section->value($_) =~ / , /sx } @VALID_BODY_FIELDS); + } + + warn +"Please use spaces as separators in field $_ instead of commas in profile $path\n" + for uniq @have_comma; + + my @unknown_header_fields = $header->extra(@VALID_HEADER_FIELDS); + croak encode_utf8("Unknown fields in header of profile $profile_name: " + . join($SPACE, @unknown_header_fields)) + if @unknown_header_fields; + + my @enable_check_patterns + = $header->trimmed_list('Enable-Tags-From-Check', $FIELD_SEPARATOR); + my @disable_check_patterns + = $header->trimmed_list('Disable-Tags-From-Check', $FIELD_SEPARATOR); + + my @enable_checks; + for my $pattern (@enable_check_patterns) { + push(@enable_checks, match_glob($pattern, $self->known_checks)); + } + + my @disable_checks; + for my $pattern (@disable_check_patterns) { + push(@disable_checks, match_glob($pattern, $self->known_checks)); + } + + my @action_checks = uniq(@enable_checks, @disable_checks); + + # make sure checks are loaded + my @needed_checks + = grep { !exists $self->check_module_by_name->{$_} } @action_checks; + + croak encode_utf8("Profile $profile_name references unknown checks: " + . join($SPACE, @needed_checks)) + if @needed_checks; + + my @enable_tag_patterns + = $header->trimmed_list('Enable-Tags', $FIELD_SEPARATOR); + my @disable_tag_patterns + = $header->trimmed_list('Disable-Tags', $FIELD_SEPARATOR); + + my @enable_tags; + for my $pattern (@enable_tag_patterns) { + push(@enable_tags, match_glob($pattern, $self->known_tags)); + } + + my @disable_tags; + for my $pattern (@disable_tag_patterns) { + push(@disable_tags, match_glob($pattern, $self->known_tags)); + } + + push(@enable_tags, @{$self->tag_names_for_check->{$_} // []}) + for uniq @enable_checks; + + push(@disable_tags, @{$self->tag_names_for_check->{$_} // []}) + for uniq @disable_checks; + + # disabling after enabling + $self->enable_tag($_) for uniq @enable_tags; + $self->disable_tag($_) for uniq @disable_tags; + + my $section_number = 2; + + for my $section (@sections){ + + my @unknown_fields = $section->extra(@VALID_BODY_FIELDS); + croak encode_utf8( +"Unknown fields in section $section_number of profile $profile_name: " + . join($SPACE, @unknown_fields)) + if @unknown_fields; + + my @tags = $section->trimmed_list('Tags', $FIELD_SEPARATOR); + croak encode_utf8( +"Tags field missing or empty in section $section_number of profile $profile_name" + )unless @tags; + + my $overridable = $section->unfolded_value('Overridable') || 'yes'; + if ($overridable !~ / ^ -? \d+ $ /msx) { + my $lowercase = lc $overridable; + + if ($lowercase =~ / ^ y(?:es)? | true $ /msx) { + $overridable = 1; + + } elsif ($lowercase =~ / ^ n[o]? | false $ /msx) { + $overridable = 0; + + } else { + my $position = $section->position('Overridable'); + croak encode_utf8( +"$overridable is not a boolean value in profile $profile_name (line $position)" + ); + } + } + + for my $tag_name (@tags) { + + if ($overridable) { + delete $self->durable_tags_by_name->{$tag_name}; + } else { + $self->durable_tags_by_name->{$tag_name} = 1; + } + } + + } continue { + $section_number++; + } + + $self->our_vendor($self->profile_list->[0]); + + # honor tag settings regardless of profile + my @show_always + = grep { $_->show_always } values %{$self->known_tags_by_name}; + + $self->durable_tags_by_name->{$_} = 1 for map { $_->name } @show_always; + + return; +} + +=item display_level_for_tag + +=cut + +sub display_level_for_tag { + my ($self, $tag_name) = @_; + + my $tag = $self->get_tag($tag_name); + croak encode_utf8("Unknown tag $tag_name") + unless defined $tag; + + return $self->display_level_lookup->{$tag->visibility}; +} + +=item tag_is_enabled(TAG) + +=cut + +sub tag_is_enabled { + my ($self, $maybe_historical) = @_; + + my $tag = $self->get_tag($maybe_historical); + croak encode_utf8("Unknown tag $maybe_historical.") + unless defined $tag; + + return 1 + if exists $self->enabled_tags_by_name->{$tag->name}; + + return 0; +} + +=item display(OPERATION, RELATION, VISIBILITY) + +Configure which tags are displayed by visibility. OPERATION +is C<+> to display the indicated tags, C<-> to not display the indicated +tags, or C<=> to not display any tags except the indicated ones. RELATION +is one of C<< < >>, C<< <= >>, C<=>, C<< >= >>, or C<< > >>. The +OPERATION will be applied to all values of visibility that +match the given RELATION on the VISIBILITY argument. If +either of those arguments are undefined, the action applies to any value +for that variable. For example: + + $tags->display('=', '>=', 'error'); + +turns off display of all tags and then enables display of any tag of +visibility error or higher. + + $tags->display('+', '>', 'warning'); + +adds to the current configuration display of all tags with a visibility +higher than warning. + + $tags->display('-', '=', 'info'); + +turns off display of tags of visibility info. + +This method throws an exception on errors, such as an unknown visibility or +an impossible constraint (like C<< > serious >>). + +=cut + +# Generate a subset of a list given the element and the relation. This +# function makes a hard assumption that $rel will be one of <, <=, =, >=, +# or >. It is not syntax-checked. +sub _relation_subset { + my ($self, $element, $rel, @list) = @_; + + if ($rel eq $EQUAL) { + return grep { $_ eq $element } @list; + } + + if (substr($rel, 0, 1) eq '<') { + @list = reverse @list; + } + + my $found; + for my $i (0..$#list) { + if ($element eq $list[$i]) { + $found = $i; + last; + } + } + + return () + unless defined($found); + + if (length($rel) > 1) { + return @list[$found .. $#list]; + + } + + return () + if $found == $#list; + + return @list[($found + 1) .. $#list]; +} + +# Given the operation, relation, and visibility, produce a +# human-readable representation of the display level string for errors. +sub _format_level { + my ($self, $op, $rel, $visibility) = @_; + + if (not defined $visibility) { + return "$op $rel"; + } else { + return "$op $rel $visibility (visibility)"; + } +} + +sub display { + my ($self, $op, $rel, $visibility) = @_; + + unless ($op =~ /^[+=-]\z/ and $rel =~ /^(?:[<>]=?|=)\z/) { + my $error = $self->_format_level($op, $rel, $visibility); + die encode_utf8('invalid display constraint ' . $error); + } + + if ($op eq $EQUAL) { + for my $s (@Lintian::Tag::VISIBILITIES) { + $self->display_level_lookup->{$s} = 0; + } + } + + my $status = ($op eq $HYPHEN ? 0 : 1); + + my @visibilities; + if ($visibility) { + @visibilities + = $self->_relation_subset($visibility, $rel, + @Lintian::Tag::VISIBILITIES); + } else { + @visibilities = @Lintian::Tag::VISIBILITIES; + } + + unless (@visibilities) { + my $error = $self->_format_level($op, $rel, $visibility); + die encode_utf8('invalid display constraint ' . $error); + } + + for my $s (@visibilities) { + $self->display_level_lookup->{$s} = $status; + } + + return; +} + +=item search_space + +=cut + +sub search_space { + my ($self, $relative) = @_; + + my @base_dirs; + for my $vendor (@{ $self->profile_list }) { + + push(@base_dirs, map { "$_/vendors/$vendor" } @{$self->include_dirs}); + } + + push(@base_dirs, @{$self->include_dirs}); + + my @candidates = map { "$_/$relative" } @base_dirs; + my @search_space = grep { -e } @candidates; + + return @search_space; +} + +=back + +=head1 AUTHOR + +Originally written by Niels Thykier <niels@thykier.net> for Lintian. + +=head1 SEE ALSO + +lintian(1) + +=cut + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Relation.pm b/lib/Lintian/Relation.pm new file mode 100644 index 0000000..b7b4b67 --- /dev/null +++ b/lib/Lintian/Relation.pm @@ -0,0 +1,788 @@ +# -*- perl -*- +# Lintian::Relation -- operations on dependencies and relationships + +# Copyright (C) 1998 Christian Schwarz and Richard Braakman +# Copyright (C) 2004-2009 Russ Allbery <rra@debian.org> +# Copyright (C) 2018 Chris Lamb <lamby@debian.org> +# Copyright (C) 2020 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by the Free +# Software Foundation; either version 2 of the License, or (at your option) +# any later version. +# +# This program is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +# more details. +# +# You should have received a copy of the GNU General Public License along with +# this program. If not, see <http://www.gnu.org/licenses/>. + +package Lintian::Relation; + +use v5.20; +use warnings; +use utf8; + +use Carp qw(confess); +use Const::Fast; +use List::SomeUtils qw(any); +use Unicode::UTF8 qw(encode_utf8); + +use Lintian::Relation::Predicate; + +use Moo; +use namespace::clean; + +use constant { + VISIT_PRED_NAME => 0, + VISIT_PRED_FULL => 1, + VISIT_OR_CLAUSE_FULL => 3, + VISIT_STOP_FIRST_MATCH => 4, +}; + +const my $EMPTY => q{}; + +const my $BRANCH_TYPE => 0; +const my $PREDICATE => 1; + +const my $FALSE => 0; + +=head1 NAME + +Lintian::Relation - Lintian operations on dependencies and relationships + +=head1 SYNOPSIS + + my $depends = Lintian::Relation->new('foo | bar, baz'); + print encode_utf8("yes\n") if $depends->satisfies('baz'); + print encode_utf8("no\n") if $depends->satisfies('foo'); + +=head1 DESCRIPTION + +This module provides functions for parsing and evaluating package +relationship fields such as Depends and Recommends for binary packages and +Build-Depends for source packages. It parses a relationship into an +internal format and can then answer questions such as "does this +dependency require that a given package be installed" or "is this +relationship a superset of another relationship." + +A dependency line is viewed as a predicate formula. The comma separator +means "and", and the alternatives separator means "or". A bare package +name is the predicate "a package of this name is available". A package +name with a version clause is the predicate "a package of this name that +satisfies this version clause is available." Architecture restrictions, +as specified in Policy for build dependencies, are supported and also +checked in the implication logic unless the new_norestriction() +constructor is used. With that constructor, architecture restrictions +are ignored. + +=head1 INSTANCE METHODS + +=over 4 + +=item trunk + +=cut + +has trunk => (is => 'rw', default => sub { ['AND'] }); + +=item load (RELATION) + +Creates a new Lintian::Relation object corresponding to the parsed +relationship RELATION. This object can then be used to ask questions +about that relationship. RELATION may be C<undef> or the empty string, in +which case the returned Lintian::Relation object is empty (always +satisfied). + +=cut + +sub load { + my ($self, $condition, $with_restrictions) = @_; + + $condition //= $EMPTY; + + my @trunk = ('AND'); + + my @requirements = grep { length } split(/\s*,\s*/, $condition); + for my $requirement (@requirements) { + + my @predicates; + + my @alternatives = split(/\s*\|\s*/, $requirement); + for my $alternative (@alternatives) { + + my $predicate = Lintian::Relation::Predicate->new; + $predicate->parse($alternative, $with_restrictions); + + push(@predicates, ['PRED', $predicate]); + } + + push(@trunk, @predicates) + if @predicates == 1; + + push(@trunk, ['OR', @predicates]) + if @predicates > 1; + } + + $self->trunk(\@trunk); + + return $self; +} + +=item load_norestriction (RELATION) + +Creates a new Lintian::Relation object corresponding to the parsed +relationship RELATION, ignoring architecture restrictions and restriction +lists. This should be used in cases where we only care if a dependency is +present in some cases and we don't want to require that the architectures +match (such as when checking for proper build dependencies, since if there +are architecture constraints the maintainer is doing something beyond +Lintian's ability to analyze) or that the restrictions list match (Lintian +can't handle dependency implications with build profiles yet). RELATION +may be C<undef> or the empty string, in which case the returned +Lintian::Relation object is empty (always satisfied). + +=cut + +sub load_norestriction { + my ($self, $condition) = @_; + + return $self->load($condition, $FALSE); +} + +=item logical_and(RELATION, ...) + +Creates a new Lintian::Relation object produced by AND'ing all the +relations together. Semantically it is the similar to: + + Lintian::Relation->new (join (', ', @relations)) + +Except it can avoid some overhead and it works if some of the elements +are Lintian::Relation objects already. + +=cut + +sub logical_and { + my ($self, @conditions) = @_; + + my @tree = ('AND'); + + # make sure to add $self + for my $condition (@conditions, $self) { + + my $relation; + + if (ref $condition eq $EMPTY) { + # allow string conditions + $relation = Lintian::Relation->new->load($condition); + + } else { + $relation = $condition; + } + + next + if $relation->is_empty; + + if ( $tree[$BRANCH_TYPE] eq 'AND' + && $relation->trunk->[$BRANCH_TYPE] eq 'AND') { + + my @anded = @{$relation->trunk}; + shift @anded; + push(@tree, @anded); + + } else { + push(@tree, $relation->trunk); + } + } + + my $created = Lintian::Relation->new; + $created->trunk(\@tree); + + return $created; +} + +=item redundancies() + +Returns a list of duplicated elements within the relation object. Each +element of the returned list will be a reference to an anonymous array +holding a set of relations considered redundancies of each other. Two +relations are considered redundancies if one satisfies the other, meaning that +if one relationship is satisfied, the other is necessarily satisfied. +This relationship does not have to be commutative: the opposite +implication may not hold. + +=cut + +sub redundancies { + my ($self) = @_; + + # there are no redundancies unless the top-level relationship is AND. + return () + unless $self->trunk->[$BRANCH_TYPE] eq 'AND'; + +# The logic here is a bit complex in order to merge sets of duplicate +# dependencies. We want foo (<< 2), foo (>> 1), foo (= 1.5) to end up as +# one set of redundancies, even though the first doesn't satisfy the second. +# +# $redundant_sets holds a hash, where the key is the earliest dependency in a set +# and the value is a hash whose keys are the other dependencies in the +# set. $seen holds a map from package names to the duplicate sets that +# they're part of, if they're not the earliest package in a set. If +# either of the dependencies in a duplicate pair were already seen, add +# the missing one of the pair to the existing set rather than creating a +# new one. + my %redundant_sets; + + my @remaining = @{$self->trunk}; + + # discard AND identifier + shift @remaining; + my $i = 1; + + my %seen; + while (@remaining > 1) { + + my $branch_i = shift @remaining; + my $j = $i + 1; + + # run against all others + for my $branch_j (@remaining) { + + my $forward = implies_array($branch_i, $branch_j); + my $reverse = implies_array($branch_j, $branch_i); + + if ($forward or $reverse) { + my $one = $self->to_string($branch_i); + my $two = $self->to_string($branch_j); + + if ($seen{$one}) { + $redundant_sets{$seen{$one}}{$two} = $j; + $seen{$two} = $seen{$one}; + + } elsif ($seen{$two}) { + $redundant_sets{$seen{$two}}{$one} = $i; + $seen{$one} = $seen{$two}; + + } else { + $redundant_sets{$one} ||= {}; + $redundant_sets{$one}{$two} = $j; + $seen{$two} = $one; + } + } + } continue { + $j++; + } + } continue { + $i++; + } + + return map { [$_, keys %{ $redundant_sets{$_}}] } keys %redundant_sets; +} + +=item restriction_less + +Returns a restriction-less variant of this relation. + +=cut + +sub restriction_less { + my ($self) = @_; + + my $unrestricted + = Lintian::Relation->new->load_norestriction($self->to_string); + + return $unrestricted; +} + +=item satisfies(RELATION) + +Returns true if the relationship satisfies RELATION, meaning that if the +Lintian::Relation object is satisfied, RELATION will always be satisfied. +RELATION may be either a string or another Lintian::Relation object. + +By default, architecture restrictions are honored in RELATION if it is a +string. If architecture restrictions should be ignored in RELATION, +create a Lintian::Relation object with new_norestriction() and pass that +in as RELATION instead of the string. + +=item implies_array + +=cut + +# This internal function does the heavy of AND, OR, and NOT logic. It expects +# two references to arrays instead of an object and a relation. +sub implies_array { + my ($p, $q) = @_; + + my $i; + my $q0 = $q->[$BRANCH_TYPE]; + my $p0 = $p->[$BRANCH_TYPE]; + + if ($q0 eq 'PRED') { + if ($p0 eq 'PRED') { + return $p->[$PREDICATE]->satisfies($q->[$PREDICATE]); + } elsif ($p0 eq 'AND') { + $i = 1; + while ($i < @{$p}) { + return 1 if implies_array($p->[$i++], $q); + } + return 0; + } elsif ($p0 eq 'OR') { + $i = 1; + while ($i < @{$p}) { + return 0 if not implies_array($p->[$i++], $q); + } + return 1; + } elsif ($p0 eq 'NOT') { + return implies_array_inverse($p->[1], $q); + } + } elsif ($q0 eq 'AND') { + # Each of q's clauses must be deduced from p. + $i = 1; + while ($i < @{$q}) { + return 0 if not implies_array($p, $q->[$i++]); + } + return 1; + + } elsif ($q0 eq 'OR') { + # If p is something other than OR, p needs to satisfy one of the + # clauses of q. If p is an AND clause, q is satisfied if any of the + # clauses of p satisfy it. + # + # The interesting case is OR. In this case, do an OR to OR comparison + # to determine if q's clause is a superset of p's clause as follows: + # take each branch of p and see if it satisfies a branch of q. If + # each branch of p satisfies some branch of q, return 1. Otherwise, + # return 0. + # + # Simple logic that requires that p satisfy at least one of the + # clauses of q considered in isolation will miss that a|b satisfies + # a|b|c, since a|b doesn't satisfy any of a, b, or c in isolation. + if ($p0 eq 'PRED') { + $i = 1; + while ($i < @{$q}) { + return 1 if implies_array($p, $q->[$i++]); + } + return 0; + } elsif ($p0 eq 'AND') { + $i = 1; + while ($i < @{$p}) { + return 1 if implies_array($p->[$i++], $q); + } + return 0; + } elsif ($p0 eq 'OR') { + + my @p_branches = @{$p}; + shift @p_branches; + + my @q_branches = @{$q}; + shift @q_branches; + + for my $p_branch (@p_branches) { + + return 0 + unless any { implies_array($p_branch, $_) }@q_branches; + } + + return 1; + + } elsif ($p->[$BRANCH_TYPE] eq 'NOT') { + return implies_array_inverse($p->[1], $q); + } + + } elsif ($q0 eq 'NOT') { + if ($p0 eq 'NOT') { + return implies_array($q->[1], $p->[1]); + } + return implies_array_inverse($p, $q->[1]); + } + + return undef; +} + +# The public interface. +sub satisfies { + my ($self, $condition) = @_; + + my $relation; + if (ref $condition eq $EMPTY) { + # allow string conditions + $relation = Lintian::Relation->new->load($condition); + + } else { + $relation = $condition; + } + + return implies_array($self->trunk, $relation->trunk) // 0; +} + +=item satisfies_inverse(RELATION) + +Returns true if the relationship satisfies that RELATION is certainly false, +meaning that if the Lintian::Relation object is satisfied, RELATION cannot +be satisfied. RELATION may be either a string or another +Lintian::Relation object. + +As with satisfies(), by default, architecture restrictions are honored in +RELATION if it is a string. If architecture restrictions should be +ignored in RELATION, create a Lintian::Relation object with +new_norestriction() and pass that in as RELATION instead of the string. + +=item implies_array_inverse + +=cut + +# This internal function does the heavily lifting for AND, OR, and NOT +# handling for inverse implications. It takes two references to arrays and +# returns true iff the falsehood of the second can be deduced from the truth +# of the first. +sub implies_array_inverse { + my ($p, $q) = @_; + my $i; + my $q0 = $q->[$BRANCH_TYPE]; + my $p0 = $p->[$BRANCH_TYPE]; + if ($q0 eq 'PRED') { + if ($p0 eq 'PRED') { + return $p->[$PREDICATE]->satisfies_inverse($q->[$PREDICATE]); + } elsif ($p0 eq 'AND') { + # q's falsehood can be deduced from any of p's clauses + $i = 1; + while ($i < @{$p}) { + return 1 if implies_array_inverse($p->[$i++], $q); + } + return 0; + } elsif ($p0 eq 'OR') { + # q's falsehood must be deduced from each of p's clauses + $i = 1; + while ($i < @{$p}) { + return 0 if not implies_array_inverse($p->[$i++], $q); + } + return 1; + } elsif ($p0 eq 'NOT') { + return implies_array($q, $p->[1]); + } + } elsif ($q0 eq 'AND') { + # Any of q's clauses must be falsified by p. + $i = 1; + while ($i < @{$q}) { + return 1 if implies_array_inverse($p, $q->[$i++]); + } + return 0; + } elsif ($q0 eq 'OR') { + # Each of q's clauses must be falsified by p. + $i = 1; + while ($i < @{$q}) { + return 0 if not implies_array_inverse($p, $q->[$i++]); + } + return 1; + } elsif ($q0 eq 'NOT') { + return implies_array($p, $q->[1]); + } + + return 0; +} + +# The public interface. +sub satisfies_inverse { + my ($self, $condition) = @_; + + my $relation; + if (ref $condition eq $EMPTY) { + # allow string conditions + $relation = Lintian::Relation->new->load($condition); + + } else { + $relation = $condition; + } + + return implies_array_inverse($self->trunk, $relation->trunk) // 0; +} + +=item to_string + +Returns the textual form of a relationship. This converts the internal +form back into the textual representation and returns that, not the +original argument, so the spacing is standardized. Returns undef on +internal failures (such as an object in an unexpected format). + +=cut + +# The second argument isn't part of the public API. It's a partial relation +# that's not a blessed object and is used by to_string() internally so that it +# can recurse. +sub to_string { + my ($self, $branch) = @_; + + my $tree = $branch // $self->trunk; + + my $text; + if ($tree->[$BRANCH_TYPE] eq 'PRED') { + + $text = $tree->[$PREDICATE]->to_string; + + } elsif ($tree->[$BRANCH_TYPE] eq 'AND' || $tree->[$BRANCH_TYPE] eq 'OR') { + + my $connector = ($tree->[$BRANCH_TYPE] eq 'AND') ? ', ' : ' | '; + my @separated = map { $self->to_string($_) } @{$tree}[1 .. $#{$tree}]; + $text = join($connector, @separated); + + } elsif ($tree->[$BRANCH_TYPE] eq 'NOT') { + + # currently not generated by any relation + $text = '! ' . $tree->[$PREDICATE]->to_string; + + } else { + confess encode_utf8("Case $tree->[$BRANCH_TYPE] not implemented"); + } + + return $text; +} + +=item matches (REGEX[, WHAT]) + +Check if one of the predicates in this relation matches REGEX. WHAT +determines what is tested against REGEX and if not given, defaults to +VISIT_PRED_NAME. + +This method will return a truth value if REGEX matches at least one +predicate or clause (as defined by the WHAT parameter - see below). + +NOTE: Often L</satisfies> (or L</satisfies_inverse>) is a better choice +than this method. This method should generally only be used when +checking for a "pattern" package (e.g. phpapi-[\d\w+]+). + + +WHAT can be one of: + +=over 4 + +=item VISIT_PRED_NAME + +Match REGEX against the package name in each predicate (i.e. version +and architecture constrains are ignored). Each predicate is tested in +isolation. As an example: + + my $rel = Lintian::Relation->new ('somepkg | pkg-0 (>= 1)'); + # Will match (version is ignored) + $rel->matches (qr/^pkg-\d$/, VISIT_PRED_NAME); + +=item VISIT_PRED_FULL + +Match REGEX against the full (normalized) predicate (i.e. including +version and architecture). Each predicate is tested in isolation. +As an example: + + my $vrel = Lintian::Relation->new ('somepkg | pkg-0 (>= 1)'); + my $uvrel = Lintian::Relation->new ('somepkg | pkg-0'); + + # Will NOT match (does not match with version) + $vrel->matches (qr/^pkg-\d$/, VISIT_PRED_FULL); + # Will match (this relation does not have a version) + $uvrel->matches (qr/^pkg-\d$/, VISIT_PRED_FULL); + + # Will match (but only because there is a version) + $vrel->matches (qr/^pkg-\d \(.*\)$/, VISIT_PRED_FULL); + # Will NOT match (there is no version in the relation) + $uvrel->matches (qr/^pkg-\d \(.*\)$/, VISIT_PRED_FULL); + +=item VISIT_OR_CLAUSE_FULL + +Match REGEX against the full (normalized) OR clause. Each predicate +will have both version and architecture constrains present. As an +example: + + + my $vpred = Lintian::Relation->new ('pkg-0 (>= 1)'); + my $orrel = Lintian::Relation->new ('somepkg | pkg-0 (>= 1)'); + my $rorrel = Lintian::Relation->new ('pkg-0 (>= 1) | somepkg'); + + # Will match + $vrel->matches (qr/^pkg-\d(?: \([^\)]\))?$/, VISIT_OR_CLAUSE_FULL); + # These Will NOT match (does not match the "|" and the "somepkg" part) + $orrel->matches (qr/^pkg-\d(?: \([^\)]\))?$/, VISIT_OR_CLAUSE_FULL); + $rorrel->matches (qr/^pkg-\d(?: \([^\)]\))?$/, VISIT_OR_CLAUSE_FULL); + +=back + +=cut + +sub matches { + my ($self, $regex, $what) = @_; + $what //= VISIT_PRED_NAME; + return $self->visit(sub { m/$regex/ }, $what | VISIT_STOP_FIRST_MATCH); +} + +=item equals + +Same for full-string matches. Satisfies the perlcritic policy +RegularExpressions::ProhibitFixedStringMatches. + +=cut + +sub equals { + my ($self, $string, $what) = @_; + $what //= VISIT_PRED_NAME; + return $self->visit(sub { $_ eq $string }, $what | VISIT_STOP_FIRST_MATCH); +} + +=item visit (CODE[, FLAGS]) + +Visit clauses or predicates of this relation. Each clause or +predicate is passed to CODE as first argument and will be available as +C<$_>. + +The optional bitmask parameter, FLAGS, can be used to control what is +visited and such. If FLAGS is not given, it defaults to +VISIT_PRED_NAME. The possible values of FLAGS are: + +=over 4 + +=item VISIT_PRED_NAME + +The package name in each predicate is visited, but the version and +architecture part(s) are left out (if any). + +=item VISIT_PRED_FULL + +The full predicates are visited in turn. The predicate will be +normalized (by L</to_string>). + +=item VISIT_OR_CLAUSE_FULL + +CODE will be passed the full OR clauses of this relation. The clauses +will be normalized (by L</to_string>) + +Note: It will not visit the underlying predicates in the clause. + +=item VISIT_STOP_FIRST_MATCH + +Stop the visits the first time CODE returns a truth value. This is +similar to L<first|List::Util/first>, except visit will return the +value returned by CODE. + +=back + +Except where a given flag specifies otherwise, the return value of +visit is last value returned by CODE (or C<undef> for the empty +relation). + +=cut + +# The last argument is not part of the public API. It's a partial +# relation that's not a blessed object and is used by visit() +# internally so that it can recurse. + +sub visit { + my ($self, $code, $flags, $branch) = @_; + + my $tree = $branch // $self->trunk; + my $rel_type = $tree->[$BRANCH_TYPE]; + + $flags //= 0; + + if ($rel_type eq 'PRED') { + my $predicate = $tree->[$PREDICATE]; + my $against = $predicate->name; + $against = $predicate->to_string + if $flags & VISIT_PRED_FULL; + + local $_ = $against; + return scalar $code->($against); + + } elsif (($flags & VISIT_OR_CLAUSE_FULL) == VISIT_OR_CLAUSE_FULL + and $rel_type eq 'OR') { + + my $against = $self->to_string($tree); + + local $_ = $against; + return scalar $code->($against); + + } elsif ($rel_type eq 'AND' + or $rel_type eq 'OR' + or $rel_type eq 'NOT') { + + for my $rel (@{$tree}[1 .. $#{$tree}]) { + my $ret = scalar $self->visit($code, $flags, $rel); + if ($ret && ($flags & VISIT_STOP_FIRST_MATCH)) { + return $ret; + } + } + return 0; + } + + return 0; +} + +=item is_empty + +Returns a truth value if this relation is empty (i.e. it contains no +predicates). + +=cut + +sub is_empty { + my ($self) = @_; + + return 1 + if $self->trunk->[$BRANCH_TYPE] eq 'AND' && !$self->trunk->[1]; + + return 0; +} + +=item unparsable_predicates + +Returns a list of predicates that were unparsable. + +They are returned in the original textual representation and are also +sorted by said representation. + +=cut + +sub unparsable_predicates { + my ($self) = @_; + + my @worklist = ($self->trunk); + my @unparsable; + + while (my $current = pop(@worklist)) { + + my $rel_type = $current->[$BRANCH_TYPE]; + + if ($rel_type ne 'PRED') { + + push(@worklist, @{$current}[1 .. $#{$current}]); + next; + } + + my $predicate = $current->[$PREDICATE]; + + push(@unparsable, $predicate->literal) + unless $predicate->parsable; + } + + my @sorted = sort @unparsable; + + return @sorted; +} + +=back + +=head1 AUTHOR + +Originally written by Russ Allbery <rra@debian.org> for Lintian. + +=head1 SEE ALSO + +lintian(1) + +=cut + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Relation/Predicate.pm b/lib/Lintian/Relation/Predicate.pm new file mode 100644 index 0000000..488d801 --- /dev/null +++ b/lib/Lintian/Relation/Predicate.pm @@ -0,0 +1,553 @@ +# -*- perl -*- +# Lintian::Relation::Predicate -- relationship predicates + +# Copyright (C) 1998 Christian Schwarz and Richard Braakman +# Copyright (C) 2004-2009 Russ Allbery <rra@debian.org> +# Copyright (C) 2018 Chris Lamb <lamby@debian.org> +# Copyright (C) 2020-2021 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by the Free +# Software Foundation; either version 2 of the License, or (at your option) +# any later version. +# +# This program is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +# more details. +# +# You should have received a copy of the GNU General Public License along with +# this program. If not, see <http://www.gnu.org/licenses/>. + +package Lintian::Relation::Predicate; + +use v5.20; +use warnings; +use utf8; + +use Const::Fast; + +use Lintian::Relation::Version qw(:all); + +use Moo; +use namespace::clean; + +const my $EMPTY => q{}; +const my $SPACE => q{ }; +const my $COLON => q{:}; + +const my $EQUAL => q{=}; +const my $LESS_THAN => q{<}; +const my $LESS_THAN_OR_EQUAL => q{<=}; +const my $DOUBLE_LESS_THAN => q{<<}; +const my $GREATER_THAN => q{>}; +const my $GREATER_THAN_OR_EQUAL => q{>=}; +const my $DOUBLE_GREATER_THAN => q{>>}; + +const my $LEFT_PARENS => q{(}; +const my $RIGHT_PARENS => q{)}; +const my $LEFT_SQUARE => q{[}; +const my $RIGHT_SQUARE => q{]}; +const my $LEFT_ANGLE => q{<}; +const my $RIGHT_ANGLE => q{>}; + +const my $TRUE => 1; +const my $FALSE => 0; + +=head1 NAME + +Lintian::Relation::Predicate - Lintian type for relationship predicates + +=head1 SYNOPSIS + + use Lintian::Relation::Predicate; + +=head1 DESCRIPTION + +This module provides functions for parsing and evaluating package +relationships such as Depends and Recommends for binary packages and +Build-Depends for source packages. It parses a relationship into an +internal format and can then answer questions such as "does this +dependency require that a given package be installed" or "is this +relationship a superset of another relationship." + +=head1 INSTANCE METHODS + +=over 4 + +=item literal + +=item C<parsable> + +=item name + +=item multiarch_acceptor + +=item version_operator + +=item reference_version + +=item build_architecture + +=item build_profile + +=cut + +has literal => ( + is => 'rw', + default => $EMPTY, + coerce => sub { my ($text) = @_; return ($text // $EMPTY); } +); + +has parsable => (is => 'rw', default => $FALSE); + +has name => ( + is => 'rw', + default => $EMPTY, + coerce => sub { my ($text) = @_; return ($text // $EMPTY); } +); + +has multiarch_acceptor => ( + is => 'rw', + default => $EMPTY, + coerce => sub { my ($text) = @_; return ($text // $EMPTY); } +); + +has version_operator => ( + is => 'rw', + default => $EMPTY, + coerce => sub { my ($text) = @_; return ($text // $EMPTY); } +); + +has reference_version => ( + is => 'rw', + default => $EMPTY, + coerce => sub { my ($text) = @_; return ($text // $EMPTY); } +); + +has build_architecture => ( + is => 'rw', + default => $EMPTY, + coerce => sub { my ($text) = @_; return ($text // $EMPTY); } +); + +has build_profile => ( + is => 'rw', + default => $EMPTY, + coerce => sub { my ($text) = @_; return ($text // $EMPTY); } +); + +=item parse + +=cut + +# The internal parser which converts a single package element of a +# relationship into the parsed form used for later processing. We permit +# substvars to be used as package names so that we can use these routines with +# the unparsed debian/control file. +sub parse { + my ($self, $text, $with_restrictions) = @_; + + $with_restrictions //= $TRUE; + + # store the element as-is, so we can reconstitute it later + $self->literal($text); + + if ( + $text =~ m{ + ^\s* # skip leading whitespace + ( # package name or substvar (1) + (?: # start of the name + [a-zA-Z0-9][a-zA-Z0-9+.-]* # start of a package name + | # or + \$\{[a-zA-Z0-9:-]+\} # substvar + ) # end of start of the name + (?: # substvars may be mixed in + [a-zA-Z0-9+.-]+ # package name portion + | # or + \$\{[a-zA-Z0-9:-]+\} # substvar + )* # zero or more portions or substvars + ) # end of package name or substvar + (?:[:]([a-z0-9-]+))? # optional Multi-arch arch specification (2) + (?: # start of optional version + \s* \( # open parenthesis for version part + \s* (<<|<=|>=|>>|[=<>]) # relation part (3) + \s* ([^\)]+) # version (4) + \s* \) # closing parenthesis + )? # end of optional version + (?: # start of optional architecture + \s* \[ # open bracket for architecture + \s* ([^\]]+) # architectures (5) + \s* \] # closing bracket + )? # end of optional architecture + (?: # start of optional restriction + \s* < # open bracket for restriction + \s* ([^,]+) # don't parse restrictions now + \s* > # closing bracket + )? # end of optional restriction + \s* $}x + ) { + $self->parsable($TRUE); + + $self->name($1); + $self->multiarch_acceptor($2); + $self->version_operator($3); + $self->reference_version($4); + $self->build_architecture($5); + $self->build_profile($6); + + $self->reference_version($EMPTY) + unless length $self->version_operator; + + $self->version_operator($DOUBLE_LESS_THAN) + if $self->version_operator eq $LESS_THAN; + + $self->version_operator($DOUBLE_GREATER_THAN) + if $self->version_operator eq $GREATER_THAN; + + unless ($with_restrictions) { + $self->multiarch_acceptor('any'); + $self->version_operator($EMPTY); + $self->reference_version($EMPTY); + $self->build_architecture($EMPTY); + $self->build_profile($EMPTY); + } + } + + return; +} + +=item satisfies + +=cut + +# This internal function does the heavily lifting of comparing two +# elements. +# +# Takes two elements and returns true iff the second can be deduced from the +# first. If the second is falsified by the first (in other words, if self +# actually satisfies not other), return 0. Otherwise, return undef. The 0 return +# is used by implies_element_inverse. +sub satisfies { + my ($self, $other) = @_; + + if (!$self->parsable || !$other->parsable) { + + return 1 + if $self->to_string eq $other->to_string; + + return undef; + } + + # If the names don't match, there is no relationship between them. + return undef + if $self->name ne $other->name; + + # the restriction formula forms a disjunctive normal form expression one + # way to check whether A <dnf1> satisfies A <dnf2> is to check: + # + # if dnf1 == dnf1 OR dnf2: + # the second dependency is superfluous because the first dependency + # applies in all cases the second one applies + # + # an easy way to check for equivalence of the two dnf expressions would be + # to construct the truth table for both expressions ("dnf1" and "dnf1 OR + # dnf2") for all involved profiles and then comparing whether they are + # equal + # + # the size of the truth tables grows with 2 to the power of the amount of + # involved profile names but since there currently only exist six possible + # profile names (see data/fields/build-profiles) that should be okay + # + # FIXME: we are not doing this check yet so if we encounter a dependency + # with build profiles we assume that one does not satisfy the other: + + return undef + if length $self->build_profile + || length $other->build_profile; + + # If the names match, then the only difference is in the architecture or + # version clauses. First, check architecture. The architectures for self + # must be a superset of the architectures for other. + my @self_arches = split($SPACE, $self->build_architecture); + my @other_arches = split($SPACE, $other->build_architecture); + if (@self_arches || @other_arches) { + my $self_arch_neg = @self_arches && $self_arches[0] =~ /^!/; + my $other_arch_neg = @other_arches && $other_arches[0] =~ /^!/; + + # If self has no arches, it is a superset of other and we should fall through + # to the version check. + if (not @self_arches) { + # nothing + } + + # If other has no arches, it is a superset of self and there are no useful + # implications. + elsif (not @other_arches) { + + return undef; + } + + # Both have arches. If neither are negated, we know nothing useful + # unless other is a subset of self. + elsif (not $self_arch_neg and not $other_arch_neg) { + my %self_arches = map { $_ => 1 } @self_arches; + my $subset = 1; + for my $arch (@other_arches) { + $subset = 0 unless $self_arches{$arch}; + } + + return undef + unless $subset; + } + + # If both are negated, we know nothing useful unless self is a subset of + # other (and therefore has fewer things excluded, and therefore is more + # general). + elsif ($self_arch_neg and $other_arch_neg) { + my %other_arches = map { $_ => 1 } @other_arches; + my $subset = 1; + for my $arch (@self_arches) { + $subset = 0 unless $other_arches{$arch}; + } + + return undef + unless $subset; + } + + # If other is negated and self isn't, we'd need to know the full list of + # arches to know if there's any relationship, so bail. + elsif (not $self_arch_neg and $other_arch_neg) { + + return undef; + } + +# If self is negated and other isn't, other is a subset of self iff none of the +# negated arches in self are present in other. + elsif ($self_arch_neg and not $other_arch_neg) { + my %other_arches = map { $_ => 1 } @other_arches; + my $subset = 1; + for my $arch (@self_arches) { + $subset = 0 if $other_arches{substr($arch, 1)}; + } + + return undef + unless $subset; + } + } + + # Multi-arch architecture specification + + # According to the spec, only the special value "any" is allowed + # and it is "recommended" to consider "other such package + # relations as unsatisfiable". That said, there seem to be an + # interest in supporting ":<arch>" as well, so we will (probably) + # have to accept those as well. + # + # Other than that, we would need to know that the package has the + # field "Multi-arch: allowed", but we cannot check that here. So + # we assume that it is okay. + + # pkg has no chance of satisfing pkg:Y unless Y is 'any' + return undef + if !length $self->multiarch_acceptor + && length $other->multiarch_acceptor + && $other->multiarch_acceptor ne 'any'; + + # TODO: Review this case. Are there cases where other cannot + # disprove self due to the ":any"-qualifier? For now, we + # assume there are no such cases. + # pkg:X has no chance of satisfying pkg + return undef + if length $self->multiarch_acceptor + && !length $other->multiarch_acceptor; + + # For now assert that only the identity holds. In practise, the + # "pkg:X" (for any valid value of X) seems to satisfy "pkg:any", + # fixing that is a TODO (because version clauses complicates + # matters) + # pkg:X has no chance of satisfying pkg:Y unless X equals Y + return undef + if length $self->multiarch_acceptor + && length $other->multiarch_acceptor + && $self->multiarch_acceptor ne $other->multiarch_acceptor; + + # Now, down to version. The implication is true if self's clause is stronger + # than other's, or is equivalent. + + # If other has no version clause, then self's clause is always stronger. + return 1 + unless length $other->version_operator; + +# If other does have a version clause, then self must also have one to have any +# useful relationship. + return undef + unless length $self->version_operator; + + # other wants an exact version, so self must provide that exact version. self + # disproves other if other's version is outside the range enforced by self. + if ($other->version_operator eq $EQUAL) { + if ($self->version_operator eq $DOUBLE_LESS_THAN) { + return versions_lte($self->reference_version, + $other->reference_version) ? 0 : undef; + } elsif ($self->version_operator eq $LESS_THAN_OR_EQUAL) { + return versions_lt($self->reference_version, + $other->reference_version) ? 0 : undef; + } elsif ($self->version_operator eq $DOUBLE_GREATER_THAN) { + return versions_gte($self->reference_version, + $other->reference_version) ? 0 : undef; + } elsif ($self->version_operator eq $GREATER_THAN_OR_EQUAL) { + return versions_gt($self->reference_version, + $other->reference_version) ? 0 : undef; + } elsif ($self->version_operator eq $EQUAL) { + return versions_equal($self->reference_version, + $other->reference_version) ? 1 : 0; + } + } + +# A greater than clause may disprove a less than clause. Otherwise, if +# self's clause is <<, <=, or =, the version must be <= other's to satisfy other. + if ($other->version_operator eq $LESS_THAN_OR_EQUAL) { + if ($self->version_operator eq $DOUBLE_GREATER_THAN) { + return versions_gte($self->reference_version, + $other->reference_version) ? 0 : undef; + } elsif ($self->version_operator eq $GREATER_THAN_OR_EQUAL) { + return versions_gt($self->reference_version, + $other->reference_version) ? 0 : undef; + } elsif ($self->version_operator eq $EQUAL) { + return versions_lte($self->reference_version, + $other->reference_version) ? 1 : 0; + } else { + return versions_lte($self->reference_version, + $other->reference_version) ? 1 : undef; + } + } + + # Similar, but << is stronger than <= so self's version must be << other's + # version if the self relation is <= or =. + if ($other->version_operator eq $DOUBLE_LESS_THAN) { + if ( $self->version_operator eq $DOUBLE_GREATER_THAN + || $self->version_operator eq $GREATER_THAN_OR_EQUAL) { + return versions_gte($self->reference_version, + $self->reference_version) ? 0 : undef; + } elsif ($self->version_operator eq $DOUBLE_LESS_THAN) { + return versions_lte($self->reference_version, + $other->reference_version) ? 1 : undef; + } elsif ($self->version_operator eq $EQUAL) { + return versions_lt($self->reference_version, + $other->reference_version) ? 1 : 0; + } else { + return versions_lt($self->reference_version, + $other->reference_version) ? 1 : undef; + } + } + + # Same logic as above, only inverted. + if ($other->version_operator eq $GREATER_THAN_OR_EQUAL) { + if ($self->version_operator eq $DOUBLE_LESS_THAN) { + return versions_lte($self->reference_version, + $other->reference_version) ? 0 : undef; + } elsif ($self->version_operator eq $LESS_THAN_OR_EQUAL) { + return versions_lt($self->reference_version, + $other->reference_version) ? 0 : undef; + } elsif ($self->version_operator eq $EQUAL) { + return versions_gte($self->reference_version, + $other->reference_version) ? 1 : 0; + } else { + return versions_gte($self->reference_version, + $other->reference_version) ? 1 : undef; + } + } + if ($other->version_operator eq $DOUBLE_GREATER_THAN) { + if ( $self->version_operator eq $DOUBLE_LESS_THAN + || $self->version_operator eq $LESS_THAN_OR_EQUAL) { + return versions_lte($self->reference_version, + $other->reference_version) ? 0 : undef; + } elsif ($self->version_operator eq $DOUBLE_GREATER_THAN) { + return versions_gte($self->reference_version, + $other->reference_version) ? 1 : undef; + } elsif ($self->version_operator eq $EQUAL) { + return versions_gt($self->reference_version, + $other->reference_version) ? 1 : 0; + } else { + return versions_gt($self->reference_version, + $other->reference_version) ? 1 : undef; + } + } + + return undef; +} + +=item satisfies_inverse + +=cut + +# This internal function does the heavy lifting of inverse implication between +# two elements. Takes two elements and returns true iff the falsehood of +# the second can be deduced from the truth of the first. In other words, self +# satisfies not other, or restated, other satisfies not self. (Since if a satisfies b, not b +# satisfies not a.) Due to the return value of implies_element(), we can let it +# do most of the work. +sub satisfies_inverse { + my ($self, $other) = @_; + + my $result = $self->satisfies($other); + return undef + if !defined $result; + + return $result ? 0 : 1; +} + +=item to_string + +=cut + +sub to_string { + my ($self) = @_; + + # return the original value + return $self->literal + unless $self->parsable; + + my $text = $self->name; + + $text .= $COLON . $self->multiarch_acceptor + if length $self->multiarch_acceptor; + + $text + .= $SPACE + . $LEFT_PARENS + . $self->version_operator + . $SPACE + . $self->reference_version + . $RIGHT_PARENS + if length $self->version_operator; + + $text.= $SPACE . $LEFT_SQUARE . $self->build_architecture . $RIGHT_SQUARE + if length $self->build_architecture; + + $text .= $SPACE . $LEFT_ANGLE . $self->build_profile . $RIGHT_ANGLE + if length $self->build_profile; + + return $text; +} + +=back + +=head1 AUTHOR + +Originally written by Russ Allbery <rra@debian.org> for Lintian. + +=head1 SEE ALSO + +lintian(1) + +=cut + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Relation/Version.pm b/lib/Lintian/Relation/Version.pm new file mode 100644 index 0000000..d3552b7 --- /dev/null +++ b/lib/Lintian/Relation/Version.pm @@ -0,0 +1,213 @@ +# -*- perl -*- +# Lintian::Relation::Version -- comparison operators on Debian versions + +# Copyright (C) 1998 Christian Schwarz and Richard Braakman +# Copyright (C) 2004-2009 Russ Allbery <rra@debian.org> +# Copyright (C) 2009 Adam D. Barratt <adam@adam-barratt.org.uk> +# +# This program is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by the Free +# Software Foundation; either version 2 of the License, or (at your option) +# any later version. +# +# This program is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +# more details. +# +# You should have received a copy of the GNU General Public License along with +# this program. If not, see <http://www.gnu.org/licenses/>. + +package Lintian::Relation::Version; + +use v5.20; +use warnings; +use utf8; + +use Exporter qw(import); + +BEGIN { + our @EXPORT_OK = qw(versions_equal versions_lte versions_gte versions_lt + versions_gt versions_compare versions_comparator); + our %EXPORT_TAGS = ('all' => \@EXPORT_OK); +} + +use AptPkg::Config '$_config'; +use Carp qw(croak); +use Const::Fast; +use Unicode::UTF8 qw(encode_utf8); + +const my $EQUAL => q{=}; + +my $versioning = do { + my $config = AptPkg::Config->new; + $config->init; + $config->system->versioning; +}; + +=head1 NAME + +Lintian::Relation::Version - Comparison operators on Debian versions + +=head1 SYNOPSIS + + print encode_utf8("yes\n") if versions_equal('1.0', '1.00'); + print encode_utf8("yes\n") if versions_gte('1.1', '1.0'); + print encode_utf8("no\n") if versions_lte('1.1', '1.0'); + print encode_utf8("yes\n") if versions_gt('1.1', '1.0'); + print encode_utf8("no\n") if versions_lt('1.1', '1.1'); + print encode_utf8("yes\n") if versions_compare('1.1', '<=', '1.1'); + +=head1 DESCRIPTION + +This module provides five functions for comparing version numbers. The +underlying implementation uses C<libapt-pkg-perl> to ensure that +the results match what dpkg will expect. + +=head1 FUNCTIONS + +=over 4 + +=item versions_equal(A, B) + +Returns true if A is equal to B (C<=>) and false otherwise. + +=cut + +sub versions_equal { + my ($p, $q) = @_; + my $result; + + return 1 if $p eq $q; + + $result = $versioning->compare($p, $q); + + return ($result == 0); +} + +=item versions_lte(A, B) + +Returns true if A is less than or equal (C<< <= >>) to B and false +otherwise. + +=cut + +sub versions_lte { + my ($p, $q) = @_; + my $result; + + return 1 if $p eq $q; + + $result = $versioning->compare($p, $q); + + return ($result <= 0); +} + +=item versions_gte(A, B) + +Returns true if A is greater than or equal (C<< >= >>) to B and false +otherwise. + +=cut + +sub versions_gte { + my ($p, $q) = @_; + my $result; + + return 1 if $p eq $q; + + $result = $versioning->compare($p, $q); + + return ($result >= 0); +} + +=item versions_lt(A, B) + +Returns true if A is less than (C<<< << >>>) B and false otherwise. + +=cut + +sub versions_lt { + my ($p, $q) = @_; + my $result; + + return 0 if $p eq $q; + + $result = $versioning->compare($p, $q); + + return ($result < 0); +} + +=item versions_gt(A, B) + +Returns true if A is greater than (C<<< >> >>>) B and false otherwise. + +=cut + +sub versions_gt { + my ($p, $q) = @_; + my $result; + + return 0 if $p eq $q; + + $result = $versioning->compare($p, $q); + + return ($result > 0); +} + +=item versions_compare(A, OP, B) + +Returns true if A OP B, where OP is one of C<=>, C<< <= >>, C<< >= >>, +C<<< << >>>, or C<<< >> >>>, and false otherwise. + +=cut + +sub versions_compare { + my ($p, $op, $q) = @_; + if ($op eq $EQUAL) { return versions_equal($p, $q) } + elsif ($op eq '<=') { return versions_lte($p, $q) } + elsif ($op eq '>=') { return versions_gte($p, $q) } + elsif ($op eq '<<') { return versions_lt($p, $q) } + elsif ($op eq '>>') { return versions_gt($p, $q) } + else { croak encode_utf8("unknown operator $op") } +} + +=item versions_comparator (A, B) + +Returns -1, 0 or 1 if the version A is (respectively) less than, equal +to or greater than B. This is useful for (e.g.) sorting a list of +versions: + + foreach my $version (sort versions_comparator @versions) { + ... + } + +=cut + +# Use a prototype to avoid confusing Perl when used with sort. + +sub versions_comparator { + my ($p, $q) = @_; + return $versioning->compare($p, $q); +} + +=back + +=head1 AUTHOR + +Originally written by Russ Allbery <rra@debian.org> for Lintian and adapted +to use libapt-pkg-perl by Adam D. Barratt <adam@adam-barratt-org.uk>. + +=head1 SEE ALSO + +lintian(1) + +=cut + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Reporting/ResourceManager.pm b/lib/Lintian/Reporting/ResourceManager.pm new file mode 100644 index 0000000..171b6b7 --- /dev/null +++ b/lib/Lintian/Reporting/ResourceManager.pm @@ -0,0 +1,233 @@ +# Copyright (C) 2014 Niels Thykier <niels@thykier.net> +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +# A simple resource manager for html_reports +package Lintian::Reporting::ResourceManager; + +use v5.20; +use warnings; +use utf8; + +use Carp qw(croak); +use Const::Fast; +use File::Basename qw(basename); +use File::Copy qw(copy); +use Unicode::UTF8 qw(encode_utf8); + +use Lintian::Util qw(get_file_digest); + +const my $SPACE => q{ }; +const my $SLASH => q{/}; +const my $EQUALS => q{=}; + +const my $BASE64_UNIT => 4; +const my $WIDELY_READABLE_FOLDER => oct(755); + +=head1 NAME + +Lintian::Reporting::ResourceManager -- A simple resource manager for html_reports + +=head1 SYNOPSIS + + use Lintian::Reporting::ResourceManager; + + my $resMan = Lintian::Reporting::ResourceManager->new( + 'html_dir' => 'path/to/HTML-root', + ); + # Copy the resource + $resMan->install_resource('path/to/my-image.png', { install_method => 'copy'} ); + # Move the resource + $resMan->install_resource('path/to/generated-styles.css'); + print encode_utf8('Image: ' . $resMan->resource_url('my-image.png'), "\n"); + print encode_utf8('CSS: ' . $resMan->resource_url('generated-styles.css'), "\n"); + +=head1 DESCRIPTION + +A simple resource manager for Lintian's reporting tool, +B<html_reports>. + + +=head1 CLASS METHODS + +=over 4 + +=item new(TYPE, OPTS) + +Instantiates a new resource manager. + +OPTS is a key-value list, which must contain the key "html_dir" set to +the root of the HTML path. It is beneath this path that all resources +will be installed + +=cut + +sub new { + my ($class, %opts) = @_; + my $self = {%opts,}; + croak encode_utf8('Missing required parameter html_dir (or it is undef)') + if not defined $opts{'html_dir'}; + $self->{'_resource_cache'} = {}; + $self->{'_resource_integrity'} = {}; + return bless($self, $class); +} + +=back + +=head1 INSTANCE METHODS + +=over 4 + +=item install_resource(RESOURCE[, OPT]) + +Installs RESOURCE into the html root. The resource may be renamed +(based on content etc.). + +Note that the basename of RESOURCE must be unique between all +resources installed. See L</resource_url(RESOURCE_NAME)>. + +If OPT is given, it must be a hashref with 0 or more of the following +keys (and values). + +=over 4 + +=item install_method + +Can be "copy" or "move" (default). If set to "move", the original file +will be renamed into its new location. Otherwise, a copy is done and +the original file is left in place. + +=item source_file + +By default, the path denoted by RESOURCE is both the resource name and +the source file. This option can be used to install a given file as +RESOURCE regardless of the basename of the source file. + +If this is passed, RESOURCE must be a basename (i.e. without any +slashes). + +=back + +=cut + +sub install_resource { + my ($self, $resource_name, $opt) = @_; + my $resource_root = $self->{'html_dir'} . '/resources'; + my $method = 'move'; + my ($basename, $install_name, $resource, $digest, $b64digest); + $method = $opt->{'install_method'} + if $opt && exists($opt->{'install_method'}); + if ($opt && exists($opt->{'source_file'})) { + $basename = $resource_name; + $resource = $opt->{'source_file'}; + + if ($basename =~ m{ / }msx) { + + croak encode_utf8( + join($SPACE, + qq(Resource "${resource_name}" must not contain "/"), + 'when source_file is given') + ); + } + } else { + $basename = basename($resource_name); + $resource = $resource_name; + } + $digest = get_file_digest('sha256', $resource); + $install_name = $digest->clone->hexdigest; + $b64digest = $digest->b64digest; + + while (length($b64digest) % $BASE64_UNIT) { + $b64digest .= $EQUALS; + } + + croak encode_utf8("Resource name ${basename} already in use") + if defined($self->{'_resource_cache'}{$basename}); + if ($basename =~ m/^.+(\.[^\.]+)$/xsm) { + my $ext = $1; + $install_name .= $ext; + } + + if (!-d $resource_root) { + mkdir($resource_root, $WIDELY_READABLE_FOLDER) + or die encode_utf8("Cannot mkdir $resource_root"); + } + + my $target_file = "$resource_root/$install_name"; + if ($method eq 'move') { + rename($resource, $target_file) + or die encode_utf8("Cannot rename $resource to $target_file"); + + } elsif ($method eq 'copy') { + copy($resource, $target_file) + or croak encode_utf8("Cannot copy $resource to $target_file: $!"); + } else { + croak encode_utf8( + join($SPACE, + "Unknown install method ${method}", + '- please use "move" or "copy"') + ); + } + $self->{'_resource_cache'}{$basename} = $target_file; + $self->{'_resource_integrity'}{$basename} = "sha256-${b64digest}"; + return; +} + +=item resource_url(RESOURCE_NAME) + +Returns the path (relative to the HTML root) to a resource installed +via L</install_resource(RESOURCE)>, where RESOURCE_NAME is the +basename of the path given to install_resource. + +=cut + +sub resource_url { + my ($self, $resource_name) = @_; + croak encode_utf8("Unknown resource $resource_name") + if not defined($self->{'_resource_cache'}{$resource_name}); + return $self->{'_resource_cache'}{$resource_name}; +} + +=item resource_integrity_value(RESOURCE_NAME) + +Return a string that is valid in the "integrity" field of a C<< <link> +>> HTML tag. (See https://www.w3.org/TR/SRI/) + +=cut + +sub resource_integrity_value { + my ($self, $resource_name) = @_; + croak encode_utf8("Unknown resource $resource_name") + if not defined($self->{'_resource_integrity'}{$resource_name}); + return $self->{'_resource_integrity'}{$resource_name}; +} + +=back + +=head1 AUTHOR + +Originally written by Niels Thykier <niels@thykier.net> for Lintian. + +=cut + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Reporting/Util.pm b/lib/Lintian/Reporting/Util.pm new file mode 100644 index 0000000..ecf34cf --- /dev/null +++ b/lib/Lintian/Reporting/Util.pm @@ -0,0 +1,217 @@ +# Hey emacs! This is a -*- Perl -*- script! +# Lintian::Reporting::Util -- Perl utility functions for lintian's reporting framework + +# Copyright (C) 1998 Christian Schwarz +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Reporting::Util; + +=head1 NAME + +Lintian::Reporting::Util - Lintian utility functions + +=head1 SYNOPSIS + + use Lintian::Reporting::Util qw(load_state_cache find_backlog); + + my $cache = load_state_cache('path/to/state-dir'); + my @backlog = find_backlog('2.12', $cache); + +=head1 DESCRIPTION + +This module contains a number of utility subs that are nice to have +for the reporting framework, but on their own did not warrant their +own module. + +Most subs are imported only on request. + +=head1 FUNCTIONS + +=over 4 + +=cut + +use v5.20; +use warnings; +use utf8; + +use Const::Fast; +use Exporter qw(import); +use File::Temp qw(tempfile); +use List::Util qw(shuffle); +use Path::Tiny; +use Syntax::Keyword::Try; +use Unicode::UTF8 qw(encode_utf8); +use YAML::XS (); + +use Lintian::Relation::Version qw(versions_equal versions_comparator); + +our @EXPORT_OK = ( + qw( + load_state_cache + save_state_cache + find_backlog + ) +); + +const my $WIDELY_READABLE => oct(644); + +=item load_state_cache(STATE_DIR) + +[Reporting tools only] Load the state cache from STATE_DIR. + +=cut + +sub load_state_cache { + my ($state_dir) = @_; + my $state_file = "$state_dir/state-cache"; + my $state = {}; + + return $state + unless -e $state_file; + + my $yaml = path($state_file)->slurp; + + try { + $state = YAML::XS::Load($yaml); + + } catch { + # Not sure what Load does in case of issues; perldoc YAML says + # very little about it. Based on YAML::Error, I guess it will + # write stuff to STDERR and use die/croak, but it remains a + # guess. + die encode_utf8( + "$state_file was invalid; please fix or remove it.\n$@"); + } + + $state //= {}; + + if (ref($state) ne 'HASH') { + die encode_utf8("$state_file was invalid; please fix or remove it."); + } + return $state; +} + +=item save_state_cache(STATE_DIR, STATE) + +[Reporting tools only] Save the STATE cache to STATE_DIR. + +=cut + +sub save_state_cache { + my ($state_dir, $state) = @_; + my $state_file = "$state_dir/state-cache"; + my ($tmp_fd, $tmp_path); + + ($tmp_fd, $tmp_path) = tempfile('state-cache-XXXXXX', DIR => $state_dir); + ## TODO: Should tmp_fd be binmode'd as we use YAML::XS? + + # atomic replacement of the state file; not a substitute for + # proper locking, but it will at least ensure that the file + # is in a consistent state. + try { + print {$tmp_fd} encode_utf8(YAML::XS::Dump($state)); + + close($tmp_fd) or die encode_utf8("close $tmp_path: $!"); + + # There is no secret in this. Set it to 0644, so it does not + # require sudo access on lintian.d.o to read the file. + chmod($WIDELY_READABLE, $tmp_path); + + rename($tmp_path, $state_file) + or die encode_utf8("rename $tmp_path -> $state_file: $!"); + + } catch { + my $err = $@; + if (-e $tmp_path) { + # Ignore error as we have a more important one + unlink($tmp_path) + or warn encode_utf8("Cannot unlink $tmp_path"); + } + die encode_utf8($err); + + # perlcritic 1.140-1 requires the semicolon on the next line + }; + + return 1; +} + +=item find_backlog(LINTIAN_VERSION, STATE) + +[Reporting tools only] Given the current lintian version and the +harness state, return a list of group ids that are part of the +backlog. The list is sorted based on what version of Lintian +processed the package. + +Note the result is by design not deterministic to reduce the +risk of all large packages being in the same run (e.g. like +gcc-5 + gcc-5-cross + gcc-6 + gcc-6-cross). + +=cut + +sub find_backlog { + my ($lintian_version, $state) = @_; + my (@backlog, %by_version, @low_priority); + for my $group_id (keys(%{$state->{'groups'}})) { + my $last_version = '0'; + my $group_data = $state->{'groups'}{$group_id}; + my $is_out_of_date; + # Does this group repeatedly fail with the current version + # of lintian? + if ( exists($group_data->{'processing-errors'}) + and $group_data->{'processing-errors'} > 2 + and exists($group_data->{'last-error-by'}) + and $group_data->{'last-error-by'} ne $lintian_version) { + # To avoid possible "starvation", we will give lower priority + # to packages that repeatedly fail. They will be retried as + # the backlog is cleared. + push(@low_priority, $group_id); + next; + } + if (exists($group_data->{'out-of-date'})) { + $is_out_of_date = $group_data->{'out-of-date'}; + } + if (exists($group_data->{'last-processed-by'})) { + $last_version = $group_data->{'last-processed-by'}; + } + $is_out_of_date = 1 + if not versions_equal($last_version, $lintian_version); + push(@{$by_version{$last_version}}, $group_id) if $is_out_of_date; + } + for my $v (sort(versions_comparator keys(%by_version))) { + push(@backlog, shuffle(@{$by_version{$v}})); + } + push(@backlog, shuffle(@low_priority)) if @low_priority; + return @backlog; +} + +=back + +=head1 SEE ALSO + +lintian(1) + +=cut + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Screen.pm b/lib/Lintian/Screen.pm new file mode 100644 index 0000000..28d8c85 --- /dev/null +++ b/lib/Lintian/Screen.pm @@ -0,0 +1,80 @@ +# Copyright (C) 2021 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Screen; + +use v5.20; +use warnings; +use utf8; + +use Moo::Role; +use namespace::clean; + +=head1 NAME + +Lintian::Screen -- Common facilities for Lintian screens + +=head1 SYNOPSIS + + use Moo; + use namespace::clean; + + with('Lintian::Screen'); + +=head1 DESCRIPTION + +A class for masking Lintian tags after they are issued + +=head1 INSTANCE METHODS + +=over 4 + +=item name + +=item advocates + +=item reason + +=item see_also + +=cut + +has name => (is => 'rw', default => sub { {} }); +has advocates => (is => 'rw', default => sub { {} }); +has reason => (is => 'rw', default => sub { {} }); +has see_also => (is => 'rw', default => sub { {} }); + +=back + +=head1 AUTHOR + +Originally written by Felix Lechner <felix.lechner@lease-up.com> for Lintian. + +=head1 SEE ALSO + +lintian(1) + +=cut + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Screen/Autotools/LongLines.pm b/lib/Lintian/Screen/Autotools/LongLines.pm new file mode 100644 index 0000000..1de9b85 --- /dev/null +++ b/lib/Lintian/Screen/Autotools/LongLines.pm @@ -0,0 +1,61 @@ +# Copyright (C) 2021 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Screen::Autotools::LongLines; + +use v5.20; +use warnings; +use utf8; + +use Moo; +use namespace::clean; + +with 'Lintian::Screen'; + +sub suppress { + my ($self, $processable, $hint) = @_; + + my $item = $hint->pointer->item; + + # ./configure script in source root only + return 1 + if $item->name eq 'configure' + && ( defined $processable->patched->resolve_path('configure.in') + || defined $processable->patched->resolve_path('configure.ac')); + + # Automake's Makefile.in in any folder + return 1 + if $item->basename eq 'Makefile.in' + && defined $processable->patched->resolve_path( + $item->dirname . '/Makefile.am'); + + # any m4 macro as long as ./configure is present + return 1 + if $item->name =~ m{^ m4/ }x + && defined $processable->patched->resolve_path('configure'); + + return 0; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Screen/Coq/Cmxs/Prerequisites.pm b/lib/Lintian/Screen/Coq/Cmxs/Prerequisites.pm new file mode 100644 index 0000000..aaf4600 --- /dev/null +++ b/lib/Lintian/Screen/Coq/Cmxs/Prerequisites.pm @@ -0,0 +1,49 @@ +# Copyright (C) 2021 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Screen::Coq::Cmxs::Prerequisites; + +use v5.20; +use warnings; +use utf8; + +use Moo; +use namespace::clean; + +with 'Lintian::Screen'; + +sub suppress { + my ($self, $processable, $hint) = @_; + + my $item = $hint->pointer->item; + + return 1 + if $item->name =~ m{ [.]cmxs $}x + && ( $processable->type eq 'binary' + || $processable->type eq 'udeb'); + + return 0; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Screen/Emacs/Elpa/Scripts.pm b/lib/Lintian/Screen/Emacs/Elpa/Scripts.pm new file mode 100644 index 0000000..a943620 --- /dev/null +++ b/lib/Lintian/Screen/Emacs/Elpa/Scripts.pm @@ -0,0 +1,50 @@ +# Copyright (C) 2021 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Screen::Emacs::Elpa::Scripts; + +use v5.20; +use warnings; +use utf8; + +use Moo; +use namespace::clean; + +with 'Lintian::Screen'; + +sub suppress { + my ($self, $processable, $hint) = @_; + + my $item = $hint->pointer->item; + + return 1 + if $item->name =~ m{^usr/lib/emacsen-common/packages/} + && ( $processable->type eq 'binary' + || $processable->type eq 'udeb') + && $processable->relation('strong')->satisfies('emacsen-common'); + + return 0; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Screen/Examples/InTests.pm b/lib/Lintian/Screen/Examples/InTests.pm new file mode 100644 index 0000000..c1bc63f --- /dev/null +++ b/lib/Lintian/Screen/Examples/InTests.pm @@ -0,0 +1,47 @@ +# Copyright (C) 2021 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Screen::Examples::InTests; + +use v5.20; +use warnings; +use utf8; + +use Moo; +use namespace::clean; + +with 'Lintian::Screen'; + +sub suppress { + my ($self, $processable, $hint) = @_; + + my $item = $hint->pointer->item; + + return 1 + if $item->name =~ m{^ test s? / }x; + + return 0; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Screen/Examples/Ship/Devhelp.pm b/lib/Lintian/Screen/Examples/Ship/Devhelp.pm new file mode 100644 index 0000000..2727628 --- /dev/null +++ b/lib/Lintian/Screen/Examples/Ship/Devhelp.pm @@ -0,0 +1,47 @@ +# Copyright (C) 2022 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Screen::Examples::Ship::Devhelp; + +use v5.20; +use warnings; +use utf8; + +use Moo; +use namespace::clean; + +with 'Lintian::Screen'; + +sub suppress { + my ($self, $processable, $hint) = @_; + + my $item = $hint->pointer->item; + + return 1 + if $item->name =~ m{^ usr/share/doc/ [^/]+ /examples/ }x; + + return 0; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Screen/Glibc/Control/Ldconfig.pm b/lib/Lintian/Screen/Glibc/Control/Ldconfig.pm new file mode 100644 index 0000000..403d940 --- /dev/null +++ b/lib/Lintian/Screen/Glibc/Control/Ldconfig.pm @@ -0,0 +1,45 @@ +# Copyright (C) 2021 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Screen::Glibc::Control::Ldconfig; + +use v5.20; +use warnings; +use utf8; + +use Moo; +use namespace::clean; + +with 'Lintian::Screen'; + +sub suppress { + my ($self, $processable, $hint) = @_; + + return 1 + if $processable->source_name eq 'glibc'; + + return 0; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Screen/Python/Egg/Metadata.pm b/lib/Lintian/Screen/Python/Egg/Metadata.pm new file mode 100644 index 0000000..e21de22 --- /dev/null +++ b/lib/Lintian/Screen/Python/Egg/Metadata.pm @@ -0,0 +1,54 @@ +# Copyright (C) 2021 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Screen::Python::Egg::Metadata; + +use v5.20; +use warnings; +use utf8; + +use Moo; +use namespace::clean; + +with 'Lintian::Screen'; + +sub suppress { + my ($self, $processable, $hint) = @_; + + my $item = $hint->pointer->item; + + return 1 + if $item->dirname =~ m{ [^/] [.] dist-info / $}x + && defined $item->parent_dir->child('METADATA') + && defined $item->parent_dir->child('WHEEL') + && defined $item->parent_dir->child('RECORD'); + + return 1 + if $item->dirname =~ m{ [^/] [.] egg-info / $}x + && defined $item->parent_dir->child('PKG-INFO'); + + return 0; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Screen/Toolchain/Gnat/AliReadOnly.pm b/lib/Lintian/Screen/Toolchain/Gnat/AliReadOnly.pm new file mode 100644 index 0000000..682f549 --- /dev/null +++ b/lib/Lintian/Screen/Toolchain/Gnat/AliReadOnly.pm @@ -0,0 +1,52 @@ +# Copyright (C) 2021 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Screen::Toolchain::Gnat::AliReadOnly; + +use v5.20; +use warnings; +use utf8; + +use Moo; +use namespace::clean; + +with 'Lintian::Screen'; + +sub suppress { + my ($self, $processable, $hint) = @_; + + my $item = $hint->pointer->item; + + return 1 + if $item->name + =~ m{^ usr/lib/ [^/]+ /ada/adalib/ [^/]+ / [^/]+ [.] ali \b }x + && ( $processable->type eq 'binary' + || $processable->type eq 'udeb') + && $processable->name =~ /-dev$/ + && $processable->relation('strong')->satisfies('gnat'); + + return 0; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Screen/Web/Cgi/Scripts.pm b/lib/Lintian/Screen/Web/Cgi/Scripts.pm new file mode 100644 index 0000000..f667111 --- /dev/null +++ b/lib/Lintian/Screen/Web/Cgi/Scripts.pm @@ -0,0 +1,48 @@ +# Copyright (C) 2021 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Screen::Web::Cgi::Scripts; + +use v5.20; +use warnings; +use utf8; + +use Moo; +use namespace::clean; + +with 'Lintian::Screen'; + +sub suppress { + my ($self, $processable, $hint) = @_; + + my $item = $hint->pointer->item; + + return 1 + if ($item->is_script || $item->is_elf) + && $item->name =~ m{^ usr/lib/cgi-bin/ }x; + + return 0; +} + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/SlidingWindow.pm b/lib/Lintian/SlidingWindow.pm new file mode 100644 index 0000000..2274d78 --- /dev/null +++ b/lib/Lintian/SlidingWindow.pm @@ -0,0 +1,171 @@ +# -*- perl -*- + +# Copyright (C) 2013 Bastien ROUCARIES +# Copyright (C) 2021 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by the Free +# Software Foundation; either version 2 of the License, or (at your option) +# any later version. +# +# This program is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +# more details. +# +# You should have received a copy of the GNU General Public License along with +# this program. If not, see <http://www.gnu.org/licenses/>. + +package Lintian::SlidingWindow; + +use v5.20; +use warnings; +use utf8; + +use Const::Fast; +use Unicode::UTF8 qw(encode_utf8); + +use Moo; +use namespace::clean; + +const my $DEFAULT_BLOCK_SIZE => 4096; +const my $EMPTY => q{}; + +has handle => (is => 'rw'); +has blocksize => (is => 'rw', default => $DEFAULT_BLOCK_SIZE); +has blocknumber => (is => 'rw', default => -1); +has blocksub => (is => 'rw', default => undef); +has _queue => (is => 'rw', default => sub {[q{}, q{}]}); + +sub readwindow { + my ($self) = @_; + my $window; + + my $first = $self->blocknumber < 0; + { + # This path is too hot for autodie at its current performance + # (at the time of writing, that would be autodie/2.23). + # - Benchmark chromium-browser/32.0.1700.123-2/source + no autodie qw(read); + my $blocksize = $self->blocksize; + # Read twice the amount in the first window and split that + # into "two parts". That way we avoid half a block followed + # by a full block with the first half being identical to the + # previous one. + $blocksize *= 2 if $first; + my $res = read($self->handle, $window, $blocksize); + if (not $res) { + die encode_utf8("read failed: $!\n") unless defined($res); + return; + } + } + + if(defined($self->blocksub)) { + local $_ = $window; + $self->blocksub->(); + $window = $_; + } + + $self->blocknumber($self->blocknumber + 1); + + if ($first && $self->blocksize < length($window)) { + # Split the first block into two windows. We assume here that + # if the two halves are not of equal length, then it is + # because the file is shorter than 2*blocksize. In this case, + # make the second half the shorter (it shouldn't matter and it + # is easier to do this way). + my $blocksize = $self->blocksize; + $self->_queue->[0] = substr($window, 0, $blocksize); + $self->_queue->[1] = substr($window, $blocksize); + return $window; + } + shift(@{$self->_queue}); + push(@{$self->_queue}, $window); + return join($EMPTY, @{$self->_queue}); +} + +=head1 NAME + +Lintian::SlidingWindow - Lintian interface to sliding window match + +=head1 SYNOPSIS + + use Lintian::SlidingWindow; + + my $sfd = Lintian::SlidingWindow->new('<','someevilfile.c', sub { $_ = lc($_); }); + my $window; + while ($window = $sfd->readwindow) { + if (index($window, 'evil') > -1) { + if($window =~ + m/software \s++ shall \s++ + be \s++ used \s++ for \s++ good \s*+ ,?+ \s*+ + not \s++ evil/xsim) { + # do something like : tag 'license-problem-json-evil'; + } + } + } + +=head1 DESCRIPTION + +Lintian::SlidingWindow provides a way of matching some pattern, +including multi line pattern, without needing to fully load the +file in memory. + +=head1 CLASS METHODS + +=over 4 + +=item new(HANDLE[, BLOCKSUB[, BLOCKSIZE]]) + +Create a new sliding window by reading from a given HANDLE, which must +be open for reading. Optionally run BLOCKSUB against each block. Note +that BLOCKSUB should apply transform byte by byte and does not depend +of context. + +Each window consists of up to two blocks of BLOCKSIZE characters. + +=back + +=head1 INSTANCE METHODS + +=over 4 + +=item readwindow + +Return a new block of sliding window. Return undef at end of file. + +=item C<blocksize> + +=item blocknumber + +=item handle + +=item blocksub + +=back + +=head1 DIAGNOSTICS + +=over 4 + +=item no data type specified + +=back + +=head1 AUTHOR + +Originally written by Bastien ROUCARIES for Lintian. + +=head1 SEE ALSO + +lintian(1) + +=cut + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Spelling.pm b/lib/Lintian/Spelling.pm new file mode 100644 index 0000000..59c2385 --- /dev/null +++ b/lib/Lintian/Spelling.pm @@ -0,0 +1,293 @@ +# -*- perl -*- +# Lintian::Spelling -- Lintian spelling checks shared between multiple scripts + +# Copyright (C) 2009 Russ Allbery +# Copyright (C) 2004 Marc Brockschmidt +# Copyright (C) 1998 Richard Braakman +# +# This program is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by the Free +# Software Foundation; either version 2 of the License, or (at your option) +# any later version. +# +# This program is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +# more details. +# +# You should have received a copy of the GNU General Public License along with +# this program. If not, see <http://www.gnu.org/licenses/>. + +package Lintian::Spelling; + +use v5.20; +use warnings; +use utf8; + +use Exporter qw(import); + +our @EXPORT_OK = qw( + check_spelling + check_spelling_picky +); + +use Carp qw(croak); +use Const::Fast; +use Unicode::UTF8 qw(encode_utf8); + +const my $SPACE => q{ }; +const my $DOUBLE_QUOTE => q{"}; + +=head1 NAME + +Lintian::Spelling -- Lintian spell checks shared between multiple scripts + +=head1 SYNOPSIS + + use Lintian::Spelling qw(check_spelling); + +=head1 DESCRIPTION + +This module provides functions to do some Lintian checks that need to be +done in multiple places. There are certain low-level checks, such as +validating a maintainer name and e-mail address or checking spelling, +which apply in multiple situations and should be done in multiple checks +scripts or in checks scripts and the Lintian front-end. + +The functions provided by this module issue tags directly, usually either +taking the tag name to issue as an argument or dynamically constructing +the tag name based on function parameters. The caller is responsible for +ensuring that all tags are declared in the relevant *.desc file with +proper descriptions and other metadata. The possible tags issued by each +function are described in the documentation for that function. + +=head1 FUNCTIONS + +=over 4 + +=item check_spelling(TEXT,[ EXCEPTIONS,] CODEREF) + +Performs a spelling check of TEXT. Call CODEREF once for each unique +misspelling with the following arguments: + +=over 4 + +=item The misspelled word/phrase + +=item The correct word/phrase + +=back + +If EXCEPTIONS is given, it will be used as an array ref of exceptions. +Any lowercase word appearing as a key of that array will never be +considered a spelling mistake (exception being if it is a part of a +multiword misspelling). + +Returns the number of spelling mistakes found in TEXT. + +=cut + +my (%CORRECTIONS, @CORRECTIONS_MULTIWORD); + +sub check_spelling { + my ($data, $text, $acceptable, $code_ref, $duplicate_check) = @_; + + croak encode_utf8('No spelling data') + unless defined $data; + + return 0 + unless $text; + + if ( !defined $code_ref + && defined $acceptable + && ref($acceptable) eq 'CODE') { + $code_ref = $acceptable; + $acceptable = []; + } + + $acceptable //= []; + $duplicate_check //= 1; + + my %exceptions = map { $_ => 1 } @{$acceptable}; + + my (%seen, %duplicates, $last_word, $quoted); + my $counter = 0; + my $text_orig = $text; + + if (!%CORRECTIONS) { + my $corrections_multiword + = $data->load('spelling/corrections-multiword', '\|\|'); + my $corrections = $data->load('spelling/corrections', '\|\|'); + for my $misspelled ($corrections->all) { + $CORRECTIONS{$misspelled} = $corrections->value($misspelled); + } + for my $misspelled_regex ($corrections_multiword->all) { + my $correct = $corrections_multiword->value($misspelled_regex); + push(@CORRECTIONS_MULTIWORD, + [qr/\b($misspelled_regex)\b/, $correct]); + } + } + + $text =~ tr/[]//d; + # Strip () except for "(s)" suffixes. + $text =~ s/(\((?!s\))|(?<!\(s)\))//gi; + $text =~ s/(\w-)\s*\n\s*/$1/; + $text =~ tr/\r\n \t/ /s; + $text =~ s/\s++/ /g; + + # trim both ends + $text =~ s/^\s+|\s+$//g; + + for my $word (split($SPACE, $text)) { + my $ends_with_punct = 0; + my $q = $word =~ tr/"/"/; + # Change quoting on "foo or foo" but not "foo". + if ($q & 1) { + $quoted = not $quoted; + } + $ends_with_punct = 1 if $word =~ s/[.,;:?!]+$//; + + if ($duplicate_check and defined($last_word) and $last_word eq $word) { + # Avoid flagging words inside quoted text. + $code_ref->("$word $word (duplicate word)", $word) + if not $quoted + and not $duplicates{$word}++ + and not $ends_with_punct + and $text_orig !~ /\b$word\s*\($word\b/; + } + + if ($word =~ m/^[A-Za-z]+$/ and not $ends_with_punct) { + $last_word = $word; + } else { + $last_word = undef; + } + + next + if $word =~ /^[A-Z]{1,5}\z/; + + # Some exceptions are based on case (e.g. "teH"). + next + if exists $exceptions{$word}; + + my $lcword = lc $word; + if (exists $CORRECTIONS{$lcword} + && !exists $exceptions{$lcword}) { + + $counter++; + my $correction = $CORRECTIONS{$lcword}; + + if ($word =~ /^[A-Z]+$/) { + $correction = uc $correction; + } elsif ($word =~ /^[A-Z]/) { + $correction = ucfirst $correction; + } + + next + if $seen{$lcword}++; + + $code_ref->($word, $correction); + } + } + + # Special case for correcting multi-word strings. + for my $cm (@CORRECTIONS_MULTIWORD) { + my ($oregex, $correction) = @{$cm}; + if ($text =~ $oregex) { + my $word = $1; + if ($word =~ /^[A-Z]+$/) { + $correction = uc $correction; + } elsif ($word =~ /^[A-Z]/) { + $correction = ucfirst $correction; + } + $counter++; + next if $seen{lc $word}++; + $code_ref->( + $DOUBLE_QUOTE . $word . $DOUBLE_QUOTE, + $DOUBLE_QUOTE . $correction . $DOUBLE_QUOTE + ); + } + } + + return $counter; +} + +=item check_spelling_picky(TEXT, CODEREF) + +Performs a spelling check of TEXT. Call CODEREF once for each unique +misspelling with the following arguments: + +=over 4 + +=item The misspelled word/phrase + +=item The correct word/phrase + +=back + +This method performs some pickier corrections - such as checking for common +capitalization mistakes - which would are not included in check_spelling as +they are not appropriate for some files, such as changelogs. + +Returns the number of spelling mistakes found in TEXT. + +=cut + +sub check_spelling_picky { + my ($data, $text, $code_ref) = @_; + + croak encode_utf8('No spelling data') + unless defined $data; + + my %seen; + my $counter = 0; + my $corrections_case= $data->load('spelling/corrections-case', '\|\|'); + + # Check this first in case it's contained in square brackets and + # removed below. + if ($text =~ /meta\s+package/) { + $counter++; + $code_ref->('meta package', 'metapackage'); + } + + # Exclude text enclosed in square brackets as it could be a package list + # or similar which may legitimately contain lower-cased versions of + # the words. + $text =~ s/\[.+?\]//sg; + $text =~ tr/\r\n \t/ /s; + $text =~ s/\s++/ /g; + + # trim both ends + $text =~ s/^\s+|\s+$//g; + + for my $word (split(/\s+/, $text)) { + $word =~ s/^\(|[).,?!:;]+$//g; + if ($corrections_case->recognizes($word)) { + $counter++; + next if $seen{$word}++; + $code_ref->($word, $corrections_case->value($word)); + } + } + + return $counter; +} + +=back + +=head1 AUTHOR + +Originally written by Russ Allbery <rra@debian.org> for Lintian. Based on +code from checks scripts by Marc Brockschmidt and Richard Braakman. + +=head1 SEE ALSO + +lintian(1) + +=cut + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Storage/MLDBM.pm b/lib/Lintian/Storage/MLDBM.pm new file mode 100644 index 0000000..f58cb8c --- /dev/null +++ b/lib/Lintian/Storage/MLDBM.pm @@ -0,0 +1,128 @@ +# -*- perl -*- Lintian::Storage::MLDBM +# +# Copyright (C) 2022 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by the Free +# Software Foundation; either version 2 of the License, or (at your option) +# any later version. +# +# This program is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +# more details. +# +# You should have received a copy of the GNU General Public License along with +# this program. If not, see <http://www.gnu.org/licenses/>. + +package Lintian::Storage::MLDBM; + +use v5.20; +use warnings; +use utf8; + +use BerkeleyDB; +use Const::Fast; +use MLDBM qw(BerkeleyDB::Btree Storable); +use Path::Tiny; +use Syntax::Keyword::Try; +use Unicode::UTF8 qw(encode_utf8 decode_utf8); + +const my $EMPTY => q{}; +const my $HYPHEN => q{-}; + +use Moo; +use namespace::clean; + +=head1 NAME + +Lintian::Storage::MLDBM - store multi-level hashes on disk + +=head1 SYNOPSIS + + use Lintian::Storage::MLDBM; + +=head1 DESCRIPTION + +Lintian::Storage::MLDBM provides an interface to store data on disk to preserve memory. + +=head1 INSTANCE METHODS + +=over 4 + +=item tempfile + +=item tied_hash + +=cut + +has tempfile => (is => 'rw'); +has tied_hash => (is => 'rw', default => sub { {} }); + +=item create + +=cut + +sub create { + my ($self, $description) = @_; + + $description //= $EMPTY; + + $description .= $HYPHEN + if length $description; + + my $stem = "mldbm-$description"; + + my $tempfile + = Path::Tiny->tempfile(TEMPLATE => $stem . 'XXXXXXXX', UNLINK => 0); + $self->tempfile($tempfile); + + try { + tie( + %{$self->tied_hash}, 'MLDBM', + -Filename => $tempfile->stringify, + -Flags => DB_CREATE + ); + + } catch { + die encode_utf8("Cannot create database in $tempfile: $@"); + }; + + return; +} + +=item DEMOLISH + +=cut + +sub DEMOLISH { + my ($self, $in_global_destruction) = @_; + + untie %{$self->tied_hash}; + + $self->tempfile->remove + if defined $self->tempfile; + + return; +} + +=back + +=head1 AUTHOR + +Originally written by Felix Lechner <felix.lechner@lease-up.com> for +Lintian. + +=head1 SEE ALSO + +lintian(1) + +=cut + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Tag.pm b/lib/Lintian/Tag.pm new file mode 100644 index 0000000..7c93086 --- /dev/null +++ b/lib/Lintian/Tag.pm @@ -0,0 +1,297 @@ +# -*- perl -*- +# Lintian::Tag -- interface to tag metadata + +# Copyright (C) 1998 Christian Schwarz and Richard Braakman +# Copyright (C) 2009 Russ Allbery +# Copyright (C) 2020 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by the Free +# Software Foundation; either version 2 of the License, or (at your option) +# any later version. +# +# This program is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +# more details. +# +# You should have received a copy of the GNU General Public License along with +# this program. If not, see <http://www.gnu.org/licenses/>. + +package Lintian::Tag; + +use v5.20; +use warnings; +use utf8; + +use Carp qw(croak); +use Const::Fast; +use Email::Address::XS; +use List::SomeUtils qw(none first_value); +use Syntax::Keyword::Try; +use Unicode::UTF8 qw(encode_utf8); + +use Lintian::Deb822; + +use Moo; +use namespace::clean; + +const my $EMPTY => q{}; +const my $SLASH => q{/}; + +# Ordered lists of visibilities, used for display level parsing. +our @VISIBILITIES= qw(classification pedantic info warning error); + +=head1 NAME + +Lintian::Tag - Lintian interface to tag metadata + +=head1 SYNOPSIS + + my $tag = Lintian::Tag->new; + +=head1 DESCRIPTION + +This module provides an interface to tag metadata as gleaned from the +*.desc files describing the checks. It can be used to retrieve specific +metadata elements or to format the tag description. + +=head1 INSTANCE METHODS + +=over 4 + +=item name + +=item visibility + +=item check + +=item name_spaced + +=item show_always + +=item experimental + +=item explanation + +=item see_also + +=item renamed_from + +=item profile + +=cut + +has name => ( + is => 'rw', + coerce => sub { my ($text) = @_; return ($text // $EMPTY); }, + default => $EMPTY +); + +has visibility => ( + is => 'rw', + lazy => 1, + coerce => sub { + my ($text) = @_; + + $text //= $EMPTY; + croak encode_utf8("Unknown tag visibility $text") + if none { $text eq $_ } @VISIBILITIES; + + return $text; + }, + default => $EMPTY +); + +has check => ( + is => 'rw', + coerce => sub { my ($text) = @_; return ($text // $EMPTY); }, + default => $EMPTY +); + +has name_spaced => ( + is => 'rw', + coerce => sub { my ($boolean) = @_; return ($boolean // 0); }, + default => 0 +); + +has show_always => ( + is => 'rw', + coerce => sub { my ($boolean) = @_; return ($boolean // 0); }, + default => 0 +); + +has experimental => ( + is => 'rw', + coerce => sub { my ($boolean) = @_; return ($boolean // 0); }, + default => 0 +); + +has explanation => ( + is => 'rw', + coerce => sub { my ($text) = @_; return ($text // $EMPTY); }, + default => $EMPTY +); + +has see_also => ( + is => 'rw', + coerce => sub { my ($arrayref) = @_; return ($arrayref // []); }, + default => sub { [] } +); + +has renamed_from => ( + is => 'rw', + coerce => sub { my ($arrayref) = @_; return ($arrayref // []); }, + default => sub { [] } +); + +has screens => ( + is => 'rw', + coerce => sub { my ($arrayref) = @_; return ($arrayref // []); }, + default => sub { [] } +); + +=item load(PATH) + +Loads a tag description from PATH. + +=cut + +sub load { + my ($self, $profile, $tagpath) = @_; + + croak encode_utf8('No profile') + unless defined $profile; + + croak encode_utf8("Cannot read tag file from $tagpath") + unless -r $tagpath; + + my $deb822 = Lintian::Deb822->new; + my @sections = $deb822->read_file($tagpath); + + my $fields = shift @sections; + + $self->check($fields->value('Check')); + $self->name_spaced($fields->value('Name-Spaced') eq 'yes'); + $self->show_always($fields->value('Show-Always') eq 'yes'); + + my $name = $fields->value('Tag'); + $name = $self->check . $SLASH . $name + if $self->name_spaced; + + $self->name($name); + + $self->visibility($fields->value('Severity')); + $self->experimental($fields->value('Experimental') eq 'yes'); + + $self->explanation($fields->text('Explanation') || $fields->text('Info')); + + my @see_also = $fields->trimmed_list('See-Also', qr{,}); + @see_also = $fields->trimmed_list('Ref', qr{,}) + unless @see_also; + + $self->see_also(\@see_also); + + $self->renamed_from([$fields->trimmed_list('Renamed-From')]); + + croak encode_utf8("No Tag field in $tagpath") + unless length $self->name; + + my @screens; + for my $section (@sections) { + + my $screen_name = $section->value('Screen'); + + my $relative = $screen_name; + $relative =~ s{^([[:lower:]])}{\U$1}; + $relative =~ s{/([[:lower:]])}{/\U$1}g; + $relative =~ s{-([[:lower:]])}{\U$1}g; + + $relative .= '.pm'; + + my @candidates= map { + ( + ($_ // q{.})."/lib/Lintian/Screen/$relative", + ($_ // q{.})."/screens/$relative" + ) + } @{$profile->safe_include_dirs}; + + my $absolute = first_value { -e } @candidates; + die encode_utf8( + "Cannot find screen $screen_name (looking for $relative)") + unless length $absolute; + + try { + require $absolute; + } catch { + die encode_utf8("Cannot load screen $absolute: $@"); + } + + my $module = $relative; + $module =~ s{ [.]pm $}{}x; + $module =~ s{/}{::}g; + + my $screen = "Lintian::Screen::$module"->new; + + $screen->name($screen_name); + + my @advocates= Email::Address::XS->parse($section->value('Advocates')); + $screen->advocates(\@advocates); + + $screen->reason($section->text('Reason')); + + my @see_also_screen = $section->trimmed_list('See-Also', qr{,}); + $screen->see_also(\@see_also_screen); + + push(@screens, $screen); + } + + $self->screens(\@screens); + + return; +} + +=item code() + +Returns the one-letter code for the tag. This will be a letter chosen +from C<E>, C<W>, C<I>, or C<P>, based on the tag visibility, and +other attributes (such as whether experimental is set). This code will +never be C<O> or C<X>; overrides and experimental tags are handled +separately. + +=cut + +# Map visibility levels to tag codes. +our %CODES = ( + 'error' => 'E', + 'warning' => 'W', + 'info' => 'I', + 'pedantic' => 'P', + 'classification' => 'C', +); + +sub code { + my ($self) = @_; + + return $CODES{$self->visibility}; +} + +=back + +=head1 AUTHOR + +Originally written by Russ Allbery <rra@debian.org> for Lintian. + +=head1 SEE ALSO + +lintian(1) + +=cut + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Util.pm b/lib/Lintian/Util.pm new file mode 100644 index 0000000..c512451 --- /dev/null +++ b/lib/Lintian/Util.pm @@ -0,0 +1,674 @@ +# Hey emacs! This is a -*- Perl -*- script! +# Lintian::Util -- Perl utility functions for lintian + +# Copyright (C) 1998 Christian Schwarz +# Copyright (C) 2018-2019 Chris Lamb <lamby@debian.org> +# Copyright (C) 2020 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Util; + +use v5.20; +use warnings; +use utf8; + +use Exporter qw(import); + +# Force export as soon as possible, since some of the modules we load also +# depend on us and the sequencing can cause things not to be exported +# otherwise. +our @EXPORT_OK; + +BEGIN { + + @EXPORT_OK = ( + qw( + get_file_checksum + get_file_digest + human_bytes + perm2oct + locate_executable + match_glob + normalize_pkg_path + normalize_link_target + is_ancestor_of + drain_pipe + drop_relative_prefix + read_md5sums + utf8_clean_log + utf8_clean_bytes + version_from_changelog + $PKGNAME_REGEX + $PKGREPACK_REGEX + $PKGVERSION_REGEX + ) + ); +} + +use Carp qw(croak); +use Const::Fast; +use Cwd qw(abs_path); +use Digest::MD5; +use Digest::SHA; +use List::SomeUtils qw(first_value); +use Path::Tiny; +use Regexp::Wildcards; +use Unicode::UTF8 qw(valid_utf8 encode_utf8); + +use Lintian::Deb822; +use Lintian::Changelog; +use Lintian::Relation::Version qw(versions_equal versions_comparator); + +const my $EMPTY => q{}; +const my $SPACE => q{ }; +const my $NEWLINE => qq{\n}; +const my $SLASH => q{/}; +const my $DOT => q{.}; +const my $DOUBLEDOT => q{..}; +const my $BACKSLASH => q{\\}; + +const my $DEFAULT_READ_SIZE => 4096; +const my $KIB_UNIT_FACTOR => 1024; +const my $COMFORT_THRESHOLD => 1536; + +const my $OWNER_READ => oct(400); +const my $OWNER_WRITE => oct(200); +const my $OWNER_EXECUTE => oct(100); +const my $SETUID => oct(4000); +const my $SETUID_OWNER_EXECUTE => oct(4100); +const my $GROUP_READ => oct(40); +const my $GROUP_WRITE => oct(20); +const my $GROUP_EXECUTE => oct(10); +const my $SETGID => oct(2000); +const my $SETGID_GROUP_EXECUTE => oct(2010); +const my $WORLD_READ => oct(4); +const my $WORLD_WRITE => oct(2); +const my $WORLD_EXECUTE => oct(1); +const my $STICKY => oct(1000); +const my $STICKY_WORLD_EXECUTE => oct(1001); + +# preload cache for common permission strings +# call overhead o perm2oct was measurable on chromium-browser/32.0.1700.123-2 +# load time went from ~1.5s to ~0.1s; of 115363 paths, only 306 were uncached +# standard file, executable file, standard dir, dir with suid, symlink +my %OCTAL_LOOKUP = map { $_ => perm2oct($_) } qw( + -rw-r--r-- + -rwxr-xr-x + drwxr-xr-x + drwxr-sr-x + lrwxrwxrwx +); + +my $rw = Regexp::Wildcards->new(type => 'jokers'); + +=head1 NAME + +Lintian::Util - Lintian utility functions + +=head1 SYNOPSIS + + use Lintian::Util; + +=head1 DESCRIPTION + +This module contains a number of utility subs that are nice to have, +but on their own did not warrant their own module. + +Most subs are imported only on request. + +=head1 VARIABLES + +=over 4 + +=item $PKGNAME_REGEX + +Regular expression that matches valid package names. The expression +is not anchored and does not enforce any "boundary" characters. + +=cut + +our $PKGNAME_REGEX = qr/[a-z0-9][-+\.a-z0-9]+/; + +=item $PKGREPACK_REGEX + +Regular expression that matches "repacked" package names. The expression is +not anchored and does not enforce any "boundary" characters. It should only +be applied to the upstream portion (see #931846). + +=cut + +our $PKGREPACK_REGEX = qr/(dfsg|debian|ds|repack)/; + +=item $PKGVERSION_REGEX + +Regular expression that matches valid package versions. The +expression is not anchored and does not enforce any "boundary" +characters. + +=cut + +our $PKGVERSION_REGEX = qr{ + (?: \d+ : )? # Optional epoch + [0-9][0-9A-Za-z.+:~]* # Upstream version (with no hyphens) + (?: - [0-9A-Za-z.+:~]+ )* # Optional debian revision (+ upstreams versions with hyphens) + }xa; + +=back + +=head1 FUNCTIONS + +=over 4 + +=item drain_pipe(FD) + +Reads and discards any remaining contents from FD, which is assumed to +be a pipe. This is mostly done to avoid having the "write"-end die +with a SIGPIPE due to a "broken pipe" (which can happen if you just +close the pipe). + +May cause an exception if there are issues reading from the pipe. + +Caveat: This will block until the pipe is closed from the "write"-end, +so only use it with pipes where the "write"-end will eventually close +their end by themselves (or something else will make them close it). + +=cut + +sub drain_pipe { + my ($fd) = @_; + my $buffer; + + 1 while (read($fd, $buffer, $DEFAULT_READ_SIZE) > 0); + + return 1; +} + +=item get_file_digest(ALGO, FILE) + +Creates an ALGO digest object that is seeded with the contents of +FILE. If you just want the hex digest, please use +L</get_file_checksum(ALGO, FILE)> instead. + +ALGO can be 'md5' or shaX, where X is any number supported by +L<Digest::SHA> (e.g. 'sha256'). + +This sub is a convenience wrapper around Digest::{MD5,SHA}. + +=cut + +sub get_file_digest { + my ($alg, $file) = @_; + + open(my $fd, '<', $file) + or die encode_utf8("Cannot open $file"); + + my $digest; + if (lc($alg) eq 'md5') { + $digest = Digest::MD5->new; + } elsif (lc($alg) =~ /sha(\d+)/) { + $digest = Digest::SHA->new($1); + } + $digest->addfile($fd); + close($fd); + + return $digest; +} + +=item get_file_checksum(ALGO, FILE) + +Returns a hexadecimal string of the message digest checksum generated +by the algorithm ALGO on FILE. + +ALGO can be 'md5' or shaX, where X is any number supported by +L<Digest::SHA> (e.g. 'sha256'). + +This sub is a convenience wrapper around Digest::{MD5,SHA}. + +=cut + +sub get_file_checksum { + my @paths = @_; + + my $digest = get_file_digest(@paths); + + return $digest->hexdigest; +} + +=item perm2oct(PERM) + +Translates PERM to an octal permission. PERM should be a string describing +the permissions as done by I<tar t> or I<ls -l>. That is, it should be a +string like "-rw-r--r--". + +If the string does not appear to be a valid permission, it will cause +a trappable error. + +Examples: + + # Good + perm2oct('-rw-r--r--') == oct(644) + perm2oct('-rwxr-xr-x') == oct(755) + + # Bad + perm2oct('broken') # too short to be recognised + perm2oct('-resurunet') # contains unknown permissions + +=cut + +sub perm2oct { + my ($text) = @_; + + my $lookup = $OCTAL_LOOKUP{$text}; + return $lookup + if defined $lookup; + + my $octal = 0; + + # Types: + # file (-), block/character device (b & c), directory (d), + # hardlink (h), symlink (l), named pipe (p). + if ( + $text !~ m{^ [-bcdhlp] # file type + ([-r])([-w])([-xsS]) # user + ([-r])([-w])([-xsS]) # group + ([-r])([-w])([-xtT]) # other + }xsm + ) { + croak encode_utf8("$text does not appear to be a permission string"); + } + + $octal |= $OWNER_READ if $1 eq 'r'; + $octal |= $OWNER_WRITE if $2 eq 'w'; + $octal |= $OWNER_EXECUTE if $3 eq 'x'; + $octal |= $SETUID if $3 eq 'S'; + $octal |= $SETUID_OWNER_EXECUTE if $3 eq 's'; + $octal |= $GROUP_READ if $4 eq 'r'; + $octal |= $GROUP_WRITE if $5 eq 'w'; + $octal |= $GROUP_EXECUTE if $6 eq 'x'; + $octal |= $SETGID if $6 eq 'S'; + $octal |= $SETGID_GROUP_EXECUTE if $6 eq 's'; + $octal |= $WORLD_READ if $7 eq 'r'; + $octal |= $WORLD_WRITE if $8 eq 'w'; + $octal |= $WORLD_EXECUTE if $9 eq 'x'; + $octal |= $STICKY if $9 eq 'T'; + $octal |= $STICKY_WORLD_EXECUTE if $9 eq 't'; + + $OCTAL_LOOKUP{$text} = $octal; + + return $octal; +} + +=item human_bytes(SIZE) + +=cut + +sub human_bytes { + my ($size) = @_; + + my @units = qw(B kiB MiB GiB); + + my $unit = shift @units; + + while ($size > $COMFORT_THRESHOLD && @units) { + + $size /= $KIB_UNIT_FACTOR; + $unit = shift @units; + } + + my $human = sprintf('%.0f %s', $size, $unit); + + return $human; +} + +=item locate_executable (CMD) + +=cut + +sub locate_executable { + my ($command) = @_; + + return $EMPTY + unless exists $ENV{PATH}; + + my @folders = grep { length } split(/:/, $ENV{PATH}); + my $path = first_value { -x "$_/$command" } @folders; + + return ($path // $EMPTY); +} + +=item drop_relative_prefix(STRING) + +Remove an initial ./ from STRING, if present + +=cut + +sub drop_relative_prefix { + my ($name) = @_; + + my $copy = $name; + $copy =~ s{^\./}{}s; + + return $copy; +} + +=item version_from_changelog + +=cut + +sub version_from_changelog { + my ($package_path) = @_; + + my $changelog_path = "$package_path/debian/changelog"; + + return $EMPTY + unless -e $changelog_path; + + my $contents = path($changelog_path)->slurp_utf8; + my $changelog = Lintian::Changelog->new; + + $changelog->parse($contents); + my @entries = @{$changelog->entries}; + + return $entries[0]->{'Version'} + if @entries; + + return $EMPTY; +} + +=item match_glob( $glob, @things_to_test ) + +Resembles the same semantic as Text::Glob's match_glob(), but with the +proper escaping of Regexp::Wildcards and pre-configured for Lintian's +purpose. No more directly having to access module variables either. + +=cut + +sub match_glob { + my ($glob, @things_to_test) = @_; + my $re = $rw->convert($glob); + + return grep { /^$re\z/ } @things_to_test; +} + +=item normalize_pkg_path(PATH) + +Normalize PATH by removing superfluous path segments. PATH is assumed +to be relative the package root. Note that the result will never +start nor end with a slash, even if PATH does. + +As the name suggests, this is a path "normalization" rather than a +true path resolution (for that use Cwd::realpath). Particularly, +it assumes none of the path segments are symlinks. + +normalize_pkg_path will return C<q{}> (i.e. the empty string) if PATH +is normalized to the root dir and C<undef> if the path cannot be +normalized without escaping the package root. + +=item normalize_link_target(CURDIR, LINK_TARGET) + +Normalize the path obtained by following a link with LINK_TARGET as +its target from CURDIR as the current directory. CURDIR is assumed to +be relative to the package root. Note that the result will never +start nor end with a slash, even if CURDIR or DEST does. + +normalize_pkg_path will return C<q{}> (i.e. the empty string) if the +target is the root dir and C<undef> if the path cannot be normalized +without escaping the package root. + +B<CAVEAT>: This function is I<not always sufficient> to test if it is +safe to open a given symlink. Use C<is_ancestor_of(PARENTDIR, PATH)> for +that. If you must use this function, remember to check that the +target is not a symlink (or if it is, that it can be resolved safely). + +=cut + +sub normalize_link_target { + my ($path, $target) = @_; + + if (substr($target, 0, 1) eq $SLASH) { + # Link is absolute + $path = $target; + } else { + # link is relative + $path = "$path/$target"; + } + + return normalize_pkg_path($path); +} + +sub normalize_pkg_path { + my ($path) = @_; + + return $EMPTY + if $path eq $SLASH; + + my @dirty = split(m{/}, $path); + my @clean = grep { length } @dirty; + + my @final; + for my $component (@clean) { + + if ($component eq $DOT) { + # do nothing + + } elsif ($component eq $DOUBLEDOT) { + # are we out of bounds? + my $discard = pop @final; + return undef + unless defined $discard; + + } else { + push(@final, $component); + } + } + + # empty if we end in the root + my $normalized = join($SLASH, @final); + + return $normalized; +} + +=item is_ancestor_of(PARENTDIR, PATH) + +Returns true if and only if PATH is PARENTDIR or a path stored +somewhere within PARENTDIR (or its subdirs). + +This function will resolve the paths; any failure to resolve the path +will cause a trappable error. + +=cut + +sub is_ancestor_of { + my ($ancestor, $file) = @_; + + my $resolved_file = abs_path($file); + croak encode_utf8("resolving $file failed: $!") + unless defined $resolved_file; + + my $resolved_ancestor = abs_path($ancestor); + croak encode_utf8("resolving $ancestor failed: $!") + unless defined $resolved_ancestor; + + my $len; + return 1 if $resolved_ancestor eq $resolved_file; + # add a slash, "path/some-dir" is not "path/some-dir-2" and this + # allows us to blindly match against the root dir. + $resolved_file .= $SLASH; + $resolved_ancestor .= $SLASH; + + # If $resolved_file is contained within $resolved_ancestor, then + # $resolved_ancestor will be a prefix of $resolved_file. + $len = length($resolved_ancestor); + if (substr($resolved_file, 0, $len) eq $resolved_ancestor) { + return 1; + } + return 0; +} + +=item read_md5sums + +=item unescape_md5sum_filename + +=cut + +sub unescape_md5sum_filename { + my ($string, $problematic) = @_; + + # done if there are no escapes + return $string + unless $problematic; + + # split into individual characters + my @array = split(//, $string); + +# https://www.gnu.org/software/coreutils/manual/html_node/md5sum-invocation.html + my $path; + my $escaped = 0; + for my $char (@array) { + + # start escape sequence + if ($char eq $BACKSLASH && !$escaped) { + $escaped = 1; + next; + } + + # unescape newline + $char = $NEWLINE + if $char eq 'n' && $escaped; + + # append character + $path .= $char; + + # end any escape sequence + $escaped = 0; + } + + # do not stop inside an escape sequence + die encode_utf8('Name terminated inside an escape sequence') + if $escaped; + + return $path; +} + +sub read_md5sums { + my ($text) = @_; + + my %checksums; + my @errors; + + my @lines = split(/\n/, $text); + + while (defined(my $line = shift @lines)) { + + next + unless length $line; + + # make sure there are two spaces in between + $line =~ /^((?:\\)?\S{32}) (.*)$/; + + my $checksum = $1; + my $string = $2; + + unless (length $checksum && length $string) { + + push(@errors, "Odd text: $line"); + next; + } + + my $problematic = 0; + + # leading slash in checksum indicates an escaped name + $problematic = 1 + if $checksum =~ s{^\\}{}; + + my $path = unescape_md5sum_filename($string, $problematic); + + push(@errors, "Empty name for checksum $checksum") + unless length $path; + + $checksums{$path} = $checksum; + } + + return (\%checksums, \@errors); +} + +=item utf8_clean_log + +=cut + +sub utf8_clean_log { + my ($bytes) = @_; + + my $hex_sequence = sub { + my ($unclean_bytes) = @_; + return '{hex:' . sprintf('%vX', $unclean_bytes) . '}'; + }; + + my $utf8_clean_word = sub { + my ($word) = @_; + return utf8_clean_bytes($word, $SLASH, $hex_sequence); + }; + + my $utf8_clean_line = sub { + my ($line) = @_; + return utf8_clean_bytes($line, $SPACE, $utf8_clean_word); + }; + + return utf8_clean_bytes($bytes, $NEWLINE, $utf8_clean_line) . $NEWLINE; +} + +=item utf8_clean_bytes + +=cut + +sub utf8_clean_bytes { + my ($bytes, $separator, $utf8_clean_part) = @_; + + my @utf8_clean_parts; + + my $regex = quotemeta($separator); + my @parts = split(/$regex/, $bytes); + + for my $part (@parts) { + + if (valid_utf8($part)) { + push(@utf8_clean_parts, $part); + + } else { + push(@utf8_clean_parts, $utf8_clean_part->($part)); + } + } + + return join($separator, @utf8_clean_parts); +} + +=back + +=head1 SEE ALSO + +lintian(1) + +=cut + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Lintian/Version.pm b/lib/Lintian/Version.pm new file mode 100644 index 0000000..2535a35 --- /dev/null +++ b/lib/Lintian/Version.pm @@ -0,0 +1,117 @@ +# +# Copyright (C) 1998 Christian Schwarz and Richard Braakman +# Copyright (C) 2013 Niels Thykier +# Copyright (C) 2017 Chris Lamb <lamby@debian.org> +# Copyright (C) 2020 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::Version; + +use v5.20; +use warnings; +use utf8; + +our @EXPORT_OK = ( + qw( + guess_version + ) +); + +use Exporter qw(import); + +use Const::Fast; +use Unicode::UTF8 qw(decode_utf8); + +use Lintian::IPC::Run3 qw(safe_qx); +use Lintian::Util qw(version_from_changelog); + +const my $EMPTY => q{}; + +=head1 NAME + +Lintian::Version - routines to determine Lintian version + +=head1 SYNOPSIS + + use Lintian::Version; + +=head1 DESCRIPTION + +Lintian::Version can help guess the current Lintian version. + +=head1 INSTANCE METHODS + +=over 4 + +=item guess_version + +=cut + +sub guess_version { + my ($lintian_base) = @_; + + my $guess = version_from_git($lintian_base); + $guess ||= version_from_changelog($lintian_base); + + return $guess; +} + +=item version_from_git + +=cut + +sub version_from_git { + my ($source_path) = @_; + + my $git_path = "$source_path/.git"; + + return $EMPTY + unless -d $git_path; + + my $describe + = decode_utf8(safe_qx('git', "--git-dir=$git_path", 'describe')); + chomp $describe; + + my ($guess, $step, $commit) = split(/-/, $describe); + return $EMPTY + unless defined $step; + + $guess =~ s/ [.] 0 $/.$step/sx; + + return ($guess // $EMPTY); +} + +=back + +=head1 AUTHOR + +Originally written by Niels Thykier <niels@thykier.net> for Lintian. + +=head1 SEE ALSO + +lintian(1) + +=cut + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Test/Lintian.pm b/lib/Test/Lintian.pm new file mode 100644 index 0000000..4bcf72b --- /dev/null +++ b/lib/Test/Lintian.pm @@ -0,0 +1,697 @@ +# Copyright (C) 1998 Richard Braakman +# Copyright (C) 2012 Niels Thykier +# Copyright (C) 2018 Chris Lamb <lamby@debian.org> +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Test::Lintian; + +=head1 NAME + +Test::Lintian -- Check Lintian files for issues + +=head1 SYNOPSIS + + # file 1 + use Test::Lintian; + use Test::More import => ['done_testing']; + test_load_profiles('some/path'); + + done_testing; + + # file 2 + use Test::Lintian; + use Test::More import => ['done_testing']; + load_profile_for_test('vendor/profile', 'some/path', '/usr/share/lintian'); + test_check_desc('some/path/checks'); + test_load_checks('some/path/checks'); + test_tags_implemented('some/path/checks'); + + done_testing; + +=head1 DESCRIPTION + +A testing framework for testing various Lintian files for common +errors. + +=cut + +use v5.20; +use warnings; +use utf8; + +my $CLASS = __PACKAGE__; +my $PROFILE; +our @EXPORT = qw( + load_profile_for_test + + test_check_desc + test_load_checks + test_load_profiles + + program_name_to_perl_paths +); + +use parent 'Test::Builder::Module'; + +use Cwd qw(realpath); +use Const::Fast; +use File::Basename qw(basename); +use File::Find (); +use List::SomeUtils qw{any}; +use Path::Tiny; +use Syntax::Keyword::Try; +use Unicode::UTF8 qw(valid_utf8 decode_utf8 encode_utf8); + +use Lintian::Spelling qw(check_spelling); +use Lintian::Deb822; +use Lintian::Profile; +use Lintian::Tag; + +const my $EMPTY => q{}; +const my $COLON => q{:}; +const my $MAXIMUM_TAG_LENGTH => 68; + +my %visibilities = map { $_ => 1 } @Lintian::Tag::VISIBILITIES; +my %check_types = map { $_ => 1 } qw(binary changes source udeb); +my %known_html_tags = map { $_ => 1 } qw(a em i tt); + +# lazy-load this (so loading a profile can affect it) +my %URLS; + +=head1 FUNCTIONS + +=over 4 + +=item test_check_desc(OPTS, CHECKS...) + +Test check desc files (and the tags in them) for common errors. + +OPTS is a HASHREF containing key/value pairs, which are +described below. + +CHECKS is a list of paths in which to check desc files. Any given +element in CHECKS can be either a file or a dir. Files are assumed to +be check desc file. Directories are searched and all I<.desc> files +in those dirs are processed. + +As the number of tests depends on the number of tags in desc, it is +difficult to "plan ahead" when using this test. It is therefore +recommended to not specify a plan and use done_testing(). + +This sub uses a Data file (see L</load_profile_for_test ([PROFNAME[, INC...]])>). + +OPTS may contain the following key/value pairs: + +=over 4 + +=item filter + +If defined, it is a filter function that examines $_ (or its first +argument) and returns a truth value if C<$_> should be considered or +false otherwise. C<$_> will be the path to the current file (or dir) +in question; it may be relative or absolute. + +NB: I<all> elements in CHECKS are subject to the filter. + +CAVEAT: If the filter rejects a directory, none of the files in it will be +considered either. Even if the filter accepts a file, that file will +only be processed if it has the proper extension (i.e. with I<.desc>). + +=item translation + +If defined and a truth value, the desc files are expected to contain +translations. Otherwise, they must be regular checks. + +=back + +=cut + +sub test_check_desc { + my ($opts, @dirs) = @_; + + my $builder = $CLASS->builder; + my $colldir = '/usr/share/lintian/collection'; + my $find_opt = {'filter' => undef,}; + my $tested = 0; + + $find_opt->{'filter'} = $opts->{'filter'} + if exists $opts->{'filter'}; + + $opts //= {}; + + load_profile_for_test(); + + my @descs = map { _find_check($find_opt, $_) } @dirs; + foreach my $desc_file (@descs) { + + my $bytes = path($desc_file)->slurp; + $builder->ok(valid_utf8($bytes), + "File $desc_file does not use a national encoding."); + next + unless valid_utf8($bytes); + + my $deb822 = Lintian::Deb822->new; + + my @sections; + try { + @sections = $deb822->read_file($desc_file); + + } catch { + my $err = $@; + $err =~ s/ at .*? line \d+\s*\n//; + $builder->ok(0, "Cannot parse $desc_file"); + $builder->diag("Error: $err"); + next; + } + + my ($header, @tagpara) = @sections; + + my $content_type = 'Check'; + my $cname = $header->value('Check-Script'); + my $ctype = $header->value('Type'); + my $i = 1; # paragraph counter. + $builder->ok(1, "Can parse check $desc_file"); + + $builder->isnt_eq($cname, $EMPTY, + "$content_type has a name ($desc_file)"); + + # From here on, we just use "$cname" as name of the check, so + # we don't need to choose been it and $tname. + $cname = '<missing>' if $cname eq $EMPTY; + $tested += 2; + + if ($cname eq 'lintian') { + my $reason = 'check "lintian" does not have a type'; + # skip these two tests for this special case... + $builder->skip("Special case, $reason"); + $builder->skip("Special case, $reason"); + } elsif ($builder->isnt_eq($ctype, $EMPTY, "$cname has a type")) { + my @bad; + # new lines are not allowed, map them to "\\n" for readability. + $ctype =~ s/\n/\\n/g; + foreach my $type (split /\s*+,\s*+/, $ctype) { + push @bad, $type unless exists $check_types{$type}; + } + $builder->is_eq(join(', ', @bad), + $EMPTY,"The type of $cname is valid"); + } else { + $builder->skip( + "Cannot check type of $cname is valid (field is empty/missing)" + ); + } + + for my $tpara (@tagpara) { + + my $tag = $tpara->value('Tag'); + my $visibility = $tpara->value('Severity'); + my $explanation = $tpara->value('Explanation'); + + my (@htmltags, %seen); + + $i++; + + # Tag name + $builder->isnt_eq($tag, $EMPTY, "Tag in check $cname has a name") + or $builder->diag("$cname: Paragraph number $i\n"); + $tag = '<N/A>' if $tag eq $EMPTY; + $builder->ok($tag =~ /^[\w0-9.+-]+$/, 'Tag has valid characters') + or $builder->diag("$cname: $tag\n"); + $builder->cmp_ok(length $tag, '<=', $MAXIMUM_TAG_LENGTH, + 'Tag is not too long') + or $builder->diag("$cname: $tag\n"); + + # Visibility + $builder->ok($visibility && exists $visibilities{$visibility}, + 'Tag has valid visibility') + or $builder->diag("$cname: $tag visibility: $visibility\n"); + + # Explanation + my $mistakes = 0; + my $handler = sub { + my ($incorrect, $correct) = @_; + $builder->diag( + "Spelling ($cname/$tag): $incorrect => $correct"); + $mistakes++; + }; + # FIXME: There are a couple of known false-positives that + # breaks the test. + # check_spelling($profile, $explanation, $handler); + $builder->is_eq($mistakes, 0, + "$content_type $cname: $tag has no spelling errors"); + + $builder->ok( + $explanation !~ /(?:^| )(?:[Ww]e|I)\b/, + 'Tag explanation does not speak of "I", or "we"' + )or $builder->diag("$content_type $cname: $tag\n"); + + $builder->ok( + $explanation !~ /(\S\w)\. [^ ]/ + || $1 =~ /^\.[ge]$/, # for 'e.g.'/'i.e.' + 'Tag explanation uses two spaces after a full stop' + ) or $builder->diag("$content_type $cname: $tag\n"); + + $builder->ok($explanation !~ /(\S\w\. )/, + 'Tag explanation uses only two spaces after a full stop') + or $builder->diag("$content_type $cname: $tag ($1)\n"); + + $builder->ok(valid_utf8($explanation), + 'Tag explanation must be written in UTF-8') + or $builder->diag("$content_type $cname: $tag\n"); + + # Check the tag explanation for unescaped <> or for unknown tags + # (which probably indicate the same thing). + while ($explanation + =~ s{<([^\s>]+)(?:\s+href=\"[^\"]+\")?>.*?</\1>}{}s){ + push @htmltags, $1; + } + @htmltags + = grep { !exists $known_html_tags{$_} && !$seen{$_}++ }@htmltags; + $builder->is_eq(join(', ', @htmltags), + $EMPTY, 'Tag explanation has no unknown html tags') + or $builder->diag("$content_type $cname: $tag\n"); + + $builder->ok($explanation !~ /[<>]/, + 'Tag explanation has no stray angle brackets') + or $builder->diag("$content_type $cname: $tag\n"); + + if ($tpara->declares('See-Also')) { + + my @issues = map { _check_reference($_) } + $tpara->trimmed_list('See-Also', qr{ \s* , \s* }x); + + my $text = join("\n\t", @issues); + + $builder->ok(!@issues, 'Proper references are used') + or $builder->diag("$content_type $cname: $tag\n\t$text"); + } + } + } + + $builder->cmp_ok($tested, '>', 0, 'Tested at least one desc file') + if @descs; + return; +} + +=item test_load_profiles(ROOT, INC...) + +Test that all profiles in I<ROOT/profiles> are loadable. INC will be +the INC path used as include path for the profile. + +If INC is omitted, then the include path will consist of (ROOT, +'/usr/share/lintian'). Otherwise, INC will be used as is (and should +include ROOT). + +This sub will do one test per profile loaded. + +=cut + +sub test_load_profiles { + my ($dir, @inc) = @_; + + my $builder = $CLASS->builder; + my $absdir = realpath $dir; + my $sre; + my %opt = ('no_chdir' => 1,); + + if (not defined $absdir) { + die encode_utf8("$dir cannot be resolved: $!"); + } + + $absdir = "$absdir/profiles"; + $sre = qr{\Q$absdir\E/}; + + @inc = ($absdir, '/usr/share/lintian') unless @inc; + + $opt{'wanted'} = sub { + my $profname = $File::Find::name; + + return + unless $profname =~ s/\.profile$//; + $profname =~ s/^$sre//; + + my $profile = Lintian::Profile->new; + + try { + $profile->load($profname, \@inc, 0); + + } catch { + $builder->diag("Load error: $@\n"); + $profile = 0; + } + + $builder->ok($profile, "$profname is loadable."); + }; + + File::Find::find(\%opt, $absdir); + return; +} + +=item test_load_checks(OPTS, DIR[, CHECKNAMES...]) + +Test that the Perl module implementation of the checks can be loaded +and has a run sub. + +OPTS is a HASHREF containing key/value pairs, which are +described below. + +DIR is the directory where the checks can be found. + +CHECKNAMES is a list of check names. If CHECKNAMES is given, only the +checks in this list will be processed. Otherwise, all the checks in +DIR will be processed. + +For planning purposes, every check processed counts for 2 tests and +the call itself does on additional check. So if CHECKNAMES contains +10 elements, then 21 tests will be done (2 * 10 + 1). Filtered out +checks will I<not> be counted. + +All data files created at compile time or in the file scope will be +loaded immediately (instead of lazily as done during the regular +runs). This is done to spot missing data files or typos in their +names. Therefore, this sub will load a profile if one hasn't been +loaded already. (see L</load_profile_for_test ([PROFNAME[, +INC...]])>) + +OPTS may contain the following key/value pairs: + +=over 4 + +=item filter + +If defined, it is a filter function that examines $_ (or its first +argument) and returns a truth value if C<$_> should be considered or +false otherwise. C<$_> will be the path to the current file (or dir) +in question; it may be relative or absolute. + +NB: filter is I<not> used if CHECKNAMES is given. + +CAVEAT: If the filter rejects a directory, none of the files in it will be +considered either. Even if the filter accepts a file, that file will +only be processed if it has the proper extension (i.e. with I<.desc>). + +=back + +=cut + +sub test_load_checks { + my ($opts, $dir, @check_names) = @_; + + my $builder = $CLASS->builder; + + unless (@check_names) { + my $find_opt = {'want-check-name' => 1,}; + $find_opt->{'filter'} = $opts->{'filter'} if exists $opts->{'filter'}; + @check_names = _find_check($find_opt, $dir); + } else { + $builder->skip('Given an explicit list of checks'); + } + + $builder->skip('No desc files found') + unless @check_names; + + my $profile = load_profile_for_test(); + + foreach my $check_name (@check_names) { + + my $path = $profile->check_path_by_name->{$check_name}; + try { + require $path; + + } catch { + $builder->skip( +"Cannot check if $check_name has entry points due to load error" + ); + next; + } + + $builder->ok(1, "Check $check_name can be loaded"); + + my $module = $profile->check_module_by_name->{$check_name}; + + $builder->diag( + "Warning: check $check_name uses old entry point ::run\n") + if $module->can('run') && !$module->DOES('Lintian::Check'); + + # setup and breakdown should only be used together with files + my $has_entrypoint = any { $module->can($_) } + qw(source binary udeb installable changes always files); + + if ( + !$builder->ok( + $has_entrypoint, "Check $check_name has entry point" + ) + ){ + $builder->diag("Expected package name is $module\n"); + } + } + return; +} + +=item load_profile_for_test ([PROFNAME[, INC...]]) + +Load a Lintian::Profile and ensure Data files can be used. This is +needed if the test needs to access a data file or if a special profile +is needed for the test. It does I<not> test the profile for issues. + +PROFNAME is the name of the profile to load. It can be omitted, in +which case the sub ensures that a profile has been loaded. If no +profile has been loaded, 'debian/main' will be loaded. + +INC is a list of extra "include dirs" (or Lintian "roots") to be used +for finding the profile. If not specified, it defaults to +I<$ENV{'LINTIAN_BASE'}> and I</usr/share/lintian> (in order). +INC is ignored if a profile has already been loaded. + +CAVEAT: Only one profile can be loaded in a given test. Once a +profile has been loaded, it is not possible to replace it with another +one. So if this is invoked multiple times, PROFNAME must be omitted +or must match the name of the loaded profile. + +=cut + +sub load_profile_for_test { + my ($profname, @inc) = @_; + + # We have loaded a profile and are not asked to + # load a specific one - then current one will do. + return $PROFILE + if $PROFILE and not $profname; + + die encode_utf8("Cannot load two profiles.\n") + if $PROFILE and $PROFILE->name ne $profname; + + # Already loaded? stop here + # We just need it for spell checking, so debian/main should + # do just fine... + return $PROFILE + if $PROFILE; + + $profname ||= 'debian/main'; + + $PROFILE = Lintian::Profile->new; + $PROFILE->load($profname, [@inc, $ENV{'LINTIAN_BASE'}]); + + $ENV{'LINTIAN_CONFIG_DIRS'} = join($COLON, @inc); + + return $PROFILE; +} + +sub _check_reference { + my ($see_also) = @_; + + my @issues; + + my @MARKDOWN_CAPABLE = ( + $PROFILE->menu_policy, + $PROFILE->perl_policy, + $PROFILE->python_policy, + $PROFILE->java_policy, + $PROFILE->vim_policy, + $PROFILE->lintian_manual, + $PROFILE->developer_reference, + $PROFILE->policy_manual, + $PROFILE->debconf_specification, + $PROFILE->menu_specification, + $PROFILE->doc_base_specification, + $PROFILE->filesystem_hierarchy_standard, + ); + + my %by_shorthand = map { $_->shorthand => $_ } @MARKDOWN_CAPABLE; + + # We use this to check for explicit links where it is possible to use + # a manual ref. + unless (%URLS) { + for my $manual (@MARKDOWN_CAPABLE) { + + my $volume = $manual->shorthand; + + for my $section_key ($manual->all){ + my $entry = $manual->value($section_key); + + my $url = $entry->{$section_key}{url}; + next + unless length $url; + + $URLS{$url} = "$volume $section_key"; + } + } + } + + if ( $see_also =~ m{^https?://bugs.debian.org/(\d++)$} + || $see_also + =~ m{^https?://bugs.debian.org/cgi-bin/bugreport.cgi\?/.*bug=(\d++).*$} + ) { + push(@issues, "replace '$see_also' with '#$1'"); + + } elsif (exists $URLS{$see_also}) { + push(@issues, "replace '$see_also' with '$URLS{$see_also}'"); + + } elsif ($see_also =~ m/^([\w-]++)\s++(\S++)$/) { + + my $volume = $1; + my $section = $2; + + if (exists $by_shorthand{$volume}) { + + my $manual = $by_shorthand{$volume}; + + push(@issues, "unknown section '$section' in $volume") + unless length $manual->markdown_citation($section); + + } else { + push(@issues, "unknown manual '$volume'"); + } + + } else { + # Check it is a valid reference like URLs or #123456 + # NB: "policy 10.1" references already covered above + push(@issues, "unknown or malformed reference '$see_also'") + if $see_also !~ /^#\d+$/ # debbugs reference + && $see_also !~ m{^(?:ftp|https?)://} # browser URL + && $see_also !~ m{^/} # local file reference + && $see_also !~ m{[\w_-]+\(\d\w*\)$}; # man reference + } + + return @issues; +} + +sub _find_check { + my ($find_opt, $input) = @_; + $find_opt//= {}; + my $filter = $find_opt->{'filter'}; + + if ($filter) { + local $_ = $input; + # filtered out? + return () unless $filter->($_); + } + + if (-d $input) { + my (@result, $regex); + if ($find_opt->{'want-check-name'}) { + $regex = qr{^\Q$input\E/*}; + } + my $wanted = sub { + if (defined $filter) { + local $_ = $_; + if (not $filter->($_)) { + # filtered out; if a dir - filter the + # entire dir. + $File::Find::prune = 1 if -d; + return; + } + } + return unless m/\.desc$/ and -e; + if ($regex) { + s/$regex//; + s/\.desc$//; + } + push @result, $_; + }; + my $opt = { + 'wanted' => $wanted, + 'no_chdir' => 1, + }; + File::Find::find($opt, $input); + return @result; + } + + return ($input); +} + +=item program_name_to_perl_paths(PROGNAME) + +Map the program name (e.g. C<$0>) to a list of directories or/and +files that should be processed. + +This helper sub is mostly useful for splitting up slow tests run over +all Perl scripts/modules in Lintian. This allows better use of +multiple cores. Example: + + + t/scripts/my-test/ + runner.pl + checks.t -> runner.pl + collection.t -> runner.pl + ... + +And then in runner.pl: + + use Test::Lintian; + + my @paths = program_name_to_perl_paths($0); + # test all files/dirs listed in @paths + +For a more concrete example, see t/scripts/01-critic/ and the +files/symlinks beneath it. + +=cut + +{ + + my %SPECIAL_PATHS = ( + 'docs-examples' => ['doc/examples/checks'], + 'test-scripts' => [qw(t/scripts t/templates)], + ); + + sub program_name_to_perl_paths { + my ($program) = @_; + # We need the basename before resolving the path (because + # afterwards it is "runner.pl" and we want it to be e.g. + # "checks.t" or "collections.t"). + my $basename = basename($program, '.t'); + + if (exists($SPECIAL_PATHS{$basename})) { + return @{$SPECIAL_PATHS{$basename}}; + } + + return ($basename); + } +} + +=back + +=cut + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Test/Lintian/Build.pm b/lib/Test/Lintian/Build.pm new file mode 100644 index 0000000..b6819af --- /dev/null +++ b/lib/Test/Lintian/Build.pm @@ -0,0 +1,163 @@ +# Copyright (C) 2018 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA + +package Test::Lintian::Build; + +=head1 NAME + +Test::Lintian::Build -- routines to prepare the work directories + +=head1 SYNOPSIS + + use Test::Lintian::Build qw(build_subject); + +=head1 DESCRIPTION + +The routines in this module prepare the work directories in which the +tests are run. To do so, they use the specifications in the test set. + +=cut + +use v5.20; +use warnings; +use utf8; + +use Exporter qw(import); + +BEGIN { + our @EXPORT_OK = qw( + build_subject + ); +} + +use Carp; +use Const::Fast; +use Cwd; +use IPC::Run3; +use List::SomeUtils qw(any); +use Path::Tiny; +use Unicode::UTF8 qw(valid_utf8 encode_utf8); + +use Lintian::Util qw(utf8_clean_log); + +use Test::Lintian::ConfigFile qw(read_config); +use Test::Lintian::Hooks qw(find_missing_prerequisites); + +const my $SLASH => q{/}; +const my $WAIT_STATUS_SHIFT => 8; + +=head1 FUNCTIONS + +=over 4 + +=item build_subject(PATH) + +Populates a work directory RUN_PATH with data from the test located +in SPEC_PATH. The optional parameter REBUILD forces a rebuild if true. + +=cut + +sub build_subject { + my ($sourcepath, $buildpath) = @_; + + # check test architectures + die encode_utf8('DEB_HOST_ARCH is not set.') + unless (length $ENV{'DEB_HOST_ARCH'}); + + # read dynamic file names + my $runfiles = "$sourcepath/files"; + my $files = read_config($runfiles); + + # read dynamic case data + my $rundescpath + = $sourcepath . $SLASH . $files->unfolded_value('Fill-Values'); + my $testcase = read_config($rundescpath); + + # skip test if marked + my $skipfile = "$sourcepath/skip"; + if (-e $skipfile) { + my $reason = path($skipfile)->slurp_utf8 || 'No reason given'; + say encode_utf8("Skipping test: $reason"); + return; + } + + # skip if missing prerequisites + my $missing = find_missing_prerequisites($testcase); + if (length $missing) { + say encode_utf8("Missing prerequisites: $missing"); + return; + } + + path($buildpath)->remove_tree + if -e $buildpath; + + path($buildpath)->mkpath; + + # get lintian subject + croak encode_utf8('Could not get subject of Lintian examination.') + unless $testcase->declares('Build-Product'); + + my $build_product = $testcase->unfolded_value('Build-Product'); + my $subject = "$buildpath/$build_product"; + + say encode_utf8("Building in $buildpath"); + + my $command = $testcase->unfolded_value('Build-Command'); + if (length $command) { + + my $savedir = Cwd::getcwd; + chdir($buildpath) + or die encode_utf8("Cannot change to directory $buildpath"); + + my $combined_bytes; + + # array command breaks test files/contents/contains-build-path + run3($command, \undef, \$combined_bytes, \$combined_bytes); + my $status = ($? >> $WAIT_STATUS_SHIFT); + + chdir($savedir) + or die encode_utf8("Cannot change to directory $savedir"); + + # sanitize log so it is UTF-8 from here on + my $utf8_bytes = utf8_clean_log($combined_bytes); + print $utf8_bytes; + + croak encode_utf8("$command failed") + if $status; + } + + croak encode_utf8('Build was unsuccessful.') + unless -e $subject; + + die encode_utf8("Cannot link to build product $build_product") + if system("cd $buildpath; ln -s $build_product subject"); + + return; +} + +=back + +=cut + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Test/Lintian/ConfigFile.pm b/lib/Test/Lintian/ConfigFile.pm new file mode 100644 index 0000000..162b49c --- /dev/null +++ b/lib/Test/Lintian/ConfigFile.pm @@ -0,0 +1,132 @@ +# Copyright (C) 2018 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA + +package Test::Lintian::ConfigFile; + +=head1 NAME + +Test::Lintian::ConfigFile -- generic helper routines for colon-delimited configuration files + +=head1 SYNOPSIS + +use Test::Lintian::ConfigFile qw(read_config); +my $desc = read_config('t/tags/testname/desc'); + +=head1 DESCRIPTION + +Routines for dealing with colon-delimited configuration files. + +=cut + +use v5.20; +use warnings; +use utf8; + +use Exporter qw(import); + +BEGIN { + our @EXPORT_OK = qw( + read_config + write_config + ); +} + +use Carp; +use Const::Fast; +use List::SomeUtils qw(any); +use Path::Tiny; +use Unicode::UTF8 qw(encode_utf8); + +use Lintian::Deb822; + +const my $SPACE => q{ }; +const my $COLON => q{:}; +const my $NEWLINE => qq{\n}; + +=head1 FUNCTIONS + +=over 4 + +=item read_config(PATH, HASHREF) + +Reads the configuration file located at PATH into a hash and +returns it. When also passed a HASHREF, will fill that instead. + +=cut + +sub read_config { + my ($configpath) = @_; + + croak encode_utf8("Cannot find file $configpath.") + unless -e $configpath; + + my $deb822 = Lintian::Deb822->new; + my @sections = $deb822->read_file($configpath); + die encode_utf8("$configpath does not have exactly one paragraph") + unless @sections == 1; + + my $config = $sections[0]; + + return $config; +} + +=item write_config(TEST_CASE, PATH) + +Write the config described by hash reference TEST_CASE to the file named PATH. + +=cut + +sub write_config { + my ($testcase, $path) = @_; + + my $desc = path($path); + $desc->remove; + + my @lines; + for my $name (sort $testcase->names) { + + my @elements = $testcase->trimmed_list($name); + + # multi-line output for some fields + if (@elements > 1 + && any { fc eq fc($name) } qw(Test-For Test-Against)) { + push(@lines, $name . $COLON . $NEWLINE); + push(@lines, $SPACE . $_ . $NEWLINE) for @elements; + next; + } + + push(@lines, + $name . $COLON . $SPACE . $testcase->value($name) . $NEWLINE); + } + + $desc->append_utf8(@lines); + + return; +} + +=back + +=cut + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Test/Lintian/Filter.pm b/lib/Test/Lintian/Filter.pm new file mode 100644 index 0000000..4b6ea8a --- /dev/null +++ b/lib/Test/Lintian/Filter.pm @@ -0,0 +1,378 @@ +# Copyright (C) 2020 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Test::Lintian::Filter; + +=head1 NAME + +Test::Lintian::Filter -- Functions to select with tests to run + +=head1 SYNOPSIS + + use Test::Lintian::Filter qw(find_selected_lintian_testpaths); + my @testpaths = find_selected_lintian_testpaths('suite:changes'); + +=head1 DESCRIPTION + +Functions that parse the optional argument 'only_run' to find the +tests that are supposed to run. + +=cut + +use v5.20; +use warnings; +use utf8; + +use Exporter qw(import); + +BEGIN { + our @EXPORT_OK = qw( + find_selected_scripts + find_selected_lintian_testpaths + ); +} + +use Carp; +use Const::Fast; +use File::Spec::Functions qw(rel2abs splitpath catpath); +use File::Find::Rule; +use List::SomeUtils qw(uniq none); +use List::Util qw(any all); +use Path::Tiny; +use Text::CSV; +use Unicode::UTF8 qw(encode_utf8); + +use Lintian::Profile; +use Test::Lintian::ConfigFile qw(read_config); + +my @LINTIAN_SUITES = qw(recipes); + +const my $EMPTY => q{}; +const my $SPACE => q{ }; +const my $VERTICAL_BAR => q{|}; +const my $DESC => 'desc'; +const my $SEPARATED_BY_COLON => qr/([^:]+):([^:]+)/; + +=head1 FUNCTIONS + +=over 4 + +=item get_suitepath(TEST_SET, SUITE) + +Returns a string containing all test belonging to suite SUITE relative +to path TEST_SET. + +=cut + +sub get_suitepath { + my ($basepath, $suite) = @_; + my $suitepath = rel2abs($suite, $basepath); + + croak encode_utf8("Cannot find suite $suite in $basepath") + unless -d $suitepath; + + return $suitepath; +} + +=item find_selected_scripts(SCRIPT_PATH, ONLY_RUN) + +Find all test scripts in SCRIPT_PATH that are identified by the +user's selection string ONLY_RUN. + +=cut + +sub find_selected_scripts { + my ($scriptpath, $onlyrun) = @_; + + my @found; + + my @selectors = split(m/\s*,\s*/, $onlyrun//$EMPTY); + + if ((any { $_ eq 'suite:scripts' } @selectors) || !length $onlyrun) { + @found = File::Find::Rule->file()->name('*.t')->in($scriptpath); + } else { + foreach my $selector (@selectors) { + my ($prefix, $lookfor) = ($selector =~ /$SEPARATED_BY_COLON/); + + next if defined $prefix && $prefix ne 'script'; + $lookfor = $selector unless defined $prefix; + + # look for files with the standard suffix + my $withsuffix = rel2abs("$lookfor.t", $scriptpath); + push(@found, $withsuffix) if -e $withsuffix; + + # look for script with exact name + my $exactpath = rel2abs($lookfor, $scriptpath); + push(@found, $exactpath) if -e $exactpath; + + # also add entire directory if name matches + push(@found, File::Find::Rule->file()->name('*.t')->in($exactpath)) + if -d $exactpath; + } + } + + my @sorted = sort +uniq @found; + + return @sorted; +} + +=item find_selected_lintian_testpaths(TEST_SET, ONLY_RUN) + +Find all those test paths with Lintian tests located in the directory +TEST_SET and identified by the user's selection string ONLY_RUN. + +=cut + +sub find_selected_lintian_testpaths { + + my ($testset, $onlyrun) = @_; + + my $filter = { + 'tag' => [], + 'suite' => [], + 'test' => [], + 'check' => [], + 'skeleton' => [], + }; + my @filter_no_prefix; + + if (!length $onlyrun) { + $filter->{suite} = [@LINTIAN_SUITES]; + } else { + + my @selectors = split(m/\s*,\s*/, $onlyrun); + + foreach my $selector (@selectors) { + + foreach my $wanted (keys %{$filter}) { + my ($prefix, $lookfor) = ($selector =~ /$SEPARATED_BY_COLON/); + + next if defined $prefix && $prefix ne $wanted; + + push(@{$filter->{$wanted}}, $lookfor) if length $lookfor; + push(@filter_no_prefix, $selector) unless length $lookfor; + } + } + } + + my $profile = Lintian::Profile->new; + $profile->load(undef, undef, 0); + + my @found; + foreach my $suite (sort @LINTIAN_SUITES) { + + my @insuite; + my $suitepath = get_suitepath($testset, $suite); + + # find all tests for selected suites + if (any { $_ eq $suite } @{$filter->{suite}}) { + push(@insuite, find_all_testpaths($suitepath)); + } + + # find explicitly selected tests + foreach my $testname (@{$filter->{test}}) { + my @withtests = find_testpaths_by_name($suitepath, $testname); + push(@insuite, @withtests); + } + + # find tests for selected checks and tags + if (scalar @{$filter->{check}} || scalar @{$filter->{tag}}) { + + my %wanted = map { $_ => 1 } @{$filter->{check}}; + + for my $tag_name (@{$filter->{tag}}) { + + my $tag = $profile->get_tag($tag_name); + unless ($tag) { + say encode_utf8("Tag $tag_name not found"); + return (); + } + + if (none { $tag_name eq $_ } $profile->enabled_tags) { + say encode_utf8("Tag $tag_name not enabled"); + return (); + } + + $wanted{$tag->check} = 1; + } + + for my $testpath (find_all_testpaths($suitepath)) { + my $desc = read_config("$testpath/eval/" . $DESC); + + next + unless $desc->declares('Check'); + + for my $check ($desc->trimmed_list('Check')) { + push(@insuite, $testpath) + if exists $wanted{$check}; + } + } + } + + # find tests for selected skeleton + if (scalar @{$filter->{skeleton}}) { + + my %wanted = map { $_ => 1 } @{$filter->{skeleton}}; + + for my $testpath (find_all_testpaths($suitepath)) { + my $desc = read_config("$testpath/build-spec/fill-values"); + + next + unless $desc->declares('Skeleton'); + + my $skeleton = $desc->unfolded_value('Skeleton'); + push(@insuite, $testpath) + if exists $wanted{$skeleton}; + } + } + + # guess what was meant by selection without prefix + for my $parameter (@filter_no_prefix) { + push(@insuite,find_testpaths_by_name($suitepath, $parameter)); + + if ($parameter eq 'legacy' + || exists $profile->check_module_by_name->{$parameter}) { + + push(@insuite, + find_testpaths_by_name($suitepath, "$parameter-*")); + } + } + + push(@found, sort +uniq @insuite); + } + + return @found; +} + +=item find_all_testpaths(PATH) + +Returns an array containing all test paths located under PATH. They +are identified as test paths by a specially named file containing +the test description (presently 'desc'). + +=cut + +sub find_all_testpaths { + my ($directory) = @_; + my @descfiles = File::Find::Rule->file()->name($DESC)->in($directory); + + my @testpaths= map { path($_)->parent->parent->stringify }@descfiles; + + return @testpaths; +} + +=item find_testpaths_by_name(PATH, NAME) + +Returns an array containing all test paths with the name NAME +located under PATH. The test paths are identified as such +by a specially named file containing the test description +(presently 'desc'). + +=cut + +sub find_testpaths_by_name { + my ($path, $name) = @_; + + my @named = File::Find::Rule->directory()->name($name)->in($path); + my @testpaths= grep { defined } + map { -e rel2abs('eval/' . $DESC, $_) ? $_ : undef } @named; + + return @testpaths; +} + +=item find_all_tags(TEST_PATH) + +Returns an array containing all tags that somehow concern the test +located in TEST_PATH. + +=cut + +sub find_all_tags { + my ($testpath) = @_; + + my $desc = read_config("$testpath/eval/" . $DESC); + + return $EMPTY + unless $desc->declares('Check'); + + my $profile = Lintian::Profile->new; + $profile->load(undef, undef, 0); + + my @check_names = $desc->trimmed_list('Check'); + my @unknown + = grep { !exists $profile->check_module_by_name->{$_} } @check_names; + + die encode_utf8('Unknown Lintian checks: ' . join($SPACE, @unknown)) + if @unknown; + + my %tags; + for my $name (@check_names) { + $tags{$_} = 1 for @{$profile->tag_names_for_check->{$name}}; + } + + return keys %tags + unless $desc->declares('Test-Against'); + + # read hints from specification + my $temp = Path::Tiny->tempfile; + die encode_utf8("hintextract failed: $!") + if system('private/hintextract', '-f', 'EWI', "$testpath/hints", + $temp->stringify); + my @lines = $temp->lines_utf8({ chomp => 1 }); + + my $csv = Text::CSV->new({ sep_char => $VERTICAL_BAR }); + + my %expected; + foreach my $line (@lines) { + + my $status = $csv->parse($line); + die encode_utf8("Cannot parse line $line: " . $csv->error_diag) + unless $status; + + my ($type, $package, $name, $details) = $csv->fields; + + die encode_utf8("Cannot parse line $line") + unless all { length } ($type, $package, $name); + + $expected{$name} = 1; + } + + # remove tags not appearing in specification + foreach my $name (keys %tags) { + delete $tags{$name} + unless $expected{$name}; + } + + # add tags listed in Test-Against + my @test_against = $desc->trimmed_list('Test-Against'); + $tags{$_} = 1 for @test_against; + + return keys %tags; +} + +=back + +=cut + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Test/Lintian/Helper.pm b/lib/Test/Lintian/Helper.pm new file mode 100644 index 0000000..518d036 --- /dev/null +++ b/lib/Test/Lintian/Helper.pm @@ -0,0 +1,198 @@ +# Copyright (C) 1998 Richard Braakman +# Copyright (C) 2008 Frank Lichtenheld +# Copyright (C) 2008, 2009 Russ Allbery +# Copyright (C) 2018 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA + +package Test::Lintian::Helper; + +=head1 NAME + +Test::Lintian::Helper -- Helper functions for various testing parts + +=head1 SYNOPSIS + + use Test::Lintian::Helper qw(get_latest_policy); + my $policy_version = get_latest_policy(); + +=head1 DESCRIPTION + +Helper functions for preparing and running Lintian tests. + +=cut + +use v5.20; +use warnings; +use utf8; + +use Exporter qw(import); + +BEGIN { + our @EXPORT_OK = qw( + cache_dpkg_architecture_values + get_latest_policy + get_recommended_debhelper_version + copy_dir_contents + rfc822date + ); +} + +use Carp; +use File::Spec::Functions qw(abs2rel rel2abs); +use File::Path qw(remove_tree); +use Path::Tiny; +use POSIX qw(locale_h strftime); +use Unicode::UTF8 qw(encode_utf8 decode_utf8); + +use Lintian::IPC::Run3 qw(safe_qx); +use Lintian::Profile; + +=head1 FUNCTIONS + +=over 4 + +=item cache_dpkg_architecture_values() + +Ensures that the output from dpkg-architecture has been cached. + +=cut + +sub cache_dpkg_architecture_values { + + my $output = decode_utf8(safe_qx('dpkg-architecture')); + + die encode_utf8('dpkg-architecture failed') + if $?; + + $output = decode_utf8($output) + if length $output; + + my @lines = split(/\n/, $output); + + for my $line (@lines) { + my ($k, $v) = split(/=/, $line, 2); + $ENV{$k} = $v; + } + + return; +} + +=item get_latest_policy() + +Returns a list with two elements. The first is the most recent version +of the Debian policy. The second is its effective date. + +=cut + +sub get_latest_policy { + my $profile = Lintian::Profile->new; + $profile->load(undef, undef, 0); + + my $releases = $profile->data->policy_releases; + + my $version = $releases->latest_version; + die encode_utf8('Could not get latest policy version.') + unless defined $version; + my $epoch = $releases->epoch($version); + die encode_utf8('Could not get latest policy date.') + unless defined $epoch; + + return ($version, $epoch); +} + +=item get_recommended_debhelper_version() + +Returns the version of debhelper recommended in 'debhelper/compat-level' +via Lintian::Data, relative to the established LINTIAN_BASE. + +=cut + +sub get_recommended_debhelper_version { + my $profile = Lintian::Profile->new; + $profile->load(undef, undef, 0); + + my $compat_level = $profile->data->debhelper_levels; + + return $compat_level->value('recommended'); +} + +=item copy_dir_contents(SRC_DIR, TARGET_DIR) + +Populates TARGET_DIR with files/dirs from SRC_DIR, preserving all attributes but +dereferencing links. For an empty directory, no dummy file is required. + +=cut + +sub copy_dir_contents { + my ($source, $destination) = @_; + + # 'cp -r' cannot overwrite directories with files or vice versa + my @paths = File::Find::Rule->in($source); + foreach my $path (@paths) { + + my $relative = abs2rel($path, $source); + my $prospective = rel2abs($relative, $destination); + + # recursively delete directories to be replaced by a file + remove_tree($prospective) + if -d $prospective && -e $path && !-d _; + + # remove files to be replaced by a directory + if (-e $prospective && !-d _ && -d $path) { + unlink($prospective) + or die encode_utf8("Cannot unlink $prospective"); + } + } + + # 'cp -r' with a dot will error without files present + if (scalar path($source)->children) { + + system('cp', '-rp', "$source/.", '-t', $destination)== 0 + or croak encode_utf8("Could not copy $source to $destination: $!"); + } + return 1; +} + +=item rfc822date(EPOCH) + +Returns a string with the date and time described by EPOCH, formatted +according to RFC822. + +=cut + +sub rfc822date { + my ($epoch) = @_; + + my $old_locale = setlocale(LC_TIME, 'C'); + my $datestring = strftime('%a, %d %b %Y %H:%M:%S %z', localtime($epoch)); + setlocale(LC_TIME, $old_locale); + + return $datestring; +} + +=back + +=cut + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Test/Lintian/Hooks.pm b/lib/Test/Lintian/Hooks.pm new file mode 100644 index 0000000..4c8d848 --- /dev/null +++ b/lib/Test/Lintian/Hooks.pm @@ -0,0 +1,228 @@ +# Copyright (C) 2018 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA + +package Test::Lintian::Hooks; + +=head1 NAME + +Test::Lintian::Hooks -- hook routines for the test runners + +=head1 SYNOPSIS + + use Test::Lintian::Hooks qw(sed_hook); + sed_hook('script.sed', 'input.file'); + +=head1 DESCRIPTION + +Various hook routines for the test runners. + +=cut + +use v5.20; +use warnings; +use utf8; + +use Exporter qw(import); + +BEGIN { + our @EXPORT_OK = qw( + sed_hook + sort_lines + calibrate + find_missing_prerequisites + ); +} + +use Capture::Tiny qw(capture_merged); +use Carp; +use Const::Fast; +use Cwd qw(getcwd); +use File::Basename; +use File::Find::Rule; +use File::Path; +use File::stat; +use IPC::Run3; +use List::SomeUtils qw(any); +use Path::Tiny; +use Unicode::UTF8 qw(encode_utf8 decode_utf8); + +const my $NEWLINE => qq{\n}; +const my $WAIT_STATUS_SHIFT => 8; + +=head1 FUNCTIONS + +=over 4 + +=item sed_hook(SCRIPT, SUBJECT, OUTPUT) + +Runs the parser sed on file SUBJECT using the instructions in SCRIPT +and places the result in the file OUTPUT. + +=cut + +sub sed_hook { + my ($script, $path, $output) = @_; + + croak encode_utf8("Parser script $script does not exist.") + unless -e $script; + + my @command = (qw{sed -r -f}, $script, $path); + my $bytes; + run3(\@command, \undef, \$bytes); + my $status = ($? >> $WAIT_STATUS_SHIFT); + + croak encode_utf8("Hook failed: sed -ri -f $script $path > $output: $!") + if $status; + + # already in bytes + path($output)->spew($bytes); + + croak encode_utf8("Did not create parser output file $output.") + unless -e $output; + + return $output; +} + +=item sort_lines(UNSORTED, SORTED) + +Sorts the file UNSORTED line by line and places the result into the +file SORTED. + +=cut + +sub sort_lines { + my ($path, $sorted) = @_; + + open(my $rfd, '<', $path) + or croak encode_utf8("Could not open pre-sort file $path: $!"); + my @lines = sort map { decode_utf8($_) } <$rfd>; + close $rfd + or carp encode_utf8("Could not close open pre-sort file $path: $!"); + + open(my $wfd, '>', $sorted) + or croak encode_utf8("Could not open sorted file $sorted: $!"); + print {$wfd} encode_utf8($_) for @lines; + close $wfd + or carp encode_utf8("Could not close sorted file $sorted: $!"); + + return $sorted; +} + +=item calibrate(SCRIPT, ACTUAL, EXPECTED, CALIBRATED) + +Executes calibration script SCRIPT with the three arguments EXPECTED, +ACTUAL and CALIBRATED, all of which are file paths. Please note that +the order of arguments in this function corresponds to the +bookkeeping logic of ACTUAL vs EXPECTED. The order for the script is +different. + +=cut + +sub calibrate { + my ($hook, $actual, $expected, $calibrated) = @_; + + if (-x $hook) { + system($hook, $expected, $actual, $calibrated) == 0 + or croak encode_utf8("Hook $hook failed on $actual: $!"); + croak encode_utf8("No calibrated hints created in $calibrated") + unless -e $calibrated; + return $calibrated; + } + return $expected; +} + +=item find_missing_prerequisites(TEST_CASE) + +Returns a string with missing dependencies, if applicable, that would +be necessary to run the test described by hash DESC. + +=cut + +sub find_missing_prerequisites { + my ($testcase) = @_; + + # without prerequisites, no need to look + return undef + unless any { $testcase->declares($_) } + qw(Build-Depends Build-Conflicts Test-Depends Test-Conflicts); + + # create a temporary file + my $temp = Path::Tiny->tempfile( + TEMPLATE => 'lintian-test-build-depends-XXXXXXXXX'); + my @lines; + + # dpkg-checkbuilddeps requires a Source: field + push(@lines, 'Source: bd-test-pkg'); + + my $build_depends = join( + ', ', + grep { length }( + $testcase->value('Build-Depends'),$testcase->value('Test-Depends') + ) + ); + + push(@lines, "Build-Depends: $build_depends") + if length $build_depends; + + my $build_conflicts = join( + ', ', + grep { length }( + $testcase->value('Build-Conflicts'), + $testcase->value('Test-Conflicts') + ) + ); + push(@lines, "Build-Conflicts: $build_conflicts") + if length $build_conflicts; + + $temp->spew_utf8(join($NEWLINE, @lines) . $NEWLINE); + + # run dpkg-checkbuilddeps + my $command = "dpkg-checkbuilddeps $temp"; + my ($missing, $status) = capture_merged { system($command); }; + $status >>= $WAIT_STATUS_SHIFT; + + $missing = decode_utf8($missing) + if length $missing; + + die encode_utf8("$command failed: $missing") + if !$status && length $missing; + + # parse for missing prerequisites + if ($missing =~ s{\A dpkg-checkbuilddeps: [ ] (?:error: [ ])? }{}xsm) { + $missing =~ s{Unmet build dependencies}{Unmet}gi; + chomp($missing); + # expect exactly one line. + die encode_utf8("Unexpected output from dpkg-checkbuilddeps: $missing") + if $missing =~ s{\n}{\\n}gxsm; + return $missing; + } + + return undef; +} + +=back + +=cut + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Test/Lintian/Output/EWI.pm b/lib/Test/Lintian/Output/EWI.pm new file mode 100644 index 0000000..74fab49 --- /dev/null +++ b/lib/Test/Lintian/Output/EWI.pm @@ -0,0 +1,117 @@ +# Copyright (C) 2019 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA + +package Test::Lintian::Output::EWI; + +=head1 NAME + +Test::Lintian::Output::EWI -- routines to process EWI hints + +=head1 SYNOPSIS + + use Path::Tiny; + use Test::Lintian::Output::EWI qw(to_universal); + + my $ewi = path("path to an EWI hint file")->slurp_utf8; + my $universal = to_universal($ewi); + +=head1 DESCRIPTION + +Helper routines to deal with C<EWI> hints and hint files + +=cut + +use v5.20; +use warnings; +use utf8; + +use Exporter qw(import); + +BEGIN { + our @EXPORT_OK = qw( + to_universal + ); +} + +use Carp; +use Const::Fast; +use List::Util qw(all); +use Unicode::UTF8 qw(encode_utf8); + +use Test::Lintian::Output::Universal qw(universal_string order); + +const my $EMPTY => q{}; +const my $NEWLINE => qq{\n}; + +=head1 FUNCTIONS + +=over 4 + +=item to_universal(STRING) + +Converts the C<EWI> hint data contained in STRING to universal hints. +They are likewise delivered in a multi-line string. + +=cut + +sub to_universal { + my ($ewi) = @_; + + my @unsorted; + + my @lines = split($NEWLINE, $ewi); + chomp @lines; + + foreach my $line (@lines) { + + # no hint in this line + next if $line =~ /^N: /; + + # look for "EWI: package[ type]: name details" + my ($code, $package, $type, $name, $details) + = $line=~ /^(.): (\S+)(?: (changes|source|udeb))?: (\S+)(?: (.*))?$/; + + # for binary packages, the type field is empty + $type //= 'binary'; + + croak encode_utf8("Cannot parse line $line") + unless all { length } ($code, $package, $type, $name); + + my $converted = universal_string($package, $type, $name, $details); + push(@unsorted, $converted); + } + + my @sorted = reverse sort { order($a) cmp order($b) } @unsorted; + + my $universal = $EMPTY; + $universal .= $_ . $NEWLINE for @sorted; + + return $universal; +} + +=back + +=cut + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Test/Lintian/Output/Universal.pm b/lib/Test/Lintian/Output/Universal.pm new file mode 100644 index 0000000..707b958 --- /dev/null +++ b/lib/Test/Lintian/Output/Universal.pm @@ -0,0 +1,189 @@ +# Copyright (C) 2019 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA + +package Test::Lintian::Output::Universal; + +=head1 NAME + +Test::Lintian::Output::Universal -- routines to process universal hints + +=head1 SYNOPSIS + + use Test::Lintian::Output::Universal qw(get_tag_names); + + my $filepath = "path to a universal hint file"; + my @tags = get_tag_names($filepath); + +=head1 DESCRIPTION + +Helper routines to deal with universal hints and hint files. This is an +abstract format that has the minimum information found in all Lintian +output formats. + +=cut + +use v5.20; +use warnings; +use utf8; + +use Exporter qw(import); + +BEGIN { + our @EXPORT_OK = qw( + get_tag_names + order + package_name + package_type + tag_name + parse_line + universal_string + ); +} + +use Carp; +use Const::Fast; +use List::SomeUtils qw(uniq); +use List::Util qw(all); +use Path::Tiny; +use Unicode::UTF8 qw(encode_utf8); + +const my $SPACE => q{ }; +const my $COLON => q{:}; +const my $LPARENS => q{(}; +const my $RPARENS => q{)}; + +=head1 FUNCTIONS + +=over 4 + +=item get_tag_names(PATH) + +Gets all the tag names mentioned in universal hint file located +at PATH. + +=cut + +sub get_tag_names { + my ($path) = @_; + + my @lines = path($path)->lines_utf8({ chomp => 1 }); + my @names = map { tag_name($_) } @lines; + + return uniq @names; +} + +=item order + +=cut + +sub order { + my ($line) = @_; + + return package_type($line) . $line; +} + +=item package_name + +=cut + +sub package_name { + my ($line) = @_; + + my ($package, undef, undef, undef) = parse_line($line); + return $package; +} + +=item package_type + +=cut + +sub package_type { + my ($line) = @_; + + my (undef, $type, undef, undef) = parse_line($line); + return $type; +} + +=item tag_name + +=cut + +sub tag_name { + my ($line) = @_; + + my (undef, undef, $name, undef) = parse_line($line); + return $name; +} + +=item parse_line + +=cut + +sub parse_line { + my ($line) = @_; + + my ($package, $type, $name, $details) + = $line =~ qr/^(\S+)\s+\(([^)]+)\):\s+(\S+)(?:\s+(.*))?$/; + + croak encode_utf8("Cannot parse line $line") + unless all { length } ($package, $type, $name); + + return ($package, $type, $name, $details); +} + +=item universal_string + +=cut + +sub universal_string { + my ($package, $type, $name, $details) = @_; + + croak encode_utf8('Need a package name') + unless length $package; + croak encode_utf8('Need a package type') + unless length $type; + croak encode_utf8('Need a tag name') + unless length $name; + + my $line + = $package. $SPACE. $LPARENS. $type. $RPARENS. $COLON. $SPACE. $name; + $line .= $SPACE . $details + if length $details; + + return $line; +} + +=back + +=head1 AUTHOR + +Originally written by Felix Lechner <felix.lechner@lease-up.com> for Lintian. + +=head1 SEE ALSO + +lintian(1) + +=cut + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Test/Lintian/Prepare.pm b/lib/Test/Lintian/Prepare.pm new file mode 100644 index 0000000..8914fcc --- /dev/null +++ b/lib/Test/Lintian/Prepare.pm @@ -0,0 +1,551 @@ +# Copyright (C) 2018-2020 Felix Lechner +# Copyright (C) 2019 Chris Lamb <lamby@debian.org> +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA + +package Test::Lintian::Prepare; + +=head1 NAME + +Test::Lintian::Prepare -- routines to prepare the work directories + +=head1 SYNOPSIS + + use Test::Lintian::Prepare qw(prepare); + +=head1 DESCRIPTION + +The routines in this module prepare the work directories in which the +tests are run. To do so, they use the specifications in the test set. + +=cut + +use v5.20; +use warnings; +use utf8; + +use Exporter qw(import); + +BEGIN { + our @EXPORT_OK = qw( + prepare + filleval + ); +} + +use Carp; +use Const::Fast; +use Cwd qw(getcwd); +use File::Copy; +use File::Find::Rule; +use File::Path qw(make_path remove_tree); +use File::stat; +use List::Util qw(max); +use Path::Tiny; +use Text::Template; +use Unicode::UTF8 qw(encode_utf8); + +use Lintian::Deb822::Section; + +use Test::Lintian::ConfigFile qw(read_config write_config); +use Test::Lintian::Helper qw(rfc822date copy_dir_contents); +use Test::Lintian::Templates + qw(copy_skeleton_template_sets remove_surplus_templates fill_skeleton_templates); + +const my $EMPTY => q{}; +const my $SPACE => q{ }; +const my $SLASH => q{/}; +const my $COMMA => q{,}; + +=head1 FUNCTIONS + +=over 4 + +=item prepare(SPEC_PATH, SOURCE_PATH, TEST_SET, REBUILD) + +Populates a work directory SOURCE_PATH with data from the test located +in SPEC_PATH. The optional parameter REBUILD forces a rebuild if true. + +=cut + +sub prepare { + my ($specpath, $sourcepath, $testset, $force_rebuild)= @_; + + say encode_utf8('------- Preparation starts here -------'); + say encode_utf8("Work directory is $sourcepath."); + + # for template fill, earliest date without timewarp warning + my $data_epoch = $ENV{'POLICY_EPOCH'}//time; + + # read defaults + my $defaultspath = "$testset/defaults"; + + # read default file names + my $defaultfilespath = "$defaultspath/files"; + die encode_utf8("Cannot find $defaultfilespath") + unless -e $defaultfilespath; + + # read file and adjust data age threshold + my $files = read_config($defaultfilespath); + # $data_epoch= max($data_epoch, stat($defaultfilespath)->mtime); + + # read test data + my $descpath = $specpath . $SLASH . $files->unfolded_value('Fill-Values'); + my $desc = read_config($descpath); + # $data_epoch= max($data_epoch, stat($descpath)->mtime); + + # read test defaults + my $descdefaultspath + = $defaultspath . $SLASH . $files->unfolded_value('Fill-Values'); + my $defaults = read_config($descdefaultspath); + # $data_epoch= max($data_epoch, stat($descdefaultspath)->mtime); + + # start with a shallow copy of defaults + my $testcase = Lintian::Deb822::Section->new; + $testcase->store($_, $defaults->value($_)) for $defaults->names; + + die encode_utf8("Name missing for $specpath") + unless $desc->declares('Testname'); + + die encode_utf8('Outdated test specification (./debian/debian exists).') + if -e "$specpath/debian/debian"; + + if (-d $sourcepath) { + + # check for old build artifacts + my $buildstamp = "$sourcepath/build-stamp"; + say encode_utf8('Found old build artifact.') if -e $buildstamp; + + # check for old debian/debian directory + my $olddebiandir = "$sourcepath/debian/debian"; + say encode_utf8('Found old debian/debian directory.') + if -e $olddebiandir; + + # check for rebuild demand + say encode_utf8('Forcing rebuild.') if $force_rebuild; + + # delete work directory + if($force_rebuild || -e $buildstamp || -e $olddebiandir) { + say encode_utf8("Removing work directory $sourcepath."); + remove_tree($sourcepath); + } + } + + # create work directory + unless (-d $sourcepath) { + say encode_utf8("Creating directory $sourcepath."); + make_path($sourcepath); + } + + # delete old test scripts + my @oldrunners = File::Find::Rule->file->name('*.t')->in($sourcepath); + if (@oldrunners) { + unlink(@oldrunners) + or die encode_utf8("Cannot unlink @oldrunners"); + } + + my $skeletonname = $desc->unfolded_value('Skeleton'); + if (length $skeletonname) { + + # load skeleton + my $skeletonpath = "$testset/skeletons/$skeletonname"; + my $skeleton = read_config($skeletonpath); + + $testcase->store($_, $skeleton->value($_)) for $skeleton->names; + } + + # populate working directory with specified template sets + copy_skeleton_template_sets($testcase->value('Template-Sets'), + $sourcepath, $testset) + if $testcase->declares('Template-Sets'); + + # delete templates for which we have originals + remove_surplus_templates($specpath, $sourcepath); + + # copy test specification to working directory + my $offset = path($specpath)->relative($testset)->stringify; + say encode_utf8( + "Copy test specification $offset from $testset to $sourcepath."); + copy_dir_contents($specpath, $sourcepath); + + my $valuefolder = $testcase->unfolded_value('Fill-Values-Folder'); + if (length $valuefolder) { + + # load all the values in the fill values folder + my $valuepath = "$sourcepath/$valuefolder"; + my @filepaths + = File::Find::Rule->file->name('*.values')->in($valuepath); + + for my $filepath (sort @filepaths) { + my $fill_values = read_config($filepath); + + $testcase->store($_, $fill_values->value($_)) + for $fill_values->names; + } + } + + # add individual settings after skeleton + $testcase->store($_, $desc->value($_)) for $desc->names; + + # record path to specification + $testcase->store('Spec-Path', $specpath); + + # record path to specification + $testcase->store('Source-Path', $sourcepath); + + # add other helpful info to testcase + $testcase->store('Source', $testcase->unfolded_value('Testname')) + unless $testcase->declares('Source'); + + # record our effective data age as date, unless given + $testcase->store('Date', rfc822date($data_epoch)) + unless $testcase->declares('Date'); + + warn encode_utf8('Cannot override Architecture: in test ' + . $testcase->unfolded_value('Testname')) + if $testcase->declares('Architecture'); + + die encode_utf8('DEB_HOST_ARCH is not set.') + unless defined $ENV{'DEB_HOST_ARCH'}; + $testcase->store('Host-Architecture', $ENV{'DEB_HOST_ARCH'}); + + die encode_utf8('Could not get POLICY_VERSION.') + unless defined $ENV{'POLICY_VERSION'}; + $testcase->store('Standards-Version', $ENV{'POLICY_VERSION'}) + unless $testcase->declares('Standards-Version'); + + die encode_utf8('Could not get DEFAULT_DEBHELPER_COMPAT.') + unless defined $ENV{'DEFAULT_DEBHELPER_COMPAT'}; + $testcase->store('Dh-Compat-Level', $ENV{'DEFAULT_DEBHELPER_COMPAT'}) + unless $testcase->declares('Dh-Compat-Level'); + + # add additional version components + if ($testcase->declares('Version')) { + + # add upstream version + my $upstream_version = $testcase->unfolded_value('Version'); + $upstream_version =~ s/-[^-]+$//; + $upstream_version =~ s/(-|^)(\d+):/$1/; + $testcase->store('Upstream-Version', $upstream_version); + + # version without epoch + my $no_epoch = $testcase->unfolded_value('Version'); + $no_epoch =~ s/^\d+://; + $testcase->store('No-Epoch', $no_epoch); + + unless ($testcase->declares('Prev-Version')) { + my $prev_version = '0.0.1'; + $prev_version .= '-1' + unless $testcase->unfolded_value('Type') eq 'native'; + + $testcase->store('Prev-Version', $prev_version); + } + } + + # calculate build dependencies + warn encode_utf8('Cannot override Build-Depends:') + if $testcase->declares('Build-Depends'); + combine_fields($testcase, 'Build-Depends', $COMMA . $SPACE, + 'Default-Build-Depends', 'Extra-Build-Depends'); + + # calculate build conflicts + warn encode_utf8('Cannot override Build-Conflicts:') + if $testcase->declares('Build-Conflicts'); + combine_fields($testcase, 'Build-Conflicts', $COMMA . $SPACE, + 'Default-Build-Conflicts', 'Extra-Build-Conflicts'); + + # fill testcase with itself; do it twice to make sure all is done + my $hashref = deb822_section_to_hash($testcase); + $hashref = fill_hash_from_hash($hashref); + $hashref = fill_hash_from_hash($hashref); + write_hash_to_deb822_section($hashref, $testcase); + + say encode_utf8($EMPTY); + + # fill remaining templates + fill_skeleton_templates($testcase->value('Fill-Targets'), + $hashref, $data_epoch, $sourcepath, $testset) + if $testcase->declares('Fill-Targets'); + + # write the dynamic file names + my $runfiles = path($sourcepath)->child('files'); + write_config($files, $runfiles->stringify); + + # set mtime for dynamic file names + $runfiles->touch($data_epoch); + + # write the dynamic test case file + my $rundesc + = path($sourcepath)->child($files->unfolded_value('Fill-Values')); + write_config($testcase, $rundesc->stringify); + + # set mtime for dynamic test data + $rundesc->touch($data_epoch); + + say encode_utf8($EMPTY); + + # announce data age + say encode_utf8('Data epoch is : '. rfc822date($data_epoch)); + + return; +} + +=item filleval(SPEC_PATH, EVAL_PATH, TEST_SET, REBUILD) + +Populates a evaluation directory EVAL_PATH with data from the test located +in SPEC_PATH. The optional parameter REBUILD forces a rebuild if true. + +=cut + +sub filleval { + my ($specpath, $evalpath, $testset, $force_rebuild)= @_; + + say encode_utf8('------- Filling evaluation starts here -------'); + say encode_utf8("Evaluation directory is $evalpath."); + + # read defaults + my $defaultspath = "$testset/defaults"; + + # read default file names + my $defaultfilespath = "$defaultspath/files"; + die encode_utf8("Cannot find $defaultfilespath") + unless -e $defaultfilespath; + + # read file with default file names + my $files = read_config($defaultfilespath); + + # read test data + my $descpath + = $specpath . $SLASH . $files->unfolded_value('Test-Specification'); + my $desc = read_config($descpath); + + # read test defaults + my $descdefaultspath + = $defaultspath . $SLASH . $files->unfolded_value('Test-Specification'); + my $defaults = read_config($descdefaultspath); + + # start with a shallow copy of defaults + my $testcase = Lintian::Deb822::Section->new; + $testcase->store($_, $defaults->value($_)) for $defaults->names; + + die encode_utf8("Name missing for $specpath") + unless $desc->declares('Testname'); + + # delete old test scripts + my @oldrunners = File::Find::Rule->file->name('*.t')->in($evalpath); + if (@oldrunners) { + unlink(@oldrunners) + or die encode_utf8("Cannot unlink @oldrunners"); + } + + $testcase->store('Skeleton', $desc->value('Skeleton')) + unless $testcase->declares('Skeleton'); + + my $skeletonname = $testcase->unfolded_value('Skeleton'); + if (length $skeletonname) { + + # load skeleton + my $skeletonpath = "$testset/skeletons/$skeletonname"; + my $skeleton = read_config($skeletonpath); + + $testcase->store($_, $skeleton->value($_)) for $skeleton->names; + } + + # add individual settings after skeleton + $testcase->store($_, $desc->value($_)) for $desc->names; + + # populate working directory with specified template sets + copy_skeleton_template_sets($testcase->value('Template-Sets'), + $evalpath, $testset) + if $testcase->declares('Template-Sets'); + + # delete templates for which we have originals + remove_surplus_templates($specpath, $evalpath); + + # copy test specification to working directory + my $offset = path($specpath)->relative($testset)->stringify; + say encode_utf8( + "Copy test specification $offset from $testset to $evalpath."); + copy_dir_contents($specpath, $evalpath); + + my $valuefolder = $testcase->unfolded_value('Fill-Values-Folder'); + if (length $valuefolder) { + + # load all the values in the fill values folder + my $valuepath = "$evalpath/$valuefolder"; + my @filepaths + = File::Find::Rule->file->name('*.values')->in($valuepath); + + for my $filepath (sort @filepaths) { + my $fill_values = read_config($filepath); + + $testcase->store($_, $fill_values->value($_)) + for $fill_values->names; + } + } + + # add individual settings after skeleton + $testcase->store($_, $desc->value($_)) for $desc->names; + + # fill testcase with itself; do it twice to make sure all is done + my $hashref = deb822_section_to_hash($testcase); + $hashref = fill_hash_from_hash($hashref); + $hashref = fill_hash_from_hash($hashref); + write_hash_to_deb822_section($hashref, $testcase); + + say encode_utf8($EMPTY); + + # fill remaining templates + fill_skeleton_templates($testcase->value('Fill-Targets'), + $hashref, time, $evalpath, $testset) + if $testcase->declares('Fill-Targets'); + + # write the dynamic file names + my $runfiles = path($evalpath)->child('files'); + write_config($files, $runfiles->stringify); + + # write the dynamic test case file + my $rundesc + = path($evalpath)->child($files->unfolded_value('Test-Specification')); + write_config($testcase, $rundesc->stringify); + + say encode_utf8($EMPTY); + + return; +} + +=item combine_fields + +=cut + +sub combine_fields { + my ($testcase, $destination, $delimiter, @sources) = @_; + + return + unless length $destination; + + # we are combining these contents + my @contents; + for my $source (@sources) { + push(@contents, $testcase->value($source)) + if length $source; + $testcase->drop($source); + } + + # combine + for my $content (@contents) { + $testcase->store( + $destination, + join($delimiter, + grep { length }($testcase->value($destination),$content)) + ); + } + + # delete the combined entry if it is empty + $testcase->drop($destination) + unless length $testcase->value($destination); + + return; +} + +=item deb822_section_to_hash + +=cut + +sub deb822_section_to_hash { + my ($section) = @_; + + my %hash; + for my $name ($section->names) { + + my $transformed = lc $name; + $transformed =~ s/-/_/g; + + $hash{$transformed} = $section->value($name); + } + + return \%hash; +} + +=item write_hash_to_deb822_section + +=cut + +sub write_hash_to_deb822_section { + my ($hashref, $section) = @_; + + for my $name ($section->names) { + + my $transformed = lc $name; + $transformed =~ s/-/_/g; + + $section->store($name, $hashref->{$transformed}); + } + + return; +} + +=item fill_hash_from_hash + +=cut + +sub fill_hash_from_hash { + my ($hashref, $delimiters) = @_; + + $delimiters //= ['[%', '%]']; + + my %origin = %{$hashref}; + my %destination; + + # fill hash with itself + for my $key (keys %origin) { + + my $template = $origin{$key} // $EMPTY; + my $filler= Text::Template->new(TYPE => 'STRING', SOURCE => $template); + croak encode_utf8( + "Cannot read template $template: $Text::Template::ERROR") + unless $filler; + + my $generated + = $filler->fill_in(HASH => \%origin, DELIMITERS => $delimiters); + croak encode_utf8("Could not create string from template $template") + unless defined $generated; + $destination{$key} = $generated; + } + + return \%destination; +} + +=back + +=head1 AUTHOR + +Originally written by Felix Lechner <felix.lechner@lease-up.com> for Lintian. + +=head1 SEE ALSO + +lintian(1) + +=cut + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Test/Lintian/Run.pm b/lib/Test/Lintian/Run.pm new file mode 100644 index 0000000..4fb7c97 --- /dev/null +++ b/lib/Test/Lintian/Run.pm @@ -0,0 +1,570 @@ +# Copyright (C) 2018 Felix Lechner +# Copyright (C) 2019 Chris Lamb <lamby@debian.org> +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA + +package Test::Lintian::Run; + +=head1 NAME + +Test::Lintian::Run -- generic runner for all suites + +=head1 SYNOPSIS + + use Test::Lintian::Run qw(runner); + + my $runpath = "test working directory"; + + runner($runpath); + +=head1 DESCRIPTION + +Generic test runner for all Lintian test suites + +=cut + +use v5.20; +use warnings; +use utf8; + +use Exporter qw(import); + +BEGIN { + our @EXPORT_OK = qw( + logged_runner + runner + check_result + ); +} + +use Capture::Tiny qw(capture_merged); +use Const::Fast; +use Cwd qw(getcwd); +use File::Basename qw(basename); +use File::Spec::Functions qw(abs2rel rel2abs splitpath catpath); +use File::Compare; +use File::Copy; +use File::stat; +use IPC::Run3; +use List::Compare; +use List::Util qw(max min any all); +use Path::Tiny; +use Syntax::Keyword::Try; +use Test::More; +use Text::Diff; +use Unicode::UTF8 qw(encode_utf8 decode_utf8); + +use Lintian::Deb822; +use Lintian::Profile; + +use Test::Lintian::ConfigFile qw(read_config); +use Test::Lintian::Helper qw(rfc822date); +use Test::Lintian::Hooks + qw(find_missing_prerequisites sed_hook sort_lines calibrate); +use Test::Lintian::Output::Universal qw(get_tag_names order); + +const my $EMPTY => q{}; +const my $SPACE => q{ }; +const my $INDENT => $SPACE x 2; +const my $SLASH => q{/}; +const my $NEWLINE => qq{\n}; +const my $YES => q{yes}; +const my $NO => q{no}; + +const my $WAIT_STATUS_SHIFT => 8; + +# turn off the @@-style headers in Text::Diff +no warnings 'redefine'; +sub Text::Diff::Unified::file_header { return $EMPTY; } +sub Text::Diff::Unified::hunk_header { return $EMPTY; } + +=head1 FUNCTIONS + +=over 4 + +=item logged_runner(RUN_PATH) + +Starts the generic test runner for the test located in RUN_PATH +and logs the output. + +=cut + +sub logged_runner { + my ($runpath) = @_; + + my $error; + + # read dynamic file names + my $runfiles = "$runpath/files"; + my $files = read_config($runfiles); + + # set path to logfile + my $logpath = $runpath . $SLASH . $files->unfolded_value('Log'); + + my $log_bytes = capture_merged { + try { + # call runner + runner($runpath, $logpath) + + } catch { + # catch any error + $error = $@; + } + }; + + my $log = decode_utf8($log_bytes); + + # append runner log to population log + path($logpath)->append_utf8($log) if length $log; + + # add error if there was one + path($logpath)->append_utf8($error) if length $error; + + # print log and die on error + if ($error) { + print encode_utf8($log) + if length $log && $ENV{'DUMP_LOGS'}//$NO eq $YES; + die encode_utf8("Runner died for $runpath: $error"); + } + + return; +} + +=item runner(RUN_PATH) + +This routine provides the basic structure for all runners and runs the +test located in RUN_PATH. + +=cut + +sub runner { + my ($runpath, @exclude)= @_; + + # set a predictable locale + $ENV{'LC_ALL'} = 'C'; + + say encode_utf8($EMPTY); + say encode_utf8('------- Runner starts here -------'); + + # bail out if runpath does not exist + BAIL_OUT(encode_utf8("Cannot find test directory $runpath.")) + unless -d $runpath; + + # announce location + say encode_utf8("Running test at $runpath."); + + # read dynamic file names + my $runfiles = "$runpath/files"; + my $files = read_config($runfiles); + + # get file age + my $spec_epoch = stat($runfiles)->mtime; + + # read dynamic case data + my $rundescpath + = $runpath . $SLASH . $files->unfolded_value('Test-Specification'); + my $testcase = read_config($rundescpath); + + # get data age + $spec_epoch = max(stat($rundescpath)->mtime, $spec_epoch); + say encode_utf8('Specification is from : '. rfc822date($spec_epoch)); + + say encode_utf8($EMPTY); + + # age of runner executable + my $runner_epoch = $ENV{'RUNNER_EPOCH'}//time; + say encode_utf8('Runner modified on : '. rfc822date($runner_epoch)); + + # age of harness executable + my $harness_epoch = $ENV{'HARNESS_EPOCH'}//time; + say encode_utf8('Harness modified on : '. rfc822date($harness_epoch)); + + # calculate rebuild threshold + my $threshold= max($spec_epoch, $runner_epoch, $harness_epoch); + say encode_utf8('Rebuild threshold is : '. rfc822date($threshold)); + + say encode_utf8($EMPTY); + + # age of Lintian executable + my $lintian_epoch = $ENV{'LINTIAN_EPOCH'}//time; + say encode_utf8('Lintian modified on : '. rfc822date($lintian_epoch)); + + my $testname = $testcase->unfolded_value('Testname'); + # name of encapsulating directory should be that of test + my $expected_name = path($runpath)->basename; + die encode_utf8( + "Test in $runpath is called $testname instead of $expected_name") + unless $testname eq $expected_name; + + # skip test if marked + my $skipfile = "$runpath/skip"; + if (-e $skipfile) { + my $reason = path($skipfile)->slurp_utf8 || 'No reason given'; + say encode_utf8("Skipping test: $reason"); + plan skip_all => "(disabled) $reason"; + } + + # skip if missing prerequisites + my $missing = find_missing_prerequisites($testcase); + if (length $missing) { + say encode_utf8("Missing prerequisites: $missing"); + plan skip_all => $missing; + } + + # check test architectures + unless (length $ENV{'DEB_HOST_ARCH'}) { + say encode_utf8('DEB_HOST_ARCH is not set.'); + BAIL_OUT(encode_utf8('DEB_HOST_ARCH is not set.')); + } + my $platforms = $testcase->unfolded_value('Test-Architectures'); + if ($platforms ne 'any') { + + my @wildcards = split($SPACE, $platforms); + my $match = 0; + for my $wildcard (@wildcards) { + + my @command = ( + qw{dpkg-architecture -a}, + $ENV{'DEB_HOST_ARCH'}, '-i', $wildcard + ); + run3(\@command, \undef, \undef, \undef); + my $status = ($? >> $WAIT_STATUS_SHIFT); + + unless ($status) { + $match = 1; + last; + } + } + unless ($match) { + say encode_utf8('Architecture mismatch'); + plan skip_all => encode_utf8('Architecture mismatch'); + } + } + + plan skip_all => 'No package found' + unless -e "$runpath/subject"; + + # set the testing plan + plan tests => 1; + + my $subject = path("$runpath/subject")->realpath; + + # get lintian subject + die encode_utf8('Could not get subject of Lintian examination.') + unless -e $subject; + + # run lintian + $ENV{'LINTIAN_COVERAGE'}.= ",-db,./cover_db-$testname" + if exists $ENV{'LINTIAN_COVERAGE'}; + + my $lintian_command_line + = $testcase->unfolded_value('Lintian-Command-Line'); + my $command + = "cd $runpath; $ENV{'LINTIAN_UNDER_TEST'} $lintian_command_line $subject"; + say encode_utf8($command); + my ($output, $status) = capture_merged { system($command); }; + $status >>= $WAIT_STATUS_SHIFT; + + $output = decode_utf8($output) + if length $output; + + say encode_utf8("$command exited with status $status."); + say encode_utf8($output) if $status == 1; + + my $expected_status = $testcase->unfolded_value('Exit-Status'); + + my @errors; + push(@errors, + "Exit code $status differs from expected value $expected_status.") + if $testcase->declares('Exit-Status') + && $status != $expected_status; + + # filter out some warnings if running under coverage + my @lines = split(/\n/, $output); + if (exists $ENV{LINTIAN_COVERAGE}) { + # Devel::Cover causes deep recursion warnings. + @lines = grep { + !m{^Deep [ ] recursion [ ] on [ ] subroutine [ ] + "[^"]+" [ ] at [ ] .*B/Deparse.pm [ ] line [ ] + \d+}xsm + } @lines; + } + + # put output back together + $output = $EMPTY; + $output .= $_ . $NEWLINE for @lines; + + die encode_utf8('No match strategy defined') + unless $testcase->declares('Match-Strategy'); + + my $match_strategy = $testcase->unfolded_value('Match-Strategy'); + + if ($match_strategy eq 'literal') { + push(@errors, check_literal($testcase, $runpath, $output)); + + } elsif ($match_strategy eq 'hints') { + push(@errors, check_hints($testcase, $runpath, $output)); + + } else { + die encode_utf8("Unknown match strategy $match_strategy."); + } + + my $okay = !(scalar @errors); + + if ($testcase->declares('Todo')) { + + my $explanation = $testcase->unfolded_value('Todo'); + diag encode_utf8("TODO ($explanation)"); + + TODO: { + local $TODO = $explanation; + ok($okay, 'Lintian passes for test marked TODO.'); + } + + return; + } + + diag encode_utf8($_ . $NEWLINE) for @errors; + + ok($okay, "Lintian passes for $testname"); + + return; +} + +=item check_literal + +=cut + +sub check_literal { + my ($testcase, $runpath, $output) = @_; + + # create expected output if it does not exist + my $expected = "$runpath/literal"; + path($expected)->touch + unless -e $expected; + + my $raw = "$runpath/literal.actual"; + path($raw)->spew_utf8($output); + + # run a sed-script if it exists + my $actual = "$runpath/literal.actual.parsed"; + my $script = "$runpath/post-test"; + if (-e $script) { + sed_hook($script, $raw, $actual); + } else { + die encode_utf8("Could not copy actual hints $raw to $actual: $!") + if system('cp', '-p', $raw, $actual); + } + + return check_result($testcase, $runpath, $expected, $actual); +} + +=item check_hints + +=cut + +sub check_hints { + my ($testcase, $runpath, $output) = @_; + + # create expected hints if there are none; helps when calibrating new tests + my $expected = "$runpath/hints"; + path($expected)->touch + unless -e $expected; + + my $raw = "$runpath/hints.actual"; + path($raw)->spew_utf8($output); + + # run a sed-script if it exists + my $actual = "$runpath/hints.actual.parsed"; + my $sedscript = "$runpath/post-test"; + if (-e $sedscript) { + sed_hook($sedscript, $raw, $actual); + } else { + die encode_utf8("Could not copy actual hints $raw to $actual: $!") + if system('cp', '-p', $raw, $actual); + } + + # calibrate hints; may write to $actual + my $calibrated = "$runpath/hints.specified.calibrated"; + my $calscript = "$runpath/test-calibration"; + if(-x $calscript) { + calibrate($calscript, $actual, $expected, $calibrated); + } else { + die encode_utf8( + "Could not copy expected hints $expected to $calibrated: $!") + if system('cp', '-p', $expected, $calibrated); + } + + return check_result($testcase, $runpath, $calibrated, $actual); +} + +=item check_result(DESC, EXPECTED, ACTUAL) + +This routine checks if the EXPECTED hints match the calibrated ACTUAL for the +test described by DESC. For some additional checks, also need the ORIGINAL +hints before calibration. Returns a list of errors, if there are any. + +=cut + +sub check_result { + my ($testcase, $runpath, $expectedpath, $actualpath) = @_; + + my @errors; + + my @expectedlines = path($expectedpath)->lines_utf8; + my @actuallines = path($actualpath)->lines_utf8; + + push(@expectedlines, $NEWLINE) + unless @expectedlines; + push(@actuallines, $NEWLINE) + unless @actuallines; + + my $match_strategy = $testcase->unfolded_value('Match-Strategy'); + + if ($match_strategy eq 'hints') { + @expectedlines + = reverse sort { order($a) cmp order($b) } @expectedlines; + @actuallines + = reverse sort { order($a) cmp order($b) } @actuallines; + } + + my $diff = diff(\@expectedlines, \@actuallines, { CONTEXT => 0 }); + my @difflines = split(/\n/, $diff); + chomp @difflines; + + # diag encode_utf8("Difflines: $_") for @difflines; + + if(@difflines) { + + if ($match_strategy eq 'literal') { + push(@errors, 'Literal output does not match'); + + } elsif ($match_strategy eq 'hints') { + + push(@errors, 'Hints do not match'); + + @difflines = reverse sort @difflines; + my $hintdiff; + $hintdiff .= $_ . $NEWLINE for @difflines; + path("$runpath/hintdiff")->spew_utf8($hintdiff // $EMPTY); + + } else { + die encode_utf8("Unknown match strategy $match_strategy."); + } + + push(@errors, $EMPTY); + + push(@errors, '--- ' . abs2rel($expectedpath)); + push(@errors, '+++ ' . abs2rel($actualpath)); + push(@errors, @difflines); + + push(@errors, $EMPTY); + } + + # stop if the test is not about hints + return @errors + unless $match_strategy eq 'hints'; + + # get expected tags + my @expected = sort +get_tag_names($expectedpath); + + #diag encode_utf8("=Expected tag: $_") for @expected; + + # look out for tags being tested + my @related; + + if ( $testcase->declares('Check') + && $testcase->unfolded_value('Check') ne 'all') { + + my $profile = Lintian::Profile->new; + $profile->load(undef, undef, 0); + + # use tags related to checks declared + my @check_names = $testcase->trimmed_list('Check'); + my @unknown + = grep { !exists $profile->check_module_by_name->{$_} } @check_names; + + die encode_utf8('Unknown Lintian checks: ' . join($SPACE, @unknown)) + if @unknown; + + push(@related, @{$profile->tag_names_for_check->{$_} // []}) + for @check_names; + + @related = sort @related; + + } else { + # otherwise, look for all expected tags + @related = @expected; + } + + #diag encode_utf8("#Related tag: $_") for @related; + + # calculate Test-For and Test-Against; results are sorted + my $material = List::Compare->new(\@expected, \@related); + my @test_for = $material->get_intersection; + my @test_against = $material->get_Ronly; + + #diag encode_utf8("+Test-For: $_") for @test_for; + #diag encode_utf8("-Test-Against (calculated): $_") for @test_against; + + # get actual tags from output + my @actual = sort +get_tag_names($actualpath); + + #diag encode_utf8("*Actual tag found: $_") for @actual; + + # check for blacklisted tags; result is sorted + my @unexpected + = List::Compare->new(\@test_against, \@actual)->get_intersection; + + # warn about unexpected tags + if (@unexpected) { + push(@errors, 'Unexpected tags:'); + push(@errors, $INDENT . $_) for @unexpected; + push(@errors, $EMPTY); + } + # find tags not seen; result is sorted + my @missing = List::Compare->new(\@test_for, \@actual)->get_Lonly; + + # warn about missing tags + if (@missing) { + push(@errors, 'Missing tags:'); + push(@errors, $INDENT . $_) for @missing; + push(@errors, $EMPTY); + } + + return @errors; +} + +=back + +=head1 AUTHOR + +Originally written by Felix Lechner <felix.lechner@lease-up.com> for Lintian. + +=head1 SEE ALSO + +lintian(1) + +=cut + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Test/Lintian/Templates.pm b/lib/Test/Lintian/Templates.pm new file mode 100644 index 0000000..b52df15 --- /dev/null +++ b/lib/Test/Lintian/Templates.pm @@ -0,0 +1,348 @@ +# Copyright (C) 2018 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA + +package Test::Lintian::Templates; + +=head1 NAME + +Test::Lintian::Templates -- Helper routines dealing with templates + +=head1 SYNOPSIS + +use Test::Lintian::Templates qw(fill_template); + +my $data = { 'placeholder' => 'value' }; +my $file = '/path/to/generated/file'; + +fill_template("$file.in", $file, $data); + +=head1 DESCRIPTION + +Routines for dealing with templates in Lintian test specifications. + +=cut + +use v5.20; +use warnings; +use utf8; + +use Exporter qw(import); + +BEGIN { + our @EXPORT_OK = qw( + copy_skeleton_template_sets + remove_surplus_templates + fill_skeleton_templates + fill_whitelisted_templates + fill_all_templates + fill_template + ); +} + +use Carp; +use Const::Fast; +use List::Util qw(max); +use File::Path qw(make_path); +use File::Spec::Functions qw(rel2abs abs2rel); +use File::Find::Rule; +use File::stat; +use Path::Tiny; +use Text::Template; +use Unicode::UTF8 qw(encode_utf8); + +use Test::Lintian::ConfigFile qw(read_config); +use Test::Lintian::Helper qw(copy_dir_contents); + +const my $EMPTY => q{}; +const my $SPACE => q{ }; +const my $DOT => q{.}; +const my $COMMA => q{,}; +const my $COLON => q{:}; + +=head1 FUNCTIONS + +=over 4 + +=item copy_skeleton_template_sets(INSTRUCTIONS, RUN_PATH, SUITE, TEST_SET) + +Copies template sets belonging to SUITE into the test working directory +RUN_PATH according to INSTRUCTIONS. The INSTRUCTIONS are the target +directory relative to RUN_PATH followed by the name of the template set +in parentheses. Multiple such instructions must be separated by commas. + +=cut + +sub copy_skeleton_template_sets { + my ($instructions, $runpath, $testset)= @_; + + # populate working directory with specified template sets + for my $placement (split($COMMA, $instructions)) { + + my ($relative, $name) + =($placement =~ qr/^\s*([^()\s]+)\s*\(([^()\s]+)\)\s*$/); + + croak encode_utf8('No template destination specified in skeleton.') + unless length $relative; + + croak encode_utf8('No template set specified in skeleton.') + unless length $name; + + my $templatesetpath = "$testset/templates/$name"; + croak encode_utf8( + "Cannot find template set '$name' at $templatesetpath.") + unless -d $templatesetpath; + + say encode_utf8( + "Installing template set '$name'" + . ( + $relative ne $DOT ? " to ./$relative." : $EMPTY + ) + ); + + # create directory + my $destination = "$runpath/$relative"; + make_path($destination); + + # copy template set + copy_dir_contents($templatesetpath, $destination) + if -d $templatesetpath; + } + return; +} + +=item remove_surplus_templates(SRC_DIR, TARGET_DIR) + +Removes from TARGET_DIR any templates that have corresponding originals +in SRC_DIR. + +=cut + +sub remove_surplus_templates { + my ($source, $destination) = @_; + + my @originals = File::Find::Rule->file->in($source); + foreach my $original (@originals) { + my $relative = abs2rel($original, $source); + my $template = rel2abs("$relative.in", $destination); + + if (-e $template) { + unlink($template) + or die encode_utf8("Cannot unlink $template"); + } + } + return; +} + +=item fill_skeleton_templates(INSTRUCTIONS, HASH, EPOCH, RUN_PATH, TEST_SET) + +Fills the templates specified in INSTRUCTIONS using the data in HASH. Only +fills templates when the generated files are not present or are older than +either the file modification time of the template or the age of the data +as evidenced by EPOCH. The INSTRUCTIONS are the target directory relative +to RUN_PATH followed by the name of the whitelist in parentheses. Multiple +instructions must be separated by commas. + +=cut + +sub fill_skeleton_templates { + my ($instructions, $testcase, $threshold, $runpath, $testset)= @_; + + for my $target (split(/$COMMA/, $instructions)) { + + my ($relative, $name) + =($target=~ qr/^\s*([^()\s]+)\s*(?:\(([^()\s]+)\))?\s*$/); + + croak encode_utf8('No fill destination specified in skeleton.') + unless length $relative; + + if (length $name) { + + # template set + my $whitelistpath = "$testset/whitelists/$name"; + croak encode_utf8( + "Cannot find template whitelist '$name' at $whitelistpath") + unless -e $whitelistpath; + + say encode_utf8($EMPTY); + + say encode_utf8( + 'Generate files ' + . ( + $relative ne $DOT ? "in ./$relative " : $EMPTY + ) + . "from templates using whitelist '$name'." + ); + my $whitelist = read_config($whitelistpath); + + my @candidates = $whitelist->trimmed_list('May-Generate'); + my $destination = "$runpath/$relative"; + + say encode_utf8( + 'Fill templates' + . ( + $relative ne $DOT ? " in ./$relative" : $EMPTY + ) + . $COLON + . $SPACE + . join($SPACE, @candidates) + ); + + foreach my $candidate (@candidates) { + my $generated = rel2abs($candidate, $destination); + my $template = "$generated.in"; + + # fill template if needed + fill_template($template, $generated, $testcase, $threshold) + if -e $template; + } + + }else { + + # single file + say encode_utf8("Filling template: $relative"); + + my $generated = rel2abs($relative, $runpath); + my $template = "$generated.in"; + + # fill template if needed + fill_template($template, $generated, $testcase, $threshold) + if -e $template; + } + } + return; +} + +=item fill_whitelisted_templates(DIR, WHITE_LIST, HASH, HASH_EPOCH) + +Generates all files in array WHITE_LIST relative to DIR from their templates, +which are assumed to have the same file name but with extension '.in', using +data provided in HASH. The optional argument HASH_EPOCH can be used to +preserve files when no generation is necessary. + +=cut + +sub fill_whitelisted_templates { + my ($directory, $whitelistpath, $data, $data_epoch) = @_; + + croak encode_utf8("No whitelist found at $whitelistpath") + unless -e $whitelistpath; + + my $whitelist = read_config($whitelistpath); + my @list = $whitelist->trimmed_list('May-Generate'); + + foreach my $file (@list) { + my $generated = rel2abs($file, $directory); + my $template = "$generated.in"; + + # fill template if needed + fill_template($template, $generated, $data, $data_epoch) + if -e $template; + } + return; +} + +=item fill_all_templates(HASH, DIR) + +Fills all templates in DIR with data from HASH. + +=cut + +sub fill_all_templates { + my ($data, $data_epoch, $directory) = @_; + + my @templates = File::Find::Rule->name('*.in')->in($directory); + foreach my $template (@templates) { + my ($generated) = ($template =~ qr/^(.+?)\.in$/); + + # fill template if needed + fill_template($template, $generated, $data, $data_epoch); + } + return; +} + +=item fill_template(TEMPLATE, GENERATED, HASH, HASH_EPOCH, DELIMITERS) + +Fills template TEMPLATE with data from HASH and places the result in +file GENERATED. When given HASH_EPOCH, will evaluate beforehand if a +substitution is necessary based on file modification times. The optional +parameter DELIMITERS can be used to change the standard delimiters. + +=cut + +sub fill_template { + my ($template, $generated, $data, $data_epoch, $delimiters) = @_; + + my $generated_epoch + = length $generated && -e $generated ? stat($generated)->mtime : 0; + my $template_epoch + = length $template && -e $template ? stat($template)->mtime : time; + my $threshold = max($template_epoch, $data_epoch//time); + + if ($generated_epoch <= $threshold) { + + my $filler= Text::Template->new( + TYPE => 'FILE', + DELIMITERS => ['[%', '%]'], + SOURCE => $template + ); + croak encode_utf8( + "Cannot read template $template: $Text::Template::ERROR") + unless $filler; + + open(my $handle, '>', $generated) + or croak encode_utf8("Could not open file $generated: $!"); + $filler->fill_in( + OUTPUT => $handle, + HASH => $data, + DELIMITERS => $delimiters + ) + or croak encode_utf8( + "Could not create file $generated from template $template"); + close $handle + or carp encode_utf8("Could not close file $generated: $!"); + + # transfer file permissions from template to generated file + my $stat = stat($template) + or croak encode_utf8("stat $template failed: $!"); + chmod $stat->mode, $generated + or croak encode_utf8("chmod $generated failed: $!"); + + # set mtime to $threshold + path($generated)->touch($threshold); + } + + # delete template + if (-e $generated) { + unlink($template) + or die encode_utf8("Cannot unlink $template"); + } + + return; +} + +=back + +=cut + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Test/ScriptAge.pm b/lib/Test/ScriptAge.pm new file mode 100644 index 0000000..dcab63b --- /dev/null +++ b/lib/Test/ScriptAge.pm @@ -0,0 +1,109 @@ +# Copyright (C) 2019 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA + +package Test::ScriptAge; + +=head1 NAME + +Test::ScriptAge -- routines relating to the age of Perl scripts + +=head1 SYNOPSIS + + my $executable_epoch = Test::ScriptAge::our_modification_epoch(); + print encode_utf8('This script was last modified at ' . localtime($executable_epoch) . "\n"); + + my $perl_epoch = Test::ScriptAge::perl_modification_epoch(); + print encode_utf8('Perl was last modified at ' . localtime($perl_epoch) . "\n"); + +=head1 DESCRIPTION + +Routines to calculated modification times of Perl scripts. + +=cut + +use v5.20; +use warnings; +use utf8; + +use Exporter qw(import); + +BEGIN { + our @EXPORT_OK = qw( + perl_modification_epoch + our_modification_epoch + ); +} + +use File::stat; +use File::Spec::Functions qw(rel2abs); +use List::Util qw(max); +use Path::Tiny; +use Unicode::UTF8 qw(encode_utf8); + +=head1 FUNCTIONS + +=over 4 + +=item perl_modification_epoch + +Calculate the time our Perl was last modified. + +=cut + +sub perl_modification_epoch { + my $perlpath = rel2abs($^X); + return stat($perlpath)->mtime; +} + +=item our_modification_epoch + +Calculate the time our scripts, including all libraries, was last modified. + +=cut + +sub our_modification_epoch { + my (undef, $callerpath, undef) = caller; + + my @paths = map { rel2abs($_) } ($callerpath, values %INC); + if (my @relative = grep { !/^\// } @paths){ + warn encode_utf8( + 'Relative paths in running_epoch: '.join(', ', @relative)); + } + my @epochs = map { path($_)->stat->mtime } @paths; + return max @epochs; +} + +=back + +=head1 AUTHOR + +Originally written by Felix Lechner <felix.lechner@lease-up.com> for Lintian. + +=head1 SEE ALSO + +lintian(1) + +=cut + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/lib/Test/StagedFileProducer.pm b/lib/Test/StagedFileProducer.pm new file mode 100644 index 0000000..ada9069 --- /dev/null +++ b/lib/Test/StagedFileProducer.pm @@ -0,0 +1,314 @@ +# Copyright (C) 2018 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA + +package Test::StagedFileProducer; + +=head1 NAME + +Test::StagedFileProducer -- mtime-based file production engine + +=head1 SYNOPSIS + + use Test::StagedFileProducer; + + my $wherever = '/your/test/directory'; + + my $producer = Test::StagedFileProducer->new(path => $wherever); + $producer->exclude("$wherever/log", "$wherever/build-stamp"); + + my $output = "$wherever/file.out"; + $producer->add_stage( + products => [$output], + build =>sub { + print encode_utf8("Building $output.\n"); + }, + skip =>sub { + print encode_utf8("Skipping $output.\n"); + } + ); + + $producer->run(minimum_epoch => time, verbose => 1); + +=head1 DESCRIPTION + +Provides a way to define and stack file production stages that all +depend on subsets of the same group of files. + +After the stages are defined, the processing engine takes an inventory +of all files in a target directory. It excludes some files, like logs, +that should not be considered. + +Each stage adds its own products to the list of files to be excluded +before deciding whether to produce them. The decision is based on +relative file modification times, in addition to a systemic rebuilding +threshold. Before rebuilding, each stage asks a lower stage to make +the same determination. + +The result is an engine with file production stages that depend on +successively larger sets of files. + +=cut + +use v5.20; +use warnings; +use utf8; + +use Carp; +use Const::Fast; +use File::Find::Rule; +use File::Spec::Functions qw(abs2rel); +use File::stat; +use List::Util qw(min max); +use Path::Tiny; +use Unicode::UTF8 qw(encode_utf8); + +use Test::Lintian::Helper qw(rfc822date); + +const my $EMPTY => q{}; +const my $SPACE => q{ }; + +=head1 FUNCTIONS + +=over 4 + +=item new(path => PATH) + +Create a new instance focused on files in directory PATH. + +=cut + +sub new { + my ($class, %params) = @_; + + my $self = bless {}, $class; + + croak encode_utf8('Cannot proceed without a path.') + unless exists $params{path}; + $self->{path} = $params{path}; + + $self->{exclude} = []; + $self->{stages} = []; + + return $self; +} + +=item exclude(LIST) + +Excludes all absolute paths in LIST from all mtime comparisons. +This is especially useful for logs. Calls to Path::Tiny->realpath +are made to ensure the elements are canonical and have a chance +of matching something returned by File::Find::Rule. + +=cut + +sub exclude { + my ($self, @list) = @_; + + push(@{$self->{exclude}}, grep { defined } @list); + + return; +} + +=item add_stage(HASH) + +Add a stage defined by HASH to the processing engine for processing +after stages previously added. HASH can define the following keys: + +$HASH{products} => LIST; a list of full-path filenames to be +produced. + +$HASH{minimum_epoch} => EPOCH; an integer threshold for maximum age + +$HASH{build} => SUB; a sub executed when production is required. + +$HASH{skip} => SUB; a sub executed when production is not required. + +=cut + +sub add_stage { + my ($self, %stage) = @_; + + push(@{$self->{stages}}, \%stage); + + return; +} + +=item run(PARAMETERS) + +Runs the defined engine using the given parameters, which are +arranged in a matching list suitable for assignment to a hash. +The following two parameters are currently available: + +minimum_epoch => EPOCH; a systemic threshold, in epochs, below +which rebuilding is mandatory for any product. + +verbose => BOOLEAN; an option to enable more verbose reporting + +=cut + +sub run { + my ($self, %params) = @_; + + $self->{minimum_epoch} = $params{minimum_epoch} // 0; + $self->{verbose} = $params{verbose} // 0; + + # take an mtime inventory of all files in path + $self->{mtimes} + = { map { $_ => path($_)->stat->mtime } + File::Find::Rule->file->in($self->{path}) }; + + say encode_utf8( + 'Found the following file modification times (most recent first):') + if $self->{verbose}; + + my @ordered= reverse sort { $self->{mtimes}{$a} <=> $self->{mtimes}{$b} } + keys %{$self->{mtimes}}; + foreach my $file (@ordered) { + my $relative = abs2rel($file, $self->{path}); + say encode_utf8(rfc822date($self->{mtimes}{$file}) . " : $relative") + if $self->{verbose}; + } + + $self->_process_remaining_stages(@{$self->{exclude}}); + + return; +} + +=item _process_remaining_stages(LIST) + +An internal subroutine that is used recursively to execute +the stages. The list passed describes the list of files to +be excluded from subsequent mtime calculations. + +Please note that the bulk of the execution takes place +after calling the next lower stage. That is to ensure that +any lower build targets (or products, in our parlance) are +met before the present stage attempts to do its job. + +=cut + +sub _process_remaining_stages { + my ($self, @exclude) = @_; + + if (scalar @{$self->{stages}}) { + + # get the next processing stage + my %stage = %{ pop(@{$self->{stages}}) }; + + # add our products to the list of files excluded + my @products = grep { defined } @{$stage{products}//[]}; + push(@exclude, @products); + + # pass to next lower stage for potential rebuilding + $self->_process_remaining_stages(@exclude); + + # get good paths that will match those of File::Find + @exclude = map { path($_)->realpath } @exclude; + + say encode_utf8($EMPTY) if $self->{verbose}; + + my @relative = sort map { abs2rel($_, $self->{path}) } @products; + say encode_utf8( + 'Considering production of: ' . join($SPACE, @relative)) + if $self->{verbose}; + + say encode_utf8('Excluding: ' + . join($SPACE, sort map { abs2rel($_, $self->{path}) } @exclude)) + if $self->{verbose}; + + my %relevant = %{$self->{mtimes}}; + delete @relevant{@exclude}; + +# my @ordered= reverse sort { $relevant{$a} <=> $relevant{$b} } +# keys %relevant; +# foreach my $file (@ordered) { +# say encode_utf8(rfc822date($relevant{$file}) . ' : ' . abs2rel($file, $self->{path})) +# if $self->{verbose}; +# } + + say encode_utf8($EMPTY) if $self->{verbose}; + + my $file_epoch = (max(values %relevant))//time; + say encode_utf8( + 'Input files modified on : '. rfc822date($file_epoch)) + if $self->{verbose}; + + my $systemic_minimum_epoch = $self->{minimum_epoch} // 0; + say encode_utf8('Systemic minimum epoch is : ' + . rfc822date($systemic_minimum_epoch)) + if $self->{verbose}; + + my $stage_minimum_epoch = $stage{minimum_epoch} // 0; + say encode_utf8('Stage minimum epoch is : ' + . rfc822date($stage_minimum_epoch)) + if $self->{verbose}; + + my $threshold + = max($stage_minimum_epoch, $systemic_minimum_epoch, $file_epoch); + say encode_utf8( + 'Rebuild threshold is : '. rfc822date($threshold)) + if $self->{verbose}; + + say encode_utf8($EMPTY) if $self->{verbose}; + + my $product_epoch + = min(map { -e ? path($_)->stat->mtime : 0 } @products); + if($product_epoch) { + say encode_utf8( + 'Products modified on : '. rfc822date($product_epoch)) + if $self->{verbose}; + } else { + say encode_utf8('At least one product is not present.') + if $self->{verbose}; + } + + # not producing if times are equal; resolution 1 sec + if ($product_epoch < $threshold) { + + say encode_utf8('Producing: ' . join($SPACE, @relative)) + if $self->{verbose}; + + $stage{build}->() if exists $stage{build}; + + # sometimes the products are not the newest files + path($_)->touch(time) for @products; + + } else { + + say encode_utf8( + 'Skipping production of: ' . join($SPACE, @relative)) + if $self->{verbose}; + + $stage{skip}->() if exists $stage{skip}; + } + } + + return; +} + +=back + +=cut + +1; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/mail-templates/license-problem-gfdl-invariants b/mail-templates/license-problem-gfdl-invariants new file mode 100644 index 0000000..7a1ccaa --- /dev/null +++ b/mail-templates/license-problem-gfdl-invariants @@ -0,0 +1,26 @@ +Subject: [{Package}] Non free files under GFDL with invariant or front-cover or back-cover texts +Package: {Package} +Version: {Version} +user: lintian-maint@debian.org +usertags: gfdl-invariant +severity: serious + +Hi, + +Your package includes some files (see below) licensed under GFDL with invariant or front-cover or back-cover texts. + +{list of files} + +Per General Resolution [1] GFDL with invariant or front-cover or back-cover text is considered non-free. + +You could solve this problem by (see also [2]): +- contact upstream to relicense. +- rip the file and add it to non free (like gcc-doc). + +You could also ask debian-qa for more guidance. + +Thanks + + +[1] https://www.debian.org/vote/2006/vote_001 +[2] https://wiki.debian.org/qa.debian.org/gfdlinvariant diff --git a/mail-templates/license-problem-non-free-RFC b/mail-templates/license-problem-non-free-RFC new file mode 100644 index 0000000..528028d --- /dev/null +++ b/mail-templates/license-problem-non-free-RFC @@ -0,0 +1,48 @@ +Subject: [{Package}] Source package contains non-free IETF RFC/I-D +Severity: serious +Package: {Package} +Version: {Version} +User: debian-release@lists.debian.org +Usertags: nonfree-doc rfc +X-Debbugs-CC: ftpmaster@debian.org + +Hi! + +This source package contains the following files from the +IETF under non-free license terms: + +{list of files} + +The license on RFC/I-Ds is not DFSG-free, see: + + * https://wiki.debian.org/NonFreeIETFDocuments + * https://bugs.debian.org/199810 + +According to the squeeze/wheezy release policy, source packages must be +DFSG-free, see: + + * https://release.debian.org/squeeze/rc_policy.txt + * https://release.debian.org/wheezy/rc_policy.txt + +The severity is serious, because this violates the Debian policy: + + * https://www.debian.org/doc/debian-policy/#s-dfsg + +There are (at least) three ways to fix this problem. In order of +preference: + +1. Ask the author of the RFC to re-license the RFC under a free + license. A template for this e-mail request can be found at + https://wiki.debian.org/NonFreeIETFDocuments + +2. Remove the non-free material from the source, e.g., by re-packaging + the upstream archive and adding 'dfsg' to the Debian package + version name. + +3. Move the package to non-free. + +General discussions are kindly requested to take place on debian-legal +or debian-devel in the thread with Subject: "Non-free IETF RFC/I-Ds in +source packages". + +Thanks diff --git a/mail-templates/license-problem-non-free-RFC-BCP78 b/mail-templates/license-problem-non-free-RFC-BCP78 new file mode 120000 index 0000000..a61397b --- /dev/null +++ b/mail-templates/license-problem-non-free-RFC-BCP78 @@ -0,0 +1 @@ +license-problem-non-free-RFC \ No newline at end of file diff --git a/mail-templates/source-is-missing b/mail-templates/source-is-missing new file mode 100644 index 0000000..349391e --- /dev/null +++ b/mail-templates/source-is-missing @@ -0,0 +1,42 @@ +Subject: [{Package}] Some sources are not included in your package +Package: {Package} +Version: {Version} +user: lintian-maint@debian.org +usertags: source-is-missing +severity: serious +X-Debbugs-CC: ftpmaster@debian.org + +Hi, + +your package includes some files that seem to lack sources +in preferred forms of modification: + +{list of files} + +According to Debian Free Software Guidelines [1] (DFSG) #2: + "The program must include source code, and must allow distribution + in source code as well as compiled form." + +In some cases this could also constitute a license violation for some +copyleft licenses such as the GNU GPL. (While sometimes the licence +allows not to ship the source, the DFSG always mandates source code.) + +In order to solve this problem, you could: +1. add the source files to "debian/missing-sources" directory. +2. repack the origin tarball and add the missing source files to it. + +Both ways satisfy the requirement to ship all source code. The second option +might be preferable due to the following reasons [2]: + - Upstream can do it too and you could even supply a patch to them, thus + fulfilling our social contract [3], see particularly §2. + - If source and non-source are in different locations, ftpmasters may + miss the source and (needlessly) reject the package. + - The source isn't duplicated in every .diff.gz/.debian.tar.* (though + this only really matters for larger sources). + +You could also ask debian-qa@lists.debian.org or #debian-qa for more +guidance. + +[1] https://www.debian.org/social_contract.en.html#guidelines +[2] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=736873#8 +[3] https://www.debian.org/social_contract diff --git a/man/lintian-annotate-hints.pod b/man/lintian-annotate-hints.pod new file mode 100644 index 0000000..2e49b2d --- /dev/null +++ b/man/lintian-annotate-hints.pod @@ -0,0 +1,112 @@ +# Copyright (C) 2010 Niels Thykier +# Copyright (C) 2017 Chris Lamb <lamby@debian.org> +# Copyright (C) 2020 Felix Lechner +# - based on the work Richard Braakman and Christian +# Schwarz (copyrighted 1998). +# +# This manual page is free software. It is distributed under the +# terms of the GNU General Public License as published by the Free +# Software Foundation; either version 2 of the License, or (at your +# option) any later version. +# +# This manual page is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this manual page; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 +# USA +# + +=head1 NAME + +lintian-annotate-hints - give detailed information about Lintian's error tags + +=head1 SYNOPSIS + +B<lintian-annotate-hints> [I<log-file>...] + +=head1 DESCRIPTION + +The B<lintian-annotate-hints> command parses the EWI output of the +B<lintian> command and gives verbose information about the listed +Lintian tags, or parses a Lintian override file and gives verbose +information about the tags included. + +If no log-file is specified on the command line, this command expects +its input on stdin. Thus, the output of B<lintian> can either be piped +through B<lintian-annotate-hints> or a log file produced by B<lintian> can be +processed with this command. + +(Note, though, that the B<lintian> command has a command line option +B<-i> to display the same results as B<lintian-annotate-hints>, so you +normally do not need to pipe the output of B<lintian> through this +command to see the extra information.) + +=head1 OPTIONS + +=over 4 + +=item B<-a>, B<--annotate> + +Read from standard input or any files specified on the command line +and search the input for lines formatted like Lintian override +entries. For each one that was found, display verbose information +about that tag. + +=item B<-h>, B<--help> + +Display usage information and exit. + +=item B<--include-dir> dir + +Use dir as an additional "Lintian root". The directory is expected +have a similar layout to the LINTIAN_BASE (if it exists), but does not +need to be a full self-contained root. + +Unlike B<lintian>, B<lintian-annotate-hints> will I<not> load any code from +these additional directories. + +This option may appear more than once; each time adding an additional +directory. + +=item B<--profile> prof + +Use the severities from the vendor profile prof when displaying tags. +If the profile name does not contain a slash, the default profile for +that vendor is chosen. + +If not specified, B<annotate-lintian-hint> loads the best profile for the +current vendor. + +Please Refer to the Lintian User Manual for the full documentation of +profiles. + +=item B<--user-dirs>, B<--no-user-dirs> + +By default, B<lintian> will check I<$HOME> and I</etc> for files +supplied by the user or the local sysadmin (e.g. profiles). This +default can be disabled (and re-enabled) by using B<--no-user-dirs> +(and B<--user-dirs>, respectively). + +These option can appear multiple times, in which case the of them +to appear determines the result. + +=back + +=head1 SEE ALSO + +L<lintian(1)> + +=head1 AUTHORS + +Niels Thykier <niels@thykier.net> + +Richard Braakman <dark@xs4all.nl> + +Christian Schwarz <schwarz@monet.m.isar.de> + +=cut + diff --git a/man/lintian-explain-tags.pod b/man/lintian-explain-tags.pod new file mode 100644 index 0000000..355b0e6 --- /dev/null +++ b/man/lintian-explain-tags.pod @@ -0,0 +1,108 @@ +# Copyright (C) 2010 Niels Thykier +# Copyright (C) 2017 Chris Lamb <lamby@debian.org> +# Copyright (C) 2020 Felix Lechner +# - based on the work Richard Braakman and Christian +# Schwarz (copyrighted 1998). +# +# This manual page is free software. It is distributed under the +# terms of the GNU General Public License as published by the Free +# Software Foundation; either version 2 of the License, or (at your +# option) any later version. +# +# This manual page is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this manual page; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 +# USA +# + +=head1 NAME + +lintian-explain-tags - offer more information about Lintian's tags + +=head1 SYNOPSIS + +B<lintian-explain-tags> B<--tags> I<tag> ... + +=head1 DESCRIPTION + +The B<lintian-explain-tags> command explains the named tags given on +the command line. + +=head1 OPTIONS + +=over 4 + +=item B<-l>, B<--list-tags> + +List all tags Lintian knows about in sorted order. + +=item B<-h>, B<--help> + +Display usage information and exit. + +=item B<--include-dir> dir + +Use dir as an additional "Lintian root". The directory is expected +have a similar layout to the LINTIAN_BASE (if it exists), but does not +need to be a full self-contained root. + +Unlike B<lintian>, B<lintian-explain-tags> will I<not> load any code from +these additional directories. + +This option may appear more than once; each time adding an additional +directory. + +=item B<--profile> prof + +Use the severities from the vendor profile prof when displaying tags. +If the profile name does not contain a slash, the default profile for +that vendor is chosen. + +If not specified, B<lintian-explain-tags> loads the best profile for the +current vendor. + +Please Refer to the Lintian User Manual for the full documentation of +profiles. + +=item B<-t>, B<--tag>, B<--tags> + +This option has no effect. It exists for historical reasons. + +=item B<--user-dirs>, B<--no-user-dirs> + +By default, B<lintian> will check I<$HOME> and I</etc> for files +supplied by the user or the local sysadmin (e.g. profiles). This +default can be disabled (and re-enabled) by using B<--no-user-dirs> +(and B<--user-dirs>, respectively). + +These option can appear multiple times, in which case the of them +to appear determines the result. + +=back + +=head1 EXIT STATUS + +If any of the tags specified were not found in the specified profile +(or in the default profile), this command returns with exit code 1. + +When all requested tags were found, it returns with exit code 0. + +=head1 SEE ALSO + +L<lintian(1)> + +=head1 AUTHORS + +Niels Thykier <niels@thykier.net> + +Richard Braakman <dark@xs4all.nl> + +Christian Schwarz <schwarz@monet.m.isar.de> + +=cut + diff --git a/man/lintian.pod b/man/lintian.pod new file mode 100644 index 0000000..5204aee --- /dev/null +++ b/man/lintian.pod @@ -0,0 +1,785 @@ +# Copyright (C) 2010 Niels Thykier +# Copyright (C) 2017, 2019 Chris Lamb <lamby@debian.org> +# - based on the work Richard Braakman and Christian +# Schwarz (copyrighted 1998). +# +# This manual page is free software. It is distributed under the +# terms of the GNU General Public License as published by the Free +# Software Foundation; either version 2 of the License, or (at your +# option) any later version. +# +# This manual page is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this manual page; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 +# USA +# + +=head1 NAME + +lintian - Static analysis tool for Debian packages + +=head1 SYNOPSIS + +B<lintian> [I<action>] [I<options>] [I<packages>] ... + +=head1 DESCRIPTION + +Lintian dissects Debian packages and reports bugs and policy +violations. It contains automated checks for many aspects of Debian +policy as well as some checks for common errors. + +There are two ways to specify binary, udeb or source packages for +Lintian to process: by file name (the .deb file for a binary package +or the .dsc file for a source package), or by naming a I<.changes> +file. + +If you specify a I<.changes> file, Lintian will process all packages +listed in that file. This is convenient when checking a new package +before uploading it. + +If you specify packages to be checked or use the option +B<--packages-from-file>, the packages requested will be processed. +Otherwise, if I<debian/changelog> exists, it is parsed to determine +the name of the .changes file to look for in the parent directory. +See L</CHECKING LAST BUILD> for more information. + + +=head1 OPTIONS + +Actions of the lintian command: (Only one action can be specified per invocation) + +=over 4 + +=item B<-c>, B<--check> + +Run all checks over the specified packages. This is the default action. + +=item B<-C> chk1,chk2,..., B<--check-part> chk1,chk2,... + +Run only the specified checks. You can either specify the name of the +check script or the abbreviation. For details, see the L</CHECKS> section +below. + +=item B<-F>, B<--ftp-master-rejects> + +Run only the checks that issue tags that result in automatic rejects +from the Debian upload queue. The list of such tags is refreshed with +each Lintian release, so may be slightly out of date if it has changed +recently. + +This is implemented via a profile and thus this option cannot be used +together with B<--profile>. + +=item B<-T> tag1,tag2,..., B<--tags> tag1,tag2,... + +Run only the checks that issue the requested tags. The tests for +other tags within the check scripts will be run but the tags will not +be issued. + +With this options all tags listed will be displayed regardless of the +display settings. + +=item B<--tags-from-file> filename + +Same functionality as B<--tags>, but read the list of tags from a +file. Blank lines and lines beginning with # are ignored. All other +lines are taken to be tag names or comma-separated lists of tag names +to (potentially) issue. + +With this options all tags listed will be displayed regardless of the +display settings. + +=item B<-X> chk1,chk2,..., B<--dont-check-part> chk1,chk2,... + +Run all but the specified checks. You can either specify the name +of the check script or the abbreviation. For details, see the +L</CHECKS> section below. + +=back + +General options: + +=over 4 + +=item B<-h>, B<--help> + +Display usage information and exit. + +=item B<-q>, B<--quiet> + +Suppress all informational messages including override comments +(normally shown with B<--show-overrides>). + +This option is silently ignored if B<--debug> is given. Otherwise, if +both B<--verbose> and B<--quiet> is used, the last of these two options +take effect. + +This option overrides the B<verbose> and the B<quiet> variable in the +configuration file. In the configuration file, this option is enabled +by using B<quiet> variable. The B<verbose> and B<quiet> variables may +not both appear in the config file. + +=item B<-v>, B<--verbose> + +Display verbose messages. + +If B<--debug> is used this option is always enabled. Otherwise, if +both B<--verbose> and B<--quiet> is used (and B<--debug> is not used), +the last of these two options take effect. + +This option overrides the B<quiet> variable in the configuration file. +In the configuration file, this option is enabled by using B<verbose> +variable. The B<verbose> and B<quiet> variables may not both appear +in the config file. + +=item B<-V>, B<--version> + +Display lintian version number and exit. + +=item B<--print-version> + +Print unadorned version number and exit. + +=back + +Behavior options for B<lintian>. + +=over 4 + +=item B<--color> (auto|never|always|html) + +Whether to colorize tags in lintian output based on their visibility. +The default is "auto" will use color only if the output is going to a +terminal. "never" will never use color, "always" will always use +color, and "html" will use HTML E<lt>spanE<gt> tags with a color style +attribute (instead of ANSI color escape sequences). + +This option overrides the B<color> variable in the configuration file. + +=item B<--hyperlinks> (on|off) + +Shows text-based hyperlinks to tag descriptions on lintian.debian.org on +terminals that support it. The default is on for terminals that support +it, unless the user selected '--color never'. This currently only works +in GNOME Terminal. + +This option overrides the B<color> variable in the configuration file. + +=item B<--default-display-level> + +Reset the current display level to the default. Basically, this +option behaves exactly like passing the following options to lintian: + +=over 4 + +B<-L> ">=warning" + +=back + +The primary use for this is to ensure that lintian's display level has +been reset to the built-in default values. Notably, this can be used +to override display settings earlier on the command-line or in the +lintian configuration file. + +Further changes to the display level can be done I<after> this option. +Example: B<--default-display-level --display-info> gives you the +default display level plus informational ("I:") tags. + +=item B<--display-source> X + +Only display tags from the source X (e.g. the Policy Manual or the +Developer Reference). This option can be used multiple times to +add additional sources. Example sources are "policy" or "devref" +being the Policy Manual and the Developer Reference (respectively). + +The entire list of sources can be found in +I<$LINTIAN_BASE/data/output/manual-references> + +=item B<-E>, B<--display-experimental>, B<--no-display-experimental> + +Control whether to display experimental ("X:") tags. They are +normally suppressed. + +If a tag is marked experimental, this means that the code that +generates this message is not as well tested as the rest of Lintian, +and might still give surprising results. Feel free to ignore +Experimental messages that do not seem to make sense, though of course +bug reports are always welcome (particularly if they include fixes). + +These options overrides the B<display-experimental> variable in the +configuration file. + +=item B<--fail-on> {error | warning | info | pedantic | experimental | override | none} + +Causes B<lintian> to exit with a program status of 2 for the given +conditions. This option can be a comma-separated list, or it may be +specified multiple times. + +The default is B<error>. Also, 'warning' does not imply 'error'. +Please specify both if you want both. + +=item B<-i>, B<--info> + +Print explanatory information about each problem discovered in +addition to the lintian error tags. To print a long tag description +without running lintian, see L<lintian-explain-tags(1)> or check +the website at https://lintian.debian.org. + +To negate it, please use B<--no-info>. + +This option overrides B<info> (or B<no-info>) variable in the configuration +file. + +=item B<-I>, B<--display-info> + +Display informational ("I:") tags as well. They are normally +suppressed. (This is equivalent to B<-L> ">=info"). + +This option overrides the B<display-info> variable in the +configuration file. + +Note: B<display-level> and B<display-info> may not both appear in the +configuration file. + +=item B<-L> [+|-|=][>=|>|=|<|<=][S|C|S/C], B<--display-level> [+|-|=][>=|>|=|<|<=][S|C|S/C] + +Fine-grained selection of tags to be displayed. It is possible to add, +remove or set the levels to display, specifying a visibility (error, +warning, info, pedantic, or classification. The default settings are +equivalent to B<-L> ">=warning". + +The value consists of 3 parts, where two of them are optional. The +parts are: + +=over 4 + +=item modifier operator + +How to affect the current display level. Can be one of add to ("+"), +remove from ("-") or set to ("=") the display level(s) denoted by the +following selection. + +The default value is "=" (i.e. set the display level). + +=item set operator + +The visibility to be selected. The operator can be one of ">=", ">", +"=", "<" or "<=". As an example, this can be used to select all info +(and more serious) tags via ">=info". + +The default value is "=", which means "exactly" the given visibility. + +=back + +This option overrides the B<display-level> variable in the +configuration file. The value of the B<display-level> in +configuration file should be space separated entries in the same +format as passed via command-line. + +Note: B<display-level> may not be used with B<display-info> or B<pedantic> +in the configuration file. + +=item B<-o>, B<--no-override> + +Ignore all overrides provided by the package. This option will overrule +B<--show-overrides>. + +This option overrides the B<override> variable in the configuration +file. + +=item B<--pedantic> + +Display pedantic ("P:") tags as well. They are normally suppressed. +(This is equivalent to B<-L> "+=pedantic"). + +Pedantic tags are Lintian at its most pickiest and include checks for +particular Debian packaging styles and checks that many people +disagree with. Expect false positives and Lintian tags that you don't +consider useful if you use this option. Adding overrides for pedantic +tags is probably not worth the effort. + +This option overrides the B<pedantic> variable in the configuration +file. + +Note: B<pedantic> and B<display-level> may not both appear in the +configuration file. + +=item B<--profile> vendor[/prof] + +Use the profile from vendor (or the profile with that name). If the +profile name does not contain a slash, the default profile for than +vendor is chosen. + +As an example, if you are on Ubuntu and want to use Lintian's Debian +checks, you can use: + + --profile debian + +Likewise, on a Debian machine you can use this to request the Ubuntu +checks. + +If the token I<{VENDOR}> appears in the profile name, B<lintian> will +substitute the token with a vendor name to find the profile. +B<lintian> uses L<Dpkg::Vendor> to determine the best vendor to use +(the closer to the current vendor, the better). This is mostly useful +for people implementing their own checks on top of Lintian. + +If not specified, the default value is I<{VENDOR}/main>. + +Please Refer to the Lintian User Manual for the full documentation of +profiles. + +=item B<--show-overrides> + +Controls whether tags that have been overridden should be shown. + +B<--show-overrides> will show overridden tags and mark them as +overridden (using an "O" code). + +If the overridden tags are shown, the related override comments will +also be displayed (unless --quiet is used). Please refer to the Lintian +User Manual for the documentation on how lintian relates comments to a +given override. + +To negate it, i.e. suppress the showing of overridden tags, please use +B<--no-show-overrides>. + +This option overrides the B<show-overrides> (or B<no-show-overrides>) variable +in the configuration file. + +=item B<--suppress-tags> tag1,tag2,... + +Suppress the listed tags. They will not be reported if they occur and +will not affect the exit status of Lintian. This option can be given +multiple times and can be mixed with B<--suppress-tags-from-file>. + +This option can be used together with B<--dont-check-part> ("Not those +checks nor these tags") and B<--check-part> ("Only those checks, but +not these tags (from those checks)") to further reduce the selection of +tags. + +When used with B<--tags>, this option is mostly ignored. + +=item B<--suppress-tags-from-file> file + +Suppress all tags listed in the given file. Blank lines and lines +beginning with # are ignored. All other lines are taken to be tag +names or comma-separated lists of tag names to suppress. The +suppressed tags will not be reported if they occur and will not affect +the exit status of Lintian. + +Tags parsed from the file will be handled as if they had been given to +the B<--suppress-tags> option (e.g. ignored if B<--tags> is used). + +=item B<--tag-display-limit>[=NUM] + +By default, lintian limits itself to emitting at most 4 instances of each +tag per processable when STDOUT is a TTY. This option specifies that limit. + +When STDOUT is not a TTY, lintian has no limit. + +To disable the limit, please use a value of zero. + +This option overrides the B<tag-display-limit> variable in the +configuration file. + +=back + +Configuration options: + +=over 4 + +=item B<--cfg> configfile + +Read the configuration from configfile rather than the default +locations. This option overrides the B<LINTIAN_CFG> environment +variable. + +=item B<--no-cfg> + +Do not read any configuration file. This option overrides the +B<--cfg> above. + +=item B<--ignore-lintian-env> + +Ignore all environment variables starting with I<LINTIAN_>. + +This option is mostly useful for applications running B<lintian> for +checking packages and do not want the invoking user to affect the +result (by setting LINTIAN_PROFILE etc.). + +Note it does I<not> cause B<lintian> to ignore the entire environment +like I<TMPDIR> or I<DEB_VENDOR>. The latter can affect the default +profile (or "{VENDOR}" token for B<--profile>). + +Should usually be combined with B<--no-user-dirs> (or unsetting $HOME +and all I<XDG_> variables). + +=item B<--include-dir> dir + +Use dir as an additional "LINTIAN_BASE". The directory is expected +have a similar layout to the LINTIAN_BASE (if it exists), but does not +need to be a full self-contained root. + +B<lintian> will check this directory for (additional) profiles, data +files, support libraries and checks. The latter two imply that +Lintian may attempt to I<load and execute code> from this directory. + +This option may appear more than once; each time adding an additional +directory. Directories are searched in the order they appear on the +command line. + +The additional directories will be checked I<after> the user +directories (though see B<--no-user-dirs>) and I<before> the core +LINTIAN_BASE. + +B<Note>: This option should be the very first if given. + +=item B<-j> X, B<--jobs>=X + +Set the limit for how many jobs Lintian will run in parallel. This +option overrides the B<jobs> variable in the configuration file. + +By default Lintian will use I<nproc> to determine a reasonable default +(or 2, if the nproc fails). + +=item B<--user-dirs>, B<--no-user-dirs> + +By default, B<lintian> will check I<$HOME> and I</etc> for files +supplied by the user or the local sysadmin (e.g. config files and +profiles). This default can be disabled (and re-enabled) by using +B<--no-user-dirs> (and B<--user-dirs>, respectively). + +These options will I<not> affect the inclusion of LINTIAN_BASE, which +is always included. + +These option can appear multiple times, in which case the last of them +to appear determines the result. + +Note that if the intention is only to disable the user's I<$HOME>, +then unsetting I<$HOME> and I<XDG_*_HOME> may suffice. Alternatively, +I</etc> can be "re-added" by using I<--include-dir> (caveat: +I</etc/lintianrc> will be ignored by this). + +If the intention is to avoid (unintentional) side-effects from the +calling user, then this option could be combined with +B<--ignore-lintian-env>. + +If for some reason B<--no-user-dirs> cannot be used, then consider +unsetting I<$HOME> and all the I<$XDG_*> variables (not just the +I<$XDG_*_HOME> ones). + +B<Note>: This option should be the very first if given. + +=back + +Developer/Special usage options: + +=over 4 + +=item B<--allow-root> + +Override lintian's warning when it is run with superuser privileges. + +=item B<--packages-from-file> X + +The line is read as the path to a file to process (all whitespace is +included!). + +If X is "-", Lintian will read the packages from STDIN. + +=item B<--perf-debug> + +Enable performance related debug logging to STDERR. + +The data logged and the format used is subject to change with every +release. + +Note that some of the information may also be available (possibly in +a different format) with the B<--debug> option. + +=back + +=head1 FILES + +Lintian looks for its configuration file in the following locations, +in this order: + +=over 4 + +=item * The argument given to B<--cfg> + +=item * I<$LINTIAN_CFG> + +=item * I<$XDG_CONFIG_HOME/lintian/lintianrc> + +=item * I<XDG_DIR/lintian/lintianrc> + +Where XDG_DIR is a directory listed in I<$XDG_CONFIG_DIRS> (or +I</etc/xdg> if I<$XDG_CONFIG_DIRS> is unset). + +=item * I<$HOME/.lintianrc> + +Please consider using the XDG based variant above (usually, in +I<~/.config>). + +=item * I</etc/lintianrc> + +=back + +Lintian uses the following directories: + +=over 4 + +=item I</tmp> + +Lintian defaults to creating a temporary lab directory in I</tmp>. To +change the directory used, set the TMPDIR environment variable to a +suitable directory. TMPDIR can be set in the configuration file. + +=item I</usr/share/lintian/checks> + +Scripts that check aspects of a package. + +=item I</usr/share/lintian/collection> + +Scripts that collect information about a package and store it for use +by the check scripts. + +=item I</usr/share/lintian/data> + +Supporting data used by Lintian checks and for output formatting. + +=item I</usr/share/lintian/lib> + +Utility scripts used by the other lintian scripts. + +=back + +For binary packages, Lintian looks for overrides in a file named +I<usr/share/lintian/overrides/E<lt>packageE<gt>> inside the binary +package, where I<E<lt>packageE<gt>> is the name of the binary +package. For source packages, Lintian looks for overrides in +I<debian/source/lintian-overrides> and then in +I<debian/source.lintian-overrides> if the first file is not found. +The first path is preferred. See the Lintian User's Manual for the +syntax of overrides. + +=head1 CONFIGURATION FILE + +The configuration file can be used to specify default values for some +options. The general format is: + + option = value + +All whitespace adjacent to the "=" sign as well as leading and +trailing whitespace is ignored. However whitespace within the +value is respected, as demonstrated by this example: + + # Parsed as "opt1" with value "val1" + opt1 = val1 + # Parsed as "opt2" with value "val2.1 val2.2 val2.3" + opt2 = val2.1 val2.2 val2.3 + +Unless otherwise specified, no option may appear more than once. +Lintian will ignore empty lines or lines starting with the +B<#>-character. + +Generally options will be the long form of the command-line option +without the leading dashes. There some exceptions (such as +--profile), where Lintian uses the same name as the environment +variable. + +Lintian only allows a subset of the options specified in the +configuration file; please refer to the individual options in +L</OPTIONS>. + +In the configuration file, all options listed must have a value, even +if they do not accept a value on command line (e.g. --pedantic). The +values "yes", "y", "1", or "true" will enable such an option and "no", +"n", "0" or "false" will disable it. Prior to the 2.5.2 release, +these values were case sensitive. + +For other options, they generally take the same values as they do on +the command line. Though some options allow a slightly different +format (e.g. --display-level). These exceptions are explained for the +relevant options in L</OPTIONS>. + +Beyond command line options, it is also allowed to specify the +environment variable "TMPDIR" in the configuration file. + +A sample configuration file could look like: + + # Sample configuration file for lintian + # + # Set the default profile (--profile) + LINTIAN_PROFILE = debian + + # Set the default TMPDIR for lintian to /var/tmp/lintian + # - useful if /tmp is tmpfs with "limited" size. + TMPDIR = /var/tmp/lintian/ + + # Show info (I:) tags by default (--display-info) + # NB: this cannot be used with display-level + display-info=yes + + # Ignore all overrides (--no-override) + # NB: called "override" in the config file + # and has inverted value! + override = no + + # Automatically determine if color should be used + color = auto + +=head1 EXIT STATUS + +=over 4 + +=item B<0> + +Normal operation. + +=item B<1> + +Lintian run-time error. An error message is sent to stderr. + +=item B<2> + +Detected a condition specified via the B<--fail-on> option. This can +be used to trigger a non-zero exit value in case of policy violations. + +=back + +=head1 CHECKING LAST BUILD + +When run in an unpacked package dir (with no package selection +arguments), Lintian will use I<debian/changelog> to determine the +source and version of the package. Lintian will then attempt to find +a matching I<.changes> file for this source and version combination. + +Lintian will (in order) search the following directories: + +=over 4 + +=item .. + +Used by dpkg-buildpackage(1). + +=item ../build-area + +Used by svn-buildpackage(1). + +=item /var/cache/pbuilder/result + +Used by pbuilder(1) and cowbuilder(1). + +=back + +In each directory, Lintian will attempt to find a I<.changes> file +using the following values as architecture (in order): + +=over 4 + +=item I<$DEB_BUILD_ARCH> (or I<dpkg --print-architecture>) + +The environment variable DEB_BUILD_ARCH (if not set, "dpkg +--print-architecture" will be used instead) + +=item I<$DEB_HOST_ARCH> + +The environment variable DEB_HOST_ARCH. + +=item I<dpkg --print-foreign-architectures> + +If dpkg(1) appears to support multi-arch, then any architecture listed +by "dpkg --print-foreign-architectures" will be used (in the order +returned by dpkg). + +=item I<multi> + +Pseudo architecture used by mergechanges(1). + +=item I<all> + +Used when building architecture indep packages only (e.g. +dpkg-buildpackage -A). + +=item I<source> + +Used for "source only" builds (e.g. dpkg-buildpackage -S). + +=back + +If a I<.changes> file matches any combination above exists, Lintian +will process the first match as if you had passed it per command line. +If no I<.changes> file can be found, Lintian will print a list of attempted +locations on STDERR and exit 0. + +=head1 EXAMPLES + +=over 4 + +=item B<$ lintian foo.changes> + +Check the changes file itself and any (binary, udeb or source) package +listed in it. + +=item B<$ lintian foo.deb> + +Check binary package foo given by foo.deb. + +=item B<$ lintian foo.dsc> + +Check source package foo given by foo.dsc. + +=item B<$ lintian foo.dsc -L +info> + +Check source package foo given by foo.dsc, including info tags. + +=item B<$ lintian -i foo.changes> + +Check the changes file and, if listed, the source and binary package +of the upload. The output will contain detailed information about the +reported tags. + +=item B<$ lintian> + +Assuming I<debian/changelog> exists, look for a changes file for the +source in the parent dir. Otherwise, print usage information and +exit. + +=back + +=head1 BUGS + +Lintian does not have any locking mechanisms yet. (Running several +Lintian processes on the same laboratory simultaneously is likely to fail +or corrupt the laboratory.) + +If you discover any other bugs in lintian, please contact the authors. + +=head1 SEE ALSO + +L<lintian-explain-tags(1)>, Lintian User Manual +(/usr/share/doc/lintian/lintian.html) + +Packaging tools: L<debhelper(7)>, L<dh_make(1)>, +L<dpkg-buildpackage(1)>. + +=head1 AUTHORS + +Niels Thykier <niels@thykier.net> + +Richard Braakman <dark@xs4all.nl> + +Christian Schwarz <schwarz@monet.m.isar.de> + +Please use the email address <lintian-maint@debian.org> for +Lintian related comments. + +=cut diff --git a/man/spellintian.pod b/man/spellintian.pod new file mode 100644 index 0000000..cacb4c1 --- /dev/null +++ b/man/spellintian.pod @@ -0,0 +1,75 @@ +# Copyright (C) 2015 Niels Thykier +# +# This manual page is free software. It is distributed under the +# terms of the GNU General Public License as published by the Free +# Software Foundation; either version 2 of the License, or (at your +# option) any later version. +# +# This manual page is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this manual page; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 +# USA +# + +=head1 NAME + +spellintian - simple spellchecker based on Lintian's data files + +=head1 SYNOPSIS + +B<spellintian> [B<--picky>] [I<text-file>...] + + +=head1 DESCRIPTION + +The B<spellintian> command parses one or more text files for spelling +mistakes. It uses the same spellcheck algorithm and data set as +B<lintian>. + +If no file is specified on the command line, this command expects +its input on stdin. + + +=head1 OPTIONS + +=over 4 + +=item B<--picky> + +Also use the "picky" data set on top of the regular spelling data set. +The "picky" data set also includes a lot of capitalization related +rules (like spelling "Debian" with an uppercase "D"). + +Note however that these checks can have false positives. As an +example, consider the following those uses of Python "the python +binary" (e.g. /usr/bin/python) and "the Python language". The +B<--picky> option will unconditionally flag the use of "python" in the +first case as bad despite being correct. + +=item B<-h>, B<--help> + +Display usage information and exit. + +=item B<--version> + +Print a version banner and exit. + +=back + +=head1 SEE ALSO + +L<lintian(1)> + +=head1 AUTHORS + +Niels Thykier <niels@thykier.net> (wrote the manpage) + +Jakub Wilk <jwilk@jwilk.net> (wrote the program) + +=cut + diff --git a/private/TODO b/private/TODO new file mode 100644 index 0000000..cb67a78 --- /dev/null +++ b/private/TODO @@ -0,0 +1,99 @@ +This is a collection of work to do in Lintian that isn't a bug fix or a +simple requested new check. Use the BTS for those since they're more +public and so that other people know things have already been requested. +This is intended for more internal use to track code restructurings, +infrastructure work, needed cleanups, or larger tasks. + +Tasks here are sorted roughly by the directory structure of Lintian where +that makes sense so that we don't just have one long list. Patches for +any of this is welcome, but please discuss on the mailing list first +before you do lots of work since the maintainers may have specific ways +they want it to be done. + +If someone is actively working on something, note their name in square +brackets at the beginning. If someone is noted, coordinate with them +before working on this. + +checks: + +- Move all static keyword lists into files in data. + +- Separate doc-base checks out of checks/menus (or, probably easier, + rename checks/menus to checks/doc-base and separate out the few bits + that are actually about menus). + +- Go through all tags and make sure that any that should have Policy + references have them, and more generally that appropriate references are + present. (Need some way to track this sort of regular tag maintenance.) + +- Check current tag severities against the results from lintian.d.o and + adjust. + +doc: + +- Either update doc/CREDITS based on the changelog file or archive it + somewhere and say that it's not going to be updated. + +- Update the Lintian manual: + + document visibility + + document other output formats + + document the reporting framework + + developer documentation of the test suite, submitting patches, etc. + +frontend: + +- Nearly everything in frontend/lintian that isn't command-line parsing is + really begging to be a module. Move code out of here and into modules + as part of rewriting the non-namespace modules in lib, such as Lab.pm + which should acquire more the laboratory handling from frontend/lintian, + and Checker.pm, which should acquire most of the smarts of the main + frontend/lintian checking loop. + +lib: + +- Finish documentation of Lintian::Output*. + +- Add collect function to return the sort of symlink information that's + currently gathered by checks/menus; we'll find other uses for it. + +- Provide a utility function to check a command as currently done in + checks/menu-format, after which we could split desktop checking and menu + checking into two separate check scripts. + +private: + +- Provide a general framework for updating metadata about the archive and + modify all of the private/refresh-* scripts to use it. Also set up + something in debian/rules that will run all of them and update data + accordingly which can be done routinely before every release. + +reporting: + +- Replace the template framework with template-toolkit. + +t: + +- Write new-style test cases for everything tested by the legacy test suite + and retire the "legacy" tests. + +- Go through t/tests/legacy-libbaz/debian/debian/rules and make sure + all TODO's are lintian-detected. + +- udebs are generally undertested right now and could use some general + tests, particularly for things that we don't care about with udebs but + do care about with regular packages. + +General: + +- Write a real parser for shell scripts that can at least tokenize them + half-way decently, do some basic analysis of whether code is conditional + or not, and provide reasonable answers to questions like "is this + command called in the script" without heinous regex matches. Replace + all the ugly, ad hoc script parsing code elsewhere in Lintian with that + parser. This is #629247. + +External: + +- Set up system for automatically filing bugs based on specific lintian + tags (the most reliable ones), with usertags to ensure the bugs aren't + repeatedly filed. diff --git a/private/auto-reject-diff b/private/auto-reject-diff new file mode 100755 index 0000000..bb87fec --- /dev/null +++ b/private/auto-reject-diff @@ -0,0 +1,166 @@ +#!/usr/bin/perl +# +# Copyright (C) 2021 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +use v5.20; +use warnings; +use utf8; + +use Cwd qw(realpath); +use File::Basename qw(dirname); + +# neither Path::This nor lib::relative are in Debian +use constant THISFILE => realpath __FILE__; +use constant THISDIR => dirname realpath __FILE__; + +# use Lintian modules that belong to this program +use lib THISDIR . '/../lib'; + +use Const::Fast; +use List::Compare; +use List::Util qw(uniq); +use Unicode::UTF8 qw(encode_utf8); + +use Lintian::Archive; +use Lintian::Profile; + +const my $SPACE => q{ }; +const my $INDENT => $SPACE x 4; +const my $HYPHEN => q{-}; + +$ENV{LINTIAN_BASE} = realpath(THISDIR . '/..') + // die encode_utf8('Cannot resolve LINTIAN_BASE'); + +refresh_auto_reject_data(); + +# reload +my $profile = Lintian::Profile->new; +$profile->load; + +my $data = $profile->data; + +my @want_certain = @{$data->auto_rejection->certain}; +my @want_preventable = @{$data->auto_rejection->preventable}; + +# find all tags known to Lintian +my @known_tags = $profile->known_tags; +my %new_name; + +for my $tag_name (@known_tags) { + + my $tag = $profile->get_tag($tag_name); + + my @renamed_from = @{$tag->renamed_from}; + + my @taken = grep { exists $new_name{$_} } @renamed_from; + + say encode_utf8( +"Warning: Ignoring $_ as an alias for $new_name{$_} in favor of $tag_name." + )for @taken; + + $new_name{$_} = $tag_name for @renamed_from; +} + +my $old_certain_lc= List::Compare->new(\@want_certain, [keys %new_name]); +my $old_preventable_lc + = List::Compare->new(\@want_preventable, [keys %new_name]); + +my @old_certain_names = $old_certain_lc->get_intersection; +my @old_preventable_names = $old_preventable_lc->get_intersection; + +say encode_utf8('FTP Master uses those old tag names for auto-rejection:') + if @old_certain_names || @old_preventable_names; +say encode_utf8($INDENT . "- [certain] $_ => $new_name{$_}") + for @old_certain_names; +say encode_utf8($INDENT . "- [preventable] $_ => $new_name{$_}") + for @old_preventable_names; + +my $new_certain_lc + = List::Compare->new(\@want_certain, + [map { $new_name{$_} } @old_certain_names]); +my $new_preventable_lc + = List::Compare->new(\@want_preventable, + [map { $new_name{$_} } @old_preventable_names]); + +my @aware_certain_names = $new_certain_lc->get_intersection; +my @aware_preventable_names = $new_preventable_lc->get_intersection; + +say encode_utf8('They already know about those tags:') + if @aware_certain_names || @aware_preventable_names; +say encode_utf8($INDENT . "- [certain] $_") for @aware_certain_names; +say encode_utf8($INDENT . "- [preventable] $_") for @aware_preventable_names; + +my @unaware_certain_names = $new_certain_lc->get_Ronly; +my @unaware_preventable_names = $new_preventable_lc->get_Ronly; + +say encode_utf8('The following tags have to be added:') + if @unaware_certain_names || @unaware_preventable_names; +say encode_utf8($INDENT . "- [certain] $_") for @unaware_certain_names; +say encode_utf8($INDENT . "- [preventable] $_") for @unaware_preventable_names; + +# replace old names +@want_certain = uniq map { $new_name{$_} // $_ } @want_certain; +@want_preventable = uniq map { $new_name{$_} // $_ } @want_preventable; + +my $certain_lc = List::Compare->new(\@want_certain, \@known_tags); +my @unknown_certain = $certain_lc->get_Lonly; +my @certain = $certain_lc->get_intersection; + +my $preventable_lc = List::Compare->new(\@want_preventable, \@known_tags); +my @unknown_preventable = $preventable_lc->get_Lonly; +my @preventable = $preventable_lc->get_intersection; +my @unknown = (@unknown_certain, @unknown_preventable); + +say encode_utf8( + 'Warning, disregarding unknown tags for FTP Master Auto-Rejects:') + if @unknown; +say encode_utf8($INDENT . $HYPHEN . $SPACE . $_) for @unknown; + +say encode_utf8('Found ' + . scalar @certain + . ' certain and ' + . scalar @preventable + . ' preventable tags for FTP Master Auto-Rejects.'); + +exit 0; + +sub refresh_auto_reject_data { + + my $refresh_profile = Lintian::Profile->new; + $refresh_profile->load; + + my $refresh_data = $refresh_profile->data; + + my $archive = Lintian::Archive->new; + my $basedir = "$ENV{LINTIAN_BASE}/data"; + + # refresh data + $refresh_data->auto_rejection->refresh($archive, $basedir); + + undef $refresh_profile; + undef $refresh_data; + + return; +} + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/private/gen-po4a-conf b/private/gen-po4a-conf new file mode 100755 index 0000000..6d534f4 --- /dev/null +++ b/private/gen-po4a-conf @@ -0,0 +1,10 @@ +#!/bin/sh + +CFG="$1" +cp -f "$CFG".in "$CFG" +# Map a CHECK (e.g. python/depends or fields) to +# [type: lintian] checks/CHECK.desc \$lang:l10n/checks/CHECK_\$lang.desc +# +# sort is not strictly necessary, but it makes it easier to review. +find checks/ -name '*.desc' | LC_ALL=C.UTF-8 sort | \ + perl -ne 'chomp; $file = $_; s{^checks/(.+)\.desc$}{$1}; print "[type: lintian] $file \$lang:l10n/checks/${_}_\$lang.desc\n";' >> "$CFG"; diff --git a/private/generate-html-docs b/private/generate-html-docs new file mode 100755 index 0000000..5fed4b7 --- /dev/null +++ b/private/generate-html-docs @@ -0,0 +1,115 @@ +#!/usr/bin/perl + +use v5.20; +use warnings; +use utf8; + +use Const::Fast; +use IPC::Run3; +use Pod::Simple::HTMLBatch; +use Unicode::UTF8 qw(encode_utf8); + +const my $EMPTY => q{}; + +my $destination = pop @ARGV; +my @input = @ARGV; + +push @input, './lib', './doc/tutorial' unless @input; +$destination //= './doc/api.html'; +my $lintian_version = guess_version(); + +if (!-d $destination) { + mkdir $destination + or die encode_utf8("could not create directory: $!"); +} + +my $convert = Pod::Simple::HTMLBatch->new; +$convert->html_render_class('My::Pod::Simple::XHTML'); +$convert->contents_page_start(header()); +# No footer - it contains a "current time" and is thus unreproducible +$convert->contents_page_end(q{}); +$convert->css_flurry(0); +$convert->batch_convert(\@input, $destination); + +print encode_utf8("HTML version available at $destination/index.html\n"); + +sub header { + + return <<"EOF"; +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" + "http://www.w3.org/TR/html4/loose.dtd"> +<html> +<head> + <title>Lintian (v$lintian_version) API doc + + + +

Lintian (v$lintian_version) API doc

+

Note: This API is not stable between releases.

+EOF +} + +sub guess_version { + my $version; + my $dist; + + my @dpkg_command = qw{dpkg-parsechangelog -c0}; + my $output; + + run3(\@dpkg_command, \undef, \$output); + my @lines = split(/\n/, $output); + + while (defined(my $line = shift @lines)) { + $version = $1 if $line =~ m{\A Version: \s*+ (\S++) \s* \Z}xsm; + $dist = $1 if $line =~ m{\A Distribution: \s*+ (\S++) \s* \Z}xsm; + } + + if ((not defined($dist) or $dist eq 'UNRELEASED') and -d '.git') { + + delete $ENV{'GITDIR'}; + + # For unreleased versions, git describe is probably a better + # choice when available. + my @command = qw(git describe); + my $guess; + run3(\@command, \undef, \$guess); + + chomp $guess; + $version = $guess + if $guess ne $EMPTY && $guess =~ m{\A \d+\. }xsm; + + # Ignore git being missing (or even failing to work) + # - the version being incorrect for non-release cases is + # not a major issue. + } + return $version; +} + +package My::Pod::Simple::XHTML; + +use strict; +use warnings; +use parent qw(Pod::Simple::XHTML); + +# Skip the version tag (incl. a date) to get reproducible output +sub version_tag_comment { + return q{}; +} + +sub batch_mode_page_object_init { + my ($self) = @_; + + $self->html_doctype( +'' + ); + + $self->html_charset('UTF-8'); + + return; +} + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/private/generate-tag-summary b/private/generate-tag-summary new file mode 100755 index 0000000..2f4a255 --- /dev/null +++ b/private/generate-tag-summary @@ -0,0 +1,151 @@ +#!/usr/bin/perl + +# Copyright (C) 2017, 2019 Chris Lamb + +use v5.20; +use warnings; +use utf8; + +use Cwd qw(realpath); +use File::Basename qw(dirname); +use Unicode::UTF8 qw(decode_utf8 encode_utf8); + +# neither Path::This nor lib::relative are in Debian +use constant THISFILE => realpath __FILE__; +use constant THISDIR => dirname realpath __FILE__; + +# use Lintian modules that belong to this program +use lib THISDIR . '/../lib'; + +use Const::Fast; +use Getopt::Long; +use IPC::Run3; + +use Lintian::IPC::Run3 qw(safe_qx); + +const my $PLUS => q{+}; +const my $WAIT_STATUS_SHIFT => 8; + +my (%added, %removed, %opt); + +my %opthash = ('in-place|i' => \$opt{'in-place'},); + +# init commandline parser +Getopt::Long::config('bundling', 'no_getopt_compat', 'no_auto_abbrev', + 'permute'); + +# process commandline options +Getopt::Long::GetOptions(%opthash) + or die encode_utf8("error parsing options\n"); + +my ($commit_range) = @ARGV; +if (not $commit_range) { + my $bytes = safe_qx(qw(git describe --abbrev=0)); + my $status = $? >> $WAIT_STATUS_SHIFT; + + die encode_utf8("git describe failed with code $status\n") + if $status; + + my $describe = $bytes; + chomp($describe); + + if (not $describe) { + die encode_utf8("git describe did not return anything.\n"); + } + $commit_range = "${describe}..HEAD"; + print encode_utf8("Assuming commit range to be: ${commit_range}\n"); +} + +my $output; +my @command =(qw{git diff}, $commit_range, qw{-- tags/*/*.tag}); +run3(\@command, \undef, \$output); + +my @lines = split(/\n/, $output); +while (defined(my $line = shift @lines)) { + + next + unless $line =~ m{ \A ([\+-]) Tag: \s*+ ([^ ]++) \s*+ \Z}xsm; + + my ($change, $tag) = ($1, $2); + if ($change eq $PLUS) { + $added{$tag} = 1; + } else { + $removed{$tag} = 1; + } +} + +for my $tag (keys(%added)) { + if (exists($removed{$tag})) { + # Added and removed? More likely, the tag was moved between + # two files. + delete($added{$tag}); + delete($removed{$tag}); + } +} + +if (not %added and not %removed) { + print {*STDERR} encode_utf8("No tags were added or removed\n"); +} + +if ($opt{'in-place'}) { + my $matched = 0; + + my $infile = 'debian/changelog'; + open(my $in_fd, '<:encoding(UTF-8)', $infile) + or die encode_utf8("Cannot open $infile"); + + my $outfile = 'debian/changelog.tmp'; + open(my $out_fd, '>:encoding(UTF-8)', $outfile) + or die encode_utf8("Cannot open $outfile"); + + while (my $line = <$in_fd>) { + chomp $line; + if ($line =~ m/^ \* WIP\b/) { + emit_tag_summary($out_fd); + $matched++; + } else { + print {$out_fd} encode_utf8($line . "\n"); + } + } + close($out_fd); + close($in_fd); + if ($matched != 1) { + die encode_utf8( + "changelog did not match WIP placeholder exactly once\n"); + } + + rename($outfile, $infile) + or die encode_utf8("Cannot rename $outfile to $infile"); + + print encode_utf8("Updated $infile\n"); + +} else { + emit_tag_summary(\*STDOUT); +} + +sub emit_tag_summary { + my ($fd) = @_; + + if (%added or %removed) { + print {$fd} encode_utf8(" * Summary of tag changes:\n"); + } + if (%added) { + print {$fd} encode_utf8(" + Added:\n"); + for my $tag (sort(keys(%added))) { + print {$fd} encode_utf8(" - $tag\n"); + } + } + if (%removed) { + print {$fd} encode_utf8(" + Removed:\n"); + for my $tag (sort(keys(%removed))) { + print {$fd} encode_utf8(" - $tag\n"); + } + } + return; +} + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/private/hintadjust b/private/hintadjust new file mode 100755 index 0000000..66ce589 --- /dev/null +++ b/private/hintadjust @@ -0,0 +1,163 @@ +#!/usr/bin/perl + +# Copyright (C) 2019 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +# The harness for Lintian's test suite. For detailed information on +# the test suite layout and naming conventions, see t/tests/README. +# For more information about running tests, see +# doc/tutorial/Lintian/Tutorial/TestSuite.pod +# + +use v5.20; +use warnings; +use utf8; + +use Const::Fast; +use Cwd qw(realpath); +use File::Basename qw(dirname); + +# neither Path::This nor lib::relative are in Debian +use constant THISFILE => realpath __FILE__; +use constant THISDIR => dirname realpath __FILE__; + +# use Lintian modules that belong to this program +use lib THISDIR . '/../lib'; + +use Getopt::Long; +use IO::Interactive qw(is_interactive); +use IO::Prompt::Tiny qw(prompt); +use List::Util qw(all); +use Path::Tiny; +use Term::ANSIColor; +use Unicode::UTF8 qw(encode_utf8 decode_utf8); + +use Test::Lintian::Output::Universal qw(parse_line order); + +const my $EMPTY => q{}; +const my $NEWLINE => qq{\n}; +const my $PLUS => q{+}; + +# options +my $interactive; + +Getopt::Long::Configure; +unless ( + Getopt::Long::GetOptions( + 'i|interactive' => \$interactive, + 'help|h' => sub {usage(); exit;}, + ) +) { + usage(); + die; +} + +# check arguments and options +die encode_utf8("Please use -h for usage information.\n") + if scalar @ARGV != 2; + +# get arguments +my ($diffpath, $hintspath) = @ARGV; + +my @difflines = path($diffpath)->lines_utf8; +chomp @difflines; + +my @hintslines = path($hintspath)->lines_utf8; +chomp @hintslines; + +my $changed; + +foreach my $line (@difflines) { + my ($sign, $stripped) = $line =~ qr/^([+-])(.*)$/; + + die encode_utf8("$diffpath is not a hintdiff file") + unless length $sign && defined $stripped; + + if ($interactive) { + + my $command; + my $color; + + if ($sign eq $PLUS) { + $command = 'Add'; + $color = 'bold bright_white on_green'; + } else { + $command = 'Remove'; + $color = 'bold bright_white on_red'; + } + + my $colored = $stripped; + $colored = colored($stripped, $color) + if is_interactive; + + my $decision_bytes + = prompt(encode_utf8("$colored - $command (y/n/q)?")); + my $decision = decode_utf8($decision_bytes); + + exit + if $decision eq 'q' || $decision eq $EMPTY; + + next + unless $decision eq 'y'; + } + + if ($sign eq $PLUS) { + # say encode_utf8("Adding: $stripped"); + push(@hintslines, $stripped); + } else { + # say encode_utf8("Removing: $stripped"); + # remove the first match only + my $found = 0; + @hintslines = grep {$_ ne $stripped || $found++} @hintslines; + } + + $changed = 1; +} + +exit unless $changed; + +# also sort output into preferred order +my $joined = $EMPTY; +$joined .= $_ . $NEWLINE + for reverse sort { order($a) cmp order($b) } @hintslines; +path($hintspath)->spew_utf8($joined); + +exit; + +sub usage { + my $message =<<"END"; +Usage: $0 -i + + --interactive, -i Apply interactively + + Applies to so that the new file represents the + changes. Please use hintdiff to create the file with the changes. + + The hints are then sorted in the order preferred for universal hints. +END + + print encode_utf8($message); + + return; +} + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/private/hintdiff b/private/hintdiff new file mode 100755 index 0000000..dc05422 --- /dev/null +++ b/private/hintdiff @@ -0,0 +1,132 @@ +#!/usr/bin/perl + +# Copyright (C) 2019 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +# The harness for Lintian's test suite. For detailed information on +# the test suite layout and naming conventions, see t/tests/README. +# For more information about running tests, see +# doc/tutorial/Lintian/Tutorial/TestSuite.pod +# + +use v5.20; +use warnings; +use utf8; + +use Const::Fast; +use Cwd qw(realpath); +use File::Basename qw(dirname); + +# neither Path::This nor lib::relative are in Debian +use constant THISFILE => realpath __FILE__; +use constant THISDIR => dirname realpath __FILE__; + +# use Lintian modules that belong to this program +use lib THISDIR . '/../lib'; + +use Getopt::Long; +use IO::Interactive qw(is_interactive); +use List::Util qw(all); +use Path::Tiny; +use Term::ANSIColor qw(:constants); +use Text::Diff; +use Unicode::UTF8 qw(encode_utf8); + +use Test::Lintian::Output::Universal qw(order); + +const my $EMPTY => q{}; +const my $NEWLINE => qq{\n}; + +no warnings 'redefine'; + +sub Text::Diff::Unified::file_header { return $EMPTY; } +sub Text::Diff::Unified::hunk_header { return $EMPTY; } + +# options +Getopt::Long::Configure; +unless ( + Getopt::Long::GetOptions( + 'help|h' => sub {usage(); exit;}, + ) +) { + usage(); + die; +} + +# check arguments and options +die encode_utf8("Please use -h for usage information.\n") + if scalar @ARGV != 2; + +# get arguments +my ($expectedpath, $actualpath) = @ARGV; + +my @expected + = reverse sort { order($a) cmp order($b) } (path($expectedpath)->lines_utf8); +my @actual + = reverse sort { order($a) cmp order($b) }(path($actualpath)->lines_utf8); + +my $diff = diff(\@expected, \@actual, { CONTEXT => 0 }); + +my @lines = split(/$NEWLINE/, $diff); +chomp @lines; + +# sort before applying color +@lines = reverse sort @lines; + +# apply color when on a terminal +if (is_interactive) { + + my $green = GREEN; + my $red = RED; + my $reset = RESET; + + s/^(\+.*)$/$green$1$reset/ for @lines; + s/^(\-.*)$/$red$1$reset/ for @lines; +} + +print encode_utf8($_ . $NEWLINE) for @lines; + +exit; + +sub usage { + my $message =<<"END"; +Usage: $0 + + Print differences between the hint information in the two files. The files + must in a CSV format delimited by '|'. The easiest way to obtain such a + file is to use hintextract. + + The output is sorted lexigraphically in reverse order. If the arguments + are reversed, the new output can also be generated from the old one by + reversing the signs and sorting again in reverse order (under LC_ALL=C). + It only works with uncolored output. + + Returns with a zero exit code under normal conditions, even when the hints + do not match. +END + + print encode_utf8($message); + + return; +} + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/private/hintextract b/private/hintextract new file mode 100755 index 0000000..dae8518 --- /dev/null +++ b/private/hintextract @@ -0,0 +1,119 @@ +#!/usr/bin/perl + +# Copyright (C) 2019 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +# The harness for Lintian's test suite. For detailed information on +# the test suite layout and naming conventions, see t/tests/README. +# For more information about running tests, see +# doc/tutorial/Lintian/Tutorial/TestSuite.pod +# + +use v5.20; +use warnings; +use utf8; + +use Cwd qw(realpath); +use File::Basename qw(dirname); + +# neither Path::This nor lib::relative are in Debian +use constant THISFILE => realpath __FILE__; +use constant THISDIR => dirname realpath __FILE__; + +# use Lintian modules that belong to this program +use lib THISDIR . '/../lib'; + +use Getopt::Long; +use List::Util qw(all); +use Path::Tiny; +use Unicode::UTF8 qw(encode_utf8); + +use Test::Lintian::Output::EWI; + +# options +my $target_format; + +Getopt::Long::Configure; +unless ( + Getopt::Long::GetOptions( + 'f|format=s' => \$target_format, + 'help|h' => sub {usage(); exit;}, + ) +) { + usage(); + die; +} + +# check arguments and options +die encode_utf8("Please use -h for usage information.\n") + if scalar @ARGV < 1 || scalar @ARGV > 2; + +# get arguments +my ($inpath, $outpath) = @ARGV; + +die encode_utf8("File $inpath does not exist.\n") + unless -e $inpath; + +my $original_text = path($inpath)->slurp_utf8; +my $converted = to_universal($target_format, $original_text); + +if (defined $outpath) { + path($outpath)->spew_utf8($converted); +}else { + print encode_utf8($converted); +} + +exit; + +sub to_universal { + my ($format, $text) = @_; + + if ($format eq 'EWI') { + return Test::Lintian::Output::EWI::to_universal($text); + } + + die encode_utf8("Unknown format: $format\n"); +} + +sub usage { + my $message =<<"END"; +Usage: $0 -f + + --format, -f Format of Lintian output file + + Extracts hint information from a variety of Lintian output formats. The + output format is a simplified EWI format without letter code. Other + notable differences are that the binary package type is always displayed. + + The hints are sorted in a reverse order, but with the package type pulled + to the front. That way package types are grouped. Source packages are at + the top. + + Prints to stdout when no is given. +END + + print encode_utf8($message); + + return; +} + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/private/hintsort b/private/hintsort new file mode 100755 index 0000000..4392cc8 --- /dev/null +++ b/private/hintsort @@ -0,0 +1,96 @@ +#!/usr/bin/perl + +# Copyright (C) 2019 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +# The harness for Lintian's test suite. For detailed information on +# the test suite layout and naming conventions, see t/tests/README. +# For more information about running tests, see +# doc/tutorial/Lintian/Tutorial/TestSuite.pod +# + +use v5.20; +use warnings; +use utf8; + +use Const::Fast; +use Cwd qw(realpath); +use File::Basename qw(dirname); + +# neither Path::This nor lib::relative are in Debian +use constant THISFILE => realpath __FILE__; +use constant THISDIR => dirname realpath __FILE__; + +# use Lintian modules that belong to this program +use lib THISDIR . '/../lib'; + +use Getopt::Long; +use List::Util qw(all); +use Path::Tiny; +use Term::ANSIColor; +use Unicode::UTF8 qw(encode_utf8); + +use Test::Lintian::Output::Universal qw(parse_line order); + +const my $EMPTY => q{}; +const my $NEWLINE => qq{\n}; + +Getopt::Long::Configure; +unless ( + Getopt::Long::GetOptions( + 'help|h' => sub {usage(); exit;}, + ) +) { + usage(); + die; +} + +# check arguments and options +die encode_utf8("Please use -h for usage information.\n") + if scalar @ARGV != 1; + +# get arguments +my ($hintspath) = @ARGV; + +my @hintslines = path($hintspath)->lines_utf8; +chomp @hintslines; + +my $joined = $EMPTY; +$joined .= $_ . $NEWLINE + for reverse sort { order($a) cmp order($b) } @hintslines; + +path($hintspath)->spew_utf8($joined); + +exit; + +sub usage { + my $message =<<"END"; +Usage: $0 + Sorts hintfile in the order preferred for universal hints. +END + + print encode_utf8($message); + + return; +} + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/private/latest-policy-version b/private/latest-policy-version new file mode 100755 index 0000000..8143a45 --- /dev/null +++ b/private/latest-policy-version @@ -0,0 +1,63 @@ +#!/usr/bin/perl + +# Copyright (C) 2020 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +# The package libconfig-model-dpkg-perl is the only known and intended +# user of this script. It was written in an attempt to further the +# resolution of Bug#968011 and Bug#968000 an will go away soon. + +# PLEASE DO NOT USE THIS SCRIPT. YOU ARE USING AN UNSUPPORTED FEATURE. + +use v5.20; +use warnings; +use utf8; + +use Cwd qw(realpath); +use File::Basename qw(dirname); +use Unicode::UTF8 qw(encode_utf8); + +# neither Path::This nor lib::relative are in Debian +use constant THISFILE => realpath __FILE__; +use constant THISDIR => dirname realpath __FILE__; + +# use Lintian modules that belong to this program +use lib THISDIR . '/../lib'; + +use Lintian::Profile; + +$ENV{LINTIAN_BASE} = realpath(THISDIR . '/..'); + +my $profile = Lintian::Profile->new; +$profile->load; + +my $releases = $profile->data->policy_releases; + +my $version = $releases->latest_version; +die encode_utf8('Could not get latest policy version.') + unless defined $version; + +say encode_utf8($version); + +exit; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/private/refresh-data b/private/refresh-data new file mode 100755 index 0000000..f9f95df --- /dev/null +++ b/private/refresh-data @@ -0,0 +1,130 @@ +#!/usr/bin/perl +# +# Copyright (C) 2008 by Raphael Geissert +# Copyright (C) 2017-2018 Chris Lamb +# Copyright (C) 2021 Felix Lechner +# +# This program is free software. It is distributed under the terms of +# the GNU General Public License as published by the Free Software +# Foundation; either version 2 of the License, or (at your option) any +# later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +use v5.20; +use warnings; +use utf8; + +use Cwd qw(realpath); +use File::Basename qw(dirname); + +# neither Path::This nor lib::relative are in Debian +use constant THISFILE => realpath __FILE__; +use constant THISDIR => dirname realpath __FILE__; + +# use Lintian modules that belong to this program +use lib THISDIR . '/../lib'; + +use Const::Fast; +use MCE::Loop; +use List::SomeUtils qw(true); +use Syntax::Keyword::Try; +use Unicode::UTF8 qw(encode_utf8); + +use Lintian::Archive; +use Lintian::Profile; + +const my $EMPTY => q{}; + +const my $REFRESH_SUCCESSFUL => 1; +const my $REFRESH_INCAPABLE => 0; +const my $REFRESH_FAILED => -1; + +$ENV{LINTIAN_BASE} = realpath(THISDIR . '/..') + // die encode_utf8('Cannot resolve LINTIAN_BASE'); + +my $basedir = "$ENV{LINTIAN_BASE}/data"; + +die encode_utf8("Basedir does not exist at $basedir\n") + unless -e $basedir; + +my $profile = Lintian::Profile->new; +$profile->load; + +my @data_sources = $profile->data->all_sources; + +my @selected; + +if (@ARGV) { + my $pattern = $ARGV[0]; + @selected = grep { $_->title =~ m{\Q$pattern\E}i } @data_sources; + +} else { + @selected = @data_sources; +} + +my $total = scalar @selected; + +say "Refreshing $total data sources."; + +MCE::Loop->init( + max_workers => 'auto', + chunk_size => 1 +); + +my $archive = Lintian::Archive->new; + +my @results = mce_loop { + my ($mce, $chunk_ref, $chunk_id) = @_; + + my $data_source = $_; + + my $title = $data_source->title; + my $counter = sprintf('%*d/%d', length($total), $chunk_id, $total); + + if (!$data_source->can('refresh')) { + + $mce->say(encode_utf8("[$counter] $title not implemented.")); + $mce->gather($REFRESH_INCAPABLE); + return; + } + + try { + $data_source->refresh($archive, $basedir); + + } catch { + $mce->say(encode_utf8("[$counter] $title had error: $@")); + $mce->gather($REFRESH_FAILED); + return; + } + + $mce->gather($REFRESH_SUCCESSFUL); + $mce->say(encode_utf8("[$counter] $title")); + +} +@selected; + +my $errors = true { $_ == $REFRESH_FAILED } @results; + +if ($errors) { + say $EMPTY; + warn encode_utf8( + "WARNING: $errors data source(s) failed to refresh (out of $total)."); +} + +exit; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/private/refresh-hwcap b/private/refresh-hwcap new file mode 100755 index 0000000..62668bc --- /dev/null +++ b/private/refresh-hwcap @@ -0,0 +1,92 @@ +#!/usr/bin/perl + +use v5.20; +use warnings; +use utf8; + +use IPC::Run3; +use POSIX qw(strftime); +use Unicode::UTF8 qw(encode_utf8); + +my $datadir = shift; +my $man = shift // '/usr/share/man/man8/ld.so.8.gz'; +my (%caps, @keeps); + +die encode_utf8("Usage: $0 path/to/lintian/data.\n") + unless $datadir; + +my @command = ('zcat', $man); +my $output; + +run3(\@command, \undef, \$output); +my @lines = split(/\n/, $output); + +while (defined(my $line = shift @lines)) { + next + unless $line =~ /^\.S[SH] HARDWARE CAPABILITIES/i; + last; +} + +while (defined(my $line = shift @lines)) { + next + unless $line =~ /^\.B/; + last; +} + +while (defined(my $line = shift @lines)) { + + last + if $line =~ /^\.S[SH] /; + next + if $line =~ /^\./; + + $caps{$_} = 1 for split(/,\s*/, $line); +} + +my $path = "$datadir/shared-libs/hwcap-dirs"; +my $date = strftime '%Y-%m-%d', gmtime; +open(my $orig, '<', $path) + or die encode_utf8("Cannot open $path"); + +while (my $line = <$orig>) { + chomp $line; + + next + unless $line =~ m/^#\s*Keep:\s*(.*\S)\s*$/; + + my $keep = $1; + push @keeps, $keep; + + foreach my $val (split /\s*,\s*/, $keep) { + $caps{$val} = 1; + } +} +close($orig); + +open(my $fp, '>', $path) + or die encode_utf8("Cannot open $path"); + +print {$fp} encode_utf8(<<"EOF"); +# List of all known hwcap. +# +# Last updated: $date +# Generated by $0 +# +# Lines to always be included: +EOF +foreach my $keep (@keeps) { + print {$fp} encode_utf8("# Keep: $keep\n"); +} + +print {$fp} encode_utf8("\n"); + +foreach (sort keys %caps) { + print {$fp} encode_utf8("$_\n"); +} +close($fp); + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/private/refresh-perl-provides b/private/refresh-perl-provides new file mode 100755 index 0000000..4d70eff --- /dev/null +++ b/private/refresh-perl-provides @@ -0,0 +1,222 @@ +#!/usr/bin/perl + +use v5.20; +use warnings; +use utf8; + +# Generate a list of packages that are provided by the Perl core packages +# and also packaged separately at a (hopefully) newer version. +# The list will have the package name and the upstream version of the +# corresponding module integrated in the currently installed Perl version. + +# Copyright (C) 2008 Niko Tyni +# +# This program is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by the Free +# Software Foundation; either version 2 of the License, or (at your option) +# any later version. +# +# This program is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +# more details. +# +# You should have received a copy of the GNU General Public License along with +# this program. If not, see . + +use Const::Fast; +use List::SomeUtils qw(none); +use Unicode::UTF8 qw(encode_utf8); + +# from /usr/share/doc/libapt-pkg-perl/examples/apt-cache +use AptPkg::Config '$_config'; +use AptPkg::System '$_system'; +use AptPkg::Cache; + +const my $EMPTY => q{}; +const my $LAST_ITEM => -1; + +(my $self = $0) =~ s{.*/}{}; + +# initialise the global config object with the default values and +# setup the $_system object +$_config->init; +$_system = $_config->system; + +# suppress cache building messages +$_config->{quiet} = 2; + +# set up the cache +my $cache = AptPkg::Cache->new; +# end from /usr/share/doc/libapt-pkg-perl/examples/apt-cache + +# special cases when libfoo-bar-perl => Foo::Bar doesn't work +my %module_name = ( + 'libio-compress-perl' => 'IO::Compress::Gzip', + 'libio-compress-zlib-perl' => 'IO::Compress::Gzip', +); + +# special cases for where the code gets the prefix wrong +my %manual_split + = ('libautodie-perl' => qr/\A (\d++\.) (\d{2}) (\d{2})? \Z/xsmo,); + +use Module::CoreList; +my $versioning = $_system->versioning; + +my $perl_version = $]; + +# Map 5.022002 into 5.22 +$perl_version =~ s/^(5)\.0*([1-9][0-9])\d+/$1.$2/; + +# we look at packages provided by these +my @core_packages = (qw(perl-base perl), "perl-modules-$perl_version"); + +# check we have a cache of Debian sid packages available +warn encode_utf8( + join(q{ }, + 'Warning: this list should only be updated on a system', + 'with an up to date APT cache of the Debian unstable distribution') + ) + if ( + none { + defined $_->{Origin} + && defined $_->{Archive} + && $_->{Origin} eq 'Debian' + && $_->{Archive} eq 'unstable'; + }@{$cache->files} + ); + +print encode_utf8(<<"EOF"); +# virtual packages provided by the Perl core packages that also have a +# separate binary package available +# +# the listed version is the one included in the Perl core +# +# regenerate by running +# debian/rules refresh-perl-provides +# in the lintian source tree +# +# last updated for PERL_VERSION=$] +EOF + +for my $pkg (@core_packages) { + my $cached_versions = $cache->{$pkg} + or + die encode_utf8("no such binary package found in the APT cache: $pkg"); + my $latest = bin_latest($cached_versions); + + for my $provides (@{$latest->{ProvidesList}}) { + my $name = $provides->{Name}; + # skip virtual-only packages + next if (!$cache->{$name}{VersionList}); + my $cpan_version = find_core_version($name); + + next if !$cpan_version; + + # the number of digits is a pain + # we use the current version in the Debian archive to determine + # how many we need + # the epoch is easier, we just copy it + + my ($epoch, $digits) = epoch_and_digits($name); + my $debian_version + = cpan_version_to_deb($name, $cpan_version, $epoch, $digits); + + next if !$debian_version; + + print encode_utf8("$name $debian_version\n"); + } +} + +# look up the CPAN version of a package in the core +sub find_core_version { + my $module = shift; + my $ret; + + return undef + if $module =~ /^perl(5|api)/; + + if (exists $module_name{$module}) { + $module = $module_name{$module}; + } else { + # mangle the package name into the module name + $module =~ s/^lib//; + $module =~ s/-perl$//; + $module =~ s/-/::/g; + } + + for (Module::CoreList->find_modules(qr/^\Q$module\E$/i, 0+$])) { + $ret = $Module::CoreList::version{0+$]}{$_}; + last; + } + + return $ret; +} + +sub cpan_version_to_deb { + my ($pkg, $cpan_version, $epoch, $digits) = @_; + $epoch ||= $EMPTY; + + # cpan_version + # digits + # result + # 1.15_02, 2 => 1.15.02 + # 1.15_02, 4 => 1.1502 + # 1.15_02, 0 => 1.15.02 + # + # 1.15_021, 2 => 1.15.021 + # 1.15_021, 4 => 1.1500.021 + # 1.15_021, 0 => 1.15.021 + # + # 1.15, 1 => 1.15 + # 1.15, 2 => 1.15 + # 1.15, 4 => 1.1500 + # 1.15, 0 => 1.15 + + # split 1.15_02 to (1, 15, 02) + my $regex = qr/^(\d+\.)(\d+)(?:_(\d+))?$/; + $regex = $manual_split{$pkg} if exists $manual_split{$pkg}; + my ($major, $prefix, $suffix) = ($cpan_version =~ $regex); + die encode_utf8("no match with $cpan_version?") if !$major; + + $suffix ||= $EMPTY; + if (length($suffix) + length($prefix) == $digits) { + $prefix .= $suffix; + $suffix = $EMPTY; + } + if (length($suffix) + length($prefix) < $digits) { + $prefix .= '0' while length($prefix) < $digits; + } + $suffix = ".$suffix" if $suffix ne $EMPTY; + return $epoch.$major.$prefix.$suffix; +} + +# Given a Debian binary package name, look up its latest version +# and return its epoch (including the colon) if available, and +# the number of digits in its decimal part +sub epoch_and_digits { + my $p = shift; + return (0, 0) if !exists $cache->{$p}; + return (0, 0) if !exists $cache->{$p}{VersionList}; # virtual package + my $latest = bin_latest($cache->{$p}); + my $v = $latest->{VerStr}; + $v =~ s/\+dfsg//; + my ($epoch, $major, $prefix, $suffix, $revision) + = ($v =~ /^(?:(\d+:))?((?:\d+\.))+(\d+)(?:_(\d+))?(-[^-]+)$/); + return ($epoch, length $prefix); +} + +sub bin_latest { + my $p = shift; + return (sort bin_byversion @{$p->{VersionList}})[$LAST_ITEM]; +} + +sub bin_byversion { + return $versioning->compare($a->{VerStr}, $b->{VerStr}); +} + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/private/refresh-virtual-packages-data b/private/refresh-virtual-packages-data new file mode 100755 index 0000000..d301373 --- /dev/null +++ b/private/refresh-virtual-packages-data @@ -0,0 +1,147 @@ +#!/bin/sh +# refresh-virtual-packages-data -- Refresh data about font packages in Debian + +# Copyright (C) 2008, 2009 Raphael Geissert +# Copyright (C) 2017 Chris Lamb +# +# This file is free software: you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 2 of the License, or +# (at your option) any later version. +# +# This file is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this file. If not, see . + +set -e + +# Ensure the sort order is stable. +LC_ALL=C; export LC_ALL + +if [ -z "$1" ]; then + printf "Usage: %s []\n" "$(basename "$0")" + cat < is specified, it should be the path to the Packages file +from the current unstable distribution. It will be used to find all +font files already packaged for Debian and update the list of known +font files and the packages that contain them. should +be the path to the root of the Lintian data directory to update. + +If the Packages file is not specified, the script will download the +following files from a mirror. The mirror can be specified with the +DEB_MIRROR environment variable. If it is not set, the default is +http://deb.debian.org/debian. + +* main/binary-i386/Packages.gz + +Any necessary special parameters for wget can be set via the +environment variable WGET_ARGS. The default arguments are -nv. + +To set additional virtual packages to be added to the list as Keep entries +list them in the VIRTUAL_PACKAGES environment variable. + +INFO + exit +fi + +readonly lintian_data="$(readlink -f "$1")" +if [ -n "$2" ] ; then + packages="$(readlink -f "$2")" +fi + +[ -d "$lintian_data" ] || { + printf "%s is not a directory, aborting" "$lintian_data" >&2 + exit 1 +} + +readonly workdir="$(mktemp -d)" + +cleanup () { + [ ! -d "$workdir" ] || rm -rf "$workdir" +}; trap cleanup EXIT + +mirror="${DEB_MIRROR:=http://deb.debian.org/debian}" +WGET_ARGS="${WGET_ARGS:=-nv}" +wget() { + echo wget "$mirror"/"$1" + /usr/bin/wget $WGET_ARGS -O "$workdir/$(basename "$1")" "$mirror"/"$1" +} +mkdir -p "$lintian_data/fields" + +cat > "$workdir/virtual-packages" <> "$workdir/virtual-packages" || true +} +[ -z "$VIRTUAL_PACKAGES" ] || { + printf "# Keep: %s\n" "$VIRTUAL_PACKAGES" >> "$workdir/virtual-packages" +} + +echo >> "$workdir/virtual-packages" + +if [ -z "$packages" ] ; then + wget dists/sid/main/binary-i386/Packages.gz + packages="$workdir/Packages.gz" +fi + +case "$packages" in + *.gz) + CAT=zcat + ;; + *) + CAT=cat + ;; +esac + +# We have to repeat all the Keep packages twice, since we filter out any +# virtual packages that are only used once in the archive. +{ $CAT "$packages" + sed -rn 's/^#\s*Keep:\s*/Provides: /;T;s/([^,:])\s+([^,])/\1, \2/g;p' \ + "$workdir/virtual-packages" + sed -rn 's/^#\s*Keep:\s*/Provides: /;T;s/([^,:])\s+([^,])/\1, \2/g;p' \ + "$workdir/virtual-packages" +} | + perl -w -E 'my (%seen, %pkgs); + while (<>) { + chomp; + if (m/^Package:\s*(.+)$/) { + $pkgs{$1} = 1; + next; + } + next unless (s/^Provides:\s*//); + for my $pkg (split /\s*,\s*/) { + $seen{$pkg}++; + } + } + for my $pkg (keys %seen) { + print "$pkg\n" + unless ($seen{$pkg} == 1 or exists($pkgs{$pkg})); + }' \ + | sort -u >> "$workdir/virtual-packages" + +mv "$workdir/virtual-packages" "$lintian_data/fields/" + + +# Local Variables: +# indent-tabs-mode: nil +# End: +# vim: syntax=sh sw=4 sts=4 sr et diff --git a/private/runtests b/private/runtests new file mode 100755 index 0000000..0b27fd7 --- /dev/null +++ b/private/runtests @@ -0,0 +1,972 @@ +#!/usr/bin/perl + +# Copyright (C) 1998 Richard Braakman +# Copyright (C) 2008 Frank Lichtenheld +# Copyright (C) 2008, 2009 Russ Allbery +# Copyright (C) 2014 Niels Thykier +# Copyright (C) 2020 Felix Lechner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +# The harness for Lintian's test suite. For detailed information on +# the test suite layout and naming conventions, see t/tests/README. +# For more information about running tests, see +# doc/tutorial/Lintian/Tutorial/TestSuite.pod +# + +use v5.20; +use warnings; +use utf8; + +use Const::Fast; +use Cwd qw(realpath); +use File::Basename qw(dirname); + +# neither Path::This nor lib::relative are in Debian +use constant THISFILE => realpath __FILE__; +use constant THISDIR => dirname realpath __FILE__; + +# use Lintian modules that belong to this program +use lib THISDIR . '/../lib'; + +use Capture::Tiny qw(capture_merged); +use Cwd qw(getcwd); +use File::Copy; +use File::Find::Rule; +use File::Path qw(make_path); +use File::Spec::Functions qw(abs2rel rel2abs splitpath splitdir); +use File::stat; +use Getopt::Long; +use IPC::Run3; +use List::Compare; +use List::SomeUtils qw(any uniq); +use List::Util qw(max); +use IO::Interactive qw(is_interactive); +use IO::Prompt::Tiny qw(prompt); +use MCE::Loop; +use Path::Tiny; +use Syntax::Keyword::Try; +use TAP::Formatter::Console; +use TAP::Formatter::File; +use TAP::Harness; +use TAP::Parser::Aggregator; +use Term::ANSIColor; +use Time::Duration; +use Time::Moment; +use Time::Piece; +use Unicode::UTF8 qw(encode_utf8 decode_utf8); + +use Lintian::IPC::Run3 qw(safe_qx); + +use Test::Lintian::Build qw(build_subject); +use Test::Lintian::ConfigFile qw(read_config); +use Test::Lintian::Filter + qw(find_selected_scripts find_selected_lintian_testpaths); +use Test::Lintian::Helper + qw(rfc822date cache_dpkg_architecture_values get_latest_policy get_recommended_debhelper_version); +use Test::Lintian::Hooks qw(sed_hook sort_lines calibrate); +use Test::Lintian::Prepare qw(filleval prepare); +use Test::Lintian::Run qw(logged_runner); +use Test::ScriptAge qw(perl_modification_epoch our_modification_epoch); + +const my $EMPTY => q{}; +const my $SPACE => q{ }; +const my $INDENT => $SPACE x 4; +const my $NEWLINE => qq{\n}; +const my $SLASH => q{/}; +const my $COMMA => q{,}; +const my $COLON => q{:}; +const my $ARROW => q{>>>}; +const my $YES => q{yes}; +const my $NO => q{no}; + +const my $WIDELY_READABLE => oct(22); + +# display output immediately +STDOUT->autoflush; + +# something changes the default handler, see Bug#974575 +$SIG{WINCH} = 'DEFAULT'; + +# see https://stackoverflow.com/a/60761593 +$SIG{CHLD} ||= 'DEFAULT'; +$SIG{HUP} ||= 'DEFAULT'; + +my $processing_start = Time::Moment->from_string(gmtime->datetime . 'Z'); + +# whitelist the environment we permit to avoid things that mess up +# tests, like CFLAGS, DH_OPTIONS, DH_COMPAT, DEB_HOST_ARCH +my %PRESERVE_ENV = map { $_ => 1 } qw( + LINTIAN_TEST_INSTALLED + PATH + TMPDIR +); + +my @disallowed = grep { !exists $PRESERVE_ENV{$_} } keys %ENV; + +delete $ENV{$_} for @disallowed; + +if (($ENV{LINTIAN_TEST_INSTALLED} // 'no') eq 'yes') { + + $ENV{LINTIAN_UNDER_TEST} = realpath('/usr/bin/lintian') + // die encode_utf8('Lintian is not installed'); + +} else { + $ENV{LINTIAN_UNDER_TEST} = realpath(THISDIR . '/../bin/lintian'); +} + +$ENV{LINTIAN_BASE}= realpath(dirname(dirname($ENV{LINTIAN_UNDER_TEST}))) + // die encode_utf8('Cannot resolve LINTIAN_BASE'); + +# options +my $coverage; +my $debug; +my $dump_logs = 1; +my $force_rebuild; +my $numjobs; +my $keep_going; +my $onlyrun; +my $outpath; +my $unattended; +my $verbose = 0; + +Getopt::Long::Configure('bundling'); +unless ( + Getopt::Long::GetOptions( + 'B|force-rebuild' => \$force_rebuild, + 'c|coverage:s' => \$coverage, + 'd|debug+' => \$debug, + 'j|jobs:i' => \$numjobs, + 'k|keep-going' => \$keep_going, + 'L|dump-logs!' => \$dump_logs, + 'o|onlyrun:s' => \$onlyrun, + 'u|unattended' => \$unattended, + 'v|verbose' => \$verbose, + 'w|work-dir:s' => \$outpath, + 'h|help' => sub {usage(); exit;}, + ) +) { + usage(); + die; +} + +# check number of arguments +die encode_utf8('Please use -h for usage information.') + if @ARGV > 1; + +# get arguments +my ($testset) = @ARGV; + +# default test set +$testset ||= 't'; + +# check test set directory +die encode_utf8("Cannot find testset directory $testset") + unless -d $testset; + +# make sure testset is an absolute path +$testset = rel2abs($testset); + +# calculate a default test work directory if none given +$outpath ||= dirname($testset) . '/debian/test-out'; + +# create test work directory unless it exists +make_path($outpath) + unless -e $outpath; + +# make sure test work path is a directory +die encode_utf8("Test work directory $outpath is not a directory") + unless -d $outpath; + +# make sure outpath is absolute +$outpath = rel2abs($outpath); + +my $ACTIVE_JOBS = 0; + +# get lintian modification date +my @lintianparts + = ('checks', 'commands', 'data','bin', 'profiles', 'vendors', 'lib/Lintian'); +my @lintianfiles + = map { File::Find::Rule->file->in("$ENV{'LINTIAN_BASE'}/$_") }@lintianparts; +push(@lintianfiles, Cwd::realpath($ENV{'LINTIAN_UNDER_TEST'})); +$ENV{'LINTIAN_EPOCH'} + = max(map { -e ? path($_)->stat->mtime : time } @lintianfiles); +say encode_utf8('Lintian modified on '. rfc822date($ENV{'LINTIAN_EPOCH'})); + +my $lintian_error; +my $bytes = capture_merged { + my @command = ($ENV{'LINTIAN_UNDER_TEST'}, '--version'); + system(@command) == 0 + or $lintian_error = "system @command failed: $?"; +}; +my $string = decode_utf8($bytes); +die encode_utf8($string . $lintian_error) + if length $lintian_error; + +chomp $string; +my ($version) = $string =~ qr/^\S+\s+v(.+)$/; +die encode_utf8('Cannot get Lintian version') unless length $version; +say encode_utf8("Version under test is $version."); + +say encode_utf8($EMPTY); + +# set environment for coverage +if (defined $coverage) { + # Only collect coverage for stuff that D::NYTProf and + # Test::Pod::Coverage cannot do for us. This makes cover use less + # RAM in the other end. + my @criteria = qw(statement branch condition path subroutine); + my $args= '-MDevel::Cover=-silent,1,+ignore,^(.*/)?t/scripts/.+'; + $args .= ',+ignore,/usr/bin/.*,+ignore,(.*/)?Dpkg'; + $args .= ',-coverage,' . join(',-coverage,', @criteria); + $args .= $COMMA . $coverage if $coverage ne $EMPTY; + $ENV{'LINTIAN_COVERAGE'} = $args; + + $ENV{'HARNESS_PERL_SWITCHES'} //= $EMPTY; + $ENV{'HARNESS_PERL_SWITCHES'} .= $SPACE . $args; +} + +# Devel::Cover + one cover_db + multiple processes is a recipe +# for corruptions. Force $numjobs to 1 if we are running under +# coverage. +$numjobs = 1 if exists $ENV{'LINTIAN_COVERAGE'}; + +# tie verbosity to debug +$verbose = 1 + $debug if $debug; + +# can be 0 without value ("-j") or undef if option was not specified at all +$numjobs ||= default_parallel(); +say encode_utf8("Running up to $numjobs tests concurrently") + if $numjobs > 1 && $verbose >= 2; + +$ENV{'DUMP_LOGS'} = $dump_logs//$NO ? $YES : $NO; + +# Disable translation support in dpkg as it is a considerable +# unnecessary overhead. +$ENV{'DPKG_NLS'} = 0; + +my $helperpath = "$testset/../private"; +if (-d $helperpath) { + my $helpers = rel2abs($helperpath) + // die encode_utf8("Cannot resolve $helperpath: $!"); + $ENV{'PATH'} = "$helpers:$ENV{'PATH'}"; +} + +# get architecture +cache_dpkg_architecture_values(); +say encode_utf8("Host architecture is $ENV{'DEB_HOST_ARCH'}."); + +# get latest policy version and date +($ENV{'POLICY_VERSION'}, $ENV{'POLICY_EPOCH'}) = get_latest_policy(); +say encode_utf8("Latest policy version is $ENV{'POLICY_VERSION'} from " + . rfc822date($ENV{'POLICY_EPOCH'})); + +# get current debhelper compat level; do not name DH_COMPAT; causes conflict +$ENV{'DEFAULT_DEBHELPER_COMPAT'} = get_recommended_debhelper_version(); +say encode_utf8( +"Using compat level $ENV{'DEFAULT_DEBHELPER_COMPAT'} as a default for packages built with debhelper." +); + +# get harness date, including templates, skeletons and whitelists +my @harnessparts + = ('bin', 't/defaults', 't/templates', 't/skeletons', 't/whitelists'); +my @harnessfiles + = map { File::Find::Rule->file->in("$ENV{'LINTIAN_BASE'}/$_") }@harnessparts; +my $harness_files_epoch + = max(map { -e ? path($_)->stat->mtime : time } @harnessfiles); +$ENV{'HARNESS_EPOCH'} + = max(our_modification_epoch, perl_modification_epoch, $harness_files_epoch); +say encode_utf8('Harness modified on '. rfc822date($ENV{'HARNESS_EPOCH'})); + +say encode_utf8($EMPTY); + +# print environment +my @vars = sort keys %ENV; +say encode_utf8('Environment:') if @vars; +for my $var (@vars) { say encode_utf8($INDENT . "$var=$ENV{$var}") } + +say encode_utf8($EMPTY); + +my $status = 0; + +my $formatter = TAP::Formatter::File->new( + { + errors => 1, + jobs => $numjobs, + } +); +$formatter = TAP::Formatter::Console->new( + { + errors => 1, + jobs => $numjobs, + color => 1, + } +) if is_interactive; + +my $harness = TAP::Harness->new( + { + formatter => $formatter, + jobs => $numjobs, + lib => ["$ENV{'LINTIAN_BASE'}/lib"], + } +); + +my $aggregator = TAP::Parser::Aggregator->new; +$aggregator->start; + +my @runscripts; +my $allscripts_path = "$testset/scripts"; + +# add selected scripts +push(@runscripts, find_selected_scripts($allscripts_path, $onlyrun)); + +# always add internal harness tests +my @requiredscripts; +@requiredscripts + = sort File::Find::Rule->file()->name('*.t')->in("$allscripts_path/harness") + unless length $onlyrun; +push(@runscripts, @requiredscripts); + +# remove any duplicates +@runscripts = uniq @runscripts; + +# make all paths relative +@runscripts = map { abs2rel($_) } @runscripts; + +say encode_utf8('Running selected and required Perl test scripts.'); +say encode_utf8($EMPTY); + +# run scripts through harness +$harness->aggregate_tests($aggregator, sort @runscripts); + +if (@runscripts && !$aggregator->all_passed && !$keep_going) { + $aggregator->stop; + $formatter->summary($aggregator); + exit 1; +} + +say encode_utf8($EMPTY); + +my @testpaths = find_selected_lintian_testpaths($testset, $onlyrun); + +my $recipe_root = "$testset/recipes"; + +# find test paths +my @recipes = map { path($_)->relative($recipe_root)->stringify }@testpaths; + +# prepare output directories +say encode_utf8( + 'Preparing the sources for '. scalar @recipes. ' test packages.') + if @recipes; + +# for filled templates +my $source_root = "$outpath/package-sources"; + +# for built test packages +my $build_root = "$outpath/packages"; + +# find build specifications +my @all_recipes = map { path($_)->parent->stringify } + sort File::Find::Rule->relative->name('build-spec')->in($recipe_root); + +my @source_paths + = map { path($_)->absolute($source_root)->stringify } @all_recipes; +my @build_paths + = map { path($_)->absolute($build_root)->stringify } @all_recipes; + +# remove obsolete package sources +my @found_sources = map { path($_)->parent->absolute->stringify; } + File::Find::Rule->file->name('fill-values')->in($source_root); +my $sourcelc = List::Compare->new(\@found_sources, \@source_paths); +my @obsolete_sources = $sourcelc->get_Lonly; +path($_)->remove_tree for @obsolete_sources; + +# remove obsolete built packages +my @found_builds = map { path($_)->parent->absolute->stringify; } + File::Find::Rule->file->name('source-files.sha1sums')->in($build_root); +my $packagelc= List::Compare->new(\@found_builds, \@build_paths); +my @obsolete_builds = $packagelc->get_Lonly; +path($_)->remove_tree for @obsolete_builds; + +# remove empty directories +for my $folder (@obsolete_sources, @obsolete_builds) { + my $candidate = path($folder)->parent; + while ($candidate->exists && !$candidate->children) { + rmdir $candidate->stringify; + $candidate = $candidate->parent; + } +} + +$ENV{PERL_PATH_TINY_NO_FLOCK} =1; + +$SIG{INT} = sub { MCE::Loop->finish; die encode_utf8("Caught a sigint $!") }; +my $mce_loop = MCE::Loop->init( + max_workers => $numjobs, + chunk_size => 1, + flush_stdout => 1, + flush_stderr => 1, +); + +my %failedprep = mce_loop { + my ($mce, $chunk_ref, $chunk_id) = @_; + + prepare_build($mce, $_); +} +@recipes; + +if (%failedprep) { + say encode_utf8($EMPTY); + say encode_utf8('Failed preparation tasks:'); + for my $recipe (sort keys %failedprep) { + say encode_utf8($EMPTY); + say encode_utf8($ARROW + . $SPACE + . path("$recipe_root/$recipe")->relative->stringify + . $COLON); + print encode_utf8($failedprep{$recipe}); + } + + MCE::Loop->finish; + exit 1; + +} else { + say encode_utf8('Package sources are ready.'); +} + +say encode_utf8($EMPTY); + +my %failedbuilds = mce_loop { + my ($mce, $chunk_ref, $chunk_id) = @_; + + build_package($mce, $_, $chunk_id, scalar @recipes); +} +@recipes; + +$SIG{INT} = 'DEFAULT'; +MCE::Loop->finish; + +if (%failedbuilds) { + say encode_utf8($EMPTY); + say encode_utf8('Failed build tasks:'); + for my $recipe (sort keys %failedbuilds) { + say encode_utf8($EMPTY); + say encode_utf8($ARROW + . $SPACE + . path("$recipe_root/$recipe")->relative->stringify + . $COLON); + print encode_utf8($failedbuilds{$recipe}); + } + + exit 1; +} else { + say encode_utf8('All test packages are up to date.'); +} + +say encode_utf8($EMPTY); + +my $build_end = Time::Moment->from_string(gmtime->datetime . 'Z'); +my $build_duration = duration($processing_start->delta_seconds($build_end)); +say encode_utf8("Building the test packages took $build_duration."); + +say encode_utf8($EMPTY); + +# for built test packages +my $buildroot = "$outpath/packages"; + +# for built test packages +my $evalroot = "$outpath/eval"; + +$SIG{INT} = sub { MCE::Loop->finish; die encode_utf8("Caught a sigint $!") }; + +mce_loop { + my ($mce, $chunk_ref, $chunk_id) = @_; + + prepare_test($mce, $_); +} +sort @testpaths; + +MCE::Loop->finish; + +$SIG{INT} = 'DEFAULT'; + +# remap paths from testset to outpath to get work directories +my @workpaths + = map { rel2abs(abs2rel($_, "$testset/recipes"), "$outpath/eval") } + @testpaths; + +# if ($platforms ne 'any') { +# my @wildcards = split(/$SPACE/, $platforms); +# my @matches= map { +# decode_utf8(qx{dpkg-architecture -a $ENV{'DEB_HOST_ARCH'} -i $_; echo -n \$?}) +# } @wildcards; +# unless (any { $_ == 0 } @matches) { +# say encode_utf8('Architecture mismatch'); +# return; +# } +# } + +# make all paths relative to current directory +@workpaths = map { path($_)->relative } @workpaths; + +# add the scripts in generated tests to be run +my @workscripts; +for my $path (@workpaths) { + + my @runners = File::Find::Rule->file->name('*.t')->in($path); + + die encode_utf8("No runner in $path") + unless scalar @runners; + die encode_utf8("More than one runner in $path") + if scalar @runners > 1; + + push(@workscripts, @runners); +} + +# run scripts through harness +$harness->aggregate_tests($aggregator, sort @workscripts); + +$aggregator->stop; +$formatter->summary($aggregator); + +say encode_utf8($EMPTY); + +my $test_end = Time::Moment->from_string(gmtime->datetime . 'Z'); +my $test_duration = duration($processing_start->delta_seconds($test_end)); +say encode_utf8("The test suite ran for $test_duration."); + +$status = 1 + unless $aggregator->all_passed; + +if (is_interactive && !$unattended) { + my @failed = $aggregator->failed; + say encode_utf8( + 'Offering to re-calibrate the hints expected in tests that failed.') + if @failed; + + my $accept_all; + + for my $scriptpath (@failed) { + my $workpath = dirname($scriptpath); + + my $descpath = "$workpath/desc"; + my $testcase = read_config($descpath); + + my $relative = abs2rel($workpath, $evalroot); + my $testpath = abs2rel(rel2abs($relative, "$testset/recipes")); + + say encode_utf8($EMPTY); + say encode_utf8( + 'Failed test: ' . colored($testpath, 'bold white on_blue')); + + my $match_strategy = $testcase->unfolded_value('Match-Strategy'); + + if ($match_strategy eq 'hints') { + + my $diffpath = "$workpath/hintdiff"; + next + unless -r $diffpath; + + my $diff = path($diffpath)->slurp_utf8; + print encode_utf8($diff); + + } elsif ($match_strategy eq 'literal') { + + my $actualpath = "$workpath/literal.actual.parsed"; + next + unless -r $actualpath; + my @command + = ('diff', '-uN', "$testpath/eval/literal", $actualpath); + say encode_utf8(join($SPACE, @command)); + system(@command); + + } else { + say encode_utf8( +"Do not know how to fix tests using matching strategy $match_strategy." + ); + next; + } + + unless ($accept_all) { + + my $decision_bytes = prompt( + encode_utf8( +'>>> Fix test (y), accept all (a), do not fix (n), quit (q/default)?' + ) + ); + my $decision = decode_utf8($decision_bytes); + + last + if $decision eq 'q' || $decision eq $EMPTY; + + next + unless $decision eq 'y' || $decision eq 'a'; + + $accept_all = 1 + if $decision eq 'a'; + } + + if ($match_strategy eq 'hints') { + + # create hints if needed; helps when writing new tests + my $hintspath = "$testpath/eval/hints"; + path($hintspath)->touch + unless -e $hintspath; + + my $diffpath = "$workpath/hintdiff"; + next + unless -r $diffpath; + + my @adjustargs = ($diffpath, $hintspath); + unshift(@adjustargs, '-i') + unless $accept_all; + + die encode_utf8("Cannot run hintadjust for $testpath") + if system('hintadjust', @adjustargs); + + # also copy the new hints to workpath; no need to rebuild + die encode_utf8("Cannot copy updated hints to $workpath") + if system('cp', $hintspath, "$workpath/hints"); + + } elsif ($match_strategy eq 'literal') { + + my $actualpath = "$workpath/literal.actual.parsed"; + next + unless -r $actualpath; + + die encode_utf8( + "Cannot copy to accept literal output for $testpath") + if system('cp', $actualpath, "$testpath/eval/literal"); + + } + } + + say encode_utf8($NEWLINE . 'Accepted all remaining hint changes.') + if $accept_all; + +} else { + my @crashed = $aggregator->parse_errors; + + say encode_utf8('Showing full logs for tests with parse errors.') + if @crashed; + + for my $absolutepath (@crashed) { + + my $scriptpath = abs2rel($absolutepath); + my $workpath = dirname($scriptpath); + my $logpath = "$workpath/log"; + + next + unless -e $logpath; + + say encode_utf8($EMPTY); + say encode_utf8("Log for test $scriptpath:"); + + my $log = path($logpath)->slurp_utf8; + print encode_utf8($log); + } +} + +# give a hint if not enough tests were run +unless (scalar @runscripts - scalar @requiredscripts + scalar @workscripts + || $onlyrun eq 'minimal:') { + quick_hint($onlyrun); + exit 1; +} + +say encode_utf8($EMPTY); + +exit $status; + +# program is done + +sub prepare_build { + my ($mce, $recipe) = @_; + + # label process + $0 = "Lintian prepare test: $recipe"; + + # destination + my $source_path = "$source_root/$recipe"; + + my $error; + + # capture output + my $log_bytes =capture_merged { + + try { + + # remove destination + path($source_path)->remove_tree + if -e $source_path; + + # prepare + prepare("$recipe_root/$recipe/build-spec", + $source_path, $testset, $force_rebuild); + + } catch { + # catch any error + $error = $@; + } + }; + + my $log = decode_utf8($log_bytes); + + # save log; + my $logfile = "$source_path.log"; + path($logfile)->spew_utf8($log) if $log; + + $mce->gather($recipe, $error) + if length $error; + + return; +} + +sub build_package { + my ($mce, $recipe, $position, $total) = @_; + + # set a predictable locale + $ENV{'LC_ALL'} = 'C'; + + # many tests create files via debian/rules + umask $WIDELY_READABLE; + + # get destination + my $source_path = "$source_root/$recipe"; + my $build_path = "$build_root/$recipe"; + + my $savedir = getcwd; + chdir $source_path + or die encode_utf8("Cannot change to directory $source_path"); + + my $sha1sums_bytes; + run3('find . -type f -print0 | sort -z | xargs -0 sha1sum', + \undef, \$sha1sums_bytes); + + chdir $savedir + or die encode_utf8("Cannot change to directory $savedir"); + + my $sha1sums = decode_utf8($sha1sums_bytes); + + my $checksum_path = "$build_path/source-files.sha1sums"; + if (-r $checksum_path) { + my $previous = path($checksum_path)->slurp_utf8; + + # only rebuild if needed + # also need to look for build subject + return + if $sha1sums eq $previous; + } + + $0 = "Lintian build test: $recipe [$position/$total]"; + say encode_utf8('Building in ' + . path($build_path)->relative->stringify + . " [$position/$total]"); + + path($build_path)->remove_tree + if -e $build_path; + path($build_path)->mkpath; + + # read dynamic file names + my $runfiles = "$source_path/files"; + my $files = read_config($runfiles); + + my $error; + + my $log_bytes = capture_merged { + + try { + # call runner + build_subject($source_path, $build_path); + + } catch { + # catch any error + $error = $@; + } + }; + + my $log = decode_utf8($log_bytes); + + # delete old runner log + my $betterlogpath= $build_path . $SLASH . $files->unfolded_value('Log'); + if (-e $betterlogpath) { + unlink $betterlogpath + or die encode_utf8("Cannot unlink $betterlogpath"); + } + + # move the early log for directory preparation to position of runner log + my $earlylogpath = "$source_path.log"; + move($earlylogpath, $betterlogpath) if -e $earlylogpath; + + # append runner log to population log + path($betterlogpath)->append_utf8($log) if length $log; + + # add error if there was one + path($betterlogpath)->append_utf8($error) if length $error; + + path($checksum_path)->spew_utf8($sha1sums) + unless length $error; + + $mce->gather(path($build_path)->relative->stringify, $error . $log) + if length $error; + + return; +} + +sub prepare_test { + my ($mce, $specpath) = @_; + + # label process + $0 = "Lintian prepare test: $specpath"; + + # calculate destination + my $relative = path($specpath)->relative("$testset/recipes"); + my $buildpath = $relative->absolute($buildroot)->stringify; + my $evalpath = $relative->absolute($evalroot)->relative->stringify; + + my $error; + + # capture output + my $log_bytes = capture_merged { + + try { + + # remove destination + path($evalpath)->remove_tree + if -e $evalpath; + + path($evalpath)->mkpath; + + # prepare + filleval("$specpath/eval", $evalpath, $testset); + + my $traversal = Cwd::realpath("$buildpath/subject"); + + if (length $traversal) { + die encode_utf8("Cannot link to subject in $buildpath") + if system("cd $evalpath; ln -s $traversal subject"); + } + + }catch { + # catch any error + $error = $@; + } + }; + + my $log = decode_utf8($log_bytes); + + # save log; + my $logfile = "$evalpath/log"; + path($logfile)->spew_utf8($log) if $log; + + # print something if there was an error + die encode_utf8( + ($log // $EMPTY) . "Preparation failed for $specpath: $error") + if $error; + + return $specpath; +} + +=item default_parallel + +=cut + +# Return the default number of parallelization to be used +sub default_parallel { + # check cpuinfo for the number of cores... + my $cpus = decode_utf8(safe_qx('nproc')); + if ($cpus =~ m/^\d+$/) { + # Running up to twice the number of cores usually gets the most out + # of the CPUs and disks but it might be too aggressive to be the + # default for -j. Only use +1 then. + return $cpus + 1; + } + + # No decent number of jobs? Just use 2 as a default + return 2; +} + +sub usage { + my $message =<<"END"; +Usage: $0 [options] [-j []] + + --onlyrun Select only some tests for a quick check + --coverage Run Lintian under Devel::Cover (Warning: painfully slow) + -d Display additional debugging information + --dump-logs Print build log to STDOUT, if a build fails. + -j [] Run up to jobs in parallel. + If -j is passed without specifying , the number + of jobs started is +1. + -k Do not stop after one failed test + -v Be more verbose + --help, -h Print this help and exit + + The option --onlyrun causes runtests to only run tests that match + the particular selection. This parameter can be a list of selectors: + what:[,] + + * test: + - Run the named test. Please note that testnames may not be + unique, so it may run more than one test. + * script:( || ) + - Run the named code quality script or all in the named directory. + E.g. "01-critic" will run all tests in "t/scripts/01-critic/". + * check: + - Run all tests related to the given check. + * suite: + - Run all tests in the named suite. + * tag: + - Run any test that lists in "Test-For" or + "Test-Against". + +Test artifacts are cached in --work-dir [default: debian/test-out] and +will generally be reused to save time. To recreate the test packages, +run 'private/build-test-packages'. +END + + print encode_utf8($message); + + return; +} + +sub quick_hint { + my ($selection) = @_; + + my $message =<<"END"; + +No tests were selected by your filter: + + $selection + +To select your tests, please use an appropriate argument with a +selector like: + + 'suite:', 'test:', 'check:', 'tag:', or 'script:' + +You can also use 'minimal:', which runs only the tests that cannot +be turned off, such as the internal tests for the harness. +END + + print encode_utf8($message); + + return; +} + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/private/tag-stats b/private/tag-stats new file mode 100755 index 0000000..9aa6696 --- /dev/null +++ b/private/tag-stats @@ -0,0 +1,109 @@ +#!/usr/bin/perl + +# tag-stats - tag classification statistics +# +# This script displays statistics and data for tag classification based on +# Severity fields and their mapping to a E/W/I code. +# +# The verbose options (-v, -vv, -vvv) can be used to display a detailed list +# of which tags are assigned to each category. + +use v5.20; +use warnings; +use utf8; +use autodie qw(opendir closedir); + +use Const::Fast; +use Cwd qw(realpath); +use File::Basename qw(dirname); +use Unicode::UTF8 qw(encode_utf8); + +# neither Path::This nor lib::relative are in Debian +use constant THISFILE => realpath __FILE__; +use constant THISDIR => dirname realpath __FILE__; + +# use Lintian modules that belong to this program +use lib THISDIR . '/../lib'; + +use Lintian::Profile; +use Lintian::Tag; + +const my $SPACE => q{ }; +const my $INDENT => $SPACE x 4; +const my $EXTRA_VERBOSE => 3; + +$ENV{LINTIAN_BASE} = realpath(THISDIR . '/..') + // die encode_utf8('Cannot resolve LINTIAN_BASE'); + +my @severities = reverse qw(pedantic info warning error); +my @types = qw(E W I P); + +my %stats; +my $num_tags = 0; +my $num_ok = 0; +my $percent = 0; + +my $verbose = $ARGV[0] ? ($ARGV[0] =~ s/v/v/g) : 0; + +my $profile = Lintian::Profile->new; +$profile->load; + +for my $tag_name ($profile->known_tags) { + + my $tag = $profile->get_tag($tag_name); + + my $name = $tag->name; + my $severity = $tag->visibility; + my $code = $tag->code; + + $severity = 'unclassified' + unless length $severity; + + push(@{$stats{severity}{$severity}}, $name); + push(@{$stats{type}{severity}{$code}{$severity}}, $name); + + $num_tags++; +} + +print encode_utf8("Severity\n"); + +foreach my $s (@severities) { + my $tags = $stats{severity}{$s} // []; + print encode_utf8(" $s: " . @{$tags} . "\n"); + print encode_utf8($INDENT . join("\n ", sort @{$tags}) . "\n") + if $verbose >= $EXTRA_VERBOSE; +} + +foreach my $t (@types) { + print encode_utf8("\nType $t Severity\n"); + foreach my $s (@severities) { + if (my $tags = $stats{type}{severity}{$t}{$s}) { + print encode_utf8(" $s: " . @{$tags} . "\n"); + print encode_utf8($INDENT . join("\n ", sort @{$tags}) . "\n") + if $verbose >= 2; + } + } +} + +print encode_utf8("\nCollections\n"); +foreach my $s (@severities) { + if (my $needs = $stats{needs}{$s}) { + my $size = scalar keys %{$needs}; + my @list = sort keys %{$needs}; + print encode_utf8(" $s: $size\n"); + print encode_utf8($INDENT . join("\n ", @list) . "\n") + if $verbose >= 2; + } +} + +if ($verbose >= 1 and exists $stats{severity}{unclassified}) { + print encode_utf8("\nUnclassified tags\n"); + print encode_utf8( + $SPACE x 2 . join("\n ", @{$stats{severity}{unclassified}}) . "\n"); +} + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/profiles/debian/main.profile b/profiles/debian/main.profile new file mode 100644 index 0000000..7c65a83 --- /dev/null +++ b/profiles/debian/main.profile @@ -0,0 +1,3 @@ +Profile: debian/main +Enable-Tags-From-Check: + * diff --git a/profiles/kali/main.profile b/profiles/kali/main.profile new file mode 100644 index 0000000..b186211 --- /dev/null +++ b/profiles/kali/main.profile @@ -0,0 +1,13 @@ +# The default profile for Kali Linux and derivatives thereof. +Profile: kali/main +Extends: debian/main +Disable-Tags: + bugs-field-does-not-refer-to-debian-infrastructure + no-nmu-in-changelog + source-nmu-has-incorrect-version-number + +# Kali ships some packages where upstream only supports installation in /opt so +# allow us to override this tag in those packages. +Tags: + dir-or-file-in-opt +Overridable: yes diff --git a/profiles/pardus/main.profile b/profiles/pardus/main.profile new file mode 100644 index 0000000..3971bd1 --- /dev/null +++ b/profiles/pardus/main.profile @@ -0,0 +1,11 @@ +# The default profile for Pardus Linux and derivatives thereof. +Profile: pardus/main +Extends: debian/main +Disable-Tags: no-nmu-in-changelog + source-nmu-has-incorrect-version-number + bugs-field-does-not-refer-to-debian-infrastructure + +# Pardus ships some packages where upstream only supports installation in /opt so +# allow us to override this tag in those packages. +Tags: dir-or-file-in-opt +Overridable: yes diff --git a/profiles/pureos/main.profile b/profiles/pureos/main.profile new file mode 100644 index 0000000..4028e18 --- /dev/null +++ b/profiles/pureos/main.profile @@ -0,0 +1,7 @@ +# The default profile for PureOS and derivatives thereof. +Profile: pureos/main +Extends: debian/main +Disable-Tags: + bugs-field-does-not-refer-to-debian-infrastructure + no-nmu-in-changelog + source-nmu-has-incorrect-version-number diff --git a/profiles/ubuntu/main.profile b/profiles/ubuntu/main.profile new file mode 100644 index 0000000..041ad42 --- /dev/null +++ b/profiles/ubuntu/main.profile @@ -0,0 +1,15 @@ +# The default profile for Ubuntu and derivatives thereof. +Profile: ubuntu/main +Extends: debian/main +Disable-Tags: + bugs-field-does-not-refer-to-debian-infrastructure + debian-changelog-file-is-a-symlink + lzma-deb-archive + mail-address-loops-or-bounces + maintainer-upload-has-incorrect-version-number + no-human-maintainers + no-nmu-in-changelog + qa-upload-has-incorrect-version-number + source-nmu-has-incorrect-version-number + team-upload-has-incorrect-version-number + upstart-job-in-etc-init.d-not-registered-via-update-rc.d diff --git a/reporting/checkout-release b/reporting/checkout-release new file mode 100755 index 0000000..000f363 --- /dev/null +++ b/reporting/checkout-release @@ -0,0 +1,29 @@ +#!/bin/sh +# Copyright (C) 2008 Frank Lichtenheld , if at all copyrightable +# Copyright (C) 2009 Russ Allbery + +# Helper script for updating lintian.debian.org to the latest lintian release +# Call with the release number as only argument, e.g. +# +# $ cd /org/lintian.debian.org && ./root/reporting/checkout-release 1.25.0 + +set -e + +if [ $# -ne 1 ]; then + echo "Usage: checkout-release " + exit 2 +fi +release=$1 + +set -x + +cd root +git fetch +git merge "$release" +perl -i -pe "s/(LINTIAN_VERSION = )\S+/$1\"$release\";/" root/frontend/lintian +debian/rules build + +# Local Variables: +# indent-tabs-mode: nil +# End: +# vim: syntax=sh sw=4 sts=4 sr et diff --git a/reporting/config.yaml b/reporting/config.yaml new file mode 100644 index 0000000..e3f0ecd --- /dev/null +++ b/reporting/config.yaml @@ -0,0 +1,72 @@ +## Used to define some reused variables +defaults: + architectures: &ARCH + - i386 + - amd64 + components: &COMP + - main + - contrib + - non-free + +## List of archives to process +archives: + ## A name given to the archive + debian: + ## Name of the tracefile to use to determine how up to date + ## the archive is. + tracefile: ftp-master.debian.org + ## Where the archive is placed on the file system + base-dir: /srv/mirrors/debian + ## Architectures to process + architectures: *ARCH + ## Which components to process + components: *COMP + ## Which suites/distributions to process + distributions: + - unstable + - experimental + debian-debug: + tracefile: ftp-master.debian.org + base-dir: /srv/mirrors/debian-debug + architectures: *ARCH + components: *COMP + distributions: + - unstable-debug + - experimental-debug + +storage: +## Path to the log files + log-dir: /srv/lintian.debian.org/logs +## Path to a directory to hold temporary data used by lintian. +## Used as TMPDIR for lintian and will also hold temporary labs +## - Can be /var/tmp or /tmp as long as they have space enough +## - Can be cleaned automatically. Either on boot or via a +## "delete anything older than X days"-mechanism + scratch-space: /srv/lintian.debian.org/scratch +## Path to a directory to hold cached data like which packages +## have been processed. +## - Can be in /var/cache +## - Can be deleted to reset / restart processing from scratch + state-cache: /srv/lintian.debian.org/harness-state +## Where to store latest completed report / static website + reports-dir: /srv/lintian.debian.org/reports-directory/www +## Directory to use for compiling new reports +## FIXME: This should just be a tmpdir + reports-work-dir: /srv/lintian.debian.org/reports-directory/www.tmp +## Where to store collected data / historical data (used for +## generating graphs etc.) + historical-data-dir: /srv/lintian.debian.org/history + +lintian: +## Extra options to pass to lintian (not all options can be +## passed via this. E.g. --cfg is ignored). +# extra-options: ['--jobs', '2'] + +## All of these variables will be available for templates to consume +## via "$config_vars{VAR}" +template-variables: + LINTIAN_SOURCE: https://salsa.debian.org/git/lintian/lintian.git + +## Source packages to not process +blacklist: +- gcc-8-cross-ports # #890873 diff --git a/reporting/graphs/statistics.gpi b/reporting/graphs/statistics.gpi new file mode 100644 index 0000000..7e59a21 --- /dev/null +++ b/reporting/graphs/statistics.gpi @@ -0,0 +1,38 @@ +# set terminal png truecolor small size 600,300 +set terminal svg size 640,375 font "Sans,11" + +set style line 10 linetype 1 linecolor rgb "#FF6700" lw 1.5 +set style line 11 linetype 1 linecolor rgb "#FFEB44" lw 1.5 +set style line 12 linetype 1 linecolor rgb "#C7EA3C" lw 1.5 +set style line 13 linetype 1 linecolor rgb "#E7F6AC" lw 1.5 +set style line 14 linetype 1 linecolor rgb "#EE99EE" lw 1.5 +set style line 15 linetype 1 linecolor rgb "#CCCCCC" lw 1.5 + +set key outside + +set xdata time +set timefmt "%s" +set format x "%b/%y" + +set size 1.0,0.80 +set origin 0.0,0.05 + +set nomxtics +set xtics nomirror scale 0.5,0 rotate by 55 offset -3.2,-2.7 +set ytics nomirror scale 0.5,0 +set offsets 0,0,500,0 + +load "common.gpi" + +set xrange [ date_min : date_max ] +set yrange [ 0 : ] + +set output sprintf("%s/statistics.svg", graph_dir) +plot sprintf("%s/statistics.dat", history_dir) \ + u 1:7 w l ls 10 t 'Errors', \ + '' u 1:8 w l ls 11 t 'Warnings', \ + '' u 1:9 w l ls 12 t 'Info', \ + '' u 1:11 w l ls 13 t 'Pedantic', \ + '' u 1:10 w l ls 14 t 'Experimental', \ + '' u 1:12 w l ls 15 t 'Overridden' + diff --git a/reporting/graphs/tags.gpi b/reporting/graphs/tags.gpi new file mode 100644 index 0000000..d0d4110 --- /dev/null +++ b/reporting/graphs/tags.gpi @@ -0,0 +1,35 @@ +tag=sprintf("%s", ARG1) +# set terminal png truecolor small size 600,300 +set terminal svg size 640,375 font "Sans,11" + +set style fill solid 0.25 + +set style line 20 linetype 1 linecolor rgb "#1A77C9" +set style line 21 linetype 1 linecolor rgb "#83CDBE" +set style line 22 linetype 1 linecolor rgb "#BBBBBB" + +set key outside + +set xdata time +set timefmt "%s" +set format x "%b/%y" + +set size 1.0,0.80 +set origin 0.0,0.05 + +set nomxtics +set xtics nomirror scale 0.5,0 rotate by 55 offset -3.2,-2.7 +set ytics nomirror scale 0.5,0 +set offsets 0,0,1,0 + +load "common.gpi" + +set xrange [ date_min : date_max ] +set yrange [ 0 : ] + +set output sprintf("%s/tags/%s.svg", graph_dir, tag) +plot sprintf("%s/tags/%s.dat", history_dir, tag) \ + u 1:2 w filledcurve x1 ls 20 t 'Tags', \ + '' u 1:4 w filledcurve x1 ls 21 t 'Packages', \ + '' u 1:3 w filledcurve x1 ls 22 t 'Overridden' + diff --git a/reporting/harness b/reporting/harness new file mode 120000 index 0000000..d47a847 --- /dev/null +++ b/reporting/harness @@ -0,0 +1 @@ +../frontend/dplint \ No newline at end of file diff --git a/reporting/images/ico.png b/reporting/images/ico.png new file mode 100644 index 0000000..e78bd5b Binary files /dev/null and b/reporting/images/ico.png differ diff --git a/reporting/images/l.png b/reporting/images/l.png new file mode 100644 index 0000000..0473ba2 Binary files /dev/null and b/reporting/images/l.png differ diff --git a/reporting/images/logo-small.png b/reporting/images/logo-small.png new file mode 100644 index 0000000..59bf0c7 Binary files /dev/null and b/reporting/images/logo-small.png differ diff --git a/reporting/templates/clean.tmpl b/reporting/templates/clean.tmpl new file mode 100644 index 0000000..5ae636a --- /dev/null +++ b/reporting/templates/clean.tmpl @@ -0,0 +1,19 @@ +{ head("Lintian Report for $name", 1) } +

{$name}

+ +

+ All of the packages maintained by {$maintainer} are Lintian-clean. +{ + if (!$clean) { + qq( But also see the full report) + . " which includes info, experimental and overridden tags"; + } +} +

+ +

+ Also see their + QA + overview. +

+{ foot() } diff --git a/reporting/templates/foot.tmpl b/reporting/templates/foot.tmpl new file mode 100644 index 0000000..ddc7dc1 --- /dev/null +++ b/reporting/templates/foot.tmpl @@ -0,0 +1,20 @@ + + +
+ +
+

+ Comments about these web pages? Please use + reportbug + to report a bug against the lintian package. +

+

+ The source code to Lintian is available under the GNU GPL version 2, + or (at your option) any later version. It can be downloaded from + {$config_vars{LINTIAN_SOURCE}}. +

+

Page last updated: {$timestamp} using Lintian {$version}.

+
+ + + diff --git a/reporting/templates/head.tmpl b/reporting/templates/head.tmpl new file mode 100644 index 0000000..4001950 --- /dev/null +++ b/reporting/templates/head.tmpl @@ -0,0 +1,26 @@ + + + + {$page_title} + + + + + + + + +
+

Lintian Reports

+ +
+
+ +
diff --git a/reporting/templates/index.tmpl b/reporting/templates/index.tmpl new file mode 100644 index 0000000..0889624 --- /dev/null +++ b/reporting/templates/index.tmpl @@ -0,0 +1,128 @@ +{ head("Lintian") } +
+
+

+ Lintian dissects Debian + packages and tries to find + bugs and policy violations. It contains automated checks for many + aspects of Debian + policy as well as some checks for common errors. +

+ +

+ For more information, see the User + Manual. +

+ +

+ Auto-generated documentation of the Lintian Perl Library API can + be found here. +

+ + +

+ Lintian is available in the Debian + lintian package. +

+
+
+
+ + + +
+

Archives

+

The following archives are processed by Lintian:

+ + +{ + for my $archive_info (@archives) { + my $name = $archive_info->{'name'}; + my $archs = join(' ', @{$archive_info->{'architectures'}}); + my $distributions = join(' ', @{$archive_info->{'distributions'}}); + my $components = join(' ', @{$archive_info->{'components'}}); + my $timestamp = $archive_info->{'timestamp'}; + $OUT .= qq{ \n}; + $OUT .= qq{ \n}; + $OUT .= qq{ \n}; + $OUT .= qq{ \n}; + } +} +
Archive nameAttributeAttribute value
${name}Architectures$archs
Distributions/Suites$distributions
Components$components
Mirror timestamp$timestamp
+
+ +
+

Statistics

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Last updated: {$timestamp}
Maintainers: {$delta{maintainers}}
Package groups: {$delta{'groups-known'}}
Rescheduled groups: {$delta{'groups-backlog'}}
Groups with processing errors: {$delta{'groups-with-errors'}}
Source packages: {$delta{'source-packages'}}
Binary packages: {$delta{'binary-packages'}}
μdeb packages: {$delta{'udeb-packages'}}
E Errors:{$delta{errors}}
W Warnings:{$delta{warnings}}
I Info tags:{$delta{info}}
P Pedantic tags:{$delta{pedantic}}
O Overridden tags:{$delta{overridden}}
X Experimental tags:{$delta{experimental}}
Lintian version: {$version}
+ +

+ (The numbers in parentheses describe the changes since the last Lintian + report, published on {$previous}.) +

+ +{ + if ($graphs) { + my $graph_link = resource_path('statistics.svg'); + $OUT .= qq(

\n); + $OUT .= qq( Evolution of Lintian tags over the past\n); + $OUT .= qq( $graphs_days days:

\n); + $OUT .= qq(
The beforementioned graph of Lintian\n);
+        $OUT .= qq(    tags
\n); + } +} + +
+{ foot() } diff --git a/reporting/templates/lintian.css.tmpl b/reporting/templates/lintian.css.tmpl new file mode 100644 index 0000000..cc3e8a3 --- /dev/null +++ b/reporting/templates/lintian.css.tmpl @@ -0,0 +1,447 @@ +{{{ + # NOTE - in this file, perl code must be within three braces rather than + # the usual single brace. This was done because a single brace is rather + # common in .css-files. NB: The braces cannot be escaped - see "DELIMITERS" + # in Text::Template. + # + # To refer to a resource, use: + # {{{resource_path('basename.png')}}} + # NB: The path will be relative to the .css file. Usually something like + # "../resources/.png" + # + # To refer to a file name relative to the .css file, use: + # {{{$path_prefix}}}path/from/HTML_ROOT +}}}/* lintian.css -- Style sheet for lintian.debian.org pages. */ + +/* + # Table of Contents: + # + # 1. General styles (links, lists, titles, tables...) + # 2. Header + # 3. Navigation + # 4. Main content + # 5. Footer + # 6. Other + */ + +/* + # Order: + # + # example { + # display + # position + # width + # height + # margin + # padding + # background + # color + # font + # text + # line-height + # border + # } + */ + + +/* + * 1. General styles + */ + +body { + margin: 0; + padding: 0; + color: #222; + background-color: white; + font-family: sans-serif; +} + +h1, h2 { + font-family: "Junicode", "FreeSerif", serif; +} + +h2 { + margin-bottom: 14px; + padding-bottom: 6px; + border-bottom: 2px solid #AAA; +} + +h3 { + margin: 5px 0 5px 10px; + color: #444; + font-size: 1.0em; +} + +p { + line-height: 1.4em; +} + +a { + color: #3252B2; +} + +ul { + margin: 0; +} + +li { + color: #333; +} + +hr { + display: none; +} + +/* + * 2. Header title + */ + +header { + display: block; /* HTML5 compat */ + margin: 0 0 28px 0; + padding: 5px 20px; + background: #F3F3F3 url("{{{resource_path('logo-small.png')}}}") no-repeat right; + border-bottom: 1px solid #AAA; +} + +header p { + float: left; + margin: 5px 0; + color: #444; + font-size: 1.0em; + font-family: sans-serif; + font-weight: bold; +} + +header p a { + color: #444; + text-decoration: none; +} + + +/* + * 3. Navigation bar + */ + +#nav { + float: right; + margin: 5px 55px 5px 0; + padding: 0; +} + +#nav li { + display: inline; + margin-left: 5px; +} + +#nav a { + padding: 3px 5px; + color: #333; + font-size: 0.9em; + text-decoration: none; +} + +#nav a:hover { + background-color: #FBFBFB; + border-bottom: 2px solid #D70751; +} + + +/* + * 4. Main content + */ + +main { + display: block; + margin: 0 25px; + font-size: 0.9em; + line-height: 1.4em; +} + +img.graph { + width: 95%; + max-width: 640px; +} + +/* Front page */ + +#logo { + text-align: center; +} + +#index h2, #stats h2, #archives h2 { + margin: 1.4em 0 0.4em 0; + border: none; +} + +#info { + margin: 25px 0; + padding: 20px; + background: #EFF4F8 url("{{{resource_path('l.png')}}}") no-repeat left; + border: 1px solid #DFE4E8; +} + +#info p { + margin-left: 130px; +} + +/* For smaller devices, we leave out the "icon" - it is fairly wide with + * little added value. + */ +@media (max-width: 700px) { + + #info { + margin: 25px 0; + padding: 20px; + background: #EFF4F8; + border: 1px solid #DFE4E8; + } + + #info p { + margin-left: 5%; + } +} + +#stats table, #archives table { + border-collapse: collapse; +} + +#stats table tr td, #archives table tr td { + padding: 3px 5px; + background-color: #FDFDFD; + border: 1px solid #CCC; +} + +#stats td span, #archives td span { + margin: 0 3px 0 0; + padding: 1px 3px; + font-family: monospace; +} + +#stats div.graph { + text-align: left; +} + +/* Maintainer reports */ + +#summary { + font-size: 0.9em; +} + +#summary p { + margin-top: 5px; + font-size: 0.95em; +} + +#summary ul { + padding-left: 20px; +} + +ul.report { + padding-left: 20px; + padding-bottom: 1em; +} + +div.graph { + text-align: center; +} + +ul.tag { + padding-bottom: 1em; +} + +ul.report li { + padding-left: 5px; + padding-bottom: 6px; + list-style: none; +} + +ul.tag li { + list-style: square; +} + +li span { + margin: 0 3px 0 0; + padding: 1px 3px; + font-family: monospace; +} + +h1 span { + padding: 1px 5px; + font-family: monospace; + font-size: 0.85em; + font-weight: normal; +} + +ul.extra { + margin-bottom: 0; + padding-bottom: 0; +} + +ul.report li ul.extra li { + padding-left: 0; + padding-bottom: 1px; + color: #444; + list-style: square; +} + +div.source-header { + width: 100%; + margin: 1.4em 0 14px 0; + padding-bottom: 6px; + border-bottom: 2px solid #AAA; +} + +div.source-header p, div.source-header h2 { + display: inline; + border: none; +} + +.info-links { + margin-top: 0; +} + +.info-links:before { + content: "– "; +} + +/* Tag type */ + +h2.tag { + margin: 5px 0; + padding: 0; + color: #444; + font-family: sans-serif; + font-size: 1.0em; + font-weight: normal; + border: none; +} + +h2.tag a { + font-weight: bold; +} + +h2.tag span.type-O { + margin: 0 3px 0 0; + padding: 2px 4px; + color: #555; + background: #EEE; + font-family: monospace; + font-size: 1.1em; + font-weight: bold; + border: 1px solid #DDD; +} + +br.tag { + padding-bottom: 1em; +} + + +/* E/W/I colors */ + +span.type-I { + color: #111; + background-color: #C7EA3C; +} + +span.type-W { + color: #111; + background-color: #FFEB44; +} + +span.type-E { + color: #111; + background-color: #FF6700; +} + +span.type-X { + color: #111; + background-color: #EE99EE; +} + +span.type-O { + color: #111; + background-color: #DDD; +} + +span.type-P { + color: #111; + background-color: #C7EA3C; +} + +span.type-C { + color: #111; + background-color: blue; +} + +li.type-O { + color: #444; +} + +b.processing-error { + color: #FF6700; +} + +blockquote { + padding: 6px 16px; + background-color: #EEE; + border: 1px solid #DDD; +} + +blockquote.type-I { + background-color: #DFA; + border: 1px solid #C7EA3C; +} + +blockquote.type-W { + background-color: #FFD; + border: 1px solid #FFEB44; +} + +blockquote.type-E { + background-color: #FE9; + border: 1px solid #FF6700; +} + +blockquote.type-X { + background-color: #FECCFE; + border: 1px solid #DE66DE; +} + +blockquote.type-P { + background-color: #DFA; + border: 1px solid #C7EA3C; +} + +blockquote.type-C { + background-color: #DFA; + border: 1px solid #C7EA3C; +} + + +/* + * 5. Footer + */ + +footer { + display: block; /* HTML5 compat */ + margin: 20px 20px; + padding: 10px 0 0 0; + font-size: 0.85em; + border-top: 1px solid #AAA; +} + +footer p { + margin: 0; + padding: 0; +} + + +/* + * 6. Other + */ + +div.clear { + clear: both; +} + diff --git a/reporting/templates/maintainer.tmpl b/reporting/templates/maintainer.tmpl new file mode 100644 index 0000000..e5e9353 --- /dev/null +++ b/reporting/templates/maintainer.tmpl @@ -0,0 +1,196 @@ +{ head("Lintian Report for $name") } +

{$name}

+ +

+ At the time of the last Lintian run, the following possible problems + were found in packages maintained by {$maintainer}, listed by source + package. +{ + if ($errors) { + qq( See also the full report, including) + . " info, experimental and overridden tags."; + } else { + qq( See also the report showing) + . " only errors and warnings."; + } +} + Also see their + QA + overview. +

+ +{ + # Show the summary only if the number of packages is within a certain + # range. + my $num_packages = keys(%packages) + keys(%uploads); + if ($num_packages) { + $OUT .= qq( \n"; + } +} +
+ +{ + # We get a hash of package names to a hash of versions to a list of tags. + # Create a list with the package information as the title and the tags as + # the value. + for my $source (sort (keys (%packages), keys (%uploads))) { + my ($data, $upload); + my $first_version = 1; + if ($packages{$source}) { + $data = $packages{$source}; + } else { + $data = $uploads{$source}; + $upload = 1; + } + for my $version (sort by_version keys %$data) { + my @tags = @{$data->{$version}}; + my @error_tags = grep { $_->{code} eq 'E' or $_->{code} eq 'W' } @tags; + my $first = 1; + my $binary = ''; + my $tag = ''; + my $firstcomponent = ''; + # Tracks whether we have opened an "
    "-list for the tag "extra". + # We only do this if the tags have "extra" info to avoid an empty + # "
      " (which is forbidden by XHTML 1.0 strict). + my $has_extra = 0; + + if ($errors) { + @tags = @error_tags; + next if not @error_tags; + } + + for my $info (@tags) { + my $pkg_info = $info->{pkg_info}; + my $is_binary = ($pkg_info->{type} eq "binary" or $pkg_info->{type} eq "udeb"); + my $new_binary = $pkg_info->{package} ne $binary if $is_binary; + my $tag_info = $info->{tag_info}; + my $next_tag = $tag_info->name; + + my $component = ($pkg_info->{component} eq 'main') ? '' : "; $pkg_info->{component}"; + $firstcomponent = $pkg_info->{component} unless $firstcomponent; + if ($first) { + my $state = $pkg_info->{'state_data'}; + my $anchor = $pkg_info->{'anchor'}; + my $status = 'up-to-date'; + my $last_processed_by = $state->{'last-processed-by'} // 'N/A'; + $status = 'outdated' if (exists($state->{'out-of-date'})); + $status = 'incomplete report; an error occurred during the last check' + if exists($state->{'last-error-by'}) and $state->{'last-error-by'}; + $OUT .= qq(
      \n); + $OUT .= qq(

      ); + $OUT .= "$source ($version$component)"; + $OUT .= " [Uploader]" if $upload; + if ($first_version) { + # Unversioned # references just go to the first version. + $first_version = 0; + $OUT .= qq( §) + } + $OUT .= "

      \n"; + $OUT .= qq( \n
      \n); + $OUT .= qq(
        \n) unless $is_binary; + } + + my $bin_version = ''; + unless ($pkg_info->{version} eq $version + and $pkg_info->{component} eq $firstcomponent) { + $bin_version = " ($pkg_info->{version}; $pkg_info->{component})"; + } + + if ($tag ne $next_tag or $new_binary) { + # Close the '
          ' HTML tag if it is open + $OUT .= "
        \n" if $has_extra; + # Reset has_extra; if the tag has an "extra", we will check + # for it later. + $has_extra = 0; + if ($new_binary) { + $OUT .= " \n
      \n" unless $first; + $OUT .= qq(

      $pkg_info->{package}$bin_version

      \n); + $OUT .= qq(
        \n); + } + } + + my $class = ''; + # No HTML quote needed; severity is from a fixed + # whitelist of known safe words. + my $severity = $tag_info->effective_severity; + $class = qq( title="$severity"); + + # Display tag name only once. + if ($tag ne $next_tag or $new_binary) { + my $q_next_tag = html_quote($next_tag); + $OUT .= " \n" unless $first or $new_binary; + $OUT .= " \n"; + $OUT .= qq( ); + $OUT .= "$info->{code} "; + $OUT .= qq(); + $OUT .= "${q_next_tag}\n"; + } + + if ($info->{extra}) { + if (not $has_extra) { + # Open a list for the "extra" info. + $has_extra = 1; + $OUT .= qq(
          ); + } + $OUT .= "
        • $info->{extra}"; + my @archs = sort keys %{ $info->{archs} }; + $OUT .= " [" . join(', ', @archs) . "]" if @archs > 1; + $OUT .= "
        • "; + } + + $first = 0; + $binary = $pkg_info->{package} if $is_binary; + $tag = $next_tag; + } + # Close the "extra" info-list (if present) and the current setup + $OUT .= "
        \n" if $has_extra; + $OUT .= " \n
      \n"; + } + } +} +{ foot() } diff --git a/reporting/templates/maintainers.tmpl b/reporting/templates/maintainers.tmpl new file mode 100644 index 0000000..58a9626 --- /dev/null +++ b/reporting/templates/maintainers.tmpl @@ -0,0 +1,57 @@ +{ head("Lintian Reports by Maintainer") } +

      Maintainers

      + +

      + Maintainers are listed sorted case-insensitively by package maintainer + string. This is an unsophisticated sort that does not take into + account any national collating sequence, only Unicode strings, so + maintainers whose names start with non-ASCII characters will sort at + the end of this page. +

      + +

      + Jump to: { join (' ', (map { qq($_) } 'A'..'Z', 'Other')) } +{ + # !!NB!! We are deliberately leaving out the closing "

      " here. + # It will be added by the loop below, which can (due to this) + # unconditionally emit a "

      " at the start of each new letter. + + # Put headings before each new initial letter and add anchors, except + # for non-ASCII initial characters. For those, since we can't be + # assured we'll get combining characters right, just accumulate them + # under a heading of Other. + my $letter = ''; + my @order = sort { + my $la = lc($a); + my $lb = lc($b); + # Ensure non-ASCII characters get push to the back + if ($la lt 'a' and $lb ge 'a') { + 1; + } elsif ($la ge 'a' and $lb lt 'a') { + -1; + } else { + $la cmp $lb; + } + } keys(%maintainers); + for my $key (@order) { + my $maint_data = $maintainers{$key}; + my $url = $maint_data->{url}; + my $maintainer = $maint_data->{name}; + my $first = uc substr($key, 0, 1); + if ($first lt 'A' || $first gt 'Z') { + $first = 'Other'; + } + if ($first ne $letter) { + $letter = $first; + if ($letter eq 'Other') { + $OUT .= qq(

      \n\n

      Other

      \n\n

      \n); + } else { + $OUT .= qq(

      \n\n

      ) + . $letter . "

      \n\n

      \n"; + } + } + $OUT .= qq( $maintainer) + . qq{ (full report)
      \n}; + } +}

      +{ foot() } diff --git a/reporting/templates/packages.tmpl b/reporting/templates/packages.tmpl new file mode 100644 index 0000000..352f6b1 --- /dev/null +++ b/reporting/templates/packages.tmpl @@ -0,0 +1,35 @@ +{ head("Lintian Package Index: $section") } +

      Package Index: {$section}

      + +

      + This is a list of all source packages that have at least one + lintian tag. This includes all tags, even experimental and info tags + and tags that were overridden. The list is huge, so it's broken into + four separate pages. This page covers package names starting with + {$section}. +

      + +

      + 0-9, A-F + | G-L + | M-R + | S-Z +

      + +{ + # ' # hi, emacs + # Put headings before each new initial letter. + my $letter = ''; + for my $package (@list) { + my $first = uc substr($package, 0, 1); + if ($first ne $letter) { + $OUT .= "

      \n\n" if $letter; + $OUT .= qq(

      $first

      \n\n

      \n); + $letter = $first; + } + foreach my $version (sort by_version keys %{ $sources{$package} }) { + $OUT .= qq( $package ($version)\n); + } + } +}

      +{ foot() } diff --git a/reporting/templates/tag-not-seen.tmpl b/reporting/templates/tag-not-seen.tmpl new file mode 100644 index 0000000..2e3c8a9 --- /dev/null +++ b/reporting/templates/tag-not-seen.tmpl @@ -0,0 +1,16 @@ +{ head("Lintian Tag: $tag") } +

      {$code} {$tag}

      + +

      + All reports of {$tag} for the archive. The extended description of this + tag is: +

      + +
      +{$description} +
      + +

      + This tag has not been emitted in any package tested by Lintian. +

      +{ foot() } diff --git a/reporting/templates/tag.tmpl b/reporting/templates/tag.tmpl new file mode 100644 index 0000000..d7c7271 --- /dev/null +++ b/reporting/templates/tag.tmpl @@ -0,0 +1,102 @@ +{ # No my/our in front of $q_tag or it will leave scope too soon! + $q_tag = html_quote($tag); + head("Lintian Tag: ${q_tag}") } +

      {$code} {${q_tag}}

      + +{ if ($statistics{total} <= $shown_count) { + $OUT .= qq( +

      + All reports of ${tag} for the archive. The extended description of this + tag is: +

      +); + } else { + my $log_link = resource_path('lintian.log.gz'); + $OUT .= qq( +

      + A subset of the reports of ${tag} for the archive. Unfortunately the full + list is too long, so only ${shown_count} instances are listed on this page. + At most ${tag_limit_per_package} tags are shown per package. + If you need the full list of tags, + please download the lintian.log.gz file and extract the data you need. +

      +

      + The extended description of this tag is: +

      + ); + } +} + +
      +{$description} +
      + +{ + if ($graphs) { + my $graph_link = resource_path("${tag}.svg"); + $OUT .= qq(

      \n); + $OUT .= qq( Evolution of the ${q_tag} Lintian tag over the past\n); + $OUT .= qq( $graphs_days days:

      \n); + $OUT .= qq(
      The beforementioned graph for the ${q_tag} tag
      \n); + } + $OUT .= qq(

      Emitted (non-overridden): $statistics{count}, ); + $OUT .= qq(overridden: $statistics{overrides}, ); + $OUT .= qq(total: $statistics{total}

      ); +} + +

      + The package names link to the relevant maintainer page and the + corresponding report for the source package. The links go to the full + maintainer report page, which includes info and experimental tags and + overridden tags, rather than the default page that shows only errors + and warnings. +

      +{ + # We get a list of tag data. We create a separate paragraph for each + # package name. + my ($last, $last_pi, $tag, $has_nonoverridden); + for my $info (sort { $a->{pkg_info}{package} cmp $b->{pkg_info}{package} } @tags) { + my $pkg_info = $info->{pkg_info}; + if (!$last + or "$pkg_info->{package} $pkg_info->{type} $pkg_info->{version}" ne "$last_pi->{package} $last_pi->{type} $last_pi->{version}") { + if ($last) { + my $overridden = $has_nonoverridden ? '' : qq{ overridden}; + $OUT .= qq(

      ); + $OUT .= "$last_pi->{package} $last_pi->{version} ($last_pi->{type}) ($last_pi->{maintainer})$overridden

      \n"; + if ($tag) { + $OUT .= qq(
        \n); + $OUT .= $tag; + $OUT .= "
      \n"; + } else { + $OUT .= qq(
      \n); + } + } + $last = $info; + $last_pi = $pkg_info; + $tag = ''; + $has_nonoverridden = 0; + } + $has_nonoverridden = 1 if $info->{code} ne 'O'; + if ($info->{extra}) { + $tag .= qq{
    • }; + $tag .= qq{O } if $info->{code} eq 'O'; + $tag .= $info->{extra}; + my @archs = sort keys %{ $info->{archs} }; + $tag .= " [" . join(', ', @archs) . "]" if @archs > 1; + $tag .= "
    • "; + } + } + my $overridden = $has_nonoverridden ? '' : qq{ overridden}; + $OUT .= qq(

      ); + $OUT .= "$last_pi->{package} $last_pi->{version} ($last_pi->{type}) ($last_pi->{maintainer})$overridden

      \n"; + if ($tag) { + $OUT .= qq(
        \n); + $OUT .= $tag; + $OUT .= "
      \n"; + } else { + $OUT .= qq(
      \n); + } +} +{ foot() } diff --git a/reporting/templates/tags-all.tmpl b/reporting/templates/tags-all.tmpl new file mode 100644 index 0000000..eb592c3 --- /dev/null +++ b/reporting/templates/tags-all.tmpl @@ -0,0 +1,28 @@ +{ head("Lintian Tags") } +

      Tags

      + +

      + This is a list of all tags known to Lintian even the ones + not emitted. +

      + +
        +{ + for my $tag (sort $profile->known_tags) { + my $text; + my $q_tag = html_quote($tag); + if ($stats{$tag}) { + my $packages = $stats{$tag}{'packages'}; + my $count = $stats{$tag}{'count'}; + my $overrides = $stats{$tag}{'overrides'}; + $text = "$packages packages, $count tags" + . ($overrides > 0 ? ", plus $overrides overrides" : ""); + } else { + $text = 'Not emitted'; + } + $OUT .= qq(
      • ${q_tag}) + . " ($text)" + . "
      • \n"; + } +}
      +{ foot() } diff --git a/reporting/templates/tags-severity.tmpl b/reporting/templates/tags-severity.tmpl new file mode 100644 index 0000000..164cb40 --- /dev/null +++ b/reporting/templates/tags-severity.tmpl @@ -0,0 +1,37 @@ +{ head("Lintian Tags") } +

      Tags

      + +

      + This is a list of all tags that occur at least once in the archive + sorted by severity. This includes all tags, even experimental and + info tags. +

      + +{ + my @tags = sort keys %tags; + for my $severity (qw/error warning info pedantic classification/) { + my $heading = 0; + for my $tag (@tags) { + my ($first) = @{ $tags{$tag} }; + my $tag_info = $first->{tag_info}; + next unless $tag_info->effective_severity eq $severity; + unless ($heading) { + $OUT .= "

      Severity: $severity,"; + $OUT .= "
        \n"; + $heading = 1; + } + my $packages = $stats{$tag}{'packages'}; + my $count = $stats{$tag}{'count'}; + my $overrides = $stats{$tag}{'overrides'}; + my $q_tag = html_quote($tag); + $OUT .= qq(
      • ${q_tag}) + . " ($packages packages, $count tags" + . ($overrides > 0 ? ", plus $overrides overrides" : "") + . ")
      • \n"; + } + if ($heading) { + $OUT .= "
      \n\n"; + } + } +} +{ foot() } diff --git a/reporting/templates/tags.tmpl b/reporting/templates/tags.tmpl new file mode 100644 index 0000000..3654af7 --- /dev/null +++ b/reporting/templates/tags.tmpl @@ -0,0 +1,34 @@ +{ head("Lintian Tags") } +

      Tags

      + +

      + This is a list of all tags that occur at least once in the archive + with their frequency counts. This includes all tags, even + experimental and info tags. +

      + +
        +{ + for my $tag (sort keys %stats) { + my $q_tag = html_quote($tag); + my $packages = $stats{$tag}{'packages'}; + my $count = $stats{$tag}{'count'}; + my $packages_str = $packages != 1 ? + "$packages packages" : + "$packages package"; + my $count_str = $count != 1 ? "$count tags" : "$count tag"; + my $overrides = $stats{$tag}{'overrides'}; + my $overrides_str = ''; + if ($overrides) { + if ($overrides == 1) { + $overrides_str = ", plus $overrides override"; + } else { + $overrides_str = ", plus $overrides overrides"; + } + } + $OUT .= qq(
      • ${q_tag}) + . " ($packages_str, ${count_str}${overrides_str}" + . ")
      • \n"; + } +}
      +{ foot() } diff --git a/schema/json/group.json b/schema/json/group.json new file mode 100644 index 0000000..8889f26 --- /dev/null +++ b/schema/json/group.json @@ -0,0 +1,34 @@ +{ + "$id": "https://lintian.debian.org/schema/json/lintian/group.json", + "$schema": "http://json-schema.org/draft-07/schema#", + "description": "A group of related input files examined by Lintian", + "properties": { + "group_id": { + "description": "Lintian's distinctive ID for input files that belong together", + "type": "string" + }, + "input_files": { + "description": "Files that were analyzed", + "items": { + "$ref": "/schema/json/lintian/input-file.json" + }, + "type": "array" + }, + "source_name": { + "description": "Debian name of source distribution", + "type": "string" + }, + "source_version": { + "description": "Full debianized version of source distribution", + "type": "string" + } + }, + "required": [ + "group_id", + "input_files", + "source_name", + "source_version" + ], + "title": "Lintian Group", + "type": "object" +} diff --git a/schema/json/hint.json b/schema/json/hint.json new file mode 100644 index 0000000..94cea0a --- /dev/null +++ b/schema/json/hint.json @@ -0,0 +1,61 @@ +{ + "$id": "https://lintian.debian.org/schema/json/lintian/hint.json", + "$schema": "http://json-schema.org/draft-07/schema#", + "description": "A Lintian packaging hint", + "properties": { + "masks": { + "anyOf": [ + { + "description": "Automated exemption as part of a class", + "items": { + "$ref": "/schema/json/lintian/mask.json" + }, + "type": [ + "array" + ] + }, + { + "type": "null" + } + ] + }, + "note": { + "description": "Annotation to aid understanding", + "type": "string" + }, + "override": { + "anyOf": [ + { + "$ref": "/schema/json/lintian/override.json" + }, + { + "type": "null" + } + ] + }, + "pointer": { + "anyOf": [ + { + "$ref": "/schema/json/lintian/item-pointer.json" + }, + { + "type": "null" + } + ] + }, + "tag": { + "description": "Name of Lintian tag", + "type": "string" + }, + "visibility": { + "description": "User-facing visibility", + "type": "string" + } + }, + "required": [ + "tag", + "visibility" + ], + "title": "Lintian Hint", + "type": "object" +} diff --git a/schema/json/input-file.json b/schema/json/input-file.json new file mode 100644 index 0000000..df07cdf --- /dev/null +++ b/schema/json/input-file.json @@ -0,0 +1,23 @@ +{ + "$id": "https://lintian.debian.org/schema/json/lintian/input-file.json", + "$schema": "http://json-schema.org/draft-07/schema#", + "description": "A file examined by Lintian", + "properties": { + "hints": { + "description": "Packaging hints for a given input", + "items": { + "$ref": "/schema/json/lintian/hint.json" + }, + "type": "array" + }, + "path": { + "description": "Path as given on the command line", + "type": "string" + } + }, + "required": [ + "path" + ], + "title": "Lintian Input File", + "type": "object" +} diff --git a/schema/json/item-pointer.json b/schema/json/item-pointer.json new file mode 100644 index 0000000..f9b9168 --- /dev/null +++ b/schema/json/item-pointer.json @@ -0,0 +1,19 @@ +{ + "$id": "https://lintian.debian.org/schema/json/lintian/item-pointer.json", + "$schema": "http://json-schema.org/draft-07/schema#", + "description": "A Lintian pointer to an item", + "properties": { + "item": { + "$ref": "/schema/json/lintian/item.json" + }, + "line_position": { + "description": "Line number for indicated position", + "type": "integer" + } + }, + "required": [ + "item" + ], + "title": "Lintian Item Pointer", + "type": "object" +} diff --git a/schema/json/item.json b/schema/json/item.json new file mode 100644 index 0000000..3784964 --- /dev/null +++ b/schema/json/item.json @@ -0,0 +1,21 @@ +{ + "$id": "https://lintian.debian.org/schema/json/lintian/item.json", + "$schema": "http://json-schema.org/draft-07/schema#", + "description": "A Lintian item", + "properties": { + "index": { + "description": "Index holding the item", + "type": "string" + }, + "name": { + "description": "Path without a leading slash", + "type": "string" + } + }, + "required": [ + "index", + "name" + ], + "title": "Lintian Item", + "type": "object" +} diff --git a/schema/json/mask.json b/schema/json/mask.json new file mode 100644 index 0000000..05fbd8e --- /dev/null +++ b/schema/json/mask.json @@ -0,0 +1,21 @@ +{ + "$id": "https://lintian.debian.org/schema/json/lintian/mask.json", + "$schema": "http://json-schema.org/draft-07/schema#", + "description": "A Lintian mask", + "properties": { + "excuse": { + "description": "Automated excuse", + "type": "string" + }, + "screen": { + "description": "Screen granting the exemption", + "type": "string" + } + }, + "required": [ + "excuse", + "screen" + ], + "title": "Lintian Mask", + "type": "object" +} diff --git a/schema/json/override.json b/schema/json/override.json new file mode 100644 index 0000000..089c536 --- /dev/null +++ b/schema/json/override.json @@ -0,0 +1,16 @@ +{ + "$id": "https://lintian.debian.org/schema/json/lintian/override.json", + "$schema": "http://json-schema.org/draft-07/schema#", + "description": "A Lintian override", + "properties": { + "justification": { + "description": "Distributor's justification", + "type": "string" + } + }, + "required": [ + "justification" + ], + "title": "Lintian Override", + "type": "object" +} diff --git a/schema/json/results.json b/schema/json/results.json new file mode 100644 index 0000000..5521719 --- /dev/null +++ b/schema/json/results.json @@ -0,0 +1,23 @@ +{ + "$id": "https://lintian.debian.org/schema/json/lintian/results.json", + "$schema": "http://json-schema.org/draft-07/schema#", + "description": "Results of running Lintian in JSON format", + "properties": { + "groups": { + "description": "Groups examined", + "items": { + "$ref": "/schema/json/lintian/group.json" + }, + "type": "array" + }, + "lintian_version": { + "description": "Version of the Lintian executable", + "type": "string" + } + }, + "required": [ + "lintian_version" + ], + "title": "Lintian Results", + "type": "object" +} diff --git a/schema/json/screen.json b/schema/json/screen.json new file mode 100644 index 0000000..f05be9e --- /dev/null +++ b/schema/json/screen.json @@ -0,0 +1,35 @@ +{ + "$id": "https://lintian.debian.org/schema/json/lintian/screen.json", + "$schema": "http://json-schema.org/draft-07/schema#", + "description": "A Lintian screen declaration", + "properties": { + "advocates": { + "description": "Advocates for exemption", + "items": { + "type": "string" + }, + "type": "array" + }, + "name": { + "description": "Screen name", + "type": "string" + }, + "reason": { + "description": "Screen explanation", + "type": "string" + }, + "see_also": { + "description": "Reference citations", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "name", + "reason" + ], + "title": "Lintian Screen", + "type": "object" +} diff --git a/schema/json/tag.json b/schema/json/tag.json new file mode 100644 index 0000000..b4c05f2 --- /dev/null +++ b/schema/json/tag.json @@ -0,0 +1,67 @@ +{ + "$id": "https://lintian.debian.org/schema/json/lintian/tag.json", + "$schema": "http://json-schema.org/draft-07/schema#", + "description": "A Lintian tag declaration", + "properties": { + "check": { + "description": "Issued by check", + "type": "string" + }, + "experimental": { + "description": "Tag is experimental", + "type": "boolean" + }, + "explanation": { + "description": "Explains condition and potential remedy", + "type": "string" + }, + "lintian_version": { + "description": "Lintian version", + "type": "string" + }, + "name": { + "description": "Tag name", + "type": "string" + }, + "name_spaced": { + "description": "Has check-based name space", + "type": "boolean" + }, + "renamed_from": { + "description": "Renamed from", + "items": { + "type": "string" + }, + "type": "array" + }, + "screens": { + "description": "Associated screens that can mask", + "items": { + "$ref": "/schema/json/lintian/screen.json" + }, + "type": "array" + }, + "see_also": { + "description": "Reference citations", + "items": { + "type": "string" + }, + "type": "array" + }, + "show_always": { + "description": "Always show", + "type": "boolean" + }, + "visibility": { + "description": "User-facing visibility", + "type": "string" + } + }, + "required": [ + "explanation", + "name", + "visibility" + ], + "title": "Lintian Tag", + "type": "object" +} diff --git a/schema/json/taglist.json b/schema/json/taglist.json new file mode 100644 index 0000000..4043183 --- /dev/null +++ b/schema/json/taglist.json @@ -0,0 +1,10 @@ +{ + "$id": "https://lintian.debian.org/schema/json/lintian/taglist.json", + "$schema": "http://json-schema.org/draft-07/schema#", + "description": "A tag list from lintian-explain-tags", + "items": { + "$ref": "/schema/json/lintian/tag.json" + }, + "title": "Lintian Tag Explanations", + "type": "array" +} diff --git a/t/COVERAGE b/t/COVERAGE new file mode 100644 index 0000000..0f5f3d1 --- /dev/null +++ b/t/COVERAGE @@ -0,0 +1,162 @@ +Last generated 2016-10-22 +Coverage (Tags): 1106/1170 (94.53%), w. legacy tests: 1161/1170 (99.23%) +Coverage (Checks): 41/50 (82.00%), w. legacy tests: 45/50 (90.00%) + +The following tags are not tested by the test suite: + +deb-format tar-errors-from-control + +debhelper debhelper-compatibility-level-not-a-number + +files udeb-contains-documentation-file + +menu-format menu-item-contains-unknown-tag +menu-format menu-item-needs-dwww +menu-format old-format-menu-file +menu-format whitespace-after-continuation-character + +menus executable-in-usr-share-docbase +menus executable-menu-file + +The following tags are only tested by the legacy test suite: + +binaries binary-has-unneeded-section +binaries binary-with-bad-dynamic-table + +files desktop-file-in-wrong-dir +files package-contains-devhelp-file-without-symlink +files package-contains-upstream-installation-documentation +files script-in-usr-share-doc +files script-with-language-extension +files use-of-compat-symlink + +init.d duplicate-updaterc.d-calls-in-postrm +init.d init.d-script-has-bad-lsb-line +init.d init.d-script-has-duplicate-lsb-section +init.d init.d-script-has-unknown-lsb-keyword +init.d init.d-script-has-unterminated-lsb-section +init.d init.d-script-missing-lsb-keyword +init.d init.d-script-not-included-in-package +init.d init.d-script-not-marked-as-conffile +init.d output-of-updaterc.d-not-redirected-to-dev-null +init.d postrm-contains-additional-updaterc.d-calls +init.d postrm-does-not-call-updaterc.d-for-init.d-script +init.d preinst-calls-updaterc.d +init.d prerm-calls-updaterc.d + +menu-format desktop-contains-deprecated-key +menu-format desktop-entry-missing-required-key +menu-format menu-item-missing-required-tag +menu-format menu-item-needs-tag-has-unknown-value +menu-format non-wm-module-in-wm-modules-menu-section +menu-format su-to-root-with-usr-sbin +menu-format su-wrapper-not-su-to-root +menu-format su-wrapper-without--c +menu-format unquoted-string-in-menu-item + +menus bad-menu-file-name +menus doc-base-document-field-ends-in-whitespace +menus doc-base-file-duplicated-format +menus doc-base-file-lacks-required-field +menus doc-base-file-no-format +menus doc-base-file-no-format-section +menus doc-base-file-no-index +menus doc-base-file-references-missing-file +menus doc-base-file-unknown-field +menus doc-base-file-unknown-format +menus doc-base-file-uses-obsolete-national-encoding +menus doc-base-index-references-multiple-files +menus doc-base-invalid-document-field +menus doc-base-unknown-section +menus menu-file-in-usr-lib +menus menu-method-should-include-menu-h +menus postinst-does-not-call-updatemenus +menus postrm-does-not-call-updatemenus + +po-debconf newer-debconf-templates +po-debconf unknown-encoding-in-po-file + +shared-libs symbols-declared-but-not-shlib +shared-libs symbols-declares-dependency-on-other-package +shared-libs udeb-postinst-must-not-call-ldconfig +shared-libs unknown-meta-field-in-symbols-file +shared-libs unused-shlib-entry-in-symbols-control-file + +Breakdown of remaining tags in legacy test suite by test case: + +binary + binary-has-unneeded-section + desktop-contains-deprecated-key + desktop-entry-missing-required-key + doc-base-document-field-ends-in-whitespace + doc-base-file-duplicated-format + doc-base-file-lacks-required-field + doc-base-file-no-format + doc-base-file-no-format-section + doc-base-file-no-index + doc-base-file-references-missing-file + doc-base-file-unknown-field + doc-base-file-unknown-format + doc-base-file-uses-obsolete-national-encoding + doc-base-index-references-multiple-files + doc-base-invalid-document-field + doc-base-unknown-section + menu-file-in-usr-lib + menu-item-missing-required-tag + menu-item-needs-tag-has-unknown-value + menu-method-should-include-menu-h + non-wm-module-in-wm-modules-menu-section + package-contains-upstream-installation-documentation + postinst-does-not-call-updatemenus + postrm-does-not-call-updatemenus + su-to-root-with-usr-sbin + su-wrapper-not-su-to-root + su-wrapper-without--c + unquoted-string-in-menu-item + +debconf + newer-debconf-templates + udeb-postinst-must-not-call-ldconfig + unknown-encoding-in-po-file + +debug + binary-with-bad-dynamic-table + symbols-declared-but-not-shlib + symbols-declares-dependency-on-other-package + unknown-meta-field-in-symbols-file + unused-shlib-entry-in-symbols-control-file + +etcfiles + +fields + +filenames + bad-menu-file-name + desktop-file-in-wrong-dir + package-contains-devhelp-file-without-symlink + use-of-compat-symlink + +foo++ + +libbaz + +maintainer-scripts + init.d-script-not-included-in-package + init.d-script-not-marked-as-conffile + output-of-updaterc.d-not-redirected-to-dev-null + postrm-contains-additional-updaterc.d-calls + postrm-does-not-call-updaterc.d-for-init.d-script + preinst-calls-updaterc.d + prerm-calls-updaterc.d + +relations + +scripts + duplicate-updaterc.d-calls-in-postrm + init.d-script-has-bad-lsb-line + init.d-script-has-duplicate-lsb-section + init.d-script-has-unknown-lsb-keyword + init.d-script-has-unterminated-lsb-section + init.d-script-missing-lsb-keyword + script-in-usr-share-doc + script-with-language-extension diff --git a/t/defaults/desc b/t/defaults/desc new file mode 100644 index 0000000..87cd740 --- /dev/null +++ b/t/defaults/desc @@ -0,0 +1,9 @@ +Check: all +Fill-Values-Folder: fill-values.d +Runner: generic.t +Profile: debian +Output-Format: universal +Skeleton: testing +Match-Strategy: hints +Default-Lintian-Options: --pedantic --display-info --display-experimental --display-level +classification --show-overrides --check-part [% $check %] +Test-Architectures: any diff --git a/t/defaults/files b/t/defaults/files new file mode 100644 index 0000000..f526e54 --- /dev/null +++ b/t/defaults/files @@ -0,0 +1,6 @@ +Test-Specification: desc +Test-Constraints: constraints +Test-Options: test-options +Fill-Values: fill-values +Builder: builder +Log: log diff --git a/t/defaults/fill-values b/t/defaults/fill-values new file mode 100644 index 0000000..58590ca --- /dev/null +++ b/t/defaults/fill-values @@ -0,0 +1,11 @@ +Description: No Description Available +Author: Debian Lintian Maintainers +Check: all +Section: devel +Priority: optional +Distribution: unstable +Package-Architecture: all +Fill-Values-Folder: fill-values.d +Rules-Requires-Root: no +Homepage: https://lintian.debian.org/ +Prev-Date: Mon, 01 Jan 1990 00:00:00 +0100 diff --git a/t/recipes/README b/t/recipes/README new file mode 100644 index 0000000..39cea8d --- /dev/null +++ b/t/recipes/README @@ -0,0 +1,382 @@ +WRITING A TEST +============== + +A test in this framework is a directory containing a desc file, providing +metadata about the test, and other files used to build the test package. + +Naming conventions +------------------ + +Each test name should begin with the name of the part tested, e.g. + +-... +-... +lintian-... +lintian-info-... + +Use generic- as a prefix for test cases that don't cover a specific +portion of Lintian but instead test Lintian's behavior on a useful special +case of package (such as a generic dh-make template). + +Sequence numbers +---------------- + +Each test should have a sequence number to get a more deterministic order. +You do not need to use unique numbers, only enough to make the order +deterministic and to your liking! You should use the middle of the +assigned range as default number and only divert from it if you have a +reason to. + +Number ranges: + +0000 - 0999 Basic test, that generally just assure that the test + suite and lintian are not completely broken +1000 - 1999 Tests for lib/ [1500] +2000 - 2999 Tests for frontend/ [2500] +3000 - 3999 Tests for unpack/ [3500] +4000 - 4999 Tests for collection/[4500] +5000 - 6999 Tests for checks/ [6000] +7000 - 8999 +9000 - 9998 Tests for reporting/ [9500] +9999 Tests from the old legacy test suite + +The desc file +------------- + +The desc file is formatted like a Debian control file. The required +fields are: + + Testname: + Version: + Description: + +In addition, the tags (if any) that the test case is testing for should be +listed in a Test-For key. The tags that the test case is testing are not +issued (checking against false positives) should be listed in a +Test-Against key. In both cases, the tags should be separated by +whitespace. The following format is suggested for multiple tags: + + Test-For: + lintian-tag-1 + lintian-tag-2 + +with the tags listed in alphabetical order. + +The default lintian command-line options are -I -E. You can change these +options with an Options field specifying the lintian options to use. This +overrides the default, so add -I -E if you want to include those options. +For example, to test --show-overrides with the -T option, use: + + Options: --show-overrides -T no-copyright-file + +The string TESTSET is no longer replaced in the Options field. Instead, +Lintian is run in the test's directory. Please use a local, relative +reference to the file or list the tags explicitly with '--suppress-tags'. + +By default, the Lintian output is sorted before comparing it to the tags +file. To suppress the sort (when, for instance, checking non-standard +output formats), use: + + Sort: no + +By default, all tests are built as native Debian packages. To build +the test case as a non-native package, add: + + Type: non-native + +to the .desc file. You will also want to change the version number to +be non-native unless you're testing a mismatch. + +By default all tests are run with the default Lintian profile. If a +different profile is needed it can be specified via: + + Profile: test/profile + +The value will be passed to Lintian via the --profile parameter. + +There are times when one wants to add a test for something that needs +to be done. To mark it as such, preventing the test suite from +failing, use: + + Todo: yes + +Test cases marked as Todo will succeed if they fail _the testing step_ +and fail if they succeed. Although this option can be very useful to +document what needs to be done, the ideal situation is to have none of +them :) + +Unless you're writing a test case just to improve Lintian's test coverage, +you will normally want to add a References field giving the source of the +test or the bug that you're testing for. This should be one of "Debian +Bug#nnnn" for a bug report, a URL into the debian-lint-maint mailing list +archives, or a message ID for the message to the list. + +The meaning of skeleton has changed in newer versions of the test runner. +Previously a skeleton indicated a template set, but now it refers to a +complete layout of the test working directory. It also defines the +builder. Please look in t/skeletons for examples. + +There are currently two fields available when defining skeletons: + + Template-Sets: DEST_DIR (TEMPLATE_SET) + +populates DEST_DIR with the files from TEMPLATE_SET. Please use only +relative paths. To install into the root of the test working directory +(which you can find somewhere in ./debian/test-out/) please use a dot. +multiple declarations must be separated by commas. Continuation lines +are okay. + + Fill-Targets: DEST_FILE + Fill-Targets: DEST_DIR (WHITE_LIST) + +In the file form, the declaration allows the filling of the file +DEST_FILE through the use of DEST_FILE.in. This does not mean that the +template is always filled. The algorithm considers other factors. No +filling takes place, for example, when the fill data and the file +modification time of the template are older than the generated file. + +In the directory form, the declaration requires a named template +whitelist in parentheses. In that case, the template whitelist will +give the filenames to fill. Please separate multiple declaration with +a comma. It it okay to use indented continuation lines. + +The general order is: + +1. Copy template sets to the destinations in the working directory. +2. Copy the original test details into the working directory. +3. Delete templates for which originals are present. +4. Fill whitelisted templates if the generated files are dated. + +To use a skeleton, please use: + + Skeleton: + +Whitelists only have one field, 'May-Generate:'. It permits the +generation of the listed file through template completion. Please list +the generated file and not the template. Multiple files must be +separated by spaces. + +Sometimes tests require the presence of certain packages. Please use +Extra-Build-Depends in most cases. The specified packages will be +added to Build-Depends when building the package. + +Please use Test-Depends only in cases when packages must not (or do +not need to) be added to Build-Depends. That can be helpful when +testing for missing build dependencies, or when the standard builder +is overridden and requires other software. The field Test-Depends +should probably be renamed. + +Sometimes tests fail if certain non-required packages are installed. +If you notice such a case, you can use: + + Test-Conflicts: + +If any of the dependencies are unavailable or conflicts are present, +the test will be skipped. + +All other fields in the .desc file are optional and control the values +filled into the template control and changelog files by the test suite +harness. The following additional fields are currently supported: + + Date: + Author: + Section:
      + Standards-Version: + +The Architecture: field cannot be overridden. It is automatically set +to equal the host architecture. If you require packages built with +Architecture: all, please make a copy of the particular template and +set Architecture: all manually. + +See t/runtests and t/templates/default/{control,changelog}.in for how +they're used. + +The test directory +------------------ + +The test directory should contain the following files and directories: + +debian + The Debian packaging files. This directory will form the ./debian + subdirectory in the completed package. During the build process, it + will be filled with heavily parameterized templates that are best + controlled via settings in 'desc'. You can override both the + templates (*.in) and the plain files (but using templates is + probably better) by placing files directly into this directory. + +diff + Files that override those in 'orig' if necessary. This directory + should normally not have a debian subdirectory. It is mostly + useful when testing patch systems. Very few tests need to use + this directory. + +orig + For a non-native package, this is the file tree that goes into the + upstream tarball. The files here should also be present with the + same contents in the debian directory unless you're intentionally + creating a diff. However, as normal with a Debian package, you + can omit files entirely from the debian directory and the + deletions will be ignored by dpkg-buildpackage. + +tags + The expected output of Lintian when run on the package, including + info and experimental tags. The Lintian output will be + lexicographically sorted before comparing it with tags. This file + may be empty if the test case should produce no Lintian output. + +pre_upstream + If present and executable, this script is run for a non-native test + type after preparing the upstream directory but before creating the + tarball. It receives the path to the package directory as its first + argument and can make any modifications that can't easily be + represented in the template system (such as creating files that + shouldn't be stored in a revision control system). + +pre_build + If present and executable, this script is run after preparing the + upstream tarball (if any) and the package directory, but before + running dpkg-buildpackage or lintian. It receives the path to the + package directory as its first argument and can make any + modifications that can't otherwise be represented in the template + system (such as deleting files from the template that aren't + desired). + +post_test + If present, assumed to be a sed script that is run on the output + of Lintian before comparing it to the tags file. The most common + use for this script is to remove the architecture from tags + produced on the .changes file with a line like: + + s/_[^ _]* changes/_arch changes/ + + but it may be useful for other cases where the output of Lintian + may change on different systems. + +test_calibration + If present and executable, this script is run after the Lintian + output has been generated and after post_test (if present). The + script can be used to calibrate the expected output or actual + output. + + It is useful for cases the expected output is architecture + dependent beyond what the post_test script can handle. + + The script will be passed 3 arguments, the "expected output" file, + the "actual output" file and file name to write the "calibrated + expected output". The script may modify the "actual output" file + and create the calibration file, which (if it is created) will + be used instead of the original "expected output" file. + + +Be aware that Git doesn't track directories, only files, so any +directory must contain at least one file to exist in a fresh Git +checkout. + + +RUNNING THE TEST SUITE +====================== + +The complete test suite will be run with private/runtests, but +this can take quite a lot of time. Normally this is only necessary +after significant structural changes or before a release as a final +check. + +To run a specific test case, run: + + private/runtests onlyrun=test: + +You can also run groups of tests defined by selectors such as: + + suite: runs all tests in the named suite + tag: runs all tests that relate to the named tag + check: runs all tests that relate to the named Lintian check + script: runs the named code quality script + minimal: runs only required internal tests + +The internal tests cannot be disabled. They make sure that essential +components behave as expected. + +The runner provides a detailed log for each test. For details +please look at ./debian/test-out/${testpath}/log. + + +TEST WRITING TIPS +================= + +Please keep each test case focused. One of the problems that +developed with the old test suite is that each test was serving many +separate purposes and testing large swaths of Lintian, which made it +difficult to know what could be changed and what would destroy some +other useful test. Test cases should only test a set of closely +related tags and new tests should be added for new issues that aren't +part of that closely-related set. + +Test cases should be as Lintian-clean as possible except for the tags +that they're testing for. The template is intended to help with this. +It generates a Lintian-clean basic package for you to start with. You +should override only the minimal required to trigger your test, and +try to fix any unrelated problems. Sometimes this won't be possible +and the only way to trigger a tag is to also trigger another tag, and +that's fine, but it shouldn't be the normal case. + +Test cases should only be listed in Test-For or Test-Against if +they're a target of that test case. Tags that are triggered as a side +effect of setting up the desired test case should not be listed, since +later changes or reworkings may cause those tags to no longer be +issued. + +Be sure to use Test-For and Test-Against for tags that are targets of +a particular test case. The test harness will ensure that the test +case behaves correctly, and that metadata is used for the runtests +target (when called with the onlyrun=tag: filter) and when checking test +coverage. + +The test template uses debhelper 7. Use debhelper 7 features whenever +possible rather than replacing the rules file with a more verbose one. +In other words, if you want to skip a particular debhelper program, do +something like: + + %: + dh $@ + + override_dh_install: + # Skip dh_install + +rather than adding in all of the traditional targets. All you have to +do is make dpkg-buildpackage happy (which means that in practice you +could just override binary, not binary-arch and binary-indep, but +doing it this way may provide some future-proofing). + +Tests will generally fall into one of four basic types: + +1. Tests for a specific tag. To keep the overall size (and therefore + run time) of the test suite down, consider combining a test for a + new tag into a general test (see below) if it's just another simple + addition that's very similar to what's being checked by another + test. However, be sure to keep all test cases tightly focused and + err on the side of creating new tests. + +2. Tests against a specific tag, generally as regression tests for + false positives. + +3. General tests of a set of closely-related tags. For example, + there's no need to create a test case for every weird file in a + Debian package that files checks for; one test case that installs a + lot of weird files can easily test multiple tags at once without + any confusion. Similarly, there's no need to create a separate + test case for every type of cruft that could exist in a source + package; one test case could contain, for instance, metadata files + for every major VCS. Conventionally, these test case names often + end in -general. + +4. Generic test cases that provide an interesting representative of a + type of package and thereby test a lot of tags (possibly from + multiple checks scripts) that trigger on that type of package. For + example, see generic-dh-make-2008 (the results of running dh_make + on an empty source package) or generic-empty (a package missing + everything that dpkg-buildpackage will let one get away with + missing). + +If you by any reason need to write an architecture-specific test case, +make sure the target architectures are properly listed _in the desc +file_. runtests will in then handle this special test correctly. diff --git a/t/recipes/checks/apache2/apache2-modules-general/build-spec/debian/control.in b/t/recipes/checks/apache2/apache2-modules-general/build-spec/debian/control.in new file mode 100644 index 0000000..bebecc3 --- /dev/null +++ b/t/recipes/checks/apache2/apache2-modules-general/build-spec/debian/control.in @@ -0,0 +1,45 @@ +Source: [% $source %] +Section: httpd +Priority: optional +Maintainer: Big Kahuna +Uploaders: [% $author %] +Standards-Version: [% $standards_version %] +Build-Depends: [% $build_depends %] +Rules-Requires-Root: no + +Package: libapache2-mod-foo +Architecture: [% $package_architecture %] +Depends: ${shlibs:Depends}, + ${misc:Depends}, + apache2-api-19700101 +Description: [% $description %] + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. + +Package: libapache2-modbaz +Architecture: [% $package_architecture %] +Depends: ${shlibs:Depends}, + ${misc:Depends}, + apache2.2-common, +Description: [% $description %] don't care + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. + . + To avoid duplicate description warnings this line differs. Ignore me. + +Package: libapache2-mod-foo2 +Architecture: [% $package_architecture %] +Depends: ${shlibs:Depends}, + ${misc:Depends}, + apache2-api-19700101, +Description: [% $description %] still don't care + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. + . + To avoid duplicate description warnings this line differs. Still ignore me. diff --git a/t/recipes/checks/apache2/apache2-modules-general/build-spec/debian/libapache2-mod-foo.dirs b/t/recipes/checks/apache2/apache2-modules-general/build-spec/debian/libapache2-mod-foo.dirs new file mode 100644 index 0000000..871a471 --- /dev/null +++ b/t/recipes/checks/apache2/apache2-modules-general/build-spec/debian/libapache2-mod-foo.dirs @@ -0,0 +1,2 @@ +etc/apache2/mods-available +usr/lib/apache2/modules diff --git a/t/recipes/checks/apache2/apache2-modules-general/build-spec/debian/libapache2-mod-foo.install b/t/recipes/checks/apache2/apache2-modules-general/build-spec/debian/libapache2-mod-foo.install new file mode 100644 index 0000000..ac8f7f1 --- /dev/null +++ b/t/recipes/checks/apache2/apache2-modules-general/build-spec/debian/libapache2-mod-foo.install @@ -0,0 +1,4 @@ +foo.load /etc/apache2/mods-available +foo /etc/apache2/mods-available +foo.conf /etc/apache2/mods-available +mod_foo.so /usr/lib/apache2/modules/ diff --git a/t/recipes/checks/apache2/apache2-modules-general/build-spec/debian/libapache2-mod-foo2.dirs b/t/recipes/checks/apache2/apache2-modules-general/build-spec/debian/libapache2-mod-foo2.dirs new file mode 100644 index 0000000..aec19ee --- /dev/null +++ b/t/recipes/checks/apache2/apache2-modules-general/build-spec/debian/libapache2-mod-foo2.dirs @@ -0,0 +1,2 @@ +etc/apache2/mods-enabled +usr/lib/apache2/modules diff --git a/t/recipes/checks/apache2/apache2-modules-general/build-spec/debian/libapache2-mod-foo2.install b/t/recipes/checks/apache2/apache2-modules-general/build-spec/debian/libapache2-mod-foo2.install new file mode 100644 index 0000000..8aab3d1 --- /dev/null +++ b/t/recipes/checks/apache2/apache2-modules-general/build-spec/debian/libapache2-mod-foo2.install @@ -0,0 +1,2 @@ +foo.conf /etc/apache2/mods-enabled +mod_foo2.so /usr/lib/apache2/modules/ diff --git a/t/recipes/checks/apache2/apache2-modules-general/build-spec/debian/libapache2-mod-foo2.postinst b/t/recipes/checks/apache2/apache2-modules-general/build-spec/debian/libapache2-mod-foo2.postinst new file mode 100644 index 0000000..8f6847d --- /dev/null +++ b/t/recipes/checks/apache2/apache2-modules-general/build-spec/debian/libapache2-mod-foo2.postinst @@ -0,0 +1,9 @@ +#! /bin/sh + +set -e + +if [ "$1" = 'configure' ] ; then + a2enmod -q foo2 +fi + +#DEBHELPER# diff --git a/t/recipes/checks/apache2/apache2-modules-general/build-spec/debian/libapache2-mod-foo2.postrm b/t/recipes/checks/apache2/apache2-modules-general/build-spec/debian/libapache2-mod-foo2.postrm new file mode 100644 index 0000000..a4c83a6 --- /dev/null +++ b/t/recipes/checks/apache2/apache2-modules-general/build-spec/debian/libapache2-mod-foo2.postrm @@ -0,0 +1,9 @@ +#! /bin/sh + +set -e + +if [ "$1" = 'remove' ] ; then + a2dismod -q foo2 +fi + +#DEBHELPER# diff --git a/t/recipes/checks/apache2/apache2-modules-general/build-spec/debian/libapache2-modbaz.dirs b/t/recipes/checks/apache2/apache2-modules-general/build-spec/debian/libapache2-modbaz.dirs new file mode 100644 index 0000000..871a471 --- /dev/null +++ b/t/recipes/checks/apache2/apache2-modules-general/build-spec/debian/libapache2-modbaz.dirs @@ -0,0 +1,2 @@ +etc/apache2/mods-available +usr/lib/apache2/modules diff --git a/t/recipes/checks/apache2/apache2-modules-general/build-spec/debian/libapache2-modbaz.install b/t/recipes/checks/apache2/apache2-modules-general/build-spec/debian/libapache2-modbaz.install new file mode 100644 index 0000000..5f2e1f9 --- /dev/null +++ b/t/recipes/checks/apache2/apache2-modules-general/build-spec/debian/libapache2-modbaz.install @@ -0,0 +1,2 @@ +baz.load /etc/apache2/mods-available +mod_baz.so /usr/lib/apache2/modules/ diff --git a/t/recipes/checks/apache2/apache2-modules-general/build-spec/fill-values b/t/recipes/checks/apache2/apache2-modules-general/build-spec/fill-values new file mode 100644 index 0000000..608adaa --- /dev/null +++ b/t/recipes/checks/apache2/apache2-modules-general/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: upload-native +Testname: apache2-modules-general +Description: Several tests related to Apache2 module packages diff --git a/t/recipes/checks/apache2/apache2-modules-general/build-spec/orig/Makefile b/t/recipes/checks/apache2/apache2-modules-general/build-spec/orig/Makefile new file mode 100644 index 0000000..4ce37c0 --- /dev/null +++ b/t/recipes/checks/apache2/apache2-modules-general/build-spec/orig/Makefile @@ -0,0 +1,5 @@ +all: + touch mod_baz.so mod_foo2.so mod_foo.so + +clean: + rm -f *.so diff --git a/t/recipes/checks/apache2/apache2-modules-general/build-spec/orig/baz.load b/t/recipes/checks/apache2/apache2-modules-general/build-spec/orig/baz.load new file mode 100644 index 0000000..cb28fab --- /dev/null +++ b/t/recipes/checks/apache2/apache2-modules-general/build-spec/orig/baz.load @@ -0,0 +1 @@ +LoadModule baz_module /usr/lib/apache2/modules/mod_baz.so diff --git a/t/recipes/checks/apache2/apache2-modules-general/build-spec/orig/foo b/t/recipes/checks/apache2/apache2-modules-general/build-spec/orig/foo new file mode 100644 index 0000000..2cc691e --- /dev/null +++ b/t/recipes/checks/apache2/apache2-modules-general/build-spec/orig/foo @@ -0,0 +1 @@ + diff --git a/t/recipes/checks/apache2/apache2-modules-general/build-spec/orig/foo.conf b/t/recipes/checks/apache2/apache2-modules-general/build-spec/orig/foo.conf new file mode 100644 index 0000000..bcbc503 --- /dev/null +++ b/t/recipes/checks/apache2/apache2-modules-general/build-spec/orig/foo.conf @@ -0,0 +1,5 @@ +# Depends: notsupportedhere + + + WithDirectives + diff --git a/t/recipes/checks/apache2/apache2-modules-general/build-spec/orig/foo.load b/t/recipes/checks/apache2/apache2-modules-general/build-spec/orig/foo.load new file mode 100644 index 0000000..7f1659f --- /dev/null +++ b/t/recipes/checks/apache2/apache2-modules-general/build-spec/orig/foo.load @@ -0,0 +1,5 @@ +# Depends: baz +# Depends: baz baz2 mod_baz3 baz4.load +# Conflicts: baz baz2 + +LoadModule foo_module /usr/lib/apache2/modules/mod_foo.so diff --git a/t/recipes/checks/apache2/apache2-modules-general/eval/desc b/t/recipes/checks/apache2/apache2-modules-general/eval/desc new file mode 100644 index 0000000..673e5a3 --- /dev/null +++ b/t/recipes/checks/apache2/apache2-modules-general/eval/desc @@ -0,0 +1,2 @@ +Testname: apache2-modules-general +Check: apache2 diff --git a/t/recipes/checks/apache2/apache2-modules-general/eval/hints b/t/recipes/checks/apache2/apache2-modules-general/eval/hints new file mode 100644 index 0000000..42c6401 --- /dev/null +++ b/t/recipes/checks/apache2/apache2-modules-general/eval/hints @@ -0,0 +1,9 @@ +libapache2-modbaz (binary): non-standard-apache2-module-package-name libapache2-modbaz != libapache2-mod-baz [usr/lib/apache2/modules/mod_baz.so] +libapache2-modbaz (binary): apache2-module-does-not-depend-on-apache2-api [usr/lib/apache2/modules/mod_baz.so] +libapache2-mod-foo2 (binary): apache2-reverse-dependency-ships-file-in-not-allowed-directory [etc/apache2/mods-enabled/foo.conf] +libapache2-mod-foo2 (binary): apache2-reverse-dependency-calls-wrapper-script a2enmod [postinst:6] +libapache2-mod-foo2 (binary): apache2-reverse-dependency-calls-wrapper-script a2dismod [postrm:6] +libapache2-mod-foo2 (binary): apache2-module-does-not-ship-load-file etc/apache2/mods-available/foo2.load [usr/lib/apache2/modules/mod_foo2.so] +libapache2-mod-foo (binary): apache2-unparsable-dependency mod_baz3 [etc/apache2/mods-available/foo.load:2] +libapache2-mod-foo (binary): apache2-unparsable-dependency baz4.load [etc/apache2/mods-available/foo.load:2] +libapache2-mod-foo (binary): apache2-configuration-files-need-conf-suffix [etc/apache2/mods-available/foo] diff --git a/t/recipes/checks/apache2/apache2-webapplications-general/build-spec/debian/control.in b/t/recipes/checks/apache2/apache2-webapplications-general/build-spec/debian/control.in new file mode 100644 index 0000000..35a5386 --- /dev/null +++ b/t/recipes/checks/apache2/apache2-webapplications-general/build-spec/debian/control.in @@ -0,0 +1,48 @@ +Source: [% $source %] +Section: web +Priority: optional +Maintainer: Big Kahuna +Uploaders: [% $author %] +Standards-Version: [% $standards_version %] +Build-Depends: [% $build_depends %] +Rules-Requires-Root: no + +Package: phpmyfoo +Architecture: [% $package_architecture %] +Depends: ${shlibs:Depends}, + ${misc:Depends}, + apache2, + apache2-bin +Description: [% $description %] + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. + +Package: phpmyfoo2 +Architecture: [% $package_architecture %] +Depends: ${shlibs:Depends}, + ${misc:Depends}, + apache2 | httpd +Description: [% $description %] - ignore me + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. + . + Ignore me. + +Package: phpmyfoo3 +Architecture: [% $package_architecture %] +Depends: ${shlibs:Depends}, + ${misc:Depends}, + apache2 | lighttpd | httpd +Description: [% $description %] - another ignore me + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. + . + Yet another ignore me. + + diff --git a/t/recipes/checks/apache2/apache2-webapplications-general/build-spec/debian/phpmyfoo.dirs b/t/recipes/checks/apache2/apache2-webapplications-general/build-spec/debian/phpmyfoo.dirs new file mode 100644 index 0000000..31e10a9 --- /dev/null +++ b/t/recipes/checks/apache2/apache2-webapplications-general/build-spec/debian/phpmyfoo.dirs @@ -0,0 +1 @@ +etc/apache2/conf-available diff --git a/t/recipes/checks/apache2/apache2-webapplications-general/build-spec/debian/phpmyfoo.install b/t/recipes/checks/apache2/apache2-webapplications-general/build-spec/debian/phpmyfoo.install new file mode 100644 index 0000000..2789400 --- /dev/null +++ b/t/recipes/checks/apache2/apache2-webapplications-general/build-spec/debian/phpmyfoo.install @@ -0,0 +1 @@ +phpmyfoo.conf /etc/apache2/conf-available diff --git a/t/recipes/checks/apache2/apache2-webapplications-general/build-spec/debian/phpmyfoo.postinst b/t/recipes/checks/apache2/apache2-webapplications-general/build-spec/debian/phpmyfoo.postinst new file mode 100644 index 0000000..c4a1988 --- /dev/null +++ b/t/recipes/checks/apache2/apache2-webapplications-general/build-spec/debian/phpmyfoo.postinst @@ -0,0 +1,11 @@ +#! /bin/sh + +set -e + +if [ "$1" = 'configure' ] ; then + a2enconf -q phpmyfoo +fi + +invoke-rc.d apache2 reload + +#DEBHELPER# diff --git a/t/recipes/checks/apache2/apache2-webapplications-general/build-spec/debian/phpmyfoo.postrm b/t/recipes/checks/apache2/apache2-webapplications-general/build-spec/debian/phpmyfoo.postrm new file mode 100644 index 0000000..d0db12e --- /dev/null +++ b/t/recipes/checks/apache2/apache2-webapplications-general/build-spec/debian/phpmyfoo.postrm @@ -0,0 +1,12 @@ +#!/bin/sh + +set -e + +if [ "$1" = 'configure' ] ; then + a2disconf -q phpmyfoo +fi + +invoke-rc.d apache2 reload + +#DEBHELPER# + diff --git a/t/recipes/checks/apache2/apache2-webapplications-general/build-spec/debian/phpmyfoo2.dirs b/t/recipes/checks/apache2/apache2-webapplications-general/build-spec/debian/phpmyfoo2.dirs new file mode 100644 index 0000000..31e10a9 --- /dev/null +++ b/t/recipes/checks/apache2/apache2-webapplications-general/build-spec/debian/phpmyfoo2.dirs @@ -0,0 +1 @@ +etc/apache2/conf-available diff --git a/t/recipes/checks/apache2/apache2-webapplications-general/build-spec/debian/phpmyfoo2.install b/t/recipes/checks/apache2/apache2-webapplications-general/build-spec/debian/phpmyfoo2.install new file mode 100644 index 0000000..b2da1d6 --- /dev/null +++ b/t/recipes/checks/apache2/apache2-webapplications-general/build-spec/debian/phpmyfoo2.install @@ -0,0 +1,3 @@ +phpmyfoo2 /etc/apache2/conf-available +local-phpmyfoo2.conf /etc/apache2/conf-available +false-positives.conf /etc/apache2/conf-available diff --git a/t/recipes/checks/apache2/apache2-webapplications-general/build-spec/debian/phpmyfoo3.dirs b/t/recipes/checks/apache2/apache2-webapplications-general/build-spec/debian/phpmyfoo3.dirs new file mode 100644 index 0000000..e9286b0 --- /dev/null +++ b/t/recipes/checks/apache2/apache2-webapplications-general/build-spec/debian/phpmyfoo3.dirs @@ -0,0 +1 @@ +etc/apache2/conf.d/ diff --git a/t/recipes/checks/apache2/apache2-webapplications-general/build-spec/debian/phpmyfoo3.install b/t/recipes/checks/apache2/apache2-webapplications-general/build-spec/debian/phpmyfoo3.install new file mode 100644 index 0000000..30fb624 --- /dev/null +++ b/t/recipes/checks/apache2/apache2-webapplications-general/build-spec/debian/phpmyfoo3.install @@ -0,0 +1 @@ +phpmyfoo.conf /etc/apache2/conf.d/ diff --git a/t/recipes/checks/apache2/apache2-webapplications-general/build-spec/fill-values b/t/recipes/checks/apache2/apache2-webapplications-general/build-spec/fill-values new file mode 100644 index 0000000..4bff8b5 --- /dev/null +++ b/t/recipes/checks/apache2/apache2-webapplications-general/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: upload-native +Testname: apache2-webapplications-general +Description: Several tests related to Apache2 web application packages diff --git a/t/recipes/checks/apache2/apache2-webapplications-general/build-spec/orig/false-positives.conf b/t/recipes/checks/apache2/apache2-webapplications-general/build-spec/orig/false-positives.conf new file mode 100644 index 0000000..e54f470 --- /dev/null +++ b/t/recipes/checks/apache2/apache2-webapplications-general/build-spec/orig/false-positives.conf @@ -0,0 +1,12 @@ +Alias /foo /usr/share/foo + + + + Order deny, allow + Require valid-user + + + Order deny, allow + Require valid-user + + diff --git a/t/recipes/checks/apache2/apache2-webapplications-general/build-spec/orig/local-phpmyfoo2.conf b/t/recipes/checks/apache2/apache2-webapplications-general/build-spec/orig/local-phpmyfoo2.conf new file mode 100644 index 0000000..2cc691e --- /dev/null +++ b/t/recipes/checks/apache2/apache2-webapplications-general/build-spec/orig/local-phpmyfoo2.conf @@ -0,0 +1 @@ + diff --git a/t/recipes/checks/apache2/apache2-webapplications-general/build-spec/orig/phpmyfoo.conf b/t/recipes/checks/apache2/apache2-webapplications-general/build-spec/orig/phpmyfoo.conf new file mode 100644 index 0000000..1e3c4e3 --- /dev/null +++ b/t/recipes/checks/apache2/apache2-webapplications-general/build-spec/orig/phpmyfoo.conf @@ -0,0 +1,14 @@ +# Depends: bar bar2.conf php7.0 +# Conflicts: notsupportedhere + +Alias /foo /usr/share/foo + + + WebAppConf + + Order deny, allow + Require valid-user + + AllowOverride None + + diff --git a/t/recipes/checks/apache2/apache2-webapplications-general/build-spec/orig/phpmyfoo2 b/t/recipes/checks/apache2/apache2-webapplications-general/build-spec/orig/phpmyfoo2 new file mode 100644 index 0000000..2cc691e --- /dev/null +++ b/t/recipes/checks/apache2/apache2-webapplications-general/build-spec/orig/phpmyfoo2 @@ -0,0 +1 @@ + diff --git a/t/recipes/checks/apache2/apache2-webapplications-general/eval/desc b/t/recipes/checks/apache2/apache2-webapplications-general/eval/desc new file mode 100644 index 0000000..5769247 --- /dev/null +++ b/t/recipes/checks/apache2/apache2-webapplications-general/eval/desc @@ -0,0 +1,2 @@ +Testname: apache2-webapplications-general +Check: apache2 diff --git a/t/recipes/checks/apache2/apache2-webapplications-general/eval/hints b/t/recipes/checks/apache2/apache2-webapplications-general/eval/hints new file mode 100644 index 0000000..6c17227 --- /dev/null +++ b/t/recipes/checks/apache2/apache2-webapplications-general/eval/hints @@ -0,0 +1,22 @@ +phpmyfoo3 (binary): non-standard-apache2-configuration-name phpmyfoo.conf != phpmyfoo3.conf [etc/apache2/conf.d/phpmyfoo.conf] +phpmyfoo3 (binary): apache2-unsupported-dependency Conflicts [etc/apache2/conf.d/phpmyfoo.conf:2] +phpmyfoo3 (binary): apache2-unparsable-dependency bar2.conf [etc/apache2/conf.d/phpmyfoo.conf:1] +phpmyfoo3 (binary): apache2-reverse-dependency-uses-obsolete-directory [etc/apache2/conf.d/phpmyfoo.conf] +phpmyfoo3 (binary): apache2-deprecated-auth-config Order [etc/apache2/conf.d/phpmyfoo.conf:9] +phpmyfoo3 (binary): apache2-deprecated-auth-config [etc/apache2/conf.d/phpmyfoo.conf:8] +phpmyfoo3 (binary): apache2-deprecated-auth-config [etc/apache2/conf.d/phpmyfoo.conf:11] +phpmyfoo2 (binary): non-standard-apache2-configuration-name phpmyfoo2 != phpmyfoo2.conf [etc/apache2/conf-available/phpmyfoo2] +phpmyfoo2 (binary): non-standard-apache2-configuration-name local-phpmyfoo2.conf != phpmyfoo2.conf [etc/apache2/conf-available/local-phpmyfoo2.conf] +phpmyfoo2 (binary): non-standard-apache2-configuration-name false-positives.conf != phpmyfoo2.conf [etc/apache2/conf-available/false-positives.conf] +phpmyfoo2 (binary): apache2-configuration-files-need-conf-suffix [etc/apache2/conf-available/phpmyfoo2] +phpmyfoo (binary): web-application-works-only-with-apache phpmyfoo.conf [etc/apache2/conf-available/phpmyfoo.conf] +phpmyfoo (binary): web-application-depends-on-apache2-data-package apache2-bin phpmyfoo.conf [etc/apache2/conf-available/phpmyfoo.conf] +phpmyfoo (binary): apache2-unsupported-dependency Conflicts [etc/apache2/conf-available/phpmyfoo.conf:2] +phpmyfoo (binary): apache2-unparsable-dependency bar2.conf [etc/apache2/conf-available/phpmyfoo.conf:1] +phpmyfoo (binary): apache2-reverse-dependency-calls-wrapper-script a2enconf [postinst:6] +phpmyfoo (binary): apache2-reverse-dependency-calls-wrapper-script a2disconf [postrm:6] +phpmyfoo (binary): apache2-reverse-dependency-calls-invoke-rc.d [postrm:9] +phpmyfoo (binary): apache2-reverse-dependency-calls-invoke-rc.d [postinst:9] +phpmyfoo (binary): apache2-deprecated-auth-config Order [etc/apache2/conf-available/phpmyfoo.conf:9] +phpmyfoo (binary): apache2-deprecated-auth-config [etc/apache2/conf-available/phpmyfoo.conf:8] +phpmyfoo (binary): apache2-deprecated-auth-config [etc/apache2/conf-available/phpmyfoo.conf:11] diff --git a/t/recipes/checks/application-not-library/application-not-library/build-spec/debian/control.in b/t/recipes/checks/application-not-library/application-not-library/build-spec/debian/control.in new file mode 100644 index 0000000..977a45c --- /dev/null +++ b/t/recipes/checks/application-not-library/application-not-library/build-spec/debian/control.in @@ -0,0 +1,87 @@ +Source: [% $source %] +Priority: optional +Section: devel +Maintainer: [% $author %] +Standards-Version: [% $standards_version %] +Build-Depends: [% $build_depends %], perl +Rules-Requires-Root: no + +Package: libapp-something-perl +Architecture: any +Section: perl +Depends: ${misc:Depends}, ${shlib:Depends} +Description: [% $description %] libapp + This is an App:: test package designed to exercise some feature or + tag of Lintian. It is part of the Lintian test suite and may do very + odd things. It should not be installed like a regular package. It + may be an empty package. + +Package: libapp-some-app-helper-module-perl +Architecture: any +Section: perl +Depends: ${misc:Depends}, ${shlib:Depends} +Description: libapp false positive test + This is an App:: test package designed to check if Lintian reports + false positives. It is part of the Lintian test suite and may do + very odd things. It should not be installed like a regular package. + It may be an empty package. + +Package: libsomething-else-perl +Architecture: any +Section: perl +Depends: ${misc:Depends}, ${shlib:Depends} +Description: [% $description %] else + This is a perl test package designed to exercise some feature or tag + of Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. + +Package: python-something +Architecture: any +Section: python +Depends: ${misc:Depends}, ${shlib:Depends} +Description: [% $description %] py + This is a Python test package designed to exercise some feature or + tag of Lintian. It is part of the Lintian test suite and may do very + odd things. It should not be installed like a regular package. It + may be an empty package. + +Package: ruby-something +Architecture: any +Section: ruby +Depends: ${misc:Depends}, ${shlib:Depends} +Description: [% $description %] rb + This is a ruby test package designed to exercise some feature or tag + of Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. + +Package: unspecified-something-pl +Architecture: any +Section: perl +Depends: ${misc:Depends}, ${shlib:Depends} +Description: [% $description %] pl + This is a perl-ish test package designed to exercise some feature or + tag of Lintian. It is part of the Lintian test suite and may do very + odd things. It should not be installed like a regular package. It + may be an empty package. + +Package: unspecified-something-py +Architecture: any +Section: python +Depends: ${misc:Depends}, ${shlib:Depends} +Description: [% $description %] py2 + This is a python-ish test package designed to exercise some feature + or tag of Lintian. It is part of the Lintian test suite and may do + very odd things. It should not be installed like a regular package. + It may be an empty package. + +Package: unspecified-something-rb +Architecture: any +Section: ruby +Depends: ${misc:Depends}, ${shlib:Depends} +Description: [% $description %] rb2 + This is a ruby-ish (rubbish? ;-) test package designed to exercise + some feature or tag of Lintian. It is part of the Lintian test suite + and may do very odd things. It should not be installed like a + regular package. It may be an empty package. diff --git a/t/recipes/checks/application-not-library/application-not-library/build-spec/debian/libapp-something-perl.install b/t/recipes/checks/application-not-library/application-not-library/build-spec/debian/libapp-something-perl.install new file mode 100644 index 0000000..388bdbd --- /dev/null +++ b/t/recipes/checks/application-not-library/application-not-library/build-spec/debian/libapp-something-perl.install @@ -0,0 +1 @@ +bin/libapp-something-perl usr/bin diff --git a/t/recipes/checks/application-not-library/application-not-library/build-spec/debian/libapp-something-perl.manpages b/t/recipes/checks/application-not-library/application-not-library/build-spec/debian/libapp-something-perl.manpages new file mode 100644 index 0000000..58d812c --- /dev/null +++ b/t/recipes/checks/application-not-library/application-not-library/build-spec/debian/libapp-something-perl.manpages @@ -0,0 +1 @@ +man/libapp-something-perl.1 diff --git a/t/recipes/checks/application-not-library/application-not-library/build-spec/debian/libsomething-else-perl.install b/t/recipes/checks/application-not-library/application-not-library/build-spec/debian/libsomething-else-perl.install new file mode 100644 index 0000000..2a4ae74 --- /dev/null +++ b/t/recipes/checks/application-not-library/application-not-library/build-spec/debian/libsomething-else-perl.install @@ -0,0 +1 @@ +bin/libsomething-else-perl usr/bin diff --git a/t/recipes/checks/application-not-library/application-not-library/build-spec/debian/libsomething-else-perl.manpages b/t/recipes/checks/application-not-library/application-not-library/build-spec/debian/libsomething-else-perl.manpages new file mode 100644 index 0000000..881b7a5 --- /dev/null +++ b/t/recipes/checks/application-not-library/application-not-library/build-spec/debian/libsomething-else-perl.manpages @@ -0,0 +1 @@ +man/libsomething-else-perl.1 diff --git a/t/recipes/checks/application-not-library/application-not-library/build-spec/debian/python-something.install b/t/recipes/checks/application-not-library/application-not-library/build-spec/debian/python-something.install new file mode 100644 index 0000000..ef65bd8 --- /dev/null +++ b/t/recipes/checks/application-not-library/application-not-library/build-spec/debian/python-something.install @@ -0,0 +1 @@ +bin/python-something usr/bin diff --git a/t/recipes/checks/application-not-library/application-not-library/build-spec/debian/python-something.manpages b/t/recipes/checks/application-not-library/application-not-library/build-spec/debian/python-something.manpages new file mode 100644 index 0000000..faae0d5 --- /dev/null +++ b/t/recipes/checks/application-not-library/application-not-library/build-spec/debian/python-something.manpages @@ -0,0 +1 @@ +man/python-something.1 diff --git a/t/recipes/checks/application-not-library/application-not-library/build-spec/debian/ruby-something.install b/t/recipes/checks/application-not-library/application-not-library/build-spec/debian/ruby-something.install new file mode 100644 index 0000000..b4178bb --- /dev/null +++ b/t/recipes/checks/application-not-library/application-not-library/build-spec/debian/ruby-something.install @@ -0,0 +1 @@ +bin/ruby-something usr/bin diff --git a/t/recipes/checks/application-not-library/application-not-library/build-spec/debian/ruby-something.manpages b/t/recipes/checks/application-not-library/application-not-library/build-spec/debian/ruby-something.manpages new file mode 100644 index 0000000..ada2f8d --- /dev/null +++ b/t/recipes/checks/application-not-library/application-not-library/build-spec/debian/ruby-something.manpages @@ -0,0 +1 @@ +man/ruby-something.1 diff --git a/t/recipes/checks/application-not-library/application-not-library/build-spec/debian/unspecified-something-pl.install b/t/recipes/checks/application-not-library/application-not-library/build-spec/debian/unspecified-something-pl.install new file mode 100644 index 0000000..bfbc4a0 --- /dev/null +++ b/t/recipes/checks/application-not-library/application-not-library/build-spec/debian/unspecified-something-pl.install @@ -0,0 +1 @@ +bin/unspecified-something-pl usr/bin diff --git a/t/recipes/checks/application-not-library/application-not-library/build-spec/debian/unspecified-something-pl.manpages b/t/recipes/checks/application-not-library/application-not-library/build-spec/debian/unspecified-something-pl.manpages new file mode 100644 index 0000000..01bebce --- /dev/null +++ b/t/recipes/checks/application-not-library/application-not-library/build-spec/debian/unspecified-something-pl.manpages @@ -0,0 +1 @@ +man/unspecified-something-pl.1 diff --git a/t/recipes/checks/application-not-library/application-not-library/build-spec/debian/unspecified-something-py.install b/t/recipes/checks/application-not-library/application-not-library/build-spec/debian/unspecified-something-py.install new file mode 100644 index 0000000..9615ca0 --- /dev/null +++ b/t/recipes/checks/application-not-library/application-not-library/build-spec/debian/unspecified-something-py.install @@ -0,0 +1 @@ +bin/unspecified-something-py usr/bin diff --git a/t/recipes/checks/application-not-library/application-not-library/build-spec/debian/unspecified-something-py.manpages b/t/recipes/checks/application-not-library/application-not-library/build-spec/debian/unspecified-something-py.manpages new file mode 100644 index 0000000..d8e6db5 --- /dev/null +++ b/t/recipes/checks/application-not-library/application-not-library/build-spec/debian/unspecified-something-py.manpages @@ -0,0 +1 @@ +man/unspecified-something-py.1 diff --git a/t/recipes/checks/application-not-library/application-not-library/build-spec/debian/unspecified-something-rb.install b/t/recipes/checks/application-not-library/application-not-library/build-spec/debian/unspecified-something-rb.install new file mode 100644 index 0000000..9502f60 --- /dev/null +++ b/t/recipes/checks/application-not-library/application-not-library/build-spec/debian/unspecified-something-rb.install @@ -0,0 +1 @@ +bin/unspecified-something-rb usr/bin diff --git a/t/recipes/checks/application-not-library/application-not-library/build-spec/debian/unspecified-something-rb.manpages b/t/recipes/checks/application-not-library/application-not-library/build-spec/debian/unspecified-something-rb.manpages new file mode 100644 index 0000000..3f89156 --- /dev/null +++ b/t/recipes/checks/application-not-library/application-not-library/build-spec/debian/unspecified-something-rb.manpages @@ -0,0 +1 @@ +man/unspecified-something-rb.1 diff --git a/t/recipes/checks/application-not-library/application-not-library/build-spec/fill-values b/t/recipes/checks/application-not-library/application-not-library/build-spec/fill-values new file mode 100644 index 0000000..cb8b119 --- /dev/null +++ b/t/recipes/checks/application-not-library/application-not-library/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: upload-native +Testname: application-not-library +Description: Test cases where packages look like libraries but are applications diff --git a/t/recipes/checks/application-not-library/application-not-library/build-spec/orig/bin/libapp-something-perl b/t/recipes/checks/application-not-library/application-not-library/build-spec/orig/bin/libapp-something-perl new file mode 100755 index 0000000..733bbce --- /dev/null +++ b/t/recipes/checks/application-not-library/application-not-library/build-spec/orig/bin/libapp-something-perl @@ -0,0 +1,3 @@ +#!/bin/sh + +echo Foobar diff --git a/t/recipes/checks/application-not-library/application-not-library/build-spec/orig/bin/libsomething-else-perl b/t/recipes/checks/application-not-library/application-not-library/build-spec/orig/bin/libsomething-else-perl new file mode 100755 index 0000000..733bbce --- /dev/null +++ b/t/recipes/checks/application-not-library/application-not-library/build-spec/orig/bin/libsomething-else-perl @@ -0,0 +1,3 @@ +#!/bin/sh + +echo Foobar diff --git a/t/recipes/checks/application-not-library/application-not-library/build-spec/orig/bin/python-something b/t/recipes/checks/application-not-library/application-not-library/build-spec/orig/bin/python-something new file mode 100755 index 0000000..733bbce --- /dev/null +++ b/t/recipes/checks/application-not-library/application-not-library/build-spec/orig/bin/python-something @@ -0,0 +1,3 @@ +#!/bin/sh + +echo Foobar diff --git a/t/recipes/checks/application-not-library/application-not-library/build-spec/orig/bin/ruby-something b/t/recipes/checks/application-not-library/application-not-library/build-spec/orig/bin/ruby-something new file mode 100755 index 0000000..733bbce --- /dev/null +++ b/t/recipes/checks/application-not-library/application-not-library/build-spec/orig/bin/ruby-something @@ -0,0 +1,3 @@ +#!/bin/sh + +echo Foobar diff --git a/t/recipes/checks/application-not-library/application-not-library/build-spec/orig/bin/unspecified-something-pl b/t/recipes/checks/application-not-library/application-not-library/build-spec/orig/bin/unspecified-something-pl new file mode 100755 index 0000000..733bbce --- /dev/null +++ b/t/recipes/checks/application-not-library/application-not-library/build-spec/orig/bin/unspecified-something-pl @@ -0,0 +1,3 @@ +#!/bin/sh + +echo Foobar diff --git a/t/recipes/checks/application-not-library/application-not-library/build-spec/orig/bin/unspecified-something-py b/t/recipes/checks/application-not-library/application-not-library/build-spec/orig/bin/unspecified-something-py new file mode 100755 index 0000000..733bbce --- /dev/null +++ b/t/recipes/checks/application-not-library/application-not-library/build-spec/orig/bin/unspecified-something-py @@ -0,0 +1,3 @@ +#!/bin/sh + +echo Foobar diff --git a/t/recipes/checks/application-not-library/application-not-library/build-spec/orig/bin/unspecified-something-rb b/t/recipes/checks/application-not-library/application-not-library/build-spec/orig/bin/unspecified-something-rb new file mode 100755 index 0000000..733bbce --- /dev/null +++ b/t/recipes/checks/application-not-library/application-not-library/build-spec/orig/bin/unspecified-something-rb @@ -0,0 +1,3 @@ +#!/bin/sh + +echo Foobar diff --git a/t/recipes/checks/application-not-library/application-not-library/build-spec/orig/man/libapp-something-perl.1 b/t/recipes/checks/application-not-library/application-not-library/build-spec/orig/man/libapp-something-perl.1 new file mode 100644 index 0000000..00d58c9 --- /dev/null +++ b/t/recipes/checks/application-not-library/application-not-library/build-spec/orig/man/libapp-something-perl.1 @@ -0,0 +1,6 @@ +.TH YES "1" "April 2015" "Foobar" "User Commands" +.SH NAME +foobar \- fnords something until killes +.SH SYNOPSIS +.B foobar +[\fISOMETHING\fR]... diff --git a/t/recipes/checks/application-not-library/application-not-library/build-spec/orig/man/libsomething-else-perl.1 b/t/recipes/checks/application-not-library/application-not-library/build-spec/orig/man/libsomething-else-perl.1 new file mode 100644 index 0000000..00d58c9 --- /dev/null +++ b/t/recipes/checks/application-not-library/application-not-library/build-spec/orig/man/libsomething-else-perl.1 @@ -0,0 +1,6 @@ +.TH YES "1" "April 2015" "Foobar" "User Commands" +.SH NAME +foobar \- fnords something until killes +.SH SYNOPSIS +.B foobar +[\fISOMETHING\fR]... diff --git a/t/recipes/checks/application-not-library/application-not-library/build-spec/orig/man/python-something.1 b/t/recipes/checks/application-not-library/application-not-library/build-spec/orig/man/python-something.1 new file mode 100644 index 0000000..00d58c9 --- /dev/null +++ b/t/recipes/checks/application-not-library/application-not-library/build-spec/orig/man/python-something.1 @@ -0,0 +1,6 @@ +.TH YES "1" "April 2015" "Foobar" "User Commands" +.SH NAME +foobar \- fnords something until killes +.SH SYNOPSIS +.B foobar +[\fISOMETHING\fR]... diff --git a/t/recipes/checks/application-not-library/application-not-library/build-spec/orig/man/ruby-something.1 b/t/recipes/checks/application-not-library/application-not-library/build-spec/orig/man/ruby-something.1 new file mode 100644 index 0000000..00d58c9 --- /dev/null +++ b/t/recipes/checks/application-not-library/application-not-library/build-spec/orig/man/ruby-something.1 @@ -0,0 +1,6 @@ +.TH YES "1" "April 2015" "Foobar" "User Commands" +.SH NAME +foobar \- fnords something until killes +.SH SYNOPSIS +.B foobar +[\fISOMETHING\fR]... diff --git a/t/recipes/checks/application-not-library/application-not-library/build-spec/orig/man/unspecified-something-pl.1 b/t/recipes/checks/application-not-library/application-not-library/build-spec/orig/man/unspecified-something-pl.1 new file mode 100644 index 0000000..00d58c9 --- /dev/null +++ b/t/recipes/checks/application-not-library/application-not-library/build-spec/orig/man/unspecified-something-pl.1 @@ -0,0 +1,6 @@ +.TH YES "1" "April 2015" "Foobar" "User Commands" +.SH NAME +foobar \- fnords something until killes +.SH SYNOPSIS +.B foobar +[\fISOMETHING\fR]... diff --git a/t/recipes/checks/application-not-library/application-not-library/build-spec/orig/man/unspecified-something-py.1 b/t/recipes/checks/application-not-library/application-not-library/build-spec/orig/man/unspecified-something-py.1 new file mode 100644 index 0000000..00d58c9 --- /dev/null +++ b/t/recipes/checks/application-not-library/application-not-library/build-spec/orig/man/unspecified-something-py.1 @@ -0,0 +1,6 @@ +.TH YES "1" "April 2015" "Foobar" "User Commands" +.SH NAME +foobar \- fnords something until killes +.SH SYNOPSIS +.B foobar +[\fISOMETHING\fR]... diff --git a/t/recipes/checks/application-not-library/application-not-library/build-spec/orig/man/unspecified-something-rb.1 b/t/recipes/checks/application-not-library/application-not-library/build-spec/orig/man/unspecified-something-rb.1 new file mode 100644 index 0000000..00d58c9 --- /dev/null +++ b/t/recipes/checks/application-not-library/application-not-library/build-spec/orig/man/unspecified-something-rb.1 @@ -0,0 +1,6 @@ +.TH YES "1" "April 2015" "Foobar" "User Commands" +.SH NAME +foobar \- fnords something until killes +.SH SYNOPSIS +.B foobar +[\fISOMETHING\fR]... diff --git a/t/recipes/checks/application-not-library/application-not-library/eval/desc b/t/recipes/checks/application-not-library/application-not-library/eval/desc new file mode 100644 index 0000000..58a9992 --- /dev/null +++ b/t/recipes/checks/application-not-library/application-not-library/eval/desc @@ -0,0 +1,2 @@ +Testname: application-not-library +Check: application-not-library diff --git a/t/recipes/checks/application-not-library/application-not-library/eval/hints b/t/recipes/checks/application-not-library/application-not-library/eval/hints new file mode 100644 index 0000000..ebae992 --- /dev/null +++ b/t/recipes/checks/application-not-library/application-not-library/eval/hints @@ -0,0 +1,11 @@ +unspecified-something-rb (binary): application-in-library-section ruby [usr/bin/unspecified-something-rb] +unspecified-something-py (binary): application-in-library-section python [usr/bin/unspecified-something-py] +unspecified-something-pl (binary): application-in-library-section perl [usr/bin/unspecified-something-pl] +ruby-something (binary): library-package-name-for-application [usr/bin/ruby-something] +ruby-something (binary): application-in-library-section ruby [usr/bin/ruby-something] +python-something (binary): library-package-name-for-application [usr/bin/python-something] +python-something (binary): application-in-library-section python [usr/bin/python-something] +libsomething-else-perl (binary): library-package-name-for-application [usr/bin/libsomething-else-perl] +libsomething-else-perl (binary): application-in-library-section perl [usr/bin/libsomething-else-perl] +libapp-something-perl (binary): libapp-perl-package-name [usr/bin/libapp-something-perl] +libapp-something-perl (binary): application-in-library-section perl [usr/bin/libapp-something-perl] diff --git a/t/recipes/checks/appstream-metadata/appstream-metadata/build-spec/debian/appstream-metadata-invalid.metadata.xml b/t/recipes/checks/appstream-metadata/appstream-metadata/build-spec/debian/appstream-metadata-invalid.metadata.xml new file mode 100644 index 0000000..a823b8d --- /dev/null +++ b/t/recipes/checks/appstream-metadata/appstream-metadata/build-spec/debian/appstream-metadata-invalid.metadata.xml @@ -0,0 +1 @@ +This is not a valid XML document. diff --git a/t/recipes/checks/appstream-metadata/appstream-metadata/build-spec/debian/appstream-metadata-obsolete.metadata.xml b/t/recipes/checks/appstream-metadata/appstream-metadata/build-spec/debian/appstream-metadata-obsolete.metadata.xml new file mode 100644 index 0000000..31d281e --- /dev/null +++ b/t/recipes/checks/appstream-metadata/appstream-metadata/build-spec/debian/appstream-metadata-obsolete.metadata.xml @@ -0,0 +1,2 @@ + + diff --git a/t/recipes/checks/appstream-metadata/appstream-metadata/build-spec/debian/appstream-metadata.desktop b/t/recipes/checks/appstream-metadata/appstream-metadata/build-spec/debian/appstream-metadata.desktop new file mode 100644 index 0000000..4c91430 --- /dev/null +++ b/t/recipes/checks/appstream-metadata/appstream-metadata/build-spec/debian/appstream-metadata.desktop @@ -0,0 +1,8 @@ +[Desktop Entry] +Version=1.0 +Type=Application +Name=appstream-udev-data +Terminal=true +Exec=true +Categories=ConsoleOnly;Game; +Keywords=Text; diff --git a/t/recipes/checks/appstream-metadata/appstream-metadata/build-spec/debian/appstream-metadata.dirs b/t/recipes/checks/appstream-metadata/appstream-metadata/build-spec/debian/appstream-metadata.dirs new file mode 100644 index 0000000..402f5d5 --- /dev/null +++ b/t/recipes/checks/appstream-metadata/appstream-metadata/build-spec/debian/appstream-metadata.dirs @@ -0,0 +1,2 @@ +usr/share/metainfo +usr/share/appdata diff --git a/t/recipes/checks/appstream-metadata/appstream-metadata/build-spec/debian/appstream-metadata.metadata.xml b/t/recipes/checks/appstream-metadata/appstream-metadata/build-spec/debian/appstream-metadata.metadata.xml new file mode 100644 index 0000000..82294c1 --- /dev/null +++ b/t/recipes/checks/appstream-metadata/appstream-metadata/build-spec/debian/appstream-metadata.metadata.xml @@ -0,0 +1,22 @@ + + + appstream-udev-data + MIT + lintian appstream-udev-data + Test AppStream and udev related checks in lintian + +

      + This is a test package designed to exercise some feature or tag + of Lintian. It is part of the Lintian test suite and may do + very odd things. It should not be installed like a regular + package. It may be an empty package. +

      +
      + + usb:v0000p0001d* + usb:v0000p0002d* + usb:v0000p0003d* + usb:v0000p0004d* + usb:v0000p000ad* + +
      diff --git a/t/recipes/checks/appstream-metadata/appstream-metadata/build-spec/debian/appstream-metadata.udev b/t/recipes/checks/appstream-metadata/appstream-metadata/build-spec/debian/appstream-metadata.udev new file mode 100644 index 0000000..e2f2841 --- /dev/null +++ b/t/recipes/checks/appstream-metadata/appstream-metadata/build-spec/debian/appstream-metadata.udev @@ -0,0 +1,14 @@ +SUBSYSTEM=="usb", ACTION=="add", ATTR{idVendor}=="0000", ATTR{idProduct}=="0001", \ + MODE="0666" + +SUBSYSTEM=="usb", ACTION=="add", ATTR{idVendor}=="0000", ATTR{idProduct}=="0002", \ + MODE="0660", GROUP="plugdev" + +SUBSYSTEM=="usb", ACTION=="add", ATTR{idVendor}=="0000", ATTR{idProduct}=="0003", \ + TAG+="uaccess" + +SUBSYSTEM=="usb", ACTION=="add", ATTR{idVendor}=="0000", ATTR{idProduct}=="0004", \ + MODE="0660", GROUP="plugdev", TAG+="uaccess" + +SUBSYSTEM=="usb", ACTION=="add", ATTR{idVendor}=="0000", ATTR{idProduct}=="000a", \ + ID_TEST_DEVICE="1" diff --git a/t/recipes/checks/appstream-metadata/appstream-metadata/build-spec/debian/rules b/t/recipes/checks/appstream-metadata/appstream-metadata/build-spec/debian/rules new file mode 100644 index 0000000..5fb0c35 --- /dev/null +++ b/t/recipes/checks/appstream-metadata/appstream-metadata/build-spec/debian/rules @@ -0,0 +1,15 @@ +#!/usr/bin/make -f + +DESTDIR = debian/$(shell dh_listpackages) +APPSYNC_DIR=$(DESTDIR)/usr/share/metainfo/ +OBSOLETE_APPSYNC_DIR=$(DESTDIR)/usr/share/appdata/ +UDEV_DIR=$(DESTDIR)/lib/udev/rules.d/ + +%: + dh $@ + +override_dh_install: + dh_install + install -m 0644 debian/appstream-metadata.metadata.xml $(APPSYNC_DIR) + install -m 0644 debian/appstream-metadata-invalid.metadata.xml $(APPSYNC_DIR) + install -m 0644 debian/appstream-metadata-obsolete.metadata.xml $(OBSOLETE_APPSYNC_DIR) diff --git a/t/recipes/checks/appstream-metadata/appstream-metadata/build-spec/fill-values b/t/recipes/checks/appstream-metadata/appstream-metadata/build-spec/fill-values new file mode 100644 index 0000000..cfd5595 --- /dev/null +++ b/t/recipes/checks/appstream-metadata/appstream-metadata/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: upload-native +Testname: appstream-metadata +Description: Test AppStream and udev metadata in binary package diff --git a/t/recipes/checks/appstream-metadata/appstream-metadata/eval/desc b/t/recipes/checks/appstream-metadata/appstream-metadata/eval/desc new file mode 100644 index 0000000..0482336 --- /dev/null +++ b/t/recipes/checks/appstream-metadata/appstream-metadata/eval/desc @@ -0,0 +1,2 @@ +Testname: appstream-metadata +Check: appstream-metadata diff --git a/t/recipes/checks/appstream-metadata/appstream-metadata/eval/hints b/t/recipes/checks/appstream-metadata/appstream-metadata/eval/hints new file mode 100644 index 0000000..19f6c71 --- /dev/null +++ b/t/recipes/checks/appstream-metadata/appstream-metadata/eval/hints @@ -0,0 +1,5 @@ +appstream-metadata (binary): appstream-metadata-missing-modalias-provide match rule usb:v0000p000Ad* [lib/udev/rules.d/60-appstream-metadata.rules:13] +appstream-metadata (binary): appstream-metadata-malformed-modalias-provide include non-valid hex digit in USB matching rule 'usb:v0000p000ad*' [usr/share/metainfo/appstream-metadata.metadata.xml] +appstream-metadata (binary): appstream-metadata-legacy-format [usr/share/appdata/appstream-metadata-obsolete.metadata.xml] +appstream-metadata (binary): appstream-metadata-invalid [usr/share/metainfo/appstream-metadata-invalid.metadata.xml] +appstream-metadata (binary): appstream-metadata-in-legacy-location [usr/share/appdata/appstream-metadata-obsolete.metadata.xml] diff --git a/t/recipes/checks/apt/files-foo-in-bar/build-spec/debian/clean b/t/recipes/checks/apt/files-foo-in-bar/build-spec/debian/clean new file mode 100644 index 0000000..be4ae72 --- /dev/null +++ b/t/recipes/checks/apt/files-foo-in-bar/build-spec/debian/clean @@ -0,0 +1,5 @@ +bar.1* +Bar.pm +bar.png +perllocal.pod +preferences diff --git a/t/recipes/checks/apt/files-foo-in-bar/build-spec/debian/dirs b/t/recipes/checks/apt/files-foo-in-bar/build-spec/debian/dirs new file mode 100644 index 0000000..e8759c9 --- /dev/null +++ b/t/recipes/checks/apt/files-foo-in-bar/build-spec/debian/dirs @@ -0,0 +1,15 @@ +etc/apt/preferences.d +etc/apt +etc/init +bin/foo +mnt/foo +tmp/foo +usr/bin/foo +usr/foo +usr/lib/debug +usr/local/foo +usr/lib/site-python/foo +usr/share/doc/files-foo-in-bar/examples/examples +var/foo +var/lock/foo +var/run/foo diff --git a/t/recipes/checks/apt/files-foo-in-bar/build-spec/debian/install b/t/recipes/checks/apt/files-foo-in-bar/build-spec/debian/install new file mode 100644 index 0000000..ba46865 --- /dev/null +++ b/t/recipes/checks/apt/files-foo-in-bar/build-spec/debian/install @@ -0,0 +1,61 @@ +bar bin/foo +bar emul +bar etc/apt/preferences.d +bar etc/apt/sources.list.d +bar etc/apt/trusted.gpg.d +bar etc/gconf/schemas/ +bar etc/init +bar etc/rc.boot +bar etc/rc.d +bar etc/udev/rules.d +bar lib32 +bar lib64 +bar libx32 +bar mnt/foo +bar run/foo +bar srv/foo +bar tmp/foo +bar usr/bin/foo +bar usr/foo +bar usr/lib/debug/ +bar usr/lib32 +bar usr/lib64 +bar usr/libexec +bar usr/libx32 +bar usr/lib/perl/ +bar usr/lib/python2.7/ +bar usr/lib/sgml +bar usr/lib/site-python/foo +bar usr/local/foo +bar usr/share +bar usr/share/doc +bar usr/share/doc/files-foo-in-bar/.xvpics/ +bar usr/share/doc/files-foo-in-bar/.thumbnails/ +bar usr/share/doc/files-foo-in-bar/examples/examples +bar usr/share/mime/foo/ +bar usr/share/mime/packages/ +bar usr/share/perl/ +bar usr/share/vim/vimcurrent/ +bar usr/share/vim/vim73/ +bar usr/X11R6/bin +bar usr/X11R6/lib/X11/fonts/ +bar var/foo +bar var/lock/foo +bar var/run/foo +bar var/www/foo +bar home/johndoe +bar root +bar etc/opt +bar var/cache/pbuilder/build +bar var/lib/sbuild +bar var/lib/buildd +bar build/dir/foo +bar tmp/buildd/dir/foo +bar etc/dhcp3 + +Bar.pm usr/lib/perl5/Foo +bar.png usr/lib/files-foo-in-bar + +perllocal.pod usr/lib/perl-foo +.packlist usr/lib/perl5 +preferences etc/apt diff --git a/t/recipes/checks/apt/files-foo-in-bar/build-spec/debian/manpages b/t/recipes/checks/apt/files-foo-in-bar/build-spec/debian/manpages new file mode 100644 index 0000000..e69de29 diff --git a/t/recipes/checks/apt/files-foo-in-bar/build-spec/debian/rules b/t/recipes/checks/apt/files-foo-in-bar/build-spec/debian/rules new file mode 100755 index 0000000..69a61df --- /dev/null +++ b/t/recipes/checks/apt/files-foo-in-bar/build-spec/debian/rules @@ -0,0 +1,18 @@ +#!/usr/bin/make -f +%: + dh $@ + +override_dh_auto_build: + pod2man --section 1 bar.pod > bar.1 + gzip -n --best bar.1 + cp bar Bar.pm + cp bar bar.png + cp bar perllocal.pod + touch .packlist + touch preferences + +override_dh_auto_install: + dh_install bar.1.gz usr/X11R6/man/man1/ + +# skip +override_dh_usrlocal override_dh_gconf: diff --git a/t/recipes/checks/apt/files-foo-in-bar/build-spec/fill-values b/t/recipes/checks/apt/files-foo-in-bar/build-spec/fill-values new file mode 100644 index 0000000..17ea927 --- /dev/null +++ b/t/recipes/checks/apt/files-foo-in-bar/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: upload-native +Testname: files-foo-in-bar +Description: Test tags about files or dirs in given paths diff --git a/t/recipes/checks/apt/files-foo-in-bar/build-spec/orig/bar b/t/recipes/checks/apt/files-foo-in-bar/build-spec/orig/bar new file mode 100644 index 0000000..980a0d5 --- /dev/null +++ b/t/recipes/checks/apt/files-foo-in-bar/build-spec/orig/bar @@ -0,0 +1 @@ +Hello World! diff --git a/t/recipes/checks/apt/files-foo-in-bar/build-spec/orig/bar.pod b/t/recipes/checks/apt/files-foo-in-bar/build-spec/orig/bar.pod new file mode 100644 index 0000000..4144a36 --- /dev/null +++ b/t/recipes/checks/apt/files-foo-in-bar/build-spec/orig/bar.pod @@ -0,0 +1,18 @@ + +=head1 NAME + +bar - does stuff + +=head1 SYNOPSIS + +bar + +=head1 DESCRIPTION + +Does nothing. + +=head1 AUTHOR + +Niels Thykier + +=cut diff --git a/t/recipes/checks/apt/files-foo-in-bar/eval/desc b/t/recipes/checks/apt/files-foo-in-bar/eval/desc new file mode 100644 index 0000000..50af70a --- /dev/null +++ b/t/recipes/checks/apt/files-foo-in-bar/eval/desc @@ -0,0 +1,2 @@ +Testname: files-foo-in-bar +Check: apt diff --git a/t/recipes/checks/apt/files-foo-in-bar/eval/hints b/t/recipes/checks/apt/files-foo-in-bar/eval/hints new file mode 100644 index 0000000..f3d213b --- /dev/null +++ b/t/recipes/checks/apt/files-foo-in-bar/eval/hints @@ -0,0 +1,4 @@ +files-foo-in-bar (binary): package-installs-apt-sources [etc/apt/sources.list.d/bar] +files-foo-in-bar (binary): package-installs-apt-preferences [etc/apt/preferences] +files-foo-in-bar (binary): package-installs-apt-preferences [etc/apt/preferences.d/bar] +files-foo-in-bar (binary): package-installs-apt-keyring [etc/apt/trusted.gpg.d/bar] diff --git a/t/recipes/checks/apt/files-foo-in-bar/eval/post-test b/t/recipes/checks/apt/files-foo-in-bar/eval/post-test new file mode 100644 index 0000000..5af7ea2 --- /dev/null +++ b/t/recipes/checks/apt/files-foo-in-bar/eval/post-test @@ -0,0 +1,2 @@ +# Ignore all duplicate-files tags +/[^ ]* \([^)]*\): duplicate-files .*/ d diff --git a/t/recipes/checks/archive/file/name/length/filename-length-really-really-really-really-long-package-name/build-spec/fill-values b/t/recipes/checks/archive/file/name/length/filename-length-really-really-really-really-long-package-name/build-spec/fill-values new file mode 100644 index 0000000..7121e0b --- /dev/null +++ b/t/recipes/checks/archive/file/name/length/filename-length-really-really-really-really-long-package-name/build-spec/fill-values @@ -0,0 +1,4 @@ +Testname: filename-length-really-really-really-really-long-package-name +Version: 1.0.and.a.really.long.version.too-1 +Skeleton: upload-non-native +Description: General length of package file names diff --git a/t/recipes/checks/archive/file/name/length/filename-length-really-really-really-really-long-package-name/eval/desc b/t/recipes/checks/archive/file/name/length/filename-length-really-really-really-really-long-package-name/eval/desc new file mode 100644 index 0000000..4bf733d --- /dev/null +++ b/t/recipes/checks/archive/file/name/length/filename-length-really-really-really-really-long-package-name/eval/desc @@ -0,0 +1,2 @@ +Testname: filename-length-really-really-really-really-long-package-name +Check: archive/file/name/length diff --git a/t/recipes/checks/archive/file/name/length/filename-length-really-really-really-really-long-package-name/eval/hints b/t/recipes/checks/archive/file/name/length/filename-length-really-really-really-really-long-package-name/eval/hints new file mode 100644 index 0000000..c1a0b80 --- /dev/null +++ b/t/recipes/checks/archive/file/name/length/filename-length-really-really-really-really-long-package-name/eval/hints @@ -0,0 +1,6 @@ +filename-length-really-really-really-really-long-package-name (source): source-package-component-has-long-file-name filename-length-really-really-really-really-long-package-name_1.0.and.a.really.long.version.too.orig.tar.gz +filename-length-really-really-really-really-long-package-name (source): source-package-component-has-long-file-name filename-length-really-really-really-really-long-package-name_1.0.and.a.really.long.version.too-1.debian.tar.xz +filename-length-really-really-really-really-long-package-name (source): package-has-long-file-name filename-length-really-really-really-really-long-package-name_1.0.and.a.really.long.version.too-1.dsc +filename-length-really-really-really-really-long-package-name (changes): package-has-long-file-name filename-length-really-really-really-really-long-package-name_1.0.and.a.really.long.version.too-1_ARCHITECTURE.changes +filename-length-really-really-really-really-long-package-name (buildinfo): package-has-long-file-name filename-length-really-really-really-really-long-package-name_1.0.and.a.really.long.version.too-1_ARCHITECTURE.buildinfo +filename-length-really-really-really-really-long-package-name (binary): package-has-long-file-name filename-length-really-really-really-really-long-package-name_1.0.and.a.really.long.version.too-1_all.deb diff --git a/t/recipes/checks/archive/file/name/length/filename-length-really-really-really-really-long-package-name/eval/post-test b/t/recipes/checks/archive/file/name/length/filename-length-really-really-really-really-long-package-name/eval/post-test new file mode 100644 index 0000000..52f65a6 --- /dev/null +++ b/t/recipes/checks/archive/file/name/length/filename-length-really-really-really-really-long-package-name/eval/post-test @@ -0,0 +1,2 @@ +s/_[[:alnum:]]*.changes$/_ARCHITECTURE.changes/ +s/_[[:alnum:]]*.buildinfo$/_ARCHITECTURE.buildinfo/ diff --git a/t/recipes/checks/archive/liberty/mismatch/fields-section-general/build-spec/debian/control.in b/t/recipes/checks/archive/liberty/mismatch/fields-section-general/build-spec/debian/control.in new file mode 100644 index 0000000..25106b7 --- /dev/null +++ b/t/recipes/checks/archive/liberty/mismatch/fields-section-general/build-spec/debian/control.in @@ -0,0 +1,31 @@ +Source: [% $source %] +Priority: optional +Section: contrib/[% $section %] +Maintainer: [% $author %] +Standards-Version: [% $standards_version %] +Build-Depends: [% $build_depends %] +Rules-Requires-Root: no + +Package: [% $source %] +Architecture: all +Section: contrib/dveel +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: [% $description %] (typo) + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. + . + This package has a typo in its section fields. + +Package: [% $source %]-main +Architecture: all +Section: [% $section %] +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: [% $description %] (main) + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. + . + This package can go to main. diff --git a/t/recipes/checks/archive/liberty/mismatch/fields-section-general/build-spec/fill-values b/t/recipes/checks/archive/liberty/mismatch/fields-section-general/build-spec/fill-values new file mode 100644 index 0000000..f8cf9f7 --- /dev/null +++ b/t/recipes/checks/archive/liberty/mismatch/fields-section-general/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: upload-native +Testname: fields-section-general +Description: Test for general section/area issues diff --git a/t/recipes/checks/archive/liberty/mismatch/fields-section-general/eval/desc b/t/recipes/checks/archive/liberty/mismatch/fields-section-general/eval/desc new file mode 100644 index 0000000..b374791 --- /dev/null +++ b/t/recipes/checks/archive/liberty/mismatch/fields-section-general/eval/desc @@ -0,0 +1,2 @@ +Testname: fields-section-general +Check: archive/liberty/mismatch diff --git a/t/recipes/checks/archive/liberty/mismatch/fields-section-general/eval/hints b/t/recipes/checks/archive/liberty/mismatch/fields-section-general/eval/hints new file mode 100644 index 0000000..77d1d3e --- /dev/null +++ b/t/recipes/checks/archive/liberty/mismatch/fields-section-general/eval/hints @@ -0,0 +1 @@ +fields-section-general (source): archive-liberty-mismatch (in section for fields-section-general-main) main vs contrib [debian/control:23] diff --git a/t/recipes/checks/archive/liberty/mismatch/legacy-relations/build-spec/debian/changelog.in b/t/recipes/checks/archive/liberty/mismatch/legacy-relations/build-spec/debian/changelog.in new file mode 100644 index 0000000..9a82ea7 --- /dev/null +++ b/t/recipes/checks/archive/liberty/mismatch/legacy-relations/build-spec/debian/changelog.in @@ -0,0 +1,33 @@ +relations ([% $version %]) [% $distribution %]; urgency=low + + * I'm orphaning this package -- I'm sick of it: it's completely broken, + lintian complains all over the place. + + -- Jeroen van Wolffelaar Sun, 02 Dec 2007 15:59:59 -0800 + +relations (4) unstable; urgency=low + + * Added a package that tests dependencies for multiple versions of + libraries, and test some description stuff in there as well. + + -- Josip Rodin Fri, 29 Nov 2002 20:13:33 +0100 + +relations (3) unstable; urgency=low + + * Added a virtual provides to test against my virtual depends without + a real package first test + + -- Sean 'Shaleh' Perry Thu, 8 Feb 2001 11:29:53 -0800 + +relations (2) unstable; urgency=low + + * Added a depends on dpkg (violates policy) and a versioned depends + on bash (follows policy) + + -- Sean 'Shaleh' Perry Fri, 2 Feb 2001 12:37:17 -0800 + +relations (1) unstable; urgency=low + + * Initial version + + -- Richard Braakman Tue, 7 Jul 1998 16:27:56 +0200 diff --git a/t/recipes/checks/archive/liberty/mismatch/legacy-relations/build-spec/debian/control b/t/recipes/checks/archive/liberty/mismatch/legacy-relations/build-spec/debian/control new file mode 100644 index 0000000..6cd1c04 --- /dev/null +++ b/t/recipes/checks/archive/liberty/mismatch/legacy-relations/build-spec/debian/control @@ -0,0 +1,51 @@ +Source: relations +Section: misc +Priority: optional +Build-Depends: mail-transport-agent, libc6-dev, findutils, foo (= 3) [!amd64 !i386], bar, arch-test1 [i386], arch-test2 [!i386], quilt (>= 0.40), perl +Build-Depends-Indep: make, bash, debmake, build-essential, baz (= 2.0), ghostscript | gs, + car (>= 1.0), car (<= 2.0), caz (= 1.0) [amd64], caz (>= 2.0) [i386], + caz (= 2.0) [powerpc], perl (>= 5.0), foo (<< 4) [!amd64 !i386], libfoo (>= 1.2-1), bozzle [kfreebsd-i386] +Build-Conflicts: foo [amd64 i386], bar [alpha test], xlibs-dev, arch-test1 [powerpc], arch-test2 [!sparc] +Build-Conflicts-Indep: debmake [!powerpc] +Maintainer: Debian QA Group +Standards-Version: 3.7.3 +Homepage: lintian.debian.org +Origin: Debian +Bugs: debbugs://bugs.debian.org/ + +Package: relations +Architecture: all +Section: contrib/misc +Pre-Depends: awk|gawk +Depends: relations(<< 3), dpkg, bash (>> 2.0 ), mail-transport-agent, gawk | awk, foo (>> 2.0), foo (<< 2.2), coreutils, ,null (>= 0), ${misc:Depends}, makedev +Provides: mail-reader +Replaces: relations +Conflicts: foobar (<< 5+5), foo, relations, + gnuwdf, +Suggests: alpha, gnu (>= 44-3-4-8-11.4) | ung (<< 89beta) | nug | ngu, beta, some-other-package +Recommends: emacs21 | emacsen, dpkg, null, some-other-package, ${f-oo:b-ar}, gs | ghostscript | gs-aladdin +Description: Strange dependency relationships (dummy) + This package declares relationships designed to tickle lintian's "fields" + check. It should generate a number of tags for these. + . + The package is built with "dpkg --build --no-check", because some of the + relationships used here are normally rejected by dpkg. + +Package: relations-multiple-libs +Architecture: all +Section: non-free/misc +Depends: libstdc++2.10, libstdc++2.10-glibc2.2, libstdc++3.0, tk8.2, tk8.3, tcl8.0, tcl8.2, tkx8.2, tkx8.3, tclx8.2, libpng2, libpng3, xorg, ${shlibs:Depends}, makedev | udev +Provides: awk +Enhances: foo +Recommends: ${shlibs:Depends}, relations-multiple-libs, gs | gs-gpl, makedev +Breaks: libpng3 (<< 1.0), libpng2 +Suggests: x-dev, ghostscript | gs +Description: Duplicate library dependency relationships. + Duplicate library dependency relationships. + This tests the depending on different versions of the same library + at the same time. + . + At the same time, it conveniently tests some description file checks. :) + . + It is a metapackage from the lintian perspective, so the xorg dependency + should be allowed. diff --git a/t/recipes/checks/archive/liberty/mismatch/legacy-relations/build-spec/debian/rules b/t/recipes/checks/archive/liberty/mismatch/legacy-relations/build-spec/debian/rules new file mode 100755 index 0000000..5027f33 --- /dev/null +++ b/t/recipes/checks/archive/liberty/mismatch/legacy-relations/build-spec/debian/rules @@ -0,0 +1,49 @@ +#!/usr/bin/make -f + +# Copyright (C) 1998 Richard Braakman +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +build-arch: + +build-indep: + +build: build-arch build-indep + +binary-arch: + +binary-indep: + install -d debian/tmp/DEBIAN + dpkg-gencontrol -prelations -isp + dpkg --build debian/tmp ../relations_5_all.deb + install -d debian/tmp/usr/share/doc/ + ln -s relations debian/tmp/usr/share/doc/relations-multiple-libs + dpkg-gencontrol -prelations-multiple-libs -isp + dpkg --build debian/tmp ../relations-multiple-libs_5_all.deb + +binary: binary-arch binary-indep + +clean:: + rm -rf debian/tmp debian/files + +# Test allowing quilt Build-Depends for manual quilt invocations. + TESTING=foo ANOTHER=bar quilt || true + +# Test requiring perl Build-Depends for manual perl invocations. + [ ! -f Build ] || $(PERL) Build distclean + +.PHONY: build-arch build-indep build binary-arch binary-indep binary clean diff --git a/t/recipes/checks/archive/liberty/mismatch/legacy-relations/build-spec/debian/tmp/DEBIAN/control b/t/recipes/checks/archive/liberty/mismatch/legacy-relations/build-spec/debian/tmp/DEBIAN/control new file mode 100644 index 0000000..87e7fe6 --- /dev/null +++ b/t/recipes/checks/archive/liberty/mismatch/legacy-relations/build-spec/debian/tmp/DEBIAN/control @@ -0,0 +1,14 @@ +Package: relations-multiple-libs +Version: 4 +Section: misc +Priority: optional +Architecture: all +Depends: libstdc++2.10, libstdc++2.10-glibc2.2, libstdc++3.0, tk8.2, tk8.3, tcl8.0, tcl8.2, tkx8.2, tkx8.3, tclx8.2, libpng2, libpng3 +Installed-Size: 12 +Maintainer: Lintian Maintainer +Source: relations +Description: Duplicate library dependency relationships. + Duplicate library dependency relationships. This tests the depending on + different versions of the same library at the same time. + . + At the same time, it conveniently tests some description file checks. :) diff --git a/t/recipes/checks/archive/liberty/mismatch/legacy-relations/build-spec/fill-values b/t/recipes/checks/archive/liberty/mismatch/legacy-relations/build-spec/fill-values new file mode 100644 index 0000000..7e4661b --- /dev/null +++ b/t/recipes/checks/archive/liberty/mismatch/legacy-relations/build-spec/fill-values @@ -0,0 +1,5 @@ +Skeleton: upload-native +Testname: legacy-relations +Source: relations +Version: 5 +Description: Legacy test "relations" diff --git a/t/recipes/checks/archive/liberty/mismatch/legacy-relations/eval/desc b/t/recipes/checks/archive/liberty/mismatch/legacy-relations/eval/desc new file mode 100644 index 0000000..f20046e --- /dev/null +++ b/t/recipes/checks/archive/liberty/mismatch/legacy-relations/eval/desc @@ -0,0 +1,2 @@ +Testname: legacy-relations +Check: archive/liberty/mismatch diff --git a/t/recipes/checks/archive/liberty/mismatch/legacy-relations/eval/hints b/t/recipes/checks/archive/liberty/mismatch/legacy-relations/eval/hints new file mode 100644 index 0000000..d6aba64 --- /dev/null +++ b/t/recipes/checks/archive/liberty/mismatch/legacy-relations/eval/hints @@ -0,0 +1 @@ +relations (source): archive-liberty-mismatch (in section for relations-multiple-libs) non-free vs main [debian/control:36] diff --git a/t/recipes/checks/archive/liberty/mismatch/legacy-relations/eval/post-test b/t/recipes/checks/archive/liberty/mismatch/legacy-relations/eval/post-test new file mode 100644 index 0000000..faeef0b --- /dev/null +++ b/t/recipes/checks/archive/liberty/mismatch/legacy-relations/eval/post-test @@ -0,0 +1 @@ +s/\(current is ([0-9]+\.)+[0-9]\)/(current is CURRENT)/ diff --git a/t/recipes/checks/archive/non-free/autobuild/control-file-source-upload-to-non-free-without-autobuild/build-spec/debian/control.in b/t/recipes/checks/archive/non-free/autobuild/control-file-source-upload-to-non-free-without-autobuild/build-spec/debian/control.in new file mode 100644 index 0000000..0d31cce --- /dev/null +++ b/t/recipes/checks/archive/non-free/autobuild/control-file-source-upload-to-non-free-without-autobuild/build-spec/debian/control.in @@ -0,0 +1,17 @@ +Source: [% $source %] +Priority: optional +Section: non-free/[% $section %] +Maintainer: [% $author %] +Standards-Version: [% $standards_version %] +Build-Depends: [% $build_depends %] +Rules-Requires-Root: no +XS-Autobuild: no + +Package: [% $source %] +Architecture: [% $package_architecture %] +Depends: ${misc:Depends} +Description: [% $description %] + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. diff --git a/t/recipes/checks/archive/non-free/autobuild/control-file-source-upload-to-non-free-without-autobuild/build-spec/fill-values b/t/recipes/checks/archive/non-free/autobuild/control-file-source-upload-to-non-free-without-autobuild/build-spec/fill-values new file mode 100644 index 0000000..07d27d1 --- /dev/null +++ b/t/recipes/checks/archive/non-free/autobuild/control-file-source-upload-to-non-free-without-autobuild/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: upload-native +Testname: control-file-source-upload-to-non-free-without-autobuild +Description: Check for source-only uploads to non-free without autobuild diff --git a/t/recipes/checks/archive/non-free/autobuild/control-file-source-upload-to-non-free-without-autobuild/eval/desc b/t/recipes/checks/archive/non-free/autobuild/control-file-source-upload-to-non-free-without-autobuild/eval/desc new file mode 100644 index 0000000..50ada9d --- /dev/null +++ b/t/recipes/checks/archive/non-free/autobuild/control-file-source-upload-to-non-free-without-autobuild/eval/desc @@ -0,0 +1,4 @@ +Testname: control-file-source-upload-to-non-free-without-autobuild +Check: archive/non-free/autobuild +Test-Against: + source-only-upload-to-non-free-without-autobuild diff --git a/t/recipes/checks/archive/non-free/autobuild/control-file-source-upload-to-non-free-without-autobuild/eval/hints b/t/recipes/checks/archive/non-free/autobuild/control-file-source-upload-to-non-free-without-autobuild/eval/hints new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/t/recipes/checks/archive/non-free/autobuild/control-file-source-upload-to-non-free-without-autobuild/eval/hints @@ -0,0 +1 @@ + diff --git a/t/recipes/checks/archive/non-free/autobuild/source-only-upload-to-non-free-without-autobuild/build-spec/fill-values b/t/recipes/checks/archive/non-free/autobuild/source-only-upload-to-non-free-without-autobuild/build-spec/fill-values new file mode 100644 index 0000000..909efef --- /dev/null +++ b/t/recipes/checks/archive/non-free/autobuild/source-only-upload-to-non-free-without-autobuild/build-spec/fill-values @@ -0,0 +1,5 @@ +Testname: source-only-upload-to-non-free-without-autobuild +Skeleton: upload-native +Section: non-free/devel +Upload-Type: source +Description: This source-only upload to non-free will never appear in the archive diff --git a/t/recipes/checks/archive/non-free/autobuild/source-only-upload-to-non-free-without-autobuild/eval/desc b/t/recipes/checks/archive/non-free/autobuild/source-only-upload-to-non-free-without-autobuild/eval/desc new file mode 100644 index 0000000..0e2a6b5 --- /dev/null +++ b/t/recipes/checks/archive/non-free/autobuild/source-only-upload-to-non-free-without-autobuild/eval/desc @@ -0,0 +1,2 @@ +Testname: source-only-upload-to-non-free-without-autobuild +Check: archive/non-free/autobuild diff --git a/t/recipes/checks/archive/non-free/autobuild/source-only-upload-to-non-free-without-autobuild/eval/hints b/t/recipes/checks/archive/non-free/autobuild/source-only-upload-to-non-free-without-autobuild/eval/hints new file mode 100644 index 0000000..6615c85 --- /dev/null +++ b/t/recipes/checks/archive/non-free/autobuild/source-only-upload-to-non-free-without-autobuild/eval/hints @@ -0,0 +1 @@ +source-only-upload-to-non-free-without-autobuild (source): source-only-upload-to-non-free-without-autobuild (in the source paragraph) XS-Autobuild [debian/control] diff --git a/t/recipes/checks/binaries/architecture/binaries-misplaced/build-spec/debian/rules b/t/recipes/checks/binaries/architecture/binaries-misplaced/build-spec/debian/rules new file mode 100755 index 0000000..a3ab46d --- /dev/null +++ b/t/recipes/checks/binaries/architecture/binaries-misplaced/build-spec/debian/rules @@ -0,0 +1,12 @@ +#!/usr/bin/make -f +pkg=binaries-misplaced +%: + dh $@ + +override_dh_install: + mkdir -p debian/$(pkg)/etc/ + cp -a /bin/true debian/$(pkg)/etc/foo + # explicitly call dh_shlibdeps since debhelper is being + # "smart" and not calling it in newer versions (8.9.something) + dh_shlibdeps + dh_install diff --git a/t/recipes/checks/binaries/architecture/binaries-misplaced/build-spec/fill-values b/t/recipes/checks/binaries/architecture/binaries-misplaced/build-spec/fill-values new file mode 100644 index 0000000..6f79eab --- /dev/null +++ b/t/recipes/checks/binaries/architecture/binaries-misplaced/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: upload-native +Testname: binaries-misplaced +Description: Test binaries in /etc diff --git a/t/recipes/checks/binaries/architecture/binaries-misplaced/eval/desc b/t/recipes/checks/binaries/architecture/binaries-misplaced/eval/desc new file mode 100644 index 0000000..4b25873 --- /dev/null +++ b/t/recipes/checks/binaries/architecture/binaries-misplaced/eval/desc @@ -0,0 +1,2 @@ +Testname: binaries-misplaced +Check: binaries/architecture diff --git a/t/recipes/checks/binaries/architecture/binaries-misplaced/eval/hints b/t/recipes/checks/binaries/architecture/binaries-misplaced/eval/hints new file mode 100644 index 0000000..e724861 --- /dev/null +++ b/t/recipes/checks/binaries/architecture/binaries-misplaced/eval/hints @@ -0,0 +1 @@ +binaries-misplaced (binary): arch-independent-package-contains-binary-or-object [etc/foo] diff --git a/t/recipes/checks/binaries/architecture/other/binaries-from-other-arch/build-spec/debian/dumpobj b/t/recipes/checks/binaries/architecture/other/binaries-from-other-arch/build-spec/debian/dumpobj new file mode 100644 index 0000000..afdf68e --- /dev/null +++ b/t/recipes/checks/binaries/architecture/other/binaries-from-other-arch/build-spec/debian/dumpobj @@ -0,0 +1,22 @@ +#!/bin/sh +set -e + +DEB_BUILD_GNU_TYPE="$(dpkg-architecture -qDEB_BUILD_GNU_TYPE)" + +case $DEB_BUILD_GNU_TYPE in +i486-linux-gnu|i586-linux-gnu|i686-linux-gnu|x86_64-linux-gnu) + base64 -d < debian/elfobject + sh debian/dumpobj > debian/fake-guile-object.go + dh binary diff --git a/t/recipes/checks/binaries/architecture/other/binaries-from-other-arch/build-spec/fill-values b/t/recipes/checks/binaries/architecture/other/binaries-from-other-arch/build-spec/fill-values new file mode 100644 index 0000000..d765ecd --- /dev/null +++ b/t/recipes/checks/binaries/architecture/other/binaries-from-other-arch/build-spec/fill-values @@ -0,0 +1,6 @@ +Skeleton: upload-native +Testname: binaries-from-other-arch +Package-Architecture: any +Dh-Compat-Level: 10 +Description: Test package with a pseudo binary from a different architecture +# since debhelper 12.5.2, objdump no longer fails silently for compat > 10, need better binary diff --git a/t/recipes/checks/binaries/architecture/other/binaries-from-other-arch/eval/desc b/t/recipes/checks/binaries/architecture/other/binaries-from-other-arch/eval/desc new file mode 100644 index 0000000..6f04e39 --- /dev/null +++ b/t/recipes/checks/binaries/architecture/other/binaries-from-other-arch/eval/desc @@ -0,0 +1,4 @@ +Testname: binaries-from-other-arch +Test-Architectures: amd64 i386 +Check: binaries/architecture/other +# since debhelper 12.5.2, objdump no longer fails silently for compat > 10, need better binary diff --git a/t/recipes/checks/binaries/architecture/other/binaries-from-other-arch/eval/hints b/t/recipes/checks/binaries/architecture/other/binaries-from-other-arch/eval/hints new file mode 100644 index 0000000..fd7b1d8 --- /dev/null +++ b/t/recipes/checks/binaries/architecture/other/binaries-from-other-arch/eval/hints @@ -0,0 +1 @@ +binaries-from-other-arch (binary): binary-from-other-architecture [usr/bin/elfobject] diff --git a/t/recipes/checks/binaries/architecture/other/wrong-binary-architecture/build-spec/debian/install b/t/recipes/checks/binaries/architecture/other/wrong-binary-architecture/build-spec/debian/install new file mode 100644 index 0000000..c10e578 --- /dev/null +++ b/t/recipes/checks/binaries/architecture/other/wrong-binary-architecture/build-spec/debian/install @@ -0,0 +1 @@ +foreign-binary usr/bin diff --git a/t/recipes/checks/binaries/architecture/other/wrong-binary-architecture/build-spec/debian/rules b/t/recipes/checks/binaries/architecture/other/wrong-binary-architecture/build-spec/debian/rules new file mode 100755 index 0000000..2ce6f53 --- /dev/null +++ b/t/recipes/checks/binaries/architecture/other/wrong-binary-architecture/build-spec/debian/rules @@ -0,0 +1,22 @@ +#!/usr/bin/make -f + +export DEB_BUILD_MAINT_OPTIONS=hardening=+all + +%: + dh $@ + +override_dh_strip: + # do not try to strip cross-compiled binaries with native tooling + +override_dh_shlibdeps: + # do not try to include missing libraries + +override_dh_dwz: + # cross-compiled binaries do not always seem to have a debug section + +# In Ubuntu, dh does not catch this file by default. +# They have diffed it to reduce the size of packages. +ifneq (,$(strip $(wildcard Changes))) +override_dh_installchangelogs: + dh_installchangelogs Changes +endif diff --git a/t/recipes/checks/binaries/architecture/other/wrong-binary-architecture/build-spec/fill-values b/t/recipes/checks/binaries/architecture/other/wrong-binary-architecture/build-spec/fill-values new file mode 100644 index 0000000..24f607a --- /dev/null +++ b/t/recipes/checks/binaries/architecture/other/wrong-binary-architecture/build-spec/fill-values @@ -0,0 +1,6 @@ +Skeleton: upload-native +Testname: wrong-binary-architecture +Description: Binary architecture does not match package declaration +Package-Architecture: any +Extra-Build-Depends: + gcc-arm-linux-gnueabihf [amd64 i386], gcc-x86-64-linux-gnu [!amd64 !i386] diff --git a/t/recipes/checks/binaries/architecture/other/wrong-binary-architecture/build-spec/orig/Makefile b/t/recipes/checks/binaries/architecture/other/wrong-binary-architecture/build-spec/orig/Makefile new file mode 100644 index 0000000..bf92eaf --- /dev/null +++ b/t/recipes/checks/binaries/architecture/other/wrong-binary-architecture/build-spec/orig/Makefile @@ -0,0 +1,37 @@ +# This test works on amd64 when the cross-compiler for armhf is installed. +# +# The build prerequisite was not added to Lintian, however, since it was +# not clear how the architecture would be enabled in the Gitlab CI +# runner. +# +# On amd64 or i386, please follow these steps to run the test: +# +# dpkg --add-architecture armhf +# apt update +# apt install gcc-arm-linux-gnueabihf +# +# On all other architectures this may work, but was not tested: +# +# dpkg --add-architecture amd64 +# apt update +# apt install gcc-x86-64-linux-gnu +# +# (Taken from: https://wiki.debian.org/CrossToolchains) + +ARCH := $(shell dpkg-architecture -qDEB_HOST_ARCH) + +ifeq ($(ARCH),amd64) +CC := arm-linux-gnueabihf-gcc +else +CC := x86_64-linux-gnu-gcc +endif + +foreign-binary: hello.c + $(CC) $^ -o $@ + +.PHONY: clean +clean: + rm -f foreign-binary + +.PHONY: clean +distclean: clean diff --git a/t/recipes/checks/binaries/architecture/other/wrong-binary-architecture/build-spec/orig/hello.c b/t/recipes/checks/binaries/architecture/other/wrong-binary-architecture/build-spec/orig/hello.c new file mode 100644 index 0000000..2fb04e1 --- /dev/null +++ b/t/recipes/checks/binaries/architecture/other/wrong-binary-architecture/build-spec/orig/hello.c @@ -0,0 +1,8 @@ +#include +#include + +int main(int argc, char *argv[]) { + + printf("Hello, World!\n"); + exit(0); +} diff --git a/t/recipes/checks/binaries/architecture/other/wrong-binary-architecture/eval/desc b/t/recipes/checks/binaries/architecture/other/wrong-binary-architecture/eval/desc new file mode 100644 index 0000000..8bd95a8 --- /dev/null +++ b/t/recipes/checks/binaries/architecture/other/wrong-binary-architecture/eval/desc @@ -0,0 +1,2 @@ +Testname: wrong-binary-architecture +Check: binaries/architecture/other diff --git a/t/recipes/checks/binaries/architecture/other/wrong-binary-architecture/eval/hints b/t/recipes/checks/binaries/architecture/other/wrong-binary-architecture/eval/hints new file mode 100644 index 0000000..e2251b3 --- /dev/null +++ b/t/recipes/checks/binaries/architecture/other/wrong-binary-architecture/eval/hints @@ -0,0 +1 @@ +wrong-binary-architecture (binary): binary-from-other-architecture [usr/bin/foreign-binary] diff --git a/t/recipes/checks/binaries/corrupted/binaries-from-other-arch/build-spec/debian/dumpobj b/t/recipes/checks/binaries/corrupted/binaries-from-other-arch/build-spec/debian/dumpobj new file mode 100644 index 0000000..afdf68e --- /dev/null +++ b/t/recipes/checks/binaries/corrupted/binaries-from-other-arch/build-spec/debian/dumpobj @@ -0,0 +1,22 @@ +#!/bin/sh +set -e + +DEB_BUILD_GNU_TYPE="$(dpkg-architecture -qDEB_BUILD_GNU_TYPE)" + +case $DEB_BUILD_GNU_TYPE in +i486-linux-gnu|i586-linux-gnu|i686-linux-gnu|x86_64-linux-gnu) + base64 -d < debian/elfobject + sh debian/dumpobj > debian/fake-guile-object.go + dh binary diff --git a/t/recipes/checks/binaries/corrupted/binaries-from-other-arch/build-spec/fill-values b/t/recipes/checks/binaries/corrupted/binaries-from-other-arch/build-spec/fill-values new file mode 100644 index 0000000..d765ecd --- /dev/null +++ b/t/recipes/checks/binaries/corrupted/binaries-from-other-arch/build-spec/fill-values @@ -0,0 +1,6 @@ +Skeleton: upload-native +Testname: binaries-from-other-arch +Package-Architecture: any +Dh-Compat-Level: 10 +Description: Test package with a pseudo binary from a different architecture +# since debhelper 12.5.2, objdump no longer fails silently for compat > 10, need better binary diff --git a/t/recipes/checks/binaries/corrupted/binaries-from-other-arch/eval/desc b/t/recipes/checks/binaries/corrupted/binaries-from-other-arch/eval/desc new file mode 100644 index 0000000..65502f9 --- /dev/null +++ b/t/recipes/checks/binaries/corrupted/binaries-from-other-arch/eval/desc @@ -0,0 +1,4 @@ +Testname: binaries-from-other-arch +Test-Architectures: amd64 i386 +Check: binaries/corrupted +# since debhelper 12.5.2, objdump no longer fails silently for compat > 10, need better binary diff --git a/t/recipes/checks/binaries/corrupted/binaries-from-other-arch/eval/hints b/t/recipes/checks/binaries/corrupted/binaries-from-other-arch/eval/hints new file mode 100644 index 0000000..54909bb --- /dev/null +++ b/t/recipes/checks/binaries/corrupted/binaries-from-other-arch/eval/hints @@ -0,0 +1,4 @@ +binaries-from-other-arch (binary): elf-error In ELF header: Section headers are not available! [usr/lib/foo/binaries-from-other-arch/guile/2.2/fake-guile-object.go] +binaries-from-other-arch (binary): elf-error In ELF header: Section headers are not available! [usr/bin/elfobject] +binaries-from-other-arch (binary): elf-error In ELF header: Reading 1080 bytes extends past end of file for section headers [usr/lib/foo/binaries-from-other-arch/guile/2.2/fake-guile-object.go] +binaries-from-other-arch (binary): elf-error In ELF header: Reading 1080 bytes extends past end of file for section headers [usr/bin/elfobject] diff --git a/t/recipes/checks/binaries/corrupted/legacy-debug/build-spec/debian/_symbols b/t/recipes/checks/binaries/corrupted/legacy-debug/build-spec/debian/_symbols new file mode 100644 index 0000000..46e6af1 --- /dev/null +++ b/t/recipes/checks/binaries/corrupted/legacy-debug/build-spec/debian/_symbols @@ -0,0 +1,23 @@ + This line should flag a syntax error +# but this one shouldn't +| although this one should, but for a different reason + and so should this + +libhello.so.0 libhello0 #MINVER# +| libhello0c2 (>= 1.2) , libhelloc0c2 (<< 1.3) +| hello-dbg3| libhelloc0c3|foobar (= 1.2) |hello-dbg2 +| hello-dbg + hello@Base 1.0 +* Build-Dep-Foo: bar + hello2@Base 2.0 4 + hello3@Base 2.0 1 + hello3@Base 2.0 A + dummy + +libhello.so.2 libhello2 #MINVER# +* Build-Depends-Package: libbar +| libhello2 (>= 1:2.3) + hello@Base 2.0 + +libhello.so.0 libhello0 #MINVER# + duplicate@Base 1.0 diff --git a/t/recipes/checks/binaries/corrupted/legacy-debug/build-spec/debian/changelog.in b/t/recipes/checks/binaries/corrupted/legacy-debug/build-spec/debian/changelog.in new file mode 100644 index 0000000..02da925 --- /dev/null +++ b/t/recipes/checks/binaries/corrupted/legacy-debug/build-spec/debian/changelog.in @@ -0,0 +1,13 @@ +debug ([% $version %]) [% $distribution %]; urgency=low + + * NMU. + (uploaded by the maintainer and with repeated version number) + + -- Russ Allbery Tue, 4 Apr 2006 20:27:22 +0000 + +debug (1.0) unstable; urgency=low + + * Initial version. + + -- Russ Allbery Sat, 4 Mar 2006 21:31:06 -0800 + diff --git a/t/recipes/checks/binaries/corrupted/legacy-debug/build-spec/debian/compat.in b/t/recipes/checks/binaries/corrupted/legacy-debug/build-spec/debian/compat.in new file mode 100644 index 0000000..640a566 --- /dev/null +++ b/t/recipes/checks/binaries/corrupted/legacy-debug/build-spec/debian/compat.in @@ -0,0 +1 @@ +[% $dh_compat_level %] diff --git a/t/recipes/checks/binaries/corrupted/legacy-debug/build-spec/debian/control b/t/recipes/checks/binaries/corrupted/legacy-debug/build-spec/debian/control new file mode 100644 index 0000000..fcb2b86 --- /dev/null +++ b/t/recipes/checks/binaries/corrupted/legacy-debug/build-spec/debian/control @@ -0,0 +1,85 @@ +Source: debug +Section: utils +Priority: optional +Maintainer: Russ Allbery +Build-Depends: debhelper (>= 5.0.0) +Build-Depends-Indep: not-debhelper (>= 0.4.3) +Standards-Version: 3.7.0 + +Package: hello +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: Test for external debugging information + Lintian regression test for external debugging file handling. This test + contains the binary. + . + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. + +Package: hello-dbg +Priority: optional +Section: debug +Architecture: any +Depends: hello (= ${binary:Version}), ${shlibs:Depends}, ${misc:Depends} +Description: Test for external debugging information (symbols) + Lintian regression test for external debugging file handling. This test + contains the binary symbols. + . + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. + +Package: libhello0 +Section: libs +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: Test for external debugging information (library) + Lintian regression test for external debugging file handling. This test + contains a library. + . + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. + +Package: libhello0-dbg +Section: debug +Priority: optional +Architecture: any +Depends: libhello (= ${binary:Version}), ${shlibs:Depends}, ${misc:Depends} +Description: Test for external debugging information (library symbols) + Lintian regression test for external debugging file handling. This test + contains the library symbols. + . + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. + +Package: hi-dbg +Section: debug +Priority: optional +Architecture: any +Depends: foo-pkg, not-libhello0 +Description: Test for external debugging symbols + Lintian regression test for external debugging files handling. This test + contains the library symbols. + . + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. + +Package: hello-hello-dbg +Section: debug +Priority: optional +Architecture: any +Depends: foo-pkg, not-libhello0, hello +Description: Test for external debugging symbols - another try + Lintian regression test for external debugging files handling. This test + contains the library symbols. This package actually tests a combination of + the above. + . + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. diff --git a/t/recipes/checks/binaries/corrupted/legacy-debug/build-spec/debian/copyright b/t/recipes/checks/binaries/corrupted/legacy-debug/build-spec/debian/copyright new file mode 100644 index 0000000..5d4f6c2 --- /dev/null +++ b/t/recipes/checks/binaries/corrupted/legacy-debug/build-spec/debian/copyright @@ -0,0 +1,4 @@ +Written Sat, 04 Mar 2006 21:30:01 -0800 by Russ Allbery . + +Test for copyright in capital letters. (#464992) +COPYRIGHT RUSS ALLBERY 2006 diff --git a/t/recipes/checks/binaries/corrupted/legacy-debug/build-spec/debian/rules b/t/recipes/checks/binaries/corrupted/legacy-debug/build-spec/debian/rules new file mode 100755 index 0000000..b659895 --- /dev/null +++ b/t/recipes/checks/binaries/corrupted/legacy-debug/build-spec/debian/rules @@ -0,0 +1,99 @@ +#!/usr/bin/make -f +# Sample debian/rules that uses debhelper. +# This file is public domain software, originally written by Joey Hess. + +# turn off PIE in CC in case we have a PIEful toolchain: +ifneq ($(findstring -no-pie,$(shell gcc -no-pie 2>&1)),) + CC := gcc +else + CC := gcc -fno-pie -no-pie +endif + +build-indep: + +build-arch: build-stamp + +build-stamp: + dh_testdir + $(CC) -D_REENTRANT -fPIC -c libhello.c + $(CC) -o libhello.so.0.0 -shared -Wl,-soname,libhello.so.0 libhello.o + ln -s libhello.so.0.0 libhello.so + $(CC) -o hello hello.c -L. -lhello + touch build-stamp + +build: build-arch build-indep + +clean: + dh_testdir + dh_testroot + rm -f build-stamp *.o libhello.so.0.0 libhello.so + dh_clean + +install: build-stamp + dh_testdir + dh_testroot + dh_clean -k + install -D hello $(CURDIR)/debian/hello/usr/bin/hello + install -D libhello.so.0.0 \ + $(CURDIR)/debian/libhello0/usr/lib/libhello.so.0.0 + ln -s libhello.so.0.0 \ + $(CURDIR)/debian/libhello0/usr/lib/libhello.so.0 + +# Build architecture-dependent files here. +export DH_OPTIONS +binary-arch: DH_OPTIONS=-a +binary-arch: build-stamp install + dh_testdir + dh_testroot + dh_installchangelogs -N hello-dbg + dh_installdocs + DH_OPTIONS= dh_strip -phello --dbg-package=hello-dbg + DH_OPTIONS= dh_strip -plibhello0 --dbg-package=libhello0-dbg + + # Now break a few things. Copy the debugging data into places it + # shouldn't be. + cp $(CURDIR)/debian/hello-dbg/usr/lib/debug/usr/bin/hello \ + $(CURDIR)/debian/hello/usr/bin/hello.dbg + cp $(CURDIR)/debian/libhello0-dbg/usr/lib/debug/usr/lib/libhello.so.0.0 \ + $(CURDIR)/debian/libhello0-dbg/usr/lib/libhello.so.dbg + + # Put a full copy of the library in libhello0-dbg in /usr/lib/debug, + # which is okay. + install -m 644 libhello.so.0.0 \ + $(CURDIR)/debian/libhello0-dbg/usr/lib/debug/libhello.so.0.0 + + # Also put it in /usr/lib/debug/lib, which isn't. + install -D -m 644 libhello.so.0.0 \ + $(CURDIR)/debian/libhello0-dbg/usr/lib/debug/lib/libhello.so.0.0 + + # Requires a versioned dependency. + dh_icons + + dh_link + dh_compress + dh_fixperms + dh_makeshlibs -X debug + dh_installdeb + dh_shlibdeps -X debug + + # We do this by hand as otherwise dpkg-gensymbols + # will error due to the broken symbols file + # and abort the build; similarly the file in + # the source tree is _symbols so that dpkg + # doesn't attempt to sanity check it + install -d $(CURDIR)/debian/libhello0/DEBIAN + install -m 644 $(CURDIR)/debian/_symbols \ + $(CURDIR)/debian/libhello0/DEBIAN/symbols + # hello doesn't contain any shlibs, but we + # make it contain a symbols file + install -d $(CURDIR)/debian/hello/DEBIAN + install -m 644 $(CURDIR)/debian/_symbols \ + $(CURDIR)/debian/hello/DEBIAN/symbols + + dh_gencontrol + dh_md5sums + dh_builddeb + +binary-indep: +binary: binary-indep binary-arch +.PHONY: build-arch build-indep build binary binary-indep binary-arch clean install diff --git a/t/recipes/checks/binaries/corrupted/legacy-debug/build-spec/fill-values b/t/recipes/checks/binaries/corrupted/legacy-debug/build-spec/fill-values new file mode 100644 index 0000000..e2f713c --- /dev/null +++ b/t/recipes/checks/binaries/corrupted/legacy-debug/build-spec/fill-values @@ -0,0 +1,8 @@ +Skeleton: upload-native +Testname: legacy-debug +Source: debug +Default-Build-Depends: + debhelper (>= 9.20151004~), + binutils (>= 2.37.50.20211102) +Dh-Compat-Level: 7 +Description: Legacy test "debug" diff --git a/t/recipes/checks/binaries/corrupted/legacy-debug/build-spec/orig/hello.c b/t/recipes/checks/binaries/corrupted/legacy-debug/build-spec/orig/hello.c new file mode 100644 index 0000000..76f8337 --- /dev/null +++ b/t/recipes/checks/binaries/corrupted/legacy-debug/build-spec/orig/hello.c @@ -0,0 +1,9 @@ +#include +#include "libhello.h" + +int +main(void) +{ + hello(); + exit(0); +} diff --git a/t/recipes/checks/binaries/corrupted/legacy-debug/build-spec/orig/libhello.c b/t/recipes/checks/binaries/corrupted/legacy-debug/build-spec/orig/libhello.c new file mode 100644 index 0000000..e2f8409 --- /dev/null +++ b/t/recipes/checks/binaries/corrupted/legacy-debug/build-spec/orig/libhello.c @@ -0,0 +1,7 @@ +#include + +void +hello(void) +{ + printf("Hello, World!\n"); +} diff --git a/t/recipes/checks/binaries/corrupted/legacy-debug/build-spec/orig/libhello.h b/t/recipes/checks/binaries/corrupted/legacy-debug/build-spec/orig/libhello.h new file mode 100644 index 0000000..ef77476 --- /dev/null +++ b/t/recipes/checks/binaries/corrupted/legacy-debug/build-spec/orig/libhello.h @@ -0,0 +1 @@ +void hello(void); diff --git a/t/recipes/checks/binaries/corrupted/legacy-debug/eval/desc b/t/recipes/checks/binaries/corrupted/legacy-debug/eval/desc new file mode 100644 index 0000000..a55c905 --- /dev/null +++ b/t/recipes/checks/binaries/corrupted/legacy-debug/eval/desc @@ -0,0 +1,2 @@ +Testname: legacy-debug +Check: binaries/corrupted diff --git a/t/recipes/checks/binaries/corrupted/legacy-debug/eval/hints b/t/recipes/checks/binaries/corrupted/legacy-debug/eval/hints new file mode 100644 index 0000000..0b0b081 --- /dev/null +++ b/t/recipes/checks/binaries/corrupted/legacy-debug/eval/hints @@ -0,0 +1,3 @@ +libhello0-dbg (binary): binary-with-bad-dynamic-table [usr/lib/libhello.so.dbg] +hello (binary): binary-with-bad-dynamic-table [usr/bin/hello.dbg] +hello (binary): elf-error In program headers: Unable to find program interpreter name [usr/bin/hello.dbg] diff --git a/t/recipes/checks/binaries/corrupted/legacy-debug/eval/post-test b/t/recipes/checks/binaries/corrupted/legacy-debug/eval/post-test new file mode 100644 index 0000000..fc97c5f --- /dev/null +++ b/t/recipes/checks/binaries/corrupted/legacy-debug/eval/post-test @@ -0,0 +1,2 @@ +/: hardening-.*/ d +s/\(current is ([0-9]+\.)+[0-9]\)/(current is CURRENT)/ diff --git a/t/recipes/checks/binaries/debug-symbols/binaries-general/build-spec/debian/rules b/t/recipes/checks/binaries/debug-symbols/binaries-general/build-spec/debian/rules new file mode 100644 index 0000000..3ea7a63 --- /dev/null +++ b/t/recipes/checks/binaries/debug-symbols/binaries-general/build-spec/debian/rules @@ -0,0 +1,12 @@ +#!/usr/bin/make -f + +export DEB_BUILD_MAINT_OPTIONS=hardening=+all + +%: + dh $@ + +override_dh_strip: + dh_strip -X usr/lib/debug -X unstripped -X ocaml + +override_dh_dwz: + # Can error with "deadbeefdeadbeef.debug: Found compressed .debug_info section, not attempting dwz compression" diff --git a/t/recipes/checks/binaries/debug-symbols/binaries-general/build-spec/fill-values b/t/recipes/checks/binaries/debug-symbols/binaries-general/build-spec/fill-values new file mode 100644 index 0000000..a24247d --- /dev/null +++ b/t/recipes/checks/binaries/debug-symbols/binaries-general/build-spec/fill-values @@ -0,0 +1,4 @@ +Skeleton: upload-native +Testname: binaries-general +Description: Misc errors related to binaries +Package-Architecture: any diff --git a/t/recipes/checks/binaries/debug-symbols/binaries-general/build-spec/orig/Makefile b/t/recipes/checks/binaries/debug-symbols/binaries-general/build-spec/orig/Makefile new file mode 100644 index 0000000..cf0f211 --- /dev/null +++ b/t/recipes/checks/binaries/debug-symbols/binaries-general/build-spec/orig/Makefile @@ -0,0 +1,64 @@ +# turn off PIE in CC in case we have a PIEful toolchain: +ifneq ($(findstring -no-pie,$(shell gcc -no-pie 2>&1)),) + CC := gcc +else + CC := gcc -fno-pie -no-pie +endif + +NOPIE_CFLAGS = $(filter-out -fPIE,$(CFLAGS)) +NOPIE_LDFLAGS = $(filter-out -fPIE -pie,$(LDFLAGS)) +COMPILE:= $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) +COMPILE_NOPIE:= $(CC) $(NOPIE_CFLAGS) $(CPPFLAGS) $(NOPIE_LDFLAGS) +# extract from readelf +GETBUILDID:=./getbuildid + +all: + # rpath not matching any of the exceptions to the rpath checks + # - with profiling enabled. + $(COMPILE_NOPIE) -o basic basic.c -pg -Wl,--rpath,/usr/local/lib + # rpath shipped in the package, but one of {/usr}?/lib + $(COMPILE) -o basiclibrpath basic.c -Wl,--rpath,/usr/lib + # non-special rpath shipped in the package + $(COMPILE) -o basicshippedrpath basic.c -Wl,--rpath,/usr/share/foo + # special rpath shipped in the package, multiple paths + $(COMPILE) -o basicshippedrpathmore basic.c -Wl,--rpath,/usr/lib/binaries-general:/usr/lib/binaries-general/bar + # static version of basic for debugging checks + $(COMPILE_NOPIE) -static -o basic.static basic.c + # static executable to trigger ocaml check + $(COMPILE_NOPIE) -o ocaml-exec ocaml.c + # version with debug + $(COMPILE) -o basicdebug -g3 -Wl,--build-id basic.c + +install: + # according to local debian rules /usr/lib/debug is unstripped + install -d $(DESTDIR)/usr/share/foo/ + install -d $(DESTDIR)/usr/lib/debug/usr/share/foo/ + install -d $(DESTDIR)/usr/lib/foo/ + install -d $(DESTDIR)/usr/bin + + install -m 755 -c basic $(DESTDIR)/usr/share/foo/basic + objcopy --only-keep-debug basic $(DESTDIR)/usr/lib/debug/usr/share/foo/basic + strip -s $(DESTDIR)/usr/lib/debug/usr/share/foo/basic + install -m 755 -c basiclibrpath $(DESTDIR)/usr/lib/foo/basiclibrpath + install -m 755 -c basicshippedrpath $(DESTDIR)/usr/lib/foo/basicshippedrpath + install -m 755 -c ocaml-exec $(DESTDIR)/usr/lib/foo/ocaml-exec + install -m 744 -c basicshippedrpathmore $(DESTDIR)/usr/lib/foo/basicshippedrpathmore + objcopy --only-keep-debug basic $(DESTDIR)/usr/lib/debug/basic + install -d "$(DESTDIR)/usr/lib/debug/.build-id/"`$(GETBUILDID) -s basicdebug` + install -m 755 -c basicdebug $(DESTDIR)/usr/share/foo/basicdebug + # force fake buildid in order to have tag matching ok (deadbeefdeadbeef) + install -d "$(DESTDIR)/usr/lib/debug/.build-id/de" + objcopy --compress-debug-sections basicdebug \ + "$(DESTDIR)/usr/lib/debug/.build-id/de/deadbeefdeadbeef.debug" + install -d "$(DESTDIR)/usr/lib/debug/.build-id/"`$(GETBUILDID) -s basicdebug` + objcopy --compress-debug-sections --only-keep-debug basicdebug \ + "$(DESTDIR)/usr/lib/debug/.build-id/"`$(GETBUILDID) -s basicdebug`"/"`$(GETBUILDID) -f basicdebug`.debug + install -m 755 -c basic.static $(DESTDIR)/usr/lib/debug/ + # according to local debian rules unstripped in name avoid dh_strip to do the work + install -m 755 basicdebug $(DESTDIR)/usr/bin/unstripped + install -m 755 basic.static $(DESTDIR)/usr/bin/static + +clean distclean: + rm -f basic + +check test: diff --git a/t/recipes/checks/binaries/debug-symbols/binaries-general/build-spec/orig/basic.c b/t/recipes/checks/binaries/debug-symbols/binaries-general/build-spec/orig/basic.c new file mode 100644 index 0000000..3618004 --- /dev/null +++ b/t/recipes/checks/binaries/debug-symbols/binaries-general/build-spec/orig/basic.c @@ -0,0 +1,12 @@ +#include +#include + +int +main(int argc, char *argv[]) +{ + char t[10]; + printf("Hello world!\n"); + /* forces a stack protector */ + (void) strcpy(t,argv[0]); + return (int) t[0]; +} diff --git a/t/recipes/checks/binaries/debug-symbols/binaries-general/build-spec/orig/getbuildid b/t/recipes/checks/binaries/debug-symbols/binaries-general/build-spec/orig/getbuildid new file mode 100755 index 0000000..0060d2b --- /dev/null +++ b/t/recipes/checks/binaries/debug-symbols/binaries-general/build-spec/orig/getbuildid @@ -0,0 +1,30 @@ +#!/bin/sh +# get build-id of binary + +set -e + +usage() { + echo "Usage: getbuildid [flag] file"; + echo " print build-id of an object file" + echo "flags:" + echo " -f : full build-id (default)." + echo " -s : short build-id aka the first two characters." +} + +if test $# -lt 1; then usage; exit 77; fi +if test $# -gt 3; then usage; exit 77; fi + +if test $# -eq 1; then + LC_ALL=C readelf -n "$1" | grep -i 'Build Id:' | sed 's/.*:[[:blank:]]*\([[:digit:]|abcdef]*\).*/\1/g' +else + case "x$1" in + 'x-f') + LC_ALL=C readelf -n "$2" | grep -i 'Build Id:' | sed 's/.*:[[:blank:]]*\([[:digit:]|abcdef]*\).*/\1/g' ;; + 'x-s') + LC_ALL=C readelf -n "$2" | grep -i 'Build Id:' | sed 's/.*:[[:blank:]]*\([[:digit:]|abcdef]\{2\}\).*/\1/g' ;; + *) + exit 2; + esac +fi + +exit 0; diff --git a/t/recipes/checks/binaries/debug-symbols/binaries-general/build-spec/orig/ocaml.c b/t/recipes/checks/binaries/debug-symbols/binaries-general/build-spec/orig/ocaml.c new file mode 100644 index 0000000..370d17d --- /dev/null +++ b/t/recipes/checks/binaries/debug-symbols/binaries-general/build-spec/orig/ocaml.c @@ -0,0 +1,11 @@ +#include + +int +main(int argc, char **argv) +{ + if (argc > 2) { + puts("Caml1999X000"); + } + puts("\n"); + return 0; +} diff --git a/t/recipes/checks/binaries/debug-symbols/binaries-general/eval/desc b/t/recipes/checks/binaries/debug-symbols/binaries-general/eval/desc new file mode 100644 index 0000000..3ead276 --- /dev/null +++ b/t/recipes/checks/binaries/debug-symbols/binaries-general/eval/desc @@ -0,0 +1,2 @@ +Testname: binaries-general +Check: binaries/debug-symbols diff --git a/t/recipes/checks/binaries/debug-symbols/binaries-general/eval/hints b/t/recipes/checks/binaries/debug-symbols/binaries-general/eval/hints new file mode 100644 index 0000000..5a3ede3 --- /dev/null +++ b/t/recipes/checks/binaries/debug-symbols/binaries-general/eval/hints @@ -0,0 +1 @@ +binaries-general (binary): unstripped-binary-or-object [usr/bin/unstripped] diff --git a/t/recipes/checks/binaries/debug-symbols/binaries-general/eval/post-test b/t/recipes/checks/binaries/debug-symbols/binaries-general/eval/post-test new file mode 100755 index 0000000..11ad2c8 --- /dev/null +++ b/t/recipes/checks/binaries/debug-symbols/binaries-general/eval/post-test @@ -0,0 +1 @@ +/: hardening-.*/ d diff --git a/t/recipes/checks/binaries/debug-symbols/detached/binaries-general/build-spec/debian/rules b/t/recipes/checks/binaries/debug-symbols/detached/binaries-general/build-spec/debian/rules new file mode 100644 index 0000000..3ea7a63 --- /dev/null +++ b/t/recipes/checks/binaries/debug-symbols/detached/binaries-general/build-spec/debian/rules @@ -0,0 +1,12 @@ +#!/usr/bin/make -f + +export DEB_BUILD_MAINT_OPTIONS=hardening=+all + +%: + dh $@ + +override_dh_strip: + dh_strip -X usr/lib/debug -X unstripped -X ocaml + +override_dh_dwz: + # Can error with "deadbeefdeadbeef.debug: Found compressed .debug_info section, not attempting dwz compression" diff --git a/t/recipes/checks/binaries/debug-symbols/detached/binaries-general/build-spec/fill-values b/t/recipes/checks/binaries/debug-symbols/detached/binaries-general/build-spec/fill-values new file mode 100644 index 0000000..a24247d --- /dev/null +++ b/t/recipes/checks/binaries/debug-symbols/detached/binaries-general/build-spec/fill-values @@ -0,0 +1,4 @@ +Skeleton: upload-native +Testname: binaries-general +Description: Misc errors related to binaries +Package-Architecture: any diff --git a/t/recipes/checks/binaries/debug-symbols/detached/binaries-general/build-spec/orig/Makefile b/t/recipes/checks/binaries/debug-symbols/detached/binaries-general/build-spec/orig/Makefile new file mode 100644 index 0000000..cf0f211 --- /dev/null +++ b/t/recipes/checks/binaries/debug-symbols/detached/binaries-general/build-spec/orig/Makefile @@ -0,0 +1,64 @@ +# turn off PIE in CC in case we have a PIEful toolchain: +ifneq ($(findstring -no-pie,$(shell gcc -no-pie 2>&1)),) + CC := gcc +else + CC := gcc -fno-pie -no-pie +endif + +NOPIE_CFLAGS = $(filter-out -fPIE,$(CFLAGS)) +NOPIE_LDFLAGS = $(filter-out -fPIE -pie,$(LDFLAGS)) +COMPILE:= $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) +COMPILE_NOPIE:= $(CC) $(NOPIE_CFLAGS) $(CPPFLAGS) $(NOPIE_LDFLAGS) +# extract from readelf +GETBUILDID:=./getbuildid + +all: + # rpath not matching any of the exceptions to the rpath checks + # - with profiling enabled. + $(COMPILE_NOPIE) -o basic basic.c -pg -Wl,--rpath,/usr/local/lib + # rpath shipped in the package, but one of {/usr}?/lib + $(COMPILE) -o basiclibrpath basic.c -Wl,--rpath,/usr/lib + # non-special rpath shipped in the package + $(COMPILE) -o basicshippedrpath basic.c -Wl,--rpath,/usr/share/foo + # special rpath shipped in the package, multiple paths + $(COMPILE) -o basicshippedrpathmore basic.c -Wl,--rpath,/usr/lib/binaries-general:/usr/lib/binaries-general/bar + # static version of basic for debugging checks + $(COMPILE_NOPIE) -static -o basic.static basic.c + # static executable to trigger ocaml check + $(COMPILE_NOPIE) -o ocaml-exec ocaml.c + # version with debug + $(COMPILE) -o basicdebug -g3 -Wl,--build-id basic.c + +install: + # according to local debian rules /usr/lib/debug is unstripped + install -d $(DESTDIR)/usr/share/foo/ + install -d $(DESTDIR)/usr/lib/debug/usr/share/foo/ + install -d $(DESTDIR)/usr/lib/foo/ + install -d $(DESTDIR)/usr/bin + + install -m 755 -c basic $(DESTDIR)/usr/share/foo/basic + objcopy --only-keep-debug basic $(DESTDIR)/usr/lib/debug/usr/share/foo/basic + strip -s $(DESTDIR)/usr/lib/debug/usr/share/foo/basic + install -m 755 -c basiclibrpath $(DESTDIR)/usr/lib/foo/basiclibrpath + install -m 755 -c basicshippedrpath $(DESTDIR)/usr/lib/foo/basicshippedrpath + install -m 755 -c ocaml-exec $(DESTDIR)/usr/lib/foo/ocaml-exec + install -m 744 -c basicshippedrpathmore $(DESTDIR)/usr/lib/foo/basicshippedrpathmore + objcopy --only-keep-debug basic $(DESTDIR)/usr/lib/debug/basic + install -d "$(DESTDIR)/usr/lib/debug/.build-id/"`$(GETBUILDID) -s basicdebug` + install -m 755 -c basicdebug $(DESTDIR)/usr/share/foo/basicdebug + # force fake buildid in order to have tag matching ok (deadbeefdeadbeef) + install -d "$(DESTDIR)/usr/lib/debug/.build-id/de" + objcopy --compress-debug-sections basicdebug \ + "$(DESTDIR)/usr/lib/debug/.build-id/de/deadbeefdeadbeef.debug" + install -d "$(DESTDIR)/usr/lib/debug/.build-id/"`$(GETBUILDID) -s basicdebug` + objcopy --compress-debug-sections --only-keep-debug basicdebug \ + "$(DESTDIR)/usr/lib/debug/.build-id/"`$(GETBUILDID) -s basicdebug`"/"`$(GETBUILDID) -f basicdebug`.debug + install -m 755 -c basic.static $(DESTDIR)/usr/lib/debug/ + # according to local debian rules unstripped in name avoid dh_strip to do the work + install -m 755 basicdebug $(DESTDIR)/usr/bin/unstripped + install -m 755 basic.static $(DESTDIR)/usr/bin/static + +clean distclean: + rm -f basic + +check test: diff --git a/t/recipes/checks/binaries/debug-symbols/detached/binaries-general/build-spec/orig/basic.c b/t/recipes/checks/binaries/debug-symbols/detached/binaries-general/build-spec/orig/basic.c new file mode 100644 index 0000000..3618004 --- /dev/null +++ b/t/recipes/checks/binaries/debug-symbols/detached/binaries-general/build-spec/orig/basic.c @@ -0,0 +1,12 @@ +#include +#include + +int +main(int argc, char *argv[]) +{ + char t[10]; + printf("Hello world!\n"); + /* forces a stack protector */ + (void) strcpy(t,argv[0]); + return (int) t[0]; +} diff --git a/t/recipes/checks/binaries/debug-symbols/detached/binaries-general/build-spec/orig/getbuildid b/t/recipes/checks/binaries/debug-symbols/detached/binaries-general/build-spec/orig/getbuildid new file mode 100755 index 0000000..0060d2b --- /dev/null +++ b/t/recipes/checks/binaries/debug-symbols/detached/binaries-general/build-spec/orig/getbuildid @@ -0,0 +1,30 @@ +#!/bin/sh +# get build-id of binary + +set -e + +usage() { + echo "Usage: getbuildid [flag] file"; + echo " print build-id of an object file" + echo "flags:" + echo " -f : full build-id (default)." + echo " -s : short build-id aka the first two characters." +} + +if test $# -lt 1; then usage; exit 77; fi +if test $# -gt 3; then usage; exit 77; fi + +if test $# -eq 1; then + LC_ALL=C readelf -n "$1" | grep -i 'Build Id:' | sed 's/.*:[[:blank:]]*\([[:digit:]|abcdef]*\).*/\1/g' +else + case "x$1" in + 'x-f') + LC_ALL=C readelf -n "$2" | grep -i 'Build Id:' | sed 's/.*:[[:blank:]]*\([[:digit:]|abcdef]*\).*/\1/g' ;; + 'x-s') + LC_ALL=C readelf -n "$2" | grep -i 'Build Id:' | sed 's/.*:[[:blank:]]*\([[:digit:]|abcdef]\{2\}\).*/\1/g' ;; + *) + exit 2; + esac +fi + +exit 0; diff --git a/t/recipes/checks/binaries/debug-symbols/detached/binaries-general/build-spec/orig/ocaml.c b/t/recipes/checks/binaries/debug-symbols/detached/binaries-general/build-spec/orig/ocaml.c new file mode 100644 index 0000000..370d17d --- /dev/null +++ b/t/recipes/checks/binaries/debug-symbols/detached/binaries-general/build-spec/orig/ocaml.c @@ -0,0 +1,11 @@ +#include + +int +main(int argc, char **argv) +{ + if (argc > 2) { + puts("Caml1999X000"); + } + puts("\n"); + return 0; +} diff --git a/t/recipes/checks/binaries/debug-symbols/detached/binaries-general/eval/desc b/t/recipes/checks/binaries/debug-symbols/detached/binaries-general/eval/desc new file mode 100644 index 0000000..e94b7c0 --- /dev/null +++ b/t/recipes/checks/binaries/debug-symbols/detached/binaries-general/eval/desc @@ -0,0 +1,2 @@ +Testname: binaries-general +Check: binaries/debug-symbols/detached diff --git a/t/recipes/checks/binaries/debug-symbols/detached/binaries-general/eval/hints b/t/recipes/checks/binaries/debug-symbols/detached/binaries-general/eval/hints new file mode 100644 index 0000000..849ff30 --- /dev/null +++ b/t/recipes/checks/binaries/debug-symbols/detached/binaries-general/eval/hints @@ -0,0 +1,4 @@ +binaries-general (binary): debug-symbols-not-detached [usr/lib/debug/.build-id/de/deadbeefdeadbeef.debug] +binaries-general (binary): debug-symbols-directly-in-usr-lib-debug [usr/lib/debug/basic] +binaries-general (binary): debug-symbols-directly-in-usr-lib-debug [usr/lib/debug/basic.static] +binaries-general (binary): debug-file-with-no-debug-symbols [usr/lib/debug/usr/share/foo/basic] diff --git a/t/recipes/checks/binaries/debug-symbols/detached/binaries-general/eval/post-test b/t/recipes/checks/binaries/debug-symbols/detached/binaries-general/eval/post-test new file mode 100755 index 0000000..11ad2c8 --- /dev/null +++ b/t/recipes/checks/binaries/debug-symbols/detached/binaries-general/eval/post-test @@ -0,0 +1 @@ +/: hardening-.*/ d diff --git a/t/recipes/checks/binaries/debug-symbols/detached/legacy-debug/build-spec/debian/_symbols b/t/recipes/checks/binaries/debug-symbols/detached/legacy-debug/build-spec/debian/_symbols new file mode 100644 index 0000000..46e6af1 --- /dev/null +++ b/t/recipes/checks/binaries/debug-symbols/detached/legacy-debug/build-spec/debian/_symbols @@ -0,0 +1,23 @@ + This line should flag a syntax error +# but this one shouldn't +| although this one should, but for a different reason + and so should this + +libhello.so.0 libhello0 #MINVER# +| libhello0c2 (>= 1.2) , libhelloc0c2 (<< 1.3) +| hello-dbg3| libhelloc0c3|foobar (= 1.2) |hello-dbg2 +| hello-dbg + hello@Base 1.0 +* Build-Dep-Foo: bar + hello2@Base 2.0 4 + hello3@Base 2.0 1 + hello3@Base 2.0 A + dummy + +libhello.so.2 libhello2 #MINVER# +* Build-Depends-Package: libbar +| libhello2 (>= 1:2.3) + hello@Base 2.0 + +libhello.so.0 libhello0 #MINVER# + duplicate@Base 1.0 diff --git a/t/recipes/checks/binaries/debug-symbols/detached/legacy-debug/build-spec/debian/changelog.in b/t/recipes/checks/binaries/debug-symbols/detached/legacy-debug/build-spec/debian/changelog.in new file mode 100644 index 0000000..02da925 --- /dev/null +++ b/t/recipes/checks/binaries/debug-symbols/detached/legacy-debug/build-spec/debian/changelog.in @@ -0,0 +1,13 @@ +debug ([% $version %]) [% $distribution %]; urgency=low + + * NMU. + (uploaded by the maintainer and with repeated version number) + + -- Russ Allbery Tue, 4 Apr 2006 20:27:22 +0000 + +debug (1.0) unstable; urgency=low + + * Initial version. + + -- Russ Allbery Sat, 4 Mar 2006 21:31:06 -0800 + diff --git a/t/recipes/checks/binaries/debug-symbols/detached/legacy-debug/build-spec/debian/compat.in b/t/recipes/checks/binaries/debug-symbols/detached/legacy-debug/build-spec/debian/compat.in new file mode 100644 index 0000000..640a566 --- /dev/null +++ b/t/recipes/checks/binaries/debug-symbols/detached/legacy-debug/build-spec/debian/compat.in @@ -0,0 +1 @@ +[% $dh_compat_level %] diff --git a/t/recipes/checks/binaries/debug-symbols/detached/legacy-debug/build-spec/debian/control b/t/recipes/checks/binaries/debug-symbols/detached/legacy-debug/build-spec/debian/control new file mode 100644 index 0000000..fcb2b86 --- /dev/null +++ b/t/recipes/checks/binaries/debug-symbols/detached/legacy-debug/build-spec/debian/control @@ -0,0 +1,85 @@ +Source: debug +Section: utils +Priority: optional +Maintainer: Russ Allbery +Build-Depends: debhelper (>= 5.0.0) +Build-Depends-Indep: not-debhelper (>= 0.4.3) +Standards-Version: 3.7.0 + +Package: hello +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: Test for external debugging information + Lintian regression test for external debugging file handling. This test + contains the binary. + . + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. + +Package: hello-dbg +Priority: optional +Section: debug +Architecture: any +Depends: hello (= ${binary:Version}), ${shlibs:Depends}, ${misc:Depends} +Description: Test for external debugging information (symbols) + Lintian regression test for external debugging file handling. This test + contains the binary symbols. + . + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. + +Package: libhello0 +Section: libs +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: Test for external debugging information (library) + Lintian regression test for external debugging file handling. This test + contains a library. + . + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. + +Package: libhello0-dbg +Section: debug +Priority: optional +Architecture: any +Depends: libhello (= ${binary:Version}), ${shlibs:Depends}, ${misc:Depends} +Description: Test for external debugging information (library symbols) + Lintian regression test for external debugging file handling. This test + contains the library symbols. + . + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. + +Package: hi-dbg +Section: debug +Priority: optional +Architecture: any +Depends: foo-pkg, not-libhello0 +Description: Test for external debugging symbols + Lintian regression test for external debugging files handling. This test + contains the library symbols. + . + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. + +Package: hello-hello-dbg +Section: debug +Priority: optional +Architecture: any +Depends: foo-pkg, not-libhello0, hello +Description: Test for external debugging symbols - another try + Lintian regression test for external debugging files handling. This test + contains the library symbols. This package actually tests a combination of + the above. + . + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. diff --git a/t/recipes/checks/binaries/debug-symbols/detached/legacy-debug/build-spec/debian/copyright b/t/recipes/checks/binaries/debug-symbols/detached/legacy-debug/build-spec/debian/copyright new file mode 100644 index 0000000..5d4f6c2 --- /dev/null +++ b/t/recipes/checks/binaries/debug-symbols/detached/legacy-debug/build-spec/debian/copyright @@ -0,0 +1,4 @@ +Written Sat, 04 Mar 2006 21:30:01 -0800 by Russ Allbery . + +Test for copyright in capital letters. (#464992) +COPYRIGHT RUSS ALLBERY 2006 diff --git a/t/recipes/checks/binaries/debug-symbols/detached/legacy-debug/build-spec/debian/rules b/t/recipes/checks/binaries/debug-symbols/detached/legacy-debug/build-spec/debian/rules new file mode 100755 index 0000000..b659895 --- /dev/null +++ b/t/recipes/checks/binaries/debug-symbols/detached/legacy-debug/build-spec/debian/rules @@ -0,0 +1,99 @@ +#!/usr/bin/make -f +# Sample debian/rules that uses debhelper. +# This file is public domain software, originally written by Joey Hess. + +# turn off PIE in CC in case we have a PIEful toolchain: +ifneq ($(findstring -no-pie,$(shell gcc -no-pie 2>&1)),) + CC := gcc +else + CC := gcc -fno-pie -no-pie +endif + +build-indep: + +build-arch: build-stamp + +build-stamp: + dh_testdir + $(CC) -D_REENTRANT -fPIC -c libhello.c + $(CC) -o libhello.so.0.0 -shared -Wl,-soname,libhello.so.0 libhello.o + ln -s libhello.so.0.0 libhello.so + $(CC) -o hello hello.c -L. -lhello + touch build-stamp + +build: build-arch build-indep + +clean: + dh_testdir + dh_testroot + rm -f build-stamp *.o libhello.so.0.0 libhello.so + dh_clean + +install: build-stamp + dh_testdir + dh_testroot + dh_clean -k + install -D hello $(CURDIR)/debian/hello/usr/bin/hello + install -D libhello.so.0.0 \ + $(CURDIR)/debian/libhello0/usr/lib/libhello.so.0.0 + ln -s libhello.so.0.0 \ + $(CURDIR)/debian/libhello0/usr/lib/libhello.so.0 + +# Build architecture-dependent files here. +export DH_OPTIONS +binary-arch: DH_OPTIONS=-a +binary-arch: build-stamp install + dh_testdir + dh_testroot + dh_installchangelogs -N hello-dbg + dh_installdocs + DH_OPTIONS= dh_strip -phello --dbg-package=hello-dbg + DH_OPTIONS= dh_strip -plibhello0 --dbg-package=libhello0-dbg + + # Now break a few things. Copy the debugging data into places it + # shouldn't be. + cp $(CURDIR)/debian/hello-dbg/usr/lib/debug/usr/bin/hello \ + $(CURDIR)/debian/hello/usr/bin/hello.dbg + cp $(CURDIR)/debian/libhello0-dbg/usr/lib/debug/usr/lib/libhello.so.0.0 \ + $(CURDIR)/debian/libhello0-dbg/usr/lib/libhello.so.dbg + + # Put a full copy of the library in libhello0-dbg in /usr/lib/debug, + # which is okay. + install -m 644 libhello.so.0.0 \ + $(CURDIR)/debian/libhello0-dbg/usr/lib/debug/libhello.so.0.0 + + # Also put it in /usr/lib/debug/lib, which isn't. + install -D -m 644 libhello.so.0.0 \ + $(CURDIR)/debian/libhello0-dbg/usr/lib/debug/lib/libhello.so.0.0 + + # Requires a versioned dependency. + dh_icons + + dh_link + dh_compress + dh_fixperms + dh_makeshlibs -X debug + dh_installdeb + dh_shlibdeps -X debug + + # We do this by hand as otherwise dpkg-gensymbols + # will error due to the broken symbols file + # and abort the build; similarly the file in + # the source tree is _symbols so that dpkg + # doesn't attempt to sanity check it + install -d $(CURDIR)/debian/libhello0/DEBIAN + install -m 644 $(CURDIR)/debian/_symbols \ + $(CURDIR)/debian/libhello0/DEBIAN/symbols + # hello doesn't contain any shlibs, but we + # make it contain a symbols file + install -d $(CURDIR)/debian/hello/DEBIAN + install -m 644 $(CURDIR)/debian/_symbols \ + $(CURDIR)/debian/hello/DEBIAN/symbols + + dh_gencontrol + dh_md5sums + dh_builddeb + +binary-indep: +binary: binary-indep binary-arch +.PHONY: build-arch build-indep build binary binary-indep binary-arch clean install diff --git a/t/recipes/checks/binaries/debug-symbols/detached/legacy-debug/build-spec/fill-values b/t/recipes/checks/binaries/debug-symbols/detached/legacy-debug/build-spec/fill-values new file mode 100644 index 0000000..79eebf1 --- /dev/null +++ b/t/recipes/checks/binaries/debug-symbols/detached/legacy-debug/build-spec/fill-values @@ -0,0 +1,6 @@ +Skeleton: upload-native +Testname: legacy-debug +Source: debug +Default-Build-Depends: debhelper (>= 9.20151004~) +Dh-Compat-Level: 7 +Description: Legacy test "debug" diff --git a/t/recipes/checks/binaries/debug-symbols/detached/legacy-debug/build-spec/orig/hello.c b/t/recipes/checks/binaries/debug-symbols/detached/legacy-debug/build-spec/orig/hello.c new file mode 100644 index 0000000..76f8337 --- /dev/null +++ b/t/recipes/checks/binaries/debug-symbols/detached/legacy-debug/build-spec/orig/hello.c @@ -0,0 +1,9 @@ +#include +#include "libhello.h" + +int +main(void) +{ + hello(); + exit(0); +} diff --git a/t/recipes/checks/binaries/debug-symbols/detached/legacy-debug/build-spec/orig/libhello.c b/t/recipes/checks/binaries/debug-symbols/detached/legacy-debug/build-spec/orig/libhello.c new file mode 100644 index 0000000..e2f8409 --- /dev/null +++ b/t/recipes/checks/binaries/debug-symbols/detached/legacy-debug/build-spec/orig/libhello.c @@ -0,0 +1,7 @@ +#include + +void +hello(void) +{ + printf("Hello, World!\n"); +} diff --git a/t/recipes/checks/binaries/debug-symbols/detached/legacy-debug/build-spec/orig/libhello.h b/t/recipes/checks/binaries/debug-symbols/detached/legacy-debug/build-spec/orig/libhello.h new file mode 100644 index 0000000..ef77476 --- /dev/null +++ b/t/recipes/checks/binaries/debug-symbols/detached/legacy-debug/build-spec/orig/libhello.h @@ -0,0 +1 @@ +void hello(void); diff --git a/t/recipes/checks/binaries/debug-symbols/detached/legacy-debug/eval/desc b/t/recipes/checks/binaries/debug-symbols/detached/legacy-debug/eval/desc new file mode 100644 index 0000000..d606fde --- /dev/null +++ b/t/recipes/checks/binaries/debug-symbols/detached/legacy-debug/eval/desc @@ -0,0 +1,2 @@ +Testname: legacy-debug +Check: binaries/debug-symbols/detached diff --git a/t/recipes/checks/binaries/debug-symbols/detached/legacy-debug/eval/hints b/t/recipes/checks/binaries/debug-symbols/detached/legacy-debug/eval/hints new file mode 100644 index 0000000..d524d8e --- /dev/null +++ b/t/recipes/checks/binaries/debug-symbols/detached/legacy-debug/eval/hints @@ -0,0 +1,5 @@ +libhello0-dbg (binary): debug-symbols-not-detached [usr/lib/debug/lib/libhello.so.0.0] +libhello0-dbg (binary): debug-symbols-directly-in-usr-lib-debug [usr/lib/debug/libhello.so.0.0] +libhello0-dbg (binary): debug-file-with-no-debug-symbols [usr/lib/debug/usr/lib/libhello.so.0.0] +libhello0-dbg (binary): debug-file-with-no-debug-symbols [usr/lib/debug/lib/libhello.so.0.0] +hello-dbg (binary): debug-file-with-no-debug-symbols [usr/lib/debug/usr/bin/hello] diff --git a/t/recipes/checks/binaries/debug-symbols/detached/legacy-debug/eval/post-test b/t/recipes/checks/binaries/debug-symbols/detached/legacy-debug/eval/post-test new file mode 100644 index 0000000..fc97c5f --- /dev/null +++ b/t/recipes/checks/binaries/debug-symbols/detached/legacy-debug/eval/post-test @@ -0,0 +1,2 @@ +/: hardening-.*/ d +s/\(current is ([0-9]+\.)+[0-9]\)/(current is CURRENT)/ diff --git a/t/recipes/checks/binaries/debug-symbols/legacy-binary/build-spec/debian/NEWS.Debian b/t/recipes/checks/binaries/debug-symbols/legacy-binary/build-spec/debian/NEWS.Debian new file mode 100644 index 0000000..29f561c --- /dev/null +++ b/t/recipes/checks/binaries/debug-symbols/legacy-binary/build-spec/debian/NEWS.Debian @@ -0,0 +1,12 @@ +binary (4-1.1) UNRELEASED; urgency=high + + This is a Debian NEWS entry that isn't encoded properly in UTF-8: . + It also has a usefull speling error. + + -- Russ Allbery Sun, 14 Oct 2007 17:11:36 -0700 + +binary (1) unstable; urgency=low + + This is another entry but this one isn't syntactically valid. + + -- Russ Allbery 2007-10-14 diff --git a/t/recipes/checks/binaries/debug-symbols/legacy-binary/build-spec/debian/README.Debian b/t/recipes/checks/binaries/debug-symbols/legacy-binary/build-spec/debian/README.Debian new file mode 100644 index 0000000..94bcc0a --- /dev/null +++ b/t/recipes/checks/binaries/debug-symbols/legacy-binary/build-spec/debian/README.Debian @@ -0,0 +1,5 @@ +this is a binary package to test lintian's handling of bins. +Check handling of D-Bus and dbus (neither of which should produce +warnings). + + -- Russ Allbery , Wed, 6 Feb 2008 18:35:11 -0800 diff --git a/t/recipes/checks/binaries/debug-symbols/legacy-binary/build-spec/debian/changelog.in b/t/recipes/checks/binaries/debug-symbols/legacy-binary/build-spec/debian/changelog.in new file mode 100644 index 0000000..39301d6 --- /dev/null +++ b/t/recipes/checks/binaries/debug-symbols/legacy-binary/build-spec/debian/changelog.in @@ -0,0 +1,47 @@ +binary ([% $version %]) [% $distribution %]; urgency=low + + * I'm doing an comaintainer-upload, acknowledging a NMU, but with a version + number which suggests I'm doing a NMU myself. + + Lintian-maintainers: Please don't update this changelog, otherwise you'll + probably break the checks/nmu checks. + + -- Jeroen van Wolffelaar Sun, 18 Apr 2004 01:49:42 +0200 + +binary (4-1) unstable; urgency=low + + * Weird version number for the new check for accidents with native + packaging. + * Date was fixed by BR and this test was put on changelog-file-strange-date + due to dpkg bug, see #794674. + + -- Marc 'HE' Brockschmidt Thu, 15 Apr 2004 23:33:51 +0200 + +binary (4) unstable; urgency=low + + * Add big file to /usr/share to trigger the big-usr-share check + + -- Jeroen van Wolffelaar Fri, 27 Feb 2004 10:15:59 +0100 + +binary (3) unstable; urgency=unlimited + + * Add some bogus menu entries using su-to-root in a bogus way + + -- Jeroen van Wolffelaar Thu, 12 Feb 2004 20:11:22 +0100 + +binary (2) unstable; urgency=low + + * Added an INSTALL document which policy 6.3 suggests not to do + + -- Sean 'Shaleh' Perry Tue, 30 Jan 2001 15:23:59 -0800 + +binary (1) unstable; urgency=low + + * hello.c added + * hello-static is same as hello, but compiled statically + * added a menu entry which lacks a Section + * added a postinst + * postinst calls suidregister which is no longer policy compliant + + -- Sean 'Shaleh' Perry Wed, 10 Jan 2001 08:55:34 -0800 + diff --git a/t/recipes/checks/binaries/debug-symbols/legacy-binary/build-spec/debian/conffiles b/t/recipes/checks/binaries/debug-symbols/legacy-binary/build-spec/debian/conffiles new file mode 100644 index 0000000..d1a0843 --- /dev/null +++ b/t/recipes/checks/binaries/debug-symbols/legacy-binary/build-spec/debian/conffiles @@ -0,0 +1 @@ +/etc/menu-methods/lintian diff --git a/t/recipes/checks/binaries/debug-symbols/legacy-binary/build-spec/debian/control b/t/recipes/checks/binaries/debug-symbols/legacy-binary/build-spec/debian/control new file mode 100644 index 0000000..c797357 --- /dev/null +++ b/t/recipes/checks/binaries/debug-symbols/legacy-binary/build-spec/debian/control @@ -0,0 +1,42 @@ +Source: binary +Section: misc +Priority: optional +Maintainer: Lintian Maintainers +Uploaders: Co-maintainer one , Jeroen van Wolffelaar , Co-maintainer three +Standards-Version: 3.2.1 +Homepage: http://lintian.debian.org/ +Vcs-Svn: http://svn.wolffelaar.nl/lintian/trunk +XS-Vcs-Browser: http://svn.wolffelaar.nl/lintian/trunk +XS-Dm-Upload-Allowed: yes + +Package: binary +Architecture: any +Pre-Depends: ${shlibs:Depends}, xorg, binary-data (= ${source:Version}), libssl0.9.8 +Homepage: +Vcs-Svn: http://svn.wolffelaar.nl/lintian/trunk +Description: test handling of binary files + Regression test for lintian's handling of binary files for debian. This + is checked for picky spelling errors. + . + This package list [ subversion | gconf ] should not be flagged as a spelling + mistake. The spelling correction for dont should be correct. + . + Homepage: http://lintian.debian.org/ + +Package: binary-data +Architecture: all +Depends: binary (= ${source:Version}), libssl-not-openssl, + libssl0.9.8 | or-something-else +Description: test handling of binary relationships + Regression test for lintian's checking of package relationships between + arch:any and arch:all packages. + . + This mention of subversion should be flagged as a spelling mistake. + +#Package: binary-comment +#Architecture: space-almonds +#Depends: * +#Depends: * +#Description: test comment support +# Yes, comments are actually allowed in debian/control, so none of the +# above should produce errors. diff --git a/t/recipes/checks/binaries/debug-symbols/legacy-binary/build-spec/debian/copyright b/t/recipes/checks/binaries/debug-symbols/legacy-binary/build-spec/debian/copyright new file mode 100644 index 0000000..1d6806d --- /dev/null +++ b/t/recipes/checks/binaries/debug-symbols/legacy-binary/build-spec/debian/copyright @@ -0,0 +1,15 @@ +hello.c is released under public domain. This is distributed in the hope that +it will be useful, but without any warranty; without even the implied warranty +of merchantability or fitness for a particular purpose. + +A reference to /usr/share/common-licenses/GPL-2 to make it look like this +package is under the GPL and trigger the OpenSSL warning. + +Test for old FSF address: + +Free Software Foundation, Inc., 59 Temple Place - Suite 330, +Boston, MA 02111-1307, USA. + +Test for deprecated ntionl ncoding. + +Improper capitalization of linux or debian isn't caught here. diff --git a/t/recipes/checks/binaries/debug-symbols/legacy-binary/build-spec/debian/doc-base b/t/recipes/checks/binaries/debug-symbols/legacy-binary/build-spec/debian/doc-base new file mode 100644 index 0000000..7e5b38f --- /dev/null +++ b/t/recipes/checks/binaries/debug-symbols/legacy-binary/build-spec/debian/doc-base @@ -0,0 +1,41 @@ +Document: binary!docs +Title: Broken debian binary doc-base control file +Author: Russ Allbery +Abstract: This control file exercises various tests of doc-base control + files, including several things that aren't tested yet. The third and + fourth one has trailing whitespace. + . + This section has a speling error and bad character. + . + The above separator was fine. +Section: Non/Existant +Unknown: Some field + + + +Format: debiandoc-sgML +Files: /usr/share/doc/binary/binary.sgml.gz +Unknown: Some field + +Format: ESP +Index: /usr/share/doc/binary/binary.txt + +Index: /usr/share/doc/binary/html/index.html + /usr/share/doc/binary/html/ch1.html + /usr/share/doc/binary/html/ch4.html + + +Format: HTML +Index: /usr/share/doc/binary/html/index.html +Files: /usr/share/doc/binary/html/ch?.h*l + /usr/share/doc/binary/hml/*.html + +Format: inFO +Files: /usr/share/info/binary.info.gz + +Format: HTML +Index: /usr/share/doc/binary/html/index.html +Files: /usr/share/doc/binary/html/ch5.html + /usr/share/doc/binary/html/ch6.html + + diff --git a/t/recipes/checks/binaries/debug-symbols/legacy-binary/build-spec/debian/goodbye.desktop b/t/recipes/checks/binaries/debug-symbols/legacy-binary/build-spec/debian/goodbye.desktop new file mode 100644 index 0000000..f6ce8e3 --- /dev/null +++ b/t/recipes/checks/binaries/debug-symbols/legacy-binary/build-spec/debian/goodbye.desktop @@ -0,0 +1,13 @@ +[Desktop Entry] +Name:Goodbye +# Name=Goodbye +Comment=Say hello! +SpecialTag=This doesn't exist! +Exec=goodbye +icon=hello +Terminal=true +Type=Application +Categories=WeirdStuff;Screensaver; +Encoding=ISO-10646-1 +[Other Entry] +Name=Goodbye diff --git a/t/recipes/checks/binaries/debug-symbols/legacy-binary/build-spec/debian/hello.desktop b/t/recipes/checks/binaries/debug-symbols/legacy-binary/build-spec/debian/hello.desktop new file mode 100644 index 0000000..f795468 --- /dev/null +++ b/t/recipes/checks/binaries/debug-symbols/legacy-binary/build-spec/debian/hello.desktop @@ -0,0 +1,14 @@ +# some random comment + +# [Foo Bar] +[KDE Desktop Entry] +Name=Hello +Name[en_US]=Hello +Comment=Say hello! +Exec=kdesu hello +Icon=hello +Terminal=true +Type=Application +Categories=GNOME;GTK;System;Applet;X-Foo;Settings; +Encoding=UTF-8 +OnlyShowIn=GNOME; diff --git a/t/recipes/checks/binaries/debug-symbols/legacy-binary/build-spec/debian/menu b/t/recipes/checks/binaries/debug-symbols/legacy-binary/build-spec/debian/menu new file mode 100644 index 0000000..e8972f4 --- /dev/null +++ b/t/recipes/checks/binaries/debug-symbols/legacy-binary/build-spec/debian/menu @@ -0,0 +1,26 @@ +?package(binary):needs=text title="Hello World" command="/usr/bin/hello" +?package(binary):needs=text section="Applications/System" title="Run cfdisk (0)" command="/usr/bin/su-to-root cfdisk" +?package(binary):needs="text" section="Applications/System/Hardware" title="Run cfdisk (1)" command="sux -p cfdisk" +?package(binary):needs="x11" section="Window Managers" title="Run xfdisk" command="/usr/sbin/su-to-root -c xfdisk" +?package(binary):needs="wm" section="Applications/System/Administration" title="Run fdisk-wm" command="su-to-root -c hello" +?package(binary):section="Apps/Games" title="I'm not root!" command="su-to-root -c imnothere" +?package(binary):needs="text" section="Apps/System" title="I'm not here!" command="/imnothere" +?package(binary,other-binary):\ + needs="text"\ + section="Applications/Shells"\ + title="more than one required"\ + command="other-bin -s omething" +?package(binary):needs="wmmodule" section="WindowManagers/Modules" title="somemodule" command="ModuleCmd" +?package(binary):needs="wmmodule" section="FVWM Modules" title="somemodule" command="ModuleCmd" +?package(binary):needs="text" section="Applications/System/Administration" title="I'm not in /usr/bin!" command="iminusrbin" +?package(binary):needs="text"\ + section="Applications/System/Administration"\ + title="I'm not root!" command="su-to-root -c imnothere" +?package(binary):needs="text" section="Applications/System/Administration"\ + title="Run cfdisk (0)" command="cfdisk" +?package(binary):needs="text" section="Applications/System/Administration" title="Hello World" command="/usr/bin/hello" +?package(binary):needs="wm" section="FVWM Modules" title="Fake Module" command="hello" +?package(binary):needs="fvwmmodule" section="Window Maker" title="Fake Module"\ + command="hello" +?package(binary):needs="x11" section="Applications/System/Hardware" title="Run xfdisk" command="su-to-root -c 'xfdisk -f'" +?package(binary):needs="text" section="Applications/System/Administration" title="foo" command="sh /path/to/foo" diff --git a/t/recipes/checks/binaries/debug-symbols/legacy-binary/build-spec/debian/menu-method b/t/recipes/checks/binaries/debug-symbols/legacy-binary/build-spec/debian/menu-method new file mode 100644 index 0000000..9f07bd7 --- /dev/null +++ b/t/recipes/checks/binaries/debug-symbols/legacy-binary/build-spec/debian/menu-method @@ -0,0 +1,22 @@ +#!/usr/bin/install-menu + +# -*- mode: shell-script; -*- +#I need menu-1! +# + +!include notmenu.h + +compat="menu-2" + +outputencoding="UTF-8"; +outputlanguage="C"; + +x11 = AppEntry("false"); +text = AppEntry("true"); + +startmenu = ""; +endmenu = ""; +submenutitle = ""; +rootprefix = "/var/lib/lintian/menu"; +userprefix = ".local/share/lintian/menu"; + diff --git a/t/recipes/checks/binaries/debug-symbols/legacy-binary/build-spec/debian/postinst b/t/recipes/checks/binaries/debug-symbols/legacy-binary/build-spec/debian/postinst new file mode 100644 index 0000000..29e1861 --- /dev/null +++ b/t/recipes/checks/binaries/debug-symbols/legacy-binary/build-spec/debian/postinst @@ -0,0 +1,6 @@ +#! /bin/bash -e + +if [ $1 eq 'configure' ] +then + suidregister hello-static root root 4755 +fi diff --git a/t/recipes/checks/binaries/debug-symbols/legacy-binary/build-spec/debian/rules b/t/recipes/checks/binaries/debug-symbols/legacy-binary/build-spec/debian/rules new file mode 100755 index 0000000..a962ea9 --- /dev/null +++ b/t/recipes/checks/binaries/debug-symbols/legacy-binary/build-spec/debian/rules @@ -0,0 +1,92 @@ +#!/usr/bin/make -f + +tmp=debian/tmp + +# This reference to $(PWD) should not cause an error but the one below +# should. +build-arch: + make + echo $(PWD) + +build: build-arch + +clean: + make -i clean + [ ! -f debian/files ] || rm -f debian/files + [ ! -f debian/substvars ] || rm -f debian/substvars + [ ! -d debian/tmp ] || rm -rf debian/tmp + [ ! -d debian/binary ] || rm -rf debian/binary + [ ! -d debian/binary-data ] || rm -rf debian/binary-data + +binary-arch: build + install -d $(tmp)/usr/bin + install -d $(tmp)/boot/hello + install -m 755 hello $(tmp)/usr/bin + touch $(tmp)/usr/bin/iminusrbin + chmod 755 $(tmp)/usr/bin/iminusrbin + install -m 755 hello-static $(tmp)/usr/bin + strip $(tmp)/usr/bin/hello-static + install -m 755 hello-static $(tmp)/usr/bin/hello.static + strip --remove-section=.comment --remove-section=.note $(tmp)/usr/bin/hello.static + ln $(tmp)/usr/bin/hello.static $(tmp)/usr/bin/static-hello + install -m 755 hello-static $(tmp)/boot/hello + strip --remove-section=.comment --remove-section=.note $(tmp)/boot/hello/hello-static + install -d $(tmp)/usr/share/doc/binary + install -m 644 INSTALL $(tmp)/usr/share/doc/binary + install -d $(tmp)/usr/share/doc/binary/html + echo '' > $(tmp)/usr/share/doc/binary/html/index.html + echo '' > $(tmp)/usr/share/doc/binary/html/ch1.html + ln -s ../html/./ch1.html $(tmp)/usr/share/doc/binary/html/ch2.html + ln -s /usr/share/doc/binary/htm/ch1.html $(tmp)/usr/share/doc/binary/html/ch3.html + echo '' > $(tmp)/usr/share/doc/binary/html/ch5.html + ln $(tmp)/usr/share/doc/binary/html/ch5.html \ + $(tmp)/usr/share/doc/binary/html/ch6.html + install -d $(tmp)/usr/share/menu + install -d $(tmp)/usr/lib/menu + install -d $(tmp)/usr/share/binary + install -m 644 debian/menu $(tmp)/usr/share/menu/binary + install -m 644 debian/menu $(tmp)/usr/lib/menu/binary + install -d $(tmp)/etc/menu-methods + install -m 755 debian/menu-method $(tmp)/etc/menu-methods/lintian + install -d $(tmp)/usr/share/doc-base + install -m 644 debian/doc-base $(tmp)/usr/share/doc-base/binary + touch '$(tmp)/usr/share/doc-base/space ' + install -m 644 debian/README.Debian $(tmp)/usr/share/doc/binary + install -m 644 debian/NEWS.Debian $(tmp)/usr/share/doc/binary + gzip -n -9 $(tmp)/usr/share/doc/binary/NEWS.Debian + install -m 644 debian/copyright $(tmp)/usr/share/doc/binary + install -m 644 debian/changelog $(tmp)/usr/share/doc/binary + #gzip -n -9 $(tmp)/usr/share/doc/binary/changelog + install -d $(tmp)/DEBIAN + install -m 755 debian/postinst $(tmp)/DEBIAN + install -m 644 debian/conffiles $(tmp)/DEBIAN + + install -d $(tmp)/usr/share/applications + install -m 644 debian/hello.desktop \ + $(tmp)/usr/share/applications/hello.desktop + install -m 755 debian/goodbye.desktop \ + $(tmp)/usr/share/applications/goodbye.desktop + + # should be ok... + echo boe > $(tmp)/usr/bar + ln $(tmp)/usr/bar $(tmp)/usr/foo + # but this isn't + echo boe > $(tmp)/usr/bar2 + ln $(tmp)/usr/bar2 $(tmp)/usr/share/baz + + dd if=/dev/zero of=$(tmp)/usr/share/binary/largefile bs=1024 count=4000 + + install -d debian/binary-data/DEBIAN + install -d debian/binary-data/usr/share/doc + ln -s binary debian/binary-data/usr/share/doc/binary-data + + dpkg-shlibdeps $(tmp)/usr/bin/hello + dpkg-gencontrol -pbinary -isp + dpkg-gencontrol -pbinary-data -Pdebian/binary-data -isp + + dpkg --build debian/tmp .. + dpkg --build debian/binary-data .. + +binary: binary-arch + +.PHONY: build-arch build binary-arch binary clean diff --git a/t/recipes/checks/binaries/debug-symbols/legacy-binary/build-spec/debian/templates b/t/recipes/checks/binaries/debug-symbols/legacy-binary/build-spec/debian/templates new file mode 100644 index 0000000..3d92861 --- /dev/null +++ b/t/recipes/checks/binaries/debug-symbols/legacy-binary/build-spec/debian/templates @@ -0,0 +1,16 @@ +# The debconf templates defined here are the sort that you'd use if +# providing a wordlist and an ispell dictionary for the language +# "perl". This shouldn't trigger warnings about not using debconf-po. + +Template: shared/packages-ispell +Type: text +Description: + +Template: shared/packages-wordlist +Type: text +Description: + +Template: miscfiles/languages +Type: text +Default: perl (Pathologically Eclectic Rubbish Lister) +Description: diff --git a/t/recipes/checks/binaries/debug-symbols/legacy-binary/build-spec/fill-values b/t/recipes/checks/binaries/debug-symbols/legacy-binary/build-spec/fill-values new file mode 100644 index 0000000..b503871 --- /dev/null +++ b/t/recipes/checks/binaries/debug-symbols/legacy-binary/build-spec/fill-values @@ -0,0 +1,5 @@ +Skeleton: upload-non-native +Testname: legacy-binary +Source: binary +Version: 4-1.1 +Description: Legacy test "binary" diff --git a/t/recipes/checks/binaries/debug-symbols/legacy-binary/build-spec/orig/INSTALL b/t/recipes/checks/binaries/debug-symbols/legacy-binary/build-spec/orig/INSTALL new file mode 100644 index 0000000..3b50ea9 --- /dev/null +++ b/t/recipes/checks/binaries/debug-symbols/legacy-binary/build-spec/orig/INSTALL @@ -0,0 +1,176 @@ +Basic Installation +================== + + These are generic installation instructions. + + The `configure' shell script attempts to guess correct values for +various system-dependent variables used during compilation. It uses +those values to create a `Makefile' in each directory of the package. +It may also create one or more `.h' files containing system-dependent +definitions. Finally, it creates a shell script `config.status' that +you can run in the future to recreate the current configuration, a file +`config.cache' that saves the results of its tests to speed up +reconfiguring, and a file `config.log' containing compiler output +(useful mainly for debugging `configure'). + + If you need to do unusual things to compile the package, please try +to figure out how `configure' could check whether to do them, and mail +diffs or instructions to the address given in the `README' so they can +be considered for the next release. If at some point `config.cache' +contains results you don't want to keep, you may remove or edit it. + + The file `configure.in' is used to create `configure' by a program +called `autoconf'. You only need `configure.in' if you want to change +it or regenerate `configure' using a newer version of `autoconf'. + +The simplest way to compile this package is: + + 1. `cd' to the directory containing the package's source code and type + `./configure' to configure the package for your system. If you're + using `csh' on an old version of System V, you might need to type + `sh ./configure' instead to prevent `csh' from trying to execute + `configure' itself. + + Running `configure' takes a while. While running, it prints some + messages telling which features it is checking for. + + 2. Type `make' to compile the package. + + 3. Optionally, type `make check' to run any self-tests that come with + the package. + + 4. Type `make install' to install the programs and any data files and + documentation. + + 5. You can remove the program binaries and object files from the + source code directory by typing `make clean'. To also remove the + files that `configure' created (so you can compile the package for + a different kind of computer), type `make distclean'. There is + also a `make maintainer-clean' target, but that is intended mainly + for the package's developers. If you use it, you may have to get + all sorts of other programs in order to regenerate files that came + with the distribution. + +Compilers and Options +===================== + + Some systems require unusual options for compilation or linking that +the `configure' script does not know about. You can give `configure' +initial values for variables by setting them in the environment. Using +a Bourne-compatible shell, you can do that on the command line like +this: + CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure + +Or on systems that have the `env' program, you can do it like this: + env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure + +Compiling For Multiple Architectures +==================================== + + You can compile the package for more than one kind of computer at the +same time, by placing the object files for each architecture in their +own directory. To do this, you must use a version of `make' that +supports the `VPATH' variable, such as GNU `make'. `cd' to the +directory where you want the object files and executables to go and run +the `configure' script. `configure' automatically checks for the +source code in the directory that `configure' is in and in `..'. + + If you have to use a `make' that does not supports the `VPATH' +variable, you have to compile the package for one architecture at a time +in the source code directory. After you have installed the package for +one architecture, use `make distclean' before reconfiguring for another +architecture. + +Installation Names +================== + + By default, `make install' will install the package's files in +`/usr/local/bin', `/usr/local/man', etc. You can specify an +installation prefix other than `/usr/local' by giving `configure' the +option `--prefix=PATH'. + + You can specify separate installation prefixes for +architecture-specific files and architecture-independent files. If you +give `configure' the option `--exec-prefix=PATH', the package will use +PATH as the prefix for installing programs and libraries. +Documentation and other data files will still use the regular prefix. + + If the package supports it, you can cause programs to be installed +with an extra prefix or suffix on their names by giving `configure' the +option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. + +Optional Features +================= + + Some packages pay attention to `--enable-FEATURE' options to +`configure', where FEATURE indicates an optional part of the package. +They may also pay attention to `--with-PACKAGE' options, where PACKAGE +is something like `gnu-as' or `x' (for the X Window System). The +`README' should mention any `--enable-' and `--with-' options that the +package recognizes. + + For packages that use the X Window System, `configure' can usually +find the X include and library files automatically, but if it doesn't, +you can use the `configure' options `--x-includes=DIR' and +`--x-libraries=DIR' to specify their locations. + +Specifying the System Type +========================== + + There may be some features `configure' can not figure out +automatically, but needs to determine by the type of host the package +will run on. Usually `configure' can figure that out, but if it prints +a message saying it can not guess the host type, give it the +`--host=TYPE' option. TYPE can either be a short name for the system +type, such as `sun4', or a canonical name with three fields: + CPU-COMPANY-SYSTEM + +See the file `config.sub' for the possible values of each field. If +`config.sub' isn't included in this package, then this package doesn't +need to know the host type. + + If you are building compiler tools for cross-compiling, you can also +use the `--target=TYPE' option to select the type of system they will +produce code for and the `--build=TYPE' option to select the type of +system on which you are compiling the package. + +Sharing Defaults +================ + + If you want to set default values for `configure' scripts to share, +you can create a site shell script called `config.site' that gives +default values for variables like `CC', `cache_file', and `prefix'. +`configure' looks for `PREFIX/share/config.site' if it exists, then +`PREFIX/etc/config.site' if it exists. Or, you can set the +`CONFIG_SITE' environment variable to the location of the site script. +A warning: not all `configure' scripts look for a site script. + +Operation Controls +================== + + `configure' recognizes the following options to control how it +operates. + +`--cache-file=FILE' + Use and save the results of the tests in FILE instead of + `./config.cache'. Set FILE to `/dev/null' to disable caching, for + debugging `configure'. + +`--help' + Print a summary of the options to `configure', and exit. + +`--quiet' +`--silent' +`-q' + Do not print messages saying which checks are being made. + +`--srcdir=DIR' + Look for the package's source code in directory DIR. Usually + `configure' can determine that directory automatically. + +`--version' + Print the version of Autoconf used to generate the `configure' + script, and exit. + +`configure' also accepts some other, not widely useful, options. + diff --git a/t/recipes/checks/binaries/debug-symbols/legacy-binary/build-spec/orig/Makefile b/t/recipes/checks/binaries/debug-symbols/legacy-binary/build-spec/orig/Makefile new file mode 100644 index 0000000..da1dc55 --- /dev/null +++ b/t/recipes/checks/binaries/debug-symbols/legacy-binary/build-spec/orig/Makefile @@ -0,0 +1,12 @@ +all: hello hello-static + +hello: hello.c + gcc hello.c -o hello + +hello-static: hello.c + gcc -static hello.c -o hello-static + +clean: + rm -f hello hello-static + +distclean: clean diff --git a/t/recipes/checks/binaries/debug-symbols/legacy-binary/build-spec/orig/hello.c b/t/recipes/checks/binaries/debug-symbols/legacy-binary/build-spec/orig/hello.c new file mode 100644 index 0000000..2fb04e1 --- /dev/null +++ b/t/recipes/checks/binaries/debug-symbols/legacy-binary/build-spec/orig/hello.c @@ -0,0 +1,8 @@ +#include +#include + +int main(int argc, char *argv[]) { + + printf("Hello, World!\n"); + exit(0); +} diff --git a/t/recipes/checks/binaries/debug-symbols/legacy-binary/eval/desc b/t/recipes/checks/binaries/debug-symbols/legacy-binary/eval/desc new file mode 100644 index 0000000..28e4772 --- /dev/null +++ b/t/recipes/checks/binaries/debug-symbols/legacy-binary/eval/desc @@ -0,0 +1,2 @@ +Testname: legacy-binary +Check: binaries/debug-symbols diff --git a/t/recipes/checks/binaries/debug-symbols/legacy-binary/eval/hints b/t/recipes/checks/binaries/debug-symbols/legacy-binary/eval/hints new file mode 100644 index 0000000..19858fb --- /dev/null +++ b/t/recipes/checks/binaries/debug-symbols/legacy-binary/eval/hints @@ -0,0 +1 @@ +binary (binary): unstripped-binary-or-object [usr/bin/hello] diff --git a/t/recipes/checks/binaries/debug-symbols/legacy-binary/eval/post-test b/t/recipes/checks/binaries/debug-symbols/legacy-binary/eval/post-test new file mode 100644 index 0000000..3deefd5 --- /dev/null +++ b/t/recipes/checks/binaries/debug-symbols/legacy-binary/eval/post-test @@ -0,0 +1,3 @@ +s/arch-dep-package-has-big-usr-share .*kB .*%/arch-dep-package-has-big-usr-share/ +/: hardening-.*/ d +s/\(current is ([0-9]+\.)+[0-9]\)/(current is CURRENT)/ diff --git a/t/recipes/checks/binaries/debug-symbols/legacy-debug/build-spec/debian/_symbols b/t/recipes/checks/binaries/debug-symbols/legacy-debug/build-spec/debian/_symbols new file mode 100644 index 0000000..46e6af1 --- /dev/null +++ b/t/recipes/checks/binaries/debug-symbols/legacy-debug/build-spec/debian/_symbols @@ -0,0 +1,23 @@ + This line should flag a syntax error +# but this one shouldn't +| although this one should, but for a different reason + and so should this + +libhello.so.0 libhello0 #MINVER# +| libhello0c2 (>= 1.2) , libhelloc0c2 (<< 1.3) +| hello-dbg3| libhelloc0c3|foobar (= 1.2) |hello-dbg2 +| hello-dbg + hello@Base 1.0 +* Build-Dep-Foo: bar + hello2@Base 2.0 4 + hello3@Base 2.0 1 + hello3@Base 2.0 A + dummy + +libhello.so.2 libhello2 #MINVER# +* Build-Depends-Package: libbar +| libhello2 (>= 1:2.3) + hello@Base 2.0 + +libhello.so.0 libhello0 #MINVER# + duplicate@Base 1.0 diff --git a/t/recipes/checks/binaries/debug-symbols/legacy-debug/build-spec/debian/changelog.in b/t/recipes/checks/binaries/debug-symbols/legacy-debug/build-spec/debian/changelog.in new file mode 100644 index 0000000..02da925 --- /dev/null +++ b/t/recipes/checks/binaries/debug-symbols/legacy-debug/build-spec/debian/changelog.in @@ -0,0 +1,13 @@ +debug ([% $version %]) [% $distribution %]; urgency=low + + * NMU. + (uploaded by the maintainer and with repeated version number) + + -- Russ Allbery Tue, 4 Apr 2006 20:27:22 +0000 + +debug (1.0) unstable; urgency=low + + * Initial version. + + -- Russ Allbery Sat, 4 Mar 2006 21:31:06 -0800 + diff --git a/t/recipes/checks/binaries/debug-symbols/legacy-debug/build-spec/debian/compat.in b/t/recipes/checks/binaries/debug-symbols/legacy-debug/build-spec/debian/compat.in new file mode 100644 index 0000000..640a566 --- /dev/null +++ b/t/recipes/checks/binaries/debug-symbols/legacy-debug/build-spec/debian/compat.in @@ -0,0 +1 @@ +[% $dh_compat_level %] diff --git a/t/recipes/checks/binaries/debug-symbols/legacy-debug/build-spec/debian/control b/t/recipes/checks/binaries/debug-symbols/legacy-debug/build-spec/debian/control new file mode 100644 index 0000000..fcb2b86 --- /dev/null +++ b/t/recipes/checks/binaries/debug-symbols/legacy-debug/build-spec/debian/control @@ -0,0 +1,85 @@ +Source: debug +Section: utils +Priority: optional +Maintainer: Russ Allbery +Build-Depends: debhelper (>= 5.0.0) +Build-Depends-Indep: not-debhelper (>= 0.4.3) +Standards-Version: 3.7.0 + +Package: hello +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: Test for external debugging information + Lintian regression test for external debugging file handling. This test + contains the binary. + . + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. + +Package: hello-dbg +Priority: optional +Section: debug +Architecture: any +Depends: hello (= ${binary:Version}), ${shlibs:Depends}, ${misc:Depends} +Description: Test for external debugging information (symbols) + Lintian regression test for external debugging file handling. This test + contains the binary symbols. + . + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. + +Package: libhello0 +Section: libs +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: Test for external debugging information (library) + Lintian regression test for external debugging file handling. This test + contains a library. + . + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. + +Package: libhello0-dbg +Section: debug +Priority: optional +Architecture: any +Depends: libhello (= ${binary:Version}), ${shlibs:Depends}, ${misc:Depends} +Description: Test for external debugging information (library symbols) + Lintian regression test for external debugging file handling. This test + contains the library symbols. + . + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. + +Package: hi-dbg +Section: debug +Priority: optional +Architecture: any +Depends: foo-pkg, not-libhello0 +Description: Test for external debugging symbols + Lintian regression test for external debugging files handling. This test + contains the library symbols. + . + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. + +Package: hello-hello-dbg +Section: debug +Priority: optional +Architecture: any +Depends: foo-pkg, not-libhello0, hello +Description: Test for external debugging symbols - another try + Lintian regression test for external debugging files handling. This test + contains the library symbols. This package actually tests a combination of + the above. + . + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. diff --git a/t/recipes/checks/binaries/debug-symbols/legacy-debug/build-spec/debian/copyright b/t/recipes/checks/binaries/debug-symbols/legacy-debug/build-spec/debian/copyright new file mode 100644 index 0000000..5d4f6c2 --- /dev/null +++ b/t/recipes/checks/binaries/debug-symbols/legacy-debug/build-spec/debian/copyright @@ -0,0 +1,4 @@ +Written Sat, 04 Mar 2006 21:30:01 -0800 by Russ Allbery . + +Test for copyright in capital letters. (#464992) +COPYRIGHT RUSS ALLBERY 2006 diff --git a/t/recipes/checks/binaries/debug-symbols/legacy-debug/build-spec/debian/rules b/t/recipes/checks/binaries/debug-symbols/legacy-debug/build-spec/debian/rules new file mode 100755 index 0000000..b659895 --- /dev/null +++ b/t/recipes/checks/binaries/debug-symbols/legacy-debug/build-spec/debian/rules @@ -0,0 +1,99 @@ +#!/usr/bin/make -f +# Sample debian/rules that uses debhelper. +# This file is public domain software, originally written by Joey Hess. + +# turn off PIE in CC in case we have a PIEful toolchain: +ifneq ($(findstring -no-pie,$(shell gcc -no-pie 2>&1)),) + CC := gcc +else + CC := gcc -fno-pie -no-pie +endif + +build-indep: + +build-arch: build-stamp + +build-stamp: + dh_testdir + $(CC) -D_REENTRANT -fPIC -c libhello.c + $(CC) -o libhello.so.0.0 -shared -Wl,-soname,libhello.so.0 libhello.o + ln -s libhello.so.0.0 libhello.so + $(CC) -o hello hello.c -L. -lhello + touch build-stamp + +build: build-arch build-indep + +clean: + dh_testdir + dh_testroot + rm -f build-stamp *.o libhello.so.0.0 libhello.so + dh_clean + +install: build-stamp + dh_testdir + dh_testroot + dh_clean -k + install -D hello $(CURDIR)/debian/hello/usr/bin/hello + install -D libhello.so.0.0 \ + $(CURDIR)/debian/libhello0/usr/lib/libhello.so.0.0 + ln -s libhello.so.0.0 \ + $(CURDIR)/debian/libhello0/usr/lib/libhello.so.0 + +# Build architecture-dependent files here. +export DH_OPTIONS +binary-arch: DH_OPTIONS=-a +binary-arch: build-stamp install + dh_testdir + dh_testroot + dh_installchangelogs -N hello-dbg + dh_installdocs + DH_OPTIONS= dh_strip -phello --dbg-package=hello-dbg + DH_OPTIONS= dh_strip -plibhello0 --dbg-package=libhello0-dbg + + # Now break a few things. Copy the debugging data into places it + # shouldn't be. + cp $(CURDIR)/debian/hello-dbg/usr/lib/debug/usr/bin/hello \ + $(CURDIR)/debian/hello/usr/bin/hello.dbg + cp $(CURDIR)/debian/libhello0-dbg/usr/lib/debug/usr/lib/libhello.so.0.0 \ + $(CURDIR)/debian/libhello0-dbg/usr/lib/libhello.so.dbg + + # Put a full copy of the library in libhello0-dbg in /usr/lib/debug, + # which is okay. + install -m 644 libhello.so.0.0 \ + $(CURDIR)/debian/libhello0-dbg/usr/lib/debug/libhello.so.0.0 + + # Also put it in /usr/lib/debug/lib, which isn't. + install -D -m 644 libhello.so.0.0 \ + $(CURDIR)/debian/libhello0-dbg/usr/lib/debug/lib/libhello.so.0.0 + + # Requires a versioned dependency. + dh_icons + + dh_link + dh_compress + dh_fixperms + dh_makeshlibs -X debug + dh_installdeb + dh_shlibdeps -X debug + + # We do this by hand as otherwise dpkg-gensymbols + # will error due to the broken symbols file + # and abort the build; similarly the file in + # the source tree is _symbols so that dpkg + # doesn't attempt to sanity check it + install -d $(CURDIR)/debian/libhello0/DEBIAN + install -m 644 $(CURDIR)/debian/_symbols \ + $(CURDIR)/debian/libhello0/DEBIAN/symbols + # hello doesn't contain any shlibs, but we + # make it contain a symbols file + install -d $(CURDIR)/debian/hello/DEBIAN + install -m 644 $(CURDIR)/debian/_symbols \ + $(CURDIR)/debian/hello/DEBIAN/symbols + + dh_gencontrol + dh_md5sums + dh_builddeb + +binary-indep: +binary: binary-indep binary-arch +.PHONY: build-arch build-indep build binary binary-indep binary-arch clean install diff --git a/t/recipes/checks/binaries/debug-symbols/legacy-debug/build-spec/fill-values b/t/recipes/checks/binaries/debug-symbols/legacy-debug/build-spec/fill-values new file mode 100644 index 0000000..79eebf1 --- /dev/null +++ b/t/recipes/checks/binaries/debug-symbols/legacy-debug/build-spec/fill-values @@ -0,0 +1,6 @@ +Skeleton: upload-native +Testname: legacy-debug +Source: debug +Default-Build-Depends: debhelper (>= 9.20151004~) +Dh-Compat-Level: 7 +Description: Legacy test "debug" diff --git a/t/recipes/checks/binaries/debug-symbols/legacy-debug/build-spec/orig/hello.c b/t/recipes/checks/binaries/debug-symbols/legacy-debug/build-spec/orig/hello.c new file mode 100644 index 0000000..76f8337 --- /dev/null +++ b/t/recipes/checks/binaries/debug-symbols/legacy-debug/build-spec/orig/hello.c @@ -0,0 +1,9 @@ +#include +#include "libhello.h" + +int +main(void) +{ + hello(); + exit(0); +} diff --git a/t/recipes/checks/binaries/debug-symbols/legacy-debug/build-spec/orig/libhello.c b/t/recipes/checks/binaries/debug-symbols/legacy-debug/build-spec/orig/libhello.c new file mode 100644 index 0000000..e2f8409 --- /dev/null +++ b/t/recipes/checks/binaries/debug-symbols/legacy-debug/build-spec/orig/libhello.c @@ -0,0 +1,7 @@ +#include + +void +hello(void) +{ + printf("Hello, World!\n"); +} diff --git a/t/recipes/checks/binaries/debug-symbols/legacy-debug/build-spec/orig/libhello.h b/t/recipes/checks/binaries/debug-symbols/legacy-debug/build-spec/orig/libhello.h new file mode 100644 index 0000000..ef77476 --- /dev/null +++ b/t/recipes/checks/binaries/debug-symbols/legacy-debug/build-spec/orig/libhello.h @@ -0,0 +1 @@ +void hello(void); diff --git a/t/recipes/checks/binaries/debug-symbols/legacy-debug/eval/desc b/t/recipes/checks/binaries/debug-symbols/legacy-debug/eval/desc new file mode 100644 index 0000000..2d3463a --- /dev/null +++ b/t/recipes/checks/binaries/debug-symbols/legacy-debug/eval/desc @@ -0,0 +1,2 @@ +Testname: legacy-debug +Check: binaries/debug-symbols diff --git a/t/recipes/checks/binaries/debug-symbols/legacy-debug/eval/hints b/t/recipes/checks/binaries/debug-symbols/legacy-debug/eval/hints new file mode 100644 index 0000000..44d7a55 --- /dev/null +++ b/t/recipes/checks/binaries/debug-symbols/legacy-debug/eval/hints @@ -0,0 +1 @@ +hello (binary): unstripped-binary-or-object [usr/bin/hello.dbg] diff --git a/t/recipes/checks/binaries/debug-symbols/legacy-debug/eval/post-test b/t/recipes/checks/binaries/debug-symbols/legacy-debug/eval/post-test new file mode 100644 index 0000000..fc97c5f --- /dev/null +++ b/t/recipes/checks/binaries/debug-symbols/legacy-debug/eval/post-test @@ -0,0 +1,2 @@ +/: hardening-.*/ d +s/\(current is ([0-9]+\.)+[0-9]\)/(current is CURRENT)/ diff --git a/t/recipes/checks/binaries/debug-symbols/legacy-libbaz/build-spec/debian/changelog.in b/t/recipes/checks/binaries/debug-symbols/legacy-libbaz/build-spec/debian/changelog.in new file mode 100644 index 0000000..91a6bb5 --- /dev/null +++ b/t/recipes/checks/binaries/debug-symbols/legacy-libbaz/build-spec/debian/changelog.in @@ -0,0 +1,6 @@ +libbaz ([% $version %]) [% $distribution %]; urgency=low + + * Initial setup + + -- Sean 'Shaleh' Perry Tue, 30 Jan 2001 15:23:59 -0800 + diff --git a/t/recipes/checks/binaries/debug-symbols/legacy-libbaz/build-spec/debian/compat.in b/t/recipes/checks/binaries/debug-symbols/legacy-libbaz/build-spec/debian/compat.in new file mode 100644 index 0000000..640a566 --- /dev/null +++ b/t/recipes/checks/binaries/debug-symbols/legacy-libbaz/build-spec/debian/compat.in @@ -0,0 +1 @@ +[% $dh_compat_level %] diff --git a/t/recipes/checks/binaries/debug-symbols/legacy-libbaz/build-spec/debian/control b/t/recipes/checks/binaries/debug-symbols/legacy-libbaz/build-spec/debian/control new file mode 100644 index 0000000..1506687 --- /dev/null +++ b/t/recipes/checks/binaries/debug-symbols/legacy-libbaz/build-spec/debian/control @@ -0,0 +1,58 @@ +Source: libbaz +Section: libs +Priority: optional +Maintainer: Lintian Maintainer +Build-depends: debhelper (>=4) +Standards-Version: 3.2.1 + +Package: libbaz1 +Architecture: any +Provides: libbaz +Description: test handling of library packages + Regression test for lintian's handling of libraries. + . + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. + +Package: libbaz1-dev +Architecture: any +Depends: libbaz1 (= ${source:Version}), perlapi-5.8.8 +Description: development package + Regression test for lintian's handling of libraries (dev). + . + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. + +Package: libbaz2 +Architecture: any +Depends: ${shlibs:Depends}, libssl0.9.8 +Description: test handling of library packages (good) + Regression test for lintian's handling of libraries (good). + . + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. + +Package: libbaz2-dev +Architecture: any +Depends: ${shlibs:Depends}, libbaz2 (= ${source:Version}) +Description: development package (good) + Regression test for lintian's handling of libraries (dev good). + . + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. + +Package: libbaz2-dbg +Architecture: any +Depends: libbaz2 (= ${binary:Version}) +Priority: optional +Description: debugging package + Regression test for lintian's handling of libraries (debug). + . + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. + diff --git a/t/recipes/checks/binaries/debug-symbols/legacy-libbaz/build-spec/debian/copyright b/t/recipes/checks/binaries/debug-symbols/legacy-libbaz/build-spec/debian/copyright new file mode 100644 index 0000000..a874c87 --- /dev/null +++ b/t/recipes/checks/binaries/debug-symbols/legacy-libbaz/build-spec/debian/copyright @@ -0,0 +1,8 @@ +This package is released under public domain. This is distributed in the hope +that it will be useful, but without any warranty; without even the implied +warranty of merchantability or fitness for a particular purpose. + +A reference to /usr/share/common-licenses/GPL-2 to make it look like this +package is under the GPL and trigger the OpenSSL warning. + +However, this has an OpenSSL exception. diff --git a/t/recipes/checks/binaries/debug-symbols/legacy-libbaz/build-spec/debian/dev.postinst b/t/recipes/checks/binaries/debug-symbols/legacy-libbaz/build-spec/debian/dev.postinst new file mode 100644 index 0000000..683e3cc --- /dev/null +++ b/t/recipes/checks/binaries/debug-symbols/legacy-libbaz/build-spec/debian/dev.postinst @@ -0,0 +1,4 @@ +#!/bin/sh -e + +$PKG=libbaz1-dev + diff --git a/t/recipes/checks/binaries/debug-symbols/legacy-libbaz/build-spec/debian/dev.prerm b/t/recipes/checks/binaries/debug-symbols/legacy-libbaz/build-spec/debian/dev.prerm new file mode 100644 index 0000000..683e3cc --- /dev/null +++ b/t/recipes/checks/binaries/debug-symbols/legacy-libbaz/build-spec/debian/dev.prerm @@ -0,0 +1,4 @@ +#!/bin/sh -e + +$PKG=libbaz1-dev + diff --git a/t/recipes/checks/binaries/debug-symbols/legacy-libbaz/build-spec/debian/lib.postinst b/t/recipes/checks/binaries/debug-symbols/legacy-libbaz/build-spec/debian/lib.postinst new file mode 100644 index 0000000..ec0b98a --- /dev/null +++ b/t/recipes/checks/binaries/debug-symbols/legacy-libbaz/build-spec/debian/lib.postinst @@ -0,0 +1,10 @@ +#!/bin/sh -e + +$PKG=libbaz1 + +if [ "$1" = "configure" ]; then + if [ -d /usr/doc -a ! -e /usr/doc/$PKG -a -d /usr/share/doc/$PKG ] +; then + ln -sf ../share/doc/$PKG /usr/doc/$PKG + fi +fi diff --git a/t/recipes/checks/binaries/debug-symbols/legacy-libbaz/build-spec/debian/lib.prerm b/t/recipes/checks/binaries/debug-symbols/legacy-libbaz/build-spec/debian/lib.prerm new file mode 100644 index 0000000..50e37c3 --- /dev/null +++ b/t/recipes/checks/binaries/debug-symbols/legacy-libbaz/build-spec/debian/lib.prerm @@ -0,0 +1,7 @@ +#!/bin/sh -e + +$PKG=libbaz1 + +if [ \( "$1" = "upgrade" -o "$1" = "remove" \) -a -L /usr/doc/$PKG ]; then + rm -f /usr/doc/$PKG +fi diff --git a/t/recipes/checks/binaries/debug-symbols/legacy-libbaz/build-spec/debian/lib.shlibs b/t/recipes/checks/binaries/debug-symbols/legacy-libbaz/build-spec/debian/lib.shlibs new file mode 100644 index 0000000..b88e288 --- /dev/null +++ b/t/recipes/checks/binaries/debug-symbols/legacy-libbaz/build-spec/debian/lib.shlibs @@ -0,0 +1,8 @@ +libdoesntexist2 1.0 libbaz1 +libdoesntexist2 1.0 libbaz1 +libbaz2 1.1 libbaz +libbaz3 1 libbaz1 (>> 1-1) +libbaz4 1 libbaz1 (= 1-1) +libbaz5 1 libbaz2 +udeb: libdoesntexist2 1.0 libbaz2 +udeb: libdoesntexist2 1.0 libbaz2 diff --git a/t/recipes/checks/binaries/debug-symbols/legacy-libbaz/build-spec/debian/lib.symbols b/t/recipes/checks/binaries/debug-symbols/legacy-libbaz/build-spec/debian/lib.symbols new file mode 100644 index 0000000..72f9d8a --- /dev/null +++ b/t/recipes/checks/binaries/debug-symbols/legacy-libbaz/build-spec/debian/lib.symbols @@ -0,0 +1,3 @@ +libbaz.so.2 libbaz1 #MINVER# + pw 1-1 + foo 1.1-1 diff --git a/t/recipes/checks/binaries/debug-symbols/legacy-libbaz/build-spec/debian/rules b/t/recipes/checks/binaries/debug-symbols/legacy-libbaz/build-spec/debian/rules new file mode 100755 index 0000000..fa99bc8 --- /dev/null +++ b/t/recipes/checks/binaries/debug-symbols/legacy-libbaz/build-spec/debian/rules @@ -0,0 +1,121 @@ +#!/usr/bin/make -f + +lib_tmp=debian/tmp-lib +dev_tmp=debian/tmp-dev + +LIB=libbaz1 +DEV=libbaz1-dev + +VENDORARCH := $(shell perl -MConfig -wE'say substr($$Config{vendorarch},1)') + +build-arch: + $(MAKE) + +build-indep: + +build: build-arch build-indep + +clean: + $(MAKE) clean + dh_clean -plibbaz2 -plibbaz2-dev + rm -f debian/files debian/substvars + rm -rf $(lib_tmp) $(dev_tmp) + +# Now the correct libbaz2-dev package +binary-correct: + install -d debian/libbaz2-dev/usr/lib + cp -a libbaz2.a libbaz2.so debian/libbaz2-dev/usr/lib + # usually, I'd also include some .h files to /usr/include + + # Now the correct libbaz2 package + install -d debian/libbaz2/usr/lib + cp -a libbaz2.so.* debian/libbaz2/usr/lib + chmod a-x debian/libbaz2/usr/lib/* + + # General stuff that is tested in other testsets: + dh_installdocs -plibbaz2 -plibbaz2-dev -plibbaz2-dbg + dh_compress -plibbaz2 -plibbaz2-dev -plibbaz2-dbg + + # Mess up the libbaz2 changelog files to test the symlink handling. + ln -s /usr/share/doc/lintian/changelog.gz \ + debian/libbaz2/usr/share/doc/libbaz2/changelog.gz + install -m 644 debian/changelog \ + debian/libbaz2-dev/usr/share/doc/libbaz2-dev/foo + ln -s foo debian/libbaz2-dev/usr/share/doc/libbaz2-dev/changelog + + # Okay, if either line is omitted, it should be noted + dh_strip --dbg-package=libbaz2-dbg -plibbaz2 -plibbaz2-dev + dh_makeshlibs -plibbaz2 -plibbaz2-dev -plibbaz2-dbg + dh_shlibdeps -plibbaz2 -plibbaz2-dev -plibbaz2-dbg + + # and again, regular packaging stuff + dh_installdeb -plibbaz2 -plibbaz2-dev -plibbaz2-dbg + echo udeb: libbaz2 1.0 libbaz2 >> debian/libbaz2/DEBIAN/shlibs + dh_gencontrol -plibbaz2 -plibbaz2-dev -plibbaz2-dbg + dh_builddeb -plibbaz2 -plibbaz2-dev -plibbaz2-dbg + +# and the incorrect one +binary-arch: build-arch binary-correct + # first, the lib package + install -d $(lib_tmp)/usr/lib + # resp. no soname (check), wrong soname (check), and no-pic (check) + cp -a libbaz1.so.1.0* $(lib_tmp)/usr/lib + cp -a libbaz2.so.1.0.3b $(lib_tmp)/usr/lib/libfoo2.so.1.0.3b + install -m644 libbaz3.so.1.0.3b $(lib_tmp)/usr/lib/libbaz3.so.1.0.3b + # let's include the .a in the non-dev too (TODO) + # Also, libbaz1.a hasn't a symbol table (TODO) + cp -a *.a $(lib_tmp)/usr/lib + # And a wrong .so symlink (wrong, only in -dev, TODO) + ln -s libfoo3.so.0.9 $(lib_tmp)/usr/lib/libfoo3.so + # And a wrong .so.X symlink (wrong, should point to a real existing + # shlib, TODO) + ln -s libfoo.so.0.9.1 $(lib_tmp)/usr/lib/libfoo.so.0.9 + # And a plain .so (wrong, TODO) + touch $(lib_tmp)/usr/lib/libbar2.so + # And a non-versioned SONAME. + install -m644 libbaz.so $(lib_tmp)/usr/lib/libbaz.so + strip --remove-section=.comment --strip-unneeded $(lib_tmp)/usr/lib/libbaz.so + # Pretend to be a Perl module to test a lack of Perl dependencies. + install -d $(lib_tmp)/$(VENDORARCH)/auto/Foo + install -m 644 libbaz2.so.1.0.3b $(lib_tmp)/$(VENDORARCH)/auto/Foo/Foo.so + strip $(lib_tmp)/$(VENDORARCH)/auto/Foo/Foo.so + + install -d $(lib_tmp)/usr/share/doc/$(LIB) + install -m 644 debian/copyright $(lib_tmp)/usr/share/doc/$(LIB) + install -m 644 debian/changelog $(lib_tmp)/usr/share/doc/$(LIB) + gzip -n -9 $(lib_tmp)/usr/share/doc/$(LIB)/changelog + install -d $(lib_tmp)/DEBIAN + install -m 755 debian/lib.postinst $(lib_tmp)/DEBIAN/postinst + install -m 755 debian/lib.prerm $(lib_tmp)/DEBIAN/prerm + touch $(lib_tmp)/usr/share/doc/README.Debian + #dpkg-shlibdeps $(lib_tmp)/usr/lib/libbaz.so.1.0 + install -m 755 debian/lib.shlibs $(lib_tmp)/DEBIAN/shlibs + install -m 755 debian/lib.symbols $(lib_tmp)/DEBIAN/symbols + dpkg-gencontrol -isp -p$(LIB) -P$(lib_tmp) + dpkg --build $(lib_tmp) .. + + # now the -dev package + install -d $(dev_tmp)/usr/include + install -d $(lib_tmp)/usr/lib + # let's also install the .so at the same time... (wrong, TODO) + cp -a *.a *.so.* $(lib_tmp)/usr/lib + # and fuck up permission (TODO) + chmod a+x $(lib_tmp)/usr/lib/*.a + # Pretend to be a Perl module to test a lack of Perl dependencies. + install -d $(dev_tmp)/$(VENDORARCH)/auto/Foo + install -m 644 libbaz2.so.1.0.3b $(dev_tmp)/$(VENDORARCH)/auto/Foo/Foo.so + strip $(dev_tmp)/$(VENDORARCH)/auto/Foo/Foo.so + install -d $(dev_tmp)/usr/share/doc + ln -s $(LIB) $(dev_tmp)/usr/share/doc/$(DEV) + install -d $(dev_tmp)/DEBIAN + install -m 755 debian/dev.postinst $(dev_tmp)/DEBIAN/postinst + install -m 755 debian/dev.prerm $(dev_tmp)/DEBIAN/prerm + dpkg-gencontrol -isp -p$(DEV) -P$(dev_tmp) + dpkg --build $(dev_tmp) .. + + +binary: binary-arch + +# The mention of binary-indep here should be sufficient to suppress the +# warning that it's not present. +.PHONY: build-arch build-indep build binary-arch binary-indep binary clean diff --git a/t/recipes/checks/binaries/debug-symbols/legacy-libbaz/build-spec/debian/source.lintian-overrides b/t/recipes/checks/binaries/debug-symbols/legacy-libbaz/build-spec/debian/source.lintian-overrides new file mode 100644 index 0000000..6008d27 --- /dev/null +++ b/t/recipes/checks/binaries/debug-symbols/legacy-libbaz/build-spec/debian/source.lintian-overrides @@ -0,0 +1 @@ +libbaz source: maintainer-script-lacks-debhelper-token diff --git a/t/recipes/checks/binaries/debug-symbols/legacy-libbaz/build-spec/fill-values b/t/recipes/checks/binaries/debug-symbols/legacy-libbaz/build-spec/fill-values new file mode 100644 index 0000000..7effe4f --- /dev/null +++ b/t/recipes/checks/binaries/debug-symbols/legacy-libbaz/build-spec/fill-values @@ -0,0 +1,6 @@ +Skeleton: upload-non-native +Testname: legacy-libbaz +Source: libbaz +Version: 1-1 +Default-Build-Depends: debhelper (>= 9.20151004~) +Description: Legacy test "libbaz" diff --git a/t/recipes/checks/binaries/debug-symbols/legacy-libbaz/build-spec/orig/Makefile b/t/recipes/checks/binaries/debug-symbols/legacy-libbaz/build-spec/orig/Makefile new file mode 100644 index 0000000..657dc2a --- /dev/null +++ b/t/recipes/checks/binaries/debug-symbols/legacy-libbaz/build-spec/orig/Makefile @@ -0,0 +1,55 @@ +# This is the correct way to build a lib + +CC=gcc +CFLAGS=-g -Wall -Winline -O2 +LDFLAGS=-Wl,--no-as-needed + +OBJS=baz.o extra.o +SHOBJS=baz.sho extra.sho +NOPICOBJS = $(SHOBJS) + +all: libbaz1.a libbaz2.a libbaz1.so.1.0.3b libbaz2.so libbaz3.so.1.0.3b \ + libbaz.so + +libbaz2.so: libbaz2.so.1.0 + ln -sf $^ $@ +libbaz2.so.1.0: libbaz2.so.1.0.3b + ln -sf $^ $@ + +# Oops, forget the soname altogether +libbaz1.so.1.0.3b: $(NOPICOBJS) + $(CC) $(LDFLAGS) -o $@ -shared $^ -lc + +libbaz2.so.1.0.3b: $(SHOBJS) + $(CC) $(LDFLAGS) -o $@ -shared -Wl,-soname,libbaz2.so.1.0 $^ -lc + +# Non-PIC. We can't test this on all architectures +libbaz3.so.1.0.3b: $(NOPICOBJS) + $(CC) $(LDFLAGS) -o $@ -shared -Wl,-soname,libbaz3.so.1 $^ -lc + +# Non-versioned SONAME. +libbaz.so: $(SHOBJS) + $(CC) $(LDFLAGS) -o $@ -shared -Wl,-soname,libbaz.so $^ -lc + +#%.o-noreentrant: %.c +# $(CC) $(LDFLAGS) $(CFLAGS) -o $@ -c $< + +%.sho: %.c + $(CC) $(LDFLAGS) $(CFLAGS) -D_REENTRANT -fPIC -o $@ -c $< + +%.o: %.c + $(CC) $(LDFLAGS) $(CFLAGS) -D_REENTRANT -o $@ -c $< + +libbaz2.a: $(OBJS) + ar cq $@ $(OBJS) + strip --strip-unneeded --remove-section=.comment \ + --remove-section=-note $@ + ranlib $@ + +# The pic one in the .a (wrong), no archive table +libbaz1.a: $(SHOBJS) + ar cqS $@ $^ + strip --strip-unneeded --remove-section=.comment \ + --remove-section=-note $@ +clean: + rm -f *.a *.o *.so* *.sho diff --git a/t/recipes/checks/binaries/debug-symbols/legacy-libbaz/build-spec/orig/baz.c b/t/recipes/checks/binaries/debug-symbols/legacy-libbaz/build-spec/orig/baz.c new file mode 100644 index 0000000..4d5fc45 --- /dev/null +++ b/t/recipes/checks/binaries/debug-symbols/legacy-libbaz/build-spec/orig/baz.c @@ -0,0 +1,6 @@ +#include + +double pw(double p) +{ + return exp(p); +} diff --git a/t/recipes/checks/binaries/debug-symbols/legacy-libbaz/build-spec/orig/extra.c b/t/recipes/checks/binaries/debug-symbols/legacy-libbaz/build-spec/orig/extra.c new file mode 100644 index 0000000..e69de29 diff --git a/t/recipes/checks/binaries/debug-symbols/legacy-libbaz/eval/desc b/t/recipes/checks/binaries/debug-symbols/legacy-libbaz/eval/desc new file mode 100644 index 0000000..27226a5 --- /dev/null +++ b/t/recipes/checks/binaries/debug-symbols/legacy-libbaz/eval/desc @@ -0,0 +1,2 @@ +Testname: legacy-libbaz +Check: binaries/debug-symbols diff --git a/t/recipes/checks/binaries/debug-symbols/legacy-libbaz/eval/hints b/t/recipes/checks/binaries/debug-symbols/legacy-libbaz/eval/hints new file mode 100644 index 0000000..1215594 --- /dev/null +++ b/t/recipes/checks/binaries/debug-symbols/legacy-libbaz/eval/hints @@ -0,0 +1,3 @@ +libbaz1 (binary): unstripped-binary-or-object [usr/lib/libfoo2.so.1.0.3b] +libbaz1 (binary): unstripped-binary-or-object [usr/lib/libbaz3.so.1.0.3b] +libbaz1 (binary): unstripped-binary-or-object [usr/lib/libbaz1.so.1.0.3b] diff --git a/t/recipes/checks/binaries/debug-symbols/legacy-libbaz/eval/post-test b/t/recipes/checks/binaries/debug-symbols/legacy-libbaz/eval/post-test new file mode 100755 index 0000000..29dc3f4 --- /dev/null +++ b/t/recipes/checks/binaries/debug-symbols/legacy-libbaz/eval/post-test @@ -0,0 +1,4 @@ +/: hardening-.*/ d +s/\(current is ([0-9]+\.)+[0-9]\)/(current is CURRENT)/ +s,usr/lib/([^\/]*/)?perl[0-9]*(/[0-9]*\.[0-9]*)?/,usr/lib/ma-dir/perl/version/,g +/: file-references-package-build-path / d diff --git a/t/recipes/checks/binaries/debug-symbols/wrong-binary-architecture/build-spec/debian/install b/t/recipes/checks/binaries/debug-symbols/wrong-binary-architecture/build-spec/debian/install new file mode 100644 index 0000000..c10e578 --- /dev/null +++ b/t/recipes/checks/binaries/debug-symbols/wrong-binary-architecture/build-spec/debian/install @@ -0,0 +1 @@ +foreign-binary usr/bin diff --git a/t/recipes/checks/binaries/debug-symbols/wrong-binary-architecture/build-spec/debian/rules b/t/recipes/checks/binaries/debug-symbols/wrong-binary-architecture/build-spec/debian/rules new file mode 100755 index 0000000..2ce6f53 --- /dev/null +++ b/t/recipes/checks/binaries/debug-symbols/wrong-binary-architecture/build-spec/debian/rules @@ -0,0 +1,22 @@ +#!/usr/bin/make -f + +export DEB_BUILD_MAINT_OPTIONS=hardening=+all + +%: + dh $@ + +override_dh_strip: + # do not try to strip cross-compiled binaries with native tooling + +override_dh_shlibdeps: + # do not try to include missing libraries + +override_dh_dwz: + # cross-compiled binaries do not always seem to have a debug section + +# In Ubuntu, dh does not catch this file by default. +# They have diffed it to reduce the size of packages. +ifneq (,$(strip $(wildcard Changes))) +override_dh_installchangelogs: + dh_installchangelogs Changes +endif diff --git a/t/recipes/checks/binaries/debug-symbols/wrong-binary-architecture/build-spec/fill-values b/t/recipes/checks/binaries/debug-symbols/wrong-binary-architecture/build-spec/fill-values new file mode 100644 index 0000000..24f607a --- /dev/null +++ b/t/recipes/checks/binaries/debug-symbols/wrong-binary-architecture/build-spec/fill-values @@ -0,0 +1,6 @@ +Skeleton: upload-native +Testname: wrong-binary-architecture +Description: Binary architecture does not match package declaration +Package-Architecture: any +Extra-Build-Depends: + gcc-arm-linux-gnueabihf [amd64 i386], gcc-x86-64-linux-gnu [!amd64 !i386] diff --git a/t/recipes/checks/binaries/debug-symbols/wrong-binary-architecture/build-spec/orig/Makefile b/t/recipes/checks/binaries/debug-symbols/wrong-binary-architecture/build-spec/orig/Makefile new file mode 100644 index 0000000..bf92eaf --- /dev/null +++ b/t/recipes/checks/binaries/debug-symbols/wrong-binary-architecture/build-spec/orig/Makefile @@ -0,0 +1,37 @@ +# This test works on amd64 when the cross-compiler for armhf is installed. +# +# The build prerequisite was not added to Lintian, however, since it was +# not clear how the architecture would be enabled in the Gitlab CI +# runner. +# +# On amd64 or i386, please follow these steps to run the test: +# +# dpkg --add-architecture armhf +# apt update +# apt install gcc-arm-linux-gnueabihf +# +# On all other architectures this may work, but was not tested: +# +# dpkg --add-architecture amd64 +# apt update +# apt install gcc-x86-64-linux-gnu +# +# (Taken from: https://wiki.debian.org/CrossToolchains) + +ARCH := $(shell dpkg-architecture -qDEB_HOST_ARCH) + +ifeq ($(ARCH),amd64) +CC := arm-linux-gnueabihf-gcc +else +CC := x86_64-linux-gnu-gcc +endif + +foreign-binary: hello.c + $(CC) $^ -o $@ + +.PHONY: clean +clean: + rm -f foreign-binary + +.PHONY: clean +distclean: clean diff --git a/t/recipes/checks/binaries/debug-symbols/wrong-binary-architecture/build-spec/orig/hello.c b/t/recipes/checks/binaries/debug-symbols/wrong-binary-architecture/build-spec/orig/hello.c new file mode 100644 index 0000000..2fb04e1 --- /dev/null +++ b/t/recipes/checks/binaries/debug-symbols/wrong-binary-architecture/build-spec/orig/hello.c @@ -0,0 +1,8 @@ +#include +#include + +int main(int argc, char *argv[]) { + + printf("Hello, World!\n"); + exit(0); +} diff --git a/t/recipes/checks/binaries/debug-symbols/wrong-binary-architecture/eval/desc b/t/recipes/checks/binaries/debug-symbols/wrong-binary-architecture/eval/desc new file mode 100644 index 0000000..382b802 --- /dev/null +++ b/t/recipes/checks/binaries/debug-symbols/wrong-binary-architecture/eval/desc @@ -0,0 +1,2 @@ +Testname: wrong-binary-architecture +Check: binaries/debug-symbols diff --git a/t/recipes/checks/binaries/debug-symbols/wrong-binary-architecture/eval/hints b/t/recipes/checks/binaries/debug-symbols/wrong-binary-architecture/eval/hints new file mode 100644 index 0000000..1116da1 --- /dev/null +++ b/t/recipes/checks/binaries/debug-symbols/wrong-binary-architecture/eval/hints @@ -0,0 +1 @@ +wrong-binary-architecture (binary): unstripped-binary-or-object [usr/bin/foreign-binary] diff --git a/t/recipes/checks/binaries/hardening/binaries-hardening/build-spec/fill-values b/t/recipes/checks/binaries/hardening/binaries-hardening/build-spec/fill-values new file mode 100644 index 0000000..96dea07 --- /dev/null +++ b/t/recipes/checks/binaries/hardening/binaries-hardening/build-spec/fill-values @@ -0,0 +1,4 @@ +Skeleton: upload-native +Testname: binaries-hardening +Description: Check for missing hardening features +Package-Architecture: any diff --git a/t/recipes/checks/binaries/hardening/binaries-hardening/build-spec/orig/Makefile b/t/recipes/checks/binaries/hardening/binaries-hardening/build-spec/orig/Makefile new file mode 100644 index 0000000..f1e06f8 --- /dev/null +++ b/t/recipes/checks/binaries/hardening/binaries-hardening/build-spec/orig/Makefile @@ -0,0 +1,35 @@ +# turn off PIE in CC in case we have a PIEful toolchain: +ifneq ($(findstring -no-pie,$(shell ${CC} -no-pie 2>&1)),) + CCWEAK := ${CC} +else + CCWEAK := ${CC} -fno-pie -no-pie +endif + +all: weak.1 strong.1 + # Build without dpkg-buildflags. + $(CCWEAK) -o weak -g \ + -fno-stack-protector \ + -Wl,-z,norelro \ + -U_FORTIFY_SOURCE \ + hello.c + $(CC) -o strong \ + $(shell dpkg-buildflags --get CPPFLAGS) \ + $(shell dpkg-buildflags --get CFLAGS) \ + $(shell dpkg-buildflags --get LDFLAGS) \ + hello.c +%.1: base.pod + sed s/@NAME@/$(basename $@)/g < $< | \ + pod2man --name $(basename $@) --section 1 > $@ + +install: + install -d $(DESTDIR)/usr/bin/ + install -d $(DESTDIR)/usr/share/man/man1 + install -m 755 -c weak $(DESTDIR)/usr/bin/weak + install -m 755 -c strong $(DESTDIR)/usr/bin/strong + install -m 644 -c weak.1 $(DESTDIR)/usr/share/man/man1/weak.1 + install -m 644 -c strong.1 $(DESTDIR)/usr/share/man/man1/strong.1 + +clean distclean: + rm -f weak strong *.1 + +check test: diff --git a/t/recipes/checks/binaries/hardening/binaries-hardening/build-spec/orig/base.pod b/t/recipes/checks/binaries/hardening/binaries-hardening/build-spec/orig/base.pod new file mode 100644 index 0000000..1e900d7 --- /dev/null +++ b/t/recipes/checks/binaries/hardening/binaries-hardening/build-spec/orig/base.pod @@ -0,0 +1,12 @@ +=head1 NAME + +@NAME@ -- binary that does something + +=head1 SYNOPSIS + + @NAME@ [options] + +=head1 DESCRIPTION + +@NAME@ does something very useful. + diff --git a/t/recipes/checks/binaries/hardening/binaries-hardening/build-spec/orig/hello.c b/t/recipes/checks/binaries/hardening/binaries-hardening/build-spec/orig/hello.c new file mode 100644 index 0000000..7b87bd7 --- /dev/null +++ b/t/recipes/checks/binaries/hardening/binaries-hardening/build-spec/orig/hello.c @@ -0,0 +1,17 @@ +#include + +void +report(char *string) +{ + char buf[80]; + int len; + + strcpy(buf, string); + fprintf(stdout, "Hello world from %s!\n%n", buf, &len); +} + +int +main(int argc, char *argv[]) +{ + report(argv[0]); +} diff --git a/t/recipes/checks/binaries/hardening/binaries-hardening/eval/desc b/t/recipes/checks/binaries/hardening/binaries-hardening/eval/desc new file mode 100644 index 0000000..92ef00e --- /dev/null +++ b/t/recipes/checks/binaries/hardening/binaries-hardening/eval/desc @@ -0,0 +1,3 @@ +Testname: binaries-hardening +Test-Architectures: amd64 i386 armhf arm64 +Check: binaries/hardening diff --git a/t/recipes/checks/binaries/hardening/binaries-hardening/eval/hints b/t/recipes/checks/binaries/hardening/binaries-hardening/eval/hints new file mode 100644 index 0000000..43f2544 --- /dev/null +++ b/t/recipes/checks/binaries/hardening/binaries-hardening/eval/hints @@ -0,0 +1,4 @@ +binaries-hardening (binary): hardening-no-relro [usr/bin/weak] +binaries-hardening (binary): hardening-no-pie [usr/bin/weak] +binaries-hardening (binary): hardening-no-fortify-functions [usr/bin/weak] +binaries-hardening (binary): hardening-no-bindnow [usr/bin/weak] diff --git a/t/recipes/checks/binaries/hardening/binaries-hardening/eval/test-calibration b/t/recipes/checks/binaries/hardening/binaries-hardening/eval/test-calibration new file mode 100755 index 0000000..89c85ec --- /dev/null +++ b/t/recipes/checks/binaries/hardening/binaries-hardening/eval/test-calibration @@ -0,0 +1,53 @@ +#!/usr/bin/perl + +use strict; +use warnings; + +use lib "$ENV{LINTIAN_BASE}/lib"; + +use Lintian::Profile; + +my $PROFILE = Lintian::Profile->new; +$PROFILE->load('debian/main', [$ENV{'LINTIAN_BASE'}]); + +my %recommended_hardening_features + = %{$PROFILE->data->hardening_buildflags->recommended_features}; + +my ($expected, undef, $calibrated) = @ARGV; + +my $arch = `dpkg-architecture -qDEB_HOST_ARCH`; +chomp $arch; + +die "Unknown architecture: $arch" + unless exists $recommended_hardening_features{$arch}; + +open my $cfd, '>', $calibrated or die "open $calibrated: $!"; +open my $efd, '<', $expected or die "open $expected: $!"; + +while (my $line = <$efd>) { + my $dp = 0; + if ($line =~ m/^.: [^:]+: hardening-no-(\S+)/) { + + # hardening flag, but maybe not for this architecture + my $feature = $1; + + my %renames = ('fortify-functions' => 'fortify'); + my $renamed_feature = $renames{$feature} // $feature; + + $dp = 1 if $recommended_hardening_features{$arch}{$renamed_feature}; + } else { + # only calibrate hardening flags. + $dp = 1; + } + + print $cfd $line if $dp; +} + +close $efd; +close $cfd or die "close $expected: $!"; + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/t/recipes/checks/binaries/hardening/wrong-binary-architecture/build-spec/debian/install b/t/recipes/checks/binaries/hardening/wrong-binary-architecture/build-spec/debian/install new file mode 100644 index 0000000..c10e578 --- /dev/null +++ b/t/recipes/checks/binaries/hardening/wrong-binary-architecture/build-spec/debian/install @@ -0,0 +1 @@ +foreign-binary usr/bin diff --git a/t/recipes/checks/binaries/hardening/wrong-binary-architecture/build-spec/debian/rules b/t/recipes/checks/binaries/hardening/wrong-binary-architecture/build-spec/debian/rules new file mode 100755 index 0000000..2ce6f53 --- /dev/null +++ b/t/recipes/checks/binaries/hardening/wrong-binary-architecture/build-spec/debian/rules @@ -0,0 +1,22 @@ +#!/usr/bin/make -f + +export DEB_BUILD_MAINT_OPTIONS=hardening=+all + +%: + dh $@ + +override_dh_strip: + # do not try to strip cross-compiled binaries with native tooling + +override_dh_shlibdeps: + # do not try to include missing libraries + +override_dh_dwz: + # cross-compiled binaries do not always seem to have a debug section + +# In Ubuntu, dh does not catch this file by default. +# They have diffed it to reduce the size of packages. +ifneq (,$(strip $(wildcard Changes))) +override_dh_installchangelogs: + dh_installchangelogs Changes +endif diff --git a/t/recipes/checks/binaries/hardening/wrong-binary-architecture/build-spec/fill-values b/t/recipes/checks/binaries/hardening/wrong-binary-architecture/build-spec/fill-values new file mode 100644 index 0000000..24f607a --- /dev/null +++ b/t/recipes/checks/binaries/hardening/wrong-binary-architecture/build-spec/fill-values @@ -0,0 +1,6 @@ +Skeleton: upload-native +Testname: wrong-binary-architecture +Description: Binary architecture does not match package declaration +Package-Architecture: any +Extra-Build-Depends: + gcc-arm-linux-gnueabihf [amd64 i386], gcc-x86-64-linux-gnu [!amd64 !i386] diff --git a/t/recipes/checks/binaries/hardening/wrong-binary-architecture/build-spec/orig/Makefile b/t/recipes/checks/binaries/hardening/wrong-binary-architecture/build-spec/orig/Makefile new file mode 100644 index 0000000..bf92eaf --- /dev/null +++ b/t/recipes/checks/binaries/hardening/wrong-binary-architecture/build-spec/orig/Makefile @@ -0,0 +1,37 @@ +# This test works on amd64 when the cross-compiler for armhf is installed. +# +# The build prerequisite was not added to Lintian, however, since it was +# not clear how the architecture would be enabled in the Gitlab CI +# runner. +# +# On amd64 or i386, please follow these steps to run the test: +# +# dpkg --add-architecture armhf +# apt update +# apt install gcc-arm-linux-gnueabihf +# +# On all other architectures this may work, but was not tested: +# +# dpkg --add-architecture amd64 +# apt update +# apt install gcc-x86-64-linux-gnu +# +# (Taken from: https://wiki.debian.org/CrossToolchains) + +ARCH := $(shell dpkg-architecture -qDEB_HOST_ARCH) + +ifeq ($(ARCH),amd64) +CC := arm-linux-gnueabihf-gcc +else +CC := x86_64-linux-gnu-gcc +endif + +foreign-binary: hello.c + $(CC) $^ -o $@ + +.PHONY: clean +clean: + rm -f foreign-binary + +.PHONY: clean +distclean: clean diff --git a/t/recipes/checks/binaries/hardening/wrong-binary-architecture/build-spec/orig/hello.c b/t/recipes/checks/binaries/hardening/wrong-binary-architecture/build-spec/orig/hello.c new file mode 100644 index 0000000..2fb04e1 --- /dev/null +++ b/t/recipes/checks/binaries/hardening/wrong-binary-architecture/build-spec/orig/hello.c @@ -0,0 +1,8 @@ +#include +#include + +int main(int argc, char *argv[]) { + + printf("Hello, World!\n"); + exit(0); +} diff --git a/t/recipes/checks/binaries/hardening/wrong-binary-architecture/eval/desc b/t/recipes/checks/binaries/hardening/wrong-binary-architecture/eval/desc new file mode 100644 index 0000000..b5d2db5 --- /dev/null +++ b/t/recipes/checks/binaries/hardening/wrong-binary-architecture/eval/desc @@ -0,0 +1,2 @@ +Testname: wrong-binary-architecture +Check: binaries/hardening diff --git a/t/recipes/checks/binaries/hardening/wrong-binary-architecture/eval/hints b/t/recipes/checks/binaries/hardening/wrong-binary-architecture/eval/hints new file mode 100644 index 0000000..68d4010 --- /dev/null +++ b/t/recipes/checks/binaries/hardening/wrong-binary-architecture/eval/hints @@ -0,0 +1 @@ +wrong-binary-architecture (binary): hardening-no-bindnow [usr/bin/foreign-binary] diff --git a/t/recipes/checks/binaries/large-file-support/binaries-missing-lfs/build-spec/debian/compat.in b/t/recipes/checks/binaries/large-file-support/binaries-missing-lfs/build-spec/debian/compat.in new file mode 100644 index 0000000..640a566 --- /dev/null +++ b/t/recipes/checks/binaries/large-file-support/binaries-missing-lfs/build-spec/debian/compat.in @@ -0,0 +1 @@ +[% $dh_compat_level %] diff --git a/t/recipes/checks/binaries/large-file-support/binaries-missing-lfs/build-spec/debian/control.in b/t/recipes/checks/binaries/large-file-support/binaries-missing-lfs/build-spec/debian/control.in new file mode 100644 index 0000000..1c522b3 --- /dev/null +++ b/t/recipes/checks/binaries/large-file-support/binaries-missing-lfs/build-spec/debian/control.in @@ -0,0 +1,17 @@ +Source: [% $source %] +Priority: optional +Section: devel +Maintainer: [% $author %] +Standards-Version: [% $standards_version %] +Build-Depends: [% $build_depends %], perl +Rules-Requires-Root: no + +Package: libbasic2 +Architecture: [% $package_architecture %] +Section: libs +Depends: ${misc:Depends}, ${shlibs:Depends} +Description: [% $description %] + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. diff --git a/t/recipes/checks/binaries/large-file-support/binaries-missing-lfs/build-spec/debian/libbasic2.symbols b/t/recipes/checks/binaries/large-file-support/binaries-missing-lfs/build-spec/debian/libbasic2.symbols new file mode 100644 index 0000000..c67f613 --- /dev/null +++ b/t/recipes/checks/binaries/large-file-support/binaries-missing-lfs/build-spec/debian/libbasic2.symbols @@ -0,0 +1,4 @@ +libbasic.so.2 libbasic2 #MINVER# + do_open@Base 1.0 + lib_interface@Base 1.0 + zz_open@Base 1.0 diff --git a/t/recipes/checks/binaries/large-file-support/binaries-missing-lfs/build-spec/fill-values b/t/recipes/checks/binaries/large-file-support/binaries-missing-lfs/build-spec/fill-values new file mode 100644 index 0000000..b6b9ca6 --- /dev/null +++ b/t/recipes/checks/binaries/large-file-support/binaries-missing-lfs/build-spec/fill-values @@ -0,0 +1,6 @@ +Skeleton: upload-native +Testname: binaries-missing-lfs +Default-Build-Depends: debhelper (>= 9.20151004~) +Dh-Compat-Level: 9 +Description: Test for missing lfs +Package-Architecture: any diff --git a/t/recipes/checks/binaries/large-file-support/binaries-missing-lfs/build-spec/orig/Makefile b/t/recipes/checks/binaries/large-file-support/binaries-missing-lfs/build-spec/orig/Makefile new file mode 100644 index 0000000..637a9ca --- /dev/null +++ b/t/recipes/checks/binaries/large-file-support/binaries-missing-lfs/build-spec/orig/Makefile @@ -0,0 +1,12 @@ +all: + gcc $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -fPIC -shared -Wl,-z,defs -Wl,-soname,libbasic.so.2 -o libbasic.so.2 lfs.c basic.c + +install: + # install it under the correct triplet directory + install -d $(DESTDIR)/usr/lib/ + install -m 644 -c -s libbasic.so.2 $(DESTDIR)/usr/lib/libbasic.so.2 + +clean distclean: + rm -f libbasic.so.2 + +check test: diff --git a/t/recipes/checks/binaries/large-file-support/binaries-missing-lfs/build-spec/orig/basic.c b/t/recipes/checks/binaries/large-file-support/binaries-missing-lfs/build-spec/orig/basic.c new file mode 100644 index 0000000..3d12fde --- /dev/null +++ b/t/recipes/checks/binaries/large-file-support/binaries-missing-lfs/build-spec/orig/basic.c @@ -0,0 +1,27 @@ +#include +#include +#include +#include +#include + +static void +hardening_trigger(char *p, int i, void (*f)(char *)) +{ + char test[10]; + memcpy(test, p, i); + f(test); + printf("%s", test); +} + +int +lib_interface(void) +{ + printf("Hello world!\n"); + hardening_trigger(NULL, 0, NULL); + return 0; +} + +int +do_open (char *file) { + return open (file, O_RDONLY); +} diff --git a/t/recipes/checks/binaries/large-file-support/binaries-missing-lfs/build-spec/orig/lfs.c b/t/recipes/checks/binaries/large-file-support/binaries-missing-lfs/build-spec/orig/lfs.c new file mode 100644 index 0000000..04fe113 --- /dev/null +++ b/t/recipes/checks/binaries/large-file-support/binaries-missing-lfs/build-spec/orig/lfs.c @@ -0,0 +1,10 @@ +#define _FILE_OFFSET_BITS 64 + +#include +#include +#include + +int +zz_open (char *file) { + return open (file, O_RDONLY); +} diff --git a/t/recipes/checks/binaries/large-file-support/binaries-missing-lfs/eval/desc b/t/recipes/checks/binaries/large-file-support/binaries-missing-lfs/eval/desc new file mode 100644 index 0000000..65404ca --- /dev/null +++ b/t/recipes/checks/binaries/large-file-support/binaries-missing-lfs/eval/desc @@ -0,0 +1,3 @@ +Testname: binaries-missing-lfs +Test-Architectures: i386 armhf +Check: binaries/large-file-support diff --git a/t/recipes/checks/binaries/large-file-support/binaries-missing-lfs/eval/hints b/t/recipes/checks/binaries/large-file-support/binaries-missing-lfs/eval/hints new file mode 100644 index 0000000..f50cb37 --- /dev/null +++ b/t/recipes/checks/binaries/large-file-support/binaries-missing-lfs/eval/hints @@ -0,0 +1 @@ +libbasic2 (binary): binary-file-built-without-LFS-support usr/lib/libbasic.so.2 diff --git a/t/recipes/checks/binaries/legacy-binary/build-spec/debian/NEWS.Debian b/t/recipes/checks/binaries/legacy-binary/build-spec/debian/NEWS.Debian new file mode 100644 index 0000000..29f561c --- /dev/null +++ b/t/recipes/checks/binaries/legacy-binary/build-spec/debian/NEWS.Debian @@ -0,0 +1,12 @@ +binary (4-1.1) UNRELEASED; urgency=high + + This is a Debian NEWS entry that isn't encoded properly in UTF-8: . + It also has a usefull speling error. + + -- Russ Allbery Sun, 14 Oct 2007 17:11:36 -0700 + +binary (1) unstable; urgency=low + + This is another entry but this one isn't syntactically valid. + + -- Russ Allbery 2007-10-14 diff --git a/t/recipes/checks/binaries/legacy-binary/build-spec/debian/README.Debian b/t/recipes/checks/binaries/legacy-binary/build-spec/debian/README.Debian new file mode 100644 index 0000000..94bcc0a --- /dev/null +++ b/t/recipes/checks/binaries/legacy-binary/build-spec/debian/README.Debian @@ -0,0 +1,5 @@ +this is a binary package to test lintian's handling of bins. +Check handling of D-Bus and dbus (neither of which should produce +warnings). + + -- Russ Allbery , Wed, 6 Feb 2008 18:35:11 -0800 diff --git a/t/recipes/checks/binaries/legacy-binary/build-spec/debian/changelog.in b/t/recipes/checks/binaries/legacy-binary/build-spec/debian/changelog.in new file mode 100644 index 0000000..39301d6 --- /dev/null +++ b/t/recipes/checks/binaries/legacy-binary/build-spec/debian/changelog.in @@ -0,0 +1,47 @@ +binary ([% $version %]) [% $distribution %]; urgency=low + + * I'm doing an comaintainer-upload, acknowledging a NMU, but with a version + number which suggests I'm doing a NMU myself. + + Lintian-maintainers: Please don't update this changelog, otherwise you'll + probably break the checks/nmu checks. + + -- Jeroen van Wolffelaar Sun, 18 Apr 2004 01:49:42 +0200 + +binary (4-1) unstable; urgency=low + + * Weird version number for the new check for accidents with native + packaging. + * Date was fixed by BR and this test was put on changelog-file-strange-date + due to dpkg bug, see #794674. + + -- Marc 'HE' Brockschmidt Thu, 15 Apr 2004 23:33:51 +0200 + +binary (4) unstable; urgency=low + + * Add big file to /usr/share to trigger the big-usr-share check + + -- Jeroen van Wolffelaar Fri, 27 Feb 2004 10:15:59 +0100 + +binary (3) unstable; urgency=unlimited + + * Add some bogus menu entries using su-to-root in a bogus way + + -- Jeroen van Wolffelaar Thu, 12 Feb 2004 20:11:22 +0100 + +binary (2) unstable; urgency=low + + * Added an INSTALL document which policy 6.3 suggests not to do + + -- Sean 'Shaleh' Perry Tue, 30 Jan 2001 15:23:59 -0800 + +binary (1) unstable; urgency=low + + * hello.c added + * hello-static is same as hello, but compiled statically + * added a menu entry which lacks a Section + * added a postinst + * postinst calls suidregister which is no longer policy compliant + + -- Sean 'Shaleh' Perry Wed, 10 Jan 2001 08:55:34 -0800 + diff --git a/t/recipes/checks/binaries/legacy-binary/build-spec/debian/conffiles b/t/recipes/checks/binaries/legacy-binary/build-spec/debian/conffiles new file mode 100644 index 0000000..d1a0843 --- /dev/null +++ b/t/recipes/checks/binaries/legacy-binary/build-spec/debian/conffiles @@ -0,0 +1 @@ +/etc/menu-methods/lintian diff --git a/t/recipes/checks/binaries/legacy-binary/build-spec/debian/control b/t/recipes/checks/binaries/legacy-binary/build-spec/debian/control new file mode 100644 index 0000000..c797357 --- /dev/null +++ b/t/recipes/checks/binaries/legacy-binary/build-spec/debian/control @@ -0,0 +1,42 @@ +Source: binary +Section: misc +Priority: optional +Maintainer: Lintian Maintainers +Uploaders: Co-maintainer one , Jeroen van Wolffelaar , Co-maintainer three +Standards-Version: 3.2.1 +Homepage: http://lintian.debian.org/ +Vcs-Svn: http://svn.wolffelaar.nl/lintian/trunk +XS-Vcs-Browser: http://svn.wolffelaar.nl/lintian/trunk +XS-Dm-Upload-Allowed: yes + +Package: binary +Architecture: any +Pre-Depends: ${shlibs:Depends}, xorg, binary-data (= ${source:Version}), libssl0.9.8 +Homepage: +Vcs-Svn: http://svn.wolffelaar.nl/lintian/trunk +Description: test handling of binary files + Regression test for lintian's handling of binary files for debian. This + is checked for picky spelling errors. + . + This package list [ subversion | gconf ] should not be flagged as a spelling + mistake. The spelling correction for dont should be correct. + . + Homepage: http://lintian.debian.org/ + +Package: binary-data +Architecture: all +Depends: binary (= ${source:Version}), libssl-not-openssl, + libssl0.9.8 | or-something-else +Description: test handling of binary relationships + Regression test for lintian's checking of package relationships between + arch:any and arch:all packages. + . + This mention of subversion should be flagged as a spelling mistake. + +#Package: binary-comment +#Architecture: space-almonds +#Depends: * +#Depends: * +#Description: test comment support +# Yes, comments are actually allowed in debian/control, so none of the +# above should produce errors. diff --git a/t/recipes/checks/binaries/legacy-binary/build-spec/debian/copyright b/t/recipes/checks/binaries/legacy-binary/build-spec/debian/copyright new file mode 100644 index 0000000..1d6806d --- /dev/null +++ b/t/recipes/checks/binaries/legacy-binary/build-spec/debian/copyright @@ -0,0 +1,15 @@ +hello.c is released under public domain. This is distributed in the hope that +it will be useful, but without any warranty; without even the implied warranty +of merchantability or fitness for a particular purpose. + +A reference to /usr/share/common-licenses/GPL-2 to make it look like this +package is under the GPL and trigger the OpenSSL warning. + +Test for old FSF address: + +Free Software Foundation, Inc., 59 Temple Place - Suite 330, +Boston, MA 02111-1307, USA. + +Test for deprecated ntionl ncoding. + +Improper capitalization of linux or debian isn't caught here. diff --git a/t/recipes/checks/binaries/legacy-binary/build-spec/debian/doc-base b/t/recipes/checks/binaries/legacy-binary/build-spec/debian/doc-base new file mode 100644 index 0000000..7e5b38f --- /dev/null +++ b/t/recipes/checks/binaries/legacy-binary/build-spec/debian/doc-base @@ -0,0 +1,41 @@ +Document: binary!docs +Title: Broken debian binary doc-base control file +Author: Russ Allbery +Abstract: This control file exercises various tests of doc-base control + files, including several things that aren't tested yet. The third and + fourth one has trailing whitespace. + . + This section has a speling error and bad character. + . + The above separator was fine. +Section: Non/Existant +Unknown: Some field + + + +Format: debiandoc-sgML +Files: /usr/share/doc/binary/binary.sgml.gz +Unknown: Some field + +Format: ESP +Index: /usr/share/doc/binary/binary.txt + +Index: /usr/share/doc/binary/html/index.html + /usr/share/doc/binary/html/ch1.html + /usr/share/doc/binary/html/ch4.html + + +Format: HTML +Index: /usr/share/doc/binary/html/index.html +Files: /usr/share/doc/binary/html/ch?.h*l + /usr/share/doc/binary/hml/*.html + +Format: inFO +Files: /usr/share/info/binary.info.gz + +Format: HTML +Index: /usr/share/doc/binary/html/index.html +Files: /usr/share/doc/binary/html/ch5.html + /usr/share/doc/binary/html/ch6.html + + diff --git a/t/recipes/checks/binaries/legacy-binary/build-spec/debian/goodbye.desktop b/t/recipes/checks/binaries/legacy-binary/build-spec/debian/goodbye.desktop new file mode 100644 index 0000000..f6ce8e3 --- /dev/null +++ b/t/recipes/checks/binaries/legacy-binary/build-spec/debian/goodbye.desktop @@ -0,0 +1,13 @@ +[Desktop Entry] +Name:Goodbye +# Name=Goodbye +Comment=Say hello! +SpecialTag=This doesn't exist! +Exec=goodbye +icon=hello +Terminal=true +Type=Application +Categories=WeirdStuff;Screensaver; +Encoding=ISO-10646-1 +[Other Entry] +Name=Goodbye diff --git a/t/recipes/checks/binaries/legacy-binary/build-spec/debian/hello.desktop b/t/recipes/checks/binaries/legacy-binary/build-spec/debian/hello.desktop new file mode 100644 index 0000000..f795468 --- /dev/null +++ b/t/recipes/checks/binaries/legacy-binary/build-spec/debian/hello.desktop @@ -0,0 +1,14 @@ +# some random comment + +# [Foo Bar] +[KDE Desktop Entry] +Name=Hello +Name[en_US]=Hello +Comment=Say hello! +Exec=kdesu hello +Icon=hello +Terminal=true +Type=Application +Categories=GNOME;GTK;System;Applet;X-Foo;Settings; +Encoding=UTF-8 +OnlyShowIn=GNOME; diff --git a/t/recipes/checks/binaries/legacy-binary/build-spec/debian/menu b/t/recipes/checks/binaries/legacy-binary/build-spec/debian/menu new file mode 100644 index 0000000..e8972f4 --- /dev/null +++ b/t/recipes/checks/binaries/legacy-binary/build-spec/debian/menu @@ -0,0 +1,26 @@ +?package(binary):needs=text title="Hello World" command="/usr/bin/hello" +?package(binary):needs=text section="Applications/System" title="Run cfdisk (0)" command="/usr/bin/su-to-root cfdisk" +?package(binary):needs="text" section="Applications/System/Hardware" title="Run cfdisk (1)" command="sux -p cfdisk" +?package(binary):needs="x11" section="Window Managers" title="Run xfdisk" command="/usr/sbin/su-to-root -c xfdisk" +?package(binary):needs="wm" section="Applications/System/Administration" title="Run fdisk-wm" command="su-to-root -c hello" +?package(binary):section="Apps/Games" title="I'm not root!" command="su-to-root -c imnothere" +?package(binary):needs="text" section="Apps/System" title="I'm not here!" command="/imnothere" +?package(binary,other-binary):\ + needs="text"\ + section="Applications/Shells"\ + title="more than one required"\ + command="other-bin -s omething" +?package(binary):needs="wmmodule" section="WindowManagers/Modules" title="somemodule" command="ModuleCmd" +?package(binary):needs="wmmodule" section="FVWM Modules" title="somemodule" command="ModuleCmd" +?package(binary):needs="text" section="Applications/System/Administration" title="I'm not in /usr/bin!" command="iminusrbin" +?package(binary):needs="text"\ + section="Applications/System/Administration"\ + title="I'm not root!" command="su-to-root -c imnothere" +?package(binary):needs="text" section="Applications/System/Administration"\ + title="Run cfdisk (0)" command="cfdisk" +?package(binary):needs="text" section="Applications/System/Administration" title="Hello World" command="/usr/bin/hello" +?package(binary):needs="wm" section="FVWM Modules" title="Fake Module" command="hello" +?package(binary):needs="fvwmmodule" section="Window Maker" title="Fake Module"\ + command="hello" +?package(binary):needs="x11" section="Applications/System/Hardware" title="Run xfdisk" command="su-to-root -c 'xfdisk -f'" +?package(binary):needs="text" section="Applications/System/Administration" title="foo" command="sh /path/to/foo" diff --git a/t/recipes/checks/binaries/legacy-binary/build-spec/debian/menu-method b/t/recipes/checks/binaries/legacy-binary/build-spec/debian/menu-method new file mode 100644 index 0000000..9f07bd7 --- /dev/null +++ b/t/recipes/checks/binaries/legacy-binary/build-spec/debian/menu-method @@ -0,0 +1,22 @@ +#!/usr/bin/install-menu + +# -*- mode: shell-script; -*- +#I need menu-1! +# + +!include notmenu.h + +compat="menu-2" + +outputencoding="UTF-8"; +outputlanguage="C"; + +x11 = AppEntry("false"); +text = AppEntry("true"); + +startmenu = ""; +endmenu = ""; +submenutitle = ""; +rootprefix = "/var/lib/lintian/menu"; +userprefix = ".local/share/lintian/menu"; + diff --git a/t/recipes/checks/binaries/legacy-binary/build-spec/debian/postinst b/t/recipes/checks/binaries/legacy-binary/build-spec/debian/postinst new file mode 100644 index 0000000..29e1861 --- /dev/null +++ b/t/recipes/checks/binaries/legacy-binary/build-spec/debian/postinst @@ -0,0 +1,6 @@ +#! /bin/bash -e + +if [ $1 eq 'configure' ] +then + suidregister hello-static root root 4755 +fi diff --git a/t/recipes/checks/binaries/legacy-binary/build-spec/debian/rules b/t/recipes/checks/binaries/legacy-binary/build-spec/debian/rules new file mode 100755 index 0000000..a962ea9 --- /dev/null +++ b/t/recipes/checks/binaries/legacy-binary/build-spec/debian/rules @@ -0,0 +1,92 @@ +#!/usr/bin/make -f + +tmp=debian/tmp + +# This reference to $(PWD) should not cause an error but the one below +# should. +build-arch: + make + echo $(PWD) + +build: build-arch + +clean: + make -i clean + [ ! -f debian/files ] || rm -f debian/files + [ ! -f debian/substvars ] || rm -f debian/substvars + [ ! -d debian/tmp ] || rm -rf debian/tmp + [ ! -d debian/binary ] || rm -rf debian/binary + [ ! -d debian/binary-data ] || rm -rf debian/binary-data + +binary-arch: build + install -d $(tmp)/usr/bin + install -d $(tmp)/boot/hello + install -m 755 hello $(tmp)/usr/bin + touch $(tmp)/usr/bin/iminusrbin + chmod 755 $(tmp)/usr/bin/iminusrbin + install -m 755 hello-static $(tmp)/usr/bin + strip $(tmp)/usr/bin/hello-static + install -m 755 hello-static $(tmp)/usr/bin/hello.static + strip --remove-section=.comment --remove-section=.note $(tmp)/usr/bin/hello.static + ln $(tmp)/usr/bin/hello.static $(tmp)/usr/bin/static-hello + install -m 755 hello-static $(tmp)/boot/hello + strip --remove-section=.comment --remove-section=.note $(tmp)/boot/hello/hello-static + install -d $(tmp)/usr/share/doc/binary + install -m 644 INSTALL $(tmp)/usr/share/doc/binary + install -d $(tmp)/usr/share/doc/binary/html + echo '' > $(tmp)/usr/share/doc/binary/html/index.html + echo '' > $(tmp)/usr/share/doc/binary/html/ch1.html + ln -s ../html/./ch1.html $(tmp)/usr/share/doc/binary/html/ch2.html + ln -s /usr/share/doc/binary/htm/ch1.html $(tmp)/usr/share/doc/binary/html/ch3.html + echo '' > $(tmp)/usr/share/doc/binary/html/ch5.html + ln $(tmp)/usr/share/doc/binary/html/ch5.html \ + $(tmp)/usr/share/doc/binary/html/ch6.html + install -d $(tmp)/usr/share/menu + install -d $(tmp)/usr/lib/menu + install -d $(tmp)/usr/share/binary + install -m 644 debian/menu $(tmp)/usr/share/menu/binary + install -m 644 debian/menu $(tmp)/usr/lib/menu/binary + install -d $(tmp)/etc/menu-methods + install -m 755 debian/menu-method $(tmp)/etc/menu-methods/lintian + install -d $(tmp)/usr/share/doc-base + install -m 644 debian/doc-base $(tmp)/usr/share/doc-base/binary + touch '$(tmp)/usr/share/doc-base/space ' + install -m 644 debian/README.Debian $(tmp)/usr/share/doc/binary + install -m 644 debian/NEWS.Debian $(tmp)/usr/share/doc/binary + gzip -n -9 $(tmp)/usr/share/doc/binary/NEWS.Debian + install -m 644 debian/copyright $(tmp)/usr/share/doc/binary + install -m 644 debian/changelog $(tmp)/usr/share/doc/binary + #gzip -n -9 $(tmp)/usr/share/doc/binary/changelog + install -d $(tmp)/DEBIAN + install -m 755 debian/postinst $(tmp)/DEBIAN + install -m 644 debian/conffiles $(tmp)/DEBIAN + + install -d $(tmp)/usr/share/applications + install -m 644 debian/hello.desktop \ + $(tmp)/usr/share/applications/hello.desktop + install -m 755 debian/goodbye.desktop \ + $(tmp)/usr/share/applications/goodbye.desktop + + # should be ok... + echo boe > $(tmp)/usr/bar + ln $(tmp)/usr/bar $(tmp)/usr/foo + # but this isn't + echo boe > $(tmp)/usr/bar2 + ln $(tmp)/usr/bar2 $(tmp)/usr/share/baz + + dd if=/dev/zero of=$(tmp)/usr/share/binary/largefile bs=1024 count=4000 + + install -d debian/binary-data/DEBIAN + install -d debian/binary-data/usr/share/doc + ln -s binary debian/binary-data/usr/share/doc/binary-data + + dpkg-shlibdeps $(tmp)/usr/bin/hello + dpkg-gencontrol -pbinary -isp + dpkg-gencontrol -pbinary-data -Pdebian/binary-data -isp + + dpkg --build debian/tmp .. + dpkg --build debian/binary-data .. + +binary: binary-arch + +.PHONY: build-arch build binary-arch binary clean diff --git a/t/recipes/checks/binaries/legacy-binary/build-spec/debian/templates b/t/recipes/checks/binaries/legacy-binary/build-spec/debian/templates new file mode 100644 index 0000000..3d92861 --- /dev/null +++ b/t/recipes/checks/binaries/legacy-binary/build-spec/debian/templates @@ -0,0 +1,16 @@ +# The debconf templates defined here are the sort that you'd use if +# providing a wordlist and an ispell dictionary for the language +# "perl". This shouldn't trigger warnings about not using debconf-po. + +Template: shared/packages-ispell +Type: text +Description: + +Template: shared/packages-wordlist +Type: text +Description: + +Template: miscfiles/languages +Type: text +Default: perl (Pathologically Eclectic Rubbish Lister) +Description: diff --git a/t/recipes/checks/binaries/legacy-binary/build-spec/fill-values b/t/recipes/checks/binaries/legacy-binary/build-spec/fill-values new file mode 100644 index 0000000..b503871 --- /dev/null +++ b/t/recipes/checks/binaries/legacy-binary/build-spec/fill-values @@ -0,0 +1,5 @@ +Skeleton: upload-non-native +Testname: legacy-binary +Source: binary +Version: 4-1.1 +Description: Legacy test "binary" diff --git a/t/recipes/checks/binaries/legacy-binary/build-spec/orig/INSTALL b/t/recipes/checks/binaries/legacy-binary/build-spec/orig/INSTALL new file mode 100644 index 0000000..3b50ea9 --- /dev/null +++ b/t/recipes/checks/binaries/legacy-binary/build-spec/orig/INSTALL @@ -0,0 +1,176 @@ +Basic Installation +================== + + These are generic installation instructions. + + The `configure' shell script attempts to guess correct values for +various system-dependent variables used during compilation. It uses +those values to create a `Makefile' in each directory of the package. +It may also create one or more `.h' files containing system-dependent +definitions. Finally, it creates a shell script `config.status' that +you can run in the future to recreate the current configuration, a file +`config.cache' that saves the results of its tests to speed up +reconfiguring, and a file `config.log' containing compiler output +(useful mainly for debugging `configure'). + + If you need to do unusual things to compile the package, please try +to figure out how `configure' could check whether to do them, and mail +diffs or instructions to the address given in the `README' so they can +be considered for the next release. If at some point `config.cache' +contains results you don't want to keep, you may remove or edit it. + + The file `configure.in' is used to create `configure' by a program +called `autoconf'. You only need `configure.in' if you want to change +it or regenerate `configure' using a newer version of `autoconf'. + +The simplest way to compile this package is: + + 1. `cd' to the directory containing the package's source code and type + `./configure' to configure the package for your system. If you're + using `csh' on an old version of System V, you might need to type + `sh ./configure' instead to prevent `csh' from trying to execute + `configure' itself. + + Running `configure' takes a while. While running, it prints some + messages telling which features it is checking for. + + 2. Type `make' to compile the package. + + 3. Optionally, type `make check' to run any self-tests that come with + the package. + + 4. Type `make install' to install the programs and any data files and + documentation. + + 5. You can remove the program binaries and object files from the + source code directory by typing `make clean'. To also remove the + files that `configure' created (so you can compile the package for + a different kind of computer), type `make distclean'. There is + also a `make maintainer-clean' target, but that is intended mainly + for the package's developers. If you use it, you may have to get + all sorts of other programs in order to regenerate files that came + with the distribution. + +Compilers and Options +===================== + + Some systems require unusual options for compilation or linking that +the `configure' script does not know about. You can give `configure' +initial values for variables by setting them in the environment. Using +a Bourne-compatible shell, you can do that on the command line like +this: + CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure + +Or on systems that have the `env' program, you can do it like this: + env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure + +Compiling For Multiple Architectures +==================================== + + You can compile the package for more than one kind of computer at the +same time, by placing the object files for each architecture in their +own directory. To do this, you must use a version of `make' that +supports the `VPATH' variable, such as GNU `make'. `cd' to the +directory where you want the object files and executables to go and run +the `configure' script. `configure' automatically checks for the +source code in the directory that `configure' is in and in `..'. + + If you have to use a `make' that does not supports the `VPATH' +variable, you have to compile the package for one architecture at a time +in the source code directory. After you have installed the package for +one architecture, use `make distclean' before reconfiguring for another +architecture. + +Installation Names +================== + + By default, `make install' will install the package's files in +`/usr/local/bin', `/usr/local/man', etc. You can specify an +installation prefix other than `/usr/local' by giving `configure' the +option `--prefix=PATH'. + + You can specify separate installation prefixes for +architecture-specific files and architecture-independent files. If you +give `configure' the option `--exec-prefix=PATH', the package will use +PATH as the prefix for installing programs and libraries. +Documentation and other data files will still use the regular prefix. + + If the package supports it, you can cause programs to be installed +with an extra prefix or suffix on their names by giving `configure' the +option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. + +Optional Features +================= + + Some packages pay attention to `--enable-FEATURE' options to +`configure', where FEATURE indicates an optional part of the package. +They may also pay attention to `--with-PACKAGE' options, where PACKAGE +is something like `gnu-as' or `x' (for the X Window System). The +`README' should mention any `--enable-' and `--with-' options that the +package recognizes. + + For packages that use the X Window System, `configure' can usually +find the X include and library files automatically, but if it doesn't, +you can use the `configure' options `--x-includes=DIR' and +`--x-libraries=DIR' to specify their locations. + +Specifying the System Type +========================== + + There may be some features `configure' can not figure out +automatically, but needs to determine by the type of host the package +will run on. Usually `configure' can figure that out, but if it prints +a message saying it can not guess the host type, give it the +`--host=TYPE' option. TYPE can either be a short name for the system +type, such as `sun4', or a canonical name with three fields: + CPU-COMPANY-SYSTEM + +See the file `config.sub' for the possible values of each field. If +`config.sub' isn't included in this package, then this package doesn't +need to know the host type. + + If you are building compiler tools for cross-compiling, you can also +use the `--target=TYPE' option to select the type of system they will +produce code for and the `--build=TYPE' option to select the type of +system on which you are compiling the package. + +Sharing Defaults +================ + + If you want to set default values for `configure' scripts to share, +you can create a site shell script called `config.site' that gives +default values for variables like `CC', `cache_file', and `prefix'. +`configure' looks for `PREFIX/share/config.site' if it exists, then +`PREFIX/etc/config.site' if it exists. Or, you can set the +`CONFIG_SITE' environment variable to the location of the site script. +A warning: not all `configure' scripts look for a site script. + +Operation Controls +================== + + `configure' recognizes the following options to control how it +operates. + +`--cache-file=FILE' + Use and save the results of the tests in FILE instead of + `./config.cache'. Set FILE to `/dev/null' to disable caching, for + debugging `configure'. + +`--help' + Print a summary of the options to `configure', and exit. + +`--quiet' +`--silent' +`-q' + Do not print messages saying which checks are being made. + +`--srcdir=DIR' + Look for the package's source code in directory DIR. Usually + `configure' can determine that directory automatically. + +`--version' + Print the version of Autoconf used to generate the `configure' + script, and exit. + +`configure' also accepts some other, not widely useful, options. + diff --git a/t/recipes/checks/binaries/legacy-binary/build-spec/orig/Makefile b/t/recipes/checks/binaries/legacy-binary/build-spec/orig/Makefile new file mode 100644 index 0000000..da1dc55 --- /dev/null +++ b/t/recipes/checks/binaries/legacy-binary/build-spec/orig/Makefile @@ -0,0 +1,12 @@ +all: hello hello-static + +hello: hello.c + gcc hello.c -o hello + +hello-static: hello.c + gcc -static hello.c -o hello-static + +clean: + rm -f hello hello-static + +distclean: clean diff --git a/t/recipes/checks/binaries/legacy-binary/build-spec/orig/hello.c b/t/recipes/checks/binaries/legacy-binary/build-spec/orig/hello.c new file mode 100644 index 0000000..2fb04e1 --- /dev/null +++ b/t/recipes/checks/binaries/legacy-binary/build-spec/orig/hello.c @@ -0,0 +1,8 @@ +#include +#include + +int main(int argc, char *argv[]) { + + printf("Hello, World!\n"); + exit(0); +} diff --git a/t/recipes/checks/binaries/legacy-binary/eval/desc b/t/recipes/checks/binaries/legacy-binary/eval/desc new file mode 100644 index 0000000..849f27d --- /dev/null +++ b/t/recipes/checks/binaries/legacy-binary/eval/desc @@ -0,0 +1,2 @@ +Testname: legacy-binary +Check: binaries diff --git a/t/recipes/checks/binaries/legacy-binary/eval/hints b/t/recipes/checks/binaries/legacy-binary/eval/hints new file mode 100644 index 0000000..472a768 --- /dev/null +++ b/t/recipes/checks/binaries/legacy-binary/eval/hints @@ -0,0 +1 @@ +binary (binary): binary-has-unneeded-section .comment [usr/bin/hello-static] diff --git a/t/recipes/checks/binaries/legacy-binary/eval/post-test b/t/recipes/checks/binaries/legacy-binary/eval/post-test new file mode 100644 index 0000000..3deefd5 --- /dev/null +++ b/t/recipes/checks/binaries/legacy-binary/eval/post-test @@ -0,0 +1,3 @@ +s/arch-dep-package-has-big-usr-share .*kB .*%/arch-dep-package-has-big-usr-share/ +/: hardening-.*/ d +s/\(current is ([0-9]+\.)+[0-9]\)/(current is CURRENT)/ diff --git a/t/recipes/checks/binaries/legacy-libbaz/build-spec/debian/changelog.in b/t/recipes/checks/binaries/legacy-libbaz/build-spec/debian/changelog.in new file mode 100644 index 0000000..91a6bb5 --- /dev/null +++ b/t/recipes/checks/binaries/legacy-libbaz/build-spec/debian/changelog.in @@ -0,0 +1,6 @@ +libbaz ([% $version %]) [% $distribution %]; urgency=low + + * Initial setup + + -- Sean 'Shaleh' Perry Tue, 30 Jan 2001 15:23:59 -0800 + diff --git a/t/recipes/checks/binaries/legacy-libbaz/build-spec/debian/compat.in b/t/recipes/checks/binaries/legacy-libbaz/build-spec/debian/compat.in new file mode 100644 index 0000000..640a566 --- /dev/null +++ b/t/recipes/checks/binaries/legacy-libbaz/build-spec/debian/compat.in @@ -0,0 +1 @@ +[% $dh_compat_level %] diff --git a/t/recipes/checks/binaries/legacy-libbaz/build-spec/debian/control b/t/recipes/checks/binaries/legacy-libbaz/build-spec/debian/control new file mode 100644 index 0000000..1506687 --- /dev/null +++ b/t/recipes/checks/binaries/legacy-libbaz/build-spec/debian/control @@ -0,0 +1,58 @@ +Source: libbaz +Section: libs +Priority: optional +Maintainer: Lintian Maintainer +Build-depends: debhelper (>=4) +Standards-Version: 3.2.1 + +Package: libbaz1 +Architecture: any +Provides: libbaz +Description: test handling of library packages + Regression test for lintian's handling of libraries. + . + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. + +Package: libbaz1-dev +Architecture: any +Depends: libbaz1 (= ${source:Version}), perlapi-5.8.8 +Description: development package + Regression test for lintian's handling of libraries (dev). + . + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. + +Package: libbaz2 +Architecture: any +Depends: ${shlibs:Depends}, libssl0.9.8 +Description: test handling of library packages (good) + Regression test for lintian's handling of libraries (good). + . + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. + +Package: libbaz2-dev +Architecture: any +Depends: ${shlibs:Depends}, libbaz2 (= ${source:Version}) +Description: development package (good) + Regression test for lintian's handling of libraries (dev good). + . + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. + +Package: libbaz2-dbg +Architecture: any +Depends: libbaz2 (= ${binary:Version}) +Priority: optional +Description: debugging package + Regression test for lintian's handling of libraries (debug). + . + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. + diff --git a/t/recipes/checks/binaries/legacy-libbaz/build-spec/debian/copyright b/t/recipes/checks/binaries/legacy-libbaz/build-spec/debian/copyright new file mode 100644 index 0000000..a874c87 --- /dev/null +++ b/t/recipes/checks/binaries/legacy-libbaz/build-spec/debian/copyright @@ -0,0 +1,8 @@ +This package is released under public domain. This is distributed in the hope +that it will be useful, but without any warranty; without even the implied +warranty of merchantability or fitness for a particular purpose. + +A reference to /usr/share/common-licenses/GPL-2 to make it look like this +package is under the GPL and trigger the OpenSSL warning. + +However, this has an OpenSSL exception. diff --git a/t/recipes/checks/binaries/legacy-libbaz/build-spec/debian/dev.postinst b/t/recipes/checks/binaries/legacy-libbaz/build-spec/debian/dev.postinst new file mode 100644 index 0000000..683e3cc --- /dev/null +++ b/t/recipes/checks/binaries/legacy-libbaz/build-spec/debian/dev.postinst @@ -0,0 +1,4 @@ +#!/bin/sh -e + +$PKG=libbaz1-dev + diff --git a/t/recipes/checks/binaries/legacy-libbaz/build-spec/debian/dev.prerm b/t/recipes/checks/binaries/legacy-libbaz/build-spec/debian/dev.prerm new file mode 100644 index 0000000..683e3cc --- /dev/null +++ b/t/recipes/checks/binaries/legacy-libbaz/build-spec/debian/dev.prerm @@ -0,0 +1,4 @@ +#!/bin/sh -e + +$PKG=libbaz1-dev + diff --git a/t/recipes/checks/binaries/legacy-libbaz/build-spec/debian/lib.postinst b/t/recipes/checks/binaries/legacy-libbaz/build-spec/debian/lib.postinst new file mode 100644 index 0000000..ec0b98a --- /dev/null +++ b/t/recipes/checks/binaries/legacy-libbaz/build-spec/debian/lib.postinst @@ -0,0 +1,10 @@ +#!/bin/sh -e + +$PKG=libbaz1 + +if [ "$1" = "configure" ]; then + if [ -d /usr/doc -a ! -e /usr/doc/$PKG -a -d /usr/share/doc/$PKG ] +; then + ln -sf ../share/doc/$PKG /usr/doc/$PKG + fi +fi diff --git a/t/recipes/checks/binaries/legacy-libbaz/build-spec/debian/lib.prerm b/t/recipes/checks/binaries/legacy-libbaz/build-spec/debian/lib.prerm new file mode 100644 index 0000000..50e37c3 --- /dev/null +++ b/t/recipes/checks/binaries/legacy-libbaz/build-spec/debian/lib.prerm @@ -0,0 +1,7 @@ +#!/bin/sh -e + +$PKG=libbaz1 + +if [ \( "$1" = "upgrade" -o "$1" = "remove" \) -a -L /usr/doc/$PKG ]; then + rm -f /usr/doc/$PKG +fi diff --git a/t/recipes/checks/binaries/legacy-libbaz/build-spec/debian/lib.shlibs b/t/recipes/checks/binaries/legacy-libbaz/build-spec/debian/lib.shlibs new file mode 100644 index 0000000..b88e288 --- /dev/null +++ b/t/recipes/checks/binaries/legacy-libbaz/build-spec/debian/lib.shlibs @@ -0,0 +1,8 @@ +libdoesntexist2 1.0 libbaz1 +libdoesntexist2 1.0 libbaz1 +libbaz2 1.1 libbaz +libbaz3 1 libbaz1 (>> 1-1) +libbaz4 1 libbaz1 (= 1-1) +libbaz5 1 libbaz2 +udeb: libdoesntexist2 1.0 libbaz2 +udeb: libdoesntexist2 1.0 libbaz2 diff --git a/t/recipes/checks/binaries/legacy-libbaz/build-spec/debian/lib.symbols b/t/recipes/checks/binaries/legacy-libbaz/build-spec/debian/lib.symbols new file mode 100644 index 0000000..72f9d8a --- /dev/null +++ b/t/recipes/checks/binaries/legacy-libbaz/build-spec/debian/lib.symbols @@ -0,0 +1,3 @@ +libbaz.so.2 libbaz1 #MINVER# + pw 1-1 + foo 1.1-1 diff --git a/t/recipes/checks/binaries/legacy-libbaz/build-spec/debian/rules b/t/recipes/checks/binaries/legacy-libbaz/build-spec/debian/rules new file mode 100755 index 0000000..fa99bc8 --- /dev/null +++ b/t/recipes/checks/binaries/legacy-libbaz/build-spec/debian/rules @@ -0,0 +1,121 @@ +#!/usr/bin/make -f + +lib_tmp=debian/tmp-lib +dev_tmp=debian/tmp-dev + +LIB=libbaz1 +DEV=libbaz1-dev + +VENDORARCH := $(shell perl -MConfig -wE'say substr($$Config{vendorarch},1)') + +build-arch: + $(MAKE) + +build-indep: + +build: build-arch build-indep + +clean: + $(MAKE) clean + dh_clean -plibbaz2 -plibbaz2-dev + rm -f debian/files debian/substvars + rm -rf $(lib_tmp) $(dev_tmp) + +# Now the correct libbaz2-dev package +binary-correct: + install -d debian/libbaz2-dev/usr/lib + cp -a libbaz2.a libbaz2.so debian/libbaz2-dev/usr/lib + # usually, I'd also include some .h files to /usr/include + + # Now the correct libbaz2 package + install -d debian/libbaz2/usr/lib + cp -a libbaz2.so.* debian/libbaz2/usr/lib + chmod a-x debian/libbaz2/usr/lib/* + + # General stuff that is tested in other testsets: + dh_installdocs -plibbaz2 -plibbaz2-dev -plibbaz2-dbg + dh_compress -plibbaz2 -plibbaz2-dev -plibbaz2-dbg + + # Mess up the libbaz2 changelog files to test the symlink handling. + ln -s /usr/share/doc/lintian/changelog.gz \ + debian/libbaz2/usr/share/doc/libbaz2/changelog.gz + install -m 644 debian/changelog \ + debian/libbaz2-dev/usr/share/doc/libbaz2-dev/foo + ln -s foo debian/libbaz2-dev/usr/share/doc/libbaz2-dev/changelog + + # Okay, if either line is omitted, it should be noted + dh_strip --dbg-package=libbaz2-dbg -plibbaz2 -plibbaz2-dev + dh_makeshlibs -plibbaz2 -plibbaz2-dev -plibbaz2-dbg + dh_shlibdeps -plibbaz2 -plibbaz2-dev -plibbaz2-dbg + + # and again, regular packaging stuff + dh_installdeb -plibbaz2 -plibbaz2-dev -plibbaz2-dbg + echo udeb: libbaz2 1.0 libbaz2 >> debian/libbaz2/DEBIAN/shlibs + dh_gencontrol -plibbaz2 -plibbaz2-dev -plibbaz2-dbg + dh_builddeb -plibbaz2 -plibbaz2-dev -plibbaz2-dbg + +# and the incorrect one +binary-arch: build-arch binary-correct + # first, the lib package + install -d $(lib_tmp)/usr/lib + # resp. no soname (check), wrong soname (check), and no-pic (check) + cp -a libbaz1.so.1.0* $(lib_tmp)/usr/lib + cp -a libbaz2.so.1.0.3b $(lib_tmp)/usr/lib/libfoo2.so.1.0.3b + install -m644 libbaz3.so.1.0.3b $(lib_tmp)/usr/lib/libbaz3.so.1.0.3b + # let's include the .a in the non-dev too (TODO) + # Also, libbaz1.a hasn't a symbol table (TODO) + cp -a *.a $(lib_tmp)/usr/lib + # And a wrong .so symlink (wrong, only in -dev, TODO) + ln -s libfoo3.so.0.9 $(lib_tmp)/usr/lib/libfoo3.so + # And a wrong .so.X symlink (wrong, should point to a real existing + # shlib, TODO) + ln -s libfoo.so.0.9.1 $(lib_tmp)/usr/lib/libfoo.so.0.9 + # And a plain .so (wrong, TODO) + touch $(lib_tmp)/usr/lib/libbar2.so + # And a non-versioned SONAME. + install -m644 libbaz.so $(lib_tmp)/usr/lib/libbaz.so + strip --remove-section=.comment --strip-unneeded $(lib_tmp)/usr/lib/libbaz.so + # Pretend to be a Perl module to test a lack of Perl dependencies. + install -d $(lib_tmp)/$(VENDORARCH)/auto/Foo + install -m 644 libbaz2.so.1.0.3b $(lib_tmp)/$(VENDORARCH)/auto/Foo/Foo.so + strip $(lib_tmp)/$(VENDORARCH)/auto/Foo/Foo.so + + install -d $(lib_tmp)/usr/share/doc/$(LIB) + install -m 644 debian/copyright $(lib_tmp)/usr/share/doc/$(LIB) + install -m 644 debian/changelog $(lib_tmp)/usr/share/doc/$(LIB) + gzip -n -9 $(lib_tmp)/usr/share/doc/$(LIB)/changelog + install -d $(lib_tmp)/DEBIAN + install -m 755 debian/lib.postinst $(lib_tmp)/DEBIAN/postinst + install -m 755 debian/lib.prerm $(lib_tmp)/DEBIAN/prerm + touch $(lib_tmp)/usr/share/doc/README.Debian + #dpkg-shlibdeps $(lib_tmp)/usr/lib/libbaz.so.1.0 + install -m 755 debian/lib.shlibs $(lib_tmp)/DEBIAN/shlibs + install -m 755 debian/lib.symbols $(lib_tmp)/DEBIAN/symbols + dpkg-gencontrol -isp -p$(LIB) -P$(lib_tmp) + dpkg --build $(lib_tmp) .. + + # now the -dev package + install -d $(dev_tmp)/usr/include + install -d $(lib_tmp)/usr/lib + # let's also install the .so at the same time... (wrong, TODO) + cp -a *.a *.so.* $(lib_tmp)/usr/lib + # and fuck up permission (TODO) + chmod a+x $(lib_tmp)/usr/lib/*.a + # Pretend to be a Perl module to test a lack of Perl dependencies. + install -d $(dev_tmp)/$(VENDORARCH)/auto/Foo + install -m 644 libbaz2.so.1.0.3b $(dev_tmp)/$(VENDORARCH)/auto/Foo/Foo.so + strip $(dev_tmp)/$(VENDORARCH)/auto/Foo/Foo.so + install -d $(dev_tmp)/usr/share/doc + ln -s $(LIB) $(dev_tmp)/usr/share/doc/$(DEV) + install -d $(dev_tmp)/DEBIAN + install -m 755 debian/dev.postinst $(dev_tmp)/DEBIAN/postinst + install -m 755 debian/dev.prerm $(dev_tmp)/DEBIAN/prerm + dpkg-gencontrol -isp -p$(DEV) -P$(dev_tmp) + dpkg --build $(dev_tmp) .. + + +binary: binary-arch + +# The mention of binary-indep here should be sufficient to suppress the +# warning that it's not present. +.PHONY: build-arch build-indep build binary-arch binary-indep binary clean diff --git a/t/recipes/checks/binaries/legacy-libbaz/build-spec/debian/source.lintian-overrides b/t/recipes/checks/binaries/legacy-libbaz/build-spec/debian/source.lintian-overrides new file mode 100644 index 0000000..6008d27 --- /dev/null +++ b/t/recipes/checks/binaries/legacy-libbaz/build-spec/debian/source.lintian-overrides @@ -0,0 +1 @@ +libbaz source: maintainer-script-lacks-debhelper-token diff --git a/t/recipes/checks/binaries/legacy-libbaz/build-spec/fill-values b/t/recipes/checks/binaries/legacy-libbaz/build-spec/fill-values new file mode 100644 index 0000000..7effe4f --- /dev/null +++ b/t/recipes/checks/binaries/legacy-libbaz/build-spec/fill-values @@ -0,0 +1,6 @@ +Skeleton: upload-non-native +Testname: legacy-libbaz +Source: libbaz +Version: 1-1 +Default-Build-Depends: debhelper (>= 9.20151004~) +Description: Legacy test "libbaz" diff --git a/t/recipes/checks/binaries/legacy-libbaz/build-spec/orig/Makefile b/t/recipes/checks/binaries/legacy-libbaz/build-spec/orig/Makefile new file mode 100644 index 0000000..657dc2a --- /dev/null +++ b/t/recipes/checks/binaries/legacy-libbaz/build-spec/orig/Makefile @@ -0,0 +1,55 @@ +# This is the correct way to build a lib + +CC=gcc +CFLAGS=-g -Wall -Winline -O2 +LDFLAGS=-Wl,--no-as-needed + +OBJS=baz.o extra.o +SHOBJS=baz.sho extra.sho +NOPICOBJS = $(SHOBJS) + +all: libbaz1.a libbaz2.a libbaz1.so.1.0.3b libbaz2.so libbaz3.so.1.0.3b \ + libbaz.so + +libbaz2.so: libbaz2.so.1.0 + ln -sf $^ $@ +libbaz2.so.1.0: libbaz2.so.1.0.3b + ln -sf $^ $@ + +# Oops, forget the soname altogether +libbaz1.so.1.0.3b: $(NOPICOBJS) + $(CC) $(LDFLAGS) -o $@ -shared $^ -lc + +libbaz2.so.1.0.3b: $(SHOBJS) + $(CC) $(LDFLAGS) -o $@ -shared -Wl,-soname,libbaz2.so.1.0 $^ -lc + +# Non-PIC. We can't test this on all architectures +libbaz3.so.1.0.3b: $(NOPICOBJS) + $(CC) $(LDFLAGS) -o $@ -shared -Wl,-soname,libbaz3.so.1 $^ -lc + +# Non-versioned SONAME. +libbaz.so: $(SHOBJS) + $(CC) $(LDFLAGS) -o $@ -shared -Wl,-soname,libbaz.so $^ -lc + +#%.o-noreentrant: %.c +# $(CC) $(LDFLAGS) $(CFLAGS) -o $@ -c $< + +%.sho: %.c + $(CC) $(LDFLAGS) $(CFLAGS) -D_REENTRANT -fPIC -o $@ -c $< + +%.o: %.c + $(CC) $(LDFLAGS) $(CFLAGS) -D_REENTRANT -o $@ -c $< + +libbaz2.a: $(OBJS) + ar cq $@ $(OBJS) + strip --strip-unneeded --remove-section=.comment \ + --remove-section=-note $@ + ranlib $@ + +# The pic one in the .a (wrong), no archive table +libbaz1.a: $(SHOBJS) + ar cqS $@ $^ + strip --strip-unneeded --remove-section=.comment \ + --remove-section=-note $@ +clean: + rm -f *.a *.o *.so* *.sho diff --git a/t/recipes/checks/binaries/legacy-libbaz/build-spec/orig/baz.c b/t/recipes/checks/binaries/legacy-libbaz/build-spec/orig/baz.c new file mode 100644 index 0000000..4d5fc45 --- /dev/null +++ b/t/recipes/checks/binaries/legacy-libbaz/build-spec/orig/baz.c @@ -0,0 +1,6 @@ +#include + +double pw(double p) +{ + return exp(p); +} diff --git a/t/recipes/checks/binaries/legacy-libbaz/build-spec/orig/extra.c b/t/recipes/checks/binaries/legacy-libbaz/build-spec/orig/extra.c new file mode 100644 index 0000000..e69de29 diff --git a/t/recipes/checks/binaries/legacy-libbaz/eval/desc b/t/recipes/checks/binaries/legacy-libbaz/eval/desc new file mode 100644 index 0000000..4f8811d --- /dev/null +++ b/t/recipes/checks/binaries/legacy-libbaz/eval/desc @@ -0,0 +1,2 @@ +Testname: legacy-libbaz +Check: binaries diff --git a/t/recipes/checks/binaries/legacy-libbaz/eval/hints b/t/recipes/checks/binaries/legacy-libbaz/eval/hints new file mode 100644 index 0000000..7f3f70c --- /dev/null +++ b/t/recipes/checks/binaries/legacy-libbaz/eval/hints @@ -0,0 +1,2 @@ +libbaz1-dev (binary): binary-has-unneeded-section .comment [usr/lib/ma-dir/perl/version/auto/Foo/Foo.so] +libbaz1 (binary): binary-has-unneeded-section .comment [usr/lib/ma-dir/perl/version/auto/Foo/Foo.so] diff --git a/t/recipes/checks/binaries/legacy-libbaz/eval/post-test b/t/recipes/checks/binaries/legacy-libbaz/eval/post-test new file mode 100755 index 0000000..29dc3f4 --- /dev/null +++ b/t/recipes/checks/binaries/legacy-libbaz/eval/post-test @@ -0,0 +1,4 @@ +/: hardening-.*/ d +s/\(current is ([0-9]+\.)+[0-9]\)/(current is CURRENT)/ +s,usr/lib/([^\/]*/)?perl[0-9]*(/[0-9]*\.[0-9]*)?/,usr/lib/ma-dir/perl/version/,g +/: file-references-package-build-path / d diff --git a/t/recipes/checks/binaries/location/binaries-development-package-ships-elf-binary-in-path/build-spec/debian/compat.in b/t/recipes/checks/binaries/location/binaries-development-package-ships-elf-binary-in-path/build-spec/debian/compat.in new file mode 100644 index 0000000..640a566 --- /dev/null +++ b/t/recipes/checks/binaries/location/binaries-development-package-ships-elf-binary-in-path/build-spec/debian/compat.in @@ -0,0 +1 @@ +[% $dh_compat_level %] diff --git a/t/recipes/checks/binaries/location/binaries-development-package-ships-elf-binary-in-path/build-spec/debian/control.in b/t/recipes/checks/binaries/location/binaries-development-package-ships-elf-binary-in-path/build-spec/debian/control.in new file mode 100644 index 0000000..91b453f --- /dev/null +++ b/t/recipes/checks/binaries/location/binaries-development-package-ships-elf-binary-in-path/build-spec/debian/control.in @@ -0,0 +1,53 @@ +Source: [% $source %] +Priority: optional +Section: libs +Maintainer: [% $author %] +Standards-Version: [% $standards_version %] +Build-Depends: [% $build_depends %] +Rules-Requires-Root: no + +Package: libmultiarch-none-dev +Architecture: any +Section: libdevel +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: [% $description %] (M-A: none) + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. + . + This package does not specify a Multi-Arch field. + +Package: libmultiarch-foreign-dev +Architecture: any +Section: libdevel +Depends: ${shlibs:Depends}, ${misc:Depends} +Multi-Arch: foreign +Description: [% $description %] (M-A: foreign) + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. + . + This package specifies Multi-Arch: foreign. + +Package: libmultiarch-same-dev +Architecture: any +Section: libdevel +Depends: ${shlibs:Depends}, ${misc:Depends} +Multi-Arch: same +Description: [% $description %] (M-A: same) + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. + . + This package specifies Multi-Arch: same. + +Package: libmultiarch-contrib-dev +Architecture: any +Section: contrib/libdevel +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: [% $description %] (contrib) + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. + . + This package is in the contrib/libdevel section. diff --git a/t/recipes/checks/binaries/location/binaries-development-package-ships-elf-binary-in-path/build-spec/debian/rules b/t/recipes/checks/binaries/location/binaries-development-package-ships-elf-binary-in-path/build-spec/debian/rules new file mode 100755 index 0000000..fe4db63 --- /dev/null +++ b/t/recipes/checks/binaries/location/binaries-development-package-ships-elf-binary-in-path/build-spec/debian/rules @@ -0,0 +1,22 @@ +#!/usr/bin/make -f + +export DEB_BUILD_MAINT_OPTIONS=hardening=+all + +include /usr/share/dpkg/buildflags.mk + +%: + dh $@ + +override_dh_auto_install: + set -e; for X in none same foreign contrib; do \ + install -d debian/libmultiarch-$$X-dev/usr/bin; \ + install -d debian/libmultiarch-$$X-dev/var/lib/private; \ + install -m 755 true debian/libmultiarch-$$X-dev/usr/bin/$$X; \ + install -m 755 true debian/libmultiarch-$$X-dev/var/lib/private/$$X; \ + install -m 755 script debian/libmultiarch-$$X-dev/usr/bin/$$X-script; \ + install -m 755 script debian/libmultiarch-$$X-dev/var/lib/private/$$X-script; \ + done + +override_dh_strip: + # Avoid symbol conflicts warnings + dh_strip --no-automatic-dbgsym diff --git a/t/recipes/checks/binaries/location/binaries-development-package-ships-elf-binary-in-path/build-spec/fill-values b/t/recipes/checks/binaries/location/binaries-development-package-ships-elf-binary-in-path/build-spec/fill-values new file mode 100644 index 0000000..929c501 --- /dev/null +++ b/t/recipes/checks/binaries/location/binaries-development-package-ships-elf-binary-in-path/build-spec/fill-values @@ -0,0 +1,5 @@ +Skeleton: upload-native +Testname: binaries-development-package-ships-elf-binary-in-path +Description: Test for development packages shipping ELF binaries in $PATH +Default-Build-Depends: debhelper (>= 9.20160114~) +Dh-Compat-Level: 9 diff --git a/t/recipes/checks/binaries/location/binaries-development-package-ships-elf-binary-in-path/build-spec/orig/Makefile b/t/recipes/checks/binaries/location/binaries-development-package-ships-elf-binary-in-path/build-spec/orig/Makefile new file mode 100644 index 0000000..a877dfd --- /dev/null +++ b/t/recipes/checks/binaries/location/binaries-development-package-ships-elf-binary-in-path/build-spec/orig/Makefile @@ -0,0 +1,7 @@ +all: + gcc $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o true true.c + +clean distclean: + rm -f true + +check test: diff --git a/t/recipes/checks/binaries/location/binaries-development-package-ships-elf-binary-in-path/build-spec/orig/script b/t/recipes/checks/binaries/location/binaries-development-package-ships-elf-binary-in-path/build-spec/orig/script new file mode 100755 index 0000000..c52d3c2 --- /dev/null +++ b/t/recipes/checks/binaries/location/binaries-development-package-ships-elf-binary-in-path/build-spec/orig/script @@ -0,0 +1,3 @@ +#!/bin/sh + +exit 0 diff --git a/t/recipes/checks/binaries/location/binaries-development-package-ships-elf-binary-in-path/build-spec/orig/true.c b/t/recipes/checks/binaries/location/binaries-development-package-ships-elf-binary-in-path/build-spec/orig/true.c new file mode 100644 index 0000000..8479e67 --- /dev/null +++ b/t/recipes/checks/binaries/location/binaries-development-package-ships-elf-binary-in-path/build-spec/orig/true.c @@ -0,0 +1,5 @@ +int +main(void) +{ + return 0; +} diff --git a/t/recipes/checks/binaries/location/binaries-development-package-ships-elf-binary-in-path/eval/desc b/t/recipes/checks/binaries/location/binaries-development-package-ships-elf-binary-in-path/eval/desc new file mode 100644 index 0000000..0d0db95 --- /dev/null +++ b/t/recipes/checks/binaries/location/binaries-development-package-ships-elf-binary-in-path/eval/desc @@ -0,0 +1,2 @@ +Testname: binaries-development-package-ships-elf-binary-in-path +Check: binaries/location diff --git a/t/recipes/checks/binaries/location/binaries-development-package-ships-elf-binary-in-path/eval/hints b/t/recipes/checks/binaries/location/binaries-development-package-ships-elf-binary-in-path/eval/hints new file mode 100644 index 0000000..ad80dad --- /dev/null +++ b/t/recipes/checks/binaries/location/binaries-development-package-ships-elf-binary-in-path/eval/hints @@ -0,0 +1,5 @@ +libmultiarch-same-dev (binary): development-package-ships-elf-binary-in-path [usr/bin/same] +libmultiarch-same-dev (binary): arch-dependent-file-not-in-arch-specific-directory [var/lib/private/same] +libmultiarch-same-dev (binary): arch-dependent-file-not-in-arch-specific-directory [usr/bin/same] +libmultiarch-none-dev (binary): development-package-ships-elf-binary-in-path [usr/bin/none] +libmultiarch-contrib-dev (binary): development-package-ships-elf-binary-in-path [usr/bin/contrib] diff --git a/t/recipes/checks/binaries/location/binaries-general/build-spec/debian/rules b/t/recipes/checks/binaries/location/binaries-general/build-spec/debian/rules new file mode 100644 index 0000000..3ea7a63 --- /dev/null +++ b/t/recipes/checks/binaries/location/binaries-general/build-spec/debian/rules @@ -0,0 +1,12 @@ +#!/usr/bin/make -f + +export DEB_BUILD_MAINT_OPTIONS=hardening=+all + +%: + dh $@ + +override_dh_strip: + dh_strip -X usr/lib/debug -X unstripped -X ocaml + +override_dh_dwz: + # Can error with "deadbeefdeadbeef.debug: Found compressed .debug_info section, not attempting dwz compression" diff --git a/t/recipes/checks/binaries/location/binaries-general/build-spec/fill-values b/t/recipes/checks/binaries/location/binaries-general/build-spec/fill-values new file mode 100644 index 0000000..a24247d --- /dev/null +++ b/t/recipes/checks/binaries/location/binaries-general/build-spec/fill-values @@ -0,0 +1,4 @@ +Skeleton: upload-native +Testname: binaries-general +Description: Misc errors related to binaries +Package-Architecture: any diff --git a/t/recipes/checks/binaries/location/binaries-general/build-spec/orig/Makefile b/t/recipes/checks/binaries/location/binaries-general/build-spec/orig/Makefile new file mode 100644 index 0000000..cf0f211 --- /dev/null +++ b/t/recipes/checks/binaries/location/binaries-general/build-spec/orig/Makefile @@ -0,0 +1,64 @@ +# turn off PIE in CC in case we have a PIEful toolchain: +ifneq ($(findstring -no-pie,$(shell gcc -no-pie 2>&1)),) + CC := gcc +else + CC := gcc -fno-pie -no-pie +endif + +NOPIE_CFLAGS = $(filter-out -fPIE,$(CFLAGS)) +NOPIE_LDFLAGS = $(filter-out -fPIE -pie,$(LDFLAGS)) +COMPILE:= $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) +COMPILE_NOPIE:= $(CC) $(NOPIE_CFLAGS) $(CPPFLAGS) $(NOPIE_LDFLAGS) +# extract from readelf +GETBUILDID:=./getbuildid + +all: + # rpath not matching any of the exceptions to the rpath checks + # - with profiling enabled. + $(COMPILE_NOPIE) -o basic basic.c -pg -Wl,--rpath,/usr/local/lib + # rpath shipped in the package, but one of {/usr}?/lib + $(COMPILE) -o basiclibrpath basic.c -Wl,--rpath,/usr/lib + # non-special rpath shipped in the package + $(COMPILE) -o basicshippedrpath basic.c -Wl,--rpath,/usr/share/foo + # special rpath shipped in the package, multiple paths + $(COMPILE) -o basicshippedrpathmore basic.c -Wl,--rpath,/usr/lib/binaries-general:/usr/lib/binaries-general/bar + # static version of basic for debugging checks + $(COMPILE_NOPIE) -static -o basic.static basic.c + # static executable to trigger ocaml check + $(COMPILE_NOPIE) -o ocaml-exec ocaml.c + # version with debug + $(COMPILE) -o basicdebug -g3 -Wl,--build-id basic.c + +install: + # according to local debian rules /usr/lib/debug is unstripped + install -d $(DESTDIR)/usr/share/foo/ + install -d $(DESTDIR)/usr/lib/debug/usr/share/foo/ + install -d $(DESTDIR)/usr/lib/foo/ + install -d $(DESTDIR)/usr/bin + + install -m 755 -c basic $(DESTDIR)/usr/share/foo/basic + objcopy --only-keep-debug basic $(DESTDIR)/usr/lib/debug/usr/share/foo/basic + strip -s $(DESTDIR)/usr/lib/debug/usr/share/foo/basic + install -m 755 -c basiclibrpath $(DESTDIR)/usr/lib/foo/basiclibrpath + install -m 755 -c basicshippedrpath $(DESTDIR)/usr/lib/foo/basicshippedrpath + install -m 755 -c ocaml-exec $(DESTDIR)/usr/lib/foo/ocaml-exec + install -m 744 -c basicshippedrpathmore $(DESTDIR)/usr/lib/foo/basicshippedrpathmore + objcopy --only-keep-debug basic $(DESTDIR)/usr/lib/debug/basic + install -d "$(DESTDIR)/usr/lib/debug/.build-id/"`$(GETBUILDID) -s basicdebug` + install -m 755 -c basicdebug $(DESTDIR)/usr/share/foo/basicdebug + # force fake buildid in order to have tag matching ok (deadbeefdeadbeef) + install -d "$(DESTDIR)/usr/lib/debug/.build-id/de" + objcopy --compress-debug-sections basicdebug \ + "$(DESTDIR)/usr/lib/debug/.build-id/de/deadbeefdeadbeef.debug" + install -d "$(DESTDIR)/usr/lib/debug/.build-id/"`$(GETBUILDID) -s basicdebug` + objcopy --compress-debug-sections --only-keep-debug basicdebug \ + "$(DESTDIR)/usr/lib/debug/.build-id/"`$(GETBUILDID) -s basicdebug`"/"`$(GETBUILDID) -f basicdebug`.debug + install -m 755 -c basic.static $(DESTDIR)/usr/lib/debug/ + # according to local debian rules unstripped in name avoid dh_strip to do the work + install -m 755 basicdebug $(DESTDIR)/usr/bin/unstripped + install -m 755 basic.static $(DESTDIR)/usr/bin/static + +clean distclean: + rm -f basic + +check test: diff --git a/t/recipes/checks/binaries/location/binaries-general/build-spec/orig/basic.c b/t/recipes/checks/binaries/location/binaries-general/build-spec/orig/basic.c new file mode 100644 index 0000000..3618004 --- /dev/null +++ b/t/recipes/checks/binaries/location/binaries-general/build-spec/orig/basic.c @@ -0,0 +1,12 @@ +#include +#include + +int +main(int argc, char *argv[]) +{ + char t[10]; + printf("Hello world!\n"); + /* forces a stack protector */ + (void) strcpy(t,argv[0]); + return (int) t[0]; +} diff --git a/t/recipes/checks/binaries/location/binaries-general/build-spec/orig/getbuildid b/t/recipes/checks/binaries/location/binaries-general/build-spec/orig/getbuildid new file mode 100755 index 0000000..0060d2b --- /dev/null +++ b/t/recipes/checks/binaries/location/binaries-general/build-spec/orig/getbuildid @@ -0,0 +1,30 @@ +#!/bin/sh +# get build-id of binary + +set -e + +usage() { + echo "Usage: getbuildid [flag] file"; + echo " print build-id of an object file" + echo "flags:" + echo " -f : full build-id (default)." + echo " -s : short build-id aka the first two characters." +} + +if test $# -lt 1; then usage; exit 77; fi +if test $# -gt 3; then usage; exit 77; fi + +if test $# -eq 1; then + LC_ALL=C readelf -n "$1" | grep -i 'Build Id:' | sed 's/.*:[[:blank:]]*\([[:digit:]|abcdef]*\).*/\1/g' +else + case "x$1" in + 'x-f') + LC_ALL=C readelf -n "$2" | grep -i 'Build Id:' | sed 's/.*:[[:blank:]]*\([[:digit:]|abcdef]*\).*/\1/g' ;; + 'x-s') + LC_ALL=C readelf -n "$2" | grep -i 'Build Id:' | sed 's/.*:[[:blank:]]*\([[:digit:]|abcdef]\{2\}\).*/\1/g' ;; + *) + exit 2; + esac +fi + +exit 0; diff --git a/t/recipes/checks/binaries/location/binaries-general/build-spec/orig/ocaml.c b/t/recipes/checks/binaries/location/binaries-general/build-spec/orig/ocaml.c new file mode 100644 index 0000000..370d17d --- /dev/null +++ b/t/recipes/checks/binaries/location/binaries-general/build-spec/orig/ocaml.c @@ -0,0 +1,11 @@ +#include + +int +main(int argc, char **argv) +{ + if (argc > 2) { + puts("Caml1999X000"); + } + puts("\n"); + return 0; +} diff --git a/t/recipes/checks/binaries/location/binaries-general/eval/desc b/t/recipes/checks/binaries/location/binaries-general/eval/desc new file mode 100644 index 0000000..74bbf38 --- /dev/null +++ b/t/recipes/checks/binaries/location/binaries-general/eval/desc @@ -0,0 +1,2 @@ +Testname: binaries-general +Check: binaries/location diff --git a/t/recipes/checks/binaries/location/binaries-general/eval/hints b/t/recipes/checks/binaries/location/binaries-general/eval/hints new file mode 100644 index 0000000..ae43fff --- /dev/null +++ b/t/recipes/checks/binaries/location/binaries-general/eval/hints @@ -0,0 +1,2 @@ +binaries-general (binary): arch-dependent-file-in-usr-share [usr/share/foo/basicdebug] +binaries-general (binary): arch-dependent-file-in-usr-share [usr/share/foo/basic] diff --git a/t/recipes/checks/binaries/location/binaries-general/eval/post-test b/t/recipes/checks/binaries/location/binaries-general/eval/post-test new file mode 100755 index 0000000..11ad2c8 --- /dev/null +++ b/t/recipes/checks/binaries/location/binaries-general/eval/post-test @@ -0,0 +1 @@ +/: hardening-.*/ d diff --git a/t/recipes/checks/binaries/location/binaries-misplaced/build-spec/debian/rules b/t/recipes/checks/binaries/location/binaries-misplaced/build-spec/debian/rules new file mode 100755 index 0000000..a3ab46d --- /dev/null +++ b/t/recipes/checks/binaries/location/binaries-misplaced/build-spec/debian/rules @@ -0,0 +1,12 @@ +#!/usr/bin/make -f +pkg=binaries-misplaced +%: + dh $@ + +override_dh_install: + mkdir -p debian/$(pkg)/etc/ + cp -a /bin/true debian/$(pkg)/etc/foo + # explicitly call dh_shlibdeps since debhelper is being + # "smart" and not calling it in newer versions (8.9.something) + dh_shlibdeps + dh_install diff --git a/t/recipes/checks/binaries/location/binaries-misplaced/build-spec/fill-values b/t/recipes/checks/binaries/location/binaries-misplaced/build-spec/fill-values new file mode 100644 index 0000000..6f79eab --- /dev/null +++ b/t/recipes/checks/binaries/location/binaries-misplaced/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: upload-native +Testname: binaries-misplaced +Description: Test binaries in /etc diff --git a/t/recipes/checks/binaries/location/binaries-misplaced/eval/desc b/t/recipes/checks/binaries/location/binaries-misplaced/eval/desc new file mode 100644 index 0000000..5e2795a --- /dev/null +++ b/t/recipes/checks/binaries/location/binaries-misplaced/eval/desc @@ -0,0 +1,2 @@ +Testname: binaries-misplaced +Check: binaries/location diff --git a/t/recipes/checks/binaries/location/binaries-misplaced/eval/hints b/t/recipes/checks/binaries/location/binaries-misplaced/eval/hints new file mode 100644 index 0000000..91f0ef7 --- /dev/null +++ b/t/recipes/checks/binaries/location/binaries-misplaced/eval/hints @@ -0,0 +1 @@ +binaries-misplaced (binary): binary-in-etc [etc/foo] diff --git a/t/recipes/checks/binaries/location/binaries-multiarch-same/build-spec/debian/compat.in b/t/recipes/checks/binaries/location/binaries-multiarch-same/build-spec/debian/compat.in new file mode 100644 index 0000000..640a566 --- /dev/null +++ b/t/recipes/checks/binaries/location/binaries-multiarch-same/build-spec/debian/compat.in @@ -0,0 +1 @@ +[% $dh_compat_level %] diff --git a/t/recipes/checks/binaries/location/binaries-multiarch-same/build-spec/debian/control.in b/t/recipes/checks/binaries/location/binaries-multiarch-same/build-spec/debian/control.in new file mode 100644 index 0000000..2efaa33 --- /dev/null +++ b/t/recipes/checks/binaries/location/binaries-multiarch-same/build-spec/debian/control.in @@ -0,0 +1,25 @@ +Source: [% $source %] +Priority: optional +Section: libs +Maintainer: [% $author %] +Standards-Version: [% $standards_version %] +Build-Depends: [% $build_depends %] +Rules-Requires-Root: no + +Package: libbasic2 +Architecture: [% $package_architecture %] +Pre-Depends: ${misc:Pre-Depends}, multiarch-support +Depends: ${misc:Depends}, ${shlibs:Depends} +Multi-Arch: same +Description: [% $description %] + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. + . + Note there is an explicitly pre-depends on multiarch-support, since + older versions of debhelper might not use it yet. dpkg-dev will + remove the duplicate entry (if any). + + + diff --git a/t/recipes/checks/binaries/location/binaries-multiarch-same/build-spec/debian/libbasic2.symbols b/t/recipes/checks/binaries/location/binaries-multiarch-same/build-spec/debian/libbasic2.symbols new file mode 100644 index 0000000..c2b8fb3 --- /dev/null +++ b/t/recipes/checks/binaries/location/binaries-multiarch-same/build-spec/debian/libbasic2.symbols @@ -0,0 +1,2 @@ +libbasic.so.2 libbasic2 #MINVER# + lib_interface@Base 1.0 diff --git a/t/recipes/checks/binaries/location/binaries-multiarch-same/build-spec/fill-values b/t/recipes/checks/binaries/location/binaries-multiarch-same/build-spec/fill-values new file mode 100644 index 0000000..c508b75 --- /dev/null +++ b/t/recipes/checks/binaries/location/binaries-multiarch-same/build-spec/fill-values @@ -0,0 +1,6 @@ +Skeleton: upload-native +Testname: binaries-multiarch-same +Package-Architecture: any +Default-Build-Depends: debhelper (>= 9.20151004~) +Dh-Compat-Level: 9 +Description: Test of multiarch same package with unsafe binaries diff --git a/t/recipes/checks/binaries/location/binaries-multiarch-same/build-spec/orig/Makefile b/t/recipes/checks/binaries/location/binaries-multiarch-same/build-spec/orig/Makefile new file mode 100644 index 0000000..ad7783b --- /dev/null +++ b/t/recipes/checks/binaries/location/binaries-multiarch-same/build-spec/orig/Makefile @@ -0,0 +1,12 @@ + +all: + gcc $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -fPIC -shared -Wl,-z,defs -Wl,-soname,libbasic.so.2 -o libbasic.so.2 basic.c + +install: + install -d $(DESTDIR)/usr/lib/ + install -m 644 -c -s libbasic.so.2 $(DESTDIR)/usr/lib/libbasic.so.2 + +clean distclean: + rm -f libbasic.so.2 + +check test: diff --git a/t/recipes/checks/binaries/location/binaries-multiarch-same/build-spec/orig/basic.c b/t/recipes/checks/binaries/location/binaries-multiarch-same/build-spec/orig/basic.c new file mode 100644 index 0000000..27e93fc --- /dev/null +++ b/t/recipes/checks/binaries/location/binaries-multiarch-same/build-spec/orig/basic.c @@ -0,0 +1,19 @@ +#include +#include + +static void +hardening_trigger(char *p, int i, void (*f)(char *)) +{ + char test[10]; + memcpy(test, p, i); + f(test); + printf("%s", test); +} + +int +lib_interface(void) +{ + printf("Hello world!\n"); + hardening_trigger(NULL, 0, NULL); + return 0; +} diff --git a/t/recipes/checks/binaries/location/binaries-multiarch-same/eval/desc b/t/recipes/checks/binaries/location/binaries-multiarch-same/eval/desc new file mode 100644 index 0000000..50a4f57 --- /dev/null +++ b/t/recipes/checks/binaries/location/binaries-multiarch-same/eval/desc @@ -0,0 +1,2 @@ +Testname: binaries-multiarch-same +Check: binaries/location diff --git a/t/recipes/checks/binaries/location/binaries-multiarch-same/eval/hints b/t/recipes/checks/binaries/location/binaries-multiarch-same/eval/hints new file mode 100644 index 0000000..b482a07 --- /dev/null +++ b/t/recipes/checks/binaries/location/binaries-multiarch-same/eval/hints @@ -0,0 +1 @@ +libbasic2 (binary): arch-dependent-file-not-in-arch-specific-directory [usr/lib/libbasic.so.2] diff --git a/t/recipes/checks/binaries/obsolete/crypt/binaries-obsolete-des/build-spec/fill-values b/t/recipes/checks/binaries/obsolete/crypt/binaries-obsolete-des/build-spec/fill-values new file mode 100644 index 0000000..b7493a0 --- /dev/null +++ b/t/recipes/checks/binaries/obsolete/crypt/binaries-obsolete-des/build-spec/fill-values @@ -0,0 +1,4 @@ +Skeleton: upload-native +Testname: binaries-obsolete-des +Description: Check detection of obsolete DES functions +Package-Architecture: any diff --git a/t/recipes/checks/binaries/obsolete/crypt/binaries-obsolete-des/build-spec/orig/Makefile b/t/recipes/checks/binaries/obsolete/crypt/binaries-obsolete-des/build-spec/orig/Makefile new file mode 100644 index 0000000..99409d2 --- /dev/null +++ b/t/recipes/checks/binaries/obsolete/crypt/binaries-obsolete-des/build-spec/orig/Makefile @@ -0,0 +1,52 @@ +# Makefile for the obsolete-des tests. + +# glibc 2.28 and greater try to prevent new programs from being linked +# against the obsolete functions we're testing for. This can be worked +# around, but we have to know the exact "symbol version" associated with +# the obsolete functions, which has to be dug out of libcrypt.so with nm. + +LIBCRYPT_FILE := $(shell $(CC) $(CFLAGS) $(LDFLAGS) -print-file-name=libcrypt.so) + +SYMVER := $(shell nm --dynamic --with-symbol-versions $(LIBCRYPT_FILE) | \ + grep ' setkey@' | cut -d@ -f2) + +# The output of the above nm | grep | cut pipeline will be the empty string +# if it is possible to link programs against 'setkey' without special magic, +# and a nonempty string if special magic is required. All five of the +# functions we are testing were introduced in the same release of glibc and +# disabled for new programs as a group in a single release of glibc, so it +# is only necessary to check how one of them is handled. +ifneq "$(SYMVER)" "" +SYMVER_DEFINE := -DSYMVER=\"$(SYMVER)\" +else +SYMVER_DEFINE := -USYMVER +endif + +CFLAGS := $(shell dpkg-buildflags --get CFLAGS) +CPPFLAGS := $(shell dpkg-buildflags --get CPPFLAGS) $(SYMVER_DEFINE) +LDFLAGS := $(shell dpkg-buildflags --get LDFLAGS) + +PROGRAMS := uses-fcrypt uses-encrypt uses-encrypt_r uses-setkey uses-setkey_r +MANPAGES := $(PROGRAMS:=.1) + +all: $(PROGRAMS) $(MANPAGES) + +uses-%: uses-%.o + $(CC) $(CFLAGS) $(LDFLAGS) $< -o $@ -lcrypt + +%.1: dummy.pod + sed s/@NAME@/$(@F)/g < $< | \ + pod2man --name $(@F) --section 1 > $@ + +install: all + $(INSTALL) -d $(DESTDIR)/usr/bin + $(INSTALL) -d $(DESTDIR)/usr/share/man/man1 + $(INSTALL) -m 755 $(PROGRAMS) $(DESTDIR)/usr/bin + $(INSTALL) -m 644 $(MANPAGES) $(DESTDIR)/usr/share/man/man1 + +clean distclean: + -rm -f *.o $(PROGRAMS) $(MANPAGES) + +check test: + +.PRECIOUS: $(PROGRAMS:=.o) diff --git a/t/recipes/checks/binaries/obsolete/crypt/binaries-obsolete-des/build-spec/orig/dummy.pod b/t/recipes/checks/binaries/obsolete/crypt/binaries-obsolete-des/build-spec/orig/dummy.pod new file mode 100644 index 0000000..224df4a --- /dev/null +++ b/t/recipes/checks/binaries/obsolete/crypt/binaries-obsolete-des/build-spec/orig/dummy.pod @@ -0,0 +1,11 @@ +=head1 NAME + +@NAME@ -- binary that does something + +=head1 SYNOPSIS + + @NAME@ [options] + +=head1 DESCRIPTION + +@NAME@ does something very useful. diff --git a/t/recipes/checks/binaries/obsolete/crypt/binaries-obsolete-des/build-spec/orig/uses-encrypt.c b/t/recipes/checks/binaries/obsolete/crypt/binaries-obsolete-des/build-spec/orig/uses-encrypt.c new file mode 100644 index 0000000..b6ca062 --- /dev/null +++ b/t/recipes/checks/binaries/obsolete/crypt/binaries-obsolete-des/build-spec/orig/uses-encrypt.c @@ -0,0 +1,30 @@ +/* This program uses the obsolete function 'encrypt', which performs + DES encryption. */ + +#define _GNU_SOURCE 1 +#include +#include +#include + +/* The prototype of 'encrypt' may already have been removed from + unistd.h. */ +extern void encrypt(char block[64], int edflag); + +/* It may already not be possible to link new programs that use + 'encrypt' without special magic. */ +#ifdef SYMVER +__asm__ (".symver encrypt, encrypt@" SYMVER); +#endif + +int +main(void) +{ + char block[64]; + memset(block, 0, sizeof block); + encrypt(block, 0); + for (size_t i = 0; i < sizeof block; i++) { + putchar(block[i] ? '1' : '0'); + } + putchar('\n'); + return 0; +} diff --git a/t/recipes/checks/binaries/obsolete/crypt/binaries-obsolete-des/build-spec/orig/uses-encrypt_r.c b/t/recipes/checks/binaries/obsolete/crypt/binaries-obsolete-des/build-spec/orig/uses-encrypt_r.c new file mode 100644 index 0000000..a382624 --- /dev/null +++ b/t/recipes/checks/binaries/obsolete/crypt/binaries-obsolete-des/build-spec/orig/uses-encrypt_r.c @@ -0,0 +1,33 @@ +/* This program uses the obsolete function 'encrypt_r', which performs + DES encryption. */ + +#define _GNU_SOURCE 1 +#include +#include +#include + +/* The prototype of 'encrypt_r' may already have been removed from + crypt.h. */ +extern void encrypt_r(char block[64], int edflag, struct crypt_data *data); + +/* It may already not be possible to link new programs that use + 'encrypt_r' without special magic. */ +#ifdef SYMVER +__asm__ (".symver encrypt_r, encrypt_r@" SYMVER); +#endif + +int +main(void) +{ + struct crypt_data data; + char block[64]; + + memset(&data, 0, sizeof data); + memset(block, 0, sizeof block); + encrypt_r(block, 0, &data); + for (size_t i = 0; i < sizeof block; i++) { + putchar(block[i] ? '1' : '0'); + } + putchar('\n'); + return 0; +} diff --git a/t/recipes/checks/binaries/obsolete/crypt/binaries-obsolete-des/build-spec/orig/uses-fcrypt.c b/t/recipes/checks/binaries/obsolete/crypt/binaries-obsolete-des/build-spec/orig/uses-fcrypt.c new file mode 100644 index 0000000..d71a837 --- /dev/null +++ b/t/recipes/checks/binaries/obsolete/crypt/binaries-obsolete-des/build-spec/orig/uses-fcrypt.c @@ -0,0 +1,21 @@ +/* This program uses the obsolete function 'fcrypt', + which is an alias for 'crypt'. */ + +#include +#include + +/* The prototype may already have been removed from crypt.h. */ +extern char *fcrypt(const char *, const char *); + +/* It may already not be possible to link new programs that use + 'fcrypt' without special magic. */ +#ifdef SYMVER +__asm__ (".symver fcrypt, fcrypt@" SYMVER); +#endif + +int +main(void) +{ + puts(fcrypt("password", "Dn")); + return 0; +} diff --git a/t/recipes/checks/binaries/obsolete/crypt/binaries-obsolete-des/build-spec/orig/uses-setkey.c b/t/recipes/checks/binaries/obsolete/crypt/binaries-obsolete-des/build-spec/orig/uses-setkey.c new file mode 100644 index 0000000..bdf70b0 --- /dev/null +++ b/t/recipes/checks/binaries/obsolete/crypt/binaries-obsolete-des/build-spec/orig/uses-setkey.c @@ -0,0 +1,45 @@ +/* This program uses the obsolete function 'setkey', which sets a key for + DES encryption. */ + +#define _GNU_SOURCE 1 +#include +#include +#include + +/* The prototype of 'setkey' may already have been removed from + stdlib.h. */ +extern void setkey(const char *); + + +/* It may already not be possible to link new programs that use + 'setkey' without special magic. */ +#ifdef SYMVER +__asm__ (".symver setkey, setkey@" SYMVER); +#endif + +/* setkey uses a 1-bit-per-byte representation of a DES key. + Yes, really. */ +const char key[64] = { + 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, + 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, + 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, + 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, +}; + +int +main(void) +{ + /* The primary effects of calling 'setkey' are only visible by + calling 'encrypt', and we don't want to call 'encrypt' in this + program because we want to make sure Lintian detects programs + that call 'setkey' but not 'encrypt', even though that doesn't + make a whole lot of sense. So we just call it and then check + whether it changed errno, which is the documented way to check + whether it failed. */ + errno = 0; + setkey(key); + if (errno) { + perror("setkey"); + } + return 0; +} diff --git a/t/recipes/checks/binaries/obsolete/crypt/binaries-obsolete-des/build-spec/orig/uses-setkey_r.c b/t/recipes/checks/binaries/obsolete/crypt/binaries-obsolete-des/build-spec/orig/uses-setkey_r.c new file mode 100644 index 0000000..3ad3f35 --- /dev/null +++ b/t/recipes/checks/binaries/obsolete/crypt/binaries-obsolete-des/build-spec/orig/uses-setkey_r.c @@ -0,0 +1,48 @@ +/* This program uses the obsolete function 'setkey_r', which sets a key for + DES encryption. */ + +#define _GNU_SOURCE 1 +#include +#include +#include +#include + +/* The prototype of 'setkey_r' may already have been removed from + crypt.h. */ +extern void setkey_r(const char *, struct crypt_data *); + +/* It may already not be possible to link new programs that use + 'setkey_r' without special magic. */ +#ifdef SYMVER +__asm__ (".symver setkey_r, setkey_r@" SYMVER); +#endif + +/* setkey_r uses a 1-bit-per-byte representation of a DES key. + Yes, really. */ +const char key[64] = { + 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, + 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, + 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, + 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, +}; + +int +main(void) +{ + struct crypt_data data; + memset(&data, 0, sizeof data); + + /* The primary effects of calling 'setkey_r' are only visible by + calling 'encrypt_r', and we don't want to call 'encrypt_r' in + this program because we want to make sure Lintian detects + programs that call 'setkey_r' but not 'encrypt_r', even though + that doesn't make a whole lot of sense. So we just call it and + then check whether it changed errno, which is the documented + way to check whether it failed. */ + errno = 0; + setkey_r(key, &data); + if (errno) { + perror("setkey_r"); + } + return 0; +} diff --git a/t/recipes/checks/binaries/obsolete/crypt/binaries-obsolete-des/eval/desc b/t/recipes/checks/binaries/obsolete/crypt/binaries-obsolete-des/eval/desc new file mode 100644 index 0000000..0ceced0 --- /dev/null +++ b/t/recipes/checks/binaries/obsolete/crypt/binaries-obsolete-des/eval/desc @@ -0,0 +1,2 @@ +Testname: binaries-obsolete-des +Check: binaries/obsolete/crypt diff --git a/t/recipes/checks/binaries/obsolete/crypt/binaries-obsolete-des/eval/hints b/t/recipes/checks/binaries/obsolete/crypt/binaries-obsolete-des/eval/hints new file mode 100644 index 0000000..a49c520 --- /dev/null +++ b/t/recipes/checks/binaries/obsolete/crypt/binaries-obsolete-des/eval/hints @@ -0,0 +1,5 @@ +binaries-obsolete-des (binary): obsolete-des-encryption setkey_r [usr/bin/uses-setkey_r] +binaries-obsolete-des (binary): obsolete-des-encryption setkey [usr/bin/uses-setkey] +binaries-obsolete-des (binary): obsolete-des-encryption encrypt_r [usr/bin/uses-encrypt_r] +binaries-obsolete-des (binary): obsolete-des-encryption encrypt [usr/bin/uses-encrypt] +binaries-obsolete-des (binary): obsolete-crypt-alias fcrypt [usr/bin/uses-fcrypt] diff --git a/t/recipes/checks/binaries/prerequisites/binaries-libc-link/build-spec/debian/rules b/t/recipes/checks/binaries/prerequisites/binaries-libc-link/build-spec/debian/rules new file mode 100755 index 0000000..fab80fa --- /dev/null +++ b/t/recipes/checks/binaries/prerequisites/binaries-libc-link/build-spec/debian/rules @@ -0,0 +1,9 @@ +#!/usr/bin/make -f + +export DEB_BUILD_MAINT_OPTIONS=hardening=+all + +%: + dh $@ + +# dwz errors out; no .debug_info section present due to -nostdlib +override_dh_dwz: diff --git a/t/recipes/checks/binaries/prerequisites/binaries-libc-link/build-spec/fill-values b/t/recipes/checks/binaries/prerequisites/binaries-libc-link/build-spec/fill-values new file mode 100644 index 0000000..88f75cb --- /dev/null +++ b/t/recipes/checks/binaries/prerequisites/binaries-libc-link/build-spec/fill-values @@ -0,0 +1,4 @@ +Skeleton: upload-native +Testname: binaries-libc-link +Description: Binaries not linked against libc +Package-Architecture: any diff --git a/t/recipes/checks/binaries/prerequisites/binaries-libc-link/build-spec/orig/Makefile b/t/recipes/checks/binaries/prerequisites/binaries-libc-link/build-spec/orig/Makefile new file mode 100644 index 0000000..daa4159 --- /dev/null +++ b/t/recipes/checks/binaries/prerequisites/binaries-libc-link/build-spec/orig/Makefile @@ -0,0 +1,35 @@ +# turn off PIE in CC in case we have a PIEful toolchain: +ifneq ($(findstring -no-pie,$(shell gcc -no-pie 2>&1)),) + CC := gcc +else + CC := gcc -fno-pie -no-pie +endif + +LINKER_FLAGS := -Wl,--no-copy-dt-needed-entries,--no-as-needed + +all: basic basic.1 libbasic-nodeps libbasic-nolibc + +basic.1: basic.pod + pod2man --section 1 $< > $@ + +basic: basic.o + $(CC) -nostdlib -o$@ $< $(LINKER_FLAGS) -lm $(LFLAGS) + +libbasic-nodeps: basic.o + $(CC) -nostdlib --shared -o$@ $< + +libbasic-nolibc: basic.o + $(CC) -nostdlib --shared -o$@ $< $(LINKER_FLAGS) -lm + +install: + install -d $(DESTDIR)/usr/bin + install -d $(DESTDIR)/usr/lib/basic + install -d $(DESTDIR)/usr/share/man/man1 + install -m 755 -c basic $(DESTDIR)/usr/bin/basic + install -m 755 -c libbasic-* $(DESTDIR)/usr/lib/basic + install -m 644 -c basic.1 $(DESTDIR)/usr/share/man/man1 + +clean distclean: + rm -f basic libbasic-* basic.1 + +check test: diff --git a/t/recipes/checks/binaries/prerequisites/binaries-libc-link/build-spec/orig/basic.c b/t/recipes/checks/binaries/prerequisites/binaries-libc-link/build-spec/orig/basic.c new file mode 100644 index 0000000..77bc677 --- /dev/null +++ b/t/recipes/checks/binaries/prerequisites/binaries-libc-link/build-spec/orig/basic.c @@ -0,0 +1,5 @@ +int +main(void) +{ + return 0; +} diff --git a/t/recipes/checks/binaries/prerequisites/binaries-libc-link/build-spec/orig/basic.pod b/t/recipes/checks/binaries/prerequisites/binaries-libc-link/build-spec/orig/basic.pod new file mode 100644 index 0000000..d395e96 --- /dev/null +++ b/t/recipes/checks/binaries/prerequisites/binaries-libc-link/build-spec/orig/basic.pod @@ -0,0 +1,14 @@ +=head1 NAME + +basic -- segfaults + +=head1 SYNOPSIS + + basic + +=head1 DESCRIPTION + +It tends to seg. fault, but if it doesn't it will return 0 like +/bin/true. + +=cut diff --git a/t/recipes/checks/binaries/prerequisites/binaries-libc-link/eval/desc b/t/recipes/checks/binaries/prerequisites/binaries-libc-link/eval/desc new file mode 100644 index 0000000..66097cf --- /dev/null +++ b/t/recipes/checks/binaries/prerequisites/binaries-libc-link/eval/desc @@ -0,0 +1,2 @@ +Testname: binaries-libc-link +Check: binaries/prerequisites diff --git a/t/recipes/checks/binaries/prerequisites/binaries-libc-link/eval/hints b/t/recipes/checks/binaries/prerequisites/binaries-libc-link/eval/hints new file mode 100644 index 0000000..59ab437 --- /dev/null +++ b/t/recipes/checks/binaries/prerequisites/binaries-libc-link/eval/hints @@ -0,0 +1,3 @@ +binaries-libc-link (binary): shared-library-lacks-prerequisites [usr/lib/basic/libbasic-nodeps] +binaries-libc-link (binary): program-not-linked-against-libc [usr/bin/basic] +binaries-libc-link (binary): library-not-linked-against-libc [usr/lib/basic/libbasic-nolibc] diff --git a/t/recipes/checks/binaries/prerequisites/binaries-libc-link/eval/post-test b/t/recipes/checks/binaries/prerequisites/binaries-libc-link/eval/post-test new file mode 100644 index 0000000..c156be8 --- /dev/null +++ b/t/recipes/checks/binaries/prerequisites/binaries-libc-link/eval/post-test @@ -0,0 +1,3 @@ +# The LDFLAGS parts of the hardening flags are a bit difficult to pass +# to the linker so just drop them. +/hardening-no-/ d diff --git a/t/recipes/checks/binaries/prerequisites/binaries-missing-depends-on-libc/build-spec/debian/compat.in b/t/recipes/checks/binaries/prerequisites/binaries-missing-depends-on-libc/build-spec/debian/compat.in new file mode 100644 index 0000000..640a566 --- /dev/null +++ b/t/recipes/checks/binaries/prerequisites/binaries-missing-depends-on-libc/build-spec/debian/compat.in @@ -0,0 +1 @@ +[% $dh_compat_level %] diff --git a/t/recipes/checks/binaries/prerequisites/binaries-missing-depends-on-libc/build-spec/debian/control.in b/t/recipes/checks/binaries/prerequisites/binaries-missing-depends-on-libc/build-spec/debian/control.in new file mode 100644 index 0000000..d8adb1b --- /dev/null +++ b/t/recipes/checks/binaries/prerequisites/binaries-missing-depends-on-libc/build-spec/debian/control.in @@ -0,0 +1,17 @@ +Source: [% $source %] +Priority: optional +Section: devel +Maintainer: [% $author %] +Standards-Version: [% $standards_version %] +Build-Depends: [% $build_depends %], perl +Rules-Requires-Root: no + +Package: libbasic2 +Section: libs +Architecture: [% $package_architecture %] +Depends: some-pkg, ${misc:Depends}, ${shlib:Depends} +Description: [% $description %] + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. diff --git a/t/recipes/checks/binaries/prerequisites/binaries-missing-depends-on-libc/build-spec/debian/libbasic2.symbols b/t/recipes/checks/binaries/prerequisites/binaries-missing-depends-on-libc/build-spec/debian/libbasic2.symbols new file mode 100644 index 0000000..0119bca --- /dev/null +++ b/t/recipes/checks/binaries/prerequisites/binaries-missing-depends-on-libc/build-spec/debian/libbasic2.symbols @@ -0,0 +1,4 @@ +libbasic.so.2 libbasic2 #MINVER# + lib_interface@Base 1.0 +libbasic++.so.2 libbasic2 #MINVER# + (c++)cxx_lib_interface@Base 1.0 diff --git a/t/recipes/checks/binaries/prerequisites/binaries-missing-depends-on-libc/build-spec/debian/rules b/t/recipes/checks/binaries/prerequisites/binaries-missing-depends-on-libc/build-spec/debian/rules new file mode 100644 index 0000000..188f490 --- /dev/null +++ b/t/recipes/checks/binaries/prerequisites/binaries-missing-depends-on-libc/build-spec/debian/rules @@ -0,0 +1,15 @@ +#!/usr/bin/make -f + +export DEB_BUILD_MAINT_OPTIONS=hardening=+all + +# Make sure the C++ library actually links to libc +export DEB_LDFLAGS_MAINT_APPEND=-Wl,--no-as-needed + +%: + dh $@ + +override_dh_gencontrol: + # Remove the shlib:Depends since it will contain libc + sed -i '/shlib:Depends=/ d' debian/libbasic2.substvars + echo "shlib:depends=" >> debian/libbasic2.substvars + dh_gencontrol diff --git a/t/recipes/checks/binaries/prerequisites/binaries-missing-depends-on-libc/build-spec/fill-values b/t/recipes/checks/binaries/prerequisites/binaries-missing-depends-on-libc/build-spec/fill-values new file mode 100644 index 0000000..0f58398 --- /dev/null +++ b/t/recipes/checks/binaries/prerequisites/binaries-missing-depends-on-libc/build-spec/fill-values @@ -0,0 +1,6 @@ +Skeleton: upload-native +Testname: binaries-missing-depends-on-libc +Default-Build-Depends: debhelper (>= 9.20151004~) +Dh-Compat-Level: 9 +Description: Test for missing libc depends +Package-Architecture: any diff --git a/t/recipes/checks/binaries/prerequisites/binaries-missing-depends-on-libc/build-spec/orig/Makefile b/t/recipes/checks/binaries/prerequisites/binaries-missing-depends-on-libc/build-spec/orig/Makefile new file mode 100644 index 0000000..fcf25f4 --- /dev/null +++ b/t/recipes/checks/binaries/prerequisites/binaries-missing-depends-on-libc/build-spec/orig/Makefile @@ -0,0 +1,14 @@ +all: + gcc $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -fPIC -shared -Wl,-z,defs -Wl,-soname,libbasic.so.2 -o libbasic.so.2 basic.c + g++ $(CXXFLAGS) $(CPPFLAGS) $(LDFLAGS) -fPIC -shared -Wl,-z,defs \ + -Wl,-soname,libbasic++.so.2 -olibbasic++.so.2 cpp.cxx + +install: + install -d $(DESTDIR)/usr/lib/ + install -m 644 -c -s libbasic.so.2 $(DESTDIR)/usr/lib/libbasic.so.2 + install -m 644 -c -s libbasic++.so.2 $(DESTDIR)/usr/lib/libbasic++.so.2 + +clean distclean: + rm -f libbasic.so.2 libbasic++.so.2 + +check test: diff --git a/t/recipes/checks/binaries/prerequisites/binaries-missing-depends-on-libc/build-spec/orig/basic.c b/t/recipes/checks/binaries/prerequisites/binaries-missing-depends-on-libc/build-spec/orig/basic.c new file mode 100644 index 0000000..27e93fc --- /dev/null +++ b/t/recipes/checks/binaries/prerequisites/binaries-missing-depends-on-libc/build-spec/orig/basic.c @@ -0,0 +1,19 @@ +#include +#include + +static void +hardening_trigger(char *p, int i, void (*f)(char *)) +{ + char test[10]; + memcpy(test, p, i); + f(test); + printf("%s", test); +} + +int +lib_interface(void) +{ + printf("Hello world!\n"); + hardening_trigger(NULL, 0, NULL); + return 0; +} diff --git a/t/recipes/checks/binaries/prerequisites/binaries-missing-depends-on-libc/build-spec/orig/cpp.cxx b/t/recipes/checks/binaries/prerequisites/binaries-missing-depends-on-libc/build-spec/orig/cpp.cxx new file mode 100644 index 0000000..1338e40 --- /dev/null +++ b/t/recipes/checks/binaries/prerequisites/binaries-missing-depends-on-libc/build-spec/orig/cpp.cxx @@ -0,0 +1,14 @@ +#include +#include + +using namespace std; + +template T +cxx_lib_interface(vector &v) +{ + cout << ":-) hello world" << endl; + return v[0]; +} + + + diff --git a/t/recipes/checks/binaries/prerequisites/binaries-missing-depends-on-libc/eval/desc b/t/recipes/checks/binaries/prerequisites/binaries-missing-depends-on-libc/eval/desc new file mode 100644 index 0000000..88d5fa2 --- /dev/null +++ b/t/recipes/checks/binaries/prerequisites/binaries-missing-depends-on-libc/eval/desc @@ -0,0 +1,2 @@ +Testname: binaries-missing-depends-on-libc +Check: binaries/prerequisites diff --git a/t/recipes/checks/binaries/prerequisites/binaries-missing-depends-on-libc/eval/hints b/t/recipes/checks/binaries/prerequisites/binaries-missing-depends-on-libc/eval/hints new file mode 100644 index 0000000..5c512f2 --- /dev/null +++ b/t/recipes/checks/binaries/prerequisites/binaries-missing-depends-on-libc/eval/hints @@ -0,0 +1,2 @@ +libbasic2 (binary): missing-dependency-on-libstdc++ needed by usr/lib/libbasic++.so.2 +libbasic2 (binary): missing-dependency-on-libc needed by usr/lib/libbasic++.so.2 and 1 others diff --git a/t/recipes/checks/binaries/prerequisites/binaries-missing-depends/build-spec/debian/compat.in b/t/recipes/checks/binaries/prerequisites/binaries-missing-depends/build-spec/debian/compat.in new file mode 100644 index 0000000..640a566 --- /dev/null +++ b/t/recipes/checks/binaries/prerequisites/binaries-missing-depends/build-spec/debian/compat.in @@ -0,0 +1 @@ +[% $dh_compat_level %] diff --git a/t/recipes/checks/binaries/prerequisites/binaries-missing-depends/build-spec/debian/control.in b/t/recipes/checks/binaries/prerequisites/binaries-missing-depends/build-spec/debian/control.in new file mode 100644 index 0000000..3b37179 --- /dev/null +++ b/t/recipes/checks/binaries/prerequisites/binaries-missing-depends/build-spec/debian/control.in @@ -0,0 +1,17 @@ +Source: [% $source %] +Priority: optional +Section: devel +Maintainer: [% $author %] +Standards-Version: [% $standards_version %] +Build-Depends: [% $build_depends %], perl +Rules-Requires-Root: no + +Package: libbasic2 +Architecture: [% $package_architecture %] +Section: libs +Depends: ${misc:Depends}, ${shlib:Depends} +Description: [% $description %] + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. diff --git a/t/recipes/checks/binaries/prerequisites/binaries-missing-depends/build-spec/debian/libbasic2.symbols b/t/recipes/checks/binaries/prerequisites/binaries-missing-depends/build-spec/debian/libbasic2.symbols new file mode 100644 index 0000000..c2b8fb3 --- /dev/null +++ b/t/recipes/checks/binaries/prerequisites/binaries-missing-depends/build-spec/debian/libbasic2.symbols @@ -0,0 +1,2 @@ +libbasic.so.2 libbasic2 #MINVER# + lib_interface@Base 1.0 diff --git a/t/recipes/checks/binaries/prerequisites/binaries-missing-depends/build-spec/debian/rules b/t/recipes/checks/binaries/prerequisites/binaries-missing-depends/build-spec/debian/rules new file mode 100644 index 0000000..8a83255 --- /dev/null +++ b/t/recipes/checks/binaries/prerequisites/binaries-missing-depends/build-spec/debian/rules @@ -0,0 +1,10 @@ +#!/usr/bin/make -f + +export DEB_BUILD_MAINT_OPTIONS=hardening=+all + +%: + dh $@ + +override_dh_builddeb: + sed -i '/Depends:/ d' debian/libbasic2/DEBIAN/control + dh_builddeb diff --git a/t/recipes/checks/binaries/prerequisites/binaries-missing-depends/build-spec/fill-values b/t/recipes/checks/binaries/prerequisites/binaries-missing-depends/build-spec/fill-values new file mode 100644 index 0000000..b1caef8 --- /dev/null +++ b/t/recipes/checks/binaries/prerequisites/binaries-missing-depends/build-spec/fill-values @@ -0,0 +1,6 @@ +Skeleton: upload-native +Testname: binaries-missing-depends +Default-Build-Depends: debhelper (>= 9.20151004~) +Dh-Compat-Level: 9 +Description: Test for missing depends line +Package-Architecture: any diff --git a/t/recipes/checks/binaries/prerequisites/binaries-missing-depends/build-spec/orig/Makefile b/t/recipes/checks/binaries/prerequisites/binaries-missing-depends/build-spec/orig/Makefile new file mode 100644 index 0000000..6fc3968 --- /dev/null +++ b/t/recipes/checks/binaries/prerequisites/binaries-missing-depends/build-spec/orig/Makefile @@ -0,0 +1,12 @@ +all: + gcc $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -fPIC -shared -Wl,-z,defs -Wl,-soname,libbasic.so.2 -o libbasic.so.2 basic.c + +install: + # install it under the correct triplet directory + install -d $(DESTDIR)/usr/lib/ + install -m 644 -c -s libbasic.so.2 $(DESTDIR)/usr/lib/libbasic.so.2 + +clean distclean: + rm -f libbasic.so.2 + +check test: diff --git a/t/recipes/checks/binaries/prerequisites/binaries-missing-depends/build-spec/orig/basic.c b/t/recipes/checks/binaries/prerequisites/binaries-missing-depends/build-spec/orig/basic.c new file mode 100644 index 0000000..27e93fc --- /dev/null +++ b/t/recipes/checks/binaries/prerequisites/binaries-missing-depends/build-spec/orig/basic.c @@ -0,0 +1,19 @@ +#include +#include + +static void +hardening_trigger(char *p, int i, void (*f)(char *)) +{ + char test[10]; + memcpy(test, p, i); + f(test); + printf("%s", test); +} + +int +lib_interface(void) +{ + printf("Hello world!\n"); + hardening_trigger(NULL, 0, NULL); + return 0; +} diff --git a/t/recipes/checks/binaries/prerequisites/binaries-missing-depends/eval/desc b/t/recipes/checks/binaries/prerequisites/binaries-missing-depends/eval/desc new file mode 100644 index 0000000..6ad9fdd --- /dev/null +++ b/t/recipes/checks/binaries/prerequisites/binaries-missing-depends/eval/desc @@ -0,0 +1,2 @@ +Testname: binaries-missing-depends +Check: binaries/prerequisites diff --git a/t/recipes/checks/binaries/prerequisites/binaries-missing-depends/eval/hints b/t/recipes/checks/binaries/prerequisites/binaries-missing-depends/eval/hints new file mode 100644 index 0000000..db69d51 --- /dev/null +++ b/t/recipes/checks/binaries/prerequisites/binaries-missing-depends/eval/hints @@ -0,0 +1 @@ +libbasic2 (binary): undeclared-elf-prerequisites (libc.so.6) [usr/lib/libbasic.so.2] diff --git a/t/recipes/checks/binaries/prerequisites/legacy-debug/build-spec/debian/_symbols b/t/recipes/checks/binaries/prerequisites/legacy-debug/build-spec/debian/_symbols new file mode 100644 index 0000000..46e6af1 --- /dev/null +++ b/t/recipes/checks/binaries/prerequisites/legacy-debug/build-spec/debian/_symbols @@ -0,0 +1,23 @@ + This line should flag a syntax error +# but this one shouldn't +| although this one should, but for a different reason + and so should this + +libhello.so.0 libhello0 #MINVER# +| libhello0c2 (>= 1.2) , libhelloc0c2 (<< 1.3) +| hello-dbg3| libhelloc0c3|foobar (= 1.2) |hello-dbg2 +| hello-dbg + hello@Base 1.0 +* Build-Dep-Foo: bar + hello2@Base 2.0 4 + hello3@Base 2.0 1 + hello3@Base 2.0 A + dummy + +libhello.so.2 libhello2 #MINVER# +* Build-Depends-Package: libbar +| libhello2 (>= 1:2.3) + hello@Base 2.0 + +libhello.so.0 libhello0 #MINVER# + duplicate@Base 1.0 diff --git a/t/recipes/checks/binaries/prerequisites/legacy-debug/build-spec/debian/changelog.in b/t/recipes/checks/binaries/prerequisites/legacy-debug/build-spec/debian/changelog.in new file mode 100644 index 0000000..02da925 --- /dev/null +++ b/t/recipes/checks/binaries/prerequisites/legacy-debug/build-spec/debian/changelog.in @@ -0,0 +1,13 @@ +debug ([% $version %]) [% $distribution %]; urgency=low + + * NMU. + (uploaded by the maintainer and with repeated version number) + + -- Russ Allbery Tue, 4 Apr 2006 20:27:22 +0000 + +debug (1.0) unstable; urgency=low + + * Initial version. + + -- Russ Allbery Sat, 4 Mar 2006 21:31:06 -0800 + diff --git a/t/recipes/checks/binaries/prerequisites/legacy-debug/build-spec/debian/compat.in b/t/recipes/checks/binaries/prerequisites/legacy-debug/build-spec/debian/compat.in new file mode 100644 index 0000000..640a566 --- /dev/null +++ b/t/recipes/checks/binaries/prerequisites/legacy-debug/build-spec/debian/compat.in @@ -0,0 +1 @@ +[% $dh_compat_level %] diff --git a/t/recipes/checks/binaries/prerequisites/legacy-debug/build-spec/debian/control b/t/recipes/checks/binaries/prerequisites/legacy-debug/build-spec/debian/control new file mode 100644 index 0000000..fcb2b86 --- /dev/null +++ b/t/recipes/checks/binaries/prerequisites/legacy-debug/build-spec/debian/control @@ -0,0 +1,85 @@ +Source: debug +Section: utils +Priority: optional +Maintainer: Russ Allbery +Build-Depends: debhelper (>= 5.0.0) +Build-Depends-Indep: not-debhelper (>= 0.4.3) +Standards-Version: 3.7.0 + +Package: hello +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: Test for external debugging information + Lintian regression test for external debugging file handling. This test + contains the binary. + . + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. + +Package: hello-dbg +Priority: optional +Section: debug +Architecture: any +Depends: hello (= ${binary:Version}), ${shlibs:Depends}, ${misc:Depends} +Description: Test for external debugging information (symbols) + Lintian regression test for external debugging file handling. This test + contains the binary symbols. + . + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. + +Package: libhello0 +Section: libs +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: Test for external debugging information (library) + Lintian regression test for external debugging file handling. This test + contains a library. + . + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. + +Package: libhello0-dbg +Section: debug +Priority: optional +Architecture: any +Depends: libhello (= ${binary:Version}), ${shlibs:Depends}, ${misc:Depends} +Description: Test for external debugging information (library symbols) + Lintian regression test for external debugging file handling. This test + contains the library symbols. + . + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. + +Package: hi-dbg +Section: debug +Priority: optional +Architecture: any +Depends: foo-pkg, not-libhello0 +Description: Test for external debugging symbols + Lintian regression test for external debugging files handling. This test + contains the library symbols. + . + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. + +Package: hello-hello-dbg +Section: debug +Priority: optional +Architecture: any +Depends: foo-pkg, not-libhello0, hello +Description: Test for external debugging symbols - another try + Lintian regression test for external debugging files handling. This test + contains the library symbols. This package actually tests a combination of + the above. + . + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. diff --git a/t/recipes/checks/binaries/prerequisites/legacy-debug/build-spec/debian/copyright b/t/recipes/checks/binaries/prerequisites/legacy-debug/build-spec/debian/copyright new file mode 100644 index 0000000..5d4f6c2 --- /dev/null +++ b/t/recipes/checks/binaries/prerequisites/legacy-debug/build-spec/debian/copyright @@ -0,0 +1,4 @@ +Written Sat, 04 Mar 2006 21:30:01 -0800 by Russ Allbery . + +Test for copyright in capital letters. (#464992) +COPYRIGHT RUSS ALLBERY 2006 diff --git a/t/recipes/checks/binaries/prerequisites/legacy-debug/build-spec/debian/rules b/t/recipes/checks/binaries/prerequisites/legacy-debug/build-spec/debian/rules new file mode 100755 index 0000000..b659895 --- /dev/null +++ b/t/recipes/checks/binaries/prerequisites/legacy-debug/build-spec/debian/rules @@ -0,0 +1,99 @@ +#!/usr/bin/make -f +# Sample debian/rules that uses debhelper. +# This file is public domain software, originally written by Joey Hess. + +# turn off PIE in CC in case we have a PIEful toolchain: +ifneq ($(findstring -no-pie,$(shell gcc -no-pie 2>&1)),) + CC := gcc +else + CC := gcc -fno-pie -no-pie +endif + +build-indep: + +build-arch: build-stamp + +build-stamp: + dh_testdir + $(CC) -D_REENTRANT -fPIC -c libhello.c + $(CC) -o libhello.so.0.0 -shared -Wl,-soname,libhello.so.0 libhello.o + ln -s libhello.so.0.0 libhello.so + $(CC) -o hello hello.c -L. -lhello + touch build-stamp + +build: build-arch build-indep + +clean: + dh_testdir + dh_testroot + rm -f build-stamp *.o libhello.so.0.0 libhello.so + dh_clean + +install: build-stamp + dh_testdir + dh_testroot + dh_clean -k + install -D hello $(CURDIR)/debian/hello/usr/bin/hello + install -D libhello.so.0.0 \ + $(CURDIR)/debian/libhello0/usr/lib/libhello.so.0.0 + ln -s libhello.so.0.0 \ + $(CURDIR)/debian/libhello0/usr/lib/libhello.so.0 + +# Build architecture-dependent files here. +export DH_OPTIONS +binary-arch: DH_OPTIONS=-a +binary-arch: build-stamp install + dh_testdir + dh_testroot + dh_installchangelogs -N hello-dbg + dh_installdocs + DH_OPTIONS= dh_strip -phello --dbg-package=hello-dbg + DH_OPTIONS= dh_strip -plibhello0 --dbg-package=libhello0-dbg + + # Now break a few things. Copy the debugging data into places it + # shouldn't be. + cp $(CURDIR)/debian/hello-dbg/usr/lib/debug/usr/bin/hello \ + $(CURDIR)/debian/hello/usr/bin/hello.dbg + cp $(CURDIR)/debian/libhello0-dbg/usr/lib/debug/usr/lib/libhello.so.0.0 \ + $(CURDIR)/debian/libhello0-dbg/usr/lib/libhello.so.dbg + + # Put a full copy of the library in libhello0-dbg in /usr/lib/debug, + # which is okay. + install -m 644 libhello.so.0.0 \ + $(CURDIR)/debian/libhello0-dbg/usr/lib/debug/libhello.so.0.0 + + # Also put it in /usr/lib/debug/lib, which isn't. + install -D -m 644 libhello.so.0.0 \ + $(CURDIR)/debian/libhello0-dbg/usr/lib/debug/lib/libhello.so.0.0 + + # Requires a versioned dependency. + dh_icons + + dh_link + dh_compress + dh_fixperms + dh_makeshlibs -X debug + dh_installdeb + dh_shlibdeps -X debug + + # We do this by hand as otherwise dpkg-gensymbols + # will error due to the broken symbols file + # and abort the build; similarly the file in + # the source tree is _symbols so that dpkg + # doesn't attempt to sanity check it + install -d $(CURDIR)/debian/libhello0/DEBIAN + install -m 644 $(CURDIR)/debian/_symbols \ + $(CURDIR)/debian/libhello0/DEBIAN/symbols + # hello doesn't contain any shlibs, but we + # make it contain a symbols file + install -d $(CURDIR)/debian/hello/DEBIAN + install -m 644 $(CURDIR)/debian/_symbols \ + $(CURDIR)/debian/hello/DEBIAN/symbols + + dh_gencontrol + dh_md5sums + dh_builddeb + +binary-indep: +binary: binary-indep binary-arch +.PHONY: build-arch build-indep build binary binary-indep binary-arch clean install diff --git a/t/recipes/checks/binaries/prerequisites/legacy-debug/build-spec/fill-values b/t/recipes/checks/binaries/prerequisites/legacy-debug/build-spec/fill-values new file mode 100644 index 0000000..79eebf1 --- /dev/null +++ b/t/recipes/checks/binaries/prerequisites/legacy-debug/build-spec/fill-values @@ -0,0 +1,6 @@ +Skeleton: upload-native +Testname: legacy-debug +Source: debug +Default-Build-Depends: debhelper (>= 9.20151004~) +Dh-Compat-Level: 7 +Description: Legacy test "debug" diff --git a/t/recipes/checks/binaries/prerequisites/legacy-debug/build-spec/orig/hello.c b/t/recipes/checks/binaries/prerequisites/legacy-debug/build-spec/orig/hello.c new file mode 100644 index 0000000..76f8337 --- /dev/null +++ b/t/recipes/checks/binaries/prerequisites/legacy-debug/build-spec/orig/hello.c @@ -0,0 +1,9 @@ +#include +#include "libhello.h" + +int +main(void) +{ + hello(); + exit(0); +} diff --git a/t/recipes/checks/binaries/prerequisites/legacy-debug/build-spec/orig/libhello.c b/t/recipes/checks/binaries/prerequisites/legacy-debug/build-spec/orig/libhello.c new file mode 100644 index 0000000..e2f8409 --- /dev/null +++ b/t/recipes/checks/binaries/prerequisites/legacy-debug/build-spec/orig/libhello.c @@ -0,0 +1,7 @@ +#include + +void +hello(void) +{ + printf("Hello, World!\n"); +} diff --git a/t/recipes/checks/binaries/prerequisites/legacy-debug/build-spec/orig/libhello.h b/t/recipes/checks/binaries/prerequisites/legacy-debug/build-spec/orig/libhello.h new file mode 100644 index 0000000..ef77476 --- /dev/null +++ b/t/recipes/checks/binaries/prerequisites/legacy-debug/build-spec/orig/libhello.h @@ -0,0 +1 @@ +void hello(void); diff --git a/t/recipes/checks/binaries/prerequisites/legacy-debug/eval/desc b/t/recipes/checks/binaries/prerequisites/legacy-debug/eval/desc new file mode 100644 index 0000000..772ec4e --- /dev/null +++ b/t/recipes/checks/binaries/prerequisites/legacy-debug/eval/desc @@ -0,0 +1,2 @@ +Testname: legacy-debug +Check: binaries/prerequisites diff --git a/t/recipes/checks/binaries/prerequisites/legacy-debug/eval/hints b/t/recipes/checks/binaries/prerequisites/legacy-debug/eval/hints new file mode 100644 index 0000000..7cbded8 --- /dev/null +++ b/t/recipes/checks/binaries/prerequisites/legacy-debug/eval/hints @@ -0,0 +1,2 @@ +libhello0-dbg (binary): shared-library-lacks-prerequisites [usr/lib/libhello.so.dbg] +libhello0-dbg (binary): missing-dependency-on-libc needed by usr/lib/debug/lib/libhello.so.0.0 and 1 others diff --git a/t/recipes/checks/binaries/prerequisites/legacy-debug/eval/post-test b/t/recipes/checks/binaries/prerequisites/legacy-debug/eval/post-test new file mode 100644 index 0000000..fc97c5f --- /dev/null +++ b/t/recipes/checks/binaries/prerequisites/legacy-debug/eval/post-test @@ -0,0 +1,2 @@ +/: hardening-.*/ d +s/\(current is ([0-9]+\.)+[0-9]\)/(current is CURRENT)/ diff --git a/t/recipes/checks/binaries/prerequisites/legacy-libbaz/build-spec/debian/changelog.in b/t/recipes/checks/binaries/prerequisites/legacy-libbaz/build-spec/debian/changelog.in new file mode 100644 index 0000000..91a6bb5 --- /dev/null +++ b/t/recipes/checks/binaries/prerequisites/legacy-libbaz/build-spec/debian/changelog.in @@ -0,0 +1,6 @@ +libbaz ([% $version %]) [% $distribution %]; urgency=low + + * Initial setup + + -- Sean 'Shaleh' Perry Tue, 30 Jan 2001 15:23:59 -0800 + diff --git a/t/recipes/checks/binaries/prerequisites/legacy-libbaz/build-spec/debian/compat.in b/t/recipes/checks/binaries/prerequisites/legacy-libbaz/build-spec/debian/compat.in new file mode 100644 index 0000000..640a566 --- /dev/null +++ b/t/recipes/checks/binaries/prerequisites/legacy-libbaz/build-spec/debian/compat.in @@ -0,0 +1 @@ +[% $dh_compat_level %] diff --git a/t/recipes/checks/binaries/prerequisites/legacy-libbaz/build-spec/debian/control b/t/recipes/checks/binaries/prerequisites/legacy-libbaz/build-spec/debian/control new file mode 100644 index 0000000..1506687 --- /dev/null +++ b/t/recipes/checks/binaries/prerequisites/legacy-libbaz/build-spec/debian/control @@ -0,0 +1,58 @@ +Source: libbaz +Section: libs +Priority: optional +Maintainer: Lintian Maintainer +Build-depends: debhelper (>=4) +Standards-Version: 3.2.1 + +Package: libbaz1 +Architecture: any +Provides: libbaz +Description: test handling of library packages + Regression test for lintian's handling of libraries. + . + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. + +Package: libbaz1-dev +Architecture: any +Depends: libbaz1 (= ${source:Version}), perlapi-5.8.8 +Description: development package + Regression test for lintian's handling of libraries (dev). + . + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. + +Package: libbaz2 +Architecture: any +Depends: ${shlibs:Depends}, libssl0.9.8 +Description: test handling of library packages (good) + Regression test for lintian's handling of libraries (good). + . + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. + +Package: libbaz2-dev +Architecture: any +Depends: ${shlibs:Depends}, libbaz2 (= ${source:Version}) +Description: development package (good) + Regression test for lintian's handling of libraries (dev good). + . + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. + +Package: libbaz2-dbg +Architecture: any +Depends: libbaz2 (= ${binary:Version}) +Priority: optional +Description: debugging package + Regression test for lintian's handling of libraries (debug). + . + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. + diff --git a/t/recipes/checks/binaries/prerequisites/legacy-libbaz/build-spec/debian/copyright b/t/recipes/checks/binaries/prerequisites/legacy-libbaz/build-spec/debian/copyright new file mode 100644 index 0000000..a874c87 --- /dev/null +++ b/t/recipes/checks/binaries/prerequisites/legacy-libbaz/build-spec/debian/copyright @@ -0,0 +1,8 @@ +This package is released under public domain. This is distributed in the hope +that it will be useful, but without any warranty; without even the implied +warranty of merchantability or fitness for a particular purpose. + +A reference to /usr/share/common-licenses/GPL-2 to make it look like this +package is under the GPL and trigger the OpenSSL warning. + +However, this has an OpenSSL exception. diff --git a/t/recipes/checks/binaries/prerequisites/legacy-libbaz/build-spec/debian/dev.postinst b/t/recipes/checks/binaries/prerequisites/legacy-libbaz/build-spec/debian/dev.postinst new file mode 100644 index 0000000..683e3cc --- /dev/null +++ b/t/recipes/checks/binaries/prerequisites/legacy-libbaz/build-spec/debian/dev.postinst @@ -0,0 +1,4 @@ +#!/bin/sh -e + +$PKG=libbaz1-dev + diff --git a/t/recipes/checks/binaries/prerequisites/legacy-libbaz/build-spec/debian/dev.prerm b/t/recipes/checks/binaries/prerequisites/legacy-libbaz/build-spec/debian/dev.prerm new file mode 100644 index 0000000..683e3cc --- /dev/null +++ b/t/recipes/checks/binaries/prerequisites/legacy-libbaz/build-spec/debian/dev.prerm @@ -0,0 +1,4 @@ +#!/bin/sh -e + +$PKG=libbaz1-dev + diff --git a/t/recipes/checks/binaries/prerequisites/legacy-libbaz/build-spec/debian/lib.postinst b/t/recipes/checks/binaries/prerequisites/legacy-libbaz/build-spec/debian/lib.postinst new file mode 100644 index 0000000..ec0b98a --- /dev/null +++ b/t/recipes/checks/binaries/prerequisites/legacy-libbaz/build-spec/debian/lib.postinst @@ -0,0 +1,10 @@ +#!/bin/sh -e + +$PKG=libbaz1 + +if [ "$1" = "configure" ]; then + if [ -d /usr/doc -a ! -e /usr/doc/$PKG -a -d /usr/share/doc/$PKG ] +; then + ln -sf ../share/doc/$PKG /usr/doc/$PKG + fi +fi diff --git a/t/recipes/checks/binaries/prerequisites/legacy-libbaz/build-spec/debian/lib.prerm b/t/recipes/checks/binaries/prerequisites/legacy-libbaz/build-spec/debian/lib.prerm new file mode 100644 index 0000000..50e37c3 --- /dev/null +++ b/t/recipes/checks/binaries/prerequisites/legacy-libbaz/build-spec/debian/lib.prerm @@ -0,0 +1,7 @@ +#!/bin/sh -e + +$PKG=libbaz1 + +if [ \( "$1" = "upgrade" -o "$1" = "remove" \) -a -L /usr/doc/$PKG ]; then + rm -f /usr/doc/$PKG +fi diff --git a/t/recipes/checks/binaries/prerequisites/legacy-libbaz/build-spec/debian/lib.shlibs b/t/recipes/checks/binaries/prerequisites/legacy-libbaz/build-spec/debian/lib.shlibs new file mode 100644 index 0000000..b88e288 --- /dev/null +++ b/t/recipes/checks/binaries/prerequisites/legacy-libbaz/build-spec/debian/lib.shlibs @@ -0,0 +1,8 @@ +libdoesntexist2 1.0 libbaz1 +libdoesntexist2 1.0 libbaz1 +libbaz2 1.1 libbaz +libbaz3 1 libbaz1 (>> 1-1) +libbaz4 1 libbaz1 (= 1-1) +libbaz5 1 libbaz2 +udeb: libdoesntexist2 1.0 libbaz2 +udeb: libdoesntexist2 1.0 libbaz2 diff --git a/t/recipes/checks/binaries/prerequisites/legacy-libbaz/build-spec/debian/lib.symbols b/t/recipes/checks/binaries/prerequisites/legacy-libbaz/build-spec/debian/lib.symbols new file mode 100644 index 0000000..72f9d8a --- /dev/null +++ b/t/recipes/checks/binaries/prerequisites/legacy-libbaz/build-spec/debian/lib.symbols @@ -0,0 +1,3 @@ +libbaz.so.2 libbaz1 #MINVER# + pw 1-1 + foo 1.1-1 diff --git a/t/recipes/checks/binaries/prerequisites/legacy-libbaz/build-spec/debian/rules b/t/recipes/checks/binaries/prerequisites/legacy-libbaz/build-spec/debian/rules new file mode 100755 index 0000000..fa99bc8 --- /dev/null +++ b/t/recipes/checks/binaries/prerequisites/legacy-libbaz/build-spec/debian/rules @@ -0,0 +1,121 @@ +#!/usr/bin/make -f + +lib_tmp=debian/tmp-lib +dev_tmp=debian/tmp-dev + +LIB=libbaz1 +DEV=libbaz1-dev + +VENDORARCH := $(shell perl -MConfig -wE'say substr($$Config{vendorarch},1)') + +build-arch: + $(MAKE) + +build-indep: + +build: build-arch build-indep + +clean: + $(MAKE) clean + dh_clean -plibbaz2 -plibbaz2-dev + rm -f debian/files debian/substvars + rm -rf $(lib_tmp) $(dev_tmp) + +# Now the correct libbaz2-dev package +binary-correct: + install -d debian/libbaz2-dev/usr/lib + cp -a libbaz2.a libbaz2.so debian/libbaz2-dev/usr/lib + # usually, I'd also include some .h files to /usr/include + + # Now the correct libbaz2 package + install -d debian/libbaz2/usr/lib + cp -a libbaz2.so.* debian/libbaz2/usr/lib + chmod a-x debian/libbaz2/usr/lib/* + + # General stuff that is tested in other testsets: + dh_installdocs -plibbaz2 -plibbaz2-dev -plibbaz2-dbg + dh_compress -plibbaz2 -plibbaz2-dev -plibbaz2-dbg + + # Mess up the libbaz2 changelog files to test the symlink handling. + ln -s /usr/share/doc/lintian/changelog.gz \ + debian/libbaz2/usr/share/doc/libbaz2/changelog.gz + install -m 644 debian/changelog \ + debian/libbaz2-dev/usr/share/doc/libbaz2-dev/foo + ln -s foo debian/libbaz2-dev/usr/share/doc/libbaz2-dev/changelog + + # Okay, if either line is omitted, it should be noted + dh_strip --dbg-package=libbaz2-dbg -plibbaz2 -plibbaz2-dev + dh_makeshlibs -plibbaz2 -plibbaz2-dev -plibbaz2-dbg + dh_shlibdeps -plibbaz2 -plibbaz2-dev -plibbaz2-dbg + + # and again, regular packaging stuff + dh_installdeb -plibbaz2 -plibbaz2-dev -plibbaz2-dbg + echo udeb: libbaz2 1.0 libbaz2 >> debian/libbaz2/DEBIAN/shlibs + dh_gencontrol -plibbaz2 -plibbaz2-dev -plibbaz2-dbg + dh_builddeb -plibbaz2 -plibbaz2-dev -plibbaz2-dbg + +# and the incorrect one +binary-arch: build-arch binary-correct + # first, the lib package + install -d $(lib_tmp)/usr/lib + # resp. no soname (check), wrong soname (check), and no-pic (check) + cp -a libbaz1.so.1.0* $(lib_tmp)/usr/lib + cp -a libbaz2.so.1.0.3b $(lib_tmp)/usr/lib/libfoo2.so.1.0.3b + install -m644 libbaz3.so.1.0.3b $(lib_tmp)/usr/lib/libbaz3.so.1.0.3b + # let's include the .a in the non-dev too (TODO) + # Also, libbaz1.a hasn't a symbol table (TODO) + cp -a *.a $(lib_tmp)/usr/lib + # And a wrong .so symlink (wrong, only in -dev, TODO) + ln -s libfoo3.so.0.9 $(lib_tmp)/usr/lib/libfoo3.so + # And a wrong .so.X symlink (wrong, should point to a real existing + # shlib, TODO) + ln -s libfoo.so.0.9.1 $(lib_tmp)/usr/lib/libfoo.so.0.9 + # And a plain .so (wrong, TODO) + touch $(lib_tmp)/usr/lib/libbar2.so + # And a non-versioned SONAME. + install -m644 libbaz.so $(lib_tmp)/usr/lib/libbaz.so + strip --remove-section=.comment --strip-unneeded $(lib_tmp)/usr/lib/libbaz.so + # Pretend to be a Perl module to test a lack of Perl dependencies. + install -d $(lib_tmp)/$(VENDORARCH)/auto/Foo + install -m 644 libbaz2.so.1.0.3b $(lib_tmp)/$(VENDORARCH)/auto/Foo/Foo.so + strip $(lib_tmp)/$(VENDORARCH)/auto/Foo/Foo.so + + install -d $(lib_tmp)/usr/share/doc/$(LIB) + install -m 644 debian/copyright $(lib_tmp)/usr/share/doc/$(LIB) + install -m 644 debian/changelog $(lib_tmp)/usr/share/doc/$(LIB) + gzip -n -9 $(lib_tmp)/usr/share/doc/$(LIB)/changelog + install -d $(lib_tmp)/DEBIAN + install -m 755 debian/lib.postinst $(lib_tmp)/DEBIAN/postinst + install -m 755 debian/lib.prerm $(lib_tmp)/DEBIAN/prerm + touch $(lib_tmp)/usr/share/doc/README.Debian + #dpkg-shlibdeps $(lib_tmp)/usr/lib/libbaz.so.1.0 + install -m 755 debian/lib.shlibs $(lib_tmp)/DEBIAN/shlibs + install -m 755 debian/lib.symbols $(lib_tmp)/DEBIAN/symbols + dpkg-gencontrol -isp -p$(LIB) -P$(lib_tmp) + dpkg --build $(lib_tmp) .. + + # now the -dev package + install -d $(dev_tmp)/usr/include + install -d $(lib_tmp)/usr/lib + # let's also install the .so at the same time... (wrong, TODO) + cp -a *.a *.so.* $(lib_tmp)/usr/lib + # and fuck up permission (TODO) + chmod a+x $(lib_tmp)/usr/lib/*.a + # Pretend to be a Perl module to test a lack of Perl dependencies. + install -d $(dev_tmp)/$(VENDORARCH)/auto/Foo + install -m 644 libbaz2.so.1.0.3b $(dev_tmp)/$(VENDORARCH)/auto/Foo/Foo.so + strip $(dev_tmp)/$(VENDORARCH)/auto/Foo/Foo.so + install -d $(dev_tmp)/usr/share/doc + ln -s $(LIB) $(dev_tmp)/usr/share/doc/$(DEV) + install -d $(dev_tmp)/DEBIAN + install -m 755 debian/dev.postinst $(dev_tmp)/DEBIAN/postinst + install -m 755 debian/dev.prerm $(dev_tmp)/DEBIAN/prerm + dpkg-gencontrol -isp -p$(DEV) -P$(dev_tmp) + dpkg --build $(dev_tmp) .. + + +binary: binary-arch + +# The mention of binary-indep here should be sufficient to suppress the +# warning that it's not present. +.PHONY: build-arch build-indep build binary-arch binary-indep binary clean diff --git a/t/recipes/checks/binaries/prerequisites/legacy-libbaz/build-spec/debian/source.lintian-overrides b/t/recipes/checks/binaries/prerequisites/legacy-libbaz/build-spec/debian/source.lintian-overrides new file mode 100644 index 0000000..6008d27 --- /dev/null +++ b/t/recipes/checks/binaries/prerequisites/legacy-libbaz/build-spec/debian/source.lintian-overrides @@ -0,0 +1 @@ +libbaz source: maintainer-script-lacks-debhelper-token diff --git a/t/recipes/checks/binaries/prerequisites/legacy-libbaz/build-spec/fill-values b/t/recipes/checks/binaries/prerequisites/legacy-libbaz/build-spec/fill-values new file mode 100644 index 0000000..7effe4f --- /dev/null +++ b/t/recipes/checks/binaries/prerequisites/legacy-libbaz/build-spec/fill-values @@ -0,0 +1,6 @@ +Skeleton: upload-non-native +Testname: legacy-libbaz +Source: libbaz +Version: 1-1 +Default-Build-Depends: debhelper (>= 9.20151004~) +Description: Legacy test "libbaz" diff --git a/t/recipes/checks/binaries/prerequisites/legacy-libbaz/build-spec/orig/Makefile b/t/recipes/checks/binaries/prerequisites/legacy-libbaz/build-spec/orig/Makefile new file mode 100644 index 0000000..657dc2a --- /dev/null +++ b/t/recipes/checks/binaries/prerequisites/legacy-libbaz/build-spec/orig/Makefile @@ -0,0 +1,55 @@ +# This is the correct way to build a lib + +CC=gcc +CFLAGS=-g -Wall -Winline -O2 +LDFLAGS=-Wl,--no-as-needed + +OBJS=baz.o extra.o +SHOBJS=baz.sho extra.sho +NOPICOBJS = $(SHOBJS) + +all: libbaz1.a libbaz2.a libbaz1.so.1.0.3b libbaz2.so libbaz3.so.1.0.3b \ + libbaz.so + +libbaz2.so: libbaz2.so.1.0 + ln -sf $^ $@ +libbaz2.so.1.0: libbaz2.so.1.0.3b + ln -sf $^ $@ + +# Oops, forget the soname altogether +libbaz1.so.1.0.3b: $(NOPICOBJS) + $(CC) $(LDFLAGS) -o $@ -shared $^ -lc + +libbaz2.so.1.0.3b: $(SHOBJS) + $(CC) $(LDFLAGS) -o $@ -shared -Wl,-soname,libbaz2.so.1.0 $^ -lc + +# Non-PIC. We can't test this on all architectures +libbaz3.so.1.0.3b: $(NOPICOBJS) + $(CC) $(LDFLAGS) -o $@ -shared -Wl,-soname,libbaz3.so.1 $^ -lc + +# Non-versioned SONAME. +libbaz.so: $(SHOBJS) + $(CC) $(LDFLAGS) -o $@ -shared -Wl,-soname,libbaz.so $^ -lc + +#%.o-noreentrant: %.c +# $(CC) $(LDFLAGS) $(CFLAGS) -o $@ -c $< + +%.sho: %.c + $(CC) $(LDFLAGS) $(CFLAGS) -D_REENTRANT -fPIC -o $@ -c $< + +%.o: %.c + $(CC) $(LDFLAGS) $(CFLAGS) -D_REENTRANT -o $@ -c $< + +libbaz2.a: $(OBJS) + ar cq $@ $(OBJS) + strip --strip-unneeded --remove-section=.comment \ + --remove-section=-note $@ + ranlib $@ + +# The pic one in the .a (wrong), no archive table +libbaz1.a: $(SHOBJS) + ar cqS $@ $^ + strip --strip-unneeded --remove-section=.comment \ + --remove-section=-note $@ +clean: + rm -f *.a *.o *.so* *.sho diff --git a/t/recipes/checks/binaries/prerequisites/legacy-libbaz/build-spec/orig/baz.c b/t/recipes/checks/binaries/prerequisites/legacy-libbaz/build-spec/orig/baz.c new file mode 100644 index 0000000..4d5fc45 --- /dev/null +++ b/t/recipes/checks/binaries/prerequisites/legacy-libbaz/build-spec/orig/baz.c @@ -0,0 +1,6 @@ +#include + +double pw(double p) +{ + return exp(p); +} diff --git a/t/recipes/checks/binaries/prerequisites/legacy-libbaz/build-spec/orig/extra.c b/t/recipes/checks/binaries/prerequisites/legacy-libbaz/build-spec/orig/extra.c new file mode 100644 index 0000000..e69de29 diff --git a/t/recipes/checks/binaries/prerequisites/legacy-libbaz/eval/desc b/t/recipes/checks/binaries/prerequisites/legacy-libbaz/eval/desc new file mode 100644 index 0000000..f229b04 --- /dev/null +++ b/t/recipes/checks/binaries/prerequisites/legacy-libbaz/eval/desc @@ -0,0 +1,2 @@ +Testname: legacy-libbaz +Check: binaries/prerequisites diff --git a/t/recipes/checks/binaries/prerequisites/legacy-libbaz/eval/hints b/t/recipes/checks/binaries/prerequisites/legacy-libbaz/eval/hints new file mode 100644 index 0000000..0a04cbb --- /dev/null +++ b/t/recipes/checks/binaries/prerequisites/legacy-libbaz/eval/hints @@ -0,0 +1,6 @@ +libbaz1-dev (binary): missing-dependency-on-libc needed by usr/lib/ma-dir/perl/version/auto/Foo/Foo.so +libbaz1 (binary): undeclared-elf-prerequisites (libc.so.6) [usr/lib/ma-dir/perl/version/auto/Foo/Foo.so] +libbaz1 (binary): undeclared-elf-prerequisites (libc.so.6) [usr/lib/libfoo2.so.1.0.3b] +libbaz1 (binary): undeclared-elf-prerequisites (libc.so.6) [usr/lib/libbaz3.so.1.0.3b] +libbaz1 (binary): undeclared-elf-prerequisites (libc.so.6) [usr/lib/libbaz1.so.1.0.3b] +libbaz1 (binary): undeclared-elf-prerequisites (libc.so.6) [usr/lib/libbaz.so] diff --git a/t/recipes/checks/binaries/prerequisites/legacy-libbaz/eval/post-test b/t/recipes/checks/binaries/prerequisites/legacy-libbaz/eval/post-test new file mode 100755 index 0000000..29dc3f4 --- /dev/null +++ b/t/recipes/checks/binaries/prerequisites/legacy-libbaz/eval/post-test @@ -0,0 +1,4 @@ +/: hardening-.*/ d +s/\(current is ([0-9]+\.)+[0-9]\)/(current is CURRENT)/ +s,usr/lib/([^\/]*/)?perl[0-9]*(/[0-9]*\.[0-9]*)?/,usr/lib/ma-dir/perl/version/,g +/: file-references-package-build-path / d diff --git a/t/recipes/checks/binaries/prerequisites/numpy/binaries-missing-depends-on-numpy-abi/build-spec/debian/rules b/t/recipes/checks/binaries/prerequisites/numpy/binaries-missing-depends-on-numpy-abi/build-spec/debian/rules new file mode 100644 index 0000000..f7cfef1 --- /dev/null +++ b/t/recipes/checks/binaries/prerequisites/numpy/binaries-missing-depends-on-numpy-abi/build-spec/debian/rules @@ -0,0 +1,7 @@ +#!/usr/bin/make -f + +export DEB_BUILD_MAINT_OPTIONS=hardening=+all,-pie +export DEB_LDFLAGS_MAINT_APPEND=-Wl,--no-as-needed + +%: + dh $@ --buildsystem pybuild diff --git a/t/recipes/checks/binaries/prerequisites/numpy/binaries-missing-depends-on-numpy-abi/build-spec/fill-values b/t/recipes/checks/binaries/prerequisites/numpy/binaries-missing-depends-on-numpy-abi/build-spec/fill-values new file mode 100644 index 0000000..a8b1cea --- /dev/null +++ b/t/recipes/checks/binaries/prerequisites/numpy/binaries-missing-depends-on-numpy-abi/build-spec/fill-values @@ -0,0 +1,5 @@ +Skeleton: upload-native +Testname: binaries-missing-depends-on-numpy-abi +Description: Test for missing dependency on python3-numpy-abiN +Package-Architecture: any +Extra-Build-Depends: python3-all-dev, python3-numpy, dh-python, python3-setuptools diff --git a/t/recipes/checks/binaries/prerequisites/numpy/binaries-missing-depends-on-numpy-abi/build-spec/orig/basic.c b/t/recipes/checks/binaries/prerequisites/numpy/binaries-missing-depends-on-numpy-abi/build-spec/orig/basic.c new file mode 100644 index 0000000..9bb2221 --- /dev/null +++ b/t/recipes/checks/binaries/prerequisites/numpy/binaries-missing-depends-on-numpy-abi/build-spec/orig/basic.c @@ -0,0 +1,21 @@ +#include +#include +#include +#include + +#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION + +static void +hardening_trigger(char *p, int i, void (*f)(char *)) +{ + char test[10]; + memcpy(test, p, i); + f(test); + printf("%s", test); +} + +void do_import_array(void) +{ + import_array(); + hardening_trigger(NULL, 0, NULL); +} diff --git a/t/recipes/checks/binaries/prerequisites/numpy/binaries-missing-depends-on-numpy-abi/build-spec/orig/setup.py b/t/recipes/checks/binaries/prerequisites/numpy/binaries-missing-depends-on-numpy-abi/build-spec/orig/setup.py new file mode 100644 index 0000000..675a9ea --- /dev/null +++ b/t/recipes/checks/binaries/prerequisites/numpy/binaries-missing-depends-on-numpy-abi/build-spec/orig/setup.py @@ -0,0 +1,9 @@ +import setuptools +import numpy + +setuptools.setup( + ext_modules=[ + setuptools.Extension('basic', ['basic.c'], + include_dirs=[numpy.get_include()]), + ], +) diff --git a/t/recipes/checks/binaries/prerequisites/numpy/binaries-missing-depends-on-numpy-abi/eval/desc b/t/recipes/checks/binaries/prerequisites/numpy/binaries-missing-depends-on-numpy-abi/eval/desc new file mode 100644 index 0000000..2702447 --- /dev/null +++ b/t/recipes/checks/binaries/prerequisites/numpy/binaries-missing-depends-on-numpy-abi/eval/desc @@ -0,0 +1,2 @@ +Testname: binaries-missing-depends-on-numpy-abi +Check: binaries/prerequisites/numpy diff --git a/t/recipes/checks/binaries/prerequisites/numpy/binaries-missing-depends-on-numpy-abi/eval/hints b/t/recipes/checks/binaries/prerequisites/numpy/binaries-missing-depends-on-numpy-abi/eval/hints new file mode 100644 index 0000000..feadb98 --- /dev/null +++ b/t/recipes/checks/binaries/prerequisites/numpy/binaries-missing-depends-on-numpy-abi/eval/hints @@ -0,0 +1 @@ +binaries-missing-depends-on-numpy-abi (binary): missing-dependency-on-numpy-abi diff --git a/t/recipes/checks/binaries/prerequisites/perl/binaries-missing-depends-on-xapi/build-spec/debian/rules b/t/recipes/checks/binaries/prerequisites/perl/binaries-missing-depends-on-xapi/build-spec/debian/rules new file mode 100644 index 0000000..7b55940 --- /dev/null +++ b/t/recipes/checks/binaries/prerequisites/perl/binaries-missing-depends-on-xapi/build-spec/debian/rules @@ -0,0 +1,17 @@ +#!/usr/bin/make -f + +export DEB_BUILD_MAINT_OPTIONS=hardening=+all + +%: + dh $@ + +override_dh_perl: + +override_dh_builddeb: + # Work around debhelper bug (triggers useless call to ldconfig) + rm -f debian/*/DEBIAN/postinst debian/*/DEBIAN/postrm + rm -f debian/*/DEBIAN/triggers + dh_builddeb + +# errors out with: objcopy: '.../binaries-missing-depends-on-xapi.debug': No such file +override_dh_dwz: diff --git a/t/recipes/checks/binaries/prerequisites/perl/binaries-missing-depends-on-xapi/build-spec/fill-values b/t/recipes/checks/binaries/prerequisites/perl/binaries-missing-depends-on-xapi/build-spec/fill-values new file mode 100644 index 0000000..bf3682a --- /dev/null +++ b/t/recipes/checks/binaries/prerequisites/perl/binaries-missing-depends-on-xapi/build-spec/fill-values @@ -0,0 +1,4 @@ +Skeleton: upload-native +Testname: binaries-missing-depends-on-xapi +Description: Test for missing perlapi depends +Package-Architecture: any diff --git a/t/recipes/checks/binaries/prerequisites/perl/binaries-missing-depends-on-xapi/build-spec/orig/Makefile b/t/recipes/checks/binaries/prerequisites/perl/binaries-missing-depends-on-xapi/build-spec/orig/Makefile new file mode 100644 index 0000000..5c9cbaf --- /dev/null +++ b/t/recipes/checks/binaries/prerequisites/perl/binaries-missing-depends-on-xapi/build-spec/orig/Makefile @@ -0,0 +1,16 @@ +all: + gcc $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -fPIC -shared -Wl,-z,defs -Wl,-soname,libbasic.so.2 -o libbasic.so basic.c + +VENDORARCH := $(shell perl -MConfig -wE'say substr($$Config{vendorarch},1)') + +install: + # install it under the correct triplet directory + install -d $(DESTDIR)/$(VENDORARCH) + install -m 644 -c -s libbasic.so $(DESTDIR)/$(VENDORARCH)/libbasic.so + install -d $(DESTDIR)/usr/lib/php5 + install -m 644 -c -s libbasic.so $(DESTDIR)/usr/lib/php5/libbasic.so + +clean distclean: + rm -f libbasic.so.2 + +check test: diff --git a/t/recipes/checks/binaries/prerequisites/perl/binaries-missing-depends-on-xapi/build-spec/orig/basic.c b/t/recipes/checks/binaries/prerequisites/perl/binaries-missing-depends-on-xapi/build-spec/orig/basic.c new file mode 100644 index 0000000..27e93fc --- /dev/null +++ b/t/recipes/checks/binaries/prerequisites/perl/binaries-missing-depends-on-xapi/build-spec/orig/basic.c @@ -0,0 +1,19 @@ +#include +#include + +static void +hardening_trigger(char *p, int i, void (*f)(char *)) +{ + char test[10]; + memcpy(test, p, i); + f(test); + printf("%s", test); +} + +int +lib_interface(void) +{ + printf("Hello world!\n"); + hardening_trigger(NULL, 0, NULL); + return 0; +} diff --git a/t/recipes/checks/binaries/prerequisites/perl/binaries-missing-depends-on-xapi/eval/desc b/t/recipes/checks/binaries/prerequisites/perl/binaries-missing-depends-on-xapi/eval/desc new file mode 100644 index 0000000..288238f --- /dev/null +++ b/t/recipes/checks/binaries/prerequisites/perl/binaries-missing-depends-on-xapi/eval/desc @@ -0,0 +1,2 @@ +Testname: binaries-missing-depends-on-xapi +Check: binaries/prerequisites/perl diff --git a/t/recipes/checks/binaries/prerequisites/perl/binaries-missing-depends-on-xapi/eval/hints b/t/recipes/checks/binaries/prerequisites/perl/binaries-missing-depends-on-xapi/eval/hints new file mode 100644 index 0000000..6d97760 --- /dev/null +++ b/t/recipes/checks/binaries/prerequisites/perl/binaries-missing-depends-on-xapi/eval/hints @@ -0,0 +1 @@ +binaries-missing-depends-on-xapi (binary): missing-dependency-on-perlapi diff --git a/t/recipes/checks/binaries/prerequisites/perl/legacy-libbaz/build-spec/debian/changelog.in b/t/recipes/checks/binaries/prerequisites/perl/legacy-libbaz/build-spec/debian/changelog.in new file mode 100644 index 0000000..91a6bb5 --- /dev/null +++ b/t/recipes/checks/binaries/prerequisites/perl/legacy-libbaz/build-spec/debian/changelog.in @@ -0,0 +1,6 @@ +libbaz ([% $version %]) [% $distribution %]; urgency=low + + * Initial setup + + -- Sean 'Shaleh' Perry Tue, 30 Jan 2001 15:23:59 -0800 + diff --git a/t/recipes/checks/binaries/prerequisites/perl/legacy-libbaz/build-spec/debian/compat.in b/t/recipes/checks/binaries/prerequisites/perl/legacy-libbaz/build-spec/debian/compat.in new file mode 100644 index 0000000..640a566 --- /dev/null +++ b/t/recipes/checks/binaries/prerequisites/perl/legacy-libbaz/build-spec/debian/compat.in @@ -0,0 +1 @@ +[% $dh_compat_level %] diff --git a/t/recipes/checks/binaries/prerequisites/perl/legacy-libbaz/build-spec/debian/control b/t/recipes/checks/binaries/prerequisites/perl/legacy-libbaz/build-spec/debian/control new file mode 100644 index 0000000..1506687 --- /dev/null +++ b/t/recipes/checks/binaries/prerequisites/perl/legacy-libbaz/build-spec/debian/control @@ -0,0 +1,58 @@ +Source: libbaz +Section: libs +Priority: optional +Maintainer: Lintian Maintainer +Build-depends: debhelper (>=4) +Standards-Version: 3.2.1 + +Package: libbaz1 +Architecture: any +Provides: libbaz +Description: test handling of library packages + Regression test for lintian's handling of libraries. + . + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. + +Package: libbaz1-dev +Architecture: any +Depends: libbaz1 (= ${source:Version}), perlapi-5.8.8 +Description: development package + Regression test for lintian's handling of libraries (dev). + . + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. + +Package: libbaz2 +Architecture: any +Depends: ${shlibs:Depends}, libssl0.9.8 +Description: test handling of library packages (good) + Regression test for lintian's handling of libraries (good). + . + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. + +Package: libbaz2-dev +Architecture: any +Depends: ${shlibs:Depends}, libbaz2 (= ${source:Version}) +Description: development package (good) + Regression test for lintian's handling of libraries (dev good). + . + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. + +Package: libbaz2-dbg +Architecture: any +Depends: libbaz2 (= ${binary:Version}) +Priority: optional +Description: debugging package + Regression test for lintian's handling of libraries (debug). + . + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. + diff --git a/t/recipes/checks/binaries/prerequisites/perl/legacy-libbaz/build-spec/debian/copyright b/t/recipes/checks/binaries/prerequisites/perl/legacy-libbaz/build-spec/debian/copyright new file mode 100644 index 0000000..a874c87 --- /dev/null +++ b/t/recipes/checks/binaries/prerequisites/perl/legacy-libbaz/build-spec/debian/copyright @@ -0,0 +1,8 @@ +This package is released under public domain. This is distributed in the hope +that it will be useful, but without any warranty; without even the implied +warranty of merchantability or fitness for a particular purpose. + +A reference to /usr/share/common-licenses/GPL-2 to make it look like this +package is under the GPL and trigger the OpenSSL warning. + +However, this has an OpenSSL exception. diff --git a/t/recipes/checks/binaries/prerequisites/perl/legacy-libbaz/build-spec/debian/dev.postinst b/t/recipes/checks/binaries/prerequisites/perl/legacy-libbaz/build-spec/debian/dev.postinst new file mode 100644 index 0000000..683e3cc --- /dev/null +++ b/t/recipes/checks/binaries/prerequisites/perl/legacy-libbaz/build-spec/debian/dev.postinst @@ -0,0 +1,4 @@ +#!/bin/sh -e + +$PKG=libbaz1-dev + diff --git a/t/recipes/checks/binaries/prerequisites/perl/legacy-libbaz/build-spec/debian/dev.prerm b/t/recipes/checks/binaries/prerequisites/perl/legacy-libbaz/build-spec/debian/dev.prerm new file mode 100644 index 0000000..683e3cc --- /dev/null +++ b/t/recipes/checks/binaries/prerequisites/perl/legacy-libbaz/build-spec/debian/dev.prerm @@ -0,0 +1,4 @@ +#!/bin/sh -e + +$PKG=libbaz1-dev + diff --git a/t/recipes/checks/binaries/prerequisites/perl/legacy-libbaz/build-spec/debian/lib.postinst b/t/recipes/checks/binaries/prerequisites/perl/legacy-libbaz/build-spec/debian/lib.postinst new file mode 100644 index 0000000..ec0b98a --- /dev/null +++ b/t/recipes/checks/binaries/prerequisites/perl/legacy-libbaz/build-spec/debian/lib.postinst @@ -0,0 +1,10 @@ +#!/bin/sh -e + +$PKG=libbaz1 + +if [ "$1" = "configure" ]; then + if [ -d /usr/doc -a ! -e /usr/doc/$PKG -a -d /usr/share/doc/$PKG ] +; then + ln -sf ../share/doc/$PKG /usr/doc/$PKG + fi +fi diff --git a/t/recipes/checks/binaries/prerequisites/perl/legacy-libbaz/build-spec/debian/lib.prerm b/t/recipes/checks/binaries/prerequisites/perl/legacy-libbaz/build-spec/debian/lib.prerm new file mode 100644 index 0000000..50e37c3 --- /dev/null +++ b/t/recipes/checks/binaries/prerequisites/perl/legacy-libbaz/build-spec/debian/lib.prerm @@ -0,0 +1,7 @@ +#!/bin/sh -e + +$PKG=libbaz1 + +if [ \( "$1" = "upgrade" -o "$1" = "remove" \) -a -L /usr/doc/$PKG ]; then + rm -f /usr/doc/$PKG +fi diff --git a/t/recipes/checks/binaries/prerequisites/perl/legacy-libbaz/build-spec/debian/lib.shlibs b/t/recipes/checks/binaries/prerequisites/perl/legacy-libbaz/build-spec/debian/lib.shlibs new file mode 100644 index 0000000..b88e288 --- /dev/null +++ b/t/recipes/checks/binaries/prerequisites/perl/legacy-libbaz/build-spec/debian/lib.shlibs @@ -0,0 +1,8 @@ +libdoesntexist2 1.0 libbaz1 +libdoesntexist2 1.0 libbaz1 +libbaz2 1.1 libbaz +libbaz3 1 libbaz1 (>> 1-1) +libbaz4 1 libbaz1 (= 1-1) +libbaz5 1 libbaz2 +udeb: libdoesntexist2 1.0 libbaz2 +udeb: libdoesntexist2 1.0 libbaz2 diff --git a/t/recipes/checks/binaries/prerequisites/perl/legacy-libbaz/build-spec/debian/lib.symbols b/t/recipes/checks/binaries/prerequisites/perl/legacy-libbaz/build-spec/debian/lib.symbols new file mode 100644 index 0000000..72f9d8a --- /dev/null +++ b/t/recipes/checks/binaries/prerequisites/perl/legacy-libbaz/build-spec/debian/lib.symbols @@ -0,0 +1,3 @@ +libbaz.so.2 libbaz1 #MINVER# + pw 1-1 + foo 1.1-1 diff --git a/t/recipes/checks/binaries/prerequisites/perl/legacy-libbaz/build-spec/debian/rules b/t/recipes/checks/binaries/prerequisites/perl/legacy-libbaz/build-spec/debian/rules new file mode 100755 index 0000000..fa99bc8 --- /dev/null +++ b/t/recipes/checks/binaries/prerequisites/perl/legacy-libbaz/build-spec/debian/rules @@ -0,0 +1,121 @@ +#!/usr/bin/make -f + +lib_tmp=debian/tmp-lib +dev_tmp=debian/tmp-dev + +LIB=libbaz1 +DEV=libbaz1-dev + +VENDORARCH := $(shell perl -MConfig -wE'say substr($$Config{vendorarch},1)') + +build-arch: + $(MAKE) + +build-indep: + +build: build-arch build-indep + +clean: + $(MAKE) clean + dh_clean -plibbaz2 -plibbaz2-dev + rm -f debian/files debian/substvars + rm -rf $(lib_tmp) $(dev_tmp) + +# Now the correct libbaz2-dev package +binary-correct: + install -d debian/libbaz2-dev/usr/lib + cp -a libbaz2.a libbaz2.so debian/libbaz2-dev/usr/lib + # usually, I'd also include some .h files to /usr/include + + # Now the correct libbaz2 package + install -d debian/libbaz2/usr/lib + cp -a libbaz2.so.* debian/libbaz2/usr/lib + chmod a-x debian/libbaz2/usr/lib/* + + # General stuff that is tested in other testsets: + dh_installdocs -plibbaz2 -plibbaz2-dev -plibbaz2-dbg + dh_compress -plibbaz2 -plibbaz2-dev -plibbaz2-dbg + + # Mess up the libbaz2 changelog files to test the symlink handling. + ln -s /usr/share/doc/lintian/changelog.gz \ + debian/libbaz2/usr/share/doc/libbaz2/changelog.gz + install -m 644 debian/changelog \ + debian/libbaz2-dev/usr/share/doc/libbaz2-dev/foo + ln -s foo debian/libbaz2-dev/usr/share/doc/libbaz2-dev/changelog + + # Okay, if either line is omitted, it should be noted + dh_strip --dbg-package=libbaz2-dbg -plibbaz2 -plibbaz2-dev + dh_makeshlibs -plibbaz2 -plibbaz2-dev -plibbaz2-dbg + dh_shlibdeps -plibbaz2 -plibbaz2-dev -plibbaz2-dbg + + # and again, regular packaging stuff + dh_installdeb -plibbaz2 -plibbaz2-dev -plibbaz2-dbg + echo udeb: libbaz2 1.0 libbaz2 >> debian/libbaz2/DEBIAN/shlibs + dh_gencontrol -plibbaz2 -plibbaz2-dev -plibbaz2-dbg + dh_builddeb -plibbaz2 -plibbaz2-dev -plibbaz2-dbg + +# and the incorrect one +binary-arch: build-arch binary-correct + # first, the lib package + install -d $(lib_tmp)/usr/lib + # resp. no soname (check), wrong soname (check), and no-pic (check) + cp -a libbaz1.so.1.0* $(lib_tmp)/usr/lib + cp -a libbaz2.so.1.0.3b $(lib_tmp)/usr/lib/libfoo2.so.1.0.3b + install -m644 libbaz3.so.1.0.3b $(lib_tmp)/usr/lib/libbaz3.so.1.0.3b + # let's include the .a in the non-dev too (TODO) + # Also, libbaz1.a hasn't a symbol table (TODO) + cp -a *.a $(lib_tmp)/usr/lib + # And a wrong .so symlink (wrong, only in -dev, TODO) + ln -s libfoo3.so.0.9 $(lib_tmp)/usr/lib/libfoo3.so + # And a wrong .so.X symlink (wrong, should point to a real existing + # shlib, TODO) + ln -s libfoo.so.0.9.1 $(lib_tmp)/usr/lib/libfoo.so.0.9 + # And a plain .so (wrong, TODO) + touch $(lib_tmp)/usr/lib/libbar2.so + # And a non-versioned SONAME. + install -m644 libbaz.so $(lib_tmp)/usr/lib/libbaz.so + strip --remove-section=.comment --strip-unneeded $(lib_tmp)/usr/lib/libbaz.so + # Pretend to be a Perl module to test a lack of Perl dependencies. + install -d $(lib_tmp)/$(VENDORARCH)/auto/Foo + install -m 644 libbaz2.so.1.0.3b $(lib_tmp)/$(VENDORARCH)/auto/Foo/Foo.so + strip $(lib_tmp)/$(VENDORARCH)/auto/Foo/Foo.so + + install -d $(lib_tmp)/usr/share/doc/$(LIB) + install -m 644 debian/copyright $(lib_tmp)/usr/share/doc/$(LIB) + install -m 644 debian/changelog $(lib_tmp)/usr/share/doc/$(LIB) + gzip -n -9 $(lib_tmp)/usr/share/doc/$(LIB)/changelog + install -d $(lib_tmp)/DEBIAN + install -m 755 debian/lib.postinst $(lib_tmp)/DEBIAN/postinst + install -m 755 debian/lib.prerm $(lib_tmp)/DEBIAN/prerm + touch $(lib_tmp)/usr/share/doc/README.Debian + #dpkg-shlibdeps $(lib_tmp)/usr/lib/libbaz.so.1.0 + install -m 755 debian/lib.shlibs $(lib_tmp)/DEBIAN/shlibs + install -m 755 debian/lib.symbols $(lib_tmp)/DEBIAN/symbols + dpkg-gencontrol -isp -p$(LIB) -P$(lib_tmp) + dpkg --build $(lib_tmp) .. + + # now the -dev package + install -d $(dev_tmp)/usr/include + install -d $(lib_tmp)/usr/lib + # let's also install the .so at the same time... (wrong, TODO) + cp -a *.a *.so.* $(lib_tmp)/usr/lib + # and fuck up permission (TODO) + chmod a+x $(lib_tmp)/usr/lib/*.a + # Pretend to be a Perl module to test a lack of Perl dependencies. + install -d $(dev_tmp)/$(VENDORARCH)/auto/Foo + install -m 644 libbaz2.so.1.0.3b $(dev_tmp)/$(VENDORARCH)/auto/Foo/Foo.so + strip $(dev_tmp)/$(VENDORARCH)/auto/Foo/Foo.so + install -d $(dev_tmp)/usr/share/doc + ln -s $(LIB) $(dev_tmp)/usr/share/doc/$(DEV) + install -d $(dev_tmp)/DEBIAN + install -m 755 debian/dev.postinst $(dev_tmp)/DEBIAN/postinst + install -m 755 debian/dev.prerm $(dev_tmp)/DEBIAN/prerm + dpkg-gencontrol -isp -p$(DEV) -P$(dev_tmp) + dpkg --build $(dev_tmp) .. + + +binary: binary-arch + +# The mention of binary-indep here should be sufficient to suppress the +# warning that it's not present. +.PHONY: build-arch build-indep build binary-arch binary-indep binary clean diff --git a/t/recipes/checks/binaries/prerequisites/perl/legacy-libbaz/build-spec/debian/source.lintian-overrides b/t/recipes/checks/binaries/prerequisites/perl/legacy-libbaz/build-spec/debian/source.lintian-overrides new file mode 100644 index 0000000..6008d27 --- /dev/null +++ b/t/recipes/checks/binaries/prerequisites/perl/legacy-libbaz/build-spec/debian/source.lintian-overrides @@ -0,0 +1 @@ +libbaz source: maintainer-script-lacks-debhelper-token diff --git a/t/recipes/checks/binaries/prerequisites/perl/legacy-libbaz/build-spec/fill-values b/t/recipes/checks/binaries/prerequisites/perl/legacy-libbaz/build-spec/fill-values new file mode 100644 index 0000000..7effe4f --- /dev/null +++ b/t/recipes/checks/binaries/prerequisites/perl/legacy-libbaz/build-spec/fill-values @@ -0,0 +1,6 @@ +Skeleton: upload-non-native +Testname: legacy-libbaz +Source: libbaz +Version: 1-1 +Default-Build-Depends: debhelper (>= 9.20151004~) +Description: Legacy test "libbaz" diff --git a/t/recipes/checks/binaries/prerequisites/perl/legacy-libbaz/build-spec/orig/Makefile b/t/recipes/checks/binaries/prerequisites/perl/legacy-libbaz/build-spec/orig/Makefile new file mode 100644 index 0000000..657dc2a --- /dev/null +++ b/t/recipes/checks/binaries/prerequisites/perl/legacy-libbaz/build-spec/orig/Makefile @@ -0,0 +1,55 @@ +# This is the correct way to build a lib + +CC=gcc +CFLAGS=-g -Wall -Winline -O2 +LDFLAGS=-Wl,--no-as-needed + +OBJS=baz.o extra.o +SHOBJS=baz.sho extra.sho +NOPICOBJS = $(SHOBJS) + +all: libbaz1.a libbaz2.a libbaz1.so.1.0.3b libbaz2.so libbaz3.so.1.0.3b \ + libbaz.so + +libbaz2.so: libbaz2.so.1.0 + ln -sf $^ $@ +libbaz2.so.1.0: libbaz2.so.1.0.3b + ln -sf $^ $@ + +# Oops, forget the soname altogether +libbaz1.so.1.0.3b: $(NOPICOBJS) + $(CC) $(LDFLAGS) -o $@ -shared $^ -lc + +libbaz2.so.1.0.3b: $(SHOBJS) + $(CC) $(LDFLAGS) -o $@ -shared -Wl,-soname,libbaz2.so.1.0 $^ -lc + +# Non-PIC. We can't test this on all architectures +libbaz3.so.1.0.3b: $(NOPICOBJS) + $(CC) $(LDFLAGS) -o $@ -shared -Wl,-soname,libbaz3.so.1 $^ -lc + +# Non-versioned SONAME. +libbaz.so: $(SHOBJS) + $(CC) $(LDFLAGS) -o $@ -shared -Wl,-soname,libbaz.so $^ -lc + +#%.o-noreentrant: %.c +# $(CC) $(LDFLAGS) $(CFLAGS) -o $@ -c $< + +%.sho: %.c + $(CC) $(LDFLAGS) $(CFLAGS) -D_REENTRANT -fPIC -o $@ -c $< + +%.o: %.c + $(CC) $(LDFLAGS) $(CFLAGS) -D_REENTRANT -o $@ -c $< + +libbaz2.a: $(OBJS) + ar cq $@ $(OBJS) + strip --strip-unneeded --remove-section=.comment \ + --remove-section=-note $@ + ranlib $@ + +# The pic one in the .a (wrong), no archive table +libbaz1.a: $(SHOBJS) + ar cqS $@ $^ + strip --strip-unneeded --remove-section=.comment \ + --remove-section=-note $@ +clean: + rm -f *.a *.o *.so* *.sho diff --git a/t/recipes/checks/binaries/prerequisites/perl/legacy-libbaz/build-spec/orig/baz.c b/t/recipes/checks/binaries/prerequisites/perl/legacy-libbaz/build-spec/orig/baz.c new file mode 100644 index 0000000..4d5fc45 --- /dev/null +++ b/t/recipes/checks/binaries/prerequisites/perl/legacy-libbaz/build-spec/orig/baz.c @@ -0,0 +1,6 @@ +#include + +double pw(double p) +{ + return exp(p); +} diff --git a/t/recipes/checks/binaries/prerequisites/perl/legacy-libbaz/build-spec/orig/extra.c b/t/recipes/checks/binaries/prerequisites/perl/legacy-libbaz/build-spec/orig/extra.c new file mode 100644 index 0000000..e69de29 diff --git a/t/recipes/checks/binaries/prerequisites/perl/legacy-libbaz/eval/desc b/t/recipes/checks/binaries/prerequisites/perl/legacy-libbaz/eval/desc new file mode 100644 index 0000000..0b65f95 --- /dev/null +++ b/t/recipes/checks/binaries/prerequisites/perl/legacy-libbaz/eval/desc @@ -0,0 +1,2 @@ +Testname: legacy-libbaz +Check: binaries/prerequisites/perl diff --git a/t/recipes/checks/binaries/prerequisites/perl/legacy-libbaz/eval/hints b/t/recipes/checks/binaries/prerequisites/perl/legacy-libbaz/eval/hints new file mode 100644 index 0000000..423e913 --- /dev/null +++ b/t/recipes/checks/binaries/prerequisites/perl/legacy-libbaz/eval/hints @@ -0,0 +1 @@ +libbaz1 (binary): missing-dependency-on-perlapi diff --git a/t/recipes/checks/binaries/prerequisites/perl/legacy-libbaz/eval/post-test b/t/recipes/checks/binaries/prerequisites/perl/legacy-libbaz/eval/post-test new file mode 100755 index 0000000..29dc3f4 --- /dev/null +++ b/t/recipes/checks/binaries/prerequisites/perl/legacy-libbaz/eval/post-test @@ -0,0 +1,4 @@ +/: hardening-.*/ d +s/\(current is ([0-9]+\.)+[0-9]\)/(current is CURRENT)/ +s,usr/lib/([^\/]*/)?perl[0-9]*(/[0-9]*\.[0-9]*)?/,usr/lib/ma-dir/perl/version/,g +/: file-references-package-build-path / d diff --git a/t/recipes/checks/binaries/prerequisites/php/binaries-missing-depends-on-xapi/build-spec/debian/rules b/t/recipes/checks/binaries/prerequisites/php/binaries-missing-depends-on-xapi/build-spec/debian/rules new file mode 100644 index 0000000..7b55940 --- /dev/null +++ b/t/recipes/checks/binaries/prerequisites/php/binaries-missing-depends-on-xapi/build-spec/debian/rules @@ -0,0 +1,17 @@ +#!/usr/bin/make -f + +export DEB_BUILD_MAINT_OPTIONS=hardening=+all + +%: + dh $@ + +override_dh_perl: + +override_dh_builddeb: + # Work around debhelper bug (triggers useless call to ldconfig) + rm -f debian/*/DEBIAN/postinst debian/*/DEBIAN/postrm + rm -f debian/*/DEBIAN/triggers + dh_builddeb + +# errors out with: objcopy: '.../binaries-missing-depends-on-xapi.debug': No such file +override_dh_dwz: diff --git a/t/recipes/checks/binaries/prerequisites/php/binaries-missing-depends-on-xapi/build-spec/fill-values b/t/recipes/checks/binaries/prerequisites/php/binaries-missing-depends-on-xapi/build-spec/fill-values new file mode 100644 index 0000000..bf3682a --- /dev/null +++ b/t/recipes/checks/binaries/prerequisites/php/binaries-missing-depends-on-xapi/build-spec/fill-values @@ -0,0 +1,4 @@ +Skeleton: upload-native +Testname: binaries-missing-depends-on-xapi +Description: Test for missing perlapi depends +Package-Architecture: any diff --git a/t/recipes/checks/binaries/prerequisites/php/binaries-missing-depends-on-xapi/build-spec/orig/Makefile b/t/recipes/checks/binaries/prerequisites/php/binaries-missing-depends-on-xapi/build-spec/orig/Makefile new file mode 100644 index 0000000..5c9cbaf --- /dev/null +++ b/t/recipes/checks/binaries/prerequisites/php/binaries-missing-depends-on-xapi/build-spec/orig/Makefile @@ -0,0 +1,16 @@ +all: + gcc $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -fPIC -shared -Wl,-z,defs -Wl,-soname,libbasic.so.2 -o libbasic.so basic.c + +VENDORARCH := $(shell perl -MConfig -wE'say substr($$Config{vendorarch},1)') + +install: + # install it under the correct triplet directory + install -d $(DESTDIR)/$(VENDORARCH) + install -m 644 -c -s libbasic.so $(DESTDIR)/$(VENDORARCH)/libbasic.so + install -d $(DESTDIR)/usr/lib/php5 + install -m 644 -c -s libbasic.so $(DESTDIR)/usr/lib/php5/libbasic.so + +clean distclean: + rm -f libbasic.so.2 + +check test: diff --git a/t/recipes/checks/binaries/prerequisites/php/binaries-missing-depends-on-xapi/build-spec/orig/basic.c b/t/recipes/checks/binaries/prerequisites/php/binaries-missing-depends-on-xapi/build-spec/orig/basic.c new file mode 100644 index 0000000..27e93fc --- /dev/null +++ b/t/recipes/checks/binaries/prerequisites/php/binaries-missing-depends-on-xapi/build-spec/orig/basic.c @@ -0,0 +1,19 @@ +#include +#include + +static void +hardening_trigger(char *p, int i, void (*f)(char *)) +{ + char test[10]; + memcpy(test, p, i); + f(test); + printf("%s", test); +} + +int +lib_interface(void) +{ + printf("Hello world!\n"); + hardening_trigger(NULL, 0, NULL); + return 0; +} diff --git a/t/recipes/checks/binaries/prerequisites/php/binaries-missing-depends-on-xapi/eval/desc b/t/recipes/checks/binaries/prerequisites/php/binaries-missing-depends-on-xapi/eval/desc new file mode 100644 index 0000000..1f5f111 --- /dev/null +++ b/t/recipes/checks/binaries/prerequisites/php/binaries-missing-depends-on-xapi/eval/desc @@ -0,0 +1,2 @@ +Testname: binaries-missing-depends-on-xapi +Check: binaries/prerequisites/php diff --git a/t/recipes/checks/binaries/prerequisites/php/binaries-missing-depends-on-xapi/eval/hints b/t/recipes/checks/binaries/prerequisites/php/binaries-missing-depends-on-xapi/eval/hints new file mode 100644 index 0000000..0791fd8 --- /dev/null +++ b/t/recipes/checks/binaries/prerequisites/php/binaries-missing-depends-on-xapi/eval/hints @@ -0,0 +1 @@ +binaries-missing-depends-on-xapi (binary): missing-dependency-on-phpapi diff --git a/t/recipes/checks/binaries/prerequisites/wrong-binary-architecture/build-spec/debian/install b/t/recipes/checks/binaries/prerequisites/wrong-binary-architecture/build-spec/debian/install new file mode 100644 index 0000000..c10e578 --- /dev/null +++ b/t/recipes/checks/binaries/prerequisites/wrong-binary-architecture/build-spec/debian/install @@ -0,0 +1 @@ +foreign-binary usr/bin diff --git a/t/recipes/checks/binaries/prerequisites/wrong-binary-architecture/build-spec/debian/rules b/t/recipes/checks/binaries/prerequisites/wrong-binary-architecture/build-spec/debian/rules new file mode 100755 index 0000000..2ce6f53 --- /dev/null +++ b/t/recipes/checks/binaries/prerequisites/wrong-binary-architecture/build-spec/debian/rules @@ -0,0 +1,22 @@ +#!/usr/bin/make -f + +export DEB_BUILD_MAINT_OPTIONS=hardening=+all + +%: + dh $@ + +override_dh_strip: + # do not try to strip cross-compiled binaries with native tooling + +override_dh_shlibdeps: + # do not try to include missing libraries + +override_dh_dwz: + # cross-compiled binaries do not always seem to have a debug section + +# In Ubuntu, dh does not catch this file by default. +# They have diffed it to reduce the size of packages. +ifneq (,$(strip $(wildcard Changes))) +override_dh_installchangelogs: + dh_installchangelogs Changes +endif diff --git a/t/recipes/checks/binaries/prerequisites/wrong-binary-architecture/build-spec/fill-values b/t/recipes/checks/binaries/prerequisites/wrong-binary-architecture/build-spec/fill-values new file mode 100644 index 0000000..24f607a --- /dev/null +++ b/t/recipes/checks/binaries/prerequisites/wrong-binary-architecture/build-spec/fill-values @@ -0,0 +1,6 @@ +Skeleton: upload-native +Testname: wrong-binary-architecture +Description: Binary architecture does not match package declaration +Package-Architecture: any +Extra-Build-Depends: + gcc-arm-linux-gnueabihf [amd64 i386], gcc-x86-64-linux-gnu [!amd64 !i386] diff --git a/t/recipes/checks/binaries/prerequisites/wrong-binary-architecture/build-spec/orig/Makefile b/t/recipes/checks/binaries/prerequisites/wrong-binary-architecture/build-spec/orig/Makefile new file mode 100644 index 0000000..bf92eaf --- /dev/null +++ b/t/recipes/checks/binaries/prerequisites/wrong-binary-architecture/build-spec/orig/Makefile @@ -0,0 +1,37 @@ +# This test works on amd64 when the cross-compiler for armhf is installed. +# +# The build prerequisite was not added to Lintian, however, since it was +# not clear how the architecture would be enabled in the Gitlab CI +# runner. +# +# On amd64 or i386, please follow these steps to run the test: +# +# dpkg --add-architecture armhf +# apt update +# apt install gcc-arm-linux-gnueabihf +# +# On all other architectures this may work, but was not tested: +# +# dpkg --add-architecture amd64 +# apt update +# apt install gcc-x86-64-linux-gnu +# +# (Taken from: https://wiki.debian.org/CrossToolchains) + +ARCH := $(shell dpkg-architecture -qDEB_HOST_ARCH) + +ifeq ($(ARCH),amd64) +CC := arm-linux-gnueabihf-gcc +else +CC := x86_64-linux-gnu-gcc +endif + +foreign-binary: hello.c + $(CC) $^ -o $@ + +.PHONY: clean +clean: + rm -f foreign-binary + +.PHONY: clean +distclean: clean diff --git a/t/recipes/checks/binaries/prerequisites/wrong-binary-architecture/build-spec/orig/hello.c b/t/recipes/checks/binaries/prerequisites/wrong-binary-architecture/build-spec/orig/hello.c new file mode 100644 index 0000000..2fb04e1 --- /dev/null +++ b/t/recipes/checks/binaries/prerequisites/wrong-binary-architecture/build-spec/orig/hello.c @@ -0,0 +1,8 @@ +#include +#include + +int main(int argc, char *argv[]) { + + printf("Hello, World!\n"); + exit(0); +} diff --git a/t/recipes/checks/binaries/prerequisites/wrong-binary-architecture/eval/desc b/t/recipes/checks/binaries/prerequisites/wrong-binary-architecture/eval/desc new file mode 100644 index 0000000..5c454dc --- /dev/null +++ b/t/recipes/checks/binaries/prerequisites/wrong-binary-architecture/eval/desc @@ -0,0 +1,2 @@ +Testname: wrong-binary-architecture +Check: binaries/prerequisites diff --git a/t/recipes/checks/binaries/prerequisites/wrong-binary-architecture/eval/hints b/t/recipes/checks/binaries/prerequisites/wrong-binary-architecture/eval/hints new file mode 100644 index 0000000..d0ee0e7 --- /dev/null +++ b/t/recipes/checks/binaries/prerequisites/wrong-binary-architecture/eval/hints @@ -0,0 +1 @@ +wrong-binary-architecture (binary): undeclared-elf-prerequisites (libc.so.6) [usr/bin/foreign-binary] diff --git a/t/recipes/checks/binaries/profiling/binaries-general/build-spec/debian/rules b/t/recipes/checks/binaries/profiling/binaries-general/build-spec/debian/rules new file mode 100644 index 0000000..3ea7a63 --- /dev/null +++ b/t/recipes/checks/binaries/profiling/binaries-general/build-spec/debian/rules @@ -0,0 +1,12 @@ +#!/usr/bin/make -f + +export DEB_BUILD_MAINT_OPTIONS=hardening=+all + +%: + dh $@ + +override_dh_strip: + dh_strip -X usr/lib/debug -X unstripped -X ocaml + +override_dh_dwz: + # Can error with "deadbeefdeadbeef.debug: Found compressed .debug_info section, not attempting dwz compression" diff --git a/t/recipes/checks/binaries/profiling/binaries-general/build-spec/fill-values b/t/recipes/checks/binaries/profiling/binaries-general/build-spec/fill-values new file mode 100644 index 0000000..a24247d --- /dev/null +++ b/t/recipes/checks/binaries/profiling/binaries-general/build-spec/fill-values @@ -0,0 +1,4 @@ +Skeleton: upload-native +Testname: binaries-general +Description: Misc errors related to binaries +Package-Architecture: any diff --git a/t/recipes/checks/binaries/profiling/binaries-general/build-spec/orig/Makefile b/t/recipes/checks/binaries/profiling/binaries-general/build-spec/orig/Makefile new file mode 100644 index 0000000..cf0f211 --- /dev/null +++ b/t/recipes/checks/binaries/profiling/binaries-general/build-spec/orig/Makefile @@ -0,0 +1,64 @@ +# turn off PIE in CC in case we have a PIEful toolchain: +ifneq ($(findstring -no-pie,$(shell gcc -no-pie 2>&1)),) + CC := gcc +else + CC := gcc -fno-pie -no-pie +endif + +NOPIE_CFLAGS = $(filter-out -fPIE,$(CFLAGS)) +NOPIE_LDFLAGS = $(filter-out -fPIE -pie,$(LDFLAGS)) +COMPILE:= $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) +COMPILE_NOPIE:= $(CC) $(NOPIE_CFLAGS) $(CPPFLAGS) $(NOPIE_LDFLAGS) +# extract from readelf +GETBUILDID:=./getbuildid + +all: + # rpath not matching any of the exceptions to the rpath checks + # - with profiling enabled. + $(COMPILE_NOPIE) -o basic basic.c -pg -Wl,--rpath,/usr/local/lib + # rpath shipped in the package, but one of {/usr}?/lib + $(COMPILE) -o basiclibrpath basic.c -Wl,--rpath,/usr/lib + # non-special rpath shipped in the package + $(COMPILE) -o basicshippedrpath basic.c -Wl,--rpath,/usr/share/foo + # special rpath shipped in the package, multiple paths + $(COMPILE) -o basicshippedrpathmore basic.c -Wl,--rpath,/usr/lib/binaries-general:/usr/lib/binaries-general/bar + # static version of basic for debugging checks + $(COMPILE_NOPIE) -static -o basic.static basic.c + # static executable to trigger ocaml check + $(COMPILE_NOPIE) -o ocaml-exec ocaml.c + # version with debug + $(COMPILE) -o basicdebug -g3 -Wl,--build-id basic.c + +install: + # according to local debian rules /usr/lib/debug is unstripped + install -d $(DESTDIR)/usr/share/foo/ + install -d $(DESTDIR)/usr/lib/debug/usr/share/foo/ + install -d $(DESTDIR)/usr/lib/foo/ + install -d $(DESTDIR)/usr/bin + + install -m 755 -c basic $(DESTDIR)/usr/share/foo/basic + objcopy --only-keep-debug basic $(DESTDIR)/usr/lib/debug/usr/share/foo/basic + strip -s $(DESTDIR)/usr/lib/debug/usr/share/foo/basic + install -m 755 -c basiclibrpath $(DESTDIR)/usr/lib/foo/basiclibrpath + install -m 755 -c basicshippedrpath $(DESTDIR)/usr/lib/foo/basicshippedrpath + install -m 755 -c ocaml-exec $(DESTDIR)/usr/lib/foo/ocaml-exec + install -m 744 -c basicshippedrpathmore $(DESTDIR)/usr/lib/foo/basicshippedrpathmore + objcopy --only-keep-debug basic $(DESTDIR)/usr/lib/debug/basic + install -d "$(DESTDIR)/usr/lib/debug/.build-id/"`$(GETBUILDID) -s basicdebug` + install -m 755 -c basicdebug $(DESTDIR)/usr/share/foo/basicdebug + # force fake buildid in order to have tag matching ok (deadbeefdeadbeef) + install -d "$(DESTDIR)/usr/lib/debug/.build-id/de" + objcopy --compress-debug-sections basicdebug \ + "$(DESTDIR)/usr/lib/debug/.build-id/de/deadbeefdeadbeef.debug" + install -d "$(DESTDIR)/usr/lib/debug/.build-id/"`$(GETBUILDID) -s basicdebug` + objcopy --compress-debug-sections --only-keep-debug basicdebug \ + "$(DESTDIR)/usr/lib/debug/.build-id/"`$(GETBUILDID) -s basicdebug`"/"`$(GETBUILDID) -f basicdebug`.debug + install -m 755 -c basic.static $(DESTDIR)/usr/lib/debug/ + # according to local debian rules unstripped in name avoid dh_strip to do the work + install -m 755 basicdebug $(DESTDIR)/usr/bin/unstripped + install -m 755 basic.static $(DESTDIR)/usr/bin/static + +clean distclean: + rm -f basic + +check test: diff --git a/t/recipes/checks/binaries/profiling/binaries-general/build-spec/orig/basic.c b/t/recipes/checks/binaries/profiling/binaries-general/build-spec/orig/basic.c new file mode 100644 index 0000000..3618004 --- /dev/null +++ b/t/recipes/checks/binaries/profiling/binaries-general/build-spec/orig/basic.c @@ -0,0 +1,12 @@ +#include +#include + +int +main(int argc, char *argv[]) +{ + char t[10]; + printf("Hello world!\n"); + /* forces a stack protector */ + (void) strcpy(t,argv[0]); + return (int) t[0]; +} diff --git a/t/recipes/checks/binaries/profiling/binaries-general/build-spec/orig/getbuildid b/t/recipes/checks/binaries/profiling/binaries-general/build-spec/orig/getbuildid new file mode 100755 index 0000000..0060d2b --- /dev/null +++ b/t/recipes/checks/binaries/profiling/binaries-general/build-spec/orig/getbuildid @@ -0,0 +1,30 @@ +#!/bin/sh +# get build-id of binary + +set -e + +usage() { + echo "Usage: getbuildid [flag] file"; + echo " print build-id of an object file" + echo "flags:" + echo " -f : full build-id (default)." + echo " -s : short build-id aka the first two characters." +} + +if test $# -lt 1; then usage; exit 77; fi +if test $# -gt 3; then usage; exit 77; fi + +if test $# -eq 1; then + LC_ALL=C readelf -n "$1" | grep -i 'Build Id:' | sed 's/.*:[[:blank:]]*\([[:digit:]|abcdef]*\).*/\1/g' +else + case "x$1" in + 'x-f') + LC_ALL=C readelf -n "$2" | grep -i 'Build Id:' | sed 's/.*:[[:blank:]]*\([[:digit:]|abcdef]*\).*/\1/g' ;; + 'x-s') + LC_ALL=C readelf -n "$2" | grep -i 'Build Id:' | sed 's/.*:[[:blank:]]*\([[:digit:]|abcdef]\{2\}\).*/\1/g' ;; + *) + exit 2; + esac +fi + +exit 0; diff --git a/t/recipes/checks/binaries/profiling/binaries-general/build-spec/orig/ocaml.c b/t/recipes/checks/binaries/profiling/binaries-general/build-spec/orig/ocaml.c new file mode 100644 index 0000000..370d17d --- /dev/null +++ b/t/recipes/checks/binaries/profiling/binaries-general/build-spec/orig/ocaml.c @@ -0,0 +1,11 @@ +#include + +int +main(int argc, char **argv) +{ + if (argc > 2) { + puts("Caml1999X000"); + } + puts("\n"); + return 0; +} diff --git a/t/recipes/checks/binaries/profiling/binaries-general/eval/desc b/t/recipes/checks/binaries/profiling/binaries-general/eval/desc new file mode 100644 index 0000000..8bbea38 --- /dev/null +++ b/t/recipes/checks/binaries/profiling/binaries-general/eval/desc @@ -0,0 +1,2 @@ +Testname: binaries-general +Check: binaries/profiling diff --git a/t/recipes/checks/binaries/profiling/binaries-general/eval/hints b/t/recipes/checks/binaries/profiling/binaries-general/eval/hints new file mode 100644 index 0000000..c85e300 --- /dev/null +++ b/t/recipes/checks/binaries/profiling/binaries-general/eval/hints @@ -0,0 +1 @@ +binaries-general (binary): binary-compiled-with-profiling-enabled [usr/share/foo/basic] diff --git a/t/recipes/checks/binaries/profiling/binaries-general/eval/post-test b/t/recipes/checks/binaries/profiling/binaries-general/eval/post-test new file mode 100755 index 0000000..11ad2c8 --- /dev/null +++ b/t/recipes/checks/binaries/profiling/binaries-general/eval/post-test @@ -0,0 +1 @@ +/: hardening-.*/ d diff --git a/t/recipes/checks/binaries/rpath/binaries-general/build-spec/debian/rules b/t/recipes/checks/binaries/rpath/binaries-general/build-spec/debian/rules new file mode 100644 index 0000000..3ea7a63 --- /dev/null +++ b/t/recipes/checks/binaries/rpath/binaries-general/build-spec/debian/rules @@ -0,0 +1,12 @@ +#!/usr/bin/make -f + +export DEB_BUILD_MAINT_OPTIONS=hardening=+all + +%: + dh $@ + +override_dh_strip: + dh_strip -X usr/lib/debug -X unstripped -X ocaml + +override_dh_dwz: + # Can error with "deadbeefdeadbeef.debug: Found compressed .debug_info section, not attempting dwz compression" diff --git a/t/recipes/checks/binaries/rpath/binaries-general/build-spec/fill-values b/t/recipes/checks/binaries/rpath/binaries-general/build-spec/fill-values new file mode 100644 index 0000000..a24247d --- /dev/null +++ b/t/recipes/checks/binaries/rpath/binaries-general/build-spec/fill-values @@ -0,0 +1,4 @@ +Skeleton: upload-native +Testname: binaries-general +Description: Misc errors related to binaries +Package-Architecture: any diff --git a/t/recipes/checks/binaries/rpath/binaries-general/build-spec/orig/Makefile b/t/recipes/checks/binaries/rpath/binaries-general/build-spec/orig/Makefile new file mode 100644 index 0000000..cf0f211 --- /dev/null +++ b/t/recipes/checks/binaries/rpath/binaries-general/build-spec/orig/Makefile @@ -0,0 +1,64 @@ +# turn off PIE in CC in case we have a PIEful toolchain: +ifneq ($(findstring -no-pie,$(shell gcc -no-pie 2>&1)),) + CC := gcc +else + CC := gcc -fno-pie -no-pie +endif + +NOPIE_CFLAGS = $(filter-out -fPIE,$(CFLAGS)) +NOPIE_LDFLAGS = $(filter-out -fPIE -pie,$(LDFLAGS)) +COMPILE:= $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) +COMPILE_NOPIE:= $(CC) $(NOPIE_CFLAGS) $(CPPFLAGS) $(NOPIE_LDFLAGS) +# extract from readelf +GETBUILDID:=./getbuildid + +all: + # rpath not matching any of the exceptions to the rpath checks + # - with profiling enabled. + $(COMPILE_NOPIE) -o basic basic.c -pg -Wl,--rpath,/usr/local/lib + # rpath shipped in the package, but one of {/usr}?/lib + $(COMPILE) -o basiclibrpath basic.c -Wl,--rpath,/usr/lib + # non-special rpath shipped in the package + $(COMPILE) -o basicshippedrpath basic.c -Wl,--rpath,/usr/share/foo + # special rpath shipped in the package, multiple paths + $(COMPILE) -o basicshippedrpathmore basic.c -Wl,--rpath,/usr/lib/binaries-general:/usr/lib/binaries-general/bar + # static version of basic for debugging checks + $(COMPILE_NOPIE) -static -o basic.static basic.c + # static executable to trigger ocaml check + $(COMPILE_NOPIE) -o ocaml-exec ocaml.c + # version with debug + $(COMPILE) -o basicdebug -g3 -Wl,--build-id basic.c + +install: + # according to local debian rules /usr/lib/debug is unstripped + install -d $(DESTDIR)/usr/share/foo/ + install -d $(DESTDIR)/usr/lib/debug/usr/share/foo/ + install -d $(DESTDIR)/usr/lib/foo/ + install -d $(DESTDIR)/usr/bin + + install -m 755 -c basic $(DESTDIR)/usr/share/foo/basic + objcopy --only-keep-debug basic $(DESTDIR)/usr/lib/debug/usr/share/foo/basic + strip -s $(DESTDIR)/usr/lib/debug/usr/share/foo/basic + install -m 755 -c basiclibrpath $(DESTDIR)/usr/lib/foo/basiclibrpath + install -m 755 -c basicshippedrpath $(DESTDIR)/usr/lib/foo/basicshippedrpath + install -m 755 -c ocaml-exec $(DESTDIR)/usr/lib/foo/ocaml-exec + install -m 744 -c basicshippedrpathmore $(DESTDIR)/usr/lib/foo/basicshippedrpathmore + objcopy --only-keep-debug basic $(DESTDIR)/usr/lib/debug/basic + install -d "$(DESTDIR)/usr/lib/debug/.build-id/"`$(GETBUILDID) -s basicdebug` + install -m 755 -c basicdebug $(DESTDIR)/usr/share/foo/basicdebug + # force fake buildid in order to have tag matching ok (deadbeefdeadbeef) + install -d "$(DESTDIR)/usr/lib/debug/.build-id/de" + objcopy --compress-debug-sections basicdebug \ + "$(DESTDIR)/usr/lib/debug/.build-id/de/deadbeefdeadbeef.debug" + install -d "$(DESTDIR)/usr/lib/debug/.build-id/"`$(GETBUILDID) -s basicdebug` + objcopy --compress-debug-sections --only-keep-debug basicdebug \ + "$(DESTDIR)/usr/lib/debug/.build-id/"`$(GETBUILDID) -s basicdebug`"/"`$(GETBUILDID) -f basicdebug`.debug + install -m 755 -c basic.static $(DESTDIR)/usr/lib/debug/ + # according to local debian rules unstripped in name avoid dh_strip to do the work + install -m 755 basicdebug $(DESTDIR)/usr/bin/unstripped + install -m 755 basic.static $(DESTDIR)/usr/bin/static + +clean distclean: + rm -f basic + +check test: diff --git a/t/recipes/checks/binaries/rpath/binaries-general/build-spec/orig/basic.c b/t/recipes/checks/binaries/rpath/binaries-general/build-spec/orig/basic.c new file mode 100644 index 0000000..3618004 --- /dev/null +++ b/t/recipes/checks/binaries/rpath/binaries-general/build-spec/orig/basic.c @@ -0,0 +1,12 @@ +#include +#include + +int +main(int argc, char *argv[]) +{ + char t[10]; + printf("Hello world!\n"); + /* forces a stack protector */ + (void) strcpy(t,argv[0]); + return (int) t[0]; +} diff --git a/t/recipes/checks/binaries/rpath/binaries-general/build-spec/orig/getbuildid b/t/recipes/checks/binaries/rpath/binaries-general/build-spec/orig/getbuildid new file mode 100755 index 0000000..0060d2b --- /dev/null +++ b/t/recipes/checks/binaries/rpath/binaries-general/build-spec/orig/getbuildid @@ -0,0 +1,30 @@ +#!/bin/sh +# get build-id of binary + +set -e + +usage() { + echo "Usage: getbuildid [flag] file"; + echo " print build-id of an object file" + echo "flags:" + echo " -f : full build-id (default)." + echo " -s : short build-id aka the first two characters." +} + +if test $# -lt 1; then usage; exit 77; fi +if test $# -gt 3; then usage; exit 77; fi + +if test $# -eq 1; then + LC_ALL=C readelf -n "$1" | grep -i 'Build Id:' | sed 's/.*:[[:blank:]]*\([[:digit:]|abcdef]*\).*/\1/g' +else + case "x$1" in + 'x-f') + LC_ALL=C readelf -n "$2" | grep -i 'Build Id:' | sed 's/.*:[[:blank:]]*\([[:digit:]|abcdef]*\).*/\1/g' ;; + 'x-s') + LC_ALL=C readelf -n "$2" | grep -i 'Build Id:' | sed 's/.*:[[:blank:]]*\([[:digit:]|abcdef]\{2\}\).*/\1/g' ;; + *) + exit 2; + esac +fi + +exit 0; diff --git a/t/recipes/checks/binaries/rpath/binaries-general/build-spec/orig/ocaml.c b/t/recipes/checks/binaries/rpath/binaries-general/build-spec/orig/ocaml.c new file mode 100644 index 0000000..370d17d --- /dev/null +++ b/t/recipes/checks/binaries/rpath/binaries-general/build-spec/orig/ocaml.c @@ -0,0 +1,11 @@ +#include + +int +main(int argc, char **argv) +{ + if (argc > 2) { + puts("Caml1999X000"); + } + puts("\n"); + return 0; +} diff --git a/t/recipes/checks/binaries/rpath/binaries-general/eval/desc b/t/recipes/checks/binaries/rpath/binaries-general/eval/desc new file mode 100644 index 0000000..6e7e185 --- /dev/null +++ b/t/recipes/checks/binaries/rpath/binaries-general/eval/desc @@ -0,0 +1,2 @@ +Testname: binaries-general +Check: binaries/rpath diff --git a/t/recipes/checks/binaries/rpath/binaries-general/eval/hints b/t/recipes/checks/binaries/rpath/binaries-general/eval/hints new file mode 100644 index 0000000..367a9a3 --- /dev/null +++ b/t/recipes/checks/binaries/rpath/binaries-general/eval/hints @@ -0,0 +1,3 @@ +binaries-general (binary): custom-library-search-path RUNPATH /usr/share/foo [usr/lib/foo/basicshippedrpath] +binaries-general (binary): custom-library-search-path RUNPATH /usr/local/lib [usr/share/foo/basic] +binaries-general (binary): custom-library-search-path RUNPATH /usr/lib [usr/lib/foo/basiclibrpath] diff --git a/t/recipes/checks/binaries/rpath/binaries-general/eval/post-test b/t/recipes/checks/binaries/rpath/binaries-general/eval/post-test new file mode 100755 index 0000000..11ad2c8 --- /dev/null +++ b/t/recipes/checks/binaries/rpath/binaries-general/eval/post-test @@ -0,0 +1 @@ +/: hardening-.*/ d diff --git a/t/recipes/checks/binaries/rpath/quoted/build-spec/debian/rules b/t/recipes/checks/binaries/rpath/quoted/build-spec/debian/rules new file mode 100644 index 0000000..3ea7a63 --- /dev/null +++ b/t/recipes/checks/binaries/rpath/quoted/build-spec/debian/rules @@ -0,0 +1,12 @@ +#!/usr/bin/make -f + +export DEB_BUILD_MAINT_OPTIONS=hardening=+all + +%: + dh $@ + +override_dh_strip: + dh_strip -X usr/lib/debug -X unstripped -X ocaml + +override_dh_dwz: + # Can error with "deadbeefdeadbeef.debug: Found compressed .debug_info section, not attempting dwz compression" diff --git a/t/recipes/checks/binaries/rpath/quoted/build-spec/fill-values b/t/recipes/checks/binaries/rpath/quoted/build-spec/fill-values new file mode 100644 index 0000000..e5a7a3e --- /dev/null +++ b/t/recipes/checks/binaries/rpath/quoted/build-spec/fill-values @@ -0,0 +1,4 @@ +Skeleton: upload-native +Testname: quoted +Description: RPATH in double quotes +Package-Architecture: any diff --git a/t/recipes/checks/binaries/rpath/quoted/build-spec/orig/Makefile b/t/recipes/checks/binaries/rpath/quoted/build-spec/orig/Makefile new file mode 100644 index 0000000..f2eed80 --- /dev/null +++ b/t/recipes/checks/binaries/rpath/quoted/build-spec/orig/Makefile @@ -0,0 +1,64 @@ +# turn off PIE in CC in case we have a PIEful toolchain: +ifneq ($(findstring -no-pie,$(shell gcc -no-pie 2>&1)),) + CC := gcc +else + CC := gcc -fno-pie -no-pie +endif + +NOPIE_CFLAGS = $(filter-out -fPIE,$(CFLAGS)) +NOPIE_LDFLAGS = $(filter-out -fPIE -pie,$(LDFLAGS)) +COMPILE:= $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) +COMPILE_NOPIE:= $(CC) $(NOPIE_CFLAGS) $(CPPFLAGS) $(NOPIE_LDFLAGS) +# extract from readelf +GETBUILDID:=./getbuildid + +all: + # rpath not matching any of the exceptions to the rpath checks + # - with profiling enabled. + $(COMPILE_NOPIE) -o basic basic.c -pg -Wl,--rpath,\"/usr/local/lib\" + # rpath shipped in the package, but one of {/usr}?/lib + $(COMPILE) -o basiclibrpath basic.c -Wl,--rpath,\"/usr/lib\" + # non-special rpath shipped in the package + $(COMPILE) -o basicshippedrpath basic.c -Wl,--rpath,\"/usr/share/foo\" + # special rpath shipped in the package, multiple paths + $(COMPILE) -o basicshippedrpathmore basic.c -Wl,--rpath,\"/usr/lib/binaries-general\":\"/usr/lib/binaries-general/bar\" + # static version of basic for debugging checks + $(COMPILE_NOPIE) -static -o basic.static basic.c + # static executable to trigger ocaml check + $(COMPILE_NOPIE) -o ocaml-exec ocaml.c + # version with debug + $(COMPILE) -o basicdebug -g3 -Wl,--build-id basic.c + +install: + # according to local debian rules /usr/lib/debug is unstripped + install -d $(DESTDIR)/usr/share/foo/ + install -d $(DESTDIR)/usr/lib/debug/usr/share/foo/ + install -d $(DESTDIR)/usr/lib/foo/ + install -d $(DESTDIR)/usr/bin + + install -m 755 -c basic $(DESTDIR)/usr/share/foo/basic + objcopy --only-keep-debug basic $(DESTDIR)/usr/lib/debug/usr/share/foo/basic + strip -s $(DESTDIR)/usr/lib/debug/usr/share/foo/basic + install -m 755 -c basiclibrpath $(DESTDIR)/usr/lib/foo/basiclibrpath + install -m 755 -c basicshippedrpath $(DESTDIR)/usr/lib/foo/basicshippedrpath + install -m 755 -c ocaml-exec $(DESTDIR)/usr/lib/foo/ocaml-exec + install -m 744 -c basicshippedrpathmore $(DESTDIR)/usr/lib/foo/basicshippedrpathmore + objcopy --only-keep-debug basic $(DESTDIR)/usr/lib/debug/basic + install -d "$(DESTDIR)/usr/lib/debug/.build-id/"`$(GETBUILDID) -s basicdebug` + install -m 755 -c basicdebug $(DESTDIR)/usr/share/foo/basicdebug + # force fake buildid in order to have tag matching ok (deadbeefdeadbeef) + install -d "$(DESTDIR)/usr/lib/debug/.build-id/de" + objcopy --compress-debug-sections basicdebug \ + "$(DESTDIR)/usr/lib/debug/.build-id/de/deadbeefdeadbeef.debug" + install -d "$(DESTDIR)/usr/lib/debug/.build-id/"`$(GETBUILDID) -s basicdebug` + objcopy --compress-debug-sections --only-keep-debug basicdebug \ + "$(DESTDIR)/usr/lib/debug/.build-id/"`$(GETBUILDID) -s basicdebug`"/"`$(GETBUILDID) -f basicdebug`.debug + install -m 755 -c basic.static $(DESTDIR)/usr/lib/debug/ + # according to local debian rules unstripped in name avoid dh_strip to do the work + install -m 755 basicdebug $(DESTDIR)/usr/bin/unstripped + install -m 755 basic.static $(DESTDIR)/usr/bin/static + +clean distclean: + rm -f basic + +check test: diff --git a/t/recipes/checks/binaries/rpath/quoted/build-spec/orig/basic.c b/t/recipes/checks/binaries/rpath/quoted/build-spec/orig/basic.c new file mode 100644 index 0000000..3618004 --- /dev/null +++ b/t/recipes/checks/binaries/rpath/quoted/build-spec/orig/basic.c @@ -0,0 +1,12 @@ +#include +#include + +int +main(int argc, char *argv[]) +{ + char t[10]; + printf("Hello world!\n"); + /* forces a stack protector */ + (void) strcpy(t,argv[0]); + return (int) t[0]; +} diff --git a/t/recipes/checks/binaries/rpath/quoted/build-spec/orig/getbuildid b/t/recipes/checks/binaries/rpath/quoted/build-spec/orig/getbuildid new file mode 100755 index 0000000..0060d2b --- /dev/null +++ b/t/recipes/checks/binaries/rpath/quoted/build-spec/orig/getbuildid @@ -0,0 +1,30 @@ +#!/bin/sh +# get build-id of binary + +set -e + +usage() { + echo "Usage: getbuildid [flag] file"; + echo " print build-id of an object file" + echo "flags:" + echo " -f : full build-id (default)." + echo " -s : short build-id aka the first two characters." +} + +if test $# -lt 1; then usage; exit 77; fi +if test $# -gt 3; then usage; exit 77; fi + +if test $# -eq 1; then + LC_ALL=C readelf -n "$1" | grep -i 'Build Id:' | sed 's/.*:[[:blank:]]*\([[:digit:]|abcdef]*\).*/\1/g' +else + case "x$1" in + 'x-f') + LC_ALL=C readelf -n "$2" | grep -i 'Build Id:' | sed 's/.*:[[:blank:]]*\([[:digit:]|abcdef]*\).*/\1/g' ;; + 'x-s') + LC_ALL=C readelf -n "$2" | grep -i 'Build Id:' | sed 's/.*:[[:blank:]]*\([[:digit:]|abcdef]\{2\}\).*/\1/g' ;; + *) + exit 2; + esac +fi + +exit 0; diff --git a/t/recipes/checks/binaries/rpath/quoted/build-spec/orig/ocaml.c b/t/recipes/checks/binaries/rpath/quoted/build-spec/orig/ocaml.c new file mode 100644 index 0000000..370d17d --- /dev/null +++ b/t/recipes/checks/binaries/rpath/quoted/build-spec/orig/ocaml.c @@ -0,0 +1,11 @@ +#include + +int +main(int argc, char **argv) +{ + if (argc > 2) { + puts("Caml1999X000"); + } + puts("\n"); + return 0; +} diff --git a/t/recipes/checks/binaries/rpath/quoted/eval/desc b/t/recipes/checks/binaries/rpath/quoted/eval/desc new file mode 100644 index 0000000..64ca820 --- /dev/null +++ b/t/recipes/checks/binaries/rpath/quoted/eval/desc @@ -0,0 +1,2 @@ +Testname: quoted +Check: binaries/rpath diff --git a/t/recipes/checks/binaries/rpath/quoted/eval/hints b/t/recipes/checks/binaries/rpath/quoted/eval/hints new file mode 100644 index 0000000..074ceeb --- /dev/null +++ b/t/recipes/checks/binaries/rpath/quoted/eval/hints @@ -0,0 +1,5 @@ +quoted (binary): relative-library-search-path RUNPATH "/usr/share/foo" [usr/lib/foo/basicshippedrpath] +quoted (binary): relative-library-search-path RUNPATH "/usr/local/lib" [usr/share/foo/basic] +quoted (binary): relative-library-search-path RUNPATH "/usr/lib/binaries-general/bar" [usr/lib/foo/basicshippedrpathmore] +quoted (binary): relative-library-search-path RUNPATH "/usr/lib/binaries-general" [usr/lib/foo/basicshippedrpathmore] +quoted (binary): relative-library-search-path RUNPATH "/usr/lib" [usr/lib/foo/basiclibrpath] diff --git a/t/recipes/checks/binaries/rpath/quoted/eval/post-test b/t/recipes/checks/binaries/rpath/quoted/eval/post-test new file mode 100755 index 0000000..11ad2c8 --- /dev/null +++ b/t/recipes/checks/binaries/rpath/quoted/eval/post-test @@ -0,0 +1 @@ +/: hardening-.*/ d diff --git a/t/recipes/checks/binaries/rpath/relative/build-spec/debian/rules b/t/recipes/checks/binaries/rpath/relative/build-spec/debian/rules new file mode 100644 index 0000000..3ea7a63 --- /dev/null +++ b/t/recipes/checks/binaries/rpath/relative/build-spec/debian/rules @@ -0,0 +1,12 @@ +#!/usr/bin/make -f + +export DEB_BUILD_MAINT_OPTIONS=hardening=+all + +%: + dh $@ + +override_dh_strip: + dh_strip -X usr/lib/debug -X unstripped -X ocaml + +override_dh_dwz: + # Can error with "deadbeefdeadbeef.debug: Found compressed .debug_info section, not attempting dwz compression" diff --git a/t/recipes/checks/binaries/rpath/relative/build-spec/fill-values b/t/recipes/checks/binaries/rpath/relative/build-spec/fill-values new file mode 100644 index 0000000..9d8fdc2 --- /dev/null +++ b/t/recipes/checks/binaries/rpath/relative/build-spec/fill-values @@ -0,0 +1,4 @@ +Skeleton: upload-native +Testname: relative +Description: Relative RPATH +Package-Architecture: any diff --git a/t/recipes/checks/binaries/rpath/relative/build-spec/orig/Makefile b/t/recipes/checks/binaries/rpath/relative/build-spec/orig/Makefile new file mode 100644 index 0000000..b7758c6 --- /dev/null +++ b/t/recipes/checks/binaries/rpath/relative/build-spec/orig/Makefile @@ -0,0 +1,64 @@ +# turn off PIE in CC in case we have a PIEful toolchain: +ifneq ($(findstring -no-pie,$(shell gcc -no-pie 2>&1)),) + CC := gcc +else + CC := gcc -fno-pie -no-pie +endif + +NOPIE_CFLAGS = $(filter-out -fPIE,$(CFLAGS)) +NOPIE_LDFLAGS = $(filter-out -fPIE -pie,$(LDFLAGS)) +COMPILE:= $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) +COMPILE_NOPIE:= $(CC) $(NOPIE_CFLAGS) $(CPPFLAGS) $(NOPIE_LDFLAGS) +# extract from readelf +GETBUILDID:=./getbuildid + +all: + # rpath not matching any of the exceptions to the rpath checks + # - with profiling enabled. + $(COMPILE_NOPIE) -o basic basic.c -pg -Wl,--rpath,usr/local/lib + # rpath shipped in the package, but one of {/usr}?/lib + $(COMPILE) -o basiclibrpath basic.c -Wl,--rpath,usr/lib + # non-special rpath shipped in the package + $(COMPILE) -o basicshippedrpath basic.c -Wl,--rpath,usr/share/foo + # special rpath shipped in the package, multiple paths + $(COMPILE) -o basicshippedrpathmore basic.c -Wl,--rpath,usr/lib/binaries-general:usr/lib/binaries-general/bar + # static version of basic for debugging checks + $(COMPILE_NOPIE) -static -o basic.static basic.c + # static executable to trigger ocaml check + $(COMPILE_NOPIE) -o ocaml-exec ocaml.c + # version with debug + $(COMPILE) -o basicdebug -g3 -Wl,--build-id basic.c + +install: + # according to local debian rules /usr/lib/debug is unstripped + install -d $(DESTDIR)/usr/share/foo/ + install -d $(DESTDIR)/usr/lib/debug/usr/share/foo/ + install -d $(DESTDIR)/usr/lib/foo/ + install -d $(DESTDIR)/usr/bin + + install -m 755 -c basic $(DESTDIR)/usr/share/foo/basic + objcopy --only-keep-debug basic $(DESTDIR)/usr/lib/debug/usr/share/foo/basic + strip -s $(DESTDIR)/usr/lib/debug/usr/share/foo/basic + install -m 755 -c basiclibrpath $(DESTDIR)/usr/lib/foo/basiclibrpath + install -m 755 -c basicshippedrpath $(DESTDIR)/usr/lib/foo/basicshippedrpath + install -m 755 -c ocaml-exec $(DESTDIR)/usr/lib/foo/ocaml-exec + install -m 744 -c basicshippedrpathmore $(DESTDIR)/usr/lib/foo/basicshippedrpathmore + objcopy --only-keep-debug basic $(DESTDIR)/usr/lib/debug/basic + install -d "$(DESTDIR)/usr/lib/debug/.build-id/"`$(GETBUILDID) -s basicdebug` + install -m 755 -c basicdebug $(DESTDIR)/usr/share/foo/basicdebug + # force fake buildid in order to have tag matching ok (deadbeefdeadbeef) + install -d "$(DESTDIR)/usr/lib/debug/.build-id/de" + objcopy --compress-debug-sections basicdebug \ + "$(DESTDIR)/usr/lib/debug/.build-id/de/deadbeefdeadbeef.debug" + install -d "$(DESTDIR)/usr/lib/debug/.build-id/"`$(GETBUILDID) -s basicdebug` + objcopy --compress-debug-sections --only-keep-debug basicdebug \ + "$(DESTDIR)/usr/lib/debug/.build-id/"`$(GETBUILDID) -s basicdebug`"/"`$(GETBUILDID) -f basicdebug`.debug + install -m 755 -c basic.static $(DESTDIR)/usr/lib/debug/ + # according to local debian rules unstripped in name avoid dh_strip to do the work + install -m 755 basicdebug $(DESTDIR)/usr/bin/unstripped + install -m 755 basic.static $(DESTDIR)/usr/bin/static + +clean distclean: + rm -f basic + +check test: diff --git a/t/recipes/checks/binaries/rpath/relative/build-spec/orig/basic.c b/t/recipes/checks/binaries/rpath/relative/build-spec/orig/basic.c new file mode 100644 index 0000000..3618004 --- /dev/null +++ b/t/recipes/checks/binaries/rpath/relative/build-spec/orig/basic.c @@ -0,0 +1,12 @@ +#include +#include + +int +main(int argc, char *argv[]) +{ + char t[10]; + printf("Hello world!\n"); + /* forces a stack protector */ + (void) strcpy(t,argv[0]); + return (int) t[0]; +} diff --git a/t/recipes/checks/binaries/rpath/relative/build-spec/orig/getbuildid b/t/recipes/checks/binaries/rpath/relative/build-spec/orig/getbuildid new file mode 100755 index 0000000..0060d2b --- /dev/null +++ b/t/recipes/checks/binaries/rpath/relative/build-spec/orig/getbuildid @@ -0,0 +1,30 @@ +#!/bin/sh +# get build-id of binary + +set -e + +usage() { + echo "Usage: getbuildid [flag] file"; + echo " print build-id of an object file" + echo "flags:" + echo " -f : full build-id (default)." + echo " -s : short build-id aka the first two characters." +} + +if test $# -lt 1; then usage; exit 77; fi +if test $# -gt 3; then usage; exit 77; fi + +if test $# -eq 1; then + LC_ALL=C readelf -n "$1" | grep -i 'Build Id:' | sed 's/.*:[[:blank:]]*\([[:digit:]|abcdef]*\).*/\1/g' +else + case "x$1" in + 'x-f') + LC_ALL=C readelf -n "$2" | grep -i 'Build Id:' | sed 's/.*:[[:blank:]]*\([[:digit:]|abcdef]*\).*/\1/g' ;; + 'x-s') + LC_ALL=C readelf -n "$2" | grep -i 'Build Id:' | sed 's/.*:[[:blank:]]*\([[:digit:]|abcdef]\{2\}\).*/\1/g' ;; + *) + exit 2; + esac +fi + +exit 0; diff --git a/t/recipes/checks/binaries/rpath/relative/build-spec/orig/ocaml.c b/t/recipes/checks/binaries/rpath/relative/build-spec/orig/ocaml.c new file mode 100644 index 0000000..370d17d --- /dev/null +++ b/t/recipes/checks/binaries/rpath/relative/build-spec/orig/ocaml.c @@ -0,0 +1,11 @@ +#include + +int +main(int argc, char **argv) +{ + if (argc > 2) { + puts("Caml1999X000"); + } + puts("\n"); + return 0; +} diff --git a/t/recipes/checks/binaries/rpath/relative/eval/desc b/t/recipes/checks/binaries/rpath/relative/eval/desc new file mode 100644 index 0000000..159b77a --- /dev/null +++ b/t/recipes/checks/binaries/rpath/relative/eval/desc @@ -0,0 +1,2 @@ +Testname: relative +Check: binaries/rpath diff --git a/t/recipes/checks/binaries/rpath/relative/eval/hints b/t/recipes/checks/binaries/rpath/relative/eval/hints new file mode 100644 index 0000000..3151df2 --- /dev/null +++ b/t/recipes/checks/binaries/rpath/relative/eval/hints @@ -0,0 +1,5 @@ +relative (binary): relative-library-search-path RUNPATH usr/share/foo [usr/lib/foo/basicshippedrpath] +relative (binary): relative-library-search-path RUNPATH usr/local/lib [usr/share/foo/basic] +relative (binary): relative-library-search-path RUNPATH usr/lib/binaries-general/bar [usr/lib/foo/basicshippedrpathmore] +relative (binary): relative-library-search-path RUNPATH usr/lib/binaries-general [usr/lib/foo/basicshippedrpathmore] +relative (binary): relative-library-search-path RUNPATH usr/lib [usr/lib/foo/basiclibrpath] diff --git a/t/recipes/checks/binaries/rpath/relative/eval/post-test b/t/recipes/checks/binaries/rpath/relative/eval/post-test new file mode 100755 index 0000000..11ad2c8 --- /dev/null +++ b/t/recipes/checks/binaries/rpath/relative/eval/post-test @@ -0,0 +1 @@ +/: hardening-.*/ d diff --git a/t/recipes/checks/binaries/spelling/binaries-spelling/build-spec/fill-values b/t/recipes/checks/binaries/spelling/binaries-spelling/build-spec/fill-values new file mode 100644 index 0000000..df21847 --- /dev/null +++ b/t/recipes/checks/binaries/spelling/binaries-spelling/build-spec/fill-values @@ -0,0 +1,4 @@ +Skeleton: upload-native +Testname: binaries-spelling +Description: Spelling errors in binaries +Package-Architecture: any diff --git a/t/recipes/checks/binaries/spelling/binaries-spelling/build-spec/orig/Makefile b/t/recipes/checks/binaries/spelling/binaries-spelling/build-spec/orig/Makefile new file mode 100644 index 0000000..0c85616 --- /dev/null +++ b/t/recipes/checks/binaries/spelling/binaries-spelling/build-spec/orig/Makefile @@ -0,0 +1,11 @@ +all: + gcc $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o basic basic.c + +install: + install -d $(DESTDIR)/usr/bin + install -m 755 -c basic $(DESTDIR)/usr/bin/basic + +clean distclean: + rm -f basic + +check test: diff --git a/t/recipes/checks/binaries/spelling/binaries-spelling/build-spec/orig/basic.c b/t/recipes/checks/binaries/spelling/binaries-spelling/build-spec/orig/basic.c new file mode 100644 index 0000000..2cec53e --- /dev/null +++ b/t/recipes/checks/binaries/spelling/binaries-spelling/build-spec/orig/basic.c @@ -0,0 +1,23 @@ +#include +#include + +static void +hardening_trigger(char *p, int i, void (*f)(char *)) +{ + char test[10]; + memcpy(test, p, i); + f(test); + printf("%s", test); +} + +int +main(void) +{ + printf("I iz an exprimental speling error!\n"); + printf("I also have teh broken teh!\n"); + printf("But tEH non-broken tEh needs to be on its own line!\n"); + printf("res.size is okay!\n"); /* #818003 */ + printf("Georg Nees was early pioneer of computer art and generative graphics.\n"); + hardening_trigger(NULL, 0, NULL); + return 0; +} diff --git a/t/recipes/checks/binaries/spelling/binaries-spelling/eval/desc b/t/recipes/checks/binaries/spelling/binaries-spelling/eval/desc new file mode 100644 index 0000000..527386d --- /dev/null +++ b/t/recipes/checks/binaries/spelling/binaries-spelling/eval/desc @@ -0,0 +1,2 @@ +Testname: binaries-spelling +Check: binaries/spelling diff --git a/t/recipes/checks/binaries/spelling/binaries-spelling/eval/hints b/t/recipes/checks/binaries/spelling/binaries-spelling/eval/hints new file mode 100644 index 0000000..49c0ea4 --- /dev/null +++ b/t/recipes/checks/binaries/spelling/binaries-spelling/eval/hints @@ -0,0 +1,3 @@ +binaries-spelling (binary): spelling-error-in-binary teh the [usr/bin/basic] +binaries-spelling (binary): spelling-error-in-binary speling spelling [usr/bin/basic] +binaries-spelling (binary): spelling-error-in-binary exprimental experimental [usr/bin/basic] diff --git a/t/recipes/checks/binaries/static/binaries-from-other-arch/build-spec/debian/dumpobj b/t/recipes/checks/binaries/static/binaries-from-other-arch/build-spec/debian/dumpobj new file mode 100644 index 0000000..afdf68e --- /dev/null +++ b/t/recipes/checks/binaries/static/binaries-from-other-arch/build-spec/debian/dumpobj @@ -0,0 +1,22 @@ +#!/bin/sh +set -e + +DEB_BUILD_GNU_TYPE="$(dpkg-architecture -qDEB_BUILD_GNU_TYPE)" + +case $DEB_BUILD_GNU_TYPE in +i486-linux-gnu|i586-linux-gnu|i686-linux-gnu|x86_64-linux-gnu) + base64 -d < debian/elfobject + sh debian/dumpobj > debian/fake-guile-object.go + dh binary diff --git a/t/recipes/checks/binaries/static/binaries-from-other-arch/build-spec/fill-values b/t/recipes/checks/binaries/static/binaries-from-other-arch/build-spec/fill-values new file mode 100644 index 0000000..d765ecd --- /dev/null +++ b/t/recipes/checks/binaries/static/binaries-from-other-arch/build-spec/fill-values @@ -0,0 +1,6 @@ +Skeleton: upload-native +Testname: binaries-from-other-arch +Package-Architecture: any +Dh-Compat-Level: 10 +Description: Test package with a pseudo binary from a different architecture +# since debhelper 12.5.2, objdump no longer fails silently for compat > 10, need better binary diff --git a/t/recipes/checks/binaries/static/binaries-from-other-arch/eval/desc b/t/recipes/checks/binaries/static/binaries-from-other-arch/eval/desc new file mode 100644 index 0000000..d599961 --- /dev/null +++ b/t/recipes/checks/binaries/static/binaries-from-other-arch/eval/desc @@ -0,0 +1,4 @@ +Testname: binaries-from-other-arch +Test-Architectures: amd64 i386 +Check: binaries/static +# since debhelper 12.5.2, objdump no longer fails silently for compat > 10, need better binary diff --git a/t/recipes/checks/binaries/static/binaries-from-other-arch/eval/hints b/t/recipes/checks/binaries/static/binaries-from-other-arch/eval/hints new file mode 100644 index 0000000..1de058b --- /dev/null +++ b/t/recipes/checks/binaries/static/binaries-from-other-arch/eval/hints @@ -0,0 +1,2 @@ +binaries-from-other-arch (binary): statically-linked-binary [usr/lib/foo/binaries-from-other-arch/guile/2.2/fake-guile-object.go] +binaries-from-other-arch (binary): statically-linked-binary [usr/bin/elfobject] diff --git a/t/recipes/checks/binaries/static/binaries-general/build-spec/debian/rules b/t/recipes/checks/binaries/static/binaries-general/build-spec/debian/rules new file mode 100644 index 0000000..3ea7a63 --- /dev/null +++ b/t/recipes/checks/binaries/static/binaries-general/build-spec/debian/rules @@ -0,0 +1,12 @@ +#!/usr/bin/make -f + +export DEB_BUILD_MAINT_OPTIONS=hardening=+all + +%: + dh $@ + +override_dh_strip: + dh_strip -X usr/lib/debug -X unstripped -X ocaml + +override_dh_dwz: + # Can error with "deadbeefdeadbeef.debug: Found compressed .debug_info section, not attempting dwz compression" diff --git a/t/recipes/checks/binaries/static/binaries-general/build-spec/fill-values b/t/recipes/checks/binaries/static/binaries-general/build-spec/fill-values new file mode 100644 index 0000000..a24247d --- /dev/null +++ b/t/recipes/checks/binaries/static/binaries-general/build-spec/fill-values @@ -0,0 +1,4 @@ +Skeleton: upload-native +Testname: binaries-general +Description: Misc errors related to binaries +Package-Architecture: any diff --git a/t/recipes/checks/binaries/static/binaries-general/build-spec/orig/Makefile b/t/recipes/checks/binaries/static/binaries-general/build-spec/orig/Makefile new file mode 100644 index 0000000..cf0f211 --- /dev/null +++ b/t/recipes/checks/binaries/static/binaries-general/build-spec/orig/Makefile @@ -0,0 +1,64 @@ +# turn off PIE in CC in case we have a PIEful toolchain: +ifneq ($(findstring -no-pie,$(shell gcc -no-pie 2>&1)),) + CC := gcc +else + CC := gcc -fno-pie -no-pie +endif + +NOPIE_CFLAGS = $(filter-out -fPIE,$(CFLAGS)) +NOPIE_LDFLAGS = $(filter-out -fPIE -pie,$(LDFLAGS)) +COMPILE:= $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) +COMPILE_NOPIE:= $(CC) $(NOPIE_CFLAGS) $(CPPFLAGS) $(NOPIE_LDFLAGS) +# extract from readelf +GETBUILDID:=./getbuildid + +all: + # rpath not matching any of the exceptions to the rpath checks + # - with profiling enabled. + $(COMPILE_NOPIE) -o basic basic.c -pg -Wl,--rpath,/usr/local/lib + # rpath shipped in the package, but one of {/usr}?/lib + $(COMPILE) -o basiclibrpath basic.c -Wl,--rpath,/usr/lib + # non-special rpath shipped in the package + $(COMPILE) -o basicshippedrpath basic.c -Wl,--rpath,/usr/share/foo + # special rpath shipped in the package, multiple paths + $(COMPILE) -o basicshippedrpathmore basic.c -Wl,--rpath,/usr/lib/binaries-general:/usr/lib/binaries-general/bar + # static version of basic for debugging checks + $(COMPILE_NOPIE) -static -o basic.static basic.c + # static executable to trigger ocaml check + $(COMPILE_NOPIE) -o ocaml-exec ocaml.c + # version with debug + $(COMPILE) -o basicdebug -g3 -Wl,--build-id basic.c + +install: + # according to local debian rules /usr/lib/debug is unstripped + install -d $(DESTDIR)/usr/share/foo/ + install -d $(DESTDIR)/usr/lib/debug/usr/share/foo/ + install -d $(DESTDIR)/usr/lib/foo/ + install -d $(DESTDIR)/usr/bin + + install -m 755 -c basic $(DESTDIR)/usr/share/foo/basic + objcopy --only-keep-debug basic $(DESTDIR)/usr/lib/debug/usr/share/foo/basic + strip -s $(DESTDIR)/usr/lib/debug/usr/share/foo/basic + install -m 755 -c basiclibrpath $(DESTDIR)/usr/lib/foo/basiclibrpath + install -m 755 -c basicshippedrpath $(DESTDIR)/usr/lib/foo/basicshippedrpath + install -m 755 -c ocaml-exec $(DESTDIR)/usr/lib/foo/ocaml-exec + install -m 744 -c basicshippedrpathmore $(DESTDIR)/usr/lib/foo/basicshippedrpathmore + objcopy --only-keep-debug basic $(DESTDIR)/usr/lib/debug/basic + install -d "$(DESTDIR)/usr/lib/debug/.build-id/"`$(GETBUILDID) -s basicdebug` + install -m 755 -c basicdebug $(DESTDIR)/usr/share/foo/basicdebug + # force fake buildid in order to have tag matching ok (deadbeefdeadbeef) + install -d "$(DESTDIR)/usr/lib/debug/.build-id/de" + objcopy --compress-debug-sections basicdebug \ + "$(DESTDIR)/usr/lib/debug/.build-id/de/deadbeefdeadbeef.debug" + install -d "$(DESTDIR)/usr/lib/debug/.build-id/"`$(GETBUILDID) -s basicdebug` + objcopy --compress-debug-sections --only-keep-debug basicdebug \ + "$(DESTDIR)/usr/lib/debug/.build-id/"`$(GETBUILDID) -s basicdebug`"/"`$(GETBUILDID) -f basicdebug`.debug + install -m 755 -c basic.static $(DESTDIR)/usr/lib/debug/ + # according to local debian rules unstripped in name avoid dh_strip to do the work + install -m 755 basicdebug $(DESTDIR)/usr/bin/unstripped + install -m 755 basic.static $(DESTDIR)/usr/bin/static + +clean distclean: + rm -f basic + +check test: diff --git a/t/recipes/checks/binaries/static/binaries-general/build-spec/orig/basic.c b/t/recipes/checks/binaries/static/binaries-general/build-spec/orig/basic.c new file mode 100644 index 0000000..3618004 --- /dev/null +++ b/t/recipes/checks/binaries/static/binaries-general/build-spec/orig/basic.c @@ -0,0 +1,12 @@ +#include +#include + +int +main(int argc, char *argv[]) +{ + char t[10]; + printf("Hello world!\n"); + /* forces a stack protector */ + (void) strcpy(t,argv[0]); + return (int) t[0]; +} diff --git a/t/recipes/checks/binaries/static/binaries-general/build-spec/orig/getbuildid b/t/recipes/checks/binaries/static/binaries-general/build-spec/orig/getbuildid new file mode 100755 index 0000000..0060d2b --- /dev/null +++ b/t/recipes/checks/binaries/static/binaries-general/build-spec/orig/getbuildid @@ -0,0 +1,30 @@ +#!/bin/sh +# get build-id of binary + +set -e + +usage() { + echo "Usage: getbuildid [flag] file"; + echo " print build-id of an object file" + echo "flags:" + echo " -f : full build-id (default)." + echo " -s : short build-id aka the first two characters." +} + +if test $# -lt 1; then usage; exit 77; fi +if test $# -gt 3; then usage; exit 77; fi + +if test $# -eq 1; then + LC_ALL=C readelf -n "$1" | grep -i 'Build Id:' | sed 's/.*:[[:blank:]]*\([[:digit:]|abcdef]*\).*/\1/g' +else + case "x$1" in + 'x-f') + LC_ALL=C readelf -n "$2" | grep -i 'Build Id:' | sed 's/.*:[[:blank:]]*\([[:digit:]|abcdef]*\).*/\1/g' ;; + 'x-s') + LC_ALL=C readelf -n "$2" | grep -i 'Build Id:' | sed 's/.*:[[:blank:]]*\([[:digit:]|abcdef]\{2\}\).*/\1/g' ;; + *) + exit 2; + esac +fi + +exit 0; diff --git a/t/recipes/checks/binaries/static/binaries-general/build-spec/orig/ocaml.c b/t/recipes/checks/binaries/static/binaries-general/build-spec/orig/ocaml.c new file mode 100644 index 0000000..370d17d --- /dev/null +++ b/t/recipes/checks/binaries/static/binaries-general/build-spec/orig/ocaml.c @@ -0,0 +1,11 @@ +#include + +int +main(int argc, char **argv) +{ + if (argc > 2) { + puts("Caml1999X000"); + } + puts("\n"); + return 0; +} diff --git a/t/recipes/checks/binaries/static/binaries-general/eval/desc b/t/recipes/checks/binaries/static/binaries-general/eval/desc new file mode 100644 index 0000000..41f333c --- /dev/null +++ b/t/recipes/checks/binaries/static/binaries-general/eval/desc @@ -0,0 +1,2 @@ +Testname: binaries-general +Check: binaries/static diff --git a/t/recipes/checks/binaries/static/binaries-general/eval/hints b/t/recipes/checks/binaries/static/binaries-general/eval/hints new file mode 100644 index 0000000..3e9929d --- /dev/null +++ b/t/recipes/checks/binaries/static/binaries-general/eval/hints @@ -0,0 +1 @@ +binaries-general (binary): statically-linked-binary [usr/bin/static] diff --git a/t/recipes/checks/binaries/static/binaries-general/eval/post-test b/t/recipes/checks/binaries/static/binaries-general/eval/post-test new file mode 100755 index 0000000..11ad2c8 --- /dev/null +++ b/t/recipes/checks/binaries/static/binaries-general/eval/post-test @@ -0,0 +1 @@ +/: hardening-.*/ d diff --git a/t/recipes/checks/binaries/static/binaries-golang/build-spec/fill-values b/t/recipes/checks/binaries/static/binaries-golang/build-spec/fill-values new file mode 100644 index 0000000..20669e9 --- /dev/null +++ b/t/recipes/checks/binaries/static/binaries-golang/build-spec/fill-values @@ -0,0 +1,5 @@ +Skeleton: upload-native +Testname: binaries-golang +Extra-Build-Depends: golang-go (>= 2:1.1.1-4) +Description: Misc errors related to golang binaries +Package-Architecture: any diff --git a/t/recipes/checks/binaries/static/binaries-golang/build-spec/orig/Makefile b/t/recipes/checks/binaries/static/binaries-golang/build-spec/orig/Makefile new file mode 100644 index 0000000..f04b342 --- /dev/null +++ b/t/recipes/checks/binaries/static/binaries-golang/build-spec/orig/Makefile @@ -0,0 +1,16 @@ +NOPIE_CFLAGS = $(filter-out -fPIE,$(CFLAGS)) +NOPIE_LDFLAGS = $(filter-out -fPIE -pie,$(LDFLAGS)) +COMPILE:= $(CC) $(NOPIE_CFLAGS) $(CPPFLAGS) $(NOPIE_LDFLAGS) + +all: + # static version + $(COMPILE) -static -o basic.static basic.c + +install: + install -d $(DESTDIR)/usr/lib/foo/ + install -m 755 basic.static $(DESTDIR)/usr/lib/foo/static + +clean distclean: + rm -f basic + +check test: diff --git a/t/recipes/checks/binaries/static/binaries-golang/build-spec/orig/basic.c b/t/recipes/checks/binaries/static/binaries-golang/build-spec/orig/basic.c new file mode 100644 index 0000000..7dea5a0 --- /dev/null +++ b/t/recipes/checks/binaries/static/binaries-golang/build-spec/orig/basic.c @@ -0,0 +1,12 @@ +#include + +int +main(void) +{ + char t[10]; + printf("Hello world!\n"); + /* Bad choice for reading from stdin, but it forces a stack + protector, so meh. + */ + gets (t); +} diff --git a/t/recipes/checks/binaries/static/binaries-golang/eval/desc b/t/recipes/checks/binaries/static/binaries-golang/eval/desc new file mode 100644 index 0000000..97800d6 --- /dev/null +++ b/t/recipes/checks/binaries/static/binaries-golang/eval/desc @@ -0,0 +1,3 @@ +Testname: binaries-golang +Test-Against: statically-linked-binary +Check: binaries/static diff --git a/t/recipes/checks/binaries/static/binaries-golang/eval/hints b/t/recipes/checks/binaries/static/binaries-golang/eval/hints new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/t/recipes/checks/binaries/static/binaries-golang/eval/hints @@ -0,0 +1 @@ + diff --git a/t/recipes/checks/binaries/static/legacy-binary/build-spec/debian/NEWS.Debian b/t/recipes/checks/binaries/static/legacy-binary/build-spec/debian/NEWS.Debian new file mode 100644 index 0000000..29f561c --- /dev/null +++ b/t/recipes/checks/binaries/static/legacy-binary/build-spec/debian/NEWS.Debian @@ -0,0 +1,12 @@ +binary (4-1.1) UNRELEASED; urgency=high + + This is a Debian NEWS entry that isn't encoded properly in UTF-8: . + It also has a usefull speling error. + + -- Russ Allbery Sun, 14 Oct 2007 17:11:36 -0700 + +binary (1) unstable; urgency=low + + This is another entry but this one isn't syntactically valid. + + -- Russ Allbery 2007-10-14 diff --git a/t/recipes/checks/binaries/static/legacy-binary/build-spec/debian/README.Debian b/t/recipes/checks/binaries/static/legacy-binary/build-spec/debian/README.Debian new file mode 100644 index 0000000..94bcc0a --- /dev/null +++ b/t/recipes/checks/binaries/static/legacy-binary/build-spec/debian/README.Debian @@ -0,0 +1,5 @@ +this is a binary package to test lintian's handling of bins. +Check handling of D-Bus and dbus (neither of which should produce +warnings). + + -- Russ Allbery , Wed, 6 Feb 2008 18:35:11 -0800 diff --git a/t/recipes/checks/binaries/static/legacy-binary/build-spec/debian/changelog.in b/t/recipes/checks/binaries/static/legacy-binary/build-spec/debian/changelog.in new file mode 100644 index 0000000..39301d6 --- /dev/null +++ b/t/recipes/checks/binaries/static/legacy-binary/build-spec/debian/changelog.in @@ -0,0 +1,47 @@ +binary ([% $version %]) [% $distribution %]; urgency=low + + * I'm doing an comaintainer-upload, acknowledging a NMU, but with a version + number which suggests I'm doing a NMU myself. + + Lintian-maintainers: Please don't update this changelog, otherwise you'll + probably break the checks/nmu checks. + + -- Jeroen van Wolffelaar Sun, 18 Apr 2004 01:49:42 +0200 + +binary (4-1) unstable; urgency=low + + * Weird version number for the new check for accidents with native + packaging. + * Date was fixed by BR and this test was put on changelog-file-strange-date + due to dpkg bug, see #794674. + + -- Marc 'HE' Brockschmidt Thu, 15 Apr 2004 23:33:51 +0200 + +binary (4) unstable; urgency=low + + * Add big file to /usr/share to trigger the big-usr-share check + + -- Jeroen van Wolffelaar Fri, 27 Feb 2004 10:15:59 +0100 + +binary (3) unstable; urgency=unlimited + + * Add some bogus menu entries using su-to-root in a bogus way + + -- Jeroen van Wolffelaar Thu, 12 Feb 2004 20:11:22 +0100 + +binary (2) unstable; urgency=low + + * Added an INSTALL document which policy 6.3 suggests not to do + + -- Sean 'Shaleh' Perry Tue, 30 Jan 2001 15:23:59 -0800 + +binary (1) unstable; urgency=low + + * hello.c added + * hello-static is same as hello, but compiled statically + * added a menu entry which lacks a Section + * added a postinst + * postinst calls suidregister which is no longer policy compliant + + -- Sean 'Shaleh' Perry Wed, 10 Jan 2001 08:55:34 -0800 + diff --git a/t/recipes/checks/binaries/static/legacy-binary/build-spec/debian/conffiles b/t/recipes/checks/binaries/static/legacy-binary/build-spec/debian/conffiles new file mode 100644 index 0000000..d1a0843 --- /dev/null +++ b/t/recipes/checks/binaries/static/legacy-binary/build-spec/debian/conffiles @@ -0,0 +1 @@ +/etc/menu-methods/lintian diff --git a/t/recipes/checks/binaries/static/legacy-binary/build-spec/debian/control b/t/recipes/checks/binaries/static/legacy-binary/build-spec/debian/control new file mode 100644 index 0000000..c797357 --- /dev/null +++ b/t/recipes/checks/binaries/static/legacy-binary/build-spec/debian/control @@ -0,0 +1,42 @@ +Source: binary +Section: misc +Priority: optional +Maintainer: Lintian Maintainers +Uploaders: Co-maintainer one , Jeroen van Wolffelaar , Co-maintainer three +Standards-Version: 3.2.1 +Homepage: http://lintian.debian.org/ +Vcs-Svn: http://svn.wolffelaar.nl/lintian/trunk +XS-Vcs-Browser: http://svn.wolffelaar.nl/lintian/trunk +XS-Dm-Upload-Allowed: yes + +Package: binary +Architecture: any +Pre-Depends: ${shlibs:Depends}, xorg, binary-data (= ${source:Version}), libssl0.9.8 +Homepage: +Vcs-Svn: http://svn.wolffelaar.nl/lintian/trunk +Description: test handling of binary files + Regression test for lintian's handling of binary files for debian. This + is checked for picky spelling errors. + . + This package list [ subversion | gconf ] should not be flagged as a spelling + mistake. The spelling correction for dont should be correct. + . + Homepage: http://lintian.debian.org/ + +Package: binary-data +Architecture: all +Depends: binary (= ${source:Version}), libssl-not-openssl, + libssl0.9.8 | or-something-else +Description: test handling of binary relationships + Regression test for lintian's checking of package relationships between + arch:any and arch:all packages. + . + This mention of subversion should be flagged as a spelling mistake. + +#Package: binary-comment +#Architecture: space-almonds +#Depends: * +#Depends: * +#Description: test comment support +# Yes, comments are actually allowed in debian/control, so none of the +# above should produce errors. diff --git a/t/recipes/checks/binaries/static/legacy-binary/build-spec/debian/copyright b/t/recipes/checks/binaries/static/legacy-binary/build-spec/debian/copyright new file mode 100644 index 0000000..1d6806d --- /dev/null +++ b/t/recipes/checks/binaries/static/legacy-binary/build-spec/debian/copyright @@ -0,0 +1,15 @@ +hello.c is released under public domain. This is distributed in the hope that +it will be useful, but without any warranty; without even the implied warranty +of merchantability or fitness for a particular purpose. + +A reference to /usr/share/common-licenses/GPL-2 to make it look like this +package is under the GPL and trigger the OpenSSL warning. + +Test for old FSF address: + +Free Software Foundation, Inc., 59 Temple Place - Suite 330, +Boston, MA 02111-1307, USA. + +Test for deprecated ntionl ncoding. + +Improper capitalization of linux or debian isn't caught here. diff --git a/t/recipes/checks/binaries/static/legacy-binary/build-spec/debian/doc-base b/t/recipes/checks/binaries/static/legacy-binary/build-spec/debian/doc-base new file mode 100644 index 0000000..7e5b38f --- /dev/null +++ b/t/recipes/checks/binaries/static/legacy-binary/build-spec/debian/doc-base @@ -0,0 +1,41 @@ +Document: binary!docs +Title: Broken debian binary doc-base control file +Author: Russ Allbery +Abstract: This control file exercises various tests of doc-base control + files, including several things that aren't tested yet. The third and + fourth one has trailing whitespace. + . + This section has a speling error and bad character. + . + The above separator was fine. +Section: Non/Existant +Unknown: Some field + + + +Format: debiandoc-sgML +Files: /usr/share/doc/binary/binary.sgml.gz +Unknown: Some field + +Format: ESP +Index: /usr/share/doc/binary/binary.txt + +Index: /usr/share/doc/binary/html/index.html + /usr/share/doc/binary/html/ch1.html + /usr/share/doc/binary/html/ch4.html + + +Format: HTML +Index: /usr/share/doc/binary/html/index.html +Files: /usr/share/doc/binary/html/ch?.h*l + /usr/share/doc/binary/hml/*.html + +Format: inFO +Files: /usr/share/info/binary.info.gz + +Format: HTML +Index: /usr/share/doc/binary/html/index.html +Files: /usr/share/doc/binary/html/ch5.html + /usr/share/doc/binary/html/ch6.html + + diff --git a/t/recipes/checks/binaries/static/legacy-binary/build-spec/debian/goodbye.desktop b/t/recipes/checks/binaries/static/legacy-binary/build-spec/debian/goodbye.desktop new file mode 100644 index 0000000..f6ce8e3 --- /dev/null +++ b/t/recipes/checks/binaries/static/legacy-binary/build-spec/debian/goodbye.desktop @@ -0,0 +1,13 @@ +[Desktop Entry] +Name:Goodbye +# Name=Goodbye +Comment=Say hello! +SpecialTag=This doesn't exist! +Exec=goodbye +icon=hello +Terminal=true +Type=Application +Categories=WeirdStuff;Screensaver; +Encoding=ISO-10646-1 +[Other Entry] +Name=Goodbye diff --git a/t/recipes/checks/binaries/static/legacy-binary/build-spec/debian/hello.desktop b/t/recipes/checks/binaries/static/legacy-binary/build-spec/debian/hello.desktop new file mode 100644 index 0000000..f795468 --- /dev/null +++ b/t/recipes/checks/binaries/static/legacy-binary/build-spec/debian/hello.desktop @@ -0,0 +1,14 @@ +# some random comment + +# [Foo Bar] +[KDE Desktop Entry] +Name=Hello +Name[en_US]=Hello +Comment=Say hello! +Exec=kdesu hello +Icon=hello +Terminal=true +Type=Application +Categories=GNOME;GTK;System;Applet;X-Foo;Settings; +Encoding=UTF-8 +OnlyShowIn=GNOME; diff --git a/t/recipes/checks/binaries/static/legacy-binary/build-spec/debian/menu b/t/recipes/checks/binaries/static/legacy-binary/build-spec/debian/menu new file mode 100644 index 0000000..e8972f4 --- /dev/null +++ b/t/recipes/checks/binaries/static/legacy-binary/build-spec/debian/menu @@ -0,0 +1,26 @@ +?package(binary):needs=text title="Hello World" command="/usr/bin/hello" +?package(binary):needs=text section="Applications/System" title="Run cfdisk (0)" command="/usr/bin/su-to-root cfdisk" +?package(binary):needs="text" section="Applications/System/Hardware" title="Run cfdisk (1)" command="sux -p cfdisk" +?package(binary):needs="x11" section="Window Managers" title="Run xfdisk" command="/usr/sbin/su-to-root -c xfdisk" +?package(binary):needs="wm" section="Applications/System/Administration" title="Run fdisk-wm" command="su-to-root -c hello" +?package(binary):section="Apps/Games" title="I'm not root!" command="su-to-root -c imnothere" +?package(binary):needs="text" section="Apps/System" title="I'm not here!" command="/imnothere" +?package(binary,other-binary):\ + needs="text"\ + section="Applications/Shells"\ + title="more than one required"\ + command="other-bin -s omething" +?package(binary):needs="wmmodule" section="WindowManagers/Modules" title="somemodule" command="ModuleCmd" +?package(binary):needs="wmmodule" section="FVWM Modules" title="somemodule" command="ModuleCmd" +?package(binary):needs="text" section="Applications/System/Administration" title="I'm not in /usr/bin!" command="iminusrbin" +?package(binary):needs="text"\ + section="Applications/System/Administration"\ + title="I'm not root!" command="su-to-root -c imnothere" +?package(binary):needs="text" section="Applications/System/Administration"\ + title="Run cfdisk (0)" command="cfdisk" +?package(binary):needs="text" section="Applications/System/Administration" title="Hello World" command="/usr/bin/hello" +?package(binary):needs="wm" section="FVWM Modules" title="Fake Module" command="hello" +?package(binary):needs="fvwmmodule" section="Window Maker" title="Fake Module"\ + command="hello" +?package(binary):needs="x11" section="Applications/System/Hardware" title="Run xfdisk" command="su-to-root -c 'xfdisk -f'" +?package(binary):needs="text" section="Applications/System/Administration" title="foo" command="sh /path/to/foo" diff --git a/t/recipes/checks/binaries/static/legacy-binary/build-spec/debian/menu-method b/t/recipes/checks/binaries/static/legacy-binary/build-spec/debian/menu-method new file mode 100644 index 0000000..9f07bd7 --- /dev/null +++ b/t/recipes/checks/binaries/static/legacy-binary/build-spec/debian/menu-method @@ -0,0 +1,22 @@ +#!/usr/bin/install-menu + +# -*- mode: shell-script; -*- +#I need menu-1! +# + +!include notmenu.h + +compat="menu-2" + +outputencoding="UTF-8"; +outputlanguage="C"; + +x11 = AppEntry("false"); +text = AppEntry("true"); + +startmenu = ""; +endmenu = ""; +submenutitle = ""; +rootprefix = "/var/lib/lintian/menu"; +userprefix = ".local/share/lintian/menu"; + diff --git a/t/recipes/checks/binaries/static/legacy-binary/build-spec/debian/postinst b/t/recipes/checks/binaries/static/legacy-binary/build-spec/debian/postinst new file mode 100644 index 0000000..29e1861 --- /dev/null +++ b/t/recipes/checks/binaries/static/legacy-binary/build-spec/debian/postinst @@ -0,0 +1,6 @@ +#! /bin/bash -e + +if [ $1 eq 'configure' ] +then + suidregister hello-static root root 4755 +fi diff --git a/t/recipes/checks/binaries/static/legacy-binary/build-spec/debian/rules b/t/recipes/checks/binaries/static/legacy-binary/build-spec/debian/rules new file mode 100755 index 0000000..a962ea9 --- /dev/null +++ b/t/recipes/checks/binaries/static/legacy-binary/build-spec/debian/rules @@ -0,0 +1,92 @@ +#!/usr/bin/make -f + +tmp=debian/tmp + +# This reference to $(PWD) should not cause an error but the one below +# should. +build-arch: + make + echo $(PWD) + +build: build-arch + +clean: + make -i clean + [ ! -f debian/files ] || rm -f debian/files + [ ! -f debian/substvars ] || rm -f debian/substvars + [ ! -d debian/tmp ] || rm -rf debian/tmp + [ ! -d debian/binary ] || rm -rf debian/binary + [ ! -d debian/binary-data ] || rm -rf debian/binary-data + +binary-arch: build + install -d $(tmp)/usr/bin + install -d $(tmp)/boot/hello + install -m 755 hello $(tmp)/usr/bin + touch $(tmp)/usr/bin/iminusrbin + chmod 755 $(tmp)/usr/bin/iminusrbin + install -m 755 hello-static $(tmp)/usr/bin + strip $(tmp)/usr/bin/hello-static + install -m 755 hello-static $(tmp)/usr/bin/hello.static + strip --remove-section=.comment --remove-section=.note $(tmp)/usr/bin/hello.static + ln $(tmp)/usr/bin/hello.static $(tmp)/usr/bin/static-hello + install -m 755 hello-static $(tmp)/boot/hello + strip --remove-section=.comment --remove-section=.note $(tmp)/boot/hello/hello-static + install -d $(tmp)/usr/share/doc/binary + install -m 644 INSTALL $(tmp)/usr/share/doc/binary + install -d $(tmp)/usr/share/doc/binary/html + echo '' > $(tmp)/usr/share/doc/binary/html/index.html + echo '' > $(tmp)/usr/share/doc/binary/html/ch1.html + ln -s ../html/./ch1.html $(tmp)/usr/share/doc/binary/html/ch2.html + ln -s /usr/share/doc/binary/htm/ch1.html $(tmp)/usr/share/doc/binary/html/ch3.html + echo '' > $(tmp)/usr/share/doc/binary/html/ch5.html + ln $(tmp)/usr/share/doc/binary/html/ch5.html \ + $(tmp)/usr/share/doc/binary/html/ch6.html + install -d $(tmp)/usr/share/menu + install -d $(tmp)/usr/lib/menu + install -d $(tmp)/usr/share/binary + install -m 644 debian/menu $(tmp)/usr/share/menu/binary + install -m 644 debian/menu $(tmp)/usr/lib/menu/binary + install -d $(tmp)/etc/menu-methods + install -m 755 debian/menu-method $(tmp)/etc/menu-methods/lintian + install -d $(tmp)/usr/share/doc-base + install -m 644 debian/doc-base $(tmp)/usr/share/doc-base/binary + touch '$(tmp)/usr/share/doc-base/space ' + install -m 644 debian/README.Debian $(tmp)/usr/share/doc/binary + install -m 644 debian/NEWS.Debian $(tmp)/usr/share/doc/binary + gzip -n -9 $(tmp)/usr/share/doc/binary/NEWS.Debian + install -m 644 debian/copyright $(tmp)/usr/share/doc/binary + install -m 644 debian/changelog $(tmp)/usr/share/doc/binary + #gzip -n -9 $(tmp)/usr/share/doc/binary/changelog + install -d $(tmp)/DEBIAN + install -m 755 debian/postinst $(tmp)/DEBIAN + install -m 644 debian/conffiles $(tmp)/DEBIAN + + install -d $(tmp)/usr/share/applications + install -m 644 debian/hello.desktop \ + $(tmp)/usr/share/applications/hello.desktop + install -m 755 debian/goodbye.desktop \ + $(tmp)/usr/share/applications/goodbye.desktop + + # should be ok... + echo boe > $(tmp)/usr/bar + ln $(tmp)/usr/bar $(tmp)/usr/foo + # but this isn't + echo boe > $(tmp)/usr/bar2 + ln $(tmp)/usr/bar2 $(tmp)/usr/share/baz + + dd if=/dev/zero of=$(tmp)/usr/share/binary/largefile bs=1024 count=4000 + + install -d debian/binary-data/DEBIAN + install -d debian/binary-data/usr/share/doc + ln -s binary debian/binary-data/usr/share/doc/binary-data + + dpkg-shlibdeps $(tmp)/usr/bin/hello + dpkg-gencontrol -pbinary -isp + dpkg-gencontrol -pbinary-data -Pdebian/binary-data -isp + + dpkg --build debian/tmp .. + dpkg --build debian/binary-data .. + +binary: binary-arch + +.PHONY: build-arch build binary-arch binary clean diff --git a/t/recipes/checks/binaries/static/legacy-binary/build-spec/debian/templates b/t/recipes/checks/binaries/static/legacy-binary/build-spec/debian/templates new file mode 100644 index 0000000..3d92861 --- /dev/null +++ b/t/recipes/checks/binaries/static/legacy-binary/build-spec/debian/templates @@ -0,0 +1,16 @@ +# The debconf templates defined here are the sort that you'd use if +# providing a wordlist and an ispell dictionary for the language +# "perl". This shouldn't trigger warnings about not using debconf-po. + +Template: shared/packages-ispell +Type: text +Description: + +Template: shared/packages-wordlist +Type: text +Description: + +Template: miscfiles/languages +Type: text +Default: perl (Pathologically Eclectic Rubbish Lister) +Description: diff --git a/t/recipes/checks/binaries/static/legacy-binary/build-spec/fill-values b/t/recipes/checks/binaries/static/legacy-binary/build-spec/fill-values new file mode 100644 index 0000000..b503871 --- /dev/null +++ b/t/recipes/checks/binaries/static/legacy-binary/build-spec/fill-values @@ -0,0 +1,5 @@ +Skeleton: upload-non-native +Testname: legacy-binary +Source: binary +Version: 4-1.1 +Description: Legacy test "binary" diff --git a/t/recipes/checks/binaries/static/legacy-binary/build-spec/orig/INSTALL b/t/recipes/checks/binaries/static/legacy-binary/build-spec/orig/INSTALL new file mode 100644 index 0000000..3b50ea9 --- /dev/null +++ b/t/recipes/checks/binaries/static/legacy-binary/build-spec/orig/INSTALL @@ -0,0 +1,176 @@ +Basic Installation +================== + + These are generic installation instructions. + + The `configure' shell script attempts to guess correct values for +various system-dependent variables used during compilation. It uses +those values to create a `Makefile' in each directory of the package. +It may also create one or more `.h' files containing system-dependent +definitions. Finally, it creates a shell script `config.status' that +you can run in the future to recreate the current configuration, a file +`config.cache' that saves the results of its tests to speed up +reconfiguring, and a file `config.log' containing compiler output +(useful mainly for debugging `configure'). + + If you need to do unusual things to compile the package, please try +to figure out how `configure' could check whether to do them, and mail +diffs or instructions to the address given in the `README' so they can +be considered for the next release. If at some point `config.cache' +contains results you don't want to keep, you may remove or edit it. + + The file `configure.in' is used to create `configure' by a program +called `autoconf'. You only need `configure.in' if you want to change +it or regenerate `configure' using a newer version of `autoconf'. + +The simplest way to compile this package is: + + 1. `cd' to the directory containing the package's source code and type + `./configure' to configure the package for your system. If you're + using `csh' on an old version of System V, you might need to type + `sh ./configure' instead to prevent `csh' from trying to execute + `configure' itself. + + Running `configure' takes a while. While running, it prints some + messages telling which features it is checking for. + + 2. Type `make' to compile the package. + + 3. Optionally, type `make check' to run any self-tests that come with + the package. + + 4. Type `make install' to install the programs and any data files and + documentation. + + 5. You can remove the program binaries and object files from the + source code directory by typing `make clean'. To also remove the + files that `configure' created (so you can compile the package for + a different kind of computer), type `make distclean'. There is + also a `make maintainer-clean' target, but that is intended mainly + for the package's developers. If you use it, you may have to get + all sorts of other programs in order to regenerate files that came + with the distribution. + +Compilers and Options +===================== + + Some systems require unusual options for compilation or linking that +the `configure' script does not know about. You can give `configure' +initial values for variables by setting them in the environment. Using +a Bourne-compatible shell, you can do that on the command line like +this: + CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure + +Or on systems that have the `env' program, you can do it like this: + env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure + +Compiling For Multiple Architectures +==================================== + + You can compile the package for more than one kind of computer at the +same time, by placing the object files for each architecture in their +own directory. To do this, you must use a version of `make' that +supports the `VPATH' variable, such as GNU `make'. `cd' to the +directory where you want the object files and executables to go and run +the `configure' script. `configure' automatically checks for the +source code in the directory that `configure' is in and in `..'. + + If you have to use a `make' that does not supports the `VPATH' +variable, you have to compile the package for one architecture at a time +in the source code directory. After you have installed the package for +one architecture, use `make distclean' before reconfiguring for another +architecture. + +Installation Names +================== + + By default, `make install' will install the package's files in +`/usr/local/bin', `/usr/local/man', etc. You can specify an +installation prefix other than `/usr/local' by giving `configure' the +option `--prefix=PATH'. + + You can specify separate installation prefixes for +architecture-specific files and architecture-independent files. If you +give `configure' the option `--exec-prefix=PATH', the package will use +PATH as the prefix for installing programs and libraries. +Documentation and other data files will still use the regular prefix. + + If the package supports it, you can cause programs to be installed +with an extra prefix or suffix on their names by giving `configure' the +option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. + +Optional Features +================= + + Some packages pay attention to `--enable-FEATURE' options to +`configure', where FEATURE indicates an optional part of the package. +They may also pay attention to `--with-PACKAGE' options, where PACKAGE +is something like `gnu-as' or `x' (for the X Window System). The +`README' should mention any `--enable-' and `--with-' options that the +package recognizes. + + For packages that use the X Window System, `configure' can usually +find the X include and library files automatically, but if it doesn't, +you can use the `configure' options `--x-includes=DIR' and +`--x-libraries=DIR' to specify their locations. + +Specifying the System Type +========================== + + There may be some features `configure' can not figure out +automatically, but needs to determine by the type of host the package +will run on. Usually `configure' can figure that out, but if it prints +a message saying it can not guess the host type, give it the +`--host=TYPE' option. TYPE can either be a short name for the system +type, such as `sun4', or a canonical name with three fields: + CPU-COMPANY-SYSTEM + +See the file `config.sub' for the possible values of each field. If +`config.sub' isn't included in this package, then this package doesn't +need to know the host type. + + If you are building compiler tools for cross-compiling, you can also +use the `--target=TYPE' option to select the type of system they will +produce code for and the `--build=TYPE' option to select the type of +system on which you are compiling the package. + +Sharing Defaults +================ + + If you want to set default values for `configure' scripts to share, +you can create a site shell script called `config.site' that gives +default values for variables like `CC', `cache_file', and `prefix'. +`configure' looks for `PREFIX/share/config.site' if it exists, then +`PREFIX/etc/config.site' if it exists. Or, you can set the +`CONFIG_SITE' environment variable to the location of the site script. +A warning: not all `configure' scripts look for a site script. + +Operation Controls +================== + + `configure' recognizes the following options to control how it +operates. + +`--cache-file=FILE' + Use and save the results of the tests in FILE instead of + `./config.cache'. Set FILE to `/dev/null' to disable caching, for + debugging `configure'. + +`--help' + Print a summary of the options to `configure', and exit. + +`--quiet' +`--silent' +`-q' + Do not print messages saying which checks are being made. + +`--srcdir=DIR' + Look for the package's source code in directory DIR. Usually + `configure' can determine that directory automatically. + +`--version' + Print the version of Autoconf used to generate the `configure' + script, and exit. + +`configure' also accepts some other, not widely useful, options. + diff --git a/t/recipes/checks/binaries/static/legacy-binary/build-spec/orig/Makefile b/t/recipes/checks/binaries/static/legacy-binary/build-spec/orig/Makefile new file mode 100644 index 0000000..da1dc55 --- /dev/null +++ b/t/recipes/checks/binaries/static/legacy-binary/build-spec/orig/Makefile @@ -0,0 +1,12 @@ +all: hello hello-static + +hello: hello.c + gcc hello.c -o hello + +hello-static: hello.c + gcc -static hello.c -o hello-static + +clean: + rm -f hello hello-static + +distclean: clean diff --git a/t/recipes/checks/binaries/static/legacy-binary/build-spec/orig/hello.c b/t/recipes/checks/binaries/static/legacy-binary/build-spec/orig/hello.c new file mode 100644 index 0000000..2fb04e1 --- /dev/null +++ b/t/recipes/checks/binaries/static/legacy-binary/build-spec/orig/hello.c @@ -0,0 +1,8 @@ +#include +#include + +int main(int argc, char *argv[]) { + + printf("Hello, World!\n"); + exit(0); +} diff --git a/t/recipes/checks/binaries/static/legacy-binary/eval/desc b/t/recipes/checks/binaries/static/legacy-binary/eval/desc new file mode 100644 index 0000000..cadb9b2 --- /dev/null +++ b/t/recipes/checks/binaries/static/legacy-binary/eval/desc @@ -0,0 +1,2 @@ +Testname: legacy-binary +Check: binaries/static diff --git a/t/recipes/checks/binaries/static/legacy-binary/eval/hints b/t/recipes/checks/binaries/static/legacy-binary/eval/hints new file mode 100644 index 0000000..6f29ed7 --- /dev/null +++ b/t/recipes/checks/binaries/static/legacy-binary/eval/hints @@ -0,0 +1 @@ +binary (binary): statically-linked-binary [usr/bin/static-hello] diff --git a/t/recipes/checks/binaries/static/legacy-binary/eval/post-test b/t/recipes/checks/binaries/static/legacy-binary/eval/post-test new file mode 100644 index 0000000..3deefd5 --- /dev/null +++ b/t/recipes/checks/binaries/static/legacy-binary/eval/post-test @@ -0,0 +1,3 @@ +s/arch-dep-package-has-big-usr-share .*kB .*%/arch-dep-package-has-big-usr-share/ +/: hardening-.*/ d +s/\(current is ([0-9]+\.)+[0-9]\)/(current is CURRENT)/ diff --git a/t/recipes/checks/binaries/static/legacy-debug/build-spec/debian/_symbols b/t/recipes/checks/binaries/static/legacy-debug/build-spec/debian/_symbols new file mode 100644 index 0000000..46e6af1 --- /dev/null +++ b/t/recipes/checks/binaries/static/legacy-debug/build-spec/debian/_symbols @@ -0,0 +1,23 @@ + This line should flag a syntax error +# but this one shouldn't +| although this one should, but for a different reason + and so should this + +libhello.so.0 libhello0 #MINVER# +| libhello0c2 (>= 1.2) , libhelloc0c2 (<< 1.3) +| hello-dbg3| libhelloc0c3|foobar (= 1.2) |hello-dbg2 +| hello-dbg + hello@Base 1.0 +* Build-Dep-Foo: bar + hello2@Base 2.0 4 + hello3@Base 2.0 1 + hello3@Base 2.0 A + dummy + +libhello.so.2 libhello2 #MINVER# +* Build-Depends-Package: libbar +| libhello2 (>= 1:2.3) + hello@Base 2.0 + +libhello.so.0 libhello0 #MINVER# + duplicate@Base 1.0 diff --git a/t/recipes/checks/binaries/static/legacy-debug/build-spec/debian/changelog.in b/t/recipes/checks/binaries/static/legacy-debug/build-spec/debian/changelog.in new file mode 100644 index 0000000..02da925 --- /dev/null +++ b/t/recipes/checks/binaries/static/legacy-debug/build-spec/debian/changelog.in @@ -0,0 +1,13 @@ +debug ([% $version %]) [% $distribution %]; urgency=low + + * NMU. + (uploaded by the maintainer and with repeated version number) + + -- Russ Allbery Tue, 4 Apr 2006 20:27:22 +0000 + +debug (1.0) unstable; urgency=low + + * Initial version. + + -- Russ Allbery Sat, 4 Mar 2006 21:31:06 -0800 + diff --git a/t/recipes/checks/binaries/static/legacy-debug/build-spec/debian/compat.in b/t/recipes/checks/binaries/static/legacy-debug/build-spec/debian/compat.in new file mode 100644 index 0000000..640a566 --- /dev/null +++ b/t/recipes/checks/binaries/static/legacy-debug/build-spec/debian/compat.in @@ -0,0 +1 @@ +[% $dh_compat_level %] diff --git a/t/recipes/checks/binaries/static/legacy-debug/build-spec/debian/control b/t/recipes/checks/binaries/static/legacy-debug/build-spec/debian/control new file mode 100644 index 0000000..fcb2b86 --- /dev/null +++ b/t/recipes/checks/binaries/static/legacy-debug/build-spec/debian/control @@ -0,0 +1,85 @@ +Source: debug +Section: utils +Priority: optional +Maintainer: Russ Allbery +Build-Depends: debhelper (>= 5.0.0) +Build-Depends-Indep: not-debhelper (>= 0.4.3) +Standards-Version: 3.7.0 + +Package: hello +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: Test for external debugging information + Lintian regression test for external debugging file handling. This test + contains the binary. + . + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. + +Package: hello-dbg +Priority: optional +Section: debug +Architecture: any +Depends: hello (= ${binary:Version}), ${shlibs:Depends}, ${misc:Depends} +Description: Test for external debugging information (symbols) + Lintian regression test for external debugging file handling. This test + contains the binary symbols. + . + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. + +Package: libhello0 +Section: libs +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: Test for external debugging information (library) + Lintian regression test for external debugging file handling. This test + contains a library. + . + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. + +Package: libhello0-dbg +Section: debug +Priority: optional +Architecture: any +Depends: libhello (= ${binary:Version}), ${shlibs:Depends}, ${misc:Depends} +Description: Test for external debugging information (library symbols) + Lintian regression test for external debugging file handling. This test + contains the library symbols. + . + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. + +Package: hi-dbg +Section: debug +Priority: optional +Architecture: any +Depends: foo-pkg, not-libhello0 +Description: Test for external debugging symbols + Lintian regression test for external debugging files handling. This test + contains the library symbols. + . + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. + +Package: hello-hello-dbg +Section: debug +Priority: optional +Architecture: any +Depends: foo-pkg, not-libhello0, hello +Description: Test for external debugging symbols - another try + Lintian regression test for external debugging files handling. This test + contains the library symbols. This package actually tests a combination of + the above. + . + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. diff --git a/t/recipes/checks/binaries/static/legacy-debug/build-spec/debian/copyright b/t/recipes/checks/binaries/static/legacy-debug/build-spec/debian/copyright new file mode 100644 index 0000000..5d4f6c2 --- /dev/null +++ b/t/recipes/checks/binaries/static/legacy-debug/build-spec/debian/copyright @@ -0,0 +1,4 @@ +Written Sat, 04 Mar 2006 21:30:01 -0800 by Russ Allbery . + +Test for copyright in capital letters. (#464992) +COPYRIGHT RUSS ALLBERY 2006 diff --git a/t/recipes/checks/binaries/static/legacy-debug/build-spec/debian/rules b/t/recipes/checks/binaries/static/legacy-debug/build-spec/debian/rules new file mode 100755 index 0000000..b659895 --- /dev/null +++ b/t/recipes/checks/binaries/static/legacy-debug/build-spec/debian/rules @@ -0,0 +1,99 @@ +#!/usr/bin/make -f +# Sample debian/rules that uses debhelper. +# This file is public domain software, originally written by Joey Hess. + +# turn off PIE in CC in case we have a PIEful toolchain: +ifneq ($(findstring -no-pie,$(shell gcc -no-pie 2>&1)),) + CC := gcc +else + CC := gcc -fno-pie -no-pie +endif + +build-indep: + +build-arch: build-stamp + +build-stamp: + dh_testdir + $(CC) -D_REENTRANT -fPIC -c libhello.c + $(CC) -o libhello.so.0.0 -shared -Wl,-soname,libhello.so.0 libhello.o + ln -s libhello.so.0.0 libhello.so + $(CC) -o hello hello.c -L. -lhello + touch build-stamp + +build: build-arch build-indep + +clean: + dh_testdir + dh_testroot + rm -f build-stamp *.o libhello.so.0.0 libhello.so + dh_clean + +install: build-stamp + dh_testdir + dh_testroot + dh_clean -k + install -D hello $(CURDIR)/debian/hello/usr/bin/hello + install -D libhello.so.0.0 \ + $(CURDIR)/debian/libhello0/usr/lib/libhello.so.0.0 + ln -s libhello.so.0.0 \ + $(CURDIR)/debian/libhello0/usr/lib/libhello.so.0 + +# Build architecture-dependent files here. +export DH_OPTIONS +binary-arch: DH_OPTIONS=-a +binary-arch: build-stamp install + dh_testdir + dh_testroot + dh_installchangelogs -N hello-dbg + dh_installdocs + DH_OPTIONS= dh_strip -phello --dbg-package=hello-dbg + DH_OPTIONS= dh_strip -plibhello0 --dbg-package=libhello0-dbg + + # Now break a few things. Copy the debugging data into places it + # shouldn't be. + cp $(CURDIR)/debian/hello-dbg/usr/lib/debug/usr/bin/hello \ + $(CURDIR)/debian/hello/usr/bin/hello.dbg + cp $(CURDIR)/debian/libhello0-dbg/usr/lib/debug/usr/lib/libhello.so.0.0 \ + $(CURDIR)/debian/libhello0-dbg/usr/lib/libhello.so.dbg + + # Put a full copy of the library in libhello0-dbg in /usr/lib/debug, + # which is okay. + install -m 644 libhello.so.0.0 \ + $(CURDIR)/debian/libhello0-dbg/usr/lib/debug/libhello.so.0.0 + + # Also put it in /usr/lib/debug/lib, which isn't. + install -D -m 644 libhello.so.0.0 \ + $(CURDIR)/debian/libhello0-dbg/usr/lib/debug/lib/libhello.so.0.0 + + # Requires a versioned dependency. + dh_icons + + dh_link + dh_compress + dh_fixperms + dh_makeshlibs -X debug + dh_installdeb + dh_shlibdeps -X debug + + # We do this by hand as otherwise dpkg-gensymbols + # will error due to the broken symbols file + # and abort the build; similarly the file in + # the source tree is _symbols so that dpkg + # doesn't attempt to sanity check it + install -d $(CURDIR)/debian/libhello0/DEBIAN + install -m 644 $(CURDIR)/debian/_symbols \ + $(CURDIR)/debian/libhello0/DEBIAN/symbols + # hello doesn't contain any shlibs, but we + # make it contain a symbols file + install -d $(CURDIR)/debian/hello/DEBIAN + install -m 644 $(CURDIR)/debian/_symbols \ + $(CURDIR)/debian/hello/DEBIAN/symbols + + dh_gencontrol + dh_md5sums + dh_builddeb + +binary-indep: +binary: binary-indep binary-arch +.PHONY: build-arch build-indep build binary binary-indep binary-arch clean install diff --git a/t/recipes/checks/binaries/static/legacy-debug/build-spec/fill-values b/t/recipes/checks/binaries/static/legacy-debug/build-spec/fill-values new file mode 100644 index 0000000..79eebf1 --- /dev/null +++ b/t/recipes/checks/binaries/static/legacy-debug/build-spec/fill-values @@ -0,0 +1,6 @@ +Skeleton: upload-native +Testname: legacy-debug +Source: debug +Default-Build-Depends: debhelper (>= 9.20151004~) +Dh-Compat-Level: 7 +Description: Legacy test "debug" diff --git a/t/recipes/checks/binaries/static/legacy-debug/build-spec/orig/hello.c b/t/recipes/checks/binaries/static/legacy-debug/build-spec/orig/hello.c new file mode 100644 index 0000000..76f8337 --- /dev/null +++ b/t/recipes/checks/binaries/static/legacy-debug/build-spec/orig/hello.c @@ -0,0 +1,9 @@ +#include +#include "libhello.h" + +int +main(void) +{ + hello(); + exit(0); +} diff --git a/t/recipes/checks/binaries/static/legacy-debug/build-spec/orig/libhello.c b/t/recipes/checks/binaries/static/legacy-debug/build-spec/orig/libhello.c new file mode 100644 index 0000000..e2f8409 --- /dev/null +++ b/t/recipes/checks/binaries/static/legacy-debug/build-spec/orig/libhello.c @@ -0,0 +1,7 @@ +#include + +void +hello(void) +{ + printf("Hello, World!\n"); +} diff --git a/t/recipes/checks/binaries/static/legacy-debug/build-spec/orig/libhello.h b/t/recipes/checks/binaries/static/legacy-debug/build-spec/orig/libhello.h new file mode 100644 index 0000000..ef77476 --- /dev/null +++ b/t/recipes/checks/binaries/static/legacy-debug/build-spec/orig/libhello.h @@ -0,0 +1 @@ +void hello(void); diff --git a/t/recipes/checks/binaries/static/legacy-debug/eval/desc b/t/recipes/checks/binaries/static/legacy-debug/eval/desc new file mode 100644 index 0000000..2ec70bd --- /dev/null +++ b/t/recipes/checks/binaries/static/legacy-debug/eval/desc @@ -0,0 +1,2 @@ +Testname: legacy-debug +Check: binaries/static diff --git a/t/recipes/checks/binaries/static/legacy-debug/eval/hints b/t/recipes/checks/binaries/static/legacy-debug/eval/hints new file mode 100644 index 0000000..0e446ad --- /dev/null +++ b/t/recipes/checks/binaries/static/legacy-debug/eval/hints @@ -0,0 +1 @@ +hello (binary): statically-linked-binary [usr/bin/hello.dbg] diff --git a/t/recipes/checks/binaries/static/legacy-debug/eval/post-test b/t/recipes/checks/binaries/static/legacy-debug/eval/post-test new file mode 100644 index 0000000..fc97c5f --- /dev/null +++ b/t/recipes/checks/binaries/static/legacy-debug/eval/post-test @@ -0,0 +1,2 @@ +/: hardening-.*/ d +s/\(current is ([0-9]+\.)+[0-9]\)/(current is CURRENT)/ diff --git a/t/recipes/checks/build-systems/automake/automake-general/build-spec/fill-values b/t/recipes/checks/build-systems/automake/automake-general/build-spec/fill-values new file mode 100644 index 0000000..5752e5e --- /dev/null +++ b/t/recipes/checks/build-systems/automake/automake-general/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: source-native +Testname: automake-general +Description: Test if the package uses the deprecated configure.in for automake diff --git a/t/recipes/checks/build-systems/automake/automake-general/build-spec/orig/Makefile.am b/t/recipes/checks/build-systems/automake/automake-general/build-spec/orig/Makefile.am new file mode 100644 index 0000000..e69de29 diff --git a/t/recipes/checks/build-systems/automake/automake-general/build-spec/orig/configure.in b/t/recipes/checks/build-systems/automake/automake-general/build-spec/orig/configure.in new file mode 100644 index 0000000..575a30d --- /dev/null +++ b/t/recipes/checks/build-systems/automake/automake-general/build-spec/orig/configure.in @@ -0,0 +1 @@ +AC_INIT diff --git a/t/recipes/checks/build-systems/automake/automake-general/eval/desc b/t/recipes/checks/build-systems/automake/automake-general/eval/desc new file mode 100644 index 0000000..1ff6707 --- /dev/null +++ b/t/recipes/checks/build-systems/automake/automake-general/eval/desc @@ -0,0 +1,2 @@ +Testname: automake-general +Check: build-systems/automake diff --git a/t/recipes/checks/build-systems/automake/automake-general/eval/hints b/t/recipes/checks/build-systems/automake/automake-general/eval/hints new file mode 100644 index 0000000..4d3dfa6 --- /dev/null +++ b/t/recipes/checks/build-systems/automake/automake-general/eval/hints @@ -0,0 +1 @@ +automake-general (source): deprecated-configure-filename [configure.in] diff --git a/t/recipes/checks/build-systems/autotools/cruft-general-test-suite/build-spec/fill-values b/t/recipes/checks/build-systems/autotools/cruft-general-test-suite/build-spec/fill-values new file mode 100644 index 0000000..b153334 --- /dev/null +++ b/t/recipes/checks/build-systems/autotools/cruft-general-test-suite/build-spec/fill-values @@ -0,0 +1,3 @@ +Testname: cruft-general-test-suite +Skeleton: upload-non-native +Description: Check that cruft in test suites is okay diff --git a/t/recipes/checks/build-systems/autotools/cruft-general-test-suite/build-spec/orig/hello.c b/t/recipes/checks/build-systems/autotools/cruft-general-test-suite/build-spec/orig/hello.c new file mode 100644 index 0000000..1b47b80 --- /dev/null +++ b/t/recipes/checks/build-systems/autotools/cruft-general-test-suite/build-spec/orig/hello.c @@ -0,0 +1,8 @@ +#include + +int +main(void) +{ + printf("Hello world!\n"); + return 0; +} diff --git a/t/recipes/checks/build-systems/autotools/cruft-general-test-suite/build-spec/pre-upstream b/t/recipes/checks/build-systems/autotools/cruft-general-test-suite/build-spec/pre-upstream new file mode 100755 index 0000000..8665c92 --- /dev/null +++ b/t/recipes/checks/build-systems/autotools/cruft-general-test-suite/build-spec/pre-upstream @@ -0,0 +1,35 @@ +#!/bin/sh +# +# Create all the various junk that shouldn't exist upstream. We do much of it +# here rather than in the template so that Lintian itself can be imported into +# revision control systems. + +set -e +dir="$1" + +mkdir -p "${dir}/t/CVS" +echo 'source-contains-cvs-control-dir' > "${dir}/t/CVS/Entries" +mkdir -p "${dir}/foo/t/.svn" +echo 'source-contains-svn-control-dir' > "${dir}/foo/t/.svn/format" +mkdir -p "${dir}/test/.bzr" +echo 'source-contains-bzr-control-dir' > "${dir}/test/.bzr/foo" +mkdir -p "${dir}/bar/test/{arch}" +echo 'source-contains-arch-control-dir' > "${dir}/bar/test/{arch}/foo" +mkdir -p "${dir}/tests/.git" +echo 'source-contains-git-control-dir' > "${dir}/tests/.git/foo" +mkdir -p "${dir}/baz/foo/tests/.hg" +echo 'source-contains-hg-control-dir' > "${dir}/baz/foo/tests/.hg/foo" +mkdir -p "${dir}/testset/.be" +echo 'source-contains-bts-control-dir' > "${dir}/testset/.be/foo" + +echo 'source-contains-svn-commit-file' > "${dir}/t/svn-commit.tmp" +echo 'source-contains-svk-commit-file' > "${dir}/t/svk-commit444.tmp" +echo 'source-contains-arch-inventory-file' > "${dir}/t/.arch-inventory" +echo 'source-contains-hg-tags-file' > "${dir}/t/.hgtags" +echo 'source-contains-cvs-conflict-copy' > "${dir}/t/.#foo.1.1" +echo 'source-contains-svn-conflict-file' > "${dir}/t/foo.r1352" + +echo 'configure-generated-file-in-source' > "${dir}/tests/config.cache" + +cd "$1" +gcc -o t/hello hello.c diff --git a/t/recipes/checks/build-systems/autotools/cruft-general-test-suite/eval/desc b/t/recipes/checks/build-systems/autotools/cruft-general-test-suite/eval/desc new file mode 100644 index 0000000..2da240a --- /dev/null +++ b/t/recipes/checks/build-systems/autotools/cruft-general-test-suite/eval/desc @@ -0,0 +1,4 @@ +Testname: cruft-general-test-suite +Test-Against: + configure-generated-file-in-source +Check: build-systems/autotools diff --git a/t/recipes/checks/build-systems/autotools/cruft-general-test-suite/eval/hints b/t/recipes/checks/build-systems/autotools/cruft-general-test-suite/eval/hints new file mode 100644 index 0000000..5f7a858 --- /dev/null +++ b/t/recipes/checks/build-systems/autotools/cruft-general-test-suite/eval/hints @@ -0,0 +1 @@ +cruft-general-test-suite (source): configure-generated-file-in-source [tests/config.cache] diff --git a/t/recipes/checks/build-systems/autotools/libtool/cruft-ancient-libtool-2/build-spec/fill-values b/t/recipes/checks/build-systems/autotools/libtool/cruft-ancient-libtool-2/build-spec/fill-values new file mode 100644 index 0000000..b6419d2 --- /dev/null +++ b/t/recipes/checks/build-systems/autotools/libtool/cruft-ancient-libtool-2/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: upload-native +Testname: cruft-ancient-libtool-2 +Description: Test that an old (1.5.2) ltmain.sh is detected correctly diff --git a/t/recipes/checks/build-systems/autotools/libtool/cruft-ancient-libtool-2/build-spec/orig/ltmain.sh b/t/recipes/checks/build-systems/autotools/libtool/cruft-ancient-libtool-2/build-spec/orig/ltmain.sh new file mode 100644 index 0000000..662c6f0 --- /dev/null +++ b/t/recipes/checks/build-systems/autotools/libtool/cruft-ancient-libtool-2/build-spec/orig/ltmain.sh @@ -0,0 +1,62 @@ +# ltmain.sh - Provide generalized library-building support services. +# NOTE: Changing this file will not affect anything until you rerun configure. +# +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003 +# Free Software Foundation, Inc. +# Originally by Gordon Matzigkeit , 1996 +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +# Check that we have a working $echo. +if test "X$1" = X--no-reexec; then + # Discard the --no-reexec flag, and continue. + shift +elif test "X$1" = X--fallback-echo; then + # Avoid inline document here, it may be left over + : +elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then + # Yippee, $echo works! + : +else + # Restart under the correct shell, and then maybe $echo will work. + exec $SHELL "$0" --no-reexec ${1+"$@"} +fi + +if test "X$1" = X--fallback-echo; then + # used as fallback echo + shift + cat <, 1996 +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +# Check that we have a working $echo. +if test "X$1" = X--no-reexec; then + # Discard the --no-reexec flag, and continue. + shift +elif test "X$1" = X--fallback-echo; then + # Avoid inline document here, it may be left over + : +elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then + # Yippee, $echo works! + : +else + # Restart under the correct shell, and then maybe $echo will work. + exec $SHELL "$0" --no-reexec ${1+"$@"} +fi + +if test "X$1" = X--fallback-echo; then + # used as fallback echo + shift + cat <, 1996 +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +basename="s,^.*/,,g" + +# Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh +# is ksh but when the shell is invoked as "sh" and the current value of +# the _XPG environment variable is not equal to 1 (one), the special +# positional parameter $0, within a function call, is the name of the +# function. +progpath="$0" + +# The name of this program: +progname=`echo "$progpath" | $SED $basename` +modename="$progname" + +# Global variables: +EXIT_SUCCESS=0 +EXIT_FAILURE=1 + +PROGRAM=ltmain.sh +PACKAGE=libtool +VERSION="1.5.24 Debian 1.5.24-1ubuntu1" +TIMESTAMP=" (1.1220.2.456 2007/06/24 02:25:32)" + diff --git a/t/recipes/checks/build-systems/autotools/libtool/cruft-current-libtool/eval/desc b/t/recipes/checks/build-systems/autotools/libtool/cruft-current-libtool/eval/desc new file mode 100644 index 0000000..1d949a7 --- /dev/null +++ b/t/recipes/checks/build-systems/autotools/libtool/cruft-current-libtool/eval/desc @@ -0,0 +1,4 @@ +Testname: cruft-current-libtool +Test-Against: ancient-libtool +See-Also: Debian Bug#293296 +Check: build-systems/autotools/libtool diff --git a/t/recipes/checks/build-systems/autotools/libtool/cruft-current-libtool/eval/hints b/t/recipes/checks/build-systems/autotools/libtool/cruft-current-libtool/eval/hints new file mode 100644 index 0000000..e69de29 diff --git a/t/recipes/checks/build-systems/autotools/libtool/cruft-updated-libtool/build-spec/fill-values b/t/recipes/checks/build-systems/autotools/libtool/cruft-updated-libtool/build-spec/fill-values new file mode 100644 index 0000000..7040ad7 --- /dev/null +++ b/t/recipes/checks/build-systems/autotools/libtool/cruft-updated-libtool/build-spec/fill-values @@ -0,0 +1,4 @@ +Skeleton: upload-native +Testname: cruft-updated-libtool +Extra-Build-Depends: libtool +Description: Old ltmain.sh/ltconfig is fine with build-depend diff --git a/t/recipes/checks/build-systems/autotools/libtool/cruft-updated-libtool/build-spec/orig/ltconfig b/t/recipes/checks/build-systems/autotools/libtool/cruft-updated-libtool/build-spec/orig/ltconfig new file mode 100644 index 0000000..e69de29 diff --git a/t/recipes/checks/build-systems/autotools/libtool/cruft-updated-libtool/build-spec/orig/ltmain.sh b/t/recipes/checks/build-systems/autotools/libtool/cruft-updated-libtool/build-spec/orig/ltmain.sh new file mode 100644 index 0000000..c7b800b --- /dev/null +++ b/t/recipes/checks/build-systems/autotools/libtool/cruft-updated-libtool/build-spec/orig/ltmain.sh @@ -0,0 +1,59 @@ +# ltmain.sh - Provide generalized library-building support services. +# NOTE: Changing this file will not affect anything until you rerun ltconfig. +# +# Copyright (C) 1996-1999 Free Software Foundation, Inc. +# Originally by Gordon Matzigkeit , 1996 +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +# Check that we have a working $echo. +if test "X$1" = X--no-reexec; then + # Discard the --no-reexec flag, and continue. + shift +elif test "X$1" = X--fallback-echo; then + # Avoid inline document here, it may be left over + : +elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then + # Yippee, $echo works! + : +else + # Restart under the correct shell, and then maybe $echo will work. + exec $SHELL "$0" --no-reexec ${1+"$@"} +fi + +if test "X$1" = X--fallback-echo; then + # used as fallback echo + shift + cat < "${dir}/CVS/Entries" +mkdir "${dir}/.svn" +echo 'diff-contains-svn-control-dir' > "${dir}/.svn/format" +mkdir "${dir}/.bzr" +echo 'diff-contains-bzr-control-dir' > "${dir}/.bzr/foo" +mkdir "${dir}/{arch}" +echo 'diff-contains-arch-control-dir' > "${dir}/{arch}/foo" +mkdir "${dir}/.git" +echo 'diff-contains-git-control-dir' > "${dir}/.git/foo" +mkdir "${dir}/.hg" +echo 'diff-contains-hg-control-dir' > "${dir}/.hg/foo" +mkdir "${dir}/.be" +echo 'diff-contains-bts-control-dir' > "${dir}/.be/foo" +mkdir "${dir}/.pc" +echo 'diff-contains-quilt-control-dir' > "${dir}/.pc/foo" + +echo 'diff-contains-cmake-cache-file' > "${dir}/CMakeCache.txt" +echo 'diff-contains-svn-commit-file' > "${dir}/svn-commit.tmp" +echo 'diff-contains-svk-commit-file' > "${dir}/svk-commit444.tmp" +echo 'diff-contains-arch-inventory-file' > "${dir}/.arch-inventory" +echo 'diff-contains-hg-tags-file' > "${dir}/.hgtags" +echo 'diff-contains-cvs-conflict-copy' > "${dir}/.#foo.1.1" +echo 'diff-contains-svn-conflict-file' > "${dir}/foo.r1352" +echo 'diff-contains-patch-failure-file' > "${dir}/foo.rej" +echo 'diff-contains-editor-backup-file' > "${dir}/foo~" diff --git a/t/recipes/checks/build-systems/cmake/cruft-general-diff/eval/desc b/t/recipes/checks/build-systems/cmake/cruft-general-diff/eval/desc new file mode 100644 index 0000000..da239ce --- /dev/null +++ b/t/recipes/checks/build-systems/cmake/cruft-general-diff/eval/desc @@ -0,0 +1,3 @@ +Testname: cruft-general-diff +See-Also: Debian Bug#598251 +Check: build-systems/cmake diff --git a/t/recipes/checks/build-systems/cmake/cruft-general-diff/eval/hints b/t/recipes/checks/build-systems/cmake/cruft-general-diff/eval/hints new file mode 100644 index 0000000..483fd14 --- /dev/null +++ b/t/recipes/checks/build-systems/cmake/cruft-general-diff/eval/hints @@ -0,0 +1 @@ +cruft-general-diff (source): source-contains-cmake-cache-file [CMakeCache.txt] diff --git a/t/recipes/checks/build-systems/cmake/cruft-general-native/build-spec/debian/rules b/t/recipes/checks/build-systems/cmake/cruft-general-native/build-spec/debian/rules new file mode 100755 index 0000000..413418b --- /dev/null +++ b/t/recipes/checks/build-systems/cmake/cruft-general-native/build-spec/debian/rules @@ -0,0 +1,9 @@ +#!/usr/bin/make -f +%: + dh $@ + +override_dh_prep: + dh_prep -X~ -Xrej + +clean: + @echo 'Do nothing' diff --git a/t/recipes/checks/build-systems/cmake/cruft-general-native/build-spec/debian/substvars b/t/recipes/checks/build-systems/cmake/cruft-general-native/build-spec/debian/substvars new file mode 100644 index 0000000..abd3ebe --- /dev/null +++ b/t/recipes/checks/build-systems/cmake/cruft-general-native/build-spec/debian/substvars @@ -0,0 +1 @@ +misc:Depends= diff --git a/t/recipes/checks/build-systems/cmake/cruft-general-native/build-spec/fill-values b/t/recipes/checks/build-systems/cmake/cruft-general-native/build-spec/fill-values new file mode 100644 index 0000000..8460259 --- /dev/null +++ b/t/recipes/checks/build-systems/cmake/cruft-general-native/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: upload-native +Testname: cruft-general-native +Description: Check for cruft in a native package diff --git a/t/recipes/checks/build-systems/cmake/cruft-general-native/build-spec/pre-build b/t/recipes/checks/build-systems/cmake/cruft-general-native/build-spec/pre-build new file mode 100755 index 0000000..c594074 --- /dev/null +++ b/t/recipes/checks/build-systems/cmake/cruft-general-native/build-spec/pre-build @@ -0,0 +1,32 @@ +#!/bin/sh +# +# Create all the various junk that shouldn't exist in the diff so that we can +# trigger all the tags. + +set -e +dir="$1" + +mkdir "${dir}/CVS" +echo 'diff-contains-cvs-control-dir' > "${dir}/CVS/Entries" +mkdir "${dir}/.svn" +echo 'diff-contains-svn-control-dir' > "${dir}/.svn/format" +mkdir "${dir}/.bzr" +echo 'diff-contains-bzr-control-dir' > "${dir}/.bzr/foo" +mkdir "${dir}/{arch}" +echo 'diff-contains-arch-control-dir' > "${dir}/{arch}/foo" +mkdir "${dir}/.git" +echo 'diff-contains-git-control-dir' > "${dir}/.git/foo" +mkdir "${dir}/.hg" +echo 'diff-contains-hg-control-dir' > "${dir}/.hg/foo" +mkdir "${dir}/.be" +echo 'diff-contains-bts-control-dir' > "${dir}/.be/foo" + +echo 'diff-contains-cmake-cache-file' > "${dir}/CMakeCache.txt" +echo 'diff-contains-svn-commit-file' > "${dir}/svn-commit.tmp" +echo 'diff-contains-svk-commit-file' > "${dir}/svk-commit444.tmp" +echo 'diff-contains-arch-inventory-file' > "${dir}/.arch-inventory" +echo 'diff-contains-hg-tags-file' > "${dir}/.hgtags" +echo 'diff-contains-cvs-conflict-copy' > "${dir}/.#foo.1.1" +echo 'diff-contains-svn-conflict-file' > "${dir}/foo.r1352" +echo 'diff-contains-patch-failure-file' > "${dir}/foo.rej" +echo 'diff-contains-editor-backup-file' > "${dir}/foo~" diff --git a/t/recipes/checks/build-systems/cmake/cruft-general-native/eval/desc b/t/recipes/checks/build-systems/cmake/cruft-general-native/eval/desc new file mode 100644 index 0000000..b61ccf2 --- /dev/null +++ b/t/recipes/checks/build-systems/cmake/cruft-general-native/eval/desc @@ -0,0 +1,2 @@ +Testname: cruft-general-native +Check: build-systems/cmake diff --git a/t/recipes/checks/build-systems/cmake/cruft-general-native/eval/hints b/t/recipes/checks/build-systems/cmake/cruft-general-native/eval/hints new file mode 100644 index 0000000..352bbe8 --- /dev/null +++ b/t/recipes/checks/build-systems/cmake/cruft-general-native/eval/hints @@ -0,0 +1 @@ +cruft-general-native (source): source-contains-cmake-cache-file [CMakeCache.txt] diff --git a/t/recipes/checks/build-systems/cmake/cruft-general-quilt/build-spec/debian/README.source b/t/recipes/checks/build-systems/cmake/cruft-general-quilt/build-spec/debian/README.source new file mode 100644 index 0000000..0bbaa60 --- /dev/null +++ b/t/recipes/checks/build-systems/cmake/cruft-general-quilt/build-spec/debian/README.source @@ -0,0 +1 @@ +Some information about the patch system diff --git a/t/recipes/checks/build-systems/cmake/cruft-general-quilt/build-spec/debian/rules b/t/recipes/checks/build-systems/cmake/cruft-general-quilt/build-spec/debian/rules new file mode 100755 index 0000000..413418b --- /dev/null +++ b/t/recipes/checks/build-systems/cmake/cruft-general-quilt/build-spec/debian/rules @@ -0,0 +1,9 @@ +#!/usr/bin/make -f +%: + dh $@ + +override_dh_prep: + dh_prep -X~ -Xrej + +clean: + @echo 'Do nothing' diff --git a/t/recipes/checks/build-systems/cmake/cruft-general-quilt/build-spec/debian/somepackage.substvars b/t/recipes/checks/build-systems/cmake/cruft-general-quilt/build-spec/debian/somepackage.substvars new file mode 100644 index 0000000..abd3ebe --- /dev/null +++ b/t/recipes/checks/build-systems/cmake/cruft-general-quilt/build-spec/debian/somepackage.substvars @@ -0,0 +1 @@ +misc:Depends= diff --git a/t/recipes/checks/build-systems/cmake/cruft-general-quilt/build-spec/debian/substvars b/t/recipes/checks/build-systems/cmake/cruft-general-quilt/build-spec/debian/substvars new file mode 100644 index 0000000..abd3ebe --- /dev/null +++ b/t/recipes/checks/build-systems/cmake/cruft-general-quilt/build-spec/debian/substvars @@ -0,0 +1 @@ +misc:Depends= diff --git a/t/recipes/checks/build-systems/cmake/cruft-general-quilt/build-spec/fill-values b/t/recipes/checks/build-systems/cmake/cruft-general-quilt/build-spec/fill-values new file mode 100644 index 0000000..01bda9c --- /dev/null +++ b/t/recipes/checks/build-systems/cmake/cruft-general-quilt/build-spec/fill-values @@ -0,0 +1,4 @@ +Testname: cruft-general-quilt +Skeleton: upload-non-native +Source-Format: 3.0 (quilt) +Description: Check for cruft added in a 3.0 (quilt) package diff --git a/t/recipes/checks/build-systems/cmake/cruft-general-quilt/build-spec/pre-build b/t/recipes/checks/build-systems/cmake/cruft-general-quilt/build-spec/pre-build new file mode 100755 index 0000000..53e0ddd --- /dev/null +++ b/t/recipes/checks/build-systems/cmake/cruft-general-quilt/build-spec/pre-build @@ -0,0 +1,34 @@ +#!/bin/sh +# +# Create all the various junk that shouldn't exist in the diff so that we can +# trigger all the tags. + +set -e +dir="$1/debian" + +mkdir "${dir}/CVS" +echo 'diff-contains-cvs-control-dir' > "${dir}/CVS/Entries" +mkdir "${dir}/.svn" +echo 'diff-contains-svn-control-dir' > "${dir}/.svn/format" +mkdir "${dir}/.bzr" +echo 'diff-contains-bzr-control-dir' > "${dir}/.bzr/foo" +mkdir "${dir}/{arch}" +echo 'diff-contains-arch-control-dir' > "${dir}/{arch}/foo" +mkdir "${dir}/.git" +echo 'diff-contains-git-control-dir' > "${dir}/.git/foo" +mkdir "${dir}/.hg" +echo 'diff-contains-hg-control-dir' > "${dir}/.hg/foo" +mkdir "${dir}/.be" +echo 'diff-contains-bts-control-dir' > "${dir}/.be/foo" +mkdir "${dir}/.pc" +echo 'diff-contains-quilt-control-dir' > "${dir}/.pc/foo" + +echo 'diff-contains-cmake-cache-file' > "${dir}/CMakeCache.txt" +echo 'diff-contains-svn-commit-file' > "${dir}/svn-commit.tmp" +echo 'diff-contains-svk-commit-file' > "${dir}/svk-commit444.tmp" +echo 'diff-contains-arch-inventory-file' > "${dir}/.arch-inventory" +echo 'diff-contains-hg-tags-file' > "${dir}/.hgtags" +echo 'diff-contains-cvs-conflict-copy' > "${dir}/.#foo.1.1" +echo 'diff-contains-svn-conflict-file' > "${dir}/foo.r1352" +echo 'diff-contains-patch-failure-file' > "${dir}/foo.rej" +echo 'diff-contains-editor-backup-file' > "${dir}/foo~" diff --git a/t/recipes/checks/build-systems/cmake/cruft-general-quilt/eval/desc b/t/recipes/checks/build-systems/cmake/cruft-general-quilt/eval/desc new file mode 100644 index 0000000..609f223 --- /dev/null +++ b/t/recipes/checks/build-systems/cmake/cruft-general-quilt/eval/desc @@ -0,0 +1,3 @@ +Testname: cruft-general-quilt +See-Also: Debian Bug#598251 +Check: build-systems/cmake diff --git a/t/recipes/checks/build-systems/cmake/cruft-general-quilt/eval/hints b/t/recipes/checks/build-systems/cmake/cruft-general-quilt/eval/hints new file mode 100644 index 0000000..f47e7ff --- /dev/null +++ b/t/recipes/checks/build-systems/cmake/cruft-general-quilt/eval/hints @@ -0,0 +1 @@ +cruft-general-quilt (source): source-contains-cmake-cache-file [debian/CMakeCache.txt] diff --git a/t/recipes/checks/build-systems/cmake/cruft-general-wig-pen/build-spec/debian/patches/wig-pen b/t/recipes/checks/build-systems/cmake/cruft-general-wig-pen/build-spec/debian/patches/wig-pen new file mode 100644 index 0000000..a452b53 --- /dev/null +++ b/t/recipes/checks/build-systems/cmake/cruft-general-wig-pen/build-spec/debian/patches/wig-pen @@ -0,0 +1,5 @@ +--- upstream/README ++++ debian/README +@@ -1 +1 @@ +-README ++README for wig&pen diff --git a/t/recipes/checks/build-systems/cmake/cruft-general-wig-pen/build-spec/debian/rules b/t/recipes/checks/build-systems/cmake/cruft-general-wig-pen/build-spec/debian/rules new file mode 100755 index 0000000..413418b --- /dev/null +++ b/t/recipes/checks/build-systems/cmake/cruft-general-wig-pen/build-spec/debian/rules @@ -0,0 +1,9 @@ +#!/usr/bin/make -f +%: + dh $@ + +override_dh_prep: + dh_prep -X~ -Xrej + +clean: + @echo 'Do nothing' diff --git a/t/recipes/checks/build-systems/cmake/cruft-general-wig-pen/build-spec/debian/substvars b/t/recipes/checks/build-systems/cmake/cruft-general-wig-pen/build-spec/debian/substvars new file mode 100644 index 0000000..abd3ebe --- /dev/null +++ b/t/recipes/checks/build-systems/cmake/cruft-general-wig-pen/build-spec/debian/substvars @@ -0,0 +1 @@ +misc:Depends= diff --git a/t/recipes/checks/build-systems/cmake/cruft-general-wig-pen/build-spec/fill-values b/t/recipes/checks/build-systems/cmake/cruft-general-wig-pen/build-spec/fill-values new file mode 100644 index 0000000..edb39d9 --- /dev/null +++ b/t/recipes/checks/build-systems/cmake/cruft-general-wig-pen/build-spec/fill-values @@ -0,0 +1,4 @@ +Testname: cruft-general-wig-pen +Skeleton: upload-non-native +Source-Format: 2.0 +Description: Check for cruft added in a 2.0 package diff --git a/t/recipes/checks/build-systems/cmake/cruft-general-wig-pen/build-spec/orig/README b/t/recipes/checks/build-systems/cmake/cruft-general-wig-pen/build-spec/orig/README new file mode 100644 index 0000000..e845566 --- /dev/null +++ b/t/recipes/checks/build-systems/cmake/cruft-general-wig-pen/build-spec/orig/README @@ -0,0 +1 @@ +README diff --git a/t/recipes/checks/build-systems/cmake/cruft-general-wig-pen/build-spec/pre-build b/t/recipes/checks/build-systems/cmake/cruft-general-wig-pen/build-spec/pre-build new file mode 100755 index 0000000..78f359c --- /dev/null +++ b/t/recipes/checks/build-systems/cmake/cruft-general-wig-pen/build-spec/pre-build @@ -0,0 +1,32 @@ +#!/bin/sh +# +# Create all the various junk that shouldn't exist in the diff so that we can +# trigger all the tags. + +set -e +dir="$1/debian" + +mkdir "${dir}/CVS" +echo 'diff-contains-cvs-control-dir' > "${dir}/CVS/Entries" +mkdir "${dir}/.svn" +echo 'diff-contains-svn-control-dir' > "${dir}/.svn/format" +mkdir "${dir}/.bzr" +echo 'diff-contains-bzr-control-dir' > "${dir}/.bzr/foo" +mkdir "${dir}/{arch}" +echo 'diff-contains-arch-control-dir' > "${dir}/{arch}/foo" +mkdir "${dir}/.git" +echo 'diff-contains-git-control-dir' > "${dir}/.git/foo" +mkdir "${dir}/.hg" +echo 'diff-contains-hg-control-dir' > "${dir}/.hg/foo" +mkdir "${dir}/.be" +echo 'diff-contains-bts-control-dir' > "${dir}/.be/foo" + +echo 'diff-contains-cmake-cache-file' > "${dir}/CMakeCache.txt" +echo 'diff-contains-svn-commit-file' > "${dir}/svn-commit.tmp" +echo 'diff-contains-svk-commit-file' > "${dir}/svk-commit444.tmp" +echo 'diff-contains-arch-inventory-file' > "${dir}/.arch-inventory" +echo 'diff-contains-hg-tags-file' > "${dir}/.hgtags" +echo 'diff-contains-cvs-conflict-copy' > "${dir}/.#foo.1.1" +echo 'diff-contains-svn-conflict-file' > "${dir}/foo.r1352" +echo 'diff-contains-patch-failure-file' > "${dir}/foo.rej" +echo 'diff-contains-editor-backup-file' > "${dir}/foo~" diff --git a/t/recipes/checks/build-systems/cmake/cruft-general-wig-pen/eval/desc b/t/recipes/checks/build-systems/cmake/cruft-general-wig-pen/eval/desc new file mode 100644 index 0000000..e0df7ff --- /dev/null +++ b/t/recipes/checks/build-systems/cmake/cruft-general-wig-pen/eval/desc @@ -0,0 +1,2 @@ +Testname: cruft-general-wig-pen +Check: build-systems/cmake diff --git a/t/recipes/checks/build-systems/cmake/cruft-general-wig-pen/eval/hints b/t/recipes/checks/build-systems/cmake/cruft-general-wig-pen/eval/hints new file mode 100644 index 0000000..00b6c07 --- /dev/null +++ b/t/recipes/checks/build-systems/cmake/cruft-general-wig-pen/eval/hints @@ -0,0 +1 @@ +cruft-general-wig-pen (source): source-contains-cmake-cache-file [debian/CMakeCache.txt] diff --git a/t/recipes/checks/build-systems/cmake/files-package-contains-foo/build-spec/debian/rules b/t/recipes/checks/build-systems/cmake/files-package-contains-foo/build-spec/debian/rules new file mode 100644 index 0000000..8e0b207 --- /dev/null +++ b/t/recipes/checks/build-systems/cmake/files-package-contains-foo/build-spec/debian/rules @@ -0,0 +1,71 @@ +#!/usr/bin/make -f + +PKG :=$(shell dh_listpackages) +SHARE:= debian/$(PKG)/usr/share +DATA := $(SHARE)/$(PKG) +DOC := $(SHARE)/doc/$(PKG) + +%: + dh $@ + +override_dh_install: + dh_install + mkdir -p $(DOC) $(DATA) + + # Vcs stuff + mkdir $(DATA)/.svn $(DATA)/.git + touch $(DATA)/.svn/file + touch $(DATA)/.git/file + touch $(DATA)/.gitignore + touch $(DATA)/.git_ignore + mkdir $(DATA)/sub-git1/ + echo '*.old' | gzip -9n > $(DATA)/sub-git1/.gitignore.gz + touch $(DATA)/sub-git1/.gitattributes + touch $(DATA)/sub-git1/.gitmodules + + touch $(DATA)/svn-commit-yeehaa.tmp + touch $(DATA)/svk-commit-yeehaa.tmp + + # bts control dir + mkdir $(DATA)/.be + touch $(DATA)/.be/file + + # macos stuff + touch $(DATA)/.DS_Store + touch $(DATA)/._stuff + + # windows + touch $(DATA)/Thumbs.db + + # Foreign READMEs + echo "Hallo World Mac" > $(DOC)/README.mac + echo "Hallo World Win" > $(DOC)/README.windows + + # Linda override + mkdir -p $(SHARE)/linda/overrides + touch $(SHARE)/linda/overrides/$(PKG) + + # CMake private files + mkdir -p $(SHARE)/cmake-3.1/Modules + touch $(SHARE)/cmake-3.1/FindFoo.cmake + touch $(SHARE)/cmake-3.1/Modules/FindVar.cmake + + # Ignored Cargo sources + mkdir -p $(SHARE)/cargo/registry/crate-1.0.0/templates + touch $(SHARE)/cargo/registry/crate-1.0.0/.gitignore + touch $(SHARE)/cargo/registry/crate-1.0.0/LICENSE + touch $(SHARE)/cargo/registry/crate-1.0.0/templates/readme.tmpl + mkdir -p $(SHARE)/cargo/registry/crate-1.0.0/foo_templates + touch $(SHARE)/cargo/registry/crate-1.0.0/foo_templates/readme.tmpl + mkdir -p $(SHARE)/cargo/registry/crate-1.0.0/my-templates.d + touch $(SHARE)/cargo/registry/crate-1.0.0/my-templates.d/readme.tmpl + echo '#!/bin/sh' > $(SHARE)/cargo/registry/crate-1.0.0/test.sh + + # Documentation outside /usr/share/doc + touch $(DATA)/readme.txt + touch $(DATA)/readme1.1.txt + touch $(DATA)/readme1.1.txt + touch $(DATA)/readme_1.1.txt + touch $(DATA)/readme-1.1.txt + touch $(DATA)/readmefirst.txt + touch $(DATA)/readMesh_off.m # False-positive from #914500 diff --git a/t/recipes/checks/build-systems/cmake/files-package-contains-foo/build-spec/fill-values b/t/recipes/checks/build-systems/cmake/files-package-contains-foo/build-spec/fill-values new file mode 100644 index 0000000..b55ed53 --- /dev/null +++ b/t/recipes/checks/build-systems/cmake/files-package-contains-foo/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: upload-native +Testname: files-package-contains-foo +Description: Test tags about cruft in binary packages diff --git a/t/recipes/checks/build-systems/cmake/files-package-contains-foo/eval/desc b/t/recipes/checks/build-systems/cmake/files-package-contains-foo/eval/desc new file mode 100644 index 0000000..e0da977 --- /dev/null +++ b/t/recipes/checks/build-systems/cmake/files-package-contains-foo/eval/desc @@ -0,0 +1,2 @@ +Testname: files-package-contains-foo +Check: build-systems/cmake diff --git a/t/recipes/checks/build-systems/cmake/files-package-contains-foo/eval/hints b/t/recipes/checks/build-systems/cmake/files-package-contains-foo/eval/hints new file mode 100644 index 0000000..92de498 --- /dev/null +++ b/t/recipes/checks/build-systems/cmake/files-package-contains-foo/eval/hints @@ -0,0 +1,2 @@ +files-package-contains-foo (binary): package-contains-cmake-private-file [usr/share/cmake-3.1/Modules/FindVar.cmake] +files-package-contains-foo (binary): package-contains-cmake-private-file [usr/share/cmake-3.1/FindFoo.cmake] diff --git a/t/recipes/checks/build-systems/debhelper/maintainer-script/token/legacy-scripts/build-spec/debian/changelog.in b/t/recipes/checks/build-systems/debhelper/maintainer-script/token/legacy-scripts/build-spec/debian/changelog.in new file mode 100644 index 0000000..935c633 --- /dev/null +++ b/t/recipes/checks/build-systems/debhelper/maintainer-script/token/legacy-scripts/build-spec/debian/changelog.in @@ -0,0 +1,41 @@ +scripts ([% $version %]) [% $distribution %]; urgency=low + + * I'm also not able to write my name. + * Added a script in /etc/Xsession.d + * Bizarre version number courtesy of + https://wiki.ubuntu.com/SecurityUpdateProcedures#Prepare + + -- Mark 'HE' Brokschmitt Thu, 23 Jun 2005 14:32:39 +0200 + +scripts (5-1) unstable; urgency=low + + * I'm making a typo in my own name... And I want lintian to warn me about + it. + + -- Jeroen van Wolffelaar Sun, 18 Apr 2004 02:26:34 +0200 + +scripts (4-1) unstable; urgency=low + + * Add new example to check that not executable files with a shebang line + called *in don't trigger the script-not-executable warning. + + -- Marc 'HE' Brockschmidt Wed, 14 Apr 2004 19:44:04 +0200 + +scripts (3-3) unstable; urgency=low + + * Add suidperlfoo and some code in debian/rules to + check the new suidperl checks + + -- Frank Lichtenheld Wed, 31 Mar 2004 21:06:20 +0000 + +scripts (2-1) unstable; urgency=low + + * Add tkfoo script for tk checkings + + -- Lintian Maintainers Sat, 21 Feb 2004 17:13:36 +0100 + +scripts (1-0) unstable; urgency=low + + * Initial version + + -- Lintian Maintainers Sat, 10 Feb 2001 15:37:31 -0800 diff --git a/t/recipes/checks/build-systems/debhelper/maintainer-script/token/legacy-scripts/build-spec/debian/control.in b/t/recipes/checks/build-systems/debhelper/maintainer-script/token/legacy-scripts/build-spec/debian/control.in new file mode 100644 index 0000000..ef39375 --- /dev/null +++ b/t/recipes/checks/build-systems/debhelper/maintainer-script/token/legacy-scripts/build-spec/debian/control.in @@ -0,0 +1,16 @@ +Source: scripts +Section: interpreters +Priority: optional +Maintainer: Lintian Maintainers +Uploaders: Jeroen van Wolfelaar , Marc 'HE' Brockschmidt +Build-Depends-Indep: python3 (>= 3.1), python3 (<< 3.2), dpatch +Standards-Version: 3.2.1 + +Package: scripts +Architecture: [% $package_architecture %] +Depends: test, ruby1.8, build-essential, libssl0.9.7, php7.0-cli +Recommends: tk8.4 | wish +Description: test lintian's script file checks + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. diff --git a/t/recipes/checks/build-systems/debhelper/maintainer-script/token/legacy-scripts/build-spec/debian/copyright b/t/recipes/checks/build-systems/debhelper/maintainer-script/token/legacy-scripts/build-spec/debian/copyright new file mode 100644 index 0000000..ad8a119 --- /dev/null +++ b/t/recipes/checks/build-systems/debhelper/maintainer-script/token/legacy-scripts/build-spec/debian/copyright @@ -0,0 +1,5 @@ +This file contains the phrase "under the same terms as Perl itself" to +trigger warnings about not having common-licenses references. + +This file contains the phrase "public domain" which should suppress +warnings about no copyright date. diff --git a/t/recipes/checks/build-systems/debhelper/maintainer-script/token/legacy-scripts/build-spec/debian/patches/00list b/t/recipes/checks/build-systems/debhelper/maintainer-script/token/legacy-scripts/build-spec/debian/patches/00list new file mode 100644 index 0000000..3b9d37e --- /dev/null +++ b/t/recipes/checks/build-systems/debhelper/maintainer-script/token/legacy-scripts/build-spec/debian/patches/00list @@ -0,0 +1,11 @@ +01_not_here_right_now.dpatch + +# some comment +/* some more + elaborate comment + which needs DPATCH_OPTION_CPP=1 + */02_i_dont_have_a_description.patch 03_specified_without_dpatch + +// and again a comment + +04_i_dont_have_a_description_either.patch diff --git a/t/recipes/checks/build-systems/debhelper/maintainer-script/token/legacy-scripts/build-spec/debian/patches/00list.sparc b/t/recipes/checks/build-systems/debhelper/maintainer-script/token/legacy-scripts/build-spec/debian/patches/00list.sparc new file mode 100644 index 0000000..8b47ab3 --- /dev/null +++ b/t/recipes/checks/build-systems/debhelper/maintainer-script/token/legacy-scripts/build-spec/debian/patches/00list.sparc @@ -0,0 +1 @@ +01_some_other_patch_thats_not_in_the_package.dpatch diff --git a/t/recipes/checks/build-systems/debhelper/maintainer-script/token/legacy-scripts/build-spec/debian/patches/00options b/t/recipes/checks/build-systems/debhelper/maintainer-script/token/legacy-scripts/build-spec/debian/patches/00options new file mode 100644 index 0000000..57ffeb6 --- /dev/null +++ b/t/recipes/checks/build-systems/debhelper/maintainer-script/token/legacy-scripts/build-spec/debian/patches/00options @@ -0,0 +1 @@ +DPATCH_OPTION_CPP=1 diff --git a/t/recipes/checks/build-systems/debhelper/maintainer-script/token/legacy-scripts/build-spec/debian/patches/02_i_dont_have_a_description.patch b/t/recipes/checks/build-systems/debhelper/maintainer-script/token/legacy-scripts/build-spec/debian/patches/02_i_dont_have_a_description.patch new file mode 100644 index 0000000..9279c1b --- /dev/null +++ b/t/recipes/checks/build-systems/debhelper/maintainer-script/token/legacy-scripts/build-spec/debian/patches/02_i_dont_have_a_description.patch @@ -0,0 +1,7 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 02_i_dont_have_a_description.patch.dpatch by Marc 'HE' Brockschmidt > +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: No description. + +@DPATCH@ diff --git a/t/recipes/checks/build-systems/debhelper/maintainer-script/token/legacy-scripts/build-spec/debian/patches/03_specified_without_dpatch.dpatch b/t/recipes/checks/build-systems/debhelper/maintainer-script/token/legacy-scripts/build-spec/debian/patches/03_specified_without_dpatch.dpatch new file mode 100644 index 0000000..8303ac6 --- /dev/null +++ b/t/recipes/checks/build-systems/debhelper/maintainer-script/token/legacy-scripts/build-spec/debian/patches/03_specified_without_dpatch.dpatch @@ -0,0 +1,5 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## All lines beginning with `## DP:' are a description of the patch. +## DP: Listed in 00list without .dpatch suffix. + +@DPATCH@ diff --git a/t/recipes/checks/build-systems/debhelper/maintainer-script/token/legacy-scripts/build-spec/debian/patches/04_i_dont_have_a_description_either.patch b/t/recipes/checks/build-systems/debhelper/maintainer-script/token/legacy-scripts/build-spec/debian/patches/04_i_dont_have_a_description_either.patch new file mode 100644 index 0000000..b603f16 --- /dev/null +++ b/t/recipes/checks/build-systems/debhelper/maintainer-script/token/legacy-scripts/build-spec/debian/patches/04_i_dont_have_a_description_either.patch @@ -0,0 +1,7 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 04_i_dont_have_a_description_either.patch by Adam D. Barratt +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: + +@DPATCH@ diff --git a/t/recipes/checks/build-systems/debhelper/maintainer-script/token/legacy-scripts/build-spec/debian/postinst b/t/recipes/checks/build-systems/debhelper/maintainer-script/token/legacy-scripts/build-spec/debian/postinst new file mode 100644 index 0000000..7c5baf1 --- /dev/null +++ b/t/recipes/checks/build-systems/debhelper/maintainer-script/token/legacy-scripts/build-spec/debian/postinst @@ -0,0 +1,14 @@ +#!/bin/sh + +if [ -x "/etc/init.d/lsb-broken" ] ; then + update-rc.d lsb-broken defaults >/dev/null +fi +if [ -x "/etc/init.d/no-lsb" ] ; then + update-rc.d no-lsb defaults >/dev/null +fi +if [ -x "/etc/init.d/skeleton" ] ; then + update-rc.d skeleton defaults >/dev/null +fi +if [ -x "/etc/init.d/lsb-other" ] ; then + update-rc.d lsb-other defaults >/dev/null +fi diff --git a/t/recipes/checks/build-systems/debhelper/maintainer-script/token/legacy-scripts/build-spec/debian/postrm b/t/recipes/checks/build-systems/debhelper/maintainer-script/token/legacy-scripts/build-spec/debian/postrm new file mode 100644 index 0000000..8fa75a2 --- /dev/null +++ b/t/recipes/checks/build-systems/debhelper/maintainer-script/token/legacy-scripts/build-spec/debian/postrm @@ -0,0 +1,9 @@ +#!/bin/sh -e + +if [ "$1" = purge ] ; then + update-rc.d lsb-broken remove >/dev/null + update-rc.d no-lsb remove >/dev/null + update-rc.d skeleton remove >/dev/null + update-rc.d lsb-other remove >/dev/null + update-rc.d lsb-other remove >/dev/null +fi diff --git a/t/recipes/checks/build-systems/debhelper/maintainer-script/token/legacy-scripts/build-spec/debian/preinst b/t/recipes/checks/build-systems/debhelper/maintainer-script/token/legacy-scripts/build-spec/debian/preinst new file mode 100644 index 0000000..0799557 --- /dev/null +++ b/t/recipes/checks/build-systems/debhelper/maintainer-script/token/legacy-scripts/build-spec/debian/preinst @@ -0,0 +1,15 @@ +#!/bin/sh + +set -e +set -x + +# +# Some comments here +# + +# This serves as an example of an "empty" script, so +# please do not add any real code here, thank you :) + +#DEBHELPER# + +exit 0 diff --git a/t/recipes/checks/build-systems/debhelper/maintainer-script/token/legacy-scripts/build-spec/debian/rules b/t/recipes/checks/build-systems/debhelper/maintainer-script/token/legacy-scripts/build-spec/debian/rules new file mode 100755 index 0000000..dc6b7d5 --- /dev/null +++ b/t/recipes/checks/build-systems/debhelper/maintainer-script/token/legacy-scripts/build-spec/debian/rules @@ -0,0 +1,111 @@ +#!/usr/bin/make -f + +tmp=debian/tmp + +build-arch: + echo "Hi, in an arch: all package, I am a bug!" + +build-indep: + +build: build-arch build-indep + +binary-arch: + echo "Hi, in an arch: all package, I am a bug!" + +binary-indep: + install -d $(tmp)/usr/bin/ + install -d $(tmp)/etc/X11/Xsession.d/ + install -d $(tmp)/etc/init.d/ + install -d $(tmp)/etc/csh/login.d/ + install -d $(tmp)/etc/fish.d/ + install -d $(tmp)/usr/share/scripts/ + install -d $(tmp)/usr/share/doc/scripts/ + install -d $(tmp)/usr/lib/cgi-bin + install -d $(tmp)/usr/src/scripts + install -d $(tmp)/DEBIAN + + install -m 755 csh-foo $(tmp)/etc/csh/login.d/ + install -m 755 envfoo $(tmp)/usr/bin/ + install -m 755 fish-foo $(tmp)/etc/fish.d/ + install -m 755 jruby-broken $(tmp)/usr/bin/ + install -m 755 py3.Xfoo $(tmp)/usr/bin/ +# This uses "env" and should trigger script-in-usr-share-doc + install -m 755 py3.Xfoo $(tmp)/usr/share/doc/scripts/ + install -m 755 py3foo $(tmp)/usr/bin/ +# This uses "env" and should trigger script-in-usr-share-doc + install -m 755 py3foo $(tmp)/usr/share/doc/scripts/ + install -m 755 perlfoo $(tmp)/usr/bin/ + install -m 755 rubyfoo $(tmp)/usr/bin/ +# This doesn't use "env" but should also trigger script-in-usr-share-doc + install -m 755 rubyfoo $(tmp)/usr/share/doc/scripts/ + install -m 755 make-foo $(tmp)/usr/bin/ + install -m 755 lefty-foo $(tmp)/usr/bin/ + install -m 4751 perlfoo $(tmp)/usr/bin/suidperlfoo2 + install -m 755 sh-broken $(tmp)/usr/bin/ + install -m 4555 suidperlfoo $(tmp)/usr/bin/ + install -m 755 tkfoo $(tmp)/usr/bin/ + install -m 755 wishfoo $(tmp)/usr/bin/ + install -m 644 xsession-test $(tmp)/etc/X11/Xsession.d/ + +# Permissions here aren't part of what's being tested, but let us exercise +# some other errors. + install -m 755 perl-bizarre-1 $(tmp)/usr/bin/ + install -m 750 perl-bizarre-2 $(tmp)/usr/bin/ + install -m 754 perl-bizarre-3 $(tmp)/usr/bin/ + install -m 705 guile-bizarre $(tmp)/usr/bin/ + +# First one should produce a warning; second one shouldn't. + install -m 755 gccbug.dpatch $(tmp)/usr/share/scripts/ + install -m 755 gccbug.dpatch $(tmp)/usr/src/scripts/ + + install -m 644 init-skeleton $(tmp)/etc/init.d/skeleton + install -m 755 init-no-lsb $(tmp)/etc/init.d/no-lsb + install -m 755 init-lsb-broken $(tmp)/etc/init.d/lsb-broken + install -m 755 init-lsb-other $(tmp)/etc/init.d/lsb-other + + install -m 755 phpfoo $(tmp)/usr/share/scripts/ + sed 's/php$$/php7.0/' phpfoo > $(tmp)/usr/share/scripts/php7.0foo + chmod 755 $(tmp)/usr/share/scripts/php7.0foo + + install -m 755 phpenvfoo $(tmp)/usr/share/scripts/ + sed 's/php$$/php7.0/' phpenvfoo > $(tmp)/usr/share/scripts/php7.0envfoo + chmod 755 $(tmp)/usr/share/scripts/php7.0envfoo + + echo "#!/usr/bin/perl" >> $(tmp)/usr/share/scripts/foobar.in + chmod 644 $(tmp)/usr/share/scripts/foobar.in + + touch $(tmp)/usr/share/scripts/mono.exe + chmod 755 $(tmp)/usr/share/scripts/mono.exe + + echo "#!/bin/sh" > $(tmp)/usr/share/scripts/foo\$$bar + chmod 755 $(tmp)/usr/share/scripts/foo\$$bar + + echo "#!/bin/sh" > $(tmp)/usr/lib/cgi-bin/cgi-script + chmod 755 $(tmp)/usr/lib/cgi-bin/cgi-script + + echo "#!/bin/sh" > $(tmp)/usr/bin/test.sh + chmod 755 $(tmp)/usr/bin/test.sh + + + dh_testroot # dummy to test missing debhelper dependency + + + install -m 644 debian/changelog $(tmp)/usr/share/doc/scripts/changelog.Debian + gzip -n -9 $(tmp)/usr/share/doc/scripts/changelog.Debian + install -m 644 debian/copyright $(tmp)/usr/share/doc/scripts/copyright + + install -m 644 debian/scripts.conffiles $(tmp)/DEBIAN/conffiles + install -m 755 debian/preinst $(tmp)/DEBIAN/preinst + install -m 755 debian/postinst $(tmp)/DEBIAN/postinst + install -m 755 debian/postrm $(tmp)/DEBIAN/postrm + touch $(tmp)/DEBIAN/prerm + chmod 755 $(tmp)/DEBIAN/prerm + dpkg-gencontrol -isp + dpkg --build $(tmp) .. + +binary: binary-arch binary-indep + +clean: + rm -rf debian/files $(tmp) debian/substvars + +.PHONY: build-arch build-indep build binary-arch binary-indep binary clean diff --git a/t/recipes/checks/build-systems/debhelper/maintainer-script/token/legacy-scripts/build-spec/debian/scripts.conffiles b/t/recipes/checks/build-systems/debhelper/maintainer-script/token/legacy-scripts/build-spec/debian/scripts.conffiles new file mode 100644 index 0000000..01a371a --- /dev/null +++ b/t/recipes/checks/build-systems/debhelper/maintainer-script/token/legacy-scripts/build-spec/debian/scripts.conffiles @@ -0,0 +1,6 @@ +/etc/init.d/lsb-broken +/etc/init.d/lsb-other +/etc/init.d/no-lsb +/etc/X11/Xsession.d/xsession-test +/etc/csh/login.d/csh-foo +/etc/fish.d/fish-foo diff --git a/t/recipes/checks/build-systems/debhelper/maintainer-script/token/legacy-scripts/build-spec/debian/watch b/t/recipes/checks/build-systems/debhelper/maintainer-script/token/legacy-scripts/build-spec/debian/watch new file mode 100644 index 0000000..dba5815 --- /dev/null +++ b/t/recipes/checks/build-systems/debhelper/maintainer-script/token/legacy-scripts/build-spec/debian/watch @@ -0,0 +1,8 @@ +# watch file with upstream version mangling + +version=2 +opts="uversionmangle=s/$/ds/" \ +http://qa.debian.org/watch/sf.php?project=foo scripts\.([\d.]+)\.tar\.gz debian uupdate + +version=3 +http://ftp.sf.net/foo/foo_bar(.+)\.Z 5 uupdate \ No newline at end of file diff --git a/t/recipes/checks/build-systems/debhelper/maintainer-script/token/legacy-scripts/build-spec/fill-values b/t/recipes/checks/build-systems/debhelper/maintainer-script/token/legacy-scripts/build-spec/fill-values new file mode 100644 index 0000000..8a68457 --- /dev/null +++ b/t/recipes/checks/build-systems/debhelper/maintainer-script/token/legacy-scripts/build-spec/fill-values @@ -0,0 +1,6 @@ +Testname: legacy-scripts +Source: scripts +Version: 6ds-1ubuntu0.5.10.1 +Package-Architecture: all +Skeleton: upload-non-native +Description: Legacy test "scripts" diff --git a/t/recipes/checks/build-systems/debhelper/maintainer-script/token/legacy-scripts/build-spec/orig/csh-foo b/t/recipes/checks/build-systems/debhelper/maintainer-script/token/legacy-scripts/build-spec/orig/csh-foo new file mode 100644 index 0000000..eaf47a1 --- /dev/null +++ b/t/recipes/checks/build-systems/debhelper/maintainer-script/token/legacy-scripts/build-spec/orig/csh-foo @@ -0,0 +1,2 @@ +#! /bin/csh + diff --git a/t/recipes/checks/build-systems/debhelper/maintainer-script/token/legacy-scripts/build-spec/orig/envfoo b/t/recipes/checks/build-systems/debhelper/maintainer-script/token/legacy-scripts/build-spec/orig/envfoo new file mode 100755 index 0000000..e005037 --- /dev/null +++ b/t/recipes/checks/build-systems/debhelper/maintainer-script/token/legacy-scripts/build-spec/orig/envfoo @@ -0,0 +1,4 @@ +#! /bin/env python + +if __name__ == '__main__': + print 'Hi there' diff --git a/t/recipes/checks/build-systems/debhelper/maintainer-script/token/legacy-scripts/build-spec/orig/fish-foo b/t/recipes/checks/build-systems/debhelper/maintainer-script/token/legacy-scripts/build-spec/orig/fish-foo new file mode 100644 index 0000000..7f59139 --- /dev/null +++ b/t/recipes/checks/build-systems/debhelper/maintainer-script/token/legacy-scripts/build-spec/orig/fish-foo @@ -0,0 +1,2 @@ +#! /usr/bin/fish + diff --git a/t/recipes/checks/build-systems/debhelper/maintainer-script/token/legacy-scripts/build-spec/orig/gccbug.dpatch b/t/recipes/checks/build-systems/debhelper/maintainer-script/token/legacy-scripts/build-spec/orig/gccbug.dpatch new file mode 100755 index 0000000..65cbf37 --- /dev/null +++ b/t/recipes/checks/build-systems/debhelper/maintainer-script/token/legacy-scripts/build-spec/orig/gccbug.dpatch @@ -0,0 +1,39 @@ +#! /bin/sh -e + +# DP: Use sensible-editor instead of vi as fallback editor + +# Taken from gcc-4.1-source. Chokes bash -n (due to the patch) despite being +# a valid dpatch, so don't warn about it if it's in /usr/src. + +dir= +if [ $# -eq 3 -a "$2" = '-d' ]; then + pdir="-d $3" + dir="$3/" +elif [ $# -ne 1 ]; then + echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" + exit 1 +fi +case "$1" in + -patch) + patch $pdir -f --no-backup-if-mismatch -p0 < $0 + ;; + -unpatch) + patch $pdir -f --no-backup-if-mismatch -R -p0 < $0 + ;; + *) + echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" + exit 1 +esac +exit 0 + +--- gcc/gccbug.in~ 2003-03-01 00:51:42.000000000 +0100 ++++ gcc/gccbug.in 2003-03-02 12:08:36.000000000 +0100 +@@ -134,7 +134,7 @@ + # If they don't have a preferred editor set, then use + if [ -z "$VISUAL" ]; then + if [ -z "$EDITOR" ]; then +- EDIT=vi ++ EDIT=/usr/bin/sensible-editor + else + EDIT="$EDITOR" + fi diff --git a/t/recipes/checks/build-systems/debhelper/maintainer-script/token/legacy-scripts/build-spec/orig/guile-bizarre b/t/recipes/checks/build-systems/debhelper/maintainer-script/token/legacy-scripts/build-spec/orig/guile-bizarre new file mode 100644 index 0000000..70e2c74 --- /dev/null +++ b/t/recipes/checks/build-systems/debhelper/maintainer-script/token/legacy-scripts/build-spec/orig/guile-bizarre @@ -0,0 +1,6 @@ +#! /bin/sh +# -*- scheme -*- +exec guile -s $0 $* +# Seen in the wild as build-guile-gtk in libguilegtk-1.2-dev (0.31-5.1) +# Tests script_is_evil_and_wrong +!# diff --git a/t/recipes/checks/build-systems/debhelper/maintainer-script/token/legacy-scripts/build-spec/orig/init-lsb-broken b/t/recipes/checks/build-systems/debhelper/maintainer-script/token/legacy-scripts/build-spec/orig/init-lsb-broken new file mode 100644 index 0000000..e4dfa92 --- /dev/null +++ b/t/recipes/checks/build-systems/debhelper/maintainer-script/token/legacy-scripts/build-spec/orig/init-lsb-broken @@ -0,0 +1,34 @@ +#! /bin/sh +### BEGIN INIT INFO +# Provides: bad-lsb +# Required-Start: $local_fs $remote_fs +# Required-Stop: +# Default-Start: 1 2 3 4 5 +# Default-Stop: S 0 1 6 X +# Short-Description: Example Lintian initscript +# but this can't be continued +# Description: An example of a bad LSB section in an init script. +# This continuation is allowed (with spaces). +# This one is too (with tabs). +# X-Debian-Foo: Some unknown but valid keyword. +# Foo: Some invalid keyword. + +# Whoops, no terminating line. + +# And then we have this duplicate section. +### BEGIN INIT INFO +# Required-Start: This one doesn't count. +### END INIT INFO + +# Hey, look at all of those missing actions! But stop isn't missing. +case "$1" in + start|stop) + echo "Blah" + ;; + *) + echo "Usage: foo start" >&2 + exit 3 + ;; +esac + +: diff --git a/t/recipes/checks/build-systems/debhelper/maintainer-script/token/legacy-scripts/build-spec/orig/init-lsb-other b/t/recipes/checks/build-systems/debhelper/maintainer-script/token/legacy-scripts/build-spec/orig/init-lsb-other new file mode 100644 index 0000000..adb4795 --- /dev/null +++ b/t/recipes/checks/build-systems/debhelper/maintainer-script/token/legacy-scripts/build-spec/orig/init-lsb-other @@ -0,0 +1,22 @@ +#! /bin/sh +### BEGIN INIT INFO +# Provides: lsb-other +# Required-Start: $local_fs $remote_fs +# Required-Stop: $local_fs $remote_fs +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +# Description: This is another LSB script test, which has a missing +# Short-Description. +### END INIT INFO + +case "$1" in + start|stop|restart|reload|force-reload) + echo "Blah" + ;; + *) + echo "Usage: foo start" >&2 + exit 3 + ;; +esac + +: diff --git a/t/recipes/checks/build-systems/debhelper/maintainer-script/token/legacy-scripts/build-spec/orig/init-no-lsb b/t/recipes/checks/build-systems/debhelper/maintainer-script/token/legacy-scripts/build-spec/orig/init-no-lsb new file mode 100644 index 0000000..6b994dd --- /dev/null +++ b/t/recipes/checks/build-systems/debhelper/maintainer-script/token/legacy-scripts/build-spec/orig/init-no-lsb @@ -0,0 +1,17 @@ +#! /bin/sh +# No LSB section, but otherwise okay. (Well, the messages are bad, but we +# don't check that yet.) + +case "$1" in + start) + echo "Blah starting" + ;; + stop) + echo "Blah stopping" + ;; + restart|force-reload) + echo "Blah restarting" + ;; +esac + +: diff --git a/t/recipes/checks/build-systems/debhelper/maintainer-script/token/legacy-scripts/build-spec/orig/init-skeleton b/t/recipes/checks/build-systems/debhelper/maintainer-script/token/legacy-scripts/build-spec/orig/init-skeleton new file mode 100644 index 0000000..c868508 --- /dev/null +++ b/t/recipes/checks/build-systems/debhelper/maintainer-script/token/legacy-scripts/build-spec/orig/init-skeleton @@ -0,0 +1,150 @@ +#! /bin/sh +### BEGIN INIT INFO +# Provides: skeleton +# Required-Start: $local_fs $remote_fs +# Required-Stop: $local_fs $remote_fs +# Default-Start: 2 3 4 5 +# Default-Stop: S 0 1 6 +# Short-Description: Example Lintian initscript +# Description: This file should be used to construct scripts to be +# placed in /etc/init.d. +### END INIT INFO + +# Do NOT "set -e" + +# PATH should only include /usr/* if it runs after the mountnfs.sh script +PATH=/usr/sbin:/usr/bin:/sbin:/bin +DESC="Description of the service" +NAME=daemonexecutablename +DAEMON=/usr/sbin/$NAME +DAEMON_ARGS="--options args" +PIDFILE=/var/run/$NAME.pid +SCRIPTNAME=/etc/init.d/$NAME + +# Exit if the package is not installed +[ -x "$DAEMON" ] || exit 0 + +# Read configuration variable file if it is present +[ -r /etc/default/$NAME ] && . /etc/default/$NAME + +# Load the VERBOSE setting and other rcS variables +[ -f /etc/default/rcS ] && . /etc/default/rcS + +# Define LSB log_* functions. +# Depend on lsb-base (>= 3.0-6) to ensure that this file is present. +. /lib/lsb/init-functions + +# +# Function that starts the daemon/service +# +do_start() +{ + # Return + # 0 if daemon has been started + # 1 if daemon was already running + # 2 if daemon could not be started + start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON --test > /dev/null \ + || return 1 + start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON -- \ + $DAEMON_ARGS \ + || return 2 + # Add code here, if necessary, that waits for the process to be ready + # to handle requests from services started subsequently which depend + # on this one. As a last resort, sleep for some time. +} + +# +# Function that stops the daemon/service +# +do_stop() +{ + # Return + # 0 if daemon has been stopped + # 1 if daemon was already stopped + # 2 if daemon could not be stopped + # other if a failure occurred + start-stop-daemon --stop --quiet --retry=TERM/30/KILL/5 --pidfile $PIDFILE --name $NAME + RETVAL="$?" + [ "$RETVAL" = 2 ] && return 2 + # Wait for children to finish too if this is a daemon that forks + # and if the daemon is only ever run from this initscript. + # If the above conditions are not satisfied then add some other code + # that waits for the process to drop all resources that could be + # needed by services started subsequently. A last resort is to + # sleep for some time. + start-stop-daemon --stop --quiet --oknodo --retry=0/30/KILL/5 --exec $DAEMON + [ "$?" = 2 ] && return 2 + # Many daemons don't delete their pidfiles when they exit. + rm -f $PIDFILE + return "$RETVAL" +} + +# +# Function that sends a SIGHUP to the daemon/service +# +do_reload() { + # + # If the daemon can reload its configuration without + # restarting (for example, when it is sent a SIGHUP), + # then implement that here. + # + start-stop-daemon --stop --signal 1 --quiet --pidfile $PIDFILE --name $NAME + return 0 +} + +case "$1" in + start) + [ "$VERBOSE" != no ] && log_daemon_msg "Starting $DESC" "$NAME" + do_start + case "$?" in + 0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;; + 2) [ "$VERBOSE" != no ] && log_end_msg 1 ;; + esac + ;; + stop) + [ "$VERBOSE" != no ] && log_daemon_msg "Stopping $DESC" "$NAME" + do_stop + case "$?" in + 0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;; + 2) [ "$VERBOSE" != no ] && log_end_msg 1 ;; + esac + ;; + #reload|force-reload) + # + # If do_reload() is not implemented then leave this commented out + # and leave 'force-reload' as an alias for 'restart'. + # + #log_daemon_msg "Reloading $DESC" "$NAME" + #do_reload + #log_end_msg $? + #;; + restart|force-reload) + # + # If the "reload" option is implemented then remove the + # 'force-reload' alias + # + log_daemon_msg "Restarting $DESC" "$NAME" + do_stop + case "$?" in + 0|1) + do_start + case "$?" in + 0) log_end_msg 0 ;; + 1) log_end_msg 1 ;; # Old process is still running + *) log_end_msg 1 ;; # Failed to start + esac + ;; + *) + # Failed to stop + log_end_msg 1 + ;; + esac + ;; + *) + #echo "Usage: $SCRIPTNAME {start|stop|restart|reload|force-reload}" >&2 + echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload}" >&2 + exit 3 + ;; +esac + +: diff --git a/t/recipes/checks/build-systems/debhelper/maintainer-script/token/legacy-scripts/build-spec/orig/jruby-broken b/t/recipes/checks/build-systems/debhelper/maintainer-script/token/legacy-scripts/build-spec/orig/jruby-broken new file mode 100644 index 0000000..56f574d --- /dev/null +++ b/t/recipes/checks/build-systems/debhelper/maintainer-script/token/legacy-scripts/build-spec/orig/jruby-broken @@ -0,0 +1,2 @@ +#!/usr/bin/jruby +# There's no non-versioned jruby, so this should be an error. diff --git a/t/recipes/checks/build-systems/debhelper/maintainer-script/token/legacy-scripts/build-spec/orig/lefty-foo b/t/recipes/checks/build-systems/debhelper/maintainer-script/token/legacy-scripts/build-spec/orig/lefty-foo new file mode 100644 index 0000000..52c003e --- /dev/null +++ b/t/recipes/checks/build-systems/debhelper/maintainer-script/token/legacy-scripts/build-spec/orig/lefty-foo @@ -0,0 +1,2 @@ +#!/usr/local/bin/lefty + diff --git a/t/recipes/checks/build-systems/debhelper/maintainer-script/token/legacy-scripts/build-spec/orig/make-foo b/t/recipes/checks/build-systems/debhelper/maintainer-script/token/legacy-scripts/build-spec/orig/make-foo new file mode 100644 index 0000000..6b787b5 --- /dev/null +++ b/t/recipes/checks/build-systems/debhelper/maintainer-script/token/legacy-scripts/build-spec/orig/make-foo @@ -0,0 +1,3 @@ +#!/usr/bin/make + + diff --git a/t/recipes/checks/build-systems/debhelper/maintainer-script/token/legacy-scripts/build-spec/orig/perl-bizarre-1 b/t/recipes/checks/build-systems/debhelper/maintainer-script/token/legacy-scripts/build-spec/orig/perl-bizarre-1 new file mode 100644 index 0000000..fc632c8 --- /dev/null +++ b/t/recipes/checks/build-systems/debhelper/maintainer-script/token/legacy-scripts/build-spec/orig/perl-bizarre-1 @@ -0,0 +1,11 @@ +#! /bin/sh +eval '(exit $?0)' && eval 'PERL_BADLANG=x;export PERL_BADLANG;: \ +;exec perl -x -S -- "$0" ${1+"$@"};#'if 0; +eval 'setenv PERL_BADLANG x;exec perl -x -S -- "$0" $argv:q;#'.q+ +#!perl -w +package Htex::a2ping; $0=~/(.*)/s;unshift@INC,'.';do($1);die$@if$@;__END__+if !1; +# This Perl script was generated by JustLib2 at Wed Apr 23 09:14:13 2003. +# Don't touch/remove any lines above; http://www.inf.bme.hu/~pts/justlib + +# The above was actually seen in the wild and stresses the +# script_is_evil_and_wrong test. diff --git a/t/recipes/checks/build-systems/debhelper/maintainer-script/token/legacy-scripts/build-spec/orig/perl-bizarre-2 b/t/recipes/checks/build-systems/debhelper/maintainer-script/token/legacy-scripts/build-spec/orig/perl-bizarre-2 new file mode 100644 index 0000000..afd9cfe --- /dev/null +++ b/t/recipes/checks/build-systems/debhelper/maintainer-script/token/legacy-scripts/build-spec/orig/perl-bizarre-2 @@ -0,0 +1,7 @@ +#!/bin/sh +eval 'exec /usr/bin/perl -wS $0 ${1+"$@"}' + if $running_under_some_shell; + +# I'm someone following perlrun except without using the Perl #! line. +# Now something to choke bash. +while (<>) { if (/%#/) { print } } diff --git a/t/recipes/checks/build-systems/debhelper/maintainer-script/token/legacy-scripts/build-spec/orig/perl-bizarre-3 b/t/recipes/checks/build-systems/debhelper/maintainer-script/token/legacy-scripts/build-spec/orig/perl-bizarre-3 new file mode 100644 index 0000000..44baf75 --- /dev/null +++ b/t/recipes/checks/build-systems/debhelper/maintainer-script/token/legacy-scripts/build-spec/orig/perl-bizarre-3 @@ -0,0 +1,6 @@ +eval '(exit $?0)' && eval 'exec perl -wS $0 ${1+"$@"}' +& eval 'exec /usr/bin/perl -wS $0 $argv:q' + if $running_under_some_shell; + +# More utterly bizarreness from perlrun. This one even doesn't work if +# there's a valid #! line on the first line. I don't understand why.... diff --git a/t/recipes/checks/build-systems/debhelper/maintainer-script/token/legacy-scripts/build-spec/orig/perlfoo b/t/recipes/checks/build-systems/debhelper/maintainer-script/token/legacy-scripts/build-spec/orig/perlfoo new file mode 100644 index 0000000..5b27ed0 --- /dev/null +++ b/t/recipes/checks/build-systems/debhelper/maintainer-script/token/legacy-scripts/build-spec/orig/perlfoo @@ -0,0 +1,3 @@ +#! /usr/bin/perl + +print "Hello, World!"; diff --git a/t/recipes/checks/build-systems/debhelper/maintainer-script/token/legacy-scripts/build-spec/orig/phpenvfoo b/t/recipes/checks/build-systems/debhelper/maintainer-script/token/legacy-scripts/build-spec/orig/phpenvfoo new file mode 100644 index 0000000..cbbfb2e --- /dev/null +++ b/t/recipes/checks/build-systems/debhelper/maintainer-script/token/legacy-scripts/build-spec/orig/phpenvfoo @@ -0,0 +1,7 @@ +#!/usr/bin/env php + + +Dumb PHP script + + + diff --git a/t/recipes/checks/build-systems/debhelper/maintainer-script/token/legacy-scripts/build-spec/orig/phpfoo b/t/recipes/checks/build-systems/debhelper/maintainer-script/token/legacy-scripts/build-spec/orig/phpfoo new file mode 100644 index 0000000..e0595e6 --- /dev/null +++ b/t/recipes/checks/build-systems/debhelper/maintainer-script/token/legacy-scripts/build-spec/orig/phpfoo @@ -0,0 +1,7 @@ +#!/usr/bin/php + + +Dumb PHP script + + + diff --git a/t/recipes/checks/build-systems/debhelper/maintainer-script/token/legacy-scripts/build-spec/orig/py3.Xfoo b/t/recipes/checks/build-systems/debhelper/maintainer-script/token/legacy-scripts/build-spec/orig/py3.Xfoo new file mode 100755 index 0000000..7f105e6 --- /dev/null +++ b/t/recipes/checks/build-systems/debhelper/maintainer-script/token/legacy-scripts/build-spec/orig/py3.Xfoo @@ -0,0 +1,4 @@ +#! /usr/bin/env python3.7 + +if __name__ == '__main__': + print 'Hi there' diff --git a/t/recipes/checks/build-systems/debhelper/maintainer-script/token/legacy-scripts/build-spec/orig/py3foo b/t/recipes/checks/build-systems/debhelper/maintainer-script/token/legacy-scripts/build-spec/orig/py3foo new file mode 100755 index 0000000..02b0444 --- /dev/null +++ b/t/recipes/checks/build-systems/debhelper/maintainer-script/token/legacy-scripts/build-spec/orig/py3foo @@ -0,0 +1,4 @@ +#! /usr/bin/env python3 + +if __name__ == '__main__': + print 'Hi there' diff --git a/t/recipes/checks/build-systems/debhelper/maintainer-script/token/legacy-scripts/build-spec/orig/rubyfoo b/t/recipes/checks/build-systems/debhelper/maintainer-script/token/legacy-scripts/build-spec/orig/rubyfoo new file mode 100644 index 0000000..8024605 --- /dev/null +++ b/t/recipes/checks/build-systems/debhelper/maintainer-script/token/legacy-scripts/build-spec/orig/rubyfoo @@ -0,0 +1,4 @@ +#!/bin/ruby1.8 + +# Ok, that example is really pathetic, but until we have +# some better code in checks/scripts, it will do diff --git a/t/recipes/checks/build-systems/debhelper/maintainer-script/token/legacy-scripts/build-spec/orig/sh-broken b/t/recipes/checks/build-systems/debhelper/maintainer-script/token/legacy-scripts/build-spec/orig/sh-broken new file mode 100644 index 0000000..7b79074 --- /dev/null +++ b/t/recipes/checks/build-systems/debhelper/maintainer-script/token/legacy-scripts/build-spec/orig/sh-broken @@ -0,0 +1,2 @@ +#!/bin/sh +if fi diff --git a/t/recipes/checks/build-systems/debhelper/maintainer-script/token/legacy-scripts/build-spec/orig/suidperlfoo b/t/recipes/checks/build-systems/debhelper/maintainer-script/token/legacy-scripts/build-spec/orig/suidperlfoo new file mode 100644 index 0000000..bcbc471 --- /dev/null +++ b/t/recipes/checks/build-systems/debhelper/maintainer-script/token/legacy-scripts/build-spec/orig/suidperlfoo @@ -0,0 +1,3 @@ +#! /usr/bin/suidperl + +print "Hello, World!"; diff --git a/t/recipes/checks/build-systems/debhelper/maintainer-script/token/legacy-scripts/build-spec/orig/tkfoo b/t/recipes/checks/build-systems/debhelper/maintainer-script/token/legacy-scripts/build-spec/orig/tkfoo new file mode 100755 index 0000000..533595a --- /dev/null +++ b/t/recipes/checks/build-systems/debhelper/maintainer-script/token/legacy-scripts/build-spec/orig/tkfoo @@ -0,0 +1,31 @@ +#!/bin/sh +# +# Insane amount of empty lines and comments + +# +# +# +# + +# +# + +# +# +# + +# +# + +# +# This line makes the next one a comment in Tcl \ +exec wish "$0" -- ${1+"$@"} + +# lintian should not check the following for syntax +# if it detects the line above correctly +# Code snippet taken from eTkTab + +if { [array names prefs keybindings] != "" } { + # Read in the file + array set unparsed_bindings [ read_settings_file $prefs(keybindings)] +} diff --git a/t/recipes/checks/build-systems/debhelper/maintainer-script/token/legacy-scripts/build-spec/orig/wishfoo b/t/recipes/checks/build-systems/debhelper/maintainer-script/token/legacy-scripts/build-spec/orig/wishfoo new file mode 100644 index 0000000..035c9ad --- /dev/null +++ b/t/recipes/checks/build-systems/debhelper/maintainer-script/token/legacy-scripts/build-spec/orig/wishfoo @@ -0,0 +1,4 @@ +#!/usr/bin/wish +# +# This is not actually a wish script, here to force a test of wish +# dependencies. diff --git a/t/recipes/checks/build-systems/debhelper/maintainer-script/token/legacy-scripts/build-spec/orig/xsession-test b/t/recipes/checks/build-systems/debhelper/maintainer-script/token/legacy-scripts/build-spec/orig/xsession-test new file mode 100644 index 0000000..ca49d72 --- /dev/null +++ b/t/recipes/checks/build-systems/debhelper/maintainer-script/token/legacy-scripts/build-spec/orig/xsession-test @@ -0,0 +1,3 @@ +#!/bin/sh + +echo "Foo." diff --git a/t/recipes/checks/build-systems/debhelper/maintainer-script/token/legacy-scripts/build-spec/pre-build b/t/recipes/checks/build-systems/debhelper/maintainer-script/token/legacy-scripts/build-spec/pre-build new file mode 100755 index 0000000..b5649a8 --- /dev/null +++ b/t/recipes/checks/build-systems/debhelper/maintainer-script/token/legacy-scripts/build-spec/pre-build @@ -0,0 +1,5 @@ +#!/bin/sh + +DIR="$1" + +rm -f "$DIR/debian/compat" diff --git a/t/recipes/checks/build-systems/debhelper/maintainer-script/token/legacy-scripts/eval/desc b/t/recipes/checks/build-systems/debhelper/maintainer-script/token/legacy-scripts/eval/desc new file mode 100644 index 0000000..1072404 --- /dev/null +++ b/t/recipes/checks/build-systems/debhelper/maintainer-script/token/legacy-scripts/eval/desc @@ -0,0 +1,2 @@ +Testname: legacy-scripts +Check: build-systems/debhelper/maintainer-script/token diff --git a/t/recipes/checks/build-systems/debhelper/maintainer-script/token/legacy-scripts/eval/hints b/t/recipes/checks/build-systems/debhelper/maintainer-script/token/legacy-scripts/eval/hints new file mode 100644 index 0000000..9fe82fb --- /dev/null +++ b/t/recipes/checks/build-systems/debhelper/maintainer-script/token/legacy-scripts/eval/hints @@ -0,0 +1 @@ +scripts (binary): maintainer-script-has-unexpanded-debhelper-token #DEBHELPER# [preinst:13] diff --git a/t/recipes/checks/build-systems/debhelper/maintainer-script/token/legacy-scripts/eval/post-test b/t/recipes/checks/build-systems/debhelper/maintainer-script/token/legacy-scripts/eval/post-test new file mode 100644 index 0000000..faeef0b --- /dev/null +++ b/t/recipes/checks/build-systems/debhelper/maintainer-script/token/legacy-scripts/eval/post-test @@ -0,0 +1 @@ +s/\(current is ([0-9]+\.)+[0-9]\)/(current is CURRENT)/ diff --git a/t/recipes/checks/build-systems/debhelper/maintainer-script/token/scripts-maintainer-general/build-spec/debian/maintscript b/t/recipes/checks/build-systems/debhelper/maintainer-script/token/scripts-maintainer-general/build-spec/debian/maintscript new file mode 100644 index 0000000..c3dcfac --- /dev/null +++ b/t/recipes/checks/build-systems/debhelper/maintainer-script/token/scripts-maintainer-general/build-spec/debian/maintscript @@ -0,0 +1 @@ +mv_conffile /etc/foo/old.conf /etc/foo/new.conf 0~ diff --git a/t/recipes/checks/build-systems/debhelper/maintainer-script/token/scripts-maintainer-general/build-spec/debian/postinst b/t/recipes/checks/build-systems/debhelper/maintainer-script/token/scripts-maintainer-general/build-spec/debian/postinst new file mode 100755 index 0000000..492f84a --- /dev/null +++ b/t/recipes/checks/build-systems/debhelper/maintainer-script/token/scripts-maintainer-general/build-spec/debian/postinst @@ -0,0 +1,255 @@ +#!/bin/sh + +# This file contains a pile of random junk in maintainer scripts that we +# should be checking for in checks/scripts. Don't put bashisms in this file, +# though; those should go into scripts-bashisms. + +set -e + +print "Hit enter to continue" +read foo + +echo Please use update-rc.d or invoke-rc.d to set up blah blah. + +chown root.root /usr/share/doc/maintainer-scripts/changelog +chown root:root /usr/share/doc/maintainer-scripts/changelog + +# valid +FOO=/tmp +FOO=/var/tmp +: ${FOO:=/tmp} +FOO=`mktemp /tmp/scripts.XXXXXX` +rm "$FOO" +FOO=`tempfile -n/tmp/scripts.tmp` +mkdir /var/tmp/scripts +# invalid +echo foo >>/tmp/scripts.tmp +rm /tmp/scripts.tmp +rmdir /var/tmp/scripts + +# invalid, maintainer-script-hides-init-failure +invoke-rc.d foo start || exit 0 + +# The right way to invoke an rc script +if which invoke-rc.d >/dev/null 2>&1; then + invoke-rc.d package start +else + /etc/init.d/package start +fi + +# Example ucf invocation. +ucf /usr/share/foo/configuration /etc/foo.conf + +# Calling gconftool directly. +gconftool-2 --makefile-install-rule foo.schema + +# Calling gconf-schemas with no dependency. +gconf-schemas --register foo.schema + +# Calling update-xmlcatalog with no dependency. +update-xmlcatalog --add --type system --id "/usr/share/sgml/dtd/foo" \ + --package maintainer-scripts --root + +# Maintainer scripts shouldn't touch /var/lib/dpkg/status. This is the old +# recipe from the dpkg wiki that should be replaced with dpkg-query. +sed -n -e \"/^Conffiles:/,/^[^ ]/{\\\\' /etc/conffile'{s/.* //;p}}\" \ + /var/lib/dpkg/status + +# Don't modify these files. +echo 'broken 6714/tcp' >> /etc/services +cp /nonexistent /etc/protocols +mv /usr/share/doc/rpc /etc/rpc + +# But this is okay. +cp /etc/protocols /etc/protocols.new + +# This is also wrong. +echo 'broken' > /etc/inetd.conf +cp /etc/inetd.conf.new /etc/inetd.conf + +# But this is fine. +cp /etc/inetd.conf /srv/chroot/etc/inetd.conf + +# Deprecated and not allowed except the second one. +install-sgmlcatalog --install package +install-sgmlcatalog --remove package + +# Calling start-stop-daemon directly in an init script. +start-stop-daemon --start --quiet --name foo --startas /usr/bin/foo + +# But stopping it is fine -- we may be working around something else. +start-stop-daemon --stop --quiet --name foo --startas /usr/bin/foo + +# Deprecated chown use with flags. +chown -R root.root /usr/share/doc/maintainer-scripts + +# The first should not trigger an error about a command with a path, but the +# second should. +case $mainscript in + /usr/bin/foo) foobarbaz;; +esac +/usr/bin/baz; echo bar + +# fc-cache shouldn't be called directly, but make sure we don't see it in a +# heredoc. +fc-cache +cat <> /etc/ld.so.conf +( cat /etc/ld.so.conf ; echo '/usr/local/lib' ) > /etc/ld.so.conf.new +mv /etc/ld.so.conf.new /etc/ld.so.conf + +# Further tests for commands with paths in maintainer scripts. The following +# should not trigger a tag (Bug#536397). +chmod `dpkg-statoverride --list /usr/sbin/apache2 | cut -f 3` /usr/sbin/apache2 + +# These, however, should. +true `basename "$0"` `/usr/bin/foo bar` +true `/usr/bin/foo "$0"` + +# This line should not trigger a warning about no dependency on ucf because of +# the || true. (Bug#541372) +ucf -p /etc/sensors3.conf || true + +if false ; then + mknod some thing +fi + +# Calling update alternative --set see #643602 +update-alternatives --set editor /usr/bin/nano + +# false positive +start-stop-daemon--stop --quiet --name foo --startas /usr/bin/foo + +# false positive +start-stop-daemon --quiet --stop --name foo --startas /usr/bin/foo + +# false negative +start-stop-daemon --quiet --start --name foo --startas /usr/bin/foo + +# remove device file +rm /dev/null + +# false positive +rm /dev/shm/test +rm /dev/.hiddenfile + +# adduser system +adduser --system foo +adduser --system foo2 --home /home/foo2 +adduser --system bar --home /var/lib/bar +adduser --home /var/lib/fnord --system fnord +adduser --home /home/fnord2 --system fnord2 + +# other test case for gconftool +/usr/bin/gconftool-2 --makefile-install-rule foo.schema + +# service +service apache2 start + +# adduser through variable +DEVNULL=/dev/null +adduser --system bar1 --home $DEVNULL +adduser --system bar2 --home ${DEVNULL} + +# this is a false positive due to quoting +adduser --system bar2 --home "${DEVNULL}" +adduser --system --ingroup smmta --home "/var/lib/sendmail" \ + --disabled-password \ + --quiet --gecos 'Mail Transfer Agent' smmta; + +# false positive +echo "You can use update-alternatives --config runsystem to select" +echo "the runsystem to use." + +# false negative +DIVERSIONS=`env LC_ALL=C /usr/sbin/dpkg-divert --list | grep -E 'by amule(-utils)?$'` || true +DIVERSIONS=`env LC_ALL="C" /usr/sbin/dpkg-divert --list | grep -E 'by amule(-utils)?$'` || true +DIVERSIONS=`env LC_ALL='C' /usr/sbin/dpkg-divert --list | grep -E 'by amule(-utils)?$'` || true + +if [ ! -x /usr/sbin/dpkg-state-override ] || \ + ! dpkg-state-override > /dev/null +then + true; +fi + +# bad +dpkg-maintscript-helper symlink_to_dir \ + /usr/share/autoconf-archive/html/ \ + ../../autoconf-archive/html \ + 20111221-2~ -- "$@" + +# good +dpkg-maintscript-helper symlink_to_dir \ + /usr/share/autoconf-archive/html \ + ../../autoconf-archive/html \ + 20111221-2~ -- "$@" + +# true positive +adduser --system --quiet --ingroup ntp --no-create-home ntp +adduser festival --quiet --system --ingroup audio --no-create-home + +# detect usage that could be replaced by dpkg-maintscript-helper +if [ -d /usr/share/doc/tworld ]; then + if rmdir /usr/share/doc/tworld 2>/dev/null; then + ln -s tworld-data /usr/share/doc/tworld + fi +fi + +chown root:root /good +chmod 777 /good +chown -R root:root /bad +chown root:root -R /bad +chown root:root --recursive /bad +chown --recursive root:root /bad +chmod -R 777 /bad +chmod 777 -R /bad +chmod 777 --recursive /bad +chmod --recursive 777 /bad +find /bad -maxdepth 2 -type d -exec chown root:root {} \; # (#895370) +find /bad -maxdepth 2 -type d -exec chmod 777 # (#895370) + +echo /var/lib/dpkg/info/other-package.conffiles +echo /var/lib/dpkg/info/other-package.md5sums +echo /var/lib/dpkg/info/other-package.shlibs +echo /var/lib/dpkg/info/other-package.postinst +echo /var/lib/dpkg/info/other-package.preinst +echo /var/lib/dpkg/info/other-package.list +echo /var/lib/dpkg/triggers/other-package + +getent passwd good || true +getent group good || true +getent passwd good || true # grep /etc/passwd false-positive +getent group good || true # grep /etc/group false-positive +grep bad /etc/passwd || true +grep bad /etc/group || true +grep -E bad /etc/passwd || true +grep -E bad /etc/passwd || true +grep -F bad /etc/group || true +grep -F bad /etc/group || true +# grep /etc/passwd false-positive +# grep /etc/group false-positive + +echo $PIUPARTS_TEST # bad +echo ${PIUPARTS_OBJECTS} +echo ${PIUPARTS_PHASE} +echo ${PIUPARTS_DISTRIBUTION} +echo ${PIUPARTS_DISTRIBUTION_NEXT} +echo ${PIUPARTS_DISTRIBUTION_PREV} +echo $PIUPARTS_IS_AWESOME # good + +#DEBHELPER# + +# Automatically added by dh_dummy/12 +true `/usr/bin/false-positive "$0"` +# End automatically added section diff --git a/t/recipes/checks/build-systems/debhelper/maintainer-script/token/scripts-maintainer-general/build-spec/debian/postrm b/t/recipes/checks/build-systems/debhelper/maintainer-script/token/scripts-maintainer-general/build-spec/debian/postrm new file mode 100644 index 0000000..21ce89e --- /dev/null +++ b/t/recipes/checks/build-systems/debhelper/maintainer-script/token/scripts-maintainer-general/build-spec/debian/postrm @@ -0,0 +1,9 @@ +#!/bin/sh +# we do not set -e + +echo "ok" > /dev/null + +# not allowed +update-alternatives --remove foo + +#DEBHELPER# \ No newline at end of file diff --git a/t/recipes/checks/build-systems/debhelper/maintainer-script/token/scripts-maintainer-general/build-spec/debian/prerm b/t/recipes/checks/build-systems/debhelper/maintainer-script/token/scripts-maintainer-general/build-spec/debian/prerm new file mode 100644 index 0000000..fcbd64e --- /dev/null +++ b/t/recipes/checks/build-systems/debhelper/maintainer-script/token/scripts-maintainer-general/build-spec/debian/prerm @@ -0,0 +1,11 @@ +#!/bin/sh + +set -e + +# This script should fail a syntax check + +if [ "$1" = configure ] then # oh look - I forgot a ; + echo "Hallo world" +fi + +#DEBHELPER# diff --git a/t/recipes/checks/build-systems/debhelper/maintainer-script/token/scripts-maintainer-general/build-spec/debian/rules b/t/recipes/checks/build-systems/debhelper/maintainer-script/token/scripts-maintainer-general/build-spec/debian/rules new file mode 100644 index 0000000..6f66b82 --- /dev/null +++ b/t/recipes/checks/build-systems/debhelper/maintainer-script/token/scripts-maintainer-general/build-spec/debian/rules @@ -0,0 +1,8 @@ +#!/usr/bin/make -f + +%: + dh $@ + +override_dh_installdeb: + dh_installdeb + echo "#DEBHELPER#" >> debian/$(shell dh_listpackages)/DEBIAN/postinst diff --git a/t/recipes/checks/build-systems/debhelper/maintainer-script/token/scripts-maintainer-general/build-spec/fill-values b/t/recipes/checks/build-systems/debhelper/maintainer-script/token/scripts-maintainer-general/build-spec/fill-values new file mode 100644 index 0000000..111edec --- /dev/null +++ b/t/recipes/checks/build-systems/debhelper/maintainer-script/token/scripts-maintainer-general/build-spec/fill-values @@ -0,0 +1,4 @@ +Skeleton: upload-native +Testname: scripts-maintainer-general +Distribution: precise +Description: Check general problems in maintainer scripts diff --git a/t/recipes/checks/build-systems/debhelper/maintainer-script/token/scripts-maintainer-general/eval/desc b/t/recipes/checks/build-systems/debhelper/maintainer-script/token/scripts-maintainer-general/eval/desc new file mode 100644 index 0000000..09af74a --- /dev/null +++ b/t/recipes/checks/build-systems/debhelper/maintainer-script/token/scripts-maintainer-general/eval/desc @@ -0,0 +1,5 @@ +Testname: scripts-maintainer-general +Profile: ubuntu/main +Check: build-systems/debhelper/maintainer-script/token +See-Also: + Bug#532984 diff --git a/t/recipes/checks/build-systems/debhelper/maintainer-script/token/scripts-maintainer-general/eval/hints b/t/recipes/checks/build-systems/debhelper/maintainer-script/token/scripts-maintainer-general/eval/hints new file mode 100644 index 0000000..bdf2623 --- /dev/null +++ b/t/recipes/checks/build-systems/debhelper/maintainer-script/token/scripts-maintainer-general/eval/hints @@ -0,0 +1 @@ +scripts-maintainer-general (binary): maintainer-script-has-unexpanded-debhelper-token #DEBHELPER# [postinst:259] diff --git a/t/recipes/checks/build-systems/libtool/la-file/shared-libs-la-files/build-spec/debian/install b/t/recipes/checks/build-systems/libtool/la-file/shared-libs-la-files/build-spec/debian/install new file mode 100644 index 0000000..fdf1d81 --- /dev/null +++ b/t/recipes/checks/build-systems/libtool/la-file/shared-libs-la-files/build-spec/debian/install @@ -0,0 +1,4 @@ +dependency_libs.la usr/lib +kio_locate.la usr/lib/kde3 +trailing-slash.la usr/lib/lintian +_python_module.la usr/share/pyshared diff --git a/t/recipes/checks/build-systems/libtool/la-file/shared-libs-la-files/build-spec/debian/links b/t/recipes/checks/build-systems/libtool/la-file/shared-libs-la-files/build-spec/debian/links new file mode 100644 index 0000000..c34baaf --- /dev/null +++ b/t/recipes/checks/build-systems/libtool/la-file/shared-libs-la-files/build-spec/debian/links @@ -0,0 +1 @@ +var/lib/kde3/kio_locate.la var/lib/kde3/foo.la diff --git a/t/recipes/checks/build-systems/libtool/la-file/shared-libs-la-files/build-spec/fill-values b/t/recipes/checks/build-systems/libtool/la-file/shared-libs-la-files/build-spec/fill-values new file mode 100644 index 0000000..44b70c6 --- /dev/null +++ b/t/recipes/checks/build-systems/libtool/la-file/shared-libs-la-files/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: upload-native +Testname: shared-libs-la-files +Description: Test checks related to libtool .la files diff --git a/t/recipes/checks/build-systems/libtool/la-file/shared-libs-la-files/build-spec/orig/Makefile b/t/recipes/checks/build-systems/libtool/la-file/shared-libs-la-files/build-spec/orig/Makefile new file mode 100644 index 0000000..b490041 --- /dev/null +++ b/t/recipes/checks/build-systems/libtool/la-file/shared-libs-la-files/build-spec/orig/Makefile @@ -0,0 +1,9 @@ +LA_FILES:=kio_locate.la _python_module.la trailing-slash.la dependency_libs.la + +%.la: %.txt + cp "$<" "$@" + +all: $(LA_FILES) + +clean: + rm -f $(LA_FILES) diff --git a/t/recipes/checks/build-systems/libtool/la-file/shared-libs-la-files/build-spec/orig/_python_module.txt b/t/recipes/checks/build-systems/libtool/la-file/shared-libs-la-files/build-spec/orig/_python_module.txt new file mode 100644 index 0000000..6b425c0 --- /dev/null +++ b/t/recipes/checks/build-systems/libtool/la-file/shared-libs-la-files/build-spec/orig/_python_module.txt @@ -0,0 +1,12 @@ +dlname='_python_module.so' +library_names='_python_module.so' +old_library='' +dependency_libs='' +current=0 +age=0 +revision=0 +installed=yes +shouldnotlink=no +dlopen='' +dlpreopen='' +libdir='/usr/lib/python2.5/site-packages' diff --git a/t/recipes/checks/build-systems/libtool/la-file/shared-libs-la-files/build-spec/orig/dependency_libs.txt b/t/recipes/checks/build-systems/libtool/la-file/shared-libs-la-files/build-spec/orig/dependency_libs.txt new file mode 100644 index 0000000..34b0863 --- /dev/null +++ b/t/recipes/checks/build-systems/libtool/la-file/shared-libs-la-files/build-spec/orig/dependency_libs.txt @@ -0,0 +1,15 @@ +# Generated by ltmain.sh - GNU libtool 1.5.18 - (pwn3d by bksys) +# +# +dlname='dependency_libs.so' +library_names='dependency_libs.so' +old_library='' +dependency_libs='/usr/lib/libdep.la' +current=0 +age=0 +revision=0 +installed=yes +shouldnotlink=no +dlopen='' +dlpreopen='' +libdir='/usr/lib' diff --git a/t/recipes/checks/build-systems/libtool/la-file/shared-libs-la-files/build-spec/orig/kio_locate.txt b/t/recipes/checks/build-systems/libtool/la-file/shared-libs-la-files/build-spec/orig/kio_locate.txt new file mode 100644 index 0000000..4391635 --- /dev/null +++ b/t/recipes/checks/build-systems/libtool/la-file/shared-libs-la-files/build-spec/orig/kio_locate.txt @@ -0,0 +1,15 @@ +# Generated by ltmain.sh - GNU libtool 1.5.18 - (pwn3d by bksys) +# +# +dlname='kio_locate.so' +library_names='kio_locate.so kio_locate.so kio_locate.so' +old_library='' +dependency_libs='' +current=0 +age=0 +revision=0 +installed=yes +shouldnotlink=no +dlopen='' +dlpreopen='' +libdir='/build/buildd/kio-locate-0.4.5+ds/debian/kio-locate/usr/lib/kde3' \ No newline at end of file diff --git a/t/recipes/checks/build-systems/libtool/la-file/shared-libs-la-files/build-spec/orig/trailing-slash.txt b/t/recipes/checks/build-systems/libtool/la-file/shared-libs-la-files/build-spec/orig/trailing-slash.txt new file mode 100644 index 0000000..736610e --- /dev/null +++ b/t/recipes/checks/build-systems/libtool/la-file/shared-libs-la-files/build-spec/orig/trailing-slash.txt @@ -0,0 +1,12 @@ +dlname='trailing-slash.so' +library_names='trailing-slash.so' +old_library='' +dependency_libs='' +current=0 +age=0 +revision=0 +installed=yes +shouldnotlink=no +dlopen='' +dlpreopen='' +libdir='/usr/lib/lintian/' diff --git a/t/recipes/checks/build-systems/libtool/la-file/shared-libs-la-files/eval/desc b/t/recipes/checks/build-systems/libtool/la-file/shared-libs-la-files/eval/desc new file mode 100644 index 0000000..280c5ed --- /dev/null +++ b/t/recipes/checks/build-systems/libtool/la-file/shared-libs-la-files/eval/desc @@ -0,0 +1,2 @@ +Testname: shared-libs-la-files +Check: build-systems/libtool/la-file diff --git a/t/recipes/checks/build-systems/libtool/la-file/shared-libs-la-files/eval/hints b/t/recipes/checks/build-systems/libtool/la-file/shared-libs-la-files/eval/hints new file mode 100644 index 0000000..cf80cd0 --- /dev/null +++ b/t/recipes/checks/build-systems/libtool/la-file/shared-libs-la-files/eval/hints @@ -0,0 +1,2 @@ +shared-libs-la-files (binary): non-empty-dependency_libs-in-la-file /usr/lib/libdep.la [usr/lib/dependency_libs.la:7] +shared-libs-la-files (binary): incorrect-libdir-in-la-file build/buildd/kio-locate-0.4.5+ds/debian/kio-locate/usr/lib/kde3/ != usr/lib/kde3/ [usr/lib/kde3/kio_locate.la:15] diff --git a/t/recipes/checks/build-systems/waf/cruft-contains-waf-stripped/build-spec/fill-values b/t/recipes/checks/build-systems/waf/cruft-contains-waf-stripped/build-spec/fill-values new file mode 100644 index 0000000..b25f0cb --- /dev/null +++ b/t/recipes/checks/build-systems/waf/cruft-contains-waf-stripped/build-spec/fill-values @@ -0,0 +1,3 @@ +Testname: cruft-contains-waf-stripped +Skeleton: upload-non-native +Description: Check for sources with waf diff --git a/t/recipes/checks/build-systems/waf/cruft-contains-waf-stripped/build-spec/orig/waf b/t/recipes/checks/build-systems/waf/cruft-contains-waf-stripped/build-spec/orig/waf new file mode 100644 index 0000000..1f95f10 --- /dev/null +++ b/t/recipes/checks/build-systems/waf/cruft-contains-waf-stripped/build-spec/orig/waf @@ -0,0 +1,15 @@ +#!/usr/bin/python3 +# encoding: ISO-8859-1 +# + +# We just do a little python... for the show + +import os, sys +if sys.hexversion<0x203000f: raise ImportError("Waf requires python >= 2.3") + # and we are pretending to be a waf script + +# okay, that's enough... + +#==> +# Here one would expect to find a tar.bz2 file... +#<== diff --git a/t/recipes/checks/build-systems/waf/cruft-contains-waf-stripped/eval/desc b/t/recipes/checks/build-systems/waf/cruft-contains-waf-stripped/eval/desc new file mode 100644 index 0000000..7cd19ad --- /dev/null +++ b/t/recipes/checks/build-systems/waf/cruft-contains-waf-stripped/eval/desc @@ -0,0 +1,3 @@ +Testname: cruft-contains-waf-stripped +Test-Against: source-contains-waf-binary +Check: build-systems/waf diff --git a/t/recipes/checks/build-systems/waf/cruft-contains-waf-stripped/eval/hints b/t/recipes/checks/build-systems/waf/cruft-contains-waf-stripped/eval/hints new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/t/recipes/checks/build-systems/waf/cruft-contains-waf-stripped/eval/hints @@ -0,0 +1 @@ + diff --git a/t/recipes/checks/build-systems/waf/cruft-contains-waf/build-spec/fill-values b/t/recipes/checks/build-systems/waf/cruft-contains-waf/build-spec/fill-values new file mode 100644 index 0000000..772b2f0 --- /dev/null +++ b/t/recipes/checks/build-systems/waf/cruft-contains-waf/build-spec/fill-values @@ -0,0 +1,3 @@ +Testname: cruft-contains-waf +Skeleton: upload-non-native +Description: Check for sources with waf diff --git a/t/recipes/checks/build-systems/waf/cruft-contains-waf/build-spec/orig/some-source.c b/t/recipes/checks/build-systems/waf/cruft-contains-waf/build-spec/orig/some-source.c new file mode 100644 index 0000000..6691108 --- /dev/null +++ b/t/recipes/checks/build-systems/waf/cruft-contains-waf/build-spec/orig/some-source.c @@ -0,0 +1,5 @@ +int fun(int a) { + /* There is a valid use for this... probably */ + return (a * a) >> a; +} + diff --git a/t/recipes/checks/build-systems/waf/cruft-contains-waf/build-spec/orig/waf.in b/t/recipes/checks/build-systems/waf/cruft-contains-waf/build-spec/orig/waf.in new file mode 100644 index 0000000..4fc0412 --- /dev/null +++ b/t/recipes/checks/build-systems/waf/cruft-contains-waf/build-spec/orig/waf.in @@ -0,0 +1,13 @@ +#!/usr/bin/python3 +# encoding: ISO-8859-1 +# + +# We just do a little python... for the show + +import os, sys +if sys.hexversion<0x203000f: raise ImportError("Waf requires python >= 2.3") + # and we are pretending to be a waf script + +# okay, that's enough... below we will include a binary tarball... +# That is as fun as it sounds (which is to say not a lot). + diff --git a/t/recipes/checks/build-systems/waf/cruft-contains-waf/build-spec/pre-upstream b/t/recipes/checks/build-systems/waf/cruft-contains-waf/build-spec/pre-upstream new file mode 100755 index 0000000..12db812 --- /dev/null +++ b/t/recipes/checks/build-systems/waf/cruft-contains-waf/build-spec/pre-upstream @@ -0,0 +1,18 @@ +#!/bin/sh +# +# Time to create a waf binary... + +set -e + +dir="$1" + +cd "$dir" + +tar cjf waf-bin.tar.bz2 some-source.c +cp waf.in waf +echo "#==>" >> waf +echo -n "#" >> waf +perl -pe 's,\n,\#\*,go; s,\r,\#\%,go;' waf-bin.tar.bz2 >> waf +echo >> waf +echo "#<==" >> waf +rm waf-bin.tar.bz2 diff --git a/t/recipes/checks/build-systems/waf/cruft-contains-waf/eval/desc b/t/recipes/checks/build-systems/waf/cruft-contains-waf/eval/desc new file mode 100644 index 0000000..2a6e758 --- /dev/null +++ b/t/recipes/checks/build-systems/waf/cruft-contains-waf/eval/desc @@ -0,0 +1,2 @@ +Testname: cruft-contains-waf +Check: build-systems/waf diff --git a/t/recipes/checks/build-systems/waf/cruft-contains-waf/eval/hints b/t/recipes/checks/build-systems/waf/cruft-contains-waf/eval/hints new file mode 100644 index 0000000..4ae22a2 --- /dev/null +++ b/t/recipes/checks/build-systems/waf/cruft-contains-waf/eval/hints @@ -0,0 +1 @@ +cruft-contains-waf (source): source-contains-waf-binary [waf] diff --git a/t/recipes/checks/changes-file/changed-by-localhost/eval/hints b/t/recipes/checks/changes-file/changed-by-localhost/eval/hints new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/t/recipes/checks/changes-file/changed-by-localhost/eval/hints @@ -0,0 +1 @@ + diff --git a/t/recipes/checks/changes-file/changed-by-malformed/eval/hints b/t/recipes/checks/changes-file/changed-by-malformed/eval/hints new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/t/recipes/checks/changes-file/changed-by-malformed/eval/hints @@ -0,0 +1 @@ + diff --git a/t/recipes/checks/changes-file/changed-by-no-name/eval/hints b/t/recipes/checks/changes-file/changed-by-no-name/eval/hints new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/t/recipes/checks/changes-file/changed-by-no-name/eval/hints @@ -0,0 +1 @@ + diff --git a/t/recipes/checks/changes-file/changed-by-root-email/eval/hints b/t/recipes/checks/changes-file/changed-by-root-email/eval/hints new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/t/recipes/checks/changes-file/changed-by-root-email/eval/hints @@ -0,0 +1 @@ + diff --git a/t/recipes/checks/changes-file/changed-by-root/eval/hints b/t/recipes/checks/changes-file/changed-by-root/eval/hints new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/t/recipes/checks/changes-file/changed-by-root/eval/hints @@ -0,0 +1 @@ + diff --git a/t/recipes/checks/changes-file/changes-bad-ubuntu-distribution/eval/hints b/t/recipes/checks/changes-file/changes-bad-ubuntu-distribution/eval/hints new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/t/recipes/checks/changes-file/changes-bad-ubuntu-distribution/eval/hints @@ -0,0 +1 @@ + diff --git a/t/recipes/checks/changes-file/changes-distribution-mismatch/eval/hints b/t/recipes/checks/changes-file/changes-distribution-mismatch/eval/hints new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/t/recipes/checks/changes-file/changes-distribution-mismatch/eval/hints @@ -0,0 +1 @@ + diff --git a/t/recipes/checks/changes-file/changes-experimental-mismatch/eval/hints b/t/recipes/checks/changes-file/changes-experimental-mismatch/eval/hints new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/t/recipes/checks/changes-file/changes-experimental-mismatch/eval/hints @@ -0,0 +1 @@ + diff --git a/t/recipes/checks/changes-file/changes-file-bad-section/build-spec/fill-values b/t/recipes/checks/changes-file/changes-file-bad-section/build-spec/fill-values new file mode 100644 index 0000000..ecce948 --- /dev/null +++ b/t/recipes/checks/changes-file/changes-file-bad-section/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: changes +Testname: changes-file-bad-section +Description: Test for bad section in changes file diff --git a/t/recipes/checks/changes-file/changes-file-bad-section/build-spec/referenced-files/__some-file__ b/t/recipes/checks/changes-file/changes-file-bad-section/build-spec/referenced-files/__some-file__ new file mode 100644 index 0000000..336f590 --- /dev/null +++ b/t/recipes/checks/changes-file/changes-file-bad-section/build-spec/referenced-files/__some-file__ @@ -0,0 +1 @@ +Hallo World diff --git a/t/recipes/checks/changes-file/changes-file-bad-section/build-spec/test.changes.in b/t/recipes/checks/changes-file/changes-file-bad-section/build-spec/test.changes.in new file mode 100644 index 0000000..721e067 --- /dev/null +++ b/t/recipes/checks/changes-file/changes-file-bad-section/build-spec/test.changes.in @@ -0,0 +1,18 @@ +Format: 1.8 +Date: [% $date %] +Source: [% $source %] +Binary: [% $source %] +Architecture: source all +Version: [% $version %] +Distribution: unstable +Urgency: low +Maintainer: [% $author %] +Changed-By: [% $author %] +Files: + 8de2b87704ef0a11144b57d243db88ec 12 non-free optional __some-file__ +Checksums-Sha1: + c54c65218154f15c32ca252946786e0ad09aa99b 12 __some-file__ +Checksums-Sha256: + e6c1396639c0b79bebc94e4448cfe2700b871d45d0d38d98df6ee9da3f09d35c 12 __some-file__ +Description: + [% $source %] - [% $description %] diff --git a/t/recipes/checks/changes-file/changes-file-bad-section/eval/desc b/t/recipes/checks/changes-file/changes-file-bad-section/eval/desc new file mode 100644 index 0000000..50b8d02 --- /dev/null +++ b/t/recipes/checks/changes-file/changes-file-bad-section/eval/desc @@ -0,0 +1,2 @@ +Testname: changes-file-bad-section +Check: changes-file diff --git a/t/recipes/checks/changes-file/changes-file-bad-section/eval/hints b/t/recipes/checks/changes-file/changes-file-bad-section/eval/hints new file mode 100644 index 0000000..bb1591b --- /dev/null +++ b/t/recipes/checks/changes-file/changes-file-bad-section/eval/hints @@ -0,0 +1 @@ +changes-file-bad-section (changes): bad-section-in-changes-file __some-file__ non-free diff --git a/t/recipes/checks/changes-file/changes-file-size-checksum-mismatch/build-spec/fill-values b/t/recipes/checks/changes-file/changes-file-size-checksum-mismatch/build-spec/fill-values new file mode 100644 index 0000000..74f84be --- /dev/null +++ b/t/recipes/checks/changes-file/changes-file-size-checksum-mismatch/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: changes +Testname: changes-file-size-checksum-mismatch +Description: Test for file size and checksums check diff --git a/t/recipes/checks/changes-file/changes-file-size-checksum-mismatch/build-spec/referenced-files/__some-file__ b/t/recipes/checks/changes-file/changes-file-size-checksum-mismatch/build-spec/referenced-files/__some-file__ new file mode 100644 index 0000000..336f590 --- /dev/null +++ b/t/recipes/checks/changes-file/changes-file-size-checksum-mismatch/build-spec/referenced-files/__some-file__ @@ -0,0 +1 @@ +Hallo World diff --git a/t/recipes/checks/changes-file/changes-file-size-checksum-mismatch/build-spec/test.changes.in b/t/recipes/checks/changes-file/changes-file-size-checksum-mismatch/build-spec/test.changes.in new file mode 100644 index 0000000..c61138b --- /dev/null +++ b/t/recipes/checks/changes-file/changes-file-size-checksum-mismatch/build-spec/test.changes.in @@ -0,0 +1,18 @@ +Format: 1.8 +Date: [% $date %] +Source: [% $source %] +Binary: [% $source %] +Architecture: source all +Version: [% $version %] +Distribution: unstable +Urgency: low +Maintainer: [% $author %] +Changed-By: [% $author %] +Files: + d41d8cd98f00b204e9800998ecf8427e 0 devel optional __some-file__ +Checksums-Sha1: + da39a3ee5e6b4b0d3255bfef95601890afd80709 0 __some-file__ +Checksums-Sha256: + e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 0 __some-file__ +Description: + [% $source %] - [% $description %] diff --git a/t/recipes/checks/changes-file/changes-file-size-checksum-mismatch/eval/desc b/t/recipes/checks/changes-file/changes-file-size-checksum-mismatch/eval/desc new file mode 100644 index 0000000..0a4c5d0 --- /dev/null +++ b/t/recipes/checks/changes-file/changes-file-size-checksum-mismatch/eval/desc @@ -0,0 +1,2 @@ +Testname: changes-file-size-checksum-mismatch +Check: changes-file diff --git a/t/recipes/checks/changes-file/changes-file-size-checksum-mismatch/eval/hints b/t/recipes/checks/changes-file/changes-file-size-checksum-mismatch/eval/hints new file mode 100644 index 0000000..f614fbe --- /dev/null +++ b/t/recipes/checks/changes-file/changes-file-size-checksum-mismatch/eval/hints @@ -0,0 +1,4 @@ +changes-file-size-checksum-mismatch (changes): file-size-mismatch-in-changes-file __some-file__ 0 != 12 +changes-file-size-checksum-mismatch (changes): checksum-mismatch-in-changes-file Checksum-Sha256 __some-file__ +changes-file-size-checksum-mismatch (changes): checksum-mismatch-in-changes-file Checksum-Sha1 __some-file__ +changes-file-size-checksum-mismatch (changes): checksum-mismatch-in-changes-file Checksum-Md5 __some-file__ diff --git a/t/recipes/checks/changes-file/changes-files-package-builds-dbg-and-dbgsym-variants/build-spec/debian/control.in b/t/recipes/checks/changes-file/changes-files-package-builds-dbg-and-dbgsym-variants/build-spec/debian/control.in new file mode 100644 index 0000000..0312410 --- /dev/null +++ b/t/recipes/checks/changes-file/changes-files-package-builds-dbg-and-dbgsym-variants/build-spec/debian/control.in @@ -0,0 +1,36 @@ +Source: [% $source %] +Section: [% $section %] +Priority: optional +Maintainer: [% $author %] +Standards-Version: [% $standards_version %] +Build-Depends: [% $build_depends %] +Rules-Requires-Root: no + +Package: [% $source %] +Architecture: [% $package_architecture %] +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: [% $description %] + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. + +Package: [% $source %]-dbg +Section: debug +Architecture: all +Depends: [% $source %], ${shlibs:Depends}, ${misc:Depends} +Description: Manual dbg package + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It + may be an empty package. + +Package: [% $source %]-dbgsym +Section: debug +Architecture: all +Depends: [% $source %], ${shlibs:Depends}, ${misc:Depends} +Description: Manual dbgsym package + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + even be an empty package. diff --git a/t/recipes/checks/changes-file/changes-files-package-builds-dbg-and-dbgsym-variants/build-spec/fill-values b/t/recipes/checks/changes-file/changes-files-package-builds-dbg-and-dbgsym-variants/build-spec/fill-values new file mode 100644 index 0000000..4d83180 --- /dev/null +++ b/t/recipes/checks/changes-file/changes-files-package-builds-dbg-and-dbgsym-variants/build-spec/fill-values @@ -0,0 +1,4 @@ +Skeleton: upload-native +Testname: changes-files-package-builds-dbg-and-dbgsym-variants +Package-Architecture: any +Description: Package builds -dbg and -dbgsym diff --git a/t/recipes/checks/changes-file/changes-files-package-builds-dbg-and-dbgsym-variants/eval/desc b/t/recipes/checks/changes-file/changes-files-package-builds-dbg-and-dbgsym-variants/eval/desc new file mode 100644 index 0000000..5f66600 --- /dev/null +++ b/t/recipes/checks/changes-file/changes-files-package-builds-dbg-and-dbgsym-variants/eval/desc @@ -0,0 +1,2 @@ +Testname: changes-files-package-builds-dbg-and-dbgsym-variants +Check: changes-file diff --git a/t/recipes/checks/changes-file/changes-files-package-builds-dbg-and-dbgsym-variants/eval/hints b/t/recipes/checks/changes-file/changes-files-package-builds-dbg-and-dbgsym-variants/eval/hints new file mode 100644 index 0000000..3a2ae57 --- /dev/null +++ b/t/recipes/checks/changes-file/changes-files-package-builds-dbg-and-dbgsym-variants/eval/hints @@ -0,0 +1 @@ +changes-files-package-builds-dbg-and-dbgsym-variants (changes): package-builds-dbg-and-dbgsym-variants changes-files-package-builds-dbg-and-dbgsym-variants-dbg changes-files-package-builds-dbg-and-dbgsym-variants-dbgsym diff --git a/t/recipes/checks/changes-file/changes-missing-fields/eval/hints b/t/recipes/checks/changes-file/changes-missing-fields/eval/hints new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/t/recipes/checks/changes-file/changes-missing-fields/eval/hints @@ -0,0 +1 @@ + diff --git a/t/recipes/checks/changes-file/changes-missing-format/eval/hints b/t/recipes/checks/changes-file/changes-missing-format/eval/hints new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/t/recipes/checks/changes-file/changes-missing-format/eval/hints @@ -0,0 +1 @@ + diff --git a/t/recipes/checks/changes-file/changes-unreleased/eval/hints b/t/recipes/checks/changes-file/changes-unreleased/eval/hints new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/t/recipes/checks/changes-file/changes-unreleased/eval/hints @@ -0,0 +1 @@ + diff --git a/t/recipes/checks/changes-file/changes-upload-has-backports-version-number/eval/hints b/t/recipes/checks/changes-file/changes-upload-has-backports-version-number/eval/hints new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/t/recipes/checks/changes-file/changes-upload-has-backports-version-number/eval/hints @@ -0,0 +1 @@ + diff --git a/t/recipes/checks/changes-file/checksum-count-mismatch/build-spec/fill-values b/t/recipes/checks/changes-file/checksum-count-mismatch/build-spec/fill-values new file mode 100644 index 0000000..3fe5f1f --- /dev/null +++ b/t/recipes/checks/changes-file/checksum-count-mismatch/build-spec/fill-values @@ -0,0 +1,3 @@ +Testname: checksum-count-mismatch +Skeleton: upload-native +Description: Check for changes file with missing checksum entry diff --git a/t/recipes/checks/changes-file/checksum-count-mismatch/build-spec/post-build.in b/t/recipes/checks/changes-file/checksum-count-mismatch/build-spec/post-build.in new file mode 100755 index 0000000..4665a7a --- /dev/null +++ b/t/recipes/checks/changes-file/checksum-count-mismatch/build-spec/post-build.in @@ -0,0 +1,3 @@ +#!/bin/sh + +perl -0777 -pi -e 's/(\nChecksums-Sha256:\n)[^\n]*\n/$1/' [% $build_product %] diff --git a/t/recipes/checks/changes-file/checksum-count-mismatch/eval/desc b/t/recipes/checks/changes-file/checksum-count-mismatch/eval/desc new file mode 100644 index 0000000..5866afe --- /dev/null +++ b/t/recipes/checks/changes-file/checksum-count-mismatch/eval/desc @@ -0,0 +1,2 @@ +Testname: checksum-count-mismatch +Check: changes-file diff --git a/t/recipes/checks/changes-file/checksum-count-mismatch/eval/hints b/t/recipes/checks/changes-file/checksum-count-mismatch/eval/hints new file mode 100644 index 0000000..b493656 --- /dev/null +++ b/t/recipes/checks/changes-file/checksum-count-mismatch/eval/hints @@ -0,0 +1 @@ +checksum-count-mismatch (changes): checksum-count-mismatch-in-changes-file 3 Checksum-Sha256 checksums != 4 files diff --git a/t/recipes/checks/changes-file/distribution-multiple-bad/eval/hints b/t/recipes/checks/changes-file/distribution-multiple-bad/eval/hints new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/t/recipes/checks/changes-file/distribution-multiple-bad/eval/hints @@ -0,0 +1 @@ + diff --git a/t/recipes/checks/changes-file/generic-empty/eval/hints b/t/recipes/checks/changes-file/generic-empty/eval/hints new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/t/recipes/checks/changes-file/generic-empty/eval/hints @@ -0,0 +1 @@ + diff --git a/t/recipes/checks/changes-file/legacy-foo++/eval/hints b/t/recipes/checks/changes-file/legacy-foo++/eval/hints new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/t/recipes/checks/changes-file/legacy-foo++/eval/hints @@ -0,0 +1 @@ + diff --git a/t/recipes/checks/conffiles/conffile-removed-but-present/build-spec/debian/conffiles b/t/recipes/checks/conffiles/conffile-removed-but-present/build-spec/debian/conffiles new file mode 100644 index 0000000..bcbd369 --- /dev/null +++ b/t/recipes/checks/conffiles/conffile-removed-but-present/build-spec/debian/conffiles @@ -0,0 +1 @@ +remove-on-upgrade /etc/some.config diff --git a/t/recipes/checks/conffiles/conffile-removed-but-present/build-spec/debian/install b/t/recipes/checks/conffiles/conffile-removed-but-present/build-spec/debian/install new file mode 100644 index 0000000..ee19d5d --- /dev/null +++ b/t/recipes/checks/conffiles/conffile-removed-but-present/build-spec/debian/install @@ -0,0 +1 @@ +etc diff --git a/t/recipes/checks/conffiles/conffile-removed-but-present/build-spec/debian/rules b/t/recipes/checks/conffiles/conffile-removed-but-present/build-spec/debian/rules new file mode 100755 index 0000000..c8e5e69 --- /dev/null +++ b/t/recipes/checks/conffiles/conffile-removed-but-present/build-spec/debian/rules @@ -0,0 +1,10 @@ +#!/usr/bin/make -f +pkg=conffile-removed-but-present + +%: + dh $@ + +override_dh_builddeb: + mkdir -p debian/$(pkg)/DEBIAN + cp debian/conffiles debian/$(pkg)/DEBIAN + dpkg-deb --nocheck --build debian/$(pkg) ../$(pkg)_1.0-1_all.deb diff --git a/t/recipes/checks/conffiles/conffile-removed-but-present/build-spec/fill-values b/t/recipes/checks/conffiles/conffile-removed-but-present/build-spec/fill-values new file mode 100644 index 0000000..46ce4f3 --- /dev/null +++ b/t/recipes/checks/conffiles/conffile-removed-but-present/build-spec/fill-values @@ -0,0 +1,4 @@ +Skeleton: upload-non-native +Testname: conffile-removed-but-present +Package-Architecture: all +Description: Instruction 'remove-on-upgrade' in DEBIAN/conffiles but file shipped diff --git a/t/recipes/checks/conffiles/conffile-removed-but-present/build-spec/orig/etc/some.config b/t/recipes/checks/conffiles/conffile-removed-but-present/build-spec/orig/etc/some.config new file mode 100644 index 0000000..75e946e --- /dev/null +++ b/t/recipes/checks/conffiles/conffile-removed-but-present/build-spec/orig/etc/some.config @@ -0,0 +1 @@ +A CONFIGURATION. diff --git a/t/recipes/checks/conffiles/conffile-removed-but-present/eval/desc b/t/recipes/checks/conffiles/conffile-removed-but-present/eval/desc new file mode 100644 index 0000000..41d0905 --- /dev/null +++ b/t/recipes/checks/conffiles/conffile-removed-but-present/eval/desc @@ -0,0 +1,2 @@ +Testname: conffile-removed-but-present +Check: conffiles diff --git a/t/recipes/checks/conffiles/conffile-removed-but-present/eval/hints b/t/recipes/checks/conffiles/conffile-removed-but-present/eval/hints new file mode 100644 index 0000000..5b746d6 --- /dev/null +++ b/t/recipes/checks/conffiles/conffile-removed-but-present/eval/hints @@ -0,0 +1 @@ +conffile-removed-but-present (binary): unexpected-conffile etc/some.config [conffiles:1] diff --git a/t/recipes/checks/conffiles/conffiles-etc-not-marked/build-spec/debian/install b/t/recipes/checks/conffiles/conffiles-etc-not-marked/build-spec/debian/install new file mode 100644 index 0000000..ec665e8 --- /dev/null +++ b/t/recipes/checks/conffiles/conffiles-etc-not-marked/build-spec/debian/install @@ -0,0 +1 @@ +something.conf etc/ diff --git a/t/recipes/checks/conffiles/conffiles-etc-not-marked/build-spec/debian/rules b/t/recipes/checks/conffiles/conffiles-etc-not-marked/build-spec/debian/rules new file mode 100644 index 0000000..5afe3f7 --- /dev/null +++ b/t/recipes/checks/conffiles/conffiles-etc-not-marked/build-spec/debian/rules @@ -0,0 +1,11 @@ +#!/usr/bin/make -f + +%: + dh $@ + +override_dh_builddeb: + DIR=$$(find -name 'DEBIAN'); \ + rm "$$DIR/conffiles" && \ + md5sum something.conf | sed 's/ s/ etc\/s/' >> "$$DIR/md5sums" + dh_builddeb + diff --git a/t/recipes/checks/conffiles/conffiles-etc-not-marked/build-spec/fill-values b/t/recipes/checks/conffiles/conffiles-etc-not-marked/build-spec/fill-values new file mode 100644 index 0000000..63dd144 --- /dev/null +++ b/t/recipes/checks/conffiles/conffiles-etc-not-marked/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: upload-native +Testname: conffiles-etc-not-marked +Description: Test checking etc files not being marked as conffiles diff --git a/t/recipes/checks/conffiles/conffiles-etc-not-marked/build-spec/orig/something.conf b/t/recipes/checks/conffiles/conffiles-etc-not-marked/build-spec/orig/something.conf new file mode 100644 index 0000000..432ea47 --- /dev/null +++ b/t/recipes/checks/conffiles/conffiles-etc-not-marked/build-spec/orig/something.conf @@ -0,0 +1 @@ +hello=world diff --git a/t/recipes/checks/conffiles/conffiles-etc-not-marked/eval/desc b/t/recipes/checks/conffiles/conffiles-etc-not-marked/eval/desc new file mode 100644 index 0000000..4d117c3 --- /dev/null +++ b/t/recipes/checks/conffiles/conffiles-etc-not-marked/eval/desc @@ -0,0 +1,2 @@ +Testname: conffiles-etc-not-marked +Check: conffiles diff --git a/t/recipes/checks/conffiles/conffiles-etc-not-marked/eval/hints b/t/recipes/checks/conffiles/conffiles-etc-not-marked/eval/hints new file mode 100644 index 0000000..6415828 --- /dev/null +++ b/t/recipes/checks/conffiles/conffiles-etc-not-marked/eval/hints @@ -0,0 +1 @@ +conffiles-etc-not-marked (binary): file-in-etc-not-marked-as-conffile [etc/something.conf] diff --git a/t/recipes/checks/conffiles/conffiles-general/build-spec/debian/conffiles b/t/recipes/checks/conffiles/conffiles-general/build-spec/debian/conffiles new file mode 100644 index 0000000..51222d6 --- /dev/null +++ b/t/recipes/checks/conffiles/conffiles-general/build-spec/debian/conffiles @@ -0,0 +1,9 @@ +/etc/foo +/etc/rc2.d/file +/etc/symlink +/usr/share/foo +/var/cache/foo +etc/foo +/etc/thin-air +/usr/gone +/var/bye diff --git a/t/recipes/checks/conffiles/conffiles-general/build-spec/debian/install b/t/recipes/checks/conffiles/conffiles-general/build-spec/debian/install new file mode 100644 index 0000000..46dd330 --- /dev/null +++ b/t/recipes/checks/conffiles/conffiles-general/build-spec/debian/install @@ -0,0 +1,3 @@ +usr +var +etc diff --git a/t/recipes/checks/conffiles/conffiles-general/build-spec/debian/links b/t/recipes/checks/conffiles/conffiles-general/build-spec/debian/links new file mode 100644 index 0000000..01a5497 --- /dev/null +++ b/t/recipes/checks/conffiles/conffiles-general/build-spec/debian/links @@ -0,0 +1 @@ +etc/foo etc/symlink diff --git a/t/recipes/checks/conffiles/conffiles-general/build-spec/debian/rules b/t/recipes/checks/conffiles/conffiles-general/build-spec/debian/rules new file mode 100755 index 0000000..02d8017 --- /dev/null +++ b/t/recipes/checks/conffiles/conffiles-general/build-spec/debian/rules @@ -0,0 +1,12 @@ +#!/usr/bin/make -f +pkg=conffiles-general + +%: + dh $@ + +override_dh_builddeb: + mkdir -p debian/$(pkg)/etc/ + echo "Hallo World" > debian/$(pkg)/etc/foo + mkdir -p debian/$(pkg)/DEBIAN + cp debian/conffiles debian/$(pkg)/DEBIAN + dpkg-deb --nocheck --build debian/$(pkg) ../$(pkg)_1.0-1_all.deb diff --git a/t/recipes/checks/conffiles/conffiles-general/build-spec/fill-values b/t/recipes/checks/conffiles/conffiles-general/build-spec/fill-values new file mode 100644 index 0000000..03c9386 --- /dev/null +++ b/t/recipes/checks/conffiles/conffiles-general/build-spec/fill-values @@ -0,0 +1,4 @@ +Skeleton: upload-non-native +Testname: conffiles-general +Package-Architecture: all +Description: Test for conffile-related checks diff --git a/t/recipes/checks/conffiles/conffiles-general/build-spec/orig/etc/rc2.d/file b/t/recipes/checks/conffiles/conffiles-general/build-spec/orig/etc/rc2.d/file new file mode 100644 index 0000000..87eb780 --- /dev/null +++ b/t/recipes/checks/conffiles/conffiles-general/build-spec/orig/etc/rc2.d/file @@ -0,0 +1 @@ +DUMMY INIT. diff --git a/t/recipes/checks/conffiles/conffiles-general/build-spec/orig/usr/share/foo b/t/recipes/checks/conffiles/conffiles-general/build-spec/orig/usr/share/foo new file mode 100644 index 0000000..563ac09 --- /dev/null +++ b/t/recipes/checks/conffiles/conffiles-general/build-spec/orig/usr/share/foo @@ -0,0 +1 @@ +MEANINGFUL CONTENTS. diff --git a/t/recipes/checks/conffiles/conffiles-general/build-spec/orig/var/cache/foo b/t/recipes/checks/conffiles/conffiles-general/build-spec/orig/var/cache/foo new file mode 100644 index 0000000..59a262a --- /dev/null +++ b/t/recipes/checks/conffiles/conffiles-general/build-spec/orig/var/cache/foo @@ -0,0 +1 @@ +ALSO MEANINGFUL. diff --git a/t/recipes/checks/conffiles/conffiles-general/eval/desc b/t/recipes/checks/conffiles/conffiles-general/eval/desc new file mode 100644 index 0000000..c927c96 --- /dev/null +++ b/t/recipes/checks/conffiles/conffiles-general/eval/desc @@ -0,0 +1,2 @@ +Testname: conffiles-general +Check: conffiles diff --git a/t/recipes/checks/conffiles/conffiles-general/eval/hints b/t/recipes/checks/conffiles/conffiles-general/eval/hints new file mode 100644 index 0000000..44959bb --- /dev/null +++ b/t/recipes/checks/conffiles/conffiles-general/eval/hints @@ -0,0 +1,13 @@ +conffiles-general (binary): relative-conffile etc/foo [conffiles:6] +conffiles-general (binary): non-etc-file-marked-as-conffile var/cache/foo [conffiles:5] +conffiles-general (binary): non-etc-file-marked-as-conffile var/bye [conffiles:9] +conffiles-general (binary): non-etc-file-marked-as-conffile usr/share/foo [conffiles:4] +conffiles-general (binary): non-etc-file-marked-as-conffile usr/gone [conffiles:8] +conffiles-general (binary): missing-conffile var/bye [conffiles:9] +conffiles-general (binary): missing-conffile usr/gone [conffiles:8] +conffiles-general (binary): missing-conffile etc/thin-air [conffiles:7] +conffiles-general (binary): file-in-usr-marked-as-conffile usr/share/foo [conffiles:4] +conffiles-general (binary): file-in-usr-marked-as-conffile usr/gone [conffiles:8] +conffiles-general (binary): file-in-etc-rc.d-marked-as-conffile etc/rc2.d/file [conffiles:2] +conffiles-general (binary): duplicate-conffile etc/foo (lines 1 6) [conffiles] +conffiles-general (binary): conffile-has-bad-file-type [etc/symlink] diff --git a/t/recipes/checks/conffiles/instruction-chicken-soup/build-spec/debian/conffiles b/t/recipes/checks/conffiles/instruction-chicken-soup/build-spec/debian/conffiles new file mode 100644 index 0000000..6bac7c1 --- /dev/null +++ b/t/recipes/checks/conffiles/instruction-chicken-soup/build-spec/debian/conffiles @@ -0,0 +1 @@ +chicken-soup /etc/some.config diff --git a/t/recipes/checks/conffiles/instruction-chicken-soup/build-spec/debian/install b/t/recipes/checks/conffiles/instruction-chicken-soup/build-spec/debian/install new file mode 100644 index 0000000..ee19d5d --- /dev/null +++ b/t/recipes/checks/conffiles/instruction-chicken-soup/build-spec/debian/install @@ -0,0 +1 @@ +etc diff --git a/t/recipes/checks/conffiles/instruction-chicken-soup/build-spec/debian/rules b/t/recipes/checks/conffiles/instruction-chicken-soup/build-spec/debian/rules new file mode 100755 index 0000000..9de9df4 --- /dev/null +++ b/t/recipes/checks/conffiles/instruction-chicken-soup/build-spec/debian/rules @@ -0,0 +1,10 @@ +#!/usr/bin/make -f +pkg=instruction-chicken-soup + +%: + dh $@ + +override_dh_builddeb: + mkdir -p debian/$(pkg)/DEBIAN + cp debian/conffiles debian/$(pkg)/DEBIAN + dpkg-deb --nocheck --build debian/$(pkg) ../$(pkg)_1.0-1_all.deb diff --git a/t/recipes/checks/conffiles/instruction-chicken-soup/build-spec/fill-values b/t/recipes/checks/conffiles/instruction-chicken-soup/build-spec/fill-values new file mode 100644 index 0000000..98f4bab --- /dev/null +++ b/t/recipes/checks/conffiles/instruction-chicken-soup/build-spec/fill-values @@ -0,0 +1,4 @@ +Skeleton: upload-non-native +Testname: instruction-chicken-soup +Package-Architecture: all +Description: Instruction 'chicken-soup' in DEBIAN/conffiles diff --git a/t/recipes/checks/conffiles/instruction-chicken-soup/build-spec/orig/etc/some.config b/t/recipes/checks/conffiles/instruction-chicken-soup/build-spec/orig/etc/some.config new file mode 100644 index 0000000..75e946e --- /dev/null +++ b/t/recipes/checks/conffiles/instruction-chicken-soup/build-spec/orig/etc/some.config @@ -0,0 +1 @@ +A CONFIGURATION. diff --git a/t/recipes/checks/conffiles/instruction-chicken-soup/eval/desc b/t/recipes/checks/conffiles/instruction-chicken-soup/eval/desc new file mode 100644 index 0000000..e545522 --- /dev/null +++ b/t/recipes/checks/conffiles/instruction-chicken-soup/eval/desc @@ -0,0 +1,2 @@ +Testname: instruction-chicken-soup +Check: conffiles diff --git a/t/recipes/checks/conffiles/instruction-chicken-soup/eval/hints b/t/recipes/checks/conffiles/instruction-chicken-soup/eval/hints new file mode 100644 index 0000000..07fcbcb --- /dev/null +++ b/t/recipes/checks/conffiles/instruction-chicken-soup/eval/hints @@ -0,0 +1 @@ +instruction-chicken-soup (binary): unknown-conffile-instruction chicken-soup [conffiles:1] diff --git a/t/recipes/checks/conffiles/legacy-etcfiles/build-spec/debian/README.Debian b/t/recipes/checks/conffiles/legacy-etcfiles/build-spec/debian/README.Debian new file mode 100644 index 0000000..e289bfb --- /dev/null +++ b/t/recipes/checks/conffiles/legacy-etcfiles/build-spec/debian/README.Debian @@ -0,0 +1,5 @@ +this is a package to test lintian's handling of files in /etc. +Also, there's a random mention of /usr/doc here to prompt a warning. +But /usr/documentation doesn't. + + -- Russ Allbery , Mon, 18 Feb 2008 16:40:55 -0800 diff --git a/t/recipes/checks/conffiles/legacy-etcfiles/build-spec/debian/changelog.in b/t/recipes/checks/conffiles/legacy-etcfiles/build-spec/debian/changelog.in new file mode 100644 index 0000000..00cdc77 --- /dev/null +++ b/t/recipes/checks/conffiles/legacy-etcfiles/build-spec/debian/changelog.in @@ -0,0 +1,7 @@ +etcfiles ([% $version %]) [% $distribution %]; urgency=low + + * Acknowledge NMU (Closes: #123456). + * initial setup + + -- Lintian Maintainers Fri, 21 Sep 2001 11:56:02 -0700 + diff --git a/t/recipes/checks/conffiles/legacy-etcfiles/build-spec/debian/conffiles b/t/recipes/checks/conffiles/legacy-etcfiles/build-spec/debian/conffiles new file mode 100644 index 0000000..76032b7 --- /dev/null +++ b/t/recipes/checks/conffiles/legacy-etcfiles/build-spec/debian/conffiles @@ -0,0 +1,5 @@ +/etc/proper +/var/lib/foo +/etc/cron.daily/cronfile-normal +/etc/cron.daily/.cronfile-begins-with-fullstop +/etc/cron.daily/cronfile-contains.fullstop diff --git a/t/recipes/checks/conffiles/legacy-etcfiles/build-spec/debian/conffiles.only b/t/recipes/checks/conffiles/legacy-etcfiles/build-spec/debian/conffiles.only new file mode 100644 index 0000000..a4b3895 --- /dev/null +++ b/t/recipes/checks/conffiles/legacy-etcfiles/build-spec/debian/conffiles.only @@ -0,0 +1,2 @@ +/etc/etcfiles/foo +/etc/etcfiles/bar diff --git a/t/recipes/checks/conffiles/legacy-etcfiles/build-spec/debian/control b/t/recipes/checks/conffiles/legacy-etcfiles/build-spec/debian/control new file mode 100644 index 0000000..f3dbda7 --- /dev/null +++ b/t/recipes/checks/conffiles/legacy-etcfiles/build-spec/debian/control @@ -0,0 +1,20 @@ +Source: etcfiles +Section: misc +Priority: optional +Maintainer: Lintian Maintainers +Standards-Version: 3.5.0 + +Package: etcfiles +Architecture: any +Depends: ${shlibs:Depends} +Description: test handling of files in /etc + Regression test for lintian's handling of files in /etc. + . + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. + +Package: only-etcfiles +Architecture: all +Depends: etcfiles (= ${source:Version}) +Description: test handling of conffile-only package diff --git a/t/recipes/checks/conffiles/legacy-etcfiles/build-spec/debian/rules b/t/recipes/checks/conffiles/legacy-etcfiles/build-spec/debian/rules new file mode 100755 index 0000000..97ff09f --- /dev/null +++ b/t/recipes/checks/conffiles/legacy-etcfiles/build-spec/debian/rules @@ -0,0 +1,64 @@ +#!/usr/bin/make -f + +tmp=debian/tmp +tmponly=debian/only-etcfiles + +clean: + rm -f debian/files debian/substvars + rm -rf debian/tmp + rm -rf debian/only-etcfiles + +build: +build-arch: +build-indep: +binary-indep: + install -d $(tmp)/etc + install -m 644 proper $(tmp)/etc + install -m 644 improper $(tmp)/etc + mkdir $(tmp)/etc/cron.daily + touch $(tmp)/etc/cron.daily/cronfile-normal + touch $(tmp)/etc/cron.daily/.cronfile-begins-with-fullstop + touch $(tmp)/etc/cron.daily/cronfile-contains.fullstop + ln $(tmp)/etc/improper $(tmp)/etc/improper-link + install -d $(tmp)/usr/share/doc/etcfiles + install -d $(tmp)/var/lib + install -m 644 proper $(tmp)/var/lib/foo + install -m 644 debian/README.Debian $(tmp)/usr/share/doc/etcfiles + install -m 644 debian/changelog $(tmp)/usr/share/doc/etcfiles + #gzip -9 $(tmp)/usr/share/doc/etcfiles/changelog + install -d $(tmp)/DEBIAN + install -m 644 debian/conffiles $(tmp)/DEBIAN + + echo 'd41d8cd98f00b204e9800998ecf8427e ./etc/cron.daily/cronfile-normal' \ + > debian/tmp/DEBIAN/md5sums + echo 'd41d8cd98f00b204e9800998ecf8427e ./etc/cron.daily/.cronfile-begins-with-fullstop' \ + >> debian/tmp/DEBIAN/md5sums + echo 'd41d8cd98f00b204e9800998ecf8427e ./etc/cron.daily/cronfile-contains.fullstop' \ + >> debian/tmp/DEBIAN/md5sums + echo '05c72cacce994208128b7d081116b04a ./etc/proper' \ + >> debian/tmp/DEBIAN/md5sums + echo 'ab371382468880299e5ebd05921764ce etc/improper' \ + >> debian/tmp/DEBIAN/md5sums + echo 'ab371382468880299e5ebd05921764ce usr/bin/foo' \ + >> debian/tmp/DEBIAN/md5sums + echo 'this is a malformed line' \ + >> debian/tmp/DEBIAN/md5sums + echo '56fb27e455dd86d8801f1ecd3a4cee49 usr/share/doc/etcfiles/README.Debian' \ + >> debian/tmp/DEBIAN/md5sums + + install -d $(tmponly)/etc/etcfiles + touch $(tmponly)/etc/etcfiles/foo + touch $(tmponly)/etc/etcfiles/bar + install -d $(tmponly)/usr/share/doc + cd $(tmponly)/usr/share/doc && ln -s etcfiles only-etcfiles + install -d $(tmponly)/DEBIAN + install -m 644 debian/conffiles.only $(tmponly)/DEBIAN/conffiles + + dpkg-gencontrol -isp -petcfiles + dpkg-gencontrol -isp -ponly-etcfiles -P$(tmponly) + dpkg --build $(tmp) .. + dpkg --build $(tmponly) .. + +binary: binary-indep + +.PHONY: binary-indep binary clean diff --git a/t/recipes/checks/conffiles/legacy-etcfiles/build-spec/fill-values b/t/recipes/checks/conffiles/legacy-etcfiles/build-spec/fill-values new file mode 100644 index 0000000..86deb10 --- /dev/null +++ b/t/recipes/checks/conffiles/legacy-etcfiles/build-spec/fill-values @@ -0,0 +1,5 @@ +Skeleton: upload-native +Testname: legacy-etcfiles +Source: etcfiles +Version: 1 +Description: Legacy test "etcfiles" diff --git a/t/recipes/checks/conffiles/legacy-etcfiles/build-spec/orig/improper b/t/recipes/checks/conffiles/legacy-etcfiles/build-spec/orig/improper new file mode 100644 index 0000000..23656f4 --- /dev/null +++ b/t/recipes/checks/conffiles/legacy-etcfiles/build-spec/orig/improper @@ -0,0 +1,2 @@ +[config] + var = value \ No newline at end of file diff --git a/t/recipes/checks/conffiles/legacy-etcfiles/build-spec/orig/proper b/t/recipes/checks/conffiles/legacy-etcfiles/build-spec/orig/proper new file mode 100644 index 0000000..f3dc68b --- /dev/null +++ b/t/recipes/checks/conffiles/legacy-etcfiles/build-spec/orig/proper @@ -0,0 +1,2 @@ +# i am a config file +foo = var \ No newline at end of file diff --git a/t/recipes/checks/conffiles/legacy-etcfiles/eval/desc b/t/recipes/checks/conffiles/legacy-etcfiles/eval/desc new file mode 100644 index 0000000..0c3423e --- /dev/null +++ b/t/recipes/checks/conffiles/legacy-etcfiles/eval/desc @@ -0,0 +1,2 @@ +Testname: legacy-etcfiles +Check: conffiles diff --git a/t/recipes/checks/conffiles/legacy-etcfiles/eval/hints b/t/recipes/checks/conffiles/legacy-etcfiles/eval/hints new file mode 100644 index 0000000..b5286d9 --- /dev/null +++ b/t/recipes/checks/conffiles/legacy-etcfiles/eval/hints @@ -0,0 +1,3 @@ +etcfiles (binary): non-etc-file-marked-as-conffile var/lib/foo [conffiles:2] +etcfiles (binary): file-in-etc-not-marked-as-conffile [etc/improper] +etcfiles (binary): file-in-etc-not-marked-as-conffile [etc/improper-link] diff --git a/t/recipes/checks/conffiles/legacy-etcfiles/eval/post-test b/t/recipes/checks/conffiles/legacy-etcfiles/eval/post-test new file mode 100644 index 0000000..faeef0b --- /dev/null +++ b/t/recipes/checks/conffiles/legacy-etcfiles/eval/post-test @@ -0,0 +1 @@ +s/\(current is ([0-9]+\.)+[0-9]\)/(current is CURRENT)/ diff --git a/t/recipes/checks/conffiles/legacy-filenames/build-spec/debian/changelog.in b/t/recipes/checks/conffiles/legacy-filenames/build-spec/debian/changelog.in new file mode 100644 index 0000000..b79c4ca --- /dev/null +++ b/t/recipes/checks/conffiles/legacy-filenames/build-spec/debian/changelog.in @@ -0,0 +1,78 @@ +filenames ([% $version %]) [% $distribution %]; urgency=low + + * /me is doing a correct NMU of this package, bumping the epoch too. + + -- Jeroen van Wolffelaar Sun, 18 Apr 2004 02:04:39 +0200 + +filenames (11) unstable; urgency=low + + * Add a README.macos. + + -- Marc 'HE' Brockschmidt Mon, 12 Apr 2004 23:35:24 +0200 + +filenames (10) unstable; urgency=low + + * Some new files to check the checks for the use of /usr/*/X11 and + /usr/X11R6/*. + + -- Marc 'HE' Brockschmidt Sun, 11 Apr 2004 17:35:20 +0200 + +filenames (9) unstable; urgency=low + + * Add a two *.ali files, one with the right permission, one with + the more common, but false one. + + -- Marc 'HE' Brockschmidt Sun, 11 Apr 2004 00:18:16 +0200 + +filenames (8) unstable; urgency=low + + * Add a real ancient file + + -- Frank Lichtenheld Thu, 8 Apr 2004 22:22:40 +0200 + +filenames (7) unstable; urgency=low + + * Add a dozen symlinks, some correct, some not + + -- Jeroen van Wolffelaar Fri, 27 Feb 2004 01:28:42 +0100 + +filenames (6) unstable; urgency=low + + * Add perl files to check if + package-installs-nonbinary-perl-in-usr-lib-perl5 is correctly + issued even after attempting to suppress it in some cases + + -- Frank Lichtenheld Fri, 27 Feb 2004 00:49:44 +0100 + +filenames (5) unstable; urgency=low + + * Added check for too long symlink + + -- Sean 'Shaleh' Perry Wed, 3 Jan 2001 13:20:31 -0800 + +filenames (4) unstable; urgency=low + + * Add /usr/lib/menu/menu file to test the bad-menu-file-name tag. + * Add /usr/lib/menu/README to test the new execption for it. + + -- Richard Braakman Thu, 22 Oct 1998 15:42:52 +0200 + +filenames (3) unstable; urgency=low + + * Don't rely on the installer's umask. + + -- Richard Braakman Thu, 20 Aug 1998 12:45:47 +0200 + +filenames (2) unstable; urgency=low + + * Noted more limitations on what filenames lintian handles. + * Added Changes.gz in /usr/doc/filenames and made a symlink from changelog.gz + to Changes.gz. + + -- Richard Braakman Sat, 4 Jul 1998 15:46:11 +0200 + +filenames (1) unstable; urgency=low + + * Initial version + + -- Richard Braakman Sat, 4 Jul 1998 15:25:01 +0200 diff --git a/t/recipes/checks/conffiles/legacy-filenames/build-spec/debian/control b/t/recipes/checks/conffiles/legacy-filenames/build-spec/debian/control new file mode 100644 index 0000000..1ff9c50 --- /dev/null +++ b/t/recipes/checks/conffiles/legacy-filenames/build-spec/debian/control @@ -0,0 +1,42 @@ +Source: filenames +Maintainer: Lintian Maintainer +Standards-Version: 3.1.1 +Rules-Requires-Root: binary-targets + +Package: filenames +Architecture: any +Description: see how lintian reacts to weird filenames + This package contains files with the most evil names I could find, + except for ones that lintian is explicitly not designed to handle. + . + Lintian does not handle filenames containing newlines, or filenames + that contain the strings " link to ", " -> ", or ": ". The last one + is used as a separator by the file command, the others are used as + separators by tar. + . + Lintian also does not handle filenames that contain backslashes, or + other characters that are mangled by tar's -tv output. + +Package: filename-games +Architecture: all +Depends: filenames +Section: games +Description: Test game filename/location checks + This package contains files with slightly less evil names than + filenames. + . + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. + +Package: more-filename-games +Architecture: all +Depends: filenames, filename-games +Section: games +Priority: optional +Description: More test for game filename/location checks + This package contains no evil names, only evil locations. + . + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. diff --git a/t/recipes/checks/conffiles/legacy-filenames/build-spec/debian/doc-base b/t/recipes/checks/conffiles/legacy-filenames/build-spec/debian/doc-base new file mode 100644 index 0000000..e5a611b --- /dev/null +++ b/t/recipes/checks/conffiles/legacy-filenames/build-spec/debian/doc-base @@ -0,0 +1,11 @@ +Document: testing +Title: Working doc-base control file +Author: Russ Allbery +Abstract: This control file ensures that we don't get false positives for + correct doc-base files. + . + There isn't anything wrong with this one. +Section: Education + +Format: Text +Files: /usr/share/doc/filenames/README.macosx diff --git a/t/recipes/checks/conffiles/legacy-filenames/build-spec/debian/rules b/t/recipes/checks/conffiles/legacy-filenames/build-spec/debian/rules new file mode 100755 index 0000000..0b9e87c --- /dev/null +++ b/t/recipes/checks/conffiles/legacy-filenames/build-spec/debian/rules @@ -0,0 +1,231 @@ +#!/usr/bin/make -f + +# Copyright (C) 1998 Richard Braakman +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +VENDORARCH := $(shell perl -MConfig -wE'say substr($$Config{vendorarch},1)') + +clean: + mkdir -p .svn CVS "{arch}" .arch-ids .bzr + touch data/.cvsignore data/svn-commit.tmp data/svk-commitsEr9P.tmp + touch data/.arch-inventory + touch 'data/.#Maelstrom Sound.1.1.1' 'data/Maelstrom Sounce.r121' + touch 'data/Maelstrom Sound.mine' + touch "data/'\\ " + touch filenames.c~ + +build-arch: + +build-indep: + +build: build-arch build-indep + + +binary-arch: + +binary-indep: + install -d debian/tmp/DEBIAN + cp -a data debian/tmp/files + chmod -R go=rX debian/tmp/files + + install -d debian/tmp/usr/lib/filenames + install -m 555 -d debian/tmp/usr/lib/filenames/readonly + touch debian/tmp/usr/lib/filenames/readonly/test + + install -d debian/tmp/usr/lib/menu + install -d debian/tmp/usr/share/menu + touch debian/tmp/usr/lib/menu/README + touch debian/tmp/usr/share/menu/README + touch debian/tmp/usr/lib/menu/menu + touch debian/tmp/usr/share/menu/menu + chmod 644 debian/tmp/usr/lib/menu/* + + install -d debian/tmp/$(VENDORARCH)/foo + mkdir debian/tmp/$(VENDORARCH)/.svn + mkdir debian/tmp/$(VENDORARCH)/CVS + mkdir "debian/tmp/$(VENDORARCH)/{arch}" + mkdir debian/tmp/$(VENDORARCH)/.arch-ids + mkdir debian/tmp/$(VENDORARCH)/.bzr + mkdir debian/tmp/$(VENDORARCH)/.be + mkdir debian/tmp/$(VENDORARCH)/.ditrack + install -d debian/tmp/usr/share/perl5 + echo foo > debian/tmp/$(VENDORARCH)/foo/.gitignore + echo foo > debian/tmp/$(VENDORARCH)/foo/.hgignore + echo foo > debian/tmp/$(VENDORARCH)/foo/.hgtags + echo foo > debian/tmp/$(VENDORARCH)/foo/.hg_archival.txt + + touch debian/tmp/$(VENDORARCH)/foo/.packlist + chmod 644 debian/tmp/$(VENDORARCH)/foo/.packlist + touch debian/tmp/$(VENDORARCH)/foo/bar.pm + TZ=UTC touch -t 197501010101 debian/tmp/$(VENDORARCH)/foo/ancient.pm + chmod 644 debian/tmp/$(VENDORARCH)/foo/bar.pm + + install -d debian/tmp/usr/share/pixmaps + install -d debian/tmp/usr/share/pixmaps/foo + touch debian/tmp/usr/share/pixmaps/license.jpeg + touch debian/tmp/usr/share/pixmaps/licence.jpg + touch debian/tmp/usr/share/pixmaps/copying.xpm + touch debian/tmp/usr/share/pixmaps/foo/COPYING.svg + touch debian/tmp/usr/share/pixmaps/foo/copying.png + touch debian/tmp/usr/share/pixmaps/license.txt + touch debian/tmp/usr/share/pixmaps/license.foo + touch debian/tmp/usr/share/pixmaps/COPYING + + install -d debian/tmp/usr/share/linda/overrides + echo 'foo' > debian/tmp/usr/share/linda/overrides/filenames + + install -d debian/tmp/usr/share/doc/filenames + touch debian/tmp/usr/share/doc/filenames/README.macosx + + echo foo > debian/tmp/usr/share/doc/filenames/bokmål + echo foo > debian/tmp/usr/share/doc/filenames/bokm\\ål + echo foo > debian/tmp/usr/share/doc/filenames/bokml + echo foo > debian/tmp/usr/share/doc/filenames/bokm\\l + + echo foo > debian/tmp/usr/share/doc/filenames/Thumbs.db + echo foo > debian/tmp/usr/share/doc/filenames/.DS_Store + echo foo > debian/tmp/usr/share/doc/filenames/._NEWS.Debian + + touch debian/tmp/usr/share/doc/filenames/news.debian + gzip -n debian/tmp/usr/share/doc/filenames/news.debian + touch debian/tmp/usr/share/doc/filenames/NEWS.Debian + + echo foo > debian/tmp/usr/share/doc/filenames/link-one + ln debian/tmp/usr/share/doc/filenames/link-one \ + debian/tmp/usr/share/doc/filenames/link-two + + install -d debian/tmp/usr/share/doc/filenames/examples + touch debian/tmp/usr/share/doc/filenames/examples/__init__.py + touch debian/tmp/usr/share/doc/filenames/examples/very_interesting_example + touch debian/tmp/usr/share/doc/filenames/examples/very_interesting_example2 + gzip -n debian/tmp/usr/share/doc/filenames/examples/very_interesting_example2 + + install -d debian/tmp/usr/lib/ada/adalib/ + touch debian/tmp/usr/lib/ada/adalib/test.ali debian/tmp/usr/lib/ada/adalib/test2.ali + chmod 0644 debian/tmp/usr/lib/ada/adalib/test.ali + chmod 0444 debian/tmp/usr/lib/ada/adalib/test2.ali + + install -d debian/tmp/usr/bin/X11/ + touch debian/tmp/usr/bin/X11/testxbin + install -d debian/tmp/usr/X11R6/bin + touch debian/tmp/usr/X11R6/bin/testxbin2 + install -d debian/tmp/usr/include/X11 + touch debian/tmp/usr/include/X11/foo.h + + install -d debian/tmp/usr/bin/mh + touch debian/tmp/usr/bin/mh/read + chmod 755 debian/tmp/usr/bin/mh/read + install -d debian/tmp/usr/bin/bin + touch debian/tmp/usr/bin/bin/bad + chmod 755 debian/tmp/usr/bin/bin/bad + + install -m 644 debian/changelog debian/tmp/usr/share/doc/filenames/Changes + gzip -n -9 debian/tmp/usr/share/doc/filenames/Changes + ln -s Changes.gz debian/tmp/usr/share/doc/filenames/changelog.gz + + install -d debian/tmp/var/www + echo foo > debian/tmp/var/www/foo + + install -d debian/tmp/srv/foo + touch debian/tmp/srv/foo/bar + install -d debian/tmp/opt/foo + touch debian/tmp/opt/foo/bar + + install -d debian/tmp/etc/gconf/schemas + touch debian/tmp/etc/gconf/schemas/test.schema + + install -d debian/tmp/usr/lib/sgml + touch debian/tmp/usr/lib/sgml/package + + install -d debian/tmp/usr/share/gnome/apps/System + touch debian/tmp/usr/share/gnome/apps/System/foo.desktop + + install -d debian/tmp/usr/share/filenames + touch debian/tmp/usr/share/filenames/jquery.js + touch debian/tmp/usr/share/filenames/jquery.lite.js + touch debian/tmp/usr/share/filenames/jquery.min.js + touch debian/tmp/usr/share/filenames/jquery.pack.js + touch debian/tmp/usr/share/filenames/mochikit.js + touch debian/tmp/usr/share/filenames/prototype-1.2.3.4.js + touch debian/tmp/usr/share/filenames/prototype.js + touch debian/tmp/usr/share/filenames/prototype.js.gz + touch debian/tmp/usr/share/filenames/scriptaculous.js + touch debian/tmp/usr/share/filenames/yahoo-dom-event.js + touch debian/tmp/usr/share/filenames/yahoo-min.js + + ln -s '../filenames/doc/version6.txt.gz' debian/tmp/usr/share/doc/filenames/version.txt.gz + ln -s ../../share/symlink debian/tmp/usr/lib/filenames/symlink1ok + ln -s ../../../etc/symlink debian/tmp/usr/lib/filenames/symlink1wrong + ln -s ../../../../etc/symlink debian/tmp/usr/lib/filenames/symlink2wrong + ln -s /etc/symlink debian/tmp/usr/lib/filenames/symlink2ok + ln -s /usr/lib/filenames/symlink2 debian/tmp/usr/lib/filenames/symlink3wrong + ln -s test debian/tmp/usr/lib/filenames/symlink3ok + ln -s ../filenames/symlink2 debian/tmp/usr/lib/filenames/symlink4wrong + ln -s ../menu/../somethingelse debian/tmp/usr/lib/filenames/symlink5wrong + ln -s ../menu/somethingelse debian/tmp/usr/lib/filenames/symlink4ok + ln -s ./file4 debian/tmp/usr/lib/filenames/symlink6wrong + ln -s ../menu/./something debian/tmp/usr/lib/filenames/symlink7wrong + ln -s ../menu//something debian/tmp/usr/lib/filenames/symlink8wrong + ln -s ../menu/something/ debian/tmp/usr/lib/filenames/symlink9wrong + ln -s .. debian/tmp/usr/lib/filenames/symlink5ok+warn + ln -s . debian/tmp/usr/lib/filenames/symlink6ok+warn + ln -s / debian/tmp/usr/lib/filenames/symlink7ok+warn + ln -s ../../.. debian/tmp/usr/lib/filenames/symlink10wrong + +# devhelp tests. Files in /usr/share/gtk-doc/html or /usr/share/devhelp/books +# are okay. Files elsewhere are okay iff their parent path is symlinked into +# one of those paths. + install -d debian/tmp/usr/share/devhelp/books/filenames + echo 'Not really XML' > debian/tmp/usr/share/devhelp/books/filenames/a.devhelp + echo 'Not really XML' > debian/tmp/usr/share/devhelp/books/filenames/.devhelp2 + gzip -n -9 debian/tmp/usr/share/devhelp/books/filenames/.devhelp2 + install -d debian/tmp/usr/share/gtk-doc/html/filenames + echo 'Not really XML' > debian/tmp/usr/share/gtk-doc/html/filenames/b.devhelp + gzip -n -9 debian/tmp/usr/share/gtk-doc/html/filenames/b.devhelp + install -d debian/tmp/usr/share/doc/filenames/good-devhelp + echo 'Not really XML' > debian/tmp/usr/share/doc/filenames/good-devhelp/.devhelp2 + install -d debian/tmp/usr/share/doc/filenames/bad-devhelp + echo 'Not really XML' > debian/tmp/usr/share/doc/filenames/bad-devhelp/c.devhelp + gzip -n -9 debian/tmp/usr/share/doc/filenames/bad-devhelp/c.devhelp + ln -s ../../doc/filenames/good-devhelp debian/tmp/usr/share/gtk-doc/html/good + ln -s ../doc/filenames/bad-devhelp debian/tmp/usr/share/gtk-doc/html/bad + + install -d debian/tmp/usr/share/doc-base + install -m 644 debian/doc-base debian/tmp/usr/share/doc-base/filenames + + dpkg-gencontrol -pfilenames -Pdebian/tmp + dpkg --build debian/tmp .. + + install -d debian/filename-games debian/filename-games/DEBIAN + install -d debian/filename-games/usr debian/filename-games/usr/games debian/filename-games/usr/bin + echo '#! /bin/sh' > debian/filename-games/usr/bin/test-game + chmod 755 debian/filename-games/usr/bin/test-game + dpkg-gencontrol -pfilename-games -Pdebian/filename-games + dpkg --build debian/filename-games .. + + install -d debian/more-filename-games debian/more-filename-games/DEBIAN + install -d debian/more-filename-games/usr debian/more-filename-games/usr/games debian/more-filename-games/usr/bin + echo '#! /bin/sh' > debian/more-filename-games/usr/bin/another-test-game + echo '#! /bin/sh' > debian/more-filename-games/usr/games/yet-another-test-game + chmod 755 debian/more-filename-games/usr/bin/another-test-game debian/more-filename-games/usr/games/yet-another-test-game + dpkg-gencontrol -pmore-filename-games -Pdebian/more-filename-games + dpkg --build debian/more-filename-games .. + +binary: binary-arch binary-indep + +.PHONY: build-indep build-arch build binary-arch binary-indep binary clean diff --git a/t/recipes/checks/conffiles/legacy-filenames/build-spec/fill-values b/t/recipes/checks/conffiles/legacy-filenames/build-spec/fill-values new file mode 100644 index 0000000..062a1ea --- /dev/null +++ b/t/recipes/checks/conffiles/legacy-filenames/build-spec/fill-values @@ -0,0 +1,5 @@ +Skeleton: upload-non-native +Testname: legacy-filenames +Source: filenames +Version: 1:12-0.1 +Description: Legacy test "filenames" diff --git a/t/recipes/checks/conffiles/legacy-filenames/build-spec/orig/data/ .tif b/t/recipes/checks/conffiles/legacy-filenames/build-spec/orig/data/ .tif new file mode 100644 index 0000000..07fd914 --- /dev/null +++ b/t/recipes/checks/conffiles/legacy-filenames/build-spec/orig/data/ .tif @@ -0,0 +1,2 @@ +This filename was inspired by the ".tif used by fnlib. The real package +uses space.tif. diff --git "a/t/recipes/checks/conffiles/legacy-filenames/build-spec/orig/data/\".tif" "b/t/recipes/checks/conffiles/legacy-filenames/build-spec/orig/data/\".tif" new file mode 100644 index 0000000..e005775 --- /dev/null +++ "b/t/recipes/checks/conffiles/legacy-filenames/build-spec/orig/data/\".tif" @@ -0,0 +1 @@ +This filename is really used, by fnlib. diff --git a/t/recipes/checks/conffiles/legacy-filenames/build-spec/orig/data/Maelstrom Sound b/t/recipes/checks/conffiles/legacy-filenames/build-spec/orig/data/Maelstrom Sound new file mode 100644 index 0000000..4110410 --- /dev/null +++ b/t/recipes/checks/conffiles/legacy-filenames/build-spec/orig/data/Maelstrom Sound @@ -0,0 +1 @@ +This filename occurs in the maelstrom package. diff --git a/t/recipes/checks/conffiles/legacy-filenames/eval/desc b/t/recipes/checks/conffiles/legacy-filenames/eval/desc new file mode 100644 index 0000000..e5013ae --- /dev/null +++ b/t/recipes/checks/conffiles/legacy-filenames/eval/desc @@ -0,0 +1,2 @@ +Testname: legacy-filenames +Check: conffiles diff --git a/t/recipes/checks/conffiles/legacy-filenames/eval/hints b/t/recipes/checks/conffiles/legacy-filenames/eval/hints new file mode 100644 index 0000000..fbb5997 --- /dev/null +++ b/t/recipes/checks/conffiles/legacy-filenames/eval/hints @@ -0,0 +1 @@ +filenames (binary): file-in-etc-not-marked-as-conffile [etc/gconf/schemas/test.schema] diff --git a/t/recipes/checks/conffiles/legacy-filenames/eval/post-test b/t/recipes/checks/conffiles/legacy-filenames/eval/post-test new file mode 100644 index 0000000..571e35d --- /dev/null +++ b/t/recipes/checks/conffiles/legacy-filenames/eval/post-test @@ -0,0 +1,3 @@ +s/\(current is ([0-9]+\.)+[0-9]\)/(current is CURRENT)/ +s,usr/lib/([^\/]*/)?perl[0-9]*(/[0-9]*\.[0-9]*)?/,usr/lib/ma-dir/perl/version/,g +/package-installs-packlist/ d diff --git a/t/recipes/checks/continuous-integration/salsa/first-level-array/build-spec/debian/gitlab-ci.yml b/t/recipes/checks/continuous-integration/salsa/first-level-array/build-spec/debian/gitlab-ci.yml new file mode 100644 index 0000000..7205be0 --- /dev/null +++ b/t/recipes/checks/continuous-integration/salsa/first-level-array/build-spec/debian/gitlab-ci.yml @@ -0,0 +1,5 @@ +# taken from ncurses_6.2-1.dsc + +include: + - https://salsa.debian.org/salsa-ci-team/pipeline/raw/master/salsa-ci.yml + - https://salsa.debian.org/salsa-ci-team/pipeline/raw/master/pipeline-jobs.yml diff --git a/t/recipes/checks/continuous-integration/salsa/first-level-array/build-spec/fill-values b/t/recipes/checks/continuous-integration/salsa/first-level-array/build-spec/fill-values new file mode 100644 index 0000000..529bd21 --- /dev/null +++ b/t/recipes/checks/continuous-integration/salsa/first-level-array/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: source-native +Testname: first-level-array +Description: Salsa CI includes at the array level below root. diff --git a/t/recipes/checks/continuous-integration/salsa/first-level-array/eval/desc b/t/recipes/checks/continuous-integration/salsa/first-level-array/eval/desc new file mode 100644 index 0000000..d01c601 --- /dev/null +++ b/t/recipes/checks/continuous-integration/salsa/first-level-array/eval/desc @@ -0,0 +1,2 @@ +Testname: first-level-array +Check: continuous-integration/salsa diff --git a/t/recipes/checks/continuous-integration/salsa/first-level-array/eval/hints b/t/recipes/checks/continuous-integration/salsa/first-level-array/eval/hints new file mode 100644 index 0000000..5bb5889 --- /dev/null +++ b/t/recipes/checks/continuous-integration/salsa/first-level-array/eval/hints @@ -0,0 +1,3 @@ +first-level-array (source): continuous-integration/salsa/specification [debian/gitlab-ci.yml] +first-level-array (source): continuous-integration/salsa/include https://salsa.debian.org/salsa-ci-team/pipeline/raw/master/salsa-ci.yml [debian/gitlab-ci.yml] +first-level-array (source): continuous-integration/salsa/include https://salsa.debian.org/salsa-ci-team/pipeline/raw/master/pipeline-jobs.yml [debian/gitlab-ci.yml] diff --git a/t/recipes/checks/continuous-integration/salsa/root-scalar/build-spec/debian/gitlab-ci.yml b/t/recipes/checks/continuous-integration/salsa/root-scalar/build-spec/debian/gitlab-ci.yml new file mode 100644 index 0000000..d15ffba --- /dev/null +++ b/t/recipes/checks/continuous-integration/salsa/root-scalar/build-spec/debian/gitlab-ci.yml @@ -0,0 +1 @@ +include: https://salsa.debian.org/salsa-ci-team/pipeline/raw/master/salsa-ci.yml diff --git a/t/recipes/checks/continuous-integration/salsa/root-scalar/build-spec/fill-values b/t/recipes/checks/continuous-integration/salsa/root-scalar/build-spec/fill-values new file mode 100644 index 0000000..352cf3e --- /dev/null +++ b/t/recipes/checks/continuous-integration/salsa/root-scalar/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: source-native +Testname: root-scalar +Description: Salsa CI include as scalar at root level diff --git a/t/recipes/checks/continuous-integration/salsa/root-scalar/eval/desc b/t/recipes/checks/continuous-integration/salsa/root-scalar/eval/desc new file mode 100644 index 0000000..adc82e0 --- /dev/null +++ b/t/recipes/checks/continuous-integration/salsa/root-scalar/eval/desc @@ -0,0 +1,2 @@ +Testname: root-scalar +Check: continuous-integration/salsa diff --git a/t/recipes/checks/continuous-integration/salsa/root-scalar/eval/hints b/t/recipes/checks/continuous-integration/salsa/root-scalar/eval/hints new file mode 100644 index 0000000..6059644 --- /dev/null +++ b/t/recipes/checks/continuous-integration/salsa/root-scalar/eval/hints @@ -0,0 +1,2 @@ +root-scalar (source): continuous-integration/salsa/specification [debian/gitlab-ci.yml] +root-scalar (source): continuous-integration/salsa/include https://salsa.debian.org/salsa-ci-team/pipeline/raw/master/salsa-ci.yml [debian/gitlab-ci.yml] diff --git a/t/recipes/checks/control-files/control-field-traversal-4/build-spec/DEBIAN/control.in b/t/recipes/checks/control-files/control-field-traversal-4/build-spec/DEBIAN/control.in new file mode 100644 index 0000000..3c0318e --- /dev/null +++ b/t/recipes/checks/control-files/control-field-traversal-4/build-spec/DEBIAN/control.in @@ -0,0 +1,12 @@ +Package: [% $source %] +Version: [% $version %] +Architecture: [% $package_architecture %] +Maintainer: [% $author %] +Section: [% $section %] +Priority: optional +Source: ../binary/control-field-traversal-4 +Description: [% $description %] + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. diff --git a/t/recipes/checks/control-files/control-field-traversal-4/build-spec/fill-values b/t/recipes/checks/control-files/control-field-traversal-4/build-spec/fill-values new file mode 100644 index 0000000..b8508ba --- /dev/null +++ b/t/recipes/checks/control-files/control-field-traversal-4/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: deb +Testname: control-field-traversal-4 +Description: Test for directory traversal issues via field names or values diff --git a/t/recipes/checks/control-files/control-field-traversal-4/build-spec/pre-data b/t/recipes/checks/control-files/control-field-traversal-4/build-spec/pre-data new file mode 100755 index 0000000..c14dcc8 --- /dev/null +++ b/t/recipes/checks/control-files/control-field-traversal-4/build-spec/pre-data @@ -0,0 +1,13 @@ +#!/bin/sh + +set -e + +rootdir="$1" +name="$2" + +docdir="$rootdir/usr/share/doc" + +rm -rf "$docdir" + +mkdir -p "$docdir/dpkg" +ln -sf dpkg "$docdir/$name" diff --git a/t/recipes/checks/control-files/control-field-traversal-4/eval/desc b/t/recipes/checks/control-files/control-field-traversal-4/eval/desc new file mode 100644 index 0000000..f31ff4d --- /dev/null +++ b/t/recipes/checks/control-files/control-field-traversal-4/eval/desc @@ -0,0 +1,4 @@ +Testname: control-field-traversal-4 +Check: control-files +Output-Format: EWI +Match-Strategy: literal diff --git a/t/recipes/checks/control-files/control-field-traversal-4/eval/literal b/t/recipes/checks/control-files/control-field-traversal-4/eval/literal new file mode 100644 index 0000000..c1dd694 --- /dev/null +++ b/t/recipes/checks/control-files/control-field-traversal-4/eval/literal @@ -0,0 +1 @@ +warning: tainted binary package 'control-field-traversal-4', skipping diff --git a/t/recipes/checks/control-files/control-files-bad/build-spec/fill-values b/t/recipes/checks/control-files/control-files-bad/build-spec/fill-values new file mode 100644 index 0000000..9800fe7 --- /dev/null +++ b/t/recipes/checks/control-files/control-files-bad/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: deb +Testname: control-files-bad +Description: Test for bad owner of control files diff --git a/t/recipes/checks/control-files/control-files-bad/build-spec/pre-control b/t/recipes/checks/control-files/control-files-bad/build-spec/pre-control new file mode 100755 index 0000000..d504a1b --- /dev/null +++ b/t/recipes/checks/control-files/control-files-bad/build-spec/pre-control @@ -0,0 +1,7 @@ +#!/bin/sh + +set -e + +builddir="$1" + +chmod 755 "$builddir/md5sums" diff --git a/t/recipes/checks/control-files/control-files-bad/build-spec/tar-control b/t/recipes/checks/control-files/control-files-bad/build-spec/tar-control new file mode 100755 index 0000000..2188e24 --- /dev/null +++ b/t/recipes/checks/control-files/control-files-bad/build-spec/tar-control @@ -0,0 +1,8 @@ +#!/bin/sh + +set -e + +debiandir="$1" +controlmembers="$2" + +tar --create --file members/control.tar.gz --gzip --owner=nobody --directory "$debiandir" $controlmembers diff --git a/t/recipes/checks/control-files/control-files-bad/eval/desc b/t/recipes/checks/control-files/control-files-bad/eval/desc new file mode 100644 index 0000000..3d2b85d --- /dev/null +++ b/t/recipes/checks/control-files/control-files-bad/eval/desc @@ -0,0 +1,2 @@ +Testname: control-files-bad +Check: control-files diff --git a/t/recipes/checks/control-files/control-files-bad/eval/hints b/t/recipes/checks/control-files/control-files-bad/eval/hints new file mode 100644 index 0000000..513dd43 --- /dev/null +++ b/t/recipes/checks/control-files/control-files-bad/eval/hints @@ -0,0 +1,3 @@ +control-files-bad (binary): ctrl-script [md5sums] +control-files-bad (binary): control-file-has-bad-permissions 0755 != 0644 [md5sums] +control-files-bad (binary): control-file-has-bad-owner nobody/root != root/root (or 0/0) [md5sums] diff --git a/t/recipes/checks/control-files/control-files-classifications-ctrl-script/build-spec/debian/postinst b/t/recipes/checks/control-files/control-files-classifications-ctrl-script/build-spec/debian/postinst new file mode 100644 index 0000000..690173c --- /dev/null +++ b/t/recipes/checks/control-files/control-files-classifications-ctrl-script/build-spec/debian/postinst @@ -0,0 +1,9 @@ +#!/bin/sh + +set -e + +if [ "$1" = "configure" ] && which bar 2>/dev/null >/dev/null; then + bar configure +fi + +#DEBHELPER# diff --git a/t/recipes/checks/control-files/control-files-classifications-ctrl-script/build-spec/debian/prerm b/t/recipes/checks/control-files/control-files-classifications-ctrl-script/build-spec/debian/prerm new file mode 100644 index 0000000..a166618 --- /dev/null +++ b/t/recipes/checks/control-files/control-files-classifications-ctrl-script/build-spec/debian/prerm @@ -0,0 +1,9 @@ +#!/bin/sh + +set -e + +if [ "$1" = "remove" ] && which bar 2>/dev/null >/dev/null; then + bar remove +fi + +#DEBHELPER# diff --git a/t/recipes/checks/control-files/control-files-classifications-ctrl-script/build-spec/fill-values b/t/recipes/checks/control-files/control-files-classifications-ctrl-script/build-spec/fill-values new file mode 100644 index 0000000..903df89 --- /dev/null +++ b/t/recipes/checks/control-files/control-files-classifications-ctrl-script/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: upload-native +Testname: control-files-classifications-ctrl-script +Description: Test for control-files classifications diff --git a/t/recipes/checks/control-files/control-files-classifications-ctrl-script/eval/desc b/t/recipes/checks/control-files/control-files-classifications-ctrl-script/eval/desc new file mode 100644 index 0000000..480baee --- /dev/null +++ b/t/recipes/checks/control-files/control-files-classifications-ctrl-script/eval/desc @@ -0,0 +1,2 @@ +Testname: control-files-classifications-ctrl-script +Check: control-files diff --git a/t/recipes/checks/control-files/control-files-classifications-ctrl-script/eval/hints b/t/recipes/checks/control-files/control-files-classifications-ctrl-script/eval/hints new file mode 100644 index 0000000..70e73ea --- /dev/null +++ b/t/recipes/checks/control-files/control-files-classifications-ctrl-script/eval/hints @@ -0,0 +1,2 @@ +control-files-classifications-ctrl-script (binary): ctrl-script [prerm] +control-files-classifications-ctrl-script (binary): ctrl-script [postinst] diff --git a/t/recipes/checks/control-files/control-files-classifications-no-ctrl-scripts/build-spec/fill-values b/t/recipes/checks/control-files/control-files-classifications-no-ctrl-scripts/build-spec/fill-values new file mode 100644 index 0000000..fccd640 --- /dev/null +++ b/t/recipes/checks/control-files/control-files-classifications-no-ctrl-scripts/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: upload-native +Testname: control-files-classifications-no-ctrl-scripts +Description: Test for control-files classifications diff --git a/t/recipes/checks/control-files/control-files-classifications-no-ctrl-scripts/eval/desc b/t/recipes/checks/control-files/control-files-classifications-no-ctrl-scripts/eval/desc new file mode 100644 index 0000000..31c1524 --- /dev/null +++ b/t/recipes/checks/control-files/control-files-classifications-no-ctrl-scripts/eval/desc @@ -0,0 +1,2 @@ +Testname: control-files-classifications-no-ctrl-scripts +Check: control-files diff --git a/t/recipes/checks/control-files/control-files-classifications-no-ctrl-scripts/eval/hints b/t/recipes/checks/control-files/control-files-classifications-no-ctrl-scripts/eval/hints new file mode 100644 index 0000000..5edb006 --- /dev/null +++ b/t/recipes/checks/control-files/control-files-classifications-no-ctrl-scripts/eval/hints @@ -0,0 +1 @@ +control-files-classifications-no-ctrl-scripts (binary): no-ctrl-scripts diff --git a/t/recipes/checks/control-files/control-files-traversal/build-spec/control-members b/t/recipes/checks/control-files/control-files-traversal/build-spec/control-members new file mode 100644 index 0000000..092c411 --- /dev/null +++ b/t/recipes/checks/control-files/control-files-traversal/build-spec/control-members @@ -0,0 +1,3 @@ +conffiles +control +md5sums diff --git a/t/recipes/checks/control-files/control-files-traversal/build-spec/fill-values b/t/recipes/checks/control-files/control-files-traversal/build-spec/fill-values new file mode 100644 index 0000000..cce1fb0 --- /dev/null +++ b/t/recipes/checks/control-files/control-files-traversal/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: deb +Testname: control-files-traversal +Description: Test for bad owner of control files diff --git a/t/recipes/checks/control-files/control-files-traversal/build-spec/pre-control b/t/recipes/checks/control-files/control-files-traversal/build-spec/pre-control new file mode 100755 index 0000000..bc2cf15 --- /dev/null +++ b/t/recipes/checks/control-files/control-files-traversal/build-spec/pre-control @@ -0,0 +1,8 @@ +#!/bin/sh + +set -e + +debiandir="$1" +name="$2" + +ln -sf ../md5sums "$debiandir/conffiles" diff --git a/t/recipes/checks/control-files/control-files-traversal/eval/desc b/t/recipes/checks/control-files/control-files-traversal/eval/desc new file mode 100644 index 0000000..fb32936 --- /dev/null +++ b/t/recipes/checks/control-files/control-files-traversal/eval/desc @@ -0,0 +1,2 @@ +Testname: control-files-traversal +Check: control-files diff --git a/t/recipes/checks/control-files/control-files-traversal/eval/hints b/t/recipes/checks/control-files/control-files-traversal/eval/hints new file mode 100644 index 0000000..1fbc94b --- /dev/null +++ b/t/recipes/checks/control-files/control-files-traversal/eval/hints @@ -0,0 +1,2 @@ +control-files-traversal (binary): no-ctrl-scripts +control-files-traversal (binary): control-file-is-not-a-file [conffiles] diff --git a/t/recipes/checks/control-files/control-files-weird-files/build-spec/DEBIAN/isinstallable b/t/recipes/checks/control-files/control-files-weird-files/build-spec/DEBIAN/isinstallable new file mode 100644 index 0000000..3123e82 --- /dev/null +++ b/t/recipes/checks/control-files/control-files-weird-files/build-spec/DEBIAN/isinstallable @@ -0,0 +1 @@ +This is a udeb file and should be in a binary package. diff --git a/t/recipes/checks/control-files/control-files-weird-files/build-spec/DEBIAN/special-file b/t/recipes/checks/control-files/control-files-weird-files/build-spec/DEBIAN/special-file new file mode 100644 index 0000000..77d9abd --- /dev/null +++ b/t/recipes/checks/control-files/control-files-weird-files/build-spec/DEBIAN/special-file @@ -0,0 +1 @@ +This is an unknown control file. diff --git a/t/recipes/checks/control-files/control-files-weird-files/build-spec/DEBIAN/triggers b/t/recipes/checks/control-files/control-files-weird-files/build-spec/DEBIAN/triggers new file mode 100644 index 0000000..e69de29 diff --git a/t/recipes/checks/control-files/control-files-weird-files/build-spec/control-members b/t/recipes/checks/control-files/control-files-weird-files/build-spec/control-members new file mode 100644 index 0000000..1811cf0 --- /dev/null +++ b/t/recipes/checks/control-files/control-files-weird-files/build-spec/control-members @@ -0,0 +1,5 @@ +control +triggers +special-file +isinstallable +md5sums diff --git a/t/recipes/checks/control-files/control-files-weird-files/build-spec/fill-values b/t/recipes/checks/control-files/control-files-weird-files/build-spec/fill-values new file mode 100644 index 0000000..380bd5c --- /dev/null +++ b/t/recipes/checks/control-files/control-files-weird-files/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: deb +Testname: control-files-weird-files +Description: Test for bad owner of control files diff --git a/t/recipes/checks/control-files/control-files-weird-files/eval/desc b/t/recipes/checks/control-files/control-files-weird-files/eval/desc new file mode 100644 index 0000000..d7af633 --- /dev/null +++ b/t/recipes/checks/control-files/control-files-weird-files/eval/desc @@ -0,0 +1,2 @@ +Testname: control-files-weird-files +Check: control-files diff --git a/t/recipes/checks/control-files/control-files-weird-files/eval/hints b/t/recipes/checks/control-files/control-files-weird-files/eval/hints new file mode 100644 index 0000000..b763cb1 --- /dev/null +++ b/t/recipes/checks/control-files/control-files-weird-files/eval/hints @@ -0,0 +1,4 @@ +control-files-weird-files (binary): unknown-control-file [special-file] +control-files-weird-files (binary): not-allowed-control-file [isinstallable] +control-files-weird-files (binary): no-ctrl-scripts +control-files-weird-files (binary): control-file-is-empty [triggers] diff --git a/t/recipes/checks/control-files/legacy-binary/build-spec/debian/NEWS.Debian b/t/recipes/checks/control-files/legacy-binary/build-spec/debian/NEWS.Debian new file mode 100644 index 0000000..29f561c --- /dev/null +++ b/t/recipes/checks/control-files/legacy-binary/build-spec/debian/NEWS.Debian @@ -0,0 +1,12 @@ +binary (4-1.1) UNRELEASED; urgency=high + + This is a Debian NEWS entry that isn't encoded properly in UTF-8: . + It also has a usefull speling error. + + -- Russ Allbery Sun, 14 Oct 2007 17:11:36 -0700 + +binary (1) unstable; urgency=low + + This is another entry but this one isn't syntactically valid. + + -- Russ Allbery 2007-10-14 diff --git a/t/recipes/checks/control-files/legacy-binary/build-spec/debian/README.Debian b/t/recipes/checks/control-files/legacy-binary/build-spec/debian/README.Debian new file mode 100644 index 0000000..94bcc0a --- /dev/null +++ b/t/recipes/checks/control-files/legacy-binary/build-spec/debian/README.Debian @@ -0,0 +1,5 @@ +this is a binary package to test lintian's handling of bins. +Check handling of D-Bus and dbus (neither of which should produce +warnings). + + -- Russ Allbery , Wed, 6 Feb 2008 18:35:11 -0800 diff --git a/t/recipes/checks/control-files/legacy-binary/build-spec/debian/changelog.in b/t/recipes/checks/control-files/legacy-binary/build-spec/debian/changelog.in new file mode 100644 index 0000000..39301d6 --- /dev/null +++ b/t/recipes/checks/control-files/legacy-binary/build-spec/debian/changelog.in @@ -0,0 +1,47 @@ +binary ([% $version %]) [% $distribution %]; urgency=low + + * I'm doing an comaintainer-upload, acknowledging a NMU, but with a version + number which suggests I'm doing a NMU myself. + + Lintian-maintainers: Please don't update this changelog, otherwise you'll + probably break the checks/nmu checks. + + -- Jeroen van Wolffelaar Sun, 18 Apr 2004 01:49:42 +0200 + +binary (4-1) unstable; urgency=low + + * Weird version number for the new check for accidents with native + packaging. + * Date was fixed by BR and this test was put on changelog-file-strange-date + due to dpkg bug, see #794674. + + -- Marc 'HE' Brockschmidt Thu, 15 Apr 2004 23:33:51 +0200 + +binary (4) unstable; urgency=low + + * Add big file to /usr/share to trigger the big-usr-share check + + -- Jeroen van Wolffelaar Fri, 27 Feb 2004 10:15:59 +0100 + +binary (3) unstable; urgency=unlimited + + * Add some bogus menu entries using su-to-root in a bogus way + + -- Jeroen van Wolffelaar Thu, 12 Feb 2004 20:11:22 +0100 + +binary (2) unstable; urgency=low + + * Added an INSTALL document which policy 6.3 suggests not to do + + -- Sean 'Shaleh' Perry Tue, 30 Jan 2001 15:23:59 -0800 + +binary (1) unstable; urgency=low + + * hello.c added + * hello-static is same as hello, but compiled statically + * added a menu entry which lacks a Section + * added a postinst + * postinst calls suidregister which is no longer policy compliant + + -- Sean 'Shaleh' Perry Wed, 10 Jan 2001 08:55:34 -0800 + diff --git a/t/recipes/checks/control-files/legacy-binary/build-spec/debian/conffiles b/t/recipes/checks/control-files/legacy-binary/build-spec/debian/conffiles new file mode 100644 index 0000000..d1a0843 --- /dev/null +++ b/t/recipes/checks/control-files/legacy-binary/build-spec/debian/conffiles @@ -0,0 +1 @@ +/etc/menu-methods/lintian diff --git a/t/recipes/checks/control-files/legacy-binary/build-spec/debian/control b/t/recipes/checks/control-files/legacy-binary/build-spec/debian/control new file mode 100644 index 0000000..c797357 --- /dev/null +++ b/t/recipes/checks/control-files/legacy-binary/build-spec/debian/control @@ -0,0 +1,42 @@ +Source: binary +Section: misc +Priority: optional +Maintainer: Lintian Maintainers +Uploaders: Co-maintainer one , Jeroen van Wolffelaar , Co-maintainer three +Standards-Version: 3.2.1 +Homepage: http://lintian.debian.org/ +Vcs-Svn: http://svn.wolffelaar.nl/lintian/trunk +XS-Vcs-Browser: http://svn.wolffelaar.nl/lintian/trunk +XS-Dm-Upload-Allowed: yes + +Package: binary +Architecture: any +Pre-Depends: ${shlibs:Depends}, xorg, binary-data (= ${source:Version}), libssl0.9.8 +Homepage: +Vcs-Svn: http://svn.wolffelaar.nl/lintian/trunk +Description: test handling of binary files + Regression test for lintian's handling of binary files for debian. This + is checked for picky spelling errors. + . + This package list [ subversion | gconf ] should not be flagged as a spelling + mistake. The spelling correction for dont should be correct. + . + Homepage: http://lintian.debian.org/ + +Package: binary-data +Architecture: all +Depends: binary (= ${source:Version}), libssl-not-openssl, + libssl0.9.8 | or-something-else +Description: test handling of binary relationships + Regression test for lintian's checking of package relationships between + arch:any and arch:all packages. + . + This mention of subversion should be flagged as a spelling mistake. + +#Package: binary-comment +#Architecture: space-almonds +#Depends: * +#Depends: * +#Description: test comment support +# Yes, comments are actually allowed in debian/control, so none of the +# above should produce errors. diff --git a/t/recipes/checks/control-files/legacy-binary/build-spec/debian/copyright b/t/recipes/checks/control-files/legacy-binary/build-spec/debian/copyright new file mode 100644 index 0000000..1d6806d --- /dev/null +++ b/t/recipes/checks/control-files/legacy-binary/build-spec/debian/copyright @@ -0,0 +1,15 @@ +hello.c is released under public domain. This is distributed in the hope that +it will be useful, but without any warranty; without even the implied warranty +of merchantability or fitness for a particular purpose. + +A reference to /usr/share/common-licenses/GPL-2 to make it look like this +package is under the GPL and trigger the OpenSSL warning. + +Test for old FSF address: + +Free Software Foundation, Inc., 59 Temple Place - Suite 330, +Boston, MA 02111-1307, USA. + +Test for deprecated ntionl ncoding. + +Improper capitalization of linux or debian isn't caught here. diff --git a/t/recipes/checks/control-files/legacy-binary/build-spec/debian/doc-base b/t/recipes/checks/control-files/legacy-binary/build-spec/debian/doc-base new file mode 100644 index 0000000..7e5b38f --- /dev/null +++ b/t/recipes/checks/control-files/legacy-binary/build-spec/debian/doc-base @@ -0,0 +1,41 @@ +Document: binary!docs +Title: Broken debian binary doc-base control file +Author: Russ Allbery +Abstract: This control file exercises various tests of doc-base control + files, including several things that aren't tested yet. The third and + fourth one has trailing whitespace. + . + This section has a speling error and bad character. + . + The above separator was fine. +Section: Non/Existant +Unknown: Some field + + + +Format: debiandoc-sgML +Files: /usr/share/doc/binary/binary.sgml.gz +Unknown: Some field + +Format: ESP +Index: /usr/share/doc/binary/binary.txt + +Index: /usr/share/doc/binary/html/index.html + /usr/share/doc/binary/html/ch1.html + /usr/share/doc/binary/html/ch4.html + + +Format: HTML +Index: /usr/share/doc/binary/html/index.html +Files: /usr/share/doc/binary/html/ch?.h*l + /usr/share/doc/binary/hml/*.html + +Format: inFO +Files: /usr/share/info/binary.info.gz + +Format: HTML +Index: /usr/share/doc/binary/html/index.html +Files: /usr/share/doc/binary/html/ch5.html + /usr/share/doc/binary/html/ch6.html + + diff --git a/t/recipes/checks/control-files/legacy-binary/build-spec/debian/goodbye.desktop b/t/recipes/checks/control-files/legacy-binary/build-spec/debian/goodbye.desktop new file mode 100644 index 0000000..f6ce8e3 --- /dev/null +++ b/t/recipes/checks/control-files/legacy-binary/build-spec/debian/goodbye.desktop @@ -0,0 +1,13 @@ +[Desktop Entry] +Name:Goodbye +# Name=Goodbye +Comment=Say hello! +SpecialTag=This doesn't exist! +Exec=goodbye +icon=hello +Terminal=true +Type=Application +Categories=WeirdStuff;Screensaver; +Encoding=ISO-10646-1 +[Other Entry] +Name=Goodbye diff --git a/t/recipes/checks/control-files/legacy-binary/build-spec/debian/hello.desktop b/t/recipes/checks/control-files/legacy-binary/build-spec/debian/hello.desktop new file mode 100644 index 0000000..f795468 --- /dev/null +++ b/t/recipes/checks/control-files/legacy-binary/build-spec/debian/hello.desktop @@ -0,0 +1,14 @@ +# some random comment + +# [Foo Bar] +[KDE Desktop Entry] +Name=Hello +Name[en_US]=Hello +Comment=Say hello! +Exec=kdesu hello +Icon=hello +Terminal=true +Type=Application +Categories=GNOME;GTK;System;Applet;X-Foo;Settings; +Encoding=UTF-8 +OnlyShowIn=GNOME; diff --git a/t/recipes/checks/control-files/legacy-binary/build-spec/debian/menu b/t/recipes/checks/control-files/legacy-binary/build-spec/debian/menu new file mode 100644 index 0000000..e8972f4 --- /dev/null +++ b/t/recipes/checks/control-files/legacy-binary/build-spec/debian/menu @@ -0,0 +1,26 @@ +?package(binary):needs=text title="Hello World" command="/usr/bin/hello" +?package(binary):needs=text section="Applications/System" title="Run cfdisk (0)" command="/usr/bin/su-to-root cfdisk" +?package(binary):needs="text" section="Applications/System/Hardware" title="Run cfdisk (1)" command="sux -p cfdisk" +?package(binary):needs="x11" section="Window Managers" title="Run xfdisk" command="/usr/sbin/su-to-root -c xfdisk" +?package(binary):needs="wm" section="Applications/System/Administration" title="Run fdisk-wm" command="su-to-root -c hello" +?package(binary):section="Apps/Games" title="I'm not root!" command="su-to-root -c imnothere" +?package(binary):needs="text" section="Apps/System" title="I'm not here!" command="/imnothere" +?package(binary,other-binary):\ + needs="text"\ + section="Applications/Shells"\ + title="more than one required"\ + command="other-bin -s omething" +?package(binary):needs="wmmodule" section="WindowManagers/Modules" title="somemodule" command="ModuleCmd" +?package(binary):needs="wmmodule" section="FVWM Modules" title="somemodule" command="ModuleCmd" +?package(binary):needs="text" section="Applications/System/Administration" title="I'm not in /usr/bin!" command="iminusrbin" +?package(binary):needs="text"\ + section="Applications/System/Administration"\ + title="I'm not root!" command="su-to-root -c imnothere" +?package(binary):needs="text" section="Applications/System/Administration"\ + title="Run cfdisk (0)" command="cfdisk" +?package(binary):needs="text" section="Applications/System/Administration" title="Hello World" command="/usr/bin/hello" +?package(binary):needs="wm" section="FVWM Modules" title="Fake Module" command="hello" +?package(binary):needs="fvwmmodule" section="Window Maker" title="Fake Module"\ + command="hello" +?package(binary):needs="x11" section="Applications/System/Hardware" title="Run xfdisk" command="su-to-root -c 'xfdisk -f'" +?package(binary):needs="text" section="Applications/System/Administration" title="foo" command="sh /path/to/foo" diff --git a/t/recipes/checks/control-files/legacy-binary/build-spec/debian/menu-method b/t/recipes/checks/control-files/legacy-binary/build-spec/debian/menu-method new file mode 100644 index 0000000..9f07bd7 --- /dev/null +++ b/t/recipes/checks/control-files/legacy-binary/build-spec/debian/menu-method @@ -0,0 +1,22 @@ +#!/usr/bin/install-menu + +# -*- mode: shell-script; -*- +#I need menu-1! +# + +!include notmenu.h + +compat="menu-2" + +outputencoding="UTF-8"; +outputlanguage="C"; + +x11 = AppEntry("false"); +text = AppEntry("true"); + +startmenu = ""; +endmenu = ""; +submenutitle = ""; +rootprefix = "/var/lib/lintian/menu"; +userprefix = ".local/share/lintian/menu"; + diff --git a/t/recipes/checks/control-files/legacy-binary/build-spec/debian/postinst b/t/recipes/checks/control-files/legacy-binary/build-spec/debian/postinst new file mode 100644 index 0000000..29e1861 --- /dev/null +++ b/t/recipes/checks/control-files/legacy-binary/build-spec/debian/postinst @@ -0,0 +1,6 @@ +#! /bin/bash -e + +if [ $1 eq 'configure' ] +then + suidregister hello-static root root 4755 +fi diff --git a/t/recipes/checks/control-files/legacy-binary/build-spec/debian/rules b/t/recipes/checks/control-files/legacy-binary/build-spec/debian/rules new file mode 100755 index 0000000..a962ea9 --- /dev/null +++ b/t/recipes/checks/control-files/legacy-binary/build-spec/debian/rules @@ -0,0 +1,92 @@ +#!/usr/bin/make -f + +tmp=debian/tmp + +# This reference to $(PWD) should not cause an error but the one below +# should. +build-arch: + make + echo $(PWD) + +build: build-arch + +clean: + make -i clean + [ ! -f debian/files ] || rm -f debian/files + [ ! -f debian/substvars ] || rm -f debian/substvars + [ ! -d debian/tmp ] || rm -rf debian/tmp + [ ! -d debian/binary ] || rm -rf debian/binary + [ ! -d debian/binary-data ] || rm -rf debian/binary-data + +binary-arch: build + install -d $(tmp)/usr/bin + install -d $(tmp)/boot/hello + install -m 755 hello $(tmp)/usr/bin + touch $(tmp)/usr/bin/iminusrbin + chmod 755 $(tmp)/usr/bin/iminusrbin + install -m 755 hello-static $(tmp)/usr/bin + strip $(tmp)/usr/bin/hello-static + install -m 755 hello-static $(tmp)/usr/bin/hello.static + strip --remove-section=.comment --remove-section=.note $(tmp)/usr/bin/hello.static + ln $(tmp)/usr/bin/hello.static $(tmp)/usr/bin/static-hello + install -m 755 hello-static $(tmp)/boot/hello + strip --remove-section=.comment --remove-section=.note $(tmp)/boot/hello/hello-static + install -d $(tmp)/usr/share/doc/binary + install -m 644 INSTALL $(tmp)/usr/share/doc/binary + install -d $(tmp)/usr/share/doc/binary/html + echo '' > $(tmp)/usr/share/doc/binary/html/index.html + echo '' > $(tmp)/usr/share/doc/binary/html/ch1.html + ln -s ../html/./ch1.html $(tmp)/usr/share/doc/binary/html/ch2.html + ln -s /usr/share/doc/binary/htm/ch1.html $(tmp)/usr/share/doc/binary/html/ch3.html + echo '' > $(tmp)/usr/share/doc/binary/html/ch5.html + ln $(tmp)/usr/share/doc/binary/html/ch5.html \ + $(tmp)/usr/share/doc/binary/html/ch6.html + install -d $(tmp)/usr/share/menu + install -d $(tmp)/usr/lib/menu + install -d $(tmp)/usr/share/binary + install -m 644 debian/menu $(tmp)/usr/share/menu/binary + install -m 644 debian/menu $(tmp)/usr/lib/menu/binary + install -d $(tmp)/etc/menu-methods + install -m 755 debian/menu-method $(tmp)/etc/menu-methods/lintian + install -d $(tmp)/usr/share/doc-base + install -m 644 debian/doc-base $(tmp)/usr/share/doc-base/binary + touch '$(tmp)/usr/share/doc-base/space ' + install -m 644 debian/README.Debian $(tmp)/usr/share/doc/binary + install -m 644 debian/NEWS.Debian $(tmp)/usr/share/doc/binary + gzip -n -9 $(tmp)/usr/share/doc/binary/NEWS.Debian + install -m 644 debian/copyright $(tmp)/usr/share/doc/binary + install -m 644 debian/changelog $(tmp)/usr/share/doc/binary + #gzip -n -9 $(tmp)/usr/share/doc/binary/changelog + install -d $(tmp)/DEBIAN + install -m 755 debian/postinst $(tmp)/DEBIAN + install -m 644 debian/conffiles $(tmp)/DEBIAN + + install -d $(tmp)/usr/share/applications + install -m 644 debian/hello.desktop \ + $(tmp)/usr/share/applications/hello.desktop + install -m 755 debian/goodbye.desktop \ + $(tmp)/usr/share/applications/goodbye.desktop + + # should be ok... + echo boe > $(tmp)/usr/bar + ln $(tmp)/usr/bar $(tmp)/usr/foo + # but this isn't + echo boe > $(tmp)/usr/bar2 + ln $(tmp)/usr/bar2 $(tmp)/usr/share/baz + + dd if=/dev/zero of=$(tmp)/usr/share/binary/largefile bs=1024 count=4000 + + install -d debian/binary-data/DEBIAN + install -d debian/binary-data/usr/share/doc + ln -s binary debian/binary-data/usr/share/doc/binary-data + + dpkg-shlibdeps $(tmp)/usr/bin/hello + dpkg-gencontrol -pbinary -isp + dpkg-gencontrol -pbinary-data -Pdebian/binary-data -isp + + dpkg --build debian/tmp .. + dpkg --build debian/binary-data .. + +binary: binary-arch + +.PHONY: build-arch build binary-arch binary clean diff --git a/t/recipes/checks/control-files/legacy-binary/build-spec/debian/templates b/t/recipes/checks/control-files/legacy-binary/build-spec/debian/templates new file mode 100644 index 0000000..3d92861 --- /dev/null +++ b/t/recipes/checks/control-files/legacy-binary/build-spec/debian/templates @@ -0,0 +1,16 @@ +# The debconf templates defined here are the sort that you'd use if +# providing a wordlist and an ispell dictionary for the language +# "perl". This shouldn't trigger warnings about not using debconf-po. + +Template: shared/packages-ispell +Type: text +Description: + +Template: shared/packages-wordlist +Type: text +Description: + +Template: miscfiles/languages +Type: text +Default: perl (Pathologically Eclectic Rubbish Lister) +Description: diff --git a/t/recipes/checks/control-files/legacy-binary/build-spec/fill-values b/t/recipes/checks/control-files/legacy-binary/build-spec/fill-values new file mode 100644 index 0000000..b503871 --- /dev/null +++ b/t/recipes/checks/control-files/legacy-binary/build-spec/fill-values @@ -0,0 +1,5 @@ +Skeleton: upload-non-native +Testname: legacy-binary +Source: binary +Version: 4-1.1 +Description: Legacy test "binary" diff --git a/t/recipes/checks/control-files/legacy-binary/build-spec/orig/INSTALL b/t/recipes/checks/control-files/legacy-binary/build-spec/orig/INSTALL new file mode 100644 index 0000000..3b50ea9 --- /dev/null +++ b/t/recipes/checks/control-files/legacy-binary/build-spec/orig/INSTALL @@ -0,0 +1,176 @@ +Basic Installation +================== + + These are generic installation instructions. + + The `configure' shell script attempts to guess correct values for +various system-dependent variables used during compilation. It uses +those values to create a `Makefile' in each directory of the package. +It may also create one or more `.h' files containing system-dependent +definitions. Finally, it creates a shell script `config.status' that +you can run in the future to recreate the current configuration, a file +`config.cache' that saves the results of its tests to speed up +reconfiguring, and a file `config.log' containing compiler output +(useful mainly for debugging `configure'). + + If you need to do unusual things to compile the package, please try +to figure out how `configure' could check whether to do them, and mail +diffs or instructions to the address given in the `README' so they can +be considered for the next release. If at some point `config.cache' +contains results you don't want to keep, you may remove or edit it. + + The file `configure.in' is used to create `configure' by a program +called `autoconf'. You only need `configure.in' if you want to change +it or regenerate `configure' using a newer version of `autoconf'. + +The simplest way to compile this package is: + + 1. `cd' to the directory containing the package's source code and type + `./configure' to configure the package for your system. If you're + using `csh' on an old version of System V, you might need to type + `sh ./configure' instead to prevent `csh' from trying to execute + `configure' itself. + + Running `configure' takes a while. While running, it prints some + messages telling which features it is checking for. + + 2. Type `make' to compile the package. + + 3. Optionally, type `make check' to run any self-tests that come with + the package. + + 4. Type `make install' to install the programs and any data files and + documentation. + + 5. You can remove the program binaries and object files from the + source code directory by typing `make clean'. To also remove the + files that `configure' created (so you can compile the package for + a different kind of computer), type `make distclean'. There is + also a `make maintainer-clean' target, but that is intended mainly + for the package's developers. If you use it, you may have to get + all sorts of other programs in order to regenerate files that came + with the distribution. + +Compilers and Options +===================== + + Some systems require unusual options for compilation or linking that +the `configure' script does not know about. You can give `configure' +initial values for variables by setting them in the environment. Using +a Bourne-compatible shell, you can do that on the command line like +this: + CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure + +Or on systems that have the `env' program, you can do it like this: + env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure + +Compiling For Multiple Architectures +==================================== + + You can compile the package for more than one kind of computer at the +same time, by placing the object files for each architecture in their +own directory. To do this, you must use a version of `make' that +supports the `VPATH' variable, such as GNU `make'. `cd' to the +directory where you want the object files and executables to go and run +the `configure' script. `configure' automatically checks for the +source code in the directory that `configure' is in and in `..'. + + If you have to use a `make' that does not supports the `VPATH' +variable, you have to compile the package for one architecture at a time +in the source code directory. After you have installed the package for +one architecture, use `make distclean' before reconfiguring for another +architecture. + +Installation Names +================== + + By default, `make install' will install the package's files in +`/usr/local/bin', `/usr/local/man', etc. You can specify an +installation prefix other than `/usr/local' by giving `configure' the +option `--prefix=PATH'. + + You can specify separate installation prefixes for +architecture-specific files and architecture-independent files. If you +give `configure' the option `--exec-prefix=PATH', the package will use +PATH as the prefix for installing programs and libraries. +Documentation and other data files will still use the regular prefix. + + If the package supports it, you can cause programs to be installed +with an extra prefix or suffix on their names by giving `configure' the +option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. + +Optional Features +================= + + Some packages pay attention to `--enable-FEATURE' options to +`configure', where FEATURE indicates an optional part of the package. +They may also pay attention to `--with-PACKAGE' options, where PACKAGE +is something like `gnu-as' or `x' (for the X Window System). The +`README' should mention any `--enable-' and `--with-' options that the +package recognizes. + + For packages that use the X Window System, `configure' can usually +find the X include and library files automatically, but if it doesn't, +you can use the `configure' options `--x-includes=DIR' and +`--x-libraries=DIR' to specify their locations. + +Specifying the System Type +========================== + + There may be some features `configure' can not figure out +automatically, but needs to determine by the type of host the package +will run on. Usually `configure' can figure that out, but if it prints +a message saying it can not guess the host type, give it the +`--host=TYPE' option. TYPE can either be a short name for the system +type, such as `sun4', or a canonical name with three fields: + CPU-COMPANY-SYSTEM + +See the file `config.sub' for the possible values of each field. If +`config.sub' isn't included in this package, then this package doesn't +need to know the host type. + + If you are building compiler tools for cross-compiling, you can also +use the `--target=TYPE' option to select the type of system they will +produce code for and the `--build=TYPE' option to select the type of +system on which you are compiling the package. + +Sharing Defaults +================ + + If you want to set default values for `configure' scripts to share, +you can create a site shell script called `config.site' that gives +default values for variables like `CC', `cache_file', and `prefix'. +`configure' looks for `PREFIX/share/config.site' if it exists, then +`PREFIX/etc/config.site' if it exists. Or, you can set the +`CONFIG_SITE' environment variable to the location of the site script. +A warning: not all `configure' scripts look for a site script. + +Operation Controls +================== + + `configure' recognizes the following options to control how it +operates. + +`--cache-file=FILE' + Use and save the results of the tests in FILE instead of + `./config.cache'. Set FILE to `/dev/null' to disable caching, for + debugging `configure'. + +`--help' + Print a summary of the options to `configure', and exit. + +`--quiet' +`--silent' +`-q' + Do not print messages saying which checks are being made. + +`--srcdir=DIR' + Look for the package's source code in directory DIR. Usually + `configure' can determine that directory automatically. + +`--version' + Print the version of Autoconf used to generate the `configure' + script, and exit. + +`configure' also accepts some other, not widely useful, options. + diff --git a/t/recipes/checks/control-files/legacy-binary/build-spec/orig/Makefile b/t/recipes/checks/control-files/legacy-binary/build-spec/orig/Makefile new file mode 100644 index 0000000..da1dc55 --- /dev/null +++ b/t/recipes/checks/control-files/legacy-binary/build-spec/orig/Makefile @@ -0,0 +1,12 @@ +all: hello hello-static + +hello: hello.c + gcc hello.c -o hello + +hello-static: hello.c + gcc -static hello.c -o hello-static + +clean: + rm -f hello hello-static + +distclean: clean diff --git a/t/recipes/checks/control-files/legacy-binary/build-spec/orig/hello.c b/t/recipes/checks/control-files/legacy-binary/build-spec/orig/hello.c new file mode 100644 index 0000000..2fb04e1 --- /dev/null +++ b/t/recipes/checks/control-files/legacy-binary/build-spec/orig/hello.c @@ -0,0 +1,8 @@ +#include +#include + +int main(int argc, char *argv[]) { + + printf("Hello, World!\n"); + exit(0); +} diff --git a/t/recipes/checks/control-files/legacy-binary/eval/desc b/t/recipes/checks/control-files/legacy-binary/eval/desc new file mode 100644 index 0000000..64f5f41 --- /dev/null +++ b/t/recipes/checks/control-files/legacy-binary/eval/desc @@ -0,0 +1,3 @@ +Testname: legacy-binary +Test-Against: control-file-is-empty +Check: control-files diff --git a/t/recipes/checks/control-files/legacy-binary/eval/hints b/t/recipes/checks/control-files/legacy-binary/eval/hints new file mode 100644 index 0000000..aa51beb --- /dev/null +++ b/t/recipes/checks/control-files/legacy-binary/eval/hints @@ -0,0 +1,2 @@ +binary-data (binary): no-ctrl-scripts +binary (binary): ctrl-script [postinst] diff --git a/t/recipes/checks/control-files/legacy-binary/eval/post-test b/t/recipes/checks/control-files/legacy-binary/eval/post-test new file mode 100644 index 0000000..3deefd5 --- /dev/null +++ b/t/recipes/checks/control-files/legacy-binary/eval/post-test @@ -0,0 +1,3 @@ +s/arch-dep-package-has-big-usr-share .*kB .*%/arch-dep-package-has-big-usr-share/ +/: hardening-.*/ d +s/\(current is ([0-9]+\.)+[0-9]\)/(current is CURRENT)/ diff --git a/t/recipes/checks/control-files/legacy-libbaz/build-spec/debian/changelog.in b/t/recipes/checks/control-files/legacy-libbaz/build-spec/debian/changelog.in new file mode 100644 index 0000000..91a6bb5 --- /dev/null +++ b/t/recipes/checks/control-files/legacy-libbaz/build-spec/debian/changelog.in @@ -0,0 +1,6 @@ +libbaz ([% $version %]) [% $distribution %]; urgency=low + + * Initial setup + + -- Sean 'Shaleh' Perry Tue, 30 Jan 2001 15:23:59 -0800 + diff --git a/t/recipes/checks/control-files/legacy-libbaz/build-spec/debian/compat.in b/t/recipes/checks/control-files/legacy-libbaz/build-spec/debian/compat.in new file mode 100644 index 0000000..640a566 --- /dev/null +++ b/t/recipes/checks/control-files/legacy-libbaz/build-spec/debian/compat.in @@ -0,0 +1 @@ +[% $dh_compat_level %] diff --git a/t/recipes/checks/control-files/legacy-libbaz/build-spec/debian/control b/t/recipes/checks/control-files/legacy-libbaz/build-spec/debian/control new file mode 100644 index 0000000..1506687 --- /dev/null +++ b/t/recipes/checks/control-files/legacy-libbaz/build-spec/debian/control @@ -0,0 +1,58 @@ +Source: libbaz +Section: libs +Priority: optional +Maintainer: Lintian Maintainer +Build-depends: debhelper (>=4) +Standards-Version: 3.2.1 + +Package: libbaz1 +Architecture: any +Provides: libbaz +Description: test handling of library packages + Regression test for lintian's handling of libraries. + . + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. + +Package: libbaz1-dev +Architecture: any +Depends: libbaz1 (= ${source:Version}), perlapi-5.8.8 +Description: development package + Regression test for lintian's handling of libraries (dev). + . + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. + +Package: libbaz2 +Architecture: any +Depends: ${shlibs:Depends}, libssl0.9.8 +Description: test handling of library packages (good) + Regression test for lintian's handling of libraries (good). + . + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. + +Package: libbaz2-dev +Architecture: any +Depends: ${shlibs:Depends}, libbaz2 (= ${source:Version}) +Description: development package (good) + Regression test for lintian's handling of libraries (dev good). + . + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. + +Package: libbaz2-dbg +Architecture: any +Depends: libbaz2 (= ${binary:Version}) +Priority: optional +Description: debugging package + Regression test for lintian's handling of libraries (debug). + . + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. + diff --git a/t/recipes/checks/control-files/legacy-libbaz/build-spec/debian/copyright b/t/recipes/checks/control-files/legacy-libbaz/build-spec/debian/copyright new file mode 100644 index 0000000..a874c87 --- /dev/null +++ b/t/recipes/checks/control-files/legacy-libbaz/build-spec/debian/copyright @@ -0,0 +1,8 @@ +This package is released under public domain. This is distributed in the hope +that it will be useful, but without any warranty; without even the implied +warranty of merchantability or fitness for a particular purpose. + +A reference to /usr/share/common-licenses/GPL-2 to make it look like this +package is under the GPL and trigger the OpenSSL warning. + +However, this has an OpenSSL exception. diff --git a/t/recipes/checks/control-files/legacy-libbaz/build-spec/debian/dev.postinst b/t/recipes/checks/control-files/legacy-libbaz/build-spec/debian/dev.postinst new file mode 100644 index 0000000..683e3cc --- /dev/null +++ b/t/recipes/checks/control-files/legacy-libbaz/build-spec/debian/dev.postinst @@ -0,0 +1,4 @@ +#!/bin/sh -e + +$PKG=libbaz1-dev + diff --git a/t/recipes/checks/control-files/legacy-libbaz/build-spec/debian/dev.prerm b/t/recipes/checks/control-files/legacy-libbaz/build-spec/debian/dev.prerm new file mode 100644 index 0000000..683e3cc --- /dev/null +++ b/t/recipes/checks/control-files/legacy-libbaz/build-spec/debian/dev.prerm @@ -0,0 +1,4 @@ +#!/bin/sh -e + +$PKG=libbaz1-dev + diff --git a/t/recipes/checks/control-files/legacy-libbaz/build-spec/debian/lib.postinst b/t/recipes/checks/control-files/legacy-libbaz/build-spec/debian/lib.postinst new file mode 100644 index 0000000..ec0b98a --- /dev/null +++ b/t/recipes/checks/control-files/legacy-libbaz/build-spec/debian/lib.postinst @@ -0,0 +1,10 @@ +#!/bin/sh -e + +$PKG=libbaz1 + +if [ "$1" = "configure" ]; then + if [ -d /usr/doc -a ! -e /usr/doc/$PKG -a -d /usr/share/doc/$PKG ] +; then + ln -sf ../share/doc/$PKG /usr/doc/$PKG + fi +fi diff --git a/t/recipes/checks/control-files/legacy-libbaz/build-spec/debian/lib.prerm b/t/recipes/checks/control-files/legacy-libbaz/build-spec/debian/lib.prerm new file mode 100644 index 0000000..50e37c3 --- /dev/null +++ b/t/recipes/checks/control-files/legacy-libbaz/build-spec/debian/lib.prerm @@ -0,0 +1,7 @@ +#!/bin/sh -e + +$PKG=libbaz1 + +if [ \( "$1" = "upgrade" -o "$1" = "remove" \) -a -L /usr/doc/$PKG ]; then + rm -f /usr/doc/$PKG +fi diff --git a/t/recipes/checks/control-files/legacy-libbaz/build-spec/debian/lib.shlibs b/t/recipes/checks/control-files/legacy-libbaz/build-spec/debian/lib.shlibs new file mode 100644 index 0000000..b88e288 --- /dev/null +++ b/t/recipes/checks/control-files/legacy-libbaz/build-spec/debian/lib.shlibs @@ -0,0 +1,8 @@ +libdoesntexist2 1.0 libbaz1 +libdoesntexist2 1.0 libbaz1 +libbaz2 1.1 libbaz +libbaz3 1 libbaz1 (>> 1-1) +libbaz4 1 libbaz1 (= 1-1) +libbaz5 1 libbaz2 +udeb: libdoesntexist2 1.0 libbaz2 +udeb: libdoesntexist2 1.0 libbaz2 diff --git a/t/recipes/checks/control-files/legacy-libbaz/build-spec/debian/lib.symbols b/t/recipes/checks/control-files/legacy-libbaz/build-spec/debian/lib.symbols new file mode 100644 index 0000000..72f9d8a --- /dev/null +++ b/t/recipes/checks/control-files/legacy-libbaz/build-spec/debian/lib.symbols @@ -0,0 +1,3 @@ +libbaz.so.2 libbaz1 #MINVER# + pw 1-1 + foo 1.1-1 diff --git a/t/recipes/checks/control-files/legacy-libbaz/build-spec/debian/rules b/t/recipes/checks/control-files/legacy-libbaz/build-spec/debian/rules new file mode 100755 index 0000000..fa99bc8 --- /dev/null +++ b/t/recipes/checks/control-files/legacy-libbaz/build-spec/debian/rules @@ -0,0 +1,121 @@ +#!/usr/bin/make -f + +lib_tmp=debian/tmp-lib +dev_tmp=debian/tmp-dev + +LIB=libbaz1 +DEV=libbaz1-dev + +VENDORARCH := $(shell perl -MConfig -wE'say substr($$Config{vendorarch},1)') + +build-arch: + $(MAKE) + +build-indep: + +build: build-arch build-indep + +clean: + $(MAKE) clean + dh_clean -plibbaz2 -plibbaz2-dev + rm -f debian/files debian/substvars + rm -rf $(lib_tmp) $(dev_tmp) + +# Now the correct libbaz2-dev package +binary-correct: + install -d debian/libbaz2-dev/usr/lib + cp -a libbaz2.a libbaz2.so debian/libbaz2-dev/usr/lib + # usually, I'd also include some .h files to /usr/include + + # Now the correct libbaz2 package + install -d debian/libbaz2/usr/lib + cp -a libbaz2.so.* debian/libbaz2/usr/lib + chmod a-x debian/libbaz2/usr/lib/* + + # General stuff that is tested in other testsets: + dh_installdocs -plibbaz2 -plibbaz2-dev -plibbaz2-dbg + dh_compress -plibbaz2 -plibbaz2-dev -plibbaz2-dbg + + # Mess up the libbaz2 changelog files to test the symlink handling. + ln -s /usr/share/doc/lintian/changelog.gz \ + debian/libbaz2/usr/share/doc/libbaz2/changelog.gz + install -m 644 debian/changelog \ + debian/libbaz2-dev/usr/share/doc/libbaz2-dev/foo + ln -s foo debian/libbaz2-dev/usr/share/doc/libbaz2-dev/changelog + + # Okay, if either line is omitted, it should be noted + dh_strip --dbg-package=libbaz2-dbg -plibbaz2 -plibbaz2-dev + dh_makeshlibs -plibbaz2 -plibbaz2-dev -plibbaz2-dbg + dh_shlibdeps -plibbaz2 -plibbaz2-dev -plibbaz2-dbg + + # and again, regular packaging stuff + dh_installdeb -plibbaz2 -plibbaz2-dev -plibbaz2-dbg + echo udeb: libbaz2 1.0 libbaz2 >> debian/libbaz2/DEBIAN/shlibs + dh_gencontrol -plibbaz2 -plibbaz2-dev -plibbaz2-dbg + dh_builddeb -plibbaz2 -plibbaz2-dev -plibbaz2-dbg + +# and the incorrect one +binary-arch: build-arch binary-correct + # first, the lib package + install -d $(lib_tmp)/usr/lib + # resp. no soname (check), wrong soname (check), and no-pic (check) + cp -a libbaz1.so.1.0* $(lib_tmp)/usr/lib + cp -a libbaz2.so.1.0.3b $(lib_tmp)/usr/lib/libfoo2.so.1.0.3b + install -m644 libbaz3.so.1.0.3b $(lib_tmp)/usr/lib/libbaz3.so.1.0.3b + # let's include the .a in the non-dev too (TODO) + # Also, libbaz1.a hasn't a symbol table (TODO) + cp -a *.a $(lib_tmp)/usr/lib + # And a wrong .so symlink (wrong, only in -dev, TODO) + ln -s libfoo3.so.0.9 $(lib_tmp)/usr/lib/libfoo3.so + # And a wrong .so.X symlink (wrong, should point to a real existing + # shlib, TODO) + ln -s libfoo.so.0.9.1 $(lib_tmp)/usr/lib/libfoo.so.0.9 + # And a plain .so (wrong, TODO) + touch $(lib_tmp)/usr/lib/libbar2.so + # And a non-versioned SONAME. + install -m644 libbaz.so $(lib_tmp)/usr/lib/libbaz.so + strip --remove-section=.comment --strip-unneeded $(lib_tmp)/usr/lib/libbaz.so + # Pretend to be a Perl module to test a lack of Perl dependencies. + install -d $(lib_tmp)/$(VENDORARCH)/auto/Foo + install -m 644 libbaz2.so.1.0.3b $(lib_tmp)/$(VENDORARCH)/auto/Foo/Foo.so + strip $(lib_tmp)/$(VENDORARCH)/auto/Foo/Foo.so + + install -d $(lib_tmp)/usr/share/doc/$(LIB) + install -m 644 debian/copyright $(lib_tmp)/usr/share/doc/$(LIB) + install -m 644 debian/changelog $(lib_tmp)/usr/share/doc/$(LIB) + gzip -n -9 $(lib_tmp)/usr/share/doc/$(LIB)/changelog + install -d $(lib_tmp)/DEBIAN + install -m 755 debian/lib.postinst $(lib_tmp)/DEBIAN/postinst + install -m 755 debian/lib.prerm $(lib_tmp)/DEBIAN/prerm + touch $(lib_tmp)/usr/share/doc/README.Debian + #dpkg-shlibdeps $(lib_tmp)/usr/lib/libbaz.so.1.0 + install -m 755 debian/lib.shlibs $(lib_tmp)/DEBIAN/shlibs + install -m 755 debian/lib.symbols $(lib_tmp)/DEBIAN/symbols + dpkg-gencontrol -isp -p$(LIB) -P$(lib_tmp) + dpkg --build $(lib_tmp) .. + + # now the -dev package + install -d $(dev_tmp)/usr/include + install -d $(lib_tmp)/usr/lib + # let's also install the .so at the same time... (wrong, TODO) + cp -a *.a *.so.* $(lib_tmp)/usr/lib + # and fuck up permission (TODO) + chmod a+x $(lib_tmp)/usr/lib/*.a + # Pretend to be a Perl module to test a lack of Perl dependencies. + install -d $(dev_tmp)/$(VENDORARCH)/auto/Foo + install -m 644 libbaz2.so.1.0.3b $(dev_tmp)/$(VENDORARCH)/auto/Foo/Foo.so + strip $(dev_tmp)/$(VENDORARCH)/auto/Foo/Foo.so + install -d $(dev_tmp)/usr/share/doc + ln -s $(LIB) $(dev_tmp)/usr/share/doc/$(DEV) + install -d $(dev_tmp)/DEBIAN + install -m 755 debian/dev.postinst $(dev_tmp)/DEBIAN/postinst + install -m 755 debian/dev.prerm $(dev_tmp)/DEBIAN/prerm + dpkg-gencontrol -isp -p$(DEV) -P$(dev_tmp) + dpkg --build $(dev_tmp) .. + + +binary: binary-arch + +# The mention of binary-indep here should be sufficient to suppress the +# warning that it's not present. +.PHONY: build-arch build-indep build binary-arch binary-indep binary clean diff --git a/t/recipes/checks/control-files/legacy-libbaz/build-spec/debian/source.lintian-overrides b/t/recipes/checks/control-files/legacy-libbaz/build-spec/debian/source.lintian-overrides new file mode 100644 index 0000000..6008d27 --- /dev/null +++ b/t/recipes/checks/control-files/legacy-libbaz/build-spec/debian/source.lintian-overrides @@ -0,0 +1 @@ +libbaz source: maintainer-script-lacks-debhelper-token diff --git a/t/recipes/checks/control-files/legacy-libbaz/build-spec/fill-values b/t/recipes/checks/control-files/legacy-libbaz/build-spec/fill-values new file mode 100644 index 0000000..7effe4f --- /dev/null +++ b/t/recipes/checks/control-files/legacy-libbaz/build-spec/fill-values @@ -0,0 +1,6 @@ +Skeleton: upload-non-native +Testname: legacy-libbaz +Source: libbaz +Version: 1-1 +Default-Build-Depends: debhelper (>= 9.20151004~) +Description: Legacy test "libbaz" diff --git a/t/recipes/checks/control-files/legacy-libbaz/build-spec/orig/Makefile b/t/recipes/checks/control-files/legacy-libbaz/build-spec/orig/Makefile new file mode 100644 index 0000000..657dc2a --- /dev/null +++ b/t/recipes/checks/control-files/legacy-libbaz/build-spec/orig/Makefile @@ -0,0 +1,55 @@ +# This is the correct way to build a lib + +CC=gcc +CFLAGS=-g -Wall -Winline -O2 +LDFLAGS=-Wl,--no-as-needed + +OBJS=baz.o extra.o +SHOBJS=baz.sho extra.sho +NOPICOBJS = $(SHOBJS) + +all: libbaz1.a libbaz2.a libbaz1.so.1.0.3b libbaz2.so libbaz3.so.1.0.3b \ + libbaz.so + +libbaz2.so: libbaz2.so.1.0 + ln -sf $^ $@ +libbaz2.so.1.0: libbaz2.so.1.0.3b + ln -sf $^ $@ + +# Oops, forget the soname altogether +libbaz1.so.1.0.3b: $(NOPICOBJS) + $(CC) $(LDFLAGS) -o $@ -shared $^ -lc + +libbaz2.so.1.0.3b: $(SHOBJS) + $(CC) $(LDFLAGS) -o $@ -shared -Wl,-soname,libbaz2.so.1.0 $^ -lc + +# Non-PIC. We can't test this on all architectures +libbaz3.so.1.0.3b: $(NOPICOBJS) + $(CC) $(LDFLAGS) -o $@ -shared -Wl,-soname,libbaz3.so.1 $^ -lc + +# Non-versioned SONAME. +libbaz.so: $(SHOBJS) + $(CC) $(LDFLAGS) -o $@ -shared -Wl,-soname,libbaz.so $^ -lc + +#%.o-noreentrant: %.c +# $(CC) $(LDFLAGS) $(CFLAGS) -o $@ -c $< + +%.sho: %.c + $(CC) $(LDFLAGS) $(CFLAGS) -D_REENTRANT -fPIC -o $@ -c $< + +%.o: %.c + $(CC) $(LDFLAGS) $(CFLAGS) -D_REENTRANT -o $@ -c $< + +libbaz2.a: $(OBJS) + ar cq $@ $(OBJS) + strip --strip-unneeded --remove-section=.comment \ + --remove-section=-note $@ + ranlib $@ + +# The pic one in the .a (wrong), no archive table +libbaz1.a: $(SHOBJS) + ar cqS $@ $^ + strip --strip-unneeded --remove-section=.comment \ + --remove-section=-note $@ +clean: + rm -f *.a *.o *.so* *.sho diff --git a/t/recipes/checks/control-files/legacy-libbaz/build-spec/orig/baz.c b/t/recipes/checks/control-files/legacy-libbaz/build-spec/orig/baz.c new file mode 100644 index 0000000..4d5fc45 --- /dev/null +++ b/t/recipes/checks/control-files/legacy-libbaz/build-spec/orig/baz.c @@ -0,0 +1,6 @@ +#include + +double pw(double p) +{ + return exp(p); +} diff --git a/t/recipes/checks/control-files/legacy-libbaz/build-spec/orig/extra.c b/t/recipes/checks/control-files/legacy-libbaz/build-spec/orig/extra.c new file mode 100644 index 0000000..e69de29 diff --git a/t/recipes/checks/control-files/legacy-libbaz/eval/desc b/t/recipes/checks/control-files/legacy-libbaz/eval/desc new file mode 100644 index 0000000..fda1fde --- /dev/null +++ b/t/recipes/checks/control-files/legacy-libbaz/eval/desc @@ -0,0 +1,2 @@ +Testname: legacy-libbaz +Check: control-files diff --git a/t/recipes/checks/control-files/legacy-libbaz/eval/hints b/t/recipes/checks/control-files/legacy-libbaz/eval/hints new file mode 100644 index 0000000..83003be --- /dev/null +++ b/t/recipes/checks/control-files/legacy-libbaz/eval/hints @@ -0,0 +1,11 @@ +libbaz2-dev (binary): no-ctrl-scripts +libbaz2-dbg (binary): no-ctrl-scripts +libbaz2 (binary): no-ctrl-scripts +libbaz1-dev (binary): ctrl-script [prerm] +libbaz1-dev (binary): ctrl-script [postinst] +libbaz1 (binary): ctrl-script [symbols] +libbaz1 (binary): ctrl-script [shlibs] +libbaz1 (binary): ctrl-script [prerm] +libbaz1 (binary): ctrl-script [postinst] +libbaz1 (binary): control-file-has-bad-permissions 0755 != 0644 [symbols] +libbaz1 (binary): control-file-has-bad-permissions 0755 != 0644 [shlibs] diff --git a/t/recipes/checks/control-files/legacy-libbaz/eval/post-test b/t/recipes/checks/control-files/legacy-libbaz/eval/post-test new file mode 100755 index 0000000..29dc3f4 --- /dev/null +++ b/t/recipes/checks/control-files/legacy-libbaz/eval/post-test @@ -0,0 +1,4 @@ +/: hardening-.*/ d +s/\(current is ([0-9]+\.)+[0-9]\)/(current is CURRENT)/ +s,usr/lib/([^\/]*/)?perl[0-9]*(/[0-9]*\.[0-9]*)?/,usr/lib/ma-dir/perl/version/,g +/: file-references-package-build-path / d diff --git a/t/recipes/checks/control-files/legacy-scripts/build-spec/debian/changelog.in b/t/recipes/checks/control-files/legacy-scripts/build-spec/debian/changelog.in new file mode 100644 index 0000000..935c633 --- /dev/null +++ b/t/recipes/checks/control-files/legacy-scripts/build-spec/debian/changelog.in @@ -0,0 +1,41 @@ +scripts ([% $version %]) [% $distribution %]; urgency=low + + * I'm also not able to write my name. + * Added a script in /etc/Xsession.d + * Bizarre version number courtesy of + https://wiki.ubuntu.com/SecurityUpdateProcedures#Prepare + + -- Mark 'HE' Brokschmitt Thu, 23 Jun 2005 14:32:39 +0200 + +scripts (5-1) unstable; urgency=low + + * I'm making a typo in my own name... And I want lintian to warn me about + it. + + -- Jeroen van Wolffelaar Sun, 18 Apr 2004 02:26:34 +0200 + +scripts (4-1) unstable; urgency=low + + * Add new example to check that not executable files with a shebang line + called *in don't trigger the script-not-executable warning. + + -- Marc 'HE' Brockschmidt Wed, 14 Apr 2004 19:44:04 +0200 + +scripts (3-3) unstable; urgency=low + + * Add suidperlfoo and some code in debian/rules to + check the new suidperl checks + + -- Frank Lichtenheld Wed, 31 Mar 2004 21:06:20 +0000 + +scripts (2-1) unstable; urgency=low + + * Add tkfoo script for tk checkings + + -- Lintian Maintainers Sat, 21 Feb 2004 17:13:36 +0100 + +scripts (1-0) unstable; urgency=low + + * Initial version + + -- Lintian Maintainers Sat, 10 Feb 2001 15:37:31 -0800 diff --git a/t/recipes/checks/control-files/legacy-scripts/build-spec/debian/control.in b/t/recipes/checks/control-files/legacy-scripts/build-spec/debian/control.in new file mode 100644 index 0000000..75a521f --- /dev/null +++ b/t/recipes/checks/control-files/legacy-scripts/build-spec/debian/control.in @@ -0,0 +1,16 @@ +Source: scripts +Section: interpreters +Priority: optional +Maintainer: Lintian Maintainers +Uploaders: Jeroen van Wolfelaar , Marc 'HE' Brockschmidt +Build-Depends-Indep: dpatch +Standards-Version: 3.2.1 + +Package: scripts +Architecture: [% $package_architecture %] +Depends: test, ruby1.8, build-essential, libssl0.9.7, php7.0-cli +Recommends: tk8.4 | wish +Description: test lintian's script file checks + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. diff --git a/t/recipes/checks/control-files/legacy-scripts/build-spec/debian/copyright b/t/recipes/checks/control-files/legacy-scripts/build-spec/debian/copyright new file mode 100644 index 0000000..ad8a119 --- /dev/null +++ b/t/recipes/checks/control-files/legacy-scripts/build-spec/debian/copyright @@ -0,0 +1,5 @@ +This file contains the phrase "under the same terms as Perl itself" to +trigger warnings about not having common-licenses references. + +This file contains the phrase "public domain" which should suppress +warnings about no copyright date. diff --git a/t/recipes/checks/control-files/legacy-scripts/build-spec/debian/patches/00list b/t/recipes/checks/control-files/legacy-scripts/build-spec/debian/patches/00list new file mode 100644 index 0000000..3b9d37e --- /dev/null +++ b/t/recipes/checks/control-files/legacy-scripts/build-spec/debian/patches/00list @@ -0,0 +1,11 @@ +01_not_here_right_now.dpatch + +# some comment +/* some more + elaborate comment + which needs DPATCH_OPTION_CPP=1 + */02_i_dont_have_a_description.patch 03_specified_without_dpatch + +// and again a comment + +04_i_dont_have_a_description_either.patch diff --git a/t/recipes/checks/control-files/legacy-scripts/build-spec/debian/patches/00list.sparc b/t/recipes/checks/control-files/legacy-scripts/build-spec/debian/patches/00list.sparc new file mode 100644 index 0000000..8b47ab3 --- /dev/null +++ b/t/recipes/checks/control-files/legacy-scripts/build-spec/debian/patches/00list.sparc @@ -0,0 +1 @@ +01_some_other_patch_thats_not_in_the_package.dpatch diff --git a/t/recipes/checks/control-files/legacy-scripts/build-spec/debian/patches/00options b/t/recipes/checks/control-files/legacy-scripts/build-spec/debian/patches/00options new file mode 100644 index 0000000..57ffeb6 --- /dev/null +++ b/t/recipes/checks/control-files/legacy-scripts/build-spec/debian/patches/00options @@ -0,0 +1 @@ +DPATCH_OPTION_CPP=1 diff --git a/t/recipes/checks/control-files/legacy-scripts/build-spec/debian/patches/02_i_dont_have_a_description.patch b/t/recipes/checks/control-files/legacy-scripts/build-spec/debian/patches/02_i_dont_have_a_description.patch new file mode 100644 index 0000000..9279c1b --- /dev/null +++ b/t/recipes/checks/control-files/legacy-scripts/build-spec/debian/patches/02_i_dont_have_a_description.patch @@ -0,0 +1,7 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 02_i_dont_have_a_description.patch.dpatch by Marc 'HE' Brockschmidt > +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: No description. + +@DPATCH@ diff --git a/t/recipes/checks/control-files/legacy-scripts/build-spec/debian/patches/03_specified_without_dpatch.dpatch b/t/recipes/checks/control-files/legacy-scripts/build-spec/debian/patches/03_specified_without_dpatch.dpatch new file mode 100644 index 0000000..8303ac6 --- /dev/null +++ b/t/recipes/checks/control-files/legacy-scripts/build-spec/debian/patches/03_specified_without_dpatch.dpatch @@ -0,0 +1,5 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## All lines beginning with `## DP:' are a description of the patch. +## DP: Listed in 00list without .dpatch suffix. + +@DPATCH@ diff --git a/t/recipes/checks/control-files/legacy-scripts/build-spec/debian/patches/04_i_dont_have_a_description_either.patch b/t/recipes/checks/control-files/legacy-scripts/build-spec/debian/patches/04_i_dont_have_a_description_either.patch new file mode 100644 index 0000000..b603f16 --- /dev/null +++ b/t/recipes/checks/control-files/legacy-scripts/build-spec/debian/patches/04_i_dont_have_a_description_either.patch @@ -0,0 +1,7 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 04_i_dont_have_a_description_either.patch by Adam D. Barratt +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: + +@DPATCH@ diff --git a/t/recipes/checks/control-files/legacy-scripts/build-spec/debian/postinst b/t/recipes/checks/control-files/legacy-scripts/build-spec/debian/postinst new file mode 100644 index 0000000..7c5baf1 --- /dev/null +++ b/t/recipes/checks/control-files/legacy-scripts/build-spec/debian/postinst @@ -0,0 +1,14 @@ +#!/bin/sh + +if [ -x "/etc/init.d/lsb-broken" ] ; then + update-rc.d lsb-broken defaults >/dev/null +fi +if [ -x "/etc/init.d/no-lsb" ] ; then + update-rc.d no-lsb defaults >/dev/null +fi +if [ -x "/etc/init.d/skeleton" ] ; then + update-rc.d skeleton defaults >/dev/null +fi +if [ -x "/etc/init.d/lsb-other" ] ; then + update-rc.d lsb-other defaults >/dev/null +fi diff --git a/t/recipes/checks/control-files/legacy-scripts/build-spec/debian/postrm b/t/recipes/checks/control-files/legacy-scripts/build-spec/debian/postrm new file mode 100644 index 0000000..8fa75a2 --- /dev/null +++ b/t/recipes/checks/control-files/legacy-scripts/build-spec/debian/postrm @@ -0,0 +1,9 @@ +#!/bin/sh -e + +if [ "$1" = purge ] ; then + update-rc.d lsb-broken remove >/dev/null + update-rc.d no-lsb remove >/dev/null + update-rc.d skeleton remove >/dev/null + update-rc.d lsb-other remove >/dev/null + update-rc.d lsb-other remove >/dev/null +fi diff --git a/t/recipes/checks/control-files/legacy-scripts/build-spec/debian/preinst b/t/recipes/checks/control-files/legacy-scripts/build-spec/debian/preinst new file mode 100644 index 0000000..0799557 --- /dev/null +++ b/t/recipes/checks/control-files/legacy-scripts/build-spec/debian/preinst @@ -0,0 +1,15 @@ +#!/bin/sh + +set -e +set -x + +# +# Some comments here +# + +# This serves as an example of an "empty" script, so +# please do not add any real code here, thank you :) + +#DEBHELPER# + +exit 0 diff --git a/t/recipes/checks/control-files/legacy-scripts/build-spec/debian/rules b/t/recipes/checks/control-files/legacy-scripts/build-spec/debian/rules new file mode 100755 index 0000000..ee3677e --- /dev/null +++ b/t/recipes/checks/control-files/legacy-scripts/build-spec/debian/rules @@ -0,0 +1,105 @@ +#!/usr/bin/make -f + +tmp=debian/tmp + +build-arch: + echo "Hi, in an arch: all package, I am a bug!" + +build-indep: + +build: build-arch build-indep + +binary-arch: + echo "Hi, in an arch: all package, I am a bug!" + +binary-indep: + install -d $(tmp)/usr/bin/ + install -d $(tmp)/etc/X11/Xsession.d/ + install -d $(tmp)/etc/init.d/ + install -d $(tmp)/etc/csh/login.d/ + install -d $(tmp)/etc/fish.d/ + install -d $(tmp)/usr/share/scripts/ + install -d $(tmp)/usr/share/doc/scripts/ + install -d $(tmp)/usr/lib/cgi-bin + install -d $(tmp)/usr/src/scripts + install -d $(tmp)/DEBIAN + + install -m 755 csh-foo $(tmp)/etc/csh/login.d/ + install -m 755 envfoo $(tmp)/usr/bin/ + install -m 755 fish-foo $(tmp)/etc/fish.d/ + install -m 755 jruby-broken $(tmp)/usr/bin/ + install -m 755 perlfoo $(tmp)/usr/bin/ + install -m 755 rubyfoo $(tmp)/usr/bin/ +# This doesn't use "env" but should also trigger script-in-usr-share-doc + install -m 755 rubyfoo $(tmp)/usr/share/doc/scripts/ + install -m 755 make-foo $(tmp)/usr/bin/ + install -m 755 lefty-foo $(tmp)/usr/bin/ + install -m 4751 perlfoo $(tmp)/usr/bin/suidperlfoo2 + install -m 755 sh-broken $(tmp)/usr/bin/ + install -m 4555 suidperlfoo $(tmp)/usr/bin/ + install -m 755 tkfoo $(tmp)/usr/bin/ + install -m 755 wishfoo $(tmp)/usr/bin/ + install -m 644 xsession-test $(tmp)/etc/X11/Xsession.d/ + +# Permissions here aren't part of what's being tested, but let us exercise +# some other errors. + install -m 755 perl-bizarre-1 $(tmp)/usr/bin/ + install -m 750 perl-bizarre-2 $(tmp)/usr/bin/ + install -m 754 perl-bizarre-3 $(tmp)/usr/bin/ + install -m 705 guile-bizarre $(tmp)/usr/bin/ + +# First one should produce a warning; second one shouldn't. + install -m 755 gccbug.dpatch $(tmp)/usr/share/scripts/ + install -m 755 gccbug.dpatch $(tmp)/usr/src/scripts/ + + install -m 644 init-skeleton $(tmp)/etc/init.d/skeleton + install -m 755 init-no-lsb $(tmp)/etc/init.d/no-lsb + install -m 755 init-lsb-broken $(tmp)/etc/init.d/lsb-broken + install -m 755 init-lsb-other $(tmp)/etc/init.d/lsb-other + + install -m 755 phpfoo $(tmp)/usr/share/scripts/ + sed 's/php$$/php7.0/' phpfoo > $(tmp)/usr/share/scripts/php7.0foo + chmod 755 $(tmp)/usr/share/scripts/php7.0foo + + install -m 755 phpenvfoo $(tmp)/usr/share/scripts/ + sed 's/php$$/php7.0/' phpenvfoo > $(tmp)/usr/share/scripts/php7.0envfoo + chmod 755 $(tmp)/usr/share/scripts/php7.0envfoo + + echo "#!/usr/bin/perl" >> $(tmp)/usr/share/scripts/foobar.in + chmod 644 $(tmp)/usr/share/scripts/foobar.in + + touch $(tmp)/usr/share/scripts/mono.exe + chmod 755 $(tmp)/usr/share/scripts/mono.exe + + echo "#!/bin/sh" > $(tmp)/usr/share/scripts/foo\$$bar + chmod 755 $(tmp)/usr/share/scripts/foo\$$bar + + echo "#!/bin/sh" > $(tmp)/usr/lib/cgi-bin/cgi-script + chmod 755 $(tmp)/usr/lib/cgi-bin/cgi-script + + echo "#!/bin/sh" > $(tmp)/usr/bin/test.sh + chmod 755 $(tmp)/usr/bin/test.sh + + + dh_testroot # dummy to test missing debhelper dependency + + + install -m 644 debian/changelog $(tmp)/usr/share/doc/scripts/changelog.Debian + gzip -n -9 $(tmp)/usr/share/doc/scripts/changelog.Debian + install -m 644 debian/copyright $(tmp)/usr/share/doc/scripts/copyright + + install -m 644 debian/scripts.conffiles $(tmp)/DEBIAN/conffiles + install -m 755 debian/preinst $(tmp)/DEBIAN/preinst + install -m 755 debian/postinst $(tmp)/DEBIAN/postinst + install -m 755 debian/postrm $(tmp)/DEBIAN/postrm + touch $(tmp)/DEBIAN/prerm + chmod 755 $(tmp)/DEBIAN/prerm + dpkg-gencontrol -isp + dpkg --build $(tmp) .. + +binary: binary-arch binary-indep + +clean: + rm -rf debian/files $(tmp) debian/substvars + +.PHONY: build-arch build-indep build binary-arch binary-indep binary clean diff --git a/t/recipes/checks/control-files/legacy-scripts/build-spec/debian/scripts.conffiles b/t/recipes/checks/control-files/legacy-scripts/build-spec/debian/scripts.conffiles new file mode 100644 index 0000000..01a371a --- /dev/null +++ b/t/recipes/checks/control-files/legacy-scripts/build-spec/debian/scripts.conffiles @@ -0,0 +1,6 @@ +/etc/init.d/lsb-broken +/etc/init.d/lsb-other +/etc/init.d/no-lsb +/etc/X11/Xsession.d/xsession-test +/etc/csh/login.d/csh-foo +/etc/fish.d/fish-foo diff --git a/t/recipes/checks/control-files/legacy-scripts/build-spec/debian/watch b/t/recipes/checks/control-files/legacy-scripts/build-spec/debian/watch new file mode 100644 index 0000000..dba5815 --- /dev/null +++ b/t/recipes/checks/control-files/legacy-scripts/build-spec/debian/watch @@ -0,0 +1,8 @@ +# watch file with upstream version mangling + +version=2 +opts="uversionmangle=s/$/ds/" \ +http://qa.debian.org/watch/sf.php?project=foo scripts\.([\d.]+)\.tar\.gz debian uupdate + +version=3 +http://ftp.sf.net/foo/foo_bar(.+)\.Z 5 uupdate \ No newline at end of file diff --git a/t/recipes/checks/control-files/legacy-scripts/build-spec/fill-values b/t/recipes/checks/control-files/legacy-scripts/build-spec/fill-values new file mode 100644 index 0000000..8a68457 --- /dev/null +++ b/t/recipes/checks/control-files/legacy-scripts/build-spec/fill-values @@ -0,0 +1,6 @@ +Testname: legacy-scripts +Source: scripts +Version: 6ds-1ubuntu0.5.10.1 +Package-Architecture: all +Skeleton: upload-non-native +Description: Legacy test "scripts" diff --git a/t/recipes/checks/control-files/legacy-scripts/build-spec/orig/csh-foo b/t/recipes/checks/control-files/legacy-scripts/build-spec/orig/csh-foo new file mode 100644 index 0000000..eaf47a1 --- /dev/null +++ b/t/recipes/checks/control-files/legacy-scripts/build-spec/orig/csh-foo @@ -0,0 +1,2 @@ +#! /bin/csh + diff --git a/t/recipes/checks/control-files/legacy-scripts/build-spec/orig/envfoo b/t/recipes/checks/control-files/legacy-scripts/build-spec/orig/envfoo new file mode 100755 index 0000000..e005037 --- /dev/null +++ b/t/recipes/checks/control-files/legacy-scripts/build-spec/orig/envfoo @@ -0,0 +1,4 @@ +#! /bin/env python + +if __name__ == '__main__': + print 'Hi there' diff --git a/t/recipes/checks/control-files/legacy-scripts/build-spec/orig/fish-foo b/t/recipes/checks/control-files/legacy-scripts/build-spec/orig/fish-foo new file mode 100644 index 0000000..7f59139 --- /dev/null +++ b/t/recipes/checks/control-files/legacy-scripts/build-spec/orig/fish-foo @@ -0,0 +1,2 @@ +#! /usr/bin/fish + diff --git a/t/recipes/checks/control-files/legacy-scripts/build-spec/orig/gccbug.dpatch b/t/recipes/checks/control-files/legacy-scripts/build-spec/orig/gccbug.dpatch new file mode 100755 index 0000000..65cbf37 --- /dev/null +++ b/t/recipes/checks/control-files/legacy-scripts/build-spec/orig/gccbug.dpatch @@ -0,0 +1,39 @@ +#! /bin/sh -e + +# DP: Use sensible-editor instead of vi as fallback editor + +# Taken from gcc-4.1-source. Chokes bash -n (due to the patch) despite being +# a valid dpatch, so don't warn about it if it's in /usr/src. + +dir= +if [ $# -eq 3 -a "$2" = '-d' ]; then + pdir="-d $3" + dir="$3/" +elif [ $# -ne 1 ]; then + echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" + exit 1 +fi +case "$1" in + -patch) + patch $pdir -f --no-backup-if-mismatch -p0 < $0 + ;; + -unpatch) + patch $pdir -f --no-backup-if-mismatch -R -p0 < $0 + ;; + *) + echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" + exit 1 +esac +exit 0 + +--- gcc/gccbug.in~ 2003-03-01 00:51:42.000000000 +0100 ++++ gcc/gccbug.in 2003-03-02 12:08:36.000000000 +0100 +@@ -134,7 +134,7 @@ + # If they don't have a preferred editor set, then use + if [ -z "$VISUAL" ]; then + if [ -z "$EDITOR" ]; then +- EDIT=vi ++ EDIT=/usr/bin/sensible-editor + else + EDIT="$EDITOR" + fi diff --git a/t/recipes/checks/control-files/legacy-scripts/build-spec/orig/guile-bizarre b/t/recipes/checks/control-files/legacy-scripts/build-spec/orig/guile-bizarre new file mode 100644 index 0000000..70e2c74 --- /dev/null +++ b/t/recipes/checks/control-files/legacy-scripts/build-spec/orig/guile-bizarre @@ -0,0 +1,6 @@ +#! /bin/sh +# -*- scheme -*- +exec guile -s $0 $* +# Seen in the wild as build-guile-gtk in libguilegtk-1.2-dev (0.31-5.1) +# Tests script_is_evil_and_wrong +!# diff --git a/t/recipes/checks/control-files/legacy-scripts/build-spec/orig/init-lsb-broken b/t/recipes/checks/control-files/legacy-scripts/build-spec/orig/init-lsb-broken new file mode 100644 index 0000000..e4dfa92 --- /dev/null +++ b/t/recipes/checks/control-files/legacy-scripts/build-spec/orig/init-lsb-broken @@ -0,0 +1,34 @@ +#! /bin/sh +### BEGIN INIT INFO +# Provides: bad-lsb +# Required-Start: $local_fs $remote_fs +# Required-Stop: +# Default-Start: 1 2 3 4 5 +# Default-Stop: S 0 1 6 X +# Short-Description: Example Lintian initscript +# but this can't be continued +# Description: An example of a bad LSB section in an init script. +# This continuation is allowed (with spaces). +# This one is too (with tabs). +# X-Debian-Foo: Some unknown but valid keyword. +# Foo: Some invalid keyword. + +# Whoops, no terminating line. + +# And then we have this duplicate section. +### BEGIN INIT INFO +# Required-Start: This one doesn't count. +### END INIT INFO + +# Hey, look at all of those missing actions! But stop isn't missing. +case "$1" in + start|stop) + echo "Blah" + ;; + *) + echo "Usage: foo start" >&2 + exit 3 + ;; +esac + +: diff --git a/t/recipes/checks/control-files/legacy-scripts/build-spec/orig/init-lsb-other b/t/recipes/checks/control-files/legacy-scripts/build-spec/orig/init-lsb-other new file mode 100644 index 0000000..adb4795 --- /dev/null +++ b/t/recipes/checks/control-files/legacy-scripts/build-spec/orig/init-lsb-other @@ -0,0 +1,22 @@ +#! /bin/sh +### BEGIN INIT INFO +# Provides: lsb-other +# Required-Start: $local_fs $remote_fs +# Required-Stop: $local_fs $remote_fs +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +# Description: This is another LSB script test, which has a missing +# Short-Description. +### END INIT INFO + +case "$1" in + start|stop|restart|reload|force-reload) + echo "Blah" + ;; + *) + echo "Usage: foo start" >&2 + exit 3 + ;; +esac + +: diff --git a/t/recipes/checks/control-files/legacy-scripts/build-spec/orig/init-no-lsb b/t/recipes/checks/control-files/legacy-scripts/build-spec/orig/init-no-lsb new file mode 100644 index 0000000..6b994dd --- /dev/null +++ b/t/recipes/checks/control-files/legacy-scripts/build-spec/orig/init-no-lsb @@ -0,0 +1,17 @@ +#! /bin/sh +# No LSB section, but otherwise okay. (Well, the messages are bad, but we +# don't check that yet.) + +case "$1" in + start) + echo "Blah starting" + ;; + stop) + echo "Blah stopping" + ;; + restart|force-reload) + echo "Blah restarting" + ;; +esac + +: diff --git a/t/recipes/checks/control-files/legacy-scripts/build-spec/orig/init-skeleton b/t/recipes/checks/control-files/legacy-scripts/build-spec/orig/init-skeleton new file mode 100644 index 0000000..c868508 --- /dev/null +++ b/t/recipes/checks/control-files/legacy-scripts/build-spec/orig/init-skeleton @@ -0,0 +1,150 @@ +#! /bin/sh +### BEGIN INIT INFO +# Provides: skeleton +# Required-Start: $local_fs $remote_fs +# Required-Stop: $local_fs $remote_fs +# Default-Start: 2 3 4 5 +# Default-Stop: S 0 1 6 +# Short-Description: Example Lintian initscript +# Description: This file should be used to construct scripts to be +# placed in /etc/init.d. +### END INIT INFO + +# Do NOT "set -e" + +# PATH should only include /usr/* if it runs after the mountnfs.sh script +PATH=/usr/sbin:/usr/bin:/sbin:/bin +DESC="Description of the service" +NAME=daemonexecutablename +DAEMON=/usr/sbin/$NAME +DAEMON_ARGS="--options args" +PIDFILE=/var/run/$NAME.pid +SCRIPTNAME=/etc/init.d/$NAME + +# Exit if the package is not installed +[ -x "$DAEMON" ] || exit 0 + +# Read configuration variable file if it is present +[ -r /etc/default/$NAME ] && . /etc/default/$NAME + +# Load the VERBOSE setting and other rcS variables +[ -f /etc/default/rcS ] && . /etc/default/rcS + +# Define LSB log_* functions. +# Depend on lsb-base (>= 3.0-6) to ensure that this file is present. +. /lib/lsb/init-functions + +# +# Function that starts the daemon/service +# +do_start() +{ + # Return + # 0 if daemon has been started + # 1 if daemon was already running + # 2 if daemon could not be started + start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON --test > /dev/null \ + || return 1 + start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON -- \ + $DAEMON_ARGS \ + || return 2 + # Add code here, if necessary, that waits for the process to be ready + # to handle requests from services started subsequently which depend + # on this one. As a last resort, sleep for some time. +} + +# +# Function that stops the daemon/service +# +do_stop() +{ + # Return + # 0 if daemon has been stopped + # 1 if daemon was already stopped + # 2 if daemon could not be stopped + # other if a failure occurred + start-stop-daemon --stop --quiet --retry=TERM/30/KILL/5 --pidfile $PIDFILE --name $NAME + RETVAL="$?" + [ "$RETVAL" = 2 ] && return 2 + # Wait for children to finish too if this is a daemon that forks + # and if the daemon is only ever run from this initscript. + # If the above conditions are not satisfied then add some other code + # that waits for the process to drop all resources that could be + # needed by services started subsequently. A last resort is to + # sleep for some time. + start-stop-daemon --stop --quiet --oknodo --retry=0/30/KILL/5 --exec $DAEMON + [ "$?" = 2 ] && return 2 + # Many daemons don't delete their pidfiles when they exit. + rm -f $PIDFILE + return "$RETVAL" +} + +# +# Function that sends a SIGHUP to the daemon/service +# +do_reload() { + # + # If the daemon can reload its configuration without + # restarting (for example, when it is sent a SIGHUP), + # then implement that here. + # + start-stop-daemon --stop --signal 1 --quiet --pidfile $PIDFILE --name $NAME + return 0 +} + +case "$1" in + start) + [ "$VERBOSE" != no ] && log_daemon_msg "Starting $DESC" "$NAME" + do_start + case "$?" in + 0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;; + 2) [ "$VERBOSE" != no ] && log_end_msg 1 ;; + esac + ;; + stop) + [ "$VERBOSE" != no ] && log_daemon_msg "Stopping $DESC" "$NAME" + do_stop + case "$?" in + 0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;; + 2) [ "$VERBOSE" != no ] && log_end_msg 1 ;; + esac + ;; + #reload|force-reload) + # + # If do_reload() is not implemented then leave this commented out + # and leave 'force-reload' as an alias for 'restart'. + # + #log_daemon_msg "Reloading $DESC" "$NAME" + #do_reload + #log_end_msg $? + #;; + restart|force-reload) + # + # If the "reload" option is implemented then remove the + # 'force-reload' alias + # + log_daemon_msg "Restarting $DESC" "$NAME" + do_stop + case "$?" in + 0|1) + do_start + case "$?" in + 0) log_end_msg 0 ;; + 1) log_end_msg 1 ;; # Old process is still running + *) log_end_msg 1 ;; # Failed to start + esac + ;; + *) + # Failed to stop + log_end_msg 1 + ;; + esac + ;; + *) + #echo "Usage: $SCRIPTNAME {start|stop|restart|reload|force-reload}" >&2 + echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload}" >&2 + exit 3 + ;; +esac + +: diff --git a/t/recipes/checks/control-files/legacy-scripts/build-spec/orig/jruby-broken b/t/recipes/checks/control-files/legacy-scripts/build-spec/orig/jruby-broken new file mode 100644 index 0000000..56f574d --- /dev/null +++ b/t/recipes/checks/control-files/legacy-scripts/build-spec/orig/jruby-broken @@ -0,0 +1,2 @@ +#!/usr/bin/jruby +# There's no non-versioned jruby, so this should be an error. diff --git a/t/recipes/checks/control-files/legacy-scripts/build-spec/orig/lefty-foo b/t/recipes/checks/control-files/legacy-scripts/build-spec/orig/lefty-foo new file mode 100644 index 0000000..52c003e --- /dev/null +++ b/t/recipes/checks/control-files/legacy-scripts/build-spec/orig/lefty-foo @@ -0,0 +1,2 @@ +#!/usr/local/bin/lefty + diff --git a/t/recipes/checks/control-files/legacy-scripts/build-spec/orig/make-foo b/t/recipes/checks/control-files/legacy-scripts/build-spec/orig/make-foo new file mode 100644 index 0000000..6b787b5 --- /dev/null +++ b/t/recipes/checks/control-files/legacy-scripts/build-spec/orig/make-foo @@ -0,0 +1,3 @@ +#!/usr/bin/make + + diff --git a/t/recipes/checks/control-files/legacy-scripts/build-spec/orig/perl-bizarre-1 b/t/recipes/checks/control-files/legacy-scripts/build-spec/orig/perl-bizarre-1 new file mode 100644 index 0000000..fc632c8 --- /dev/null +++ b/t/recipes/checks/control-files/legacy-scripts/build-spec/orig/perl-bizarre-1 @@ -0,0 +1,11 @@ +#! /bin/sh +eval '(exit $?0)' && eval 'PERL_BADLANG=x;export PERL_BADLANG;: \ +;exec perl -x -S -- "$0" ${1+"$@"};#'if 0; +eval 'setenv PERL_BADLANG x;exec perl -x -S -- "$0" $argv:q;#'.q+ +#!perl -w +package Htex::a2ping; $0=~/(.*)/s;unshift@INC,'.';do($1);die$@if$@;__END__+if !1; +# This Perl script was generated by JustLib2 at Wed Apr 23 09:14:13 2003. +# Don't touch/remove any lines above; http://www.inf.bme.hu/~pts/justlib + +# The above was actually seen in the wild and stresses the +# script_is_evil_and_wrong test. diff --git a/t/recipes/checks/control-files/legacy-scripts/build-spec/orig/perl-bizarre-2 b/t/recipes/checks/control-files/legacy-scripts/build-spec/orig/perl-bizarre-2 new file mode 100644 index 0000000..afd9cfe --- /dev/null +++ b/t/recipes/checks/control-files/legacy-scripts/build-spec/orig/perl-bizarre-2 @@ -0,0 +1,7 @@ +#!/bin/sh +eval 'exec /usr/bin/perl -wS $0 ${1+"$@"}' + if $running_under_some_shell; + +# I'm someone following perlrun except without using the Perl #! line. +# Now something to choke bash. +while (<>) { if (/%#/) { print } } diff --git a/t/recipes/checks/control-files/legacy-scripts/build-spec/orig/perl-bizarre-3 b/t/recipes/checks/control-files/legacy-scripts/build-spec/orig/perl-bizarre-3 new file mode 100644 index 0000000..44baf75 --- /dev/null +++ b/t/recipes/checks/control-files/legacy-scripts/build-spec/orig/perl-bizarre-3 @@ -0,0 +1,6 @@ +eval '(exit $?0)' && eval 'exec perl -wS $0 ${1+"$@"}' +& eval 'exec /usr/bin/perl -wS $0 $argv:q' + if $running_under_some_shell; + +# More utterly bizarreness from perlrun. This one even doesn't work if +# there's a valid #! line on the first line. I don't understand why.... diff --git a/t/recipes/checks/control-files/legacy-scripts/build-spec/orig/perlfoo b/t/recipes/checks/control-files/legacy-scripts/build-spec/orig/perlfoo new file mode 100644 index 0000000..5b27ed0 --- /dev/null +++ b/t/recipes/checks/control-files/legacy-scripts/build-spec/orig/perlfoo @@ -0,0 +1,3 @@ +#! /usr/bin/perl + +print "Hello, World!"; diff --git a/t/recipes/checks/control-files/legacy-scripts/build-spec/orig/phpenvfoo b/t/recipes/checks/control-files/legacy-scripts/build-spec/orig/phpenvfoo new file mode 100644 index 0000000..cbbfb2e --- /dev/null +++ b/t/recipes/checks/control-files/legacy-scripts/build-spec/orig/phpenvfoo @@ -0,0 +1,7 @@ +#!/usr/bin/env php + + +Dumb PHP script + + + diff --git a/t/recipes/checks/control-files/legacy-scripts/build-spec/orig/phpfoo b/t/recipes/checks/control-files/legacy-scripts/build-spec/orig/phpfoo new file mode 100644 index 0000000..e0595e6 --- /dev/null +++ b/t/recipes/checks/control-files/legacy-scripts/build-spec/orig/phpfoo @@ -0,0 +1,7 @@ +#!/usr/bin/php + + +Dumb PHP script + + + diff --git a/t/recipes/checks/control-files/legacy-scripts/build-spec/orig/rubyfoo b/t/recipes/checks/control-files/legacy-scripts/build-spec/orig/rubyfoo new file mode 100644 index 0000000..8024605 --- /dev/null +++ b/t/recipes/checks/control-files/legacy-scripts/build-spec/orig/rubyfoo @@ -0,0 +1,4 @@ +#!/bin/ruby1.8 + +# Ok, that example is really pathetic, but until we have +# some better code in checks/scripts, it will do diff --git a/t/recipes/checks/control-files/legacy-scripts/build-spec/orig/sh-broken b/t/recipes/checks/control-files/legacy-scripts/build-spec/orig/sh-broken new file mode 100644 index 0000000..7b79074 --- /dev/null +++ b/t/recipes/checks/control-files/legacy-scripts/build-spec/orig/sh-broken @@ -0,0 +1,2 @@ +#!/bin/sh +if fi diff --git a/t/recipes/checks/control-files/legacy-scripts/build-spec/orig/suidperlfoo b/t/recipes/checks/control-files/legacy-scripts/build-spec/orig/suidperlfoo new file mode 100644 index 0000000..bcbc471 --- /dev/null +++ b/t/recipes/checks/control-files/legacy-scripts/build-spec/orig/suidperlfoo @@ -0,0 +1,3 @@ +#! /usr/bin/suidperl + +print "Hello, World!"; diff --git a/t/recipes/checks/control-files/legacy-scripts/build-spec/orig/tkfoo b/t/recipes/checks/control-files/legacy-scripts/build-spec/orig/tkfoo new file mode 100755 index 0000000..533595a --- /dev/null +++ b/t/recipes/checks/control-files/legacy-scripts/build-spec/orig/tkfoo @@ -0,0 +1,31 @@ +#!/bin/sh +# +# Insane amount of empty lines and comments + +# +# +# +# + +# +# + +# +# +# + +# +# + +# +# This line makes the next one a comment in Tcl \ +exec wish "$0" -- ${1+"$@"} + +# lintian should not check the following for syntax +# if it detects the line above correctly +# Code snippet taken from eTkTab + +if { [array names prefs keybindings] != "" } { + # Read in the file + array set unparsed_bindings [ read_settings_file $prefs(keybindings)] +} diff --git a/t/recipes/checks/control-files/legacy-scripts/build-spec/orig/wishfoo b/t/recipes/checks/control-files/legacy-scripts/build-spec/orig/wishfoo new file mode 100644 index 0000000..035c9ad --- /dev/null +++ b/t/recipes/checks/control-files/legacy-scripts/build-spec/orig/wishfoo @@ -0,0 +1,4 @@ +#!/usr/bin/wish +# +# This is not actually a wish script, here to force a test of wish +# dependencies. diff --git a/t/recipes/checks/control-files/legacy-scripts/build-spec/orig/xsession-test b/t/recipes/checks/control-files/legacy-scripts/build-spec/orig/xsession-test new file mode 100644 index 0000000..ca49d72 --- /dev/null +++ b/t/recipes/checks/control-files/legacy-scripts/build-spec/orig/xsession-test @@ -0,0 +1,3 @@ +#!/bin/sh + +echo "Foo." diff --git a/t/recipes/checks/control-files/legacy-scripts/build-spec/pre-build b/t/recipes/checks/control-files/legacy-scripts/build-spec/pre-build new file mode 100755 index 0000000..b5649a8 --- /dev/null +++ b/t/recipes/checks/control-files/legacy-scripts/build-spec/pre-build @@ -0,0 +1,5 @@ +#!/bin/sh + +DIR="$1" + +rm -f "$DIR/debian/compat" diff --git a/t/recipes/checks/control-files/legacy-scripts/eval/desc b/t/recipes/checks/control-files/legacy-scripts/eval/desc new file mode 100644 index 0000000..b7106ef --- /dev/null +++ b/t/recipes/checks/control-files/legacy-scripts/eval/desc @@ -0,0 +1,2 @@ +Testname: legacy-scripts +Check: control-files diff --git a/t/recipes/checks/control-files/legacy-scripts/eval/hints b/t/recipes/checks/control-files/legacy-scripts/eval/hints new file mode 100644 index 0000000..8e2a570 --- /dev/null +++ b/t/recipes/checks/control-files/legacy-scripts/eval/hints @@ -0,0 +1,5 @@ +scripts (binary): ctrl-script [prerm] +scripts (binary): ctrl-script [preinst] +scripts (binary): ctrl-script [postrm] +scripts (binary): ctrl-script [postinst] +scripts (binary): control-file-is-empty [prerm] diff --git a/t/recipes/checks/control-files/legacy-scripts/eval/post-test b/t/recipes/checks/control-files/legacy-scripts/eval/post-test new file mode 100644 index 0000000..faeef0b --- /dev/null +++ b/t/recipes/checks/control-files/legacy-scripts/eval/post-test @@ -0,0 +1 @@ +s/\(current is ([0-9]+\.)+[0-9]\)/(current is CURRENT)/ diff --git a/t/recipes/checks/control-files/md5sums-empty/build-spec/debian/rules b/t/recipes/checks/control-files/md5sums-empty/build-spec/debian/rules new file mode 100644 index 0000000..2bcc816 --- /dev/null +++ b/t/recipes/checks/control-files/md5sums-empty/build-spec/debian/rules @@ -0,0 +1,10 @@ +#!/usr/bin/make -f + +TMP=debian/$(shell dh_listpackages) + +%: + dh $@ + +override_dh_builddeb: + :>$(TMP)/DEBIAN/md5sums + dh_builddeb diff --git a/t/recipes/checks/control-files/md5sums-empty/build-spec/fill-values b/t/recipes/checks/control-files/md5sums-empty/build-spec/fill-values new file mode 100644 index 0000000..231501f --- /dev/null +++ b/t/recipes/checks/control-files/md5sums-empty/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: upload-native +Testname: md5sums-empty +Description: Test of empty md5sums file diff --git a/t/recipes/checks/control-files/md5sums-empty/eval/desc b/t/recipes/checks/control-files/md5sums-empty/eval/desc new file mode 100644 index 0000000..505d262 --- /dev/null +++ b/t/recipes/checks/control-files/md5sums-empty/eval/desc @@ -0,0 +1,4 @@ +Testname: md5sums-empty +Test-Against: + control-file-is-empty +Check: control-files diff --git a/t/recipes/checks/control-files/md5sums-empty/eval/hints b/t/recipes/checks/control-files/md5sums-empty/eval/hints new file mode 100644 index 0000000..77e5018 --- /dev/null +++ b/t/recipes/checks/control-files/md5sums-empty/eval/hints @@ -0,0 +1 @@ +md5sums-empty (binary): no-ctrl-scripts diff --git a/t/recipes/checks/control-files/md5sums-traversal/build-spec/fill-values b/t/recipes/checks/control-files/md5sums-traversal/build-spec/fill-values new file mode 100644 index 0000000..2c68cb6 --- /dev/null +++ b/t/recipes/checks/control-files/md5sums-traversal/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: deb +Testname: md5sums-traversal +Description: Test for traversals via md5sums symlink diff --git a/t/recipes/checks/control-files/md5sums-traversal/build-spec/pre-control b/t/recipes/checks/control-files/md5sums-traversal/build-spec/pre-control new file mode 100755 index 0000000..3b97b53 --- /dev/null +++ b/t/recipes/checks/control-files/md5sums-traversal/build-spec/pre-control @@ -0,0 +1,8 @@ +#!/bin/sh + +set -e + +builddir="$1" + +rm -f "$builddir/md5sums" +ln -sf ../copyright "$builddir/md5sums" diff --git a/t/recipes/checks/control-files/md5sums-traversal/eval/desc b/t/recipes/checks/control-files/md5sums-traversal/eval/desc new file mode 100644 index 0000000..5c8f928 --- /dev/null +++ b/t/recipes/checks/control-files/md5sums-traversal/eval/desc @@ -0,0 +1,2 @@ +Testname: md5sums-traversal +Check: control-files diff --git a/t/recipes/checks/control-files/md5sums-traversal/eval/hints b/t/recipes/checks/control-files/md5sums-traversal/eval/hints new file mode 100644 index 0000000..ad4d53e --- /dev/null +++ b/t/recipes/checks/control-files/md5sums-traversal/eval/hints @@ -0,0 +1,2 @@ +md5sums-traversal (binary): no-ctrl-scripts +md5sums-traversal (binary): control-file-is-not-a-file [md5sums] diff --git a/t/recipes/checks/control-files/unpack-numerical-owner/build-spec/fill-values b/t/recipes/checks/control-files/unpack-numerical-owner/build-spec/fill-values new file mode 100644 index 0000000..1197f5c --- /dev/null +++ b/t/recipes/checks/control-files/unpack-numerical-owner/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: deb +Testname: unpack-numerical-owner +Description: Test for tarballs with numerical owner only diff --git a/t/recipes/checks/control-files/unpack-numerical-owner/build-spec/tar-control b/t/recipes/checks/control-files/unpack-numerical-owner/build-spec/tar-control new file mode 100755 index 0000000..19b6369 --- /dev/null +++ b/t/recipes/checks/control-files/unpack-numerical-owner/build-spec/tar-control @@ -0,0 +1,8 @@ +#!/bin/sh + +set -e + +debiandir="$1" +controlmembers="$2" + +tar --create --file members/control.tar.gz --gzip --numeric-owner --directory "$debiandir" $controlmembers diff --git a/t/recipes/checks/control-files/unpack-numerical-owner/build-spec/tar-data b/t/recipes/checks/control-files/unpack-numerical-owner/build-spec/tar-data new file mode 100755 index 0000000..5659822 --- /dev/null +++ b/t/recipes/checks/control-files/unpack-numerical-owner/build-spec/tar-data @@ -0,0 +1,7 @@ +#!/bin/sh + +set -e + +rootdir="$1" + +tar --create --file members/data.tar.gz --gzip --numeric-owner --directory "$rootdir" . diff --git a/t/recipes/checks/control-files/unpack-numerical-owner/eval/desc b/t/recipes/checks/control-files/unpack-numerical-owner/eval/desc new file mode 100644 index 0000000..535eb15 --- /dev/null +++ b/t/recipes/checks/control-files/unpack-numerical-owner/eval/desc @@ -0,0 +1,3 @@ +Testname: unpack-numerical-owner +Test-Against: control-file-has-bad-owner +Check: control-files diff --git a/t/recipes/checks/control-files/unpack-numerical-owner/eval/hints b/t/recipes/checks/control-files/unpack-numerical-owner/eval/hints new file mode 100644 index 0000000..60d1461 --- /dev/null +++ b/t/recipes/checks/control-files/unpack-numerical-owner/eval/hints @@ -0,0 +1 @@ +unpack-numerical-owner (binary): no-ctrl-scripts diff --git a/t/recipes/checks/cron/files-bad-perm-owner/build-spec/debian/binary.docs b/t/recipes/checks/cron/files-bad-perm-owner/build-spec/debian/binary.docs new file mode 100644 index 0000000..42f92ea --- /dev/null +++ b/t/recipes/checks/cron/files-bad-perm-owner/build-spec/debian/binary.docs @@ -0,0 +1,3 @@ +read-only +README +some-file diff --git a/t/recipes/checks/cron/files-bad-perm-owner/build-spec/debian/binary.init b/t/recipes/checks/cron/files-bad-perm-owner/build-spec/debian/binary.init new file mode 100644 index 0000000..4ebbdf5 --- /dev/null +++ b/t/recipes/checks/cron/files-bad-perm-owner/build-spec/debian/binary.init @@ -0,0 +1,21 @@ +#!/bin/sh + +set -e + +### BEGIN INIT INFO +# Provides: binary +# Required-Start: +# Required-Stop: +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +# Short-Description: Useless +# Description: Does nothing +### END INIT INFO + +. /lib/lsb/init-functions + +case "$1" in + start|stop|force-reload|restart|status|*) + echo hello world + ;; +esac diff --git a/t/recipes/checks/cron/files-bad-perm-owner/build-spec/debian/binary.install b/t/recipes/checks/cron/files-bad-perm-owner/build-spec/debian/binary.install new file mode 100644 index 0000000..c759290 --- /dev/null +++ b/t/recipes/checks/cron/files-bad-perm-owner/build-spec/debian/binary.install @@ -0,0 +1,9 @@ +sample.ali usr/lib/some-where/ +script-uid usr/bin/ +script-ugid usr/bin/ +script-gid usr/bin/ +script-wexec usr/bin/ +script-wuid usr/bin/ +script-ro usr/bin/ +script etc/cron.d/ +script etc/emacs.d/ diff --git a/t/recipes/checks/cron/files-bad-perm-owner/build-spec/debian/binary.manpages b/t/recipes/checks/cron/files-bad-perm-owner/build-spec/debian/binary.manpages new file mode 100644 index 0000000..ad3e735 --- /dev/null +++ b/t/recipes/checks/cron/files-bad-perm-owner/build-spec/debian/binary.manpages @@ -0,0 +1 @@ +script-*.1 diff --git a/t/recipes/checks/cron/files-bad-perm-owner/build-spec/debian/clean b/t/recipes/checks/cron/files-bad-perm-owner/build-spec/debian/clean new file mode 100644 index 0000000..1e7cec6 --- /dev/null +++ b/t/recipes/checks/cron/files-bad-perm-owner/build-spec/debian/clean @@ -0,0 +1 @@ +script*.1 diff --git a/t/recipes/checks/cron/files-bad-perm-owner/build-spec/debian/control.in b/t/recipes/checks/cron/files-bad-perm-owner/build-spec/debian/control.in new file mode 100644 index 0000000..5c8703f --- /dev/null +++ b/t/recipes/checks/cron/files-bad-perm-owner/build-spec/debian/control.in @@ -0,0 +1,30 @@ +Source: [% $source %] +Priority: optional +Section: devel +Maintainer: [% $author %] +Standards-Version: [% $standards_version %] +Build-Depends: [% $build_depends %] +Rules-Requires-Root: binary-targets + +Package: binary +Architecture: all +Pre-Depends: ${misc:Pre-Depends} +Depends: ${misc:Depends}, lsb-base (>= 3.0-6) +Description: [% $description %] + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. + +Package: game +Architecture: all +Section: games +Depends: ${misc:Depends} +Description: [% $description %] - game + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. + . + Game package. + diff --git a/t/recipes/checks/cron/files-bad-perm-owner/build-spec/debian/game.install b/t/recipes/checks/cron/files-bad-perm-owner/build-spec/debian/game.install new file mode 100644 index 0000000..f708f99 --- /dev/null +++ b/t/recipes/checks/cron/files-bad-perm-owner/build-spec/debian/game.install @@ -0,0 +1 @@ +script usr/games/ diff --git a/t/recipes/checks/cron/files-bad-perm-owner/build-spec/debian/game.manpages b/t/recipes/checks/cron/files-bad-perm-owner/build-spec/debian/game.manpages new file mode 100644 index 0000000..8d16fb4 --- /dev/null +++ b/t/recipes/checks/cron/files-bad-perm-owner/build-spec/debian/game.manpages @@ -0,0 +1 @@ +script.1 diff --git a/t/recipes/checks/cron/files-bad-perm-owner/build-spec/debian/rules b/t/recipes/checks/cron/files-bad-perm-owner/build-spec/debian/rules new file mode 100644 index 0000000..951f84c --- /dev/null +++ b/t/recipes/checks/cron/files-bad-perm-owner/build-spec/debian/rules @@ -0,0 +1,31 @@ +#!/usr/bin/make -f + +GPKG:=game +PKG:=binary + +%: + dh $@ + +override_dh_auto_build: + for N in uid gid ugid wexec wuid ro; do \ + sed s/script/script-$$N/ < script > script-$$N ; \ + pod2man --section 1 script-$$N > script-$$N.1 ; \ + done + pod2man --section 1 script > script.1 + +override_dh_fixperms: + dh_fixperms + + chmod 0444 debian/$(PKG)/usr/share/doc/$(PKG)/read-only + chmod 4755 debian/$(PKG)/usr/bin/script-uid + chmod 2755 debian/$(PKG)/usr/bin/script-gid + chmod 6755 debian/$(PKG)/usr/bin/script-ugid + chmod 0775 debian/$(PKG)/usr/bin/script-wexec + chmod 4744 debian/$(PKG)/usr/bin/script-wuid + chmod 0751 debian/$(PKG)/usr/bin/script-ro + chmod 0644 debian/$(PKG)/usr/lib/some-where/sample.ali + chmod 0744 debian/$(PKG)/usr/share/doc/$(PKG) + chmod 0755 debian/$(PKG)/usr/share/doc/$(PKG)/some-file + chmod 0755 debian/$(PKG)/etc/cron.d/script + chmod 0755 debian/$(PKG)/etc/emacs.d/script + chmod 0765 debian/$(PKG)/etc/init.d/binary diff --git a/t/recipes/checks/cron/files-bad-perm-owner/build-spec/fill-values b/t/recipes/checks/cron/files-bad-perm-owner/build-spec/fill-values new file mode 100644 index 0000000..c914891 --- /dev/null +++ b/t/recipes/checks/cron/files-bad-perm-owner/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: upload-native +Testname: files-bad-perm-owner +Description: General permissions and owner tests diff --git a/t/recipes/checks/cron/files-bad-perm-owner/build-spec/orig/README b/t/recipes/checks/cron/files-bad-perm-owner/build-spec/orig/README new file mode 100644 index 0000000..336f590 --- /dev/null +++ b/t/recipes/checks/cron/files-bad-perm-owner/build-spec/orig/README @@ -0,0 +1 @@ +Hallo World diff --git a/t/recipes/checks/cron/files-bad-perm-owner/build-spec/orig/read-only b/t/recipes/checks/cron/files-bad-perm-owner/build-spec/orig/read-only new file mode 100644 index 0000000..1a3fca1 --- /dev/null +++ b/t/recipes/checks/cron/files-bad-perm-owner/build-spec/orig/read-only @@ -0,0 +1 @@ +Fadango on the core diff --git a/t/recipes/checks/cron/files-bad-perm-owner/build-spec/orig/sample.ali b/t/recipes/checks/cron/files-bad-perm-owner/build-spec/orig/sample.ali new file mode 100644 index 0000000..fec3fc8 --- /dev/null +++ b/t/recipes/checks/cron/files-bad-perm-owner/build-spec/orig/sample.ali @@ -0,0 +1 @@ +This is not a valid ali file diff --git a/t/recipes/checks/cron/files-bad-perm-owner/build-spec/orig/script b/t/recipes/checks/cron/files-bad-perm-owner/build-spec/orig/script new file mode 100755 index 0000000..8521013 --- /dev/null +++ b/t/recipes/checks/cron/files-bad-perm-owner/build-spec/orig/script @@ -0,0 +1,20 @@ +#!/bin/sh + +set -e + +echo "Aloha" + +exit 0 + +=head1 NAME + +script -- prints Aloha to stdout + +=head1 SYNOPSIS + + script + +=head1 DESCRIPTION + +Prints Aloha to stdout and that is it. + diff --git a/t/recipes/checks/cron/files-bad-perm-owner/build-spec/orig/some-file b/t/recipes/checks/cron/files-bad-perm-owner/build-spec/orig/some-file new file mode 100644 index 0000000..0dfa8ff --- /dev/null +++ b/t/recipes/checks/cron/files-bad-perm-owner/build-spec/orig/some-file @@ -0,0 +1,2 @@ +This is executable and should not be. :) + - Unfortunately it triggers an extra tag... oh well. diff --git a/t/recipes/checks/cron/files-bad-perm-owner/eval/desc b/t/recipes/checks/cron/files-bad-perm-owner/eval/desc new file mode 100644 index 0000000..952600a --- /dev/null +++ b/t/recipes/checks/cron/files-bad-perm-owner/eval/desc @@ -0,0 +1,2 @@ +Testname: files-bad-perm-owner +Check: cron diff --git a/t/recipes/checks/cron/files-bad-perm-owner/eval/hints b/t/recipes/checks/cron/files-bad-perm-owner/eval/hints new file mode 100644 index 0000000..c371cc7 --- /dev/null +++ b/t/recipes/checks/cron/files-bad-perm-owner/eval/hints @@ -0,0 +1 @@ +binary (binary): bad-permissions-for-etc-cron.d-script 0755 != 0644 [etc/cron.d/script] diff --git a/t/recipes/checks/cron/files-foo-violates-expected-naming/build-spec/debian/install b/t/recipes/checks/cron/files-foo-violates-expected-naming/build-spec/debian/install new file mode 100644 index 0000000..02c3f92 --- /dev/null +++ b/t/recipes/checks/cron/files-foo-violates-expected-naming/build-spec/debian/install @@ -0,0 +1,2 @@ +_bad-pkcs11.module usr/share/p11-kit/modules/ +cron-script.hourly etc/cron.hourly/ diff --git a/t/recipes/checks/cron/files-foo-violates-expected-naming/build-spec/fill-values b/t/recipes/checks/cron/files-foo-violates-expected-naming/build-spec/fill-values new file mode 100644 index 0000000..abbdaca --- /dev/null +++ b/t/recipes/checks/cron/files-foo-violates-expected-naming/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: upload-native +Testname: files-foo-violates-expected-naming +Description: Test naming conventions not being followed diff --git a/t/recipes/checks/cron/files-foo-violates-expected-naming/build-spec/orig/_bad-pkcs11.module b/t/recipes/checks/cron/files-foo-violates-expected-naming/build-spec/orig/_bad-pkcs11.module new file mode 100644 index 0000000..e69de29 diff --git a/t/recipes/checks/cron/files-foo-violates-expected-naming/build-spec/orig/cron-script.hourly b/t/recipes/checks/cron/files-foo-violates-expected-naming/build-spec/orig/cron-script.hourly new file mode 100755 index 0000000..ad6e129 --- /dev/null +++ b/t/recipes/checks/cron/files-foo-violates-expected-naming/build-spec/orig/cron-script.hourly @@ -0,0 +1,3 @@ +#!/bin/sh + +echo "Hallo World" diff --git a/t/recipes/checks/cron/files-foo-violates-expected-naming/eval/desc b/t/recipes/checks/cron/files-foo-violates-expected-naming/eval/desc new file mode 100644 index 0000000..9b3431a --- /dev/null +++ b/t/recipes/checks/cron/files-foo-violates-expected-naming/eval/desc @@ -0,0 +1,2 @@ +Testname: files-foo-violates-expected-naming +Check: cron diff --git a/t/recipes/checks/cron/files-foo-violates-expected-naming/eval/hints b/t/recipes/checks/cron/files-foo-violates-expected-naming/eval/hints new file mode 100644 index 0000000..7d9bb33 --- /dev/null +++ b/t/recipes/checks/cron/files-foo-violates-expected-naming/eval/hints @@ -0,0 +1 @@ +files-foo-violates-expected-naming (binary): run-parts-cron-filename-contains-illegal-chars [etc/cron.hourly/cron-script.hourly] diff --git a/t/recipes/checks/cron/legacy-etcfiles/build-spec/debian/README.Debian b/t/recipes/checks/cron/legacy-etcfiles/build-spec/debian/README.Debian new file mode 100644 index 0000000..e289bfb --- /dev/null +++ b/t/recipes/checks/cron/legacy-etcfiles/build-spec/debian/README.Debian @@ -0,0 +1,5 @@ +this is a package to test lintian's handling of files in /etc. +Also, there's a random mention of /usr/doc here to prompt a warning. +But /usr/documentation doesn't. + + -- Russ Allbery , Mon, 18 Feb 2008 16:40:55 -0800 diff --git a/t/recipes/checks/cron/legacy-etcfiles/build-spec/debian/changelog.in b/t/recipes/checks/cron/legacy-etcfiles/build-spec/debian/changelog.in new file mode 100644 index 0000000..00cdc77 --- /dev/null +++ b/t/recipes/checks/cron/legacy-etcfiles/build-spec/debian/changelog.in @@ -0,0 +1,7 @@ +etcfiles ([% $version %]) [% $distribution %]; urgency=low + + * Acknowledge NMU (Closes: #123456). + * initial setup + + -- Lintian Maintainers Fri, 21 Sep 2001 11:56:02 -0700 + diff --git a/t/recipes/checks/cron/legacy-etcfiles/build-spec/debian/conffiles b/t/recipes/checks/cron/legacy-etcfiles/build-spec/debian/conffiles new file mode 100644 index 0000000..76032b7 --- /dev/null +++ b/t/recipes/checks/cron/legacy-etcfiles/build-spec/debian/conffiles @@ -0,0 +1,5 @@ +/etc/proper +/var/lib/foo +/etc/cron.daily/cronfile-normal +/etc/cron.daily/.cronfile-begins-with-fullstop +/etc/cron.daily/cronfile-contains.fullstop diff --git a/t/recipes/checks/cron/legacy-etcfiles/build-spec/debian/conffiles.only b/t/recipes/checks/cron/legacy-etcfiles/build-spec/debian/conffiles.only new file mode 100644 index 0000000..a4b3895 --- /dev/null +++ b/t/recipes/checks/cron/legacy-etcfiles/build-spec/debian/conffiles.only @@ -0,0 +1,2 @@ +/etc/etcfiles/foo +/etc/etcfiles/bar diff --git a/t/recipes/checks/cron/legacy-etcfiles/build-spec/debian/control b/t/recipes/checks/cron/legacy-etcfiles/build-spec/debian/control new file mode 100644 index 0000000..f3dbda7 --- /dev/null +++ b/t/recipes/checks/cron/legacy-etcfiles/build-spec/debian/control @@ -0,0 +1,20 @@ +Source: etcfiles +Section: misc +Priority: optional +Maintainer: Lintian Maintainers +Standards-Version: 3.5.0 + +Package: etcfiles +Architecture: any +Depends: ${shlibs:Depends} +Description: test handling of files in /etc + Regression test for lintian's handling of files in /etc. + . + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. + +Package: only-etcfiles +Architecture: all +Depends: etcfiles (= ${source:Version}) +Description: test handling of conffile-only package diff --git a/t/recipes/checks/cron/legacy-etcfiles/build-spec/debian/rules b/t/recipes/checks/cron/legacy-etcfiles/build-spec/debian/rules new file mode 100755 index 0000000..97ff09f --- /dev/null +++ b/t/recipes/checks/cron/legacy-etcfiles/build-spec/debian/rules @@ -0,0 +1,64 @@ +#!/usr/bin/make -f + +tmp=debian/tmp +tmponly=debian/only-etcfiles + +clean: + rm -f debian/files debian/substvars + rm -rf debian/tmp + rm -rf debian/only-etcfiles + +build: +build-arch: +build-indep: +binary-indep: + install -d $(tmp)/etc + install -m 644 proper $(tmp)/etc + install -m 644 improper $(tmp)/etc + mkdir $(tmp)/etc/cron.daily + touch $(tmp)/etc/cron.daily/cronfile-normal + touch $(tmp)/etc/cron.daily/.cronfile-begins-with-fullstop + touch $(tmp)/etc/cron.daily/cronfile-contains.fullstop + ln $(tmp)/etc/improper $(tmp)/etc/improper-link + install -d $(tmp)/usr/share/doc/etcfiles + install -d $(tmp)/var/lib + install -m 644 proper $(tmp)/var/lib/foo + install -m 644 debian/README.Debian $(tmp)/usr/share/doc/etcfiles + install -m 644 debian/changelog $(tmp)/usr/share/doc/etcfiles + #gzip -9 $(tmp)/usr/share/doc/etcfiles/changelog + install -d $(tmp)/DEBIAN + install -m 644 debian/conffiles $(tmp)/DEBIAN + + echo 'd41d8cd98f00b204e9800998ecf8427e ./etc/cron.daily/cronfile-normal' \ + > debian/tmp/DEBIAN/md5sums + echo 'd41d8cd98f00b204e9800998ecf8427e ./etc/cron.daily/.cronfile-begins-with-fullstop' \ + >> debian/tmp/DEBIAN/md5sums + echo 'd41d8cd98f00b204e9800998ecf8427e ./etc/cron.daily/cronfile-contains.fullstop' \ + >> debian/tmp/DEBIAN/md5sums + echo '05c72cacce994208128b7d081116b04a ./etc/proper' \ + >> debian/tmp/DEBIAN/md5sums + echo 'ab371382468880299e5ebd05921764ce etc/improper' \ + >> debian/tmp/DEBIAN/md5sums + echo 'ab371382468880299e5ebd05921764ce usr/bin/foo' \ + >> debian/tmp/DEBIAN/md5sums + echo 'this is a malformed line' \ + >> debian/tmp/DEBIAN/md5sums + echo '56fb27e455dd86d8801f1ecd3a4cee49 usr/share/doc/etcfiles/README.Debian' \ + >> debian/tmp/DEBIAN/md5sums + + install -d $(tmponly)/etc/etcfiles + touch $(tmponly)/etc/etcfiles/foo + touch $(tmponly)/etc/etcfiles/bar + install -d $(tmponly)/usr/share/doc + cd $(tmponly)/usr/share/doc && ln -s etcfiles only-etcfiles + install -d $(tmponly)/DEBIAN + install -m 644 debian/conffiles.only $(tmponly)/DEBIAN/conffiles + + dpkg-gencontrol -isp -petcfiles + dpkg-gencontrol -isp -ponly-etcfiles -P$(tmponly) + dpkg --build $(tmp) .. + dpkg --build $(tmponly) .. + +binary: binary-indep + +.PHONY: binary-indep binary clean diff --git a/t/recipes/checks/cron/legacy-etcfiles/build-spec/fill-values b/t/recipes/checks/cron/legacy-etcfiles/build-spec/fill-values new file mode 100644 index 0000000..86deb10 --- /dev/null +++ b/t/recipes/checks/cron/legacy-etcfiles/build-spec/fill-values @@ -0,0 +1,5 @@ +Skeleton: upload-native +Testname: legacy-etcfiles +Source: etcfiles +Version: 1 +Description: Legacy test "etcfiles" diff --git a/t/recipes/checks/cron/legacy-etcfiles/build-spec/orig/improper b/t/recipes/checks/cron/legacy-etcfiles/build-spec/orig/improper new file mode 100644 index 0000000..23656f4 --- /dev/null +++ b/t/recipes/checks/cron/legacy-etcfiles/build-spec/orig/improper @@ -0,0 +1,2 @@ +[config] + var = value \ No newline at end of file diff --git a/t/recipes/checks/cron/legacy-etcfiles/build-spec/orig/proper b/t/recipes/checks/cron/legacy-etcfiles/build-spec/orig/proper new file mode 100644 index 0000000..f3dc68b --- /dev/null +++ b/t/recipes/checks/cron/legacy-etcfiles/build-spec/orig/proper @@ -0,0 +1,2 @@ +# i am a config file +foo = var \ No newline at end of file diff --git a/t/recipes/checks/cron/legacy-etcfiles/eval/desc b/t/recipes/checks/cron/legacy-etcfiles/eval/desc new file mode 100644 index 0000000..0432bda --- /dev/null +++ b/t/recipes/checks/cron/legacy-etcfiles/eval/desc @@ -0,0 +1,2 @@ +Testname: legacy-etcfiles +Check: cron diff --git a/t/recipes/checks/cron/legacy-etcfiles/eval/hints b/t/recipes/checks/cron/legacy-etcfiles/eval/hints new file mode 100644 index 0000000..733886c --- /dev/null +++ b/t/recipes/checks/cron/legacy-etcfiles/eval/hints @@ -0,0 +1 @@ +etcfiles (binary): run-parts-cron-filename-contains-illegal-chars [etc/cron.daily/cronfile-contains.fullstop] diff --git a/t/recipes/checks/cron/legacy-etcfiles/eval/post-test b/t/recipes/checks/cron/legacy-etcfiles/eval/post-test new file mode 100644 index 0000000..faeef0b --- /dev/null +++ b/t/recipes/checks/cron/legacy-etcfiles/eval/post-test @@ -0,0 +1 @@ +s/\(current is ([0-9]+\.)+[0-9]\)/(current is CURRENT)/ diff --git a/t/recipes/checks/cruft/cruft-autogenerated/build-spec/fill-values b/t/recipes/checks/cruft/cruft-autogenerated/build-spec/fill-values new file mode 100644 index 0000000..3dcc6e0 --- /dev/null +++ b/t/recipes/checks/cruft/cruft-autogenerated/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: upload-native +Testname: cruft-autogenerated +Description: Check for autogenerated file diff --git a/t/recipes/checks/cruft/cruft-autogenerated/build-spec/orig/src/gperf/gperf.c b/t/recipes/checks/cruft/cruft-autogenerated/build-spec/orig/src/gperf/gperf.c new file mode 100644 index 0000000..115d756 --- /dev/null +++ b/t/recipes/checks/cruft/cruft-autogenerated/build-spec/orig/src/gperf/gperf.c @@ -0,0 +1 @@ +/* ANSI-C code produced by gperf version 2.7.2 */ diff --git a/t/recipes/checks/cruft/cruft-autogenerated/build-spec/orig/src/gperf/gperf.cpp b/t/recipes/checks/cruft/cruft-autogenerated/build-spec/orig/src/gperf/gperf.cpp new file mode 100644 index 0000000..8971eaf --- /dev/null +++ b/t/recipes/checks/cruft/cruft-autogenerated/build-spec/orig/src/gperf/gperf.cpp @@ -0,0 +1 @@ +/* C++ code produced by gperf version 3.0.3 */ diff --git a/t/recipes/checks/cruft/cruft-autogenerated/build-spec/orig/src/oui.db/oui.db b/t/recipes/checks/cruft/cruft-autogenerated/build-spec/orig/src/oui.db/oui.db new file mode 100644 index 0000000..ebf4106 --- /dev/null +++ b/t/recipes/checks/cruft/cruft-autogenerated/build-spec/orig/src/oui.db/oui.db @@ -0,0 +1,20 @@ +# part of oui database + +00-00-56 (hex) DR. B. STRUCK +000056 (base 16) DR. B. STRUCK + POB 1147 BAECKERBARG 6 + D-2000 TANGSTEDT/HAMBURG + W-GERMANY + GERMANY + +00-00-57 (hex) SCITEX CORPORATION LTD. +000057 (base 16) SCITEX CORPORATION LTD. + P.O. BOX 330 + 46103 HERZLIA B + ISRAEL + +00-00-58 (hex) RACORE COMPUTER PRODUCTS INC. +000058 (base 16) RACORE COMPUTER PRODUCTS INC. + 2355 SOUTH 1070 WEST + SALT LAKE CITY UT 84119 + UNITED STATES \ No newline at end of file diff --git a/t/recipes/checks/cruft/cruft-autogenerated/build-spec/orig/src/visualc++/negative.py b/t/recipes/checks/cruft/cruft-autogenerated/build-spec/orig/src/visualc++/negative.py new file mode 100644 index 0000000..3c7da65 --- /dev/null +++ b/t/recipes/checks/cruft/cruft-autogenerated/build-spec/orig/src/visualc++/negative.py @@ -0,0 +1,5 @@ +def realwork(vars, moddefns, target): + version_suffix = "%r%r" % sys.version_info[:2] + print "# Makefile for Microsoft Visual C++ generated by freeze.py script" + print + print 'target = %s' % target \ No newline at end of file diff --git a/t/recipes/checks/cruft/cruft-autogenerated/build-spec/orig/src/visualc++/positive.cpp b/t/recipes/checks/cruft/cruft-autogenerated/build-spec/orig/src/visualc++/positive.cpp new file mode 100644 index 0000000..5d3f004 --- /dev/null +++ b/t/recipes/checks/cruft/cruft-autogenerated/build-spec/orig/src/visualc++/positive.cpp @@ -0,0 +1,4 @@ +//{{NO_DEPENDENCIES}} +// Microsoft Visual C++ generated include file. +// Used by vtkDLG.rc +// \ No newline at end of file diff --git a/t/recipes/checks/cruft/cruft-autogenerated/eval/desc b/t/recipes/checks/cruft/cruft-autogenerated/eval/desc new file mode 100644 index 0000000..a3c70f4 --- /dev/null +++ b/t/recipes/checks/cruft/cruft-autogenerated/eval/desc @@ -0,0 +1,2 @@ +Testname: cruft-autogenerated +Check: cruft diff --git a/t/recipes/checks/cruft/cruft-autogenerated/eval/hints b/t/recipes/checks/cruft/cruft-autogenerated/eval/hints new file mode 100644 index 0000000..3003675 --- /dev/null +++ b/t/recipes/checks/cruft/cruft-autogenerated/eval/hints @@ -0,0 +1,4 @@ +cruft-autogenerated (source): source-contains-data-from-ieee-data-oui-db [src/oui.db/oui.db] +cruft-autogenerated (source): source-contains-autogenerated-visual-c++-file [src/visualc++/positive.cpp] +cruft-autogenerated (source): source-contains-autogenerated-gperf-data [src/gperf/gperf.cpp] +cruft-autogenerated (source): source-contains-autogenerated-gperf-data [src/gperf/gperf.c] diff --git a/t/recipes/checks/cruft/cruft-bad-php-unrel/build-spec/debian/copyright b/t/recipes/checks/cruft/cruft-bad-php-unrel/build-spec/debian/copyright new file mode 100644 index 0000000..8513b32 --- /dev/null +++ b/t/recipes/checks/cruft/cruft-bad-php-unrel/build-spec/debian/copyright @@ -0,0 +1,20 @@ +Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Source: https://pecl.php.net/package/foo + +Files: * +Copyright: 2011 J. Random Hacker +License: GPL-2 + This package is free software; you can redistribute it and/or modify it under + the terms of the GNU General Public License as published by the Free Software + Foundation; version 2 dated June, 1991. + . + This package is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. + . + You should have received a copy of the GNU General Public License along with + this package; if not, write to the Free Software Foundation, Inc., 51 Franklin + St, Fifth Floor, Boston, MA 02110-1301, USA. + . + On Debian systems, the full text of the GNU General Public License version 2 + can be found in the file `/usr/share/common-licenses/GPL-2'. diff --git a/t/recipes/checks/cruft/cruft-bad-php-unrel/build-spec/fill-values b/t/recipes/checks/cruft/cruft-bad-php-unrel/build-spec/fill-values new file mode 100644 index 0000000..b7ea3b7 --- /dev/null +++ b/t/recipes/checks/cruft/cruft-bad-php-unrel/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: upload-native +Testname: cruft-bad-php-unrel +Description: Check for the bad php license (false-positives) diff --git a/t/recipes/checks/cruft/cruft-bad-php-unrel/build-spec/orig/src/2_01.txt b/t/recipes/checks/cruft/cruft-bad-php-unrel/build-spec/orig/src/2_01.txt new file mode 100644 index 0000000..0dc7725 --- /dev/null +++ b/t/recipes/checks/cruft/cruft-bad-php-unrel/build-spec/orig/src/2_01.txt @@ -0,0 +1,70 @@ +-------------------------------------------------------------------- + The PHP License, version 2.01 +Copyright (c) 1999 The PHP Group. All rights reserved. +-------------------------------------------------------------------- + +Redistribution and use in source and binary forms, with or without +modification, is permitted provided that the following conditions +are met: + + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + + 3. The name "PHP" must not be used to endorse or promote products + derived from this software without prior permission from the + PHP Group. This does not apply to add-on libraries or tools + that work in conjunction with PHP. In such a case the PHP + name may be used to indicate that the product supports PHP. + + 4. The PHP Group may publish revised and/or new versions of the + license from time to time. Each version will be given a + distinguishing version number. + Once covered code has been published under a particular version + of the license, you may always continue to use it under the + terms of that version. You may also choose to use such covered + code under the terms of any subsequent version of the license + published by the PHP Group. No one other than the PHP Group has + the right to modify the terms applicable to covered code created + under this License. + + 5. Redistributions of any form whatsoever must retain the following + acknowledgment: + "This product includes PHP, freely available from + http://www.php.net/". + + 6. Permission to freely distribute and use Zend as an integrated + part of PHP is granted, under the conditions of version 0.91 + of the Zend License. + The license is bundled with the Zend engine, and is available + at http://www.zend.com/license/0_91.txt, or by contacting + license@zend.com. + + + +THIS SOFTWARE IS PROVIDED BY THE PHP DEVELOPMENT TEAM ``AS IS'' AND +ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A +PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE PHP +DEVELOPMENT TEAM OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, +INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, +STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED +OF THE POSSIBILITY OF SUCH DAMAGE. + +-------------------------------------------------------------------- + +This software consists of voluntary contributions made by many +individuals on behalf of the PHP Group. + +The PHP Group can be contacted via Email at php-group@php.net. + +For more information on the PHP Group and the PHP project, +please see . diff --git a/t/recipes/checks/cruft/cruft-bad-php-unrel/build-spec/orig/src/2_02.txt b/t/recipes/checks/cruft/cruft-bad-php-unrel/build-spec/orig/src/2_02.txt new file mode 100644 index 0000000..af5b01c --- /dev/null +++ b/t/recipes/checks/cruft/cruft-bad-php-unrel/build-spec/orig/src/2_02.txt @@ -0,0 +1,75 @@ +-------------------------------------------------------------------- + The PHP License, version 2.02 +Copyright (c) 1999 - 2002 The PHP Group. All rights reserved. +-------------------------------------------------------------------- + +Redistribution and use in source and binary forms, with or without +modification, is permitted provided that the following conditions +are met: + + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + + 3. The name "PHP" must not be used to endorse or promote products + derived from this software without prior permission from the + PHP Group. This does not apply to add-on libraries or tools + that work in conjunction with PHP. In such a case the PHP + name may be used to indicate that the product supports PHP. + + 4. The PHP Group may publish revised and/or new versions of the + license from time to time. Each version will be given a + distinguishing version number. + Once covered code has been published under a particular version + of the license, you may always continue to use it under the + terms of that version. You may also choose to use such covered + code under the terms of any subsequent version of the license + published by the PHP Group. No one other than the PHP Group has + the right to modify the terms applicable to covered code created + under this License. + + 5. Redistributions of any form whatsoever must retain the following + acknowledgment: + "This product includes PHP, freely available from + http://www.php.net/". + + 6. The software incorporates the Zend Engine, a product of Zend + Technologies, Ltd. ("Zend"). The Zend Engine is licensed to the + PHP Association (pursuant to a grant from Zend that can be + found at http://www.php.net/license/ZendGrant/) for + distribution to you under this license agreement, only as a + part of PHP. In the event that you separate the Zend Engine + (or any portion thereof) from the rest of the software, or + modify the Zend Engine, or any portion thereof, your use of the + separated or modified Zend Engine software shall not be governed + by this license, and instead shall be governed by the license + set forth at http://www.zend.com/license/ZendLicense/. + + + +THIS SOFTWARE IS PROVIDED BY THE PHP DEVELOPMENT TEAM ``AS IS'' AND +ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A +PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE PHP +DEVELOPMENT TEAM OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, +INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, +STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED +OF THE POSSIBILITY OF SUCH DAMAGE. + +-------------------------------------------------------------------- + +This software consists of voluntary contributions made by many +individuals on behalf of the PHP Group. + +The PHP Group can be contacted via Email at group@php.net. + +For more information on the PHP Group and the PHP project, +please see . diff --git a/t/recipes/checks/cruft/cruft-bad-php-unrel/build-spec/orig/src/3_01.txt b/t/recipes/checks/cruft/cruft-bad-php-unrel/build-spec/orig/src/3_01.txt new file mode 100644 index 0000000..9fbf45f --- /dev/null +++ b/t/recipes/checks/cruft/cruft-bad-php-unrel/build-spec/orig/src/3_01.txt @@ -0,0 +1,55 @@ +-------------------------------------------------------------------- + The PHP License, version 3.01 +Copyright (c) 1999 - 2012 The PHP Group. All rights reserved. +-------------------------------------------------------------------- + +Redistribution and use in source and binary forms, with or without +modification, is permitted provided that the following conditions +are met: + + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in + the documentation and/or other materials provided with the + distribution. + + 3. The name "PHP" must not be used to endorse or promote products + derived from this software without prior written permission. For + written permission, please contact group@php.net. + + 4. Products derived from this software may not be called "PHP", nor + may "PHP" appear in their name, without prior written permission + from group@php.net. You may indicate that your software works in + conjunction with PHP by saying "Foo for PHP" instead of calling + it "PHP Foo" or "phpfoo" + + 5. The PHP Group may publish revised and/or new versions of the + license from time to time. Each version will be given a + distinguishing version number. + Once covered code has been published under a particular version + of the license, you may always continue to use it under the terms + of that version. You may also choose to use such covered code + under the terms of any subsequent version of the license + published by the PHP Group. No one other than the PHP Group has + the right to modify the terms applicable to covered code created + under this License. + + 6. Redistributions of any form whatsoever must retain the following + acknowledgment: + "This product includes PHP software, freely available from + ". + +THIS SOFTWARE IS PROVIDED BY THE PHP DEVELOPMENT TEAM ``AS IS'' AND +ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A +PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE PHP +DEVELOPMENT TEAM OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, +INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, +STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED +OF THE POSSIBILITY OF SUCH DAMAGE. \ No newline at end of file diff --git a/t/recipes/checks/cruft/cruft-bad-php-unrel/eval/desc b/t/recipes/checks/cruft/cruft-bad-php-unrel/eval/desc new file mode 100644 index 0000000..951b329 --- /dev/null +++ b/t/recipes/checks/cruft/cruft-bad-php-unrel/eval/desc @@ -0,0 +1,5 @@ +Testname: cruft-bad-php-unrel +Test-Against: + license-problem-php-license + license-problem-bad-php-license +Check: cruft diff --git a/t/recipes/checks/cruft/cruft-bad-php-unrel/eval/hints b/t/recipes/checks/cruft/cruft-bad-php-unrel/eval/hints new file mode 100644 index 0000000..e69de29 diff --git a/t/recipes/checks/cruft/cruft-bad-php/build-spec/fill-values b/t/recipes/checks/cruft/cruft-bad-php/build-spec/fill-values new file mode 100644 index 0000000..d54580a --- /dev/null +++ b/t/recipes/checks/cruft/cruft-bad-php/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: upload-native +Testname: cruft-bad-php +Description: Check for the bad php license diff --git a/t/recipes/checks/cruft/cruft-bad-php/build-spec/orig/src/2_01.txt b/t/recipes/checks/cruft/cruft-bad-php/build-spec/orig/src/2_01.txt new file mode 100644 index 0000000..0dc7725 --- /dev/null +++ b/t/recipes/checks/cruft/cruft-bad-php/build-spec/orig/src/2_01.txt @@ -0,0 +1,70 @@ +-------------------------------------------------------------------- + The PHP License, version 2.01 +Copyright (c) 1999 The PHP Group. All rights reserved. +-------------------------------------------------------------------- + +Redistribution and use in source and binary forms, with or without +modification, is permitted provided that the following conditions +are met: + + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + + 3. The name "PHP" must not be used to endorse or promote products + derived from this software without prior permission from the + PHP Group. This does not apply to add-on libraries or tools + that work in conjunction with PHP. In such a case the PHP + name may be used to indicate that the product supports PHP. + + 4. The PHP Group may publish revised and/or new versions of the + license from time to time. Each version will be given a + distinguishing version number. + Once covered code has been published under a particular version + of the license, you may always continue to use it under the + terms of that version. You may also choose to use such covered + code under the terms of any subsequent version of the license + published by the PHP Group. No one other than the PHP Group has + the right to modify the terms applicable to covered code created + under this License. + + 5. Redistributions of any form whatsoever must retain the following + acknowledgment: + "This product includes PHP, freely available from + http://www.php.net/". + + 6. Permission to freely distribute and use Zend as an integrated + part of PHP is granted, under the conditions of version 0.91 + of the Zend License. + The license is bundled with the Zend engine, and is available + at http://www.zend.com/license/0_91.txt, or by contacting + license@zend.com. + + + +THIS SOFTWARE IS PROVIDED BY THE PHP DEVELOPMENT TEAM ``AS IS'' AND +ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A +PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE PHP +DEVELOPMENT TEAM OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, +INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, +STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED +OF THE POSSIBILITY OF SUCH DAMAGE. + +-------------------------------------------------------------------- + +This software consists of voluntary contributions made by many +individuals on behalf of the PHP Group. + +The PHP Group can be contacted via Email at php-group@php.net. + +For more information on the PHP Group and the PHP project, +please see . diff --git a/t/recipes/checks/cruft/cruft-bad-php/build-spec/orig/src/2_02.txt b/t/recipes/checks/cruft/cruft-bad-php/build-spec/orig/src/2_02.txt new file mode 100644 index 0000000..af5b01c --- /dev/null +++ b/t/recipes/checks/cruft/cruft-bad-php/build-spec/orig/src/2_02.txt @@ -0,0 +1,75 @@ +-------------------------------------------------------------------- + The PHP License, version 2.02 +Copyright (c) 1999 - 2002 The PHP Group. All rights reserved. +-------------------------------------------------------------------- + +Redistribution and use in source and binary forms, with or without +modification, is permitted provided that the following conditions +are met: + + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + + 3. The name "PHP" must not be used to endorse or promote products + derived from this software without prior permission from the + PHP Group. This does not apply to add-on libraries or tools + that work in conjunction with PHP. In such a case the PHP + name may be used to indicate that the product supports PHP. + + 4. The PHP Group may publish revised and/or new versions of the + license from time to time. Each version will be given a + distinguishing version number. + Once covered code has been published under a particular version + of the license, you may always continue to use it under the + terms of that version. You may also choose to use such covered + code under the terms of any subsequent version of the license + published by the PHP Group. No one other than the PHP Group has + the right to modify the terms applicable to covered code created + under this License. + + 5. Redistributions of any form whatsoever must retain the following + acknowledgment: + "This product includes PHP, freely available from + http://www.php.net/". + + 6. The software incorporates the Zend Engine, a product of Zend + Technologies, Ltd. ("Zend"). The Zend Engine is licensed to the + PHP Association (pursuant to a grant from Zend that can be + found at http://www.php.net/license/ZendGrant/) for + distribution to you under this license agreement, only as a + part of PHP. In the event that you separate the Zend Engine + (or any portion thereof) from the rest of the software, or + modify the Zend Engine, or any portion thereof, your use of the + separated or modified Zend Engine software shall not be governed + by this license, and instead shall be governed by the license + set forth at http://www.zend.com/license/ZendLicense/. + + + +THIS SOFTWARE IS PROVIDED BY THE PHP DEVELOPMENT TEAM ``AS IS'' AND +ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A +PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE PHP +DEVELOPMENT TEAM OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, +INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, +STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED +OF THE POSSIBILITY OF SUCH DAMAGE. + +-------------------------------------------------------------------- + +This software consists of voluntary contributions made by many +individuals on behalf of the PHP Group. + +The PHP Group can be contacted via Email at group@php.net. + +For more information on the PHP Group and the PHP project, +please see . diff --git a/t/recipes/checks/cruft/cruft-bad-php/build-spec/orig/src/3_01.txt b/t/recipes/checks/cruft/cruft-bad-php/build-spec/orig/src/3_01.txt new file mode 100644 index 0000000..9fbf45f --- /dev/null +++ b/t/recipes/checks/cruft/cruft-bad-php/build-spec/orig/src/3_01.txt @@ -0,0 +1,55 @@ +-------------------------------------------------------------------- + The PHP License, version 3.01 +Copyright (c) 1999 - 2012 The PHP Group. All rights reserved. +-------------------------------------------------------------------- + +Redistribution and use in source and binary forms, with or without +modification, is permitted provided that the following conditions +are met: + + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in + the documentation and/or other materials provided with the + distribution. + + 3. The name "PHP" must not be used to endorse or promote products + derived from this software without prior written permission. For + written permission, please contact group@php.net. + + 4. Products derived from this software may not be called "PHP", nor + may "PHP" appear in their name, without prior written permission + from group@php.net. You may indicate that your software works in + conjunction with PHP by saying "Foo for PHP" instead of calling + it "PHP Foo" or "phpfoo" + + 5. The PHP Group may publish revised and/or new versions of the + license from time to time. Each version will be given a + distinguishing version number. + Once covered code has been published under a particular version + of the license, you may always continue to use it under the terms + of that version. You may also choose to use such covered code + under the terms of any subsequent version of the license + published by the PHP Group. No one other than the PHP Group has + the right to modify the terms applicable to covered code created + under this License. + + 6. Redistributions of any form whatsoever must retain the following + acknowledgment: + "This product includes PHP software, freely available from + ". + +THIS SOFTWARE IS PROVIDED BY THE PHP DEVELOPMENT TEAM ``AS IS'' AND +ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A +PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE PHP +DEVELOPMENT TEAM OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, +INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, +STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED +OF THE POSSIBILITY OF SUCH DAMAGE. \ No newline at end of file diff --git a/t/recipes/checks/cruft/cruft-bad-php/eval/desc b/t/recipes/checks/cruft/cruft-bad-php/eval/desc new file mode 100644 index 0000000..93e4ccd --- /dev/null +++ b/t/recipes/checks/cruft/cruft-bad-php/eval/desc @@ -0,0 +1,2 @@ +Testname: cruft-bad-php +Check: cruft diff --git a/t/recipes/checks/cruft/cruft-bad-php/eval/hints b/t/recipes/checks/cruft/cruft-bad-php/eval/hints new file mode 100644 index 0000000..a674da0 --- /dev/null +++ b/t/recipes/checks/cruft/cruft-bad-php/eval/hints @@ -0,0 +1,3 @@ +cruft-bad-php (source): license-problem-php-license [src/3_01.txt] +cruft-bad-php (source): license-problem-bad-php-license [src/2_02.txt] +cruft-bad-php (source): license-problem-bad-php-license [src/2_01.txt] diff --git a/t/recipes/checks/cruft/cruft-cc-by-nc-sa/build-spec/fill-values b/t/recipes/checks/cruft/cruft-cc-by-nc-sa/build-spec/fill-values new file mode 100644 index 0000000..653eb5e --- /dev/null +++ b/t/recipes/checks/cruft/cruft-cc-by-nc-sa/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: upload-native +Testname: cruft-cc-by-nc-sa +Description: Check for the creative common cc by sa diff --git a/t/recipes/checks/cruft/cruft-cc-by-nc-sa/build-spec/orig/src/ISI_export_format.html b/t/recipes/checks/cruft/cruft-cc-by-nc-sa/build-spec/orig/src/ISI_export_format.html new file mode 100644 index 0000000..fd6df9c --- /dev/null +++ b/t/recipes/checks/cruft/cruft-cc-by-nc-sa/build-spec/orig/src/ISI_export_format.html @@ -0,0 +1,8 @@ + + + +Some title + + +Content is available under Attribution-NonCommercial-ShareAlike 3.0 Unported + diff --git a/t/recipes/checks/cruft/cruft-cc-by-nc-sa/build-spec/orig/src/copyright-header.html b/t/recipes/checks/cruft/cruft-cc-by-nc-sa/build-spec/orig/src/copyright-header.html new file mode 100644 index 0000000..67f778a --- /dev/null +++ b/t/recipes/checks/cruft/cruft-cc-by-nc-sa/build-spec/orig/src/copyright-header.html @@ -0,0 +1,9 @@ + + + +Test + + +test + + diff --git a/t/recipes/checks/cruft/cruft-cc-by-nc-sa/build-spec/orig/src/test.svg b/t/recipes/checks/cruft/cruft-cc-by-nc-sa/build-spec/orig/src/test.svg new file mode 100644 index 0000000..02796b5 --- /dev/null +++ b/t/recipes/checks/cruft/cruft-cc-by-nc-sa/build-spec/orig/src/test.svg @@ -0,0 +1,53 @@ + + + + File + + + + + image/svg+xml + + File + 2014-09-12 + + + Bastien Roucariès + + + + + + + + + + + + + + + + diff --git a/t/recipes/checks/cruft/cruft-cc-by-nc-sa/build-spec/orig/src/test.xml b/t/recipes/checks/cruft/cruft-cc-by-nc-sa/build-spec/orig/src/test.xml new file mode 100644 index 0000000..b0ca098 --- /dev/null +++ b/t/recipes/checks/cruft/cruft-cc-by-nc-sa/build-spec/orig/src/test.xml @@ -0,0 +1,9 @@ + + + \ No newline at end of file diff --git a/t/recipes/checks/cruft/cruft-cc-by-nc-sa/eval/desc b/t/recipes/checks/cruft/cruft-cc-by-nc-sa/eval/desc new file mode 100644 index 0000000..5219716 --- /dev/null +++ b/t/recipes/checks/cruft/cruft-cc-by-nc-sa/eval/desc @@ -0,0 +1,2 @@ +Testname: cruft-cc-by-nc-sa +Check: cruft diff --git a/t/recipes/checks/cruft/cruft-cc-by-nc-sa/eval/hints b/t/recipes/checks/cruft/cruft-cc-by-nc-sa/eval/hints new file mode 100644 index 0000000..60ac3e7 --- /dev/null +++ b/t/recipes/checks/cruft/cruft-cc-by-nc-sa/eval/hints @@ -0,0 +1,4 @@ +cruft-cc-by-nc-sa (source): license-problem-cc-by-nc-sa [src/test.xml] +cruft-cc-by-nc-sa (source): license-problem-cc-by-nc-sa [src/test.svg] +cruft-cc-by-nc-sa (source): license-problem-cc-by-nc-sa [src/copyright-header.html] +cruft-cc-by-nc-sa (source): license-problem-cc-by-nc-sa [src/ISI_export_format.html] diff --git a/t/recipes/checks/cruft/cruft-evil-json/build-spec/fill-values b/t/recipes/checks/cruft/cruft-evil-json/build-spec/fill-values new file mode 100644 index 0000000..215f18d --- /dev/null +++ b/t/recipes/checks/cruft/cruft-evil-json/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: upload-native +Testname: cruft-evil-json +Description: Check for the "Evil JSON" license diff --git a/t/recipes/checks/cruft/cruft-evil-json/build-spec/orig/src/evil.c b/t/recipes/checks/cruft/cruft-evil-json/build-spec/orig/src/evil.c new file mode 100644 index 0000000..e95dfd2 --- /dev/null +++ b/t/recipes/checks/cruft/cruft-evil-json/build-spec/orig/src/evil.c @@ -0,0 +1,10 @@ +/** + * The non-free pet-phase in the JSON license that triggers + * the Lintian tag. + * + * "The software shall be used for good, not evil" + */ + +int main() { + return 0; +} diff --git a/t/recipes/checks/cruft/cruft-evil-json/eval/desc b/t/recipes/checks/cruft/cruft-evil-json/eval/desc new file mode 100644 index 0000000..deb7d73 --- /dev/null +++ b/t/recipes/checks/cruft/cruft-evil-json/eval/desc @@ -0,0 +1,2 @@ +Testname: cruft-evil-json +Check: cruft diff --git a/t/recipes/checks/cruft/cruft-evil-json/eval/hints b/t/recipes/checks/cruft/cruft-evil-json/eval/hints new file mode 100644 index 0000000..a62e789 --- /dev/null +++ b/t/recipes/checks/cruft/cruft-evil-json/eval/hints @@ -0,0 +1 @@ +cruft-evil-json (source): license-problem-json-evil [src/evil.c] diff --git a/t/recipes/checks/cruft/cruft-general-upstream/build-spec/fill-values b/t/recipes/checks/cruft/cruft-general-upstream/build-spec/fill-values new file mode 100644 index 0000000..7cfc324 --- /dev/null +++ b/t/recipes/checks/cruft/cruft-general-upstream/build-spec/fill-values @@ -0,0 +1,4 @@ +Testname: cruft-general-upstream +Skeleton: upload-non-native +Extra-Build-Depends: zip +Description: Check for cruft in the upstream source diff --git a/t/recipes/checks/cruft/cruft-general-upstream/build-spec/pre-upstream b/t/recipes/checks/cruft/cruft-general-upstream/build-spec/pre-upstream new file mode 100755 index 0000000..827b002 --- /dev/null +++ b/t/recipes/checks/cruft/cruft-general-upstream/build-spec/pre-upstream @@ -0,0 +1,61 @@ +#!/bin/sh +# +# Create all the various junk that shouldn't exist upstream. We do much of it +# here rather than in the template so that Lintian itself can be imported into +# revision control systems. + +set -e +dir="$1" + + +EMPTY_OLE_OBJECT='\320\317\021\340\241\261\032\341' + +mkdir "${dir}/CVS" +echo 'source-contains-cvs-control-dir' > "${dir}/CVS/Entries" +mkdir "${dir}/.svn" +echo 'source-contains-svn-control-dir' > "${dir}/.svn/format" +mkdir "${dir}/.bzr" +echo 'source-contains-bzr-control-dir' > "${dir}/.bzr/foo" +mkdir "${dir}/{arch}" +echo 'source-contains-arch-control-dir' > "${dir}/{arch}/foo" +mkdir "${dir}/.git" +echo 'source-contains-git-control-dir' > "${dir}/.git/foo" +mkdir "${dir}/.hg" +echo 'source-contains-hg-control-dir' > "${dir}/.hg/foo" +mkdir "${dir}/.be" +echo 'source-contains-bts-control-dir' > "${dir}/.be/foo" + +echo 'source-contains-svn-commit-file' > "${dir}/svn-commit.tmp" +echo 'source-contains-svk-commit-file' > "${dir}/svk-commit444.tmp" +echo 'source-contains-arch-inventory-file' > "${dir}/.arch-inventory" +echo 'source-contains-hg-tags-file' > "${dir}/.hgtags" +echo 'source-contains-cvs-conflict-copy' > "${dir}/.#foo.1.1" +echo 'source-contains-svn-conflict-file' > "${dir}/foo.r1352" + +echo 'configure-generated-file-in-source' > "${dir}/config.cache" + +printf "MZ\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x3c" > "${dir}/fake-win32-bin.exe" +# use old magic \001\000\000\000 part is optional but needed with old file +printf "ITSF\003\000\000\000\140\000\000\000\001\000\000\000" > "${dir}/fake-help-file.chm" +# .chm files with "Halibut" are probably generated by free software +printf "ITSF\003\000\000\000\140\000\000\000\001\000\000\000Halibut," > "${dir}/fake-help-file-halibut.chm" + +printf "CWS\011 x" > "${dir}/fakeflash.swf" +echo '//comment' > "${dir}/fake.min.js" +# Make python generate python bytecode files +# - more reliable than crafting them ourselves +echo '' > "${dir}/fake.py" +echo 'import fake' > "${dir}/main.py" +unset PYTHONDONTWRITEBYTECODE +PYTHONPATH="${dir}" python3 "${dir}/main.py" > /dev/null +PYTHONPATH="${dir}" python3 -O "${dir}/main.py" > /dev/null +rm -f "${dir}"/main.py* + +zip -q "${dir}/fake.jar" "${dir}/fake.min.js" +cp "${dir}/fake.jar" "${dir}/fakesilverlight.XAC" + +# need to pad +printf "\320\317\021\340\241\261\032\341" > "${dir}/fakefla.fla" +dd if=/dev/zero of="${dir}/fakefla.fla" count=1 bs=1 seek=2047 > /dev/null 2> /dev/null +cp "${dir}/fakefla.fla" "${dir}/fakeflasourced.fla" +printf '//fake .as flash' > "${dir}/fakeflasourced.as" diff --git a/t/recipes/checks/cruft/cruft-general-upstream/eval/desc b/t/recipes/checks/cruft/cruft-general-upstream/eval/desc new file mode 100644 index 0000000..598c670 --- /dev/null +++ b/t/recipes/checks/cruft/cruft-general-upstream/eval/desc @@ -0,0 +1,5 @@ +Testname: cruft-general-upstream +Check: cruft +Todo: In unstable, file(1) cannot detect files byte-compiled by Python3. (Bug#950516) +# also update the version number below when Bug#950516 was fixed +Test-Depends: file (>= 1:5.38) diff --git a/t/recipes/checks/cruft/cruft-general-upstream/eval/hints b/t/recipes/checks/cruft/cruft-general-upstream/eval/hints new file mode 100644 index 0000000..43d5e56 --- /dev/null +++ b/t/recipes/checks/cruft/cruft-general-upstream/eval/hints @@ -0,0 +1,26 @@ +cruft-general-upstream (source): source-is-missing fakeflash.swf +cruft-general-upstream (source): source-is-missing fakefla.fla +cruft-general-upstream (source): source-is-missing fake.min.js +cruft-general-upstream (source): source-contains-svn-control-dir .svn +cruft-general-upstream (source): source-contains-svn-conflict-file foo.r1352 +cruft-general-upstream (source): source-contains-svn-commit-file svn-commit.tmp +cruft-general-upstream (source): source-contains-svk-commit-file svk-commit444.tmp +cruft-general-upstream (source): source-contains-prebuilt-windows-binary fake-win32-bin.exe +cruft-general-upstream (source): source-contains-prebuilt-silverlight-object fakesilverlight.XAC +cruft-general-upstream (source): source-contains-prebuilt-python-object __pycache__/fake.cpython-38.pyc +cruft-general-upstream (source): source-contains-prebuilt-python-object __pycache__/fake.cpython-38.opt-1.pyc +cruft-general-upstream (source): source-contains-prebuilt-ms-help-file fake-help-file.chm +cruft-general-upstream (source): source-contains-prebuilt-javascript-object fake.min.js +cruft-general-upstream (source): source-contains-prebuilt-flash-project fakeflasourced.fla +cruft-general-upstream (source): source-contains-prebuilt-flash-project fakefla.fla +cruft-general-upstream (source): source-contains-prebuilt-flash-object fakeflash.swf +cruft-general-upstream (source): source-contains-hg-tags-file .hgtags +cruft-general-upstream (source): source-contains-hg-control-dir .hg +cruft-general-upstream (source): source-contains-git-control-dir .git +cruft-general-upstream (source): source-contains-cvs-control-dir CVS +cruft-general-upstream (source): source-contains-cvs-conflict-copy .#foo.1.1 +cruft-general-upstream (source): source-contains-bzr-control-dir .bzr +cruft-general-upstream (source): source-contains-bts-control-dir .be +cruft-general-upstream (source): source-contains-arch-inventory-file .arch-inventory +cruft-general-upstream (source): source-contains-arch-control-dir {arch} +cruft-general-upstream (source): configure-generated-file-in-source config.cache diff --git a/t/recipes/checks/cruft/cruft-gfdl-fp-sliding-win/build-spec/fill-values b/t/recipes/checks/cruft/cruft-gfdl-fp-sliding-win/build-spec/fill-values new file mode 100644 index 0000000..85fc8d9 --- /dev/null +++ b/t/recipes/checks/cruft/cruft-gfdl-fp-sliding-win/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: upload-native +Testname: cruft-gfdl-fp-sliding-win +Description: Check for FP with GFDL invariants sections diff --git a/t/recipes/checks/cruft/cruft-gfdl-fp-sliding-win/build-spec/orig/src/normal.texi b/t/recipes/checks/cruft/cruft-gfdl-fp-sliding-win/build-spec/orig/src/normal.texi new file mode 100644 index 0000000..d9c1b54 --- /dev/null +++ b/t/recipes/checks/cruft/cruft-gfdl-fp-sliding-win/build-spec/orig/src/normal.texi @@ -0,0 +1,6 @@ +Permission is granted to copy, distribute and/or modify this +document under the terms of the GNU Free Documentation License, +version 1.3 or any later version published by the Free Software +Foundation; with no Invariant Sections, no Front-Cover Texts and +no Back-Cover Texts. A copy of the license is included in the +section entitled "GNU Free Documentation License". diff --git a/t/recipes/checks/cruft/cruft-gfdl-fp-sliding-win/build-spec/pre-build b/t/recipes/checks/cruft/cruft-gfdl-fp-sliding-win/build-spec/pre-build new file mode 100755 index 0000000..5ee6c94 --- /dev/null +++ b/t/recipes/checks/cruft/cruft-gfdl-fp-sliding-win/build-spec/pre-build @@ -0,0 +1,45 @@ +#!/usr/bin/perl + +# Attempt to break the GFDL so that the "redeeming" part of the +# license gets in the window /after/ the triggering part. c/cruft +# handles this case correctly now and we don't want to mess that up +# later. + +use strict; +use warnings; + +# Keep in sync with checks/cruft +use constant BLOCK_SIZE => 16_384; + +my ($rootdir) = @ARGV; +my $dir = "$rootdir/debian/src"; +my $file = "$dir/good.texi"; + +unless (-d $dir) { + mkdir $dir or die "mkdir $dir: $!"; +} + +my $slash = '/'; +my $gfdl_start = <', $file or die "open $file: $!"; + +print {$fd} $prefix, "\n"; +print {$fd} $gfdl_start; +print {$fd} $gfdl_end; + +close $fd or die "close $file: $!"; diff --git a/t/recipes/checks/cruft/cruft-gfdl-fp-sliding-win/eval/desc b/t/recipes/checks/cruft/cruft-gfdl-fp-sliding-win/eval/desc new file mode 100644 index 0000000..da0fce7 --- /dev/null +++ b/t/recipes/checks/cruft/cruft-gfdl-fp-sliding-win/eval/desc @@ -0,0 +1,3 @@ +Testname: cruft-gfdl-fp-sliding-win +Test-Against: license-problem-gfdl-invariants +Check: cruft diff --git a/t/recipes/checks/cruft/cruft-gfdl-fp-sliding-win/eval/hints b/t/recipes/checks/cruft/cruft-gfdl-fp-sliding-win/eval/hints new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/t/recipes/checks/cruft/cruft-gfdl-fp-sliding-win/eval/hints @@ -0,0 +1 @@ + diff --git a/t/recipes/checks/cruft/cruft-gfdl-invariants/build-spec/fill-values b/t/recipes/checks/cruft/cruft-gfdl-invariants/build-spec/fill-values new file mode 100644 index 0000000..2c57a2a --- /dev/null +++ b/t/recipes/checks/cruft/cruft-gfdl-invariants/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: upload-native +Testname: cruft-gfdl-invariants +Description: Check for GFDL invariants sections diff --git a/t/recipes/checks/cruft/cruft-gfdl-invariants/build-spec/orig/src/autoconf.texi b/t/recipes/checks/cruft/cruft-gfdl-invariants/build-spec/orig/src/autoconf.texi new file mode 100644 index 0000000..ba8175d --- /dev/null +++ b/t/recipes/checks/cruft/cruft-gfdl-invariants/build-spec/orig/src/autoconf.texi @@ -0,0 +1,12 @@ +Permission is granted to copy, distribute and/or modify this document +under the terms of the @acronym{GNU} Free Documentation License, +Version 1.3 or any later version published by the Free Software +Foundation; with no Invariant Sections, with the Front-Cover texts +being ``A @acronym{GNU} Manual,'' and with the Back-Cover Texts as in +(a) below. A copy of the license is included in the section entitled +``@acronym{GNU} Free Documentation License.'' + +(a) The FSF's Back-Cover Text is: ``You have the freedom to copy and +modify this @acronym{GNU} manual. Buying copies from the @acronym{FSF} +supports it in developing @acronym{GNU} and promoting software +freedom.'' diff --git a/t/recipes/checks/cruft/cruft-gfdl-invariants/build-spec/orig/src/dvipdfmx.tex b/t/recipes/checks/cruft/cruft-gfdl-invariants/build-spec/orig/src/dvipdfmx.tex new file mode 100644 index 0000000..a0a6634 --- /dev/null +++ b/t/recipes/checks/cruft/cruft-gfdl-invariants/build-spec/orig/src/dvipdfmx.tex @@ -0,0 +1,6 @@ +\section*{GNU Free Documentation License}\label{SEC:FDL} +\subsection*{GNU Free Documentation License}\label{SEC:FDL} + \subsubsection{GNU Free Documentation License}\label{SEC:FDL} + +This document is distributed under the term of the GNU Free Documentation +License. See, the attached file for copying conditions. diff --git a/t/recipes/checks/cruft/cruft-gfdl-invariants/build-spec/orig/src/empty.texi b/t/recipes/checks/cruft/cruft-gfdl-invariants/build-spec/orig/src/empty.texi new file mode 100644 index 0000000..8e87b5f --- /dev/null +++ b/t/recipes/checks/cruft/cruft-gfdl-invariants/build-spec/orig/src/empty.texi @@ -0,0 +1,5 @@ +Permission is granted to copy, distribute and/or modify this +document under the terms of the GNU Free Documentation License, +version 1.3 or any later version published by the Free Software +Foundation. A copy of the license is included in the +section entitled "GNU Free Documentation License". diff --git a/t/recipes/checks/cruft/cruft-gfdl-invariants/build-spec/orig/src/emptybis.texi b/t/recipes/checks/cruft/cruft-gfdl-invariants/build-spec/orig/src/emptybis.texi new file mode 100644 index 0000000..7ad0640 --- /dev/null +++ b/t/recipes/checks/cruft/cruft-gfdl-invariants/build-spec/orig/src/emptybis.texi @@ -0,0 +1,7 @@ +Permission is granted to copy, distribute and/or modify this +document under the terms of the GNU Free Documentation License, +version 1.3 or any later version published by the Free Software +Foundation. + +A copy of the license is included in the +section entitled "GNU Free Documentation License". diff --git a/t/recipes/checks/cruft/cruft-gfdl-invariants/build-spec/orig/src/false-positive.rtf b/t/recipes/checks/cruft/cruft-gfdl-invariants/build-spec/orig/src/false-positive.rtf new file mode 100644 index 0000000..19560b4 --- /dev/null +++ b/t/recipes/checks/cruft/cruft-gfdl-invariants/build-spec/orig/src/false-positive.rtf @@ -0,0 +1,125 @@ +{\rtf1\ansi\ansicpg1252\cocoartf102{\fonttbl\f2\fnil Bitstream Charter;\f0\fnil Droid Sans Mono;\f1\fnil FreeSans;} +{\colortbl;\red0\green0\blue200;\red0\green0\blue0;\red255\green0\blue0;} +{{\NeXTGraphic iconoGimp3.tif \width1816 \height1309}\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\f0\fs24 \'AC}\f1\fs48 \b\cf1 \'A1Welcome to FisicaLab!\cf0\fs24\b0\cf2 \par +\par +\fs20\i Copyright (C) 2009, 2010, 2012 German A. Arias.\par + Permission is granted to copy, distribute and/or modify this document\par + under the terms of the GNU Free Documentation License, Version 1.3\par + or any later version published by the Free Software Foundation;\par + with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts.\par + A copy of the license is included in the section entitled "GNU\par + Free Documentation License".\fs24\i0 \par +\par +\par +FisicaLab is an educational application to solve physics problems. Its main objective is let the user to focus in physics concepts, leaving aside the mathematical details (FisicaLab take care of them). This allows the user to become familiar with the physical concepts without running the risk of getting lost in mathematical details. And so, when the user gain confidence in applying physical concepts, will be better prepared to solve the problems by hand (with pen and paper). FisicaLab is easy to use and very intuitive. However, in order to take advantage of all its features, we recommend you read first these help files.\par +\par +FisicaLab display to two windows, one named \b Modules and elements\b0 and other named \b Chalkboard\b0 . The first of these windows, contain all modules that can be used to solve problems. These modules are grouped by: kinematics, static, dynamics, ... (see image below). You can select one of these groups with the buttons at the top of the window, marked with (1) in the image. When you leave the mouse\rquote s cursor above one of these buttons, a label with the group name is displayed. The buttons marked with (2) let you select the system of units, SI or English. You can see the modules of the selected group inside the box marked with (3). The tabs marked with (4) let you select one of the available modules. The elements of the selected module are displayed inside the box marked with (5). This elements let you set the problems. Inside the box marked with (6) you can write the element\rquote s data (if any element is selected, this box will be empty).\f2 \par +\par + \cf0\f0{{\NeXTGraphic FisicaLabPanel.jpg \width7680 \height10760}\'AC}\f2\cf2 \par +\pard\ql\pard\tx0\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\ql \par +\f1 The window named \b Chalkboard\b0 (see image below), have at the top two buttons, marked with (7). The button at the left let you solve the problem, and the other is to clean the chalkboard. The black box marked with (8) is the chalkboard, where you add the elements to set the problems. You need keep in mind, although you can\rquote t see, that the chalkboard is a grid formed with cells of 50x50 pixels. By default the chalkboard size is 26x18 cells. In \b Preferences\b0 panel you can change the size to a maximum of 100x100 cells (A greater size than the default could be useful for trusses problems). The text view marked with (9) is where FisicaLab show the answer and messages. The checkbox marked with (10) erase the content of the text view before show the next answer or message. If you want keep the previous content, unselect this checkbox. In this case you can add notes to identify the results of the different problems.\f2 \par +\par +\pard\ql\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql \cf0\f0{{\NeXTGraphic FisicaLabPizarra.jpg \width8540 \height6680}\'AC}\f2\cf2 \par +\pard\ql\pard\tx0\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\ql \par +\par +\f1\fs28\b Handling the elements\f2\fs24\b0 \par + \par +\f1 To add elements at the chalkboard, do a click above the desired element. The mouse\rquote s cursor will become in an open hand, meaning this that we will add an element. Do a click above the chalkboard in the position where you want the element, the mouse\rquote s cursor will back at its original shape. Each time you add a new element, or select one different, a yellow square will be drawn around the current element. The data of the current element are displayed, for its edition, at panel \b Modules and elements\b0 . When you leave the mouse\rquote s cursor above one element in the chalkboard, a label with the element\rquote s data is displayed. In \b Preferences\b0 panel you can configure the font size of these labels.\par +\par +\pard\ql\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql \cf0\f0{{\NeXTGraphic chalkboardProperties.jpg \width9020 \height4600}\'AC}\f1\cf2 \par +\pard\ql\pard\tx0\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\ql \par +If you want move an element, click above it with the \b Control\b0 key pressed, the mouse\rquote s cursor will become in a close hand, meaning this that we are moving an element. Do click in the new position and the mouse\rquote s cursor will back at its original shape. In other hand, if you want delete an element, do click above it with the \b Shift\b0 key pressed.\par +\par +Keep in mind that FisicaLab don\rquote t let you combine elements from different modules. The elements in each module are enough to set a wide variety of problems.\f2 \par +\par +\par +\f1\fs28\b Element data\f2\fs24\b0 \par +\par +\f1 When you select an element in the chalkboard, or add a new element, you will see a table at the bottom of the window \b Modules and elements\b0 . With a double click above any field of the second column, you can write the data. FisicaLab supports scientific notation, to use this use the letter E. For example, to write the number 3.45x10-5, write:\par +\par +\pard\ql\pard\tx0\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\qc 3.45E-5\par +\pard\ql\pard\tx0\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\ql \par +All numerical data must be without spaces. For example, the following numbers are wrong:\par +\par +\pard\ql\pard\tx0\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\qc - 5.3\par +7.8E - 8\par +\pard\ql\pard\tx0\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\ql \par +Also, FisicaLab can use many conversion factors. To use these, add the character @ before the conversion. If you have selected the SI system, FisicaLab assumes that all data are in meters, kg, seconds, etc. With the English system, FisicaLab assumes that all data are in feet, pounds, slugs, seconds, etc. (in the English system the mass must be in slugs). For example, if you want write an speed of 75 km/h, use:\par +\par +\pard\ql\pard\tx0\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\qc 75 @ km/h\par +\pard\ql\pard\tx0\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\ql \par +Here, we have one space before and after the character @, but these are for clarity, and are not required. Each module has its how conversion factors, as you can see in the sections that deal about these. \par +\par +You can use letters or words to represent the unknown data. If, for example, the final velocity is an unknown data, you can represent this like:\par +\par +\pard\ql\pard\tx0\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\qc fv\par +finalv\par +fvel\par +\par +\pard\ql\pard\tx0\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\ql or any other combination. But, we recommend you use letters or words that are related with the unknown data. Also, the conversion factors can be used with the unknown data. For example, if the time is unknown, and you want this in minutes, write something like:\par +\par +\pard\ql\pard\tx0\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\qc t @ min\par +\par +\pard\ql\pard\tx0\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\ql The scientific notation can be used with the unknowns, adding the characters #E at the end of the name. For example, for a coefficient of thermal expansion, that is a small value:\par +\par +\pard\ql\pard\tx0\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\qc coefficient#E\par +\pard\ql\pard\tx0\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\ql \par +Also, this can be used with a conversion factor. For example, for a very long distance that we want in kilometers:\par +\par +\pard\ql\pard\tx0\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\qc distance#E @ km\par +\pard\ql\pard\tx0\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\ql \par +All the conversion factors are available in a contextual menu. After select the row of data where want add the factor, a right mouse click open a context menu with all available factors.\par +\par +\pard\ql\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql \cf0\f0{{\NeXTGraphic menuContextual.jpg \width6120 \height5320}\'AC}\f1\cf2 \par +\pard\ql\pard\tx0\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\ql \par +FisicaLab allows mathematical operations directly on the fields where you enter data. Can be carried out operations of addition (+), subtraction (-), multiplication (*) and division (/). Although not allowed to group operations by parentheses. It also provides some useful functions for certain calculations. These are listed below with its description:\par +\par +\b cos(ang)\tab \tab Calculates the cosine of the sexagesimal angle "ang".\par +sin(ang)\tab \tab Calculates the sine of the sexagesimal angle "ang".\par +tan(ang)\tab \tab Calculates the tangent of the sexagesimal angle "ang".\par +sqrt(x)\tab \tab Calculates the square root of the number "x".\par +hypot(a,b)\tab Calculates the hypotenuse of a right triangle whose legs are "a" and "b".\par +leg(c,a)\tab \tab Calculates the leg of the right triangle whose hypotenuse is "c" and the\par +\tab \tab \tab other leg is "a".\par +rd(m1,m2,d)\tab Calculates the distance of the mass "m1" to the center of mass of the\par +\tab \tab \tab system consisting of the masses "m1" and "m2", which are spaced a\par +\tab \tab \tab distance "d".\b0 \par +\par +The numbers that are passed as parameters to these functions must have consistent units. For example, in the \b hypot()\b0 function both legs must be in the same units, whether centimeters, meters, inches, etc. These functions can be used in operations of addition, subtraction, multiplication and division. In these operations blank spaces are not allowed. Here are some examples:\par +\par +\pard\ql\b\pard\tx0\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\qc 8*cos(34)\par +hypot(4,3)-2\par +rd(3,6,40)*sin(30) @ cm\par +15*8/hypot(13,8)\b0 \par +\pard\ql\pard\tx0\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\ql \par +Once entered the operation, FisicaLab will do the calculation and will write the result in the entry. Note that is possible to apply conversion factors. Although these can also be applied after carrying out the calculation.\par +\par +The fields where you enter angles do not allow the operations and functions described above. This is because these fields have their own operations and functions. For example, FisicaLab allows write the angles as slopes (a/b), and automatically convert this to sexagesimal angles. What is very useful for problems of trusses.\par +\par +\pard\ql\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql \cf0\f0{{\NeXTGraphic angulos.jpg \width5080 \height2660}\'AC}\f1\cf2 \par +\pard\ql\pard\tx0\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\ql \par +For these fields are available two functions that calculates an angle from other relationships. These functions are:\par +\par +\b acos(a/c)\tab Calculates the sexagesimal angle whose cosine is the ratio "a/c".\par +asin(b/c)\tab \tab Calculates the sexagesimal angle whose sine is the ratio "b/c".\b0 \par +\par +If an operation is entered incorrectly, for example if it contains spaces or contains a function with an incorrect number of parameters, FisicaLab will do nothing and will take that string as an unknown.\par +\par +\par +\b Caution:\b0 \cf0\cf3 If, for example, you add a mass conversion factor in a time data, this will cause an error in the solution. And you will not get a message about this error.\cf0\f2\cf2 \par +\par +\par +\f1\fs28\b How it works\f2\fs24\b0 \par +\par +\f1 FisicaLab work over the base of \i number of equations = number of unknown data\i0 . In general you don\rquote t need worry about this. But in some cases you will see the error \b "The system is undetermined"\b0 . This occurs when you write numeric data in a field that must be an unknown data. The examples show this cases.\f2 \par +\par +\par +\f1\fs28\b Messages\f2\fs24\b0 \par +\par +\f1 FisicaLab write a wide variety of messages in the text view when a problem is wrong. However, you always will see a message about the calculation\rquote s status, as you can see in the following image:\par +\par +\pard\ql\f0\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql \cf0{{\NeXTGraphic cinema44.tif \width4760 \height800}\'AC}\f1\cf2 \par +\pard\ql\pard\tx0\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\ql \par +The last line say \b "State = success"\b0 , meaning that the calculation was successful. Any other status different as \i success\i0 , mean that or the set problem don\rquote t have a solution, or an unexpected error occurred.\par +\par +} \ No newline at end of file diff --git a/t/recipes/checks/cruft/cruft-gfdl-invariants/build-spec/orig/src/frontback.html b/t/recipes/checks/cruft/cruft-gfdl-invariants/build-spec/orig/src/frontback.html new file mode 100644 index 0000000..b8e14bc --- /dev/null +++ b/t/recipes/checks/cruft/cruft-gfdl-invariants/build-spec/orig/src/frontback.html @@ -0,0 +1,56 @@ + + +Some title + + + +This is +
      +
      +Copyright © 1988, 1989, 1992, 1993, 1994, 1995, 1996, 1997, +1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, +2010, 2011, 2012 + +

      Permission is granted to copy, distribute and/or modify this document +under the terms of the GNU Free Documentation License, Version 1.3 or +any later version published by the Free Software Foundation; with the +Invariant Sections being “Funding Free Software”, the Front-Cover +Texts being (a) (see below), and with the Back-Cover Texts being (b) +(see below). A copy of the license is included in the section entitled +“GNU Free Documentation License”. + +

      (a) The Front-Cover Text is: + +

      A GNU Manual + +

      (b) The Back-Cover Text is: + +

      You have freedom to copy and modify this GNU Manual, like GNU + software. Copies published raises funds. +

      +
      +
      + + diff --git a/t/recipes/checks/cruft/cruft-gfdl-invariants/build-spec/orig/src/frontback.texi b/t/recipes/checks/cruft/cruft-gfdl-invariants/build-spec/orig/src/frontback.texi new file mode 100644 index 0000000..aa1d8e0 --- /dev/null +++ b/t/recipes/checks/cruft/cruft-gfdl-invariants/build-spec/orig/src/frontback.texi @@ -0,0 +1,7 @@ +Permission is granted to copy, distribute and/or modify this document +under the terms of the GNU Free Documentation License, Version 1.3 or +any later version published by the Free Software Foundation; with no +Invariant Sections, with the Front-Cover Texts being ``A Debian Manual'', +and with the Back-Cover Texts as in (a) below. A copy of the license +is included in the section entitled ``GNU Free Documentation +License''. diff --git a/t/recipes/checks/cruft/cruft-gfdl-invariants/build-spec/orig/src/invariant.txt b/t/recipes/checks/cruft/cruft-gfdl-invariants/build-spec/orig/src/invariant.txt new file mode 100644 index 0000000..e649d17 --- /dev/null +++ b/t/recipes/checks/cruft/cruft-gfdl-invariants/build-spec/orig/src/invariant.txt @@ -0,0 +1,7 @@ +Permission is granted to copy, distribute and/or modify this +document under the terms of the GNU Free Documentation License, +Version 1.3 or any later version published by the Free Software +Foundation; with the Invariant Sections being just "GNU +Manifesto", with no Front-Cover Texts, and with no Back-Cover +Texts. A copy of the license is included in the section +entitled "GNU Free Documentation License". diff --git a/t/recipes/checks/cruft/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/appendix.txt b/t/recipes/checks/cruft/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/appendix.txt new file mode 100644 index 0000000..8883cac --- /dev/null +++ b/t/recipes/checks/cruft/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/appendix.txt @@ -0,0 +1,25 @@ +ADDENDUM: How to use this License for your documents +==================================================== + +To use this License in a document you have written, include a copy of +the License in the document and put the following copyright and license +notices just after the title page: + + Copyright (C) YEAR YOUR NAME. + Permission is granted to copy, distribute and/or modify this document + under the terms of the GNU Free Documentation License, Version 1.3 + or any later version published by the Free Software Foundation; + with no Invariant Sections, no Front-Cover Texts, and no Back-Cover + Texts. A copy of the license is included in the section entitled ``GNU + Free Documentation License''. + + If you have Invariant Sections, Front-Cover Texts and Back-Cover +Texts, replace the "with...Texts." line with this: + + with the Invariant Sections being LIST THEIR TITLES, with + the Front-Cover Texts being LIST, and with the Back-Cover Texts + being LIST. + + If you have Invariant Sections without Cover Texts, or some other +combination of the three, merge those two alternatives to suit the +situation. diff --git a/t/recipes/checks/cruft/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/badpunctuation.txt b/t/recipes/checks/cruft/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/badpunctuation.txt new file mode 100644 index 0000000..fd6ed32 --- /dev/null +++ b/t/recipes/checks/cruft/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/badpunctuation.txt @@ -0,0 +1,8 @@ +No ;after version +Permission is granted to copy, distribute and/or modify this document +under the terms of the GNU Free Documentation License, Version 1.1 +with no Invariant Sections, no Front-Cover Texts and +no Back-Cover Texts; +A copy of the license is included in the section entitled +license GNU Free Documentation License + diff --git a/t/recipes/checks/cruft/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/cflow.texi b/t/recipes/checks/cruft/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/cflow.texi new file mode 100644 index 0000000..2be8767 --- /dev/null +++ b/t/recipes/checks/cruft/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/cflow.texi @@ -0,0 +1,12 @@ +Published by the Free Software Foundation, +51 Franklin Street, Fifth Floor +Boston, MA 02110-1301, USA + +Copyright @copyright{} 2005, 2010, 2014-2016 Sergey Poznyakoff + +Permission is granted to copy, distribute and/or modify this document +under the terms of the GNU Free Documentation License, Version 1.2 or +any later version published by the Free Software Foundation; with no +Invariant Sections, no Front-Cover and Back-Cover texts. A copy of +the license is included in the section entitled ``GNU Free Documentation +License''. diff --git a/t/recipes/checks/cruft/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/citetitle.po b/t/recipes/checks/cruft/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/citetitle.po new file mode 100644 index 0000000..73f9c3a --- /dev/null +++ b/t/recipes/checks/cruft/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/citetitle.po @@ -0,0 +1,16 @@ +#: C/index.docbook:65(legalnotice/para) +msgid "" +"Permission is granted to copy, distribute and/or modify this document under " +"the terms of the GNU Free Documentation License, " +"Version 1.1 or any later version published by the Free Software Foundation " +"with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A " +"copy of the license is included." +msgstr "" +"Das vorliegende Dokument kann gemäß den Bedingungen der GNU Free " +"Documentation License (GFDL), Version 1.1 oder jeder späteren, von der Free " +"Software Foundation veröffentlichten Version ohne unveränderbare Abschnitte " +"sowie ohne Texte auf dem vorderen und hinteren Buchdeckel kopiert, verteilt " +"und/oder modifiziert werden. Eine Kopie der GFDL finden Sie unter diesem " +"Link oder in der mit diesem " +"Handbuch gelieferten Datei COPYING-DOCS." + diff --git a/t/recipes/checks/cruft/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/clisp.txt b/t/recipes/checks/cruft/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/clisp.txt new file mode 100644 index 0000000..d3490c4 --- /dev/null +++ b/t/recipes/checks/cruft/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/clisp.txt @@ -0,0 +1,9 @@ + +Permission is granted to copy, distribute and/or modify this +document under the terms of the GNU Free Documentation License +(FDL), either version 1.2 of the license, +or (at your option) any later version published by the free software +foundation (FSF); with no invariant sections, +with no front-cover text, and with no back-cover texts +A copy of the license is included in the +section entitled "GNU Free Documentation License". \ No newline at end of file diff --git a/t/recipes/checks/cruft/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/clisp.xml b/t/recipes/checks/cruft/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/clisp.xml new file mode 100644 index 0000000..37449fb --- /dev/null +++ b/t/recipes/checks/cruft/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/clisp.xml @@ -0,0 +1,6 @@ + This document documents free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + (&gpl;), either version 2 of the License, or (at your option) any + later version published by the &fsf;. + A copy of the license is included in . + diff --git a/t/recipes/checks/cruft/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/comments.po b/t/recipes/checks/cruft/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/comments.po new file mode 100644 index 0000000..d11e67b --- /dev/null +++ b/t/recipes/checks/cruft/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/comments.po @@ -0,0 +1,9 @@ +# French translation for SANE backend options +# +# Permission is granted to copy, distribute and/or modify this document +# under the terms of the GNU Free Documentation License, Version 1.1 +# or any later version published by the Free Software Foundation; +# with no Invariant Sections, with no Front-Cover Texts, and with +# no Back-Cover. +# A copy of the license is included in the section entitled "GNU +# Free Documentation License". diff --git a/t/recipes/checks/cruft/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/diveintopythonok.html b/t/recipes/checks/cruft/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/diveintopythonok.html new file mode 100644 index 0000000..6ace5df --- /dev/null +++ b/t/recipes/checks/cruft/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/diveintopythonok.html @@ -0,0 +1,12 @@ + + + +
      +

      Permission is granted to copy, distribute, and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation; with no Invariant + Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in Appendix G, GNU Free Documentation License. +

      +

      The example programs in this book are free software; you can redistribute and/or modify them under the terms of the Python license as published by the Python Software Foundation. A copy of the license is included in Appendix H, Python license. +

      +
      + + diff --git a/t/recipes/checks/cruft/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/findsutilsokinlinenewline.c b/t/recipes/checks/cruft/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/findsutilsokinlinenewline.c new file mode 100644 index 0000000..5291fd3 --- /dev/null +++ b/t/recipes/checks/cruft/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/findsutilsokinlinenewline.c @@ -0,0 +1,15 @@ +/* false positive from some package */ + static const char *copy_para[]= + { + "Copyright (C) 1994, 1996, 1998, 2000, 2001, 2003, 2004, 2005, 2006," + ,"2007, 2009, 2010, 2011 Free Software Foundation, Inc." + ,"" + ,"Permission is granted to copy, distribute and/or modify this document" + ,"under the terms of the GNU Free Documentation License, Version 1.3 or" + ,"any later version published by the Free Software Foundation; with no" + ,"Invariant\nSections, with no\nFront-Cover Texts,\nand with no Back-Cover" + ,"Texts. A copy of the license is included in the ``GNU Free" + ,"Documentation License'' file as part of this distribution." + "" + ,NULL + }; diff --git a/t/recipes/checks/cruft/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/findutilsok.c b/t/recipes/checks/cruft/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/findutilsok.c new file mode 100644 index 0000000..23aa0af --- /dev/null +++ b/t/recipes/checks/cruft/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/findutilsok.c @@ -0,0 +1,15 @@ +/* false positive from findutils */ + static const char *copy_para[]= + { + "Copyright (C) 1994, 1996, 1998, 2000, 2001, 2003, 2004, 2005, 2006," + ,"2007, 2009, 2010, 2011 Free Software Foundation, Inc." + ,"" + ,"Permission is granted to copy, distribute and/or modify this document" + ,"under the terms of the GNU Free Documentation License, Version 1.3 or" + ,"any later version published by the Free Software Foundation; with no" + ,"Invariant Sections, with no Front-Cover Texts, and with no Back-Cover" + ,"Texts. A copy of the license is included in the ``GNU Free" + ,"Documentation License'' file as part of this distribution." + "" + ,NULL + }; diff --git a/t/recipes/checks/cruft/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/fonts.html b/t/recipes/checks/cruft/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/fonts.html new file mode 100644 index 0000000..ee27a4f --- /dev/null +++ b/t/recipes/checks/cruft/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/fonts.html @@ -0,0 +1,9 @@ +

      +Permission is granted to copy, distribute +and/or modify this document under the terms +of the GNU Free Documentation License, Version +1.1 or any later version published by the +Free Software Foundation; with the Invariant +Sections being LIST THEIR TITLES, with the +Front-Cover Texts being LIST, and with the +Back-Cover Texts being LIST.

      \ No newline at end of file diff --git a/t/recipes/checks/cruft/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/fontsMX.html b/t/recipes/checks/cruft/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/fontsMX.html new file mode 100644 index 0000000..426c273 --- /dev/null +++ b/t/recipes/checks/cruft/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/fontsMX.html @@ -0,0 +1 @@ +Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in the section entitled GNU Free Documentation License. \ No newline at end of file diff --git a/t/recipes/checks/cruft/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/gfdllicenseexample.html b/t/recipes/checks/cruft/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/gfdllicenseexample.html new file mode 100644 index 0000000..fffca61 --- /dev/null +++ b/t/recipes/checks/cruft/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/gfdllicenseexample.html @@ -0,0 +1,13 @@ + + +false positive found in license text: +
      +Copyright (C)  year  your name.
      +Permission is granted to copy, distribute and/or modify this document
      +under the terms of the GNU Free Documentation License, Version 1.3
      +or any later version published by the Free Software Foundation;
      +with the Invariant Sections being list their titles, with
      +the Front-Cover Texts being list, and with the Back-Cover Texts
      +being list.
      +A copy of the license is included in the section entitled ``GNU Free Documentation License''.
      +
      diff --git a/t/recipes/checks/cruft/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/gfdllicenseexample.texi b/t/recipes/checks/cruft/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/gfdllicenseexample.texi
      new file mode 100644
      index 0000000..fc52ba9
      --- /dev/null
      +++ b/t/recipes/checks/cruft/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/gfdllicenseexample.texi
      @@ -0,0 +1,13 @@
      +false positive found in license text:
      +@smallexample
      +@group
      +  Copyright (C)  @var{year}  @var{your name}.
      +  Permission is granted to copy, distribute and/or modify this document
      +  under the terms of the GNU Free Documentation License, Version 1.3
      +  or any later version published by the Free Software Foundation;
      +  with the Invariant Sections being @var{list their titles}, with the
      +  Front-Cover Texts being @var{list}, and with the Back-Cover Texts being @var{list}.
      +  A copy of the license is included in the section entitled ``GNU
      +  Free Documentation License''.
      +@end group
      +@end smallexample
      diff --git a/t/recipes/checks/cruft/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/gfdllicenseexamplesbr.html b/t/recipes/checks/cruft/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/gfdllicenseexamplesbr.html
      new file mode 100644
      index 0000000..46cbd2f
      --- /dev/null
      +++ b/t/recipes/checks/cruft/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/gfdllicenseexamplesbr.html
      @@ -0,0 +1,13 @@
      +
      +
      +false positive found in license text:
      +
      +Copyright (C)  year  your name.
      +Permission is granted to copy, distribute and/or modify this document
      +under the terms of the GNU Free Documentation License, Version 1.3
      +or any later version published by the Free Software Foundation;
      +with the
      Invariant Sections
      being list their titles, with +the Front-Cover Texts being list, and with the Back-Cover Texts +being list. +A copy of the license is included in the section entitled ``GNU Free Documentation License''. + diff --git a/t/recipes/checks/cruft/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/gfdltexcomments.tex b/t/recipes/checks/cruft/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/gfdltexcomments.tex new file mode 100644 index 0000000..00e496c --- /dev/null +++ b/t/recipes/checks/cruft/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/gfdltexcomments.tex @@ -0,0 +1,7 @@ +% Permission is granted to copy, distribute and/or modify this document +% under the terms of the GNU Free Documentation License, Version 1.1 or +% any later version published by the Free Software Foundation; with no +% Invariant Sections, with no Front-Cover Texts, and with no Back-Cover +% Texts. A copy of the license is included in the section entitled +% ``GNU Free Documentation License.'' +% diff --git a/t/recipes/checks/cruft/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/gnashfalsepositive.html b/t/recipes/checks/cruft/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/gnashfalsepositive.html new file mode 100644 index 0000000..f01cd4c --- /dev/null +++ b/t/recipes/checks/cruft/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/gnashfalsepositive.html @@ -0,0 +1,15 @@ + + +

      + Copyright 2008, Free Software Foundation. +

      + Permission is granted to copy, distribute and/or modify this + document under the terms of the GNU Free Documentation + License, Version 1.1 or any later version published by the + Free Software Foundation; with noInvariant Sections, with no Front-Cover Texts, + and with no Back-Cover + Texts. A copy of the license is included in + the section entitled "GNU Free Documentation License". +

      + + diff --git a/t/recipes/checks/cruft/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/gnashfalsepositive.info b/t/recipes/checks/cruft/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/gnashfalsepositive.info new file mode 100644 index 0000000..cc7a754 --- /dev/null +++ b/t/recipes/checks/cruft/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/gnashfalsepositive.info @@ -0,0 +1,14 @@ +To use this License in a document you have written, include a copy of +the License in the document and put the following copyright and license +notices just after the title page: + +Copyright 2008, Free Software Foundation. + +Permission is granted to copy, distribute and/or modify this +document under the terms of the GNU Free Documentation License, +version 1.1 or any later version published by the Free Software +Foundation; with noInvariant Sections (*note fdl-invariant::), +with no Front-Cover Texts (*note fdl-cover-texts::), and with no +Back-Cover Texts (*note fdl-cover-texts::). A copy of the license +is included in the section entitled "GNU Free Documentation +License". diff --git a/t/recipes/checks/cruft/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/gnashfalsepositive.xml b/t/recipes/checks/cruft/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/gnashfalsepositive.xml new file mode 100644 index 0000000..9e77873 --- /dev/null +++ b/t/recipes/checks/cruft/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/gnashfalsepositive.xml @@ -0,0 +1,15 @@ + + +

      + Copyright 2008, Free Software Foundation. +

      + Permission is granted to copy, distribute and/or modify this + document under the terms of the GNU Free Documentation + License, Version 1.1 or any later version published by the + Free Software Foundation; with noInvariant Sections, with no Front-Cover Texts, + and with no Back-Cover + Texts. A copy of the license is included in + the section entitled "GNU Free Documentation License". +

      + + diff --git a/t/recipes/checks/cruft/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/gtk-doc.po b/t/recipes/checks/cruft/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/gtk-doc.po new file mode 100644 index 0000000..07b3003 --- /dev/null +++ b/t/recipes/checks/cruft/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/gtk-doc.po @@ -0,0 +1,42 @@ +#: C/fdl-appendix.xml:79(sect1/para) +msgid "" +"A <_:quote-1/> is a named appendix or a front-matter section of the <_:" +"link-2/> that deals exclusively with the relationship of the publishers or " +"authors of the Document to the Document's overall subject (or to related " +"matters) and contains nothing that could fall directly within that overall " +"subject. (For example, if the Document is in part a textbook of mathematics, " +"a Secondary Section may not explain any mathematics.) The relationship could " +"be a matter of historical connection with the subject or with related " +"matters, or of legal, commercial, philosophical, ethical or political " +"position regarding them." +msgstr "" +"Une <_:quote-1/> désigne une annexe au <_:link-2/>, ou toute information " +"indiquant les rapports entre l'auteur ou l'éditeur et le sujet (ou tout " +"autre sujet connexe) du Document, sans toutefois être en rapport direct avec " +"le sujet lui-même (par exemple, si le Document est un manuel de " +"mathématiques, une Section secondaire ne traitera d'aucune notion " +"mathématique). Cette section peut contenir des informations relatives à " +"l'historique du Document, des sources documentaires, des dispositions " +"légales, commerciales, philosophiques, ou des positions éthiques ou " +"politiques susceptibles de concerner le sujet traité." + + +#: C/fdl-appendix.xml:632(blockquote/para) +#, fuzzy +msgid "" +"Permission is granted to copy, distribute and/or modify this document under " +"the terms of the GNU Free Documentation License, Version 1.1 or any later " +"version published by the Free Software Foundation; with the <_:link-1/> being " +"LIST THEIR TITLES, with the <_:link-2/> being LIST, and with the <_:link-3/> " +"being LIST. A copy of the license is included in the section entitled <_:" +"quote-4/>." +msgstr "" +"Es wird die Erlaubnis gegeben, dieses Dokument zu kopieren, verteilen und/" +"oder zu verändern unter den Bedingungen der GNU Free Documentation License, " +"Version 1.1 oder einer späteren, von der Free Software Foundation " +"veröffentlichten Version; mit den Unveränderlichen Abschnitten. DEREN TITEL AUFGEZÄHLT sind, mit den " +"Vorderseitentexten, die AUFGEZÄHLT " +"sind, und mit den Rückseitentexten, " +"die AUFGEZÄHLT sind. Eine Kopie dieser Lizenz ist in dem Abschnitt enthalten, " +"der mit GNU Free Documentation License betitelt ist." diff --git a/t/recipes/checks/cruft/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/hyphen-used-as-minus-sign.diff b/t/recipes/checks/cruft/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/hyphen-used-as-minus-sign.diff new file mode 100644 index 0000000..ae8c973 --- /dev/null +++ b/t/recipes/checks/cruft/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/hyphen-used-as-minus-sign.diff @@ -0,0 +1,102 @@ +Description: hyphen-used-as-minus-sign + This manual page seems to contain a hyphen where a minus sign was + intended. +Author: Ruben Molina +Forwarded: no +Last-Update: 2011-06-25 + +Index: kst-2.0.3/src/kst/kst.1.txt +=================================================================== +--- kst-2.0.3.orig/src/kst/kst.1.txt ++++ kst-2.0.3/src/kst/kst.1.txt +@@ -47,7 +47,7 @@ kst may be run entirely from within its + command line arguments are needed. kst has a powerful wizard for + easily setting up new plots. + +-In the second invocation, kst loads pre-saved plot specifications from the ++In the second invocation, kst loads pre\-saved plot specifications from the + file + .I kstfile + and optionally may override some of the settings in that file. +@@ -64,7 +64,7 @@ plot all curves in separate plots + .TP + .B \-a\fR + average frames (simple mean) when plotting with +-.B -s\fR. ++.B \-s\fR. + .TP + .B \-\-A4\fR + use A4 sized paper for printing. Requires +@@ -90,7 +90,7 @@ and instead use + .B \-f\ STARTFRAME\fR + begin plotting at + .I STARTFRAME +-frames into the data. Set to -1 to start at ++frames into the data. Set to \-1 to start at + .I NUMFRAMES + from the end of the data. + .TP +@@ -112,7 +112,7 @@ use US Letter sized paper for printing. + .B \-n\ NUMFRAMES\fR + plot at most + .I NUMFRAMES +-frames of data. Set to -1 to indicate all of the data. ++frames of data. Set to \-1 to indicate all of the data. + .TP + .B \-P\ PLOTNAME\fR + plot all plots in the plot named +@@ -145,7 +145,7 @@ frames when plotting. + .B \-x\ FIELD\fR + use + .I FIELD +-as the X-axis vector. ++as the X\-axis vector. + .TP + .B \-y\ FIELD\fR + plot +@@ -158,30 +158,30 @@ plot + as an image. + .SH EXAMPLES + Plot all data in column 2 from data.dat. +- kst data.dat -y 2 ++ kst data.dat \-y 2 + + Same as above, except only read 20 lines, starting at line 10. +- kst data.dat -f 10 -n 20 -y 2 ++ kst data.dat \-f 10 \-n 20 \-y 2 + + also read col 1. One plot per curve. +- kst data.dat -f 10 -n 20 -y 1 -y 2 ++ kst data.dat \-f 10 \-n 20 \-y 1 \-y 2 + + Read col 1 from data2.dat and col 1 from data.dat +- kst data.dat -f 10 -n 20 -y 2 data2.dat -y 1 ++ kst data.dat \-f 10 \-n 20 \-y 2 data2.dat \-y 1 + + Same as above, except read 40 lines starting at 30 in data2.dat +- kst data.dat -f 10 -n 20 -y 2 data2.dat -f 30 -n 40 -y 1 ++ kst data.dat \-f 10 \-n 20 \-y 2 data2.dat \-f 30 \-n 40 \-y 1 + + Specify the X vector and error bars: + Plot x = col 1 and Y = col 2 and error flags = col 3 from data.dat +- kst data.dat -x 1 -e 3 -y 2 ++ kst data.dat \-x 1 \-e 3 \-y 2 + + Get the X vector from data1.dat, and the Y vector from data2.dat. +- kst data1.dat -x 1 data2.dat -y 1 ++ kst data1.dat \-x 1 data2.dat \-y 1 + + Placement: + Plot column 2 and column 3 in plot P1 and column 4 in plot P2 +- kst data.dat -P P1 -y 2 -y 3 -P P2 -y 4 ++ kst data.dat \-P P1 \-y 2 \-y 3 \-P P2 \-y 4 + .SH BUGS + Please report bugs to either the kst mailing list at + .I kst@kde.org +@@ -198,6 +198,6 @@ Matthew Truch + Permission is granted to copy, distribute and/or modify this document + under the terms of the GNU Free Documentation License, Version 1.2 or + any later version published by the Free Software Foundation; with no ++Invariant Sections, with no Front\-Cover Texts, and with no Back\-Cover + Texts. A copy of the license is included in the `COPYING.DOC' file + as part of the kst distribution. diff --git a/t/recipes/checks/cruft/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/kdoctools/customization/ru/entities/fdl-notice.docbook b/t/recipes/checks/cruft/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/kdoctools/customization/ru/entities/fdl-notice.docbook new file mode 100644 index 0000000..0168da6 --- /dev/null +++ b/t/recipes/checks/cruft/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/kdoctools/customization/ru/entities/fdl-notice.docbook @@ -0,0 +1,6 @@ +Permission is granted to copy, distribute and/or modify this +document under the terms of the GNU Free Documentation License, +Version 1.2 or any later version published by the Free Software +Foundation; with &FDLInvariantSections;, with &FDLFrontCoverText;, and +with &FDLBackCoverText;. A copy of the license is included in . + diff --git a/t/recipes/checks/cruft/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/krusader b/t/recipes/checks/cruft/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/krusader new file mode 100644 index 0000000..96f3be3 --- /dev/null +++ b/t/recipes/checks/cruft/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/krusader @@ -0,0 +1,20 @@ + \ No newline at end of file diff --git a/t/recipes/checks/cruft/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/latexhref.tex b/t/recipes/checks/cruft/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/latexhref.tex new file mode 100644 index 0000000..d082bfc --- /dev/null +++ b/t/recipes/checks/cruft/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/latexhref.tex @@ -0,0 +1,7 @@ +Permission is granted to copy, distribute and/or modify this document +under the terms of the GNU Free Documentation License, Version 1.2 +or any later version published by the +\href{http://www.fsf.org}{Free Software Foundation}; +with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. +A copy of the license is included in the section entitled +``\hyperlink{GFDL_GFDL}{GNU Free Documentation License}''. diff --git a/t/recipes/checks/cruft/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/latexhyperlink.tex b/t/recipes/checks/cruft/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/latexhyperlink.tex new file mode 100644 index 0000000..e193a16 --- /dev/null +++ b/t/recipes/checks/cruft/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/latexhyperlink.tex @@ -0,0 +1,7 @@ +Permission is granted to copy, distribute and/or modify this document +under the terms of the GNU Free Documentation License, Version 1.2 +or any later version published by the +\hyperlink{http://www.fsf.org}{Free Software Foundation}; +with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. +A copy of the license is included in the section entitled +``\hyperlink{GFDL_GFDL}{GNU Free Documentation License}''. diff --git a/t/recipes/checks/cruft/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/latexhyphenslash.tex b/t/recipes/checks/cruft/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/latexhyphenslash.tex new file mode 100644 index 0000000..370ea73 --- /dev/null +++ b/t/recipes/checks/cruft/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/latexhyphenslash.tex @@ -0,0 +1,2 @@ +Copyright @sx(c) YEAR YOUR NAME. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-\/Cover Texts, and no Back-\/Cover Texts. A copy of the license is included in the section entitled \char`\"{}GNU +Free Documentation License\char`\"{}. \ No newline at end of file diff --git a/t/recipes/checks/cruft/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/latexurl.tex b/t/recipes/checks/cruft/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/latexurl.tex new file mode 100644 index 0000000..107d9fb --- /dev/null +++ b/t/recipes/checks/cruft/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/latexurl.tex @@ -0,0 +1,7 @@ +Permission is granted to copy, distribute and/or modify this document +under the terms of the GNU Free Documentation +License\url{http://www.gnu.org/copyleft/fdl.html}, Version 1.1 or any +later version published by the Free Software Foundation; with no +Invariant Sections, with no Front-Cover Texts, and with no Back-Cover +Texts. A copy of the license is included in the chapter entitled "GNU +Free Documentation License". \ No newline at end of file diff --git a/t/recipes/checks/cruft/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/libnss-pgsql.xml b/t/recipes/checks/cruft/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/libnss-pgsql.xml new file mode 100644 index 0000000..8a5eb6e --- /dev/null +++ b/t/recipes/checks/cruft/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/libnss-pgsql.xml @@ -0,0 +1,7 @@ + + Permission is granted to copy, distribute and/or modify this document + under the terms of the GNU Free Documentation License, Version 1.1 or + any later version published by the Free Software Foundation. There + are no invariant sections. A copy of the license is included in the + section entitled "GNU Free Documentation License". + diff --git a/t/recipes/checks/cruft/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/lilypond.texi b/t/recipes/checks/cruft/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/lilypond.texi new file mode 100644 index 0000000..56939ee --- /dev/null +++ b/t/recipes/checks/cruft/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/lilypond.texi @@ -0,0 +1,6 @@ +Permission is granted to copy, distribute and/or modify this document +under the terms of the GNU Free Documentation License, Version 1.1 +or any later version published by the Free Software Foundation; +with no Invariant Sections. +A copy of the license is included in the section entitled ``GNU +Free Documentation License''. diff --git a/t/recipes/checks/cruft/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/lilypond2.txt b/t/recipes/checks/cruft/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/lilypond2.txt new file mode 100644 index 0000000..4e66d64 --- /dev/null +++ b/t/recipes/checks/cruft/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/lilypond2.txt @@ -0,0 +1,19 @@ +Permission is granted to copy, distribute and/or modify the +documentation for GNU LilyPond under the terms of the GNU Free +Documentation License as published by the Free Software Foundation, +either version 1.3, or (at your option) any later version; with no +Invariant Sections, no Front-Cover Texts and no Back-Cover Texts. + +A copy of the license is contained in the file COPYING.FDL. + +The following exceptions apply: + + * It does not apply to input files (contained in the + directory tree Documentation/snippets/); these are in + the public domain. + + * It does not apply to any manual which explicitly states + another license. + + * It does not apply to the MusicXML unit test suite, + which is licensed under the MIT license. diff --git a/t/recipes/checks/cruft/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/mailutils.texi b/t/recipes/checks/cruft/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/mailutils.texi new file mode 100644 index 0000000..dffaccc --- /dev/null +++ b/t/recipes/checks/cruft/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/mailutils.texi @@ -0,0 +1,6 @@ +Permission is granted to copy, distribute and/or modify this document +under the terms of the GNU Free Documentation License, Version 1.2 or +any later version published by the Free Software Foundation; with no +Invariant Sections, no Front-Cover, and no Back-Cover texts. +A copy of the license is included in the section entitled ``GNU Free +Documentation License''. diff --git a/t/recipes/checks/cruft/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/maintain.html b/t/recipes/checks/cruft/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/maintain.html new file mode 100644 index 0000000..e1fd5a2 --- /dev/null +++ b/t/recipes/checks/cruft/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/maintain.html @@ -0,0 +1,28 @@ + + +

      Documentation files should have license notices also. Manuals should +use the GNU Free Documentation License. Following is an example of the +license notice to use after the copyright line(s) using all the +features of the GFDL. +

      +
      +
      Permission is granted to copy, distribute and/or modify this document
      +under the terms of the GNU Free Documentation License, Version 1.3 or
      +any later version published by the Free Software Foundation; with the
      +Invariant Sections being ``GNU General Public License'', with the
      +Front-Cover Texts being ``A GNU Manual'', and with the Back-Cover Texts
      +as in (a) below.  A copy of the license is included in the section
      +entitled ``GNU Free Documentation License''.
      +
      +(a) The FSF's Back-Cover Text is: ``You have the freedom to
      +copy and modify this GNU manual.  Buying copies from the FSF
      +supports it in developing GNU and promoting software freedom.''
      +
      + +

      If the FSF does not publish this manual on paper, then omit the last +sentence in (a) that talks about copies from GNU Press. If the FSF is +not the copyright holder, then replace ‘FSF’ with the appropriate +name. +

      + + diff --git a/t/recipes/checks/cruft/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/maintain.texi b/t/recipes/checks/cruft/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/maintain.texi new file mode 100644 index 0000000..633e758 --- /dev/null +++ b/t/recipes/checks/cruft/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/maintain.texi @@ -0,0 +1,13 @@ +Documentation files should have license notices also. Manuals should +use the GNU Free Documentation License. Following is an example of the +license notice to use after the copyright line(s) using all the +features of the GFDL. + +@smallexample +Permission is granted to copy, distribute and/or modify this document +under the terms of the GNU Free Documentation License, Version 1.3 or +any later version published by the Free Software Foundation; with the +Invariant Sections being ``GNU General Public License'', with the +Front-Cover Texts being ``A GNU Manual'', and with the Back-Cover Texts +as in (a) below. A copy of the license is included in the section +entitled ``GNU Free Documentation License''. diff --git a/t/recipes/checks/cruft/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/make-stds.texi b/t/recipes/checks/cruft/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/make-stds.texi new file mode 100644 index 0000000..b5c2685 --- /dev/null +++ b/t/recipes/checks/cruft/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/make-stds.texi @@ -0,0 +1,7 @@ +@c Permission is granted to copy, distribute and/or modify this document +@c under the terms of the GNU Free Documentation License, Version 1.1 +@c or any later version published by the Free Software Foundation; +@c with no Invariant Sections, with no +@c Front-Cover Texts, and with no Back-Cover Texts. +@c A copy of the license is included in the section entitled ``GNU +@c Free Documentation License''. diff --git a/t/recipes/checks/cruft/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/normal.c b/t/recipes/checks/cruft/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/normal.c new file mode 100644 index 0000000..a58e927 --- /dev/null +++ b/t/recipes/checks/cruft/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/normal.c @@ -0,0 +1,13 @@ + /*****************************************************************************/ +/** \mainpage Cal3D API Reference + *
      + *

      + * Permission is granted to copy, distribute and/or modify this document + * under the terms of the GNU Free Documentation License, Version 1.1 or + * any later version published by the Free Software Foundation; + * with no Invariant Sections, no Front-Cover Texts and + * no Back-Cover Texts; + * A copy of the license is included in the section entitled + * \link license "GNU Free Documentation License" \endlink . + *

      + *****************************************************************************/ diff --git a/t/recipes/checks/cruft/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/normal.texi b/t/recipes/checks/cruft/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/normal.texi new file mode 100644 index 0000000..d9c1b54 --- /dev/null +++ b/t/recipes/checks/cruft/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/normal.texi @@ -0,0 +1,6 @@ +Permission is granted to copy, distribute and/or modify this +document under the terms of the GNU Free Documentation License, +version 1.3 or any later version published by the Free Software +Foundation; with no Invariant Sections, no Front-Cover Texts and +no Back-Cover Texts. A copy of the license is included in the +section entitled "GNU Free Documentation License". diff --git a/t/recipes/checks/cruft/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/normalbkchem.texi b/t/recipes/checks/cruft/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/normalbkchem.texi new file mode 100644 index 0000000..dd888e2 --- /dev/null +++ b/t/recipes/checks/cruft/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/normalbkchem.texi @@ -0,0 +1,6 @@ +Permission is granted to copy, distribute and/or modify this +document under the terms of the GNU Free Documentation License, +version 1.3 or any later version published by the Free Software +Foundation; no Invariant Sections, no Front-Cover Texts, +no Back-Cover Texts. A copy of the license is included in the +section entitled "GNU Free Documentation License". diff --git a/t/recipes/checks/cruft/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/normalhtmlcomment.html b/t/recipes/checks/cruft/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/normalhtmlcomment.html new file mode 100644 index 0000000..747d2e0 --- /dev/null +++ b/t/recipes/checks/cruft/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/normalhtmlcomment.html @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/t/recipes/checks/cruft/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/normalmancomment.txt b/t/recipes/checks/cruft/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/normalmancomment.txt new file mode 100644 index 0000000..f33dfcd --- /dev/null +++ b/t/recipes/checks/cruft/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/normalmancomment.txt @@ -0,0 +1,7 @@ +.\" manual page for blaze, a command wrapper for BlazeBlogger +.\" +.\" Permission is granted to copy, distribute and/or modify this document +.\" under the terms of the GNU Free Documentation License, Version 1.3 or +.\" any later version published by the Free Software Foundation; with no +.\" Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. +.\" A copy of the license is included below. \ No newline at end of file diff --git a/t/recipes/checks/cruft/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/normalwithbreakathyphen.texi b/t/recipes/checks/cruft/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/normalwithbreakathyphen.texi new file mode 100644 index 0000000..22ae575 --- /dev/null +++ b/t/recipes/checks/cruft/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/normalwithbreakathyphen.texi @@ -0,0 +1,8 @@ +Permission is granted to copy, distribute and/or modify this +document under the terms of the GNU Free Documentation License, +version 1.3 or any later version published by the Free Software +Foundation; with no Invariant Sections, no Front- +Cover Texts and +no Back- +Cover Texts. A copy of the license is included in the +section entitled "GNU Free Documentation License". diff --git a/t/recipes/checks/cruft/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/oidentd.8 b/t/recipes/checks/cruft/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/oidentd.8 new file mode 100644 index 0000000..5a4df93 --- /dev/null +++ b/t/recipes/checks/cruft/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/oidentd.8 @@ -0,0 +1,9 @@ +.\" Copyright (C) XXX +.\" +.\" Permission is granted to copy, distribute and/or modify this document +.\" under the terms of the GNU Free Documentation License, Version 1.1 +.\" or any later version published by the Free Software Foundation; +.\" with the Invariant Sections being no invariant sections, with the +.\" Front-Cover Texts being no front-cover texts, and with the Back-Cover +.\" Texts being no back-cover texts. A copy of the license is included with +.\" this package in the file "COPYING.DOC." \ No newline at end of file diff --git a/t/recipes/checks/cruft/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/opentoken.txt b/t/recipes/checks/cruft/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/opentoken.txt new file mode 100644 index 0000000..3241276 --- /dev/null +++ b/t/recipes/checks/cruft/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/opentoken.txt @@ -0,0 +1,5 @@ +Permission is granted to copy, distribute and/or modify this document +under the terms of the GNU Free Documentation License, Version 1.3 or +any later version published by the Free Software Foundation; with no +Invariant Sections, Front-Cover or Back-Cover texts. A copy of the license +is included in the section entitled ``GNU Free Documentation License''. \ No newline at end of file diff --git a/t/recipes/checks/cruft/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/parsewiki.txt b/t/recipes/checks/cruft/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/parsewiki.txt new file mode 100644 index 0000000..950d936 --- /dev/null +++ b/t/recipes/checks/cruft/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/parsewiki.txt @@ -0,0 +1,4 @@ +Permission is granted to copy, distribute and/or modify this document under \ +the terms of the GNU Free Documentation License, Version 1.1 or any later \ +version published by the Free Software Foundation; without any Invariant \ +Sections. A copy of the license is included in the file GFDL. diff --git a/t/recipes/checks/cruft/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/partedvariant.txt b/t/recipes/checks/cruft/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/partedvariant.txt new file mode 100644 index 0000000..96037ac --- /dev/null +++ b/t/recipes/checks/cruft/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/partedvariant.txt @@ -0,0 +1,8 @@ +Parted 2.13 version with strange grammar. + +Permission is granted to copy, distribute and/or modify this document +under the terms of the GNU Free Documentation License, Version 1.3 +or any later version published by the Free Software Foundation; +with the no Invariant Sections, with the no Front-Cover Texts, and +with no Back-Cover Texts. A copy of the license is included in the +file, COPYING.DOC. diff --git a/t/recipes/checks/cruft/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/partialtranslation.po b/t/recipes/checks/cruft/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/partialtranslation.po new file mode 100644 index 0000000..f1d17a5 --- /dev/null +++ b/t/recipes/checks/cruft/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/partialtranslation.po @@ -0,0 +1,15 @@ +För att använda GNU Free Documentation License för ett dokument du har skrivit, inkludera en kopia av licensen [det engelska originalet] i dokumentet och placera följande copyrightklausul omedelbart efter titelsidan: + +
      + + Permission is granted to copy, distribute and/or modify this + document under the terms of the GNU Free Documentation + License, Version 1.1 or any later version published by the + Free Software Foundation; with the Invariant Sections being LIST + THEIR TITLES, with the Front-Cover Texts being LIST, + and with the Back-Cover + Texts being LIST. A copy of the license is included in + the section entitled GNU Free Documentation + License. + +
      diff --git a/t/recipes/checks/cruft/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/patch-R.diff b/t/recipes/checks/cruft/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/patch-R.diff new file mode 100644 index 0000000..73e379b --- /dev/null +++ b/t/recipes/checks/cruft/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/patch-R.diff @@ -0,0 +1,7 @@ +1,6d0 +< Permission is granted to copy, distribute and/or modify this +< document under the terms of the GNU Free Documentation License, +< version 1.3 or any later version published by the Free Software +< Foundation; with no Invariant Sections, no Front-Cover Texts and +< no Back-Cover Texts. A copy of the license is included in the +< section entitled "GNU Free Documentation License". diff --git a/t/recipes/checks/cruft/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/patch-c0.diff b/t/recipes/checks/cruft/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/patch-c0.diff new file mode 100644 index 0000000..600653e --- /dev/null +++ b/t/recipes/checks/cruft/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/patch-c0.diff @@ -0,0 +1,18 @@ +*** make-stds.texi 2013-02-17 21:44:05.485250349 +0100 +--- normal.texi 2012-12-20 21:23:22.829397718 +0100 +*************** +*** 1,7 **** +! @c Permission is granted to copy, distribute and/or modify this document +! @c under the terms of the GNU Free Documentation License, Version 1.1 +! @c or any later version published by the Free Software Foundation; +! @c with no Invariant Sections, with no +! @c Front-Cover Texts, and with no Back-Cover Texts. +! @c A copy of the license is included in the section entitled ``GNU +! @c Free Documentation License''. +--- 1,6 ---- +! Permission is granted to copy, distribute and/or modify this +! document under the terms of the GNU Free Documentation License, +! version 1.3 or any later version published by the Free Software +! Foundation; with no Invariant Sections, no Front-Cover Texts and +! no Back-Cover Texts. A copy of the license is included in the +! section entitled "GNU Free Documentation License". diff --git a/t/recipes/checks/cruft/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/patch-u.diff b/t/recipes/checks/cruft/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/patch-u.diff new file mode 100644 index 0000000..db6e4f9 --- /dev/null +++ b/t/recipes/checks/cruft/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/patch-u.diff @@ -0,0 +1,9 @@ +--- /dev/null 2013-05-15 23:18:30.206386135 +0200 ++++ normal.texi 2012-12-20 21:23:22.829397718 +0100 +@@ -0,0 +1,6 @@ ++Permission is granted to copy, distribute and/or modify this ++document under the terms of the GNU Free Documentation License, ++version 1.3 or any later version published by the Free Software ++Foundation; with no Invariant Sections, no Front-Cover Texts and ++no Back-Cover Texts. A copy of the license is included in the ++section entitled "GNU Free Documentation License". diff --git a/t/recipes/checks/cruft/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/patch-uR.diff b/t/recipes/checks/cruft/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/patch-uR.diff new file mode 100644 index 0000000..347adff --- /dev/null +++ b/t/recipes/checks/cruft/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/patch-uR.diff @@ -0,0 +1,9 @@ +--- normal.texi 2012-12-20 21:23:22.829397718 +0100 ++++ /dev/null 2013-05-15 23:18:30.206386135 +0200 +@@ -1,6 +0,0 @@ +-Permission is granted to copy, distribute and/or modify this +-document under the terms of the GNU Free Documentation License, +-version 1.3 or any later version published by the Free Software +-Foundation; with no Invariant Sections, no Front-Cover Texts and +-no Back-Cover Texts. A copy of the license is included in the +-section entitled "GNU Free Documentation License". diff --git a/t/recipes/checks/cruft/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/patch.diff b/t/recipes/checks/cruft/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/patch.diff new file mode 100644 index 0000000..f64bfaf --- /dev/null +++ b/t/recipes/checks/cruft/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/patch.diff @@ -0,0 +1,7 @@ +0a1,6 +> Permission is granted to copy, distribute and/or modify this +> document under the terms of the GNU Free Documentation License, +> version 1.3 or any later version published by the Free Software +> Foundation; with no Invariant Sections, no Front-Cover Texts and +> no Back-Cover Texts. A copy of the license is included in the +> section entitled "GNU Free Documentation License". diff --git a/t/recipes/checks/cruft/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/php-elisp.texi b/t/recipes/checks/cruft/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/php-elisp.texi new file mode 100644 index 0000000..2ab3103 --- /dev/null +++ b/t/recipes/checks/cruft/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/php-elisp.texi @@ -0,0 +1,19 @@ +@copying +This manual documents PHP mode version @value{version} for +use with GNU Emacs. + +Copyright @copyright{} 2008 Aaron S. Hawley + +@quotation +Permission is granted to copy, distribute and/or modify this +document under the terms of the GNU Free Documentation +License, Version 1.2 or any later version published by the +Free Software Foundation; with no Invariant Sections, and no +Cover Texts. A copy of the license is included in the +section entitled ``Copying This Manual.'' + +A copy of the license is also available from the Free +Software Foundation Web site at +@url{http://www.gnu.org/licenses/fdl.html}. + +@end quotation \ No newline at end of file diff --git a/t/recipes/checks/cruft/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/pipeindent.txt b/t/recipes/checks/cruft/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/pipeindent.txt new file mode 100644 index 0000000..8a0594a --- /dev/null +++ b/t/recipes/checks/cruft/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/pipeindent.txt @@ -0,0 +1,7 @@ +Some user ident with pipe (|) + | Permission is granted to copy, distribute and/or modify this + | document under the terms of the GNU Free Documentation License, + | version 1.3 or any later version published by the Free Software + | Foundation; with no Invariant Sections, no Front-Cover Texts and + | no Back-Cover Texts. A copy of the license is included in the + | section entitled "GNU Free Documentation License". diff --git a/t/recipes/checks/cruft/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/quotes.xml b/t/recipes/checks/cruft/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/quotes.xml new file mode 100644 index 0000000..58edd5b --- /dev/null +++ b/t/recipes/checks/cruft/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/quotes.xml @@ -0,0 +1,8 @@ +Permission is granted to copy, distribute and/or modify this +document under the terms of the GNU Free Documentation +License, Version 1.2 or any later version published by the +Free Software Foundation; with no Invariant Sections, no +Front-Cover Texts, and no Back-Cover Texts. +A copy of the license +is included in the section entitled "GNU Free Documentation +License". \ No newline at end of file diff --git a/t/recipes/checks/cruft/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/quoteswithasdefined.xml b/t/recipes/checks/cruft/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/quoteswithasdefined.xml new file mode 100644 index 0000000..112c734 --- /dev/null +++ b/t/recipes/checks/cruft/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/quoteswithasdefined.xml @@ -0,0 +1,9 @@ +Permission is granted to copy, distribute and/or modify this +document under the terms of the GNU Free Documentation +License, Version 1.2 or any later version published by the +Free Software Foundation; +with no invariant sections, front-cover texts or back-cover texts, +each as defined in the license. +A copy of the license +is included in the section entitled "GNU Free Documentation +License". \ No newline at end of file diff --git a/t/recipes/checks/cruft/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/sdlbasic.html b/t/recipes/checks/cruft/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/sdlbasic.html new file mode 100644 index 0000000..ff31741 --- /dev/null +++ b/t/recipes/checks/cruft/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/sdlbasic.html @@ -0,0 +1,11 @@ +
      +Permission is granted to copy, distribute +and/or modify this document under the terms of the GNU Free +Documentation License, Version 1.2 or any later version published by +the Free Software Foundation; with no Invariant Sections Texts.
      + + +A copy of the license is included here below.
      + + +
      diff --git a/t/recipes/checks/cruft/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/smbc.texi b/t/recipes/checks/cruft/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/smbc.texi new file mode 100644 index 0000000..c803dc5 --- /dev/null +++ b/t/recipes/checks/cruft/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/smbc.texi @@ -0,0 +1,9 @@ +@quotation +Permission is granted to copy, distribute and/or modify this document +under the terms of the GNU Free Documentation License, Version 1.1 or +any later version published by the Free Software Foundation; with the +Invariant Sections being ``GNU General Public License'' and ``GNU Free +Documentation License'', with no Front-Cover Texts, and with no +Back-Cover Texts. A copy of the license is included in the section +entitled ``GNU Free Documentation License''. +@end quotation \ No newline at end of file diff --git a/t/recipes/checks/cruft/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/soundjuicer.po b/t/recipes/checks/cruft/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/soundjuicer.po new file mode 100644 index 0000000..e0a41a6 --- /dev/null +++ b/t/recipes/checks/cruft/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/soundjuicer.po @@ -0,0 +1,8 @@ +#~ "Permission is granted to copy, distribute and/or modify this document " +#~ "under the terms of the GNU Free Documentation License, Version 1.1 or any " +#~ "later version published by the Free Software Foundation; with the Invariant Sections being LIST THEIR " +#~ "TITLES, with the Front-Cover Texts being LIST, and with the Back-" +#~ "Cover Texts being LIST. A copy of the license is included in the " +#~ "section entitled GNU Free Documentation License." \ No newline at end of file diff --git a/t/recipes/checks/cruft/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/texignu.texi b/t/recipes/checks/cruft/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/texignu.texi new file mode 100644 index 0000000..9327024 --- /dev/null +++ b/t/recipes/checks/cruft/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/texignu.texi @@ -0,0 +1,6 @@ +Permission is granted to copy, distribute and/or modify this document +under the terms of the @acronym{GNU} Free Documentation License, +Version 1.3 or any later version published by the Free Software +Foundation; with no Invariant Sections, with no Front-Cover texts +and with no Back-Cover Texts. A copy of the license is included in the section entitled +``@acronym{GNU} Free Documentation License.'' diff --git a/t/recipes/checks/cruft/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/texlive.tex b/t/recipes/checks/cruft/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/texlive.tex new file mode 100644 index 0000000..b6e1240 --- /dev/null +++ b/t/recipes/checks/cruft/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/texlive.tex @@ -0,0 +1,8 @@ +% note the end is not classical... +% Copyright (c) 2002--2004 Philipp Lehman +% Permission is granted to copy, distribute and/or modify this document under +% the terms of the GNU Free Documentation License, version 1.2, with no +% invariant sections, with no front-cover texts, and no back-cover texts. This +% document is distributed in the hope that it will be useful, but without any +% warranty; without even the implied warranty of merchantability or fitness for +% a particular purpose. diff --git a/t/recipes/checks/cruft/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/texlivefont.tex b/t/recipes/checks/cruft/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/texlivefont.tex new file mode 100644 index 0000000..d4b872c --- /dev/null +++ b/t/recipes/checks/cruft/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/texlivefont.tex @@ -0,0 +1,6 @@ +Copyright 2002--2004 Philipp Lehman + +Permission is granted to copy, distribute and\slash or modify this document under the terms of the GNU Free Documentation License, version 1.2, with no invariant sections, no front-cover texts, and no back-cover texts. + +A copy of the license is included in the appendix. + diff --git a/t/recipes/checks/cruft/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/tla.txt b/t/recipes/checks/cruft/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/tla.txt new file mode 100644 index 0000000..2043b26 --- /dev/null +++ b/t/recipes/checks/cruft/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/tla.txt @@ -0,0 +1,21 @@ +/* + * :permissions ("Permission is granted to copy, distribute and/or modify this document" + * "under the terms of the GNU Free Documentation License, Version 1.1" + * "or any later version published by the Free Software Foundation;" + * "with the Invariant Sections being:" + * "" + * " The GNU General Public License" + * " The GNU Free Documentation License" + * "" + * "with the Front-Cover Texts being" + * "" + * " (none)," + * "" + * "and with the Back-Cover Texts being" + * "" + * " (none)." + * "" + * "A copy of the license is included in the section entitled \"GNU" + * "Free Documentation License\".")) + * + */ \ No newline at end of file diff --git a/t/recipes/checks/cruft/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/ulink.xml b/t/recipes/checks/cruft/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/ulink.xml new file mode 100644 index 0000000..6f634a6 --- /dev/null +++ b/t/recipes/checks/cruft/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/ulink.xml @@ -0,0 +1,7 @@ +Permission is granted to copy, distribute and/or modify this +document under the terms of the GNU Free Documentation +License, Version 1.2 or any later version published by the +Free Software Foundation; with no Invariant Sections, no +Front-Cover Texts, and no Back-Cover Texts. A copy of the license +is included in the section entitled "GNU Free Documentation +License". \ No newline at end of file diff --git a/t/recipes/checks/cruft/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/variantdictfold.txt b/t/recipes/checks/cruft/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/variantdictfold.txt new file mode 100644 index 0000000..8463a59 --- /dev/null +++ b/t/recipes/checks/cruft/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/variantdictfold.txt @@ -0,0 +1,7 @@ +This is ok + Permission is granted to copy, distribute and/or modify this + document under the terms of the GNU Free Documentation + License, Version 1.1 or any later version published by the + Free Software Foundation; with no Invariant Sections, Front- + or Back-Cover Texts. A copy of the license is included in the + section entitled "{GNU Free Documentation License}". diff --git a/t/recipes/checks/cruft/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/zeroisnotplural.texi b/t/recipes/checks/cruft/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/zeroisnotplural.texi new file mode 100644 index 0000000..8782eed --- /dev/null +++ b/t/recipes/checks/cruft/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/zeroisnotplural.texi @@ -0,0 +1,6 @@ +Permission is granted to copy, distribute and/or modify this +document under the terms of the GNU Free Documentation License, +version 1.3 or any later version published by the Free Software +Foundation; with no Invariant Section, no Front-Cover Text and +no Back-Cover Text. A copy of the license is included in the +section entitled "GNU Free Documentation License". diff --git a/t/recipes/checks/cruft/cruft-gfdl-invariants/build-spec/orig/src/oldmanpagesgfdlproblem.1 b/t/recipes/checks/cruft/cruft-gfdl-invariants/build-spec/orig/src/oldmanpagesgfdlproblem.1 new file mode 100644 index 0000000..83a4acf --- /dev/null +++ b/t/recipes/checks/cruft/cruft-gfdl-invariants/build-spec/orig/src/oldmanpagesgfdlproblem.1 @@ -0,0 +1,12 @@ +.\" +.\" Manpage example +.\" +.PP +Permission is granted to copy, distribute and/or modify this document +under the terms of the \s-1GNU\s0 Free Documentation License, Version 1.2 or +any later version published by the Free Software Foundation; with the +Invariant Sections being \*(L"\s-1GNU\s0 General Public License\*(R" and \*(L"Funding +Free Software\*(R", the Front-Cover texts being (a) (see below), and with +the Back-Cover Texts being (b) (see below). A copy of the license is +included in the \fIgfdl\fR\|(7) man page. +.PP diff --git a/t/recipes/checks/cruft/cruft-gfdl-invariants/eval/desc b/t/recipes/checks/cruft/cruft-gfdl-invariants/eval/desc new file mode 100644 index 0000000..608adb5 --- /dev/null +++ b/t/recipes/checks/cruft/cruft-gfdl-invariants/eval/desc @@ -0,0 +1,2 @@ +Testname: cruft-gfdl-invariants +Check: cruft diff --git a/t/recipes/checks/cruft/cruft-gfdl-invariants/eval/hints b/t/recipes/checks/cruft/cruft-gfdl-invariants/eval/hints new file mode 100644 index 0000000..22e8bd3 --- /dev/null +++ b/t/recipes/checks/cruft/cruft-gfdl-invariants/eval/hints @@ -0,0 +1,37 @@ +cruft-gfdl-invariants (source): license-problem-gfdl-non-official-text invariant part is: without any invariant sections [src/oldfalsepositive/parsewiki.txt] +cruft-gfdl-invariants (source): license-problem-gfdl-non-official-text invariant part is: with the no invariant sections, with the no front-cover texts, and with no back-cover texts [src/oldfalsepositive/partedvariant.txt] +cruft-gfdl-invariants (source): license-problem-gfdl-non-official-text invariant part is: with the invariant sections being no invariant sections, with the front-cover texts being no front-cover texts, and with the back-cover texts being no back-cover texts [src/oldfalsepositive/oidentd.8] +cruft-gfdl-invariants (source): license-problem-gfdl-non-official-text invariant part is: with the front-cover texts being (none) and with the back-cover texts being (none) [src/oldfalsepositive/tla.txt] +cruft-gfdl-invariants (source): license-problem-gfdl-non-official-text invariant part is: with noinvariant sections , with no front-cover texts , and with no back-cover texts [src/oldfalsepositive/gnashfalsepositive.info] +cruft-gfdl-invariants (source): license-problem-gfdl-non-official-text invariant part is: with no invariant sections, with no front-cover texts, and with no back-cover texts [src/oldfalsepositive/patch-c0.diff] +cruft-gfdl-invariants (source): license-problem-gfdl-non-official-text invariant part is: with no invariant sections, with no front-cover texts, and with no back-cover texts [src/oldfalsepositive/make-stds.texi] +cruft-gfdl-invariants (source): license-problem-gfdl-non-official-text invariant part is: with no invariant sections, with no front-cover texts, and with no back-cover texts [src/oldfalsepositive/latexurl.tex] +cruft-gfdl-invariants (source): license-problem-gfdl-non-official-text invariant part is: with no invariant sections, with no front-cover texts, and with no back-cover texts [src/oldfalsepositive/hyphen-used-as-minus-sign.diff] +cruft-gfdl-invariants (source): license-problem-gfdl-non-official-text invariant part is: with no invariant sections, with no front-cover texts, and with no back-cover texts [src/oldfalsepositive/gfdltexcomments.tex] +cruft-gfdl-invariants (source): license-problem-gfdl-non-official-text invariant part is: with no invariant sections, with no front-cover texts, and with no back-cover texts [src/oldfalsepositive/findutilsok.c] +cruft-gfdl-invariants (source): license-problem-gfdl-non-official-text invariant part is: with no invariant sections, with no front-cover texts, and with no back-cover texts [src/oldfalsepositive/findsutilsokinlinenewline.c] +cruft-gfdl-invariants (source): license-problem-gfdl-non-official-text invariant part is: with no invariant sections, with no front-cover texts, and with no back-cover [src/oldfalsepositive/comments.po] +cruft-gfdl-invariants (source): license-problem-gfdl-non-official-text invariant part is: with no invariant sections, with no front-cover texts, and no back-cover texts [src/oldfalsepositive/texlive.tex] +cruft-gfdl-invariants (source): license-problem-gfdl-non-official-text invariant part is: with no invariant sections, with no front-cover texts and with no back-cover texts [src/oldfalsepositive/texignu.texi] +cruft-gfdl-invariants (source): license-problem-gfdl-non-official-text invariant part is: with no invariant sections, with no front-cover text, and with no back-cover texts [src/oldfalsepositive/clisp.txt] +cruft-gfdl-invariants (source): license-problem-gfdl-non-official-text invariant part is: with no invariant sections, no front-cover, and no back-cover texts [src/oldfalsepositive/mailutils.texi] +cruft-gfdl-invariants (source): license-problem-gfdl-non-official-text invariant part is: with no invariant sections, no front-cover and back-cover texts [src/oldfalsepositive/cflow.texi] +cruft-gfdl-invariants (source): license-problem-gfdl-non-official-text invariant part is: with no invariant sections, front-cover or back-cover texts [src/oldfalsepositive/opentoken.txt] +cruft-gfdl-invariants (source): license-problem-gfdl-non-official-text invariant part is: with no invariant sections, front- or back-cover texts [src/oldfalsepositive/variantdictfold.txt] +cruft-gfdl-invariants (source): license-problem-gfdl-non-official-text invariant part is: with no invariant sections, and no cover texts [src/oldfalsepositive/php-elisp.texi] +cruft-gfdl-invariants (source): license-problem-gfdl-non-official-text invariant part is: with no invariant sections texts [src/oldfalsepositive/sdlbasic.html] +cruft-gfdl-invariants (source): license-problem-gfdl-non-official-text invariant part is: with no invariant sections [src/oldfalsepositive/lilypond.texi] +cruft-gfdl-invariants (source): license-problem-gfdl-non-official-text invariant part is: with no invariant sections , with no front-cover texts , and with no back-cover texts [src/oldfalsepositive/gnashfalsepositive.xml] +cruft-gfdl-invariants (source): license-problem-gfdl-non-official-text invariant part is: with no invariant sections , with no front-cover texts , and with no back-cover texts [src/oldfalsepositive/gnashfalsepositive.html] +cruft-gfdl-invariants (source): license-problem-gfdl-non-official-text invariant part is: with no invariant sections , front-cover texts or back-cover texts , each as defined in the license [src/oldfalsepositive/quoteswithasdefined.xml] +cruft-gfdl-invariants (source): license-problem-gfdl-non-official-text invariant part is: with no invariant section, no front-cover text and no back-cover text [src/oldfalsepositive/zeroisnotplural.texi] +cruft-gfdl-invariants (source): license-problem-gfdl-non-official-text invariant part is: with no front-cover texts, and with no back-cover texts [src/oldfalsepositive/smbc.texi] +cruft-gfdl-invariants (source): license-problem-gfdl-non-official-text invariant part is: there are no invariant sections [src/oldfalsepositive/libnss-pgsql.xml] +cruft-gfdl-invariants (source): license-problem-gfdl-non-official-text invariant part is: no invariant sections, no front-cover texts, no back-cover texts [src/oldfalsepositive/normalbkchem.texi] +cruft-gfdl-invariants (source): license-problem-gfdl-invariants-empty [src/emptybis.texi] +cruft-gfdl-invariants (source): license-problem-gfdl-invariants-empty [src/empty.texi] +cruft-gfdl-invariants (source): license-problem-gfdl-invariants invariant part is: with the invariant sections being just gnu manifesto with no front-cover texts, and with no back-cover texts [src/invariant.txt] +cruft-gfdl-invariants (source): license-problem-gfdl-invariants invariant part is: with the invariant sections being funding free software the front-cover texts being (a) (see below), and with the back-cover texts being (b) (see below) [src/frontback.html] +cruft-gfdl-invariants (source): license-problem-gfdl-invariants invariant part is: with the invariant sections being (l gnu general public license (r and (l funding free software (r the front-cover texts being (a) (see below), and with the back-cover texts being (b) (see below) [src/oldmanpagesgfdlproblem.1] +cruft-gfdl-invariants (source): license-problem-gfdl-invariants invariant part is: with no invariant sections, with the front-cover texts being a gnu manual, and with the back-cover texts as in (a) below [src/autoconf.texi] +cruft-gfdl-invariants (source): license-problem-gfdl-invariants invariant part is: with no invariant sections, with the front-cover texts being a debian manual , and with the back-cover texts as in (a) below [src/frontback.texi] diff --git a/t/recipes/checks/cruft/cruft-minified-js/build-spec/debian/install b/t/recipes/checks/cruft/cruft-minified-js/build-spec/debian/install new file mode 100644 index 0000000..1b91047 --- /dev/null +++ b/t/recipes/checks/cruft/cruft-minified-js/build-spec/debian/install @@ -0,0 +1 @@ +usr/ diff --git a/t/recipes/checks/cruft/cruft-minified-js/build-spec/debian/missing-sources/json.js b/t/recipes/checks/cruft/cruft-minified-js/build-spec/debian/missing-sources/json.js new file mode 100644 index 0000000..9a338bf --- /dev/null +++ b/t/recipes/checks/cruft/cruft-minified-js/build-spec/debian/missing-sources/json.js @@ -0,0 +1,529 @@ +/* + json.js + 2012-10-08 + + Public Domain + + No warranty expressed or implied. Use at your own risk. + + This file has been superceded by http://www.JSON.org/json2.js + + See http://www.JSON.org/js.html + + This code should be minified before deployment. + See http://javascript.crockford.com/jsmin.html + + USE YOUR OWN COPY. IT IS EXTREMELY UNWISE TO LOAD CODE FROM SERVERS YOU DO + NOT CONTROL. + + This file adds these methods to JavaScript: + + object.toJSONString(whitelist) + This method produce a JSON text from a JavaScript value. + It must not contain any cyclical references. Illegal values + will be excluded. + + The default conversion for dates is to an ISO string. You can + add a toJSONString method to any date object to get a different + representation. + + The object and array methods can take an optional whitelist + argument. A whitelist is an array of strings. If it is provided, + keys in objects not found in the whitelist are excluded. + + string.parseJSON(filter) + This method parses a JSON text to produce an object or + array. It can throw a SyntaxError exception. + + The optional filter parameter is a function which can filter and + transform the results. It receives each of the keys and values, and + its return value is used instead of the original value. If it + returns what it received, then structure is not modified. If it + returns undefined then the member is deleted. + + Example: + + // Parse the text. If a key contains the string 'date' then + // convert the value to a date. + + myData = text.parseJSON(function (key, value) { + return key.indexOf('date') >= 0 ? new Date(value) : value; + }); + + This file will break programs with improper for..in loops. See + http://yuiblog.com/blog/2006/09/26/for-in-intrigue/ + + This file creates a global JSON object containing two methods: stringify + and parse. + + JSON.stringify(value, replacer, space) + value any JavaScript value, usually an object or array. + + replacer an optional parameter that determines how object + values are stringified for objects. It can be a + function or an array of strings. + + space an optional parameter that specifies the indentation + of nested structures. If it is omitted, the text will + be packed without extra whitespace. If it is a number, + it will specify the number of spaces to indent at each + level. If it is a string (such as '\t' or ' '), + it contains the characters used to indent at each level. + + This method produces a JSON text from a JavaScript value. + + When an object value is found, if the object contains a toJSON + method, its toJSON method will be called and the result will be + stringified. A toJSON method does not serialize: it returns the + value represented by the name/value pair that should be serialized, + or undefined if nothing should be serialized. The toJSON method + will be passed the key associated with the value, and this will be + bound to the object holding the key. + + For example, this would serialize Dates as ISO strings. + + Date.prototype.toJSON = function (key) { + function f(n) { + // Format integers to have at least two digits. + return n < 10 ? '0' + n : n; + } + + return this.getUTCFullYear() + '-' + + f(this.getUTCMonth() + 1) + '-' + + f(this.getUTCDate()) + 'T' + + f(this.getUTCHours()) + ':' + + f(this.getUTCMinutes()) + ':' + + f(this.getUTCSeconds()) + 'Z'; + }; + + You can provide an optional replacer method. It will be passed the + key and value of each member, with this bound to the containing + object. The value that is returned from your method will be + serialized. If your method returns undefined, then the member will + be excluded from the serialization. + + If the replacer parameter is an array of strings, then it will be + used to select the members to be serialized. It filters the results + such that only members with keys listed in the replacer array are + stringified. + + Values that do not have JSON representations, such as undefined or + functions, will not be serialized. Such values in objects will be + dropped; in arrays they will be replaced with null. You can use + a replacer function to replace those with JSON values. + JSON.stringify(undefined) returns undefined. + + The optional space parameter produces a stringification of the + value that is filled with line breaks and indentation to make it + easier to read. + + If the space parameter is a non-empty string, then that string will + be used for indentation. If the space parameter is a number, then + the indentation will be that many spaces. + + Example: + + text = JSON.stringify(['e', {pluribus: 'unum'}]); + // text is '["e",{"pluribus":"unum"}]' + + + text = JSON.stringify(['e', {pluribus: 'unum'}], null, '\t'); + // text is '[\n\t"e",\n\t{\n\t\t"pluribus": "unum"\n\t}\n]' + + text = JSON.stringify([new Date()], function (key, value) { + return this[key] instanceof Date ? + 'Date(' + this[key] + ')' : value; + }); + // text is '["Date(---current time---)"]' + + + JSON.parse(text, reviver) + This method parses a JSON text to produce an object or array. + It can throw a SyntaxError exception. + + The optional reviver parameter is a function that can filter and + transform the results. It receives each of the keys and values, + and its return value is used instead of the original value. + If it returns what it received, then the structure is not modified. + If it returns undefined then the member is deleted. + + Example: + + // Parse the text. Values that look like ISO date strings will + // be converted to Date objects. + + myData = JSON.parse(text, function (key, value) { + var a; + if (typeof value === 'string') { + a = +/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2}(?:\.\d*)?)Z$/.exec(value); + if (a) { + return new Date(Date.UTC(+a[1], +a[2] - 1, +a[3], +a[4], + +a[5], +a[6])); + } + } + return value; + }); + + myData = JSON.parse('["Date(09/09/2001)"]', function (key, value) { + var d; + if (typeof value === 'string' && + value.slice(0, 5) === 'Date(' && + value.slice(-1) === ')') { + d = new Date(value.slice(5, -1)); + if (d) { + return d; + } + } + return value; + }); + + + This is a reference implementation. You are free to copy, modify, or + redistribute. +*/ + +/*jslint evil: true, regexp: true, unparam: true */ + +/*members "", "\b", "\t", "\n", "\f", "\r", "\"", JSON, "\\", apply, + call, charCodeAt, getUTCDate, getUTCFullYear, getUTCHours, + getUTCMinutes, getUTCMonth, getUTCSeconds, hasOwnProperty, join, + lastIndex, length, parse, parseJSON, prototype, push, replace, slice, + stringify, test, toJSON, toJSONString, toString, valueOf +*/ + + +// Create a JSON object only if one does not already exist. We create the +// methods in a closure to avoid creating global variables. + +if (typeof JSON !== 'object') { + JSON = {}; +} + +(function () { + 'use strict'; + + function f(n) { + // Format integers to have at least two digits. + return n < 10 ? '0' + n : n; + } + + if (typeof Date.prototype.toJSON !== 'function') { + + Date.prototype.toJSON = function (key) { + + return isFinite(this.valueOf()) ? + this.getUTCFullYear() + '-' + + f(this.getUTCMonth() + 1) + '-' + + f(this.getUTCDate()) + 'T' + + f(this.getUTCHours()) + ':' + + f(this.getUTCMinutes()) + ':' + + f(this.getUTCSeconds()) + 'Z' : null; + }; + + String.prototype.toJSON = + Number.prototype.toJSON = + Boolean.prototype.toJSON = function (key) { + return this.valueOf(); + }; + } + + var cx = /[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g, + escapable = /[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g, + gap, + indent, + meta = { // table of character substitutions + '\b': '\\b', + '\t': '\\t', + '\n': '\\n', + '\f': '\\f', + '\r': '\\r', + '"' : '\\"', + '\\': '\\\\' + }, + rep; + + + function quote(string) { + +// If the string contains no control characters, no quote characters, and no +// backslash characters, then we can safely slap some quotes around it. +// Otherwise we must also replace the offending characters with safe escape +// sequences. + + escapable.lastIndex = 0; + return escapable.test(string) ? '"' + string.replace(escapable, function (a) { + var c = meta[a]; + return typeof c === 'string' ? c : + '\\u' + ('0000' + a.charCodeAt(0).toString(16)).slice(-4); + }) + '"' : '"' + string + '"'; + } + + + function str(key, holder) { + +// Produce a string from holder[key]. + + var i, // The loop counter. + k, // The member key. + v, // The member value. + length, + mind = gap, + partial, + value = holder[key]; + +// If the value has a toJSON method, call it to obtain a replacement value. + + if (value && typeof value === 'object' && + typeof value.toJSON === 'function') { + value = value.toJSON(key); + } + +// If we were called with a replacer function, then call the replacer to +// obtain a replacement value. + + if (typeof rep === 'function') { + value = rep.call(holder, key, value); + } + +// What happens next depends on the value's type. + + switch (typeof value) { + case 'string': + return quote(value); + + case 'number': + +// JSON numbers must be finite. Encode non-finite numbers as null. + + return isFinite(value) ? String(value) : 'null'; + + case 'boolean': + case 'null': + +// If the value is a boolean or null, convert it to a string. Note: +// typeof null does not produce 'null'. The case is included here in +// the remote chance that this gets fixed someday. + + return String(value); + +// If the type is 'object', we might be dealing with an object or an array or +// null. + + case 'object': + +// Due to a specification blunder in ECMAScript, typeof null is 'object', +// so watch out for that case. + + if (!value) { + return 'null'; + } + +// Make an array to hold the partial results of stringifying this object value. + + gap += indent; + partial = []; + +// Is the value an array? + + if (Object.prototype.toString.apply(value) === '[object Array]') { + +// The value is an array. Stringify every element. Use null as a placeholder +// for non-JSON values. + + length = value.length; + for (i = 0; i < length; i += 1) { + partial[i] = str(i, value) || 'null'; + } + +// Join all of the elements together, separated with commas, and wrap them in +// brackets. + + v = partial.length === 0 ? '[]' : gap ? + '[\n' + gap + partial.join(',\n' + gap) + '\n' + mind + ']' : + '[' + partial.join(',') + ']'; + gap = mind; + return v; + } + +// If the replacer is an array, use it to select the members to be stringified. + + if (rep && typeof rep === 'object') { + length = rep.length; + for (i = 0; i < length; i += 1) { + k = rep[i]; + if (typeof k === 'string') { + v = str(k, value); + if (v) { + partial.push(quote(k) + (gap ? ': ' : ':') + v); + } + } + } + } else { + +// Otherwise, iterate through all of the keys in the object. + + for (k in value) { + if (Object.prototype.hasOwnProperty.call(value, k)) { + v = str(k, value); + if (v) { + partial.push(quote(k) + (gap ? ': ' : ':') + v); + } + } + } + } + +// Join all of the member texts together, separated with commas, +// and wrap them in braces. + + v = partial.length === 0 ? '{}' : gap ? + '{\n' + gap + partial.join(',\n' + gap) + '\n' + mind + '}' : + '{' + partial.join(',') + '}'; + gap = mind; + return v; + } + } + +// If the JSON object does not yet have a stringify method, give it one. + + if (typeof JSON.stringify !== 'function') { + JSON.stringify = function (value, replacer, space) { + +// The stringify method takes a value and an optional replacer, and an optional +// space parameter, and returns a JSON text. The replacer can be a function +// that can replace values, or an array of strings that will select the keys. +// A default replacer method can be provided. Use of the space parameter can +// produce text that is more easily readable. + + var i; + gap = ''; + indent = ''; + +// If the space parameter is a number, make an indent string containing that +// many spaces. + + if (typeof space === 'number') { + for (i = 0; i < space; i += 1) { + indent += ' '; + } + +// If the space parameter is a string, it will be used as the indent string. + + } else if (typeof space === 'string') { + indent = space; + } + +// If there is a replacer, it must be a function or an array. +// Otherwise, throw an error. + + rep = replacer; + if (replacer && typeof replacer !== 'function' && + (typeof replacer !== 'object' || + typeof replacer.length !== 'number')) { + throw new Error('JSON.stringify'); + } + +// Make a fake root object containing our value under the key of ''. +// Return the result of stringifying the value. + + return str('', {'': value}); + }; + } + + +// If the JSON object does not yet have a parse method, give it one. + + if (typeof JSON.parse !== 'function') { + JSON.parse = function (text, reviver) { + +// The parse method takes a text and an optional reviver function, and returns +// a JavaScript value if the text is a valid JSON text. + + var j; + + function walk(holder, key) { + +// The walk method is used to recursively walk the resulting structure so +// that modifications can be made. + + var k, v, value = holder[key]; + if (value && typeof value === 'object') { + for (k in value) { + if (Object.prototype.hasOwnProperty.call(value, k)) { + v = walk(value, k); + if (v !== undefined) { + value[k] = v; + } else { + delete value[k]; + } + } + } + } + return reviver.call(holder, key, value); + } + + +// Parsing happens in four stages. In the first stage, we replace certain +// Unicode characters with escape sequences. JavaScript handles many characters +// incorrectly, either silently deleting them, or treating them as line endings. + + text = String(text); + cx.lastIndex = 0; + if (cx.test(text)) { + text = text.replace(cx, function (a) { + return '\\u' + + ('0000' + a.charCodeAt(0).toString(16)).slice(-4); + }); + } + +// In the second stage, we run the text against regular expressions that look +// for non-JSON patterns. We are especially concerned with '()' and 'new' +// because they can cause invocation, and '=' because it can cause mutation. +// But just to be safe, we want to reject all unexpected forms. + +// We split the second stage into 4 regexp operations in order to work around +// crippling inefficiencies in IE's and Safari's regexp engines. First we +// replace the JSON backslash pairs with '@' (a non-JSON character). Second, we +// replace all simple value tokens with ']' characters. Third, we delete all +// open brackets that follow a colon or comma or that begin the text. Finally, +// we look to see that the remaining characters are only whitespace or ']' or +// ',' or ':' or '{' or '}'. If that is so, then the text is safe for eval. + + if (/^[\],:{}\s]*$/ + .test(text.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g, '@') + .replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g, ']') + .replace(/(?:^|:|,)(?:\s*\[)+/g, ''))) { + +// In the third stage we use the eval function to compile the text into a +// JavaScript structure. The '{' operator is subject to a syntactic ambiguity +// in JavaScript: it can begin a block or an object literal. We wrap the text +// in parens to eliminate the ambiguity. + + j = eval('(' + text + ')'); + +// In the optional fourth stage, we recursively walk the new structure, passing +// each name/value pair to a reviver function for possible transformation. + + return typeof reviver === 'function' ? + walk({'': j}, '') : j; + } + +// If the text is not JSON parseable, then a SyntaxError is thrown. + + throw new SyntaxError('JSON.parse'); + }; + } + +// Augment the basic prototypes if they have not already been augmented. +// These forms are obsolete. It is recommended that JSON.stringify and +// JSON.parse be used instead. + + if (!Object.prototype.toJSONString) { + Object.prototype.toJSONString = function (filter) { + return JSON.stringify(this, filter); + }; + Object.prototype.parseJSON = function (filter) { + return JSON.parse(this, filter); + }; + } +}()); diff --git a/t/recipes/checks/cruft/cruft-minified-js/build-spec/debian/missing-sources/subdir.js/source.js b/t/recipes/checks/cruft/cruft-minified-js/build-spec/debian/missing-sources/subdir.js/source.js new file mode 100644 index 0000000..e69de29 diff --git a/t/recipes/checks/cruft/cruft-minified-js/build-spec/fill-values b/t/recipes/checks/cruft/cruft-minified-js/build-spec/fill-values new file mode 100644 index 0000000..5dd0aba --- /dev/null +++ b/t/recipes/checks/cruft/cruft-minified-js/build-spec/fill-values @@ -0,0 +1,4 @@ +Skeleton: upload-native +Testname: cruft-minified-js +Description: Misc errors related to minified javascript +Extra-Build-Depends: uglifyjs diff --git a/t/recipes/checks/cruft/cruft-minified-js/build-spec/orig/deployJava/README b/t/recipes/checks/cruft/cruft-minified-js/build-spec/orig/deployJava/README new file mode 100644 index 0000000..914d120 --- /dev/null +++ b/t/recipes/checks/cruft/cruft-minified-js/build-spec/orig/deployJava/README @@ -0,0 +1 @@ +Here we test deploy java \ No newline at end of file diff --git a/t/recipes/checks/cruft/cruft-minified-js/build-spec/orig/deployJava/deployJava.browser.js b/t/recipes/checks/cruft/cruft-minified-js/build-spec/orig/deployJava/deployJava.browser.js new file mode 100644 index 0000000..aa511b3 --- /dev/null +++ b/t/recipes/checks/cruft/cruft-minified-js/build-spec/orig/deployJava/deployJava.browser.js @@ -0,0 +1,19 @@ +(function(modules, cache, entry) { + req(entry); + function req(name) { + if (cache[name]) return cache[name].exports; + var m = cache[name] = {exports: {}}; + modules[name][0].call(m.exports, modRequire, m, m.exports, window); + return m.exports; + function modRequire(alias) { + var id = modules[name][1][alias]; + if (!id) throw new Error("Cannot find module " + alias); + return req(id); + } + } +})({0: [function(require,module,exports,global){ +var deployJava=function(){}; +/* simulate a long line */ +var longline = 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'; + +}, {}],}, {}, 0); diff --git a/t/recipes/checks/cruft/cruft-minified-js/build-spec/orig/deployJava/deployJava.js b/t/recipes/checks/cruft/cruft-minified-js/build-spec/orig/deployJava/deployJava.js new file mode 100644 index 0000000..2cb2fb3 --- /dev/null +++ b/t/recipes/checks/cruft/cruft-minified-js/build-spec/orig/deployJava/deployJava.js @@ -0,0 +1,3 @@ +var deployJava=function(){}; +/* simulate a long line */ +var longline = 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'; diff --git a/t/recipes/checks/cruft/cruft-minified-js/build-spec/orig/oldfalsepositives/-debug.js/src/test-debug.js b/t/recipes/checks/cruft/cruft-minified-js/build-spec/orig/oldfalsepositives/-debug.js/src/test-debug.js new file mode 100644 index 0000000..4a35a5a --- /dev/null +++ b/t/recipes/checks/cruft/cruft-minified-js/build-spec/orig/oldfalsepositives/-debug.js/src/test-debug.js @@ -0,0 +1 @@ +//the source diff --git a/t/recipes/checks/cruft/cruft-minified-js/build-spec/orig/oldfalsepositives/-debug.js/src/test-min.js b/t/recipes/checks/cruft/cruft-minified-js/build-spec/orig/oldfalsepositives/-debug.js/src/test-min.js new file mode 100644 index 0000000..e1a0655 --- /dev/null +++ b/t/recipes/checks/cruft/cruft-minified-js/build-spec/orig/oldfalsepositives/-debug.js/src/test-min.js @@ -0,0 +1,4 @@ +// a very long javascript yuic compressed +/* simulate a long line */ +var longline = 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'; + diff --git a/t/recipes/checks/cruft/cruft-minified-js/build-spec/orig/oldfalsepositives/-nc.js/test-nc.js b/t/recipes/checks/cruft/cruft-minified-js/build-spec/orig/oldfalsepositives/-nc.js/test-nc.js new file mode 100644 index 0000000..620611a --- /dev/null +++ b/t/recipes/checks/cruft/cruft-minified-js/build-spec/orig/oldfalsepositives/-nc.js/test-nc.js @@ -0,0 +1 @@ +//the source see zoneminder diff --git a/t/recipes/checks/cruft/cruft-minified-js/build-spec/orig/oldfalsepositives/-nc.js/test-yc.js b/t/recipes/checks/cruft/cruft-minified-js/build-spec/orig/oldfalsepositives/-nc.js/test-yc.js new file mode 100644 index 0000000..e1a0655 --- /dev/null +++ b/t/recipes/checks/cruft/cruft-minified-js/build-spec/orig/oldfalsepositives/-nc.js/test-yc.js @@ -0,0 +1,4 @@ +// a very long javascript yuic compressed +/* simulate a long line */ +var longline = 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'; + diff --git a/t/recipes/checks/cruft/cruft-minified-js/build-spec/orig/oldfalsepositives/admin.js b/t/recipes/checks/cruft/cruft-minified-js/build-spec/orig/oldfalsepositives/admin.js new file mode 100644 index 0000000..3fc1fc2 --- /dev/null +++ b/t/recipes/checks/cruft/cruft-minified-js/build-spec/orig/oldfalsepositives/admin.js @@ -0,0 +1 @@ +// this catch missing . in regexp \ No newline at end of file diff --git a/t/recipes/checks/cruft/cruft-minified-js/build-spec/orig/oldfalsepositives/css_browser_selector.js b/t/recipes/checks/cruft/cruft-minified-js/build-spec/orig/oldfalsepositives/css_browser_selector.js new file mode 100644 index 0000000..0668aa7 --- /dev/null +++ b/t/recipes/checks/cruft/cruft-minified-js/build-spec/orig/oldfalsepositives/css_browser_selector.js @@ -0,0 +1,8 @@ +/* +CSS Browser Selector v0.4.0 (Nov 02, 2010) +Rafael Lima (http://rafael.adm.br) +http://rafael.adm.br/css_browser_selector +License: http://creativecommons.org/licenses/by/2.5/ +Contributors: http://rafael.adm.br/css_browser_selector#contributors +*/ +function css_browser_selector(u){var ua=u.toLowerCase(),is=function(t){return ua.indexOf(t)>-1},g='gecko',w='webkit',s='safari',o='opera',m='mobile',h=document.documentElement,b=[(!(/opera|webtv/i.test(ua))&&/msie\s(\d)/.test(ua))?('ie ie'+RegExp.$1):is('firefox/2')?g+' ff2':is('firefox/3.5')?g+' ff3 ff3_5':is('firefox/3.6')?g+' ff3 ff3_6':is('firefox/3')?g+' ff3':is('gecko/')?g:is('opera')?o+(/version\/(\d+)/.test(ua)?' '+o+RegExp.$1:(/opera(\s|\/)(\d+)/.test(ua)?' '+o+RegExp.$2:'')):is('konqueror')?'konqueror':is('blackberry')?m+' blackberry':is('android')?m+' android':is('chrome')?w+' chrome':is('iron')?w+' iron':is('applewebkit/')?w+' '+s+(/version\/(\d+)/.test(ua)?' '+s+RegExp.$1:''):is('mozilla/')?g:'',is('j2me')?m+' j2me':is('iphone')?m+' iphone':is('ipod')?m+' ipod':is('ipad')?m+' ipad':is('mac')?'mac':is('darwin')?'mac':is('webtv')?'webtv':is('win')?'win'+(is('windows nt 6.0')?' vista':''):is('freebsd')?'freebsd':(is('x11')||is('linux'))?'linux':'','js']; c = b.join(' '); h.className += ' '+c; return c;}; css_browser_selector(navigator.userAgent); diff --git a/t/recipes/checks/cruft/cruft-minified-js/build-spec/orig/oldfalsepositives/debug.js/testdebug.debug.js b/t/recipes/checks/cruft/cruft-minified-js/build-spec/orig/oldfalsepositives/debug.js/testdebug.debug.js new file mode 100644 index 0000000..a1c3620 --- /dev/null +++ b/t/recipes/checks/cruft/cruft-minified-js/build-spec/orig/oldfalsepositives/debug.js/testdebug.debug.js @@ -0,0 +1 @@ +//the source found for instance in mono diff --git a/t/recipes/checks/cruft/cruft-minified-js/build-spec/orig/oldfalsepositives/debug.js/testdebug.js b/t/recipes/checks/cruft/cruft-minified-js/build-spec/orig/oldfalsepositives/debug.js/testdebug.js new file mode 100644 index 0000000..fc9eb65 --- /dev/null +++ b/t/recipes/checks/cruft/cruft-minified-js/build-spec/orig/oldfalsepositives/debug.js/testdebug.js @@ -0,0 +1,4 @@ +// a very long javascript yuic compressed +/* simulate a long line */ +var longline = 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'; var second='X'; + diff --git a/t/recipes/checks/cruft/cruft-minified-js/build-spec/orig/oldfalsepositives/deployJava/deployJava.js b/t/recipes/checks/cruft/cruft-minified-js/build-spec/orig/oldfalsepositives/deployJava/deployJava.js new file mode 100644 index 0000000..a0a67e8 --- /dev/null +++ b/t/recipes/checks/cruft/cruft-minified-js/build-spec/orig/oldfalsepositives/deployJava/deployJava.js @@ -0,0 +1,3 @@ +var deployJava=function(){}; +/* simulate a long line */ +var longline = 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'; diff --git a/t/recipes/checks/cruft/cruft-minified-js/build-spec/orig/oldfalsepositives/deployJava/deployJava.txt b/t/recipes/checks/cruft/cruft-minified-js/build-spec/orig/oldfalsepositives/deployJava/deployJava.txt new file mode 100644 index 0000000..a701c9f --- /dev/null +++ b/t/recipes/checks/cruft/cruft-minified-js/build-spec/orig/oldfalsepositives/deployJava/deployJava.txt @@ -0,0 +1 @@ +Here we test if source is available \ No newline at end of file diff --git a/t/recipes/checks/cruft/cruft-minified-js/build-spec/orig/oldfalsepositives/endoflinecomments.js b/t/recipes/checks/cruft/cruft-minified-js/build-spec/orig/oldfalsepositives/endoflinecomments.js new file mode 100644 index 0000000..7ab1dda --- /dev/null +++ b/t/recipes/checks/cruft/cruft-minified-js/build-spec/orig/oldfalsepositives/endoflinecomments.js @@ -0,0 +1,104 @@ +var longlonglong = 5; // comment +var longlonglong = 5; // comment +var longlonglong = 5; // comment +var longlonglong = 5; // comment +var longlonglong = 5; // comment +var longlonglong = 5; // comment +var longlonglong = 5; // comment +var longlonglong = 5; // comment +var longlonglong = 5; // comment +var longlonglong = 5; // comment +var longlonglong = 5; // comment +var longlonglong = 5; // comment +var longlonglong = 5; // comment +var longlonglong = 5; // comment +var longlonglong = 5; // comment +var longlonglong = 5; // comment +var longlonglong = 5; // comment +var longlonglong = 5; // comment +var longlonglong = 5; // comment +var longlonglong = 5; // comment +var longlonglong = 5; // comment +var longlonglong = 5; // comment +var longlonglong = 5; // comment +var longlonglong = 5; // comment +var longlonglong = 5; // comment +var longlonglong = 5; // comment +var longlonglong = 5; // comment +var longlonglong = 5; // comment +var longlonglong = 5; // comment +var longlonglong = 5; // comment +var longlonglong = 5; // comment +var longlonglong = 5; // comment +var longlonglong = 5; // comment +var longlonglong = 5; // comment +var longlonglong = 5; // comment +var longlonglong = 5; // comment +var longlonglong = 5; // comment +var longlonglong = 5; // comment +var longlonglong = 5; // comment +var longlonglong = 5; // comment +var longlonglong = 5; // comment +var longlonglong = 5; // comment +var longlonglong = 5; // comment +var longlonglong = 5; // comment +var longlonglong = 5; // comment +var longlonglong = 5; // comment +var longlonglong = 5; // comment +var longlonglong = 5; // comment +var longlonglong = 5; // comment +var longlonglong = 5; // comment +var longlonglong = 5; // comment +var longlonglong = 5; // comment +var longlonglong = 5; // comment +var longlonglong = 5; // comment +var longlonglong = 5; // comment +var longlonglong = 5; // comment +var longlonglong = 5; // comment +var longlonglong = 5; // comment +var longlonglong = 5; // comment +var longlonglong = 5; // comment +var longlonglong = 5; // comment +var longlonglong = 5; // comment +var longlonglong = 5; // comment +var longlonglong = 5; // comment +var longlonglong = 5; // comment +var longlonglong = 5; // comment +var longlonglong = 5; // comment +var longlonglong = 5; // comment +var longlonglong = 5; // comment +var longlonglong = 5; // comment +var longlonglong = 5; // comment +var longlonglong = 5; // comment +var longlonglong = 5; // comment +var longlonglong = 5; // comment +var longlonglong = 5; // comment +var longlonglong = 5; // comment +var longlonglong = 5; // comment +var longlonglong = 5; // comment +var longlonglong = 5; // comment +var longlonglong = 5; // comment +var longlonglong = 5; // comment +var longlonglong = 5; // comment +var longlonglong = 5; // comment +var longlonglong = 5; // comment +var longlonglong = 5; // comment +var longlonglong = 5; // comment +var longlonglong = 5; // comment +var longlonglong = 5; // comment +var longlonglong = 5; // comment +var longlonglong = 5; // comment +var longlonglong = 5; // comment +var longlonglong = 5; // comment +var longlonglong = 5; // comment +var longlonglong = 5; // comment +var longlonglong = 5; // comment +var longlonglong = 5; // comment +var longlonglong = 5; // comment +var longlonglong = 5; // comment +var longlonglong = 5; // comment +var longlonglong = 5; // comment +var longlonglong = 5; // comment +var longlonglong = 5; // comment +var longlonglong = 5; // comment +var longlonglong = 5; // comment diff --git a/t/recipes/checks/cruft/cruft-minified-js/build-spec/orig/oldfalsepositives/jslint.js b/t/recipes/checks/cruft/cruft-minified-js/build-spec/orig/oldfalsepositives/jslint.js new file mode 100644 index 0000000..d2f68d3 --- /dev/null +++ b/t/recipes/checks/cruft/cruft-minified-js/build-spec/orig/oldfalsepositives/jslint.js @@ -0,0 +1,2 @@ +/*jslint evil: true, undef: true, browser: true */ +/*globals $,require,jQuery,define,_selector_run,_selector_opts,_selector_first,_selector_row_indexes,_ext,_Api,_api_register,_api_registerPlural,_re_new_lines,_re_html,_re_formatted_numeric,_re_escape_regex,_empty,_intVal,_numToDecimal,_isNumber,_isHtml,_htmlNumeric,_pluck,_pluck_order,_range,_stripHtml,_unique,_fnBuildAjax,_fnAjaxUpdate,_fnAjaxParameters,_fnAjaxUpdateDraw,_fnAjaxDataSrc,_fnAddColumn,_fnColumnOptions,_fnAdjustColumnSizing,_fnVisibleToColumnIndex,_fnColumnIndexToVisible,_fnVisbleColumns,_fnGetColumns,_fnColumnTypes,_fnApplyColumnDefs,_fnHungarianMap,_fnCamelToHungarian,_fnLanguageCompat,_fnBrowserDetect,_fnAddData,_fnAddTr,_fnNodeToDataIndex,_fnNodeToColumnIndex,_fnGetCellData,_fnSetCellData,_fnSplitObjNotation,_fnGetObjectDataFn,_fnSetObjectDataFn,_fnGetDataMaster,_fnClearTable,_fnDeleteIndex,_fnInvalidate,_fnGetRowElements,_fnCreateTr,_fnBuildHead,_fnDrawHead,_fnDraw,_fnReDraw,_fnAddOptionsHtml,_fnDetectHeader,_fnGetUniqueThs,_fnFeatureHtmlFilter,_fnFilterComplete,_fnFilterCustom,_fnFilterColumn,_fnFilter,_fnFilterCreateSearch,_fnEscapeRegex,_fnFilterData,_fnFeatureHtmlInfo,_fnUpdateInfo,_fnInfoMacros,_fnInitialise,_fnInitComplete,_fnLengthChange,_fnFeatureHtmlLength,_fnFeatureHtmlPaginate,_fnPageChange,_fnFeatureHtmlProcessing,_fnProcessingDisplay,_fnFeatureHtmlTable,_fnScrollDraw,_fnApplyToChildren,_fnCalculateColumnWidths,_fnThrottle,_fnConvertToWidth,_fnGetWidestNode,_fnGetMaxLenString,_fnStringToCss,_fnSortFlatten,_fnSort,_fnSortAria,_fnSortListener,_fnSortAttachListener,_fnSortingClasses,_fnSortData,_fnSaveState,_fnLoadState,_fnSettingsFromNode,_fnLog,_fnMap,_fnBindAction,_fnCallbackReg,_fnCallbackFire,_fnLengthOverflow,_fnRenderer,_fnDataSource,_fnRowAttributes*/ diff --git a/t/recipes/checks/cruft/cruft-minified-js/build-spec/orig/oldfalsepositives/longlicensetext.js b/t/recipes/checks/cruft/cruft-minified-js/build-spec/orig/oldfalsepositives/longlicensetext.js new file mode 100644 index 0000000..66222ee --- /dev/null +++ b/t/recipes/checks/cruft/cruft-minified-js/build-spec/orig/oldfalsepositives/longlicensetext.js @@ -0,0 +1,30 @@ +/* long line in fake license */ +/* + * LICENSE + * + * POCKET MARKS + * + * Notwithstanding the permitted uses of the Software (as defined below) pursuant to the license set forth below, "Pocket," "Read It Later" and the Pocket icon and logos (collectively, the “Pocket Marks”) are registered and common law trademarks of Read It Later, Inc. This means that, while you have considerable freedom to redistribute and modify the Software, there are tight restrictions on your ability to use the Pocket Marks. This license does not grant you any rights to use the Pocket Marks except as they are embodied in the Software. + * + * --- + * + * SOFTWARE + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ diff --git a/t/recipes/checks/cruft/cruft-minified-js/build-spec/orig/oldfalsepositives/nested-dir/README b/t/recipes/checks/cruft/cruft-minified-js/build-spec/orig/oldfalsepositives/nested-dir/README new file mode 100644 index 0000000..2db2f0f --- /dev/null +++ b/t/recipes/checks/cruft/cruft-minified-js/build-spec/orig/oldfalsepositives/nested-dir/README @@ -0,0 +1 @@ +exercice missing dir in relative dir \ No newline at end of file diff --git a/t/recipes/checks/cruft/cruft-minified-js/build-spec/orig/oldfalsepositives/nested-dir/dist/fake.min.js b/t/recipes/checks/cruft/cruft-minified-js/build-spec/orig/oldfalsepositives/nested-dir/dist/fake.min.js new file mode 100644 index 0000000..3e0e3c2 --- /dev/null +++ b/t/recipes/checks/cruft/cruft-minified-js/build-spec/orig/oldfalsepositives/nested-dir/dist/fake.min.js @@ -0,0 +1,2 @@ +// fake min.js +toto='1'; \ No newline at end of file diff --git a/t/recipes/checks/cruft/cruft-minified-js/build-spec/orig/oldfalsepositives/nested-dir/src/fake.js b/t/recipes/checks/cruft/cruft-minified-js/build-spec/orig/oldfalsepositives/nested-dir/src/fake.js new file mode 100644 index 0000000..772fe5c --- /dev/null +++ b/t/recipes/checks/cruft/cruft-minified-js/build-spec/orig/oldfalsepositives/nested-dir/src/fake.js @@ -0,0 +1,2 @@ +// fake source +toto='1'; \ No newline at end of file diff --git a/t/recipes/checks/cruft/cruft-minified-js/build-spec/orig/oldfalsepositives/pandoc/search_index.js b/t/recipes/checks/cruft/cruft-minified-js/build-spec/orig/oldfalsepositives/pandoc/search_index.js new file mode 100644 index 0000000..077c6f7 --- /dev/null +++ b/t/recipes/checks/cruft/cruft-minified-js/build-spec/orig/oldfalsepositives/pandoc/search_index.js @@ -0,0 +1,4 @@ +var search_index = [ +'ALLEGRO_CONFIG','ALLEGRO_CONFIG_SECTION','ALLEGRO_CONFIG','ALLEGRO_CONFIG_SECTION','ALLEGRO_CONFIG','ALLEGRO_CONFIG_SECTION','ALLEGRO_CONFIG','ALLEGRO_CONFIG_SECTION','ALLEGRO_CONFIG','ALLEGRO_CONFIG_SECTION''ALLEGRO_CONFIG','ALLEGRO_CONFIG_SECTION','ALLEGRO_CONFIG','ALLEGRO_CONFIG_SECTION','ALLEGRO_CONFIG','ALLEGRO_CONFIG_SECTION','ALLEGRO_CONFIG','ALLEGRO_CONFIG_SECTION','ALLEGRO_CONFIG','ALLEGRO_CONFIG_SECTION''ALLEGRO_CONFIG','ALLEGRO_CONFIG_SECTION','ALLEGRO_CONFIG','ALLEGRO_CONFIG_SECTION','ALLEGRO_CONFIG','ALLEGRO_CONFIG_SECTION','ALLEGRO_CONFIG','ALLEGRO_CONFIG_SECTION','ALLEGRO_CONFIG','ALLEGRO_CONFIG_SECTION''ALLEGRO_CONFIG','ALLEGRO_CONFIG_SECTION','ALLEGRO_CONFIG','ALLEGRO_CONFIG_SECTION','ALLEGRO_CONFIG','ALLEGRO_CONFIG_SECTION','ALLEGRO_CONFIG','ALLEGRO_CONFIG_SECTION','ALLEGRO_CONFIG','ALLEGRO_CONFIG_SECTION''ALLEGRO_CONFIG','ALLEGRO_CONFIG_SECTION','ALLEGRO_CONFIG','ALLEGRO_CONFIG_SECTION','ALLEGRO_CONFIG','ALLEGRO_CONFIG_SECTION','ALLEGRO_CONFIG','ALLEGRO_CONFIG_SECTION','ALLEGRO_CONFIG','ALLEGRO_CONFIG_SECTION''ALLEGRO_CONFIG','ALLEGRO_CONFIG_SECTION','ALLEGRO_CONFIG','ALLEGRO_CONFIG_SECTION','ALLEGRO_CONFIG','ALLEGRO_CONFIG_SECTION','ALLEGRO_CONFIG','ALLEGRO_CONFIG_SECTION','ALLEGRO_CONFIG','ALLEGRO_CONFIG_SECTION''ALLEGRO_CONFIG','ALLEGRO_CONFIG_SECTION','ALLEGRO_CONFIG','ALLEGRO_CONFIG_SECTION','ALLEGRO_CONFIG','ALLEGRO_CONFIG_SECTION','ALLEGRO_CONFIG','ALLEGRO_CONFIG_SECTION','ALLEGRO_CONFIG','ALLEGRO_CONFIG_SECTION''ALLEGRO_CONFIG','ALLEGRO_CONFIG_SECTION','ALLEGRO_CONFIG','ALLEGRO_CONFIG_SECTION','ALLEGRO_CONFIG','ALLEGRO_CONFIG_SECTION','ALLEGRO_CONFIG','ALLEGRO_CONFIG_SECTION','ALLEGRO_CONFIG','ALLEGRO_CONFIG_SECTION''ALLEGRO_CONFIG','ALLEGRO_CONFIG_SECTION','ALLEGRO_CONFIG','ALLEGRO_CONFIG_SECTION','ALLEGRO_CONFIG','ALLEGRO_CONFIG_SECTION','ALLEGRO_CONFIG','ALLEGRO_CONFIG_SECTION','ALLEGRO_CONFIG','ALLEGRO_CONFIG_SECTION''ALLEGRO_CONFIG','ALLEGRO_CONFIG_SECTION','ALLEGRO_CONFIG','ALLEGRO_CONFIG_SECTION','ALLEGRO_CONFIG','ALLEGRO_CONFIG_SECTION','ALLEGRO_CONFIG','ALLEGRO_CONFIG_SECTION','ALLEGRO_CONFIG','ALLEGRO_CONFIG_SECTION''ALLEGRO_CONFIG','ALLEGRO_CONFIG_SECTION','ALLEGRO_CONFIG','ALLEGRO_CONFIG_SECTION','ALLEGRO_CONFIG','ALLEGRO_CONFIG_SECTION','ALLEGRO_CONFIG','ALLEGRO_CONFIG_SECTION','ALLEGRO_CONFIG','ALLEGRO_CONFIG_SECTION''ALLEGRO_CONFIG','ALLEGRO_CONFIG_SECTION','ALLEGRO_CONFIG','ALLEGRO_CONFIG_SECTION','ALLEGRO_CONFIG','ALLEGRO_CONFIG_SECTION','ALLEGRO_CONFIG','ALLEGRO_CONFIG_SECTION','ALLEGRO_CONFIG','ALLEGRO_CONFIG_SECTION''ALLEGRO_CONFIG','ALLEGRO_CONFIG_SECTION','ALLEGRO_CONFIG','ALLEGRO_CONFIG_SECTION','ALLEGRO_CONFIG','ALLEGRO_CONFIG_SECTION','ALLEGRO_CONFIG','ALLEGRO_CONFIG_SECTION','ALLEGRO_CONFIG','ALLEGRO_CONFIG_SECTION''ALLEGRO_CONFIG','ALLEGRO_CONFIG_SECTION','ALLEGRO_CONFIG','ALLEGRO_CONFIG_SECTION','ALLEGRO_CONFIG','ALLEGRO_CONFIG_SECTION','ALLEGRO_CONFIG','ALLEGRO_CONFIG_SECTION','ALLEGRO_CONFIG','ALLEGRO_CONFIG_SECTION','ALLEGRO_CONFIG','ALLEGRO_CONFIG_SECTION','ALLEGRO_CONFIG','ALLEGRO_CONFIG_SECTION','ALLEGRO_CONFIG','ALLEGRO_CONFIG_SECTION',]; +var search_urls = [ +'config.html#allegro_config','config.html#allegro_config_section']; diff --git a/t/recipes/checks/cruft/cruft-minified-js/build-spec/orig/oldfalsepositives/scriptinhtml/falsecopyright.html b/t/recipes/checks/cruft/cruft-minified-js/build-spec/orig/oldfalsepositives/scriptinhtml/falsecopyright.html new file mode 100644 index 0000000..7267c7f --- /dev/null +++ b/t/recipes/checks/cruft/cruft-minified-js/build-spec/orig/oldfalsepositives/scriptinhtml/falsecopyright.html @@ -0,0 +1,7 @@ + +
      + +
      + \ No newline at end of file diff --git a/t/recipes/checks/cruft/cruft-minified-js/build-spec/orig/oldfalsepositives/singlecolon.js b/t/recipes/checks/cruft/cruft-minified-js/build-spec/orig/oldfalsepositives/singlecolon.js new file mode 100644 index 0000000..80e795f --- /dev/null +++ b/t/recipes/checks/cruft/cruft-minified-js/build-spec/orig/oldfalsepositives/singlecolon.js @@ -0,0 +1,3 @@ +/* simulate a long line by with only one ;*/ +var longline = 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'; + diff --git a/t/recipes/checks/cruft/cruft-minified-js/build-spec/orig/oldfalsepositives/sqlite.js b/t/recipes/checks/cruft/cruft-minified-js/build-spec/orig/oldfalsepositives/sqlite.js new file mode 100644 index 0000000..8e17061 --- /dev/null +++ b/t/recipes/checks/cruft/cruft-minified-js/build-spec/orig/oldfalsepositives/sqlite.js @@ -0,0 +1 @@ +// this one catch lite suffix \ No newline at end of file diff --git a/t/recipes/checks/cruft/cruft-minified-js/build-spec/orig/oldfalsepositives/src.js/test.min.js b/t/recipes/checks/cruft/cruft-minified-js/build-spec/orig/oldfalsepositives/src.js/test.min.js new file mode 100644 index 0000000..d47653c --- /dev/null +++ b/t/recipes/checks/cruft/cruft-minified-js/build-spec/orig/oldfalsepositives/src.js/test.min.js @@ -0,0 +1,3 @@ +// a very long javascript yuic compressed +/* simulate a long line */ +var longline = 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'; diff --git a/t/recipes/checks/cruft/cruft-minified-js/build-spec/orig/oldfalsepositives/src.js/test.src.js b/t/recipes/checks/cruft/cruft-minified-js/build-spec/orig/oldfalsepositives/src.js/test.src.js new file mode 100644 index 0000000..4a35a5a --- /dev/null +++ b/t/recipes/checks/cruft/cruft-minified-js/build-spec/orig/oldfalsepositives/src.js/test.src.js @@ -0,0 +1 @@ +//the source diff --git a/t/recipes/checks/cruft/cruft-minified-js/build-spec/orig/oldfalsepositives/suffix/test-compiled.js b/t/recipes/checks/cruft/cruft-minified-js/build-spec/orig/oldfalsepositives/suffix/test-compiled.js new file mode 100644 index 0000000..d9fd3cb --- /dev/null +++ b/t/recipes/checks/cruft/cruft-minified-js/build-spec/orig/oldfalsepositives/suffix/test-compiled.js @@ -0,0 +1,2 @@ +// a very long javascript yuic compressed + diff --git a/t/recipes/checks/cruft/cruft-minified-js/build-spec/orig/oldfalsepositives/suffix/test-compressed.js b/t/recipes/checks/cruft/cruft-minified-js/build-spec/orig/oldfalsepositives/suffix/test-compressed.js new file mode 100644 index 0000000..d9fd3cb --- /dev/null +++ b/t/recipes/checks/cruft/cruft-minified-js/build-spec/orig/oldfalsepositives/suffix/test-compressed.js @@ -0,0 +1,2 @@ +// a very long javascript yuic compressed + diff --git a/t/recipes/checks/cruft/cruft-minified-js/build-spec/orig/oldfalsepositives/suffix/test-lite.js b/t/recipes/checks/cruft/cruft-minified-js/build-spec/orig/oldfalsepositives/suffix/test-lite.js new file mode 100644 index 0000000..d9fd3cb --- /dev/null +++ b/t/recipes/checks/cruft/cruft-minified-js/build-spec/orig/oldfalsepositives/suffix/test-lite.js @@ -0,0 +1,2 @@ +// a very long javascript yuic compressed + diff --git a/t/recipes/checks/cruft/cruft-minified-js/build-spec/orig/oldfalsepositives/suffix/test-min.js b/t/recipes/checks/cruft/cruft-minified-js/build-spec/orig/oldfalsepositives/suffix/test-min.js new file mode 100644 index 0000000..d9fd3cb --- /dev/null +++ b/t/recipes/checks/cruft/cruft-minified-js/build-spec/orig/oldfalsepositives/suffix/test-min.js @@ -0,0 +1,2 @@ +// a very long javascript yuic compressed + diff --git a/t/recipes/checks/cruft/cruft-minified-js/build-spec/orig/oldfalsepositives/suffix/test-pack.js b/t/recipes/checks/cruft/cruft-minified-js/build-spec/orig/oldfalsepositives/suffix/test-pack.js new file mode 100644 index 0000000..d9fd3cb --- /dev/null +++ b/t/recipes/checks/cruft/cruft-minified-js/build-spec/orig/oldfalsepositives/suffix/test-pack.js @@ -0,0 +1,2 @@ +// a very long javascript yuic compressed + diff --git a/t/recipes/checks/cruft/cruft-minified-js/build-spec/orig/oldfalsepositives/suffix/test-packed.js b/t/recipes/checks/cruft/cruft-minified-js/build-spec/orig/oldfalsepositives/suffix/test-packed.js new file mode 100644 index 0000000..d9fd3cb --- /dev/null +++ b/t/recipes/checks/cruft/cruft-minified-js/build-spec/orig/oldfalsepositives/suffix/test-packed.js @@ -0,0 +1,2 @@ +// a very long javascript yuic compressed + diff --git a/t/recipes/checks/cruft/cruft-minified-js/build-spec/orig/oldfalsepositives/suffix/test-yc.js b/t/recipes/checks/cruft/cruft-minified-js/build-spec/orig/oldfalsepositives/suffix/test-yc.js new file mode 100644 index 0000000..d9fd3cb --- /dev/null +++ b/t/recipes/checks/cruft/cruft-minified-js/build-spec/orig/oldfalsepositives/suffix/test-yc.js @@ -0,0 +1,2 @@ +// a very long javascript yuic compressed + diff --git a/t/recipes/checks/cruft/cruft-minified-js/build-spec/orig/oldfalsepositives/suffix/test.compressed.js b/t/recipes/checks/cruft/cruft-minified-js/build-spec/orig/oldfalsepositives/suffix/test.compressed.js new file mode 100644 index 0000000..d9fd3cb --- /dev/null +++ b/t/recipes/checks/cruft/cruft-minified-js/build-spec/orig/oldfalsepositives/suffix/test.compressed.js @@ -0,0 +1,2 @@ +// a very long javascript yuic compressed + diff --git a/t/recipes/checks/cruft/cruft-minified-js/build-spec/orig/oldfalsepositives/suffix/test.js b/t/recipes/checks/cruft/cruft-minified-js/build-spec/orig/oldfalsepositives/suffix/test.js new file mode 100644 index 0000000..cb851fb --- /dev/null +++ b/t/recipes/checks/cruft/cruft-minified-js/build-spec/orig/oldfalsepositives/suffix/test.js @@ -0,0 +1 @@ +# the source diff --git a/t/recipes/checks/cruft/cruft-minified-js/build-spec/orig/oldfalsepositives/suffix/test.min.js b/t/recipes/checks/cruft/cruft-minified-js/build-spec/orig/oldfalsepositives/suffix/test.min.js new file mode 100644 index 0000000..d9fd3cb --- /dev/null +++ b/t/recipes/checks/cruft/cruft-minified-js/build-spec/orig/oldfalsepositives/suffix/test.min.js @@ -0,0 +1,2 @@ +// a very long javascript yuic compressed + diff --git a/t/recipes/checks/cruft/cruft-minified-js/build-spec/orig/oldfalsepositives/suffix/test_min.js b/t/recipes/checks/cruft/cruft-minified-js/build-spec/orig/oldfalsepositives/suffix/test_min.js new file mode 100644 index 0000000..d9fd3cb --- /dev/null +++ b/t/recipes/checks/cruft/cruft-minified-js/build-spec/orig/oldfalsepositives/suffix/test_min.js @@ -0,0 +1,2 @@ +// a very long javascript yuic compressed + diff --git a/t/recipes/checks/cruft/cruft-minified-js/build-spec/pre-build b/t/recipes/checks/cruft/cruft-minified-js/build-spec/pre-build new file mode 100755 index 0000000..13f30ca --- /dev/null +++ b/t/recipes/checks/cruft/cruft-minified-js/build-spec/pre-build @@ -0,0 +1,52 @@ +#!/bin/sh +# +# Create all the various junk that shouldn't exist in the diff so that we can +# trigger all the tags. + +set -e +dir="$1" +jsdir="$1/usr/share/javascript/" +srcdir="$1" +json="$srcdir/debian/missing-sources/json.js" +uglyjson="$jsdir/json/json.min.js" + +mkdir -p "$jsdir" +mkdir -p "$jsdir/minwithoutsource" +mkdir -p "$jsdir/jswithoutminext" +mkdir -p "$jsdir/json" +mkdir -p "$jsdir/sourced" +mkdir -p "$jsdir/sourced_variant" +mkdir -p "$jsdir/jswithoutminextwithoutsource/" +mkdir -p "$srcdir/src/js" +mkdir -p "$srcdir/build/js" + +# create a js file +uglifyjs -o "$uglyjson" "$json" +# fake install of minified js without min.js +cp "$uglyjson" "$jsdir/jswithoutminext/json.js" +# fake not sourced +cp "$uglyjson" "$jsdir/minwithoutsource/notsourced.min.js" +cp "$uglyjson" "$jsdir/minwithoutsource/subdir.min.js" +# fake install but not sourced +cp "$uglyjson" "$jsdir/jswithoutminextwithoutsource/jsonnotsourced.js" +# fake source and min alone +cp "$uglyjson" "$jsdir/sourced/sourced.min.js" +cp "$json" "$jsdir/sourced/sourced.js" +cp "$uglyjson" "$jsdir/sourced_variant/sourced.min.js" +cp "$json" "$jsdir/sourced_variant/sourced_orig.js" +# sourced in parent's parent +cp "$uglyjson" "$srcdir/build/js/foo.min.js" +cp "$json" "$srcdir/src/js/foo.js" + +cat > $srcdir/src/js/foo.html < + + + + +EOF diff --git a/t/recipes/checks/cruft/cruft-minified-js/eval/desc b/t/recipes/checks/cruft/cruft-minified-js/eval/desc new file mode 100644 index 0000000..190a0e8 --- /dev/null +++ b/t/recipes/checks/cruft/cruft-minified-js/eval/desc @@ -0,0 +1,2 @@ +Testname: cruft-minified-js +Check: cruft diff --git a/t/recipes/checks/cruft/cruft-minified-js/eval/hints b/t/recipes/checks/cruft/cruft-minified-js/eval/hints new file mode 100644 index 0000000..09582a1 --- /dev/null +++ b/t/recipes/checks/cruft/cruft-minified-js/eval/hints @@ -0,0 +1,3 @@ +cruft-minified-js (source): source-contains-prebuilt-pandoc-documentation [oldfalsepositives/pandoc/] +cruft-minified-js (source): source-contains-browserified-javascript code fragment:CODE +cruft-minified-js (source): embedded-script-includes-copyright-statement extract of copyright statement: COPYRIGHT diff --git a/t/recipes/checks/cruft/cruft-minified-js/eval/post-test b/t/recipes/checks/cruft/cruft-minified-js/eval/post-test new file mode 100644 index 0000000..f1d2602 --- /dev/null +++ b/t/recipes/checks/cruft/cruft-minified-js/eval/post-test @@ -0,0 +1,4 @@ +s/mean line length is about [0-9]+ characters$/mean line is about NUMBER characters/ +s/line [0-9]+ is [0-9]+ characters long \(>[0-9]+\)$/line POSITION is LENGTH characters long (>CUTOFF)/ +s/code fragment:.*$/code fragment:CODE/ +s/extract of copyright statement:.*/extract of copyright statement: COPYRIGHT/ diff --git a/t/recipes/checks/cruft/cruft-non-free-rfc/build-spec/debian/copyright b/t/recipes/checks/cruft/cruft-non-free-rfc/build-spec/debian/copyright new file mode 100644 index 0000000..f2134e7 --- /dev/null +++ b/t/recipes/checks/cruft/cruft-non-free-rfc/build-spec/debian/copyright @@ -0,0 +1,25 @@ +(False positive; debian/copyright should be ignored) + +Copyright (C) The Internet Society (1999). All Rights Reserved. + +This document and translations of it may be copied and furnished to others, +and derivative works that comment on or otherwise explain it or assist in +its implementation may be prepared, copied, published and distributed, in +whole or in part, without restriction of any kind, provided that the above +copyright notice and this paragraph are included on all such copies and +derivative works. However, this document itself may not be modified in any +way, such as by removing the copyright notice or references to the Internet +Society or other Internet organizations, except as needed for the purpose of +developing Internet standards in which case the procedures for copyrights +defined in the Internet Standards process must be followed, or as required +to translate it into languages other than English. + +The limited permissions granted above are perpetual and will not be revoked +by the Internet Society or its successors or assigns. + +This document and the information contained herein is provided on an "AS IS" +basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING TASK FORCE +DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO +ANY WARRANTY THAT THE USE OF THE INFORMATION HEREIN WILL NOT INFRINGE ANY +RIGHTS OR ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A +PARTICULAR PURPOSE. diff --git a/t/recipes/checks/cruft/cruft-non-free-rfc/build-spec/fill-values b/t/recipes/checks/cruft/cruft-non-free-rfc/build-spec/fill-values new file mode 100644 index 0000000..ff7ae4d --- /dev/null +++ b/t/recipes/checks/cruft/cruft-non-free-rfc/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: upload-native +Testname: cruft-non-free-rfc +Description: Check for the rfc diff --git a/t/recipes/checks/cruft/cruft-non-free-rfc/build-spec/orig/src/bcp78.txt b/t/recipes/checks/cruft/cruft-non-free-rfc/build-spec/orig/src/bcp78.txt new file mode 100644 index 0000000..066de8b --- /dev/null +++ b/t/recipes/checks/cruft/cruft-non-free-rfc/build-spec/orig/src/bcp78.txt @@ -0,0 +1,3 @@ +This document is subject to the rights, licenses and restrictions +contained in BCP 78, and except as set forth therein, the authors +retain all their rights. \ No newline at end of file diff --git a/t/recipes/checks/cruft/cruft-non-free-rfc/build-spec/orig/src/rfc-3492.txt b/t/recipes/checks/cruft/cruft-non-free-rfc/build-spec/orig/src/rfc-3492.txt new file mode 100644 index 0000000..6ab73b0 --- /dev/null +++ b/t/recipes/checks/cruft/cruft-non-free-rfc/build-spec/orig/src/rfc-3492.txt @@ -0,0 +1,23 @@ +Copyright (C) The Internet Society (1999). All Rights Reserved. + +This document and translations of it may be copied and furnished to others, +and derivative works that comment on or otherwise explain it or assist in +its implementation may be prepared, copied, published and distributed, in +whole or in part, without restriction of any kind, provided that the above +copyright notice and this paragraph are included on all such copies and +derivative works. However, this document itself may not be modified in any +way, such as by removing the copyright notice or references to the Internet +Society or other Internet organizations, except as needed for the purpose of +developing Internet standards in which case the procedures for copyrights +defined in the Internet Standards process must be followed, or as required +to translate it into languages other than English. + +The limited permissions granted above are perpetual and will not be revoked +by the Internet Society or its successors or assigns. + +This document and the information contained herein is provided on an "AS IS" +basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING TASK FORCE +DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO +ANY WARRANTY THAT THE USE OF THE INFORMATION HEREIN WILL NOT INFRINGE ANY +RIGHTS OR ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A +PARTICULAR PURPOSE. diff --git a/t/recipes/checks/cruft/cruft-non-free-rfc/build-spec/orig/src/rfc.txt b/t/recipes/checks/cruft/cruft-non-free-rfc/build-spec/orig/src/rfc.txt new file mode 100644 index 0000000..6ab73b0 --- /dev/null +++ b/t/recipes/checks/cruft/cruft-non-free-rfc/build-spec/orig/src/rfc.txt @@ -0,0 +1,23 @@ +Copyright (C) The Internet Society (1999). All Rights Reserved. + +This document and translations of it may be copied and furnished to others, +and derivative works that comment on or otherwise explain it or assist in +its implementation may be prepared, copied, published and distributed, in +whole or in part, without restriction of any kind, provided that the above +copyright notice and this paragraph are included on all such copies and +derivative works. However, this document itself may not be modified in any +way, such as by removing the copyright notice or references to the Internet +Society or other Internet organizations, except as needed for the purpose of +developing Internet standards in which case the procedures for copyrights +defined in the Internet Standards process must be followed, or as required +to translate it into languages other than English. + +The limited permissions granted above are perpetual and will not be revoked +by the Internet Society or its successors or assigns. + +This document and the information contained herein is provided on an "AS IS" +basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING TASK FORCE +DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO +ANY WARRANTY THAT THE USE OF THE INFORMATION HEREIN WILL NOT INFRINGE ANY +RIGHTS OR ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A +PARTICULAR PURPOSE. diff --git a/t/recipes/checks/cruft/cruft-non-free-rfc/eval/desc b/t/recipes/checks/cruft/cruft-non-free-rfc/eval/desc new file mode 100644 index 0000000..cdb70b7 --- /dev/null +++ b/t/recipes/checks/cruft/cruft-non-free-rfc/eval/desc @@ -0,0 +1,2 @@ +Testname: cruft-non-free-rfc +Check: cruft diff --git a/t/recipes/checks/cruft/cruft-non-free-rfc/eval/hints b/t/recipes/checks/cruft/cruft-non-free-rfc/eval/hints new file mode 100644 index 0000000..9a2bd8a --- /dev/null +++ b/t/recipes/checks/cruft/cruft-non-free-rfc/eval/hints @@ -0,0 +1,2 @@ +cruft-non-free-rfc (source): license-problem-non-free-RFC-BCP78 [src/bcp78.txt] +cruft-non-free-rfc (source): license-problem-non-free-RFC [src/rfc.txt] diff --git a/t/recipes/checks/cruft/cruft-non-free-utf/build-spec/fill-values b/t/recipes/checks/cruft/cruft-non-free-utf/build-spec/fill-values new file mode 100644 index 0000000..2f3af48 --- /dev/null +++ b/t/recipes/checks/cruft/cruft-non-free-utf/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: upload-native +Testname: cruft-non-free-utf +Description: Check for non free utf diff --git a/t/recipes/checks/cruft/cruft-non-free-utf/build-spec/orig/src/bad.c b/t/recipes/checks/cruft/cruft-non-free-utf/build-spec/orig/src/bad.c new file mode 100644 index 0000000..753e63a --- /dev/null +++ b/t/recipes/checks/cruft/cruft-non-free-utf/build-spec/orig/src/bad.c @@ -0,0 +1,18 @@ +/* --------------------------------------------------------------------- + + Note A. + The fall-through switches in UTF-8 reading code save a + temp variable, some decrements & conditionals. The switches + are equivalent to the following loop: + { + int tmpBytesToRead = extraBytesToRead+1; + do { + ch += *source++; + --tmpBytesToRead; + if (tmpBytesToRead) ch <<= 6; + } while (tmpBytesToRead > 0); + } + In UTF-8 writing code, the switches on "bytesToWrite" are + similarly unrolled loops. + + --------------------------------------------------------------------- */ diff --git a/t/recipes/checks/cruft/cruft-non-free-utf/eval/desc b/t/recipes/checks/cruft/cruft-non-free-utf/eval/desc new file mode 100644 index 0000000..d1fe3bd --- /dev/null +++ b/t/recipes/checks/cruft/cruft-non-free-utf/eval/desc @@ -0,0 +1,2 @@ +Testname: cruft-non-free-utf +Check: cruft diff --git a/t/recipes/checks/cruft/cruft-non-free-utf/eval/hints b/t/recipes/checks/cruft/cruft-non-free-utf/eval/hints new file mode 100644 index 0000000..0df295b --- /dev/null +++ b/t/recipes/checks/cruft/cruft-non-free-utf/eval/hints @@ -0,0 +1 @@ +cruft-non-free-utf (source): license-problem-convert-utf-code [src/bad.c] diff --git a/t/recipes/checks/cruft/cruft-nvidia-intellectual/build-spec/fill-values b/t/recipes/checks/cruft/cruft-nvidia-intellectual/build-spec/fill-values new file mode 100644 index 0000000..1b275b2 --- /dev/null +++ b/t/recipes/checks/cruft/cruft-nvidia-intellectual/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: upload-native +Testname: cruft-nvidia-intellectual +Description: Check for the Nvidia intellectual license diff --git a/t/recipes/checks/cruft/cruft-nvidia-intellectual/build-spec/orig/src/badcv.c b/t/recipes/checks/cruft/cruft-nvidia-intellectual/build-spec/orig/src/badcv.c new file mode 100644 index 0000000..2014f17 --- /dev/null +++ b/t/recipes/checks/cruft/cruft-nvidia-intellectual/build-spec/orig/src/badcv.c @@ -0,0 +1,12 @@ +/* + * Acme Corporation and its licensors retain all intellectual property and + * proprietary rights in and to this software and related documentation. + * Any use, reproduction, disclosure, or distribution of this software + * and related documentation without an express license agreement from + * Acme Corporation is strictly prohibited. + * + * Please refer to the applicable Acme end user license agreement (EULA) + * associated with this source code for terms and conditions that govern + * your use of this Acme software. + * + */ diff --git a/t/recipes/checks/cruft/cruft-nvidia-intellectual/build-spec/orig/src/badcv2.c b/t/recipes/checks/cruft/cruft-nvidia-intellectual/build-spec/orig/src/badcv2.c new file mode 100644 index 0000000..cbabced --- /dev/null +++ b/t/recipes/checks/cruft/cruft-nvidia-intellectual/build-spec/orig/src/badcv2.c @@ -0,0 +1,10 @@ +/* + * Copyright 1993-2010 NVIDIA Corporation. All rights reserved. + * + * NVIDIA Corporation and its licensors retain all intellectual + * property and proprietary rights in and to this software and + * related documentation and any modifications thereto. + * Any use, reproduction, disclosure, or distribution of this + * software and related documentation without an express license + * agreement from NVIDIA Corporation is strictly prohibited. + */ diff --git a/t/recipes/checks/cruft/cruft-nvidia-intellectual/build-spec/orig/src/falsepositive/allmankind.c b/t/recipes/checks/cruft/cruft-nvidia-intellectual/build-spec/orig/src/falsepositive/allmankind.c new file mode 100644 index 0000000..a2873ef --- /dev/null +++ b/t/recipes/checks/cruft/cruft-nvidia-intellectual/build-spec/orig/src/falsepositive/allmankind.c @@ -0,0 +1,12 @@ +/* + * The technologies, software, hardware, designs, drawings, scheumatics, board + * layouts and/or artwork, concepts, methodologies (including the use of all + * of these, and that which is derived from the use of all of these), all other + * intellectual properties contained herein, and all intellectual property + * rights have been and shall continue to be expressly for the benefit of all + * mankind, and are perpetually placed in the public domain, and may be used, + * copied, and/or modified by anyone, in any manner, for any legal purpose, + * without restriction. + * + * This module written by Stephen Underwood. + */ diff --git a/t/recipes/checks/cruft/cruft-nvidia-intellectual/eval/desc b/t/recipes/checks/cruft/cruft-nvidia-intellectual/eval/desc new file mode 100644 index 0000000..7a959d5 --- /dev/null +++ b/t/recipes/checks/cruft/cruft-nvidia-intellectual/eval/desc @@ -0,0 +1,2 @@ +Testname: cruft-nvidia-intellectual +Check: cruft diff --git a/t/recipes/checks/cruft/cruft-nvidia-intellectual/eval/hints b/t/recipes/checks/cruft/cruft-nvidia-intellectual/eval/hints new file mode 100644 index 0000000..8dbeba6 --- /dev/null +++ b/t/recipes/checks/cruft/cruft-nvidia-intellectual/eval/hints @@ -0,0 +1,2 @@ +cruft-nvidia-intellectual (source): license-problem-nvidia-intellectual [src/badcv2.c] +cruft-nvidia-intellectual (source): license-problem-nvidia-intellectual [src/badcv.c] diff --git a/t/recipes/checks/cruft/cruft-python/build-spec/debian/missing-sources/fake.py b/t/recipes/checks/cruft/cruft-python/build-spec/debian/missing-sources/fake.py new file mode 100644 index 0000000..6e883de --- /dev/null +++ b/t/recipes/checks/cruft/cruft-python/build-spec/debian/missing-sources/fake.py @@ -0,0 +1 @@ +# a fake module source \ No newline at end of file diff --git a/t/recipes/checks/cruft/cruft-python/build-spec/debian/pycompat b/t/recipes/checks/cruft/cruft-python/build-spec/debian/pycompat new file mode 100644 index 0000000..e69de29 diff --git a/t/recipes/checks/cruft/cruft-python/build-spec/debian/pyversions b/t/recipes/checks/cruft/cruft-python/build-spec/debian/pyversions new file mode 100644 index 0000000..6f290b0 --- /dev/null +++ b/t/recipes/checks/cruft/cruft-python/build-spec/debian/pyversions @@ -0,0 +1 @@ +>= 2.7 diff --git a/t/recipes/checks/cruft/cruft-python/build-spec/fill-values b/t/recipes/checks/cruft/cruft-python/build-spec/fill-values new file mode 100644 index 0000000..37c65d1 --- /dev/null +++ b/t/recipes/checks/cruft/cruft-python/build-spec/fill-values @@ -0,0 +1,4 @@ +Skeleton: upload-native +Testname: cruft-python +Description: Misc errors related to Python +Extra-Build-Depends: python diff --git a/t/recipes/checks/cruft/cruft-python/build-spec/pre-build b/t/recipes/checks/cruft/cruft-python/build-spec/pre-build new file mode 100755 index 0000000..a5ee0a0 --- /dev/null +++ b/t/recipes/checks/cruft/cruft-python/build-spec/pre-build @@ -0,0 +1,31 @@ +#!/bin/sh +# +# Create all the various junk that shouldn't exist in the diff so that we can +# trigger all the tags. + +set -e +dir="$1" +fake="$dir/debian/missing-sources/fake.py" + +cp "$fake" "$dir" +echo 'import fake' > "${dir}/main.py" +unset PYTHONDONTWRITEBYTECODE +PYTHONPATH="${dir}" python "${dir}/main.py" > /dev/null +PYTHONPATH="${dir}" python -O "${dir}/main.py" > /dev/null +# now remove source +rm -f "${dir}"/main.py +rm -f "${dir}"/fake.py + +cp "$fake" "$dir/fake2.py" +echo 'import fake2' > "${dir}/main.py" +unset PYTHONDONTWRITEBYTECODE +PYTHONPATH="${dir}" python "${dir}/main.py" > /dev/null +PYTHONPATH="${dir}" python -O "${dir}/main.py" > /dev/null +# now remove source +rm -f "${dir}"/main.py +rm -f "${dir}"/fake2.py + + + + + diff --git a/t/recipes/checks/cruft/cruft-python/eval/desc b/t/recipes/checks/cruft/cruft-python/eval/desc new file mode 100644 index 0000000..b3ba42b --- /dev/null +++ b/t/recipes/checks/cruft/cruft-python/eval/desc @@ -0,0 +1,2 @@ +Testname: cruft-python +Check: cruft diff --git a/t/recipes/checks/cruft/cruft-python/eval/hints b/t/recipes/checks/cruft/cruft-python/eval/hints new file mode 100644 index 0000000..6817461 --- /dev/null +++ b/t/recipes/checks/cruft/cruft-python/eval/hints @@ -0,0 +1,6 @@ +cruft-python (source): source-is-missing fake2.pyo +cruft-python (source): source-is-missing fake2.pyc +cruft-python (source): source-contains-prebuilt-python-object fake2.pyo +cruft-python (source): source-contains-prebuilt-python-object fake2.pyc +cruft-python (source): source-contains-prebuilt-python-object fake.pyo +cruft-python (source): source-contains-prebuilt-python-object fake.pyc diff --git a/t/recipes/checks/cruft/cruft-sphinx-documentation/build-spec/fill-values b/t/recipes/checks/cruft/cruft-sphinx-documentation/build-spec/fill-values new file mode 100644 index 0000000..23de91f --- /dev/null +++ b/t/recipes/checks/cruft/cruft-sphinx-documentation/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: upload-native +Testname: cruft-sphinx-documentation +Description: Detect sphinx documentation diff --git a/t/recipes/checks/cruft/cruft-sphinx-documentation/build-spec/orig/src/hello.c b/t/recipes/checks/cruft/cruft-sphinx-documentation/build-spec/orig/src/hello.c new file mode 100644 index 0000000..ff2cb8d --- /dev/null +++ b/t/recipes/checks/cruft/cruft-sphinx-documentation/build-spec/orig/src/hello.c @@ -0,0 +1,10 @@ +#include + +void hello() { + printf("hello"); +} + +int main() +{ + hello(); +} \ No newline at end of file diff --git a/t/recipes/checks/cruft/cruft-sphinx-documentation/build-spec/orig/src/sphinx-1.22/Makefile b/t/recipes/checks/cruft/cruft-sphinx-documentation/build-spec/orig/src/sphinx-1.22/Makefile new file mode 100644 index 0000000..eb990fe --- /dev/null +++ b/t/recipes/checks/cruft/cruft-sphinx-documentation/build-spec/orig/src/sphinx-1.22/Makefile @@ -0,0 +1,177 @@ +# Makefile for Sphinx documentation +# + +# You can set these variables from the command line. +SPHINXOPTS = +SPHINXBUILD = sphinx-build +PAPER = +BUILDDIR = _build + +# User-friendly check for sphinx-build +ifeq ($(shell which $(SPHINXBUILD) >/dev/null 2>&1; echo $$?), 1) +$(error The '$(SPHINXBUILD)' command was not found. Make sure you have Sphinx installed, then set the SPHINXBUILD environment variable to point to the full path of the '$(SPHINXBUILD)' executable. Alternatively you can add the directory with the executable to your PATH. If you don't have Sphinx installed, grab it from http://sphinx-doc.org/) +endif + +# Internal variables. +PAPEROPT_a4 = -D latex_paper_size=a4 +PAPEROPT_letter = -D latex_paper_size=letter +ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . +# the i18n builder cannot share the environment and doctrees with the others +I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . + +.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest gettext + +help: + @echo "Please use \`make ' where is one of" + @echo " html to make standalone HTML files" + @echo " dirhtml to make HTML files named index.html in directories" + @echo " singlehtml to make a single large HTML file" + @echo " pickle to make pickle files" + @echo " json to make JSON files" + @echo " htmlhelp to make HTML files and a HTML help project" + @echo " qthelp to make HTML files and a qthelp project" + @echo " devhelp to make HTML files and a Devhelp project" + @echo " epub to make an epub" + @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter" + @echo " latexpdf to make LaTeX files and run them through pdflatex" + @echo " latexpdfja to make LaTeX files and run them through platex/dvipdfmx" + @echo " text to make text files" + @echo " man to make manual pages" + @echo " texinfo to make Texinfo files" + @echo " info to make Texinfo files and run them through makeinfo" + @echo " gettext to make PO message catalogs" + @echo " changes to make an overview of all changed/added/deprecated items" + @echo " xml to make Docutils-native XML files" + @echo " pseudoxml to make pseudoxml-XML files for display purposes" + @echo " linkcheck to check all external links for integrity" + @echo " doctest to run all doctests embedded in the documentation (if enabled)" + +clean: + rm -rf $(BUILDDIR)/* + +html: + $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html + @echo + @echo "Build finished. The HTML pages are in $(BUILDDIR)/html." + +dirhtml: + $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml + @echo + @echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml." + +singlehtml: + $(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml + @echo + @echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml." + +pickle: + $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle + @echo + @echo "Build finished; now you can process the pickle files." + +json: + $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json + @echo + @echo "Build finished; now you can process the JSON files." + +htmlhelp: + $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp + @echo + @echo "Build finished; now you can run HTML Help Workshop with the" \ + ".hhp project file in $(BUILDDIR)/htmlhelp." + +qthelp: + $(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp + @echo + @echo "Build finished; now you can run "qcollectiongenerator" with the" \ + ".qhcp project file in $(BUILDDIR)/qthelp, like this:" + @echo "# qcollectiongenerator $(BUILDDIR)/qthelp/hello.qhcp" + @echo "To view the help file:" + @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/hello.qhc" + +devhelp: + $(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp + @echo + @echo "Build finished." + @echo "To view the help file:" + @echo "# mkdir -p $$HOME/.local/share/devhelp/hello" + @echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/hello" + @echo "# devhelp" + +epub: + $(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub + @echo + @echo "Build finished. The epub file is in $(BUILDDIR)/epub." + +latex: + $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex + @echo + @echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex." + @echo "Run \`make' in that directory to run these through (pdf)latex" \ + "(use \`make latexpdf' here to do that automatically)." + +latexpdf: + $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex + @echo "Running LaTeX files through pdflatex..." + $(MAKE) -C $(BUILDDIR)/latex all-pdf + @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex." + +latexpdfja: + $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex + @echo "Running LaTeX files through platex and dvipdfmx..." + $(MAKE) -C $(BUILDDIR)/latex all-pdf-ja + @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex." + +text: + $(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text + @echo + @echo "Build finished. The text files are in $(BUILDDIR)/text." + +man: + $(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man + @echo + @echo "Build finished. The manual pages are in $(BUILDDIR)/man." + +texinfo: + $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo + @echo + @echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo." + @echo "Run \`make' in that directory to run these through makeinfo" \ + "(use \`make info' here to do that automatically)." + +info: + $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo + @echo "Running Texinfo files through makeinfo..." + make -C $(BUILDDIR)/texinfo info + @echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo." + +gettext: + $(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale + @echo + @echo "Build finished. The message catalogs are in $(BUILDDIR)/locale." + +changes: + $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes + @echo + @echo "The overview file is in $(BUILDDIR)/changes." + +linkcheck: + $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck + @echo + @echo "Link check complete; look for any errors in the above output " \ + "or in $(BUILDDIR)/linkcheck/output.txt." + +doctest: + $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest + @echo "Testing of doctests in the sources finished, look at the " \ + "results in $(BUILDDIR)/doctest/output.txt." + +xml: + $(SPHINXBUILD) -b xml $(ALLSPHINXOPTS) $(BUILDDIR)/xml + @echo + @echo "Build finished. The XML files are in $(BUILDDIR)/xml." + +pseudoxml: + $(SPHINXBUILD) -b pseudoxml $(ALLSPHINXOPTS) $(BUILDDIR)/pseudoxml + @echo + @echo "Build finished. The pseudo-XML files are in $(BUILDDIR)/pseudoxml." diff --git a/t/recipes/checks/cruft/cruft-sphinx-documentation/build-spec/orig/src/sphinx-1.22/_build/doctrees/environment.pickle b/t/recipes/checks/cruft/cruft-sphinx-documentation/build-spec/orig/src/sphinx-1.22/_build/doctrees/environment.pickle new file mode 100644 index 0000000..1d38a66 Binary files /dev/null and b/t/recipes/checks/cruft/cruft-sphinx-documentation/build-spec/orig/src/sphinx-1.22/_build/doctrees/environment.pickle differ diff --git a/t/recipes/checks/cruft/cruft-sphinx-documentation/build-spec/orig/src/sphinx-1.22/_build/doctrees/index.doctree b/t/recipes/checks/cruft/cruft-sphinx-documentation/build-spec/orig/src/sphinx-1.22/_build/doctrees/index.doctree new file mode 100644 index 0000000..c28b1f1 Binary files /dev/null and b/t/recipes/checks/cruft/cruft-sphinx-documentation/build-spec/orig/src/sphinx-1.22/_build/doctrees/index.doctree differ diff --git a/t/recipes/checks/cruft/cruft-sphinx-documentation/build-spec/orig/src/sphinx-1.22/_build/html/.buildinfo b/t/recipes/checks/cruft/cruft-sphinx-documentation/build-spec/orig/src/sphinx-1.22/_build/html/.buildinfo new file mode 100644 index 0000000..3a9d78b --- /dev/null +++ b/t/recipes/checks/cruft/cruft-sphinx-documentation/build-spec/orig/src/sphinx-1.22/_build/html/.buildinfo @@ -0,0 +1,4 @@ +# Sphinx build info version 1 +# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done. +config: 469b2f45b3fea98e5b770516c213cd8d +tags: 645f666f9bcd5a90fca523b33c5a78b7 diff --git a/t/recipes/checks/cruft/cruft-sphinx-documentation/build-spec/orig/src/sphinx-1.22/_build/html/_sources/index.txt b/t/recipes/checks/cruft/cruft-sphinx-documentation/build-spec/orig/src/sphinx-1.22/_build/html/_sources/index.txt new file mode 100644 index 0000000..778459b --- /dev/null +++ b/t/recipes/checks/cruft/cruft-sphinx-documentation/build-spec/orig/src/sphinx-1.22/_build/html/_sources/index.txt @@ -0,0 +1,22 @@ +.. hello documentation master file, created by + sphinx-quickstart on Mon Mar 31 19:57:16 2014. + You can adapt this file completely to your liking, but it should at least + contain the root `toctree` directive. + +Welcome to hello's documentation! +================================= + +Contents: + +.. toctree:: + :maxdepth: 2 + + + +Indices and tables +================== + +* :ref:`genindex` +* :ref:`modindex` +* :ref:`search` + diff --git a/t/recipes/checks/cruft/cruft-sphinx-documentation/build-spec/orig/src/sphinx-1.22/_build/html/_static/ajax-loader.gif b/t/recipes/checks/cruft/cruft-sphinx-documentation/build-spec/orig/src/sphinx-1.22/_build/html/_static/ajax-loader.gif new file mode 100644 index 0000000..61faf8c Binary files /dev/null and b/t/recipes/checks/cruft/cruft-sphinx-documentation/build-spec/orig/src/sphinx-1.22/_build/html/_static/ajax-loader.gif differ diff --git a/t/recipes/checks/cruft/cruft-sphinx-documentation/build-spec/orig/src/sphinx-1.22/_build/html/_static/basic.css b/t/recipes/checks/cruft/cruft-sphinx-documentation/build-spec/orig/src/sphinx-1.22/_build/html/_static/basic.css new file mode 100644 index 0000000..967e36c --- /dev/null +++ b/t/recipes/checks/cruft/cruft-sphinx-documentation/build-spec/orig/src/sphinx-1.22/_build/html/_static/basic.css @@ -0,0 +1,537 @@ +/* + * basic.css + * ~~~~~~~~~ + * + * Sphinx stylesheet -- basic theme. + * + * :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS. + * :license: BSD, see LICENSE for details. + * + */ + +/* -- main layout ----------------------------------------------------------- */ + +div.clearer { + clear: both; +} + +/* -- relbar ---------------------------------------------------------------- */ + +div.related { + width: 100%; + font-size: 90%; +} + +div.related h3 { + display: none; +} + +div.related ul { + margin: 0; + padding: 0 0 0 10px; + list-style: none; +} + +div.related li { + display: inline; +} + +div.related li.right { + float: right; + margin-right: 5px; +} + +/* -- sidebar --------------------------------------------------------------- */ + +div.sphinxsidebarwrapper { + padding: 10px 5px 0 10px; +} + +div.sphinxsidebar { + float: left; + width: 230px; + margin-left: -100%; + font-size: 90%; +} + +div.sphinxsidebar ul { + list-style: none; +} + +div.sphinxsidebar ul ul, +div.sphinxsidebar ul.want-points { + margin-left: 20px; + list-style: square; +} + +div.sphinxsidebar ul ul { + margin-top: 0; + margin-bottom: 0; +} + +div.sphinxsidebar form { + margin-top: 10px; +} + +div.sphinxsidebar input { + border: 1px solid #98dbcc; + font-family: sans-serif; + font-size: 1em; +} + +div.sphinxsidebar #searchbox input[type="text"] { + width: 170px; +} + +div.sphinxsidebar #searchbox input[type="submit"] { + width: 30px; +} + +img { + border: 0; + max-width: 100%; +} + +/* -- search page ----------------------------------------------------------- */ + +ul.search { + margin: 10px 0 0 20px; + padding: 0; +} + +ul.search li { + padding: 5px 0 5px 20px; + background-image: url(file.png); + background-repeat: no-repeat; + background-position: 0 7px; +} + +ul.search li a { + font-weight: bold; +} + +ul.search li div.context { + color: #888; + margin: 2px 0 0 30px; + text-align: left; +} + +ul.keywordmatches li.goodmatch a { + font-weight: bold; +} + +/* -- index page ------------------------------------------------------------ */ + +table.contentstable { + width: 90%; +} + +table.contentstable p.biglink { + line-height: 150%; +} + +a.biglink { + font-size: 1.3em; +} + +span.linkdescr { + font-style: italic; + padding-top: 5px; + font-size: 90%; +} + +/* -- general index --------------------------------------------------------- */ + +table.indextable { + width: 100%; +} + +table.indextable td { + text-align: left; + vertical-align: top; +} + +table.indextable dl, table.indextable dd { + margin-top: 0; + margin-bottom: 0; +} + +table.indextable tr.pcap { + height: 10px; +} + +table.indextable tr.cap { + margin-top: 10px; + background-color: #f2f2f2; +} + +img.toggler { + margin-right: 3px; + margin-top: 3px; + cursor: pointer; +} + +div.modindex-jumpbox { + border-top: 1px solid #ddd; + border-bottom: 1px solid #ddd; + margin: 1em 0 1em 0; + padding: 0.4em; +} + +div.genindex-jumpbox { + border-top: 1px solid #ddd; + border-bottom: 1px solid #ddd; + margin: 1em 0 1em 0; + padding: 0.4em; +} + +/* -- general body styles --------------------------------------------------- */ + +a.headerlink { + visibility: hidden; +} + +h1:hover > a.headerlink, +h2:hover > a.headerlink, +h3:hover > a.headerlink, +h4:hover > a.headerlink, +h5:hover > a.headerlink, +h6:hover > a.headerlink, +dt:hover > a.headerlink { + visibility: visible; +} + +div.body p.caption { + text-align: inherit; +} + +div.body td { + text-align: left; +} + +.field-list ul { + padding-left: 1em; +} + +.first { + margin-top: 0 !important; +} + +p.rubric { + margin-top: 30px; + font-weight: bold; +} + +img.align-left, .figure.align-left, object.align-left { + clear: left; + float: left; + margin-right: 1em; +} + +img.align-right, .figure.align-right, object.align-right { + clear: right; + float: right; + margin-left: 1em; +} + +img.align-center, .figure.align-center, object.align-center { + display: block; + margin-left: auto; + margin-right: auto; +} + +.align-left { + text-align: left; +} + +.align-center { + text-align: center; +} + +.align-right { + text-align: right; +} + +/* -- sidebars -------------------------------------------------------------- */ + +div.sidebar { + margin: 0 0 0.5em 1em; + border: 1px solid #ddb; + padding: 7px 7px 0 7px; + background-color: #ffe; + width: 40%; + float: right; +} + +p.sidebar-title { + font-weight: bold; +} + +/* -- topics ---------------------------------------------------------------- */ + +div.topic { + border: 1px solid #ccc; + padding: 7px 7px 0 7px; + margin: 10px 0 10px 0; +} + +p.topic-title { + font-size: 1.1em; + font-weight: bold; + margin-top: 10px; +} + +/* -- admonitions ----------------------------------------------------------- */ + +div.admonition { + margin-top: 10px; + margin-bottom: 10px; + padding: 7px; +} + +div.admonition dt { + font-weight: bold; +} + +div.admonition dl { + margin-bottom: 0; +} + +p.admonition-title { + margin: 0px 10px 5px 0px; + font-weight: bold; +} + +div.body p.centered { + text-align: center; + margin-top: 25px; +} + +/* -- tables ---------------------------------------------------------------- */ + +table.docutils { + border: 0; + border-collapse: collapse; +} + +table.docutils td, table.docutils th { + padding: 1px 8px 1px 5px; + border-top: 0; + border-left: 0; + border-right: 0; + border-bottom: 1px solid #aaa; +} + +table.field-list td, table.field-list th { + border: 0 !important; +} + +table.footnote td, table.footnote th { + border: 0 !important; +} + +th { + text-align: left; + padding-right: 5px; +} + +table.citation { + border-left: solid 1px gray; + margin-left: 1px; +} + +table.citation td { + border-bottom: none; +} + +/* -- other body styles ----------------------------------------------------- */ + +ol.arabic { + list-style: decimal; +} + +ol.loweralpha { + list-style: lower-alpha; +} + +ol.upperalpha { + list-style: upper-alpha; +} + +ol.lowerroman { + list-style: lower-roman; +} + +ol.upperroman { + list-style: upper-roman; +} + +dl { + margin-bottom: 15px; +} + +dd p { + margin-top: 0px; +} + +dd ul, dd table { + margin-bottom: 10px; +} + +dd { + margin-top: 3px; + margin-bottom: 10px; + margin-left: 30px; +} + +dt:target, .highlighted { + background-color: #fbe54e; +} + +dl.glossary dt { + font-weight: bold; + font-size: 1.1em; +} + +.field-list ul { + margin: 0; + padding-left: 1em; +} + +.field-list p { + margin: 0; +} + +.optional { + font-size: 1.3em; +} + +.versionmodified { + font-style: italic; +} + +.system-message { + background-color: #fda; + padding: 5px; + border: 3px solid red; +} + +.footnote:target { + background-color: #ffa; +} + +.line-block { + display: block; + margin-top: 1em; + margin-bottom: 1em; +} + +.line-block .line-block { + margin-top: 0; + margin-bottom: 0; + margin-left: 1.5em; +} + +.guilabel, .menuselection { + font-family: sans-serif; +} + +.accelerator { + text-decoration: underline; +} + +.classifier { + font-style: oblique; +} + +abbr, acronym { + border-bottom: dotted 1px; + cursor: help; +} + +/* -- code displays --------------------------------------------------------- */ + +pre { + overflow: auto; + overflow-y: hidden; /* fixes display issues on Chrome browsers */ +} + +td.linenos pre { + padding: 5px 0px; + border: 0; + background-color: transparent; + color: #aaa; +} + +table.highlighttable { + margin-left: 0.5em; +} + +table.highlighttable td { + padding: 0 0.5em 0 0.5em; +} + +tt.descname { + background-color: transparent; + font-weight: bold; + font-size: 1.2em; +} + +tt.descclassname { + background-color: transparent; +} + +tt.xref, a tt { + background-color: transparent; + font-weight: bold; +} + +h1 tt, h2 tt, h3 tt, h4 tt, h5 tt, h6 tt { + background-color: transparent; +} + +.viewcode-link { + float: right; +} + +.viewcode-back { + float: right; + font-family: sans-serif; +} + +div.viewcode-block:target { + margin: -1px -10px; + padding: 0 10px; +} + +/* -- math display ---------------------------------------------------------- */ + +img.math { + vertical-align: middle; +} + +div.body div.math p { + text-align: center; +} + +span.eqno { + float: right; +} + +/* -- printout stylesheet --------------------------------------------------- */ + +@media print { + div.document, + div.documentwrapper, + div.bodywrapper { + margin: 0 !important; + width: 100%; + } + + div.sphinxsidebar, + div.related, + div.footer, + #top-link { + display: none; + } +} \ No newline at end of file diff --git a/t/recipes/checks/cruft/cruft-sphinx-documentation/build-spec/orig/src/sphinx-1.22/_build/html/_static/comment-bright.png b/t/recipes/checks/cruft/cruft-sphinx-documentation/build-spec/orig/src/sphinx-1.22/_build/html/_static/comment-bright.png new file mode 100644 index 0000000..551517b Binary files /dev/null and b/t/recipes/checks/cruft/cruft-sphinx-documentation/build-spec/orig/src/sphinx-1.22/_build/html/_static/comment-bright.png differ diff --git a/t/recipes/checks/cruft/cruft-sphinx-documentation/build-spec/orig/src/sphinx-1.22/_build/html/_static/comment-close.png b/t/recipes/checks/cruft/cruft-sphinx-documentation/build-spec/orig/src/sphinx-1.22/_build/html/_static/comment-close.png new file mode 100644 index 0000000..09b54be Binary files /dev/null and b/t/recipes/checks/cruft/cruft-sphinx-documentation/build-spec/orig/src/sphinx-1.22/_build/html/_static/comment-close.png differ diff --git a/t/recipes/checks/cruft/cruft-sphinx-documentation/build-spec/orig/src/sphinx-1.22/_build/html/_static/comment.png b/t/recipes/checks/cruft/cruft-sphinx-documentation/build-spec/orig/src/sphinx-1.22/_build/html/_static/comment.png new file mode 100644 index 0000000..92feb52 Binary files /dev/null and b/t/recipes/checks/cruft/cruft-sphinx-documentation/build-spec/orig/src/sphinx-1.22/_build/html/_static/comment.png differ diff --git a/t/recipes/checks/cruft/cruft-sphinx-documentation/build-spec/orig/src/sphinx-1.22/_build/html/_static/default.css b/t/recipes/checks/cruft/cruft-sphinx-documentation/build-spec/orig/src/sphinx-1.22/_build/html/_static/default.css new file mode 100644 index 0000000..5f1399a --- /dev/null +++ b/t/recipes/checks/cruft/cruft-sphinx-documentation/build-spec/orig/src/sphinx-1.22/_build/html/_static/default.css @@ -0,0 +1,256 @@ +/* + * default.css_t + * ~~~~~~~~~~~~~ + * + * Sphinx stylesheet -- default theme. + * + * :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS. + * :license: BSD, see LICENSE for details. + * + */ + +@import url("basic.css"); + +/* -- page layout ----------------------------------------------------------- */ + +body { + font-family: sans-serif; + font-size: 100%; + background-color: #11303d; + color: #000; + margin: 0; + padding: 0; +} + +div.document { + background-color: #1c4e63; +} + +div.documentwrapper { + float: left; + width: 100%; +} + +div.bodywrapper { + margin: 0 0 0 230px; +} + +div.body { + background-color: #ffffff; + color: #000000; + padding: 0 20px 30px 20px; +} + +div.footer { + color: #ffffff; + width: 100%; + padding: 9px 0 9px 0; + text-align: center; + font-size: 75%; +} + +div.footer a { + color: #ffffff; + text-decoration: underline; +} + +div.related { + background-color: #133f52; + line-height: 30px; + color: #ffffff; +} + +div.related a { + color: #ffffff; +} + +div.sphinxsidebar { +} + +div.sphinxsidebar h3 { + font-family: 'Trebuchet MS', sans-serif; + color: #ffffff; + font-size: 1.4em; + font-weight: normal; + margin: 0; + padding: 0; +} + +div.sphinxsidebar h3 a { + color: #ffffff; +} + +div.sphinxsidebar h4 { + font-family: 'Trebuchet MS', sans-serif; + color: #ffffff; + font-size: 1.3em; + font-weight: normal; + margin: 5px 0 0 0; + padding: 0; +} + +div.sphinxsidebar p { + color: #ffffff; +} + +div.sphinxsidebar p.topless { + margin: 5px 10px 10px 10px; +} + +div.sphinxsidebar ul { + margin: 10px; + padding: 0; + color: #ffffff; +} + +div.sphinxsidebar a { + color: #98dbcc; +} + +div.sphinxsidebar input { + border: 1px solid #98dbcc; + font-family: sans-serif; + font-size: 1em; +} + + + +/* -- hyperlink styles ------------------------------------------------------ */ + +a { + color: #355f7c; + text-decoration: none; +} + +a:visited { + color: #355f7c; + text-decoration: none; +} + +a:hover { + text-decoration: underline; +} + + + +/* -- body styles ----------------------------------------------------------- */ + +div.body h1, +div.body h2, +div.body h3, +div.body h4, +div.body h5, +div.body h6 { + font-family: 'Trebuchet MS', sans-serif; + background-color: #f2f2f2; + font-weight: normal; + color: #20435c; + border-bottom: 1px solid #ccc; + margin: 20px -20px 10px -20px; + padding: 3px 0 3px 10px; +} + +div.body h1 { margin-top: 0; font-size: 200%; } +div.body h2 { font-size: 160%; } +div.body h3 { font-size: 140%; } +div.body h4 { font-size: 120%; } +div.body h5 { font-size: 110%; } +div.body h6 { font-size: 100%; } + +a.headerlink { + color: #c60f0f; + font-size: 0.8em; + padding: 0 4px 0 4px; + text-decoration: none; +} + +a.headerlink:hover { + background-color: #c60f0f; + color: white; +} + +div.body p, div.body dd, div.body li { + text-align: justify; + line-height: 130%; +} + +div.admonition p.admonition-title + p { + display: inline; +} + +div.admonition p { + margin-bottom: 5px; +} + +div.admonition pre { + margin-bottom: 5px; +} + +div.admonition ul, div.admonition ol { + margin-bottom: 5px; +} + +div.note { + background-color: #eee; + border: 1px solid #ccc; +} + +div.seealso { + background-color: #ffc; + border: 1px solid #ff6; +} + +div.topic { + background-color: #eee; +} + +div.warning { + background-color: #ffe4e4; + border: 1px solid #f66; +} + +p.admonition-title { + display: inline; +} + +p.admonition-title:after { + content: ":"; +} + +pre { + padding: 5px; + background-color: #eeffcc; + color: #333333; + line-height: 120%; + border: 1px solid #ac9; + border-left: none; + border-right: none; +} + +tt { + background-color: #ecf0f3; + padding: 0 1px 0 1px; + font-size: 0.95em; +} + +th { + background-color: #ede; +} + +.warning tt { + background: #efc2c2; +} + +.note tt { + background: #d6d6d6; +} + +.viewcode-back { + font-family: sans-serif; +} + +div.viewcode-block:target { + background-color: #f4debf; + border-top: 1px solid #ac9; + border-bottom: 1px solid #ac9; +} \ No newline at end of file diff --git a/t/recipes/checks/cruft/cruft-sphinx-documentation/build-spec/orig/src/sphinx-1.22/_build/html/_static/doctools.js b/t/recipes/checks/cruft/cruft-sphinx-documentation/build-spec/orig/src/sphinx-1.22/_build/html/_static/doctools.js new file mode 100644 index 0000000..c5455c9 --- /dev/null +++ b/t/recipes/checks/cruft/cruft-sphinx-documentation/build-spec/orig/src/sphinx-1.22/_build/html/_static/doctools.js @@ -0,0 +1,238 @@ +/* + * doctools.js + * ~~~~~~~~~~~ + * + * Sphinx JavaScript utilities for all documentation. + * + * :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS. + * :license: BSD, see LICENSE for details. + * + */ + +/** + * select a different prefix for underscore + */ +$u = _.noConflict(); + +/** + * make the code below compatible with browsers without + * an installed firebug like debugger +if (!window.console || !console.firebug) { + var names = ["log", "debug", "info", "warn", "error", "assert", "dir", + "dirxml", "group", "groupEnd", "time", "timeEnd", "count", "trace", + "profile", "profileEnd"]; + window.console = {}; + for (var i = 0; i < names.length; ++i) + window.console[names[i]] = function() {}; +} + */ + +/** + * small helper function to urldecode strings + */ +jQuery.urldecode = function(x) { + return decodeURIComponent(x).replace(/\+/g, ' '); +}; + +/** + * small helper function to urlencode strings + */ +jQuery.urlencode = encodeURIComponent; + +/** + * This function returns the parsed url parameters of the + * current request. Multiple values per key are supported, + * it will always return arrays of strings for the value parts. + */ +jQuery.getQueryParameters = function(s) { + if (typeof s == 'undefined') + s = document.location.search; + var parts = s.substr(s.indexOf('?') + 1).split('&'); + var result = {}; + for (var i = 0; i < parts.length; i++) { + var tmp = parts[i].split('=', 2); + var key = jQuery.urldecode(tmp[0]); + var value = jQuery.urldecode(tmp[1]); + if (key in result) + result[key].push(value); + else + result[key] = [value]; + } + return result; +}; + +/** + * highlight a given string on a jquery object by wrapping it in + * span elements with the given class name. + */ +jQuery.fn.highlightText = function(text, className) { + function highlight(node) { + if (node.nodeType == 3) { + var val = node.nodeValue; + var pos = val.toLowerCase().indexOf(text); + if (pos >= 0 && !jQuery(node.parentNode).hasClass(className)) { + var span = document.createElement("span"); + span.className = className; + span.appendChild(document.createTextNode(val.substr(pos, text.length))); + node.parentNode.insertBefore(span, node.parentNode.insertBefore( + document.createTextNode(val.substr(pos + text.length)), + node.nextSibling)); + node.nodeValue = val.substr(0, pos); + } + } + else if (!jQuery(node).is("button, select, textarea")) { + jQuery.each(node.childNodes, function() { + highlight(this); + }); + } + } + return this.each(function() { + highlight(this); + }); +}; + +/** + * Small JavaScript module for the documentation. + */ +var Documentation = { + + init : function() { + this.fixFirefoxAnchorBug(); + this.highlightSearchWords(); + this.initIndexTable(); + }, + + /** + * i18n support + */ + TRANSLATIONS : {}, + PLURAL_EXPR : function(n) { return n == 1 ? 0 : 1; }, + LOCALE : 'unknown', + + // gettext and ngettext don't access this so that the functions + // can safely bound to a different name (_ = Documentation.gettext) + gettext : function(string) { + var translated = Documentation.TRANSLATIONS[string]; + if (typeof translated == 'undefined') + return string; + return (typeof translated == 'string') ? translated : translated[0]; + }, + + ngettext : function(singular, plural, n) { + var translated = Documentation.TRANSLATIONS[singular]; + if (typeof translated == 'undefined') + return (n == 1) ? singular : plural; + return translated[Documentation.PLURALEXPR(n)]; + }, + + addTranslations : function(catalog) { + for (var key in catalog.messages) + this.TRANSLATIONS[key] = catalog.messages[key]; + this.PLURAL_EXPR = new Function('n', 'return +(' + catalog.plural_expr + ')'); + this.LOCALE = catalog.locale; + }, + + /** + * add context elements like header anchor links + */ + addContextElements : function() { + $('div[id] > :header:first').each(function() { + $('\u00B6'). + attr('href', '#' + this.id). + attr('title', _('Permalink to this headline')). + appendTo(this); + }); + $('dt[id]').each(function() { + $('\u00B6'). + attr('href', '#' + this.id). + attr('title', _('Permalink to this definition')). + appendTo(this); + }); + }, + + /** + * workaround a firefox stupidity + */ + fixFirefoxAnchorBug : function() { + if (document.location.hash && $.browser.mozilla) + window.setTimeout(function() { + document.location.href += ''; + }, 10); + }, + + /** + * highlight the search words provided in the url in the text + */ + highlightSearchWords : function() { + var params = $.getQueryParameters(); + var terms = (params.highlight) ? params.highlight[0].split(/\s+/) : []; + if (terms.length) { + var body = $('div.body'); + if (!body.length) { + body = $('body'); + } + window.setTimeout(function() { + $.each(terms, function() { + body.highlightText(this.toLowerCase(), 'highlighted'); + }); + }, 10); + $('') + .appendTo($('#searchbox')); + } + }, + + /** + * init the domain index toggle buttons + */ + initIndexTable : function() { + var togglers = $('img.toggler').click(function() { + var src = $(this).attr('src'); + var idnum = $(this).attr('id').substr(7); + $('tr.cg-' + idnum).toggle(); + if (src.substr(-9) == 'minus.png') + $(this).attr('src', src.substr(0, src.length-9) + 'plus.png'); + else + $(this).attr('src', src.substr(0, src.length-8) + 'minus.png'); + }).css('display', ''); + if (DOCUMENTATION_OPTIONS.COLLAPSE_INDEX) { + togglers.click(); + } + }, + + /** + * helper function to hide the search marks again + */ + hideSearchWords : function() { + $('#searchbox .highlight-link').fadeOut(300); + $('span.highlighted').removeClass('highlighted'); + }, + + /** + * make the url absolute + */ + makeURL : function(relativeURL) { + return DOCUMENTATION_OPTIONS.URL_ROOT + '/' + relativeURL; + }, + + /** + * get the current relative url + */ + getCurrentURL : function() { + var path = document.location.pathname; + var parts = path.split(/\//); + $.each(DOCUMENTATION_OPTIONS.URL_ROOT.split(/\//), function() { + if (this == '..') + parts.pop(); + }); + var url = parts.join('/'); + return path.substring(url.lastIndexOf('/') + 1, path.length - 1); + } +}; + +// quick alias for translations +_ = Documentation.gettext; + +$(document).ready(function() { + Documentation.init(); +}); diff --git a/t/recipes/checks/cruft/cruft-sphinx-documentation/build-spec/orig/src/sphinx-1.22/_build/html/_static/down-pressed.png b/t/recipes/checks/cruft/cruft-sphinx-documentation/build-spec/orig/src/sphinx-1.22/_build/html/_static/down-pressed.png new file mode 100644 index 0000000..6f7ad78 Binary files /dev/null and b/t/recipes/checks/cruft/cruft-sphinx-documentation/build-spec/orig/src/sphinx-1.22/_build/html/_static/down-pressed.png differ diff --git a/t/recipes/checks/cruft/cruft-sphinx-documentation/build-spec/orig/src/sphinx-1.22/_build/html/_static/down.png b/t/recipes/checks/cruft/cruft-sphinx-documentation/build-spec/orig/src/sphinx-1.22/_build/html/_static/down.png new file mode 100644 index 0000000..3003a88 Binary files /dev/null and b/t/recipes/checks/cruft/cruft-sphinx-documentation/build-spec/orig/src/sphinx-1.22/_build/html/_static/down.png differ diff --git a/t/recipes/checks/cruft/cruft-sphinx-documentation/build-spec/orig/src/sphinx-1.22/_build/html/_static/file.png b/t/recipes/checks/cruft/cruft-sphinx-documentation/build-spec/orig/src/sphinx-1.22/_build/html/_static/file.png new file mode 100644 index 0000000..d18082e Binary files /dev/null and b/t/recipes/checks/cruft/cruft-sphinx-documentation/build-spec/orig/src/sphinx-1.22/_build/html/_static/file.png differ diff --git a/t/recipes/checks/cruft/cruft-sphinx-documentation/build-spec/orig/src/sphinx-1.22/_build/html/_static/jquery.js b/t/recipes/checks/cruft/cruft-sphinx-documentation/build-spec/orig/src/sphinx-1.22/_build/html/_static/jquery.js new file mode 100644 index 0000000..25e1e33 --- /dev/null +++ b/t/recipes/checks/cruft/cruft-sphinx-documentation/build-spec/orig/src/sphinx-1.22/_build/html/_static/jquery.js @@ -0,0 +1,9404 @@ +/*! + * jQuery JavaScript Library v1.7.2 + * http://jquery.com/ + * + * Copyright 2011, John Resig + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * Includes Sizzle.js + * http://sizzlejs.com/ + * Copyright 2011, The Dojo Foundation + * Released under the MIT, BSD, and GPL Licenses. + * + * Date: Thu Aug 1 23:20:30 BRT 2013 + */ +(function( window, undefined ) { + +// Use the correct document accordingly with window argument (sandbox) +var document = window.document, + navigator = window.navigator, + location = window.location; +var jQuery = (function() { + +// Define a local copy of jQuery +var jQuery = function( selector, context ) { + // The jQuery object is actually just the init constructor 'enhanced' + return new jQuery.fn.init( selector, context, rootjQuery ); + }, + + // Map over jQuery in case of overwrite + _jQuery = window.jQuery, + + // Map over the $ in case of overwrite + _$ = window.$, + + // A central reference to the root jQuery(document) + rootjQuery, + + // A simple way to check for HTML strings or ID strings + // Prioritize #id over to avoid XSS via location.hash (#9521) + quickExpr = /^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/, + + // Check if a string has a non-whitespace character in it + rnotwhite = /\S/, + + // Used for trimming whitespace + trimLeft = /^\s+/, + trimRight = /\s+$/, + + // Match a standalone tag + rsingleTag = /^<(\w+)\s*\/?>(?:<\/\1>)?$/, + + // JSON RegExp + rvalidchars = /^[\],:{}\s]*$/, + rvalidescape = /\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g, + rvalidtokens = /"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g, + rvalidbraces = /(?:^|:|,)(?:\s*\[)+/g, + + // Useragent RegExp + rwebkit = /(webkit)[ \/]([\w.]+)/, + ropera = /(opera)(?:.*version)?[ \/]([\w.]+)/, + rmsie = /(msie) ([\w.]+)/, + rmozilla = /(mozilla)(?:.*? rv:([\w.]+))?/, + + // Matches dashed string for camelizing + rdashAlpha = /-([a-z]|[0-9])/ig, + rmsPrefix = /^-ms-/, + + // Used by jQuery.camelCase as callback to replace() + fcamelCase = function( all, letter ) { + return ( letter + "" ).toUpperCase(); + }, + + // Keep a UserAgent string for use with jQuery.browser + userAgent = navigator.userAgent, + + // For matching the engine and version of the browser + browserMatch, + + // The deferred used on DOM ready + readyList, + + // The ready event handler + DOMContentLoaded, + + // Save a reference to some core methods + toString = Object.prototype.toString, + hasOwn = Object.prototype.hasOwnProperty, + push = Array.prototype.push, + slice = Array.prototype.slice, + trim = String.prototype.trim, + indexOf = Array.prototype.indexOf, + + // [[Class]] -> type pairs + class2type = {}; + +jQuery.fn = jQuery.prototype = { + constructor: jQuery, + init: function( selector, context, rootjQuery ) { + var match, elem, ret, doc; + + // Handle $(""), $(null), or $(undefined) + if ( !selector ) { + return this; + } + + // Handle $(DOMElement) + if ( selector.nodeType ) { + this.context = this[0] = selector; + this.length = 1; + return this; + } + + // The body element only exists once, optimize finding it + if ( selector === "body" && !context && document.body ) { + this.context = document; + this[0] = document.body; + this.selector = selector; + this.length = 1; + return this; + } + + // Handle HTML strings + if ( typeof selector === "string" ) { + // Are we dealing with HTML string or an ID? + if ( selector.charAt(0) === "<" && selector.charAt( selector.length - 1 ) === ">" && selector.length >= 3 ) { + // Assume that strings that start and end with <> are HTML and skip the regex check + match = [ null, selector, null ]; + + } else { + match = quickExpr.exec( selector ); + } + + // Verify a match, and that no context was specified for #id + if ( match && (match[1] || !context) ) { + + // HANDLE: $(html) -> $(array) + if ( match[1] ) { + context = context instanceof jQuery ? context[0] : context; + doc = ( context ? context.ownerDocument || context : document ); + + // If a single string is passed in and it's a single tag + // just do a createElement and skip the rest + ret = rsingleTag.exec( selector ); + + if ( ret ) { + if ( jQuery.isPlainObject( context ) ) { + selector = [ document.createElement( ret[1] ) ]; + jQuery.fn.attr.call( selector, context, true ); + + } else { + selector = [ doc.createElement( ret[1] ) ]; + } + + } else { + ret = jQuery.buildFragment( [ match[1] ], [ doc ] ); + selector = ( ret.cacheable ? jQuery.clone(ret.fragment) : ret.fragment ).childNodes; + } + + return jQuery.merge( this, selector ); + + // HANDLE: $("#id") + } else { + elem = document.getElementById( match[2] ); + + // Check parentNode to catch when Blackberry 4.6 returns + // nodes that are no longer in the document #6963 + if ( elem && elem.parentNode ) { + // Handle the case where IE and Opera return items + // by name instead of ID + if ( elem.id !== match[2] ) { + return rootjQuery.find( selector ); + } + + // Otherwise, we inject the element directly into the jQuery object + this.length = 1; + this[0] = elem; + } + + this.context = document; + this.selector = selector; + return this; + } + + // HANDLE: $(expr, $(...)) + } else if ( !context || context.jquery ) { + return ( context || rootjQuery ).find( selector ); + + // HANDLE: $(expr, context) + // (which is just equivalent to: $(context).find(expr) + } else { + return this.constructor( context ).find( selector ); + } + + // HANDLE: $(function) + // Shortcut for document ready + } else if ( jQuery.isFunction( selector ) ) { + return rootjQuery.ready( selector ); + } + + if ( selector.selector !== undefined ) { + this.selector = selector.selector; + this.context = selector.context; + } + + return jQuery.makeArray( selector, this ); + }, + + // Start with an empty selector + selector: "", + + // The current version of jQuery being used + jquery: "1.7.2", + + // The default length of a jQuery object is 0 + length: 0, + + // The number of elements contained in the matched element set + size: function() { + return this.length; + }, + + toArray: function() { + return slice.call( this, 0 ); + }, + + // Get the Nth element in the matched element set OR + // Get the whole matched element set as a clean array + get: function( num ) { + return num == null ? + + // Return a 'clean' array + this.toArray() : + + // Return just the object + ( num < 0 ? this[ this.length + num ] : this[ num ] ); + }, + + // Take an array of elements and push it onto the stack + // (returning the new matched element set) + pushStack: function( elems, name, selector ) { + // Build a new jQuery matched element set + var ret = this.constructor(); + + if ( jQuery.isArray( elems ) ) { + push.apply( ret, elems ); + + } else { + jQuery.merge( ret, elems ); + } + + // Add the old object onto the stack (as a reference) + ret.prevObject = this; + + ret.context = this.context; + + if ( name === "find" ) { + ret.selector = this.selector + ( this.selector ? " " : "" ) + selector; + } else if ( name ) { + ret.selector = this.selector + "." + name + "(" + selector + ")"; + } + + // Return the newly-formed element set + return ret; + }, + + // Execute a callback for every element in the matched set. + // (You can seed the arguments with an array of args, but this is + // only used internally.) + each: function( callback, args ) { + return jQuery.each( this, callback, args ); + }, + + ready: function( fn ) { + // Attach the listeners + jQuery.bindReady(); + + // Add the callback + readyList.add( fn ); + + return this; + }, + + eq: function( i ) { + i = +i; + return i === -1 ? + this.slice( i ) : + this.slice( i, i + 1 ); + }, + + first: function() { + return this.eq( 0 ); + }, + + last: function() { + return this.eq( -1 ); + }, + + slice: function() { + return this.pushStack( slice.apply( this, arguments ), + "slice", slice.call(arguments).join(",") ); + }, + + map: function( callback ) { + return this.pushStack( jQuery.map(this, function( elem, i ) { + return callback.call( elem, i, elem ); + })); + }, + + end: function() { + return this.prevObject || this.constructor(null); + }, + + // For internal use only. + // Behaves like an Array's method, not like a jQuery method. + push: push, + sort: [].sort, + splice: [].splice +}; + +// Give the init function the jQuery prototype for later instantiation +jQuery.fn.init.prototype = jQuery.fn; + +jQuery.extend = jQuery.fn.extend = function() { + var options, name, src, copy, copyIsArray, clone, + target = arguments[0] || {}, + i = 1, + length = arguments.length, + deep = false; + + // Handle a deep copy situation + if ( typeof target === "boolean" ) { + deep = target; + target = arguments[1] || {}; + // skip the boolean and the target + i = 2; + } + + // Handle case when target is a string or something (possible in deep copy) + if ( typeof target !== "object" && !jQuery.isFunction(target) ) { + target = {}; + } + + // extend jQuery itself if only one argument is passed + if ( length === i ) { + target = this; + --i; + } + + for ( ; i < length; i++ ) { + // Only deal with non-null/undefined values + if ( (options = arguments[ i ]) != null ) { + // Extend the base object + for ( name in options ) { + src = target[ name ]; + copy = options[ name ]; + + // Prevent never-ending loop + if ( target === copy ) { + continue; + } + + // Recurse if we're merging plain objects or arrays + if ( deep && copy && ( jQuery.isPlainObject(copy) || (copyIsArray = jQuery.isArray(copy)) ) ) { + if ( copyIsArray ) { + copyIsArray = false; + clone = src && jQuery.isArray(src) ? src : []; + + } else { + clone = src && jQuery.isPlainObject(src) ? src : {}; + } + + // Never move original objects, clone them + target[ name ] = jQuery.extend( deep, clone, copy ); + + // Don't bring in undefined values + } else if ( copy !== undefined ) { + target[ name ] = copy; + } + } + } + } + + // Return the modified object + return target; +}; + +jQuery.extend({ + noConflict: function( deep ) { + if ( window.$ === jQuery ) { + window.$ = _$; + } + + if ( deep && window.jQuery === jQuery ) { + window.jQuery = _jQuery; + } + + return jQuery; + }, + + // Is the DOM ready to be used? Set to true once it occurs. + isReady: false, + + // A counter to track how many items to wait for before + // the ready event fires. See #6781 + readyWait: 1, + + // Hold (or release) the ready event + holdReady: function( hold ) { + if ( hold ) { + jQuery.readyWait++; + } else { + jQuery.ready( true ); + } + }, + + // Handle when the DOM is ready + ready: function( wait ) { + // Either a released hold or an DOMready/load event and not yet ready + if ( (wait === true && !--jQuery.readyWait) || (wait !== true && !jQuery.isReady) ) { + // Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443). + if ( !document.body ) { + return setTimeout( jQuery.ready, 1 ); + } + + // Remember that the DOM is ready + jQuery.isReady = true; + + // If a normal DOM Ready event fired, decrement, and wait if need be + if ( wait !== true && --jQuery.readyWait > 0 ) { + return; + } + + // If there are functions bound, to execute + readyList.fireWith( document, [ jQuery ] ); + + // Trigger any bound ready events + if ( jQuery.fn.trigger ) { + jQuery( document ).trigger( "ready" ).off( "ready" ); + } + } + }, + + bindReady: function() { + if ( readyList ) { + return; + } + + readyList = jQuery.Callbacks( "once memory" ); + + // Catch cases where $(document).ready() is called after the + // browser event has already occurred. + if ( document.readyState === "complete" ) { + // Handle it asynchronously to allow scripts the opportunity to delay ready + return setTimeout( jQuery.ready, 1 ); + } + + // Mozilla, Opera and webkit nightlies currently support this event + if ( document.addEventListener ) { + // Use the handy event callback + document.addEventListener( "DOMContentLoaded", DOMContentLoaded, false ); + + // A fallback to window.onload, that will always work + window.addEventListener( "load", jQuery.ready, false ); + + // If IE event model is used + } else if ( document.attachEvent ) { + // ensure firing before onload, + // maybe late but safe also for iframes + document.attachEvent( "onreadystatechange", DOMContentLoaded ); + + // A fallback to window.onload, that will always work + window.attachEvent( "onload", jQuery.ready ); + + // If IE and not a frame + // continually check to see if the document is ready + var toplevel = false; + + try { + toplevel = window.frameElement == null; + } catch(e) {} + + if ( document.documentElement.doScroll && toplevel ) { + doScrollCheck(); + } + } + }, + + // See test/unit/core.js for details concerning isFunction. + // Since version 1.3, DOM methods and functions like alert + // aren't supported. They return false on IE (#2968). + isFunction: function( obj ) { + return jQuery.type(obj) === "function"; + }, + + isArray: Array.isArray || function( obj ) { + return jQuery.type(obj) === "array"; + }, + + isWindow: function( obj ) { + return obj != null && obj == obj.window; + }, + + isNumeric: function( obj ) { + return !isNaN( parseFloat(obj) ) && isFinite( obj ); + }, + + type: function( obj ) { + return obj == null ? + String( obj ) : + class2type[ toString.call(obj) ] || "object"; + }, + + isPlainObject: function( obj ) { + // Must be an Object. + // Because of IE, we also have to check the presence of the constructor property. + // Make sure that DOM nodes and window objects don't pass through, as well + if ( !obj || jQuery.type(obj) !== "object" || obj.nodeType || jQuery.isWindow( obj ) ) { + return false; + } + + try { + // Not own constructor property must be Object + if ( obj.constructor && + !hasOwn.call(obj, "constructor") && + !hasOwn.call(obj.constructor.prototype, "isPrototypeOf") ) { + return false; + } + } catch ( e ) { + // IE8,9 Will throw exceptions on certain host objects #9897 + return false; + } + + // Own properties are enumerated firstly, so to speed up, + // if last one is own, then all properties are own. + + var key; + for ( key in obj ) {} + + return key === undefined || hasOwn.call( obj, key ); + }, + + isEmptyObject: function( obj ) { + for ( var name in obj ) { + return false; + } + return true; + }, + + error: function( msg ) { + throw new Error( msg ); + }, + + parseJSON: function( data ) { + if ( typeof data !== "string" || !data ) { + return null; + } + + // Make sure leading/trailing whitespace is removed (IE can't handle it) + data = jQuery.trim( data ); + + // Attempt to parse using the native JSON parser first + if ( window.JSON && window.JSON.parse ) { + return window.JSON.parse( data ); + } + + // Make sure the incoming data is actual JSON + // Logic borrowed from http://json.org/json2.js + if ( rvalidchars.test( data.replace( rvalidescape, "@" ) + .replace( rvalidtokens, "]" ) + .replace( rvalidbraces, "")) ) { + + return ( new Function( "return " + data ) )(); + + } + jQuery.error( "Invalid JSON: " + data ); + }, + + // Cross-browser xml parsing + parseXML: function( data ) { + if ( typeof data !== "string" || !data ) { + return null; + } + var xml, tmp; + try { + if ( window.DOMParser ) { // Standard + tmp = new DOMParser(); + xml = tmp.parseFromString( data , "text/xml" ); + } else { // IE + xml = new ActiveXObject( "Microsoft.XMLDOM" ); + xml.async = "false"; + xml.loadXML( data ); + } + } catch( e ) { + xml = undefined; + } + if ( !xml || !xml.documentElement || xml.getElementsByTagName( "parsererror" ).length ) { + jQuery.error( "Invalid XML: " + data ); + } + return xml; + }, + + noop: function() {}, + + // Evaluates a script in a global context + // Workarounds based on findings by Jim Driscoll + // http://weblogs.java.net/blog/driscoll/archive/2009/09/08/eval-javascript-global-context + globalEval: function( data ) { + if ( data && rnotwhite.test( data ) ) { + // We use execScript on Internet Explorer + // We use an anonymous function so that context is window + // rather than jQuery in Firefox + ( window.execScript || function( data ) { + window[ "eval" ].call( window, data ); + } )( data ); + } + }, + + // Convert dashed to camelCase; used by the css and data modules + // Microsoft forgot to hump their vendor prefix (#9572) + camelCase: function( string ) { + return string.replace( rmsPrefix, "ms-" ).replace( rdashAlpha, fcamelCase ); + }, + + nodeName: function( elem, name ) { + return elem.nodeName && elem.nodeName.toUpperCase() === name.toUpperCase(); + }, + + // args is for internal usage only + each: function( object, callback, args ) { + var name, i = 0, + length = object.length, + isObj = length === undefined || jQuery.isFunction( object ); + + if ( args ) { + if ( isObj ) { + for ( name in object ) { + if ( callback.apply( object[ name ], args ) === false ) { + break; + } + } + } else { + for ( ; i < length; ) { + if ( callback.apply( object[ i++ ], args ) === false ) { + break; + } + } + } + + // A special, fast, case for the most common use of each + } else { + if ( isObj ) { + for ( name in object ) { + if ( callback.call( object[ name ], name, object[ name ] ) === false ) { + break; + } + } + } else { + for ( ; i < length; ) { + if ( callback.call( object[ i ], i, object[ i++ ] ) === false ) { + break; + } + } + } + } + + return object; + }, + + // Use native String.trim function wherever possible + trim: trim ? + function( text ) { + return text == null ? + "" : + trim.call( text ); + } : + + // Otherwise use our own trimming functionality + function( text ) { + return text == null ? + "" : + text.toString().replace( trimLeft, "" ).replace( trimRight, "" ); + }, + + // results is for internal usage only + makeArray: function( array, results ) { + var ret = results || []; + + if ( array != null ) { + // The window, strings (and functions) also have 'length' + // Tweaked logic slightly to handle Blackberry 4.7 RegExp issues #6930 + var type = jQuery.type( array ); + + if ( array.length == null || type === "string" || type === "function" || type === "regexp" || jQuery.isWindow( array ) ) { + push.call( ret, array ); + } else { + jQuery.merge( ret, array ); + } + } + + return ret; + }, + + inArray: function( elem, array, i ) { + var len; + + if ( array ) { + if ( indexOf ) { + return indexOf.call( array, elem, i ); + } + + len = array.length; + i = i ? i < 0 ? Math.max( 0, len + i ) : i : 0; + + for ( ; i < len; i++ ) { + // Skip accessing in sparse arrays + if ( i in array && array[ i ] === elem ) { + return i; + } + } + } + + return -1; + }, + + merge: function( first, second ) { + var i = first.length, + j = 0; + + if ( typeof second.length === "number" ) { + for ( var l = second.length; j < l; j++ ) { + first[ i++ ] = second[ j ]; + } + + } else { + while ( second[j] !== undefined ) { + first[ i++ ] = second[ j++ ]; + } + } + + first.length = i; + + return first; + }, + + grep: function( elems, callback, inv ) { + var ret = [], retVal; + inv = !!inv; + + // Go through the array, only saving the items + // that pass the validator function + for ( var i = 0, length = elems.length; i < length; i++ ) { + retVal = !!callback( elems[ i ], i ); + if ( inv !== retVal ) { + ret.push( elems[ i ] ); + } + } + + return ret; + }, + + // arg is for internal usage only + map: function( elems, callback, arg ) { + var value, key, ret = [], + i = 0, + length = elems.length, + // jquery objects are treated as arrays + isArray = elems instanceof jQuery || length !== undefined && typeof length === "number" && ( ( length > 0 && elems[ 0 ] && elems[ length -1 ] ) || length === 0 || jQuery.isArray( elems ) ) ; + + // Go through the array, translating each of the items to their + if ( isArray ) { + for ( ; i < length; i++ ) { + value = callback( elems[ i ], i, arg ); + + if ( value != null ) { + ret[ ret.length ] = value; + } + } + + // Go through every key on the object, + } else { + for ( key in elems ) { + value = callback( elems[ key ], key, arg ); + + if ( value != null ) { + ret[ ret.length ] = value; + } + } + } + + // Flatten any nested arrays + return ret.concat.apply( [], ret ); + }, + + // A global GUID counter for objects + guid: 1, + + // Bind a function to a context, optionally partially applying any + // arguments. + proxy: function( fn, context ) { + if ( typeof context === "string" ) { + var tmp = fn[ context ]; + context = fn; + fn = tmp; + } + + // Quick check to determine if target is callable, in the spec + // this throws a TypeError, but we will just return undefined. + if ( !jQuery.isFunction( fn ) ) { + return undefined; + } + + // Simulated bind + var args = slice.call( arguments, 2 ), + proxy = function() { + return fn.apply( context, args.concat( slice.call( arguments ) ) ); + }; + + // Set the guid of unique handler to the same of original handler, so it can be removed + proxy.guid = fn.guid = fn.guid || proxy.guid || jQuery.guid++; + + return proxy; + }, + + // Mutifunctional method to get and set values to a collection + // The value/s can optionally be executed if it's a function + access: function( elems, fn, key, value, chainable, emptyGet, pass ) { + var exec, + bulk = key == null, + i = 0, + length = elems.length; + + // Sets many values + if ( key && typeof key === "object" ) { + for ( i in key ) { + jQuery.access( elems, fn, i, key[i], 1, emptyGet, value ); + } + chainable = 1; + + // Sets one value + } else if ( value !== undefined ) { + // Optionally, function values get executed if exec is true + exec = pass === undefined && jQuery.isFunction( value ); + + if ( bulk ) { + // Bulk operations only iterate when executing function values + if ( exec ) { + exec = fn; + fn = function( elem, key, value ) { + return exec.call( jQuery( elem ), value ); + }; + + // Otherwise they run against the entire set + } else { + fn.call( elems, value ); + fn = null; + } + } + + if ( fn ) { + for (; i < length; i++ ) { + fn( elems[i], key, exec ? value.call( elems[i], i, fn( elems[i], key ) ) : value, pass ); + } + } + + chainable = 1; + } + + return chainable ? + elems : + + // Gets + bulk ? + fn.call( elems ) : + length ? fn( elems[0], key ) : emptyGet; + }, + + now: function() { + return ( new Date() ).getTime(); + }, + + // Use of jQuery.browser is frowned upon. + // More details: http://docs.jquery.com/Utilities/jQuery.browser + uaMatch: function( ua ) { + ua = ua.toLowerCase(); + + var match = rwebkit.exec( ua ) || + ropera.exec( ua ) || + rmsie.exec( ua ) || + ua.indexOf("compatible") < 0 && rmozilla.exec( ua ) || + []; + + return { browser: match[1] || "", version: match[2] || "0" }; + }, + + sub: function() { + function jQuerySub( selector, context ) { + return new jQuerySub.fn.init( selector, context ); + } + jQuery.extend( true, jQuerySub, this ); + jQuerySub.superclass = this; + jQuerySub.fn = jQuerySub.prototype = this(); + jQuerySub.fn.constructor = jQuerySub; + jQuerySub.sub = this.sub; + jQuerySub.fn.init = function init( selector, context ) { + if ( context && context instanceof jQuery && !(context instanceof jQuerySub) ) { + context = jQuerySub( context ); + } + + return jQuery.fn.init.call( this, selector, context, rootjQuerySub ); + }; + jQuerySub.fn.init.prototype = jQuerySub.fn; + var rootjQuerySub = jQuerySub(document); + return jQuerySub; + }, + + browser: {} +}); + +// Populate the class2type map +jQuery.each("Boolean Number String Function Array Date RegExp Object".split(" "), function(i, name) { + class2type[ "[object " + name + "]" ] = name.toLowerCase(); +}); + +browserMatch = jQuery.uaMatch( userAgent ); +if ( browserMatch.browser ) { + jQuery.browser[ browserMatch.browser ] = true; + jQuery.browser.version = browserMatch.version; +} + +// Deprecated, use jQuery.browser.webkit instead +if ( jQuery.browser.webkit ) { + jQuery.browser.safari = true; +} + +// IE doesn't match non-breaking spaces with \s +if ( rnotwhite.test( "\xA0" ) ) { + trimLeft = /^[\s\xA0]+/; + trimRight = /[\s\xA0]+$/; +} + +// All jQuery objects should point back to these +rootjQuery = jQuery(document); + +// Cleanup functions for the document ready method +if ( document.addEventListener ) { + DOMContentLoaded = function() { + document.removeEventListener( "DOMContentLoaded", DOMContentLoaded, false ); + jQuery.ready(); + }; + +} else if ( document.attachEvent ) { + DOMContentLoaded = function() { + // Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443). + if ( document.readyState === "complete" ) { + document.detachEvent( "onreadystatechange", DOMContentLoaded ); + jQuery.ready(); + } + }; +} + +// The DOM ready check for Internet Explorer +function doScrollCheck() { + if ( jQuery.isReady ) { + return; + } + + try { + // If IE is used, use the trick by Diego Perini + // http://javascript.nwbox.com/IEContentLoaded/ + document.documentElement.doScroll("left"); + } catch(e) { + setTimeout( doScrollCheck, 1 ); + return; + } + + // and execute any waiting functions + jQuery.ready(); +} + +return jQuery; + +})(); + + +// String to Object flags format cache +var flagsCache = {}; + +// Convert String-formatted flags into Object-formatted ones and store in cache +function createFlags( flags ) { + var object = flagsCache[ flags ] = {}, + i, length; + flags = flags.split( /\s+/ ); + for ( i = 0, length = flags.length; i < length; i++ ) { + object[ flags[i] ] = true; + } + return object; +} + +/* + * Create a callback list using the following parameters: + * + * flags: an optional list of space-separated flags that will change how + * the callback list behaves + * + * By default a callback list will act like an event callback list and can be + * "fired" multiple times. + * + * Possible flags: + * + * once: will ensure the callback list can only be fired once (like a Deferred) + * + * memory: will keep track of previous values and will call any callback added + * after the list has been fired right away with the latest "memorized" + * values (like a Deferred) + * + * unique: will ensure a callback can only be added once (no duplicate in the list) + * + * stopOnFalse: interrupt callings when a callback returns false + * + */ +jQuery.Callbacks = function( flags ) { + + // Convert flags from String-formatted to Object-formatted + // (we check in cache first) + flags = flags ? ( flagsCache[ flags ] || createFlags( flags ) ) : {}; + + var // Actual callback list + list = [], + // Stack of fire calls for repeatable lists + stack = [], + // Last fire value (for non-forgettable lists) + memory, + // Flag to know if list was already fired + fired, + // Flag to know if list is currently firing + firing, + // First callback to fire (used internally by add and fireWith) + firingStart, + // End of the loop when firing + firingLength, + // Index of currently firing callback (modified by remove if needed) + firingIndex, + // Add one or several callbacks to the list + add = function( args ) { + var i, + length, + elem, + type, + actual; + for ( i = 0, length = args.length; i < length; i++ ) { + elem = args[ i ]; + type = jQuery.type( elem ); + if ( type === "array" ) { + // Inspect recursively + add( elem ); + } else if ( type === "function" ) { + // Add if not in unique mode and callback is not in + if ( !flags.unique || !self.has( elem ) ) { + list.push( elem ); + } + } + } + }, + // Fire callbacks + fire = function( context, args ) { + args = args || []; + memory = !flags.memory || [ context, args ]; + fired = true; + firing = true; + firingIndex = firingStart || 0; + firingStart = 0; + firingLength = list.length; + for ( ; list && firingIndex < firingLength; firingIndex++ ) { + if ( list[ firingIndex ].apply( context, args ) === false && flags.stopOnFalse ) { + memory = true; // Mark as halted + break; + } + } + firing = false; + if ( list ) { + if ( !flags.once ) { + if ( stack && stack.length ) { + memory = stack.shift(); + self.fireWith( memory[ 0 ], memory[ 1 ] ); + } + } else if ( memory === true ) { + self.disable(); + } else { + list = []; + } + } + }, + // Actual Callbacks object + self = { + // Add a callback or a collection of callbacks to the list + add: function() { + if ( list ) { + var length = list.length; + add( arguments ); + // Do we need to add the callbacks to the + // current firing batch? + if ( firing ) { + firingLength = list.length; + // With memory, if we're not firing then + // we should call right away, unless previous + // firing was halted (stopOnFalse) + } else if ( memory && memory !== true ) { + firingStart = length; + fire( memory[ 0 ], memory[ 1 ] ); + } + } + return this; + }, + // Remove a callback from the list + remove: function() { + if ( list ) { + var args = arguments, + argIndex = 0, + argLength = args.length; + for ( ; argIndex < argLength ; argIndex++ ) { + for ( var i = 0; i < list.length; i++ ) { + if ( args[ argIndex ] === list[ i ] ) { + // Handle firingIndex and firingLength + if ( firing ) { + if ( i <= firingLength ) { + firingLength--; + if ( i <= firingIndex ) { + firingIndex--; + } + } + } + // Remove the element + list.splice( i--, 1 ); + // If we have some unicity property then + // we only need to do this once + if ( flags.unique ) { + break; + } + } + } + } + } + return this; + }, + // Control if a given callback is in the list + has: function( fn ) { + if ( list ) { + var i = 0, + length = list.length; + for ( ; i < length; i++ ) { + if ( fn === list[ i ] ) { + return true; + } + } + } + return false; + }, + // Remove all callbacks from the list + empty: function() { + list = []; + return this; + }, + // Have the list do nothing anymore + disable: function() { + list = stack = memory = undefined; + return this; + }, + // Is it disabled? + disabled: function() { + return !list; + }, + // Lock the list in its current state + lock: function() { + stack = undefined; + if ( !memory || memory === true ) { + self.disable(); + } + return this; + }, + // Is it locked? + locked: function() { + return !stack; + }, + // Call all callbacks with the given context and arguments + fireWith: function( context, args ) { + if ( stack ) { + if ( firing ) { + if ( !flags.once ) { + stack.push( [ context, args ] ); + } + } else if ( !( flags.once && memory ) ) { + fire( context, args ); + } + } + return this; + }, + // Call all the callbacks with the given arguments + fire: function() { + self.fireWith( this, arguments ); + return this; + }, + // To know if the callbacks have already been called at least once + fired: function() { + return !!fired; + } + }; + + return self; +}; + + + + +var // Static reference to slice + sliceDeferred = [].slice; + +jQuery.extend({ + + Deferred: function( func ) { + var doneList = jQuery.Callbacks( "once memory" ), + failList = jQuery.Callbacks( "once memory" ), + progressList = jQuery.Callbacks( "memory" ), + state = "pending", + lists = { + resolve: doneList, + reject: failList, + notify: progressList + }, + promise = { + done: doneList.add, + fail: failList.add, + progress: progressList.add, + + state: function() { + return state; + }, + + // Deprecated + isResolved: doneList.fired, + isRejected: failList.fired, + + then: function( doneCallbacks, failCallbacks, progressCallbacks ) { + deferred.done( doneCallbacks ).fail( failCallbacks ).progress( progressCallbacks ); + return this; + }, + always: function() { + deferred.done.apply( deferred, arguments ).fail.apply( deferred, arguments ); + return this; + }, + pipe: function( fnDone, fnFail, fnProgress ) { + return jQuery.Deferred(function( newDefer ) { + jQuery.each( { + done: [ fnDone, "resolve" ], + fail: [ fnFail, "reject" ], + progress: [ fnProgress, "notify" ] + }, function( handler, data ) { + var fn = data[ 0 ], + action = data[ 1 ], + returned; + if ( jQuery.isFunction( fn ) ) { + deferred[ handler ](function() { + returned = fn.apply( this, arguments ); + if ( returned && jQuery.isFunction( returned.promise ) ) { + returned.promise().then( newDefer.resolve, newDefer.reject, newDefer.notify ); + } else { + newDefer[ action + "With" ]( this === deferred ? newDefer : this, [ returned ] ); + } + }); + } else { + deferred[ handler ]( newDefer[ action ] ); + } + }); + }).promise(); + }, + // Get a promise for this deferred + // If obj is provided, the promise aspect is added to the object + promise: function( obj ) { + if ( obj == null ) { + obj = promise; + } else { + for ( var key in promise ) { + obj[ key ] = promise[ key ]; + } + } + return obj; + } + }, + deferred = promise.promise({}), + key; + + for ( key in lists ) { + deferred[ key ] = lists[ key ].fire; + deferred[ key + "With" ] = lists[ key ].fireWith; + } + + // Handle state + deferred.done( function() { + state = "resolved"; + }, failList.disable, progressList.lock ).fail( function() { + state = "rejected"; + }, doneList.disable, progressList.lock ); + + // Call given func if any + if ( func ) { + func.call( deferred, deferred ); + } + + // All done! + return deferred; + }, + + // Deferred helper + when: function( firstParam ) { + var args = sliceDeferred.call( arguments, 0 ), + i = 0, + length = args.length, + pValues = new Array( length ), + count = length, + pCount = length, + deferred = length <= 1 && firstParam && jQuery.isFunction( firstParam.promise ) ? + firstParam : + jQuery.Deferred(), + promise = deferred.promise(); + function resolveFunc( i ) { + return function( value ) { + args[ i ] = arguments.length > 1 ? sliceDeferred.call( arguments, 0 ) : value; + if ( !( --count ) ) { + deferred.resolveWith( deferred, args ); + } + }; + } + function progressFunc( i ) { + return function( value ) { + pValues[ i ] = arguments.length > 1 ? sliceDeferred.call( arguments, 0 ) : value; + deferred.notifyWith( promise, pValues ); + }; + } + if ( length > 1 ) { + for ( ; i < length; i++ ) { + if ( args[ i ] && args[ i ].promise && jQuery.isFunction( args[ i ].promise ) ) { + args[ i ].promise().then( resolveFunc(i), deferred.reject, progressFunc(i) ); + } else { + --count; + } + } + if ( !count ) { + deferred.resolveWith( deferred, args ); + } + } else if ( deferred !== firstParam ) { + deferred.resolveWith( deferred, length ? [ firstParam ] : [] ); + } + return promise; + } +}); + + + + +jQuery.support = (function() { + + var support, + all, + a, + select, + opt, + input, + fragment, + tds, + events, + eventName, + i, + isSupported, + div = document.createElement( "div" ), + documentElement = document.documentElement; + + // Preliminary tests + div.setAttribute("className", "t"); + div.innerHTML = "
      a"; + + all = div.getElementsByTagName( "*" ); + a = div.getElementsByTagName( "a" )[ 0 ]; + + // Can't get basic test support + if ( !all || !all.length || !a ) { + return {}; + } + + // First batch of supports tests + select = document.createElement( "select" ); + opt = select.appendChild( document.createElement("option") ); + input = div.getElementsByTagName( "input" )[ 0 ]; + + support = { + // IE strips leading whitespace when .innerHTML is used + leadingWhitespace: ( div.firstChild.nodeType === 3 ), + + // Make sure that tbody elements aren't automatically inserted + // IE will insert them into empty tables + tbody: !div.getElementsByTagName("tbody").length, + + // Make sure that link elements get serialized correctly by innerHTML + // This requires a wrapper element in IE + htmlSerialize: !!div.getElementsByTagName("link").length, + + // Get the style information from getAttribute + // (IE uses .cssText instead) + style: /top/.test( a.getAttribute("style") ), + + // Make sure that URLs aren't manipulated + // (IE normalizes it by default) + hrefNormalized: ( a.getAttribute("href") === "/a" ), + + // Make sure that element opacity exists + // (IE uses filter instead) + // Use a regex to work around a WebKit issue. See #5145 + opacity: /^0.55/.test( a.style.opacity ), + + // Verify style float existence + // (IE uses styleFloat instead of cssFloat) + cssFloat: !!a.style.cssFloat, + + // Make sure that if no value is specified for a checkbox + // that it defaults to "on". + // (WebKit defaults to "" instead) + checkOn: ( input.value === "on" ), + + // Make sure that a selected-by-default option has a working selected property. + // (WebKit defaults to false instead of true, IE too, if it's in an optgroup) + optSelected: opt.selected, + + // Test setAttribute on camelCase class. If it works, we need attrFixes when doing get/setAttribute (ie6/7) + getSetAttribute: div.className !== "t", + + // Tests for enctype support on a form(#6743) + enctype: !!document.createElement("form").enctype, + + // Makes sure cloning an html5 element does not cause problems + // Where outerHTML is undefined, this still works + html5Clone: document.createElement("nav").cloneNode( true ).outerHTML !== "<:nav>", + + // Will be defined later + submitBubbles: true, + changeBubbles: true, + focusinBubbles: false, + deleteExpando: true, + noCloneEvent: true, + inlineBlockNeedsLayout: false, + shrinkWrapBlocks: false, + reliableMarginRight: true, + pixelMargin: true + }; + + // jQuery.boxModel DEPRECATED in 1.3, use jQuery.support.boxModel instead + jQuery.boxModel = support.boxModel = (document.compatMode === "CSS1Compat"); + + // Make sure checked status is properly cloned + input.checked = true; + support.noCloneChecked = input.cloneNode( true ).checked; + + // Make sure that the options inside disabled selects aren't marked as disabled + // (WebKit marks them as disabled) + select.disabled = true; + support.optDisabled = !opt.disabled; + + // Test to see if it's possible to delete an expando from an element + // Fails in Internet Explorer + try { + delete div.test; + } catch( e ) { + support.deleteExpando = false; + } + + if ( !div.addEventListener && div.attachEvent && div.fireEvent ) { + div.attachEvent( "onclick", function() { + // Cloning a node shouldn't copy over any + // bound event handlers (IE does this) + support.noCloneEvent = false; + }); + div.cloneNode( true ).fireEvent( "onclick" ); + } + + // Check if a radio maintains its value + // after being appended to the DOM + input = document.createElement("input"); + input.value = "t"; + input.setAttribute("type", "radio"); + support.radioValue = input.value === "t"; + + input.setAttribute("checked", "checked"); + + // #11217 - WebKit loses check when the name is after the checked attribute + input.setAttribute( "name", "t" ); + + div.appendChild( input ); + fragment = document.createDocumentFragment(); + fragment.appendChild( div.lastChild ); + + // WebKit doesn't clone checked state correctly in fragments + support.checkClone = fragment.cloneNode( true ).cloneNode( true ).lastChild.checked; + + // Check if a disconnected checkbox will retain its checked + // value of true after appended to the DOM (IE6/7) + support.appendChecked = input.checked; + + fragment.removeChild( input ); + fragment.appendChild( div ); + + // Technique from Juriy Zaytsev + // http://perfectionkills.com/detecting-event-support-without-browser-sniffing/ + // We only care about the case where non-standard event systems + // are used, namely in IE. Short-circuiting here helps us to + // avoid an eval call (in setAttribute) which can cause CSP + // to go haywire. See: https://developer.mozilla.org/en/Security/CSP + if ( div.attachEvent ) { + for ( i in { + submit: 1, + change: 1, + focusin: 1 + }) { + eventName = "on" + i; + isSupported = ( eventName in div ); + if ( !isSupported ) { + div.setAttribute( eventName, "return;" ); + isSupported = ( typeof div[ eventName ] === "function" ); + } + support[ i + "Bubbles" ] = isSupported; + } + } + + fragment.removeChild( div ); + + // Null elements to avoid leaks in IE + fragment = select = opt = div = input = null; + + // Run tests that need a body at doc ready + jQuery(function() { + var container, outer, inner, table, td, offsetSupport, + marginDiv, conMarginTop, style, html, positionTopLeftWidthHeight, + paddingMarginBorderVisibility, paddingMarginBorder, + body = document.getElementsByTagName("body")[0]; + + if ( !body ) { + // Return for frameset docs that don't have a body + return; + } + + conMarginTop = 1; + paddingMarginBorder = "padding:0;margin:0;border:"; + positionTopLeftWidthHeight = "position:absolute;top:0;left:0;width:1px;height:1px;"; + paddingMarginBorderVisibility = paddingMarginBorder + "0;visibility:hidden;"; + style = "style='" + positionTopLeftWidthHeight + paddingMarginBorder + "5px solid #000;"; + html = "
      " + + "" + + "
      "; + + container = document.createElement("div"); + container.style.cssText = paddingMarginBorderVisibility + "width:0;height:0;position:static;top:0;margin-top:" + conMarginTop + "px"; + body.insertBefore( container, body.firstChild ); + + // Construct the test element + div = document.createElement("div"); + container.appendChild( div ); + + // Check if table cells still have offsetWidth/Height when they are set + // to display:none and there are still other visible table cells in a + // table row; if so, offsetWidth/Height are not reliable for use when + // determining if an element has been hidden directly using + // display:none (it is still safe to use offsets if a parent element is + // hidden; don safety goggles and see bug #4512 for more information). + // (only IE 8 fails this test) + div.innerHTML = "
      t
      "; + tds = div.getElementsByTagName( "td" ); + isSupported = ( tds[ 0 ].offsetHeight === 0 ); + + tds[ 0 ].style.display = ""; + tds[ 1 ].style.display = "none"; + + // Check if empty table cells still have offsetWidth/Height + // (IE <= 8 fail this test) + support.reliableHiddenOffsets = isSupported && ( tds[ 0 ].offsetHeight === 0 ); + + // Check if div with explicit width and no margin-right incorrectly + // gets computed margin-right based on width of container. For more + // info see bug #3333 + // Fails in WebKit before Feb 2011 nightlies + // WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right + if ( window.getComputedStyle ) { + div.innerHTML = ""; + marginDiv = document.createElement( "div" ); + marginDiv.style.width = "0"; + marginDiv.style.marginRight = "0"; + div.style.width = "2px"; + div.appendChild( marginDiv ); + support.reliableMarginRight = + ( parseInt( ( window.getComputedStyle( marginDiv, null ) || { marginRight: 0 } ).marginRight, 10 ) || 0 ) === 0; + } + + if ( typeof div.style.zoom !== "undefined" ) { + // Check if natively block-level elements act like inline-block + // elements when setting their display to 'inline' and giving + // them layout + // (IE < 8 does this) + div.innerHTML = ""; + div.style.width = div.style.padding = "1px"; + div.style.border = 0; + div.style.overflow = "hidden"; + div.style.display = "inline"; + div.style.zoom = 1; + support.inlineBlockNeedsLayout = ( div.offsetWidth === 3 ); + + // Check if elements with layout shrink-wrap their children + // (IE 6 does this) + div.style.display = "block"; + div.style.overflow = "visible"; + div.innerHTML = "
      "; + support.shrinkWrapBlocks = ( div.offsetWidth !== 3 ); + } + + div.style.cssText = positionTopLeftWidthHeight + paddingMarginBorderVisibility; + div.innerHTML = html; + + outer = div.firstChild; + inner = outer.firstChild; + td = outer.nextSibling.firstChild.firstChild; + + offsetSupport = { + doesNotAddBorder: ( inner.offsetTop !== 5 ), + doesAddBorderForTableAndCells: ( td.offsetTop === 5 ) + }; + + inner.style.position = "fixed"; + inner.style.top = "20px"; + + // safari subtracts parent border width here which is 5px + offsetSupport.fixedPosition = ( inner.offsetTop === 20 || inner.offsetTop === 15 ); + inner.style.position = inner.style.top = ""; + + outer.style.overflow = "hidden"; + outer.style.position = "relative"; + + offsetSupport.subtractsBorderForOverflowNotVisible = ( inner.offsetTop === -5 ); + offsetSupport.doesNotIncludeMarginInBodyOffset = ( body.offsetTop !== conMarginTop ); + + if ( window.getComputedStyle ) { + div.style.marginTop = "1%"; + support.pixelMargin = ( window.getComputedStyle( div, null ) || { marginTop: 0 } ).marginTop !== "1%"; + } + + if ( typeof container.style.zoom !== "undefined" ) { + container.style.zoom = 1; + } + + body.removeChild( container ); + marginDiv = div = container = null; + + jQuery.extend( support, offsetSupport ); + }); + + return support; +})(); + + + + +var rbrace = /^(?:{.*}|\[.*\])$/, + rmultiDash = /([A-Z])/g; + +jQuery.extend({ + cache: {}, + + // Please use with caution + uuid: 0, + + // Unique for each copy of jQuery on the page + // Non-digits removed to match rinlinejQuery + expando: "jQuery" + ( jQuery.fn.jquery + Math.random() ).replace( /\D/g, "" ), + + // The following elements throw uncatchable exceptions if you + // attempt to add expando properties to them. + noData: { + "embed": true, + // Ban all objects except for Flash (which handle expandos) + "object": "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000", + "applet": true + }, + + hasData: function( elem ) { + elem = elem.nodeType ? jQuery.cache[ elem[jQuery.expando] ] : elem[ jQuery.expando ]; + return !!elem && !isEmptyDataObject( elem ); + }, + + data: function( elem, name, data, pvt /* Internal Use Only */ ) { + if ( !jQuery.acceptData( elem ) ) { + return; + } + + var privateCache, thisCache, ret, + internalKey = jQuery.expando, + getByName = typeof name === "string", + + // We have to handle DOM nodes and JS objects differently because IE6-7 + // can't GC object references properly across the DOM-JS boundary + isNode = elem.nodeType, + + // Only DOM nodes need the global jQuery cache; JS object data is + // attached directly to the object so GC can occur automatically + cache = isNode ? jQuery.cache : elem, + + // Only defining an ID for JS objects if its cache already exists allows + // the code to shortcut on the same path as a DOM node with no cache + id = isNode ? elem[ internalKey ] : elem[ internalKey ] && internalKey, + isEvents = name === "events"; + + // Avoid doing any more work than we need to when trying to get data on an + // object that has no data at all + if ( (!id || !cache[id] || (!isEvents && !pvt && !cache[id].data)) && getByName && data === undefined ) { + return; + } + + if ( !id ) { + // Only DOM nodes need a new unique ID for each element since their data + // ends up in the global cache + if ( isNode ) { + elem[ internalKey ] = id = ++jQuery.uuid; + } else { + id = internalKey; + } + } + + if ( !cache[ id ] ) { + cache[ id ] = {}; + + // Avoids exposing jQuery metadata on plain JS objects when the object + // is serialized using JSON.stringify + if ( !isNode ) { + cache[ id ].toJSON = jQuery.noop; + } + } + + // An object can be passed to jQuery.data instead of a key/value pair; this gets + // shallow copied over onto the existing cache + if ( typeof name === "object" || typeof name === "function" ) { + if ( pvt ) { + cache[ id ] = jQuery.extend( cache[ id ], name ); + } else { + cache[ id ].data = jQuery.extend( cache[ id ].data, name ); + } + } + + privateCache = thisCache = cache[ id ]; + + // jQuery data() is stored in a separate object inside the object's internal data + // cache in order to avoid key collisions between internal data and user-defined + // data. + if ( !pvt ) { + if ( !thisCache.data ) { + thisCache.data = {}; + } + + thisCache = thisCache.data; + } + + if ( data !== undefined ) { + thisCache[ jQuery.camelCase( name ) ] = data; + } + + // Users should not attempt to inspect the internal events object using jQuery.data, + // it is undocumented and subject to change. But does anyone listen? No. + if ( isEvents && !thisCache[ name ] ) { + return privateCache.events; + } + + // Check for both converted-to-camel and non-converted data property names + // If a data property was specified + if ( getByName ) { + + // First Try to find as-is property data + ret = thisCache[ name ]; + + // Test for null|undefined property data + if ( ret == null ) { + + // Try to find the camelCased property + ret = thisCache[ jQuery.camelCase( name ) ]; + } + } else { + ret = thisCache; + } + + return ret; + }, + + removeData: function( elem, name, pvt /* Internal Use Only */ ) { + if ( !jQuery.acceptData( elem ) ) { + return; + } + + var thisCache, i, l, + + // Reference to internal data cache key + internalKey = jQuery.expando, + + isNode = elem.nodeType, + + // See jQuery.data for more information + cache = isNode ? jQuery.cache : elem, + + // See jQuery.data for more information + id = isNode ? elem[ internalKey ] : internalKey; + + // If there is already no cache entry for this object, there is no + // purpose in continuing + if ( !cache[ id ] ) { + return; + } + + if ( name ) { + + thisCache = pvt ? cache[ id ] : cache[ id ].data; + + if ( thisCache ) { + + // Support array or space separated string names for data keys + if ( !jQuery.isArray( name ) ) { + + // try the string as a key before any manipulation + if ( name in thisCache ) { + name = [ name ]; + } else { + + // split the camel cased version by spaces unless a key with the spaces exists + name = jQuery.camelCase( name ); + if ( name in thisCache ) { + name = [ name ]; + } else { + name = name.split( " " ); + } + } + } + + for ( i = 0, l = name.length; i < l; i++ ) { + delete thisCache[ name[i] ]; + } + + // If there is no data left in the cache, we want to continue + // and let the cache object itself get destroyed + if ( !( pvt ? isEmptyDataObject : jQuery.isEmptyObject )( thisCache ) ) { + return; + } + } + } + + // See jQuery.data for more information + if ( !pvt ) { + delete cache[ id ].data; + + // Don't destroy the parent cache unless the internal data object + // had been the only thing left in it + if ( !isEmptyDataObject(cache[ id ]) ) { + return; + } + } + + // Browsers that fail expando deletion also refuse to delete expandos on + // the window, but it will allow it on all other JS objects; other browsers + // don't care + // Ensure that `cache` is not a window object #10080 + if ( jQuery.support.deleteExpando || !cache.setInterval ) { + delete cache[ id ]; + } else { + cache[ id ] = null; + } + + // We destroyed the cache and need to eliminate the expando on the node to avoid + // false lookups in the cache for entries that no longer exist + if ( isNode ) { + // IE does not allow us to delete expando properties from nodes, + // nor does it have a removeAttribute function on Document nodes; + // we must handle all of these cases + if ( jQuery.support.deleteExpando ) { + delete elem[ internalKey ]; + } else if ( elem.removeAttribute ) { + elem.removeAttribute( internalKey ); + } else { + elem[ internalKey ] = null; + } + } + }, + + // For internal use only. + _data: function( elem, name, data ) { + return jQuery.data( elem, name, data, true ); + }, + + // A method for determining if a DOM node can handle the data expando + acceptData: function( elem ) { + if ( elem.nodeName ) { + var match = jQuery.noData[ elem.nodeName.toLowerCase() ]; + + if ( match ) { + return !(match === true || elem.getAttribute("classid") !== match); + } + } + + return true; + } +}); + +jQuery.fn.extend({ + data: function( key, value ) { + var parts, part, attr, name, l, + elem = this[0], + i = 0, + data = null; + + // Gets all values + if ( key === undefined ) { + if ( this.length ) { + data = jQuery.data( elem ); + + if ( elem.nodeType === 1 && !jQuery._data( elem, "parsedAttrs" ) ) { + attr = elem.attributes; + for ( l = attr.length; i < l; i++ ) { + name = attr[i].name; + + if ( name.indexOf( "data-" ) === 0 ) { + name = jQuery.camelCase( name.substring(5) ); + + dataAttr( elem, name, data[ name ] ); + } + } + jQuery._data( elem, "parsedAttrs", true ); + } + } + + return data; + } + + // Sets multiple values + if ( typeof key === "object" ) { + return this.each(function() { + jQuery.data( this, key ); + }); + } + + parts = key.split( ".", 2 ); + parts[1] = parts[1] ? "." + parts[1] : ""; + part = parts[1] + "!"; + + return jQuery.access( this, function( value ) { + + if ( value === undefined ) { + data = this.triggerHandler( "getData" + part, [ parts[0] ] ); + + // Try to fetch any internally stored data first + if ( data === undefined && elem ) { + data = jQuery.data( elem, key ); + data = dataAttr( elem, key, data ); + } + + return data === undefined && parts[1] ? + this.data( parts[0] ) : + data; + } + + parts[1] = value; + this.each(function() { + var self = jQuery( this ); + + self.triggerHandler( "setData" + part, parts ); + jQuery.data( this, key, value ); + self.triggerHandler( "changeData" + part, parts ); + }); + }, null, value, arguments.length > 1, null, false ); + }, + + removeData: function( key ) { + return this.each(function() { + jQuery.removeData( this, key ); + }); + } +}); + +function dataAttr( elem, key, data ) { + // If nothing was found internally, try to fetch any + // data from the HTML5 data-* attribute + if ( data === undefined && elem.nodeType === 1 ) { + + var name = "data-" + key.replace( rmultiDash, "-$1" ).toLowerCase(); + + data = elem.getAttribute( name ); + + if ( typeof data === "string" ) { + try { + data = data === "true" ? true : + data === "false" ? false : + data === "null" ? null : + jQuery.isNumeric( data ) ? +data : + rbrace.test( data ) ? jQuery.parseJSON( data ) : + data; + } catch( e ) {} + + // Make sure we set the data so it isn't changed later + jQuery.data( elem, key, data ); + + } else { + data = undefined; + } + } + + return data; +} + +// checks a cache object for emptiness +function isEmptyDataObject( obj ) { + for ( var name in obj ) { + + // if the public data object is empty, the private is still empty + if ( name === "data" && jQuery.isEmptyObject( obj[name] ) ) { + continue; + } + if ( name !== "toJSON" ) { + return false; + } + } + + return true; +} + + + + +function handleQueueMarkDefer( elem, type, src ) { + var deferDataKey = type + "defer", + queueDataKey = type + "queue", + markDataKey = type + "mark", + defer = jQuery._data( elem, deferDataKey ); + if ( defer && + ( src === "queue" || !jQuery._data(elem, queueDataKey) ) && + ( src === "mark" || !jQuery._data(elem, markDataKey) ) ) { + // Give room for hard-coded callbacks to fire first + // and eventually mark/queue something else on the element + setTimeout( function() { + if ( !jQuery._data( elem, queueDataKey ) && + !jQuery._data( elem, markDataKey ) ) { + jQuery.removeData( elem, deferDataKey, true ); + defer.fire(); + } + }, 0 ); + } +} + +jQuery.extend({ + + _mark: function( elem, type ) { + if ( elem ) { + type = ( type || "fx" ) + "mark"; + jQuery._data( elem, type, (jQuery._data( elem, type ) || 0) + 1 ); + } + }, + + _unmark: function( force, elem, type ) { + if ( force !== true ) { + type = elem; + elem = force; + force = false; + } + if ( elem ) { + type = type || "fx"; + var key = type + "mark", + count = force ? 0 : ( (jQuery._data( elem, key ) || 1) - 1 ); + if ( count ) { + jQuery._data( elem, key, count ); + } else { + jQuery.removeData( elem, key, true ); + handleQueueMarkDefer( elem, type, "mark" ); + } + } + }, + + queue: function( elem, type, data ) { + var q; + if ( elem ) { + type = ( type || "fx" ) + "queue"; + q = jQuery._data( elem, type ); + + // Speed up dequeue by getting out quickly if this is just a lookup + if ( data ) { + if ( !q || jQuery.isArray(data) ) { + q = jQuery._data( elem, type, jQuery.makeArray(data) ); + } else { + q.push( data ); + } + } + return q || []; + } + }, + + dequeue: function( elem, type ) { + type = type || "fx"; + + var queue = jQuery.queue( elem, type ), + fn = queue.shift(), + hooks = {}; + + // If the fx queue is dequeued, always remove the progress sentinel + if ( fn === "inprogress" ) { + fn = queue.shift(); + } + + if ( fn ) { + // Add a progress sentinel to prevent the fx queue from being + // automatically dequeued + if ( type === "fx" ) { + queue.unshift( "inprogress" ); + } + + jQuery._data( elem, type + ".run", hooks ); + fn.call( elem, function() { + jQuery.dequeue( elem, type ); + }, hooks ); + } + + if ( !queue.length ) { + jQuery.removeData( elem, type + "queue " + type + ".run", true ); + handleQueueMarkDefer( elem, type, "queue" ); + } + } +}); + +jQuery.fn.extend({ + queue: function( type, data ) { + var setter = 2; + + if ( typeof type !== "string" ) { + data = type; + type = "fx"; + setter--; + } + + if ( arguments.length < setter ) { + return jQuery.queue( this[0], type ); + } + + return data === undefined ? + this : + this.each(function() { + var queue = jQuery.queue( this, type, data ); + + if ( type === "fx" && queue[0] !== "inprogress" ) { + jQuery.dequeue( this, type ); + } + }); + }, + dequeue: function( type ) { + return this.each(function() { + jQuery.dequeue( this, type ); + }); + }, + // Based off of the plugin by Clint Helfers, with permission. + // http://blindsignals.com/index.php/2009/07/jquery-delay/ + delay: function( time, type ) { + time = jQuery.fx ? jQuery.fx.speeds[ time ] || time : time; + type = type || "fx"; + + return this.queue( type, function( next, hooks ) { + var timeout = setTimeout( next, time ); + hooks.stop = function() { + clearTimeout( timeout ); + }; + }); + }, + clearQueue: function( type ) { + return this.queue( type || "fx", [] ); + }, + // Get a promise resolved when queues of a certain type + // are emptied (fx is the type by default) + promise: function( type, object ) { + if ( typeof type !== "string" ) { + object = type; + type = undefined; + } + type = type || "fx"; + var defer = jQuery.Deferred(), + elements = this, + i = elements.length, + count = 1, + deferDataKey = type + "defer", + queueDataKey = type + "queue", + markDataKey = type + "mark", + tmp; + function resolve() { + if ( !( --count ) ) { + defer.resolveWith( elements, [ elements ] ); + } + } + while( i-- ) { + if (( tmp = jQuery.data( elements[ i ], deferDataKey, undefined, true ) || + ( jQuery.data( elements[ i ], queueDataKey, undefined, true ) || + jQuery.data( elements[ i ], markDataKey, undefined, true ) ) && + jQuery.data( elements[ i ], deferDataKey, jQuery.Callbacks( "once memory" ), true ) )) { + count++; + tmp.add( resolve ); + } + } + resolve(); + return defer.promise( object ); + } +}); + + + + +var rclass = /[\n\t\r]/g, + rspace = /\s+/, + rreturn = /\r/g, + rtype = /^(?:button|input)$/i, + rfocusable = /^(?:button|input|object|select|textarea)$/i, + rclickable = /^a(?:rea)?$/i, + rboolean = /^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i, + getSetAttribute = jQuery.support.getSetAttribute, + nodeHook, boolHook, fixSpecified; + +jQuery.fn.extend({ + attr: function( name, value ) { + return jQuery.access( this, jQuery.attr, name, value, arguments.length > 1 ); + }, + + removeAttr: function( name ) { + return this.each(function() { + jQuery.removeAttr( this, name ); + }); + }, + + prop: function( name, value ) { + return jQuery.access( this, jQuery.prop, name, value, arguments.length > 1 ); + }, + + removeProp: function( name ) { + name = jQuery.propFix[ name ] || name; + return this.each(function() { + // try/catch handles cases where IE balks (such as removing a property on window) + try { + this[ name ] = undefined; + delete this[ name ]; + } catch( e ) {} + }); + }, + + addClass: function( value ) { + var classNames, i, l, elem, + setClass, c, cl; + + if ( jQuery.isFunction( value ) ) { + return this.each(function( j ) { + jQuery( this ).addClass( value.call(this, j, this.className) ); + }); + } + + if ( value && typeof value === "string" ) { + classNames = value.split( rspace ); + + for ( i = 0, l = this.length; i < l; i++ ) { + elem = this[ i ]; + + if ( elem.nodeType === 1 ) { + if ( !elem.className && classNames.length === 1 ) { + elem.className = value; + + } else { + setClass = " " + elem.className + " "; + + for ( c = 0, cl = classNames.length; c < cl; c++ ) { + if ( !~setClass.indexOf( " " + classNames[ c ] + " " ) ) { + setClass += classNames[ c ] + " "; + } + } + elem.className = jQuery.trim( setClass ); + } + } + } + } + + return this; + }, + + removeClass: function( value ) { + var classNames, i, l, elem, className, c, cl; + + if ( jQuery.isFunction( value ) ) { + return this.each(function( j ) { + jQuery( this ).removeClass( value.call(this, j, this.className) ); + }); + } + + if ( (value && typeof value === "string") || value === undefined ) { + classNames = ( value || "" ).split( rspace ); + + for ( i = 0, l = this.length; i < l; i++ ) { + elem = this[ i ]; + + if ( elem.nodeType === 1 && elem.className ) { + if ( value ) { + className = (" " + elem.className + " ").replace( rclass, " " ); + for ( c = 0, cl = classNames.length; c < cl; c++ ) { + className = className.replace(" " + classNames[ c ] + " ", " "); + } + elem.className = jQuery.trim( className ); + + } else { + elem.className = ""; + } + } + } + } + + return this; + }, + + toggleClass: function( value, stateVal ) { + var type = typeof value, + isBool = typeof stateVal === "boolean"; + + if ( jQuery.isFunction( value ) ) { + return this.each(function( i ) { + jQuery( this ).toggleClass( value.call(this, i, this.className, stateVal), stateVal ); + }); + } + + return this.each(function() { + if ( type === "string" ) { + // toggle individual class names + var className, + i = 0, + self = jQuery( this ), + state = stateVal, + classNames = value.split( rspace ); + + while ( (className = classNames[ i++ ]) ) { + // check each className given, space seperated list + state = isBool ? state : !self.hasClass( className ); + self[ state ? "addClass" : "removeClass" ]( className ); + } + + } else if ( type === "undefined" || type === "boolean" ) { + if ( this.className ) { + // store className if set + jQuery._data( this, "__className__", this.className ); + } + + // toggle whole className + this.className = this.className || value === false ? "" : jQuery._data( this, "__className__" ) || ""; + } + }); + }, + + hasClass: function( selector ) { + var className = " " + selector + " ", + i = 0, + l = this.length; + for ( ; i < l; i++ ) { + if ( this[i].nodeType === 1 && (" " + this[i].className + " ").replace(rclass, " ").indexOf( className ) > -1 ) { + return true; + } + } + + return false; + }, + + val: function( value ) { + var hooks, ret, isFunction, + elem = this[0]; + + if ( !arguments.length ) { + if ( elem ) { + hooks = jQuery.valHooks[ elem.type ] || jQuery.valHooks[ elem.nodeName.toLowerCase() ]; + + if ( hooks && "get" in hooks && (ret = hooks.get( elem, "value" )) !== undefined ) { + return ret; + } + + ret = elem.value; + + return typeof ret === "string" ? + // handle most common string cases + ret.replace(rreturn, "") : + // handle cases where value is null/undef or number + ret == null ? "" : ret; + } + + return; + } + + isFunction = jQuery.isFunction( value ); + + return this.each(function( i ) { + var self = jQuery(this), val; + + if ( this.nodeType !== 1 ) { + return; + } + + if ( isFunction ) { + val = value.call( this, i, self.val() ); + } else { + val = value; + } + + // Treat null/undefined as ""; convert numbers to string + if ( val == null ) { + val = ""; + } else if ( typeof val === "number" ) { + val += ""; + } else if ( jQuery.isArray( val ) ) { + val = jQuery.map(val, function ( value ) { + return value == null ? "" : value + ""; + }); + } + + hooks = jQuery.valHooks[ this.type ] || jQuery.valHooks[ this.nodeName.toLowerCase() ]; + + // If set returns undefined, fall back to normal setting + if ( !hooks || !("set" in hooks) || hooks.set( this, val, "value" ) === undefined ) { + this.value = val; + } + }); + } +}); + +jQuery.extend({ + valHooks: { + option: { + get: function( elem ) { + // attributes.value is undefined in Blackberry 4.7 but + // uses .value. See #6932 + var val = elem.attributes.value; + return !val || val.specified ? elem.value : elem.text; + } + }, + select: { + get: function( elem ) { + var value, i, max, option, + index = elem.selectedIndex, + values = [], + options = elem.options, + one = elem.type === "select-one"; + + // Nothing was selected + if ( index < 0 ) { + return null; + } + + // Loop through all the selected options + i = one ? index : 0; + max = one ? index + 1 : options.length; + for ( ; i < max; i++ ) { + option = options[ i ]; + + // Don't return options that are disabled or in a disabled optgroup + if ( option.selected && (jQuery.support.optDisabled ? !option.disabled : option.getAttribute("disabled") === null) && + (!option.parentNode.disabled || !jQuery.nodeName( option.parentNode, "optgroup" )) ) { + + // Get the specific value for the option + value = jQuery( option ).val(); + + // We don't need an array for one selects + if ( one ) { + return value; + } + + // Multi-Selects return an array + values.push( value ); + } + } + + // Fixes Bug #2551 -- select.val() broken in IE after form.reset() + if ( one && !values.length && options.length ) { + return jQuery( options[ index ] ).val(); + } + + return values; + }, + + set: function( elem, value ) { + var values = jQuery.makeArray( value ); + + jQuery(elem).find("option").each(function() { + this.selected = jQuery.inArray( jQuery(this).val(), values ) >= 0; + }); + + if ( !values.length ) { + elem.selectedIndex = -1; + } + return values; + } + } + }, + + attrFn: { + val: true, + css: true, + html: true, + text: true, + data: true, + width: true, + height: true, + offset: true + }, + + attr: function( elem, name, value, pass ) { + var ret, hooks, notxml, + nType = elem.nodeType; + + // don't get/set attributes on text, comment and attribute nodes + if ( !elem || nType === 3 || nType === 8 || nType === 2 ) { + return; + } + + if ( pass && name in jQuery.attrFn ) { + return jQuery( elem )[ name ]( value ); + } + + // Fallback to prop when attributes are not supported + if ( typeof elem.getAttribute === "undefined" ) { + return jQuery.prop( elem, name, value ); + } + + notxml = nType !== 1 || !jQuery.isXMLDoc( elem ); + + // All attributes are lowercase + // Grab necessary hook if one is defined + if ( notxml ) { + name = name.toLowerCase(); + hooks = jQuery.attrHooks[ name ] || ( rboolean.test( name ) ? boolHook : nodeHook ); + } + + if ( value !== undefined ) { + + if ( value === null ) { + jQuery.removeAttr( elem, name ); + return; + + } else if ( hooks && "set" in hooks && notxml && (ret = hooks.set( elem, value, name )) !== undefined ) { + return ret; + + } else { + elem.setAttribute( name, "" + value ); + return value; + } + + } else if ( hooks && "get" in hooks && notxml && (ret = hooks.get( elem, name )) !== null ) { + return ret; + + } else { + + ret = elem.getAttribute( name ); + + // Non-existent attributes return null, we normalize to undefined + return ret === null ? + undefined : + ret; + } + }, + + removeAttr: function( elem, value ) { + var propName, attrNames, name, l, isBool, + i = 0; + + if ( value && elem.nodeType === 1 ) { + attrNames = value.toLowerCase().split( rspace ); + l = attrNames.length; + + for ( ; i < l; i++ ) { + name = attrNames[ i ]; + + if ( name ) { + propName = jQuery.propFix[ name ] || name; + isBool = rboolean.test( name ); + + // See #9699 for explanation of this approach (setting first, then removal) + // Do not do this for boolean attributes (see #10870) + if ( !isBool ) { + jQuery.attr( elem, name, "" ); + } + elem.removeAttribute( getSetAttribute ? name : propName ); + + // Set corresponding property to false for boolean attributes + if ( isBool && propName in elem ) { + elem[ propName ] = false; + } + } + } + } + }, + + attrHooks: { + type: { + set: function( elem, value ) { + // We can't allow the type property to be changed (since it causes problems in IE) + if ( rtype.test( elem.nodeName ) && elem.parentNode ) { + jQuery.error( "type property can't be changed" ); + } else if ( !jQuery.support.radioValue && value === "radio" && jQuery.nodeName(elem, "input") ) { + // Setting the type on a radio button after the value resets the value in IE6-9 + // Reset value to it's default in case type is set after value + // This is for element creation + var val = elem.value; + elem.setAttribute( "type", value ); + if ( val ) { + elem.value = val; + } + return value; + } + } + }, + // Use the value property for back compat + // Use the nodeHook for button elements in IE6/7 (#1954) + value: { + get: function( elem, name ) { + if ( nodeHook && jQuery.nodeName( elem, "button" ) ) { + return nodeHook.get( elem, name ); + } + return name in elem ? + elem.value : + null; + }, + set: function( elem, value, name ) { + if ( nodeHook && jQuery.nodeName( elem, "button" ) ) { + return nodeHook.set( elem, value, name ); + } + // Does not return so that setAttribute is also used + elem.value = value; + } + } + }, + + propFix: { + tabindex: "tabIndex", + readonly: "readOnly", + "for": "htmlFor", + "class": "className", + maxlength: "maxLength", + cellspacing: "cellSpacing", + cellpadding: "cellPadding", + rowspan: "rowSpan", + colspan: "colSpan", + usemap: "useMap", + frameborder: "frameBorder", + contenteditable: "contentEditable" + }, + + prop: function( elem, name, value ) { + var ret, hooks, notxml, + nType = elem.nodeType; + + // don't get/set properties on text, comment and attribute nodes + if ( !elem || nType === 3 || nType === 8 || nType === 2 ) { + return; + } + + notxml = nType !== 1 || !jQuery.isXMLDoc( elem ); + + if ( notxml ) { + // Fix name and attach hooks + name = jQuery.propFix[ name ] || name; + hooks = jQuery.propHooks[ name ]; + } + + if ( value !== undefined ) { + if ( hooks && "set" in hooks && (ret = hooks.set( elem, value, name )) !== undefined ) { + return ret; + + } else { + return ( elem[ name ] = value ); + } + + } else { + if ( hooks && "get" in hooks && (ret = hooks.get( elem, name )) !== null ) { + return ret; + + } else { + return elem[ name ]; + } + } + }, + + propHooks: { + tabIndex: { + get: function( elem ) { + // elem.tabIndex doesn't always return the correct value when it hasn't been explicitly set + // http://fluidproject.org/blog/2008/01/09/getting-setting-and-removing-tabindex-values-with-javascript/ + var attributeNode = elem.getAttributeNode("tabindex"); + + return attributeNode && attributeNode.specified ? + parseInt( attributeNode.value, 10 ) : + rfocusable.test( elem.nodeName ) || rclickable.test( elem.nodeName ) && elem.href ? + 0 : + undefined; + } + } + } +}); + +// Add the tabIndex propHook to attrHooks for back-compat (different case is intentional) +jQuery.attrHooks.tabindex = jQuery.propHooks.tabIndex; + +// Hook for boolean attributes +boolHook = { + get: function( elem, name ) { + // Align boolean attributes with corresponding properties + // Fall back to attribute presence where some booleans are not supported + var attrNode, + property = jQuery.prop( elem, name ); + return property === true || typeof property !== "boolean" && ( attrNode = elem.getAttributeNode(name) ) && attrNode.nodeValue !== false ? + name.toLowerCase() : + undefined; + }, + set: function( elem, value, name ) { + var propName; + if ( value === false ) { + // Remove boolean attributes when set to false + jQuery.removeAttr( elem, name ); + } else { + // value is true since we know at this point it's type boolean and not false + // Set boolean attributes to the same name and set the DOM property + propName = jQuery.propFix[ name ] || name; + if ( propName in elem ) { + // Only set the IDL specifically if it already exists on the element + elem[ propName ] = true; + } + + elem.setAttribute( name, name.toLowerCase() ); + } + return name; + } +}; + +// IE6/7 do not support getting/setting some attributes with get/setAttribute +if ( !getSetAttribute ) { + + fixSpecified = { + name: true, + id: true, + coords: true + }; + + // Use this for any attribute in IE6/7 + // This fixes almost every IE6/7 issue + nodeHook = jQuery.valHooks.button = { + get: function( elem, name ) { + var ret; + ret = elem.getAttributeNode( name ); + return ret && ( fixSpecified[ name ] ? ret.nodeValue !== "" : ret.specified ) ? + ret.nodeValue : + undefined; + }, + set: function( elem, value, name ) { + // Set the existing or create a new attribute node + var ret = elem.getAttributeNode( name ); + if ( !ret ) { + ret = document.createAttribute( name ); + elem.setAttributeNode( ret ); + } + return ( ret.nodeValue = value + "" ); + } + }; + + // Apply the nodeHook to tabindex + jQuery.attrHooks.tabindex.set = nodeHook.set; + + // Set width and height to auto instead of 0 on empty string( Bug #8150 ) + // This is for removals + jQuery.each([ "width", "height" ], function( i, name ) { + jQuery.attrHooks[ name ] = jQuery.extend( jQuery.attrHooks[ name ], { + set: function( elem, value ) { + if ( value === "" ) { + elem.setAttribute( name, "auto" ); + return value; + } + } + }); + }); + + // Set contenteditable to false on removals(#10429) + // Setting to empty string throws an error as an invalid value + jQuery.attrHooks.contenteditable = { + get: nodeHook.get, + set: function( elem, value, name ) { + if ( value === "" ) { + value = "false"; + } + nodeHook.set( elem, value, name ); + } + }; +} + + +// Some attributes require a special call on IE +if ( !jQuery.support.hrefNormalized ) { + jQuery.each([ "href", "src", "width", "height" ], function( i, name ) { + jQuery.attrHooks[ name ] = jQuery.extend( jQuery.attrHooks[ name ], { + get: function( elem ) { + var ret = elem.getAttribute( name, 2 ); + return ret === null ? undefined : ret; + } + }); + }); +} + +if ( !jQuery.support.style ) { + jQuery.attrHooks.style = { + get: function( elem ) { + // Return undefined in the case of empty string + // Normalize to lowercase since IE uppercases css property names + return elem.style.cssText.toLowerCase() || undefined; + }, + set: function( elem, value ) { + return ( elem.style.cssText = "" + value ); + } + }; +} + +// Safari mis-reports the default selected property of an option +// Accessing the parent's selectedIndex property fixes it +if ( !jQuery.support.optSelected ) { + jQuery.propHooks.selected = jQuery.extend( jQuery.propHooks.selected, { + get: function( elem ) { + var parent = elem.parentNode; + + if ( parent ) { + parent.selectedIndex; + + // Make sure that it also works with optgroups, see #5701 + if ( parent.parentNode ) { + parent.parentNode.selectedIndex; + } + } + return null; + } + }); +} + +// IE6/7 call enctype encoding +if ( !jQuery.support.enctype ) { + jQuery.propFix.enctype = "encoding"; +} + +// Radios and checkboxes getter/setter +if ( !jQuery.support.checkOn ) { + jQuery.each([ "radio", "checkbox" ], function() { + jQuery.valHooks[ this ] = { + get: function( elem ) { + // Handle the case where in Webkit "" is returned instead of "on" if a value isn't specified + return elem.getAttribute("value") === null ? "on" : elem.value; + } + }; + }); +} +jQuery.each([ "radio", "checkbox" ], function() { + jQuery.valHooks[ this ] = jQuery.extend( jQuery.valHooks[ this ], { + set: function( elem, value ) { + if ( jQuery.isArray( value ) ) { + return ( elem.checked = jQuery.inArray( jQuery(elem).val(), value ) >= 0 ); + } + } + }); +}); + + + + +var rformElems = /^(?:textarea|input|select)$/i, + rtypenamespace = /^([^\.]*)?(?:\.(.+))?$/, + rhoverHack = /(?:^|\s)hover(\.\S+)?\b/, + rkeyEvent = /^key/, + rmouseEvent = /^(?:mouse|contextmenu)|click/, + rfocusMorph = /^(?:focusinfocus|focusoutblur)$/, + rquickIs = /^(\w*)(?:#([\w\-]+))?(?:\.([\w\-]+))?$/, + quickParse = function( selector ) { + var quick = rquickIs.exec( selector ); + if ( quick ) { + // 0 1 2 3 + // [ _, tag, id, class ] + quick[1] = ( quick[1] || "" ).toLowerCase(); + quick[3] = quick[3] && new RegExp( "(?:^|\\s)" + quick[3] + "(?:\\s|$)" ); + } + return quick; + }, + quickIs = function( elem, m ) { + var attrs = elem.attributes || {}; + return ( + (!m[1] || elem.nodeName.toLowerCase() === m[1]) && + (!m[2] || (attrs.id || {}).value === m[2]) && + (!m[3] || m[3].test( (attrs[ "class" ] || {}).value )) + ); + }, + hoverHack = function( events ) { + return jQuery.event.special.hover ? events : events.replace( rhoverHack, "mouseenter$1 mouseleave$1" ); + }; + +/* + * Helper functions for managing events -- not part of the public interface. + * Props to Dean Edwards' addEvent library for many of the ideas. + */ +jQuery.event = { + + add: function( elem, types, handler, data, selector ) { + + var elemData, eventHandle, events, + t, tns, type, namespaces, handleObj, + handleObjIn, quick, handlers, special; + + // Don't attach events to noData or text/comment nodes (allow plain objects tho) + if ( elem.nodeType === 3 || elem.nodeType === 8 || !types || !handler || !(elemData = jQuery._data( elem )) ) { + return; + } + + // Caller can pass in an object of custom data in lieu of the handler + if ( handler.handler ) { + handleObjIn = handler; + handler = handleObjIn.handler; + selector = handleObjIn.selector; + } + + // Make sure that the handler has a unique ID, used to find/remove it later + if ( !handler.guid ) { + handler.guid = jQuery.guid++; + } + + // Init the element's event structure and main handler, if this is the first + events = elemData.events; + if ( !events ) { + elemData.events = events = {}; + } + eventHandle = elemData.handle; + if ( !eventHandle ) { + elemData.handle = eventHandle = function( e ) { + // Discard the second event of a jQuery.event.trigger() and + // when an event is called after a page has unloaded + return typeof jQuery !== "undefined" && (!e || jQuery.event.triggered !== e.type) ? + jQuery.event.dispatch.apply( eventHandle.elem, arguments ) : + undefined; + }; + // Add elem as a property of the handle fn to prevent a memory leak with IE non-native events + eventHandle.elem = elem; + } + + // Handle multiple events separated by a space + // jQuery(...).bind("mouseover mouseout", fn); + types = jQuery.trim( hoverHack(types) ).split( " " ); + for ( t = 0; t < types.length; t++ ) { + + tns = rtypenamespace.exec( types[t] ) || []; + type = tns[1]; + namespaces = ( tns[2] || "" ).split( "." ).sort(); + + // If event changes its type, use the special event handlers for the changed type + special = jQuery.event.special[ type ] || {}; + + // If selector defined, determine special event api type, otherwise given type + type = ( selector ? special.delegateType : special.bindType ) || type; + + // Update special based on newly reset type + special = jQuery.event.special[ type ] || {}; + + // handleObj is passed to all event handlers + handleObj = jQuery.extend({ + type: type, + origType: tns[1], + data: data, + handler: handler, + guid: handler.guid, + selector: selector, + quick: selector && quickParse( selector ), + namespace: namespaces.join(".") + }, handleObjIn ); + + // Init the event handler queue if we're the first + handlers = events[ type ]; + if ( !handlers ) { + handlers = events[ type ] = []; + handlers.delegateCount = 0; + + // Only use addEventListener/attachEvent if the special events handler returns false + if ( !special.setup || special.setup.call( elem, data, namespaces, eventHandle ) === false ) { + // Bind the global event handler to the element + if ( elem.addEventListener ) { + elem.addEventListener( type, eventHandle, false ); + + } else if ( elem.attachEvent ) { + elem.attachEvent( "on" + type, eventHandle ); + } + } + } + + if ( special.add ) { + special.add.call( elem, handleObj ); + + if ( !handleObj.handler.guid ) { + handleObj.handler.guid = handler.guid; + } + } + + // Add to the element's handler list, delegates in front + if ( selector ) { + handlers.splice( handlers.delegateCount++, 0, handleObj ); + } else { + handlers.push( handleObj ); + } + + // Keep track of which events have ever been used, for event optimization + jQuery.event.global[ type ] = true; + } + + // Nullify elem to prevent memory leaks in IE + elem = null; + }, + + global: {}, + + // Detach an event or set of events from an element + remove: function( elem, types, handler, selector, mappedTypes ) { + + var elemData = jQuery.hasData( elem ) && jQuery._data( elem ), + t, tns, type, origType, namespaces, origCount, + j, events, special, handle, eventType, handleObj; + + if ( !elemData || !(events = elemData.events) ) { + return; + } + + // Once for each type.namespace in types; type may be omitted + types = jQuery.trim( hoverHack( types || "" ) ).split(" "); + for ( t = 0; t < types.length; t++ ) { + tns = rtypenamespace.exec( types[t] ) || []; + type = origType = tns[1]; + namespaces = tns[2]; + + // Unbind all events (on this namespace, if provided) for the element + if ( !type ) { + for ( type in events ) { + jQuery.event.remove( elem, type + types[ t ], handler, selector, true ); + } + continue; + } + + special = jQuery.event.special[ type ] || {}; + type = ( selector? special.delegateType : special.bindType ) || type; + eventType = events[ type ] || []; + origCount = eventType.length; + namespaces = namespaces ? new RegExp("(^|\\.)" + namespaces.split(".").sort().join("\\.(?:.*\\.)?") + "(\\.|$)") : null; + + // Remove matching events + for ( j = 0; j < eventType.length; j++ ) { + handleObj = eventType[ j ]; + + if ( ( mappedTypes || origType === handleObj.origType ) && + ( !handler || handler.guid === handleObj.guid ) && + ( !namespaces || namespaces.test( handleObj.namespace ) ) && + ( !selector || selector === handleObj.selector || selector === "**" && handleObj.selector ) ) { + eventType.splice( j--, 1 ); + + if ( handleObj.selector ) { + eventType.delegateCount--; + } + if ( special.remove ) { + special.remove.call( elem, handleObj ); + } + } + } + + // Remove generic event handler if we removed something and no more handlers exist + // (avoids potential for endless recursion during removal of special event handlers) + if ( eventType.length === 0 && origCount !== eventType.length ) { + if ( !special.teardown || special.teardown.call( elem, namespaces ) === false ) { + jQuery.removeEvent( elem, type, elemData.handle ); + } + + delete events[ type ]; + } + } + + // Remove the expando if it's no longer used + if ( jQuery.isEmptyObject( events ) ) { + handle = elemData.handle; + if ( handle ) { + handle.elem = null; + } + + // removeData also checks for emptiness and clears the expando if empty + // so use it instead of delete + jQuery.removeData( elem, [ "events", "handle" ], true ); + } + }, + + // Events that are safe to short-circuit if no handlers are attached. + // Native DOM events should not be added, they may have inline handlers. + customEvent: { + "getData": true, + "setData": true, + "changeData": true + }, + + trigger: function( event, data, elem, onlyHandlers ) { + // Don't do events on text and comment nodes + if ( elem && (elem.nodeType === 3 || elem.nodeType === 8) ) { + return; + } + + // Event object or event type + var type = event.type || event, + namespaces = [], + cache, exclusive, i, cur, old, ontype, special, handle, eventPath, bubbleType; + + // focus/blur morphs to focusin/out; ensure we're not firing them right now + if ( rfocusMorph.test( type + jQuery.event.triggered ) ) { + return; + } + + if ( type.indexOf( "!" ) >= 0 ) { + // Exclusive events trigger only for the exact event (no namespaces) + type = type.slice(0, -1); + exclusive = true; + } + + if ( type.indexOf( "." ) >= 0 ) { + // Namespaced trigger; create a regexp to match event type in handle() + namespaces = type.split("."); + type = namespaces.shift(); + namespaces.sort(); + } + + if ( (!elem || jQuery.event.customEvent[ type ]) && !jQuery.event.global[ type ] ) { + // No jQuery handlers for this event type, and it can't have inline handlers + return; + } + + // Caller can pass in an Event, Object, or just an event type string + event = typeof event === "object" ? + // jQuery.Event object + event[ jQuery.expando ] ? event : + // Object literal + new jQuery.Event( type, event ) : + // Just the event type (string) + new jQuery.Event( type ); + + event.type = type; + event.isTrigger = true; + event.exclusive = exclusive; + event.namespace = namespaces.join( "." ); + event.namespace_re = event.namespace? new RegExp("(^|\\.)" + namespaces.join("\\.(?:.*\\.)?") + "(\\.|$)") : null; + ontype = type.indexOf( ":" ) < 0 ? "on" + type : ""; + + // Handle a global trigger + if ( !elem ) { + + // TODO: Stop taunting the data cache; remove global events and always attach to document + cache = jQuery.cache; + for ( i in cache ) { + if ( cache[ i ].events && cache[ i ].events[ type ] ) { + jQuery.event.trigger( event, data, cache[ i ].handle.elem, true ); + } + } + return; + } + + // Clean up the event in case it is being reused + event.result = undefined; + if ( !event.target ) { + event.target = elem; + } + + // Clone any incoming data and prepend the event, creating the handler arg list + data = data != null ? jQuery.makeArray( data ) : []; + data.unshift( event ); + + // Allow special events to draw outside the lines + special = jQuery.event.special[ type ] || {}; + if ( special.trigger && special.trigger.apply( elem, data ) === false ) { + return; + } + + // Determine event propagation path in advance, per W3C events spec (#9951) + // Bubble up to document, then to window; watch for a global ownerDocument var (#9724) + eventPath = [[ elem, special.bindType || type ]]; + if ( !onlyHandlers && !special.noBubble && !jQuery.isWindow( elem ) ) { + + bubbleType = special.delegateType || type; + cur = rfocusMorph.test( bubbleType + type ) ? elem : elem.parentNode; + old = null; + for ( ; cur; cur = cur.parentNode ) { + eventPath.push([ cur, bubbleType ]); + old = cur; + } + + // Only add window if we got to document (e.g., not plain obj or detached DOM) + if ( old && old === elem.ownerDocument ) { + eventPath.push([ old.defaultView || old.parentWindow || window, bubbleType ]); + } + } + + // Fire handlers on the event path + for ( i = 0; i < eventPath.length && !event.isPropagationStopped(); i++ ) { + + cur = eventPath[i][0]; + event.type = eventPath[i][1]; + + handle = ( jQuery._data( cur, "events" ) || {} )[ event.type ] && jQuery._data( cur, "handle" ); + if ( handle ) { + handle.apply( cur, data ); + } + // Note that this is a bare JS function and not a jQuery handler + handle = ontype && cur[ ontype ]; + if ( handle && jQuery.acceptData( cur ) && handle.apply( cur, data ) === false ) { + event.preventDefault(); + } + } + event.type = type; + + // If nobody prevented the default action, do it now + if ( !onlyHandlers && !event.isDefaultPrevented() ) { + + if ( (!special._default || special._default.apply( elem.ownerDocument, data ) === false) && + !(type === "click" && jQuery.nodeName( elem, "a" )) && jQuery.acceptData( elem ) ) { + + // Call a native DOM method on the target with the same name name as the event. + // Can't use an .isFunction() check here because IE6/7 fails that test. + // Don't do default actions on window, that's where global variables be (#6170) + // IE<9 dies on focus/blur to hidden element (#1486) + if ( ontype && elem[ type ] && ((type !== "focus" && type !== "blur") || event.target.offsetWidth !== 0) && !jQuery.isWindow( elem ) ) { + + // Don't re-trigger an onFOO event when we call its FOO() method + old = elem[ ontype ]; + + if ( old ) { + elem[ ontype ] = null; + } + + // Prevent re-triggering of the same event, since we already bubbled it above + jQuery.event.triggered = type; + elem[ type ](); + jQuery.event.triggered = undefined; + + if ( old ) { + elem[ ontype ] = old; + } + } + } + } + + return event.result; + }, + + dispatch: function( event ) { + + // Make a writable jQuery.Event from the native event object + event = jQuery.event.fix( event || window.event ); + + var handlers = ( (jQuery._data( this, "events" ) || {} )[ event.type ] || []), + delegateCount = handlers.delegateCount, + args = [].slice.call( arguments, 0 ), + run_all = !event.exclusive && !event.namespace, + special = jQuery.event.special[ event.type ] || {}, + handlerQueue = [], + i, j, cur, jqcur, ret, selMatch, matched, matches, handleObj, sel, related; + + // Use the fix-ed jQuery.Event rather than the (read-only) native event + args[0] = event; + event.delegateTarget = this; + + // Call the preDispatch hook for the mapped type, and let it bail if desired + if ( special.preDispatch && special.preDispatch.call( this, event ) === false ) { + return; + } + + // Determine handlers that should run if there are delegated events + // Avoid non-left-click bubbling in Firefox (#3861) + if ( delegateCount && !(event.button && event.type === "click") ) { + + // Pregenerate a single jQuery object for reuse with .is() + jqcur = jQuery(this); + jqcur.context = this.ownerDocument || this; + + for ( cur = event.target; cur != this; cur = cur.parentNode || this ) { + + // Don't process events on disabled elements (#6911, #8165) + if ( cur.disabled !== true ) { + selMatch = {}; + matches = []; + jqcur[0] = cur; + for ( i = 0; i < delegateCount; i++ ) { + handleObj = handlers[ i ]; + sel = handleObj.selector; + + if ( selMatch[ sel ] === undefined ) { + selMatch[ sel ] = ( + handleObj.quick ? quickIs( cur, handleObj.quick ) : jqcur.is( sel ) + ); + } + if ( selMatch[ sel ] ) { + matches.push( handleObj ); + } + } + if ( matches.length ) { + handlerQueue.push({ elem: cur, matches: matches }); + } + } + } + } + + // Add the remaining (directly-bound) handlers + if ( handlers.length > delegateCount ) { + handlerQueue.push({ elem: this, matches: handlers.slice( delegateCount ) }); + } + + // Run delegates first; they may want to stop propagation beneath us + for ( i = 0; i < handlerQueue.length && !event.isPropagationStopped(); i++ ) { + matched = handlerQueue[ i ]; + event.currentTarget = matched.elem; + + for ( j = 0; j < matched.matches.length && !event.isImmediatePropagationStopped(); j++ ) { + handleObj = matched.matches[ j ]; + + // Triggered event must either 1) be non-exclusive and have no namespace, or + // 2) have namespace(s) a subset or equal to those in the bound event (both can have no namespace). + if ( run_all || (!event.namespace && !handleObj.namespace) || event.namespace_re && event.namespace_re.test( handleObj.namespace ) ) { + + event.data = handleObj.data; + event.handleObj = handleObj; + + ret = ( (jQuery.event.special[ handleObj.origType ] || {}).handle || handleObj.handler ) + .apply( matched.elem, args ); + + if ( ret !== undefined ) { + event.result = ret; + if ( ret === false ) { + event.preventDefault(); + event.stopPropagation(); + } + } + } + } + } + + // Call the postDispatch hook for the mapped type + if ( special.postDispatch ) { + special.postDispatch.call( this, event ); + } + + return event.result; + }, + + // Includes some event props shared by KeyEvent and MouseEvent + // *** attrChange attrName relatedNode srcElement are not normalized, non-W3C, deprecated, will be removed in 1.8 *** + props: "attrChange attrName relatedNode srcElement altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "), + + fixHooks: {}, + + keyHooks: { + props: "char charCode key keyCode".split(" "), + filter: function( event, original ) { + + // Add which for key events + if ( event.which == null ) { + event.which = original.charCode != null ? original.charCode : original.keyCode; + } + + return event; + } + }, + + mouseHooks: { + props: "button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "), + filter: function( event, original ) { + var eventDoc, doc, body, + button = original.button, + fromElement = original.fromElement; + + // Calculate pageX/Y if missing and clientX/Y available + if ( event.pageX == null && original.clientX != null ) { + eventDoc = event.target.ownerDocument || document; + doc = eventDoc.documentElement; + body = eventDoc.body; + + event.pageX = original.clientX + ( doc && doc.scrollLeft || body && body.scrollLeft || 0 ) - ( doc && doc.clientLeft || body && body.clientLeft || 0 ); + event.pageY = original.clientY + ( doc && doc.scrollTop || body && body.scrollTop || 0 ) - ( doc && doc.clientTop || body && body.clientTop || 0 ); + } + + // Add relatedTarget, if necessary + if ( !event.relatedTarget && fromElement ) { + event.relatedTarget = fromElement === event.target ? original.toElement : fromElement; + } + + // Add which for click: 1 === left; 2 === middle; 3 === right + // Note: button is not normalized, so don't use it + if ( !event.which && button !== undefined ) { + event.which = ( button & 1 ? 1 : ( button & 2 ? 3 : ( button & 4 ? 2 : 0 ) ) ); + } + + return event; + } + }, + + fix: function( event ) { + if ( event[ jQuery.expando ] ) { + return event; + } + + // Create a writable copy of the event object and normalize some properties + var i, prop, + originalEvent = event, + fixHook = jQuery.event.fixHooks[ event.type ] || {}, + copy = fixHook.props ? this.props.concat( fixHook.props ) : this.props; + + event = jQuery.Event( originalEvent ); + + for ( i = copy.length; i; ) { + prop = copy[ --i ]; + event[ prop ] = originalEvent[ prop ]; + } + + // Fix target property, if necessary (#1925, IE 6/7/8 & Safari2) + if ( !event.target ) { + event.target = originalEvent.srcElement || document; + } + + // Target should not be a text node (#504, Safari) + if ( event.target.nodeType === 3 ) { + event.target = event.target.parentNode; + } + + // For mouse/key events; add metaKey if it's not there (#3368, IE6/7/8) + if ( event.metaKey === undefined ) { + event.metaKey = event.ctrlKey; + } + + return fixHook.filter? fixHook.filter( event, originalEvent ) : event; + }, + + special: { + ready: { + // Make sure the ready event is setup + setup: jQuery.bindReady + }, + + load: { + // Prevent triggered image.load events from bubbling to window.load + noBubble: true + }, + + focus: { + delegateType: "focusin" + }, + blur: { + delegateType: "focusout" + }, + + beforeunload: { + setup: function( data, namespaces, eventHandle ) { + // We only want to do this special case on windows + if ( jQuery.isWindow( this ) ) { + this.onbeforeunload = eventHandle; + } + }, + + teardown: function( namespaces, eventHandle ) { + if ( this.onbeforeunload === eventHandle ) { + this.onbeforeunload = null; + } + } + } + }, + + simulate: function( type, elem, event, bubble ) { + // Piggyback on a donor event to simulate a different one. + // Fake originalEvent to avoid donor's stopPropagation, but if the + // simulated event prevents default then we do the same on the donor. + var e = jQuery.extend( + new jQuery.Event(), + event, + { type: type, + isSimulated: true, + originalEvent: {} + } + ); + if ( bubble ) { + jQuery.event.trigger( e, null, elem ); + } else { + jQuery.event.dispatch.call( elem, e ); + } + if ( e.isDefaultPrevented() ) { + event.preventDefault(); + } + } +}; + +// Some plugins are using, but it's undocumented/deprecated and will be removed. +// The 1.7 special event interface should provide all the hooks needed now. +jQuery.event.handle = jQuery.event.dispatch; + +jQuery.removeEvent = document.removeEventListener ? + function( elem, type, handle ) { + if ( elem.removeEventListener ) { + elem.removeEventListener( type, handle, false ); + } + } : + function( elem, type, handle ) { + if ( elem.detachEvent ) { + elem.detachEvent( "on" + type, handle ); + } + }; + +jQuery.Event = function( src, props ) { + // Allow instantiation without the 'new' keyword + if ( !(this instanceof jQuery.Event) ) { + return new jQuery.Event( src, props ); + } + + // Event object + if ( src && src.type ) { + this.originalEvent = src; + this.type = src.type; + + // Events bubbling up the document may have been marked as prevented + // by a handler lower down the tree; reflect the correct value. + this.isDefaultPrevented = ( src.defaultPrevented || src.returnValue === false || + src.getPreventDefault && src.getPreventDefault() ) ? returnTrue : returnFalse; + + // Event type + } else { + this.type = src; + } + + // Put explicitly provided properties onto the event object + if ( props ) { + jQuery.extend( this, props ); + } + + // Create a timestamp if incoming event doesn't have one + this.timeStamp = src && src.timeStamp || jQuery.now(); + + // Mark it as fixed + this[ jQuery.expando ] = true; +}; + +function returnFalse() { + return false; +} +function returnTrue() { + return true; +} + +// jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding +// http://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html +jQuery.Event.prototype = { + preventDefault: function() { + this.isDefaultPrevented = returnTrue; + + var e = this.originalEvent; + if ( !e ) { + return; + } + + // if preventDefault exists run it on the original event + if ( e.preventDefault ) { + e.preventDefault(); + + // otherwise set the returnValue property of the original event to false (IE) + } else { + e.returnValue = false; + } + }, + stopPropagation: function() { + this.isPropagationStopped = returnTrue; + + var e = this.originalEvent; + if ( !e ) { + return; + } + // if stopPropagation exists run it on the original event + if ( e.stopPropagation ) { + e.stopPropagation(); + } + // otherwise set the cancelBubble property of the original event to true (IE) + e.cancelBubble = true; + }, + stopImmediatePropagation: function() { + this.isImmediatePropagationStopped = returnTrue; + this.stopPropagation(); + }, + isDefaultPrevented: returnFalse, + isPropagationStopped: returnFalse, + isImmediatePropagationStopped: returnFalse +}; + +// Create mouseenter/leave events using mouseover/out and event-time checks +jQuery.each({ + mouseenter: "mouseover", + mouseleave: "mouseout" +}, function( orig, fix ) { + jQuery.event.special[ orig ] = { + delegateType: fix, + bindType: fix, + + handle: function( event ) { + var target = this, + related = event.relatedTarget, + handleObj = event.handleObj, + selector = handleObj.selector, + ret; + + // For mousenter/leave call the handler if related is outside the target. + // NB: No relatedTarget if the mouse left/entered the browser window + if ( !related || (related !== target && !jQuery.contains( target, related )) ) { + event.type = handleObj.origType; + ret = handleObj.handler.apply( this, arguments ); + event.type = fix; + } + return ret; + } + }; +}); + +// IE submit delegation +if ( !jQuery.support.submitBubbles ) { + + jQuery.event.special.submit = { + setup: function() { + // Only need this for delegated form submit events + if ( jQuery.nodeName( this, "form" ) ) { + return false; + } + + // Lazy-add a submit handler when a descendant form may potentially be submitted + jQuery.event.add( this, "click._submit keypress._submit", function( e ) { + // Node name check avoids a VML-related crash in IE (#9807) + var elem = e.target, + form = jQuery.nodeName( elem, "input" ) || jQuery.nodeName( elem, "button" ) ? elem.form : undefined; + if ( form && !form._submit_attached ) { + jQuery.event.add( form, "submit._submit", function( event ) { + event._submit_bubble = true; + }); + form._submit_attached = true; + } + }); + // return undefined since we don't need an event listener + }, + + postDispatch: function( event ) { + // If form was submitted by the user, bubble the event up the tree + if ( event._submit_bubble ) { + delete event._submit_bubble; + if ( this.parentNode && !event.isTrigger ) { + jQuery.event.simulate( "submit", this.parentNode, event, true ); + } + } + }, + + teardown: function() { + // Only need this for delegated form submit events + if ( jQuery.nodeName( this, "form" ) ) { + return false; + } + + // Remove delegated handlers; cleanData eventually reaps submit handlers attached above + jQuery.event.remove( this, "._submit" ); + } + }; +} + +// IE change delegation and checkbox/radio fix +if ( !jQuery.support.changeBubbles ) { + + jQuery.event.special.change = { + + setup: function() { + + if ( rformElems.test( this.nodeName ) ) { + // IE doesn't fire change on a check/radio until blur; trigger it on click + // after a propertychange. Eat the blur-change in special.change.handle. + // This still fires onchange a second time for check/radio after blur. + if ( this.type === "checkbox" || this.type === "radio" ) { + jQuery.event.add( this, "propertychange._change", function( event ) { + if ( event.originalEvent.propertyName === "checked" ) { + this._just_changed = true; + } + }); + jQuery.event.add( this, "click._change", function( event ) { + if ( this._just_changed && !event.isTrigger ) { + this._just_changed = false; + jQuery.event.simulate( "change", this, event, true ); + } + }); + } + return false; + } + // Delegated event; lazy-add a change handler on descendant inputs + jQuery.event.add( this, "beforeactivate._change", function( e ) { + var elem = e.target; + + if ( rformElems.test( elem.nodeName ) && !elem._change_attached ) { + jQuery.event.add( elem, "change._change", function( event ) { + if ( this.parentNode && !event.isSimulated && !event.isTrigger ) { + jQuery.event.simulate( "change", this.parentNode, event, true ); + } + }); + elem._change_attached = true; + } + }); + }, + + handle: function( event ) { + var elem = event.target; + + // Swallow native change events from checkbox/radio, we already triggered them above + if ( this !== elem || event.isSimulated || event.isTrigger || (elem.type !== "radio" && elem.type !== "checkbox") ) { + return event.handleObj.handler.apply( this, arguments ); + } + }, + + teardown: function() { + jQuery.event.remove( this, "._change" ); + + return rformElems.test( this.nodeName ); + } + }; +} + +// Create "bubbling" focus and blur events +if ( !jQuery.support.focusinBubbles ) { + jQuery.each({ focus: "focusin", blur: "focusout" }, function( orig, fix ) { + + // Attach a single capturing handler while someone wants focusin/focusout + var attaches = 0, + handler = function( event ) { + jQuery.event.simulate( fix, event.target, jQuery.event.fix( event ), true ); + }; + + jQuery.event.special[ fix ] = { + setup: function() { + if ( attaches++ === 0 ) { + document.addEventListener( orig, handler, true ); + } + }, + teardown: function() { + if ( --attaches === 0 ) { + document.removeEventListener( orig, handler, true ); + } + } + }; + }); +} + +jQuery.fn.extend({ + + on: function( types, selector, data, fn, /*INTERNAL*/ one ) { + var origFn, type; + + // Types can be a map of types/handlers + if ( typeof types === "object" ) { + // ( types-Object, selector, data ) + if ( typeof selector !== "string" ) { // && selector != null + // ( types-Object, data ) + data = data || selector; + selector = undefined; + } + for ( type in types ) { + this.on( type, selector, data, types[ type ], one ); + } + return this; + } + + if ( data == null && fn == null ) { + // ( types, fn ) + fn = selector; + data = selector = undefined; + } else if ( fn == null ) { + if ( typeof selector === "string" ) { + // ( types, selector, fn ) + fn = data; + data = undefined; + } else { + // ( types, data, fn ) + fn = data; + data = selector; + selector = undefined; + } + } + if ( fn === false ) { + fn = returnFalse; + } else if ( !fn ) { + return this; + } + + if ( one === 1 ) { + origFn = fn; + fn = function( event ) { + // Can use an empty set, since event contains the info + jQuery().off( event ); + return origFn.apply( this, arguments ); + }; + // Use same guid so caller can remove using origFn + fn.guid = origFn.guid || ( origFn.guid = jQuery.guid++ ); + } + return this.each( function() { + jQuery.event.add( this, types, fn, data, selector ); + }); + }, + one: function( types, selector, data, fn ) { + return this.on( types, selector, data, fn, 1 ); + }, + off: function( types, selector, fn ) { + if ( types && types.preventDefault && types.handleObj ) { + // ( event ) dispatched jQuery.Event + var handleObj = types.handleObj; + jQuery( types.delegateTarget ).off( + handleObj.namespace ? handleObj.origType + "." + handleObj.namespace : handleObj.origType, + handleObj.selector, + handleObj.handler + ); + return this; + } + if ( typeof types === "object" ) { + // ( types-object [, selector] ) + for ( var type in types ) { + this.off( type, selector, types[ type ] ); + } + return this; + } + if ( selector === false || typeof selector === "function" ) { + // ( types [, fn] ) + fn = selector; + selector = undefined; + } + if ( fn === false ) { + fn = returnFalse; + } + return this.each(function() { + jQuery.event.remove( this, types, fn, selector ); + }); + }, + + bind: function( types, data, fn ) { + return this.on( types, null, data, fn ); + }, + unbind: function( types, fn ) { + return this.off( types, null, fn ); + }, + + live: function( types, data, fn ) { + jQuery( this.context ).on( types, this.selector, data, fn ); + return this; + }, + die: function( types, fn ) { + jQuery( this.context ).off( types, this.selector || "**", fn ); + return this; + }, + + delegate: function( selector, types, data, fn ) { + return this.on( types, selector, data, fn ); + }, + undelegate: function( selector, types, fn ) { + // ( namespace ) or ( selector, types [, fn] ) + return arguments.length == 1? this.off( selector, "**" ) : this.off( types, selector, fn ); + }, + + trigger: function( type, data ) { + return this.each(function() { + jQuery.event.trigger( type, data, this ); + }); + }, + triggerHandler: function( type, data ) { + if ( this[0] ) { + return jQuery.event.trigger( type, data, this[0], true ); + } + }, + + toggle: function( fn ) { + // Save reference to arguments for access in closure + var args = arguments, + guid = fn.guid || jQuery.guid++, + i = 0, + toggler = function( event ) { + // Figure out which function to execute + var lastToggle = ( jQuery._data( this, "lastToggle" + fn.guid ) || 0 ) % i; + jQuery._data( this, "lastToggle" + fn.guid, lastToggle + 1 ); + + // Make sure that clicks stop + event.preventDefault(); + + // and execute the function + return args[ lastToggle ].apply( this, arguments ) || false; + }; + + // link all the functions, so any of them can unbind this click handler + toggler.guid = guid; + while ( i < args.length ) { + args[ i++ ].guid = guid; + } + + return this.click( toggler ); + }, + + hover: function( fnOver, fnOut ) { + return this.mouseenter( fnOver ).mouseleave( fnOut || fnOver ); + } +}); + +jQuery.each( ("blur focus focusin focusout load resize scroll unload click dblclick " + + "mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave " + + "change select submit keydown keypress keyup error contextmenu").split(" "), function( i, name ) { + + // Handle event binding + jQuery.fn[ name ] = function( data, fn ) { + if ( fn == null ) { + fn = data; + data = null; + } + + return arguments.length > 0 ? + this.on( name, null, data, fn ) : + this.trigger( name ); + }; + + if ( jQuery.attrFn ) { + jQuery.attrFn[ name ] = true; + } + + if ( rkeyEvent.test( name ) ) { + jQuery.event.fixHooks[ name ] = jQuery.event.keyHooks; + } + + if ( rmouseEvent.test( name ) ) { + jQuery.event.fixHooks[ name ] = jQuery.event.mouseHooks; + } +}); + + + +/*! + * Sizzle CSS Selector Engine + * Copyright 2011, The Dojo Foundation + * Released under the MIT, BSD, and GPL Licenses. + * More information: http://sizzlejs.com/ + */ +(function(){ + +var chunker = /((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g, + expando = "sizcache" + (Math.random() + '').replace('.', ''), + done = 0, + toString = Object.prototype.toString, + hasDuplicate = false, + baseHasDuplicate = true, + rBackslash = /\\/g, + rReturn = /\r\n/g, + rNonWord = /\W/; + +// Here we check if the JavaScript engine is using some sort of +// optimization where it does not always call our comparision +// function. If that is the case, discard the hasDuplicate value. +// Thus far that includes Google Chrome. +[0, 0].sort(function() { + baseHasDuplicate = false; + return 0; +}); + +var Sizzle = function( selector, context, results, seed ) { + results = results || []; + context = context || document; + + var origContext = context; + + if ( context.nodeType !== 1 && context.nodeType !== 9 ) { + return []; + } + + if ( !selector || typeof selector !== "string" ) { + return results; + } + + var m, set, checkSet, extra, ret, cur, pop, i, + prune = true, + contextXML = Sizzle.isXML( context ), + parts = [], + soFar = selector; + + // Reset the position of the chunker regexp (start from head) + do { + chunker.exec( "" ); + m = chunker.exec( soFar ); + + if ( m ) { + soFar = m[3]; + + parts.push( m[1] ); + + if ( m[2] ) { + extra = m[3]; + break; + } + } + } while ( m ); + + if ( parts.length > 1 && origPOS.exec( selector ) ) { + + if ( parts.length === 2 && Expr.relative[ parts[0] ] ) { + set = posProcess( parts[0] + parts[1], context, seed ); + + } else { + set = Expr.relative[ parts[0] ] ? + [ context ] : + Sizzle( parts.shift(), context ); + + while ( parts.length ) { + selector = parts.shift(); + + if ( Expr.relative[ selector ] ) { + selector += parts.shift(); + } + + set = posProcess( selector, set, seed ); + } + } + + } else { + // Take a shortcut and set the context if the root selector is an ID + // (but not if it'll be faster if the inner selector is an ID) + if ( !seed && parts.length > 1 && context.nodeType === 9 && !contextXML && + Expr.match.ID.test(parts[0]) && !Expr.match.ID.test(parts[parts.length - 1]) ) { + + ret = Sizzle.find( parts.shift(), context, contextXML ); + context = ret.expr ? + Sizzle.filter( ret.expr, ret.set )[0] : + ret.set[0]; + } + + if ( context ) { + ret = seed ? + { expr: parts.pop(), set: makeArray(seed) } : + Sizzle.find( parts.pop(), parts.length === 1 && (parts[0] === "~" || parts[0] === "+") && context.parentNode ? context.parentNode : context, contextXML ); + + set = ret.expr ? + Sizzle.filter( ret.expr, ret.set ) : + ret.set; + + if ( parts.length > 0 ) { + checkSet = makeArray( set ); + + } else { + prune = false; + } + + while ( parts.length ) { + cur = parts.pop(); + pop = cur; + + if ( !Expr.relative[ cur ] ) { + cur = ""; + } else { + pop = parts.pop(); + } + + if ( pop == null ) { + pop = context; + } + + Expr.relative[ cur ]( checkSet, pop, contextXML ); + } + + } else { + checkSet = parts = []; + } + } + + if ( !checkSet ) { + checkSet = set; + } + + if ( !checkSet ) { + Sizzle.error( cur || selector ); + } + + if ( toString.call(checkSet) === "[object Array]" ) { + if ( !prune ) { + results.push.apply( results, checkSet ); + + } else if ( context && context.nodeType === 1 ) { + for ( i = 0; checkSet[i] != null; i++ ) { + if ( checkSet[i] && (checkSet[i] === true || checkSet[i].nodeType === 1 && Sizzle.contains(context, checkSet[i])) ) { + results.push( set[i] ); + } + } + + } else { + for ( i = 0; checkSet[i] != null; i++ ) { + if ( checkSet[i] && checkSet[i].nodeType === 1 ) { + results.push( set[i] ); + } + } + } + + } else { + makeArray( checkSet, results ); + } + + if ( extra ) { + Sizzle( extra, origContext, results, seed ); + Sizzle.uniqueSort( results ); + } + + return results; +}; + +Sizzle.uniqueSort = function( results ) { + if ( sortOrder ) { + hasDuplicate = baseHasDuplicate; + results.sort( sortOrder ); + + if ( hasDuplicate ) { + for ( var i = 1; i < results.length; i++ ) { + if ( results[i] === results[ i - 1 ] ) { + results.splice( i--, 1 ); + } + } + } + } + + return results; +}; + +Sizzle.matches = function( expr, set ) { + return Sizzle( expr, null, null, set ); +}; + +Sizzle.matchesSelector = function( node, expr ) { + return Sizzle( expr, null, null, [node] ).length > 0; +}; + +Sizzle.find = function( expr, context, isXML ) { + var set, i, len, match, type, left; + + if ( !expr ) { + return []; + } + + for ( i = 0, len = Expr.order.length; i < len; i++ ) { + type = Expr.order[i]; + + if ( (match = Expr.leftMatch[ type ].exec( expr )) ) { + left = match[1]; + match.splice( 1, 1 ); + + if ( left.substr( left.length - 1 ) !== "\\" ) { + match[1] = (match[1] || "").replace( rBackslash, "" ); + set = Expr.find[ type ]( match, context, isXML ); + + if ( set != null ) { + expr = expr.replace( Expr.match[ type ], "" ); + break; + } + } + } + } + + if ( !set ) { + set = typeof context.getElementsByTagName !== "undefined" ? + context.getElementsByTagName( "*" ) : + []; + } + + return { set: set, expr: expr }; +}; + +Sizzle.filter = function( expr, set, inplace, not ) { + var match, anyFound, + type, found, item, filter, left, + i, pass, + old = expr, + result = [], + curLoop = set, + isXMLFilter = set && set[0] && Sizzle.isXML( set[0] ); + + while ( expr && set.length ) { + for ( type in Expr.filter ) { + if ( (match = Expr.leftMatch[ type ].exec( expr )) != null && match[2] ) { + filter = Expr.filter[ type ]; + left = match[1]; + + anyFound = false; + + match.splice(1,1); + + if ( left.substr( left.length - 1 ) === "\\" ) { + continue; + } + + if ( curLoop === result ) { + result = []; + } + + if ( Expr.preFilter[ type ] ) { + match = Expr.preFilter[ type ]( match, curLoop, inplace, result, not, isXMLFilter ); + + if ( !match ) { + anyFound = found = true; + + } else if ( match === true ) { + continue; + } + } + + if ( match ) { + for ( i = 0; (item = curLoop[i]) != null; i++ ) { + if ( item ) { + found = filter( item, match, i, curLoop ); + pass = not ^ found; + + if ( inplace && found != null ) { + if ( pass ) { + anyFound = true; + + } else { + curLoop[i] = false; + } + + } else if ( pass ) { + result.push( item ); + anyFound = true; + } + } + } + } + + if ( found !== undefined ) { + if ( !inplace ) { + curLoop = result; + } + + expr = expr.replace( Expr.match[ type ], "" ); + + if ( !anyFound ) { + return []; + } + + break; + } + } + } + + // Improper expression + if ( expr === old ) { + if ( anyFound == null ) { + Sizzle.error( expr ); + + } else { + break; + } + } + + old = expr; + } + + return curLoop; +}; + +Sizzle.error = function( msg ) { + throw new Error( "Syntax error, unrecognized expression: " + msg ); +}; + +/** + * Utility function for retreiving the text value of an array of DOM nodes + * @param {Array|Element} elem + */ +var getText = Sizzle.getText = function( elem ) { + var i, node, + nodeType = elem.nodeType, + ret = ""; + + if ( nodeType ) { + if ( nodeType === 1 || nodeType === 9 || nodeType === 11 ) { + // Use textContent || innerText for elements + if ( typeof elem.textContent === 'string' ) { + return elem.textContent; + } else if ( typeof elem.innerText === 'string' ) { + // Replace IE's carriage returns + return elem.innerText.replace( rReturn, '' ); + } else { + // Traverse it's children + for ( elem = elem.firstChild; elem; elem = elem.nextSibling) { + ret += getText( elem ); + } + } + } else if ( nodeType === 3 || nodeType === 4 ) { + return elem.nodeValue; + } + } else { + + // If no nodeType, this is expected to be an array + for ( i = 0; (node = elem[i]); i++ ) { + // Do not traverse comment nodes + if ( node.nodeType !== 8 ) { + ret += getText( node ); + } + } + } + return ret; +}; + +var Expr = Sizzle.selectors = { + order: [ "ID", "NAME", "TAG" ], + + match: { + ID: /#((?:[\w\u00c0-\uFFFF\-]|\\.)+)/, + CLASS: /\.((?:[\w\u00c0-\uFFFF\-]|\\.)+)/, + NAME: /\[name=['"]*((?:[\w\u00c0-\uFFFF\-]|\\.)+)['"]*\]/, + ATTR: /\[\s*((?:[\w\u00c0-\uFFFF\-]|\\.)+)\s*(?:(\S?=)\s*(?:(['"])(.*?)\3|(#?(?:[\w\u00c0-\uFFFF\-]|\\.)*)|)|)\s*\]/, + TAG: /^((?:[\w\u00c0-\uFFFF\*\-]|\\.)+)/, + CHILD: /:(only|nth|last|first)-child(?:\(\s*(even|odd|(?:[+\-]?\d+|(?:[+\-]?\d*)?n\s*(?:[+\-]\s*\d+)?))\s*\))?/, + POS: /:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^\-]|$)/, + PSEUDO: /:((?:[\w\u00c0-\uFFFF\-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/ + }, + + leftMatch: {}, + + attrMap: { + "class": "className", + "for": "htmlFor" + }, + + attrHandle: { + href: function( elem ) { + return elem.getAttribute( "href" ); + }, + type: function( elem ) { + return elem.getAttribute( "type" ); + } + }, + + relative: { + "+": function(checkSet, part){ + var isPartStr = typeof part === "string", + isTag = isPartStr && !rNonWord.test( part ), + isPartStrNotTag = isPartStr && !isTag; + + if ( isTag ) { + part = part.toLowerCase(); + } + + for ( var i = 0, l = checkSet.length, elem; i < l; i++ ) { + if ( (elem = checkSet[i]) ) { + while ( (elem = elem.previousSibling) && elem.nodeType !== 1 ) {} + + checkSet[i] = isPartStrNotTag || elem && elem.nodeName.toLowerCase() === part ? + elem || false : + elem === part; + } + } + + if ( isPartStrNotTag ) { + Sizzle.filter( part, checkSet, true ); + } + }, + + ">": function( checkSet, part ) { + var elem, + isPartStr = typeof part === "string", + i = 0, + l = checkSet.length; + + if ( isPartStr && !rNonWord.test( part ) ) { + part = part.toLowerCase(); + + for ( ; i < l; i++ ) { + elem = checkSet[i]; + + if ( elem ) { + var parent = elem.parentNode; + checkSet[i] = parent.nodeName.toLowerCase() === part ? parent : false; + } + } + + } else { + for ( ; i < l; i++ ) { + elem = checkSet[i]; + + if ( elem ) { + checkSet[i] = isPartStr ? + elem.parentNode : + elem.parentNode === part; + } + } + + if ( isPartStr ) { + Sizzle.filter( part, checkSet, true ); + } + } + }, + + "": function(checkSet, part, isXML){ + var nodeCheck, + doneName = done++, + checkFn = dirCheck; + + if ( typeof part === "string" && !rNonWord.test( part ) ) { + part = part.toLowerCase(); + nodeCheck = part; + checkFn = dirNodeCheck; + } + + checkFn( "parentNode", part, doneName, checkSet, nodeCheck, isXML ); + }, + + "~": function( checkSet, part, isXML ) { + var nodeCheck, + doneName = done++, + checkFn = dirCheck; + + if ( typeof part === "string" && !rNonWord.test( part ) ) { + part = part.toLowerCase(); + nodeCheck = part; + checkFn = dirNodeCheck; + } + + checkFn( "previousSibling", part, doneName, checkSet, nodeCheck, isXML ); + } + }, + + find: { + ID: function( match, context, isXML ) { + if ( typeof context.getElementById !== "undefined" && !isXML ) { + var m = context.getElementById(match[1]); + // Check parentNode to catch when Blackberry 4.6 returns + // nodes that are no longer in the document #6963 + return m && m.parentNode ? [m] : []; + } + }, + + NAME: function( match, context ) { + if ( typeof context.getElementsByName !== "undefined" ) { + var ret = [], + results = context.getElementsByName( match[1] ); + + for ( var i = 0, l = results.length; i < l; i++ ) { + if ( results[i].getAttribute("name") === match[1] ) { + ret.push( results[i] ); + } + } + + return ret.length === 0 ? null : ret; + } + }, + + TAG: function( match, context ) { + if ( typeof context.getElementsByTagName !== "undefined" ) { + return context.getElementsByTagName( match[1] ); + } + } + }, + preFilter: { + CLASS: function( match, curLoop, inplace, result, not, isXML ) { + match = " " + match[1].replace( rBackslash, "" ) + " "; + + if ( isXML ) { + return match; + } + + for ( var i = 0, elem; (elem = curLoop[i]) != null; i++ ) { + if ( elem ) { + if ( not ^ (elem.className && (" " + elem.className + " ").replace(/[\t\n\r]/g, " ").indexOf(match) >= 0) ) { + if ( !inplace ) { + result.push( elem ); + } + + } else if ( inplace ) { + curLoop[i] = false; + } + } + } + + return false; + }, + + ID: function( match ) { + return match[1].replace( rBackslash, "" ); + }, + + TAG: function( match, curLoop ) { + return match[1].replace( rBackslash, "" ).toLowerCase(); + }, + + CHILD: function( match ) { + if ( match[1] === "nth" ) { + if ( !match[2] ) { + Sizzle.error( match[0] ); + } + + match[2] = match[2].replace(/^\+|\s*/g, ''); + + // parse equations like 'even', 'odd', '5', '2n', '3n+2', '4n-1', '-n+6' + var test = /(-?)(\d*)(?:n([+\-]?\d*))?/.exec( + match[2] === "even" && "2n" || match[2] === "odd" && "2n+1" || + !/\D/.test( match[2] ) && "0n+" + match[2] || match[2]); + + // calculate the numbers (first)n+(last) including if they are negative + match[2] = (test[1] + (test[2] || 1)) - 0; + match[3] = test[3] - 0; + } + else if ( match[2] ) { + Sizzle.error( match[0] ); + } + + // TODO: Move to normal caching system + match[0] = done++; + + return match; + }, + + ATTR: function( match, curLoop, inplace, result, not, isXML ) { + var name = match[1] = match[1].replace( rBackslash, "" ); + + if ( !isXML && Expr.attrMap[name] ) { + match[1] = Expr.attrMap[name]; + } + + // Handle if an un-quoted value was used + match[4] = ( match[4] || match[5] || "" ).replace( rBackslash, "" ); + + if ( match[2] === "~=" ) { + match[4] = " " + match[4] + " "; + } + + return match; + }, + + PSEUDO: function( match, curLoop, inplace, result, not ) { + if ( match[1] === "not" ) { + // If we're dealing with a complex expression, or a simple one + if ( ( chunker.exec(match[3]) || "" ).length > 1 || /^\w/.test(match[3]) ) { + match[3] = Sizzle(match[3], null, null, curLoop); + + } else { + var ret = Sizzle.filter(match[3], curLoop, inplace, true ^ not); + + if ( !inplace ) { + result.push.apply( result, ret ); + } + + return false; + } + + } else if ( Expr.match.POS.test( match[0] ) || Expr.match.CHILD.test( match[0] ) ) { + return true; + } + + return match; + }, + + POS: function( match ) { + match.unshift( true ); + + return match; + } + }, + + filters: { + enabled: function( elem ) { + return elem.disabled === false && elem.type !== "hidden"; + }, + + disabled: function( elem ) { + return elem.disabled === true; + }, + + checked: function( elem ) { + return elem.checked === true; + }, + + selected: function( elem ) { + // Accessing this property makes selected-by-default + // options in Safari work properly + if ( elem.parentNode ) { + elem.parentNode.selectedIndex; + } + + return elem.selected === true; + }, + + parent: function( elem ) { + return !!elem.firstChild; + }, + + empty: function( elem ) { + return !elem.firstChild; + }, + + has: function( elem, i, match ) { + return !!Sizzle( match[3], elem ).length; + }, + + header: function( elem ) { + return (/h\d/i).test( elem.nodeName ); + }, + + text: function( elem ) { + var attr = elem.getAttribute( "type" ), type = elem.type; + // IE6 and 7 will map elem.type to 'text' for new HTML5 types (search, etc) + // use getAttribute instead to test this case + return elem.nodeName.toLowerCase() === "input" && "text" === type && ( attr === type || attr === null ); + }, + + radio: function( elem ) { + return elem.nodeName.toLowerCase() === "input" && "radio" === elem.type; + }, + + checkbox: function( elem ) { + return elem.nodeName.toLowerCase() === "input" && "checkbox" === elem.type; + }, + + file: function( elem ) { + return elem.nodeName.toLowerCase() === "input" && "file" === elem.type; + }, + + password: function( elem ) { + return elem.nodeName.toLowerCase() === "input" && "password" === elem.type; + }, + + submit: function( elem ) { + var name = elem.nodeName.toLowerCase(); + return (name === "input" || name === "button") && "submit" === elem.type; + }, + + image: function( elem ) { + return elem.nodeName.toLowerCase() === "input" && "image" === elem.type; + }, + + reset: function( elem ) { + var name = elem.nodeName.toLowerCase(); + return (name === "input" || name === "button") && "reset" === elem.type; + }, + + button: function( elem ) { + var name = elem.nodeName.toLowerCase(); + return name === "input" && "button" === elem.type || name === "button"; + }, + + input: function( elem ) { + return (/input|select|textarea|button/i).test( elem.nodeName ); + }, + + focus: function( elem ) { + return elem === elem.ownerDocument.activeElement; + } + }, + setFilters: { + first: function( elem, i ) { + return i === 0; + }, + + last: function( elem, i, match, array ) { + return i === array.length - 1; + }, + + even: function( elem, i ) { + return i % 2 === 0; + }, + + odd: function( elem, i ) { + return i % 2 === 1; + }, + + lt: function( elem, i, match ) { + return i < match[3] - 0; + }, + + gt: function( elem, i, match ) { + return i > match[3] - 0; + }, + + nth: function( elem, i, match ) { + return match[3] - 0 === i; + }, + + eq: function( elem, i, match ) { + return match[3] - 0 === i; + } + }, + filter: { + PSEUDO: function( elem, match, i, array ) { + var name = match[1], + filter = Expr.filters[ name ]; + + if ( filter ) { + return filter( elem, i, match, array ); + + } else if ( name === "contains" ) { + return (elem.textContent || elem.innerText || getText([ elem ]) || "").indexOf(match[3]) >= 0; + + } else if ( name === "not" ) { + var not = match[3]; + + for ( var j = 0, l = not.length; j < l; j++ ) { + if ( not[j] === elem ) { + return false; + } + } + + return true; + + } else { + Sizzle.error( name ); + } + }, + + CHILD: function( elem, match ) { + var first, last, + doneName, parent, cache, + count, diff, + type = match[1], + node = elem; + + switch ( type ) { + case "only": + case "first": + while ( (node = node.previousSibling) ) { + if ( node.nodeType === 1 ) { + return false; + } + } + + if ( type === "first" ) { + return true; + } + + node = elem; + + /* falls through */ + case "last": + while ( (node = node.nextSibling) ) { + if ( node.nodeType === 1 ) { + return false; + } + } + + return true; + + case "nth": + first = match[2]; + last = match[3]; + + if ( first === 1 && last === 0 ) { + return true; + } + + doneName = match[0]; + parent = elem.parentNode; + + if ( parent && (parent[ expando ] !== doneName || !elem.nodeIndex) ) { + count = 0; + + for ( node = parent.firstChild; node; node = node.nextSibling ) { + if ( node.nodeType === 1 ) { + node.nodeIndex = ++count; + } + } + + parent[ expando ] = doneName; + } + + diff = elem.nodeIndex - last; + + if ( first === 0 ) { + return diff === 0; + + } else { + return ( diff % first === 0 && diff / first >= 0 ); + } + } + }, + + ID: function( elem, match ) { + return elem.nodeType === 1 && elem.getAttribute("id") === match; + }, + + TAG: function( elem, match ) { + return (match === "*" && elem.nodeType === 1) || !!elem.nodeName && elem.nodeName.toLowerCase() === match; + }, + + CLASS: function( elem, match ) { + return (" " + (elem.className || elem.getAttribute("class")) + " ") + .indexOf( match ) > -1; + }, + + ATTR: function( elem, match ) { + var name = match[1], + result = Sizzle.attr ? + Sizzle.attr( elem, name ) : + Expr.attrHandle[ name ] ? + Expr.attrHandle[ name ]( elem ) : + elem[ name ] != null ? + elem[ name ] : + elem.getAttribute( name ), + value = result + "", + type = match[2], + check = match[4]; + + return result == null ? + type === "!=" : + !type && Sizzle.attr ? + result != null : + type === "=" ? + value === check : + type === "*=" ? + value.indexOf(check) >= 0 : + type === "~=" ? + (" " + value + " ").indexOf(check) >= 0 : + !check ? + value && result !== false : + type === "!=" ? + value !== check : + type === "^=" ? + value.indexOf(check) === 0 : + type === "$=" ? + value.substr(value.length - check.length) === check : + type === "|=" ? + value === check || value.substr(0, check.length + 1) === check + "-" : + false; + }, + + POS: function( elem, match, i, array ) { + var name = match[2], + filter = Expr.setFilters[ name ]; + + if ( filter ) { + return filter( elem, i, match, array ); + } + } + } +}; + +var origPOS = Expr.match.POS, + fescape = function(all, num){ + return "\\" + (num - 0 + 1); + }; + +for ( var type in Expr.match ) { + Expr.match[ type ] = new RegExp( Expr.match[ type ].source + (/(?![^\[]*\])(?![^\(]*\))/.source) ); + Expr.leftMatch[ type ] = new RegExp( /(^(?:.|\r|\n)*?)/.source + Expr.match[ type ].source.replace(/\\(\d+)/g, fescape) ); +} +// Expose origPOS +// "global" as in regardless of relation to brackets/parens +Expr.match.globalPOS = origPOS; + +var makeArray = function( array, results ) { + array = Array.prototype.slice.call( array, 0 ); + + if ( results ) { + results.push.apply( results, array ); + return results; + } + + return array; +}; + +// Perform a simple check to determine if the browser is capable of +// converting a NodeList to an array using builtin methods. +// Also verifies that the returned array holds DOM nodes +// (which is not the case in the Blackberry browser) +try { + Array.prototype.slice.call( document.documentElement.childNodes, 0 )[0].nodeType; + +// Provide a fallback method if it does not work +} catch( e ) { + makeArray = function( array, results ) { + var i = 0, + ret = results || []; + + if ( toString.call(array) === "[object Array]" ) { + Array.prototype.push.apply( ret, array ); + + } else { + if ( typeof array.length === "number" ) { + for ( var l = array.length; i < l; i++ ) { + ret.push( array[i] ); + } + + } else { + for ( ; array[i]; i++ ) { + ret.push( array[i] ); + } + } + } + + return ret; + }; +} + +var sortOrder, siblingCheck; + +if ( document.documentElement.compareDocumentPosition ) { + sortOrder = function( a, b ) { + if ( a === b ) { + hasDuplicate = true; + return 0; + } + + if ( !a.compareDocumentPosition || !b.compareDocumentPosition ) { + return a.compareDocumentPosition ? -1 : 1; + } + + return a.compareDocumentPosition(b) & 4 ? -1 : 1; + }; + +} else { + sortOrder = function( a, b ) { + // The nodes are identical, we can exit early + if ( a === b ) { + hasDuplicate = true; + return 0; + + // Fallback to using sourceIndex (in IE) if it's available on both nodes + } else if ( a.sourceIndex && b.sourceIndex ) { + return a.sourceIndex - b.sourceIndex; + } + + var al, bl, + ap = [], + bp = [], + aup = a.parentNode, + bup = b.parentNode, + cur = aup; + + // If the nodes are siblings (or identical) we can do a quick check + if ( aup === bup ) { + return siblingCheck( a, b ); + + // If no parents were found then the nodes are disconnected + } else if ( !aup ) { + return -1; + + } else if ( !bup ) { + return 1; + } + + // Otherwise they're somewhere else in the tree so we need + // to build up a full list of the parentNodes for comparison + while ( cur ) { + ap.unshift( cur ); + cur = cur.parentNode; + } + + cur = bup; + + while ( cur ) { + bp.unshift( cur ); + cur = cur.parentNode; + } + + al = ap.length; + bl = bp.length; + + // Start walking down the tree looking for a discrepancy + for ( var i = 0; i < al && i < bl; i++ ) { + if ( ap[i] !== bp[i] ) { + return siblingCheck( ap[i], bp[i] ); + } + } + + // We ended someplace up the tree so do a sibling check + return i === al ? + siblingCheck( a, bp[i], -1 ) : + siblingCheck( ap[i], b, 1 ); + }; + + siblingCheck = function( a, b, ret ) { + if ( a === b ) { + return ret; + } + + var cur = a.nextSibling; + + while ( cur ) { + if ( cur === b ) { + return -1; + } + + cur = cur.nextSibling; + } + + return 1; + }; +} + +// Check to see if the browser returns elements by name when +// querying by getElementById (and provide a workaround) +(function(){ + // We're going to inject a fake input element with a specified name + var form = document.createElement("div"), + id = "script" + (new Date()).getTime(), + root = document.documentElement; + + form.innerHTML = ""; + + // Inject it into the root element, check its status, and remove it quickly + root.insertBefore( form, root.firstChild ); + + // The workaround has to do additional checks after a getElementById + // Which slows things down for other browsers (hence the branching) + if ( document.getElementById( id ) ) { + Expr.find.ID = function( match, context, isXML ) { + if ( typeof context.getElementById !== "undefined" && !isXML ) { + var m = context.getElementById(match[1]); + + return m ? + m.id === match[1] || typeof m.getAttributeNode !== "undefined" && m.getAttributeNode("id").nodeValue === match[1] ? + [m] : + undefined : + []; + } + }; + + Expr.filter.ID = function( elem, match ) { + var node = typeof elem.getAttributeNode !== "undefined" && elem.getAttributeNode("id"); + + return elem.nodeType === 1 && node && node.nodeValue === match; + }; + } + + root.removeChild( form ); + + // release memory in IE + root = form = null; +})(); + +(function(){ + // Check to see if the browser returns only elements + // when doing getElementsByTagName("*") + + // Create a fake element + var div = document.createElement("div"); + div.appendChild( document.createComment("") ); + + // Make sure no comments are found + if ( div.getElementsByTagName("*").length > 0 ) { + Expr.find.TAG = function( match, context ) { + var results = context.getElementsByTagName( match[1] ); + + // Filter out possible comments + if ( match[1] === "*" ) { + var tmp = []; + + for ( var i = 0; results[i]; i++ ) { + if ( results[i].nodeType === 1 ) { + tmp.push( results[i] ); + } + } + + results = tmp; + } + + return results; + }; + } + + // Check to see if an attribute returns normalized href attributes + div.innerHTML = ""; + + if ( div.firstChild && typeof div.firstChild.getAttribute !== "undefined" && + div.firstChild.getAttribute("href") !== "#" ) { + + Expr.attrHandle.href = function( elem ) { + return elem.getAttribute( "href", 2 ); + }; + } + + // release memory in IE + div = null; +})(); + +if ( document.querySelectorAll ) { + (function(){ + var oldSizzle = Sizzle, + div = document.createElement("div"), + id = "__sizzle__"; + + div.innerHTML = "

      "; + + // Safari can't handle uppercase or unicode characters when + // in quirks mode. + if ( div.querySelectorAll && div.querySelectorAll(".TEST").length === 0 ) { + return; + } + + Sizzle = function( query, context, extra, seed ) { + context = context || document; + + // Only use querySelectorAll on non-XML documents + // (ID selectors don't work in non-HTML documents) + if ( !seed && !Sizzle.isXML(context) ) { + // See if we find a selector to speed up + var match = /^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec( query ); + + if ( match && (context.nodeType === 1 || context.nodeType === 9) ) { + // Speed-up: Sizzle("TAG") + if ( match[1] ) { + return makeArray( context.getElementsByTagName( query ), extra ); + + // Speed-up: Sizzle(".CLASS") + } else if ( match[2] && Expr.find.CLASS && context.getElementsByClassName ) { + return makeArray( context.getElementsByClassName( match[2] ), extra ); + } + } + + if ( context.nodeType === 9 ) { + // Speed-up: Sizzle("body") + // The body element only exists once, optimize finding it + if ( query === "body" && context.body ) { + return makeArray( [ context.body ], extra ); + + // Speed-up: Sizzle("#ID") + } else if ( match && match[3] ) { + var elem = context.getElementById( match[3] ); + + // Check parentNode to catch when Blackberry 4.6 returns + // nodes that are no longer in the document #6963 + if ( elem && elem.parentNode ) { + // Handle the case where IE and Opera return items + // by name instead of ID + if ( elem.id === match[3] ) { + return makeArray( [ elem ], extra ); + } + + } else { + return makeArray( [], extra ); + } + } + + try { + return makeArray( context.querySelectorAll(query), extra ); + } catch(qsaError) {} + + // qSA works strangely on Element-rooted queries + // We can work around this by specifying an extra ID on the root + // and working up from there (Thanks to Andrew Dupont for the technique) + // IE 8 doesn't work on object elements + } else if ( context.nodeType === 1 && context.nodeName.toLowerCase() !== "object" ) { + var oldContext = context, + old = context.getAttribute( "id" ), + nid = old || id, + hasParent = context.parentNode, + relativeHierarchySelector = /^\s*[+~]/.test( query ); + + if ( !old ) { + context.setAttribute( "id", nid ); + } else { + nid = nid.replace( /'/g, "\\$&" ); + } + if ( relativeHierarchySelector && hasParent ) { + context = context.parentNode; + } + + try { + if ( !relativeHierarchySelector || hasParent ) { + return makeArray( context.querySelectorAll( "[id='" + nid + "'] " + query ), extra ); + } + + } catch(pseudoError) { + } finally { + if ( !old ) { + oldContext.removeAttribute( "id" ); + } + } + } + } + + return oldSizzle(query, context, extra, seed); + }; + + for ( var prop in oldSizzle ) { + Sizzle[ prop ] = oldSizzle[ prop ]; + } + + // release memory in IE + div = null; + })(); +} + +(function(){ + var html = document.documentElement, + matches = html.matchesSelector || html.mozMatchesSelector || html.webkitMatchesSelector || html.msMatchesSelector; + + if ( matches ) { + // Check to see if it's possible to do matchesSelector + // on a disconnected node (IE 9 fails this) + var disconnectedMatch = !matches.call( document.createElement( "div" ), "div" ), + pseudoWorks = false; + + try { + // This should fail with an exception + // Gecko does not error, returns false instead + matches.call( document.documentElement, "[test!='']:sizzle" ); + + } catch( pseudoError ) { + pseudoWorks = true; + } + + Sizzle.matchesSelector = function( node, expr ) { + // Make sure that attribute selectors are quoted + expr = expr.replace(/\=\s*([^'"\]]*)\s*\]/g, "='$1']"); + + if ( !Sizzle.isXML( node ) ) { + try { + if ( pseudoWorks || !Expr.match.PSEUDO.test( expr ) && !/!=/.test( expr ) ) { + var ret = matches.call( node, expr ); + + // IE 9's matchesSelector returns false on disconnected nodes + if ( ret || !disconnectedMatch || + // As well, disconnected nodes are said to be in a document + // fragment in IE 9, so check for that + node.document && node.document.nodeType !== 11 ) { + return ret; + } + } + } catch(e) {} + } + + return Sizzle(expr, null, null, [node]).length > 0; + }; + } +})(); + +(function(){ + var div = document.createElement("div"); + + div.innerHTML = "
      "; + + // Opera can't find a second classname (in 9.6) + // Also, make sure that getElementsByClassName actually exists + if ( !div.getElementsByClassName || div.getElementsByClassName("e").length === 0 ) { + return; + } + + // Safari caches class attributes, doesn't catch changes (in 3.2) + div.lastChild.className = "e"; + + if ( div.getElementsByClassName("e").length === 1 ) { + return; + } + + Expr.order.splice(1, 0, "CLASS"); + Expr.find.CLASS = function( match, context, isXML ) { + if ( typeof context.getElementsByClassName !== "undefined" && !isXML ) { + return context.getElementsByClassName(match[1]); + } + }; + + // release memory in IE + div = null; +})(); + +function dirNodeCheck( dir, cur, doneName, checkSet, nodeCheck, isXML ) { + for ( var i = 0, l = checkSet.length; i < l; i++ ) { + var elem = checkSet[i]; + + if ( elem ) { + var match = false; + + elem = elem[dir]; + + while ( elem ) { + if ( elem[ expando ] === doneName ) { + match = checkSet[elem.sizset]; + break; + } + + if ( elem.nodeType === 1 && !isXML ){ + elem[ expando ] = doneName; + elem.sizset = i; + } + + if ( elem.nodeName.toLowerCase() === cur ) { + match = elem; + break; + } + + elem = elem[dir]; + } + + checkSet[i] = match; + } + } +} + +function dirCheck( dir, cur, doneName, checkSet, nodeCheck, isXML ) { + for ( var i = 0, l = checkSet.length; i < l; i++ ) { + var elem = checkSet[i]; + + if ( elem ) { + var match = false; + + elem = elem[dir]; + + while ( elem ) { + if ( elem[ expando ] === doneName ) { + match = checkSet[elem.sizset]; + break; + } + + if ( elem.nodeType === 1 ) { + if ( !isXML ) { + elem[ expando ] = doneName; + elem.sizset = i; + } + + if ( typeof cur !== "string" ) { + if ( elem === cur ) { + match = true; + break; + } + + } else if ( Sizzle.filter( cur, [elem] ).length > 0 ) { + match = elem; + break; + } + } + + elem = elem[dir]; + } + + checkSet[i] = match; + } + } +} + +if ( document.documentElement.contains ) { + Sizzle.contains = function( a, b ) { + return a !== b && (a.contains ? a.contains(b) : true); + }; + +} else if ( document.documentElement.compareDocumentPosition ) { + Sizzle.contains = function( a, b ) { + return !!(a.compareDocumentPosition(b) & 16); + }; + +} else { + Sizzle.contains = function() { + return false; + }; +} + +Sizzle.isXML = function( elem ) { + // documentElement is verified for cases where it doesn't yet exist + // (such as loading iframes in IE - #4833) + var documentElement = (elem ? elem.ownerDocument || elem : 0).documentElement; + + return documentElement ? documentElement.nodeName !== "HTML" : false; +}; + +var posProcess = function( selector, context, seed ) { + var match, + tmpSet = [], + later = "", + root = context.nodeType ? [context] : context; + + // Position selectors must be done after the filter + // And so must :not(positional) so we move all PSEUDOs to the end + while ( (match = Expr.match.PSEUDO.exec( selector )) ) { + later += match[0]; + selector = selector.replace( Expr.match.PSEUDO, "" ); + } + + selector = Expr.relative[selector] ? selector + "*" : selector; + + for ( var i = 0, l = root.length; i < l; i++ ) { + Sizzle( selector, root[i], tmpSet, seed ); + } + + return Sizzle.filter( later, tmpSet ); +}; + +// EXPOSE +// Override sizzle attribute retrieval +Sizzle.attr = jQuery.attr; +Sizzle.selectors.attrMap = {}; +jQuery.find = Sizzle; +jQuery.expr = Sizzle.selectors; +jQuery.expr[":"] = jQuery.expr.filters; +jQuery.unique = Sizzle.uniqueSort; +jQuery.text = Sizzle.getText; +jQuery.isXMLDoc = Sizzle.isXML; +jQuery.contains = Sizzle.contains; + + +})(); + + +var runtil = /Until$/, + rparentsprev = /^(?:parents|prevUntil|prevAll)/, + // Note: This RegExp should be improved, or likely pulled from Sizzle + rmultiselector = /,/, + isSimple = /^.[^:#\[\.,]*$/, + slice = Array.prototype.slice, + POS = jQuery.expr.match.globalPOS, + // methods guaranteed to produce a unique set when starting from a unique set + guaranteedUnique = { + children: true, + contents: true, + next: true, + prev: true + }; + +jQuery.fn.extend({ + find: function( selector ) { + var self = this, + i, l; + + if ( typeof selector !== "string" ) { + return jQuery( selector ).filter(function() { + for ( i = 0, l = self.length; i < l; i++ ) { + if ( jQuery.contains( self[ i ], this ) ) { + return true; + } + } + }); + } + + var ret = this.pushStack( "", "find", selector ), + length, n, r; + + for ( i = 0, l = this.length; i < l; i++ ) { + length = ret.length; + jQuery.find( selector, this[i], ret ); + + if ( i > 0 ) { + // Make sure that the results are unique + for ( n = length; n < ret.length; n++ ) { + for ( r = 0; r < length; r++ ) { + if ( ret[r] === ret[n] ) { + ret.splice(n--, 1); + break; + } + } + } + } + } + + return ret; + }, + + has: function( target ) { + var targets = jQuery( target ); + return this.filter(function() { + for ( var i = 0, l = targets.length; i < l; i++ ) { + if ( jQuery.contains( this, targets[i] ) ) { + return true; + } + } + }); + }, + + not: function( selector ) { + return this.pushStack( winnow(this, selector, false), "not", selector); + }, + + filter: function( selector ) { + return this.pushStack( winnow(this, selector, true), "filter", selector ); + }, + + is: function( selector ) { + return !!selector && ( + typeof selector === "string" ? + // If this is a positional selector, check membership in the returned set + // so $("p:first").is("p:last") won't return true for a doc with two "p". + POS.test( selector ) ? + jQuery( selector, this.context ).index( this[0] ) >= 0 : + jQuery.filter( selector, this ).length > 0 : + this.filter( selector ).length > 0 ); + }, + + closest: function( selectors, context ) { + var ret = [], i, l, cur = this[0]; + + // Array (deprecated as of jQuery 1.7) + if ( jQuery.isArray( selectors ) ) { + var level = 1; + + while ( cur && cur.ownerDocument && cur !== context ) { + for ( i = 0; i < selectors.length; i++ ) { + + if ( jQuery( cur ).is( selectors[ i ] ) ) { + ret.push({ selector: selectors[ i ], elem: cur, level: level }); + } + } + + cur = cur.parentNode; + level++; + } + + return ret; + } + + // String + var pos = POS.test( selectors ) || typeof selectors !== "string" ? + jQuery( selectors, context || this.context ) : + 0; + + for ( i = 0, l = this.length; i < l; i++ ) { + cur = this[i]; + + while ( cur ) { + if ( pos ? pos.index(cur) > -1 : jQuery.find.matchesSelector(cur, selectors) ) { + ret.push( cur ); + break; + + } else { + cur = cur.parentNode; + if ( !cur || !cur.ownerDocument || cur === context || cur.nodeType === 11 ) { + break; + } + } + } + } + + ret = ret.length > 1 ? jQuery.unique( ret ) : ret; + + return this.pushStack( ret, "closest", selectors ); + }, + + // Determine the position of an element within + // the matched set of elements + index: function( elem ) { + + // No argument, return index in parent + if ( !elem ) { + return ( this[0] && this[0].parentNode ) ? this.prevAll().length : -1; + } + + // index in selector + if ( typeof elem === "string" ) { + return jQuery.inArray( this[0], jQuery( elem ) ); + } + + // Locate the position of the desired element + return jQuery.inArray( + // If it receives a jQuery object, the first element is used + elem.jquery ? elem[0] : elem, this ); + }, + + add: function( selector, context ) { + var set = typeof selector === "string" ? + jQuery( selector, context ) : + jQuery.makeArray( selector && selector.nodeType ? [ selector ] : selector ), + all = jQuery.merge( this.get(), set ); + + return this.pushStack( isDisconnected( set[0] ) || isDisconnected( all[0] ) ? + all : + jQuery.unique( all ) ); + }, + + andSelf: function() { + return this.add( this.prevObject ); + } +}); + +// A painfully simple check to see if an element is disconnected +// from a document (should be improved, where feasible). +function isDisconnected( node ) { + return !node || !node.parentNode || node.parentNode.nodeType === 11; +} + +jQuery.each({ + parent: function( elem ) { + var parent = elem.parentNode; + return parent && parent.nodeType !== 11 ? parent : null; + }, + parents: function( elem ) { + return jQuery.dir( elem, "parentNode" ); + }, + parentsUntil: function( elem, i, until ) { + return jQuery.dir( elem, "parentNode", until ); + }, + next: function( elem ) { + return jQuery.nth( elem, 2, "nextSibling" ); + }, + prev: function( elem ) { + return jQuery.nth( elem, 2, "previousSibling" ); + }, + nextAll: function( elem ) { + return jQuery.dir( elem, "nextSibling" ); + }, + prevAll: function( elem ) { + return jQuery.dir( elem, "previousSibling" ); + }, + nextUntil: function( elem, i, until ) { + return jQuery.dir( elem, "nextSibling", until ); + }, + prevUntil: function( elem, i, until ) { + return jQuery.dir( elem, "previousSibling", until ); + }, + siblings: function( elem ) { + return jQuery.sibling( ( elem.parentNode || {} ).firstChild, elem ); + }, + children: function( elem ) { + return jQuery.sibling( elem.firstChild ); + }, + contents: function( elem ) { + return jQuery.nodeName( elem, "iframe" ) ? + elem.contentDocument || elem.contentWindow.document : + jQuery.makeArray( elem.childNodes ); + } +}, function( name, fn ) { + jQuery.fn[ name ] = function( until, selector ) { + var ret = jQuery.map( this, fn, until ); + + if ( !runtil.test( name ) ) { + selector = until; + } + + if ( selector && typeof selector === "string" ) { + ret = jQuery.filter( selector, ret ); + } + + ret = this.length > 1 && !guaranteedUnique[ name ] ? jQuery.unique( ret ) : ret; + + if ( (this.length > 1 || rmultiselector.test( selector )) && rparentsprev.test( name ) ) { + ret = ret.reverse(); + } + + return this.pushStack( ret, name, slice.call( arguments ).join(",") ); + }; +}); + +jQuery.extend({ + filter: function( expr, elems, not ) { + if ( not ) { + expr = ":not(" + expr + ")"; + } + + return elems.length === 1 ? + jQuery.find.matchesSelector(elems[0], expr) ? [ elems[0] ] : [] : + jQuery.find.matches(expr, elems); + }, + + dir: function( elem, dir, until ) { + var matched = [], + cur = elem[ dir ]; + + while ( cur && cur.nodeType !== 9 && (until === undefined || cur.nodeType !== 1 || !jQuery( cur ).is( until )) ) { + if ( cur.nodeType === 1 ) { + matched.push( cur ); + } + cur = cur[dir]; + } + return matched; + }, + + nth: function( cur, result, dir, elem ) { + result = result || 1; + var num = 0; + + for ( ; cur; cur = cur[dir] ) { + if ( cur.nodeType === 1 && ++num === result ) { + break; + } + } + + return cur; + }, + + sibling: function( n, elem ) { + var r = []; + + for ( ; n; n = n.nextSibling ) { + if ( n.nodeType === 1 && n !== elem ) { + r.push( n ); + } + } + + return r; + } +}); + +// Implement the identical functionality for filter and not +function winnow( elements, qualifier, keep ) { + + // Can't pass null or undefined to indexOf in Firefox 4 + // Set to 0 to skip string check + qualifier = qualifier || 0; + + if ( jQuery.isFunction( qualifier ) ) { + return jQuery.grep(elements, function( elem, i ) { + var retVal = !!qualifier.call( elem, i, elem ); + return retVal === keep; + }); + + } else if ( qualifier.nodeType ) { + return jQuery.grep(elements, function( elem, i ) { + return ( elem === qualifier ) === keep; + }); + + } else if ( typeof qualifier === "string" ) { + var filtered = jQuery.grep(elements, function( elem ) { + return elem.nodeType === 1; + }); + + if ( isSimple.test( qualifier ) ) { + return jQuery.filter(qualifier, filtered, !keep); + } else { + qualifier = jQuery.filter( qualifier, filtered ); + } + } + + return jQuery.grep(elements, function( elem, i ) { + return ( jQuery.inArray( elem, qualifier ) >= 0 ) === keep; + }); +} + + + + +function createSafeFragment( document ) { + var list = nodeNames.split( "|" ), + safeFrag = document.createDocumentFragment(); + + if ( safeFrag.createElement ) { + while ( list.length ) { + safeFrag.createElement( + list.pop() + ); + } + } + return safeFrag; +} + +var nodeNames = "abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|" + + "header|hgroup|mark|meter|nav|output|progress|section|summary|time|video", + rinlinejQuery = / jQuery\d+="(?:\d+|null)"/g, + rleadingWhitespace = /^\s+/, + rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig, + rtagName = /<([\w:]+)/, + rtbody = /]", "i"), + // checked="checked" or checked + rchecked = /checked\s*(?:[^=]|=\s*.checked.)/i, + rscriptType = /\/(java|ecma)script/i, + rcleanScript = /^\s*", "" ], + legend: [ 1, "
      ", "
      " ], + thead: [ 1, "", "
      " ], + tr: [ 2, "", "
      " ], + td: [ 3, "", "
      " ], + col: [ 2, "", "
      " ], + area: [ 1, "", "" ], + _default: [ 0, "", "" ] + }, + safeFragment = createSafeFragment( document ); + +wrapMap.optgroup = wrapMap.option; +wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead; +wrapMap.th = wrapMap.td; + +// IE can't serialize and + + + + + + + + +
      +
      +
      +
      + + +

      Index

      + +
      + +
      + + +
      +
      +
      +
      +
      + + + + + +
      +
      +
      +
      + + + + \ No newline at end of file diff --git a/t/recipes/checks/cruft/cruft-sphinx-documentation/build-spec/orig/src/sphinx-1.22/_build/html/index.html b/t/recipes/checks/cruft/cruft-sphinx-documentation/build-spec/orig/src/sphinx-1.22/_build/html/index.html new file mode 100644 index 0000000..2a7ee05 --- /dev/null +++ b/t/recipes/checks/cruft/cruft-sphinx-documentation/build-spec/orig/src/sphinx-1.22/_build/html/index.html @@ -0,0 +1,109 @@ + + + + + + + + Welcome to hello’s documentation! — hello 1 documentation + + + + + + + + + + + + + +
      +
      +
      +
      + +
      +

      Welcome to hello’s documentation!

      +

      Contents:

      +
      +
        +
      +
      +
      +
      +

      Indices and tables

      + +
      + + +
      +
      +
      +
      +
      +

      Table Of Contents

      + + +

      This Page

      + + + +
      +
      +
      +
      + + + + \ No newline at end of file diff --git a/t/recipes/checks/cruft/cruft-sphinx-documentation/build-spec/orig/src/sphinx-1.22/_build/html/objects.inv b/t/recipes/checks/cruft/cruft-sphinx-documentation/build-spec/orig/src/sphinx-1.22/_build/html/objects.inv new file mode 100644 index 0000000..c7be278 Binary files /dev/null and b/t/recipes/checks/cruft/cruft-sphinx-documentation/build-spec/orig/src/sphinx-1.22/_build/html/objects.inv differ diff --git a/t/recipes/checks/cruft/cruft-sphinx-documentation/build-spec/orig/src/sphinx-1.22/_build/html/search.html b/t/recipes/checks/cruft/cruft-sphinx-documentation/build-spec/orig/src/sphinx-1.22/_build/html/search.html new file mode 100644 index 0000000..46a39e0 --- /dev/null +++ b/t/recipes/checks/cruft/cruft-sphinx-documentation/build-spec/orig/src/sphinx-1.22/_build/html/search.html @@ -0,0 +1,99 @@ + + + + + + + + Search — hello 1 documentation + + + + + + + + + + + + + + + + + + + +
      +
      +
      +
      + +

      Search

      +
      + +

      + Please activate JavaScript to enable the search + functionality. +

      +
      +

      + From here you can search these documents. Enter your search + words into the box below and click "search". Note that the search + function will automatically search for all of the words. Pages + containing fewer words won't appear in the result list. +

      +
      + + + +
      + +
      + +
      + +
      +
      +
      +
      +
      +
      +
      +
      +
      + + + + \ No newline at end of file diff --git a/t/recipes/checks/cruft/cruft-sphinx-documentation/build-spec/orig/src/sphinx-1.22/_build/html/searchindex.js b/t/recipes/checks/cruft/cruft-sphinx-documentation/build-spec/orig/src/sphinx-1.22/_build/html/searchindex.js new file mode 100644 index 0000000..6c954cd --- /dev/null +++ b/t/recipes/checks/cruft/cruft-sphinx-documentation/build-spec/orig/src/sphinx-1.22/_build/html/searchindex.js @@ -0,0 +1 @@ +Search.setIndex({objtypes:{},objects:{},filenames:["index"],objnames:{},terms:{modul:0,index:0,content:0,page:0,search:0},titles:["Welcome to hello’s documentation!"],envversion:43,titleterms:{document:0,tabl:0,welcom:0,hello:0,indic:0}}) \ No newline at end of file diff --git a/t/recipes/checks/cruft/cruft-sphinx-documentation/build-spec/orig/src/sphinx-1.22/conf.py b/t/recipes/checks/cruft/cruft-sphinx-documentation/build-spec/orig/src/sphinx-1.22/conf.py new file mode 100644 index 0000000..af81b04 --- /dev/null +++ b/t/recipes/checks/cruft/cruft-sphinx-documentation/build-spec/orig/src/sphinx-1.22/conf.py @@ -0,0 +1,259 @@ +#!/usr/bin/env python3 +# -*- coding: utf-8 -*- +# +# hello documentation build configuration file, created by +# sphinx-quickstart on Mon Mar 31 19:57:16 2014. +# +# This file is execfile()d with the current directory set to its +# containing dir. +# +# Note that not all possible configuration values are present in this +# autogenerated file. +# +# All configuration values have a default; values that are commented out +# serve to show the default. + +import sys +import os + +# If extensions (or modules to document with autodoc) are in another directory, +# add these directories to sys.path here. If the directory is relative to the +# documentation root, use os.path.abspath to make it absolute, like shown here. +#sys.path.insert(0, os.path.abspath('.')) + +# -- General configuration ------------------------------------------------ + +# If your documentation needs a minimal Sphinx version, state it here. +#needs_sphinx = '1.0' + +# Add any Sphinx extension module names here, as strings. They can be +# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom +# ones. +extensions = [] + +# Add any paths that contain templates here, relative to this directory. +templates_path = ['_templates'] + +# The suffix of source filenames. +source_suffix = '.rst' + +# The encoding of source files. +#source_encoding = 'utf-8-sig' + +# The master toctree document. +master_doc = 'index' + +# General information about the project. +project = 'hello' +copyright = '2014, lintian' + +# The version info for the project you're documenting, acts as replacement for +# |version| and |release|, also used in various other places throughout the +# built documents. +# +# The short X.Y version. +version = '1' +# The full version, including alpha/beta/rc tags. +release = '1' + +# The language for content autogenerated by Sphinx. Refer to documentation +# for a list of supported languages. +#language = None + +# There are two options for replacing |today|: either, you set today to some +# non-false value, then it is used: +#today = '' +# Else, today_fmt is used as the format for a strftime call. +#today_fmt = '%B %d, %Y' + +# List of patterns, relative to source directory, that match files and +# directories to ignore when looking for source files. +exclude_patterns = ['_build'] + +# The reST default role (used for this markup: `text`) to use for all +# documents. +#default_role = None + +# If true, '()' will be appended to :func: etc. cross-reference text. +#add_function_parentheses = True + +# If true, the current module name will be prepended to all description +# unit titles (such as .. function::). +#add_module_names = True + +# If true, sectionauthor and moduleauthor directives will be shown in the +# output. They are ignored by default. +#show_authors = False + +# The name of the Pygments (syntax highlighting) style to use. +pygments_style = 'sphinx' + +# A list of ignored prefixes for module index sorting. +#modindex_common_prefix = [] + +# If true, keep warnings as "system message" paragraphs in the built documents. +#keep_warnings = False + + +# -- Options for HTML output ---------------------------------------------- + +# The theme to use for HTML and HTML Help pages. See the documentation for +# a list of builtin themes. +html_theme = 'default' + +# Theme options are theme-specific and customize the look and feel of a theme +# further. For a list of options available for each theme, see the +# documentation. +#html_theme_options = {} + +# Add any paths that contain custom themes here, relative to this directory. +#html_theme_path = [] + +# The name for this set of Sphinx documents. If None, it defaults to +# " v documentation". +#html_title = None + +# A shorter title for the navigation bar. Default is the same as html_title. +#html_short_title = None + +# The name of an image file (relative to this directory) to place at the top +# of the sidebar. +#html_logo = None + +# The name of an image file (within the static path) to use as favicon of the +# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32 +# pixels large. +#html_favicon = None + +# Add any paths that contain custom static files (such as style sheets) here, +# relative to this directory. They are copied after the builtin static files, +# so a file named "default.css" will overwrite the builtin "default.css". +html_static_path = ['_static'] + +# Add any extra paths that contain custom files (such as robots.txt or +# .htaccess) here, relative to this directory. These files are copied +# directly to the root of the documentation. +#html_extra_path = [] + +# If not '', a 'Last updated on:' timestamp is inserted at every page bottom, +# using the given strftime format. +#html_last_updated_fmt = '%b %d, %Y' + +# If true, SmartyPants will be used to convert quotes and dashes to +# typographically correct entities. +#html_use_smartypants = True + +# Custom sidebar templates, maps document names to template names. +#html_sidebars = {} + +# Additional templates that should be rendered to pages, maps page names to +# template names. +#html_additional_pages = {} + +# If false, no module index is generated. +#html_domain_indices = True + +# If false, no index is generated. +#html_use_index = True + +# If true, the index is split into individual pages for each letter. +#html_split_index = False + +# If true, links to the reST sources are added to the pages. +#html_show_sourcelink = True + +# If true, "Created using Sphinx" is shown in the HTML footer. Default is True. +#html_show_sphinx = True + +# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True. +#html_show_copyright = True + +# If true, an OpenSearch description file will be output, and all pages will +# contain a tag referring to it. The value of this option must be the +# base URL from which the finished HTML is served. +#html_use_opensearch = '' + +# This is the file name suffix for HTML files (e.g. ".xhtml"). +#html_file_suffix = None + +# Output file base name for HTML help builder. +htmlhelp_basename = 'hellodoc' + + +# -- Options for LaTeX output --------------------------------------------- + +latex_elements = { +# The paper size ('letterpaper' or 'a4paper'). +#'papersize': 'letterpaper', + +# The font size ('10pt', '11pt' or '12pt'). +#'pointsize': '10pt', + +# Additional stuff for the LaTeX preamble. +#'preamble': '', +} + +# Grouping the document tree into LaTeX files. List of tuples +# (source start file, target name, title, +# author, documentclass [howto, manual, or own class]). +latex_documents = [ + ('index', 'hello.tex', 'hello Documentation', + 'lintian', 'manual'), +] + +# The name of an image file (relative to this directory) to place at the top of +# the title page. +#latex_logo = None + +# For "manual" documents, if this is true, then toplevel headings are parts, +# not chapters. +#latex_use_parts = False + +# If true, show page references after internal links. +#latex_show_pagerefs = False + +# If true, show URL addresses after external links. +#latex_show_urls = False + +# Documents to append as an appendix to all manuals. +#latex_appendices = [] + +# If false, no module index is generated. +#latex_domain_indices = True + + +# -- Options for manual page output --------------------------------------- + +# One entry per manual page. List of tuples +# (source start file, name, description, authors, manual section). +man_pages = [ + ('index', 'hello', 'hello Documentation', + ['lintian'], 1) +] + +# If true, show URL addresses after external links. +#man_show_urls = False + + +# -- Options for Texinfo output ------------------------------------------- + +# Grouping the document tree into Texinfo files. List of tuples +# (source start file, target name, title, author, +# dir menu entry, description, category) +texinfo_documents = [ + ('index', 'hello', 'hello Documentation', + 'lintian', 'hello', 'One line description of project.', + 'Miscellaneous'), +] + +# Documents to append as an appendix to all manuals. +#texinfo_appendices = [] + +# If false, no module index is generated. +#texinfo_domain_indices = True + +# How to display URL addresses: 'footnote', 'no', or 'inline'. +#texinfo_show_urls = 'footnote' + +# If true, do not generate a @detailmenu in the "Top" node's menu. +#texinfo_no_detailmenu = False diff --git a/t/recipes/checks/cruft/cruft-sphinx-documentation/build-spec/orig/src/sphinx-1.22/index.rst b/t/recipes/checks/cruft/cruft-sphinx-documentation/build-spec/orig/src/sphinx-1.22/index.rst new file mode 100644 index 0000000..778459b --- /dev/null +++ b/t/recipes/checks/cruft/cruft-sphinx-documentation/build-spec/orig/src/sphinx-1.22/index.rst @@ -0,0 +1,22 @@ +.. hello documentation master file, created by + sphinx-quickstart on Mon Mar 31 19:57:16 2014. + You can adapt this file completely to your liking, but it should at least + contain the root `toctree` directive. + +Welcome to hello's documentation! +================================= + +Contents: + +.. toctree:: + :maxdepth: 2 + + + +Indices and tables +================== + +* :ref:`genindex` +* :ref:`modindex` +* :ref:`search` + diff --git a/t/recipes/checks/cruft/cruft-sphinx-documentation/build-spec/orig/src/sphinx-1.22/make.bat b/t/recipes/checks/cruft/cruft-sphinx-documentation/build-spec/orig/src/sphinx-1.22/make.bat new file mode 100644 index 0000000..5d3e55e --- /dev/null +++ b/t/recipes/checks/cruft/cruft-sphinx-documentation/build-spec/orig/src/sphinx-1.22/make.bat @@ -0,0 +1,242 @@ +@ECHO OFF + +REM Command file for Sphinx documentation + +if "%SPHINXBUILD%" == "" ( + set SPHINXBUILD=sphinx-build +) +set BUILDDIR=_build +set ALLSPHINXOPTS=-d %BUILDDIR%/doctrees %SPHINXOPTS% . +set I18NSPHINXOPTS=%SPHINXOPTS% . +if NOT "%PAPER%" == "" ( + set ALLSPHINXOPTS=-D latex_paper_size=%PAPER% %ALLSPHINXOPTS% + set I18NSPHINXOPTS=-D latex_paper_size=%PAPER% %I18NSPHINXOPTS% +) + +if "%1" == "" goto help + +if "%1" == "help" ( + :help + echo.Please use `make ^` where ^ is one of + echo. html to make standalone HTML files + echo. dirhtml to make HTML files named index.html in directories + echo. singlehtml to make a single large HTML file + echo. pickle to make pickle files + echo. json to make JSON files + echo. htmlhelp to make HTML files and a HTML help project + echo. qthelp to make HTML files and a qthelp project + echo. devhelp to make HTML files and a Devhelp project + echo. epub to make an epub + echo. latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter + echo. text to make text files + echo. man to make manual pages + echo. texinfo to make Texinfo files + echo. gettext to make PO message catalogs + echo. changes to make an overview over all changed/added/deprecated items + echo. xml to make Docutils-native XML files + echo. pseudoxml to make pseudoxml-XML files for display purposes + echo. linkcheck to check all external links for integrity + echo. doctest to run all doctests embedded in the documentation if enabled + goto end +) + +if "%1" == "clean" ( + for /d %%i in (%BUILDDIR%\*) do rmdir /q /s %%i + del /q /s %BUILDDIR%\* + goto end +) + + +%SPHINXBUILD% 2> nul +if errorlevel 9009 ( + echo. + echo.The 'sphinx-build' command was not found. Make sure you have Sphinx + echo.installed, then set the SPHINXBUILD environment variable to point + echo.to the full path of the 'sphinx-build' executable. Alternatively you + echo.may add the Sphinx directory to PATH. + echo. + echo.If you don't have Sphinx installed, grab it from + echo.http://sphinx-doc.org/ + exit /b 1 +) + +if "%1" == "html" ( + %SPHINXBUILD% -b html %ALLSPHINXOPTS% %BUILDDIR%/html + if errorlevel 1 exit /b 1 + echo. + echo.Build finished. The HTML pages are in %BUILDDIR%/html. + goto end +) + +if "%1" == "dirhtml" ( + %SPHINXBUILD% -b dirhtml %ALLSPHINXOPTS% %BUILDDIR%/dirhtml + if errorlevel 1 exit /b 1 + echo. + echo.Build finished. The HTML pages are in %BUILDDIR%/dirhtml. + goto end +) + +if "%1" == "singlehtml" ( + %SPHINXBUILD% -b singlehtml %ALLSPHINXOPTS% %BUILDDIR%/singlehtml + if errorlevel 1 exit /b 1 + echo. + echo.Build finished. The HTML pages are in %BUILDDIR%/singlehtml. + goto end +) + +if "%1" == "pickle" ( + %SPHINXBUILD% -b pickle %ALLSPHINXOPTS% %BUILDDIR%/pickle + if errorlevel 1 exit /b 1 + echo. + echo.Build finished; now you can process the pickle files. + goto end +) + +if "%1" == "json" ( + %SPHINXBUILD% -b json %ALLSPHINXOPTS% %BUILDDIR%/json + if errorlevel 1 exit /b 1 + echo. + echo.Build finished; now you can process the JSON files. + goto end +) + +if "%1" == "htmlhelp" ( + %SPHINXBUILD% -b htmlhelp %ALLSPHINXOPTS% %BUILDDIR%/htmlhelp + if errorlevel 1 exit /b 1 + echo. + echo.Build finished; now you can run HTML Help Workshop with the ^ +.hhp project file in %BUILDDIR%/htmlhelp. + goto end +) + +if "%1" == "qthelp" ( + %SPHINXBUILD% -b qthelp %ALLSPHINXOPTS% %BUILDDIR%/qthelp + if errorlevel 1 exit /b 1 + echo. + echo.Build finished; now you can run "qcollectiongenerator" with the ^ +.qhcp project file in %BUILDDIR%/qthelp, like this: + echo.^> qcollectiongenerator %BUILDDIR%\qthelp\hello.qhcp + echo.To view the help file: + echo.^> assistant -collectionFile %BUILDDIR%\qthelp\hello.ghc + goto end +) + +if "%1" == "devhelp" ( + %SPHINXBUILD% -b devhelp %ALLSPHINXOPTS% %BUILDDIR%/devhelp + if errorlevel 1 exit /b 1 + echo. + echo.Build finished. + goto end +) + +if "%1" == "epub" ( + %SPHINXBUILD% -b epub %ALLSPHINXOPTS% %BUILDDIR%/epub + if errorlevel 1 exit /b 1 + echo. + echo.Build finished. The epub file is in %BUILDDIR%/epub. + goto end +) + +if "%1" == "latex" ( + %SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex + if errorlevel 1 exit /b 1 + echo. + echo.Build finished; the LaTeX files are in %BUILDDIR%/latex. + goto end +) + +if "%1" == "latexpdf" ( + %SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex + cd %BUILDDIR%/latex + make all-pdf + cd %BUILDDIR%/.. + echo. + echo.Build finished; the PDF files are in %BUILDDIR%/latex. + goto end +) + +if "%1" == "latexpdfja" ( + %SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex + cd %BUILDDIR%/latex + make all-pdf-ja + cd %BUILDDIR%/.. + echo. + echo.Build finished; the PDF files are in %BUILDDIR%/latex. + goto end +) + +if "%1" == "text" ( + %SPHINXBUILD% -b text %ALLSPHINXOPTS% %BUILDDIR%/text + if errorlevel 1 exit /b 1 + echo. + echo.Build finished. The text files are in %BUILDDIR%/text. + goto end +) + +if "%1" == "man" ( + %SPHINXBUILD% -b man %ALLSPHINXOPTS% %BUILDDIR%/man + if errorlevel 1 exit /b 1 + echo. + echo.Build finished. The manual pages are in %BUILDDIR%/man. + goto end +) + +if "%1" == "texinfo" ( + %SPHINXBUILD% -b texinfo %ALLSPHINXOPTS% %BUILDDIR%/texinfo + if errorlevel 1 exit /b 1 + echo. + echo.Build finished. The Texinfo files are in %BUILDDIR%/texinfo. + goto end +) + +if "%1" == "gettext" ( + %SPHINXBUILD% -b gettext %I18NSPHINXOPTS% %BUILDDIR%/locale + if errorlevel 1 exit /b 1 + echo. + echo.Build finished. The message catalogs are in %BUILDDIR%/locale. + goto end +) + +if "%1" == "changes" ( + %SPHINXBUILD% -b changes %ALLSPHINXOPTS% %BUILDDIR%/changes + if errorlevel 1 exit /b 1 + echo. + echo.The overview file is in %BUILDDIR%/changes. + goto end +) + +if "%1" == "linkcheck" ( + %SPHINXBUILD% -b linkcheck %ALLSPHINXOPTS% %BUILDDIR%/linkcheck + if errorlevel 1 exit /b 1 + echo. + echo.Link check complete; look for any errors in the above output ^ +or in %BUILDDIR%/linkcheck/output.txt. + goto end +) + +if "%1" == "doctest" ( + %SPHINXBUILD% -b doctest %ALLSPHINXOPTS% %BUILDDIR%/doctest + if errorlevel 1 exit /b 1 + echo. + echo.Testing of doctests in the sources finished, look at the ^ +results in %BUILDDIR%/doctest/output.txt. + goto end +) + +if "%1" == "xml" ( + %SPHINXBUILD% -b xml %ALLSPHINXOPTS% %BUILDDIR%/xml + if errorlevel 1 exit /b 1 + echo. + echo.Build finished. The XML files are in %BUILDDIR%/xml. + goto end +) + +if "%1" == "pseudoxml" ( + %SPHINXBUILD% -b pseudoxml %ALLSPHINXOPTS% %BUILDDIR%/pseudoxml + if errorlevel 1 exit /b 1 + echo. + echo.Build finished. The pseudo-XML files are in %BUILDDIR%/pseudoxml. + goto end +) + +:end diff --git a/t/recipes/checks/cruft/cruft-sphinx-documentation/eval/desc b/t/recipes/checks/cruft/cruft-sphinx-documentation/eval/desc new file mode 100644 index 0000000..3b57794 --- /dev/null +++ b/t/recipes/checks/cruft/cruft-sphinx-documentation/eval/desc @@ -0,0 +1,2 @@ +Testname: cruft-sphinx-documentation +Check: cruft diff --git a/t/recipes/checks/cruft/cruft-sphinx-documentation/eval/hints b/t/recipes/checks/cruft/cruft-sphinx-documentation/eval/hints new file mode 100644 index 0000000..cd11c35 --- /dev/null +++ b/t/recipes/checks/cruft/cruft-sphinx-documentation/eval/hints @@ -0,0 +1 @@ +cruft-sphinx-documentation (source): source-contains-prebuilt-sphinx-documentation [src/sphinx-1.22/_build/html/] diff --git a/t/recipes/checks/deb-format/control-file-rules-requires-root-binary-targets/build-spec/debian/control.in b/t/recipes/checks/deb-format/control-file-rules-requires-root-binary-targets/build-spec/debian/control.in new file mode 100644 index 0000000..9b17d19 --- /dev/null +++ b/t/recipes/checks/deb-format/control-file-rules-requires-root-binary-targets/build-spec/debian/control.in @@ -0,0 +1,17 @@ +Source: [% $source %] +Priority: optional +Section: [% $section %] +Maintainer: [% $author %] +Standards-Version: [% $standards_version %] +Build-Depends: [% $build_depends %] +Rules-Requires-Root: binary-targets +Homepage: https://lintian.debian.org/ + +Package: [% $source %] +Architecture: [% $package_architecture %] +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: [% $description %] + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. diff --git a/t/recipes/checks/deb-format/control-file-rules-requires-root-binary-targets/build-spec/debian/rules b/t/recipes/checks/deb-format/control-file-rules-requires-root-binary-targets/build-spec/debian/rules new file mode 100644 index 0000000..3d706f5 --- /dev/null +++ b/t/recipes/checks/deb-format/control-file-rules-requires-root-binary-targets/build-spec/debian/rules @@ -0,0 +1,7 @@ +#!/usr/bin/make -f + +%: + dh $@ + +override_dh_builddeb: + dh_builddeb -- -Zgzip diff --git a/t/recipes/checks/deb-format/control-file-rules-requires-root-binary-targets/build-spec/fill-values b/t/recipes/checks/deb-format/control-file-rules-requires-root-binary-targets/build-spec/fill-values new file mode 100644 index 0000000..f97b076 --- /dev/null +++ b/t/recipes/checks/deb-format/control-file-rules-requires-root-binary-targets/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: upload-native +Testname: control-file-rules-requires-root-binary-targets +Description: Test for "Rules-Requires-Root: binary-targets" diff --git a/t/recipes/checks/deb-format/control-file-rules-requires-root-binary-targets/eval/desc b/t/recipes/checks/deb-format/control-file-rules-requires-root-binary-targets/eval/desc new file mode 100644 index 0000000..e6f5901 --- /dev/null +++ b/t/recipes/checks/deb-format/control-file-rules-requires-root-binary-targets/eval/desc @@ -0,0 +1,2 @@ +Testname: control-file-rules-requires-root-binary-targets +Check: deb-format diff --git a/t/recipes/checks/deb-format/control-file-rules-requires-root-binary-targets/eval/hints b/t/recipes/checks/deb-format/control-file-rules-requires-root-binary-targets/eval/hints new file mode 100644 index 0000000..d7a2b62 --- /dev/null +++ b/t/recipes/checks/deb-format/control-file-rules-requires-root-binary-targets/eval/hints @@ -0,0 +1,2 @@ +control-file-rules-requires-root-binary-targets (binary): data-tarball-compression-format gz +control-file-rules-requires-root-binary-targets (binary): control-tarball-compression-format gz diff --git a/t/recipes/checks/deb-format/control-file-rules-requires-root-no/build-spec/debian/control.in b/t/recipes/checks/deb-format/control-file-rules-requires-root-no/build-spec/debian/control.in new file mode 100644 index 0000000..503994d --- /dev/null +++ b/t/recipes/checks/deb-format/control-file-rules-requires-root-no/build-spec/debian/control.in @@ -0,0 +1,17 @@ +Source: [% $source %] +Priority: optional +Section: [% $section %] +Maintainer: [% $author %] +Standards-Version: [% $standards_version %] +Build-Depends: [% $build_depends %] +Rules-Requires-Root: no +Homepage: https://lintian.debian.org/ + +Package: [% $source %] +Architecture: [% $package_architecture %] +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: [% $description %] + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. diff --git a/t/recipes/checks/deb-format/control-file-rules-requires-root-no/build-spec/debian/rules b/t/recipes/checks/deb-format/control-file-rules-requires-root-no/build-spec/debian/rules new file mode 100644 index 0000000..3d706f5 --- /dev/null +++ b/t/recipes/checks/deb-format/control-file-rules-requires-root-no/build-spec/debian/rules @@ -0,0 +1,7 @@ +#!/usr/bin/make -f + +%: + dh $@ + +override_dh_builddeb: + dh_builddeb -- -Zgzip diff --git a/t/recipes/checks/deb-format/control-file-rules-requires-root-no/build-spec/fill-values b/t/recipes/checks/deb-format/control-file-rules-requires-root-no/build-spec/fill-values new file mode 100644 index 0000000..7359a3f --- /dev/null +++ b/t/recipes/checks/deb-format/control-file-rules-requires-root-no/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: upload-native +Testname: control-file-rules-requires-root-no +Description: Test for "Rules-Requires-Root: no" diff --git a/t/recipes/checks/deb-format/control-file-rules-requires-root-no/eval/desc b/t/recipes/checks/deb-format/control-file-rules-requires-root-no/eval/desc new file mode 100644 index 0000000..ba24431 --- /dev/null +++ b/t/recipes/checks/deb-format/control-file-rules-requires-root-no/eval/desc @@ -0,0 +1,2 @@ +Testname: control-file-rules-requires-root-no +Check: deb-format diff --git a/t/recipes/checks/deb-format/control-file-rules-requires-root-no/eval/hints b/t/recipes/checks/deb-format/control-file-rules-requires-root-no/eval/hints new file mode 100644 index 0000000..719dba0 --- /dev/null +++ b/t/recipes/checks/deb-format/control-file-rules-requires-root-no/eval/hints @@ -0,0 +1,2 @@ +control-file-rules-requires-root-no (binary): data-tarball-compression-format gz +control-file-rules-requires-root-no (binary): control-tarball-compression-format gz diff --git a/t/recipes/checks/deb-format/deb-format-extra-member/build-spec/fill-values b/t/recipes/checks/deb-format/deb-format-extra-member/build-spec/fill-values new file mode 100644 index 0000000..48e956c --- /dev/null +++ b/t/recipes/checks/deb-format/deb-format-extra-member/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: deb +Testname: deb-format-extra-member +Description: Test package for an ar archive in the wrong order diff --git a/t/recipes/checks/deb-format/deb-format-extra-member/build-spec/members/extra-stuff b/t/recipes/checks/deb-format/deb-format-extra-member/build-spec/members/extra-stuff new file mode 100644 index 0000000..532a22a --- /dev/null +++ b/t/recipes/checks/deb-format/deb-format-extra-member/build-spec/members/extra-stuff @@ -0,0 +1 @@ +SOME CONTENTS diff --git a/t/recipes/checks/deb-format/deb-format-extra-member/build-spec/post-build b/t/recipes/checks/deb-format/deb-format-extra-member/build-spec/post-build new file mode 100755 index 0000000..b133a2f --- /dev/null +++ b/t/recipes/checks/deb-format/deb-format-extra-member/build-spec/post-build @@ -0,0 +1,5 @@ +#!/bin/sh + +name=$1 + +ar q $name.deb members/extra-stuff diff --git a/t/recipes/checks/deb-format/deb-format-extra-member/eval/desc b/t/recipes/checks/deb-format/deb-format-extra-member/eval/desc new file mode 100644 index 0000000..40f3b06 --- /dev/null +++ b/t/recipes/checks/deb-format/deb-format-extra-member/eval/desc @@ -0,0 +1,2 @@ +Testname: deb-format-extra-member +Check: deb-format diff --git a/t/recipes/checks/deb-format/deb-format-extra-member/eval/hints b/t/recipes/checks/deb-format/deb-format-extra-member/eval/hints new file mode 100644 index 0000000..d7355dd --- /dev/null +++ b/t/recipes/checks/deb-format/deb-format-extra-member/eval/hints @@ -0,0 +1,3 @@ +deb-format-extra-member (binary): misplaced-extra-member-in-deb extra-stuff (unexpected member at position 3) +deb-format-extra-member (binary): data-tarball-compression-format gz +deb-format-extra-member (binary): control-tarball-compression-format gz diff --git a/t/recipes/checks/deb-format/deb-format-extra-underscore-member-before-control/build-spec/deb-members b/t/recipes/checks/deb-format/deb-format-extra-underscore-member-before-control/build-spec/deb-members new file mode 100644 index 0000000..a5a89b2 --- /dev/null +++ b/t/recipes/checks/deb-format/deb-format-extra-underscore-member-before-control/build-spec/deb-members @@ -0,0 +1,4 @@ +members/debian-binary +members/_extra-stuff +members/control.tar.gz +members/data.tar.gz diff --git a/t/recipes/checks/deb-format/deb-format-extra-underscore-member-before-control/build-spec/fill-values b/t/recipes/checks/deb-format/deb-format-extra-underscore-member-before-control/build-spec/fill-values new file mode 100644 index 0000000..948a3e2 --- /dev/null +++ b/t/recipes/checks/deb-format/deb-format-extra-underscore-member-before-control/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: deb +Testname: deb-format-extra-underscore-member-before-control +Description: Test package for a deb archive with an extra member with _ before control.tar diff --git a/t/recipes/checks/deb-format/deb-format-extra-underscore-member-before-control/build-spec/members/_extra-stuff b/t/recipes/checks/deb-format/deb-format-extra-underscore-member-before-control/build-spec/members/_extra-stuff new file mode 100644 index 0000000..2517541 --- /dev/null +++ b/t/recipes/checks/deb-format/deb-format-extra-underscore-member-before-control/build-spec/members/_extra-stuff @@ -0,0 +1 @@ +SOME CONTENT diff --git a/t/recipes/checks/deb-format/deb-format-extra-underscore-member-before-control/eval/desc b/t/recipes/checks/deb-format/deb-format-extra-underscore-member-before-control/eval/desc new file mode 100644 index 0000000..628ab3e --- /dev/null +++ b/t/recipes/checks/deb-format/deb-format-extra-underscore-member-before-control/eval/desc @@ -0,0 +1,2 @@ +Testname: deb-format-extra-underscore-member-before-control +Check: deb-format diff --git a/t/recipes/checks/deb-format/deb-format-extra-underscore-member-before-control/eval/hints b/t/recipes/checks/deb-format/deb-format-extra-underscore-member-before-control/eval/hints new file mode 100644 index 0000000..96f4f12 --- /dev/null +++ b/t/recipes/checks/deb-format/deb-format-extra-underscore-member-before-control/eval/hints @@ -0,0 +1,3 @@ +deb-format-extra-underscore-member-before-control (binary): misplaced-extra-member-in-deb _extra-stuff (unexpected _member at position 1) +deb-format-extra-underscore-member-before-control (binary): data-tarball-compression-format gz +deb-format-extra-underscore-member-before-control (binary): control-tarball-compression-format gz diff --git a/t/recipes/checks/deb-format/deb-format-extra-underscore-member-before-data/build-spec/deb-members b/t/recipes/checks/deb-format/deb-format-extra-underscore-member-before-data/build-spec/deb-members new file mode 100644 index 0000000..80b1efc --- /dev/null +++ b/t/recipes/checks/deb-format/deb-format-extra-underscore-member-before-data/build-spec/deb-members @@ -0,0 +1,4 @@ +members/debian-binary +members/control.tar.gz +members/_extra-stuff +members/data.tar.gz diff --git a/t/recipes/checks/deb-format/deb-format-extra-underscore-member-before-data/build-spec/fill-values b/t/recipes/checks/deb-format/deb-format-extra-underscore-member-before-data/build-spec/fill-values new file mode 100644 index 0000000..be97a37 --- /dev/null +++ b/t/recipes/checks/deb-format/deb-format-extra-underscore-member-before-data/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: deb +Testname: deb-format-extra-underscore-member-before-data +Description: Test package for a deb archive with an extra member with _ before data.tar diff --git a/t/recipes/checks/deb-format/deb-format-extra-underscore-member-before-data/build-spec/members/_extra-stuff b/t/recipes/checks/deb-format/deb-format-extra-underscore-member-before-data/build-spec/members/_extra-stuff new file mode 100644 index 0000000..2517541 --- /dev/null +++ b/t/recipes/checks/deb-format/deb-format-extra-underscore-member-before-data/build-spec/members/_extra-stuff @@ -0,0 +1 @@ +SOME CONTENT diff --git a/t/recipes/checks/deb-format/deb-format-extra-underscore-member-before-data/eval/desc b/t/recipes/checks/deb-format/deb-format-extra-underscore-member-before-data/eval/desc new file mode 100644 index 0000000..d122658 --- /dev/null +++ b/t/recipes/checks/deb-format/deb-format-extra-underscore-member-before-data/eval/desc @@ -0,0 +1,2 @@ +Testname: deb-format-extra-underscore-member-before-data +Check: deb-format diff --git a/t/recipes/checks/deb-format/deb-format-extra-underscore-member-before-data/eval/hints b/t/recipes/checks/deb-format/deb-format-extra-underscore-member-before-data/eval/hints new file mode 100644 index 0000000..72b71d2 --- /dev/null +++ b/t/recipes/checks/deb-format/deb-format-extra-underscore-member-before-data/eval/hints @@ -0,0 +1,3 @@ +deb-format-extra-underscore-member-before-data (binary): misplaced-extra-member-in-deb _extra-stuff (unexpected _member at position 2) +deb-format-extra-underscore-member-before-data (binary): data-tarball-compression-format gz +deb-format-extra-underscore-member-before-data (binary): control-tarball-compression-format gz diff --git a/t/recipes/checks/deb-format/deb-format-lzma/build-spec/deb-members b/t/recipes/checks/deb-format/deb-format-lzma/build-spec/deb-members new file mode 100644 index 0000000..c27e67f --- /dev/null +++ b/t/recipes/checks/deb-format/deb-format-lzma/build-spec/deb-members @@ -0,0 +1,3 @@ +members/debian-binary +members/control.tar.gz +members/data.tar.lzma diff --git a/t/recipes/checks/deb-format/deb-format-lzma/build-spec/fill-values b/t/recipes/checks/deb-format/deb-format-lzma/build-spec/fill-values new file mode 100644 index 0000000..a12cfc9 --- /dev/null +++ b/t/recipes/checks/deb-format/deb-format-lzma/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: deb +Testname: deb-format-lzma +Description: Test package with LZMA compression diff --git a/t/recipes/checks/deb-format/deb-format-lzma/build-spec/tar-data b/t/recipes/checks/deb-format/deb-format-lzma/build-spec/tar-data new file mode 100755 index 0000000..01e430e --- /dev/null +++ b/t/recipes/checks/deb-format/deb-format-lzma/build-spec/tar-data @@ -0,0 +1,7 @@ +#!/bin/sh + +set -e + +rootdir="$1" + +tar --create --file members/data.tar.lzma --use-compress-program=lzma --directory "$rootdir" . diff --git a/t/recipes/checks/deb-format/deb-format-lzma/eval/desc b/t/recipes/checks/deb-format/deb-format-lzma/eval/desc new file mode 100644 index 0000000..efc64a2 --- /dev/null +++ b/t/recipes/checks/deb-format/deb-format-lzma/eval/desc @@ -0,0 +1,2 @@ +Testname: deb-format-lzma +Check: deb-format diff --git a/t/recipes/checks/deb-format/deb-format-lzma/eval/hints b/t/recipes/checks/deb-format/deb-format-lzma/eval/hints new file mode 100644 index 0000000..a0617ed --- /dev/null +++ b/t/recipes/checks/deb-format/deb-format-lzma/eval/hints @@ -0,0 +1,4 @@ +deb-format-lzma (binary): uses-deprecated-compression-for-data-tarball lzma +deb-format-lzma (binary): lzma-deb-archive +deb-format-lzma (binary): data-tarball-compression-format lzma +deb-format-lzma (binary): control-tarball-compression-format gz diff --git a/t/recipes/checks/deb-format/deb-format-no-compress/build-spec/deb-members b/t/recipes/checks/deb-format/deb-format-no-compress/build-spec/deb-members new file mode 100644 index 0000000..575150e --- /dev/null +++ b/t/recipes/checks/deb-format/deb-format-no-compress/build-spec/deb-members @@ -0,0 +1,3 @@ +members/debian-binary +members/control.tar +members/data.tar diff --git a/t/recipes/checks/deb-format/deb-format-no-compress/build-spec/fill-values b/t/recipes/checks/deb-format/deb-format-no-compress/build-spec/fill-values new file mode 100644 index 0000000..8f89409 --- /dev/null +++ b/t/recipes/checks/deb-format/deb-format-no-compress/build-spec/fill-values @@ -0,0 +1,4 @@ +Skeleton: deb +Testname: deb-format-no-compress +Description: Test package with no compression +Extra-Build-Depends: dpkg (>= 1.17.6) diff --git a/t/recipes/checks/deb-format/deb-format-no-compress/build-spec/tar-control b/t/recipes/checks/deb-format/deb-format-no-compress/build-spec/tar-control new file mode 100755 index 0000000..74dfa1d --- /dev/null +++ b/t/recipes/checks/deb-format/deb-format-no-compress/build-spec/tar-control @@ -0,0 +1,8 @@ +#!/bin/sh + +set -e + +debiandir="$1" +controlmembers="$2" + +tar --create --file members/control.tar --directory "$debiandir" $controlmembers diff --git a/t/recipes/checks/deb-format/deb-format-no-compress/build-spec/tar-data b/t/recipes/checks/deb-format/deb-format-no-compress/build-spec/tar-data new file mode 100755 index 0000000..5ca2d90 --- /dev/null +++ b/t/recipes/checks/deb-format/deb-format-no-compress/build-spec/tar-data @@ -0,0 +1,7 @@ +#!/bin/sh + +set -e + +rootdir="$1" + +tar --create --file members/data.tar --directory "$rootdir" . diff --git a/t/recipes/checks/deb-format/deb-format-no-compress/eval/desc b/t/recipes/checks/deb-format/deb-format-no-compress/eval/desc new file mode 100644 index 0000000..f18b7f2 --- /dev/null +++ b/t/recipes/checks/deb-format/deb-format-no-compress/eval/desc @@ -0,0 +1,2 @@ +Testname: deb-format-no-compress +Check: deb-format diff --git a/t/recipes/checks/deb-format/deb-format-no-compress/eval/hints b/t/recipes/checks/deb-format/deb-format-no-compress/eval/hints new file mode 100644 index 0000000..02397c6 --- /dev/null +++ b/t/recipes/checks/deb-format/deb-format-no-compress/eval/hints @@ -0,0 +1,4 @@ +deb-format-no-compress (binary): uses-no-compression-for-data-tarball +deb-format-no-compress (binary): uses-no-compression-for-control-tarball +deb-format-no-compress (binary): data-tarball-compression-format (none) +deb-format-no-compress (binary): control-tarball-compression-format (none) diff --git a/t/recipes/checks/deb-format/deb-format-record-size/build-spec/fill-values b/t/recipes/checks/deb-format/deb-format-record-size/build-spec/fill-values new file mode 100644 index 0000000..d7b73a5 --- /dev/null +++ b/t/recipes/checks/deb-format/deb-format-record-size/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: deb +Testname: deb-format-record-size +Description: Test package with a non-standard tar record size diff --git a/t/recipes/checks/deb-format/deb-format-record-size/build-spec/tar-control b/t/recipes/checks/deb-format/deb-format-record-size/build-spec/tar-control new file mode 100755 index 0000000..5f0a2f8 --- /dev/null +++ b/t/recipes/checks/deb-format/deb-format-record-size/build-spec/tar-control @@ -0,0 +1,8 @@ +#!/bin/sh + +set -e + +debiandir="$1" +controlmembers="$2" + +tar --create --file members/control.tar.gz --gzip --record-size=4096 --directory "$debiandir" $controlmembers diff --git a/t/recipes/checks/deb-format/deb-format-record-size/build-spec/tar-data b/t/recipes/checks/deb-format/deb-format-record-size/build-spec/tar-data new file mode 100755 index 0000000..ad41b09 --- /dev/null +++ b/t/recipes/checks/deb-format/deb-format-record-size/build-spec/tar-data @@ -0,0 +1,7 @@ +#!/bin/sh + +set -e + +rootdir="$1" + +tar --create --file members/data.tar.gz --gzip --record-size=4096 --directory "$rootdir" . diff --git a/t/recipes/checks/deb-format/deb-format-record-size/eval/desc b/t/recipes/checks/deb-format/deb-format-record-size/eval/desc new file mode 100644 index 0000000..2046118 --- /dev/null +++ b/t/recipes/checks/deb-format/deb-format-record-size/eval/desc @@ -0,0 +1,2 @@ +Testname: deb-format-record-size +Check: deb-format diff --git a/t/recipes/checks/deb-format/deb-format-record-size/eval/hints b/t/recipes/checks/deb-format/deb-format-record-size/eval/hints new file mode 100644 index 0000000..4b7f610 --- /dev/null +++ b/t/recipes/checks/deb-format/deb-format-record-size/eval/hints @@ -0,0 +1,2 @@ +deb-format-record-size (binary): data-tarball-compression-format gz +deb-format-record-size (binary): control-tarball-compression-format gz diff --git a/t/recipes/checks/deb-format/deb-format-udeb-compression/build-spec/debian/control.in b/t/recipes/checks/deb-format/deb-format-udeb-compression/build-spec/debian/control.in new file mode 100644 index 0000000..1c2ec56 --- /dev/null +++ b/t/recipes/checks/deb-format/deb-format-udeb-compression/build-spec/debian/control.in @@ -0,0 +1,18 @@ +Source: [% $source %] +Priority: optional +Section: debian-installer +Maintainer: [% $author %] +Standards-Version: [% $standards_version %] +Build-Depends: [% $build_depends %] +Rules-Requires-Root: no + +Package: some-udeb +Architecture: [% $package_architecture %] +Depends: ${misc:Depends} +Package-Type: udeb +Description: [% $description %] + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. + diff --git a/t/recipes/checks/deb-format/deb-format-udeb-compression/build-spec/debian/rules b/t/recipes/checks/deb-format/deb-format-udeb-compression/build-spec/debian/rules new file mode 100644 index 0000000..5287abb --- /dev/null +++ b/t/recipes/checks/deb-format/deb-format-udeb-compression/build-spec/debian/rules @@ -0,0 +1,9 @@ +#!/usr/bin/make -f + +%: + dh $@ + +override_dh_builddeb: + # manually call dpkg-deb because dh_builddeb uses -Zxz and does + # not allow us to override it. + dpkg-deb -Zlzma --build debian/some-udeb ../some-udeb_1.0_all.udeb diff --git a/t/recipes/checks/deb-format/deb-format-udeb-compression/build-spec/fill-values b/t/recipes/checks/deb-format/deb-format-udeb-compression/build-spec/fill-values new file mode 100644 index 0000000..9a594b5 --- /dev/null +++ b/t/recipes/checks/deb-format/deb-format-udeb-compression/build-spec/fill-values @@ -0,0 +1,6 @@ +Skeleton: upload-native +Testname: deb-format-udeb-compression +Package-Architecture: all +Description: Test of compression of udeb data member +Extra-Build-Depends: dpkg (<< 1.18.11) +# dpkg 1.18.1 Will warn for us diff --git a/t/recipes/checks/deb-format/deb-format-udeb-compression/eval/desc b/t/recipes/checks/deb-format/deb-format-udeb-compression/eval/desc new file mode 100644 index 0000000..9b5961a --- /dev/null +++ b/t/recipes/checks/deb-format/deb-format-udeb-compression/eval/desc @@ -0,0 +1,3 @@ +Testname: deb-format-udeb-compression +Check: deb-format +# dpkg 1.18.1 Will warn for us diff --git a/t/recipes/checks/deb-format/deb-format-udeb-compression/eval/hints b/t/recipes/checks/deb-format/deb-format-udeb-compression/eval/hints new file mode 100644 index 0000000..529a7e3 --- /dev/null +++ b/t/recipes/checks/deb-format/deb-format-udeb-compression/eval/hints @@ -0,0 +1 @@ +some-udeb (udeb): udeb-uses-unsupported-compression-for-data-tarball diff --git a/t/recipes/checks/deb-format/deb-format-wrong-order/build-spec/deb-members b/t/recipes/checks/deb-format/deb-format-wrong-order/build-spec/deb-members new file mode 100644 index 0000000..58b239b --- /dev/null +++ b/t/recipes/checks/deb-format/deb-format-wrong-order/build-spec/deb-members @@ -0,0 +1,3 @@ +members/debian-binary +members/data.tar.gz +members/control.tar.gz diff --git a/t/recipes/checks/deb-format/deb-format-wrong-order/build-spec/fill-values b/t/recipes/checks/deb-format/deb-format-wrong-order/build-spec/fill-values new file mode 100644 index 0000000..2468c16 --- /dev/null +++ b/t/recipes/checks/deb-format/deb-format-wrong-order/build-spec/fill-values @@ -0,0 +1,6 @@ +Skeleton: deb +Testname: deb-format-wrong-order +Description: Test package for an ar archive in the wrong order +Extra-Build-Depends: dpkg (<< 1.17.2) +# dpkg 1.17.2 Do not allow deb packages with control +# and data members swapped diff --git a/t/recipes/checks/deb-format/deb-format-wrong-order/eval/desc b/t/recipes/checks/deb-format/deb-format-wrong-order/eval/desc new file mode 100644 index 0000000..a1da169 --- /dev/null +++ b/t/recipes/checks/deb-format/deb-format-wrong-order/eval/desc @@ -0,0 +1,4 @@ +Testname: deb-format-wrong-order +Check: deb-format +# dpkg 1.17.2 Do not allow deb packages with control +# and data members swapped diff --git a/t/recipes/checks/deb-format/deb-format-wrong-order/eval/hints b/t/recipes/checks/deb-format/deb-format-wrong-order/eval/hints new file mode 100644 index 0000000..b4c7aa6 --- /dev/null +++ b/t/recipes/checks/deb-format/deb-format-wrong-order/eval/hints @@ -0,0 +1,2 @@ +deb-format-wrong-order (binary): malformed-deb-archive third (official) member control.tar.gz not data.tar.((gz|xz|bz2|lzma) +deb-format-wrong-order (binary): malformed-deb-archive second (official) member data.tar.gz not control.tar.(gz|xz) diff --git a/t/recipes/checks/deb-format/debhelper-compat-old/build-spec/debian/rules b/t/recipes/checks/deb-format/debhelper-compat-old/build-spec/debian/rules new file mode 100644 index 0000000..3d706f5 --- /dev/null +++ b/t/recipes/checks/deb-format/debhelper-compat-old/build-spec/debian/rules @@ -0,0 +1,7 @@ +#!/usr/bin/make -f + +%: + dh $@ + +override_dh_builddeb: + dh_builddeb -- -Zgzip diff --git a/t/recipes/checks/deb-format/debhelper-compat-old/build-spec/fill-values b/t/recipes/checks/deb-format/debhelper-compat-old/build-spec/fill-values new file mode 100644 index 0000000..97909d8 --- /dev/null +++ b/t/recipes/checks/deb-format/debhelper-compat-old/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: upload-native +Testname: debhelper-compat-old +Description: Test for old debian/compat file diff --git a/t/recipes/checks/deb-format/debhelper-compat-old/eval/desc b/t/recipes/checks/deb-format/debhelper-compat-old/eval/desc new file mode 100644 index 0000000..50bd090 --- /dev/null +++ b/t/recipes/checks/deb-format/debhelper-compat-old/eval/desc @@ -0,0 +1,4 @@ +Testname: debhelper-compat-old +Options: --include-dir ./lintian-include-dir +Profile: lintian-test +Check: deb-format diff --git a/t/recipes/checks/deb-format/debhelper-compat-old/eval/hints b/t/recipes/checks/deb-format/debhelper-compat-old/eval/hints new file mode 100644 index 0000000..016cd27 --- /dev/null +++ b/t/recipes/checks/deb-format/debhelper-compat-old/eval/hints @@ -0,0 +1,2 @@ +debhelper-compat-old (binary): data-tarball-compression-format gz +debhelper-compat-old (binary): control-tarball-compression-format gz diff --git a/t/recipes/checks/deb-format/debhelper-compat-old/eval/lintian-include-dir/profiles/lintian-test/main.profile b/t/recipes/checks/deb-format/debhelper-compat-old/eval/lintian-include-dir/profiles/lintian-test/main.profile new file mode 100644 index 0000000..f0e27cf --- /dev/null +++ b/t/recipes/checks/deb-format/debhelper-compat-old/eval/lintian-include-dir/profiles/lintian-test/main.profile @@ -0,0 +1,2 @@ +Profile: lintian-test/main +Extends: debian/main diff --git a/t/recipes/checks/deb-format/debhelper-compat-old/eval/lintian-include-dir/vendors/lintian-test/main/data/debhelper/compat-level b/t/recipes/checks/deb-format/debhelper-compat-old/eval/lintian-include-dir/vendors/lintian-test/main/data/debhelper/compat-level new file mode 100644 index 0000000..d91eeb3 --- /dev/null +++ b/t/recipes/checks/deb-format/debhelper-compat-old/eval/lintian-include-dir/vendors/lintian-test/main/data/debhelper/compat-level @@ -0,0 +1,3 @@ +@include-parent +deprecated=1 +recommended=100 diff --git a/t/recipes/checks/debhelper/debhelper-arch-depends/build-spec/debian/compat.in b/t/recipes/checks/debhelper/debhelper-arch-depends/build-spec/debian/compat.in new file mode 100644 index 0000000..640a566 --- /dev/null +++ b/t/recipes/checks/debhelper/debhelper-arch-depends/build-spec/debian/compat.in @@ -0,0 +1 @@ +[% $dh_compat_level %] diff --git a/t/recipes/checks/debhelper/debhelper-arch-depends/build-spec/debian/control.in b/t/recipes/checks/debhelper/debhelper-arch-depends/build-spec/debian/control.in new file mode 100644 index 0000000..cbf204c --- /dev/null +++ b/t/recipes/checks/debhelper/debhelper-arch-depends/build-spec/debian/control.in @@ -0,0 +1,17 @@ +Source: [% $source %] +Priority: optional +Section: [% $section %] +Maintainer: [% $author %] +Standards-Version: [% $standards_version %] +Build-Depends: [% $build_depends %], + cli-common-dev (>= 0.5.7) [i386 sparc amd64 ia64] +Rules-Requires-Root: no + +Package: [% $source %] +Architecture: [% $package_architecture %] +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: [% $description %] + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. diff --git a/t/recipes/checks/debhelper/debhelper-arch-depends/build-spec/debian/rules b/t/recipes/checks/debhelper/debhelper-arch-depends/build-spec/debian/rules new file mode 100755 index 0000000..726a39c --- /dev/null +++ b/t/recipes/checks/debhelper/debhelper-arch-depends/build-spec/debian/rules @@ -0,0 +1,8 @@ +#!/usr/bin/make -f +%: + dh $@ + +override_dh_prep: + -dh_clideps + dh_prep + diff --git a/t/recipes/checks/debhelper/debhelper-arch-depends/build-spec/fill-values b/t/recipes/checks/debhelper/debhelper-arch-depends/build-spec/fill-values new file mode 100644 index 0000000..30c1a35 --- /dev/null +++ b/t/recipes/checks/debhelper/debhelper-arch-depends/build-spec/fill-values @@ -0,0 +1,5 @@ +Skeleton: upload-native +Testname: debhelper-arch-depends +Extra-Build-Depends: cli-common-dev (>= 0.5.7) [i386 sparc amd64 ia64] +Description: Test arch-specific dependencies on dh commands +Default-Build-Depends: debhelper (>= [% $dh_compat_level %]~) diff --git a/t/recipes/checks/debhelper/debhelper-arch-depends/eval/desc b/t/recipes/checks/debhelper/debhelper-arch-depends/eval/desc new file mode 100644 index 0000000..3a203cb --- /dev/null +++ b/t/recipes/checks/debhelper/debhelper-arch-depends/eval/desc @@ -0,0 +1,3 @@ +Testname: debhelper-arch-depends +Test-Against: missing-build-dependency-for-dh_-command +Check: debhelper diff --git a/t/recipes/checks/debhelper/debhelper-arch-depends/eval/hints b/t/recipes/checks/debhelper/debhelper-arch-depends/eval/hints new file mode 100644 index 0000000..0553144 --- /dev/null +++ b/t/recipes/checks/debhelper/debhelper-arch-depends/eval/hints @@ -0,0 +1,3 @@ +debhelper-arch-depends (source): uses-debhelper-compat-file [debian/compat] +debhelper-arch-depends (source): debian-build-system dh [debian/rules] +debhelper-arch-depends (source): debhelper-compat-level 13 diff --git a/t/recipes/checks/debhelper/debhelper-autoreconf-build-depends-unrel/build-spec/debian/compat.in b/t/recipes/checks/debhelper/debhelper-autoreconf-build-depends-unrel/build-spec/debian/compat.in new file mode 100644 index 0000000..640a566 --- /dev/null +++ b/t/recipes/checks/debhelper/debhelper-autoreconf-build-depends-unrel/build-spec/debian/compat.in @@ -0,0 +1 @@ +[% $dh_compat_level %] diff --git a/t/recipes/checks/debhelper/debhelper-autoreconf-build-depends-unrel/build-spec/debian/control.in b/t/recipes/checks/debhelper/debhelper-autoreconf-build-depends-unrel/build-spec/debian/control.in new file mode 100644 index 0000000..a63b312 --- /dev/null +++ b/t/recipes/checks/debhelper/debhelper-autoreconf-build-depends-unrel/build-spec/debian/control.in @@ -0,0 +1,16 @@ +Source: [% $source %] +Priority: optional +Section: [% $section %] +Maintainer: [% $author %] +Standards-Version: [% $standards_version %] +Build-Depends: [% $build_depends %], debhelper (>= 10) +Rules-Requires-Root: no + +Package: [% $source %] +Architecture: [% $package_architecture %] +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: [% $description %] + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. diff --git a/t/recipes/checks/debhelper/debhelper-autoreconf-build-depends-unrel/build-spec/debian/rules b/t/recipes/checks/debhelper/debhelper-autoreconf-build-depends-unrel/build-spec/debian/rules new file mode 100755 index 0000000..005519a --- /dev/null +++ b/t/recipes/checks/debhelper/debhelper-autoreconf-build-depends-unrel/build-spec/debian/rules @@ -0,0 +1,8 @@ +#!/usr/bin/make -f + +%: + dh $@ + +override_dh_auto_configure: + dh_auto_configure + dh_autotools-dev_updateconfig diff --git a/t/recipes/checks/debhelper/debhelper-autoreconf-build-depends-unrel/build-spec/fill-values b/t/recipes/checks/debhelper/debhelper-autoreconf-build-depends-unrel/build-spec/fill-values new file mode 100644 index 0000000..52a12c3 --- /dev/null +++ b/t/recipes/checks/debhelper/debhelper-autoreconf-build-depends-unrel/build-spec/fill-values @@ -0,0 +1,5 @@ +Skeleton: upload-native +Testname: debhelper-autoreconf-build-depends-unrel +Description: Test for useless autoreconf-related build dependencies false positives +Default-Build-Depends: debhelper (>= 10) +Dh-Compat-Level: 10 diff --git a/t/recipes/checks/debhelper/debhelper-autoreconf-build-depends-unrel/eval/desc b/t/recipes/checks/debhelper/debhelper-autoreconf-build-depends-unrel/eval/desc new file mode 100644 index 0000000..c87476b --- /dev/null +++ b/t/recipes/checks/debhelper/debhelper-autoreconf-build-depends-unrel/eval/desc @@ -0,0 +1,5 @@ +Testname: debhelper-autoreconf-build-depends-unrel +Test-Against: + missing-build-dependency-for-dh_-command + useless-autoreconf-build-depends +Check: debhelper diff --git a/t/recipes/checks/debhelper/debhelper-autoreconf-build-depends-unrel/eval/hints b/t/recipes/checks/debhelper/debhelper-autoreconf-build-depends-unrel/eval/hints new file mode 100644 index 0000000..9ab3ea3 --- /dev/null +++ b/t/recipes/checks/debhelper/debhelper-autoreconf-build-depends-unrel/eval/hints @@ -0,0 +1,4 @@ +debhelper-autoreconf-build-depends-unrel (source): package-uses-old-debhelper-compat-version 10 +debhelper-autoreconf-build-depends-unrel (source): debian-build-system dh [debian/rules] +debhelper-autoreconf-build-depends-unrel (source): debhelper-tools-from-autotools-dev-are-deprecated dh_autotools-dev_updateconfig [debian/rules:8] +debhelper-autoreconf-build-depends-unrel (source): debhelper-compat-level 10 diff --git a/t/recipes/checks/debhelper/debhelper-autoreconf-build-depends/build-spec/debian/compat.in b/t/recipes/checks/debhelper/debhelper-autoreconf-build-depends/build-spec/debian/compat.in new file mode 100644 index 0000000..640a566 --- /dev/null +++ b/t/recipes/checks/debhelper/debhelper-autoreconf-build-depends/build-spec/debian/compat.in @@ -0,0 +1 @@ +[% $dh_compat_level %] diff --git a/t/recipes/checks/debhelper/debhelper-autoreconf-build-depends/build-spec/debian/control.in b/t/recipes/checks/debhelper/debhelper-autoreconf-build-depends/build-spec/debian/control.in new file mode 100644 index 0000000..3aa5eb4 --- /dev/null +++ b/t/recipes/checks/debhelper/debhelper-autoreconf-build-depends/build-spec/debian/control.in @@ -0,0 +1,16 @@ +Source: [% $source %] +Priority: optional +Section: [% $section %] +Maintainer: [% $author %] +Standards-Version: [% $standards_version %] +Build-Depends: [% $build_depends %], debhelper (>= 10), dh-autoreconf, autotools-dev +Rules-Requires-Root: no + +Package: [% $source %] +Architecture: [% $package_architecture %] +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: [% $description %] + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. diff --git a/t/recipes/checks/debhelper/debhelper-autoreconf-build-depends/build-spec/fill-values b/t/recipes/checks/debhelper/debhelper-autoreconf-build-depends/build-spec/fill-values new file mode 100644 index 0000000..cc59604 --- /dev/null +++ b/t/recipes/checks/debhelper/debhelper-autoreconf-build-depends/build-spec/fill-values @@ -0,0 +1,5 @@ +Skeleton: upload-native +Testname: debhelper-autoreconf-build-depends +Description: Test for useless autoreconf-related build dependencies +Default-Build-Depends: debhelper (>= 10) +Dh-Compat-Level: 10 diff --git a/t/recipes/checks/debhelper/debhelper-autoreconf-build-depends/eval/desc b/t/recipes/checks/debhelper/debhelper-autoreconf-build-depends/eval/desc new file mode 100644 index 0000000..d21d599 --- /dev/null +++ b/t/recipes/checks/debhelper/debhelper-autoreconf-build-depends/eval/desc @@ -0,0 +1,2 @@ +Testname: debhelper-autoreconf-build-depends +Check: debhelper diff --git a/t/recipes/checks/debhelper/debhelper-autoreconf-build-depends/eval/hints b/t/recipes/checks/debhelper/debhelper-autoreconf-build-depends/eval/hints new file mode 100644 index 0000000..d2ae57f --- /dev/null +++ b/t/recipes/checks/debhelper/debhelper-autoreconf-build-depends/eval/hints @@ -0,0 +1,5 @@ +debhelper-autoreconf-build-depends (source): useless-autoreconf-build-depends (does not need to satisfy dh-autoreconf:any) +debhelper-autoreconf-build-depends (source): useless-autoreconf-build-depends (does not need to satisfy autotools-dev:any) +debhelper-autoreconf-build-depends (source): package-uses-old-debhelper-compat-version 10 +debhelper-autoreconf-build-depends (source): debian-build-system dh [debian/rules] +debhelper-autoreconf-build-depends (source): debhelper-compat-level 10 diff --git a/t/recipes/checks/debhelper/debhelper-brace-expansion/build-spec/debian/control.in b/t/recipes/checks/debhelper/debhelper-brace-expansion/build-spec/debian/control.in new file mode 100644 index 0000000..dcfb380 --- /dev/null +++ b/t/recipes/checks/debhelper/debhelper-brace-expansion/build-spec/debian/control.in @@ -0,0 +1,80 @@ +Source: [% $source %] +Priority: optional +Section: [% $section %] +Maintainer: [% $author %] +Standards-Version: [% $standards_version %] +Build-Depends: [% $build_depends %] +Rules-Requires-Root: no + +Package: [% $source %] +Architecture: [% $package_architecture %] +Depends: ${misc:Depends} +Description: [% $description %] + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. + +Package: debhelper-brace-problem-1 +Architecture: [% $package_architecture %] +Depends: ${misc:Depends} +Description: [% $description %] another extra string + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. Extra + string. It may be an empty package. + +Package: debhelper-brace-problem-2 +Architecture: [% $package_architecture %] +Depends: ${misc:Depends} +Description: [% $description %] another extra string three + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. Extra + string three. It may be an empty package. + +Package: debhelper-brace-problem-3 +Architecture: [% $package_architecture %] +Depends: ${misc:Depends} +Description: [% $description %] three test case + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. Extra + string three test case. It may be an empty package. + +Package: debhelper-brace-problem-4 +Architecture: [% $package_architecture %] +Depends: ${misc:Depends} +Description: [% $description %] fourth test case + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. Extra + string fourth test case. It may be an empty package. + +Package: debhelper-brace-problem-5 +Architecture: [% $package_architecture %] +Depends: ${misc:Depends} +Description: [% $description %] fifth test case + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. Extra + string fifth test case. It may be an empty package. + +Package: debhelper-brace-problem-6 +Architecture: [% $package_architecture %] +Depends: ${misc:Depends} +Description: [% $description %] sixth test case + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. Extra + string sixth test case. It may be an empty package. + +Package: debhelper-brace-problem-good +Architecture: [% $package_architecture %] +Depends: ${misc:Depends} +Description: [% $description %] good test case + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. Should + not trigger lintian test. It may be an empty package. + diff --git a/t/recipes/checks/debhelper/debhelper-brace-expansion/build-spec/debian/debhelper-brace-problem-1.install b/t/recipes/checks/debhelper/debhelper-brace-expansion/build-spec/debian/debhelper-brace-problem-1.install new file mode 100644 index 0000000..917db1f --- /dev/null +++ b/t/recipes/checks/debhelper/debhelper-brace-expansion/build-spec/debian/debhelper-brace-problem-1.install @@ -0,0 +1 @@ +{,foo}.txt usr/share/debhelper diff --git a/t/recipes/checks/debhelper/debhelper-brace-expansion/build-spec/debian/debhelper-brace-problem-2.install b/t/recipes/checks/debhelper/debhelper-brace-expansion/build-spec/debian/debhelper-brace-problem-2.install new file mode 100644 index 0000000..c0a7ccb --- /dev/null +++ b/t/recipes/checks/debhelper/debhelper-brace-expansion/build-spec/debian/debhelper-brace-problem-2.install @@ -0,0 +1 @@ +{foo,bar}.txt usr/share/debhelper diff --git a/t/recipes/checks/debhelper/debhelper-brace-expansion/build-spec/debian/debhelper-brace-problem-3.install b/t/recipes/checks/debhelper/debhelper-brace-expansion/build-spec/debian/debhelper-brace-problem-3.install new file mode 100644 index 0000000..7276554 --- /dev/null +++ b/t/recipes/checks/debhelper/debhelper-brace-expansion/build-spec/debian/debhelper-brace-problem-3.install @@ -0,0 +1 @@ +{foo,}.txt usr/share/debhelper diff --git a/t/recipes/checks/debhelper/debhelper-brace-expansion/build-spec/debian/debhelper-brace-problem-4.install b/t/recipes/checks/debhelper/debhelper-brace-expansion/build-spec/debian/debhelper-brace-problem-4.install new file mode 100644 index 0000000..05031a8 --- /dev/null +++ b/t/recipes/checks/debhelper/debhelper-brace-expansion/build-spec/debian/debhelper-brace-problem-4.install @@ -0,0 +1 @@ +{,,foo}.txt usr/share/debhelper diff --git a/t/recipes/checks/debhelper/debhelper-brace-expansion/build-spec/debian/debhelper-brace-problem-5.install b/t/recipes/checks/debhelper/debhelper-brace-expansion/build-spec/debian/debhelper-brace-problem-5.install new file mode 100644 index 0000000..576e6a4 --- /dev/null +++ b/t/recipes/checks/debhelper/debhelper-brace-expansion/build-spec/debian/debhelper-brace-problem-5.install @@ -0,0 +1 @@ +{,foo,}.txt usr/share/debhelper diff --git a/t/recipes/checks/debhelper/debhelper-brace-expansion/build-spec/debian/debhelper-brace-problem-good.install b/t/recipes/checks/debhelper/debhelper-brace-expansion/build-spec/debian/debhelper-brace-problem-good.install new file mode 100644 index 0000000..bf22e94 --- /dev/null +++ b/t/recipes/checks/debhelper/debhelper-brace-expansion/build-spec/debian/debhelper-brace-problem-good.install @@ -0,0 +1,5 @@ +{.txt usr/share/debhelper +{good}.txt usr/share/debhelper +{}.txt usr/share/debhelper +{foo} usr/share/debhelper +{foo}.txt usr/share/debhelper diff --git a/t/recipes/checks/debhelper/debhelper-brace-expansion/build-spec/debian/rules b/t/recipes/checks/debhelper/debhelper-brace-expansion/build-spec/debian/rules new file mode 100755 index 0000000..16d8ba1 --- /dev/null +++ b/t/recipes/checks/debhelper/debhelper-brace-expansion/build-spec/debian/rules @@ -0,0 +1,8 @@ +#!/usr/bin/make -f +%: + dh $@ + +# Skip dh_install since there are braces in the install configuration file and +# it would error out on at least some systems. +override_dh_install: + diff --git a/t/recipes/checks/debhelper/debhelper-brace-expansion/build-spec/fill-values b/t/recipes/checks/debhelper/debhelper-brace-expansion/build-spec/fill-values new file mode 100644 index 0000000..90ac5ed --- /dev/null +++ b/t/recipes/checks/debhelper/debhelper-brace-expansion/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: upload-native +Testname: debhelper-brace-expansion +Description: Check for brace expansion in debhelper config files diff --git a/t/recipes/checks/debhelper/debhelper-brace-expansion/eval/desc b/t/recipes/checks/debhelper/debhelper-brace-expansion/eval/desc new file mode 100644 index 0000000..e213355 --- /dev/null +++ b/t/recipes/checks/debhelper/debhelper-brace-expansion/eval/desc @@ -0,0 +1,3 @@ +Testname: debhelper-brace-expansion +See-Also: Debian Bug#480939 +Check: debhelper diff --git a/t/recipes/checks/debhelper/debhelper-brace-expansion/eval/hints b/t/recipes/checks/debhelper/debhelper-brace-expansion/eval/hints new file mode 100644 index 0000000..b2711de --- /dev/null +++ b/t/recipes/checks/debhelper/debhelper-brace-expansion/eval/hints @@ -0,0 +1,8 @@ +debhelper-brace-expansion (source): debian-build-system dh [debian/rules] +debhelper-brace-expansion (source): debhelper-compat-virtual-relation 13 [debian/control] +debhelper-brace-expansion (source): debhelper-compat-level 13 +debhelper-brace-expansion (source): brace-expansion-in-debhelper-config-file {foo,} [debian/debhelper-brace-problem-3.install:1] +debhelper-brace-expansion (source): brace-expansion-in-debhelper-config-file {foo,bar} [debian/debhelper-brace-problem-2.install:1] +debhelper-brace-expansion (source): brace-expansion-in-debhelper-config-file {,foo} [debian/debhelper-brace-problem-1.install:1] +debhelper-brace-expansion (source): brace-expansion-in-debhelper-config-file {,foo,} [debian/debhelper-brace-problem-5.install:1] +debhelper-brace-expansion (source): brace-expansion-in-debhelper-config-file {,,foo} [debian/debhelper-brace-problem-4.install:1] diff --git a/t/recipes/checks/debhelper/debhelper-compat-empty/build-spec/debian/compat b/t/recipes/checks/debhelper/debhelper-compat-empty/build-spec/debian/compat new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/t/recipes/checks/debhelper/debhelper-compat-empty/build-spec/debian/compat @@ -0,0 +1 @@ + diff --git a/t/recipes/checks/debhelper/debhelper-compat-empty/build-spec/fill-values b/t/recipes/checks/debhelper/debhelper-compat-empty/build-spec/fill-values new file mode 100644 index 0000000..99bc50b --- /dev/null +++ b/t/recipes/checks/debhelper/debhelper-compat-empty/build-spec/fill-values @@ -0,0 +1,4 @@ +Skeleton: upload-native +Testname: debhelper-compat-empty +Description: Test empty debian/compat file +Default-Build-Depends: debhelper (<< 9.20151101~) diff --git a/t/recipes/checks/debhelper/debhelper-compat-empty/eval/desc b/t/recipes/checks/debhelper/debhelper-compat-empty/eval/desc new file mode 100644 index 0000000..31b9eb9 --- /dev/null +++ b/t/recipes/checks/debhelper/debhelper-compat-empty/eval/desc @@ -0,0 +1,2 @@ +Testname: debhelper-compat-empty +Check: debhelper diff --git a/t/recipes/checks/debhelper/debhelper-compat-empty/eval/hints b/t/recipes/checks/debhelper/debhelper-compat-empty/eval/hints new file mode 100644 index 0000000..b4a096f --- /dev/null +++ b/t/recipes/checks/debhelper/debhelper-compat-empty/eval/hints @@ -0,0 +1,2 @@ +debhelper-compat-empty (source): package-uses-deprecated-debhelper-compat-version 1 +debhelper-compat-empty (source): debhelper-compat-file-is-empty diff --git a/t/recipes/checks/debhelper/debhelper-compat-experimental/build-spec/debian/compat.in b/t/recipes/checks/debhelper/debhelper-compat-experimental/build-spec/debian/compat.in new file mode 100644 index 0000000..640a566 --- /dev/null +++ b/t/recipes/checks/debhelper/debhelper-compat-experimental/build-spec/debian/compat.in @@ -0,0 +1 @@ +[% $dh_compat_level %] diff --git a/t/recipes/checks/debhelper/debhelper-compat-experimental/build-spec/fill-values b/t/recipes/checks/debhelper/debhelper-compat-experimental/build-spec/fill-values new file mode 100644 index 0000000..d40c6eb --- /dev/null +++ b/t/recipes/checks/debhelper/debhelper-compat-experimental/build-spec/fill-values @@ -0,0 +1,6 @@ +Skeleton: upload-native +Testname: debhelper-compat-experimental +Dh-Compat-Level: 13 +Default-Build-Depends: debhelper (>= 12~) +Description: Test for old debian/compat file +# Overrides the "data/debhelper/compat-level" diff --git a/t/recipes/checks/debhelper/debhelper-compat-experimental/eval/desc b/t/recipes/checks/debhelper/debhelper-compat-experimental/eval/desc new file mode 100644 index 0000000..0213f60 --- /dev/null +++ b/t/recipes/checks/debhelper/debhelper-compat-experimental/eval/desc @@ -0,0 +1,5 @@ +Testname: debhelper-compat-experimental +Profile: lintian-test +Options: --include-dir ./lintian-include-dir +Check: debhelper +# Overrides the "data/debhelper/compat-level" diff --git a/t/recipes/checks/debhelper/debhelper-compat-experimental/eval/hints b/t/recipes/checks/debhelper/debhelper-compat-experimental/eval/hints new file mode 100644 index 0000000..8517f10 --- /dev/null +++ b/t/recipes/checks/debhelper/debhelper-compat-experimental/eval/hints @@ -0,0 +1,4 @@ +debhelper-compat-experimental (source): package-uses-experimental-debhelper-compat-version 13 +debhelper-compat-experimental (source): no-versioned-debhelper-prerequisite 13 +debhelper-compat-experimental (source): debian-build-system dh [debian/rules] +debhelper-compat-experimental (source): debhelper-compat-level 13 diff --git a/t/recipes/checks/debhelper/debhelper-compat-experimental/eval/lintian-include-dir/profiles/lintian-test/main.profile b/t/recipes/checks/debhelper/debhelper-compat-experimental/eval/lintian-include-dir/profiles/lintian-test/main.profile new file mode 100644 index 0000000..f0e27cf --- /dev/null +++ b/t/recipes/checks/debhelper/debhelper-compat-experimental/eval/lintian-include-dir/profiles/lintian-test/main.profile @@ -0,0 +1,2 @@ +Profile: lintian-test/main +Extends: debian/main diff --git a/t/recipes/checks/debhelper/debhelper-compat-experimental/eval/lintian-include-dir/vendors/lintian-test/main/data/debhelper/compat-level b/t/recipes/checks/debhelper/debhelper-compat-experimental/eval/lintian-include-dir/vendors/lintian-test/main/data/debhelper/compat-level new file mode 100644 index 0000000..5d77b80 --- /dev/null +++ b/t/recipes/checks/debhelper/debhelper-compat-experimental/eval/lintian-include-dir/vendors/lintian-test/main/data/debhelper/compat-level @@ -0,0 +1,2 @@ +@include-parent +experimental=10 diff --git a/t/recipes/checks/debhelper/debhelper-compat-missing/build-spec/debian/compat.in b/t/recipes/checks/debhelper/debhelper-compat-missing/build-spec/debian/compat.in new file mode 100644 index 0000000..640a566 --- /dev/null +++ b/t/recipes/checks/debhelper/debhelper-compat-missing/build-spec/debian/compat.in @@ -0,0 +1 @@ +[% $dh_compat_level %] diff --git a/t/recipes/checks/debhelper/debhelper-compat-missing/build-spec/debian/source/options b/t/recipes/checks/debhelper/debhelper-compat-missing/build-spec/debian/source/options new file mode 100644 index 0000000..ef3297d --- /dev/null +++ b/t/recipes/checks/debhelper/debhelper-compat-missing/build-spec/debian/source/options @@ -0,0 +1,2 @@ +tar-ignore +tar-ignore=*/compat diff --git a/t/recipes/checks/debhelper/debhelper-compat-missing/build-spec/fill-values b/t/recipes/checks/debhelper/debhelper-compat-missing/build-spec/fill-values new file mode 100644 index 0000000..942e8e9 --- /dev/null +++ b/t/recipes/checks/debhelper/debhelper-compat-missing/build-spec/fill-values @@ -0,0 +1,4 @@ +Skeleton: upload-native +Testname: debhelper-compat-missing +Description: Test for missing debian/compat +Default-Build-Depends: debhelper (>= [% $dh_compat_level %]~) diff --git a/t/recipes/checks/debhelper/debhelper-compat-missing/eval/desc b/t/recipes/checks/debhelper/debhelper-compat-missing/eval/desc new file mode 100644 index 0000000..5eec2be --- /dev/null +++ b/t/recipes/checks/debhelper/debhelper-compat-missing/eval/desc @@ -0,0 +1,2 @@ +Testname: debhelper-compat-missing +Check: debhelper diff --git a/t/recipes/checks/debhelper/debhelper-compat-missing/eval/hints b/t/recipes/checks/debhelper/debhelper-compat-missing/eval/hints new file mode 100644 index 0000000..7ff4af0 --- /dev/null +++ b/t/recipes/checks/debhelper/debhelper-compat-missing/eval/hints @@ -0,0 +1,3 @@ +debhelper-compat-missing (source): package-uses-deprecated-debhelper-compat-version 1 +debhelper-compat-missing (source): debian-build-system dh [debian/rules] +debhelper-compat-missing (source): debhelper-compat-file-is-missing diff --git a/t/recipes/checks/debhelper/debhelper-compat-multiple-unrel/build-spec/debian/compat b/t/recipes/checks/debhelper/debhelper-compat-multiple-unrel/build-spec/debian/compat new file mode 100644 index 0000000..736ea2a --- /dev/null +++ b/t/recipes/checks/debhelper/debhelper-compat-multiple-unrel/build-spec/debian/compat @@ -0,0 +1,3 @@ +11 + +# Comment after a skipped line diff --git a/t/recipes/checks/debhelper/debhelper-compat-multiple-unrel/build-spec/fill-values b/t/recipes/checks/debhelper/debhelper-compat-multiple-unrel/build-spec/fill-values new file mode 100644 index 0000000..d3eee2a --- /dev/null +++ b/t/recipes/checks/debhelper/debhelper-compat-multiple-unrel/build-spec/fill-values @@ -0,0 +1,4 @@ +Skeleton: upload-native +Testname: debhelper-compat-multiple-unrel +Description: Test debian/compat file with multiple entries (false-positives) +Default-Build-Depends: debhelper (>= [% $dh_compat_level %]~) diff --git a/t/recipes/checks/debhelper/debhelper-compat-multiple-unrel/eval/desc b/t/recipes/checks/debhelper/debhelper-compat-multiple-unrel/eval/desc new file mode 100644 index 0000000..6627836 --- /dev/null +++ b/t/recipes/checks/debhelper/debhelper-compat-multiple-unrel/eval/desc @@ -0,0 +1,4 @@ +Testname: debhelper-compat-multiple-unrel +Test-Against: + debhelper-compat-file-contains-multiple-levels +Check: debhelper diff --git a/t/recipes/checks/debhelper/debhelper-compat-multiple-unrel/eval/hints b/t/recipes/checks/debhelper/debhelper-compat-multiple-unrel/eval/hints new file mode 100644 index 0000000..2ec2a64 --- /dev/null +++ b/t/recipes/checks/debhelper/debhelper-compat-multiple-unrel/eval/hints @@ -0,0 +1,4 @@ +debhelper-compat-multiple-unrel (source): uses-debhelper-compat-file [debian/compat] +debhelper-compat-multiple-unrel (source): package-uses-old-debhelper-compat-version 11 +debhelper-compat-multiple-unrel (source): debian-build-system dh [debian/rules] +debhelper-compat-multiple-unrel (source): debhelper-compat-level 11 diff --git a/t/recipes/checks/debhelper/debhelper-compat-multiple/build-spec/debian/compat b/t/recipes/checks/debhelper/debhelper-compat-multiple/build-spec/debian/compat new file mode 100644 index 0000000..58110e6 --- /dev/null +++ b/t/recipes/checks/debhelper/debhelper-compat-multiple/build-spec/debian/compat @@ -0,0 +1,3 @@ +11 + +12 diff --git a/t/recipes/checks/debhelper/debhelper-compat-multiple/build-spec/fill-values b/t/recipes/checks/debhelper/debhelper-compat-multiple/build-spec/fill-values new file mode 100644 index 0000000..6f579bf --- /dev/null +++ b/t/recipes/checks/debhelper/debhelper-compat-multiple/build-spec/fill-values @@ -0,0 +1,4 @@ +Skeleton: upload-native +Testname: debhelper-compat-multiple +Description: Test debian/compat file with multiple entries +Default-Build-Depends: debhelper (>= [% $dh_compat_level %]~) diff --git a/t/recipes/checks/debhelper/debhelper-compat-multiple/eval/desc b/t/recipes/checks/debhelper/debhelper-compat-multiple/eval/desc new file mode 100644 index 0000000..a073dba --- /dev/null +++ b/t/recipes/checks/debhelper/debhelper-compat-multiple/eval/desc @@ -0,0 +1,2 @@ +Testname: debhelper-compat-multiple +Check: debhelper diff --git a/t/recipes/checks/debhelper/debhelper-compat-multiple/eval/hints b/t/recipes/checks/debhelper/debhelper-compat-multiple/eval/hints new file mode 100644 index 0000000..03f9faf --- /dev/null +++ b/t/recipes/checks/debhelper/debhelper-compat-multiple/eval/hints @@ -0,0 +1,5 @@ +debhelper-compat-multiple (source): uses-debhelper-compat-file [debian/compat] +debhelper-compat-multiple (source): package-uses-old-debhelper-compat-version 11 +debhelper-compat-multiple (source): debian-build-system dh [debian/rules] +debhelper-compat-multiple (source): debhelper-compat-level 11 +debhelper-compat-multiple (source): debhelper-compat-file-contains-multiple-levels [debian/compat:3] diff --git a/t/recipes/checks/debhelper/debhelper-compat-old/build-spec/debian/compat.in b/t/recipes/checks/debhelper/debhelper-compat-old/build-spec/debian/compat.in new file mode 100644 index 0000000..640a566 --- /dev/null +++ b/t/recipes/checks/debhelper/debhelper-compat-old/build-spec/debian/compat.in @@ -0,0 +1 @@ +[% $dh_compat_level %] diff --git a/t/recipes/checks/debhelper/debhelper-compat-old/build-spec/debian/rules b/t/recipes/checks/debhelper/debhelper-compat-old/build-spec/debian/rules new file mode 100644 index 0000000..3d706f5 --- /dev/null +++ b/t/recipes/checks/debhelper/debhelper-compat-old/build-spec/debian/rules @@ -0,0 +1,7 @@ +#!/usr/bin/make -f + +%: + dh $@ + +override_dh_builddeb: + dh_builddeb -- -Zgzip diff --git a/t/recipes/checks/debhelper/debhelper-compat-old/build-spec/fill-values b/t/recipes/checks/debhelper/debhelper-compat-old/build-spec/fill-values new file mode 100644 index 0000000..3de27aa --- /dev/null +++ b/t/recipes/checks/debhelper/debhelper-compat-old/build-spec/fill-values @@ -0,0 +1,5 @@ +Skeleton: upload-native +Testname: debhelper-compat-old +Description: Test for old debian/compat file +Dh-Compat-Level: 8 +Default-Build-Depends: debhelper (>= [% $dh_compat_level %]~) diff --git a/t/recipes/checks/debhelper/debhelper-compat-old/eval/desc b/t/recipes/checks/debhelper/debhelper-compat-old/eval/desc new file mode 100644 index 0000000..5659a51 --- /dev/null +++ b/t/recipes/checks/debhelper/debhelper-compat-old/eval/desc @@ -0,0 +1,4 @@ +Testname: debhelper-compat-old +Options: --include-dir ./lintian-include-dir +Profile: lintian-test +Check: debhelper diff --git a/t/recipes/checks/debhelper/debhelper-compat-old/eval/hints b/t/recipes/checks/debhelper/debhelper-compat-old/eval/hints new file mode 100644 index 0000000..21ce42a --- /dev/null +++ b/t/recipes/checks/debhelper/debhelper-compat-old/eval/hints @@ -0,0 +1,3 @@ +debhelper-compat-old (source): package-uses-old-debhelper-compat-version 8 +debhelper-compat-old (source): debian-build-system dh [debian/rules] +debhelper-compat-old (source): debhelper-compat-level 8 diff --git a/t/recipes/checks/debhelper/debhelper-compat-old/eval/lintian-include-dir/profiles/lintian-test/main.profile b/t/recipes/checks/debhelper/debhelper-compat-old/eval/lintian-include-dir/profiles/lintian-test/main.profile new file mode 100644 index 0000000..f0e27cf --- /dev/null +++ b/t/recipes/checks/debhelper/debhelper-compat-old/eval/lintian-include-dir/profiles/lintian-test/main.profile @@ -0,0 +1,2 @@ +Profile: lintian-test/main +Extends: debian/main diff --git a/t/recipes/checks/debhelper/debhelper-compat-old/eval/lintian-include-dir/vendors/lintian-test/main/data/debhelper/compat-level b/t/recipes/checks/debhelper/debhelper-compat-old/eval/lintian-include-dir/vendors/lintian-test/main/data/debhelper/compat-level new file mode 100644 index 0000000..d91eeb3 --- /dev/null +++ b/t/recipes/checks/debhelper/debhelper-compat-old/eval/lintian-include-dir/vendors/lintian-test/main/data/debhelper/compat-level @@ -0,0 +1,3 @@ +@include-parent +deprecated=1 +recommended=100 diff --git a/t/recipes/checks/debhelper/debhelper-compat-virtual-relation-both/build-spec/debian/control.in b/t/recipes/checks/debhelper/debhelper-compat-virtual-relation-both/build-spec/debian/control.in new file mode 100644 index 0000000..c59a284 --- /dev/null +++ b/t/recipes/checks/debhelper/debhelper-compat-virtual-relation-both/build-spec/debian/control.in @@ -0,0 +1,16 @@ +Source: [% $source %] +Priority: optional +Section: [% $section %] +Maintainer: [% $author %] +Standards-Version: [% $standards_version %] +Build-Depends: debhelper (>= 11.3.6~), debhelper-compat (= 10) +Rules-Requires-Root: no + +Package: [% $source %] +Architecture: [% $package_architecture %] +Depends: ${misc:Depends} +Description: [% $description %] + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. diff --git a/t/recipes/checks/debhelper/debhelper-compat-virtual-relation-both/build-spec/fill-values b/t/recipes/checks/debhelper/debhelper-compat-virtual-relation-both/build-spec/fill-values new file mode 100644 index 0000000..40b77b3 --- /dev/null +++ b/t/recipes/checks/debhelper/debhelper-compat-virtual-relation-both/build-spec/fill-values @@ -0,0 +1,5 @@ +Skeleton: upload-native +Testname: debhelper-compat-virtual-relation-both +Description: Test both debhelper and debhelper-compat as a build-dependency +Default-Build-Depends: + debhelper (>= 11.3~) diff --git a/t/recipes/checks/debhelper/debhelper-compat-virtual-relation-both/build-spec/pre-build b/t/recipes/checks/debhelper/debhelper-compat-virtual-relation-both/build-spec/pre-build new file mode 100755 index 0000000..b5649a8 --- /dev/null +++ b/t/recipes/checks/debhelper/debhelper-compat-virtual-relation-both/build-spec/pre-build @@ -0,0 +1,5 @@ +#!/bin/sh + +DIR="$1" + +rm -f "$DIR/debian/compat" diff --git a/t/recipes/checks/debhelper/debhelper-compat-virtual-relation-both/eval/desc b/t/recipes/checks/debhelper/debhelper-compat-virtual-relation-both/eval/desc new file mode 100644 index 0000000..2b36dde --- /dev/null +++ b/t/recipes/checks/debhelper/debhelper-compat-virtual-relation-both/eval/desc @@ -0,0 +1,2 @@ +Testname: debhelper-compat-virtual-relation-both +Check: debhelper diff --git a/t/recipes/checks/debhelper/debhelper-compat-virtual-relation-both/eval/hints b/t/recipes/checks/debhelper/debhelper-compat-virtual-relation-both/eval/hints new file mode 100644 index 0000000..a26bc3a --- /dev/null +++ b/t/recipes/checks/debhelper/debhelper-compat-virtual-relation-both/eval/hints @@ -0,0 +1,4 @@ +debhelper-compat-virtual-relation-both (source): package-uses-old-debhelper-compat-version 10 +debhelper-compat-virtual-relation-both (source): debian-build-system dh [debian/rules] +debhelper-compat-virtual-relation-both (source): debhelper-compat-virtual-relation 10 [debian/control] +debhelper-compat-virtual-relation-both (source): debhelper-compat-level 10 diff --git a/t/recipes/checks/debhelper/debhelper-compat-virtual-relation/build-spec/debian/control.in b/t/recipes/checks/debhelper/debhelper-compat-virtual-relation/build-spec/debian/control.in new file mode 100644 index 0000000..caddd20 --- /dev/null +++ b/t/recipes/checks/debhelper/debhelper-compat-virtual-relation/build-spec/debian/control.in @@ -0,0 +1,16 @@ +Source: [% $source %] +Priority: optional +Section: [% $section %] +Maintainer: [% $author %] +Standards-Version: [% $standards_version %] +Build-Depends: debhelper-compat (= 11) +Rules-Requires-Root: no + +Package: [% $source %] +Architecture: [% $package_architecture %] +Depends: ${misc:Depends} +Description: [% $description %] + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. diff --git a/t/recipes/checks/debhelper/debhelper-compat-virtual-relation/build-spec/fill-values b/t/recipes/checks/debhelper/debhelper-compat-virtual-relation/build-spec/fill-values new file mode 100644 index 0000000..9d5502e --- /dev/null +++ b/t/recipes/checks/debhelper/debhelper-compat-virtual-relation/build-spec/fill-values @@ -0,0 +1,5 @@ +Skeleton: upload-native +Testname: debhelper-compat-virtual-relation +Description: Test debhelper-compat as a build-dependency +Default-Build-Depends: + debhelper (>= 11.3~) diff --git a/t/recipes/checks/debhelper/debhelper-compat-virtual-relation/build-spec/pre-build b/t/recipes/checks/debhelper/debhelper-compat-virtual-relation/build-spec/pre-build new file mode 100755 index 0000000..b5649a8 --- /dev/null +++ b/t/recipes/checks/debhelper/debhelper-compat-virtual-relation/build-spec/pre-build @@ -0,0 +1,5 @@ +#!/bin/sh + +DIR="$1" + +rm -f "$DIR/debian/compat" diff --git a/t/recipes/checks/debhelper/debhelper-compat-virtual-relation/eval/desc b/t/recipes/checks/debhelper/debhelper-compat-virtual-relation/eval/desc new file mode 100644 index 0000000..75c4375 --- /dev/null +++ b/t/recipes/checks/debhelper/debhelper-compat-virtual-relation/eval/desc @@ -0,0 +1,5 @@ +Testname: debhelper-compat-virtual-relation +Test-Against: + package-uses-debhelper-but-lacks-build-depends + no-versioned-debhelper-prerequisite +Check: debhelper diff --git a/t/recipes/checks/debhelper/debhelper-compat-virtual-relation/eval/hints b/t/recipes/checks/debhelper/debhelper-compat-virtual-relation/eval/hints new file mode 100644 index 0000000..74e2f29 --- /dev/null +++ b/t/recipes/checks/debhelper/debhelper-compat-virtual-relation/eval/hints @@ -0,0 +1,4 @@ +debhelper-compat-virtual-relation (source): package-uses-old-debhelper-compat-version 11 +debhelper-compat-virtual-relation (source): debian-build-system dh [debian/rules] +debhelper-compat-virtual-relation (source): debhelper-compat-virtual-relation 11 [debian/control] +debhelper-compat-virtual-relation (source): debhelper-compat-level 11 diff --git a/t/recipes/checks/debhelper/debhelper-compat-whitespace/build-spec/debian/compat.in b/t/recipes/checks/debhelper/debhelper-compat-whitespace/build-spec/debian/compat.in new file mode 100644 index 0000000..64f7ede --- /dev/null +++ b/t/recipes/checks/debhelper/debhelper-compat-whitespace/build-spec/debian/compat.in @@ -0,0 +1 @@ + [% $dh_compat_level %] diff --git a/t/recipes/checks/debhelper/debhelper-compat-whitespace/build-spec/fill-values b/t/recipes/checks/debhelper/debhelper-compat-whitespace/build-spec/fill-values new file mode 100644 index 0000000..0301064 --- /dev/null +++ b/t/recipes/checks/debhelper/debhelper-compat-whitespace/build-spec/fill-values @@ -0,0 +1,4 @@ +Skeleton: upload-native +Testname: debhelper-compat-whitespace +Description: Allow whitespace in debian/compat +Default-Build-Depends: debhelper (>= [% $dh_compat_level %]~) diff --git a/t/recipes/checks/debhelper/debhelper-compat-whitespace/eval/desc b/t/recipes/checks/debhelper/debhelper-compat-whitespace/eval/desc new file mode 100644 index 0000000..8063998 --- /dev/null +++ b/t/recipes/checks/debhelper/debhelper-compat-whitespace/eval/desc @@ -0,0 +1,3 @@ +Testname: debhelper-compat-whitespace +Test-Against: debhelper-compat-not-a-number +Check: debhelper diff --git a/t/recipes/checks/debhelper/debhelper-compat-whitespace/eval/hints b/t/recipes/checks/debhelper/debhelper-compat-whitespace/eval/hints new file mode 100644 index 0000000..c3d2ed0 --- /dev/null +++ b/t/recipes/checks/debhelper/debhelper-compat-whitespace/eval/hints @@ -0,0 +1,3 @@ +debhelper-compat-whitespace (source): uses-debhelper-compat-file [debian/compat] +debhelper-compat-whitespace (source): debian-build-system dh [debian/rules] +debhelper-compat-whitespace (source): debhelper-compat-level 13 diff --git a/t/recipes/checks/debhelper/debhelper-compat/build-spec/fill-values b/t/recipes/checks/debhelper/debhelper-compat/build-spec/fill-values new file mode 100644 index 0000000..11bd35f --- /dev/null +++ b/t/recipes/checks/debhelper/debhelper-compat/build-spec/fill-values @@ -0,0 +1,5 @@ +Skeleton: upload-native +Testname: debhelper-compat +Description: Test the content of debian/compat +Default-Build-Depends: debhelper (<< 9.20151101~) +Dh-Compat-Level: [9- diff --git a/t/recipes/checks/debhelper/debhelper-compat/eval/desc b/t/recipes/checks/debhelper/debhelper-compat/eval/desc new file mode 100644 index 0000000..d4f1ad1 --- /dev/null +++ b/t/recipes/checks/debhelper/debhelper-compat/eval/desc @@ -0,0 +1,2 @@ +Testname: debhelper-compat +Check: debhelper diff --git a/t/recipes/checks/debhelper/debhelper-compat/eval/hints b/t/recipes/checks/debhelper/debhelper-compat/eval/hints new file mode 100644 index 0000000..baa1950 --- /dev/null +++ b/t/recipes/checks/debhelper/debhelper-compat/eval/hints @@ -0,0 +1 @@ +debhelper-compat (source): debhelper-compat-not-a-number [9- diff --git a/t/recipes/checks/debhelper/debhelper-deprecated/build-spec/debian/compat.in b/t/recipes/checks/debhelper/debhelper-deprecated/build-spec/debian/compat.in new file mode 100644 index 0000000..640a566 --- /dev/null +++ b/t/recipes/checks/debhelper/debhelper-deprecated/build-spec/debian/compat.in @@ -0,0 +1 @@ +[% $dh_compat_level %] diff --git a/t/recipes/checks/debhelper/debhelper-deprecated/build-spec/debian/rules b/t/recipes/checks/debhelper/debhelper-deprecated/build-spec/debian/rules new file mode 100755 index 0000000..2f7c75e --- /dev/null +++ b/t/recipes/checks/debhelper/debhelper-deprecated/build-spec/debian/rules @@ -0,0 +1,48 @@ +#!/usr/bin/make -f + +pkg = $(shell dh_listpackages) +VERSION=2 + +build: build-indep build-arch +build-arch: +build-indep: + +clean: + dh_testdir + dh_testroot + dh_clean + +binary: binary-indep binary-arch +binary-arch: +binary-indep: + dh_testdir + dh_testroot + dh_prep + dh_install + dh_installchangelogs + dh_installdocs + dh_installmanpages + + #dh_scrollkeeper + -dh_python-ply # neither should this + +# Check not warning about deprecated commands in optional portions, but +# commands that have been toast for a long time are still warned about. +ifneq "$(LENNY_BACKPORT)" "y" + -dh_help + #dh_scrollkeeper +endif + dh_link + dh_compress + dh_fixperms + #dh_suidregister + + dh_installdeb + dh_gencontrol + dh_md5sums + dh_builddeb + +somewhere: + dh $@ --with autotools-dev + +.PHONY: build-arch build-indep build binary binary-arch binary-indep clean diff --git a/t/recipes/checks/debhelper/debhelper-deprecated/build-spec/fill-values b/t/recipes/checks/debhelper/debhelper-deprecated/build-spec/fill-values new file mode 100644 index 0000000..7cb64f8 --- /dev/null +++ b/t/recipes/checks/debhelper/debhelper-deprecated/build-spec/fill-values @@ -0,0 +1,5 @@ +Skeleton: upload-native +Testname: debhelper-deprecated +Description: Test for use of deprecated dh_* commands +Extra-Build-Depends: python-ply (>= 3.4-1~) +Default-Build-Depends: debhelper (>= [% $dh_compat_level %]~) diff --git a/t/recipes/checks/debhelper/debhelper-deprecated/eval/desc b/t/recipes/checks/debhelper/debhelper-deprecated/eval/desc new file mode 100644 index 0000000..c51b571 --- /dev/null +++ b/t/recipes/checks/debhelper/debhelper-deprecated/eval/desc @@ -0,0 +1,2 @@ +Testname: debhelper-deprecated +Check: debhelper diff --git a/t/recipes/checks/debhelper/debhelper-deprecated/eval/hints b/t/recipes/checks/debhelper/debhelper-deprecated/eval/hints new file mode 100644 index 0000000..15c9729 --- /dev/null +++ b/t/recipes/checks/debhelper/debhelper-deprecated/eval/hints @@ -0,0 +1,6 @@ +debhelper-deprecated (source): uses-debhelper-compat-file [debian/compat] +debhelper-deprecated (source): missing-build-dependency-for-dh-addon autotools_dev (does not satisfy autotools-dev:any) [debian/rules] +debhelper-deprecated (source): dh_installmanpages-is-obsolete [debian/rules:24] +debhelper-deprecated (source): debian-build-system dh [debian/rules] +debhelper-deprecated (source): debhelper-tools-from-autotools-dev-are-deprecated dh ... --with autotools-dev [debian/rules:46] +debhelper-deprecated (source): debhelper-compat-level 13 diff --git a/t/recipes/checks/debhelper/debhelper-dh-clean-k-deprecated/build-spec/debian/rules b/t/recipes/checks/debhelper/debhelper-dh-clean-k-deprecated/build-spec/debian/rules new file mode 100755 index 0000000..bd004e3 --- /dev/null +++ b/t/recipes/checks/debhelper/debhelper-dh-clean-k-deprecated/build-spec/debian/rules @@ -0,0 +1,37 @@ +#!/usr/bin/make -f +# +# Use an alternate rules file that doesn't call dh to test not warning +# about debhelper script tokens if we call no programs that care about +# them. + +pkg = $(shell dh_listpackages) + +build: build-arch build-indep +build-arch: +build-indep: + +clean: + dh_testdir + dh_testroot + dh_clean + +binary: binary-indep binary-arch +binary-arch: +binary-indep: + dh_testdir + dh_testroot + dh_clean -k + dh_install + dh_installchangelogs + dh_installdebconf + # dh_installdocs may modify maintainer scripts + install -m 644 debian/copyright debian/$(pkg)/usr/share/doc/$(pkg) + dh_link + dh_compress + dh_fixperms + dh_installdeb + dh_gencontrol + dh_md5sums + dh_builddeb + +.PHONY: build-arch build-indep build binary binary-arch binary-indep clean diff --git a/t/recipes/checks/debhelper/debhelper-dh-clean-k-deprecated/build-spec/fill-values b/t/recipes/checks/debhelper/debhelper-dh-clean-k-deprecated/build-spec/fill-values new file mode 100644 index 0000000..c836ef5 --- /dev/null +++ b/t/recipes/checks/debhelper/debhelper-dh-clean-k-deprecated/build-spec/fill-values @@ -0,0 +1,4 @@ +Skeleton: upload-native +Testname: debhelper-dh-clean-k-deprecated +Dh-Compat-Level: 11 +Description: Test for debhelper >=7 packages using dh_clean -k diff --git a/t/recipes/checks/debhelper/debhelper-dh-clean-k-deprecated/eval/desc b/t/recipes/checks/debhelper/debhelper-dh-clean-k-deprecated/eval/desc new file mode 100644 index 0000000..7742990 --- /dev/null +++ b/t/recipes/checks/debhelper/debhelper-dh-clean-k-deprecated/eval/desc @@ -0,0 +1,2 @@ +Testname: debhelper-dh-clean-k-deprecated +Check: debhelper diff --git a/t/recipes/checks/debhelper/debhelper-dh-clean-k-deprecated/eval/hints b/t/recipes/checks/debhelper/debhelper-dh-clean-k-deprecated/eval/hints new file mode 100644 index 0000000..a21c10f --- /dev/null +++ b/t/recipes/checks/debhelper/debhelper-dh-clean-k-deprecated/eval/hints @@ -0,0 +1,5 @@ +debhelper-dh-clean-k-deprecated (source): package-uses-old-debhelper-compat-version 11 +debhelper-dh-clean-k-deprecated (source): dh-clean-k-is-deprecated [debian/rules] +debhelper-dh-clean-k-deprecated (source): debian-build-system debhelper [debian/rules] +debhelper-dh-clean-k-deprecated (source): debhelper-compat-virtual-relation 11 [debian/control] +debhelper-dh-clean-k-deprecated (source): debhelper-compat-level 11 diff --git a/t/recipes/checks/debhelper/debhelper-dh-compat/build-spec/debian/compat.in b/t/recipes/checks/debhelper/debhelper-dh-compat/build-spec/debian/compat.in new file mode 100644 index 0000000..640a566 --- /dev/null +++ b/t/recipes/checks/debhelper/debhelper-dh-compat/build-spec/debian/compat.in @@ -0,0 +1 @@ +[% $dh_compat_level %] diff --git a/t/recipes/checks/debhelper/debhelper-dh-compat/build-spec/debian/rules b/t/recipes/checks/debhelper/debhelper-dh-compat/build-spec/debian/rules new file mode 100755 index 0000000..111f495 --- /dev/null +++ b/t/recipes/checks/debhelper/debhelper-dh-compat/build-spec/debian/rules @@ -0,0 +1,8 @@ +#!/usr/bin/make -f + +export DH_COMPAT=10 + +%: + dh $@ + +DH_COMPAT=8 diff --git a/t/recipes/checks/debhelper/debhelper-dh-compat/build-spec/fill-values b/t/recipes/checks/debhelper/debhelper-dh-compat/build-spec/fill-values new file mode 100644 index 0000000..be50f28 --- /dev/null +++ b/t/recipes/checks/debhelper/debhelper-dh-compat/build-spec/fill-values @@ -0,0 +1,4 @@ +Skeleton: upload-native +Testname: debhelper-dh-compat +Description: Test the value of DH_COMPAT +Default-Build-Depends: debhelper (>= [% $dh_compat_level %]~) diff --git a/t/recipes/checks/debhelper/debhelper-dh-compat/eval/desc b/t/recipes/checks/debhelper/debhelper-dh-compat/eval/desc new file mode 100644 index 0000000..d974fa2 --- /dev/null +++ b/t/recipes/checks/debhelper/debhelper-dh-compat/eval/desc @@ -0,0 +1,4 @@ +Testname: debhelper-dh-compat +Profile: lintian-test +Options: --include-dir ./lintian-include-dir +Check: debhelper diff --git a/t/recipes/checks/debhelper/debhelper-dh-compat/eval/hints b/t/recipes/checks/debhelper/debhelper-dh-compat/eval/hints new file mode 100644 index 0000000..86e066e --- /dev/null +++ b/t/recipes/checks/debhelper/debhelper-dh-compat/eval/hints @@ -0,0 +1,5 @@ +debhelper-dh-compat (source): uses-debhelper-compat-file [debian/compat] +debhelper-dh-compat (source): package-uses-old-debhelper-compat-version 8 +debhelper-dh-compat (source): declares-possibly-conflicting-debhelper-compat-versions 13 vs elsewhere 8 [debian/compat] +debhelper-dh-compat (source): debian-build-system dh [debian/rules] +debhelper-dh-compat (source): debhelper-compat-level 8 diff --git a/t/recipes/checks/debhelper/debhelper-dh-compat/eval/lintian-include-dir/profiles/lintian-test/main.profile b/t/recipes/checks/debhelper/debhelper-dh-compat/eval/lintian-include-dir/profiles/lintian-test/main.profile new file mode 100644 index 0000000..f0e27cf --- /dev/null +++ b/t/recipes/checks/debhelper/debhelper-dh-compat/eval/lintian-include-dir/profiles/lintian-test/main.profile @@ -0,0 +1,2 @@ +Profile: lintian-test/main +Extends: debian/main diff --git a/t/recipes/checks/debhelper/debhelper-dh-compat/eval/lintian-include-dir/vendors/lintian-test/main/data/debhelper/compat-level b/t/recipes/checks/debhelper/debhelper-dh-compat/eval/lintian-include-dir/vendors/lintian-test/main/data/debhelper/compat-level new file mode 100644 index 0000000..d91eeb3 --- /dev/null +++ b/t/recipes/checks/debhelper/debhelper-dh-compat/eval/lintian-include-dir/vendors/lintian-test/main/data/debhelper/compat-level @@ -0,0 +1,3 @@ +@include-parent +deprecated=1 +recommended=100 diff --git a/t/recipes/checks/debhelper/debhelper-dh-exec/build-spec/debian/dirs b/t/recipes/checks/debhelper/debhelper-dh-exec/build-spec/debian/dirs new file mode 100755 index 0000000..aaac17a --- /dev/null +++ b/t/recipes/checks/debhelper/debhelper-dh-exec/build-spec/debian/dirs @@ -0,0 +1,3 @@ +#! /usr/bin/dh-exec +usr/lib +usr/lib/${DEB_HOST_MULTIARCH}/octave/packages diff --git a/t/recipes/checks/debhelper/debhelper-dh-exec/build-spec/debian/install b/t/recipes/checks/debhelper/debhelper-dh-exec/build-spec/debian/install new file mode 100755 index 0000000..c79e8ae --- /dev/null +++ b/t/recipes/checks/debhelper/debhelper-dh-exec/build-spec/debian/install @@ -0,0 +1,6 @@ +#! /usr/bin/dh-exec +usr/lib/foo [linux-any] [hurd-any] [kfreebsd-any] +usr/lib/${DEB_HOST_MULTIARCH} +usr/lib/${DEB_HOST_MULTIARCH} /usr/lib/${DEB_HOST_MULTIARCH}/ +usr/lib/${DEB_BUILD_MULTIARCH} /usr/lib/${DEB_HOST_MULTIARCH}/ +usr/lib/${DEB_HOST_MULTIARCH}/some-package/*.so diff --git a/t/recipes/checks/debhelper/debhelper-dh-exec/build-spec/debian/links b/t/recipes/checks/debhelper/debhelper-dh-exec/build-spec/debian/links new file mode 100755 index 0000000..3c907d7 --- /dev/null +++ b/t/recipes/checks/debhelper/debhelper-dh-exec/build-spec/debian/links @@ -0,0 +1,2 @@ +#! /usr/bin/dh-exec +link-foo => link-bar diff --git a/t/recipes/checks/debhelper/debhelper-dh-exec/build-spec/debian/manpages b/t/recipes/checks/debhelper/debhelper-dh-exec/build-spec/debian/manpages new file mode 100755 index 0000000..2209766 --- /dev/null +++ b/t/recipes/checks/debhelper/debhelper-dh-exec/build-spec/debian/manpages @@ -0,0 +1,5 @@ +#! /usr/lib/dh-exec/dh-exec-subst +## The above works, but is not recommended. +foo => bar +this-line-uses-tabs => this-line-uses-tabs +${DEB_BUILD_WHATEVER} diff --git a/t/recipes/checks/debhelper/debhelper-dh-exec/build-spec/debian/mime b/t/recipes/checks/debhelper/debhelper-dh-exec/build-spec/debian/mime new file mode 100755 index 0000000..ce8e762 --- /dev/null +++ b/t/recipes/checks/debhelper/debhelper-dh-exec/build-spec/debian/mime @@ -0,0 +1,2 @@ +#! /usr/bin/dh-exec +debian/rules diff --git a/t/recipes/checks/debhelper/debhelper-dh-exec/build-spec/debian/rules b/t/recipes/checks/debhelper/debhelper-dh-exec/build-spec/debian/rules new file mode 100755 index 0000000..06b98ae --- /dev/null +++ b/t/recipes/checks/debhelper/debhelper-dh-exec/build-spec/debian/rules @@ -0,0 +1,16 @@ +#!/usr/bin/make -f + +%: + dh $@ + +# Ignore the "mime" file as we do not really depend on dh-exec and we +# do not really need the files listed there for the test. +override_dh_installmime: + + +override_dh_installman: + +override_dh_install: + +override_dh_installdirs: +override_dh_link: diff --git a/t/recipes/checks/debhelper/debhelper-dh-exec/build-spec/fill-values b/t/recipes/checks/debhelper/debhelper-dh-exec/build-spec/fill-values new file mode 100644 index 0000000..f359531 --- /dev/null +++ b/t/recipes/checks/debhelper/debhelper-dh-exec/build-spec/fill-values @@ -0,0 +1,4 @@ +Skeleton: upload-native +Testname: debhelper-dh-exec +Dh-Compat-Level: 9 +Description: Tests related to executable, dh-exec using packaging files diff --git a/t/recipes/checks/debhelper/debhelper-dh-exec/eval/desc b/t/recipes/checks/debhelper/debhelper-dh-exec/eval/desc new file mode 100644 index 0000000..b369e0d --- /dev/null +++ b/t/recipes/checks/debhelper/debhelper-dh-exec/eval/desc @@ -0,0 +1,4 @@ +Testname: debhelper-dh-exec +Options: --suppress-tags + no-versioned-debhelper-prerequisite +Check: debhelper diff --git a/t/recipes/checks/debhelper/debhelper-dh-exec/eval/hints b/t/recipes/checks/debhelper/debhelper-dh-exec/eval/hints new file mode 100644 index 0000000..dfabcc2 --- /dev/null +++ b/t/recipes/checks/debhelper/debhelper-dh-exec/eval/hints @@ -0,0 +1,12 @@ +debhelper-dh-exec (source): package-uses-dh-exec-but-lacks-build-depends [debian/rules] +debhelper-dh-exec (source): package-uses-deprecated-debhelper-compat-version 9 +debhelper-dh-exec (source): dh-exec-useless-usage usr/lib/${DEB_HOST_MULTIARCH}/some-package/*.so [debian/install:6] +debhelper-dh-exec (source): dh-exec-useless-usage usr/lib/${DEB_HOST_MULTIARCH} [debian/install:3] +debhelper-dh-exec (source): dh-exec-useless-usage usr/lib/${DEB_HOST_MULTIARCH} /usr/lib/${DEB_HOST_MULTIARCH}/ [debian/install:4] +debhelper-dh-exec (source): dh-exec-subst-unknown-variable DEB_BUILD_WHATEVER [debian/manpages:5] +debhelper-dh-exec (source): dh-exec-script-without-dh-exec-features [debian/mime] +debhelper-dh-exec (source): dh-exec-private-helper [debian/manpages] +debhelper-dh-exec (source): dh-exec-install-not-allowed-here [debian/links] +debhelper-dh-exec (source): debian-build-system dh [debian/rules] +debhelper-dh-exec (source): debhelper-compat-virtual-relation 9 [debian/control] +debhelper-dh-exec (source): debhelper-compat-level 9 diff --git a/t/recipes/checks/debhelper/debhelper-dh-python-helpers/build-spec/debian/control.in b/t/recipes/checks/debhelper/debhelper-dh-python-helpers/build-spec/debian/control.in new file mode 100644 index 0000000..ac85906 --- /dev/null +++ b/t/recipes/checks/debhelper/debhelper-dh-python-helpers/build-spec/debian/control.in @@ -0,0 +1,31 @@ +Source: [% $source %] +Priority: optional +Section: [% $section %] +Maintainer: [% $author %] +Standards-Version: [% $standards_version %] +Build-Depends: [% $build_depends %] +Rules-Requires-Root: no + +Package: python-cheshire +Section: python +Architecture: all +Depends: ${misc:Depends}, ${python:Depends} +Description: Cheshire cheese for Python 2.X + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. + . + For Python 2.X. + +Package: python3-cheshire +Section: python +Architecture: all +Depends: ${misc:Depends}, ${python3:Depends} +Description: Cheshire cheese for Python 3.X + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. + . + For Python 3.X. diff --git a/t/recipes/checks/debhelper/debhelper-dh-python-helpers/build-spec/fill-values b/t/recipes/checks/debhelper/debhelper-dh-python-helpers/build-spec/fill-values new file mode 100644 index 0000000..e9c9c50 --- /dev/null +++ b/t/recipes/checks/debhelper/debhelper-dh-python-helpers/build-spec/fill-values @@ -0,0 +1,4 @@ +Skeleton: upload-native +Testname: debhelper-dh-python-helpers +Description: Check if helpers that substitute python:Depends and + python3:Depends are called in debian/rules diff --git a/t/recipes/checks/debhelper/debhelper-dh-python-helpers/eval/desc b/t/recipes/checks/debhelper/debhelper-dh-python-helpers/eval/desc new file mode 100644 index 0000000..3e864fb --- /dev/null +++ b/t/recipes/checks/debhelper/debhelper-dh-python-helpers/eval/desc @@ -0,0 +1,2 @@ +Testname: debhelper-dh-python-helpers +Check: debhelper diff --git a/t/recipes/checks/debhelper/debhelper-dh-python-helpers/eval/hints b/t/recipes/checks/debhelper/debhelper-dh-python-helpers/eval/hints new file mode 100644 index 0000000..e05749c --- /dev/null +++ b/t/recipes/checks/debhelper/debhelper-dh-python-helpers/eval/hints @@ -0,0 +1,5 @@ +debhelper-dh-python-helpers (source): python3-depends-but-no-python3-helper python3-cheshire +debhelper-dh-python-helpers (source): python-depends-but-no-python-helper python-cheshire +debhelper-dh-python-helpers (source): debian-build-system dh [debian/rules] +debhelper-dh-python-helpers (source): debhelper-compat-virtual-relation 13 [debian/control] +debhelper-dh-python-helpers (source): debhelper-compat-level 13 diff --git a/t/recipes/checks/debhelper/debhelper-dh-quilt-addon-but-quilt-source-format-unrel/build-spec/debian/README.source b/t/recipes/checks/debhelper/debhelper-dh-quilt-addon-but-quilt-source-format-unrel/build-spec/debian/README.source new file mode 100644 index 0000000..e69de29 diff --git a/t/recipes/checks/debhelper/debhelper-dh-quilt-addon-but-quilt-source-format-unrel/build-spec/debian/patches/series b/t/recipes/checks/debhelper/debhelper-dh-quilt-addon-but-quilt-source-format-unrel/build-spec/debian/patches/series new file mode 100644 index 0000000..e69de29 diff --git a/t/recipes/checks/debhelper/debhelper-dh-quilt-addon-but-quilt-source-format-unrel/build-spec/debian/rules b/t/recipes/checks/debhelper/debhelper-dh-quilt-addon-but-quilt-source-format-unrel/build-spec/debian/rules new file mode 100755 index 0000000..f6b359a --- /dev/null +++ b/t/recipes/checks/debhelper/debhelper-dh-quilt-addon-but-quilt-source-format-unrel/build-spec/debian/rules @@ -0,0 +1,4 @@ +#!/usr/bin/make -f + +%: + dh $@ --with quilt diff --git a/t/recipes/checks/debhelper/debhelper-dh-quilt-addon-but-quilt-source-format-unrel/build-spec/fill-values b/t/recipes/checks/debhelper/debhelper-dh-quilt-addon-but-quilt-source-format-unrel/build-spec/fill-values new file mode 100644 index 0000000..1277df5 --- /dev/null +++ b/t/recipes/checks/debhelper/debhelper-dh-quilt-addon-but-quilt-source-format-unrel/build-spec/fill-values @@ -0,0 +1,5 @@ +Skeleton: upload-native +Testname: debhelper-dh-quilt-addon-but-quilt-source-format-unrel +Source-Format: 3.0 (native) +Description: Test for quilt packages that specify dh --with-quilt (false positive) +Extra-Build-Depends: quilt diff --git a/t/recipes/checks/debhelper/debhelper-dh-quilt-addon-but-quilt-source-format-unrel/eval/desc b/t/recipes/checks/debhelper/debhelper-dh-quilt-addon-but-quilt-source-format-unrel/eval/desc new file mode 100644 index 0000000..9a49fdb --- /dev/null +++ b/t/recipes/checks/debhelper/debhelper-dh-quilt-addon-but-quilt-source-format-unrel/eval/desc @@ -0,0 +1,4 @@ +Testname: debhelper-dh-quilt-addon-but-quilt-source-format-unrel +Test-Against: + dh-quilt-addon-but-quilt-source-format +Check: debhelper diff --git a/t/recipes/checks/debhelper/debhelper-dh-quilt-addon-but-quilt-source-format-unrel/eval/hints b/t/recipes/checks/debhelper/debhelper-dh-quilt-addon-but-quilt-source-format-unrel/eval/hints new file mode 100644 index 0000000..26c00d9 --- /dev/null +++ b/t/recipes/checks/debhelper/debhelper-dh-quilt-addon-but-quilt-source-format-unrel/eval/hints @@ -0,0 +1,3 @@ +debhelper-dh-quilt-addon-but-quilt-source-format-unrel (source): debian-build-system dh [debian/rules] +debhelper-dh-quilt-addon-but-quilt-source-format-unrel (source): debhelper-compat-virtual-relation 13 [debian/control] +debhelper-dh-quilt-addon-but-quilt-source-format-unrel (source): debhelper-compat-level 13 diff --git a/t/recipes/checks/debhelper/debhelper-dh-quilt-addon-but-quilt-source-format/build-spec/debian/rules b/t/recipes/checks/debhelper/debhelper-dh-quilt-addon-but-quilt-source-format/build-spec/debian/rules new file mode 100755 index 0000000..f6b359a --- /dev/null +++ b/t/recipes/checks/debhelper/debhelper-dh-quilt-addon-but-quilt-source-format/build-spec/debian/rules @@ -0,0 +1,4 @@ +#!/usr/bin/make -f + +%: + dh $@ --with quilt diff --git a/t/recipes/checks/debhelper/debhelper-dh-quilt-addon-but-quilt-source-format/build-spec/fill-values b/t/recipes/checks/debhelper/debhelper-dh-quilt-addon-but-quilt-source-format/build-spec/fill-values new file mode 100644 index 0000000..a022ff6 --- /dev/null +++ b/t/recipes/checks/debhelper/debhelper-dh-quilt-addon-but-quilt-source-format/build-spec/fill-values @@ -0,0 +1,5 @@ +Testname: debhelper-dh-quilt-addon-but-quilt-source-format +Skeleton: upload-non-native +Source-Format: 3.0 (quilt) +Description: Test for quilt packages that specify dh --with-quilt +Extra-Build-Depends: quilt diff --git a/t/recipes/checks/debhelper/debhelper-dh-quilt-addon-but-quilt-source-format/eval/desc b/t/recipes/checks/debhelper/debhelper-dh-quilt-addon-but-quilt-source-format/eval/desc new file mode 100644 index 0000000..cd4818d --- /dev/null +++ b/t/recipes/checks/debhelper/debhelper-dh-quilt-addon-but-quilt-source-format/eval/desc @@ -0,0 +1,2 @@ +Testname: debhelper-dh-quilt-addon-but-quilt-source-format +Check: debhelper diff --git a/t/recipes/checks/debhelper/debhelper-dh-quilt-addon-but-quilt-source-format/eval/hints b/t/recipes/checks/debhelper/debhelper-dh-quilt-addon-but-quilt-source-format/eval/hints new file mode 100644 index 0000000..247de1a --- /dev/null +++ b/t/recipes/checks/debhelper/debhelper-dh-quilt-addon-but-quilt-source-format/eval/hints @@ -0,0 +1,4 @@ +debhelper-dh-quilt-addon-but-quilt-source-format (source): dh-quilt-addon-but-quilt-source-format dh ... --with quilt [debian/rules:4] +debhelper-dh-quilt-addon-but-quilt-source-format (source): debian-build-system dh [debian/rules] +debhelper-dh-quilt-addon-but-quilt-source-format (source): debhelper-compat-virtual-relation 13 [debian/control] +debhelper-dh-quilt-addon-but-quilt-source-format (source): debhelper-compat-level 13 diff --git a/t/recipes/checks/debhelper/debhelper-dh-runit-but-lacks-breaks-substvar/build-spec/debian/control.in b/t/recipes/checks/debhelper/debhelper-dh-runit-but-lacks-breaks-substvar/build-spec/debian/control.in new file mode 100644 index 0000000..07c5e61 --- /dev/null +++ b/t/recipes/checks/debhelper/debhelper-dh-runit-but-lacks-breaks-substvar/build-spec/debian/control.in @@ -0,0 +1,42 @@ +Source: [% $source %] +Priority: optional +Section: python +Maintainer: [% $author %] +Standards-Version: [% $standards_version %] +Build-Depends: [% $build_depends %], dh-runit +Rules-Requires-Root: no + +Package: [% $source %]-missing +Architecture: [% $package_architecture %] +Depends: ${misc:Depends}, runit +Description: [% $description %] (true positive) + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. + . + Missing breaks. + +Package: [% $source %]-present +Architecture: [% $package_architecture %] +Depends: ${misc:Depends}, runit +Breaks: ${runit:Breaks} +Description: [% $description %] (false positive) + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. + . + Has breaks. + +Package: [% $source %]-unrelated +Architecture: all +Depends: ${misc:Depends} +Breaks: ${runit:Breaks} +Description: [% $description %] (unrelated) + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. + . + No, breaks, but unrelated. diff --git a/t/recipes/checks/debhelper/debhelper-dh-runit-but-lacks-breaks-substvar/build-spec/debian/rules b/t/recipes/checks/debhelper/debhelper-dh-runit-but-lacks-breaks-substvar/build-spec/debian/rules new file mode 100755 index 0000000..25cfa28 --- /dev/null +++ b/t/recipes/checks/debhelper/debhelper-dh-runit-but-lacks-breaks-substvar/build-spec/debian/rules @@ -0,0 +1,11 @@ +#!/usr/bin/make -f + +%: + dh $@ --with runit + +override_dh_auto_install: + dh_auto_install + for X in $(shell dh_listpackages); do \ + mkdir -p debian/$$X/etc/sv; \ + touch debian/$$X/etc/sv/$$X; \ + done diff --git a/t/recipes/checks/debhelper/debhelper-dh-runit-but-lacks-breaks-substvar/build-spec/fill-values b/t/recipes/checks/debhelper/debhelper-dh-runit-but-lacks-breaks-substvar/build-spec/fill-values new file mode 100644 index 0000000..1fab39d --- /dev/null +++ b/t/recipes/checks/debhelper/debhelper-dh-runit-but-lacks-breaks-substvar/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: upload-native +Testname: debhelper-dh-runit-but-lacks-breaks-substvar +Description: Check Breaks requirements for dh --with dh_runit diff --git a/t/recipes/checks/debhelper/debhelper-dh-runit-but-lacks-breaks-substvar/eval/desc b/t/recipes/checks/debhelper/debhelper-dh-runit-but-lacks-breaks-substvar/eval/desc new file mode 100644 index 0000000..4865688 --- /dev/null +++ b/t/recipes/checks/debhelper/debhelper-dh-runit-but-lacks-breaks-substvar/eval/desc @@ -0,0 +1,4 @@ +Testname: debhelper-dh-runit-but-lacks-breaks-substvar +Test-Depends: + dh-runit +Check: debhelper diff --git a/t/recipes/checks/debhelper/debhelper-dh-runit-but-lacks-breaks-substvar/eval/hints b/t/recipes/checks/debhelper/debhelper-dh-runit-but-lacks-breaks-substvar/eval/hints new file mode 100644 index 0000000..8cfba49 --- /dev/null +++ b/t/recipes/checks/debhelper/debhelper-dh-runit-but-lacks-breaks-substvar/eval/hints @@ -0,0 +1,4 @@ +debhelper-dh-runit-but-lacks-breaks-substvar (source): package-uses-dh-runit-but-lacks-breaks-substvar debhelper-dh-runit-but-lacks-breaks-substvar-missing [debian/rules] +debhelper-dh-runit-but-lacks-breaks-substvar (source): debian-build-system dh [debian/rules] +debhelper-dh-runit-but-lacks-breaks-substvar (source): debhelper-compat-virtual-relation 13 [debian/control] +debhelper-dh-runit-but-lacks-breaks-substvar (source): debhelper-compat-level 13 diff --git a/t/recipes/checks/debhelper/debhelper-dh-unnecessary-arguments/build-spec/debian/rules b/t/recipes/checks/debhelper/debhelper-dh-unnecessary-arguments/build-spec/debian/rules new file mode 100755 index 0000000..eab1d8e --- /dev/null +++ b/t/recipes/checks/debhelper/debhelper-dh-unnecessary-arguments/build-spec/debian/rules @@ -0,0 +1,4 @@ +#!/usr/bin/make -f + +%: + dh $@ --parallel --with=systemd diff --git a/t/recipes/checks/debhelper/debhelper-dh-unnecessary-arguments/build-spec/fill-values b/t/recipes/checks/debhelper/debhelper-dh-unnecessary-arguments/build-spec/fill-values new file mode 100644 index 0000000..39d3387 --- /dev/null +++ b/t/recipes/checks/debhelper/debhelper-dh-unnecessary-arguments/build-spec/fill-values @@ -0,0 +1,4 @@ +Skeleton: upload-native +Testname: debhelper-dh-unnecessary-arguments +Description: Check for packages using --parallel +Dh-Compat-Level: 10 diff --git a/t/recipes/checks/debhelper/debhelper-dh-unnecessary-arguments/eval/desc b/t/recipes/checks/debhelper/debhelper-dh-unnecessary-arguments/eval/desc new file mode 100644 index 0000000..45c7c4c --- /dev/null +++ b/t/recipes/checks/debhelper/debhelper-dh-unnecessary-arguments/eval/desc @@ -0,0 +1,2 @@ +Testname: debhelper-dh-unnecessary-arguments +Check: debhelper diff --git a/t/recipes/checks/debhelper/debhelper-dh-unnecessary-arguments/eval/hints b/t/recipes/checks/debhelper/debhelper-dh-unnecessary-arguments/eval/hints new file mode 100644 index 0000000..7072200 --- /dev/null +++ b/t/recipes/checks/debhelper/debhelper-dh-unnecessary-arguments/eval/hints @@ -0,0 +1,6 @@ +debhelper-dh-unnecessary-arguments (source): package-uses-old-debhelper-compat-version 10 +debhelper-dh-unnecessary-arguments (source): debian-rules-uses-unnecessary-dh-argument dh ... --with=systemd [debian/rules:4] +debhelper-dh-unnecessary-arguments (source): debian-rules-uses-unnecessary-dh-argument dh ... --parallel [debian/rules:4] +debhelper-dh-unnecessary-arguments (source): debian-build-system dh [debian/rules] +debhelper-dh-unnecessary-arguments (source): debhelper-compat-virtual-relation 10 [debian/control] +debhelper-dh-unnecessary-arguments (source): debhelper-compat-level 10 diff --git a/t/recipes/checks/debhelper/debhelper-dh-with-python3-unrel/build-spec/debian/control.in b/t/recipes/checks/debhelper/debhelper-dh-with-python3-unrel/build-spec/debian/control.in new file mode 100644 index 0000000..c282714 --- /dev/null +++ b/t/recipes/checks/debhelper/debhelper-dh-with-python3-unrel/build-spec/debian/control.in @@ -0,0 +1,16 @@ +Source: [% $source %] +Priority: optional +Section: python +Maintainer: [% $author %] +Standards-Version: [% $standards_version %] +Build-Depends: [% $build_depends %], python3:any, dh-python +Rules-Requires-Root: no + +Package: python3-[% $source %] +Architecture: [% $package_architecture %] +Depends: ${misc:Depends} +Description: [% $description %] + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. diff --git a/t/recipes/checks/debhelper/debhelper-dh-with-python3-unrel/build-spec/debian/rules b/t/recipes/checks/debhelper/debhelper-dh-with-python3-unrel/build-spec/debian/rules new file mode 100755 index 0000000..25115de --- /dev/null +++ b/t/recipes/checks/debhelper/debhelper-dh-with-python3-unrel/build-spec/debian/rules @@ -0,0 +1,4 @@ +#!/usr/bin/make -f + +%: + dh $@ --with python3 diff --git a/t/recipes/checks/debhelper/debhelper-dh-with-python3-unrel/build-spec/fill-values b/t/recipes/checks/debhelper/debhelper-dh-with-python3-unrel/build-spec/fill-values new file mode 100644 index 0000000..5256ae1 --- /dev/null +++ b/t/recipes/checks/debhelper/debhelper-dh-with-python3-unrel/build-spec/fill-values @@ -0,0 +1,4 @@ +Skeleton: upload-native +Testname: debhelper-dh-with-python3-unrel +Description: Check dependency requirements for dh --with python3 (false positive) +Extra-Build-Depends: dh-python diff --git a/t/recipes/checks/debhelper/debhelper-dh-with-python3-unrel/eval/desc b/t/recipes/checks/debhelper/debhelper-dh-with-python3-unrel/eval/desc new file mode 100644 index 0000000..ab447df --- /dev/null +++ b/t/recipes/checks/debhelper/debhelper-dh-with-python3-unrel/eval/desc @@ -0,0 +1,4 @@ +Testname: debhelper-dh-with-python3-unrel +Test-Against: + missing-build-dependency-for-dh-addon +Check: debhelper diff --git a/t/recipes/checks/debhelper/debhelper-dh-with-python3-unrel/eval/hints b/t/recipes/checks/debhelper/debhelper-dh-with-python3-unrel/eval/hints new file mode 100644 index 0000000..d01c62f --- /dev/null +++ b/t/recipes/checks/debhelper/debhelper-dh-with-python3-unrel/eval/hints @@ -0,0 +1,3 @@ +debhelper-dh-with-python3-unrel (source): debian-build-system dh [debian/rules] +debhelper-dh-with-python3-unrel (source): debhelper-compat-virtual-relation 13 [debian/control] +debhelper-dh-with-python3-unrel (source): debhelper-compat-level 13 diff --git a/t/recipes/checks/debhelper/debhelper-dh-with-python3-unrel2/build-spec/debian/control.in b/t/recipes/checks/debhelper/debhelper-dh-with-python3-unrel2/build-spec/debian/control.in new file mode 100644 index 0000000..e0f5096 --- /dev/null +++ b/t/recipes/checks/debhelper/debhelper-dh-with-python3-unrel2/build-spec/debian/control.in @@ -0,0 +1,16 @@ +Source: [% $source %] +Priority: optional +Section: python +Maintainer: [% $author %] +Standards-Version: [% $standards_version %] +Build-Depends: [% $build_depends %], python3-all-dev:any +Rules-Requires-Root: no + +Package: python3-[% $source %] +Architecture: [% $package_architecture %] +Depends: ${misc:Depends} +Description: [% $description %] + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. diff --git a/t/recipes/checks/debhelper/debhelper-dh-with-python3-unrel2/build-spec/debian/rules b/t/recipes/checks/debhelper/debhelper-dh-with-python3-unrel2/build-spec/debian/rules new file mode 100755 index 0000000..25115de --- /dev/null +++ b/t/recipes/checks/debhelper/debhelper-dh-with-python3-unrel2/build-spec/debian/rules @@ -0,0 +1,4 @@ +#!/usr/bin/make -f + +%: + dh $@ --with python3 diff --git a/t/recipes/checks/debhelper/debhelper-dh-with-python3-unrel2/build-spec/fill-values b/t/recipes/checks/debhelper/debhelper-dh-with-python3-unrel2/build-spec/fill-values new file mode 100644 index 0000000..48d35a2 --- /dev/null +++ b/t/recipes/checks/debhelper/debhelper-dh-with-python3-unrel2/build-spec/fill-values @@ -0,0 +1,5 @@ +Skeleton: upload-native +Testname: debhelper-dh-with-python3-unrel2 +Description: Check dependency requirements for dh --with python3 (false positive) +Package-Architecture: any +Extra-Build-Depends: dh-python diff --git a/t/recipes/checks/debhelper/debhelper-dh-with-python3-unrel2/eval/desc b/t/recipes/checks/debhelper/debhelper-dh-with-python3-unrel2/eval/desc new file mode 100644 index 0000000..f811b92 --- /dev/null +++ b/t/recipes/checks/debhelper/debhelper-dh-with-python3-unrel2/eval/desc @@ -0,0 +1,4 @@ +Testname: debhelper-dh-with-python3-unrel2 +Test-Against: + missing-build-dependency-for-dh-addon +Check: debhelper diff --git a/t/recipes/checks/debhelper/debhelper-dh-with-python3-unrel2/eval/hints b/t/recipes/checks/debhelper/debhelper-dh-with-python3-unrel2/eval/hints new file mode 100644 index 0000000..eb8213b --- /dev/null +++ b/t/recipes/checks/debhelper/debhelper-dh-with-python3-unrel2/eval/hints @@ -0,0 +1,3 @@ +debhelper-dh-with-python3-unrel2 (source): debian-build-system dh [debian/rules] +debhelper-dh-with-python3-unrel2 (source): debhelper-compat-virtual-relation 13 [debian/control] +debhelper-dh-with-python3-unrel2 (source): debhelper-compat-level 13 diff --git a/t/recipes/checks/debhelper/debhelper-dh-with-python3/build-spec/debian/control.in b/t/recipes/checks/debhelper/debhelper-dh-with-python3/build-spec/debian/control.in new file mode 100644 index 0000000..faccb15 --- /dev/null +++ b/t/recipes/checks/debhelper/debhelper-dh-with-python3/build-spec/debian/control.in @@ -0,0 +1,16 @@ +Source: [% $source %] +Priority: optional +Section: python +Maintainer: [% $author %] +Standards-Version: [% $standards_version %] +Build-Depends: [% $build_depends %], python3:any +Rules-Requires-Root: no + +Package: python3-[% $source %] +Architecture: [% $package_architecture %] +Depends: ${misc:Depends} +Description: [% $description %] + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. diff --git a/t/recipes/checks/debhelper/debhelper-dh-with-python3/build-spec/debian/rules b/t/recipes/checks/debhelper/debhelper-dh-with-python3/build-spec/debian/rules new file mode 100755 index 0000000..25115de --- /dev/null +++ b/t/recipes/checks/debhelper/debhelper-dh-with-python3/build-spec/debian/rules @@ -0,0 +1,4 @@ +#!/usr/bin/make -f + +%: + dh $@ --with python3 diff --git a/t/recipes/checks/debhelper/debhelper-dh-with-python3/build-spec/fill-values b/t/recipes/checks/debhelper/debhelper-dh-with-python3/build-spec/fill-values new file mode 100644 index 0000000..ca25049 --- /dev/null +++ b/t/recipes/checks/debhelper/debhelper-dh-with-python3/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: upload-native +Testname: debhelper-dh-with-python3 +Description: Check dependency requirements for dh --with python3 diff --git a/t/recipes/checks/debhelper/debhelper-dh-with-python3/eval/desc b/t/recipes/checks/debhelper/debhelper-dh-with-python3/eval/desc new file mode 100644 index 0000000..a063815 --- /dev/null +++ b/t/recipes/checks/debhelper/debhelper-dh-with-python3/eval/desc @@ -0,0 +1,3 @@ +Testname: debhelper-dh-with-python3 +Test-Depends: dh-python +Check: debhelper diff --git a/t/recipes/checks/debhelper/debhelper-dh-with-python3/eval/hints b/t/recipes/checks/debhelper/debhelper-dh-with-python3/eval/hints new file mode 100644 index 0000000..5b0d68b --- /dev/null +++ b/t/recipes/checks/debhelper/debhelper-dh-with-python3/eval/hints @@ -0,0 +1,4 @@ +debhelper-dh-with-python3 (source): missing-build-dependency-for-dh-addon python3 (does not satisfy dh-python:any | pybuild-plugin-pyproject:any) [debian/rules] +debhelper-dh-with-python3 (source): debian-build-system dh [debian/rules] +debhelper-dh-with-python3 (source): debhelper-compat-virtual-relation 13 [debian/control] +debhelper-dh-with-python3 (source): debhelper-compat-level 13 diff --git a/t/recipes/checks/debhelper/debhelper-dh-with-quilt/build-spec/debian/rules b/t/recipes/checks/debhelper/debhelper-dh-with-quilt/build-spec/debian/rules new file mode 100755 index 0000000..931d500 --- /dev/null +++ b/t/recipes/checks/debhelper/debhelper-dh-with-quilt/build-spec/debian/rules @@ -0,0 +1,3 @@ +#!/usr/bin/make -f +%: + dh $@ --with quilt diff --git a/t/recipes/checks/debhelper/debhelper-dh-with-quilt/build-spec/fill-values b/t/recipes/checks/debhelper/debhelper-dh-with-quilt/build-spec/fill-values new file mode 100644 index 0000000..9edcc4c --- /dev/null +++ b/t/recipes/checks/debhelper/debhelper-dh-with-quilt/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: upload-native +Testname: debhelper-dh-with-quilt +Description: Check dependency requirements for dh --with quilt diff --git a/t/recipes/checks/debhelper/debhelper-dh-with-quilt/eval/desc b/t/recipes/checks/debhelper/debhelper-dh-with-quilt/eval/desc new file mode 100644 index 0000000..3d1a8df --- /dev/null +++ b/t/recipes/checks/debhelper/debhelper-dh-with-quilt/eval/desc @@ -0,0 +1,3 @@ +Testname: debhelper-dh-with-quilt +Test-Depends: quilt +Check: debhelper diff --git a/t/recipes/checks/debhelper/debhelper-dh-with-quilt/eval/hints b/t/recipes/checks/debhelper/debhelper-dh-with-quilt/eval/hints new file mode 100644 index 0000000..a485a90 --- /dev/null +++ b/t/recipes/checks/debhelper/debhelper-dh-with-quilt/eval/hints @@ -0,0 +1,4 @@ +debhelper-dh-with-quilt (source): missing-build-dependency-for-dh-addon quilt (does not satisfy quilt:any) [debian/rules] +debhelper-dh-with-quilt (source): debian-build-system dh [debian/rules] +debhelper-dh-with-quilt (source): debhelper-compat-virtual-relation 13 [debian/control] +debhelper-dh-with-quilt (source): debhelper-compat-level 13 diff --git a/t/recipes/checks/debhelper/debhelper-excessive-overrides/build-spec/debian/rules b/t/recipes/checks/debhelper/debhelper-excessive-overrides/build-spec/debian/rules new file mode 100755 index 0000000..f94035a --- /dev/null +++ b/t/recipes/checks/debhelper/debhelper-excessive-overrides/build-spec/debian/rules @@ -0,0 +1,14 @@ +#!/usr/bin/make -f + +%: + dh $@ + +# Commands not to run +override_dh_installcatalogs: +override_dh_installemacsen override_dh_installifupdown: +override_dh_installinfo override_dh_installmenu override_dh_installmime: +override_dh_installmodules override_dh_installlogcheck: +override_dh_installpam override_dh_installppp override_dh_installudev override_dh_installwm: +override_dh_installxfonts override_dh_gconf override_dh_icons override_dh_perl override_dh_usrlocal: +override_dh_installcron override_dh_installdebconf: +override_dh_installlogrotate override_dh_installgsettings: diff --git a/t/recipes/checks/debhelper/debhelper-excessive-overrides/build-spec/fill-values b/t/recipes/checks/debhelper/debhelper-excessive-overrides/build-spec/fill-values new file mode 100644 index 0000000..41b2921 --- /dev/null +++ b/t/recipes/checks/debhelper/debhelper-excessive-overrides/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: upload-native +Testname: debhelper-excessive-overrides +Description: Test for excessive number of overrides diff --git a/t/recipes/checks/debhelper/debhelper-excessive-overrides/eval/desc b/t/recipes/checks/debhelper/debhelper-excessive-overrides/eval/desc new file mode 100644 index 0000000..155d13a --- /dev/null +++ b/t/recipes/checks/debhelper/debhelper-excessive-overrides/eval/desc @@ -0,0 +1,2 @@ +Testname: debhelper-excessive-overrides +Check: debhelper diff --git a/t/recipes/checks/debhelper/debhelper-excessive-overrides/eval/hints b/t/recipes/checks/debhelper/debhelper-excessive-overrides/eval/hints new file mode 100644 index 0000000..5cce06e --- /dev/null +++ b/t/recipes/checks/debhelper/debhelper-excessive-overrides/eval/hints @@ -0,0 +1,5 @@ +debhelper-excessive-overrides (source): typo-in-debhelper-override-target override_dh_gconf => override_dh_icons [debian/rules:12] +debhelper-excessive-overrides (source): excessive-debhelper-overrides 21 +debhelper-excessive-overrides (source): debian-build-system dh [debian/rules] +debhelper-excessive-overrides (source): debhelper-compat-virtual-relation 13 [debian/control] +debhelper-excessive-overrides (source): debhelper-compat-level 13 diff --git a/t/recipes/checks/debhelper/debhelper-executable-files-compat-9/build-spec/debian/docs b/t/recipes/checks/debhelper/debhelper-executable-files-compat-9/build-spec/debian/docs new file mode 100755 index 0000000..438f2fd --- /dev/null +++ b/t/recipes/checks/debhelper/debhelper-executable-files-compat-9/build-spec/debian/docs @@ -0,0 +1,2 @@ +#! /bin/sh +# This is acceptable (though useless) diff --git a/t/recipes/checks/debhelper/debhelper-executable-files-compat-9/build-spec/debian/manpages b/t/recipes/checks/debhelper/debhelper-executable-files-compat-9/build-spec/debian/manpages new file mode 100755 index 0000000..094e005 --- /dev/null +++ b/t/recipes/checks/debhelper/debhelper-executable-files-compat-9/build-spec/debian/manpages @@ -0,0 +1,2 @@ +# /o\ this is bad... + diff --git a/t/recipes/checks/debhelper/debhelper-executable-files-compat-9/build-spec/debian/rules b/t/recipes/checks/debhelper/debhelper-executable-files-compat-9/build-spec/debian/rules new file mode 100755 index 0000000..44e34f9 --- /dev/null +++ b/t/recipes/checks/debhelper/debhelper-executable-files-compat-9/build-spec/debian/rules @@ -0,0 +1,6 @@ +#!/usr/bin/make -f + +%: + dh $@ + +override_dh_installman: diff --git a/t/recipes/checks/debhelper/debhelper-executable-files-compat-9/build-spec/fill-values b/t/recipes/checks/debhelper/debhelper-executable-files-compat-9/build-spec/fill-values new file mode 100644 index 0000000..b8831df --- /dev/null +++ b/t/recipes/checks/debhelper/debhelper-executable-files-compat-9/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: upload-native +Testname: debhelper-executable-files-compat-9 +Description: Tests related to executable packaging files diff --git a/t/recipes/checks/debhelper/debhelper-executable-files-compat-9/eval/desc b/t/recipes/checks/debhelper/debhelper-executable-files-compat-9/eval/desc new file mode 100644 index 0000000..ef29e99 --- /dev/null +++ b/t/recipes/checks/debhelper/debhelper-executable-files-compat-9/eval/desc @@ -0,0 +1,4 @@ +Testname: debhelper-executable-files-compat-9 +Options: --suppress-tags + no-versioned-debhelper-prerequisite +Check: debhelper diff --git a/t/recipes/checks/debhelper/debhelper-executable-files-compat-9/eval/hints b/t/recipes/checks/debhelper/debhelper-executable-files-compat-9/eval/hints new file mode 100644 index 0000000..190fbce --- /dev/null +++ b/t/recipes/checks/debhelper/debhelper-executable-files-compat-9/eval/hints @@ -0,0 +1,4 @@ +debhelper-executable-files-compat-9 (source): executable-debhelper-file-without-being-executable [debian/manpages] +debhelper-executable-files-compat-9 (source): debian-build-system dh [debian/rules] +debhelper-executable-files-compat-9 (source): debhelper-compat-virtual-relation 13 [debian/control] +debhelper-executable-files-compat-9 (source): debhelper-compat-level 13 diff --git a/t/recipes/checks/debhelper/debhelper-executable-files/build-spec/debian/compat.in b/t/recipes/checks/debhelper/debhelper-executable-files/build-spec/debian/compat.in new file mode 100644 index 0000000..640a566 --- /dev/null +++ b/t/recipes/checks/debhelper/debhelper-executable-files/build-spec/debian/compat.in @@ -0,0 +1 @@ +[% $dh_compat_level %] diff --git a/t/recipes/checks/debhelper/debhelper-executable-files/build-spec/debian/manpages b/t/recipes/checks/debhelper/debhelper-executable-files/build-spec/debian/manpages new file mode 100755 index 0000000..1a24852 --- /dev/null +++ b/t/recipes/checks/debhelper/debhelper-executable-files/build-spec/debian/manpages @@ -0,0 +1 @@ +#!/bin/sh diff --git a/t/recipes/checks/debhelper/debhelper-executable-files/build-spec/fill-values b/t/recipes/checks/debhelper/debhelper-executable-files/build-spec/fill-values new file mode 100644 index 0000000..8c619b1 --- /dev/null +++ b/t/recipes/checks/debhelper/debhelper-executable-files/build-spec/fill-values @@ -0,0 +1,5 @@ +Skeleton: upload-native +Testname: debhelper-executable-files +Dh-Compat-Level: 8 +Description: Tests related to executable packaging files +Default-Build-Depends: debhelper (>= [% $dh_compat_level %]~) diff --git a/t/recipes/checks/debhelper/debhelper-executable-files/build-spec/pre-build b/t/recipes/checks/debhelper/debhelper-executable-files/build-spec/pre-build new file mode 100755 index 0000000..0bb1b9a --- /dev/null +++ b/t/recipes/checks/debhelper/debhelper-executable-files/build-spec/pre-build @@ -0,0 +1,8 @@ +#!/bin/sh + +DIR="$1" + +for FILE in control copyright changelog ; do + chmod +x "$DIR/debian/$FILE" +done + diff --git a/t/recipes/checks/debhelper/debhelper-executable-files/eval/desc b/t/recipes/checks/debhelper/debhelper-executable-files/eval/desc new file mode 100644 index 0000000..ee5dcbc --- /dev/null +++ b/t/recipes/checks/debhelper/debhelper-executable-files/eval/desc @@ -0,0 +1,2 @@ +Testname: debhelper-executable-files +Check: debhelper diff --git a/t/recipes/checks/debhelper/debhelper-executable-files/eval/hints b/t/recipes/checks/debhelper/debhelper-executable-files/eval/hints new file mode 100644 index 0000000..0e2cfcc --- /dev/null +++ b/t/recipes/checks/debhelper/debhelper-executable-files/eval/hints @@ -0,0 +1,7 @@ +debhelper-executable-files (source): package-uses-deprecated-debhelper-compat-version 8 +debhelper-executable-files (source): package-file-is-executable [debian/manpages] +debhelper-executable-files (source): package-file-is-executable [debian/copyright] +debhelper-executable-files (source): package-file-is-executable [debian/control] +debhelper-executable-files (source): package-file-is-executable [debian/changelog] +debhelper-executable-files (source): debian-build-system dh [debian/rules] +debhelper-executable-files (source): debhelper-compat-level 8 diff --git a/t/recipes/checks/debhelper/debhelper-lacks-versioned-deps/build-spec/debian/compat.in b/t/recipes/checks/debhelper/debhelper-lacks-versioned-deps/build-spec/debian/compat.in new file mode 100644 index 0000000..640a566 --- /dev/null +++ b/t/recipes/checks/debhelper/debhelper-lacks-versioned-deps/build-spec/debian/compat.in @@ -0,0 +1 @@ +[% $dh_compat_level %] diff --git a/t/recipes/checks/debhelper/debhelper-lacks-versioned-deps/build-spec/debian/control.in b/t/recipes/checks/debhelper/debhelper-lacks-versioned-deps/build-spec/debian/control.in new file mode 100644 index 0000000..67d485e --- /dev/null +++ b/t/recipes/checks/debhelper/debhelper-lacks-versioned-deps/build-spec/debian/control.in @@ -0,0 +1,16 @@ +Source: [% $source %] +Priority: optional +Section: [% $section %] +Maintainer: [% $author %] +Standards-Version: [% $standards_version %] +Build-Depends: debhelper +Rules-Requires-Root: no + +Package: [% $source %] +Architecture: [% $package_architecture %] +Depends: ${misc:Depends} +Description: [% $description %] + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. diff --git a/t/recipes/checks/debhelper/debhelper-lacks-versioned-deps/build-spec/fill-values b/t/recipes/checks/debhelper/debhelper-lacks-versioned-deps/build-spec/fill-values new file mode 100644 index 0000000..438c83e --- /dev/null +++ b/t/recipes/checks/debhelper/debhelper-lacks-versioned-deps/build-spec/fill-values @@ -0,0 +1,4 @@ +Skeleton: upload-native +Testname: debhelper-lacks-versioned-deps +Dh-Compat-Level: 9 +Description: Test pedantic dependency requirements for debhelper diff --git a/t/recipes/checks/debhelper/debhelper-lacks-versioned-deps/eval/desc b/t/recipes/checks/debhelper/debhelper-lacks-versioned-deps/eval/desc new file mode 100644 index 0000000..6daef01 --- /dev/null +++ b/t/recipes/checks/debhelper/debhelper-lacks-versioned-deps/eval/desc @@ -0,0 +1,2 @@ +Testname: debhelper-lacks-versioned-deps +Check: debhelper diff --git a/t/recipes/checks/debhelper/debhelper-lacks-versioned-deps/eval/hints b/t/recipes/checks/debhelper/debhelper-lacks-versioned-deps/eval/hints new file mode 100644 index 0000000..a300c5e --- /dev/null +++ b/t/recipes/checks/debhelper/debhelper-lacks-versioned-deps/eval/hints @@ -0,0 +1,4 @@ +debhelper-lacks-versioned-deps (source): package-uses-deprecated-debhelper-compat-version 9 +debhelper-lacks-versioned-deps (source): no-versioned-debhelper-prerequisite 9 +debhelper-lacks-versioned-deps (source): debian-build-system dh [debian/rules] +debhelper-lacks-versioned-deps (source): debhelper-compat-level 9 diff --git a/t/recipes/checks/debhelper/debhelper-misc-depends-fp/build-spec/debian/control.in b/t/recipes/checks/debhelper/debhelper-misc-depends-fp/build-spec/debian/control.in new file mode 100644 index 0000000..4cb60a7 --- /dev/null +++ b/t/recipes/checks/debhelper/debhelper-misc-depends-fp/build-spec/debian/control.in @@ -0,0 +1,16 @@ +Source: [% $source %] +Priority: optional +Section: [% $section %] +Maintainer: [% $author %] +Standards-Version: [% $standards_version %] +Build-Depends: [% $build_depends %] +Rules-Requires-Root: no + +Package: [% $source %] +Architecture: [% $package_architecture %] +Depends:${misc:Depends}, ${shlibs:Depends} +Description: [% $description %] + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. diff --git a/t/recipes/checks/debhelper/debhelper-misc-depends-fp/build-spec/fill-values b/t/recipes/checks/debhelper/debhelper-misc-depends-fp/build-spec/fill-values new file mode 100644 index 0000000..fa932fc --- /dev/null +++ b/t/recipes/checks/debhelper/debhelper-misc-depends-fp/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: upload-native +Testname: debhelper-misc-depends-fp +Description: Test against missing reading the Depends field diff --git a/t/recipes/checks/debhelper/debhelper-misc-depends-fp/eval/desc b/t/recipes/checks/debhelper/debhelper-misc-depends-fp/eval/desc new file mode 100644 index 0000000..d573b79 --- /dev/null +++ b/t/recipes/checks/debhelper/debhelper-misc-depends-fp/eval/desc @@ -0,0 +1,3 @@ +Testname: debhelper-misc-depends-fp +Test-Against: debhelper-but-no-misc-depends +Check: debhelper diff --git a/t/recipes/checks/debhelper/debhelper-misc-depends-fp/eval/hints b/t/recipes/checks/debhelper/debhelper-misc-depends-fp/eval/hints new file mode 100644 index 0000000..1ece69c --- /dev/null +++ b/t/recipes/checks/debhelper/debhelper-misc-depends-fp/eval/hints @@ -0,0 +1,3 @@ +debhelper-misc-depends-fp (source): debian-build-system dh [debian/rules] +debhelper-misc-depends-fp (source): debhelper-compat-virtual-relation 13 [debian/control] +debhelper-misc-depends-fp (source): debhelper-compat-level 13 diff --git a/t/recipes/checks/debhelper/debhelper-no-depends/build-spec/debian/compat.in b/t/recipes/checks/debhelper/debhelper-no-depends/build-spec/debian/compat.in new file mode 100644 index 0000000..640a566 --- /dev/null +++ b/t/recipes/checks/debhelper/debhelper-no-depends/build-spec/debian/compat.in @@ -0,0 +1 @@ +[% $dh_compat_level %] diff --git a/t/recipes/checks/debhelper/debhelper-no-depends/build-spec/debian/control.in b/t/recipes/checks/debhelper/debhelper-no-depends/build-spec/debian/control.in new file mode 100644 index 0000000..6a7a04d --- /dev/null +++ b/t/recipes/checks/debhelper/debhelper-no-depends/build-spec/debian/control.in @@ -0,0 +1,33 @@ +Source: [% $source %] +Priority: optional +Section: [% $section %] +Maintainer: [% $author %] +Standards-Version: [% $standards_version %] +Rules-Requires-Root: no + +Package: [% $source %] +Architecture: [% $package_architecture %] +Description: [% $description %] + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. + +Package: debhelper-pre-depends +Architecture: [% $package_architecture %] +Pre-Depends: ${misc:Depends} +Description: [% $description %] extra string + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. Extra + string to not to trigger duplicated description tags. It may + be an empty package. + +Package: debhelper-suggests +Architecture: [% $package_architecture %] +Suggests: ${misc:Depends} +Description: [% $description %] another extra string + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. Extra + string. It may be an empty package. diff --git a/t/recipes/checks/debhelper/debhelper-no-depends/build-spec/debian/rules b/t/recipes/checks/debhelper/debhelper-no-depends/build-spec/debian/rules new file mode 100755 index 0000000..a622013 --- /dev/null +++ b/t/recipes/checks/debhelper/debhelper-no-depends/build-spec/debian/rules @@ -0,0 +1,24 @@ +#!/usr/bin/make -f +%: + dh $@ + +binary: binary-arch binary-indep +binary-arch: +binary-indep: + -dh_clideps + -dh_gstscancodecs + dh_lisp || true + # Should trigger a versioned dependency requirement for dpatch + -dh_dpatch_patch +# We don't warn about commands inside make conditionals, so none of these +# get any warnings. +ifeq "$(USE_DH_PYTHON3)" "y" + dh_python3 +else + ifeq "$(USE_PYSUPPORT)" "y" + dh_pysupport + endif +endif + dh binary-indep + -dh_strip_nondeterminism + -dh_scour diff --git a/t/recipes/checks/debhelper/debhelper-no-depends/build-spec/fill-values b/t/recipes/checks/debhelper/debhelper-no-depends/build-spec/fill-values new file mode 100644 index 0000000..7857128 --- /dev/null +++ b/t/recipes/checks/debhelper/debhelper-no-depends/build-spec/fill-values @@ -0,0 +1,5 @@ +Skeleton: upload-native +Testname: debhelper-no-depends +Dh-Compat-Level: 9 +Description: Test dependency requirements for debhelper +# Overrides the "data/debhelper/compat-level" diff --git a/t/recipes/checks/debhelper/debhelper-no-depends/eval/desc b/t/recipes/checks/debhelper/debhelper-no-depends/eval/desc new file mode 100644 index 0000000..b6b85c4 --- /dev/null +++ b/t/recipes/checks/debhelper/debhelper-no-depends/eval/desc @@ -0,0 +1,5 @@ +Testname: debhelper-no-depends +Profile: lintian-test +Options: --include-dir ./lintian-include-dir +Check: debhelper +# Overrides the "data/debhelper/compat-level" diff --git a/t/recipes/checks/debhelper/debhelper-no-depends/eval/hints b/t/recipes/checks/debhelper/debhelper-no-depends/eval/hints new file mode 100644 index 0000000..4beaf2d --- /dev/null +++ b/t/recipes/checks/debhelper/debhelper-no-depends/eval/hints @@ -0,0 +1,12 @@ +debhelper-no-depends (source): weak-dependency-on-misc-depends debhelper-suggests +debhelper-no-depends (source): package-uses-deprecated-debhelper-compat-version 9 +debhelper-no-depends (source): package-uses-debhelper-but-lacks-build-depends [debian/rules] +debhelper-no-depends (source): no-versioned-debhelper-prerequisite 9 +debhelper-no-depends (source): missing-build-dependency-for-dh_-command dh_strip_nondeterminism (does not satisfy dh-strip-nondeterminism:any) [debian/rules] +debhelper-no-depends (source): missing-build-dependency-for-dh_-command dh_scour (does not satisfy scour:any) [debian/rules] +debhelper-no-depends (source): missing-build-dependency-for-dh_-command dh_lisp (does not satisfy dh-lisp:any) [debian/rules] +debhelper-no-depends (source): missing-build-dependency-for-dh_-command dh_gstscancodecs (does not satisfy libgstreamer1.0-dev:any) [debian/rules] +debhelper-no-depends (source): missing-build-dependency-for-dh_-command dh_clideps (does not satisfy cli-common-dev:any) [debian/rules] +debhelper-no-depends (source): debian-build-system dh [debian/rules] +debhelper-no-depends (source): debhelper-compat-level 9 +debhelper-no-depends (source): debhelper-but-no-misc-depends debhelper-no-depends diff --git a/t/recipes/checks/debhelper/debhelper-no-depends/eval/lintian-include-dir/profiles/lintian-test/main.profile b/t/recipes/checks/debhelper/debhelper-no-depends/eval/lintian-include-dir/profiles/lintian-test/main.profile new file mode 100644 index 0000000..f0e27cf --- /dev/null +++ b/t/recipes/checks/debhelper/debhelper-no-depends/eval/lintian-include-dir/profiles/lintian-test/main.profile @@ -0,0 +1,2 @@ +Profile: lintian-test/main +Extends: debian/main diff --git a/t/recipes/checks/debhelper/debhelper-no-depends/eval/lintian-include-dir/vendors/lintian-test/main/data/debhelper/compat-level b/t/recipes/checks/debhelper/debhelper-no-depends/eval/lintian-include-dir/vendors/lintian-test/main/data/debhelper/compat-level new file mode 100644 index 0000000..67c590a --- /dev/null +++ b/t/recipes/checks/debhelper/debhelper-no-depends/eval/lintian-include-dir/vendors/lintian-test/main/data/debhelper/compat-level @@ -0,0 +1,2 @@ +@include-parent +pedantic=8 diff --git a/t/recipes/checks/debhelper/debhelper-override-typos/build-spec/debian/rules b/t/recipes/checks/debhelper/debhelper-override-typos/build-spec/debian/rules new file mode 100755 index 0000000..6787305 --- /dev/null +++ b/t/recipes/checks/debhelper/debhelper-override-typos/build-spec/debian/rules @@ -0,0 +1,43 @@ +#!/usr/bin/make -f + +%: + dh $@ + +# Bad +override_dh_nump: # Multiple matches should emit only one tag +override_dh_instakk: + override_dh_installcrons: +override_dh_install_examples: +override_dh_install_changelogs : # Extra space +override_dh_perls override_dh_python3 : # Bad then good +override_dh_python3 override_dh_perls : # Good then bad +override_dh_instakk override_dh_install_examples : # Both broken, with space +foo override_dh_installdebs bar override_dh_installxmlcatalog: # combining regular and overrides + +# Don't worry about anything beyond a colon even if wrong; it will fail anyway. +override_dh_testdirs: override_dh_ucfs + +# Specifically check for missing "auto" ("dh_override_auto_build" has a +# distance of "5" to "dh_override_build") +override_dh_build: + +# Missing space +override dh_install: + +execute_after_dh_nope: +execute_before_dh_nope: + +# Good +.PHONY: override_dh_ucfs +override_dh_install: +override_dh_install : + override_dh_install: # +prefix_override_dh_gconfs: +override_dh_will_never_exist: +override_dh_python3 override_dh_perl : +override_dh_auto_configure-% override_dh_auto_install-%: +foo override_dh_installdeb bar override_dh_installxmlcatalogs: # combining regular and overrides +override_dh_install: $(PY3VERS:%=install-python%) +# override_dh_instal: would be a typo, but in a comment it doesn't matter +execute_after_dh_install: +execute_before_dh_install: diff --git a/t/recipes/checks/debhelper/debhelper-override-typos/build-spec/fill-values b/t/recipes/checks/debhelper/debhelper-override-typos/build-spec/fill-values new file mode 100644 index 0000000..1b2ed96 --- /dev/null +++ b/t/recipes/checks/debhelper/debhelper-override-typos/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: upload-native +Testname: debhelper-override-typos +Description: Test for typos in override targets diff --git a/t/recipes/checks/debhelper/debhelper-override-typos/eval/desc b/t/recipes/checks/debhelper/debhelper-override-typos/eval/desc new file mode 100644 index 0000000..4759fe7 --- /dev/null +++ b/t/recipes/checks/debhelper/debhelper-override-typos/eval/desc @@ -0,0 +1,2 @@ +Testname: debhelper-override-typos +Check: debhelper diff --git a/t/recipes/checks/debhelper/debhelper-override-typos/eval/hints b/t/recipes/checks/debhelper/debhelper-override-typos/eval/hints new file mode 100644 index 0000000..9d2ec32 --- /dev/null +++ b/t/recipes/checks/debhelper/debhelper-override-typos/eval/hints @@ -0,0 +1,19 @@ +debhelper-override-typos (source): typo-in-debhelper-override-target override_dh_testdirs => override_dh_testdir [debian/rules:18] +debhelper-override-typos (source): typo-in-debhelper-override-target override_dh_perls => override_dh_perl [debian/rules:13] +debhelper-override-typos (source): typo-in-debhelper-override-target override_dh_perls => override_dh_perl [debian/rules:12] +debhelper-override-typos (source): typo-in-debhelper-override-target override_dh_nump => override_dh_numpy3 [debian/rules:7] +debhelper-override-typos (source): typo-in-debhelper-override-target override_dh_installxmlcatalog => override_dh_installxmlcatalogs [debian/rules:15] +debhelper-override-typos (source): typo-in-debhelper-override-target override_dh_installdebs => override_dh_installdeb [debian/rules:15] +debhelper-override-typos (source): typo-in-debhelper-override-target override_dh_installcrons => override_dh_installcron [debian/rules:9] +debhelper-override-typos (source): typo-in-debhelper-override-target override_dh_install_examples => override_dh_installexamples [debian/rules:14] +debhelper-override-typos (source): typo-in-debhelper-override-target override_dh_install_examples => override_dh_installexamples [debian/rules:10] +debhelper-override-typos (source): typo-in-debhelper-override-target override_dh_install_changelogs => override_dh_installchangelogs [debian/rules:11] +debhelper-override-typos (source): typo-in-debhelper-override-target override_dh_instakk => override_dh_install [debian/rules:8] +debhelper-override-typos (source): typo-in-debhelper-override-target override_dh_instakk => override_dh_install [debian/rules:14] +debhelper-override-typos (source): typo-in-debhelper-override-target override_dh_build => override_dh_auto_build [debian/rules:22] +debhelper-override-typos (source): typo-in-debhelper-override-target override dh_install => override_dh_install [debian/rules:25] +debhelper-override-typos (source): typo-in-debhelper-override-target execute_before_dh_nope => execute_before_dh_gnome [debian/rules:28] +debhelper-override-typos (source): typo-in-debhelper-override-target execute_after_dh_nope => execute_after_dh_gnome [debian/rules:27] +debhelper-override-typos (source): debian-build-system dh [debian/rules] +debhelper-override-typos (source): debhelper-compat-virtual-relation 13 [debian/control] +debhelper-override-typos (source): debhelper-compat-level 13 diff --git a/t/recipes/checks/debhelper/debhelper-package-does-not-use-debhelper-or-cdbs/build-spec/debian/control.in b/t/recipes/checks/debhelper/debhelper-package-does-not-use-debhelper-or-cdbs/build-spec/debian/control.in new file mode 100644 index 0000000..19bc99a --- /dev/null +++ b/t/recipes/checks/debhelper/debhelper-package-does-not-use-debhelper-or-cdbs/build-spec/debian/control.in @@ -0,0 +1,14 @@ +Source: [% $source %] +Priority: optional +Section: [% $section %] +Maintainer: [% $author %] +Standards-Version: [% $standards_version %] +Build-Depends: [% $build_depends %] +Rules-Requires-Root: binary-targets + +Package: [% $source %] +Architecture: [% $package_architecture %] +Description: [% $description %] + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. diff --git a/t/recipes/checks/debhelper/debhelper-package-does-not-use-debhelper-or-cdbs/build-spec/debian/rules b/t/recipes/checks/debhelper/debhelper-package-does-not-use-debhelper-or-cdbs/build-spec/debian/rules new file mode 100755 index 0000000..df647f8 --- /dev/null +++ b/t/recipes/checks/debhelper/debhelper-package-does-not-use-debhelper-or-cdbs/build-spec/debian/rules @@ -0,0 +1,23 @@ +#!/usr/bin/make -f + +PKG = debhelper-package-does-not-use-debhelper-or-cdbs +DOCS = debian/tmp/usr/share/doc/$(PKG) + +clean: + rm -rf debian/tmp + +build: + +binary: + install -d debian/tmp/DEBIAN $(DOCS) + install -m 0644 -t $(DOCS) debian/copyright debian/changelog + gzip -9n $(DOCS)/changelog + cd debian/tmp && \ + find * -type f ! -regex "DEBIAN/.*" -print0 | \ + LC_ALL=C sort -z | xargs -0r md5sum > DEBIAN/md5sums + chown -R 0:0 debian/tmp + chmod -R u+w,go=rX debian/tmp + dpkg-gencontrol + dpkg --build debian/tmp .. + +.PHONY: binary binary-arch binary-indep build-arch build-indep clean diff --git a/t/recipes/checks/debhelper/debhelper-package-does-not-use-debhelper-or-cdbs/build-spec/fill-values b/t/recipes/checks/debhelper/debhelper-package-does-not-use-debhelper-or-cdbs/build-spec/fill-values new file mode 100644 index 0000000..6b83677 --- /dev/null +++ b/t/recipes/checks/debhelper/debhelper-package-does-not-use-debhelper-or-cdbs/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: upload-native +Testname: debhelper-package-does-not-use-debhelper-or-cdbs +Description: Test for packages not using debhelper or CDBS diff --git a/t/recipes/checks/debhelper/debhelper-package-does-not-use-debhelper-or-cdbs/eval/desc b/t/recipes/checks/debhelper/debhelper-package-does-not-use-debhelper-or-cdbs/eval/desc new file mode 100644 index 0000000..5885652 --- /dev/null +++ b/t/recipes/checks/debhelper/debhelper-package-does-not-use-debhelper-or-cdbs/eval/desc @@ -0,0 +1,2 @@ +Testname: debhelper-package-does-not-use-debhelper-or-cdbs +Check: debhelper diff --git a/t/recipes/checks/debhelper/debhelper-package-does-not-use-debhelper-or-cdbs/eval/hints b/t/recipes/checks/debhelper/debhelper-package-does-not-use-debhelper-or-cdbs/eval/hints new file mode 100644 index 0000000..06c2ad1 --- /dev/null +++ b/t/recipes/checks/debhelper/debhelper-package-does-not-use-debhelper-or-cdbs/eval/hints @@ -0,0 +1,2 @@ +debhelper-package-does-not-use-debhelper-or-cdbs (source): package-does-not-use-debhelper-or-cdbs [debian/rules] +debhelper-package-does-not-use-debhelper-or-cdbs (source): debian-build-system other [debian/rules] diff --git a/t/recipes/checks/debhelper/debhelper-package-uses-debhelper-with-prefix-minus/build-spec/debian/rules b/t/recipes/checks/debhelper/debhelper-package-uses-debhelper-with-prefix-minus/build-spec/debian/rules new file mode 100755 index 0000000..d61a4e0 --- /dev/null +++ b/t/recipes/checks/debhelper/debhelper-package-uses-debhelper-with-prefix-minus/build-spec/debian/rules @@ -0,0 +1,4 @@ +#!/usr/bin/make -f + +%: + -dh $@ diff --git a/t/recipes/checks/debhelper/debhelper-package-uses-debhelper-with-prefix-minus/build-spec/fill-values b/t/recipes/checks/debhelper/debhelper-package-uses-debhelper-with-prefix-minus/build-spec/fill-values new file mode 100644 index 0000000..d3cdf73 --- /dev/null +++ b/t/recipes/checks/debhelper/debhelper-package-uses-debhelper-with-prefix-minus/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: upload-native +Testname: debhelper-package-uses-debhelper-with-prefix-minus +Description: Test for packages using debhelper with a - prefix diff --git a/t/recipes/checks/debhelper/debhelper-package-uses-debhelper-with-prefix-minus/eval/desc b/t/recipes/checks/debhelper/debhelper-package-uses-debhelper-with-prefix-minus/eval/desc new file mode 100644 index 0000000..26a8916 --- /dev/null +++ b/t/recipes/checks/debhelper/debhelper-package-uses-debhelper-with-prefix-minus/eval/desc @@ -0,0 +1,4 @@ +Testname: debhelper-package-uses-debhelper-with-prefix-minus +Test-Against: + package-does-not-use-debhelper-or-cdbs +Check: debhelper diff --git a/t/recipes/checks/debhelper/debhelper-package-uses-debhelper-with-prefix-minus/eval/hints b/t/recipes/checks/debhelper/debhelper-package-uses-debhelper-with-prefix-minus/eval/hints new file mode 100644 index 0000000..507a553 --- /dev/null +++ b/t/recipes/checks/debhelper/debhelper-package-uses-debhelper-with-prefix-minus/eval/hints @@ -0,0 +1,3 @@ +debhelper-package-uses-debhelper-with-prefix-minus (source): debian-build-system dh [debian/rules] +debhelper-package-uses-debhelper-with-prefix-minus (source): debhelper-compat-virtual-relation 13 [debian/control] +debhelper-package-uses-debhelper-with-prefix-minus (source): debhelper-compat-level 13 diff --git a/t/recipes/checks/debhelper/debhelper-package-uses-debhelper-with-prefix-plus/build-spec/debian/rules b/t/recipes/checks/debhelper/debhelper-package-uses-debhelper-with-prefix-plus/build-spec/debian/rules new file mode 100755 index 0000000..d6bb780 --- /dev/null +++ b/t/recipes/checks/debhelper/debhelper-package-uses-debhelper-with-prefix-plus/build-spec/debian/rules @@ -0,0 +1,4 @@ +#!/usr/bin/make -f + +%: + +dh $@ diff --git a/t/recipes/checks/debhelper/debhelper-package-uses-debhelper-with-prefix-plus/build-spec/fill-values b/t/recipes/checks/debhelper/debhelper-package-uses-debhelper-with-prefix-plus/build-spec/fill-values new file mode 100644 index 0000000..c52b8cb --- /dev/null +++ b/t/recipes/checks/debhelper/debhelper-package-uses-debhelper-with-prefix-plus/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: upload-native +Testname: debhelper-package-uses-debhelper-with-prefix-plus +Description: Test for packages using debhelper with a + prefix diff --git a/t/recipes/checks/debhelper/debhelper-package-uses-debhelper-with-prefix-plus/eval/desc b/t/recipes/checks/debhelper/debhelper-package-uses-debhelper-with-prefix-plus/eval/desc new file mode 100644 index 0000000..b04f1e3 --- /dev/null +++ b/t/recipes/checks/debhelper/debhelper-package-uses-debhelper-with-prefix-plus/eval/desc @@ -0,0 +1,4 @@ +Testname: debhelper-package-uses-debhelper-with-prefix-plus +Test-Against: + package-does-not-use-debhelper-or-cdbs +Check: debhelper diff --git a/t/recipes/checks/debhelper/debhelper-package-uses-debhelper-with-prefix-plus/eval/hints b/t/recipes/checks/debhelper/debhelper-package-uses-debhelper-with-prefix-plus/eval/hints new file mode 100644 index 0000000..5bd08a9 --- /dev/null +++ b/t/recipes/checks/debhelper/debhelper-package-uses-debhelper-with-prefix-plus/eval/hints @@ -0,0 +1,3 @@ +debhelper-package-uses-debhelper-with-prefix-plus (source): debian-build-system dh [debian/rules] +debhelper-package-uses-debhelper-with-prefix-plus (source): debhelper-compat-virtual-relation 13 [debian/control] +debhelper-package-uses-debhelper-with-prefix-plus (source): debhelper-compat-level 13 diff --git a/t/recipes/checks/debhelper/debhelper-script-token-unneeded/build-spec/debian/postinst b/t/recipes/checks/debhelper/debhelper-script-token-unneeded/build-spec/debian/postinst new file mode 100644 index 0000000..185dc3a --- /dev/null +++ b/t/recipes/checks/debhelper/debhelper-script-token-unneeded/build-spec/debian/postinst @@ -0,0 +1,6 @@ +#!/bin/sh +set -e +run something + +# We should have a debhelper token. +exit 0 diff --git a/t/recipes/checks/debhelper/debhelper-script-token-unneeded/build-spec/debian/rules b/t/recipes/checks/debhelper/debhelper-script-token-unneeded/build-spec/debian/rules new file mode 100755 index 0000000..cd6ef15 --- /dev/null +++ b/t/recipes/checks/debhelper/debhelper-script-token-unneeded/build-spec/debian/rules @@ -0,0 +1,38 @@ +#!/usr/bin/make -f +# +# Use an alternate rules file that doesn't call dh to test not warning +# about debhelper script tokens if we call no programs that care about +# them. + +pkg = $(shell dh_listpackages) + +build: build-indep build-arch +build-indep: +build-arch: + +clean: + dh_testdir + dh_testroot + dh_clean + +binary: binary-indep binary-arch +binary-arch: +binary-indep: + dh_testdir + dh_testroot + dh_prep + dh_install + dh_installchangelogs + # dh_installdocs may modify maintainer scripts + install -m 644 debian/copyright debian/$(pkg)/usr/share/doc/$(pkg) + dh_link + dh_compress + dh_fixperms + # dh_installdeb needs #DEBHELPER# token too + mkdir -p debian/$(pkg)/DEBIAN + install -m 755 debian/postinst debian/$(pkg)/DEBIAN + dh_gencontrol + dh_md5sums + dh_builddeb + +.PHONY: build-arch build-indep build binary binary-arch binary-indep clean diff --git a/t/recipes/checks/debhelper/debhelper-script-token-unneeded/build-spec/fill-values b/t/recipes/checks/debhelper/debhelper-script-token-unneeded/build-spec/fill-values new file mode 100644 index 0000000..7d19c16 --- /dev/null +++ b/t/recipes/checks/debhelper/debhelper-script-token-unneeded/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: upload-native +Testname: debhelper-script-token-unneeded +Description: Check unnecessary debhelper script token diff --git a/t/recipes/checks/debhelper/debhelper-script-token-unneeded/eval/desc b/t/recipes/checks/debhelper/debhelper-script-token-unneeded/eval/desc new file mode 100644 index 0000000..48dee5d --- /dev/null +++ b/t/recipes/checks/debhelper/debhelper-script-token-unneeded/eval/desc @@ -0,0 +1,3 @@ +Testname: debhelper-script-token-unneeded +Test-Against: maintainer-script-lacks-debhelper-token +Check: debhelper diff --git a/t/recipes/checks/debhelper/debhelper-script-token-unneeded/eval/hints b/t/recipes/checks/debhelper/debhelper-script-token-unneeded/eval/hints new file mode 100644 index 0000000..b803499 --- /dev/null +++ b/t/recipes/checks/debhelper/debhelper-script-token-unneeded/eval/hints @@ -0,0 +1,3 @@ +debhelper-script-token-unneeded (source): debian-build-system debhelper [debian/rules] +debhelper-script-token-unneeded (source): debhelper-compat-virtual-relation 13 [debian/control] +debhelper-script-token-unneeded (source): debhelper-compat-level 13 diff --git a/t/recipes/checks/debhelper/debhelper-script-token/build-spec/debian/postinst b/t/recipes/checks/debhelper/debhelper-script-token/build-spec/debian/postinst new file mode 100644 index 0000000..185dc3a --- /dev/null +++ b/t/recipes/checks/debhelper/debhelper-script-token/build-spec/debian/postinst @@ -0,0 +1,6 @@ +#!/bin/sh +set -e +run something + +# We should have a debhelper token. +exit 0 diff --git a/t/recipes/checks/debhelper/debhelper-script-token/build-spec/fill-values b/t/recipes/checks/debhelper/debhelper-script-token/build-spec/fill-values new file mode 100644 index 0000000..0fe87cf --- /dev/null +++ b/t/recipes/checks/debhelper/debhelper-script-token/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: upload-native +Testname: debhelper-script-token +Description: Check debhelper script token with rule minimization diff --git a/t/recipes/checks/debhelper/debhelper-script-token/eval/desc b/t/recipes/checks/debhelper/debhelper-script-token/eval/desc new file mode 100644 index 0000000..64e2d6f --- /dev/null +++ b/t/recipes/checks/debhelper/debhelper-script-token/eval/desc @@ -0,0 +1,2 @@ +Testname: debhelper-script-token +Check: debhelper diff --git a/t/recipes/checks/debhelper/debhelper-script-token/eval/hints b/t/recipes/checks/debhelper/debhelper-script-token/eval/hints new file mode 100644 index 0000000..ece9068 --- /dev/null +++ b/t/recipes/checks/debhelper/debhelper-script-token/eval/hints @@ -0,0 +1,4 @@ +debhelper-script-token (source): maintainer-script-lacks-debhelper-token [debian/postinst] +debhelper-script-token (source): debian-build-system dh [debian/rules] +debhelper-script-token (source): debhelper-compat-virtual-relation 13 [debian/control] +debhelper-script-token (source): debhelper-compat-level 13 diff --git a/t/recipes/checks/debhelper/debhelper-unused-cdbs/build-spec/fill-values b/t/recipes/checks/debhelper/debhelper-unused-cdbs/build-spec/fill-values new file mode 100644 index 0000000..33cf67d --- /dev/null +++ b/t/recipes/checks/debhelper/debhelper-unused-cdbs/build-spec/fill-values @@ -0,0 +1,4 @@ +Skeleton: upload-native +Testname: debhelper-unused-cdbs +Extra-Build-Depends: cdbs +Description: Test for unused build-depends on cdbs diff --git a/t/recipes/checks/debhelper/debhelper-unused-cdbs/eval/desc b/t/recipes/checks/debhelper/debhelper-unused-cdbs/eval/desc new file mode 100644 index 0000000..8fbad9a --- /dev/null +++ b/t/recipes/checks/debhelper/debhelper-unused-cdbs/eval/desc @@ -0,0 +1,2 @@ +Testname: debhelper-unused-cdbs +Check: debhelper diff --git a/t/recipes/checks/debhelper/debhelper-unused-cdbs/eval/hints b/t/recipes/checks/debhelper/debhelper-unused-cdbs/eval/hints new file mode 100644 index 0000000..58c11a0 --- /dev/null +++ b/t/recipes/checks/debhelper/debhelper-unused-cdbs/eval/hints @@ -0,0 +1,4 @@ +debhelper-unused-cdbs (source): unused-build-dependency-on-cdbs [debian/rules] +debhelper-unused-cdbs (source): debian-build-system dh [debian/rules] +debhelper-unused-cdbs (source): debhelper-compat-virtual-relation 13 [debian/control] +debhelper-unused-cdbs (source): debhelper-compat-level 13 diff --git a/t/recipes/checks/debhelper/legacy-debconf/build-spec/debian/changelog.in b/t/recipes/checks/debhelper/legacy-debconf/build-spec/debian/changelog.in new file mode 100644 index 0000000..f5e308e --- /dev/null +++ b/t/recipes/checks/debhelper/legacy-debconf/build-spec/debian/changelog.in @@ -0,0 +1,6 @@ +debconf ([% $version %]) [% $distribution %]; urgency=low + + * Initial Release + * Changelog line with exactly 80 characters which tests the line-too-long tag. + + -- Lintian Maintainers Wed, 3 May 2006 18:07:19 -0500 diff --git a/t/recipes/checks/debhelper/legacy-debconf/build-spec/debian/compat.in b/t/recipes/checks/debhelper/legacy-debconf/build-spec/debian/compat.in new file mode 100644 index 0000000..640a566 --- /dev/null +++ b/t/recipes/checks/debhelper/legacy-debconf/build-spec/debian/compat.in @@ -0,0 +1 @@ +[% $dh_compat_level %] diff --git a/t/recipes/checks/debhelper/legacy-debconf/build-spec/debian/control b/t/recipes/checks/debhelper/legacy-debconf/build-spec/debian/control new file mode 100644 index 0000000..bf9f4e9 --- /dev/null +++ b/t/recipes/checks/debhelper/legacy-debconf/build-spec/debian/control @@ -0,0 +1,52 @@ +Source: debconf +Section: utils +Priority: optional +Build-Depends: debhelper (>= 4), dpatch +Maintainer: Lintian Maintainers +Standards-Version: 3.7.2 + +Package: debconf-test +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: Test package for the debconf checks of lintian (dummy) + +Package: debconf-test-noscripts +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: Test package for the debconf checks of lintian (noscripts) + Package missing postinst/postrm/config. + . + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. + +Package: debconf-test-preinst +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: Test package for the debconf checks of lintian (preinst) + Package uses debconf only in preinst. + . + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. + +Package: debconf-test-postinst +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: Test package for the debconf checks of lintian (postinst) + Package uses debconf only in postinst. + . + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. + +Package: debconf-udeb +Section: debian-installer +XC-Package-Type: udeb +XB-Installer-Menu-Item: 100 +Architecture: any +Depends: ${shlibs:Depends} +Description: Test udeb package for the debconf checks of lintian (dummy) diff --git a/t/recipes/checks/debhelper/legacy-debconf/build-spec/debian/copyright b/t/recipes/checks/debhelper/legacy-debconf/build-spec/debian/copyright new file mode 100644 index 0000000..84843ee --- /dev/null +++ b/t/recipes/checks/debhelper/legacy-debconf/build-spec/debian/copyright @@ -0,0 +1,10 @@ +Copyright (C) 2004 Frank Lichtenheld + +Test for really old FSF address: + +Free Software Foundation, Inc., 675 Mass Ave, Cambridge, +MA 02139, USA. + +Test for a dh-make boilerplate: +# Please also look if there are files or directories which have a +# different copyright/license attached and list them here. diff --git a/t/recipes/checks/debhelper/legacy-debconf/build-spec/debian/debconf-test-noscripts.templates b/t/recipes/checks/debhelper/legacy-debconf/build-spec/debian/debconf-test-noscripts.templates new file mode 100644 index 0000000..93f8071 --- /dev/null +++ b/t/recipes/checks/debhelper/legacy-debconf/build-spec/debian/debconf-test-noscripts.templates @@ -0,0 +1,3 @@ +Template: debconf/test +Type: text +_description: Foo bar (1) diff --git a/t/recipes/checks/debhelper/legacy-debconf/build-spec/debian/debconf-test-postinst.postinst b/t/recipes/checks/debhelper/legacy-debconf/build-spec/debian/debconf-test-postinst.postinst new file mode 100644 index 0000000..56ab871 --- /dev/null +++ b/t/recipes/checks/debhelper/legacy-debconf/build-spec/debian/debconf-test-postinst.postinst @@ -0,0 +1,10 @@ +#!/bin/sh +set -e + +. /usr/share/debconf/confmodule + +db_input medium debconf/test + +#DEBHELPER# + +true diff --git a/t/recipes/checks/debhelper/legacy-debconf/build-spec/debian/debconf-test-postinst.postrm b/t/recipes/checks/debhelper/legacy-debconf/build-spec/debian/debconf-test-postinst.postrm new file mode 100644 index 0000000..cbf5e3b --- /dev/null +++ b/t/recipes/checks/debhelper/legacy-debconf/build-spec/debian/debconf-test-postinst.postrm @@ -0,0 +1,7 @@ +#!/bin/sh +set -e +if [ "$1" = purge ] && [ -e /usr/share/debconf/confmodule ]; then + . /usr/share/debconf/confmodule + db_purge +fi +#DEBHELPER# diff --git a/t/recipes/checks/debhelper/legacy-debconf/build-spec/debian/debconf-test-postinst.templates b/t/recipes/checks/debhelper/legacy-debconf/build-spec/debian/debconf-test-postinst.templates new file mode 100644 index 0000000..2a2a8ab --- /dev/null +++ b/t/recipes/checks/debhelper/legacy-debconf/build-spec/debian/debconf-test-postinst.templates @@ -0,0 +1,3 @@ +Template: debconf/test +Type: text +_description: Enter something: diff --git a/t/recipes/checks/debhelper/legacy-debconf/build-spec/debian/debconf-test-preinst.postrm b/t/recipes/checks/debhelper/legacy-debconf/build-spec/debian/debconf-test-preinst.postrm new file mode 100644 index 0000000..cbf5e3b --- /dev/null +++ b/t/recipes/checks/debhelper/legacy-debconf/build-spec/debian/debconf-test-preinst.postrm @@ -0,0 +1,7 @@ +#!/bin/sh +set -e +if [ "$1" = purge ] && [ -e /usr/share/debconf/confmodule ]; then + . /usr/share/debconf/confmodule + db_purge +fi +#DEBHELPER# diff --git a/t/recipes/checks/debhelper/legacy-debconf/build-spec/debian/debconf-test-preinst.preinst b/t/recipes/checks/debhelper/legacy-debconf/build-spec/debian/debconf-test-preinst.preinst new file mode 100644 index 0000000..bf6f074 --- /dev/null +++ b/t/recipes/checks/debhelper/legacy-debconf/build-spec/debian/debconf-test-preinst.preinst @@ -0,0 +1,13 @@ +#!/bin/sh +set -e + +# Obsolete name for the confmodule +. /usr/share/debconf/confmodule.sh + +. /usr/share/debconf/confmodule + +db_input medium debconf/test + +#DEBHELPER# + +true diff --git a/t/recipes/checks/debhelper/legacy-debconf/build-spec/debian/debconf-test-preinst.templates b/t/recipes/checks/debhelper/legacy-debconf/build-spec/debian/debconf-test-preinst.templates new file mode 100644 index 0000000..2a2a8ab --- /dev/null +++ b/t/recipes/checks/debhelper/legacy-debconf/build-spec/debian/debconf-test-preinst.templates @@ -0,0 +1,3 @@ +Template: debconf/test +Type: text +_description: Enter something: diff --git a/t/recipes/checks/debhelper/legacy-debconf/build-spec/debian/debconf-test.config b/t/recipes/checks/debhelper/legacy-debconf/build-spec/debian/debconf-test.config new file mode 100644 index 0000000..9e32d06 --- /dev/null +++ b/t/recipes/checks/debhelper/legacy-debconf/build-spec/debian/debconf-test.config @@ -0,0 +1,24 @@ +#!/bin/sh + +set -e + +. /usr/share/debconf/confmodule + +db_settitle "Funky lintian test" + +# Bad priorities. +db_text LOW debconf/test +db_input normal debconf/test + +# Valid priorities. +db_text \ +high debconf/test +foo=medium +db_input $foo debconf/test +db_input "$foo" debconf/test +db_input 'medium' debconf/test + +# debconf/transtring should not be flagged as unused +# (it's aliased to debconf/alias, which is used) +db_register debconf/transtring debconf/alias +db_input medium debconf/alias diff --git a/t/recipes/checks/debhelper/legacy-debconf/build-spec/debian/debconf-test.postinst b/t/recipes/checks/debhelper/legacy-debconf/build-spec/debian/debconf-test.postinst new file mode 100644 index 0000000..b387037 --- /dev/null +++ b/t/recipes/checks/debhelper/legacy-debconf/build-spec/debian/debconf-test.postinst @@ -0,0 +1,10 @@ +#!/bin/sh + +set -e + +. /usr/share/debconf/confmodule + +# Not supposed to do this here. +db_input medium debconf/test + +true diff --git a/t/recipes/checks/debhelper/legacy-debconf/build-spec/debian/debconf-test.templates b/t/recipes/checks/debhelper/legacy-debconf/build-spec/debian/debconf-test.templates new file mode 100644 index 0000000..811bb6c --- /dev/null +++ b/t/recipes/checks/debhelper/legacy-debconf/build-spec/debian/debconf-test.templates @@ -0,0 +1,101 @@ +Template: debconf/test +Type: text +_description: Foo bar (1) + +Template: debconf/testmulti +Type: multiselect +__Choices: foo, bar, boo +_Description: test comma usages in choices fields + +Template: debconf/testmulti-escape +Type: multiselect +_Choices: foo\, bar, boo +_Description: test escaped comma usages in choices fields: + +Template: debconf/testboolean +Type: boolean +_Description: Enter yes or no: + Do you want to answer this question? + +Template: debconf/teststring +Type: string +_Description: This template goes on and on. + This template goes on and on. + This template goes on and on. + This template goes on and on. + This template goes on and on. + This template goes on and on. + This template goes on and on. + This template goes on and on. + This template goes on and on. + This template goes on and on. + This template goes on and on. + This template goes on and on. + This template goes on and on. + This template goes on and on. + This template goes on and on. + This template goes on and on. + This template goes on and on. + This template goes on and on. + This template goes on and on. + This template goes on and on. + This template goes on and on. + This template goes on and on. + +Template: debconf/testnote +Type: note +Description: This should be a title and not a really long sentence that ends in a regular period. + +Template: debconf/1st-person +Type: select +__Choices: one, two +_Description: Select one of these: + I am a stupid test of first-person syntax that tells you to select yes + even though yes isn't an option in this prompt. + +Template: debconf/internal +Type: boolean +Description: For internal use only + We are testing that style checks are not applied to templates that are + marked as internal. + +Template: debconf/no-description +Type: string + +Template: debconf/translate +Type: boolean +_Default: false +_Description: Should this really be translated? + +Template: debconf/transtring +Type: string +_Default: 1 +_Description: Count of templates: + The number of useless numbers that a translator would have to translate + for this template. + +Template: debconf/language +__Choices: English, Spanish, German, French +# This is the default choice. Translators should put their own language, +# if available, here instead, but the value MUST be the English version +# of the value for the package scripts to work properly. +_Default: English[ translators, see the comment in the PO files] +_Description: The default language, an example of a default that should + be translated. + +Template: debconf/error +Type: error +_Description: An error occurred + This is a sample Debconf error template. + +Template: debconf/should-be-boolean +Type: select +__Choices: yes, no +_Description: Choose: + Pick yes or no. + +Template: debconf/should-be-no-longer-a-problem +Type: boolean +_Description: Decide, lintian + Using "no longer" should no longer be detected as + making-assumptions-about-interfaces-in-templates by lintian. diff --git a/t/recipes/checks/debhelper/legacy-debconf/build-spec/debian/debconf-test.templates.de b/t/recipes/checks/debhelper/legacy-debconf/build-spec/debian/debconf-test.templates.de new file mode 100644 index 0000000..f9ea121 --- /dev/null +++ b/t/recipes/checks/debhelper/legacy-debconf/build-spec/debian/debconf-test.templates.de @@ -0,0 +1,3 @@ +Template: debconf/testmulti +Type: multiselect +Choices: foo, bar\, boo, boo diff --git a/t/recipes/checks/debhelper/legacy-debconf/build-spec/debian/debconf-test.templates.in b/t/recipes/checks/debhelper/legacy-debconf/build-spec/debian/debconf-test.templates.in new file mode 100644 index 0000000..e69de29 diff --git a/t/recipes/checks/debhelper/legacy-debconf/build-spec/debian/debconf-udeb.postinst b/t/recipes/checks/debhelper/legacy-debconf/build-spec/debian/debconf-udeb.postinst new file mode 100644 index 0000000..4ce41f0 --- /dev/null +++ b/t/recipes/checks/debhelper/legacy-debconf/build-spec/debian/debconf-udeb.postinst @@ -0,0 +1,9 @@ +#!/bin/sh + +set -e + +. /usr/share/debconf/confmodule + +ldconfig + +true diff --git a/t/recipes/checks/debhelper/legacy-debconf/build-spec/debian/debconf-udeb.templates b/t/recipes/checks/debhelper/legacy-debconf/build-spec/debian/debconf-udeb.templates new file mode 100644 index 0000000..5d7cf5a --- /dev/null +++ b/t/recipes/checks/debhelper/legacy-debconf/build-spec/debian/debconf-udeb.templates @@ -0,0 +1,3 @@ +Template: debian-installer/debconf-udeb/title +Type: text +_description: This is just a test diff --git a/t/recipes/checks/debhelper/legacy-debconf/build-spec/debian/po/POTFILES.in b/t/recipes/checks/debhelper/legacy-debconf/build-spec/debian/po/POTFILES.in new file mode 100644 index 0000000..d0c82f0 --- /dev/null +++ b/t/recipes/checks/debhelper/legacy-debconf/build-spec/debian/po/POTFILES.in @@ -0,0 +1,2 @@ +[type: gettext/rfc822deb] debconf-test.templates +[type: gettext/rfc822deb] debconf-udeb.templates diff --git a/t/recipes/checks/debhelper/legacy-debconf/build-spec/debian/po/de.po b/t/recipes/checks/debhelper/legacy-debconf/build-spec/debian/po/de.po new file mode 100644 index 0000000..86c5796 --- /dev/null +++ b/t/recipes/checks/debhelper/legacy-debconf/build-spec/debian/po/de.po @@ -0,0 +1,66 @@ +# +# Translators, if you are not familiar with the PO format, gettext +# documentation is worth reading, especially sections dedicated to +# this format, e.g. by running: +# info -n '(gettext)PO Files' +# info -n '(gettext)Header Entry' +# +# Some information specific to po-debconf are available at +# /usr/share/doc/po-debconf/README-trans +# or http://www.debian.org/intl/l10n/po-debconf/README-trans +# +# Developers do not need to manually edit POT or PO files. +# +msgid "" +msgstr "" +"Project-Id-Version: debconf-test 1\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2004-12-06 00:51+0100\n" +"PO-Revision-Date: 2004-12-06 01:01+0100\n" +"Last-Translator: Frank Lichtenheld \n" +"Language-Team: debian-l10n-german@l.d.o\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Type: text +#. description +#: ../debconf-test.templates:3 +msgid "Foo bar (2)" +msgstr "" + +#. Type: multiselect +#. Choices +#: ../debconf-test.templates:7 +msgid "foo" +msgstr "foo" + +#. Type: multiselect +#. Choices +#: ../debconf-test.templates:7 +msgid "bar" +msgstr "bar, boo" + +#. Type: multiselect +#. Choices +#: ../debconf-test.templates:7 +msgid "boo" +msgstr "boo" + +#. Type: multiselect +#. Description +#: ../debconf-test.templates:8 +msgid "test comma usages in choices fields" +msgstr "" + +#. Type: multiselect +#. Choices +#: ../debconf-test.templates:11 +msgid "foo\\, bar, boo" +msgstr "foo, bar, boo" + +#. Type: text +#. description +#: ../debconf-udeb.templates:3 +msgid "This is just a test" +msgstr "Dies ist nur ein Test" diff --git a/t/recipes/checks/debhelper/legacy-debconf/build-spec/debian/po/fr.po b/t/recipes/checks/debhelper/legacy-debconf/build-spec/debian/po/fr.po new file mode 100644 index 0000000..c74deb2 --- /dev/null +++ b/t/recipes/checks/debhelper/legacy-debconf/build-spec/debian/po/fr.po @@ -0,0 +1,60 @@ +# +# Translators, if you are not familiar with the PO format, gettext +# documentation is worth reading, especially sections dedicated to +# this format, e.g. by running: +# info -n '(gettext)PO Files' +# info -n '(gettext)Header Entry' +# +# Some information specific to po-debconf are available at +# /usr/share/doc/po-debconf/README-trans +# or http://www.debian.org/intl/l10n/po-debconf/README-trans +# +# Developers do not need to manually edit POT or PO files. +# +msgid "" +msgstr "" +"Project-Id-Version: debconf-test 1\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2004-12-06 00:51+0100\n" +"PO-Revision-Date: 2005-10-13 15:03+0200\n" +"Last-Translator: Frank Lichtenheld \n" +"Language-Team: debian-l10n-german@l.d.o\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=CHARSET\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Type: text +#. description +#: ../debconf-test.templates:3 +msgid "Foo bar (2)" +msgstr "" + +#. Type: multiselect +#. Choices +#: ../debconf-test.templates:7 +msgid "foo" +msgstr "foo" + +#. Type: multiselect +#. Choices +#: ../debconf-test.templates:7 +msgid "bar" +msgstr "bar, boo" + +#. Type: multiselect +#. Choices +#: ../debconf-test.templates:7 +msgid "boo" +msgstr "boo" + +#. Type: multiselect +#. Description +#: ../debconf-test.templates:8 +msgid "test comma usages in choices fields" +msgstr "" + +#. Type: text +#. description +#: ../debconf-udeb.templates:3 +msgid "This is just a test" +msgstr " diff --git a/t/recipes/checks/debhelper/legacy-debconf/build-spec/debian/po/lang.po b/t/recipes/checks/debhelper/legacy-debconf/build-spec/debian/po/lang.po new file mode 100644 index 0000000..7ac498a --- /dev/null +++ b/t/recipes/checks/debhelper/legacy-debconf/build-spec/debian/po/lang.po @@ -0,0 +1,15 @@ +msgid "" +msgstr "" +"Project-Id-Version: debconf-test 1\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2004-12-06 00:51+0100\n" +"PO-Revision-Date: 2005-10-13 15:03+0200\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Type: text +#. description +#: ../debconf-test.templates:3 +msgid "Foo bar (2)" +msgstr "" diff --git a/t/recipes/checks/debhelper/legacy-debconf/build-spec/debian/po/nds.po b/t/recipes/checks/debhelper/legacy-debconf/build-spec/debian/po/nds.po new file mode 100644 index 0000000..7ac498a --- /dev/null +++ b/t/recipes/checks/debhelper/legacy-debconf/build-spec/debian/po/nds.po @@ -0,0 +1,15 @@ +msgid "" +msgstr "" +"Project-Id-Version: debconf-test 1\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2004-12-06 00:51+0100\n" +"PO-Revision-Date: 2005-10-13 15:03+0200\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Type: text +#. description +#: ../debconf-test.templates:3 +msgid "Foo bar (2)" +msgstr "" diff --git a/t/recipes/checks/debhelper/legacy-debconf/build-spec/debian/po/output b/t/recipes/checks/debhelper/legacy-debconf/build-spec/debian/po/output new file mode 100644 index 0000000..c3df1a5 --- /dev/null +++ b/t/recipes/checks/debhelper/legacy-debconf/build-spec/debian/po/output @@ -0,0 +1 @@ +2 utf8 diff --git a/t/recipes/checks/debhelper/legacy-debconf/build-spec/debian/po/pt_BR.po b/t/recipes/checks/debhelper/legacy-debconf/build-spec/debian/po/pt_BR.po new file mode 100644 index 0000000..7ac498a --- /dev/null +++ b/t/recipes/checks/debhelper/legacy-debconf/build-spec/debian/po/pt_BR.po @@ -0,0 +1,15 @@ +msgid "" +msgstr "" +"Project-Id-Version: debconf-test 1\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2004-12-06 00:51+0100\n" +"PO-Revision-Date: 2005-10-13 15:03+0200\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Type: text +#. description +#: ../debconf-test.templates:3 +msgid "Foo bar (2)" +msgstr "" diff --git a/t/recipes/checks/debhelper/legacy-debconf/build-spec/debian/po/sample-file.po b/t/recipes/checks/debhelper/legacy-debconf/build-spec/debian/po/sample-file.po new file mode 100644 index 0000000..8dcc0ff --- /dev/null +++ b/t/recipes/checks/debhelper/legacy-debconf/build-spec/debian/po/sample-file.po @@ -0,0 +1 @@ +This is some file that isn't actually a valid .po file. diff --git a/t/recipes/checks/debhelper/legacy-debconf/build-spec/debian/po/templates.pot b/t/recipes/checks/debhelper/legacy-debconf/build-spec/debian/po/templates.pot new file mode 100644 index 0000000..914c77f --- /dev/null +++ b/t/recipes/checks/debhelper/legacy-debconf/build-spec/debian/po/templates.pot @@ -0,0 +1,61 @@ +# +# Translators, if you are not familiar with the PO format, gettext +# documentation is worth reading, especially sections dedicated to +# this format, e.g. by running: +# info -n '(gettext)PO Files' +# info -n '(gettext)Header Entry' +# +# Some information specific to po-debconf are available at +# /usr/share/doc/po-debconf/README-trans +# or http://www.debian.org/intl/l10n/po-debconf/README-trans +# +# Developers do not need to manually edit POT or PO files. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2004-12-06 00:51+0100\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=CHARSET\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Type: text +#. description +#: ../debconf-test.templates:3 +msgid "Foo bar (2)" +msgstr "" + +#. Type: multiselect +#. Choices +#: ../debconf-test.templates:7 +msgid "foo" +msgstr "" + +#. Type: multiselect +#. Choices +#: ../debconf-test.templates:7 +msgid "bar" +msgstr "" + +#. Type: multiselect +#. Choices +#: ../debconf-test.templates:7 +msgid "boo" +msgstr "" + +#. Type: multiselect +#. Description +#: ../debconf-test.templates:8 +msgid "test comma usages in choices fields" +msgstr "" + +#. Type: text +#. description +#: ../debconf-udeb.templates:3 +msgid "This is just a test" +msgstr "" diff --git a/t/recipes/checks/debhelper/legacy-debconf/build-spec/debian/pycompat b/t/recipes/checks/debhelper/legacy-debconf/build-spec/debian/pycompat new file mode 100644 index 0000000..0cfbf08 --- /dev/null +++ b/t/recipes/checks/debhelper/legacy-debconf/build-spec/debian/pycompat @@ -0,0 +1 @@ +2 diff --git a/t/recipes/checks/debhelper/legacy-debconf/build-spec/debian/pyversions b/t/recipes/checks/debhelper/legacy-debconf/build-spec/debian/pyversions new file mode 100644 index 0000000..6f290b0 --- /dev/null +++ b/t/recipes/checks/debhelper/legacy-debconf/build-spec/debian/pyversions @@ -0,0 +1 @@ +>= 2.7 diff --git a/t/recipes/checks/debhelper/legacy-debconf/build-spec/debian/rules b/t/recipes/checks/debhelper/legacy-debconf/build-spec/debian/rules new file mode 100755 index 0000000..933901a --- /dev/null +++ b/t/recipes/checks/debhelper/legacy-debconf/build-spec/debian/rules @@ -0,0 +1,64 @@ +#!/usr/bin/make -f + +deb_dir = debian/debconf +udeb_dir = debian/debconf-udeb +build_dirs = $(deb_dir) $(udeb_dir) + +build-indep: +# There are no architecture-independent files to be built +# by this package. If there were any they would be made +# here. + +build-arch: + dh_testdir + touch build + +build: build-indep build-arch + +clean: + dh_testdir + dh_testroot + -rm -f build + + dh_clean + +binary-indep: build +# There are no architecture-independent files to be uploaded +# generated by this package. If there were any they would be +# made here. + +binary-arch: build + dh_testdir + dh_testroot + dh_prep + dh_installdirs -a + + dh_installchangelogs -a + dh_installdocs -a + dh_installdebconf -pdebconf-test + dh_installdebconf -pdebconf-test-noscripts --noscripts + dh_installdebconf -pdebconf-test-preinst --noscripts + dh_installdebconf -pdebconf-test-postinst --noscripts + dh_installdebconf -pdebconf-udeb + + + + + dh_compress -a + dh_fixperms -a + +# The shlibs stuff doesn't matter here so do it in a weird order to +# test warnings. + dh_installdeb -a + dh_shlibdeps -a + dh_makeshlibs -a + dh_gencontrol -a + dh_md5sums + dh_builddeb -a + dh_makeshlibs -a + +# Below here is fairly generic really + +binary: binary-indep binary-arch + +.PHONY: build-arch build-indep build binary binary-arch binary-indep clean checkroot diff --git a/t/recipes/checks/debhelper/legacy-debconf/build-spec/fill-values b/t/recipes/checks/debhelper/legacy-debconf/build-spec/fill-values new file mode 100644 index 0000000..186615f --- /dev/null +++ b/t/recipes/checks/debhelper/legacy-debconf/build-spec/fill-values @@ -0,0 +1,6 @@ +Skeleton: upload-native +Testname: legacy-debconf +Source: debconf +Version: 1~rc1 +Description: Legacy test "debconf" +Default-Build-Depends: debhelper (>= [% $dh_compat_level %]~) diff --git a/t/recipes/checks/debhelper/legacy-debconf/eval/desc b/t/recipes/checks/debhelper/legacy-debconf/eval/desc new file mode 100644 index 0000000..531436c --- /dev/null +++ b/t/recipes/checks/debhelper/legacy-debconf/eval/desc @@ -0,0 +1,2 @@ +Testname: legacy-debconf +Check: debhelper diff --git a/t/recipes/checks/debhelper/legacy-debconf/eval/hints b/t/recipes/checks/debhelper/legacy-debconf/eval/hints new file mode 100644 index 0000000..2984e86 --- /dev/null +++ b/t/recipes/checks/debhelper/legacy-debconf/eval/hints @@ -0,0 +1,5 @@ +debconf (source): uses-debhelper-compat-file [debian/compat] +debconf (source): no-versioned-debhelper-prerequisite 13 +debconf (source): maintainer-script-lacks-debhelper-token [debian/debconf-test.postinst] +debconf (source): debian-build-system debhelper [debian/rules] +debconf (source): debhelper-compat-level 13 diff --git a/t/recipes/checks/debhelper/legacy-debconf/eval/post-test b/t/recipes/checks/debhelper/legacy-debconf/eval/post-test new file mode 100644 index 0000000..faeef0b --- /dev/null +++ b/t/recipes/checks/debhelper/legacy-debconf/eval/post-test @@ -0,0 +1 @@ +s/\(current is ([0-9]+\.)+[0-9]\)/(current is CURRENT)/ diff --git a/t/recipes/checks/debhelper/legacy-fields/build-spec/debian/changelog.in b/t/recipes/checks/debhelper/legacy-fields/build-spec/debian/changelog.in new file mode 100644 index 0000000..38fc4e9 --- /dev/null +++ b/t/recipes/checks/debhelper/legacy-fields/build-spec/debian/changelog.in @@ -0,0 +1,10 @@ +fields ([% $version %]) [% $distribution %]; urgency=low + + * This package adds tests for the following tags: + - debian-revision-not-well-formed + - depends-on-python-minimal + - essential-no-not-needed + - debian-revision-should-not-be-zero + - new-essential-package + + -- Tobias Quathamer Sun, 10 Apr 2011 14:30:00 +0100 diff --git a/t/recipes/checks/debhelper/legacy-fields/build-spec/debian/compat.in b/t/recipes/checks/debhelper/legacy-fields/build-spec/debian/compat.in new file mode 100644 index 0000000..640a566 --- /dev/null +++ b/t/recipes/checks/debhelper/legacy-fields/build-spec/debian/compat.in @@ -0,0 +1 @@ +[% $dh_compat_level %] diff --git a/t/recipes/checks/debhelper/legacy-fields/build-spec/debian/control b/t/recipes/checks/debhelper/legacy-fields/build-spec/debian/control new file mode 100644 index 0000000..d980a6e --- /dev/null +++ b/t/recipes/checks/debhelper/legacy-fields/build-spec/debian/control @@ -0,0 +1,28 @@ +Source: fields +Section: does-not-exist +Priority: standard +Maintainer: Lintian Maintainers +Standards-Version: 3.9.2 + +Package: fields +Essential: no +Architecture: all +Depends: python-minimal +Description: Generate some errors + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. + +Package: another-version +Essential: yes +Section: admin +Architecture: all +Description: Also generate some errors + This package gets another version number and tries to sneak in a new + essential package. + . + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. diff --git a/t/recipes/checks/debhelper/legacy-fields/build-spec/debian/rules b/t/recipes/checks/debhelper/legacy-fields/build-spec/debian/rules new file mode 100755 index 0000000..11ad4a7 --- /dev/null +++ b/t/recipes/checks/debhelper/legacy-fields/build-spec/debian/rules @@ -0,0 +1,33 @@ +#!/usr/bin/make -f + +tmp=debian/tmp + +build-arch: + +build-indep: + +build: build-arch build-indep + +binary-arch: + +binary-indep: + install -d $(tmp)/usr/share/doc/fields + install -m 644 debian/changelog \ + $(tmp)/usr/share/doc/fields/changelog + gzip -n -9 $(tmp)/usr/share/doc/fields/changelog + dh_md5sums -pfields -P$(tmp) + dpkg-gencontrol -pfields -P$(tmp) + dpkg --build $(tmp) .. + rm -rf $(tmp) + + # Create another package with a different version + dh_md5sums -panother-version -P$(tmp) + dpkg-gencontrol -panother-version -v123.4-0 -P$(tmp) + dpkg --build $(tmp) .. + +binary: binary-arch binary-indep + +clean: + rm -rf debian/files $(tmp) debian/substvars + +.PHONY: build-arch build-indep build binary-arch binary-indep binary clean diff --git a/t/recipes/checks/debhelper/legacy-fields/build-spec/fill-values b/t/recipes/checks/debhelper/legacy-fields/build-spec/fill-values new file mode 100644 index 0000000..fe90eb0 --- /dev/null +++ b/t/recipes/checks/debhelper/legacy-fields/build-spec/fill-values @@ -0,0 +1,5 @@ +Skeleton: upload-non-native +Testname: legacy-fields +Source: fields +Version: 1.5-.3 +Description: Legacy test "fields" diff --git a/t/recipes/checks/debhelper/legacy-fields/eval/desc b/t/recipes/checks/debhelper/legacy-fields/eval/desc new file mode 100644 index 0000000..caa4458 --- /dev/null +++ b/t/recipes/checks/debhelper/legacy-fields/eval/desc @@ -0,0 +1,2 @@ +Testname: legacy-fields +Check: debhelper diff --git a/t/recipes/checks/debhelper/legacy-fields/eval/hints b/t/recipes/checks/debhelper/legacy-fields/eval/hints new file mode 100644 index 0000000..704f9a5 --- /dev/null +++ b/t/recipes/checks/debhelper/legacy-fields/eval/hints @@ -0,0 +1,8 @@ +fields (source): uses-debhelper-compat-file [debian/compat] +fields (source): package-uses-debhelper-but-lacks-build-depends [debian/rules] +fields (source): no-versioned-debhelper-prerequisite 13 +fields (source): missing-build-dependency-for-dh_-command dh_md5sums (does not satisfy debhelper:any | debhelper-compat:any) [debian/rules] +fields (source): debian-build-system debhelper [debian/rules] +fields (source): debhelper-compat-level 13 +fields (source): debhelper-but-no-misc-depends fields +fields (source): debhelper-but-no-misc-depends another-version diff --git a/t/recipes/checks/debhelper/legacy-fields/eval/post-test b/t/recipes/checks/debhelper/legacy-fields/eval/post-test new file mode 100644 index 0000000..faeef0b --- /dev/null +++ b/t/recipes/checks/debhelper/legacy-fields/eval/post-test @@ -0,0 +1 @@ +s/\(current is ([0-9]+\.)+[0-9]\)/(current is CURRENT)/ diff --git a/t/recipes/checks/debhelper/legacy-libbaz/build-spec/debian/changelog.in b/t/recipes/checks/debhelper/legacy-libbaz/build-spec/debian/changelog.in new file mode 100644 index 0000000..91a6bb5 --- /dev/null +++ b/t/recipes/checks/debhelper/legacy-libbaz/build-spec/debian/changelog.in @@ -0,0 +1,6 @@ +libbaz ([% $version %]) [% $distribution %]; urgency=low + + * Initial setup + + -- Sean 'Shaleh' Perry Tue, 30 Jan 2001 15:23:59 -0800 + diff --git a/t/recipes/checks/debhelper/legacy-libbaz/build-spec/debian/compat.in b/t/recipes/checks/debhelper/legacy-libbaz/build-spec/debian/compat.in new file mode 100644 index 0000000..640a566 --- /dev/null +++ b/t/recipes/checks/debhelper/legacy-libbaz/build-spec/debian/compat.in @@ -0,0 +1 @@ +[% $dh_compat_level %] diff --git a/t/recipes/checks/debhelper/legacy-libbaz/build-spec/debian/control b/t/recipes/checks/debhelper/legacy-libbaz/build-spec/debian/control new file mode 100644 index 0000000..1506687 --- /dev/null +++ b/t/recipes/checks/debhelper/legacy-libbaz/build-spec/debian/control @@ -0,0 +1,58 @@ +Source: libbaz +Section: libs +Priority: optional +Maintainer: Lintian Maintainer +Build-depends: debhelper (>=4) +Standards-Version: 3.2.1 + +Package: libbaz1 +Architecture: any +Provides: libbaz +Description: test handling of library packages + Regression test for lintian's handling of libraries. + . + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. + +Package: libbaz1-dev +Architecture: any +Depends: libbaz1 (= ${source:Version}), perlapi-5.8.8 +Description: development package + Regression test for lintian's handling of libraries (dev). + . + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. + +Package: libbaz2 +Architecture: any +Depends: ${shlibs:Depends}, libssl0.9.8 +Description: test handling of library packages (good) + Regression test for lintian's handling of libraries (good). + . + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. + +Package: libbaz2-dev +Architecture: any +Depends: ${shlibs:Depends}, libbaz2 (= ${source:Version}) +Description: development package (good) + Regression test for lintian's handling of libraries (dev good). + . + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. + +Package: libbaz2-dbg +Architecture: any +Depends: libbaz2 (= ${binary:Version}) +Priority: optional +Description: debugging package + Regression test for lintian's handling of libraries (debug). + . + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. + diff --git a/t/recipes/checks/debhelper/legacy-libbaz/build-spec/debian/copyright b/t/recipes/checks/debhelper/legacy-libbaz/build-spec/debian/copyright new file mode 100644 index 0000000..a874c87 --- /dev/null +++ b/t/recipes/checks/debhelper/legacy-libbaz/build-spec/debian/copyright @@ -0,0 +1,8 @@ +This package is released under public domain. This is distributed in the hope +that it will be useful, but without any warranty; without even the implied +warranty of merchantability or fitness for a particular purpose. + +A reference to /usr/share/common-licenses/GPL-2 to make it look like this +package is under the GPL and trigger the OpenSSL warning. + +However, this has an OpenSSL exception. diff --git a/t/recipes/checks/debhelper/legacy-libbaz/build-spec/debian/dev.postinst b/t/recipes/checks/debhelper/legacy-libbaz/build-spec/debian/dev.postinst new file mode 100644 index 0000000..683e3cc --- /dev/null +++ b/t/recipes/checks/debhelper/legacy-libbaz/build-spec/debian/dev.postinst @@ -0,0 +1,4 @@ +#!/bin/sh -e + +$PKG=libbaz1-dev + diff --git a/t/recipes/checks/debhelper/legacy-libbaz/build-spec/debian/dev.prerm b/t/recipes/checks/debhelper/legacy-libbaz/build-spec/debian/dev.prerm new file mode 100644 index 0000000..683e3cc --- /dev/null +++ b/t/recipes/checks/debhelper/legacy-libbaz/build-spec/debian/dev.prerm @@ -0,0 +1,4 @@ +#!/bin/sh -e + +$PKG=libbaz1-dev + diff --git a/t/recipes/checks/debhelper/legacy-libbaz/build-spec/debian/lib.postinst b/t/recipes/checks/debhelper/legacy-libbaz/build-spec/debian/lib.postinst new file mode 100644 index 0000000..ec0b98a --- /dev/null +++ b/t/recipes/checks/debhelper/legacy-libbaz/build-spec/debian/lib.postinst @@ -0,0 +1,10 @@ +#!/bin/sh -e + +$PKG=libbaz1 + +if [ "$1" = "configure" ]; then + if [ -d /usr/doc -a ! -e /usr/doc/$PKG -a -d /usr/share/doc/$PKG ] +; then + ln -sf ../share/doc/$PKG /usr/doc/$PKG + fi +fi diff --git a/t/recipes/checks/debhelper/legacy-libbaz/build-spec/debian/lib.prerm b/t/recipes/checks/debhelper/legacy-libbaz/build-spec/debian/lib.prerm new file mode 100644 index 0000000..50e37c3 --- /dev/null +++ b/t/recipes/checks/debhelper/legacy-libbaz/build-spec/debian/lib.prerm @@ -0,0 +1,7 @@ +#!/bin/sh -e + +$PKG=libbaz1 + +if [ \( "$1" = "upgrade" -o "$1" = "remove" \) -a -L /usr/doc/$PKG ]; then + rm -f /usr/doc/$PKG +fi diff --git a/t/recipes/checks/debhelper/legacy-libbaz/build-spec/debian/lib.shlibs b/t/recipes/checks/debhelper/legacy-libbaz/build-spec/debian/lib.shlibs new file mode 100644 index 0000000..b88e288 --- /dev/null +++ b/t/recipes/checks/debhelper/legacy-libbaz/build-spec/debian/lib.shlibs @@ -0,0 +1,8 @@ +libdoesntexist2 1.0 libbaz1 +libdoesntexist2 1.0 libbaz1 +libbaz2 1.1 libbaz +libbaz3 1 libbaz1 (>> 1-1) +libbaz4 1 libbaz1 (= 1-1) +libbaz5 1 libbaz2 +udeb: libdoesntexist2 1.0 libbaz2 +udeb: libdoesntexist2 1.0 libbaz2 diff --git a/t/recipes/checks/debhelper/legacy-libbaz/build-spec/debian/lib.symbols b/t/recipes/checks/debhelper/legacy-libbaz/build-spec/debian/lib.symbols new file mode 100644 index 0000000..72f9d8a --- /dev/null +++ b/t/recipes/checks/debhelper/legacy-libbaz/build-spec/debian/lib.symbols @@ -0,0 +1,3 @@ +libbaz.so.2 libbaz1 #MINVER# + pw 1-1 + foo 1.1-1 diff --git a/t/recipes/checks/debhelper/legacy-libbaz/build-spec/debian/rules b/t/recipes/checks/debhelper/legacy-libbaz/build-spec/debian/rules new file mode 100755 index 0000000..fa99bc8 --- /dev/null +++ b/t/recipes/checks/debhelper/legacy-libbaz/build-spec/debian/rules @@ -0,0 +1,121 @@ +#!/usr/bin/make -f + +lib_tmp=debian/tmp-lib +dev_tmp=debian/tmp-dev + +LIB=libbaz1 +DEV=libbaz1-dev + +VENDORARCH := $(shell perl -MConfig -wE'say substr($$Config{vendorarch},1)') + +build-arch: + $(MAKE) + +build-indep: + +build: build-arch build-indep + +clean: + $(MAKE) clean + dh_clean -plibbaz2 -plibbaz2-dev + rm -f debian/files debian/substvars + rm -rf $(lib_tmp) $(dev_tmp) + +# Now the correct libbaz2-dev package +binary-correct: + install -d debian/libbaz2-dev/usr/lib + cp -a libbaz2.a libbaz2.so debian/libbaz2-dev/usr/lib + # usually, I'd also include some .h files to /usr/include + + # Now the correct libbaz2 package + install -d debian/libbaz2/usr/lib + cp -a libbaz2.so.* debian/libbaz2/usr/lib + chmod a-x debian/libbaz2/usr/lib/* + + # General stuff that is tested in other testsets: + dh_installdocs -plibbaz2 -plibbaz2-dev -plibbaz2-dbg + dh_compress -plibbaz2 -plibbaz2-dev -plibbaz2-dbg + + # Mess up the libbaz2 changelog files to test the symlink handling. + ln -s /usr/share/doc/lintian/changelog.gz \ + debian/libbaz2/usr/share/doc/libbaz2/changelog.gz + install -m 644 debian/changelog \ + debian/libbaz2-dev/usr/share/doc/libbaz2-dev/foo + ln -s foo debian/libbaz2-dev/usr/share/doc/libbaz2-dev/changelog + + # Okay, if either line is omitted, it should be noted + dh_strip --dbg-package=libbaz2-dbg -plibbaz2 -plibbaz2-dev + dh_makeshlibs -plibbaz2 -plibbaz2-dev -plibbaz2-dbg + dh_shlibdeps -plibbaz2 -plibbaz2-dev -plibbaz2-dbg + + # and again, regular packaging stuff + dh_installdeb -plibbaz2 -plibbaz2-dev -plibbaz2-dbg + echo udeb: libbaz2 1.0 libbaz2 >> debian/libbaz2/DEBIAN/shlibs + dh_gencontrol -plibbaz2 -plibbaz2-dev -plibbaz2-dbg + dh_builddeb -plibbaz2 -plibbaz2-dev -plibbaz2-dbg + +# and the incorrect one +binary-arch: build-arch binary-correct + # first, the lib package + install -d $(lib_tmp)/usr/lib + # resp. no soname (check), wrong soname (check), and no-pic (check) + cp -a libbaz1.so.1.0* $(lib_tmp)/usr/lib + cp -a libbaz2.so.1.0.3b $(lib_tmp)/usr/lib/libfoo2.so.1.0.3b + install -m644 libbaz3.so.1.0.3b $(lib_tmp)/usr/lib/libbaz3.so.1.0.3b + # let's include the .a in the non-dev too (TODO) + # Also, libbaz1.a hasn't a symbol table (TODO) + cp -a *.a $(lib_tmp)/usr/lib + # And a wrong .so symlink (wrong, only in -dev, TODO) + ln -s libfoo3.so.0.9 $(lib_tmp)/usr/lib/libfoo3.so + # And a wrong .so.X symlink (wrong, should point to a real existing + # shlib, TODO) + ln -s libfoo.so.0.9.1 $(lib_tmp)/usr/lib/libfoo.so.0.9 + # And a plain .so (wrong, TODO) + touch $(lib_tmp)/usr/lib/libbar2.so + # And a non-versioned SONAME. + install -m644 libbaz.so $(lib_tmp)/usr/lib/libbaz.so + strip --remove-section=.comment --strip-unneeded $(lib_tmp)/usr/lib/libbaz.so + # Pretend to be a Perl module to test a lack of Perl dependencies. + install -d $(lib_tmp)/$(VENDORARCH)/auto/Foo + install -m 644 libbaz2.so.1.0.3b $(lib_tmp)/$(VENDORARCH)/auto/Foo/Foo.so + strip $(lib_tmp)/$(VENDORARCH)/auto/Foo/Foo.so + + install -d $(lib_tmp)/usr/share/doc/$(LIB) + install -m 644 debian/copyright $(lib_tmp)/usr/share/doc/$(LIB) + install -m 644 debian/changelog $(lib_tmp)/usr/share/doc/$(LIB) + gzip -n -9 $(lib_tmp)/usr/share/doc/$(LIB)/changelog + install -d $(lib_tmp)/DEBIAN + install -m 755 debian/lib.postinst $(lib_tmp)/DEBIAN/postinst + install -m 755 debian/lib.prerm $(lib_tmp)/DEBIAN/prerm + touch $(lib_tmp)/usr/share/doc/README.Debian + #dpkg-shlibdeps $(lib_tmp)/usr/lib/libbaz.so.1.0 + install -m 755 debian/lib.shlibs $(lib_tmp)/DEBIAN/shlibs + install -m 755 debian/lib.symbols $(lib_tmp)/DEBIAN/symbols + dpkg-gencontrol -isp -p$(LIB) -P$(lib_tmp) + dpkg --build $(lib_tmp) .. + + # now the -dev package + install -d $(dev_tmp)/usr/include + install -d $(lib_tmp)/usr/lib + # let's also install the .so at the same time... (wrong, TODO) + cp -a *.a *.so.* $(lib_tmp)/usr/lib + # and fuck up permission (TODO) + chmod a+x $(lib_tmp)/usr/lib/*.a + # Pretend to be a Perl module to test a lack of Perl dependencies. + install -d $(dev_tmp)/$(VENDORARCH)/auto/Foo + install -m 644 libbaz2.so.1.0.3b $(dev_tmp)/$(VENDORARCH)/auto/Foo/Foo.so + strip $(dev_tmp)/$(VENDORARCH)/auto/Foo/Foo.so + install -d $(dev_tmp)/usr/share/doc + ln -s $(LIB) $(dev_tmp)/usr/share/doc/$(DEV) + install -d $(dev_tmp)/DEBIAN + install -m 755 debian/dev.postinst $(dev_tmp)/DEBIAN/postinst + install -m 755 debian/dev.prerm $(dev_tmp)/DEBIAN/prerm + dpkg-gencontrol -isp -p$(DEV) -P$(dev_tmp) + dpkg --build $(dev_tmp) .. + + +binary: binary-arch + +# The mention of binary-indep here should be sufficient to suppress the +# warning that it's not present. +.PHONY: build-arch build-indep build binary-arch binary-indep binary clean diff --git a/t/recipes/checks/debhelper/legacy-libbaz/build-spec/debian/source.lintian-overrides b/t/recipes/checks/debhelper/legacy-libbaz/build-spec/debian/source.lintian-overrides new file mode 100644 index 0000000..6008d27 --- /dev/null +++ b/t/recipes/checks/debhelper/legacy-libbaz/build-spec/debian/source.lintian-overrides @@ -0,0 +1 @@ +libbaz source: maintainer-script-lacks-debhelper-token diff --git a/t/recipes/checks/debhelper/legacy-libbaz/build-spec/fill-values b/t/recipes/checks/debhelper/legacy-libbaz/build-spec/fill-values new file mode 100644 index 0000000..7effe4f --- /dev/null +++ b/t/recipes/checks/debhelper/legacy-libbaz/build-spec/fill-values @@ -0,0 +1,6 @@ +Skeleton: upload-non-native +Testname: legacy-libbaz +Source: libbaz +Version: 1-1 +Default-Build-Depends: debhelper (>= 9.20151004~) +Description: Legacy test "libbaz" diff --git a/t/recipes/checks/debhelper/legacy-libbaz/build-spec/orig/Makefile b/t/recipes/checks/debhelper/legacy-libbaz/build-spec/orig/Makefile new file mode 100644 index 0000000..657dc2a --- /dev/null +++ b/t/recipes/checks/debhelper/legacy-libbaz/build-spec/orig/Makefile @@ -0,0 +1,55 @@ +# This is the correct way to build a lib + +CC=gcc +CFLAGS=-g -Wall -Winline -O2 +LDFLAGS=-Wl,--no-as-needed + +OBJS=baz.o extra.o +SHOBJS=baz.sho extra.sho +NOPICOBJS = $(SHOBJS) + +all: libbaz1.a libbaz2.a libbaz1.so.1.0.3b libbaz2.so libbaz3.so.1.0.3b \ + libbaz.so + +libbaz2.so: libbaz2.so.1.0 + ln -sf $^ $@ +libbaz2.so.1.0: libbaz2.so.1.0.3b + ln -sf $^ $@ + +# Oops, forget the soname altogether +libbaz1.so.1.0.3b: $(NOPICOBJS) + $(CC) $(LDFLAGS) -o $@ -shared $^ -lc + +libbaz2.so.1.0.3b: $(SHOBJS) + $(CC) $(LDFLAGS) -o $@ -shared -Wl,-soname,libbaz2.so.1.0 $^ -lc + +# Non-PIC. We can't test this on all architectures +libbaz3.so.1.0.3b: $(NOPICOBJS) + $(CC) $(LDFLAGS) -o $@ -shared -Wl,-soname,libbaz3.so.1 $^ -lc + +# Non-versioned SONAME. +libbaz.so: $(SHOBJS) + $(CC) $(LDFLAGS) -o $@ -shared -Wl,-soname,libbaz.so $^ -lc + +#%.o-noreentrant: %.c +# $(CC) $(LDFLAGS) $(CFLAGS) -o $@ -c $< + +%.sho: %.c + $(CC) $(LDFLAGS) $(CFLAGS) -D_REENTRANT -fPIC -o $@ -c $< + +%.o: %.c + $(CC) $(LDFLAGS) $(CFLAGS) -D_REENTRANT -o $@ -c $< + +libbaz2.a: $(OBJS) + ar cq $@ $(OBJS) + strip --strip-unneeded --remove-section=.comment \ + --remove-section=-note $@ + ranlib $@ + +# The pic one in the .a (wrong), no archive table +libbaz1.a: $(SHOBJS) + ar cqS $@ $^ + strip --strip-unneeded --remove-section=.comment \ + --remove-section=-note $@ +clean: + rm -f *.a *.o *.so* *.sho diff --git a/t/recipes/checks/debhelper/legacy-libbaz/build-spec/orig/baz.c b/t/recipes/checks/debhelper/legacy-libbaz/build-spec/orig/baz.c new file mode 100644 index 0000000..4d5fc45 --- /dev/null +++ b/t/recipes/checks/debhelper/legacy-libbaz/build-spec/orig/baz.c @@ -0,0 +1,6 @@ +#include + +double pw(double p) +{ + return exp(p); +} diff --git a/t/recipes/checks/debhelper/legacy-libbaz/build-spec/orig/extra.c b/t/recipes/checks/debhelper/legacy-libbaz/build-spec/orig/extra.c new file mode 100644 index 0000000..e69de29 diff --git a/t/recipes/checks/debhelper/legacy-libbaz/eval/desc b/t/recipes/checks/debhelper/legacy-libbaz/eval/desc new file mode 100644 index 0000000..cec7741 --- /dev/null +++ b/t/recipes/checks/debhelper/legacy-libbaz/eval/desc @@ -0,0 +1,2 @@ +Testname: legacy-libbaz +Check: debhelper diff --git a/t/recipes/checks/debhelper/legacy-libbaz/eval/hints b/t/recipes/checks/debhelper/legacy-libbaz/eval/hints new file mode 100644 index 0000000..2a439ae --- /dev/null +++ b/t/recipes/checks/debhelper/legacy-libbaz/eval/hints @@ -0,0 +1,13 @@ +libbaz (source): uses-debhelper-compat-file [debian/compat] +libbaz (source): no-versioned-debhelper-prerequisite 13 +libbaz (source): maintainer-script-lacks-debhelper-token [debian/lib.prerm] +libbaz (source): maintainer-script-lacks-debhelper-token [debian/lib.postinst] +libbaz (source): maintainer-script-lacks-debhelper-token [debian/dev.prerm] +libbaz (source): maintainer-script-lacks-debhelper-token [debian/dev.postinst] +libbaz (source): debian-build-system debhelper [debian/rules] +libbaz (source): debhelper-compat-level 13 +libbaz (source): debhelper-but-no-misc-depends libbaz2-dev +libbaz (source): debhelper-but-no-misc-depends libbaz2-dbg +libbaz (source): debhelper-but-no-misc-depends libbaz2 +libbaz (source): debhelper-but-no-misc-depends libbaz1-dev +libbaz (source): debhelper-but-no-misc-depends libbaz1 diff --git a/t/recipes/checks/debhelper/legacy-libbaz/eval/post-test b/t/recipes/checks/debhelper/legacy-libbaz/eval/post-test new file mode 100755 index 0000000..29dc3f4 --- /dev/null +++ b/t/recipes/checks/debhelper/legacy-libbaz/eval/post-test @@ -0,0 +1,4 @@ +/: hardening-.*/ d +s/\(current is ([0-9]+\.)+[0-9]\)/(current is CURRENT)/ +s,usr/lib/([^\/]*/)?perl[0-9]*(/[0-9]*\.[0-9]*)?/,usr/lib/ma-dir/perl/version/,g +/: file-references-package-build-path / d diff --git a/t/recipes/checks/debhelper/legacy-maintainer-scripts/build-spec/debian/changelog.in b/t/recipes/checks/debhelper/legacy-maintainer-scripts/build-spec/debian/changelog.in new file mode 100644 index 0000000..a12fc8c --- /dev/null +++ b/t/recipes/checks/debhelper/legacy-maintainer-scripts/build-spec/debian/changelog.in @@ -0,0 +1,57 @@ +maintainer-scripts ([% $version %]) [% $distribution %]; urgency=low + + * Doing an upload for QA but I fail to give it a correct version number, + have some uploaders, and also fail to mention it... Bad me ;) + + -- Jeroen van Wolffelaar Sun, 18 Apr 2004 02:05:29 +0200 + +maintainer-scripts (6.1) unstable; urgency=low + + * I made this entry on my local PC, oops ;) + + -- Jeroen van Wolffelaar Sat, 21 Feb 2004 18:29:37 +0100 + +maintainer-scripts (6) unstable; urgency=low + + * added ldconfig calls to postrm to check test the postrm tests + from shared-libs + + -- Frank Lichtenheld Sat, 21 Feb 2004 18:29:36 +0100 + +maintainer-scripts (5) unstable; urgency=low + + * added bash style arrays to postinst, this one is for you Torsten (-: + + -- Sean 'Shaleh' Perry Fri, 30 Mar 2001 23:27:06 -0800 + +maintainer-scripts (4) unstable; urgency=low + + * added a here document to the prerm, along with two more bashisms + * made postrm a bash script to check that bash scripts are not searched + + -- Sean 'Shaleh' Perry Mon, 26 Feb 2001 13:02:57 -0800 + +maintainer-scripts (3) unstable; urgency=low + + * Added check for '.' called as '. foo || bar', lintian 1.11.15 failed this + thinking the '||' was a argument. + * also added an invalid call to '. foo bar' + * postinst now has a space between the #! and /bin/sh to test the interpreter + checking code. + + -- Sean 'Shaleh' Perry Tue, 9 Jan 2001 23:06:25 -0800 + +maintainer-scripts (2) unstable; urgency=low + + * Fix location of changelog. + * prerm and postrm do 'update-alternatives --remove'; should only complain + about postrm. + + -- Colin Watson Fri, 29 Dec 2000 06:01:24 +0000 + +maintainer-scripts (1) unstable; urgency=low + + * Initial version + * postinst and prerm set the usr/doc symlink + + -- Sean 'Shaleh' Perry Thu, 16 Nov 2000 09:11:40 -0800 diff --git a/t/recipes/checks/debhelper/legacy-maintainer-scripts/build-spec/debian/control.in b/t/recipes/checks/debhelper/legacy-maintainer-scripts/build-spec/debian/control.in new file mode 100644 index 0000000..63dd2db --- /dev/null +++ b/t/recipes/checks/debhelper/legacy-maintainer-scripts/build-spec/debian/control.in @@ -0,0 +1,18 @@ +Source: maintainer-scripts +Section: misc +Priority: optional +Maintainer: QA group +Uploaders: Anyone but Jeroen +Build-Depends: [% $build_depends %] +Standards-Version: 3.1.1 +Rules-Requires-Root: binary-targets +XS-Dm-Upload-Allowed: Yes + +Package: maintainer-scripts +Architecture: [% $package_architecture %] +Depends: test +Description: test lintian's maintainer script checks + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. diff --git a/t/recipes/checks/debhelper/legacy-maintainer-scripts/build-spec/debian/postinst b/t/recipes/checks/debhelper/legacy-maintainer-scripts/build-spec/debian/postinst new file mode 100644 index 0000000..e56ed3b --- /dev/null +++ b/t/recipes/checks/debhelper/legacy-maintainer-scripts/build-spec/debian/postinst @@ -0,0 +1,181 @@ +#! /bin/sh -e + +if [ "$1" = "configure" ]; then + if [ -d /usr/doc -a ! -e /usr/doc/maintainer-scripts -a -d /usr/share/doc/maintainer-scripts ]; then + ln -sf ../share/doc/maintainer-scripts /usr/doc/maintainer-scripts + fi +fi + +# valid +. /usr/share/lintian/shell || exit 0 +. /usr/share/lintian/shell >/dev/null +. /usr/share/lintian/shell 2>/dev/null +. /usr/share/lintian/shell /dev/null +update-rc.d $FOO defaults +update-rc.d foo remove + +# valid +FOO=/tmp +FOO=/var/tmp +: ${FOO:=/tmp} +FOO=`mktemp /tmp/scripts.XXXXXX` +rm "$FOO" +FOO=`tempfile -n/tmp/scripts.tmp` +mkdir /var/tmp/scripts +FOO="/tmp/false.positive.XXXXXX" +# invalid +echo foo >>/tmp/scripts.tmp +rm /tmp/scripts.tmp +rmdir /var/tmp/scripts + +# invalid, maintainer-script-hides-init-failure +invoke-rc.d foo start || exit 0 + +# The right way to invoke an rc script +if which invoke-rc.d >/dev/null 2>&1; then + invoke-rc.d package start +else + /etc/init.d/package start +fi + +# Example ucf invocation. +ucf /usr/share/foo/configuration /etc/foo.conf + +# Calling gconftool directly. +gconftool-2 --makefile-install-rule foo.schema + +# Calling gconf-schemas with no dependency. +gconf-schemas --register foo.schema + +# Calling update-xmlcatalog with no dependency. +update-xmlcatalog --add --type system --id "/usr/share/sgml/dtd/foo" \ + --package maintainer-scripts --root + +# Maintainer scripts shouldn't touch /var/lib/dpkg/status. This is the old +# recipe from the dpkg wiki that should be replaced with dpkg-query. +sed -n -e \"/^Conffiles:/,/^[^ ]/{\\\\' /etc/conffile'{s/.* //;p}}\" \ + /var/lib/dpkg/status + +# Don't modify these files. +echo 'broken 6714/tcp' >> /etc/services +cp /nonexistent /etc/protocols +mv /usr/share/doc/rpc /etc/rpc + +# But this is okay. +cp /etc/protocols /etc/protocols.new + +# This is also wrong. +echo 'broken' > /etc/inetd.conf +cp /etc/inetd.conf.new /etc/inetd.conf + +# But this is fine. +cp /etc/inetd.conf /srv/chroot/etc/inetd.conf + +# Deprecated +install-sgmlcatalog --install package +install-sgmlcatalog --remove package + +# This too is a heredoc. +some-program > /etc/config-file <<'EOF' +echo "All of the array is: ${H[@]}" +EOF + +# But this isn't. +cat '</dev/null; then + ucf --purge /etc/foo.conf +fi + +# This isn't allowed. +rm /tmp/foo /dev/device +rm /dev/device1 + +# But this is okay. +rm /tmp/foo > /dev/null + +# Not allowed here even with remove. +install-sgmlcatalog --remove package diff --git a/t/recipes/checks/debhelper/legacy-maintainer-scripts/build-spec/debian/preinst b/t/recipes/checks/debhelper/legacy-maintainer-scripts/build-spec/debian/preinst new file mode 100644 index 0000000..6058978 --- /dev/null +++ b/t/recipes/checks/debhelper/legacy-maintainer-scripts/build-spec/debian/preinst @@ -0,0 +1,18 @@ +#!/bin/sh + +update-rc.d foo remove +update-rc.d bar defaults + +# Obsolete dpkg assertions. +dpkg --assert-support-predepends || exit 1 +dpkg --assert-working-epoch || exit 1 +dpkg --assert-long-filenames || exit 1 +dpkg --assert-multi-conrep || exit 1 + +/bin/grep -E --mmap "^Package: foo$" /var/lib/dpkg/status + +# continuation lines +update-alternatives --install /usr/bin/fakeroot fakeroot \ + /usr/bin/fakeroot-ng 5 \ + --slave /usr/share/man/man1/fakeroot.1.gz \ + fakeroot.1.gz /usr/share/man/man1/fakeroot-ng.1.gz diff --git a/t/recipes/checks/debhelper/legacy-maintainer-scripts/build-spec/debian/prerm b/t/recipes/checks/debhelper/legacy-maintainer-scripts/build-spec/debian/prerm new file mode 100644 index 0000000..076ecaf --- /dev/null +++ b/t/recipes/checks/debhelper/legacy-maintainer-scripts/build-spec/debian/prerm @@ -0,0 +1,188 @@ +#!/bin/sh + +if [ "$1" != "upgrade" ]; then + update-alternatives --remove dummy /usr/bin/dummy-alternative +fi + +if ([ "$1" = "upgrade" ] || [ "$1" = "remove" ]) && [ -L /usr/doc/maintainer-scripts ]; the +n + rm -f /usr/doc/maintainer-scripts +fi + +cat </dev/null +} + +source $FOO + +trap "echo hi" EXIT HUP 3 + +if [[ "$2" = "purge" ]]; then + kill -HUP $$ +fi + +#this is ok though +if test -n $(echo foo | perl -pe 's/[[:space:]]//go'); then + echo 1 +fi + +update-rc.d foo remove + +# More false positives for bashism checks. None of these are errors. +echo "$line" | grep -q '{fonts/map,}/{\$progname,pdftex,dvips,}//' +echo "$line" | grep -q "${fonts},${foo}" +echo '$[1+2]' +printf "foo |& bar" +perl -e "print q( kill -HUP $? )" + +# Still catch disallowed expansions in double-quotes, though. +echo "${line:3:1}" + +# The wrong way to run an init script (no invoke-rc.d). +/etc/init.d/package stop + +# This is the only install-sgmlcatalog call that's allowed. +install-sgmlcatalog --quiet --remove package + +# More bashisms checks + +read -x foo +read -x +read -r foo +read foo +read + +echo "a\\b" +echo 'a\nb' + +echo "${UID}" +echo "$EUID" +echo "$SHLVL" +echo "$DIRSTACK" +echo "$SECONDS" +echo "$BASH" +echo "$BASH_FOO" +echo "$SHELLOPTS" +echo "$PIPESTATUS" + +bar="$(cut '-d|' -f2 <<< "$foo")" + +VAR=1 +VAR+=a + +echos() { + echo -n -e "bar" + echo -e -n "bar" + echo -en "bar" + echo -ne "bar" + echo "bar" + echo "echo -e foo" +} + +ech.os() { + echo foo >& 2 + echo foo >&bar + echo foo >& bar +} + +echoes() { + echo "abc\nxyz" + echo 'xyz\rabc' + echo foo\cbar + + echo -e "abc\nxyz" + echo -net 'xyz\rabc' + echo -e foo\cbar +} + +foobar.() { + suspend x + suspended x + caller x + complete x + compgen x + declare -a foo +} + +.foobar() { + typeset -x bar + disown 1 + builtin foo + set -B + alias -p + unalias -a +} + +IFS="()" + +ulimit +shopt +type -v bar +time ls +dirs +diff <(tac a) <(tac b) + +pushd + +local foo=bar +local -x foo + +popd + +readonly -f + +echo bar > /dev/tcp +export x +export -x x +export -p x + +sh -x +sh -D +sh --foo +sh +O + +# Brace expansion checks +echo {a,b} +echo {abc},{bcd} + +foobar() +{ + # This is a function +} + + foo.bar() +( + # This is a function with a bad name +) + +foobar@() +{ + # As is this +} + +# This is ok +read -r foo +# but these aren't +read -r +read -p "Would you like to restart the service?" foo bar +read --fish + +set -e + +source "$BAR" +source '$BAR' +source ~/bar +source a diff --git a/t/recipes/checks/debhelper/legacy-maintainer-scripts/build-spec/debian/rules b/t/recipes/checks/debhelper/legacy-maintainer-scripts/build-spec/debian/rules new file mode 100755 index 0000000..5fcef00 --- /dev/null +++ b/t/recipes/checks/debhelper/legacy-maintainer-scripts/build-spec/debian/rules @@ -0,0 +1,35 @@ +#!/usr/bin/make -f + +build-arch: + +build-indep: + +build: build-arch build-indep + +binary-arch: + +binary-indep: + install -d debian/tmp/DEBIAN + install -m 0755 debian/preinst debian/tmp/DEBIAN + install -m 0755 debian/postinst debian/tmp/DEBIAN + install -m 0755 debian/prerm debian/tmp/DEBIAN + install -m 0755 debian/postrm debian/tmp/DEBIAN + install -m 0644 debian/triggers debian/tmp/DEBIAN + install -d debian/tmp/usr/share/doc/maintainer-scripts + install -m 0644 debian/changelog \ + debian/tmp/usr/share/doc/maintainer-scripts/changelog + gzip -n -9 debian/tmp/usr/share/doc/maintainer-scripts/changelog + dpkg-gencontrol -isp + dpkg --build debian/tmp .. + +binary: binary-arch binary-indep + +# Make sure we see dh_clean even in a rule clean depends on. Not the point of +# this test suite, but a convenient place to put it. +clean: clean1 clean2 clean3 +clean1: +clean2: + dh_clean +clean3: + +.PHONY: build-arch build-indep build binary-arch binary-indep binary clean diff --git a/t/recipes/checks/debhelper/legacy-maintainer-scripts/build-spec/debian/triggers b/t/recipes/checks/debhelper/legacy-maintainer-scripts/build-spec/debian/triggers new file mode 100644 index 0000000..f627094 --- /dev/null +++ b/t/recipes/checks/debhelper/legacy-maintainer-scripts/build-spec/debian/triggers @@ -0,0 +1,4 @@ +# Example triggers file +activate foo + +interest bar diff --git a/t/recipes/checks/debhelper/legacy-maintainer-scripts/build-spec/debian/watch b/t/recipes/checks/debhelper/legacy-maintainer-scripts/build-spec/debian/watch new file mode 100644 index 0000000..430eea3 --- /dev/null +++ b/t/recipes/checks/debhelper/legacy-maintainer-scripts/build-spec/debian/watch @@ -0,0 +1,11 @@ +# A whitespace is fine for uscan: + version=5 + +# Following line should not be matched: +#opts=uversionmangle=s/$/+debian/,dversionmangle=s/foo/bar/ \ +# Following one is incorrect, there's a missing backslash at the end +opts=uversionmangle=s/$/+dfsg/,dversionmangle=s/foo/bar/ + +# 'active' is useless here, but it works anyway +options=active \ +http://domain.tld/foo-(.+)\.tar\.gz \ No newline at end of file diff --git a/t/recipes/checks/debhelper/legacy-maintainer-scripts/build-spec/fill-values b/t/recipes/checks/debhelper/legacy-maintainer-scripts/build-spec/fill-values new file mode 100644 index 0000000..c281e87 --- /dev/null +++ b/t/recipes/checks/debhelper/legacy-maintainer-scripts/build-spec/fill-values @@ -0,0 +1,6 @@ +Skeleton: upload-non-native +Testname: legacy-maintainer-scripts +Source: maintainer-scripts +Version: 7+dfsg-0.1 +Description: Legacy test "maintainer-scripts" +Extra-Build-Depends: dash (>= 0.5.10.2) diff --git a/t/recipes/checks/debhelper/legacy-maintainer-scripts/eval/desc b/t/recipes/checks/debhelper/legacy-maintainer-scripts/eval/desc new file mode 100644 index 0000000..5ba2249 --- /dev/null +++ b/t/recipes/checks/debhelper/legacy-maintainer-scripts/eval/desc @@ -0,0 +1,2 @@ +Testname: legacy-maintainer-scripts +Check: debhelper diff --git a/t/recipes/checks/debhelper/legacy-maintainer-scripts/eval/hints b/t/recipes/checks/debhelper/legacy-maintainer-scripts/eval/hints new file mode 100644 index 0000000..9a512b8 --- /dev/null +++ b/t/recipes/checks/debhelper/legacy-maintainer-scripts/eval/hints @@ -0,0 +1,4 @@ +maintainer-scripts (source): debian-build-system debhelper [debian/rules] +maintainer-scripts (source): debhelper-compat-virtual-relation 13 [debian/control] +maintainer-scripts (source): debhelper-compat-level 13 +maintainer-scripts (source): debhelper-but-no-misc-depends maintainer-scripts diff --git a/t/recipes/checks/debhelper/legacy-maintainer-scripts/eval/post-test b/t/recipes/checks/debhelper/legacy-maintainer-scripts/eval/post-test new file mode 100644 index 0000000..faeef0b --- /dev/null +++ b/t/recipes/checks/debhelper/legacy-maintainer-scripts/eval/post-test @@ -0,0 +1 @@ +s/\(current is ([0-9]+\.)+[0-9]\)/(current is CURRENT)/ diff --git a/t/recipes/checks/debhelper/legacy-scripts/build-spec/debian/changelog.in b/t/recipes/checks/debhelper/legacy-scripts/build-spec/debian/changelog.in new file mode 100644 index 0000000..935c633 --- /dev/null +++ b/t/recipes/checks/debhelper/legacy-scripts/build-spec/debian/changelog.in @@ -0,0 +1,41 @@ +scripts ([% $version %]) [% $distribution %]; urgency=low + + * I'm also not able to write my name. + * Added a script in /etc/Xsession.d + * Bizarre version number courtesy of + https://wiki.ubuntu.com/SecurityUpdateProcedures#Prepare + + -- Mark 'HE' Brokschmitt Thu, 23 Jun 2005 14:32:39 +0200 + +scripts (5-1) unstable; urgency=low + + * I'm making a typo in my own name... And I want lintian to warn me about + it. + + -- Jeroen van Wolffelaar Sun, 18 Apr 2004 02:26:34 +0200 + +scripts (4-1) unstable; urgency=low + + * Add new example to check that not executable files with a shebang line + called *in don't trigger the script-not-executable warning. + + -- Marc 'HE' Brockschmidt Wed, 14 Apr 2004 19:44:04 +0200 + +scripts (3-3) unstable; urgency=low + + * Add suidperlfoo and some code in debian/rules to + check the new suidperl checks + + -- Frank Lichtenheld Wed, 31 Mar 2004 21:06:20 +0000 + +scripts (2-1) unstable; urgency=low + + * Add tkfoo script for tk checkings + + -- Lintian Maintainers Sat, 21 Feb 2004 17:13:36 +0100 + +scripts (1-0) unstable; urgency=low + + * Initial version + + -- Lintian Maintainers Sat, 10 Feb 2001 15:37:31 -0800 diff --git a/t/recipes/checks/debhelper/legacy-scripts/build-spec/debian/control.in b/t/recipes/checks/debhelper/legacy-scripts/build-spec/debian/control.in new file mode 100644 index 0000000..75a521f --- /dev/null +++ b/t/recipes/checks/debhelper/legacy-scripts/build-spec/debian/control.in @@ -0,0 +1,16 @@ +Source: scripts +Section: interpreters +Priority: optional +Maintainer: Lintian Maintainers +Uploaders: Jeroen van Wolfelaar , Marc 'HE' Brockschmidt +Build-Depends-Indep: dpatch +Standards-Version: 3.2.1 + +Package: scripts +Architecture: [% $package_architecture %] +Depends: test, ruby1.8, build-essential, libssl0.9.7, php7.0-cli +Recommends: tk8.4 | wish +Description: test lintian's script file checks + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. diff --git a/t/recipes/checks/debhelper/legacy-scripts/build-spec/debian/copyright b/t/recipes/checks/debhelper/legacy-scripts/build-spec/debian/copyright new file mode 100644 index 0000000..ad8a119 --- /dev/null +++ b/t/recipes/checks/debhelper/legacy-scripts/build-spec/debian/copyright @@ -0,0 +1,5 @@ +This file contains the phrase "under the same terms as Perl itself" to +trigger warnings about not having common-licenses references. + +This file contains the phrase "public domain" which should suppress +warnings about no copyright date. diff --git a/t/recipes/checks/debhelper/legacy-scripts/build-spec/debian/patches/00list b/t/recipes/checks/debhelper/legacy-scripts/build-spec/debian/patches/00list new file mode 100644 index 0000000..3b9d37e --- /dev/null +++ b/t/recipes/checks/debhelper/legacy-scripts/build-spec/debian/patches/00list @@ -0,0 +1,11 @@ +01_not_here_right_now.dpatch + +# some comment +/* some more + elaborate comment + which needs DPATCH_OPTION_CPP=1 + */02_i_dont_have_a_description.patch 03_specified_without_dpatch + +// and again a comment + +04_i_dont_have_a_description_either.patch diff --git a/t/recipes/checks/debhelper/legacy-scripts/build-spec/debian/patches/00list.sparc b/t/recipes/checks/debhelper/legacy-scripts/build-spec/debian/patches/00list.sparc new file mode 100644 index 0000000..8b47ab3 --- /dev/null +++ b/t/recipes/checks/debhelper/legacy-scripts/build-spec/debian/patches/00list.sparc @@ -0,0 +1 @@ +01_some_other_patch_thats_not_in_the_package.dpatch diff --git a/t/recipes/checks/debhelper/legacy-scripts/build-spec/debian/patches/00options b/t/recipes/checks/debhelper/legacy-scripts/build-spec/debian/patches/00options new file mode 100644 index 0000000..57ffeb6 --- /dev/null +++ b/t/recipes/checks/debhelper/legacy-scripts/build-spec/debian/patches/00options @@ -0,0 +1 @@ +DPATCH_OPTION_CPP=1 diff --git a/t/recipes/checks/debhelper/legacy-scripts/build-spec/debian/patches/02_i_dont_have_a_description.patch b/t/recipes/checks/debhelper/legacy-scripts/build-spec/debian/patches/02_i_dont_have_a_description.patch new file mode 100644 index 0000000..9279c1b --- /dev/null +++ b/t/recipes/checks/debhelper/legacy-scripts/build-spec/debian/patches/02_i_dont_have_a_description.patch @@ -0,0 +1,7 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 02_i_dont_have_a_description.patch.dpatch by Marc 'HE' Brockschmidt > +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: No description. + +@DPATCH@ diff --git a/t/recipes/checks/debhelper/legacy-scripts/build-spec/debian/patches/03_specified_without_dpatch.dpatch b/t/recipes/checks/debhelper/legacy-scripts/build-spec/debian/patches/03_specified_without_dpatch.dpatch new file mode 100644 index 0000000..8303ac6 --- /dev/null +++ b/t/recipes/checks/debhelper/legacy-scripts/build-spec/debian/patches/03_specified_without_dpatch.dpatch @@ -0,0 +1,5 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## All lines beginning with `## DP:' are a description of the patch. +## DP: Listed in 00list without .dpatch suffix. + +@DPATCH@ diff --git a/t/recipes/checks/debhelper/legacy-scripts/build-spec/debian/patches/04_i_dont_have_a_description_either.patch b/t/recipes/checks/debhelper/legacy-scripts/build-spec/debian/patches/04_i_dont_have_a_description_either.patch new file mode 100644 index 0000000..b603f16 --- /dev/null +++ b/t/recipes/checks/debhelper/legacy-scripts/build-spec/debian/patches/04_i_dont_have_a_description_either.patch @@ -0,0 +1,7 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 04_i_dont_have_a_description_either.patch by Adam D. Barratt +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: + +@DPATCH@ diff --git a/t/recipes/checks/debhelper/legacy-scripts/build-spec/debian/postinst b/t/recipes/checks/debhelper/legacy-scripts/build-spec/debian/postinst new file mode 100644 index 0000000..7c5baf1 --- /dev/null +++ b/t/recipes/checks/debhelper/legacy-scripts/build-spec/debian/postinst @@ -0,0 +1,14 @@ +#!/bin/sh + +if [ -x "/etc/init.d/lsb-broken" ] ; then + update-rc.d lsb-broken defaults >/dev/null +fi +if [ -x "/etc/init.d/no-lsb" ] ; then + update-rc.d no-lsb defaults >/dev/null +fi +if [ -x "/etc/init.d/skeleton" ] ; then + update-rc.d skeleton defaults >/dev/null +fi +if [ -x "/etc/init.d/lsb-other" ] ; then + update-rc.d lsb-other defaults >/dev/null +fi diff --git a/t/recipes/checks/debhelper/legacy-scripts/build-spec/debian/postrm b/t/recipes/checks/debhelper/legacy-scripts/build-spec/debian/postrm new file mode 100644 index 0000000..8fa75a2 --- /dev/null +++ b/t/recipes/checks/debhelper/legacy-scripts/build-spec/debian/postrm @@ -0,0 +1,9 @@ +#!/bin/sh -e + +if [ "$1" = purge ] ; then + update-rc.d lsb-broken remove >/dev/null + update-rc.d no-lsb remove >/dev/null + update-rc.d skeleton remove >/dev/null + update-rc.d lsb-other remove >/dev/null + update-rc.d lsb-other remove >/dev/null +fi diff --git a/t/recipes/checks/debhelper/legacy-scripts/build-spec/debian/preinst b/t/recipes/checks/debhelper/legacy-scripts/build-spec/debian/preinst new file mode 100644 index 0000000..0799557 --- /dev/null +++ b/t/recipes/checks/debhelper/legacy-scripts/build-spec/debian/preinst @@ -0,0 +1,15 @@ +#!/bin/sh + +set -e +set -x + +# +# Some comments here +# + +# This serves as an example of an "empty" script, so +# please do not add any real code here, thank you :) + +#DEBHELPER# + +exit 0 diff --git a/t/recipes/checks/debhelper/legacy-scripts/build-spec/debian/rules b/t/recipes/checks/debhelper/legacy-scripts/build-spec/debian/rules new file mode 100755 index 0000000..ee3677e --- /dev/null +++ b/t/recipes/checks/debhelper/legacy-scripts/build-spec/debian/rules @@ -0,0 +1,105 @@ +#!/usr/bin/make -f + +tmp=debian/tmp + +build-arch: + echo "Hi, in an arch: all package, I am a bug!" + +build-indep: + +build: build-arch build-indep + +binary-arch: + echo "Hi, in an arch: all package, I am a bug!" + +binary-indep: + install -d $(tmp)/usr/bin/ + install -d $(tmp)/etc/X11/Xsession.d/ + install -d $(tmp)/etc/init.d/ + install -d $(tmp)/etc/csh/login.d/ + install -d $(tmp)/etc/fish.d/ + install -d $(tmp)/usr/share/scripts/ + install -d $(tmp)/usr/share/doc/scripts/ + install -d $(tmp)/usr/lib/cgi-bin + install -d $(tmp)/usr/src/scripts + install -d $(tmp)/DEBIAN + + install -m 755 csh-foo $(tmp)/etc/csh/login.d/ + install -m 755 envfoo $(tmp)/usr/bin/ + install -m 755 fish-foo $(tmp)/etc/fish.d/ + install -m 755 jruby-broken $(tmp)/usr/bin/ + install -m 755 perlfoo $(tmp)/usr/bin/ + install -m 755 rubyfoo $(tmp)/usr/bin/ +# This doesn't use "env" but should also trigger script-in-usr-share-doc + install -m 755 rubyfoo $(tmp)/usr/share/doc/scripts/ + install -m 755 make-foo $(tmp)/usr/bin/ + install -m 755 lefty-foo $(tmp)/usr/bin/ + install -m 4751 perlfoo $(tmp)/usr/bin/suidperlfoo2 + install -m 755 sh-broken $(tmp)/usr/bin/ + install -m 4555 suidperlfoo $(tmp)/usr/bin/ + install -m 755 tkfoo $(tmp)/usr/bin/ + install -m 755 wishfoo $(tmp)/usr/bin/ + install -m 644 xsession-test $(tmp)/etc/X11/Xsession.d/ + +# Permissions here aren't part of what's being tested, but let us exercise +# some other errors. + install -m 755 perl-bizarre-1 $(tmp)/usr/bin/ + install -m 750 perl-bizarre-2 $(tmp)/usr/bin/ + install -m 754 perl-bizarre-3 $(tmp)/usr/bin/ + install -m 705 guile-bizarre $(tmp)/usr/bin/ + +# First one should produce a warning; second one shouldn't. + install -m 755 gccbug.dpatch $(tmp)/usr/share/scripts/ + install -m 755 gccbug.dpatch $(tmp)/usr/src/scripts/ + + install -m 644 init-skeleton $(tmp)/etc/init.d/skeleton + install -m 755 init-no-lsb $(tmp)/etc/init.d/no-lsb + install -m 755 init-lsb-broken $(tmp)/etc/init.d/lsb-broken + install -m 755 init-lsb-other $(tmp)/etc/init.d/lsb-other + + install -m 755 phpfoo $(tmp)/usr/share/scripts/ + sed 's/php$$/php7.0/' phpfoo > $(tmp)/usr/share/scripts/php7.0foo + chmod 755 $(tmp)/usr/share/scripts/php7.0foo + + install -m 755 phpenvfoo $(tmp)/usr/share/scripts/ + sed 's/php$$/php7.0/' phpenvfoo > $(tmp)/usr/share/scripts/php7.0envfoo + chmod 755 $(tmp)/usr/share/scripts/php7.0envfoo + + echo "#!/usr/bin/perl" >> $(tmp)/usr/share/scripts/foobar.in + chmod 644 $(tmp)/usr/share/scripts/foobar.in + + touch $(tmp)/usr/share/scripts/mono.exe + chmod 755 $(tmp)/usr/share/scripts/mono.exe + + echo "#!/bin/sh" > $(tmp)/usr/share/scripts/foo\$$bar + chmod 755 $(tmp)/usr/share/scripts/foo\$$bar + + echo "#!/bin/sh" > $(tmp)/usr/lib/cgi-bin/cgi-script + chmod 755 $(tmp)/usr/lib/cgi-bin/cgi-script + + echo "#!/bin/sh" > $(tmp)/usr/bin/test.sh + chmod 755 $(tmp)/usr/bin/test.sh + + + dh_testroot # dummy to test missing debhelper dependency + + + install -m 644 debian/changelog $(tmp)/usr/share/doc/scripts/changelog.Debian + gzip -n -9 $(tmp)/usr/share/doc/scripts/changelog.Debian + install -m 644 debian/copyright $(tmp)/usr/share/doc/scripts/copyright + + install -m 644 debian/scripts.conffiles $(tmp)/DEBIAN/conffiles + install -m 755 debian/preinst $(tmp)/DEBIAN/preinst + install -m 755 debian/postinst $(tmp)/DEBIAN/postinst + install -m 755 debian/postrm $(tmp)/DEBIAN/postrm + touch $(tmp)/DEBIAN/prerm + chmod 755 $(tmp)/DEBIAN/prerm + dpkg-gencontrol -isp + dpkg --build $(tmp) .. + +binary: binary-arch binary-indep + +clean: + rm -rf debian/files $(tmp) debian/substvars + +.PHONY: build-arch build-indep build binary-arch binary-indep binary clean diff --git a/t/recipes/checks/debhelper/legacy-scripts/build-spec/debian/scripts.conffiles b/t/recipes/checks/debhelper/legacy-scripts/build-spec/debian/scripts.conffiles new file mode 100644 index 0000000..01a371a --- /dev/null +++ b/t/recipes/checks/debhelper/legacy-scripts/build-spec/debian/scripts.conffiles @@ -0,0 +1,6 @@ +/etc/init.d/lsb-broken +/etc/init.d/lsb-other +/etc/init.d/no-lsb +/etc/X11/Xsession.d/xsession-test +/etc/csh/login.d/csh-foo +/etc/fish.d/fish-foo diff --git a/t/recipes/checks/debhelper/legacy-scripts/build-spec/debian/watch b/t/recipes/checks/debhelper/legacy-scripts/build-spec/debian/watch new file mode 100644 index 0000000..dba5815 --- /dev/null +++ b/t/recipes/checks/debhelper/legacy-scripts/build-spec/debian/watch @@ -0,0 +1,8 @@ +# watch file with upstream version mangling + +version=2 +opts="uversionmangle=s/$/ds/" \ +http://qa.debian.org/watch/sf.php?project=foo scripts\.([\d.]+)\.tar\.gz debian uupdate + +version=3 +http://ftp.sf.net/foo/foo_bar(.+)\.Z 5 uupdate \ No newline at end of file diff --git a/t/recipes/checks/debhelper/legacy-scripts/build-spec/fill-values b/t/recipes/checks/debhelper/legacy-scripts/build-spec/fill-values new file mode 100644 index 0000000..8a68457 --- /dev/null +++ b/t/recipes/checks/debhelper/legacy-scripts/build-spec/fill-values @@ -0,0 +1,6 @@ +Testname: legacy-scripts +Source: scripts +Version: 6ds-1ubuntu0.5.10.1 +Package-Architecture: all +Skeleton: upload-non-native +Description: Legacy test "scripts" diff --git a/t/recipes/checks/debhelper/legacy-scripts/build-spec/orig/csh-foo b/t/recipes/checks/debhelper/legacy-scripts/build-spec/orig/csh-foo new file mode 100644 index 0000000..eaf47a1 --- /dev/null +++ b/t/recipes/checks/debhelper/legacy-scripts/build-spec/orig/csh-foo @@ -0,0 +1,2 @@ +#! /bin/csh + diff --git a/t/recipes/checks/debhelper/legacy-scripts/build-spec/orig/envfoo b/t/recipes/checks/debhelper/legacy-scripts/build-spec/orig/envfoo new file mode 100755 index 0000000..e005037 --- /dev/null +++ b/t/recipes/checks/debhelper/legacy-scripts/build-spec/orig/envfoo @@ -0,0 +1,4 @@ +#! /bin/env python + +if __name__ == '__main__': + print 'Hi there' diff --git a/t/recipes/checks/debhelper/legacy-scripts/build-spec/orig/fish-foo b/t/recipes/checks/debhelper/legacy-scripts/build-spec/orig/fish-foo new file mode 100644 index 0000000..7f59139 --- /dev/null +++ b/t/recipes/checks/debhelper/legacy-scripts/build-spec/orig/fish-foo @@ -0,0 +1,2 @@ +#! /usr/bin/fish + diff --git a/t/recipes/checks/debhelper/legacy-scripts/build-spec/orig/gccbug.dpatch b/t/recipes/checks/debhelper/legacy-scripts/build-spec/orig/gccbug.dpatch new file mode 100755 index 0000000..65cbf37 --- /dev/null +++ b/t/recipes/checks/debhelper/legacy-scripts/build-spec/orig/gccbug.dpatch @@ -0,0 +1,39 @@ +#! /bin/sh -e + +# DP: Use sensible-editor instead of vi as fallback editor + +# Taken from gcc-4.1-source. Chokes bash -n (due to the patch) despite being +# a valid dpatch, so don't warn about it if it's in /usr/src. + +dir= +if [ $# -eq 3 -a "$2" = '-d' ]; then + pdir="-d $3" + dir="$3/" +elif [ $# -ne 1 ]; then + echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" + exit 1 +fi +case "$1" in + -patch) + patch $pdir -f --no-backup-if-mismatch -p0 < $0 + ;; + -unpatch) + patch $pdir -f --no-backup-if-mismatch -R -p0 < $0 + ;; + *) + echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" + exit 1 +esac +exit 0 + +--- gcc/gccbug.in~ 2003-03-01 00:51:42.000000000 +0100 ++++ gcc/gccbug.in 2003-03-02 12:08:36.000000000 +0100 +@@ -134,7 +134,7 @@ + # If they don't have a preferred editor set, then use + if [ -z "$VISUAL" ]; then + if [ -z "$EDITOR" ]; then +- EDIT=vi ++ EDIT=/usr/bin/sensible-editor + else + EDIT="$EDITOR" + fi diff --git a/t/recipes/checks/debhelper/legacy-scripts/build-spec/orig/guile-bizarre b/t/recipes/checks/debhelper/legacy-scripts/build-spec/orig/guile-bizarre new file mode 100644 index 0000000..70e2c74 --- /dev/null +++ b/t/recipes/checks/debhelper/legacy-scripts/build-spec/orig/guile-bizarre @@ -0,0 +1,6 @@ +#! /bin/sh +# -*- scheme -*- +exec guile -s $0 $* +# Seen in the wild as build-guile-gtk in libguilegtk-1.2-dev (0.31-5.1) +# Tests script_is_evil_and_wrong +!# diff --git a/t/recipes/checks/debhelper/legacy-scripts/build-spec/orig/init-lsb-broken b/t/recipes/checks/debhelper/legacy-scripts/build-spec/orig/init-lsb-broken new file mode 100644 index 0000000..e4dfa92 --- /dev/null +++ b/t/recipes/checks/debhelper/legacy-scripts/build-spec/orig/init-lsb-broken @@ -0,0 +1,34 @@ +#! /bin/sh +### BEGIN INIT INFO +# Provides: bad-lsb +# Required-Start: $local_fs $remote_fs +# Required-Stop: +# Default-Start: 1 2 3 4 5 +# Default-Stop: S 0 1 6 X +# Short-Description: Example Lintian initscript +# but this can't be continued +# Description: An example of a bad LSB section in an init script. +# This continuation is allowed (with spaces). +# This one is too (with tabs). +# X-Debian-Foo: Some unknown but valid keyword. +# Foo: Some invalid keyword. + +# Whoops, no terminating line. + +# And then we have this duplicate section. +### BEGIN INIT INFO +# Required-Start: This one doesn't count. +### END INIT INFO + +# Hey, look at all of those missing actions! But stop isn't missing. +case "$1" in + start|stop) + echo "Blah" + ;; + *) + echo "Usage: foo start" >&2 + exit 3 + ;; +esac + +: diff --git a/t/recipes/checks/debhelper/legacy-scripts/build-spec/orig/init-lsb-other b/t/recipes/checks/debhelper/legacy-scripts/build-spec/orig/init-lsb-other new file mode 100644 index 0000000..adb4795 --- /dev/null +++ b/t/recipes/checks/debhelper/legacy-scripts/build-spec/orig/init-lsb-other @@ -0,0 +1,22 @@ +#! /bin/sh +### BEGIN INIT INFO +# Provides: lsb-other +# Required-Start: $local_fs $remote_fs +# Required-Stop: $local_fs $remote_fs +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +# Description: This is another LSB script test, which has a missing +# Short-Description. +### END INIT INFO + +case "$1" in + start|stop|restart|reload|force-reload) + echo "Blah" + ;; + *) + echo "Usage: foo start" >&2 + exit 3 + ;; +esac + +: diff --git a/t/recipes/checks/debhelper/legacy-scripts/build-spec/orig/init-no-lsb b/t/recipes/checks/debhelper/legacy-scripts/build-spec/orig/init-no-lsb new file mode 100644 index 0000000..6b994dd --- /dev/null +++ b/t/recipes/checks/debhelper/legacy-scripts/build-spec/orig/init-no-lsb @@ -0,0 +1,17 @@ +#! /bin/sh +# No LSB section, but otherwise okay. (Well, the messages are bad, but we +# don't check that yet.) + +case "$1" in + start) + echo "Blah starting" + ;; + stop) + echo "Blah stopping" + ;; + restart|force-reload) + echo "Blah restarting" + ;; +esac + +: diff --git a/t/recipes/checks/debhelper/legacy-scripts/build-spec/orig/init-skeleton b/t/recipes/checks/debhelper/legacy-scripts/build-spec/orig/init-skeleton new file mode 100644 index 0000000..c868508 --- /dev/null +++ b/t/recipes/checks/debhelper/legacy-scripts/build-spec/orig/init-skeleton @@ -0,0 +1,150 @@ +#! /bin/sh +### BEGIN INIT INFO +# Provides: skeleton +# Required-Start: $local_fs $remote_fs +# Required-Stop: $local_fs $remote_fs +# Default-Start: 2 3 4 5 +# Default-Stop: S 0 1 6 +# Short-Description: Example Lintian initscript +# Description: This file should be used to construct scripts to be +# placed in /etc/init.d. +### END INIT INFO + +# Do NOT "set -e" + +# PATH should only include /usr/* if it runs after the mountnfs.sh script +PATH=/usr/sbin:/usr/bin:/sbin:/bin +DESC="Description of the service" +NAME=daemonexecutablename +DAEMON=/usr/sbin/$NAME +DAEMON_ARGS="--options args" +PIDFILE=/var/run/$NAME.pid +SCRIPTNAME=/etc/init.d/$NAME + +# Exit if the package is not installed +[ -x "$DAEMON" ] || exit 0 + +# Read configuration variable file if it is present +[ -r /etc/default/$NAME ] && . /etc/default/$NAME + +# Load the VERBOSE setting and other rcS variables +[ -f /etc/default/rcS ] && . /etc/default/rcS + +# Define LSB log_* functions. +# Depend on lsb-base (>= 3.0-6) to ensure that this file is present. +. /lib/lsb/init-functions + +# +# Function that starts the daemon/service +# +do_start() +{ + # Return + # 0 if daemon has been started + # 1 if daemon was already running + # 2 if daemon could not be started + start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON --test > /dev/null \ + || return 1 + start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON -- \ + $DAEMON_ARGS \ + || return 2 + # Add code here, if necessary, that waits for the process to be ready + # to handle requests from services started subsequently which depend + # on this one. As a last resort, sleep for some time. +} + +# +# Function that stops the daemon/service +# +do_stop() +{ + # Return + # 0 if daemon has been stopped + # 1 if daemon was already stopped + # 2 if daemon could not be stopped + # other if a failure occurred + start-stop-daemon --stop --quiet --retry=TERM/30/KILL/5 --pidfile $PIDFILE --name $NAME + RETVAL="$?" + [ "$RETVAL" = 2 ] && return 2 + # Wait for children to finish too if this is a daemon that forks + # and if the daemon is only ever run from this initscript. + # If the above conditions are not satisfied then add some other code + # that waits for the process to drop all resources that could be + # needed by services started subsequently. A last resort is to + # sleep for some time. + start-stop-daemon --stop --quiet --oknodo --retry=0/30/KILL/5 --exec $DAEMON + [ "$?" = 2 ] && return 2 + # Many daemons don't delete their pidfiles when they exit. + rm -f $PIDFILE + return "$RETVAL" +} + +# +# Function that sends a SIGHUP to the daemon/service +# +do_reload() { + # + # If the daemon can reload its configuration without + # restarting (for example, when it is sent a SIGHUP), + # then implement that here. + # + start-stop-daemon --stop --signal 1 --quiet --pidfile $PIDFILE --name $NAME + return 0 +} + +case "$1" in + start) + [ "$VERBOSE" != no ] && log_daemon_msg "Starting $DESC" "$NAME" + do_start + case "$?" in + 0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;; + 2) [ "$VERBOSE" != no ] && log_end_msg 1 ;; + esac + ;; + stop) + [ "$VERBOSE" != no ] && log_daemon_msg "Stopping $DESC" "$NAME" + do_stop + case "$?" in + 0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;; + 2) [ "$VERBOSE" != no ] && log_end_msg 1 ;; + esac + ;; + #reload|force-reload) + # + # If do_reload() is not implemented then leave this commented out + # and leave 'force-reload' as an alias for 'restart'. + # + #log_daemon_msg "Reloading $DESC" "$NAME" + #do_reload + #log_end_msg $? + #;; + restart|force-reload) + # + # If the "reload" option is implemented then remove the + # 'force-reload' alias + # + log_daemon_msg "Restarting $DESC" "$NAME" + do_stop + case "$?" in + 0|1) + do_start + case "$?" in + 0) log_end_msg 0 ;; + 1) log_end_msg 1 ;; # Old process is still running + *) log_end_msg 1 ;; # Failed to start + esac + ;; + *) + # Failed to stop + log_end_msg 1 + ;; + esac + ;; + *) + #echo "Usage: $SCRIPTNAME {start|stop|restart|reload|force-reload}" >&2 + echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload}" >&2 + exit 3 + ;; +esac + +: diff --git a/t/recipes/checks/debhelper/legacy-scripts/build-spec/orig/jruby-broken b/t/recipes/checks/debhelper/legacy-scripts/build-spec/orig/jruby-broken new file mode 100644 index 0000000..56f574d --- /dev/null +++ b/t/recipes/checks/debhelper/legacy-scripts/build-spec/orig/jruby-broken @@ -0,0 +1,2 @@ +#!/usr/bin/jruby +# There's no non-versioned jruby, so this should be an error. diff --git a/t/recipes/checks/debhelper/legacy-scripts/build-spec/orig/lefty-foo b/t/recipes/checks/debhelper/legacy-scripts/build-spec/orig/lefty-foo new file mode 100644 index 0000000..52c003e --- /dev/null +++ b/t/recipes/checks/debhelper/legacy-scripts/build-spec/orig/lefty-foo @@ -0,0 +1,2 @@ +#!/usr/local/bin/lefty + diff --git a/t/recipes/checks/debhelper/legacy-scripts/build-spec/orig/make-foo b/t/recipes/checks/debhelper/legacy-scripts/build-spec/orig/make-foo new file mode 100644 index 0000000..6b787b5 --- /dev/null +++ b/t/recipes/checks/debhelper/legacy-scripts/build-spec/orig/make-foo @@ -0,0 +1,3 @@ +#!/usr/bin/make + + diff --git a/t/recipes/checks/debhelper/legacy-scripts/build-spec/orig/perl-bizarre-1 b/t/recipes/checks/debhelper/legacy-scripts/build-spec/orig/perl-bizarre-1 new file mode 100644 index 0000000..fc632c8 --- /dev/null +++ b/t/recipes/checks/debhelper/legacy-scripts/build-spec/orig/perl-bizarre-1 @@ -0,0 +1,11 @@ +#! /bin/sh +eval '(exit $?0)' && eval 'PERL_BADLANG=x;export PERL_BADLANG;: \ +;exec perl -x -S -- "$0" ${1+"$@"};#'if 0; +eval 'setenv PERL_BADLANG x;exec perl -x -S -- "$0" $argv:q;#'.q+ +#!perl -w +package Htex::a2ping; $0=~/(.*)/s;unshift@INC,'.';do($1);die$@if$@;__END__+if !1; +# This Perl script was generated by JustLib2 at Wed Apr 23 09:14:13 2003. +# Don't touch/remove any lines above; http://www.inf.bme.hu/~pts/justlib + +# The above was actually seen in the wild and stresses the +# script_is_evil_and_wrong test. diff --git a/t/recipes/checks/debhelper/legacy-scripts/build-spec/orig/perl-bizarre-2 b/t/recipes/checks/debhelper/legacy-scripts/build-spec/orig/perl-bizarre-2 new file mode 100644 index 0000000..afd9cfe --- /dev/null +++ b/t/recipes/checks/debhelper/legacy-scripts/build-spec/orig/perl-bizarre-2 @@ -0,0 +1,7 @@ +#!/bin/sh +eval 'exec /usr/bin/perl -wS $0 ${1+"$@"}' + if $running_under_some_shell; + +# I'm someone following perlrun except without using the Perl #! line. +# Now something to choke bash. +while (<>) { if (/%#/) { print } } diff --git a/t/recipes/checks/debhelper/legacy-scripts/build-spec/orig/perl-bizarre-3 b/t/recipes/checks/debhelper/legacy-scripts/build-spec/orig/perl-bizarre-3 new file mode 100644 index 0000000..44baf75 --- /dev/null +++ b/t/recipes/checks/debhelper/legacy-scripts/build-spec/orig/perl-bizarre-3 @@ -0,0 +1,6 @@ +eval '(exit $?0)' && eval 'exec perl -wS $0 ${1+"$@"}' +& eval 'exec /usr/bin/perl -wS $0 $argv:q' + if $running_under_some_shell; + +# More utterly bizarreness from perlrun. This one even doesn't work if +# there's a valid #! line on the first line. I don't understand why.... diff --git a/t/recipes/checks/debhelper/legacy-scripts/build-spec/orig/perlfoo b/t/recipes/checks/debhelper/legacy-scripts/build-spec/orig/perlfoo new file mode 100644 index 0000000..5b27ed0 --- /dev/null +++ b/t/recipes/checks/debhelper/legacy-scripts/build-spec/orig/perlfoo @@ -0,0 +1,3 @@ +#! /usr/bin/perl + +print "Hello, World!"; diff --git a/t/recipes/checks/debhelper/legacy-scripts/build-spec/orig/phpenvfoo b/t/recipes/checks/debhelper/legacy-scripts/build-spec/orig/phpenvfoo new file mode 100644 index 0000000..cbbfb2e --- /dev/null +++ b/t/recipes/checks/debhelper/legacy-scripts/build-spec/orig/phpenvfoo @@ -0,0 +1,7 @@ +#!/usr/bin/env php + + +Dumb PHP script + + + diff --git a/t/recipes/checks/debhelper/legacy-scripts/build-spec/orig/phpfoo b/t/recipes/checks/debhelper/legacy-scripts/build-spec/orig/phpfoo new file mode 100644 index 0000000..e0595e6 --- /dev/null +++ b/t/recipes/checks/debhelper/legacy-scripts/build-spec/orig/phpfoo @@ -0,0 +1,7 @@ +#!/usr/bin/php + + +Dumb PHP script + + + diff --git a/t/recipes/checks/debhelper/legacy-scripts/build-spec/orig/rubyfoo b/t/recipes/checks/debhelper/legacy-scripts/build-spec/orig/rubyfoo new file mode 100644 index 0000000..8024605 --- /dev/null +++ b/t/recipes/checks/debhelper/legacy-scripts/build-spec/orig/rubyfoo @@ -0,0 +1,4 @@ +#!/bin/ruby1.8 + +# Ok, that example is really pathetic, but until we have +# some better code in checks/scripts, it will do diff --git a/t/recipes/checks/debhelper/legacy-scripts/build-spec/orig/sh-broken b/t/recipes/checks/debhelper/legacy-scripts/build-spec/orig/sh-broken new file mode 100644 index 0000000..7b79074 --- /dev/null +++ b/t/recipes/checks/debhelper/legacy-scripts/build-spec/orig/sh-broken @@ -0,0 +1,2 @@ +#!/bin/sh +if fi diff --git a/t/recipes/checks/debhelper/legacy-scripts/build-spec/orig/suidperlfoo b/t/recipes/checks/debhelper/legacy-scripts/build-spec/orig/suidperlfoo new file mode 100644 index 0000000..bcbc471 --- /dev/null +++ b/t/recipes/checks/debhelper/legacy-scripts/build-spec/orig/suidperlfoo @@ -0,0 +1,3 @@ +#! /usr/bin/suidperl + +print "Hello, World!"; diff --git a/t/recipes/checks/debhelper/legacy-scripts/build-spec/orig/tkfoo b/t/recipes/checks/debhelper/legacy-scripts/build-spec/orig/tkfoo new file mode 100755 index 0000000..533595a --- /dev/null +++ b/t/recipes/checks/debhelper/legacy-scripts/build-spec/orig/tkfoo @@ -0,0 +1,31 @@ +#!/bin/sh +# +# Insane amount of empty lines and comments + +# +# +# +# + +# +# + +# +# +# + +# +# + +# +# This line makes the next one a comment in Tcl \ +exec wish "$0" -- ${1+"$@"} + +# lintian should not check the following for syntax +# if it detects the line above correctly +# Code snippet taken from eTkTab + +if { [array names prefs keybindings] != "" } { + # Read in the file + array set unparsed_bindings [ read_settings_file $prefs(keybindings)] +} diff --git a/t/recipes/checks/debhelper/legacy-scripts/build-spec/orig/wishfoo b/t/recipes/checks/debhelper/legacy-scripts/build-spec/orig/wishfoo new file mode 100644 index 0000000..035c9ad --- /dev/null +++ b/t/recipes/checks/debhelper/legacy-scripts/build-spec/orig/wishfoo @@ -0,0 +1,4 @@ +#!/usr/bin/wish +# +# This is not actually a wish script, here to force a test of wish +# dependencies. diff --git a/t/recipes/checks/debhelper/legacy-scripts/build-spec/orig/xsession-test b/t/recipes/checks/debhelper/legacy-scripts/build-spec/orig/xsession-test new file mode 100644 index 0000000..ca49d72 --- /dev/null +++ b/t/recipes/checks/debhelper/legacy-scripts/build-spec/orig/xsession-test @@ -0,0 +1,3 @@ +#!/bin/sh + +echo "Foo." diff --git a/t/recipes/checks/debhelper/legacy-scripts/build-spec/pre-build b/t/recipes/checks/debhelper/legacy-scripts/build-spec/pre-build new file mode 100755 index 0000000..b5649a8 --- /dev/null +++ b/t/recipes/checks/debhelper/legacy-scripts/build-spec/pre-build @@ -0,0 +1,5 @@ +#!/bin/sh + +DIR="$1" + +rm -f "$DIR/debian/compat" diff --git a/t/recipes/checks/debhelper/legacy-scripts/eval/desc b/t/recipes/checks/debhelper/legacy-scripts/eval/desc new file mode 100644 index 0000000..24bff70 --- /dev/null +++ b/t/recipes/checks/debhelper/legacy-scripts/eval/desc @@ -0,0 +1,2 @@ +Testname: legacy-scripts +Check: debhelper diff --git a/t/recipes/checks/debhelper/legacy-scripts/eval/hints b/t/recipes/checks/debhelper/legacy-scripts/eval/hints new file mode 100644 index 0000000..94a71d9 --- /dev/null +++ b/t/recipes/checks/debhelper/legacy-scripts/eval/hints @@ -0,0 +1,7 @@ +scripts (source): package-uses-deprecated-debhelper-compat-version 1 +scripts (source): package-uses-debhelper-but-lacks-build-depends [debian/rules] +scripts (source): no-versioned-debhelper-prerequisite 1 +scripts (source): missing-build-dependency-for-dh_-command dh_testroot (does not satisfy debhelper:any | debhelper-compat:any) [debian/rules] +scripts (source): debian-build-system debhelper [debian/rules] +scripts (source): debhelper-compat-file-is-missing +scripts (source): debhelper-but-no-misc-depends scripts diff --git a/t/recipes/checks/debhelper/legacy-scripts/eval/post-test b/t/recipes/checks/debhelper/legacy-scripts/eval/post-test new file mode 100644 index 0000000..faeef0b --- /dev/null +++ b/t/recipes/checks/debhelper/legacy-scripts/eval/post-test @@ -0,0 +1 @@ +s/\(current is ([0-9]+\.)+[0-9]\)/(current is CURRENT)/ diff --git a/t/recipes/checks/debhelper/oeverride-typo/build-spec/debian/rules b/t/recipes/checks/debhelper/oeverride-typo/build-spec/debian/rules new file mode 100755 index 0000000..c62e10f --- /dev/null +++ b/t/recipes/checks/debhelper/oeverride-typo/build-spec/debian/rules @@ -0,0 +1,7 @@ +#!/usr/bin/make -f + +%: + dh $@ + +# typo in prefix +oeverride_dh_missing: diff --git a/t/recipes/checks/debhelper/oeverride-typo/build-spec/fill-values b/t/recipes/checks/debhelper/oeverride-typo/build-spec/fill-values new file mode 100644 index 0000000..60aaeb3 --- /dev/null +++ b/t/recipes/checks/debhelper/oeverride-typo/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: upload-native +Testname: oeverride-typo +Description: Uses the misspelling 'oeverride' in a dh rule target diff --git a/t/recipes/checks/debhelper/oeverride-typo/eval/desc b/t/recipes/checks/debhelper/oeverride-typo/eval/desc new file mode 100644 index 0000000..7621bba --- /dev/null +++ b/t/recipes/checks/debhelper/oeverride-typo/eval/desc @@ -0,0 +1,3 @@ +Testname: oeverride-typo +Check: debhelper +See-Also: Bug#963765 diff --git a/t/recipes/checks/debhelper/oeverride-typo/eval/hints b/t/recipes/checks/debhelper/oeverride-typo/eval/hints new file mode 100644 index 0000000..bef4e7c --- /dev/null +++ b/t/recipes/checks/debhelper/oeverride-typo/eval/hints @@ -0,0 +1,4 @@ +oeverride-typo (source): typo-in-debhelper-override-target oeverride_dh_missing => override_dh_missing [debian/rules:7] +oeverride-typo (source): debian-build-system dh [debian/rules] +oeverride-typo (source): debhelper-compat-virtual-relation 13 [debian/control] +oeverride-typo (source): debhelper-compat-level 13 diff --git a/t/recipes/checks/debhelper/rules-uses-deprecated-systemd-override/build-spec/debian/rules b/t/recipes/checks/debhelper/rules-uses-deprecated-systemd-override/build-spec/debian/rules new file mode 100755 index 0000000..d5fb60d --- /dev/null +++ b/t/recipes/checks/debhelper/rules-uses-deprecated-systemd-override/build-spec/debian/rules @@ -0,0 +1,13 @@ +#!/usr/bin/make -f + +%: + dh $@ + +override_dh_systemd_enable: + dh_systemd_enable + +override_dh_systemd_start: + dh_systemd_start + +override_dh_systemd_start-arch: + dh_systemd_start diff --git a/t/recipes/checks/debhelper/rules-uses-deprecated-systemd-override/build-spec/fill-values b/t/recipes/checks/debhelper/rules-uses-deprecated-systemd-override/build-spec/fill-values new file mode 100644 index 0000000..d418d1d --- /dev/null +++ b/t/recipes/checks/debhelper/rules-uses-deprecated-systemd-override/build-spec/fill-values @@ -0,0 +1,4 @@ +Skeleton: upload-native +Testname: rules-uses-deprecated-systemd-override +Description: Test for override_dh_systemd_enable with compat levels 11 +Dh-Compat-Level: 12 diff --git a/t/recipes/checks/debhelper/rules-uses-deprecated-systemd-override/eval/desc b/t/recipes/checks/debhelper/rules-uses-deprecated-systemd-override/eval/desc new file mode 100644 index 0000000..1eab75d --- /dev/null +++ b/t/recipes/checks/debhelper/rules-uses-deprecated-systemd-override/eval/desc @@ -0,0 +1,2 @@ +Testname: rules-uses-deprecated-systemd-override +Check: debhelper diff --git a/t/recipes/checks/debhelper/rules-uses-deprecated-systemd-override/eval/hints b/t/recipes/checks/debhelper/rules-uses-deprecated-systemd-override/eval/hints new file mode 100644 index 0000000..466a42e --- /dev/null +++ b/t/recipes/checks/debhelper/rules-uses-deprecated-systemd-override/eval/hints @@ -0,0 +1,6 @@ +rules-uses-deprecated-systemd-override (source): package-uses-old-debhelper-compat-version 12 +rules-uses-deprecated-systemd-override (source): debian-rules-uses-deprecated-systemd-override override_dh_systemd_start-arch [debian/rules:12] +rules-uses-deprecated-systemd-override (source): debian-rules-uses-deprecated-systemd-override override_dh_systemd_enable [debian/rules:6] +rules-uses-deprecated-systemd-override (source): debian-build-system dh [debian/rules] +rules-uses-deprecated-systemd-override (source): debhelper-compat-virtual-relation 12 [debian/control] +rules-uses-deprecated-systemd-override (source): debhelper-compat-level 12 diff --git a/t/recipes/checks/debhelper/temporary/debhelper-internal-files/build-spec/debian/package.debhelper.log b/t/recipes/checks/debhelper/temporary/debhelper-internal-files/build-spec/debian/package.debhelper.log new file mode 100644 index 0000000..3cb1115 --- /dev/null +++ b/t/recipes/checks/debhelper/temporary/debhelper-internal-files/build-spec/debian/package.debhelper.log @@ -0,0 +1 @@ +debhelper log file for package diff --git a/t/recipes/checks/debhelper/temporary/debhelper-internal-files/build-spec/debian/package.postinst.debhelper b/t/recipes/checks/debhelper/temporary/debhelper-internal-files/build-spec/debian/package.postinst.debhelper new file mode 100644 index 0000000..1cd1647 --- /dev/null +++ b/t/recipes/checks/debhelper/temporary/debhelper-internal-files/build-spec/debian/package.postinst.debhelper @@ -0,0 +1 @@ +Internal debhelper file for package diff --git a/t/recipes/checks/debhelper/temporary/debhelper-internal-files/build-spec/debian/rules b/t/recipes/checks/debhelper/temporary/debhelper-internal-files/build-spec/debian/rules new file mode 100755 index 0000000..b792adb --- /dev/null +++ b/t/recipes/checks/debhelper/temporary/debhelper-internal-files/build-spec/debian/rules @@ -0,0 +1,7 @@ +#!/usr/bin/make -f + +%: + dh $@ + +clean: + # No such thing diff --git a/t/recipes/checks/debhelper/temporary/debhelper-internal-files/build-spec/fill-values b/t/recipes/checks/debhelper/temporary/debhelper-internal-files/build-spec/fill-values new file mode 100644 index 0000000..78a7192 --- /dev/null +++ b/t/recipes/checks/debhelper/temporary/debhelper-internal-files/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: upload-native +Testname: debhelper-internal-files +Description: Test for spotting unremoved debhelper temp files diff --git a/t/recipes/checks/debhelper/temporary/debhelper-internal-files/eval/desc b/t/recipes/checks/debhelper/temporary/debhelper-internal-files/eval/desc new file mode 100644 index 0000000..3653810 --- /dev/null +++ b/t/recipes/checks/debhelper/temporary/debhelper-internal-files/eval/desc @@ -0,0 +1,2 @@ +Testname: debhelper-internal-files +Check: debhelper/temporary diff --git a/t/recipes/checks/debhelper/temporary/debhelper-internal-files/eval/hints b/t/recipes/checks/debhelper/temporary/debhelper-internal-files/eval/hints new file mode 100644 index 0000000..1e0d3cf --- /dev/null +++ b/t/recipes/checks/debhelper/temporary/debhelper-internal-files/eval/hints @@ -0,0 +1,2 @@ +debhelper-internal-files (source): temporary-debhelper-file [debian/package.postinst.debhelper] +debhelper-internal-files (source): temporary-debhelper-file [debian/package.debhelper.log] diff --git a/t/recipes/checks/debian/changelog/changelog-distribution-does-not-match-changes-file/build-spec/fill-values b/t/recipes/checks/debian/changelog/changelog-distribution-does-not-match-changes-file/build-spec/fill-values new file mode 100644 index 0000000..a9262a1 --- /dev/null +++ b/t/recipes/checks/debian/changelog/changelog-distribution-does-not-match-changes-file/build-spec/fill-values @@ -0,0 +1,4 @@ +Testname: changelog-distribution-does-not-match-changes-file +Skeleton: upload-native +Distribution: experimental +Description: Test upload with unstable in changes but experimental in changelog diff --git a/t/recipes/checks/debian/changelog/changelog-distribution-does-not-match-changes-file/build-spec/post-build.in b/t/recipes/checks/debian/changelog/changelog-distribution-does-not-match-changes-file/build-spec/post-build.in new file mode 100755 index 0000000..10a61dc --- /dev/null +++ b/t/recipes/checks/debian/changelog/changelog-distribution-does-not-match-changes-file/build-spec/post-build.in @@ -0,0 +1,3 @@ +#!/bin/sh + +perl -pi -e 's/^(Distribution:)\s+\S+/$1 unstable/' [% $build_product %] diff --git a/t/recipes/checks/debian/changelog/changelog-distribution-does-not-match-changes-file/eval/desc b/t/recipes/checks/debian/changelog/changelog-distribution-does-not-match-changes-file/eval/desc new file mode 100644 index 0000000..d46c519 --- /dev/null +++ b/t/recipes/checks/debian/changelog/changelog-distribution-does-not-match-changes-file/eval/desc @@ -0,0 +1,2 @@ +Testname: changelog-distribution-does-not-match-changes-file +Check: debian/changelog diff --git a/t/recipes/checks/debian/changelog/changelog-distribution-does-not-match-changes-file/eval/hints b/t/recipes/checks/debian/changelog/changelog-distribution-does-not-match-changes-file/eval/hints new file mode 100644 index 0000000..cede117 --- /dev/null +++ b/t/recipes/checks/debian/changelog/changelog-distribution-does-not-match-changes-file/eval/hints @@ -0,0 +1 @@ +changelog-distribution-does-not-match-changes-file (binary): changelog-distribution-does-not-match-changes-file experimental != unstable [usr/share/doc/changelog-distribution-does-not-match-changes-file/changelog.gz:1] diff --git a/t/recipes/checks/debian/changelog/changelog-file-become-native/build-spec/debian/changelog.in b/t/recipes/checks/debian/changelog/changelog-file-become-native/build-spec/debian/changelog.in new file mode 100644 index 0000000..36992ba --- /dev/null +++ b/t/recipes/checks/debian/changelog/changelog-file-become-native/build-spec/debian/changelog.in @@ -0,0 +1,12 @@ +[% $source %] ([% $version %]) unstable; urgency=low + + * Lintian Test Suite. + * Test: [% $testname %] + + -- [% $author %] [% $date %] + +[% $source %] (0.1-2) unstable; urgency=low + + * An earlier non-native version. + + -- [% $author %] Tue, 1 Jan 2008 22:45:57 +0000 diff --git a/t/recipes/checks/debian/changelog/changelog-file-become-native/build-spec/fill-values b/t/recipes/checks/debian/changelog/changelog-file-become-native/build-spec/fill-values new file mode 100644 index 0000000..1d3073c --- /dev/null +++ b/t/recipes/checks/debian/changelog/changelog-file-become-native/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: upload-native +Testname: changelog-file-become-native +Description: Test for packages where the version suddenly becomes native diff --git a/t/recipes/checks/debian/changelog/changelog-file-become-native/eval/desc b/t/recipes/checks/debian/changelog/changelog-file-become-native/eval/desc new file mode 100644 index 0000000..4294061 --- /dev/null +++ b/t/recipes/checks/debian/changelog/changelog-file-become-native/eval/desc @@ -0,0 +1,3 @@ +Testname: changelog-file-become-native +See-Also: Debian Bug #504070 +Check: debian/changelog diff --git a/t/recipes/checks/debian/changelog/changelog-file-become-native/eval/hints b/t/recipes/checks/debian/changelog/changelog-file-become-native/eval/hints new file mode 100644 index 0000000..05caab0 --- /dev/null +++ b/t/recipes/checks/debian/changelog/changelog-file-become-native/eval/hints @@ -0,0 +1 @@ +changelog-file-become-native (source): odd-historical-debian-changelog-version 0.1-2 (for native) [debian/changelog:8] diff --git a/t/recipes/checks/debian/changelog/changelog-file-consecutive-debian-revision-unrel/build-spec/debian/changelog.in b/t/recipes/checks/debian/changelog/changelog-file-consecutive-debian-revision-unrel/build-spec/debian/changelog.in new file mode 100644 index 0000000..363fcc6 --- /dev/null +++ b/t/recipes/checks/debian/changelog/changelog-file-consecutive-debian-revision-unrel/build-spec/debian/changelog.in @@ -0,0 +1,12 @@ +[% $source %] ([% $version %]) unstable; urgency=low + + * Version reused, new source package name. + + -- [% $author %] [% $date %] + +[% $source %]-oldname (1.0-3) unstable; urgency=low + + * Lintian Test Suite. + * Test: [% $testname %] + + -- [% $author %] Fri, 06 Feb 2009 22:22:37 -0800 diff --git a/t/recipes/checks/debian/changelog/changelog-file-consecutive-debian-revision-unrel/build-spec/fill-values b/t/recipes/checks/debian/changelog/changelog-file-consecutive-debian-revision-unrel/build-spec/fill-values new file mode 100644 index 0000000..0e3cdbf --- /dev/null +++ b/t/recipes/checks/debian/changelog/changelog-file-consecutive-debian-revision-unrel/build-spec/fill-values @@ -0,0 +1,3 @@ +Testname: changelog-file-consecutive-debian-revision-unrel +Skeleton: upload-non-native +Description: Check for false positive in non-consecutive-debian-revision diff --git a/t/recipes/checks/debian/changelog/changelog-file-consecutive-debian-revision-unrel/eval/desc b/t/recipes/checks/debian/changelog/changelog-file-consecutive-debian-revision-unrel/eval/desc new file mode 100644 index 0000000..a78a0ae --- /dev/null +++ b/t/recipes/checks/debian/changelog/changelog-file-consecutive-debian-revision-unrel/eval/desc @@ -0,0 +1,3 @@ +Testname: changelog-file-consecutive-debian-revision-unrel +Test-Against: non-consecutive-debian-revision +Check: debian/changelog diff --git a/t/recipes/checks/debian/changelog/changelog-file-consecutive-debian-revision-unrel/eval/hints b/t/recipes/checks/debian/changelog/changelog-file-consecutive-debian-revision-unrel/eval/hints new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/t/recipes/checks/debian/changelog/changelog-file-consecutive-debian-revision-unrel/eval/hints @@ -0,0 +1 @@ + diff --git a/t/recipes/checks/debian/changelog/changelog-file-dch-wrong-name-native/build-spec/debian/rules b/t/recipes/checks/debian/changelog/changelog-file-dch-wrong-name-native/build-spec/debian/rules new file mode 100755 index 0000000..c8b797a --- /dev/null +++ b/t/recipes/checks/debian/changelog/changelog-file-dch-wrong-name-native/build-spec/debian/rules @@ -0,0 +1,11 @@ +#!/usr/bin/make -f + +PKG:=$(shell dh_listpackages) +DOC_DIR:=debian/$(PKG)/usr/share/doc/$(PKG) + +%: + dh $@ + +override_dh_md5sums: + mv $(DOC_DIR)/changelog.gz $(DOC_DIR)/changelog.Debian.gz + dh_md5sums diff --git a/t/recipes/checks/debian/changelog/changelog-file-dch-wrong-name-native/build-spec/fill-values b/t/recipes/checks/debian/changelog/changelog-file-dch-wrong-name-native/build-spec/fill-values new file mode 100644 index 0000000..37405fe --- /dev/null +++ b/t/recipes/checks/debian/changelog/changelog-file-dch-wrong-name-native/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: upload-native +Testname: changelog-file-dch-wrong-name-native +Description: Test if Debian changelog has the wrong name diff --git a/t/recipes/checks/debian/changelog/changelog-file-dch-wrong-name-native/eval/desc b/t/recipes/checks/debian/changelog/changelog-file-dch-wrong-name-native/eval/desc new file mode 100644 index 0000000..3595388 --- /dev/null +++ b/t/recipes/checks/debian/changelog/changelog-file-dch-wrong-name-native/eval/desc @@ -0,0 +1,2 @@ +Testname: changelog-file-dch-wrong-name-native +Check: debian/changelog diff --git a/t/recipes/checks/debian/changelog/changelog-file-dch-wrong-name-native/eval/hints b/t/recipes/checks/debian/changelog/changelog-file-dch-wrong-name-native/eval/hints new file mode 100644 index 0000000..dae41ee --- /dev/null +++ b/t/recipes/checks/debian/changelog/changelog-file-dch-wrong-name-native/eval/hints @@ -0,0 +1 @@ +changelog-file-dch-wrong-name-native (binary): wrong-name-for-changelog-of-native-package [usr/share/doc/changelog-file-dch-wrong-name-native/changelog.Debian.gz] diff --git a/t/recipes/checks/debian/changelog/changelog-file-dch-wrong-name/build-spec/debian/rules b/t/recipes/checks/debian/changelog/changelog-file-dch-wrong-name/build-spec/debian/rules new file mode 100755 index 0000000..2d5cd31 --- /dev/null +++ b/t/recipes/checks/debian/changelog/changelog-file-dch-wrong-name/build-spec/debian/rules @@ -0,0 +1,11 @@ +#!/usr/bin/make -f + +PKG:=$(shell dh_listpackages) +DOC_DIR:=debian/$(PKG)/usr/share/doc/$(PKG) + +%: + dh $@ + +override_dh_md5sums: + mv $(DOC_DIR)/changelog.Debian.gz $(DOC_DIR)/changelog.debian.gz + dh_md5sums diff --git a/t/recipes/checks/debian/changelog/changelog-file-dch-wrong-name/build-spec/fill-values b/t/recipes/checks/debian/changelog/changelog-file-dch-wrong-name/build-spec/fill-values new file mode 100644 index 0000000..80de357 --- /dev/null +++ b/t/recipes/checks/debian/changelog/changelog-file-dch-wrong-name/build-spec/fill-values @@ -0,0 +1,3 @@ +Testname: changelog-file-dch-wrong-name +Skeleton: upload-non-native +Description: Test if Debian changelog has the wrong name diff --git a/t/recipes/checks/debian/changelog/changelog-file-dch-wrong-name/build-spec/orig/ChangeLog b/t/recipes/checks/debian/changelog/changelog-file-dch-wrong-name/build-spec/orig/ChangeLog new file mode 100644 index 0000000..a935b07 --- /dev/null +++ b/t/recipes/checks/debian/changelog/changelog-file-dch-wrong-name/build-spec/orig/ChangeLog @@ -0,0 +1,5 @@ +2011-09-10 Niels Thykier + + * This is a non-Debian ChangeLog. Lintian should not be tricked + to believe this is a Debian changelog. + diff --git a/t/recipes/checks/debian/changelog/changelog-file-dch-wrong-name/eval/desc b/t/recipes/checks/debian/changelog/changelog-file-dch-wrong-name/eval/desc new file mode 100644 index 0000000..ba278f1 --- /dev/null +++ b/t/recipes/checks/debian/changelog/changelog-file-dch-wrong-name/eval/desc @@ -0,0 +1,2 @@ +Testname: changelog-file-dch-wrong-name +Check: debian/changelog diff --git a/t/recipes/checks/debian/changelog/changelog-file-dch-wrong-name/eval/hints b/t/recipes/checks/debian/changelog/changelog-file-dch-wrong-name/eval/hints new file mode 100644 index 0000000..b726e93 --- /dev/null +++ b/t/recipes/checks/debian/changelog/changelog-file-dch-wrong-name/eval/hints @@ -0,0 +1 @@ +changelog-file-dch-wrong-name (binary): wrong-name-for-debian-changelog-file [usr/share/doc/changelog-file-dch-wrong-name/changelog.debian.gz] diff --git a/t/recipes/checks/debian/changelog/changelog-file-empty-entry-unrel/build-spec/debian/changelog.in b/t/recipes/checks/debian/changelog/changelog-file-empty-entry-unrel/build-spec/debian/changelog.in new file mode 100644 index 0000000..107f854 --- /dev/null +++ b/t/recipes/checks/debian/changelog/changelog-file-empty-entry-unrel/build-spec/debian/changelog.in @@ -0,0 +1,12 @@ +[% $source %] ([% $version %]) UNRELEASED; urgency=low + + * . + * + + -- [% $author %] [% $date %] + +[% $source %] (0.1) unstable; urgency=low + + * First upload (Closes: #123456). + + -- [% $author %] Fri, 06 Feb 2009 22:22:37 -0800 diff --git a/t/recipes/checks/debian/changelog/changelog-file-empty-entry-unrel/build-spec/fill-values b/t/recipes/checks/debian/changelog/changelog-file-empty-entry-unrel/build-spec/fill-values new file mode 100644 index 0000000..e0f238f --- /dev/null +++ b/t/recipes/checks/debian/changelog/changelog-file-empty-entry-unrel/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: upload-native +Testname: changelog-file-empty-entry-unrel +Description: Check changelog empty entry (UNRELEASED) diff --git a/t/recipes/checks/debian/changelog/changelog-file-empty-entry-unrel/eval/desc b/t/recipes/checks/debian/changelog/changelog-file-empty-entry-unrel/eval/desc new file mode 100644 index 0000000..7e2446f --- /dev/null +++ b/t/recipes/checks/debian/changelog/changelog-file-empty-entry-unrel/eval/desc @@ -0,0 +1,3 @@ +Testname: changelog-file-empty-entry-unrel +Test-Against: changelog-empty-entry +Check: debian/changelog diff --git a/t/recipes/checks/debian/changelog/changelog-file-empty-entry-unrel/eval/hints b/t/recipes/checks/debian/changelog/changelog-file-empty-entry-unrel/eval/hints new file mode 100644 index 0000000..2b08d4c --- /dev/null +++ b/t/recipes/checks/debian/changelog/changelog-file-empty-entry-unrel/eval/hints @@ -0,0 +1 @@ +changelog-file-empty-entry-unrel (binary): debian-changelog-line-too-short . [usr/share/doc/changelog-file-empty-entry-unrel/changelog.gz:3] diff --git a/t/recipes/checks/debian/changelog/changelog-file-empty-entry/build-spec/debian/changelog.in b/t/recipes/checks/debian/changelog/changelog-file-empty-entry/build-spec/debian/changelog.in new file mode 100644 index 0000000..27fbf38 --- /dev/null +++ b/t/recipes/checks/debian/changelog/changelog-file-empty-entry/build-spec/debian/changelog.in @@ -0,0 +1,12 @@ +[% $source %] ([% $version %]) unstable; urgency=low + + * . + * + + -- + +[% $source %] (0.1) unstable; urgency=low + + * First upload (Closes: #123456). + + -- [% $author %] Fri, 06 Feb 2009 22:22:37 -0800 diff --git a/t/recipes/checks/debian/changelog/changelog-file-empty-entry/build-spec/fill-values b/t/recipes/checks/debian/changelog/changelog-file-empty-entry/build-spec/fill-values new file mode 100644 index 0000000..30bc2c8 --- /dev/null +++ b/t/recipes/checks/debian/changelog/changelog-file-empty-entry/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: upload-native +Testname: changelog-file-empty-entry +Description: Check changelog empty entry diff --git a/t/recipes/checks/debian/changelog/changelog-file-empty-entry/eval/desc b/t/recipes/checks/debian/changelog/changelog-file-empty-entry/eval/desc new file mode 100644 index 0000000..a884875 --- /dev/null +++ b/t/recipes/checks/debian/changelog/changelog-file-empty-entry/eval/desc @@ -0,0 +1,2 @@ +Testname: changelog-file-empty-entry +Check: debian/changelog diff --git a/t/recipes/checks/debian/changelog/changelog-file-empty-entry/eval/hints b/t/recipes/checks/debian/changelog/changelog-file-empty-entry/eval/hints new file mode 100644 index 0000000..a1252e4 --- /dev/null +++ b/t/recipes/checks/debian/changelog/changelog-file-empty-entry/eval/hints @@ -0,0 +1,4 @@ +changelog-file-empty-entry (binary): syntax-error-in-debian-changelog "found start of entry where expected more change data or trailer" [usr/share/doc/changelog-file-empty-entry/changelog.gz:8] +changelog-file-empty-entry (binary): syntax-error-in-debian-changelog "badly formatted trailer line" [usr/share/doc/changelog-file-empty-entry/changelog.gz:6] +changelog-file-empty-entry (binary): debian-changelog-line-too-short . [usr/share/doc/changelog-file-empty-entry/changelog.gz:3] +changelog-file-empty-entry (binary): changelog-empty-entry [usr/share/doc/changelog-file-empty-entry/changelog.gz:1] diff --git a/t/recipes/checks/debian/changelog/changelog-file-epoch-change-without-comment-new/build-spec/debian/changelog.in b/t/recipes/checks/debian/changelog/changelog-file-epoch-change-without-comment-new/build-spec/debian/changelog.in new file mode 100644 index 0000000..eb930a3 --- /dev/null +++ b/t/recipes/checks/debian/changelog/changelog-file-epoch-change-without-comment-new/build-spec/debian/changelog.in @@ -0,0 +1,11 @@ +[% $source %] (1:[% $version %]) unstable; urgency=low + + * This changelog entry introduces a version prefix. + + -- [% $author %] [% $date %] + +[% $source %] (999999) unstable; urgency=low + + * Initial upload. + + -- [% $author %] Fri, 06 Feb 2009 22:22:37 -0800 diff --git a/t/recipes/checks/debian/changelog/changelog-file-epoch-change-without-comment-new/build-spec/fill-values b/t/recipes/checks/debian/changelog/changelog-file-epoch-change-without-comment-new/build-spec/fill-values new file mode 100644 index 0000000..4150aae --- /dev/null +++ b/t/recipes/checks/debian/changelog/changelog-file-epoch-change-without-comment-new/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: upload-native +Testname: changelog-file-epoch-change-without-comment-new +Description: Check changelog for accidental epoch changes diff --git a/t/recipes/checks/debian/changelog/changelog-file-epoch-change-without-comment-new/eval/desc b/t/recipes/checks/debian/changelog/changelog-file-epoch-change-without-comment-new/eval/desc new file mode 100644 index 0000000..f91cffa --- /dev/null +++ b/t/recipes/checks/debian/changelog/changelog-file-epoch-change-without-comment-new/eval/desc @@ -0,0 +1,5 @@ +Testname: changelog-file-epoch-change-without-comment-new +Test-Against: + epoch-changed-but-upstream-version-did-not-go-backwards + latest-debian-changelog-entry-reuses-existing-version +Check: debian/changelog diff --git a/t/recipes/checks/debian/changelog/changelog-file-epoch-change-without-comment-new/eval/hints b/t/recipes/checks/debian/changelog/changelog-file-epoch-change-without-comment-new/eval/hints new file mode 100644 index 0000000..5a62f5b --- /dev/null +++ b/t/recipes/checks/debian/changelog/changelog-file-epoch-change-without-comment-new/eval/hints @@ -0,0 +1 @@ +changelog-file-epoch-change-without-comment-new (source): epoch-change-without-comment 999999 -> 1:1.0 [debian/changelog:1] diff --git a/t/recipes/checks/debian/changelog/changelog-file-epoch-change-without-comment-same/build-spec/debian/changelog.in b/t/recipes/checks/debian/changelog/changelog-file-epoch-change-without-comment-same/build-spec/debian/changelog.in new file mode 100644 index 0000000..c3fcc68 --- /dev/null +++ b/t/recipes/checks/debian/changelog/changelog-file-epoch-change-without-comment-same/build-spec/debian/changelog.in @@ -0,0 +1,11 @@ +[% $source %] (2:[% $version %]) unstable; urgency=low + + * This changelog entry has the same prefix as before. + + -- [% $author %] [% $date %] + +[% $source %] (2:0) unstable; urgency=low + + * Initial upload. + + -- [% $author %] Fri, 06 Feb 2009 22:22:37 -0800 diff --git a/t/recipes/checks/debian/changelog/changelog-file-epoch-change-without-comment-same/build-spec/fill-values b/t/recipes/checks/debian/changelog/changelog-file-epoch-change-without-comment-same/build-spec/fill-values new file mode 100644 index 0000000..986d64d --- /dev/null +++ b/t/recipes/checks/debian/changelog/changelog-file-epoch-change-without-comment-same/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: upload-native +Testname: changelog-file-epoch-change-without-comment-same +Description: Check changelog for accidental epoch changes (false positive) diff --git a/t/recipes/checks/debian/changelog/changelog-file-epoch-change-without-comment-same/eval/desc b/t/recipes/checks/debian/changelog/changelog-file-epoch-change-without-comment-same/eval/desc new file mode 100644 index 0000000..13e9349 --- /dev/null +++ b/t/recipes/checks/debian/changelog/changelog-file-epoch-change-without-comment-same/eval/desc @@ -0,0 +1,5 @@ +Testname: changelog-file-epoch-change-without-comment-same +Test-Against: + epoch-change-without-comment + epoch-changed-but-upstream-version-did-not-go-backwards +Check: debian/changelog diff --git a/t/recipes/checks/debian/changelog/changelog-file-epoch-change-without-comment-same/eval/hints b/t/recipes/checks/debian/changelog/changelog-file-epoch-change-without-comment-same/eval/hints new file mode 100644 index 0000000..e69de29 diff --git a/t/recipes/checks/debian/changelog/changelog-file-epoch-change-without-comment-unrel/build-spec/debian/changelog.in b/t/recipes/checks/debian/changelog/changelog-file-epoch-change-without-comment-unrel/build-spec/debian/changelog.in new file mode 100644 index 0000000..785572f --- /dev/null +++ b/t/recipes/checks/debian/changelog/changelog-file-epoch-change-without-comment-unrel/build-spec/debian/changelog.in @@ -0,0 +1,12 @@ +[% $source %] (2:[% $version %]) unstable; urgency=low + + * This changelog entry bumps the epoch and references the word in the + changelog. + + -- [% $author %] [% $date %] + +[% $source %] (1:999999) unstable; urgency=low + + * Initial upload. + + -- [% $author %] Fri, 06 Feb 2009 22:22:37 -0800 diff --git a/t/recipes/checks/debian/changelog/changelog-file-epoch-change-without-comment-unrel/build-spec/fill-values b/t/recipes/checks/debian/changelog/changelog-file-epoch-change-without-comment-unrel/build-spec/fill-values new file mode 100644 index 0000000..2a74c76 --- /dev/null +++ b/t/recipes/checks/debian/changelog/changelog-file-epoch-change-without-comment-unrel/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: upload-native +Testname: changelog-file-epoch-change-without-comment-unrel +Description: Check changelog for accidental epoch changes (false positive) diff --git a/t/recipes/checks/debian/changelog/changelog-file-epoch-change-without-comment-unrel/eval/desc b/t/recipes/checks/debian/changelog/changelog-file-epoch-change-without-comment-unrel/eval/desc new file mode 100644 index 0000000..f2bb59b --- /dev/null +++ b/t/recipes/checks/debian/changelog/changelog-file-epoch-change-without-comment-unrel/eval/desc @@ -0,0 +1,6 @@ +Testname: changelog-file-epoch-change-without-comment-unrel +Test-Against: + epoch-change-without-comment + epoch-changed-but-upstream-version-did-not-go-backwards + latest-debian-changelog-entry-reuses-existing-version +Check: debian/changelog diff --git a/t/recipes/checks/debian/changelog/changelog-file-epoch-change-without-comment-unrel/eval/hints b/t/recipes/checks/debian/changelog/changelog-file-epoch-change-without-comment-unrel/eval/hints new file mode 100644 index 0000000..e69de29 diff --git a/t/recipes/checks/debian/changelog/changelog-file-epoch-change-without-comment/build-spec/debian/changelog.in b/t/recipes/checks/debian/changelog/changelog-file-epoch-change-without-comment/build-spec/debian/changelog.in new file mode 100644 index 0000000..c8a9ab0 --- /dev/null +++ b/t/recipes/checks/debian/changelog/changelog-file-epoch-change-without-comment/build-spec/debian/changelog.in @@ -0,0 +1,11 @@ +[% $source %] (2:[% $version %]) unstable; urgency=low + + * This changelog entry bumps the version. + + -- [% $author %] [% $date %] + +[% $source %] (1:99999999) unstable; urgency=low + + * Initial upload. + + -- [% $author %] Fri, 06 Feb 2009 22:22:37 -0800 diff --git a/t/recipes/checks/debian/changelog/changelog-file-epoch-change-without-comment/build-spec/fill-values b/t/recipes/checks/debian/changelog/changelog-file-epoch-change-without-comment/build-spec/fill-values new file mode 100644 index 0000000..9bcb203 --- /dev/null +++ b/t/recipes/checks/debian/changelog/changelog-file-epoch-change-without-comment/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: upload-native +Testname: changelog-file-epoch-change-without-comment +Description: Check changelog for accidental epoch changes diff --git a/t/recipes/checks/debian/changelog/changelog-file-epoch-change-without-comment/eval/desc b/t/recipes/checks/debian/changelog/changelog-file-epoch-change-without-comment/eval/desc new file mode 100644 index 0000000..538582f --- /dev/null +++ b/t/recipes/checks/debian/changelog/changelog-file-epoch-change-without-comment/eval/desc @@ -0,0 +1,5 @@ +Testname: changelog-file-epoch-change-without-comment +Test-Against: + epoch-changed-but-upstream-version-did-not-go-backwards + latest-debian-changelog-entry-reuses-existing-version +Check: debian/changelog diff --git a/t/recipes/checks/debian/changelog/changelog-file-epoch-change-without-comment/eval/hints b/t/recipes/checks/debian/changelog/changelog-file-epoch-change-without-comment/eval/hints new file mode 100644 index 0000000..c8fe1d5 --- /dev/null +++ b/t/recipes/checks/debian/changelog/changelog-file-epoch-change-without-comment/eval/hints @@ -0,0 +1 @@ +changelog-file-epoch-change-without-comment (source): epoch-change-without-comment 1:99999999 -> 2:1.0 [debian/changelog:1] diff --git a/t/recipes/checks/debian/changelog/changelog-file-epoch-changed-upstream-version-decrease/build-spec/debian/changelog.in b/t/recipes/checks/debian/changelog/changelog-file-epoch-changed-upstream-version-decrease/build-spec/debian/changelog.in new file mode 100644 index 0000000..c7a1b0c --- /dev/null +++ b/t/recipes/checks/debian/changelog/changelog-file-epoch-changed-upstream-version-decrease/build-spec/debian/changelog.in @@ -0,0 +1,12 @@ +[% $source %] (2:[% $version %]) unstable; urgency=low + + * This changelog entry bumps the epoch and the upstream version number + decreased (correctly). + + -- [% $author %] [% $date %] + +[% $source %] (1:9999999) unstable; urgency=low + + * Initial upload. + + -- [% $author %] Fri, 06 Feb 2009 22:22:37 -0800 diff --git a/t/recipes/checks/debian/changelog/changelog-file-epoch-changed-upstream-version-decrease/build-spec/fill-values b/t/recipes/checks/debian/changelog/changelog-file-epoch-changed-upstream-version-decrease/build-spec/fill-values new file mode 100644 index 0000000..b39c267 --- /dev/null +++ b/t/recipes/checks/debian/changelog/changelog-file-epoch-changed-upstream-version-decrease/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: upload-native +Testname: changelog-file-epoch-changed-upstream-version-decrease +Description: Check changelog for accidental epoch changes (decrease) diff --git a/t/recipes/checks/debian/changelog/changelog-file-epoch-changed-upstream-version-decrease/eval/desc b/t/recipes/checks/debian/changelog/changelog-file-epoch-changed-upstream-version-decrease/eval/desc new file mode 100644 index 0000000..4239848 --- /dev/null +++ b/t/recipes/checks/debian/changelog/changelog-file-epoch-changed-upstream-version-decrease/eval/desc @@ -0,0 +1,6 @@ +Testname: changelog-file-epoch-changed-upstream-version-decrease +Test-Against: + epoch-change-without-comment + epoch-changed-but-upstream-version-did-not-go-backwards + latest-debian-changelog-entry-reuses-existing-version +Check: debian/changelog diff --git a/t/recipes/checks/debian/changelog/changelog-file-epoch-changed-upstream-version-decrease/eval/hints b/t/recipes/checks/debian/changelog/changelog-file-epoch-changed-upstream-version-decrease/eval/hints new file mode 100644 index 0000000..e69de29 diff --git a/t/recipes/checks/debian/changelog/changelog-file-epoch-changed-upstream-version-increase/build-spec/debian/changelog.in b/t/recipes/checks/debian/changelog/changelog-file-epoch-changed-upstream-version-increase/build-spec/debian/changelog.in new file mode 100644 index 0000000..49c0a3d --- /dev/null +++ b/t/recipes/checks/debian/changelog/changelog-file-epoch-changed-upstream-version-increase/build-spec/debian/changelog.in @@ -0,0 +1,12 @@ +[% $source %] (2:[% $version %]) unstable; urgency=low + + * This changelog entry bumps the epoch and the upstream version number + increased too. + + -- [% $author %] [% $date %] + +[% $source %] (1:0.9-4) unstable; urgency=low + + * Initial upload. + + -- [% $author %] Fri, 06 Feb 2009 22:22:37 -0800 diff --git a/t/recipes/checks/debian/changelog/changelog-file-epoch-changed-upstream-version-increase/build-spec/fill-values b/t/recipes/checks/debian/changelog/changelog-file-epoch-changed-upstream-version-increase/build-spec/fill-values new file mode 100644 index 0000000..c2167bf --- /dev/null +++ b/t/recipes/checks/debian/changelog/changelog-file-epoch-changed-upstream-version-increase/build-spec/fill-values @@ -0,0 +1,4 @@ +Skeleton: upload-non-native +Testname: changelog-file-epoch-changed-upstream-version-increase +Version: 1.0-3 +Description: Check changelog for accidental epoch changes (increase) diff --git a/t/recipes/checks/debian/changelog/changelog-file-epoch-changed-upstream-version-increase/eval/desc b/t/recipes/checks/debian/changelog/changelog-file-epoch-changed-upstream-version-increase/eval/desc new file mode 100644 index 0000000..6113173 --- /dev/null +++ b/t/recipes/checks/debian/changelog/changelog-file-epoch-changed-upstream-version-increase/eval/desc @@ -0,0 +1,5 @@ +Testname: changelog-file-epoch-changed-upstream-version-increase +Test-Against: + epoch-change-without-comment + latest-debian-changelog-entry-reuses-existing-version +Check: debian/changelog diff --git a/t/recipes/checks/debian/changelog/changelog-file-epoch-changed-upstream-version-increase/eval/hints b/t/recipes/checks/debian/changelog/changelog-file-epoch-changed-upstream-version-increase/eval/hints new file mode 100644 index 0000000..2ac17d4 --- /dev/null +++ b/t/recipes/checks/debian/changelog/changelog-file-epoch-changed-upstream-version-increase/eval/hints @@ -0,0 +1 @@ +changelog-file-epoch-changed-upstream-version-increase (source): epoch-changed-but-upstream-version-did-not-go-backwards 1:0.9-4 -> 2:1.0-3 [debian/changelog:1] diff --git a/t/recipes/checks/debian/changelog/changelog-file-epoch-changed-upstream-version-same/build-spec/debian/changelog.in b/t/recipes/checks/debian/changelog/changelog-file-epoch-changed-upstream-version-same/build-spec/debian/changelog.in new file mode 100644 index 0000000..a992b11 --- /dev/null +++ b/t/recipes/checks/debian/changelog/changelog-file-epoch-changed-upstream-version-same/build-spec/debian/changelog.in @@ -0,0 +1,11 @@ +[% $source %] (2:[% $version %]) unstable; urgency=low + + * This changelog entry bumps the epoch but not the upstream version number, + + -- [% $author %] [% $date %] + +[% $source %] (1:[% $version %]) unstable; urgency=low + + * Initial upload. + + -- [% $author %] Fri, 06 Feb 2009 22:22:37 -0800 diff --git a/t/recipes/checks/debian/changelog/changelog-file-epoch-changed-upstream-version-same/build-spec/fill-values b/t/recipes/checks/debian/changelog/changelog-file-epoch-changed-upstream-version-same/build-spec/fill-values new file mode 100644 index 0000000..86e8493 --- /dev/null +++ b/t/recipes/checks/debian/changelog/changelog-file-epoch-changed-upstream-version-same/build-spec/fill-values @@ -0,0 +1,4 @@ +Skeleton: upload-non-native +Testname: changelog-file-epoch-changed-upstream-version-same +Version: 1.0-3 +Description: Check changelog for accidental epoch changes (same) diff --git a/t/recipes/checks/debian/changelog/changelog-file-epoch-changed-upstream-version-same/eval/desc b/t/recipes/checks/debian/changelog/changelog-file-epoch-changed-upstream-version-same/eval/desc new file mode 100644 index 0000000..b5c1b45 --- /dev/null +++ b/t/recipes/checks/debian/changelog/changelog-file-epoch-changed-upstream-version-same/eval/desc @@ -0,0 +1,5 @@ +Testname: changelog-file-epoch-changed-upstream-version-same +Test-Against: + epoch-change-without-comment + latest-debian-changelog-entry-reuses-existing-version +Check: debian/changelog diff --git a/t/recipes/checks/debian/changelog/changelog-file-epoch-changed-upstream-version-same/eval/hints b/t/recipes/checks/debian/changelog/changelog-file-epoch-changed-upstream-version-same/eval/hints new file mode 100644 index 0000000..8bb66ca --- /dev/null +++ b/t/recipes/checks/debian/changelog/changelog-file-epoch-changed-upstream-version-same/eval/hints @@ -0,0 +1,2 @@ +changelog-file-epoch-changed-upstream-version-same (source): latest-debian-changelog-entry-reuses-existing-version 2:1.0-3 ~ 1:1.0-3 (last used: Fri, 06 Feb 2009 22:22:37 -0800) [debian/changelog:1] +changelog-file-epoch-changed-upstream-version-same (source): epoch-changed-but-upstream-version-did-not-go-backwards 1:1.0-3 -> 2:1.0-3 [debian/changelog:1] diff --git a/t/recipes/checks/debian/changelog/changelog-file-etch-nmu/build-spec/debian/changelog.in b/t/recipes/checks/debian/changelog/changelog-file-etch-nmu/build-spec/debian/changelog.in new file mode 100644 index 0000000..71b790a --- /dev/null +++ b/t/recipes/checks/debian/changelog/changelog-file-etch-nmu/build-spec/debian/changelog.in @@ -0,0 +1,7 @@ +[% $source %] ([% $version %]) unstable; urgency=low + + * Non-maintainer upload. + * Lintian Test Suite. + * Test: [% $testname %] + + -- Russ Allbery [% $date %] diff --git a/t/recipes/checks/debian/changelog/changelog-file-etch-nmu/build-spec/fill-values b/t/recipes/checks/debian/changelog/changelog-file-etch-nmu/build-spec/fill-values new file mode 100644 index 0000000..0239f93 --- /dev/null +++ b/t/recipes/checks/debian/changelog/changelog-file-etch-nmu/build-spec/fill-values @@ -0,0 +1,4 @@ +Testname: changelog-file-etch-nmu +Skeleton: upload-non-native +Version: 1.0-1etch1.1 +Description: Test for a code name in an unstable upload diff --git a/t/recipes/checks/debian/changelog/changelog-file-etch-nmu/eval/desc b/t/recipes/checks/debian/changelog/changelog-file-etch-nmu/eval/desc new file mode 100644 index 0000000..5904a7d --- /dev/null +++ b/t/recipes/checks/debian/changelog/changelog-file-etch-nmu/eval/desc @@ -0,0 +1,5 @@ +Testname: changelog-file-etch-nmu +Test-Against: + malformed-debian-changelog-version + version-refers-to-distribution +Check: debian/changelog diff --git a/t/recipes/checks/debian/changelog/changelog-file-etch-nmu/eval/hints b/t/recipes/checks/debian/changelog/changelog-file-etch-nmu/eval/hints new file mode 100644 index 0000000..e69de29 diff --git a/t/recipes/checks/debian/changelog/changelog-file-etch/build-spec/fill-values b/t/recipes/checks/debian/changelog/changelog-file-etch/build-spec/fill-values new file mode 100644 index 0000000..1d1817f --- /dev/null +++ b/t/recipes/checks/debian/changelog/changelog-file-etch/build-spec/fill-values @@ -0,0 +1,4 @@ +Testname: changelog-file-etch +Skeleton: upload-non-native +Version: 1.0-1etch1 +Description: Test for a code name in an unstable upload diff --git a/t/recipes/checks/debian/changelog/changelog-file-etch/eval/desc b/t/recipes/checks/debian/changelog/changelog-file-etch/eval/desc new file mode 100644 index 0000000..03dd7f8 --- /dev/null +++ b/t/recipes/checks/debian/changelog/changelog-file-etch/eval/desc @@ -0,0 +1,4 @@ +Testname: changelog-file-etch +Test-Against: + malformed-debian-changelog-version +Check: debian/changelog diff --git a/t/recipes/checks/debian/changelog/changelog-file-etch/eval/hints b/t/recipes/checks/debian/changelog/changelog-file-etch/eval/hints new file mode 100644 index 0000000..8b1b701 --- /dev/null +++ b/t/recipes/checks/debian/changelog/changelog-file-etch/eval/hints @@ -0,0 +1 @@ +changelog-file-etch (source): version-refers-to-distribution 1.0-1etch1 [debian/changelog:1] diff --git a/t/recipes/checks/debian/changelog/changelog-file-experimental-false-positive/build-spec/debian/changelog.in b/t/recipes/checks/debian/changelog/changelog-file-experimental-false-positive/build-spec/debian/changelog.in new file mode 100644 index 0000000..01e7403 --- /dev/null +++ b/t/recipes/checks/debian/changelog/changelog-file-experimental-false-positive/build-spec/debian/changelog.in @@ -0,0 +1,13 @@ +[% $source %] ([% $version %]) unstable; urgency=low + + * Lintian Test Suite. + * Upload to sid. + * Test: [% $testname %] + + -- [% $author %] [% $date %] + +[% $source %] (1.0-1) experimental; urgency=low + + * First upload to experimental. + + -- [% $author %] Fri, 06 Feb 2009 22:22:37 -0800 diff --git a/t/recipes/checks/debian/changelog/changelog-file-experimental-false-positive/build-spec/fill-values b/t/recipes/checks/debian/changelog/changelog-file-experimental-false-positive/build-spec/fill-values new file mode 100644 index 0000000..dc465ac --- /dev/null +++ b/t/recipes/checks/debian/changelog/changelog-file-experimental-false-positive/build-spec/fill-values @@ -0,0 +1,4 @@ +Skeleton: upload-non-native +Testname: changelog-file-experimental-false-positive +Version: 1.0-3 +Description: Check experimental to unstable changes false positive diff --git a/t/recipes/checks/debian/changelog/changelog-file-experimental-false-positive/eval/desc b/t/recipes/checks/debian/changelog/changelog-file-experimental-false-positive/eval/desc new file mode 100644 index 0000000..4e6018a --- /dev/null +++ b/t/recipes/checks/debian/changelog/changelog-file-experimental-false-positive/eval/desc @@ -0,0 +1,2 @@ +Testname: changelog-file-experimental-false-positive +Check: debian/changelog diff --git a/t/recipes/checks/debian/changelog/changelog-file-experimental-false-positive/eval/hints b/t/recipes/checks/debian/changelog/changelog-file-experimental-false-positive/eval/hints new file mode 100644 index 0000000..318b4f2 --- /dev/null +++ b/t/recipes/checks/debian/changelog/changelog-file-experimental-false-positive/eval/hints @@ -0,0 +1 @@ +changelog-file-experimental-false-positive (source): non-consecutive-debian-revision 1.0-1 -> 1.0-3 [debian/changelog:1] diff --git a/t/recipes/checks/debian/changelog/changelog-file-experimental/build-spec/debian/changelog.in b/t/recipes/checks/debian/changelog/changelog-file-experimental/build-spec/debian/changelog.in new file mode 100644 index 0000000..b8b07af --- /dev/null +++ b/t/recipes/checks/debian/changelog/changelog-file-experimental/build-spec/debian/changelog.in @@ -0,0 +1,12 @@ +[% $source %] ([% $version %]) unstable; urgency=low + + * Lintian Test Suite. + * Test: [% $testname %] + + -- [% $author %] [% $date %] + +[% $source %] (1.0-1) experimental; urgency=low + + * First upload to experimental. + + -- [% $author %] Fri, 06 Feb 2009 22:22:37 -0800 diff --git a/t/recipes/checks/debian/changelog/changelog-file-experimental/build-spec/fill-values b/t/recipes/checks/debian/changelog/changelog-file-experimental/build-spec/fill-values new file mode 100644 index 0000000..562583b --- /dev/null +++ b/t/recipes/checks/debian/changelog/changelog-file-experimental/build-spec/fill-values @@ -0,0 +1,4 @@ +Skeleton: upload-non-native +Testname: changelog-file-experimental +Version: 1.0-3 +Description: Check experimental to unstable changes diff --git a/t/recipes/checks/debian/changelog/changelog-file-experimental/eval/desc b/t/recipes/checks/debian/changelog/changelog-file-experimental/eval/desc new file mode 100644 index 0000000..e48f09b --- /dev/null +++ b/t/recipes/checks/debian/changelog/changelog-file-experimental/eval/desc @@ -0,0 +1,2 @@ +Testname: changelog-file-experimental +Check: debian/changelog diff --git a/t/recipes/checks/debian/changelog/changelog-file-experimental/eval/hints b/t/recipes/checks/debian/changelog/changelog-file-experimental/eval/hints new file mode 100644 index 0000000..58aaeee --- /dev/null +++ b/t/recipes/checks/debian/changelog/changelog-file-experimental/eval/hints @@ -0,0 +1,2 @@ +changelog-file-experimental (source): non-consecutive-debian-revision 1.0-1 -> 1.0-3 [debian/changelog:1] +changelog-file-experimental (binary): experimental-to-unstable-without-comment [usr/share/doc/changelog-file-experimental/changelog.Debian.gz:1] diff --git a/t/recipes/checks/debian/changelog/changelog-file-extra-upstream/build-spec/debian/docs b/t/recipes/checks/debian/changelog/changelog-file-extra-upstream/build-spec/debian/docs new file mode 100644 index 0000000..6d10dce --- /dev/null +++ b/t/recipes/checks/debian/changelog/changelog-file-extra-upstream/build-spec/debian/docs @@ -0,0 +1 @@ +changelog diff --git a/t/recipes/checks/debian/changelog/changelog-file-extra-upstream/build-spec/fill-values b/t/recipes/checks/debian/changelog/changelog-file-extra-upstream/build-spec/fill-values new file mode 100644 index 0000000..6d6ac8c --- /dev/null +++ b/t/recipes/checks/debian/changelog/changelog-file-extra-upstream/build-spec/fill-values @@ -0,0 +1,3 @@ +Testname: changelog-file-extra-upstream +Skeleton: upload-non-native +Description: Check a package with ChangeLog and changelog.gz diff --git a/t/recipes/checks/debian/changelog/changelog-file-extra-upstream/build-spec/orig/changelog b/t/recipes/checks/debian/changelog/changelog-file-extra-upstream/build-spec/orig/changelog new file mode 100644 index 0000000..2d85e10 --- /dev/null +++ b/t/recipes/checks/debian/changelog/changelog-file-extra-upstream/build-spec/orig/changelog @@ -0,0 +1 @@ +This is some upstream changelog file. diff --git a/t/recipes/checks/debian/changelog/changelog-file-extra-upstream/eval/desc b/t/recipes/checks/debian/changelog/changelog-file-extra-upstream/eval/desc new file mode 100644 index 0000000..8520129 --- /dev/null +++ b/t/recipes/checks/debian/changelog/changelog-file-extra-upstream/eval/desc @@ -0,0 +1,3 @@ +Testname: changelog-file-extra-upstream +Test-Against: changelog-file-not-compressed +Check: debian/changelog diff --git a/t/recipes/checks/debian/changelog/changelog-file-extra-upstream/eval/hints b/t/recipes/checks/debian/changelog/changelog-file-extra-upstream/eval/hints new file mode 100644 index 0000000..e69de29 diff --git a/t/recipes/checks/debian/changelog/changelog-file-general/build-spec/debian/changelog.in b/t/recipes/checks/debian/changelog/changelog-file-general/build-spec/debian/changelog.in new file mode 100644 index 0000000..d73efdd --- /dev/null +++ b/t/recipes/checks/debian/changelog/changelog-file-general/build-spec/debian/changelog.in @@ -0,0 +1,42 @@ +[% $source %] (1:[% $version %]) unstable; urgency=low + + + * Test: [% $testname %] + * Upload to experimental. + * improbable-bug-number-in-closes (Closes: #1234) + * Another bug closer without a colon (Closes #555555) + * This line is too long since it contains words and words and words but doesn't + have any wrapping except at column 81. + * http://www.example.com/but-a-really-long-url-does-not-count-as-a-long-line-at-all + See http://www.example.com/but-a-really-long-url-does-not-count-as-a-long-line-at-all + even if preceded by See. + * Misspelled Closes (Close: #666666) + + * Here is another really long in the changelog, and it would be really nice if a + certain program would report its line number correctly. Especially since, + we have an extra empty line in the start of the entry. + + * Below is another very long line (UTF-8), which should have a "visual" width + of ~75 characters, but consists of over 200 bytes. + üüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüü + + * It might even fix TEMP-1234567-abcdef, though probably not. + * We refer to the epoch bump here. + + -- [% $author %] [% $date %] + +[% $source %] ([% $version %]) unstable; urgency=low + + * Duplicate changelog entry to trigger tags. + + -- Unknown [% $date %] + +[% $source %] (0.1) unstable; urgency=low + + * Used to be a syntax error here. + + -- [% $author %] [% $date %] + +Local variables: +add-log-mailing-address: "rra@debian.org" +End: diff --git a/t/recipes/checks/debian/changelog/changelog-file-general/build-spec/debian/rules b/t/recipes/checks/debian/changelog/changelog-file-general/build-spec/debian/rules new file mode 100755 index 0000000..9171128 --- /dev/null +++ b/t/recipes/checks/debian/changelog/changelog-file-general/build-spec/debian/rules @@ -0,0 +1,10 @@ +#!/usr/bin/make -f +pkg = $(shell dh_listpackages) + +%: + dh $@ + +override_dh_installchangelogs: + install -c -m 644 debian/changelog \ + debian/$(pkg)/usr/share/doc/$(pkg)/changelog.Debian + gzip -1 -n debian/$(pkg)/usr/share/doc/$(pkg)/changelog.Debian diff --git a/t/recipes/checks/debian/changelog/changelog-file-general/build-spec/fill-values b/t/recipes/checks/debian/changelog/changelog-file-general/build-spec/fill-values new file mode 100644 index 0000000..ec70647 --- /dev/null +++ b/t/recipes/checks/debian/changelog/changelog-file-general/build-spec/fill-values @@ -0,0 +1,3 @@ +Testname: changelog-file-general +Skeleton: upload-non-native +Description: General tests for changelog-file tags diff --git a/t/recipes/checks/debian/changelog/changelog-file-general/eval/desc b/t/recipes/checks/debian/changelog/changelog-file-general/eval/desc new file mode 100644 index 0000000..b5e38e0 --- /dev/null +++ b/t/recipes/checks/debian/changelog/changelog-file-general/eval/desc @@ -0,0 +1,4 @@ +Testname: changelog-file-general +Test-Against: + malformed-debian-changelog-version +Check: debian/changelog diff --git a/t/recipes/checks/debian/changelog/changelog-file-general/eval/hints b/t/recipes/checks/debian/changelog/changelog-file-general/eval/hints new file mode 100644 index 0000000..083916b --- /dev/null +++ b/t/recipes/checks/debian/changelog/changelog-file-general/eval/hints @@ -0,0 +1,14 @@ +changelog-file-general (source): latest-debian-changelog-entry-without-new-date [debian/changelog:1] +changelog-file-general (source): latest-debian-changelog-entry-reuses-existing-version 1:1.0-1 ~ 1.0-1 (last used: CURRENT) [debian/changelog:1] +changelog-file-general (source): epoch-changed-but-upstream-version-did-not-go-backwards 1.0-1 -> 1:1.0-1 [debian/changelog:1] +changelog-file-general (binary): possible-missing-colon-in-closes Closes #555555 [usr/share/doc/changelog-file-general/changelog.Debian.gz:1] +changelog-file-general (binary): misspelled-closes-bug Close: #666666 [usr/share/doc/changelog-file-general/changelog.Debian.gz:1] +changelog-file-general (binary): latest-changelog-entry-without-new-date [usr/share/doc/changelog-file-general/changelog.Debian.gz:1] +changelog-file-general (binary): improbable-bug-number-in-closes 1234 [usr/share/doc/changelog-file-general/changelog.Debian.gz:1] +changelog-file-general (binary): debian-changelog-line-too-long [usr/share/doc/changelog-file-general/changelog.Debian.gz:8] +changelog-file-general (binary): debian-changelog-line-too-long [usr/share/doc/changelog-file-general/changelog.Debian.gz:15] +changelog-file-general (binary): debian-changelog-file-contains-obsolete-user-emacs-settings [usr/share/doc/changelog-file-general/changelog.Debian.gz:41] +changelog-file-general (binary): changelog-references-temp-security-identifier TEMP-1234567-abcdef [usr/share/doc/changelog-file-general/changelog.Debian.gz:1] +changelog-file-general (binary): changelog-not-compressed-with-max-compression [usr/share/doc/changelog-file-general/changelog.Debian.gz] +changelog-file-general (binary): bogus-mail-host-in-debian-changelog unknown@unknown (for version 1.0-1) [usr/share/doc/changelog-file-general/changelog.Debian.gz:28] +changelog-file-general (binary): bad-intended-distribution intended for experimental but uploaded to unstable [usr/share/doc/changelog-file-general/changelog.Debian.gz:1] diff --git a/t/recipes/checks/debian/changelog/changelog-file-general/eval/post-test b/t/recipes/checks/debian/changelog/changelog-file-general/eval/post-test new file mode 100644 index 0000000..a84cbe8 --- /dev/null +++ b/t/recipes/checks/debian/changelog/changelog-file-general/eval/post-test @@ -0,0 +1 @@ +s/\(last used: ([^\)]+*)\)/(last used: CURRENT)/ diff --git a/t/recipes/checks/debian/changelog/changelog-file-invalid-date/build-spec/debian/changelog.in b/t/recipes/checks/debian/changelog/changelog-file-invalid-date/build-spec/debian/changelog.in new file mode 100644 index 0000000..fdf11f7 --- /dev/null +++ b/t/recipes/checks/debian/changelog/changelog-file-invalid-date/build-spec/debian/changelog.in @@ -0,0 +1,8 @@ +[% $source %] ([% $version %]) unstable; urgency=low + + * Lintian Test Suite. + * Test: [% $testname %] + * Suppress "should close ITP bug" messages. (Closes: #123456) + * Writes out "Sept" and "Thurs"; should be "Sep" and "Thu". + + -- [% $author %] Thurs, 14 Sept 2017 10:47:43 +0000 diff --git a/t/recipes/checks/debian/changelog/changelog-file-invalid-date/build-spec/debian/control.in b/t/recipes/checks/debian/changelog/changelog-file-invalid-date/build-spec/debian/control.in new file mode 100644 index 0000000..c770eac --- /dev/null +++ b/t/recipes/checks/debian/changelog/changelog-file-invalid-date/build-spec/debian/control.in @@ -0,0 +1,16 @@ +Source: [% $source %] +Priority: optional +Section: [% $section %] +Maintainer: [% $author %] +Standards-Version: 4.1.0 +Build-Depends: [% $build_depends %] +Rules-Requires-Root: no + +Package: [% $source %] +Architecture: [% $package_architecture %] +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: [% $description %] + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. diff --git a/t/recipes/checks/debian/changelog/changelog-file-invalid-date/build-spec/fill-values b/t/recipes/checks/debian/changelog/changelog-file-invalid-date/build-spec/fill-values new file mode 100644 index 0000000..d0d3f38 --- /dev/null +++ b/t/recipes/checks/debian/changelog/changelog-file-invalid-date/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: upload-native +Testname: changelog-file-invalid-date +Description: Test for invalid dates diff --git a/t/recipes/checks/debian/changelog/changelog-file-invalid-date/eval/desc b/t/recipes/checks/debian/changelog/changelog-file-invalid-date/eval/desc new file mode 100644 index 0000000..d58b493 --- /dev/null +++ b/t/recipes/checks/debian/changelog/changelog-file-invalid-date/eval/desc @@ -0,0 +1,4 @@ +Testname: changelog-file-invalid-date +Test-Against: + debian-changelog-has-wrong-day-of-week +Check: debian/changelog diff --git a/t/recipes/checks/debian/changelog/changelog-file-invalid-date/eval/hints b/t/recipes/checks/debian/changelog/changelog-file-invalid-date/eval/hints new file mode 100644 index 0000000..472360d --- /dev/null +++ b/t/recipes/checks/debian/changelog/changelog-file-invalid-date/eval/hints @@ -0,0 +1,2 @@ +changelog-file-invalid-date (binary): invalid-date-in-debian-changelog (Thurs -> Thu) [usr/share/doc/changelog-file-invalid-date/changelog.gz:1] +changelog-file-invalid-date (binary): invalid-date-in-debian-changelog (Sept -> Sep) [usr/share/doc/changelog-file-invalid-date/changelog.gz:1] diff --git a/t/recipes/checks/debian/changelog/changelog-file-line-too-short/build-spec/debian/changelog.in b/t/recipes/checks/debian/changelog/changelog-file-line-too-short/build-spec/debian/changelog.in new file mode 100644 index 0000000..b700347 --- /dev/null +++ b/t/recipes/checks/debian/changelog/changelog-file-line-too-short/build-spec/debian/changelog.in @@ -0,0 +1,17 @@ +[% $source %] ([% $version %]) unstable; urgency=low + + * Suppress "should close ITP bug" messages. (Closes: #123456) + + * The following lines are too short. + * R³ + * dh 11 + * 12345 + + * The following entries are long enough. + * dh 11. + * 123456 + + * These are false positives. + * 123: + + -- [% $author %] [% $date %] diff --git a/t/recipes/checks/debian/changelog/changelog-file-line-too-short/build-spec/fill-values b/t/recipes/checks/debian/changelog/changelog-file-line-too-short/build-spec/fill-values new file mode 100644 index 0000000..719e316 --- /dev/null +++ b/t/recipes/checks/debian/changelog/changelog-file-line-too-short/build-spec/fill-values @@ -0,0 +1,3 @@ +Testname: changelog-file-line-too-short +Skeleton: upload-non-native +Description: Test for short changelog entries diff --git a/t/recipes/checks/debian/changelog/changelog-file-line-too-short/eval/desc b/t/recipes/checks/debian/changelog/changelog-file-line-too-short/eval/desc new file mode 100644 index 0000000..9681924 --- /dev/null +++ b/t/recipes/checks/debian/changelog/changelog-file-line-too-short/eval/desc @@ -0,0 +1,2 @@ +Testname: changelog-file-line-too-short +Check: debian/changelog diff --git a/t/recipes/checks/debian/changelog/changelog-file-line-too-short/eval/hints b/t/recipes/checks/debian/changelog/changelog-file-line-too-short/eval/hints new file mode 100644 index 0000000..92d4bf6 --- /dev/null +++ b/t/recipes/checks/debian/changelog/changelog-file-line-too-short/eval/hints @@ -0,0 +1,3 @@ +changelog-file-line-too-short (binary): debian-changelog-line-too-short dh 11 [usr/share/doc/changelog-file-line-too-short/changelog.Debian.gz:7] +changelog-file-line-too-short (binary): debian-changelog-line-too-short R³ [usr/share/doc/changelog-file-line-too-short/changelog.Debian.gz:6] +changelog-file-line-too-short (binary): debian-changelog-line-too-short 12345 [usr/share/doc/changelog-file-line-too-short/changelog.Debian.gz:8] diff --git a/t/recipes/checks/debian/changelog/changelog-file-missing-explicit-entry/build-spec/debian/changelog.in b/t/recipes/checks/debian/changelog/changelog-file-missing-explicit-entry/build-spec/debian/changelog.in new file mode 100644 index 0000000..ea010a2 --- /dev/null +++ b/t/recipes/checks/debian/changelog/changelog-file-missing-explicit-entry/build-spec/debian/changelog.in @@ -0,0 +1,12 @@ +[% $source %] ([% $version %]) stable-proposed-updates; urgency=low + + * New version. + + -- [% $author %] [% $date %] + +[% $source %] (0.9-1) unstable; urgency=low + + * Lintian Test Suite. + * Test: [% $testname %] + + -- [% $author %] Tue, 1 Jan 2008 22:45:57 +0000 diff --git a/t/recipes/checks/debian/changelog/changelog-file-missing-explicit-entry/build-spec/fill-values b/t/recipes/checks/debian/changelog/changelog-file-missing-explicit-entry/build-spec/fill-values new file mode 100644 index 0000000..2bdf496 --- /dev/null +++ b/t/recipes/checks/debian/changelog/changelog-file-missing-explicit-entry/build-spec/fill-values @@ -0,0 +1,4 @@ +Testname: changelog-file-missing-explicit-entry +Skeleton: upload-non-native +Version: 1.2-3+deb9u1 +Description: Test for missing (stable update, etc.) entries diff --git a/t/recipes/checks/debian/changelog/changelog-file-missing-explicit-entry/eval/desc b/t/recipes/checks/debian/changelog/changelog-file-missing-explicit-entry/eval/desc new file mode 100644 index 0000000..f2805f3 --- /dev/null +++ b/t/recipes/checks/debian/changelog/changelog-file-missing-explicit-entry/eval/desc @@ -0,0 +1,2 @@ +Testname: changelog-file-missing-explicit-entry +Check: debian/changelog diff --git a/t/recipes/checks/debian/changelog/changelog-file-missing-explicit-entry/eval/hints b/t/recipes/checks/debian/changelog/changelog-file-missing-explicit-entry/eval/hints new file mode 100644 index 0000000..b24457e --- /dev/null +++ b/t/recipes/checks/debian/changelog/changelog-file-missing-explicit-entry/eval/hints @@ -0,0 +1 @@ +changelog-file-missing-explicit-entry (source): changelog-file-missing-explicit-entry 0.9-1 -> 1.2-3 (missing) -> 1.2-3+deb9u1 [debian/changelog:1] diff --git a/t/recipes/checks/debian/changelog/changelog-file-missing/build-spec/debian/rules b/t/recipes/checks/debian/changelog/changelog-file-missing/build-spec/debian/rules new file mode 100755 index 0000000..a687494 --- /dev/null +++ b/t/recipes/checks/debian/changelog/changelog-file-missing/build-spec/debian/rules @@ -0,0 +1,9 @@ +#!/usr/bin/make -f + +%: + dh $@ + + +override_dh_md5sums: + find debian/*/ -type f -a -name 'changelog*' -delete + dh_md5sums diff --git a/t/recipes/checks/debian/changelog/changelog-file-missing/build-spec/fill-values b/t/recipes/checks/debian/changelog/changelog-file-missing/build-spec/fill-values new file mode 100644 index 0000000..fb5b402 --- /dev/null +++ b/t/recipes/checks/debian/changelog/changelog-file-missing/build-spec/fill-values @@ -0,0 +1,3 @@ +Testname: changelog-file-missing +Skeleton: upload-non-native +Description: Test if Debian changelog is missing diff --git a/t/recipes/checks/debian/changelog/changelog-file-missing/eval/desc b/t/recipes/checks/debian/changelog/changelog-file-missing/eval/desc new file mode 100644 index 0000000..c3c534b --- /dev/null +++ b/t/recipes/checks/debian/changelog/changelog-file-missing/eval/desc @@ -0,0 +1,2 @@ +Testname: changelog-file-missing +Check: debian/changelog diff --git a/t/recipes/checks/debian/changelog/changelog-file-missing/eval/hints b/t/recipes/checks/debian/changelog/changelog-file-missing/eval/hints new file mode 100644 index 0000000..de5ad15 --- /dev/null +++ b/t/recipes/checks/debian/changelog/changelog-file-missing/eval/hints @@ -0,0 +1 @@ +changelog-file-missing (binary): no-changelog usr/share/doc/changelog-file-missing/changelog.Debian.gz (non-native package) diff --git a/t/recipes/checks/debian/changelog/changelog-file-new-upstream/build-spec/debian/changelog.in b/t/recipes/checks/debian/changelog/changelog-file-new-upstream/build-spec/debian/changelog.in new file mode 100644 index 0000000..18d0420 --- /dev/null +++ b/t/recipes/checks/debian/changelog/changelog-file-new-upstream/build-spec/debian/changelog.in @@ -0,0 +1,14 @@ +[% $source %] ([% $version %]) unstable; urgency=low + + * New upstream bugfix release. + * Lintian Test Suite. + * Test: [% $testname %] + + -- [% $author %] [% $date %] + +[% $source %] (1.0-1) unstable; urgency=low + + * Old changelog entry to trigger the tag. + + -- [% $author %] Sat, 20 Mar 2010 16:09:18 -0700 + diff --git a/t/recipes/checks/debian/changelog/changelog-file-new-upstream/build-spec/fill-values b/t/recipes/checks/debian/changelog/changelog-file-new-upstream/build-spec/fill-values new file mode 100644 index 0000000..c26e446 --- /dev/null +++ b/t/recipes/checks/debian/changelog/changelog-file-new-upstream/build-spec/fill-values @@ -0,0 +1,4 @@ +Testname: changelog-file-new-upstream +Skeleton: upload-non-native +Version: 1.0-2 +Description: Check a new upstream version without a version change diff --git a/t/recipes/checks/debian/changelog/changelog-file-new-upstream/eval/desc b/t/recipes/checks/debian/changelog/changelog-file-new-upstream/eval/desc new file mode 100644 index 0000000..dca2515 --- /dev/null +++ b/t/recipes/checks/debian/changelog/changelog-file-new-upstream/eval/desc @@ -0,0 +1,2 @@ +Testname: changelog-file-new-upstream +Check: debian/changelog diff --git a/t/recipes/checks/debian/changelog/changelog-file-new-upstream/eval/hints b/t/recipes/checks/debian/changelog/changelog-file-new-upstream/eval/hints new file mode 100644 index 0000000..6c35244 --- /dev/null +++ b/t/recipes/checks/debian/changelog/changelog-file-new-upstream/eval/hints @@ -0,0 +1 @@ +changelog-file-new-upstream (source): possible-new-upstream-release-without-new-version [debian/changelog:1] diff --git a/t/recipes/checks/debian/changelog/changelog-file-news-and-changelog-not-compressed/build-spec/debian/NEWS b/t/recipes/checks/debian/changelog/changelog-file-news-and-changelog-not-compressed/build-spec/debian/NEWS new file mode 100644 index 0000000..6a69656 --- /dev/null +++ b/t/recipes/checks/debian/changelog/changelog-file-news-and-changelog-not-compressed/build-spec/debian/NEWS @@ -0,0 +1,7 @@ +changelog-file-news-and-changelog-not-compressed (1.0) unstable; urgency=low + + Something incredibly important... or maybe this is just a + lintian test for an uncompressed NEWS file. + + -- Niels Thykier Wed, 10 Aug 2011 21:09:24 +0200 + \ No newline at end of file diff --git a/t/recipes/checks/debian/changelog/changelog-file-news-and-changelog-not-compressed/build-spec/debian/rules b/t/recipes/checks/debian/changelog/changelog-file-news-and-changelog-not-compressed/build-spec/debian/rules new file mode 100755 index 0000000..f957b51 --- /dev/null +++ b/t/recipes/checks/debian/changelog/changelog-file-news-and-changelog-not-compressed/build-spec/debian/rules @@ -0,0 +1,14 @@ +#!/usr/bin/make -f +pkg = $(shell dh_listpackages) + +%: + dh $@ + +override_dh_installchangelogs: + install -c -m 644 debian/changelog \ + debian/$(pkg)/usr/share/doc/$(pkg)/changelog + install -c -m 644 debian/NEWS \ + debian/$(pkg)/usr/share/doc/$(pkg)/NEWS.Debian + +override_dh_compress: + diff --git a/t/recipes/checks/debian/changelog/changelog-file-news-and-changelog-not-compressed/build-spec/fill-values b/t/recipes/checks/debian/changelog/changelog-file-news-and-changelog-not-compressed/build-spec/fill-values new file mode 100644 index 0000000..8fc7c20 --- /dev/null +++ b/t/recipes/checks/debian/changelog/changelog-file-news-and-changelog-not-compressed/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: upload-native +Testname: changelog-file-news-and-changelog-not-compressed +Description: General tests for changelog-file tags diff --git a/t/recipes/checks/debian/changelog/changelog-file-news-and-changelog-not-compressed/eval/desc b/t/recipes/checks/debian/changelog/changelog-file-news-and-changelog-not-compressed/eval/desc new file mode 100644 index 0000000..9d29525 --- /dev/null +++ b/t/recipes/checks/debian/changelog/changelog-file-news-and-changelog-not-compressed/eval/desc @@ -0,0 +1,2 @@ +Testname: changelog-file-news-and-changelog-not-compressed +Check: debian/changelog diff --git a/t/recipes/checks/debian/changelog/changelog-file-news-and-changelog-not-compressed/eval/hints b/t/recipes/checks/debian/changelog/changelog-file-news-and-changelog-not-compressed/eval/hints new file mode 100644 index 0000000..2715a6c --- /dev/null +++ b/t/recipes/checks/debian/changelog/changelog-file-news-and-changelog-not-compressed/eval/hints @@ -0,0 +1,2 @@ +changelog-file-news-and-changelog-not-compressed (binary): debian-news-file-not-compressed [usr/share/doc/changelog-file-news-and-changelog-not-compressed/NEWS.Debian] +changelog-file-news-and-changelog-not-compressed (binary): changelog-file-not-compressed [usr/share/doc/changelog-file-news-and-changelog-not-compressed/changelog] diff --git a/t/recipes/checks/debian/changelog/changelog-file-news-general/build-spec/debian/NEWS b/t/recipes/checks/debian/changelog/changelog-file-news-general/build-spec/debian/NEWS new file mode 100644 index 0000000..e5ca0f2 --- /dev/null +++ b/t/recipes/checks/debian/changelog/changelog-file-news-general/build-spec/debian/NEWS @@ -0,0 +1,11 @@ +changelog-file-news-general (1.0) UNRELEASED; urgency=high + + * This is a major change, which shouldn't be using an asterisk. It also + has an ISO 8859-1 character: µ and a speling error. + + -- Russ Allbery Fri, 01 Jan 2010 20:57:15 -0800 +changelog-file-news-general (0.9) unstable; urgency=low + + Another entry, this one with a syntax error in the date. + + -- Russ Allbery Fri, 01 Jan 2010 20:57:15 -080 diff --git a/t/recipes/checks/debian/changelog/changelog-file-news-general/build-spec/fill-values b/t/recipes/checks/debian/changelog/changelog-file-news-general/build-spec/fill-values new file mode 100644 index 0000000..7b9e061 --- /dev/null +++ b/t/recipes/checks/debian/changelog/changelog-file-news-general/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: upload-native +Testname: changelog-file-news-general +Description: General checks for NEWS.Debian diff --git a/t/recipes/checks/debian/changelog/changelog-file-news-general/eval/desc b/t/recipes/checks/debian/changelog/changelog-file-news-general/eval/desc new file mode 100644 index 0000000..83f65c2 --- /dev/null +++ b/t/recipes/checks/debian/changelog/changelog-file-news-general/eval/desc @@ -0,0 +1,2 @@ +Testname: changelog-file-news-general +Check: debian/changelog diff --git a/t/recipes/checks/debian/changelog/changelog-file-news-general/eval/hints b/t/recipes/checks/debian/changelog/changelog-file-news-general/eval/hints new file mode 100644 index 0000000..e04e26e --- /dev/null +++ b/t/recipes/checks/debian/changelog/changelog-file-news-general/eval/hints @@ -0,0 +1,7 @@ +changelog-file-news-general (binary): syntax-error-in-debian-news-file "found eof where expected more change data or trailer" [usr/share/doc/changelog-file-news-general/NEWS.Debian.gz:12] +changelog-file-news-general (binary): syntax-error-in-debian-news-file "badly formatted trailer line" [usr/share/doc/changelog-file-news-general/NEWS.Debian.gz:11] +changelog-file-news-general (binary): spelling-error-in-news-debian speling spelling [usr/share/doc/changelog-file-news-general/NEWS.Debian.gz] +changelog-file-news-general (binary): debian-news-entry-uses-asterisk [usr/share/doc/changelog-file-news-general/NEWS.Debian.gz:1] +changelog-file-news-general (binary): debian-news-entry-has-strange-distribution UNRELEASED [usr/share/doc/changelog-file-news-general/NEWS.Debian.gz:1] +changelog-file-news-general (binary): changelog-news-debian-mismatch Urgency low != high [usr/share/doc/changelog-file-news-general/NEWS.Debian.gz:1] +changelog-file-news-general (binary): changelog-news-debian-mismatch Distribution unstable != UNRELEASED [usr/share/doc/changelog-file-news-general/NEWS.Debian.gz:1] diff --git a/t/recipes/checks/debian/changelog/changelog-file-news-version/build-spec/debian/NEWS b/t/recipes/checks/debian/changelog/changelog-file-news-version/build-spec/debian/NEWS new file mode 100644 index 0000000..a4be560 --- /dev/null +++ b/t/recipes/checks/debian/changelog/changelog-file-news-version/build-spec/debian/NEWS @@ -0,0 +1,6 @@ +changelog-file-news-version (2.0) unstable; urgency=low + + This is some news entry about something. + + -- Russ Allbery Fri, 01 Jan 2010 22:09:12 -0800 + diff --git a/t/recipes/checks/debian/changelog/changelog-file-news-version/build-spec/fill-values b/t/recipes/checks/debian/changelog/changelog-file-news-version/build-spec/fill-values new file mode 100644 index 0000000..6b75823 --- /dev/null +++ b/t/recipes/checks/debian/changelog/changelog-file-news-version/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: upload-native +Testname: changelog-file-news-version +Description: Check mismatches of the NEWS.Debian version diff --git a/t/recipes/checks/debian/changelog/changelog-file-news-version/eval/desc b/t/recipes/checks/debian/changelog/changelog-file-news-version/eval/desc new file mode 100644 index 0000000..ddeddca --- /dev/null +++ b/t/recipes/checks/debian/changelog/changelog-file-news-version/eval/desc @@ -0,0 +1,2 @@ +Testname: changelog-file-news-version +Check: debian/changelog diff --git a/t/recipes/checks/debian/changelog/changelog-file-news-version/eval/hints b/t/recipes/checks/debian/changelog/changelog-file-news-version/eval/hints new file mode 100644 index 0000000..6f9c9f0 --- /dev/null +++ b/t/recipes/checks/debian/changelog/changelog-file-news-version/eval/hints @@ -0,0 +1 @@ +changelog-file-news-version (binary): debian-news-entry-has-unknown-version 2.0 [usr/share/doc/changelog-file-news-version/NEWS.Debian.gz:1] diff --git a/t/recipes/checks/debian/changelog/changelog-file-news-wrong-name/build-spec/debian/package-news b/t/recipes/checks/debian/changelog/changelog-file-news-wrong-name/build-spec/debian/package-news new file mode 100644 index 0000000..928a48c --- /dev/null +++ b/t/recipes/checks/debian/changelog/changelog-file-news-wrong-name/build-spec/debian/package-news @@ -0,0 +1,6 @@ +changelog-file-wrong-name (1.0) unstable; urgency=low + + Some interesting information. + + -- Niels Thykier Sun, 22 Jul 2012 20:30:00 +0000 + diff --git a/t/recipes/checks/debian/changelog/changelog-file-news-wrong-name/build-spec/debian/rules b/t/recipes/checks/debian/changelog/changelog-file-news-wrong-name/build-spec/debian/rules new file mode 100755 index 0000000..952d45a --- /dev/null +++ b/t/recipes/checks/debian/changelog/changelog-file-news-wrong-name/build-spec/debian/rules @@ -0,0 +1,11 @@ +#!/usr/bin/make -f + +PKG=$(shell dh_listpackages) +DOC=debian/$(PKG)/usr/share/doc/$(PKG) + +%: + dh $@ + +override_dh_installchangelogs: + dh_installchangelogs + gzip -n -9c < debian/package-news > $(DOC)/news.debian.gz diff --git a/t/recipes/checks/debian/changelog/changelog-file-news-wrong-name/build-spec/fill-values b/t/recipes/checks/debian/changelog/changelog-file-news-wrong-name/build-spec/fill-values new file mode 100644 index 0000000..0e4b849 --- /dev/null +++ b/t/recipes/checks/debian/changelog/changelog-file-news-wrong-name/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: upload-native +Testname: changelog-file-news-wrong-name +Description: Check for NEWS.Debian installed with wrong name diff --git a/t/recipes/checks/debian/changelog/changelog-file-news-wrong-name/eval/desc b/t/recipes/checks/debian/changelog/changelog-file-news-wrong-name/eval/desc new file mode 100644 index 0000000..86a8f41 --- /dev/null +++ b/t/recipes/checks/debian/changelog/changelog-file-news-wrong-name/eval/desc @@ -0,0 +1,2 @@ +Testname: changelog-file-news-wrong-name +Check: debian/changelog diff --git a/t/recipes/checks/debian/changelog/changelog-file-news-wrong-name/eval/hints b/t/recipes/checks/debian/changelog/changelog-file-news-wrong-name/eval/hints new file mode 100644 index 0000000..3636bbb --- /dev/null +++ b/t/recipes/checks/debian/changelog/changelog-file-news-wrong-name/eval/hints @@ -0,0 +1 @@ +changelog-file-news-wrong-name (binary): wrong-name-for-debian-news-file [usr/share/doc/changelog-file-news-wrong-name/news.debian.gz] diff --git a/t/recipes/checks/debian/changelog/changelog-file-no-dch-native/build-spec/debian/rules b/t/recipes/checks/debian/changelog/changelog-file-no-dch-native/build-spec/debian/rules new file mode 100755 index 0000000..f7139c2 --- /dev/null +++ b/t/recipes/checks/debian/changelog/changelog-file-no-dch-native/build-spec/debian/rules @@ -0,0 +1,8 @@ +#!/usr/bin/make -f + +%: + dh $@ + +override_dh_md5sums: + find debian/*/ -type f -a -iname 'changelog.*' -delete + dh_md5sums diff --git a/t/recipes/checks/debian/changelog/changelog-file-no-dch-native/build-spec/fill-values b/t/recipes/checks/debian/changelog/changelog-file-no-dch-native/build-spec/fill-values new file mode 100644 index 0000000..e3dddde --- /dev/null +++ b/t/recipes/checks/debian/changelog/changelog-file-no-dch-native/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: upload-native +Testname: changelog-file-no-dch-native +Description: Test if Debian changelog is missing in native pkg diff --git a/t/recipes/checks/debian/changelog/changelog-file-no-dch-native/eval/desc b/t/recipes/checks/debian/changelog/changelog-file-no-dch-native/eval/desc new file mode 100644 index 0000000..6dd8e86 --- /dev/null +++ b/t/recipes/checks/debian/changelog/changelog-file-no-dch-native/eval/desc @@ -0,0 +1,2 @@ +Testname: changelog-file-no-dch-native +Check: debian/changelog diff --git a/t/recipes/checks/debian/changelog/changelog-file-no-dch-native/eval/hints b/t/recipes/checks/debian/changelog/changelog-file-no-dch-native/eval/hints new file mode 100644 index 0000000..8172b29 --- /dev/null +++ b/t/recipes/checks/debian/changelog/changelog-file-no-dch-native/eval/hints @@ -0,0 +1 @@ +changelog-file-no-dch-native (binary): no-changelog usr/share/doc/changelog-file-no-dch-native/changelog.gz (native package) diff --git a/t/recipes/checks/debian/changelog/changelog-file-no-dch/build-spec/debian/rules b/t/recipes/checks/debian/changelog/changelog-file-no-dch/build-spec/debian/rules new file mode 100755 index 0000000..9307919 --- /dev/null +++ b/t/recipes/checks/debian/changelog/changelog-file-no-dch/build-spec/debian/rules @@ -0,0 +1,13 @@ +#!/usr/bin/make -f + +%: + dh $@ + +override_dh_installchangelogs: + # This is needed for Ubuntu, where debhelper does not install + # upstream changelogs by default + dh_installchangelogs ChangeLog + +override_dh_md5sums: + find debian/*/ -type f -a -iname 'changelog.debian*' -delete + dh_md5sums diff --git a/t/recipes/checks/debian/changelog/changelog-file-no-dch/build-spec/fill-values b/t/recipes/checks/debian/changelog/changelog-file-no-dch/build-spec/fill-values new file mode 100644 index 0000000..d5a6192 --- /dev/null +++ b/t/recipes/checks/debian/changelog/changelog-file-no-dch/build-spec/fill-values @@ -0,0 +1,3 @@ +Testname: changelog-file-no-dch +Skeleton: upload-non-native +Description: Test if Debian changelog is missing diff --git a/t/recipes/checks/debian/changelog/changelog-file-no-dch/build-spec/orig/ChangeLog b/t/recipes/checks/debian/changelog/changelog-file-no-dch/build-spec/orig/ChangeLog new file mode 100644 index 0000000..a935b07 --- /dev/null +++ b/t/recipes/checks/debian/changelog/changelog-file-no-dch/build-spec/orig/ChangeLog @@ -0,0 +1,5 @@ +2011-09-10 Niels Thykier + + * This is a non-Debian ChangeLog. Lintian should not be tricked + to believe this is a Debian changelog. + diff --git a/t/recipes/checks/debian/changelog/changelog-file-no-dch/eval/desc b/t/recipes/checks/debian/changelog/changelog-file-no-dch/eval/desc new file mode 100644 index 0000000..ff7ebdf --- /dev/null +++ b/t/recipes/checks/debian/changelog/changelog-file-no-dch/eval/desc @@ -0,0 +1,3 @@ +Testname: changelog-file-no-dch +Test-Against: syntax-error-in-debian-changelog +Check: debian/changelog diff --git a/t/recipes/checks/debian/changelog/changelog-file-no-dch/eval/hints b/t/recipes/checks/debian/changelog/changelog-file-no-dch/eval/hints new file mode 100644 index 0000000..e09922f --- /dev/null +++ b/t/recipes/checks/debian/changelog/changelog-file-no-dch/eval/hints @@ -0,0 +1,2 @@ +changelog-file-no-dch (binary): syntax-error-in-debian-changelog "not a Debian changelog" [usr/share/doc/changelog-file-no-dch/changelog.gz:1] +changelog-file-no-dch (binary): debian-changelog-file-missing-or-wrong-name diff --git a/t/recipes/checks/debian/changelog/changelog-file-reuses-existing-version/build-spec/debian/changelog.in b/t/recipes/checks/debian/changelog/changelog-file-reuses-existing-version/build-spec/debian/changelog.in new file mode 100644 index 0000000..7242f97 --- /dev/null +++ b/t/recipes/checks/debian/changelog/changelog-file-reuses-existing-version/build-spec/debian/changelog.in @@ -0,0 +1,45 @@ +[% $source %] (3:[% $version %]) unstable; urgency=low + + * Third use of [% $version %]. + * This changelog entry bumps the epoch and references the word in the + changelog. + + -- [% $author %] [% $date %] + +[% $source %] (3:0) unstable; urgency=low + + * Bumping epoch to inject a changelog entry to ensure we check later entries. + + -- [% $author %] Fri, 06 Feb 2010 22:22:37 -0800 + +other ([% $version %]) unstable; urgency=low + + * This has the same version but different source and is thus a + false-positive. + + -- [% $author %] Fri, 06 Feb 2009 22:22:37 -0800 + +[% $source %] (2:[% $version %]) unstable; urgency=low + + * Second use of version [% $version %]. True positive. + + -- [% $author %] Fri, 06 Feb 2008 22:22:37 -0800 + +[% $source %] (2:0) unstable; urgency=low + + * Bumping epoch to inject a changelog entry to ensure we check later entries. + + -- [% $author %] Fri, 06 Feb 2007 22:22:37 -0800 + +[% $source %] (1:[% $version %]) unstable; urgency=low + + * Initial use of version [% $version %]. This is a false positive as we should + * stop after 2:[% $version %]. + + -- [% $author %] Fri, 06 Feb 2006 22:22:37 -0800 + +[% $source %] (1:0) unstable; urgency=low + + * Add epoch. + + -- [% $author %] Fri, 06 Feb 2005 22:22:37 -0800 diff --git a/t/recipes/checks/debian/changelog/changelog-file-reuses-existing-version/build-spec/fill-values b/t/recipes/checks/debian/changelog/changelog-file-reuses-existing-version/build-spec/fill-values new file mode 100644 index 0000000..5705b4d --- /dev/null +++ b/t/recipes/checks/debian/changelog/changelog-file-reuses-existing-version/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: upload-native +Testname: changelog-file-reuses-existing-version +Description: Check changelog for re-used version numbers diff --git a/t/recipes/checks/debian/changelog/changelog-file-reuses-existing-version/eval/desc b/t/recipes/checks/debian/changelog/changelog-file-reuses-existing-version/eval/desc new file mode 100644 index 0000000..a253dba --- /dev/null +++ b/t/recipes/checks/debian/changelog/changelog-file-reuses-existing-version/eval/desc @@ -0,0 +1,2 @@ +Testname: changelog-file-reuses-existing-version +Check: debian/changelog diff --git a/t/recipes/checks/debian/changelog/changelog-file-reuses-existing-version/eval/hints b/t/recipes/checks/debian/changelog/changelog-file-reuses-existing-version/eval/hints new file mode 100644 index 0000000..5016c57 --- /dev/null +++ b/t/recipes/checks/debian/changelog/changelog-file-reuses-existing-version/eval/hints @@ -0,0 +1 @@ +changelog-file-reuses-existing-version (source): latest-debian-changelog-entry-reuses-existing-version 3:1.0 ~ 2:1.0 (last used: Fri, 06 Feb 2008 22:22:37 -0800) [debian/changelog:1] diff --git a/t/recipes/checks/debian/changelog/changelog-file-stable/build-spec/debian/changelog.in b/t/recipes/checks/debian/changelog/changelog-file-stable/build-spec/debian/changelog.in new file mode 100644 index 0000000..83189f2 --- /dev/null +++ b/t/recipes/checks/debian/changelog/changelog-file-stable/build-spec/debian/changelog.in @@ -0,0 +1,6 @@ +[% $source %] ([% $version %]) stable-proposed-updates; urgency=low + + * Lintian Test Suite. + * Test: [% $testname %] + + -- [% $author %] [% $date %] diff --git a/t/recipes/checks/debian/changelog/changelog-file-stable/build-spec/fill-values b/t/recipes/checks/debian/changelog/changelog-file-stable/build-spec/fill-values new file mode 100644 index 0000000..e460a9c --- /dev/null +++ b/t/recipes/checks/debian/changelog/changelog-file-stable/build-spec/fill-values @@ -0,0 +1,4 @@ +Testname: changelog-file-stable +Skeleton: upload-non-native +Version: 1.0-1etch1 +Description: Test a stable-proposed-updates package diff --git a/t/recipes/checks/debian/changelog/changelog-file-stable/eval/desc b/t/recipes/checks/debian/changelog/changelog-file-stable/eval/desc new file mode 100644 index 0000000..529ce5a --- /dev/null +++ b/t/recipes/checks/debian/changelog/changelog-file-stable/eval/desc @@ -0,0 +1,5 @@ +Testname: changelog-file-stable +Test-Against: + malformed-debian-changelog-version + version-refers-to-distribution +Check: debian/changelog diff --git a/t/recipes/checks/debian/changelog/changelog-file-stable/eval/hints b/t/recipes/checks/debian/changelog/changelog-file-stable/eval/hints new file mode 100644 index 0000000..e69de29 diff --git a/t/recipes/checks/debian/changelog/changelog-file-strange-date/build-spec/debian/changelog.in b/t/recipes/checks/debian/changelog/changelog-file-strange-date/build-spec/debian/changelog.in new file mode 100644 index 0000000..b527316 --- /dev/null +++ b/t/recipes/checks/debian/changelog/changelog-file-strange-date/build-spec/debian/changelog.in @@ -0,0 +1,12 @@ +[% $source %] ([% $version %]) unstable; urgency=low + + * Lintian Test Suite. + * Test: [% $testname %] + + -- [% $author %] [% $date %] + +[% $source %] (1.0) unstable; urgency=low + + * The date will fail with some dpkg version see #794674 + + -- [% $author %] The, 15 Apr 2004 23:33:51 +0200 diff --git a/t/recipes/checks/debian/changelog/changelog-file-strange-date/build-spec/fill-values b/t/recipes/checks/debian/changelog/changelog-file-strange-date/build-spec/fill-values new file mode 100644 index 0000000..dcc2e78 --- /dev/null +++ b/t/recipes/checks/debian/changelog/changelog-file-strange-date/build-spec/fill-values @@ -0,0 +1,5 @@ +Skeleton: upload-native +Testname: changelog-file-strange-date +Version: 2.0 +Description: Test some strange date in changelog +Extra-Build-Depends: dpkg (<< 1.18.2) diff --git a/t/recipes/checks/debian/changelog/changelog-file-strange-date/eval/desc b/t/recipes/checks/debian/changelog/changelog-file-strange-date/eval/desc new file mode 100644 index 0000000..c866224 --- /dev/null +++ b/t/recipes/checks/debian/changelog/changelog-file-strange-date/eval/desc @@ -0,0 +1,3 @@ +Testname: changelog-file-strange-date +See-Also: Debian Bug#794674 +Check: debian/changelog diff --git a/t/recipes/checks/debian/changelog/changelog-file-strange-date/eval/hints b/t/recipes/checks/debian/changelog/changelog-file-strange-date/eval/hints new file mode 100644 index 0000000..d8424c8 --- /dev/null +++ b/t/recipes/checks/debian/changelog/changelog-file-strange-date/eval/hints @@ -0,0 +1 @@ +changelog-file-strange-date (binary): syntax-error-in-debian-changelog line 12 "couldn't parse date The, 15 Apr 2004 23:33:51 +0200" diff --git a/t/recipes/checks/debian/changelog/changelog-file-symlink/build-spec/debian/rules b/t/recipes/checks/debian/changelog/changelog-file-symlink/build-spec/debian/rules new file mode 100755 index 0000000..fa478f6 --- /dev/null +++ b/t/recipes/checks/debian/changelog/changelog-file-symlink/build-spec/debian/rules @@ -0,0 +1,12 @@ +#!/usr/bin/make -f + +%: + dh $@ + + +override_dh_md5sums: + DIR=$$(find debian/*/ -type f -a -name 'changelog.gz' \ + -exec dirname {} \; ) ; \ + rm -f $$DIR/changelog.gz ; \ + ln -s ../lintian/changelog.gz $$DIR/changelog.gz + dh_md5sums diff --git a/t/recipes/checks/debian/changelog/changelog-file-symlink/build-spec/fill-values b/t/recipes/checks/debian/changelog/changelog-file-symlink/build-spec/fill-values new file mode 100644 index 0000000..3d57c66 --- /dev/null +++ b/t/recipes/checks/debian/changelog/changelog-file-symlink/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: upload-native +Testname: changelog-file-symlink +Description: Test if Debian changelog is a symlink diff --git a/t/recipes/checks/debian/changelog/changelog-file-symlink/eval/desc b/t/recipes/checks/debian/changelog/changelog-file-symlink/eval/desc new file mode 100644 index 0000000..7278012 --- /dev/null +++ b/t/recipes/checks/debian/changelog/changelog-file-symlink/eval/desc @@ -0,0 +1,2 @@ +Testname: changelog-file-symlink +Check: debian/changelog diff --git a/t/recipes/checks/debian/changelog/changelog-file-symlink/eval/hints b/t/recipes/checks/debian/changelog/changelog-file-symlink/eval/hints new file mode 100644 index 0000000..90d61c4 --- /dev/null +++ b/t/recipes/checks/debian/changelog/changelog-file-symlink/eval/hints @@ -0,0 +1 @@ +changelog-file-symlink (binary): debian-changelog-file-is-a-symlink [usr/share/doc/changelog-file-symlink/changelog.gz] diff --git a/t/recipes/checks/debian/changelog/changelog-file-syntax/build-spec/doc/changelog.in b/t/recipes/checks/debian/changelog/changelog-file-syntax/build-spec/doc/changelog.in new file mode 100644 index 0000000..643d367 --- /dev/null +++ b/t/recipes/checks/debian/changelog/changelog-file-syntax/build-spec/doc/changelog.in @@ -0,0 +1,22 @@ +[% $source %] ([% $version %]) [% $distribution %]; urgency=low + + * Lintian Test Suite. + * Test: [% $testname %] + + -- [% $author %] [% $date %] + +[% $source %] ([% $prev-version %]) unstable; urgency=low + + * Lintian Test Suite. + * Test: [% $testname %] + + -- [% $author %] Sat, 09 Apr 2016 10:56:49 +0000 + +[% $source %] () unstable; urgency=low + + * Lintian Test Suite. + * Test: [% $testname %] + + * Suppress "should close ITP bug" messages. (Closes: #123456) + + -- [% $author %] Sat, 02 Apr 2016 10:56:49 +0000 diff --git a/t/recipes/checks/debian/changelog/changelog-file-syntax/build-spec/fill-values b/t/recipes/checks/debian/changelog/changelog-file-syntax/build-spec/fill-values new file mode 100644 index 0000000..4f393a2 --- /dev/null +++ b/t/recipes/checks/debian/changelog/changelog-file-syntax/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: deb +Testname: changelog-file-syntax +Description: Test for syntax errors in changelogs diff --git a/t/recipes/checks/debian/changelog/changelog-file-syntax/eval/desc b/t/recipes/checks/debian/changelog/changelog-file-syntax/eval/desc new file mode 100644 index 0000000..0e3a67e --- /dev/null +++ b/t/recipes/checks/debian/changelog/changelog-file-syntax/eval/desc @@ -0,0 +1,2 @@ +Testname: changelog-file-syntax +Check: debian/changelog diff --git a/t/recipes/checks/debian/changelog/changelog-file-syntax/eval/hints b/t/recipes/checks/debian/changelog/changelog-file-syntax/eval/hints new file mode 100644 index 0000000..16a73ee --- /dev/null +++ b/t/recipes/checks/debian/changelog/changelog-file-syntax/eval/hints @@ -0,0 +1,2 @@ +changelog-file-syntax (binary): syntax-error-in-debian-changelog "found change data where expected next heading or eof" [usr/share/doc/changelog-file-syntax/changelog.gz:17] +changelog-file-syntax (binary): syntax-error-in-debian-changelog "badly formatted heading line" [usr/share/doc/changelog-file-syntax/changelog.gz:15] diff --git a/t/recipes/checks/debian/changelog/changelog-file-unreleased-signed-changes/build-spec/fill-values b/t/recipes/checks/debian/changelog/changelog-file-unreleased-signed-changes/build-spec/fill-values new file mode 100644 index 0000000..78b1b3f --- /dev/null +++ b/t/recipes/checks/debian/changelog/changelog-file-unreleased-signed-changes/build-spec/fill-values @@ -0,0 +1,4 @@ +Skeleton: upload-native +Testname: changelog-file-unreleased-signed-changes +Distribution: UNRELEASED +Description: Warn about UNRELEASED distribution in changelog if changes is signed diff --git a/t/recipes/checks/debian/changelog/changelog-file-unreleased-signed-changes/build-spec/post-build.in b/t/recipes/checks/debian/changelog/changelog-file-unreleased-signed-changes/build-spec/post-build.in new file mode 100755 index 0000000..95e78e4 --- /dev/null +++ b/t/recipes/checks/debian/changelog/changelog-file-unreleased-signed-changes/build-spec/post-build.in @@ -0,0 +1,24 @@ +#!/bin/sh + +set -e + +# create a temporary directory +TEMPDIR=`mktemp -d` + +# import public key +gpg --homedir "$TEMPDIR" --import "[% $source_path %]/public.key" + +# import private key +gpg --homedir "$TEMPDIR" --allow-secret-key-import --import "[% $source_path %]/private.key" + +# sign changes file +gpg --homedir "$TEMPDIR" --clearsign "[% $build_product %]" + +# save unsigned changes file elsewhere +mv "[% $build_product %]" "[% $build_product %].unsigned" + +# move signed changes file to expected location +mv "[% $build_product %].asc" "[% $build_product %]" + +# remove the temporary directory +rm -rf "$TEMPDIR" diff --git a/t/recipes/checks/debian/changelog/changelog-file-unreleased-signed-changes/build-spec/private.key b/t/recipes/checks/debian/changelog/changelog-file-unreleased-signed-changes/build-spec/private.key new file mode 100644 index 0000000..dc65e47 --- /dev/null +++ b/t/recipes/checks/debian/changelog/changelog-file-unreleased-signed-changes/build-spec/private.key @@ -0,0 +1,81 @@ +-----BEGIN PGP PRIVATE KEY BLOCK----- + +lQVYBF1S0+wBDACpWPf3IGIsQ1LAGGYsGZP3jj52oB2SBXde/Uk45bo8il2snTse +VUUZcxgHUW+/NZescGYyGIUnfAiWPn+kzObMddg5GXWHG2grt1F2LHdIMdLaHBQi +zIu74JZJ7khnd0OhGdsZVtPQ+ilkh0T/IdcigEcZPG1+0anMsgv+6xZl9+oK6ZBn +4VZE6DC7+0F5fFtx8osSQrjuorYZ9dHrsfeyAHZxTVOV7ge8RBp3sMKz9mBlNUfw +ZcyKk8+7M4KMcL7GfZAK8OmfF6cFdRdk3fuEP/6q8UHWNVBAvv4JAr6KG3ZnpJZX +9jvqOjYkyMpCtNSS3Dkiv8dcOpm+pvR2HsqyyLt4cnozb3Rdz4nLTI2A2wgnHFs2 +rm20Ww4gGblbsh4Ps5Kt8exN1T9cKh/B7TntT2SJKkGp1occAtAAIamv9fSuO81q +ywuW2x0swNeK+JJADIq0iZh9vvXsnupk60j5m/J9R1emjWWlImAmJ6c8KJkO/iab +MLZC2Suu7L/rWgUAEQEAAQAL/iC8Qn6iY2fUAcCBVurKbPhrJjbvH5g090zE4G0f +tz7xrkbqQ93KtOdFAM2VV+kZ1n5uYcroQ4EM8Gn+ndUBCNJYK1pqSfY6fYoJzzTt +RoeNngksaVYKvS4trU+QQK3Dd67CHUDKMHrSiMLWhSdeZsRUEKpXrIDZzZ10g24d +CoDeif7fBFuYSwFZ8uW7nX365IBj1q9Kd44lpNbi1lfd2Jgvj7W6MWCnmRYzAfzG +DfUUuLCHuqbFPuNAzGSPAfrc5itbAyOP2fXdTC+WPbdqFPAU7tjtCl/1FfpzwZsE ++mWG3G+Zspkh7Oz58faOc3Tr86GK/dRNRh36eGJOeUfydQnOLvorPO3S0AC0nHCF +q+NXyf6xOKOKiNe7Acc6ezGOyn2DgTBXhZDE79r4rOvDDNKyW+J8vM3JpGv4a4jy +byc3aMd7AU1ai6vfWtbSyB6FtVQ8uPbUBXk3Eo6fvZ8ge7HfIaCAcxCchSCJJevL +pMYrVOez12uatz/3fTOq4CS7RwYAy7c614xUNTlDzX95UnGelaT4cquGp8hlk9vQ +pM01QtaAGJPk+JNg+0J9e4qWoSEN+4+2ncfgY3Wahjn+jfkk9cAROmxQMt2JvXvI +hpcrcvIuMJSAlyp4+HNd4JUzgFP5LCkxs79QbDNVkCZjGDC3zv9UVdVv82IgFCfe +UwgKhNZZlsQsQatdXs/YiK682JpYnbQLmg5/E5g1rTybbgsiYaYZ3E6Tv4d+FEXN +PvsVbAxZIk3IeFhGUs2EVX8DJrjzBgDUz6N2moRsuQ2SLYFsr0NlfU95qAZk4r+f +TZwNhE6ixjiHqfvUuJrgmkhY46GFzcKpJlmxsiCElYrMf+xzhjCE15XLkFoN/jkA +R9mI97IyiEMqBn+aTvlYmQpRmSV0rEvIRT6Y4jwsG4e7NhtJUP30qUSh2rV42lh4 +BU8mLK+Da1gQtlP4b8XadksdJGIasXvDv3Cna0fd/ZKN4nCc2T5Mz9DGhBM55Il3 +0Z9IBIlzZU8MnKmu7pFJYOVkw3jRXycF/R+TU2BintbbqFszVYw0TMr5+UupyhXh +2JMBHEjhGrZ40YZpDpUA+9KrfJ6RUfCw0pg4XmA7OI0cpisRuZb1cXWZpdEchdYQ +N3u/ofUHwCbd6pv86Udmf3Lteeu1zVFBHACnIdsMEVUvMlaO8j5t3nTLYXudaeLe +WZciXu/3pIU46oWKEbm+XzSl9SiyRRtc4VuB+mMNC5XkkqmaYioVtJ/rv1D6Pq8z +dvEO35poUStLLdphX/2Wq7i7C0FuKGkYyvEdtCJEdW1teSBrZXkgdG8gc2lnbiB0 +ZXN0IHN1aXRlIGZpbGVziQHOBBMBCgA4FiEE7gdcRYTGSROvlMCvozS9hpbIwjwF +Al1S0+wCGwMFCwkIBwMFFQoJCAsFFgMCAQACHgECF4AACgkQozS9hpbIwjzxBwv/ +eQXVIgFfCXXxtKuVuae7dLQhu8CBHJZ5PvXLeCjRj8LcERuiEwJz7JRrSP4i7PLn +zA+vv8WSbYUaJ2Lwg/Gj366U7tlrGVRZUEmHzYj9Bc+qxd3Lf/lZmVP3LavgL89w +OMzObJZOKNbUs9bAmLEf7lJnObMEpSAiPji7vPHc+wvM5TegtwjjQNLu7o3rGuut +ARtAA3BxPTBhjKt0Jb30/TrsNE9ecMoC4xcIyy0HY1FPWwwOHFbvJxevyKv84Nng +RyHErB+8RGqUObhtxNrUkJ7xt+jQvAy2xX8bt2w6nOzG4cST2flEcH+Vbqy1bPD0 +b7hTZFL+dDRq43QzGqgqyNDWmvwM5tFBxbWc4cJKbzynhVDPPC6IqFXPml6EF0PA +y+o3zMMdacYODBezWix33JBH9vDH/9dSG4JE1ORLGZpVpKqOQ0YxFPoLrOpYXUxE +2jSDySTrvsCOOpUYl4D7zgVrP9/EkJ2AK5wlVtpv8D5rHrP6/RK2TlfXJt8S6ilt +nQVYBF1S0+wBDAC25JP4vcHnGINaqyw5sdOAr6+0uCNgqIqdmPgG9ZO0nNJVfZOX +s6Wp1TYgQr1qmWE5wsVt9HoClQGlP+6TdYv7cnylksI5rrxwi1eWr2JPYS7dP0HK +nVVXtuqMdak6eNUFHRfjdc896qL5uuHu3VHEpc/3wfqUms6uhsP60xS3AiuwYd6/ +K/nqtA4sz5dh7gLpxT2EpurGohg+q/cf5YegKzjB2J2JYtFKcyHFhX2QiNIrQpVT +LKQDSDkNykr/wqMpCxJ3cskxKkY7zyColfRa9Vdp4/JNpNkL1IrX2ph+tlQisdJ+ +gcDSvuYz60COJuyFikNVz5+84mfpMCVqYVOt9MGLGSbcQA8IgPOMU4Nv9E63ob/l +pLEZQMFwqrmo1zfdhj/LW/p7uNEJ7V2Z08FnBqn72g4RmYE+QQohLfqAOecwrcyi +TcvEeJGDRwX+kZVyTQcrWhm8rchFxJluat7lYsOWFvgS1j8wvRC8QDWQEaODWNUF +iPVP/bybAeHjXl0AEQEAAQAL/iutqEch7mKGAKzRL3Ux6lyT2KcUyOInLj+YDjf/ +Q0DBqRvgqzRyI3DNailHNxxzt/wG74akedUPB/8SpyQRURaCj5EtXPRQrlFEfe0P +Qq/Jels9ZbWBYKXbmeVknj9IJzua6J8afh1/4V85ygZ1VbdckC/P5EvEMvMMXVaU +PaC9RHjRztQiKQPr72y1QSaSpKB2ygvZnz1D7f1drV2xP/Q5DkuBM5JhhrE8kMau +7D9t5Z+OPcJI6XydLX8FHmc5cL2ZVrGgFBor6Bs4JvCKtXTkPKMTPFDg+cfNPsoi +Q0kunBwGCLOxFRtvCYxuVdOKRD/usnRk7+AlRui5criGTbJSYl67BkpZay28Dqk0 +vakZhXEPv2xrr/GG3ViJXb/DWb72UC9/ii5gOPivLJnC9Fia2g1q1mj6nTlW+ao/ +9qfRWYsqX8lAjL8INjmqOzGN1Uxo0z0kriRKjmFvswZbMYHTk1Ifo4Q80dRUiE+e +Ed7snM+Mg4Klar30jm07KF0hIQYA1P08CsWF+3lNHa4tF+rXoBhMa092QLQ1ClCC +2yqu8t1/pFeCjoJ+81THYBc4oK0XYiLenUYTEEsKCtA/FQoBPjYUY9Ghi5JdSEHi +yPSA1G7i5Lk2Cewzrjikoqq/eiVguiy8ZLxQOM+89vruBQyk8jP2hCaEspcfi5bS +FHlZzK6WZ/ytF+VzTFXZLBddq+GHzYh5wttspro0W5WLIuGLjBi8+zHl74hWDdi/ +9elSmW2+BuTx0bZb6J6YaC7L7EdNBgDb03lChbOB+gxgCDOpgMH5wAbHEacS5aeh +6bmJRsq7Y174voxDjGP92eY+VXyO2GIkcYDihHVTA4NsL4sZPVg7lVliCnyuXR1h +fZ0QF36fjuYidkxnshribWaW4k9+mgBAqtN1rQqkWr2VaQv7E70Mn0yGamLUoowH +Vog1PhIo/YA5m9HpamX4VBhtbFdvxuGAlfFahyTc9HEd8R+djSOKA1suFeAp0zJe +dq91bUt645eP8ayipUtSM6br1kYSi1EF+QE1lHQZ/7kyWJGRAdIb4hwTM+UWJ+3Y +dxuhyyHeoli7j/Z2313+/LxG5QGHVg6Fyc2wk3kQeQO26LTUUMSngLdHvCgzWYds +ohPXyE3TJPL5LT0QOqdZyojk7JHYNZB97uUbZQEMRRWZVlec4pyjhKOyAbcQtkjx +H5ZIhGbwzRdX6eSc2S6dX0D46nij1CLbdasfZVKCt0QtOCmcCp4wzOid0v/R1uxH +fPdA9V4NSdEjIjPtLVXfips9Yxv2ttYpltpoiQG2BBgBCgAgFiEE7gdcRYTGSROv +lMCvozS9hpbIwjwFAl1S0+wCGwwACgkQozS9hpbIwjwKxwv9EQ1CO3xsQP+NKI4i +yEAMCp0zr+3AByiqZONLH7Ggh5ZqlJnwZQaYSFRjvDQQxlegN7MAx14hm1IIzgSO +bk9e3oCc+yktwLD+I+VOOjSjPFJH5LPPyI0p4oFn4q59dgvMXfsAz0F+GgqVy04t +XrDrjRSs6b4erbYFuveJPY+JbZLPG068P3L5sFMHCiY623OzaJXSKuGYHlaOvEBO +97G0NfW7lP8/hWM0tAvgwgISxk6jojA0B3eJTKYwT2hLwmT8bblCmBAyNKyoz+TX +uAcQYXuVY1hScFzpra4BgJ2o0xCjHg+RkAtc6a1B2zmhrXiE1OMbzKnYUsnMUM0K +Mgin9Jk6akhCeheEfMoi0OUZNa3BC/D7puDQjupQ+M2xXSb4JGmOJDSumUcg6GnQ +26JFqamo1H0rXMgFeUd1e9wKsd5FKrt4dZXLGYS5r0hnlgSTJZPmA5y7p89ZKxwC +J/BnNG5qryGpb0uglf9styQZnIPzZXziiU5W/GOtxONWwXs7 +=mtBa +-----END PGP PRIVATE KEY BLOCK----- diff --git a/t/recipes/checks/debian/changelog/changelog-file-unreleased-signed-changes/build-spec/public.key b/t/recipes/checks/debian/changelog/changelog-file-unreleased-signed-changes/build-spec/public.key new file mode 100644 index 0000000..b201834 --- /dev/null +++ b/t/recipes/checks/debian/changelog/changelog-file-unreleased-signed-changes/build-spec/public.key @@ -0,0 +1,41 @@ +-----BEGIN PGP PUBLIC KEY BLOCK----- + +mQGNBF1S0+wBDACpWPf3IGIsQ1LAGGYsGZP3jj52oB2SBXde/Uk45bo8il2snTse +VUUZcxgHUW+/NZescGYyGIUnfAiWPn+kzObMddg5GXWHG2grt1F2LHdIMdLaHBQi +zIu74JZJ7khnd0OhGdsZVtPQ+ilkh0T/IdcigEcZPG1+0anMsgv+6xZl9+oK6ZBn +4VZE6DC7+0F5fFtx8osSQrjuorYZ9dHrsfeyAHZxTVOV7ge8RBp3sMKz9mBlNUfw +ZcyKk8+7M4KMcL7GfZAK8OmfF6cFdRdk3fuEP/6q8UHWNVBAvv4JAr6KG3ZnpJZX +9jvqOjYkyMpCtNSS3Dkiv8dcOpm+pvR2HsqyyLt4cnozb3Rdz4nLTI2A2wgnHFs2 +rm20Ww4gGblbsh4Ps5Kt8exN1T9cKh/B7TntT2SJKkGp1occAtAAIamv9fSuO81q +ywuW2x0swNeK+JJADIq0iZh9vvXsnupk60j5m/J9R1emjWWlImAmJ6c8KJkO/iab +MLZC2Suu7L/rWgUAEQEAAbQiRHVtbXkga2V5IHRvIHNpZ24gdGVzdCBzdWl0ZSBm +aWxlc4kBzgQTAQoAOBYhBO4HXEWExkkTr5TAr6M0vYaWyMI8BQJdUtPsAhsDBQsJ +CAcDBRUKCQgLBRYDAgEAAh4BAheAAAoJEKM0vYaWyMI88QcL/3kF1SIBXwl18bSr +lbmnu3S0IbvAgRyWeT71y3go0Y/C3BEbohMCc+yUa0j+Iuzy58wPr7/Fkm2FGidi +8IPxo9+ulO7ZaxlUWVBJh82I/QXPqsXdy3/5WZlT9y2r4C/PcDjMzmyWTijW1LPW +wJixH+5SZzmzBKUgIj44u7zx3PsLzOU3oLcI40DS7u6N6xrrrQEbQANwcT0wYYyr +dCW99P067DRPXnDKAuMXCMstB2NRT1sMDhxW7ycXr8ir/ODZ4EchxKwfvERqlDm4 +bcTa1JCe8bfo0LwMtsV/G7dsOpzsxuHEk9n5RHB/lW6stWzw9G+4U2RS/nQ0auN0 +MxqoKsjQ1pr8DObRQcW1nOHCSm88p4VQzzwuiKhVz5pehBdDwMvqN8zDHWnGDgwX +s1osd9yQR/bwx//XUhuCRNTkSxmaVaSqjkNGMRT6C6zqWF1MRNo0g8kk677AjjqV +GJeA+84Faz/fxJCdgCucJVbab/A+ax6z+v0Stk5X1ybfEuopbbkBjQRdUtPsAQwA +tuST+L3B5xiDWqssObHTgK+vtLgjYKiKnZj4BvWTtJzSVX2Tl7OlqdU2IEK9aplh +OcLFbfR6ApUBpT/uk3WL+3J8pZLCOa68cItXlq9iT2Eu3T9Byp1VV7bqjHWpOnjV +BR0X43XPPeqi+brh7t1RxKXP98H6lJrOrobD+tMUtwIrsGHevyv56rQOLM+XYe4C +6cU9hKbqxqIYPqv3H+WHoCs4wdidiWLRSnMhxYV9kIjSK0KVUyykA0g5DcpK/8Kj +KQsSd3LJMSpGO88gqJX0WvVXaePyTaTZC9SK19qYfrZUIrHSfoHA0r7mM+tAjibs +hYpDVc+fvOJn6TAlamFTrfTBixkm3EAPCIDzjFODb/ROt6G/5aSxGUDBcKq5qNc3 +3YY/y1v6e7jRCe1dmdPBZwap+9oOEZmBPkEKIS36gDnnMK3Mok3LxHiRg0cF/pGV +ck0HK1oZvK3IRcSZbmre5WLDlhb4EtY/ML0QvEA1kBGjg1jVBYj1T/28mwHh415d +ABEBAAGJAbYEGAEKACAWIQTuB1xFhMZJE6+UwK+jNL2GlsjCPAUCXVLT7AIbDAAK +CRCjNL2GlsjCPArHC/0RDUI7fGxA/40ojiLIQAwKnTOv7cAHKKpk40sfsaCHlmqU +mfBlBphIVGO8NBDGV6A3swDHXiGbUgjOBI5uT17egJz7KS3AsP4j5U46NKM8Ukfk +s8/IjSnigWfirn12C8xd+wDPQX4aCpXLTi1esOuNFKzpvh6ttgW694k9j4ltks8b +Trw/cvmwUwcKJjrbc7NoldIq4ZgeVo68QE73sbQ19buU/z+FYzS0C+DCAhLGTqOi +MDQHd4lMpjBPaEvCZPxtuUKYEDI0rKjP5Ne4BxBhe5VjWFJwXOmtrgGAnajTEKMe +D5GQC1zprUHbOaGteITU4xvMqdhSycxQzQoyCKf0mTpqSEJ6F4R8yiLQ5Rk1rcEL +8Pum4NCO6lD4zbFdJvgkaY4kNK6ZRyDoadDbokWpqajUfStcyAV5R3V73Aqx3kUq +u3h1lcsZhLmvSGeWBJMlk+YDnLunz1krHAIn8Gc0bmqvIalvS6CV/2y3JBmcg/Nl +fOKJTlb8Y63E41bBezs= +=iNsY +-----END PGP PUBLIC KEY BLOCK----- diff --git a/t/recipes/checks/debian/changelog/changelog-file-unreleased-signed-changes/eval/desc b/t/recipes/checks/debian/changelog/changelog-file-unreleased-signed-changes/eval/desc new file mode 100644 index 0000000..00bd85b --- /dev/null +++ b/t/recipes/checks/debian/changelog/changelog-file-unreleased-signed-changes/eval/desc @@ -0,0 +1,3 @@ +Testname: changelog-file-unreleased-signed-changes +See-Also: #873520 +Check: debian/changelog diff --git a/t/recipes/checks/debian/changelog/changelog-file-unreleased-signed-changes/eval/hints b/t/recipes/checks/debian/changelog/changelog-file-unreleased-signed-changes/eval/hints new file mode 100644 index 0000000..a4d8b63 --- /dev/null +++ b/t/recipes/checks/debian/changelog/changelog-file-unreleased-signed-changes/eval/hints @@ -0,0 +1 @@ +changelog-file-unreleased-signed-changes (source): unreleased-changelog-distribution [debian/changelog:1] diff --git a/t/recipes/checks/debian/changelog/changelog-file-unreleased/build-spec/debian/changelog.in b/t/recipes/checks/debian/changelog/changelog-file-unreleased/build-spec/debian/changelog.in new file mode 100644 index 0000000..adaaa2d --- /dev/null +++ b/t/recipes/checks/debian/changelog/changelog-file-unreleased/build-spec/debian/changelog.in @@ -0,0 +1,13 @@ +[% $source %] ([% $version %]) [% $distribution %]; urgency=low + + * Lintian Test Suite. + * Test: [% $testname %] + + -- [% $author %] [% $date %] + +[% $source %] (1.0) unstable; urgency=low + + * An older changelog entry to test suppression of errors about the + changelog entry having the same date as the previous one. + + -- [% $author %] [% $date %] diff --git a/t/recipes/checks/debian/changelog/changelog-file-unreleased/build-spec/fill-values b/t/recipes/checks/debian/changelog/changelog-file-unreleased/build-spec/fill-values new file mode 100644 index 0000000..25da1fa --- /dev/null +++ b/t/recipes/checks/debian/changelog/changelog-file-unreleased/build-spec/fill-values @@ -0,0 +1,5 @@ +Skeleton: upload-native +Testname: changelog-file-unreleased +Version: 2.0 +Distribution: UNRELEASED +Description: Suppress new date warnings for UNRELEASED diff --git a/t/recipes/checks/debian/changelog/changelog-file-unreleased/eval/desc b/t/recipes/checks/debian/changelog/changelog-file-unreleased/eval/desc new file mode 100644 index 0000000..46a21c6 --- /dev/null +++ b/t/recipes/checks/debian/changelog/changelog-file-unreleased/eval/desc @@ -0,0 +1,6 @@ +Testname: changelog-file-unreleased +Test-Against: + latest-debian-changelog-entry-without-new-date + unreleased-changelog-distribution +See-Also: Debian Bug#560149 +Check: debian/changelog diff --git a/t/recipes/checks/debian/changelog/changelog-file-unreleased/eval/hints b/t/recipes/checks/debian/changelog/changelog-file-unreleased/eval/hints new file mode 100644 index 0000000..e69de29 diff --git a/t/recipes/checks/debian/changelog/changelog-file-upstream-html-only/build-spec/debian/rules b/t/recipes/checks/debian/changelog/changelog-file-upstream-html-only/build-spec/debian/rules new file mode 100644 index 0000000..12f2c85 --- /dev/null +++ b/t/recipes/checks/debian/changelog/changelog-file-upstream-html-only/build-spec/debian/rules @@ -0,0 +1,11 @@ +#!/usr/bin/make -f + +PKG:=$(shell dh_listpackages) +DOC:=debian/$(PKG)/usr/share/doc/$(PKG) + +%: + dh $@ + +override_dh_installchangelogs: + dh_installchangelogs + cp some-changelog.html $(DOC)/changelog.html diff --git a/t/recipes/checks/debian/changelog/changelog-file-upstream-html-only/build-spec/fill-values b/t/recipes/checks/debian/changelog/changelog-file-upstream-html-only/build-spec/fill-values new file mode 100644 index 0000000..684e84e --- /dev/null +++ b/t/recipes/checks/debian/changelog/changelog-file-upstream-html-only/build-spec/fill-values @@ -0,0 +1,3 @@ +Testname: changelog-file-upstream-html-only +Skeleton: upload-non-native +Description: Check HTML-only upstream changelog diff --git a/t/recipes/checks/debian/changelog/changelog-file-upstream-html-only/build-spec/orig/some-changelog.html b/t/recipes/checks/debian/changelog/changelog-file-upstream-html-only/build-spec/orig/some-changelog.html new file mode 100644 index 0000000..2a4614a --- /dev/null +++ b/t/recipes/checks/debian/changelog/changelog-file-upstream-html-only/build-spec/orig/some-changelog.html @@ -0,0 +1,8 @@ + + + Hallo World + + +

      A wonderful changelog written in HTML

      + + diff --git a/t/recipes/checks/debian/changelog/changelog-file-upstream-html-only/eval/desc b/t/recipes/checks/debian/changelog/changelog-file-upstream-html-only/eval/desc new file mode 100644 index 0000000..5604fd1 --- /dev/null +++ b/t/recipes/checks/debian/changelog/changelog-file-upstream-html-only/eval/desc @@ -0,0 +1,2 @@ +Testname: changelog-file-upstream-html-only +Check: debian/changelog diff --git a/t/recipes/checks/debian/changelog/changelog-file-upstream-html-only/eval/hints b/t/recipes/checks/debian/changelog/changelog-file-upstream-html-only/eval/hints new file mode 100644 index 0000000..696aa50 --- /dev/null +++ b/t/recipes/checks/debian/changelog/changelog-file-upstream-html-only/eval/hints @@ -0,0 +1 @@ +changelog-file-upstream-html-only (binary): html-changelog-without-text-version [usr/share/doc/changelog-file-upstream-html-only/changelog.html.gz] diff --git a/t/recipes/checks/debian/changelog/changelog-file-wrong-name-upstream/build-spec/debian/rules b/t/recipes/checks/debian/changelog/changelog-file-wrong-name-upstream/build-spec/debian/rules new file mode 100644 index 0000000..45fbec8 --- /dev/null +++ b/t/recipes/checks/debian/changelog/changelog-file-wrong-name-upstream/build-spec/debian/rules @@ -0,0 +1,11 @@ +#!/usr/bin/make -f + +PKG:=$(shell dh_listpackages) +DOC:=debian/$(PKG)/usr/share/doc/$(PKG) + +%: + dh $@ + +override_dh_installchangelogs: + dh_installchangelogs + cp some-changelog $(DOC)/Changes diff --git a/t/recipes/checks/debian/changelog/changelog-file-wrong-name-upstream/build-spec/fill-values b/t/recipes/checks/debian/changelog/changelog-file-wrong-name-upstream/build-spec/fill-values new file mode 100644 index 0000000..2e767c6 --- /dev/null +++ b/t/recipes/checks/debian/changelog/changelog-file-wrong-name-upstream/build-spec/fill-values @@ -0,0 +1,3 @@ +Testname: changelog-file-wrong-name-upstream +Skeleton: upload-non-native +Description: Check a wrong name for an upstream changelog diff --git a/t/recipes/checks/debian/changelog/changelog-file-wrong-name-upstream/build-spec/orig/some-changelog b/t/recipes/checks/debian/changelog/changelog-file-wrong-name-upstream/build-spec/orig/some-changelog new file mode 100644 index 0000000..336f590 --- /dev/null +++ b/t/recipes/checks/debian/changelog/changelog-file-wrong-name-upstream/build-spec/orig/some-changelog @@ -0,0 +1 @@ +Hallo World diff --git a/t/recipes/checks/debian/changelog/changelog-file-wrong-name-upstream/eval/desc b/t/recipes/checks/debian/changelog/changelog-file-wrong-name-upstream/eval/desc new file mode 100644 index 0000000..5ae1b34 --- /dev/null +++ b/t/recipes/checks/debian/changelog/changelog-file-wrong-name-upstream/eval/desc @@ -0,0 +1,2 @@ +Testname: changelog-file-wrong-name-upstream +Check: debian/changelog diff --git a/t/recipes/checks/debian/changelog/changelog-file-wrong-name-upstream/eval/hints b/t/recipes/checks/debian/changelog/changelog-file-wrong-name-upstream/eval/hints new file mode 100644 index 0000000..44bf518 --- /dev/null +++ b/t/recipes/checks/debian/changelog/changelog-file-wrong-name-upstream/eval/hints @@ -0,0 +1 @@ +changelog-file-wrong-name-upstream (binary): wrong-name-for-upstream-changelog [usr/share/doc/changelog-file-wrong-name-upstream/Changes] diff --git a/t/recipes/checks/debian/changelog/changelog-file-wrong-weekday/build-spec/debian/changelog.in b/t/recipes/checks/debian/changelog/changelog-file-wrong-weekday/build-spec/debian/changelog.in new file mode 100644 index 0000000..8fcb315 --- /dev/null +++ b/t/recipes/checks/debian/changelog/changelog-file-wrong-weekday/build-spec/debian/changelog.in @@ -0,0 +1,10 @@ +[% $source %] ([% $version %]) unstable; urgency=low + + * Lintian Test Suite. + * Test: [% $testname %] + * Suppress "should close ITP bug" messages. (Closes: #123456) + + * A bit of wishful thinking that the date below was a Friday. + + -- [% $author %] Fri, 07 Apr 2016 17:00:00 +0000 + diff --git a/t/recipes/checks/debian/changelog/changelog-file-wrong-weekday/build-spec/debian/control.in b/t/recipes/checks/debian/changelog/changelog-file-wrong-weekday/build-spec/debian/control.in new file mode 100644 index 0000000..0818186 --- /dev/null +++ b/t/recipes/checks/debian/changelog/changelog-file-wrong-weekday/build-spec/debian/control.in @@ -0,0 +1,16 @@ +Source: [% $source %] +Priority: optional +Section: [% $section %] +Maintainer: [% $author %] +Standards-Version: 3.9.8 +Build-Depends: [% $build_depends %] +Rules-Requires-Root: no + +Package: [% $source %] +Architecture: [% $package_architecture %] +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: [% $description %] + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. diff --git a/t/recipes/checks/debian/changelog/changelog-file-wrong-weekday/build-spec/fill-values b/t/recipes/checks/debian/changelog/changelog-file-wrong-weekday/build-spec/fill-values new file mode 100644 index 0000000..0d2c5b7 --- /dev/null +++ b/t/recipes/checks/debian/changelog/changelog-file-wrong-weekday/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: upload-native +Testname: changelog-file-wrong-weekday +Description: Test for wrong weekday in changelog date diff --git a/t/recipes/checks/debian/changelog/changelog-file-wrong-weekday/eval/desc b/t/recipes/checks/debian/changelog/changelog-file-wrong-weekday/eval/desc new file mode 100644 index 0000000..3411212 --- /dev/null +++ b/t/recipes/checks/debian/changelog/changelog-file-wrong-weekday/eval/desc @@ -0,0 +1,4 @@ +Testname: changelog-file-wrong-weekday +Profile: lintian-test +Options: --include-dir ./lintian-include-dir +Check: debian/changelog diff --git a/t/recipes/checks/debian/changelog/changelog-file-wrong-weekday/eval/hints b/t/recipes/checks/debian/changelog/changelog-file-wrong-weekday/eval/hints new file mode 100644 index 0000000..22e8a79 --- /dev/null +++ b/t/recipes/checks/debian/changelog/changelog-file-wrong-weekday/eval/hints @@ -0,0 +1 @@ +changelog-file-wrong-weekday (binary): debian-changelog-has-wrong-day-of-week 2016-04-07 was a Thursday [usr/share/doc/changelog-file-wrong-weekday/changelog.gz:1] diff --git a/t/recipes/checks/debian/changelog/changelog-file-wrong-weekday/eval/lintian-include-dir/profiles/lintian-test/main.profile b/t/recipes/checks/debian/changelog/changelog-file-wrong-weekday/eval/lintian-include-dir/profiles/lintian-test/main.profile new file mode 100644 index 0000000..f0e27cf --- /dev/null +++ b/t/recipes/checks/debian/changelog/changelog-file-wrong-weekday/eval/lintian-include-dir/profiles/lintian-test/main.profile @@ -0,0 +1,2 @@ +Profile: lintian-test/main +Extends: debian/main diff --git a/t/recipes/checks/debian/changelog/changelog-file-wrong-weekday/eval/lintian-include-dir/vendors/lintian-test/main/data/standards-version/ancient-date b/t/recipes/checks/debian/changelog/changelog-file-wrong-weekday/eval/lintian-include-dir/vendors/lintian-test/main/data/standards-version/ancient-date new file mode 100644 index 0000000..42f8743 --- /dev/null +++ b/t/recipes/checks/debian/changelog/changelog-file-wrong-weekday/eval/lintian-include-dir/vendors/lintian-test/main/data/standards-version/ancient-date @@ -0,0 +1,7 @@ +# Any Standards Version released before this day is "ancient" +# +# Frozen for this test so we do not have to update the test every time +# we update the real "ancient-date" data file. +# +# Format is ANCIENT < Date +ANCIENT < 20 Feb 2014 diff --git a/t/recipes/checks/debian/changelog/changelog-version-bzr/build-spec/fill-values b/t/recipes/checks/debian/changelog/changelog-version-bzr/build-spec/fill-values new file mode 100644 index 0000000..6f39521 --- /dev/null +++ b/t/recipes/checks/debian/changelog/changelog-version-bzr/build-spec/fill-values @@ -0,0 +1,4 @@ +Testname: changelog-version-bzr +Version: 0.7+bzr49+repack1-1 +Description: Test for +bzr in version (vs binNMU) +Skeleton: upload-non-native diff --git a/t/recipes/checks/debian/changelog/changelog-version-bzr/eval/desc b/t/recipes/checks/debian/changelog/changelog-version-bzr/eval/desc new file mode 100644 index 0000000..24eb5bf --- /dev/null +++ b/t/recipes/checks/debian/changelog/changelog-version-bzr/eval/desc @@ -0,0 +1,4 @@ +Testname: changelog-version-bzr +Check: debian/changelog +Test-Against: + malformed-debian-changelog-version diff --git a/t/recipes/checks/debian/changelog/changelog-version-bzr/eval/hints b/t/recipes/checks/debian/changelog/changelog-version-bzr/eval/hints new file mode 100644 index 0000000..e69de29 diff --git a/t/recipes/checks/debian/changelog/changelog-version-non-native-simple/build-spec/fill-values b/t/recipes/checks/debian/changelog/changelog-version-non-native-simple/build-spec/fill-values new file mode 100644 index 0000000..ba9c466 --- /dev/null +++ b/t/recipes/checks/debian/changelog/changelog-version-non-native-simple/build-spec/fill-values @@ -0,0 +1,4 @@ +Testname: changelog-version-non-native-simple +Version: 1-2 +Description: Test for normal versions +Skeleton: upload-non-native diff --git a/t/recipes/checks/debian/changelog/changelog-version-non-native-simple/eval/desc b/t/recipes/checks/debian/changelog/changelog-version-non-native-simple/eval/desc new file mode 100644 index 0000000..9d8d284 --- /dev/null +++ b/t/recipes/checks/debian/changelog/changelog-version-non-native-simple/eval/desc @@ -0,0 +1,4 @@ +Testname: changelog-version-non-native-simple +Test-Against: + malformed-debian-changelog-version +Check: debian/changelog diff --git a/t/recipes/checks/debian/changelog/changelog-version-non-native-simple/eval/hints b/t/recipes/checks/debian/changelog/changelog-version-non-native-simple/eval/hints new file mode 100644 index 0000000..e69de29 diff --git a/t/recipes/checks/debian/changelog/changelog-version-special-chars/build-spec/fill-values b/t/recipes/checks/debian/changelog/changelog-version-special-chars/build-spec/fill-values new file mode 100644 index 0000000..913887b --- /dev/null +++ b/t/recipes/checks/debian/changelog/changelog-version-special-chars/build-spec/fill-values @@ -0,0 +1,4 @@ +Testname: changelog-version-special-chars +Version: 2:1.5+important~personal1-stable-7 +Description: Test for weird versions +Skeleton: upload-non-native diff --git a/t/recipes/checks/debian/changelog/changelog-version-special-chars/eval/desc b/t/recipes/checks/debian/changelog/changelog-version-special-chars/eval/desc new file mode 100644 index 0000000..a38571b --- /dev/null +++ b/t/recipes/checks/debian/changelog/changelog-version-special-chars/eval/desc @@ -0,0 +1,4 @@ +Testname: changelog-version-special-chars +Test-Against: + malformed-debian-changelog-version +Check: debian/changelog diff --git a/t/recipes/checks/debian/changelog/changelog-version-special-chars/eval/hints b/t/recipes/checks/debian/changelog/changelog-version-special-chars/eval/hints new file mode 100644 index 0000000..fddb586 --- /dev/null +++ b/t/recipes/checks/debian/changelog/changelog-version-special-chars/eval/hints @@ -0,0 +1,3 @@ +changelog-version-special-chars (source): hyphen-in-upstream-part-of-debian-changelog-version 1.5+important~personal1-stable [debian/changelog:1] +changelog-version-special-chars (source): epoch-changed-but-upstream-version-did-not-go-backwards 0.0.1-1 -> 2:1.5+important~personal1-stable-7 [debian/changelog:1] +changelog-version-special-chars (source): epoch-change-without-comment 0.0.1-1 -> 2:1.5+important~personal1-stable-7 [debian/changelog:1] diff --git a/t/recipes/checks/debian/changelog/cruft-native-dash-version/build-spec/fill-values b/t/recipes/checks/debian/changelog/cruft-native-dash-version/build-spec/fill-values new file mode 100644 index 0000000..4bc587e --- /dev/null +++ b/t/recipes/checks/debian/changelog/cruft-native-dash-version/build-spec/fill-values @@ -0,0 +1,5 @@ +Skeleton: upload-native +Testname: cruft-native-dash-version +Source-Format: 1.0 +Version: 1.0-1 +Description: Test for native packages with dash version diff --git a/t/recipes/checks/debian/changelog/cruft-native-dash-version/eval/desc b/t/recipes/checks/debian/changelog/cruft-native-dash-version/eval/desc new file mode 100644 index 0000000..8f1baa5 --- /dev/null +++ b/t/recipes/checks/debian/changelog/cruft-native-dash-version/eval/desc @@ -0,0 +1,4 @@ +Testname: cruft-native-dash-version +Test-Against: + malformed-debian-changelog-version +Check: debian/changelog diff --git a/t/recipes/checks/debian/changelog/cruft-native-dash-version/eval/hints b/t/recipes/checks/debian/changelog/cruft-native-dash-version/eval/hints new file mode 100644 index 0000000..0a358d5 --- /dev/null +++ b/t/recipes/checks/debian/changelog/cruft-native-dash-version/eval/hints @@ -0,0 +1 @@ +cruft-native-dash-version (source): malformed-debian-changelog-version 1.0-1 (for native) [debian/changelog:1] diff --git a/t/recipes/checks/debian/changelog/date-based-version/build-spec/debian/changelog.in b/t/recipes/checks/debian/changelog/date-based-version/build-spec/debian/changelog.in new file mode 100644 index 0000000..d6095db --- /dev/null +++ b/t/recipes/checks/debian/changelog/date-based-version/build-spec/debian/changelog.in @@ -0,0 +1,8 @@ +[% $source %] ([% $version %]) [% $distribution %]; urgency=low + + * Lintian Test Suite. + * Test: [% $testname %] + + * Suppress "should close ITP bug" messages. (Closes: #123456) + + -- [% $author %] [% $date %] diff --git a/t/recipes/checks/debian/changelog/date-based-version/build-spec/fill-values b/t/recipes/checks/debian/changelog/date-based-version/build-spec/fill-values new file mode 100644 index 0000000..a4fa0ac --- /dev/null +++ b/t/recipes/checks/debian/changelog/date-based-version/build-spec/fill-values @@ -0,0 +1,4 @@ +Testname: date-based-version +Version: 20180219-1 +Description: Date-based version number +Skeleton: upload-non-native diff --git a/t/recipes/checks/debian/changelog/date-based-version/eval/desc b/t/recipes/checks/debian/changelog/date-based-version/eval/desc new file mode 100644 index 0000000..f80c48a --- /dev/null +++ b/t/recipes/checks/debian/changelog/date-based-version/eval/desc @@ -0,0 +1,4 @@ +Testname: date-based-version +Test-Against: + malformed-debian-changelog-version +Check: debian/changelog diff --git a/t/recipes/checks/debian/changelog/date-based-version/eval/hints b/t/recipes/checks/debian/changelog/date-based-version/eval/hints new file mode 100644 index 0000000..a39ae26 --- /dev/null +++ b/t/recipes/checks/debian/changelog/date-based-version/eval/hints @@ -0,0 +1 @@ +date-based-version (binary): new-package-uses-date-based-version-number 20180219-1 (better: 0~20180219-1) [usr/share/doc/date-based-version/changelog.Debian.gz:1] diff --git a/t/recipes/checks/debian/changelog/fields-version-bad-rc/build-spec/fill-values b/t/recipes/checks/debian/changelog/fields-version-bad-rc/build-spec/fill-values new file mode 100644 index 0000000..fae232a --- /dev/null +++ b/t/recipes/checks/debian/changelog/fields-version-bad-rc/build-spec/fill-values @@ -0,0 +1,4 @@ +Testname: fields-version-bad-rc +Version: 1.0+rc3-1 +Description: Test for bad release candidate versions +Skeleton: upload-non-native diff --git a/t/recipes/checks/debian/changelog/fields-version-bad-rc/eval/desc b/t/recipes/checks/debian/changelog/fields-version-bad-rc/eval/desc new file mode 100644 index 0000000..bbb03dd --- /dev/null +++ b/t/recipes/checks/debian/changelog/fields-version-bad-rc/eval/desc @@ -0,0 +1,3 @@ +Testname: fields-version-bad-rc +Test-Against: malformed-debian-changelog-version +Check: debian/changelog diff --git a/t/recipes/checks/debian/changelog/fields-version-bad-rc/eval/hints b/t/recipes/checks/debian/changelog/fields-version-bad-rc/eval/hints new file mode 100644 index 0000000..7a6da94 --- /dev/null +++ b/t/recipes/checks/debian/changelog/fields-version-bad-rc/eval/hints @@ -0,0 +1 @@ +fields-version-bad-rc (source): rc-version-greater-than-expected-version 1.0+rc3 > 1.0 (consider using 1.0~rc3) [debian/changelog:1] diff --git a/t/recipes/checks/debian/changelog/fields-version-bad/build-spec/debian/changelog.in b/t/recipes/checks/debian/changelog/fields-version-bad/build-spec/debian/changelog.in new file mode 100644 index 0000000..2895dec --- /dev/null +++ b/t/recipes/checks/debian/changelog/fields-version-bad/build-spec/debian/changelog.in @@ -0,0 +1,7 @@ +[% $source %] ([% $version %]) [% $distribution %]; urgency=low + + * Lintian Test Suite. + * Test: [% $testname %] + + -- [% $author %] [% $date %] + diff --git a/t/recipes/checks/debian/changelog/fields-version-bad/build-spec/debian/rules b/t/recipes/checks/debian/changelog/fields-version-bad/build-spec/debian/rules new file mode 100644 index 0000000..ce09a53 --- /dev/null +++ b/t/recipes/checks/debian/changelog/fields-version-bad/build-spec/debian/rules @@ -0,0 +1,7 @@ +#!/usr/bin/make -f + +%: + dh $@ + +override_dh_gencontrol: + dh_gencontrol -- -v1.0-0 diff --git a/t/recipes/checks/debian/changelog/fields-version-bad/build-spec/fill-values b/t/recipes/checks/debian/changelog/fields-version-bad/build-spec/fill-values new file mode 100644 index 0000000..fddcd45 --- /dev/null +++ b/t/recipes/checks/debian/changelog/fields-version-bad/build-spec/fill-values @@ -0,0 +1,4 @@ +Testname: fields-version-bad +Version: 0-.3 +Description: Test for weird versions +Skeleton: upload-non-native diff --git a/t/recipes/checks/debian/changelog/fields-version-bad/eval/desc b/t/recipes/checks/debian/changelog/fields-version-bad/eval/desc new file mode 100644 index 0000000..eaa3215 --- /dev/null +++ b/t/recipes/checks/debian/changelog/fields-version-bad/eval/desc @@ -0,0 +1,3 @@ +Testname: fields-version-bad +Test-Against: malformed-debian-changelog-version +Check: debian/changelog diff --git a/t/recipes/checks/debian/changelog/fields-version-bad/eval/hints b/t/recipes/checks/debian/changelog/fields-version-bad/eval/hints new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/t/recipes/checks/debian/changelog/fields-version-bad/eval/hints @@ -0,0 +1 @@ + diff --git a/t/recipes/checks/debian/changelog/fields-version-dfsg-native/build-spec/fill-values b/t/recipes/checks/debian/changelog/fields-version-dfsg-native/build-spec/fill-values new file mode 100644 index 0000000..1246466 --- /dev/null +++ b/t/recipes/checks/debian/changelog/fields-version-dfsg-native/build-spec/fill-values @@ -0,0 +1,4 @@ +Skeleton: upload-native +Testname: fields-version-dfsg-native +Version: 1.0.dfsg1 +Description: Use of dfsg in a native package diff --git a/t/recipes/checks/debian/changelog/fields-version-dfsg-native/eval/desc b/t/recipes/checks/debian/changelog/fields-version-dfsg-native/eval/desc new file mode 100644 index 0000000..50df649 --- /dev/null +++ b/t/recipes/checks/debian/changelog/fields-version-dfsg-native/eval/desc @@ -0,0 +1,3 @@ +Testname: fields-version-dfsg-native +Test-Against: malformed-debian-changelog-version +Check: debian/changelog diff --git a/t/recipes/checks/debian/changelog/fields-version-dfsg-native/eval/hints b/t/recipes/checks/debian/changelog/fields-version-dfsg-native/eval/hints new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/t/recipes/checks/debian/changelog/fields-version-dfsg-native/eval/hints @@ -0,0 +1 @@ + diff --git a/t/recipes/checks/debian/changelog/fields-version-dot-dfsg/build-spec/fill-values b/t/recipes/checks/debian/changelog/fields-version-dot-dfsg/build-spec/fill-values new file mode 100644 index 0000000..412adaa --- /dev/null +++ b/t/recipes/checks/debian/changelog/fields-version-dot-dfsg/build-spec/fill-values @@ -0,0 +1,4 @@ +Testname: fields-version-dot-dfsg +Skeleton: upload-non-native +Version: 1.0.dfsg1-1 +Description: Use of ".dfsg" diff --git a/t/recipes/checks/debian/changelog/fields-version-dot-dfsg/eval/desc b/t/recipes/checks/debian/changelog/fields-version-dot-dfsg/eval/desc new file mode 100644 index 0000000..0819a9e --- /dev/null +++ b/t/recipes/checks/debian/changelog/fields-version-dot-dfsg/eval/desc @@ -0,0 +1,3 @@ +Testname: fields-version-dot-dfsg +Test-Against: malformed-debian-changelog-version +Check: debian/changelog diff --git a/t/recipes/checks/debian/changelog/fields-version-dot-dfsg/eval/hints b/t/recipes/checks/debian/changelog/fields-version-dot-dfsg/eval/hints new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/t/recipes/checks/debian/changelog/fields-version-dot-dfsg/eval/hints @@ -0,0 +1 @@ + diff --git a/t/recipes/checks/debian/changelog/fields-version-dsfg/build-spec/fill-values b/t/recipes/checks/debian/changelog/fields-version-dsfg/build-spec/fill-values new file mode 100644 index 0000000..077bc94 --- /dev/null +++ b/t/recipes/checks/debian/changelog/fields-version-dsfg/build-spec/fill-values @@ -0,0 +1,4 @@ +Testname: fields-version-dsfg +Skeleton: upload-non-native +Version: 1.0+dsfg1-1 +Description: Check for the dsfg typo diff --git a/t/recipes/checks/debian/changelog/fields-version-dsfg/eval/desc b/t/recipes/checks/debian/changelog/fields-version-dsfg/eval/desc new file mode 100644 index 0000000..da32956 --- /dev/null +++ b/t/recipes/checks/debian/changelog/fields-version-dsfg/eval/desc @@ -0,0 +1,3 @@ +Testname: fields-version-dsfg +Test-Against: malformed-debian-changelog-version +Check: debian/changelog diff --git a/t/recipes/checks/debian/changelog/fields-version-dsfg/eval/hints b/t/recipes/checks/debian/changelog/fields-version-dsfg/eval/hints new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/t/recipes/checks/debian/changelog/fields-version-dsfg/eval/hints @@ -0,0 +1 @@ + diff --git a/t/recipes/checks/debian/changelog/generic-dh-make-2008/build-spec/debian/README.Debian b/t/recipes/checks/debian/changelog/generic-dh-make-2008/build-spec/debian/README.Debian new file mode 100644 index 0000000..69112e6 --- /dev/null +++ b/t/recipes/checks/debian/changelog/generic-dh-make-2008/build-spec/debian/README.Debian @@ -0,0 +1,6 @@ +generic-dh-make-2008 for Debian +------------------------------- + + + + -- Russ Allbery Mon, 29 Dec 2008 17:33:59 -0800 diff --git a/t/recipes/checks/debian/changelog/generic-dh-make-2008/build-spec/debian/changelog.in b/t/recipes/checks/debian/changelog/generic-dh-make-2008/build-spec/debian/changelog.in new file mode 100644 index 0000000..8d16a3d --- /dev/null +++ b/t/recipes/checks/debian/changelog/generic-dh-make-2008/build-spec/debian/changelog.in @@ -0,0 +1,5 @@ +generic-dh-make-2008 ([% $version %]) [% $distribution %]; urgency=low + + * Initial release (Closes: #nnnn) + + -- Russ Allbery Mon, 29 Dec 2008 17:33:59 -0800 diff --git a/t/recipes/checks/debian/changelog/generic-dh-make-2008/build-spec/debian/compat.in b/t/recipes/checks/debian/changelog/generic-dh-make-2008/build-spec/debian/compat.in new file mode 100644 index 0000000..640a566 --- /dev/null +++ b/t/recipes/checks/debian/changelog/generic-dh-make-2008/build-spec/debian/compat.in @@ -0,0 +1 @@ +[% $dh_compat_level %] diff --git a/t/recipes/checks/debian/changelog/generic-dh-make-2008/build-spec/debian/control.in b/t/recipes/checks/debian/changelog/generic-dh-make-2008/build-spec/debian/control.in new file mode 100644 index 0000000..a668392 --- /dev/null +++ b/t/recipes/checks/debian/changelog/generic-dh-make-2008/build-spec/debian/control.in @@ -0,0 +1,13 @@ +Source: generic-dh-make-2008 +Section: unknown +Priority: optional +Maintainer: Russ Allbery +Build-Depends: debhelper (>= 7) +Standards-Version: 3.7.3 +Homepage: + +Package: generic-dh-make-2008 +Architecture: [% $package_architecture %] +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: + diff --git a/t/recipes/checks/debian/changelog/generic-dh-make-2008/build-spec/debian/copyright b/t/recipes/checks/debian/changelog/generic-dh-make-2008/build-spec/debian/copyright new file mode 100644 index 0000000..31b796a --- /dev/null +++ b/t/recipes/checks/debian/changelog/generic-dh-make-2008/build-spec/debian/copyright @@ -0,0 +1,24 @@ +This package was debianized by Russ Allbery on +Mon, 29 Dec 2008 17:33:59 -0800. + +It was downloaded from + +Upstream Author(s): + + + + +Copyright: + + + + +License: + + + +The Debian packaging is (C) 2008, Russ Allbery and +is licensed under the GPL, see `/usr/share/common-licenses/GPL'. + +# Please also look if there are files or directories which have a +# different copyright/license attached and list them here. diff --git a/t/recipes/checks/debian/changelog/generic-dh-make-2008/build-spec/debian/cron.d.ex b/t/recipes/checks/debian/changelog/generic-dh-make-2008/build-spec/debian/cron.d.ex new file mode 100644 index 0000000..d00b7d0 --- /dev/null +++ b/t/recipes/checks/debian/changelog/generic-dh-make-2008/build-spec/debian/cron.d.ex @@ -0,0 +1,4 @@ +# +# Regular cron jobs for the generic-dh-make-2008 package +# +0 4 * * * root [ -x /usr/bin/generic-dh-make-2008_maintenance ] && /usr/bin/generic-dh-make-2008_maintenance diff --git a/t/recipes/checks/debian/changelog/generic-dh-make-2008/build-spec/debian/dirs b/t/recipes/checks/debian/changelog/generic-dh-make-2008/build-spec/debian/dirs new file mode 100644 index 0000000..ca882bb --- /dev/null +++ b/t/recipes/checks/debian/changelog/generic-dh-make-2008/build-spec/debian/dirs @@ -0,0 +1,2 @@ +usr/bin +usr/sbin diff --git a/t/recipes/checks/debian/changelog/generic-dh-make-2008/build-spec/debian/docs b/t/recipes/checks/debian/changelog/generic-dh-make-2008/build-spec/debian/docs new file mode 100644 index 0000000..e845566 --- /dev/null +++ b/t/recipes/checks/debian/changelog/generic-dh-make-2008/build-spec/debian/docs @@ -0,0 +1 @@ +README diff --git a/t/recipes/checks/debian/changelog/generic-dh-make-2008/build-spec/debian/emacsen-install.ex b/t/recipes/checks/debian/changelog/generic-dh-make-2008/build-spec/debian/emacsen-install.ex new file mode 100644 index 0000000..393594b --- /dev/null +++ b/t/recipes/checks/debian/changelog/generic-dh-make-2008/build-spec/debian/emacsen-install.ex @@ -0,0 +1,45 @@ +#! /bin/sh -e +# /usr/lib/emacsen-common/packages/install/generic-dh-make-2008 + +# Written by Jim Van Zandt , borrowing heavily +# from the install scripts for gettext by Santiago Vila +# and octave by Dirk Eddelbuettel . + +FLAVOR=$1 +PACKAGE=generic-dh-make-2008 + +if [ ${FLAVOR} = emacs ]; then exit 0; fi + +echo install/${PACKAGE}: Handling install for emacsen flavor ${FLAVOR} + +#FLAVORTEST=`echo $FLAVOR | cut -c-6` +#if [ ${FLAVORTEST} = xemacs ] ; then +# SITEFLAG="-no-site-file" +#else +# SITEFLAG="--no-site-file" +#fi +FLAGS="${SITEFLAG} -q -batch -l path.el -f batch-byte-compile" + +ELDIR=/usr/share/emacs/site-lisp/${PACKAGE} +ELCDIR=/usr/share/${FLAVOR}/site-lisp/${PACKAGE} + +# Install-info-altdir does not actually exist. +# Maybe somebody will write it. +if test -x /usr/sbin/install-info-altdir; then + echo install/${PACKAGE}: install Info links for ${FLAVOR} + install-info-altdir --quiet --section "" "" --dirname=${FLAVOR} /usr/share/info/${PACKAGE}.info.gz +fi + +install -m 755 -d ${ELCDIR} +cd ${ELDIR} +FILES=`echo *.el` +cp ${FILES} ${ELCDIR} +cd ${ELCDIR} + +cat << EOF > path.el +(setq load-path (cons "." load-path) byte-compile-warnings nil) +EOF +${FLAVOR} ${FLAGS} ${FILES} +rm -f *.el path.el + +exit 0 diff --git a/t/recipes/checks/debian/changelog/generic-dh-make-2008/build-spec/debian/emacsen-remove.ex b/t/recipes/checks/debian/changelog/generic-dh-make-2008/build-spec/debian/emacsen-remove.ex new file mode 100644 index 0000000..c48d194 --- /dev/null +++ b/t/recipes/checks/debian/changelog/generic-dh-make-2008/build-spec/debian/emacsen-remove.ex @@ -0,0 +1,15 @@ +#!/bin/sh -e +# /usr/lib/emacsen-common/packages/remove/generic-dh-make-2008 + +FLAVOR=$1 +PACKAGE=generic-dh-make-2008 + +if [ ${FLAVOR} != emacs ]; then + if test -x /usr/sbin/install-info-altdir; then + echo remove/${PACKAGE}: removing Info links for ${FLAVOR} + install-info-altdir --quiet --remove --dirname=${FLAVOR} /usr/share/info/generic-dh-make-2008.info.gz + fi + + echo remove/${PACKAGE}: purging byte-compiled files for ${FLAVOR} + rm -rf /usr/share/${FLAVOR}/site-lisp/${PACKAGE} +fi diff --git a/t/recipes/checks/debian/changelog/generic-dh-make-2008/build-spec/debian/emacsen-startup.ex b/t/recipes/checks/debian/changelog/generic-dh-make-2008/build-spec/debian/emacsen-startup.ex new file mode 100644 index 0000000..b51657a --- /dev/null +++ b/t/recipes/checks/debian/changelog/generic-dh-make-2008/build-spec/debian/emacsen-startup.ex @@ -0,0 +1,25 @@ +;; -*-emacs-lisp-*- +;; +;; Emacs startup file, e.g. /etc/emacs/site-start.d/50generic-dh-make-2008.el +;; for the Debian generic-dh-make-2008 package +;; +;; Originally contributed by Nils Naumann +;; Modified by Dirk Eddelbuettel +;; Adapted for dh-make by Jim Van Zandt + +;; The generic-dh-make-2008 package follows the Debian/GNU Linux 'emacsen' policy and +;; byte-compiles its elisp files for each 'emacs flavor' (emacs19, +;; xemacs19, emacs20, xemacs20...). The compiled code is then +;; installed in a subdirectory of the respective site-lisp directory. +;; We have to add this to the load-path: +(let ((package-dir (concat "/usr/share/" + (symbol-name flavor) + "/site-lisp/generic-dh-make-2008"))) +;; If package-dir does not exist, the generic-dh-make-2008 package must have +;; removed but not purged, and we should skip the setup. + (when (file-directory-p package-dir) + (setq load-path (cons package-dir load-path)) + (autoload 'generic-dh-make-2008-mode "generic-dh-make-2008-mode" + "Major mode for editing generic-dh-make-2008 files." t) + (add-to-list 'auto-mode-alist '("\\.generic-dh-make-2008$" . generic-dh-make-2008-mode)))) + diff --git a/t/recipes/checks/debian/changelog/generic-dh-make-2008/build-spec/debian/generic-dh-make-2008.default.ex b/t/recipes/checks/debian/changelog/generic-dh-make-2008/build-spec/debian/generic-dh-make-2008.default.ex new file mode 100644 index 0000000..d770c6e --- /dev/null +++ b/t/recipes/checks/debian/changelog/generic-dh-make-2008/build-spec/debian/generic-dh-make-2008.default.ex @@ -0,0 +1,10 @@ +# Defaults for generic-dh-make-2008 initscript +# sourced by /etc/init.d/generic-dh-make-2008 +# installed at /etc/default/generic-dh-make-2008 by the maintainer scripts + +# +# This is a POSIX shell fragment +# + +# Additional options that are passed to the Daemon. +DAEMON_OPTS="" diff --git a/t/recipes/checks/debian/changelog/generic-dh-make-2008/build-spec/debian/generic-dh-make-2008.doc-base.EX b/t/recipes/checks/debian/changelog/generic-dh-make-2008/build-spec/debian/generic-dh-make-2008.doc-base.EX new file mode 100644 index 0000000..3b966d1 --- /dev/null +++ b/t/recipes/checks/debian/changelog/generic-dh-make-2008/build-spec/debian/generic-dh-make-2008.doc-base.EX @@ -0,0 +1,22 @@ +Document: generic-dh-make-2008 +Title: Debian generic-dh-make-2008 Manual +Author: +Abstract: This manual describes what generic-dh-make-2008 is + and how it can be used to + manage online manuals on Debian systems. +Section: unknown + +Format: debiandoc-sgml +Files: /usr/share/doc/generic-dh-make-2008/generic-dh-make-2008.sgml.gz + +Format: postscript +Files: /usr/share/doc/generic-dh-make-2008/generic-dh-make-2008.ps.gz + +Format: text +Files: /usr/share/doc/generic-dh-make-2008/generic-dh-make-2008.text.gz + +Format: HTML +Index: /usr/share/doc/generic-dh-make-2008/html/index.html +Files: /usr/share/doc/generic-dh-make-2008/html/*.html + + diff --git a/t/recipes/checks/debian/changelog/generic-dh-make-2008/build-spec/debian/init.d.ex b/t/recipes/checks/debian/changelog/generic-dh-make-2008/build-spec/debian/init.d.ex new file mode 100644 index 0000000..b464594 --- /dev/null +++ b/t/recipes/checks/debian/changelog/generic-dh-make-2008/build-spec/debian/init.d.ex @@ -0,0 +1,157 @@ +#! /bin/sh +# +# skeleton example file to build /etc/init.d/ scripts. +# This file should be used to construct scripts for /etc/init.d. +# +# Written by Miquel van Smoorenburg . +# Modified for Debian +# by Ian Murdock . +# Further changes by Javier Fernandez-Sanguino +# +# Version: @(#)skeleton 1.9 26-Feb-2001 miquels@cistron.nl +# + +PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin +DAEMON=/usr/sbin/generic-dh-make-2008 +NAME=generic-dh-make-2008 +DESC=generic-dh-make-2008 + +test -x $DAEMON || exit 0 + +LOGDIR=/var/log/generic-dh-make-2008 +PIDFILE=/var/run/$NAME.pid +DODTIME=1 # Time to wait for the server to die, in seconds + # If this value is set too low you might not + # let some servers to die gracefully and + # 'restart' will not work + +# Include generic-dh-make-2008 defaults if available +if [ -f /etc/default/generic-dh-make-2008 ] ; then + . /etc/default/generic-dh-make-2008 +fi + +set -e + +running_pid() +{ + # Check if a given process pid's cmdline matches a given name + pid=$1 + name=$2 + [ -z "$pid" ] && return 1 + [ ! -d /proc/$pid ] && return 1 + cmd=`cat /proc/$pid/cmdline | tr "\000" "\n"|head -n 1 |cut -d : -f 1` + # Is this the expected child? + [ "$cmd" != "$name" ] && return 1 + return 0 +} + +running() +{ +# Check if the process is running looking at /proc +# (works for all users) + + # No pidfile, probably no daemon present + [ ! -f "$PIDFILE" ] && return 1 + # Obtain the pid and check it against the binary name + pid=`cat $PIDFILE` + running_pid $pid $DAEMON || return 1 + return 0 +} + +force_stop() { +# Forcefully kill the process + [ ! -f "$PIDFILE" ] && return + if running ; then + kill -15 $pid + # Is it really dead? + [ -n "$DODTIME" ] && sleep "$DODTIME"s + if running ; then + kill -9 $pid + [ -n "$DODTIME" ] && sleep "$DODTIME"s + if running ; then + echo "Cannot kill $LABEL (pid=$pid)!" + exit 1 + fi + fi + fi + rm -f $PIDFILE + return 0 +} + +case "$1" in + start) + echo -n "Starting $DESC: " + start-stop-daemon --start --quiet --pidfile $PIDFILE \ + --exec $DAEMON -- $DAEMON_OPTS + if running ; then + echo "$NAME." + else + echo " ERROR." + fi + ;; + stop) + echo -n "Stopping $DESC: " + start-stop-daemon --stop --quiet --pidfile $PIDFILE \ + --exec $DAEMON + echo "$NAME." + ;; + force-stop) + echo -n "Forcefully stopping $DESC: " + force_stop + if ! running ; then + echo "$NAME." + else + echo " ERROR." + fi + ;; + #reload) + # + # If the daemon can reload its config files on the fly + # for example by sending it SIGHUP, do it here. + # + # If the daemon responds to changes in its config file + # directly anyway, make this a do-nothing entry. + # + # echo "Reloading $DESC configuration files." + # start-stop-daemon --stop --signal 1 --quiet --pidfile \ + # /var/run/$NAME.pid --exec $DAEMON + #;; + force-reload) + # + # If the "reload" option is implemented, move the "force-reload" + # option to the "reload" entry above. If not, "force-reload" is + # just the same as "restart" except that it does nothing if the + # daemon isn't already running. + # check wether $DAEMON is running. If so, restart + start-stop-daemon --stop --test --quiet --pidfile \ + /var/run/$NAME.pid --exec $DAEMON \ + && $0 restart \ + || exit 0 + ;; + restart) + echo -n "Restarting $DESC: " + start-stop-daemon --stop --quiet --pidfile \ + /var/run/$NAME.pid --exec $DAEMON + [ -n "$DODTIME" ] && sleep $DODTIME + start-stop-daemon --start --quiet --pidfile \ + /var/run/$NAME.pid --exec $DAEMON -- $DAEMON_OPTS + echo "$NAME." + ;; + status) + echo -n "$LABEL is " + if running ; then + echo "running" + else + echo " not running." + exit 1 + fi + ;; + *) + N=/etc/init.d/$NAME + # echo "Usage: $N {start|stop|restart|reload|force-reload}" >&2 + echo "Usage: $N {start|stop|restart|force-reload|status|force-stop}" >&2 + exit 1 + ;; +esac + +exit 0 diff --git a/t/recipes/checks/debian/changelog/generic-dh-make-2008/build-spec/debian/init.d.lsb.ex b/t/recipes/checks/debian/changelog/generic-dh-make-2008/build-spec/debian/init.d.lsb.ex new file mode 100644 index 0000000..b3559de --- /dev/null +++ b/t/recipes/checks/debian/changelog/generic-dh-make-2008/build-spec/debian/init.d.lsb.ex @@ -0,0 +1,296 @@ +#!/bin/sh +# +# Example init.d script with LSB support. +# +# Please read this init.d carefully and modify the sections to +# adjust it to the program you want to run. +# +# Copyright (c) 2007 Javier Fernandez-Sanguino +# +# This is free software; you may redistribute it and/or modify +# it under the terms of the GNU General Public License as +# published by the Free Software Foundation; either version 2, +# or (at your option) any later version. +# +# This is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License with +# the Debian operating system, in /usr/share/common-licenses/GPL; if +# not, write to the Free Software Foundation, Inc., 59 Temple Place, +# Suite 330, Boston, MA 02111-1307 USA +# +### BEGIN INIT INFO +# Provides: generic-dh-make-2008 +# Required-Start: $network $local_fs +# Required-Stop: +# Should-Start: $named +# Should-Stop: +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +# Short-Description: +# Description: +# <...> +# <...> +### END INIT INFO + +PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin + +DAEMON=/usr/sbin/generic-dh-make-2008 # Introduce the server's location here +NAME=#PACKAGE # Introduce the short server's name here +DESC=#PACKAGE # Introduce a short description here +LOGDIR=/var/log/generic-dh-make-2008 # Log directory to use + +PIDFILE=/var/run/$NAME.pid + +test -x $DAEMON || exit 0 + +. /lib/lsb/init-functions + +# Default options, these can be overriden by the information +# at /etc/default/$NAME +DAEMON_OPTS="" # Additional options given to the server + +DIETIME=10 # Time to wait for the server to die, in seconds + # If this value is set too low you might not + # let some servers to die gracefully and + # 'restart' will not work + +#STARTTIME=2 # Time to wait for the server to start, in seconds + # If this value is set each time the server is + # started (on start or restart) the script will + # stall to try to determine if it is running + # If it is not set and the server takes time + # to setup a pid file the log message might + # be a false positive (says it did not start + # when it actually did) + +LOGFILE=$LOGDIR/$NAME.log # Server logfile +#DAEMONUSER=generic-dh-make-2008 # Users to run the daemons as. If this value + # is set start-stop-daemon will chuid the server + +# Include defaults if available +if [ -f /etc/default/$NAME ] ; then + . /etc/default/$NAME +fi + +# Use this if you want the user to explicitly set 'RUN' in +# /etc/default/ +#if [ "x$RUN" != "xyes" ] ; then +# log_failure_msg "$NAME disabled, please adjust the configuration to your needs " +# log_failure_msg "and then set RUN to 'yes' in /etc/default/$NAME to enable it." +# exit 1 +#fi + +# Check that the user exists (if we set a user) +# Does the user exist? +if [ -n "$DAEMONUSER" ] ; then + if getent passwd | grep -q "^$DAEMONUSER:"; then + # Obtain the uid and gid + DAEMONUID=`getent passwd |grep "^$DAEMONUSER:" | awk -F : '{print $3}'` + DAEMONGID=`getent passwd |grep "^$DAEMONUSER:" | awk -F : '{print $4}'` + else + log_failure_msg "The user $DAEMONUSER, required to run $NAME does not exist." + exit 1 + fi +fi + + +set -e + +running_pid() { +# Check if a given process pid's cmdline matches a given name + pid=$1 + name=$2 + [ -z "$pid" ] && return 1 + [ ! -d /proc/$pid ] && return 1 + cmd=`cat /proc/$pid/cmdline | tr "\000" "\n"|head -n 1 |cut -d : -f 1` + # Is this the expected server + [ "$cmd" != "$name" ] && return 1 + return 0 +} + +running() { +# Check if the process is running looking at /proc +# (works for all users) + + # No pidfile, probably no daemon present + [ ! -f "$PIDFILE" ] && return 1 + pid=`cat $PIDFILE` + running_pid $pid $DAEMON || return 1 + return 0 +} + +start_server() { +# Start the process using the wrapper + if [ -z "$DAEMONUSER" ] ; then + start_daemon -p $PIDFILE $DAEMON -- $DAEMON_OPTS + errcode=$? + else +# if we are using a daemonuser then change the user id + start-stop-daemon --start --quiet --pidfile $PIDFILE \ + --chuid $DAEMONUSER \ + --exec $DAEMON -- $DAEMON_OPTS + errcode=$? + fi + return $errcode +} + +stop_server() { +# Stop the process using the wrapper + if [ -z "$DAEMONUSER" ] ; then + killproc -p $PIDFILE $DAEMON + errcode=$? + else +# if we are using a daemonuser then look for process that match + start-stop-daemon --stop --quiet --pidfile $PIDFILE \ + --user $DAEMONUSER \ + --exec $DAEMON + errcode=$? + fi + + return $errcode +} + +reload_server() { + [ ! -f "$PIDFILE" ] && return 1 + pid=pidofproc $PIDFILE # This is the daemon's pid + # Send a SIGHUP + kill -1 $pid + return $? +} + +force_stop() { +# Force the process to die killing it manually + [ ! -e "$PIDFILE" ] && return + if running ; then + kill -15 $pid + # Is it really dead? + sleep "$DIETIME"s + if running ; then + kill -9 $pid + sleep "$DIETIME"s + if running ; then + echo "Cannot kill $NAME (pid=$pid)!" + exit 1 + fi + fi + fi + rm -f $PIDFILE +} + + +case "$1" in + start) + log_daemon_msg "Starting $DESC " "$NAME" + # Check if it's running first + if running ; then + log_progress_msg "apparently already running" + log_end_msg 0 + exit 0 + fi + if start_server ; then + # NOTE: Some servers might die some time after they start, + # this code will detect this issue if STARTTIME is set + # to a reasonable value + [ -n "$STARTTIME" ] && sleep $STARTTIME # Wait some time + if running ; then + # It's ok, the server started and is running + log_end_msg 0 + else + # It is not running after we did start + log_end_msg 1 + fi + else + # Either we could not start it + log_end_msg 1 + fi + ;; + stop) + log_daemon_msg "Stopping $DESC" "$NAME" + if running ; then + # Only stop the server if we see it running + errcode=0 + stop_server || errcode=$? + log_end_msg $errcode + else + # If it's not running don't do anything + log_progress_msg "apparently not running" + log_end_msg 0 + exit 0 + fi + ;; + force-stop) + # First try to stop gracefully the program + $0 stop + if running; then + # If it's still running try to kill it more forcefully + log_daemon_msg "Stopping (force) $DESC" "$NAME" + errcode=0 + force_stop || errcode=$? + log_end_msg $errcode + fi + ;; + restart|force-reload) + log_daemon_msg "Restarting $DESC" "$NAME" + errcode=0 + stop_server || errcode=$? + # Wait some sensible amount, some server need this + [ -n "$DIETIME" ] && sleep $DIETIME + start_server || errcode=$? + [ -n "$STARTTIME" ] && sleep $STARTTIME + running || errcode=$? + log_end_msg $errcode + ;; + status) + + log_daemon_msg "Checking status of $DESC" "$NAME" + if running ; then + log_progress_msg "running" + log_end_msg 0 + else + log_progress_msg "apparently not running" + log_end_msg 1 + exit 1 + fi + ;; + # Use this if the daemon cannot reload + reload) + log_warning_msg "Reloading $NAME daemon: not implemented, as the daemon" + log_warning_msg "cannot re-read the config file (use restart)." + ;; + # And this if it cann + #reload) + # + # If the daemon can reload its config files on the fly + # for example by sending it SIGHUP, do it here. + # + # If the daemon responds to changes in its config file + # directly anyway, make this a do-nothing entry. + # + # log_daemon_msg "Reloading $DESC configuration files" "$NAME" + # if running ; then + # reload_server + # if ! running ; then + # Process died after we tried to reload + # log_progress_msg "died on reload" + # log_end_msg 1 + # exit 1 + # fi + # else + # log_progress_msg "server is not running" + # log_end_msg 1 + # exit 1 + # fi + #;; + + *) + N=/etc/init.d/$NAME + echo "Usage: $N {start|stop|force-stop|restart|force-reload|status}" >&2 + exit 1 + ;; +esac + +exit 0 diff --git a/t/recipes/checks/debian/changelog/generic-dh-make-2008/build-spec/debian/manpage.1.ex b/t/recipes/checks/debian/changelog/generic-dh-make-2008/build-spec/debian/manpage.1.ex new file mode 100644 index 0000000..d67baa2 --- /dev/null +++ b/t/recipes/checks/debian/changelog/generic-dh-make-2008/build-spec/debian/manpage.1.ex @@ -0,0 +1,59 @@ +.\" Hey, EMACS: -*- nroff -*- +.\" First parameter, NAME, should be all caps +.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection +.\" other parameters are allowed: see man(7), man(1) +.TH GENERIC-DH-MAKE-2008 SECTION "December 29, 2008" +.\" Please adjust this date whenever revising the manpage. +.\" +.\" Some roff macros, for reference: +.\" .nh disable hyphenation +.\" .hy enable hyphenation +.\" .ad l left justify +.\" .ad b justify to both left and right margins +.\" .nf disable filling +.\" .fi enable filling +.\" .br insert line break +.\" .sp insert n+1 empty lines +.\" for manpage-specific macros, see man(7) +.SH NAME +generic-dh-make-2008 \- program to do something +.SH SYNOPSIS +.B generic-dh-make-2008 +.RI [ options ] " files" ... +.br +.B bar +.RI [ options ] " files" ... +.SH DESCRIPTION +This manual page documents briefly the +.B generic-dh-make-2008 +and +.B bar +commands. +.PP +.\" TeX users may be more comfortable with the \fB\fP and +.\" \fI\fP escape sequences to invode bold face and italics, +.\" respectively. +\fBgeneric-dh-make-2008\fP is a program that... +.SH OPTIONS +These programs follow the usual GNU command line syntax, with long +options starting with two dashes (`-'). +A summary of options is included below. +For a complete description, see the Info files. +.TP +.B \-h, \-\-help +Show summary of options. +.TP +.B \-v, \-\-version +Show version of program. +.SH SEE ALSO +.BR bar (1), +.BR baz (1). +.br +The programs are documented fully by +.IR "The Rise and Fall of a Fooish Bar" , +available via the Info system. +.SH AUTHOR +generic-dh-make-2008 was written by . +.PP +This manual page was written by Russ Allbery , +for the Debian project (but may be used by others). diff --git a/t/recipes/checks/debian/changelog/generic-dh-make-2008/build-spec/debian/manpage.sgml.ex b/t/recipes/checks/debian/changelog/generic-dh-make-2008/build-spec/debian/manpage.sgml.ex new file mode 100644 index 0000000..26b3e0c --- /dev/null +++ b/t/recipes/checks/debian/changelog/generic-dh-make-2008/build-spec/debian/manpage.sgml.ex @@ -0,0 +1,156 @@ + manpage.1'. You may view + the manual page with: `docbook-to-man manpage.sgml | nroff -man | + less'. A typical entry in a Makefile or Makefile.am is: + +manpage.1: manpage.sgml + docbook-to-man $< > $@ + + + The docbook-to-man binary is found in the docbook-to-man package. + Please remember that if you create the nroff version in one of the + debian/rules file targets (such as build), you will need to include + docbook-to-man in your Build-Depends control field. + + --> + + + FIRSTNAME"> + SURNAME"> + + December 29, 2008"> + + SECTION"> + rra@debian.org"> + + GENERIC-DH-MAKE-2008"> + + + Debian"> + GNU"> + GPL"> +]> + + + +
      + &dhemail; +
      + + &dhfirstname; + &dhsurname; + + + 2003 + &dhusername; + + &dhdate; +
      + + &dhucpackage; + + &dhsection; + + + &dhpackage; + + program to do something + + + + &dhpackage; + + + + + + + + DESCRIPTION + + This manual page documents briefly the + &dhpackage; and bar + commands. + + This manual page was written for the &debian; distribution + because the original program does not have a manual page. + Instead, it has documentation in the &gnu; + Info format; see below. + + &dhpackage; is a program that... + + + + OPTIONS + + These programs follow the usual &gnu; command line syntax, + with long options starting with two dashes (`-'). A summary of + options is included below. For a complete description, see the + Info files. + + + + + + + + Show summary of options. + + + + + + + + Show version of program. + + + + + + SEE ALSO + + bar (1), baz (1). + + The programs are documented fully by The Rise and + Fall of a Fooish Bar available via the + Info system. + + + AUTHOR + + This manual page was written by &dhusername; &dhemail; for + the &debian; system (but may be used by others). Permission is + granted to copy, distribute and/or modify this document under + the terms of the &gnu; General Public License, Version 2 any + later version published by the Free Software Foundation. + + + On Debian systems, the complete text of the GNU General Public + License can be found in /usr/share/common-licenses/GPL. + + + +
      + + + + diff --git a/t/recipes/checks/debian/changelog/generic-dh-make-2008/build-spec/debian/manpage.xml.ex b/t/recipes/checks/debian/changelog/generic-dh-make-2008/build-spec/debian/manpage.xml.ex new file mode 100644 index 0000000..2d01c6f --- /dev/null +++ b/t/recipes/checks/debian/changelog/generic-dh-make-2008/build-spec/debian/manpage.xml.ex @@ -0,0 +1,291 @@ + +.
      will be generated. You may view the +manual page with: nroff -man .
      | less'. A typical entry +in a Makefile or Makefile.am is: + +DB2MAN = /usr/share/sgml/docbook/stylesheet/xsl/nwalsh/manpages/docbook.xsl +XP = xsltproc -''-nonet -''-param man.charmap.use.subset "0" + +manpage.1: manpage.xml + $(XP) $(DB2MAN) $< + +The xsltproc binary is found in the xsltproc package. The XSL files are in +docbook-xsl. A description of the parameters you can use can be found in the +docbook-xsl-doc-* packages. Please remember that if you create the nroff +version in one of the debian/rules file targets (such as build), you will need +to include xsltproc and docbook-xsl in your Build-Depends control field. +Alternatively use the xmlto command/package. That will also automatically +pull in xsltproc and docbook-xsl. + +Notes for using docbook2x: docbook2x-man does not automatically create the +AUTHOR(S) and COPYRIGHT sections. In this case, please add them manually as + ... . + +To disable the automatic creation of the AUTHOR(S) and COPYRIGHT sections +read /usr/share/doc/docbook-xsl/doc/manpages/authors.html. This file can be +found in the docbook-xsl-doc-html package. + +Validation can be done using: `xmllint -''-noout -''-valid manpage.xml` + +General documentation about man-pages and man-page-formatting: +man(1), man(7), http://www.tldp.org/HOWTO/Man-Page/ + +--> + + + + + + + + + + + + + +]> + + + + &dhtitle; + &dhpackage; + + + &dhfirstname; + &dhsurname; + Wrote this manpage for the Debian system. +
      + &dhemail; +
      +
      +
      + + 2007 + &dhusername; + + + This manual page was written for the Debian system + (but may be used by others). + Permission is granted to copy, distribute and/or modify this + document under the terms of the GNU General Public License, + Version 2 or (at your option) any later version published by + the Free Software Foundation. + On Debian systems, the complete text of the GNU General Public + License can be found in + /usr/share/common-licenses/GPL. + +
      + + &dhucpackage; + &dhsection; + + + &dhpackage; + program to do something + + + + &dhpackage; + + + + + + + + + this + + + + + + + + this + that + + + + + &dhpackage; + + + + + + + + + + + + + + + + + + + DESCRIPTION + This manual page documents briefly the + &dhpackage; and bar + commands. + This manual page was written for the Debian distribution + because the original program does not have a manual page. + Instead, it has documentation in the GNU + info + 1 + format; see below. + &dhpackage; is a program that... + + + OPTIONS + The program follows the usual GNU command line syntax, + with long options starting with two dashes (`-'). A summary of + options is included below. For a complete description, see the + + info + 1 + files. + + + + + + + Does this and that. + + + + + + + Show summary of options. + + + + + + + Show version of program. + + + + + + FILES + + + /etc/foo.conf + + The system-wide configuration file to control the + behaviour of &dhpackage;. See + + foo.conf + 5 + for further details. + + + + ${HOME}/.foo.conf + + The per-user configuration file to control the + behaviour of &dhpackage;. See + + foo.conf + 5 + for further details. + + + + + + ENVIONMENT + + + FOO_CONF + + If used, the defined file is used as configuration + file (see also ). + + + + + + DIAGNOSTICS + The following diagnostics may be issued + on stderr: + + + Bad configuration file. Exiting. + + The configuration file seems to contain a broken configuration + line. Use the option, to get more info. + + + + + &dhpackage; provides some return codes, that can + be used in scripts: + + Code + Diagnostic + + 0 + Program exited successfully. + + + 1 + The configuration file seems to be broken. + + + + + + BUGS + The program is currently limited to only work + with the foobar library. + The upstreams BTS can be found + at . + + + SEE ALSO + + + bar + 1 + , + baz + 1 + , + foo.conf + 5 + + The programs are documented fully by The Rise and + Fall of a Fooish Bar available via the + info + 1 + system. + +
      + diff --git a/t/recipes/checks/debian/changelog/generic-dh-make-2008/build-spec/debian/menu.ex b/t/recipes/checks/debian/changelog/generic-dh-make-2008/build-spec/debian/menu.ex new file mode 100644 index 0000000..8a67e62 --- /dev/null +++ b/t/recipes/checks/debian/changelog/generic-dh-make-2008/build-spec/debian/menu.ex @@ -0,0 +1,2 @@ +?package(generic-dh-make-2008):needs="X11|text|vc|wm" section="Applications/see-menu-manual"\ + title="generic-dh-make-2008" command="/usr/bin/generic-dh-make-2008" diff --git a/t/recipes/checks/debian/changelog/generic-dh-make-2008/build-spec/debian/postinst.ex b/t/recipes/checks/debian/changelog/generic-dh-make-2008/build-spec/debian/postinst.ex new file mode 100644 index 0000000..b5f5ca7 --- /dev/null +++ b/t/recipes/checks/debian/changelog/generic-dh-make-2008/build-spec/debian/postinst.ex @@ -0,0 +1,41 @@ +#!/bin/sh +# postinst script for generic-dh-make-2008 +# +# see: dh_installdeb(1) + +set -e + +# summary of how this script can be called: +# * `configure' +# * `abort-upgrade' +# * `abort-remove' `in-favour' +# +# * `abort-remove' +# * `abort-deconfigure' `in-favour' +# `removing' +# +# for details, see http://www.debian.org/doc/debian-policy/ or +# the debian-policy package + + +case "$1" in + configure) + ;; + + abort-upgrade|abort-remove|abort-deconfigure) + ;; + + *) + echo "postinst called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# + +exit 0 + + diff --git a/t/recipes/checks/debian/changelog/generic-dh-make-2008/build-spec/debian/postrm.ex b/t/recipes/checks/debian/changelog/generic-dh-make-2008/build-spec/debian/postrm.ex new file mode 100644 index 0000000..1d8a18a --- /dev/null +++ b/t/recipes/checks/debian/changelog/generic-dh-make-2008/build-spec/debian/postrm.ex @@ -0,0 +1,39 @@ +#!/bin/sh +# postrm script for generic-dh-make-2008 +# +# see: dh_installdeb(1) + +set -e + +# summary of how this script can be called: +# * `remove' +# * `purge' +# * `upgrade' +# * `failed-upgrade' +# * `abort-install' +# * `abort-install' +# * `abort-upgrade' +# * `disappear' +# +# for details, see http://www.debian.org/doc/debian-policy/ or +# the debian-policy package + + +case "$1" in + purge|remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear) + ;; + + *) + echo "postrm called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# + +exit 0 + + diff --git a/t/recipes/checks/debian/changelog/generic-dh-make-2008/build-spec/debian/preinst.ex b/t/recipes/checks/debian/changelog/generic-dh-make-2008/build-spec/debian/preinst.ex new file mode 100644 index 0000000..3134ccf --- /dev/null +++ b/t/recipes/checks/debian/changelog/generic-dh-make-2008/build-spec/debian/preinst.ex @@ -0,0 +1,37 @@ +#!/bin/sh +# preinst script for generic-dh-make-2008 +# +# see: dh_installdeb(1) + +set -e + +# summary of how this script can be called: +# * `install' +# * `install' +# * `upgrade' +# * `abort-upgrade' +# for details, see http://www.debian.org/doc/debian-policy/ or +# the debian-policy package + + +case "$1" in + install|upgrade) + ;; + + abort-upgrade) + ;; + + *) + echo "preinst called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# + +exit 0 + + diff --git a/t/recipes/checks/debian/changelog/generic-dh-make-2008/build-spec/debian/prerm.ex b/t/recipes/checks/debian/changelog/generic-dh-make-2008/build-spec/debian/prerm.ex new file mode 100644 index 0000000..4e5dd3f --- /dev/null +++ b/t/recipes/checks/debian/changelog/generic-dh-make-2008/build-spec/debian/prerm.ex @@ -0,0 +1,40 @@ +#!/bin/sh +# prerm script for generic-dh-make-2008 +# +# see: dh_installdeb(1) + +set -e + +# summary of how this script can be called: +# * `remove' +# * `upgrade' +# * `failed-upgrade' +# * `remove' `in-favour' +# * `deconfigure' `in-favour' +# `removing' +# +# for details, see http://www.debian.org/doc/debian-policy/ or +# the debian-policy package + + +case "$1" in + remove|upgrade|deconfigure) + ;; + + failed-upgrade) + ;; + + *) + echo "prerm called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# + +exit 0 + + diff --git a/t/recipes/checks/debian/changelog/generic-dh-make-2008/build-spec/debian/rules b/t/recipes/checks/debian/changelog/generic-dh-make-2008/build-spec/debian/rules new file mode 100755 index 0000000..92aa2b1 --- /dev/null +++ b/t/recipes/checks/debian/changelog/generic-dh-make-2008/build-spec/debian/rules @@ -0,0 +1,91 @@ +#!/usr/bin/make -f +# -*- makefile -*- +# Sample debian/rules that uses debhelper. +# This file was originally written by Joey Hess and Craig Small. +# As a special exception, when this file is copied by dh-make into a +# dh-make output file, you may use that output file without restriction. +# This special exception was added by Craig Small in version 0.37 of dh-make. + +# Uncomment this to turn on verbose mode. +#export DH_VERBOSE=1 + + + + + +configure: configure-stamp +configure-stamp: + dh_testdir + # Add here commands to configure the package. + + touch configure-stamp + + +build: build-stamp + +build-stamp: configure-stamp + dh_testdir + + # Add here commands to compile the package. + $(MAKE) + #docbook-to-man debian/generic-dh-make-2008.sgml > generic-dh-make-2008.1 + + touch $@ + +clean: + dh_testdir + dh_testroot + rm -f build-stamp configure-stamp + + # Add here commands to clean up after the build process. + $(MAKE) clean + + dh_clean + +install: build + dh_testdir + dh_testroot + dh_clean -k + dh_installdirs + + # Add here commands to install the package into debian/generic-dh-make-2008. + $(MAKE) DESTDIR=$(CURDIR)/debian/generic-dh-make-2008 install + + +# Build architecture-independent files here. +binary-indep: build install +# We have nothing to do by default. + +# Build architecture-dependent files here. +binary-arch: build install + dh_testdir + dh_testroot + dh_installchangelogs + dh_installdocs + dh_installexamples +# dh_install +# dh_installmenu +# dh_installdebconf +# dh_installlogrotate +# dh_installemacsen +# dh_installpam +# dh_installmime +# dh_python +# dh_installinit +# dh_installcron +# dh_installinfo + dh_installman + dh_link + dh_strip + dh_compress + dh_fixperms +# dh_perl +# dh_makeshlibs + dh_installdeb + dh_shlibdeps + dh_gencontrol + dh_md5sums + dh_builddeb + +binary: binary-indep binary-arch +.PHONY: build clean binary-indep binary-arch binary install configure diff --git a/t/recipes/checks/debian/changelog/generic-dh-make-2008/build-spec/debian/watch.ex b/t/recipes/checks/debian/changelog/generic-dh-make-2008/build-spec/debian/watch.ex new file mode 100644 index 0000000..e62d18f --- /dev/null +++ b/t/recipes/checks/debian/changelog/generic-dh-make-2008/build-spec/debian/watch.ex @@ -0,0 +1,23 @@ +# Example watch control file for uscan +# Rename this file to "watch" and then you can run the "uscan" command +# to check for upstream updates and more. +# See uscan(1) for format + +# Compulsory line, this is a version 3 file +version=3 + +# Uncomment to examine a Webpage +# +#http://www.example.com/downloads.php generic-dh-make-2008-(.*)\.tar\.gz + +# Uncomment to examine a Webserver directory +#http://www.example.com/pub/generic-dh-make-2008-(.*)\.tar\.gz + +# Uncommment to examine a FTP server +#ftp://ftp.example.com/pub/generic-dh-make-2008-(.*)\.tar\.gz debian uupdate + +# Uncomment to find new files on sourceforge, for devscripts >= 2.9 +# http://sf.net/generic-dh-make-2008/generic-dh-make-2008-(.*)\.tar\.gz + +# Uncomment to find new files on GooglePages +# http://example.googlepages.com/foo.html generic-dh-make-2008-(.*)\.tar\.gz diff --git a/t/recipes/checks/debian/changelog/generic-dh-make-2008/build-spec/fill-values b/t/recipes/checks/debian/changelog/generic-dh-make-2008/build-spec/fill-values new file mode 100644 index 0000000..ef7a896 --- /dev/null +++ b/t/recipes/checks/debian/changelog/generic-dh-make-2008/build-spec/fill-values @@ -0,0 +1,7 @@ +Testname: generic-dh-make-2008 +Skeleton: upload-builder-only +Author: Russ Allbery +Package-Architecture: any +Dh-Compat-Level: 7 +Description: Generic dh_make template generated in 2008 +Default-Build-Depends: debhelper (>= [% $dh_compat_level %]~) diff --git a/t/recipes/checks/debian/changelog/generic-dh-make-2008/build-spec/orig/Makefile b/t/recipes/checks/debian/changelog/generic-dh-make-2008/build-spec/orig/Makefile new file mode 100644 index 0000000..4f762d8 --- /dev/null +++ b/t/recipes/checks/debian/changelog/generic-dh-make-2008/build-spec/orig/Makefile @@ -0,0 +1,4 @@ +# Stub Makefile that's just enough so that the default rules file doesn't +# error out. + +clean install: diff --git a/t/recipes/checks/debian/changelog/generic-dh-make-2008/build-spec/orig/README b/t/recipes/checks/debian/changelog/generic-dh-make-2008/build-spec/orig/README new file mode 100644 index 0000000..6a3c009 --- /dev/null +++ b/t/recipes/checks/debian/changelog/generic-dh-make-2008/build-spec/orig/README @@ -0,0 +1,13 @@ +dh_make 0.46 test +================= + +This is the results of running dh_make 0.46 on an upstream tarball +containing only this file. It's a useful test for the various dh_make +template and boilerplate tags, as well as many tags for ways of doing +things dh_make used to promote but are now deprecated or old debhelper +commands that are now deprecated. + +Please don't modify anything about the files in this package; instead, add +new tags as needed when Lintian adds new checks. This test case is +intended to continue to be a test of Lintian's handling of old and +template packages. diff --git a/t/recipes/checks/debian/changelog/generic-dh-make-2008/build-spec/pre-build.in b/t/recipes/checks/debian/changelog/generic-dh-make-2008/build-spec/pre-build.in new file mode 100755 index 0000000..bbdb5cb --- /dev/null +++ b/t/recipes/checks/debian/changelog/generic-dh-make-2008/build-spec/pre-build.in @@ -0,0 +1,5 @@ +#!/bin/sh + +# not using any templates, but dh_clean requires compat + +echo "[% $dh_compat_level %]" > "$1/debian/compat" diff --git a/t/recipes/checks/debian/changelog/generic-dh-make-2008/eval/desc b/t/recipes/checks/debian/changelog/generic-dh-make-2008/eval/desc new file mode 100644 index 0000000..ebf79a7 --- /dev/null +++ b/t/recipes/checks/debian/changelog/generic-dh-make-2008/eval/desc @@ -0,0 +1,4 @@ +Testname: generic-dh-make-2008 +Check: debian/changelog +See-Also: + Bug#497347 diff --git a/t/recipes/checks/debian/changelog/generic-dh-make-2008/eval/hints b/t/recipes/checks/debian/changelog/generic-dh-make-2008/eval/hints new file mode 100644 index 0000000..0d2065a --- /dev/null +++ b/t/recipes/checks/debian/changelog/generic-dh-make-2008/eval/hints @@ -0,0 +1,3 @@ +generic-dh-make-2008 (binary): wrong-bug-number-in-closes #nnnn [usr/share/doc/generic-dh-make-2008/changelog.Debian.gz:3] +generic-dh-make-2008 (binary): initial-upload-closes-no-bugs [usr/share/doc/generic-dh-make-2008/changelog.Debian.gz:1] +generic-dh-make-2008 (binary): changelog-is-dh_make-template [usr/share/doc/generic-dh-make-2008/changelog.Debian.gz:1] diff --git a/t/recipes/checks/debian/changelog/generic-dh-make-2008/eval/post-test b/t/recipes/checks/debian/changelog/generic-dh-make-2008/eval/post-test new file mode 100644 index 0000000..faeef0b --- /dev/null +++ b/t/recipes/checks/debian/changelog/generic-dh-make-2008/eval/post-test @@ -0,0 +1 @@ +s/\(current is ([0-9]+\.)+[0-9]\)/(current is CURRENT)/ diff --git a/t/recipes/checks/debian/changelog/legacy-binary/build-spec/debian/NEWS.Debian b/t/recipes/checks/debian/changelog/legacy-binary/build-spec/debian/NEWS.Debian new file mode 100644 index 0000000..945632a --- /dev/null +++ b/t/recipes/checks/debian/changelog/legacy-binary/build-spec/debian/NEWS.Debian @@ -0,0 +1,12 @@ +binary (4-1.1) UNRELEASED; urgency=high + + This is a Debian NEWS entry that isn't encoded properly in UTF-8: ü. + It also has a usefull speling error. + + -- Russ Allbery Sun, 14 Oct 2007 17:11:36 -0700 + +binary (1) unstable; urgency=low + + This is another entry but this one isn't syntactically valid. + + -- Russ Allbery 2007-10-14 diff --git a/t/recipes/checks/debian/changelog/legacy-binary/build-spec/debian/README.Debian b/t/recipes/checks/debian/changelog/legacy-binary/build-spec/debian/README.Debian new file mode 100644 index 0000000..94bcc0a --- /dev/null +++ b/t/recipes/checks/debian/changelog/legacy-binary/build-spec/debian/README.Debian @@ -0,0 +1,5 @@ +this is a binary package to test lintian's handling of bins. +Check handling of D-Bus and dbus (neither of which should produce +warnings). + + -- Russ Allbery , Wed, 6 Feb 2008 18:35:11 -0800 diff --git a/t/recipes/checks/debian/changelog/legacy-binary/build-spec/debian/changelog.in b/t/recipes/checks/debian/changelog/legacy-binary/build-spec/debian/changelog.in new file mode 100644 index 0000000..39301d6 --- /dev/null +++ b/t/recipes/checks/debian/changelog/legacy-binary/build-spec/debian/changelog.in @@ -0,0 +1,47 @@ +binary ([% $version %]) [% $distribution %]; urgency=low + + * I'm doing an comaintainer-upload, acknowledging a NMU, but with a version + number which suggests I'm doing a NMU myself. + + Lintian-maintainers: Please don't update this changelog, otherwise you'll + probably break the checks/nmu checks. + + -- Jeroen van Wolffelaar Sun, 18 Apr 2004 01:49:42 +0200 + +binary (4-1) unstable; urgency=low + + * Weird version number for the new check for accidents with native + packaging. + * Date was fixed by BR and this test was put on changelog-file-strange-date + due to dpkg bug, see #794674. + + -- Marc 'HE' Brockschmidt Thu, 15 Apr 2004 23:33:51 +0200 + +binary (4) unstable; urgency=low + + * Add big file to /usr/share to trigger the big-usr-share check + + -- Jeroen van Wolffelaar Fri, 27 Feb 2004 10:15:59 +0100 + +binary (3) unstable; urgency=unlimited + + * Add some bogus menu entries using su-to-root in a bogus way + + -- Jeroen van Wolffelaar Thu, 12 Feb 2004 20:11:22 +0100 + +binary (2) unstable; urgency=low + + * Added an INSTALL document which policy 6.3 suggests not to do + + -- Sean 'Shaleh' Perry Tue, 30 Jan 2001 15:23:59 -0800 + +binary (1) unstable; urgency=low + + * hello.c added + * hello-static is same as hello, but compiled statically + * added a menu entry which lacks a Section + * added a postinst + * postinst calls suidregister which is no longer policy compliant + + -- Sean 'Shaleh' Perry Wed, 10 Jan 2001 08:55:34 -0800 + diff --git a/t/recipes/checks/debian/changelog/legacy-binary/build-spec/debian/conffiles b/t/recipes/checks/debian/changelog/legacy-binary/build-spec/debian/conffiles new file mode 100644 index 0000000..d1a0843 --- /dev/null +++ b/t/recipes/checks/debian/changelog/legacy-binary/build-spec/debian/conffiles @@ -0,0 +1 @@ +/etc/menu-methods/lintian diff --git a/t/recipes/checks/debian/changelog/legacy-binary/build-spec/debian/control b/t/recipes/checks/debian/changelog/legacy-binary/build-spec/debian/control new file mode 100644 index 0000000..c797357 --- /dev/null +++ b/t/recipes/checks/debian/changelog/legacy-binary/build-spec/debian/control @@ -0,0 +1,42 @@ +Source: binary +Section: misc +Priority: optional +Maintainer: Lintian Maintainers +Uploaders: Co-maintainer one , Jeroen van Wolffelaar , Co-maintainer three +Standards-Version: 3.2.1 +Homepage: http://lintian.debian.org/ +Vcs-Svn: http://svn.wolffelaar.nl/lintian/trunk +XS-Vcs-Browser: http://svn.wolffelaar.nl/lintian/trunk +XS-Dm-Upload-Allowed: yes + +Package: binary +Architecture: any +Pre-Depends: ${shlibs:Depends}, xorg, binary-data (= ${source:Version}), libssl0.9.8 +Homepage: +Vcs-Svn: http://svn.wolffelaar.nl/lintian/trunk +Description: test handling of binary files + Regression test for lintian's handling of binary files for debian. This + is checked for picky spelling errors. + . + This package list [ subversion | gconf ] should not be flagged as a spelling + mistake. The spelling correction for dont should be correct. + . + Homepage: http://lintian.debian.org/ + +Package: binary-data +Architecture: all +Depends: binary (= ${source:Version}), libssl-not-openssl, + libssl0.9.8 | or-something-else +Description: test handling of binary relationships + Regression test for lintian's checking of package relationships between + arch:any and arch:all packages. + . + This mention of subversion should be flagged as a spelling mistake. + +#Package: binary-comment +#Architecture: space-almonds +#Depends: * +#Depends: * +#Description: test comment support +# Yes, comments are actually allowed in debian/control, so none of the +# above should produce errors. diff --git a/t/recipes/checks/debian/changelog/legacy-binary/build-spec/debian/copyright b/t/recipes/checks/debian/changelog/legacy-binary/build-spec/debian/copyright new file mode 100644 index 0000000..1d6806d --- /dev/null +++ b/t/recipes/checks/debian/changelog/legacy-binary/build-spec/debian/copyright @@ -0,0 +1,15 @@ +hello.c is released under public domain. This is distributed in the hope that +it will be useful, but without any warranty; without even the implied warranty +of merchantability or fitness for a particular purpose. + +A reference to /usr/share/common-licenses/GPL-2 to make it look like this +package is under the GPL and trigger the OpenSSL warning. + +Test for old FSF address: + +Free Software Foundation, Inc., 59 Temple Place - Suite 330, +Boston, MA 02111-1307, USA. + +Test for deprecated ntionl ncoding. + +Improper capitalization of linux or debian isn't caught here. diff --git a/t/recipes/checks/debian/changelog/legacy-binary/build-spec/debian/doc-base b/t/recipes/checks/debian/changelog/legacy-binary/build-spec/debian/doc-base new file mode 100644 index 0000000..7e5b38f --- /dev/null +++ b/t/recipes/checks/debian/changelog/legacy-binary/build-spec/debian/doc-base @@ -0,0 +1,41 @@ +Document: binary!docs +Title: Broken debian binary doc-base control file +Author: Russ Allbery +Abstract: This control file exercises various tests of doc-base control + files, including several things that aren't tested yet. The third and + fourth one has trailing whitespace. + . + This section has a speling error and bad character. + . + The above separator was fine. +Section: Non/Existant +Unknown: Some field + + + +Format: debiandoc-sgML +Files: /usr/share/doc/binary/binary.sgml.gz +Unknown: Some field + +Format: ESP +Index: /usr/share/doc/binary/binary.txt + +Index: /usr/share/doc/binary/html/index.html + /usr/share/doc/binary/html/ch1.html + /usr/share/doc/binary/html/ch4.html + + +Format: HTML +Index: /usr/share/doc/binary/html/index.html +Files: /usr/share/doc/binary/html/ch?.h*l + /usr/share/doc/binary/hml/*.html + +Format: inFO +Files: /usr/share/info/binary.info.gz + +Format: HTML +Index: /usr/share/doc/binary/html/index.html +Files: /usr/share/doc/binary/html/ch5.html + /usr/share/doc/binary/html/ch6.html + + diff --git a/t/recipes/checks/debian/changelog/legacy-binary/build-spec/debian/goodbye.desktop b/t/recipes/checks/debian/changelog/legacy-binary/build-spec/debian/goodbye.desktop new file mode 100644 index 0000000..f6ce8e3 --- /dev/null +++ b/t/recipes/checks/debian/changelog/legacy-binary/build-spec/debian/goodbye.desktop @@ -0,0 +1,13 @@ +[Desktop Entry] +Name:Goodbye +# Name=Goodbye +Comment=Say hello! +SpecialTag=This doesn't exist! +Exec=goodbye +icon=hello +Terminal=true +Type=Application +Categories=WeirdStuff;Screensaver; +Encoding=ISO-10646-1 +[Other Entry] +Name=Goodbye diff --git a/t/recipes/checks/debian/changelog/legacy-binary/build-spec/debian/hello.desktop b/t/recipes/checks/debian/changelog/legacy-binary/build-spec/debian/hello.desktop new file mode 100644 index 0000000..f795468 --- /dev/null +++ b/t/recipes/checks/debian/changelog/legacy-binary/build-spec/debian/hello.desktop @@ -0,0 +1,14 @@ +# some random comment + +# [Foo Bar] +[KDE Desktop Entry] +Name=Hello +Name[en_US]=Hello +Comment=Say hello! +Exec=kdesu hello +Icon=hello +Terminal=true +Type=Application +Categories=GNOME;GTK;System;Applet;X-Foo;Settings; +Encoding=UTF-8 +OnlyShowIn=GNOME; diff --git a/t/recipes/checks/debian/changelog/legacy-binary/build-spec/debian/menu b/t/recipes/checks/debian/changelog/legacy-binary/build-spec/debian/menu new file mode 100644 index 0000000..e8972f4 --- /dev/null +++ b/t/recipes/checks/debian/changelog/legacy-binary/build-spec/debian/menu @@ -0,0 +1,26 @@ +?package(binary):needs=text title="Hello World" command="/usr/bin/hello" +?package(binary):needs=text section="Applications/System" title="Run cfdisk (0)" command="/usr/bin/su-to-root cfdisk" +?package(binary):needs="text" section="Applications/System/Hardware" title="Run cfdisk (1)" command="sux -p cfdisk" +?package(binary):needs="x11" section="Window Managers" title="Run xfdisk" command="/usr/sbin/su-to-root -c xfdisk" +?package(binary):needs="wm" section="Applications/System/Administration" title="Run fdisk-wm" command="su-to-root -c hello" +?package(binary):section="Apps/Games" title="I'm not root!" command="su-to-root -c imnothere" +?package(binary):needs="text" section="Apps/System" title="I'm not here!" command="/imnothere" +?package(binary,other-binary):\ + needs="text"\ + section="Applications/Shells"\ + title="more than one required"\ + command="other-bin -s omething" +?package(binary):needs="wmmodule" section="WindowManagers/Modules" title="somemodule" command="ModuleCmd" +?package(binary):needs="wmmodule" section="FVWM Modules" title="somemodule" command="ModuleCmd" +?package(binary):needs="text" section="Applications/System/Administration" title="I'm not in /usr/bin!" command="iminusrbin" +?package(binary):needs="text"\ + section="Applications/System/Administration"\ + title="I'm not root!" command="su-to-root -c imnothere" +?package(binary):needs="text" section="Applications/System/Administration"\ + title="Run cfdisk (0)" command="cfdisk" +?package(binary):needs="text" section="Applications/System/Administration" title="Hello World" command="/usr/bin/hello" +?package(binary):needs="wm" section="FVWM Modules" title="Fake Module" command="hello" +?package(binary):needs="fvwmmodule" section="Window Maker" title="Fake Module"\ + command="hello" +?package(binary):needs="x11" section="Applications/System/Hardware" title="Run xfdisk" command="su-to-root -c 'xfdisk -f'" +?package(binary):needs="text" section="Applications/System/Administration" title="foo" command="sh /path/to/foo" diff --git a/t/recipes/checks/debian/changelog/legacy-binary/build-spec/debian/menu-method b/t/recipes/checks/debian/changelog/legacy-binary/build-spec/debian/menu-method new file mode 100644 index 0000000..9f07bd7 --- /dev/null +++ b/t/recipes/checks/debian/changelog/legacy-binary/build-spec/debian/menu-method @@ -0,0 +1,22 @@ +#!/usr/bin/install-menu + +# -*- mode: shell-script; -*- +#I need menu-1! +# + +!include notmenu.h + +compat="menu-2" + +outputencoding="UTF-8"; +outputlanguage="C"; + +x11 = AppEntry("false"); +text = AppEntry("true"); + +startmenu = ""; +endmenu = ""; +submenutitle = ""; +rootprefix = "/var/lib/lintian/menu"; +userprefix = ".local/share/lintian/menu"; + diff --git a/t/recipes/checks/debian/changelog/legacy-binary/build-spec/debian/postinst b/t/recipes/checks/debian/changelog/legacy-binary/build-spec/debian/postinst new file mode 100644 index 0000000..29e1861 --- /dev/null +++ b/t/recipes/checks/debian/changelog/legacy-binary/build-spec/debian/postinst @@ -0,0 +1,6 @@ +#! /bin/bash -e + +if [ $1 eq 'configure' ] +then + suidregister hello-static root root 4755 +fi diff --git a/t/recipes/checks/debian/changelog/legacy-binary/build-spec/debian/rules b/t/recipes/checks/debian/changelog/legacy-binary/build-spec/debian/rules new file mode 100755 index 0000000..a962ea9 --- /dev/null +++ b/t/recipes/checks/debian/changelog/legacy-binary/build-spec/debian/rules @@ -0,0 +1,92 @@ +#!/usr/bin/make -f + +tmp=debian/tmp + +# This reference to $(PWD) should not cause an error but the one below +# should. +build-arch: + make + echo $(PWD) + +build: build-arch + +clean: + make -i clean + [ ! -f debian/files ] || rm -f debian/files + [ ! -f debian/substvars ] || rm -f debian/substvars + [ ! -d debian/tmp ] || rm -rf debian/tmp + [ ! -d debian/binary ] || rm -rf debian/binary + [ ! -d debian/binary-data ] || rm -rf debian/binary-data + +binary-arch: build + install -d $(tmp)/usr/bin + install -d $(tmp)/boot/hello + install -m 755 hello $(tmp)/usr/bin + touch $(tmp)/usr/bin/iminusrbin + chmod 755 $(tmp)/usr/bin/iminusrbin + install -m 755 hello-static $(tmp)/usr/bin + strip $(tmp)/usr/bin/hello-static + install -m 755 hello-static $(tmp)/usr/bin/hello.static + strip --remove-section=.comment --remove-section=.note $(tmp)/usr/bin/hello.static + ln $(tmp)/usr/bin/hello.static $(tmp)/usr/bin/static-hello + install -m 755 hello-static $(tmp)/boot/hello + strip --remove-section=.comment --remove-section=.note $(tmp)/boot/hello/hello-static + install -d $(tmp)/usr/share/doc/binary + install -m 644 INSTALL $(tmp)/usr/share/doc/binary + install -d $(tmp)/usr/share/doc/binary/html + echo '' > $(tmp)/usr/share/doc/binary/html/index.html + echo '' > $(tmp)/usr/share/doc/binary/html/ch1.html + ln -s ../html/./ch1.html $(tmp)/usr/share/doc/binary/html/ch2.html + ln -s /usr/share/doc/binary/htm/ch1.html $(tmp)/usr/share/doc/binary/html/ch3.html + echo '' > $(tmp)/usr/share/doc/binary/html/ch5.html + ln $(tmp)/usr/share/doc/binary/html/ch5.html \ + $(tmp)/usr/share/doc/binary/html/ch6.html + install -d $(tmp)/usr/share/menu + install -d $(tmp)/usr/lib/menu + install -d $(tmp)/usr/share/binary + install -m 644 debian/menu $(tmp)/usr/share/menu/binary + install -m 644 debian/menu $(tmp)/usr/lib/menu/binary + install -d $(tmp)/etc/menu-methods + install -m 755 debian/menu-method $(tmp)/etc/menu-methods/lintian + install -d $(tmp)/usr/share/doc-base + install -m 644 debian/doc-base $(tmp)/usr/share/doc-base/binary + touch '$(tmp)/usr/share/doc-base/space ' + install -m 644 debian/README.Debian $(tmp)/usr/share/doc/binary + install -m 644 debian/NEWS.Debian $(tmp)/usr/share/doc/binary + gzip -n -9 $(tmp)/usr/share/doc/binary/NEWS.Debian + install -m 644 debian/copyright $(tmp)/usr/share/doc/binary + install -m 644 debian/changelog $(tmp)/usr/share/doc/binary + #gzip -n -9 $(tmp)/usr/share/doc/binary/changelog + install -d $(tmp)/DEBIAN + install -m 755 debian/postinst $(tmp)/DEBIAN + install -m 644 debian/conffiles $(tmp)/DEBIAN + + install -d $(tmp)/usr/share/applications + install -m 644 debian/hello.desktop \ + $(tmp)/usr/share/applications/hello.desktop + install -m 755 debian/goodbye.desktop \ + $(tmp)/usr/share/applications/goodbye.desktop + + # should be ok... + echo boe > $(tmp)/usr/bar + ln $(tmp)/usr/bar $(tmp)/usr/foo + # but this isn't + echo boe > $(tmp)/usr/bar2 + ln $(tmp)/usr/bar2 $(tmp)/usr/share/baz + + dd if=/dev/zero of=$(tmp)/usr/share/binary/largefile bs=1024 count=4000 + + install -d debian/binary-data/DEBIAN + install -d debian/binary-data/usr/share/doc + ln -s binary debian/binary-data/usr/share/doc/binary-data + + dpkg-shlibdeps $(tmp)/usr/bin/hello + dpkg-gencontrol -pbinary -isp + dpkg-gencontrol -pbinary-data -Pdebian/binary-data -isp + + dpkg --build debian/tmp .. + dpkg --build debian/binary-data .. + +binary: binary-arch + +.PHONY: build-arch build binary-arch binary clean diff --git a/t/recipes/checks/debian/changelog/legacy-binary/build-spec/debian/templates b/t/recipes/checks/debian/changelog/legacy-binary/build-spec/debian/templates new file mode 100644 index 0000000..3d92861 --- /dev/null +++ b/t/recipes/checks/debian/changelog/legacy-binary/build-spec/debian/templates @@ -0,0 +1,16 @@ +# The debconf templates defined here are the sort that you'd use if +# providing a wordlist and an ispell dictionary for the language +# "perl". This shouldn't trigger warnings about not using debconf-po. + +Template: shared/packages-ispell +Type: text +Description: + +Template: shared/packages-wordlist +Type: text +Description: + +Template: miscfiles/languages +Type: text +Default: perl (Pathologically Eclectic Rubbish Lister) +Description: diff --git a/t/recipes/checks/debian/changelog/legacy-binary/build-spec/fill-values b/t/recipes/checks/debian/changelog/legacy-binary/build-spec/fill-values new file mode 100644 index 0000000..b503871 --- /dev/null +++ b/t/recipes/checks/debian/changelog/legacy-binary/build-spec/fill-values @@ -0,0 +1,5 @@ +Skeleton: upload-non-native +Testname: legacy-binary +Source: binary +Version: 4-1.1 +Description: Legacy test "binary" diff --git a/t/recipes/checks/debian/changelog/legacy-binary/build-spec/orig/INSTALL b/t/recipes/checks/debian/changelog/legacy-binary/build-spec/orig/INSTALL new file mode 100644 index 0000000..3b50ea9 --- /dev/null +++ b/t/recipes/checks/debian/changelog/legacy-binary/build-spec/orig/INSTALL @@ -0,0 +1,176 @@ +Basic Installation +================== + + These are generic installation instructions. + + The `configure' shell script attempts to guess correct values for +various system-dependent variables used during compilation. It uses +those values to create a `Makefile' in each directory of the package. +It may also create one or more `.h' files containing system-dependent +definitions. Finally, it creates a shell script `config.status' that +you can run in the future to recreate the current configuration, a file +`config.cache' that saves the results of its tests to speed up +reconfiguring, and a file `config.log' containing compiler output +(useful mainly for debugging `configure'). + + If you need to do unusual things to compile the package, please try +to figure out how `configure' could check whether to do them, and mail +diffs or instructions to the address given in the `README' so they can +be considered for the next release. If at some point `config.cache' +contains results you don't want to keep, you may remove or edit it. + + The file `configure.in' is used to create `configure' by a program +called `autoconf'. You only need `configure.in' if you want to change +it or regenerate `configure' using a newer version of `autoconf'. + +The simplest way to compile this package is: + + 1. `cd' to the directory containing the package's source code and type + `./configure' to configure the package for your system. If you're + using `csh' on an old version of System V, you might need to type + `sh ./configure' instead to prevent `csh' from trying to execute + `configure' itself. + + Running `configure' takes a while. While running, it prints some + messages telling which features it is checking for. + + 2. Type `make' to compile the package. + + 3. Optionally, type `make check' to run any self-tests that come with + the package. + + 4. Type `make install' to install the programs and any data files and + documentation. + + 5. You can remove the program binaries and object files from the + source code directory by typing `make clean'. To also remove the + files that `configure' created (so you can compile the package for + a different kind of computer), type `make distclean'. There is + also a `make maintainer-clean' target, but that is intended mainly + for the package's developers. If you use it, you may have to get + all sorts of other programs in order to regenerate files that came + with the distribution. + +Compilers and Options +===================== + + Some systems require unusual options for compilation or linking that +the `configure' script does not know about. You can give `configure' +initial values for variables by setting them in the environment. Using +a Bourne-compatible shell, you can do that on the command line like +this: + CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure + +Or on systems that have the `env' program, you can do it like this: + env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure + +Compiling For Multiple Architectures +==================================== + + You can compile the package for more than one kind of computer at the +same time, by placing the object files for each architecture in their +own directory. To do this, you must use a version of `make' that +supports the `VPATH' variable, such as GNU `make'. `cd' to the +directory where you want the object files and executables to go and run +the `configure' script. `configure' automatically checks for the +source code in the directory that `configure' is in and in `..'. + + If you have to use a `make' that does not supports the `VPATH' +variable, you have to compile the package for one architecture at a time +in the source code directory. After you have installed the package for +one architecture, use `make distclean' before reconfiguring for another +architecture. + +Installation Names +================== + + By default, `make install' will install the package's files in +`/usr/local/bin', `/usr/local/man', etc. You can specify an +installation prefix other than `/usr/local' by giving `configure' the +option `--prefix=PATH'. + + You can specify separate installation prefixes for +architecture-specific files and architecture-independent files. If you +give `configure' the option `--exec-prefix=PATH', the package will use +PATH as the prefix for installing programs and libraries. +Documentation and other data files will still use the regular prefix. + + If the package supports it, you can cause programs to be installed +with an extra prefix or suffix on their names by giving `configure' the +option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. + +Optional Features +================= + + Some packages pay attention to `--enable-FEATURE' options to +`configure', where FEATURE indicates an optional part of the package. +They may also pay attention to `--with-PACKAGE' options, where PACKAGE +is something like `gnu-as' or `x' (for the X Window System). The +`README' should mention any `--enable-' and `--with-' options that the +package recognizes. + + For packages that use the X Window System, `configure' can usually +find the X include and library files automatically, but if it doesn't, +you can use the `configure' options `--x-includes=DIR' and +`--x-libraries=DIR' to specify their locations. + +Specifying the System Type +========================== + + There may be some features `configure' can not figure out +automatically, but needs to determine by the type of host the package +will run on. Usually `configure' can figure that out, but if it prints +a message saying it can not guess the host type, give it the +`--host=TYPE' option. TYPE can either be a short name for the system +type, such as `sun4', or a canonical name with three fields: + CPU-COMPANY-SYSTEM + +See the file `config.sub' for the possible values of each field. If +`config.sub' isn't included in this package, then this package doesn't +need to know the host type. + + If you are building compiler tools for cross-compiling, you can also +use the `--target=TYPE' option to select the type of system they will +produce code for and the `--build=TYPE' option to select the type of +system on which you are compiling the package. + +Sharing Defaults +================ + + If you want to set default values for `configure' scripts to share, +you can create a site shell script called `config.site' that gives +default values for variables like `CC', `cache_file', and `prefix'. +`configure' looks for `PREFIX/share/config.site' if it exists, then +`PREFIX/etc/config.site' if it exists. Or, you can set the +`CONFIG_SITE' environment variable to the location of the site script. +A warning: not all `configure' scripts look for a site script. + +Operation Controls +================== + + `configure' recognizes the following options to control how it +operates. + +`--cache-file=FILE' + Use and save the results of the tests in FILE instead of + `./config.cache'. Set FILE to `/dev/null' to disable caching, for + debugging `configure'. + +`--help' + Print a summary of the options to `configure', and exit. + +`--quiet' +`--silent' +`-q' + Do not print messages saying which checks are being made. + +`--srcdir=DIR' + Look for the package's source code in directory DIR. Usually + `configure' can determine that directory automatically. + +`--version' + Print the version of Autoconf used to generate the `configure' + script, and exit. + +`configure' also accepts some other, not widely useful, options. + diff --git a/t/recipes/checks/debian/changelog/legacy-binary/build-spec/orig/Makefile b/t/recipes/checks/debian/changelog/legacy-binary/build-spec/orig/Makefile new file mode 100644 index 0000000..da1dc55 --- /dev/null +++ b/t/recipes/checks/debian/changelog/legacy-binary/build-spec/orig/Makefile @@ -0,0 +1,12 @@ +all: hello hello-static + +hello: hello.c + gcc hello.c -o hello + +hello-static: hello.c + gcc -static hello.c -o hello-static + +clean: + rm -f hello hello-static + +distclean: clean diff --git a/t/recipes/checks/debian/changelog/legacy-binary/build-spec/orig/hello.c b/t/recipes/checks/debian/changelog/legacy-binary/build-spec/orig/hello.c new file mode 100644 index 0000000..2fb04e1 --- /dev/null +++ b/t/recipes/checks/debian/changelog/legacy-binary/build-spec/orig/hello.c @@ -0,0 +1,8 @@ +#include +#include + +int main(int argc, char *argv[]) { + + printf("Hello, World!\n"); + exit(0); +} diff --git a/t/recipes/checks/debian/changelog/legacy-binary/eval/desc b/t/recipes/checks/debian/changelog/legacy-binary/eval/desc new file mode 100644 index 0000000..dcf46fa --- /dev/null +++ b/t/recipes/checks/debian/changelog/legacy-binary/eval/desc @@ -0,0 +1,2 @@ +Testname: legacy-binary +Check: debian/changelog diff --git a/t/recipes/checks/debian/changelog/legacy-binary/eval/hints b/t/recipes/checks/debian/changelog/legacy-binary/eval/hints new file mode 100644 index 0000000..c634eb0 --- /dev/null +++ b/t/recipes/checks/debian/changelog/legacy-binary/eval/hints @@ -0,0 +1,9 @@ +binary (binary): syntax-error-in-debian-news-file "found eof where expected more change data or trailer" [usr/share/doc/binary/NEWS.Debian.gz:13] +binary (binary): syntax-error-in-debian-news-file "badly formatted trailer line" [usr/share/doc/binary/NEWS.Debian.gz:12] +binary (binary): spelling-error-in-news-debian usefull useful [usr/share/doc/binary/NEWS.Debian.gz] +binary (binary): spelling-error-in-news-debian speling spelling [usr/share/doc/binary/NEWS.Debian.gz] +binary (binary): debian-news-entry-has-strange-distribution UNRELEASED [usr/share/doc/binary/NEWS.Debian.gz:1] +binary (binary): debian-changelog-file-missing-or-wrong-name +binary (binary): changelog-news-debian-mismatch Urgency low != high [usr/share/doc/binary/NEWS.Debian.gz:1] +binary (binary): changelog-news-debian-mismatch Distribution unstable != UNRELEASED [usr/share/doc/binary/NEWS.Debian.gz:1] +binary (binary): changelog-file-not-compressed [usr/share/doc/binary/changelog] diff --git a/t/recipes/checks/debian/changelog/legacy-binary/eval/post-test b/t/recipes/checks/debian/changelog/legacy-binary/eval/post-test new file mode 100644 index 0000000..3deefd5 --- /dev/null +++ b/t/recipes/checks/debian/changelog/legacy-binary/eval/post-test @@ -0,0 +1,3 @@ +s/arch-dep-package-has-big-usr-share .*kB .*%/arch-dep-package-has-big-usr-share/ +/: hardening-.*/ d +s/\(current is ([0-9]+\.)+[0-9]\)/(current is CURRENT)/ diff --git a/t/recipes/checks/debian/changelog/legacy-etcfiles/build-spec/debian/README.Debian b/t/recipes/checks/debian/changelog/legacy-etcfiles/build-spec/debian/README.Debian new file mode 100644 index 0000000..e289bfb --- /dev/null +++ b/t/recipes/checks/debian/changelog/legacy-etcfiles/build-spec/debian/README.Debian @@ -0,0 +1,5 @@ +this is a package to test lintian's handling of files in /etc. +Also, there's a random mention of /usr/doc here to prompt a warning. +But /usr/documentation doesn't. + + -- Russ Allbery , Mon, 18 Feb 2008 16:40:55 -0800 diff --git a/t/recipes/checks/debian/changelog/legacy-etcfiles/build-spec/debian/changelog.in b/t/recipes/checks/debian/changelog/legacy-etcfiles/build-spec/debian/changelog.in new file mode 100644 index 0000000..00cdc77 --- /dev/null +++ b/t/recipes/checks/debian/changelog/legacy-etcfiles/build-spec/debian/changelog.in @@ -0,0 +1,7 @@ +etcfiles ([% $version %]) [% $distribution %]; urgency=low + + * Acknowledge NMU (Closes: #123456). + * initial setup + + -- Lintian Maintainers Fri, 21 Sep 2001 11:56:02 -0700 + diff --git a/t/recipes/checks/debian/changelog/legacy-etcfiles/build-spec/debian/conffiles b/t/recipes/checks/debian/changelog/legacy-etcfiles/build-spec/debian/conffiles new file mode 100644 index 0000000..76032b7 --- /dev/null +++ b/t/recipes/checks/debian/changelog/legacy-etcfiles/build-spec/debian/conffiles @@ -0,0 +1,5 @@ +/etc/proper +/var/lib/foo +/etc/cron.daily/cronfile-normal +/etc/cron.daily/.cronfile-begins-with-fullstop +/etc/cron.daily/cronfile-contains.fullstop diff --git a/t/recipes/checks/debian/changelog/legacy-etcfiles/build-spec/debian/conffiles.only b/t/recipes/checks/debian/changelog/legacy-etcfiles/build-spec/debian/conffiles.only new file mode 100644 index 0000000..a4b3895 --- /dev/null +++ b/t/recipes/checks/debian/changelog/legacy-etcfiles/build-spec/debian/conffiles.only @@ -0,0 +1,2 @@ +/etc/etcfiles/foo +/etc/etcfiles/bar diff --git a/t/recipes/checks/debian/changelog/legacy-etcfiles/build-spec/debian/control b/t/recipes/checks/debian/changelog/legacy-etcfiles/build-spec/debian/control new file mode 100644 index 0000000..f3dbda7 --- /dev/null +++ b/t/recipes/checks/debian/changelog/legacy-etcfiles/build-spec/debian/control @@ -0,0 +1,20 @@ +Source: etcfiles +Section: misc +Priority: optional +Maintainer: Lintian Maintainers +Standards-Version: 3.5.0 + +Package: etcfiles +Architecture: any +Depends: ${shlibs:Depends} +Description: test handling of files in /etc + Regression test for lintian's handling of files in /etc. + . + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. + +Package: only-etcfiles +Architecture: all +Depends: etcfiles (= ${source:Version}) +Description: test handling of conffile-only package diff --git a/t/recipes/checks/debian/changelog/legacy-etcfiles/build-spec/debian/rules b/t/recipes/checks/debian/changelog/legacy-etcfiles/build-spec/debian/rules new file mode 100755 index 0000000..97ff09f --- /dev/null +++ b/t/recipes/checks/debian/changelog/legacy-etcfiles/build-spec/debian/rules @@ -0,0 +1,64 @@ +#!/usr/bin/make -f + +tmp=debian/tmp +tmponly=debian/only-etcfiles + +clean: + rm -f debian/files debian/substvars + rm -rf debian/tmp + rm -rf debian/only-etcfiles + +build: +build-arch: +build-indep: +binary-indep: + install -d $(tmp)/etc + install -m 644 proper $(tmp)/etc + install -m 644 improper $(tmp)/etc + mkdir $(tmp)/etc/cron.daily + touch $(tmp)/etc/cron.daily/cronfile-normal + touch $(tmp)/etc/cron.daily/.cronfile-begins-with-fullstop + touch $(tmp)/etc/cron.daily/cronfile-contains.fullstop + ln $(tmp)/etc/improper $(tmp)/etc/improper-link + install -d $(tmp)/usr/share/doc/etcfiles + install -d $(tmp)/var/lib + install -m 644 proper $(tmp)/var/lib/foo + install -m 644 debian/README.Debian $(tmp)/usr/share/doc/etcfiles + install -m 644 debian/changelog $(tmp)/usr/share/doc/etcfiles + #gzip -9 $(tmp)/usr/share/doc/etcfiles/changelog + install -d $(tmp)/DEBIAN + install -m 644 debian/conffiles $(tmp)/DEBIAN + + echo 'd41d8cd98f00b204e9800998ecf8427e ./etc/cron.daily/cronfile-normal' \ + > debian/tmp/DEBIAN/md5sums + echo 'd41d8cd98f00b204e9800998ecf8427e ./etc/cron.daily/.cronfile-begins-with-fullstop' \ + >> debian/tmp/DEBIAN/md5sums + echo 'd41d8cd98f00b204e9800998ecf8427e ./etc/cron.daily/cronfile-contains.fullstop' \ + >> debian/tmp/DEBIAN/md5sums + echo '05c72cacce994208128b7d081116b04a ./etc/proper' \ + >> debian/tmp/DEBIAN/md5sums + echo 'ab371382468880299e5ebd05921764ce etc/improper' \ + >> debian/tmp/DEBIAN/md5sums + echo 'ab371382468880299e5ebd05921764ce usr/bin/foo' \ + >> debian/tmp/DEBIAN/md5sums + echo 'this is a malformed line' \ + >> debian/tmp/DEBIAN/md5sums + echo '56fb27e455dd86d8801f1ecd3a4cee49 usr/share/doc/etcfiles/README.Debian' \ + >> debian/tmp/DEBIAN/md5sums + + install -d $(tmponly)/etc/etcfiles + touch $(tmponly)/etc/etcfiles/foo + touch $(tmponly)/etc/etcfiles/bar + install -d $(tmponly)/usr/share/doc + cd $(tmponly)/usr/share/doc && ln -s etcfiles only-etcfiles + install -d $(tmponly)/DEBIAN + install -m 644 debian/conffiles.only $(tmponly)/DEBIAN/conffiles + + dpkg-gencontrol -isp -petcfiles + dpkg-gencontrol -isp -ponly-etcfiles -P$(tmponly) + dpkg --build $(tmp) .. + dpkg --build $(tmponly) .. + +binary: binary-indep + +.PHONY: binary-indep binary clean diff --git a/t/recipes/checks/debian/changelog/legacy-etcfiles/build-spec/fill-values b/t/recipes/checks/debian/changelog/legacy-etcfiles/build-spec/fill-values new file mode 100644 index 0000000..86deb10 --- /dev/null +++ b/t/recipes/checks/debian/changelog/legacy-etcfiles/build-spec/fill-values @@ -0,0 +1,5 @@ +Skeleton: upload-native +Testname: legacy-etcfiles +Source: etcfiles +Version: 1 +Description: Legacy test "etcfiles" diff --git a/t/recipes/checks/debian/changelog/legacy-etcfiles/build-spec/orig/improper b/t/recipes/checks/debian/changelog/legacy-etcfiles/build-spec/orig/improper new file mode 100644 index 0000000..23656f4 --- /dev/null +++ b/t/recipes/checks/debian/changelog/legacy-etcfiles/build-spec/orig/improper @@ -0,0 +1,2 @@ +[config] + var = value \ No newline at end of file diff --git a/t/recipes/checks/debian/changelog/legacy-etcfiles/build-spec/orig/proper b/t/recipes/checks/debian/changelog/legacy-etcfiles/build-spec/orig/proper new file mode 100644 index 0000000..f3dc68b --- /dev/null +++ b/t/recipes/checks/debian/changelog/legacy-etcfiles/build-spec/orig/proper @@ -0,0 +1,2 @@ +# i am a config file +foo = var \ No newline at end of file diff --git a/t/recipes/checks/debian/changelog/legacy-etcfiles/eval/desc b/t/recipes/checks/debian/changelog/legacy-etcfiles/eval/desc new file mode 100644 index 0000000..9e1392d --- /dev/null +++ b/t/recipes/checks/debian/changelog/legacy-etcfiles/eval/desc @@ -0,0 +1,2 @@ +Testname: legacy-etcfiles +Check: debian/changelog diff --git a/t/recipes/checks/debian/changelog/legacy-etcfiles/eval/hints b/t/recipes/checks/debian/changelog/legacy-etcfiles/eval/hints new file mode 100644 index 0000000..49072d6 --- /dev/null +++ b/t/recipes/checks/debian/changelog/legacy-etcfiles/eval/hints @@ -0,0 +1 @@ +etcfiles (binary): changelog-file-not-compressed [usr/share/doc/etcfiles/changelog] diff --git a/t/recipes/checks/debian/changelog/legacy-etcfiles/eval/post-test b/t/recipes/checks/debian/changelog/legacy-etcfiles/eval/post-test new file mode 100644 index 0000000..faeef0b --- /dev/null +++ b/t/recipes/checks/debian/changelog/legacy-etcfiles/eval/post-test @@ -0,0 +1 @@ +s/\(current is ([0-9]+\.)+[0-9]\)/(current is CURRENT)/ diff --git a/t/recipes/checks/debian/changelog/legacy-fields/build-spec/debian/changelog.in b/t/recipes/checks/debian/changelog/legacy-fields/build-spec/debian/changelog.in new file mode 100644 index 0000000..38fc4e9 --- /dev/null +++ b/t/recipes/checks/debian/changelog/legacy-fields/build-spec/debian/changelog.in @@ -0,0 +1,10 @@ +fields ([% $version %]) [% $distribution %]; urgency=low + + * This package adds tests for the following tags: + - debian-revision-not-well-formed + - depends-on-python-minimal + - essential-no-not-needed + - debian-revision-should-not-be-zero + - new-essential-package + + -- Tobias Quathamer Sun, 10 Apr 2011 14:30:00 +0100 diff --git a/t/recipes/checks/debian/changelog/legacy-fields/build-spec/debian/control b/t/recipes/checks/debian/changelog/legacy-fields/build-spec/debian/control new file mode 100644 index 0000000..d980a6e --- /dev/null +++ b/t/recipes/checks/debian/changelog/legacy-fields/build-spec/debian/control @@ -0,0 +1,28 @@ +Source: fields +Section: does-not-exist +Priority: standard +Maintainer: Lintian Maintainers +Standards-Version: 3.9.2 + +Package: fields +Essential: no +Architecture: all +Depends: python-minimal +Description: Generate some errors + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. + +Package: another-version +Essential: yes +Section: admin +Architecture: all +Description: Also generate some errors + This package gets another version number and tries to sneak in a new + essential package. + . + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. diff --git a/t/recipes/checks/debian/changelog/legacy-fields/build-spec/debian/rules b/t/recipes/checks/debian/changelog/legacy-fields/build-spec/debian/rules new file mode 100755 index 0000000..11ad4a7 --- /dev/null +++ b/t/recipes/checks/debian/changelog/legacy-fields/build-spec/debian/rules @@ -0,0 +1,33 @@ +#!/usr/bin/make -f + +tmp=debian/tmp + +build-arch: + +build-indep: + +build: build-arch build-indep + +binary-arch: + +binary-indep: + install -d $(tmp)/usr/share/doc/fields + install -m 644 debian/changelog \ + $(tmp)/usr/share/doc/fields/changelog + gzip -n -9 $(tmp)/usr/share/doc/fields/changelog + dh_md5sums -pfields -P$(tmp) + dpkg-gencontrol -pfields -P$(tmp) + dpkg --build $(tmp) .. + rm -rf $(tmp) + + # Create another package with a different version + dh_md5sums -panother-version -P$(tmp) + dpkg-gencontrol -panother-version -v123.4-0 -P$(tmp) + dpkg --build $(tmp) .. + +binary: binary-arch binary-indep + +clean: + rm -rf debian/files $(tmp) debian/substvars + +.PHONY: build-arch build-indep build binary-arch binary-indep binary clean diff --git a/t/recipes/checks/debian/changelog/legacy-fields/build-spec/fill-values b/t/recipes/checks/debian/changelog/legacy-fields/build-spec/fill-values new file mode 100644 index 0000000..fe90eb0 --- /dev/null +++ b/t/recipes/checks/debian/changelog/legacy-fields/build-spec/fill-values @@ -0,0 +1,5 @@ +Skeleton: upload-non-native +Testname: legacy-fields +Source: fields +Version: 1.5-.3 +Description: Legacy test "fields" diff --git a/t/recipes/checks/debian/changelog/legacy-fields/eval/desc b/t/recipes/checks/debian/changelog/legacy-fields/eval/desc new file mode 100644 index 0000000..cdb6b18 --- /dev/null +++ b/t/recipes/checks/debian/changelog/legacy-fields/eval/desc @@ -0,0 +1,2 @@ +Testname: legacy-fields +Check: debian/changelog diff --git a/t/recipes/checks/debian/changelog/legacy-fields/eval/hints b/t/recipes/checks/debian/changelog/legacy-fields/eval/hints new file mode 100644 index 0000000..33e2889 --- /dev/null +++ b/t/recipes/checks/debian/changelog/legacy-fields/eval/hints @@ -0,0 +1,2 @@ +fields (binary): debian-changelog-file-missing-or-wrong-name +another-version (binary): no-changelog usr/share/doc/another-version/changelog.Debian.gz (non-native package) diff --git a/t/recipes/checks/debian/changelog/legacy-fields/eval/post-test b/t/recipes/checks/debian/changelog/legacy-fields/eval/post-test new file mode 100644 index 0000000..faeef0b --- /dev/null +++ b/t/recipes/checks/debian/changelog/legacy-fields/eval/post-test @@ -0,0 +1 @@ +s/\(current is ([0-9]+\.)+[0-9]\)/(current is CURRENT)/ diff --git a/t/recipes/checks/debian/changelog/legacy-filenames/build-spec/debian/changelog.in b/t/recipes/checks/debian/changelog/legacy-filenames/build-spec/debian/changelog.in new file mode 100644 index 0000000..b79c4ca --- /dev/null +++ b/t/recipes/checks/debian/changelog/legacy-filenames/build-spec/debian/changelog.in @@ -0,0 +1,78 @@ +filenames ([% $version %]) [% $distribution %]; urgency=low + + * /me is doing a correct NMU of this package, bumping the epoch too. + + -- Jeroen van Wolffelaar Sun, 18 Apr 2004 02:04:39 +0200 + +filenames (11) unstable; urgency=low + + * Add a README.macos. + + -- Marc 'HE' Brockschmidt Mon, 12 Apr 2004 23:35:24 +0200 + +filenames (10) unstable; urgency=low + + * Some new files to check the checks for the use of /usr/*/X11 and + /usr/X11R6/*. + + -- Marc 'HE' Brockschmidt Sun, 11 Apr 2004 17:35:20 +0200 + +filenames (9) unstable; urgency=low + + * Add a two *.ali files, one with the right permission, one with + the more common, but false one. + + -- Marc 'HE' Brockschmidt Sun, 11 Apr 2004 00:18:16 +0200 + +filenames (8) unstable; urgency=low + + * Add a real ancient file + + -- Frank Lichtenheld Thu, 8 Apr 2004 22:22:40 +0200 + +filenames (7) unstable; urgency=low + + * Add a dozen symlinks, some correct, some not + + -- Jeroen van Wolffelaar Fri, 27 Feb 2004 01:28:42 +0100 + +filenames (6) unstable; urgency=low + + * Add perl files to check if + package-installs-nonbinary-perl-in-usr-lib-perl5 is correctly + issued even after attempting to suppress it in some cases + + -- Frank Lichtenheld Fri, 27 Feb 2004 00:49:44 +0100 + +filenames (5) unstable; urgency=low + + * Added check for too long symlink + + -- Sean 'Shaleh' Perry Wed, 3 Jan 2001 13:20:31 -0800 + +filenames (4) unstable; urgency=low + + * Add /usr/lib/menu/menu file to test the bad-menu-file-name tag. + * Add /usr/lib/menu/README to test the new execption for it. + + -- Richard Braakman Thu, 22 Oct 1998 15:42:52 +0200 + +filenames (3) unstable; urgency=low + + * Don't rely on the installer's umask. + + -- Richard Braakman Thu, 20 Aug 1998 12:45:47 +0200 + +filenames (2) unstable; urgency=low + + * Noted more limitations on what filenames lintian handles. + * Added Changes.gz in /usr/doc/filenames and made a symlink from changelog.gz + to Changes.gz. + + -- Richard Braakman Sat, 4 Jul 1998 15:46:11 +0200 + +filenames (1) unstable; urgency=low + + * Initial version + + -- Richard Braakman Sat, 4 Jul 1998 15:25:01 +0200 diff --git a/t/recipes/checks/debian/changelog/legacy-filenames/build-spec/debian/control b/t/recipes/checks/debian/changelog/legacy-filenames/build-spec/debian/control new file mode 100644 index 0000000..1ff9c50 --- /dev/null +++ b/t/recipes/checks/debian/changelog/legacy-filenames/build-spec/debian/control @@ -0,0 +1,42 @@ +Source: filenames +Maintainer: Lintian Maintainer +Standards-Version: 3.1.1 +Rules-Requires-Root: binary-targets + +Package: filenames +Architecture: any +Description: see how lintian reacts to weird filenames + This package contains files with the most evil names I could find, + except for ones that lintian is explicitly not designed to handle. + . + Lintian does not handle filenames containing newlines, or filenames + that contain the strings " link to ", " -> ", or ": ". The last one + is used as a separator by the file command, the others are used as + separators by tar. + . + Lintian also does not handle filenames that contain backslashes, or + other characters that are mangled by tar's -tv output. + +Package: filename-games +Architecture: all +Depends: filenames +Section: games +Description: Test game filename/location checks + This package contains files with slightly less evil names than + filenames. + . + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. + +Package: more-filename-games +Architecture: all +Depends: filenames, filename-games +Section: games +Priority: optional +Description: More test for game filename/location checks + This package contains no evil names, only evil locations. + . + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. diff --git a/t/recipes/checks/debian/changelog/legacy-filenames/build-spec/debian/doc-base b/t/recipes/checks/debian/changelog/legacy-filenames/build-spec/debian/doc-base new file mode 100644 index 0000000..e5a611b --- /dev/null +++ b/t/recipes/checks/debian/changelog/legacy-filenames/build-spec/debian/doc-base @@ -0,0 +1,11 @@ +Document: testing +Title: Working doc-base control file +Author: Russ Allbery +Abstract: This control file ensures that we don't get false positives for + correct doc-base files. + . + There isn't anything wrong with this one. +Section: Education + +Format: Text +Files: /usr/share/doc/filenames/README.macosx diff --git a/t/recipes/checks/debian/changelog/legacy-filenames/build-spec/debian/rules b/t/recipes/checks/debian/changelog/legacy-filenames/build-spec/debian/rules new file mode 100755 index 0000000..0b9e87c --- /dev/null +++ b/t/recipes/checks/debian/changelog/legacy-filenames/build-spec/debian/rules @@ -0,0 +1,231 @@ +#!/usr/bin/make -f + +# Copyright (C) 1998 Richard Braakman +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +VENDORARCH := $(shell perl -MConfig -wE'say substr($$Config{vendorarch},1)') + +clean: + mkdir -p .svn CVS "{arch}" .arch-ids .bzr + touch data/.cvsignore data/svn-commit.tmp data/svk-commitsEr9P.tmp + touch data/.arch-inventory + touch 'data/.#Maelstrom Sound.1.1.1' 'data/Maelstrom Sounce.r121' + touch 'data/Maelstrom Sound.mine' + touch "data/'\\ " + touch filenames.c~ + +build-arch: + +build-indep: + +build: build-arch build-indep + + +binary-arch: + +binary-indep: + install -d debian/tmp/DEBIAN + cp -a data debian/tmp/files + chmod -R go=rX debian/tmp/files + + install -d debian/tmp/usr/lib/filenames + install -m 555 -d debian/tmp/usr/lib/filenames/readonly + touch debian/tmp/usr/lib/filenames/readonly/test + + install -d debian/tmp/usr/lib/menu + install -d debian/tmp/usr/share/menu + touch debian/tmp/usr/lib/menu/README + touch debian/tmp/usr/share/menu/README + touch debian/tmp/usr/lib/menu/menu + touch debian/tmp/usr/share/menu/menu + chmod 644 debian/tmp/usr/lib/menu/* + + install -d debian/tmp/$(VENDORARCH)/foo + mkdir debian/tmp/$(VENDORARCH)/.svn + mkdir debian/tmp/$(VENDORARCH)/CVS + mkdir "debian/tmp/$(VENDORARCH)/{arch}" + mkdir debian/tmp/$(VENDORARCH)/.arch-ids + mkdir debian/tmp/$(VENDORARCH)/.bzr + mkdir debian/tmp/$(VENDORARCH)/.be + mkdir debian/tmp/$(VENDORARCH)/.ditrack + install -d debian/tmp/usr/share/perl5 + echo foo > debian/tmp/$(VENDORARCH)/foo/.gitignore + echo foo > debian/tmp/$(VENDORARCH)/foo/.hgignore + echo foo > debian/tmp/$(VENDORARCH)/foo/.hgtags + echo foo > debian/tmp/$(VENDORARCH)/foo/.hg_archival.txt + + touch debian/tmp/$(VENDORARCH)/foo/.packlist + chmod 644 debian/tmp/$(VENDORARCH)/foo/.packlist + touch debian/tmp/$(VENDORARCH)/foo/bar.pm + TZ=UTC touch -t 197501010101 debian/tmp/$(VENDORARCH)/foo/ancient.pm + chmod 644 debian/tmp/$(VENDORARCH)/foo/bar.pm + + install -d debian/tmp/usr/share/pixmaps + install -d debian/tmp/usr/share/pixmaps/foo + touch debian/tmp/usr/share/pixmaps/license.jpeg + touch debian/tmp/usr/share/pixmaps/licence.jpg + touch debian/tmp/usr/share/pixmaps/copying.xpm + touch debian/tmp/usr/share/pixmaps/foo/COPYING.svg + touch debian/tmp/usr/share/pixmaps/foo/copying.png + touch debian/tmp/usr/share/pixmaps/license.txt + touch debian/tmp/usr/share/pixmaps/license.foo + touch debian/tmp/usr/share/pixmaps/COPYING + + install -d debian/tmp/usr/share/linda/overrides + echo 'foo' > debian/tmp/usr/share/linda/overrides/filenames + + install -d debian/tmp/usr/share/doc/filenames + touch debian/tmp/usr/share/doc/filenames/README.macosx + + echo foo > debian/tmp/usr/share/doc/filenames/bokmål + echo foo > debian/tmp/usr/share/doc/filenames/bokm\\ål + echo foo > debian/tmp/usr/share/doc/filenames/bokml + echo foo > debian/tmp/usr/share/doc/filenames/bokm\\l + + echo foo > debian/tmp/usr/share/doc/filenames/Thumbs.db + echo foo > debian/tmp/usr/share/doc/filenames/.DS_Store + echo foo > debian/tmp/usr/share/doc/filenames/._NEWS.Debian + + touch debian/tmp/usr/share/doc/filenames/news.debian + gzip -n debian/tmp/usr/share/doc/filenames/news.debian + touch debian/tmp/usr/share/doc/filenames/NEWS.Debian + + echo foo > debian/tmp/usr/share/doc/filenames/link-one + ln debian/tmp/usr/share/doc/filenames/link-one \ + debian/tmp/usr/share/doc/filenames/link-two + + install -d debian/tmp/usr/share/doc/filenames/examples + touch debian/tmp/usr/share/doc/filenames/examples/__init__.py + touch debian/tmp/usr/share/doc/filenames/examples/very_interesting_example + touch debian/tmp/usr/share/doc/filenames/examples/very_interesting_example2 + gzip -n debian/tmp/usr/share/doc/filenames/examples/very_interesting_example2 + + install -d debian/tmp/usr/lib/ada/adalib/ + touch debian/tmp/usr/lib/ada/adalib/test.ali debian/tmp/usr/lib/ada/adalib/test2.ali + chmod 0644 debian/tmp/usr/lib/ada/adalib/test.ali + chmod 0444 debian/tmp/usr/lib/ada/adalib/test2.ali + + install -d debian/tmp/usr/bin/X11/ + touch debian/tmp/usr/bin/X11/testxbin + install -d debian/tmp/usr/X11R6/bin + touch debian/tmp/usr/X11R6/bin/testxbin2 + install -d debian/tmp/usr/include/X11 + touch debian/tmp/usr/include/X11/foo.h + + install -d debian/tmp/usr/bin/mh + touch debian/tmp/usr/bin/mh/read + chmod 755 debian/tmp/usr/bin/mh/read + install -d debian/tmp/usr/bin/bin + touch debian/tmp/usr/bin/bin/bad + chmod 755 debian/tmp/usr/bin/bin/bad + + install -m 644 debian/changelog debian/tmp/usr/share/doc/filenames/Changes + gzip -n -9 debian/tmp/usr/share/doc/filenames/Changes + ln -s Changes.gz debian/tmp/usr/share/doc/filenames/changelog.gz + + install -d debian/tmp/var/www + echo foo > debian/tmp/var/www/foo + + install -d debian/tmp/srv/foo + touch debian/tmp/srv/foo/bar + install -d debian/tmp/opt/foo + touch debian/tmp/opt/foo/bar + + install -d debian/tmp/etc/gconf/schemas + touch debian/tmp/etc/gconf/schemas/test.schema + + install -d debian/tmp/usr/lib/sgml + touch debian/tmp/usr/lib/sgml/package + + install -d debian/tmp/usr/share/gnome/apps/System + touch debian/tmp/usr/share/gnome/apps/System/foo.desktop + + install -d debian/tmp/usr/share/filenames + touch debian/tmp/usr/share/filenames/jquery.js + touch debian/tmp/usr/share/filenames/jquery.lite.js + touch debian/tmp/usr/share/filenames/jquery.min.js + touch debian/tmp/usr/share/filenames/jquery.pack.js + touch debian/tmp/usr/share/filenames/mochikit.js + touch debian/tmp/usr/share/filenames/prototype-1.2.3.4.js + touch debian/tmp/usr/share/filenames/prototype.js + touch debian/tmp/usr/share/filenames/prototype.js.gz + touch debian/tmp/usr/share/filenames/scriptaculous.js + touch debian/tmp/usr/share/filenames/yahoo-dom-event.js + touch debian/tmp/usr/share/filenames/yahoo-min.js + + ln -s '../filenames/doc/version6.txt.gz' debian/tmp/usr/share/doc/filenames/version.txt.gz + ln -s ../../share/symlink debian/tmp/usr/lib/filenames/symlink1ok + ln -s ../../../etc/symlink debian/tmp/usr/lib/filenames/symlink1wrong + ln -s ../../../../etc/symlink debian/tmp/usr/lib/filenames/symlink2wrong + ln -s /etc/symlink debian/tmp/usr/lib/filenames/symlink2ok + ln -s /usr/lib/filenames/symlink2 debian/tmp/usr/lib/filenames/symlink3wrong + ln -s test debian/tmp/usr/lib/filenames/symlink3ok + ln -s ../filenames/symlink2 debian/tmp/usr/lib/filenames/symlink4wrong + ln -s ../menu/../somethingelse debian/tmp/usr/lib/filenames/symlink5wrong + ln -s ../menu/somethingelse debian/tmp/usr/lib/filenames/symlink4ok + ln -s ./file4 debian/tmp/usr/lib/filenames/symlink6wrong + ln -s ../menu/./something debian/tmp/usr/lib/filenames/symlink7wrong + ln -s ../menu//something debian/tmp/usr/lib/filenames/symlink8wrong + ln -s ../menu/something/ debian/tmp/usr/lib/filenames/symlink9wrong + ln -s .. debian/tmp/usr/lib/filenames/symlink5ok+warn + ln -s . debian/tmp/usr/lib/filenames/symlink6ok+warn + ln -s / debian/tmp/usr/lib/filenames/symlink7ok+warn + ln -s ../../.. debian/tmp/usr/lib/filenames/symlink10wrong + +# devhelp tests. Files in /usr/share/gtk-doc/html or /usr/share/devhelp/books +# are okay. Files elsewhere are okay iff their parent path is symlinked into +# one of those paths. + install -d debian/tmp/usr/share/devhelp/books/filenames + echo 'Not really XML' > debian/tmp/usr/share/devhelp/books/filenames/a.devhelp + echo 'Not really XML' > debian/tmp/usr/share/devhelp/books/filenames/.devhelp2 + gzip -n -9 debian/tmp/usr/share/devhelp/books/filenames/.devhelp2 + install -d debian/tmp/usr/share/gtk-doc/html/filenames + echo 'Not really XML' > debian/tmp/usr/share/gtk-doc/html/filenames/b.devhelp + gzip -n -9 debian/tmp/usr/share/gtk-doc/html/filenames/b.devhelp + install -d debian/tmp/usr/share/doc/filenames/good-devhelp + echo 'Not really XML' > debian/tmp/usr/share/doc/filenames/good-devhelp/.devhelp2 + install -d debian/tmp/usr/share/doc/filenames/bad-devhelp + echo 'Not really XML' > debian/tmp/usr/share/doc/filenames/bad-devhelp/c.devhelp + gzip -n -9 debian/tmp/usr/share/doc/filenames/bad-devhelp/c.devhelp + ln -s ../../doc/filenames/good-devhelp debian/tmp/usr/share/gtk-doc/html/good + ln -s ../doc/filenames/bad-devhelp debian/tmp/usr/share/gtk-doc/html/bad + + install -d debian/tmp/usr/share/doc-base + install -m 644 debian/doc-base debian/tmp/usr/share/doc-base/filenames + + dpkg-gencontrol -pfilenames -Pdebian/tmp + dpkg --build debian/tmp .. + + install -d debian/filename-games debian/filename-games/DEBIAN + install -d debian/filename-games/usr debian/filename-games/usr/games debian/filename-games/usr/bin + echo '#! /bin/sh' > debian/filename-games/usr/bin/test-game + chmod 755 debian/filename-games/usr/bin/test-game + dpkg-gencontrol -pfilename-games -Pdebian/filename-games + dpkg --build debian/filename-games .. + + install -d debian/more-filename-games debian/more-filename-games/DEBIAN + install -d debian/more-filename-games/usr debian/more-filename-games/usr/games debian/more-filename-games/usr/bin + echo '#! /bin/sh' > debian/more-filename-games/usr/bin/another-test-game + echo '#! /bin/sh' > debian/more-filename-games/usr/games/yet-another-test-game + chmod 755 debian/more-filename-games/usr/bin/another-test-game debian/more-filename-games/usr/games/yet-another-test-game + dpkg-gencontrol -pmore-filename-games -Pdebian/more-filename-games + dpkg --build debian/more-filename-games .. + +binary: binary-arch binary-indep + +.PHONY: build-indep build-arch build binary-arch binary-indep binary clean diff --git a/t/recipes/checks/debian/changelog/legacy-filenames/build-spec/fill-values b/t/recipes/checks/debian/changelog/legacy-filenames/build-spec/fill-values new file mode 100644 index 0000000..062a1ea --- /dev/null +++ b/t/recipes/checks/debian/changelog/legacy-filenames/build-spec/fill-values @@ -0,0 +1,5 @@ +Skeleton: upload-non-native +Testname: legacy-filenames +Source: filenames +Version: 1:12-0.1 +Description: Legacy test "filenames" diff --git a/t/recipes/checks/debian/changelog/legacy-filenames/build-spec/orig/data/ .tif b/t/recipes/checks/debian/changelog/legacy-filenames/build-spec/orig/data/ .tif new file mode 100644 index 0000000..07fd914 --- /dev/null +++ b/t/recipes/checks/debian/changelog/legacy-filenames/build-spec/orig/data/ .tif @@ -0,0 +1,2 @@ +This filename was inspired by the ".tif used by fnlib. The real package +uses space.tif. diff --git "a/t/recipes/checks/debian/changelog/legacy-filenames/build-spec/orig/data/\".tif" "b/t/recipes/checks/debian/changelog/legacy-filenames/build-spec/orig/data/\".tif" new file mode 100644 index 0000000..e005775 --- /dev/null +++ "b/t/recipes/checks/debian/changelog/legacy-filenames/build-spec/orig/data/\".tif" @@ -0,0 +1 @@ +This filename is really used, by fnlib. diff --git a/t/recipes/checks/debian/changelog/legacy-filenames/build-spec/orig/data/Maelstrom Sound b/t/recipes/checks/debian/changelog/legacy-filenames/build-spec/orig/data/Maelstrom Sound new file mode 100644 index 0000000..4110410 --- /dev/null +++ b/t/recipes/checks/debian/changelog/legacy-filenames/build-spec/orig/data/Maelstrom Sound @@ -0,0 +1 @@ +This filename occurs in the maelstrom package. diff --git a/t/recipes/checks/debian/changelog/legacy-filenames/eval/desc b/t/recipes/checks/debian/changelog/legacy-filenames/eval/desc new file mode 100644 index 0000000..b528ba4 --- /dev/null +++ b/t/recipes/checks/debian/changelog/legacy-filenames/eval/desc @@ -0,0 +1,3 @@ +Testname: legacy-filenames +Test-Against: epoch-change-without-comment +Check: debian/changelog diff --git a/t/recipes/checks/debian/changelog/legacy-filenames/eval/hints b/t/recipes/checks/debian/changelog/legacy-filenames/eval/hints new file mode 100644 index 0000000..7ff07b2 --- /dev/null +++ b/t/recipes/checks/debian/changelog/legacy-filenames/eval/hints @@ -0,0 +1,4 @@ +filenames (source): odd-historical-debian-changelog-version 11 (for non-native) [debian/changelog:7] +filenames (binary): wrong-name-for-debian-news-file [usr/share/doc/filenames/news.debian.gz] +filenames (binary): debian-news-file-not-compressed [usr/share/doc/filenames/NEWS.Debian] +filenames (binary): debian-changelog-file-is-a-symlink [usr/share/doc/filenames/changelog.gz] diff --git a/t/recipes/checks/debian/changelog/legacy-filenames/eval/post-test b/t/recipes/checks/debian/changelog/legacy-filenames/eval/post-test new file mode 100644 index 0000000..571e35d --- /dev/null +++ b/t/recipes/checks/debian/changelog/legacy-filenames/eval/post-test @@ -0,0 +1,3 @@ +s/\(current is ([0-9]+\.)+[0-9]\)/(current is CURRENT)/ +s,usr/lib/([^\/]*/)?perl[0-9]*(/[0-9]*\.[0-9]*)?/,usr/lib/ma-dir/perl/version/,g +/package-installs-packlist/ d diff --git a/t/recipes/checks/debian/changelog/legacy-foo++/build-spec/debian/README.Debian b/t/recipes/checks/debian/changelog/legacy-foo++/build-spec/debian/README.Debian new file mode 100644 index 0000000..87bfcdf --- /dev/null +++ b/t/recipes/checks/debian/changelog/legacy-foo++/build-spec/debian/README.Debian @@ -0,0 +1,7 @@ +foo++ for Debian +---------------- + +This should trigger a warning, as i use a fake mail address. + + -- Marc 'HE' Brockschmidt , Wed, 14 Apr 2004 01:44:18 +0200 + diff --git a/t/recipes/checks/debian/changelog/legacy-foo++/build-spec/debian/changelog.in b/t/recipes/checks/debian/changelog/legacy-foo++/build-spec/debian/changelog.in new file mode 100644 index 0000000..3da7954 --- /dev/null +++ b/t/recipes/checks/debian/changelog/legacy-foo++/build-spec/debian/changelog.in @@ -0,0 +1,31 @@ +foo++ ([% $version %]) [% $distribution %]; urgency=low + + * Add a fake README.Debian to trigger a warning. + * This should trigger + debian-changelog-file-contains-debmake-default-email-address. + + -- Marc 'HE' Brockschmidt Wed, 14 Apr 2003 01:35:47 +0200 + +foo++ (4) unstable; urgency=low + + * This changelog now includes a ISO-8859-1 character: 'ä' + + -- Frank Lichtenheld Fri, 5 Mar 2004 13:41:39 +0100 + +foo++ (3) unstable; urgency=low + + * Set maintainers + uploaders incorrectly + + -- Jeroen van Wolffelaar Fri, 5 Mar 2004 04:20:24 +0100 + +foo++ (2) unstable; urgency=low + + * Added a foo++-helper package to try and catch even more ++ bugs. + + -- Sean 'Shaleh' Perry Sat, 10 Feb 2001 23:16:17 -0800 + +foo++ (1) unstable; urgency=low + + * Initial version + + -- Sean 'Shaleh' Perry Thu, 16 Nov 2000 09:11:40 -0800 diff --git a/t/recipes/checks/debian/changelog/legacy-foo++/build-spec/debian/control b/t/recipes/checks/debian/changelog/legacy-foo++/build-spec/debian/control new file mode 100644 index 0000000..3e86b96 --- /dev/null +++ b/t/recipes/checks/debian/changelog/legacy-foo++/build-spec/debian/control @@ -0,0 +1,30 @@ +Source: foo++ +Section: misc +Priority: optional +Maintainer: Lintian Maintainer +Uploaders: Marc 'HE' Brockschmidt , Jeroen van Wolffelaar, + Frank , Yama@gotchi, Josip, + I am afraid of spam and think this helps +Standards-Version: 3.1.1 +XS-Dm-Upload-Allowed: no + +Package: foo++ +Architecture: all +Build-Depends: test +Depends: test, libssl0.9.7 +Description: see how lintian reacts to plus signs in the package name + Regression test to see if lintian tests work on a package with plus signs in + its name. + . + This description also uses non-UTF8 high bytes chars: ÄÖÜß + +Package: foo++-helper +Architecture: all +Depends: test, foo++ +Description: see how lintian reacts to plus signs in the package name + Regression test to see if lintian tests work on a package with plus signs in + its name. This has /usr/share/doc links to foo++ to trigger even more checks. + . + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. diff --git a/t/recipes/checks/debian/changelog/legacy-foo++/build-spec/debian/copyright b/t/recipes/checks/debian/changelog/legacy-foo++/build-spec/debian/copyright new file mode 100644 index 0000000..e2d6d93 --- /dev/null +++ b/t/recipes/checks/debian/changelog/legacy-foo++/build-spec/debian/copyright @@ -0,0 +1,7 @@ +A reference to /usr/share/common-licenses/GPL to make it look like this +package is under the GPL and trigger the OpenSSL warning. + +However, there is also a reference to /usr/share/common-licenses/LGPL, so +who knows what bits actually depend on libssl. + +Copr. 2007 Somebody. diff --git a/t/recipes/checks/debian/changelog/legacy-foo++/build-spec/debian/rules b/t/recipes/checks/debian/changelog/legacy-foo++/build-spec/debian/rules new file mode 100755 index 0000000..63bb4db --- /dev/null +++ b/t/recipes/checks/debian/changelog/legacy-foo++/build-spec/debian/rules @@ -0,0 +1,36 @@ +#!/usr/bin/make -f + +foo=foo++ +helper=foo++-helper + +build-arch: + +build-indep: + +build: build-arch build-indep + +binary-arch: + +binary-indep: + install -d debian/$(foo)/DEBIAN + install -d debian/$(foo)/usr/share/doc/$(foo) + install -m 644 debian/changelog \ + debian/$(foo)/usr/share/doc/$(foo)/changelog + gzip -n -9 debian/$(foo)/usr/share/doc/$(foo)/changelog + install -m 644 debian/README.Debian \ + debian/$(foo)/usr/share/doc/$(foo)/README.Debian + gzip -n -9 debian/$(foo)/usr/share/doc/$(foo)/README.Debian + dpkg-gencontrol -isp -p$(foo) -Pdebian/$(foo) + dpkg --build debian/$(foo) .. + + install -d debian/$(helper)/DEBIAN + install -d debian/$(helper)/usr/share/doc/ + ln -sf $(foo) debian/$(helper)/usr/share/doc/$(helper) + dpkg-gencontrol -isp -p$(helper) -Pdebian/$(helper) + dpkg --build debian/$(helper) .. + +binary: binary-arch binary-indep + +clean: + +.PHONY: build-arch build-indep build binary-arch binary-indep binary clean diff --git a/t/recipes/checks/debian/changelog/legacy-foo++/build-spec/debian/watch b/t/recipes/checks/debian/changelog/legacy-foo++/build-spec/debian/watch new file mode 100644 index 0000000..26f9a3c --- /dev/null +++ b/t/recipes/checks/debian/changelog/legacy-foo++/build-spec/debian/watch @@ -0,0 +1,6 @@ +# A comment \ +version=0 + +# uscan does not interpret the backslash above, it is just part of the comment + +http://domain.tld/file-(.*)\.tar\.gz diff --git a/t/recipes/checks/debian/changelog/legacy-foo++/build-spec/fill-values b/t/recipes/checks/debian/changelog/legacy-foo++/build-spec/fill-values new file mode 100644 index 0000000..86d43bc --- /dev/null +++ b/t/recipes/checks/debian/changelog/legacy-foo++/build-spec/fill-values @@ -0,0 +1,5 @@ +Skeleton: upload-native +Testname: legacy-foo++ +Source: foo++ +Version: 5 +Description: Legacy test "foo++" diff --git a/t/recipes/checks/debian/changelog/legacy-foo++/eval/desc b/t/recipes/checks/debian/changelog/legacy-foo++/eval/desc new file mode 100644 index 0000000..1907a84 --- /dev/null +++ b/t/recipes/checks/debian/changelog/legacy-foo++/eval/desc @@ -0,0 +1,2 @@ +Testname: legacy-foo++ +Check: debian/changelog diff --git a/t/recipes/checks/debian/changelog/legacy-foo++/eval/hints b/t/recipes/checks/debian/changelog/legacy-foo++/eval/hints new file mode 100644 index 0000000..2775f3f --- /dev/null +++ b/t/recipes/checks/debian/changelog/legacy-foo++/eval/hints @@ -0,0 +1,4 @@ +foo++ (source): latest-debian-changelog-entry-without-new-date [debian/changelog:1] +foo++ (binary): latest-changelog-entry-without-new-date [usr/share/doc/foo++/changelog.gz:1] +foo++ (binary): debian-changelog-has-wrong-day-of-week 2003-04-14 was a Monday [usr/share/doc/foo++/changelog.gz:1] +foo++ (binary): bogus-mail-host-in-debian-changelog he@unknown (for version 5) [usr/share/doc/foo++/changelog.gz:1] diff --git a/t/recipes/checks/debian/changelog/legacy-foo++/eval/post-test b/t/recipes/checks/debian/changelog/legacy-foo++/eval/post-test new file mode 100644 index 0000000..faeef0b --- /dev/null +++ b/t/recipes/checks/debian/changelog/legacy-foo++/eval/post-test @@ -0,0 +1 @@ +s/\(current is ([0-9]+\.)+[0-9]\)/(current is CURRENT)/ diff --git a/t/recipes/checks/debian/changelog/legacy-libbaz/build-spec/debian/changelog.in b/t/recipes/checks/debian/changelog/legacy-libbaz/build-spec/debian/changelog.in new file mode 100644 index 0000000..91a6bb5 --- /dev/null +++ b/t/recipes/checks/debian/changelog/legacy-libbaz/build-spec/debian/changelog.in @@ -0,0 +1,6 @@ +libbaz ([% $version %]) [% $distribution %]; urgency=low + + * Initial setup + + -- Sean 'Shaleh' Perry Tue, 30 Jan 2001 15:23:59 -0800 + diff --git a/t/recipes/checks/debian/changelog/legacy-libbaz/build-spec/debian/compat.in b/t/recipes/checks/debian/changelog/legacy-libbaz/build-spec/debian/compat.in new file mode 100644 index 0000000..640a566 --- /dev/null +++ b/t/recipes/checks/debian/changelog/legacy-libbaz/build-spec/debian/compat.in @@ -0,0 +1 @@ +[% $dh_compat_level %] diff --git a/t/recipes/checks/debian/changelog/legacy-libbaz/build-spec/debian/control b/t/recipes/checks/debian/changelog/legacy-libbaz/build-spec/debian/control new file mode 100644 index 0000000..1506687 --- /dev/null +++ b/t/recipes/checks/debian/changelog/legacy-libbaz/build-spec/debian/control @@ -0,0 +1,58 @@ +Source: libbaz +Section: libs +Priority: optional +Maintainer: Lintian Maintainer +Build-depends: debhelper (>=4) +Standards-Version: 3.2.1 + +Package: libbaz1 +Architecture: any +Provides: libbaz +Description: test handling of library packages + Regression test for lintian's handling of libraries. + . + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. + +Package: libbaz1-dev +Architecture: any +Depends: libbaz1 (= ${source:Version}), perlapi-5.8.8 +Description: development package + Regression test for lintian's handling of libraries (dev). + . + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. + +Package: libbaz2 +Architecture: any +Depends: ${shlibs:Depends}, libssl0.9.8 +Description: test handling of library packages (good) + Regression test for lintian's handling of libraries (good). + . + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. + +Package: libbaz2-dev +Architecture: any +Depends: ${shlibs:Depends}, libbaz2 (= ${source:Version}) +Description: development package (good) + Regression test for lintian's handling of libraries (dev good). + . + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. + +Package: libbaz2-dbg +Architecture: any +Depends: libbaz2 (= ${binary:Version}) +Priority: optional +Description: debugging package + Regression test for lintian's handling of libraries (debug). + . + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. + diff --git a/t/recipes/checks/debian/changelog/legacy-libbaz/build-spec/debian/copyright b/t/recipes/checks/debian/changelog/legacy-libbaz/build-spec/debian/copyright new file mode 100644 index 0000000..a874c87 --- /dev/null +++ b/t/recipes/checks/debian/changelog/legacy-libbaz/build-spec/debian/copyright @@ -0,0 +1,8 @@ +This package is released under public domain. This is distributed in the hope +that it will be useful, but without any warranty; without even the implied +warranty of merchantability or fitness for a particular purpose. + +A reference to /usr/share/common-licenses/GPL-2 to make it look like this +package is under the GPL and trigger the OpenSSL warning. + +However, this has an OpenSSL exception. diff --git a/t/recipes/checks/debian/changelog/legacy-libbaz/build-spec/debian/dev.postinst b/t/recipes/checks/debian/changelog/legacy-libbaz/build-spec/debian/dev.postinst new file mode 100644 index 0000000..683e3cc --- /dev/null +++ b/t/recipes/checks/debian/changelog/legacy-libbaz/build-spec/debian/dev.postinst @@ -0,0 +1,4 @@ +#!/bin/sh -e + +$PKG=libbaz1-dev + diff --git a/t/recipes/checks/debian/changelog/legacy-libbaz/build-spec/debian/dev.prerm b/t/recipes/checks/debian/changelog/legacy-libbaz/build-spec/debian/dev.prerm new file mode 100644 index 0000000..683e3cc --- /dev/null +++ b/t/recipes/checks/debian/changelog/legacy-libbaz/build-spec/debian/dev.prerm @@ -0,0 +1,4 @@ +#!/bin/sh -e + +$PKG=libbaz1-dev + diff --git a/t/recipes/checks/debian/changelog/legacy-libbaz/build-spec/debian/lib.postinst b/t/recipes/checks/debian/changelog/legacy-libbaz/build-spec/debian/lib.postinst new file mode 100644 index 0000000..ec0b98a --- /dev/null +++ b/t/recipes/checks/debian/changelog/legacy-libbaz/build-spec/debian/lib.postinst @@ -0,0 +1,10 @@ +#!/bin/sh -e + +$PKG=libbaz1 + +if [ "$1" = "configure" ]; then + if [ -d /usr/doc -a ! -e /usr/doc/$PKG -a -d /usr/share/doc/$PKG ] +; then + ln -sf ../share/doc/$PKG /usr/doc/$PKG + fi +fi diff --git a/t/recipes/checks/debian/changelog/legacy-libbaz/build-spec/debian/lib.prerm b/t/recipes/checks/debian/changelog/legacy-libbaz/build-spec/debian/lib.prerm new file mode 100644 index 0000000..50e37c3 --- /dev/null +++ b/t/recipes/checks/debian/changelog/legacy-libbaz/build-spec/debian/lib.prerm @@ -0,0 +1,7 @@ +#!/bin/sh -e + +$PKG=libbaz1 + +if [ \( "$1" = "upgrade" -o "$1" = "remove" \) -a -L /usr/doc/$PKG ]; then + rm -f /usr/doc/$PKG +fi diff --git a/t/recipes/checks/debian/changelog/legacy-libbaz/build-spec/debian/lib.shlibs b/t/recipes/checks/debian/changelog/legacy-libbaz/build-spec/debian/lib.shlibs new file mode 100644 index 0000000..b88e288 --- /dev/null +++ b/t/recipes/checks/debian/changelog/legacy-libbaz/build-spec/debian/lib.shlibs @@ -0,0 +1,8 @@ +libdoesntexist2 1.0 libbaz1 +libdoesntexist2 1.0 libbaz1 +libbaz2 1.1 libbaz +libbaz3 1 libbaz1 (>> 1-1) +libbaz4 1 libbaz1 (= 1-1) +libbaz5 1 libbaz2 +udeb: libdoesntexist2 1.0 libbaz2 +udeb: libdoesntexist2 1.0 libbaz2 diff --git a/t/recipes/checks/debian/changelog/legacy-libbaz/build-spec/debian/lib.symbols b/t/recipes/checks/debian/changelog/legacy-libbaz/build-spec/debian/lib.symbols new file mode 100644 index 0000000..72f9d8a --- /dev/null +++ b/t/recipes/checks/debian/changelog/legacy-libbaz/build-spec/debian/lib.symbols @@ -0,0 +1,3 @@ +libbaz.so.2 libbaz1 #MINVER# + pw 1-1 + foo 1.1-1 diff --git a/t/recipes/checks/debian/changelog/legacy-libbaz/build-spec/debian/rules b/t/recipes/checks/debian/changelog/legacy-libbaz/build-spec/debian/rules new file mode 100755 index 0000000..fa99bc8 --- /dev/null +++ b/t/recipes/checks/debian/changelog/legacy-libbaz/build-spec/debian/rules @@ -0,0 +1,121 @@ +#!/usr/bin/make -f + +lib_tmp=debian/tmp-lib +dev_tmp=debian/tmp-dev + +LIB=libbaz1 +DEV=libbaz1-dev + +VENDORARCH := $(shell perl -MConfig -wE'say substr($$Config{vendorarch},1)') + +build-arch: + $(MAKE) + +build-indep: + +build: build-arch build-indep + +clean: + $(MAKE) clean + dh_clean -plibbaz2 -plibbaz2-dev + rm -f debian/files debian/substvars + rm -rf $(lib_tmp) $(dev_tmp) + +# Now the correct libbaz2-dev package +binary-correct: + install -d debian/libbaz2-dev/usr/lib + cp -a libbaz2.a libbaz2.so debian/libbaz2-dev/usr/lib + # usually, I'd also include some .h files to /usr/include + + # Now the correct libbaz2 package + install -d debian/libbaz2/usr/lib + cp -a libbaz2.so.* debian/libbaz2/usr/lib + chmod a-x debian/libbaz2/usr/lib/* + + # General stuff that is tested in other testsets: + dh_installdocs -plibbaz2 -plibbaz2-dev -plibbaz2-dbg + dh_compress -plibbaz2 -plibbaz2-dev -plibbaz2-dbg + + # Mess up the libbaz2 changelog files to test the symlink handling. + ln -s /usr/share/doc/lintian/changelog.gz \ + debian/libbaz2/usr/share/doc/libbaz2/changelog.gz + install -m 644 debian/changelog \ + debian/libbaz2-dev/usr/share/doc/libbaz2-dev/foo + ln -s foo debian/libbaz2-dev/usr/share/doc/libbaz2-dev/changelog + + # Okay, if either line is omitted, it should be noted + dh_strip --dbg-package=libbaz2-dbg -plibbaz2 -plibbaz2-dev + dh_makeshlibs -plibbaz2 -plibbaz2-dev -plibbaz2-dbg + dh_shlibdeps -plibbaz2 -plibbaz2-dev -plibbaz2-dbg + + # and again, regular packaging stuff + dh_installdeb -plibbaz2 -plibbaz2-dev -plibbaz2-dbg + echo udeb: libbaz2 1.0 libbaz2 >> debian/libbaz2/DEBIAN/shlibs + dh_gencontrol -plibbaz2 -plibbaz2-dev -plibbaz2-dbg + dh_builddeb -plibbaz2 -plibbaz2-dev -plibbaz2-dbg + +# and the incorrect one +binary-arch: build-arch binary-correct + # first, the lib package + install -d $(lib_tmp)/usr/lib + # resp. no soname (check), wrong soname (check), and no-pic (check) + cp -a libbaz1.so.1.0* $(lib_tmp)/usr/lib + cp -a libbaz2.so.1.0.3b $(lib_tmp)/usr/lib/libfoo2.so.1.0.3b + install -m644 libbaz3.so.1.0.3b $(lib_tmp)/usr/lib/libbaz3.so.1.0.3b + # let's include the .a in the non-dev too (TODO) + # Also, libbaz1.a hasn't a symbol table (TODO) + cp -a *.a $(lib_tmp)/usr/lib + # And a wrong .so symlink (wrong, only in -dev, TODO) + ln -s libfoo3.so.0.9 $(lib_tmp)/usr/lib/libfoo3.so + # And a wrong .so.X symlink (wrong, should point to a real existing + # shlib, TODO) + ln -s libfoo.so.0.9.1 $(lib_tmp)/usr/lib/libfoo.so.0.9 + # And a plain .so (wrong, TODO) + touch $(lib_tmp)/usr/lib/libbar2.so + # And a non-versioned SONAME. + install -m644 libbaz.so $(lib_tmp)/usr/lib/libbaz.so + strip --remove-section=.comment --strip-unneeded $(lib_tmp)/usr/lib/libbaz.so + # Pretend to be a Perl module to test a lack of Perl dependencies. + install -d $(lib_tmp)/$(VENDORARCH)/auto/Foo + install -m 644 libbaz2.so.1.0.3b $(lib_tmp)/$(VENDORARCH)/auto/Foo/Foo.so + strip $(lib_tmp)/$(VENDORARCH)/auto/Foo/Foo.so + + install -d $(lib_tmp)/usr/share/doc/$(LIB) + install -m 644 debian/copyright $(lib_tmp)/usr/share/doc/$(LIB) + install -m 644 debian/changelog $(lib_tmp)/usr/share/doc/$(LIB) + gzip -n -9 $(lib_tmp)/usr/share/doc/$(LIB)/changelog + install -d $(lib_tmp)/DEBIAN + install -m 755 debian/lib.postinst $(lib_tmp)/DEBIAN/postinst + install -m 755 debian/lib.prerm $(lib_tmp)/DEBIAN/prerm + touch $(lib_tmp)/usr/share/doc/README.Debian + #dpkg-shlibdeps $(lib_tmp)/usr/lib/libbaz.so.1.0 + install -m 755 debian/lib.shlibs $(lib_tmp)/DEBIAN/shlibs + install -m 755 debian/lib.symbols $(lib_tmp)/DEBIAN/symbols + dpkg-gencontrol -isp -p$(LIB) -P$(lib_tmp) + dpkg --build $(lib_tmp) .. + + # now the -dev package + install -d $(dev_tmp)/usr/include + install -d $(lib_tmp)/usr/lib + # let's also install the .so at the same time... (wrong, TODO) + cp -a *.a *.so.* $(lib_tmp)/usr/lib + # and fuck up permission (TODO) + chmod a+x $(lib_tmp)/usr/lib/*.a + # Pretend to be a Perl module to test a lack of Perl dependencies. + install -d $(dev_tmp)/$(VENDORARCH)/auto/Foo + install -m 644 libbaz2.so.1.0.3b $(dev_tmp)/$(VENDORARCH)/auto/Foo/Foo.so + strip $(dev_tmp)/$(VENDORARCH)/auto/Foo/Foo.so + install -d $(dev_tmp)/usr/share/doc + ln -s $(LIB) $(dev_tmp)/usr/share/doc/$(DEV) + install -d $(dev_tmp)/DEBIAN + install -m 755 debian/dev.postinst $(dev_tmp)/DEBIAN/postinst + install -m 755 debian/dev.prerm $(dev_tmp)/DEBIAN/prerm + dpkg-gencontrol -isp -p$(DEV) -P$(dev_tmp) + dpkg --build $(dev_tmp) .. + + +binary: binary-arch + +# The mention of binary-indep here should be sufficient to suppress the +# warning that it's not present. +.PHONY: build-arch build-indep build binary-arch binary-indep binary clean diff --git a/t/recipes/checks/debian/changelog/legacy-libbaz/build-spec/debian/source.lintian-overrides b/t/recipes/checks/debian/changelog/legacy-libbaz/build-spec/debian/source.lintian-overrides new file mode 100644 index 0000000..6008d27 --- /dev/null +++ b/t/recipes/checks/debian/changelog/legacy-libbaz/build-spec/debian/source.lintian-overrides @@ -0,0 +1 @@ +libbaz source: maintainer-script-lacks-debhelper-token diff --git a/t/recipes/checks/debian/changelog/legacy-libbaz/build-spec/fill-values b/t/recipes/checks/debian/changelog/legacy-libbaz/build-spec/fill-values new file mode 100644 index 0000000..7effe4f --- /dev/null +++ b/t/recipes/checks/debian/changelog/legacy-libbaz/build-spec/fill-values @@ -0,0 +1,6 @@ +Skeleton: upload-non-native +Testname: legacy-libbaz +Source: libbaz +Version: 1-1 +Default-Build-Depends: debhelper (>= 9.20151004~) +Description: Legacy test "libbaz" diff --git a/t/recipes/checks/debian/changelog/legacy-libbaz/build-spec/orig/Makefile b/t/recipes/checks/debian/changelog/legacy-libbaz/build-spec/orig/Makefile new file mode 100644 index 0000000..657dc2a --- /dev/null +++ b/t/recipes/checks/debian/changelog/legacy-libbaz/build-spec/orig/Makefile @@ -0,0 +1,55 @@ +# This is the correct way to build a lib + +CC=gcc +CFLAGS=-g -Wall -Winline -O2 +LDFLAGS=-Wl,--no-as-needed + +OBJS=baz.o extra.o +SHOBJS=baz.sho extra.sho +NOPICOBJS = $(SHOBJS) + +all: libbaz1.a libbaz2.a libbaz1.so.1.0.3b libbaz2.so libbaz3.so.1.0.3b \ + libbaz.so + +libbaz2.so: libbaz2.so.1.0 + ln -sf $^ $@ +libbaz2.so.1.0: libbaz2.so.1.0.3b + ln -sf $^ $@ + +# Oops, forget the soname altogether +libbaz1.so.1.0.3b: $(NOPICOBJS) + $(CC) $(LDFLAGS) -o $@ -shared $^ -lc + +libbaz2.so.1.0.3b: $(SHOBJS) + $(CC) $(LDFLAGS) -o $@ -shared -Wl,-soname,libbaz2.so.1.0 $^ -lc + +# Non-PIC. We can't test this on all architectures +libbaz3.so.1.0.3b: $(NOPICOBJS) + $(CC) $(LDFLAGS) -o $@ -shared -Wl,-soname,libbaz3.so.1 $^ -lc + +# Non-versioned SONAME. +libbaz.so: $(SHOBJS) + $(CC) $(LDFLAGS) -o $@ -shared -Wl,-soname,libbaz.so $^ -lc + +#%.o-noreentrant: %.c +# $(CC) $(LDFLAGS) $(CFLAGS) -o $@ -c $< + +%.sho: %.c + $(CC) $(LDFLAGS) $(CFLAGS) -D_REENTRANT -fPIC -o $@ -c $< + +%.o: %.c + $(CC) $(LDFLAGS) $(CFLAGS) -D_REENTRANT -o $@ -c $< + +libbaz2.a: $(OBJS) + ar cq $@ $(OBJS) + strip --strip-unneeded --remove-section=.comment \ + --remove-section=-note $@ + ranlib $@ + +# The pic one in the .a (wrong), no archive table +libbaz1.a: $(SHOBJS) + ar cqS $@ $^ + strip --strip-unneeded --remove-section=.comment \ + --remove-section=-note $@ +clean: + rm -f *.a *.o *.so* *.sho diff --git a/t/recipes/checks/debian/changelog/legacy-libbaz/build-spec/orig/baz.c b/t/recipes/checks/debian/changelog/legacy-libbaz/build-spec/orig/baz.c new file mode 100644 index 0000000..4d5fc45 --- /dev/null +++ b/t/recipes/checks/debian/changelog/legacy-libbaz/build-spec/orig/baz.c @@ -0,0 +1,6 @@ +#include + +double pw(double p) +{ + return exp(p); +} diff --git a/t/recipes/checks/debian/changelog/legacy-libbaz/build-spec/orig/extra.c b/t/recipes/checks/debian/changelog/legacy-libbaz/build-spec/orig/extra.c new file mode 100644 index 0000000..e69de29 diff --git a/t/recipes/checks/debian/changelog/legacy-libbaz/eval/desc b/t/recipes/checks/debian/changelog/legacy-libbaz/eval/desc new file mode 100644 index 0000000..4b301de --- /dev/null +++ b/t/recipes/checks/debian/changelog/legacy-libbaz/eval/desc @@ -0,0 +1,2 @@ +Testname: legacy-libbaz +Check: debian/changelog diff --git a/t/recipes/checks/debian/changelog/legacy-libbaz/eval/hints b/t/recipes/checks/debian/changelog/legacy-libbaz/eval/hints new file mode 100644 index 0000000..186319e --- /dev/null +++ b/t/recipes/checks/debian/changelog/legacy-libbaz/eval/hints @@ -0,0 +1,9 @@ +libbaz2-dev (binary): initial-upload-closes-no-bugs [usr/share/doc/libbaz2-dev/changelog:1] +libbaz2-dev (binary): debian-changelog-file-missing-or-wrong-name +libbaz2-dev (binary): debian-changelog-file-is-a-symlink [usr/share/doc/libbaz2-dev/changelog] +libbaz2-dev (binary): changelog-file-not-compressed [usr/share/doc/libbaz2-dev/changelog] +libbaz2-dbg (binary): no-changelog usr/share/doc/libbaz2-dbg/changelog.Debian.gz (non-native package) +libbaz2 (binary): debian-changelog-file-missing-or-wrong-name +libbaz2 (binary): debian-changelog-file-is-a-symlink [usr/share/doc/libbaz2/changelog.gz] +libbaz1 (binary): initial-upload-closes-no-bugs [usr/share/doc/libbaz1/changelog.gz:1] +libbaz1 (binary): debian-changelog-file-missing-or-wrong-name diff --git a/t/recipes/checks/debian/changelog/legacy-libbaz/eval/post-test b/t/recipes/checks/debian/changelog/legacy-libbaz/eval/post-test new file mode 100755 index 0000000..29dc3f4 --- /dev/null +++ b/t/recipes/checks/debian/changelog/legacy-libbaz/eval/post-test @@ -0,0 +1,4 @@ +/: hardening-.*/ d +s/\(current is ([0-9]+\.)+[0-9]\)/(current is CURRENT)/ +s,usr/lib/([^\/]*/)?perl[0-9]*(/[0-9]*\.[0-9]*)?/,usr/lib/ma-dir/perl/version/,g +/: file-references-package-build-path / d diff --git a/t/recipes/checks/debian/changelog/legacy-maintainer-scripts/build-spec/debian/changelog.in b/t/recipes/checks/debian/changelog/legacy-maintainer-scripts/build-spec/debian/changelog.in new file mode 100644 index 0000000..a12fc8c --- /dev/null +++ b/t/recipes/checks/debian/changelog/legacy-maintainer-scripts/build-spec/debian/changelog.in @@ -0,0 +1,57 @@ +maintainer-scripts ([% $version %]) [% $distribution %]; urgency=low + + * Doing an upload for QA but I fail to give it a correct version number, + have some uploaders, and also fail to mention it... Bad me ;) + + -- Jeroen van Wolffelaar Sun, 18 Apr 2004 02:05:29 +0200 + +maintainer-scripts (6.1) unstable; urgency=low + + * I made this entry on my local PC, oops ;) + + -- Jeroen van Wolffelaar Sat, 21 Feb 2004 18:29:37 +0100 + +maintainer-scripts (6) unstable; urgency=low + + * added ldconfig calls to postrm to check test the postrm tests + from shared-libs + + -- Frank Lichtenheld Sat, 21 Feb 2004 18:29:36 +0100 + +maintainer-scripts (5) unstable; urgency=low + + * added bash style arrays to postinst, this one is for you Torsten (-: + + -- Sean 'Shaleh' Perry Fri, 30 Mar 2001 23:27:06 -0800 + +maintainer-scripts (4) unstable; urgency=low + + * added a here document to the prerm, along with two more bashisms + * made postrm a bash script to check that bash scripts are not searched + + -- Sean 'Shaleh' Perry Mon, 26 Feb 2001 13:02:57 -0800 + +maintainer-scripts (3) unstable; urgency=low + + * Added check for '.' called as '. foo || bar', lintian 1.11.15 failed this + thinking the '||' was a argument. + * also added an invalid call to '. foo bar' + * postinst now has a space between the #! and /bin/sh to test the interpreter + checking code. + + -- Sean 'Shaleh' Perry Tue, 9 Jan 2001 23:06:25 -0800 + +maintainer-scripts (2) unstable; urgency=low + + * Fix location of changelog. + * prerm and postrm do 'update-alternatives --remove'; should only complain + about postrm. + + -- Colin Watson Fri, 29 Dec 2000 06:01:24 +0000 + +maintainer-scripts (1) unstable; urgency=low + + * Initial version + * postinst and prerm set the usr/doc symlink + + -- Sean 'Shaleh' Perry Thu, 16 Nov 2000 09:11:40 -0800 diff --git a/t/recipes/checks/debian/changelog/legacy-maintainer-scripts/build-spec/debian/control.in b/t/recipes/checks/debian/changelog/legacy-maintainer-scripts/build-spec/debian/control.in new file mode 100644 index 0000000..63dd2db --- /dev/null +++ b/t/recipes/checks/debian/changelog/legacy-maintainer-scripts/build-spec/debian/control.in @@ -0,0 +1,18 @@ +Source: maintainer-scripts +Section: misc +Priority: optional +Maintainer: QA group +Uploaders: Anyone but Jeroen +Build-Depends: [% $build_depends %] +Standards-Version: 3.1.1 +Rules-Requires-Root: binary-targets +XS-Dm-Upload-Allowed: Yes + +Package: maintainer-scripts +Architecture: [% $package_architecture %] +Depends: test +Description: test lintian's maintainer script checks + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. diff --git a/t/recipes/checks/debian/changelog/legacy-maintainer-scripts/build-spec/debian/postinst b/t/recipes/checks/debian/changelog/legacy-maintainer-scripts/build-spec/debian/postinst new file mode 100644 index 0000000..e56ed3b --- /dev/null +++ b/t/recipes/checks/debian/changelog/legacy-maintainer-scripts/build-spec/debian/postinst @@ -0,0 +1,181 @@ +#! /bin/sh -e + +if [ "$1" = "configure" ]; then + if [ -d /usr/doc -a ! -e /usr/doc/maintainer-scripts -a -d /usr/share/doc/maintainer-scripts ]; then + ln -sf ../share/doc/maintainer-scripts /usr/doc/maintainer-scripts + fi +fi + +# valid +. /usr/share/lintian/shell || exit 0 +. /usr/share/lintian/shell >/dev/null +. /usr/share/lintian/shell 2>/dev/null +. /usr/share/lintian/shell /dev/null +update-rc.d $FOO defaults +update-rc.d foo remove + +# valid +FOO=/tmp +FOO=/var/tmp +: ${FOO:=/tmp} +FOO=`mktemp /tmp/scripts.XXXXXX` +rm "$FOO" +FOO=`tempfile -n/tmp/scripts.tmp` +mkdir /var/tmp/scripts +FOO="/tmp/false.positive.XXXXXX" +# invalid +echo foo >>/tmp/scripts.tmp +rm /tmp/scripts.tmp +rmdir /var/tmp/scripts + +# invalid, maintainer-script-hides-init-failure +invoke-rc.d foo start || exit 0 + +# The right way to invoke an rc script +if which invoke-rc.d >/dev/null 2>&1; then + invoke-rc.d package start +else + /etc/init.d/package start +fi + +# Example ucf invocation. +ucf /usr/share/foo/configuration /etc/foo.conf + +# Calling gconftool directly. +gconftool-2 --makefile-install-rule foo.schema + +# Calling gconf-schemas with no dependency. +gconf-schemas --register foo.schema + +# Calling update-xmlcatalog with no dependency. +update-xmlcatalog --add --type system --id "/usr/share/sgml/dtd/foo" \ + --package maintainer-scripts --root + +# Maintainer scripts shouldn't touch /var/lib/dpkg/status. This is the old +# recipe from the dpkg wiki that should be replaced with dpkg-query. +sed -n -e \"/^Conffiles:/,/^[^ ]/{\\\\' /etc/conffile'{s/.* //;p}}\" \ + /var/lib/dpkg/status + +# Don't modify these files. +echo 'broken 6714/tcp' >> /etc/services +cp /nonexistent /etc/protocols +mv /usr/share/doc/rpc /etc/rpc + +# But this is okay. +cp /etc/protocols /etc/protocols.new + +# This is also wrong. +echo 'broken' > /etc/inetd.conf +cp /etc/inetd.conf.new /etc/inetd.conf + +# But this is fine. +cp /etc/inetd.conf /srv/chroot/etc/inetd.conf + +# Deprecated +install-sgmlcatalog --install package +install-sgmlcatalog --remove package + +# This too is a heredoc. +some-program > /etc/config-file <<'EOF' +echo "All of the array is: ${H[@]}" +EOF + +# But this isn't. +cat '</dev/null; then + ucf --purge /etc/foo.conf +fi + +# This isn't allowed. +rm /tmp/foo /dev/device +rm /dev/device1 + +# But this is okay. +rm /tmp/foo > /dev/null + +# Not allowed here even with remove. +install-sgmlcatalog --remove package diff --git a/t/recipes/checks/debian/changelog/legacy-maintainer-scripts/build-spec/debian/preinst b/t/recipes/checks/debian/changelog/legacy-maintainer-scripts/build-spec/debian/preinst new file mode 100644 index 0000000..6058978 --- /dev/null +++ b/t/recipes/checks/debian/changelog/legacy-maintainer-scripts/build-spec/debian/preinst @@ -0,0 +1,18 @@ +#!/bin/sh + +update-rc.d foo remove +update-rc.d bar defaults + +# Obsolete dpkg assertions. +dpkg --assert-support-predepends || exit 1 +dpkg --assert-working-epoch || exit 1 +dpkg --assert-long-filenames || exit 1 +dpkg --assert-multi-conrep || exit 1 + +/bin/grep -E --mmap "^Package: foo$" /var/lib/dpkg/status + +# continuation lines +update-alternatives --install /usr/bin/fakeroot fakeroot \ + /usr/bin/fakeroot-ng 5 \ + --slave /usr/share/man/man1/fakeroot.1.gz \ + fakeroot.1.gz /usr/share/man/man1/fakeroot-ng.1.gz diff --git a/t/recipes/checks/debian/changelog/legacy-maintainer-scripts/build-spec/debian/prerm b/t/recipes/checks/debian/changelog/legacy-maintainer-scripts/build-spec/debian/prerm new file mode 100644 index 0000000..076ecaf --- /dev/null +++ b/t/recipes/checks/debian/changelog/legacy-maintainer-scripts/build-spec/debian/prerm @@ -0,0 +1,188 @@ +#!/bin/sh + +if [ "$1" != "upgrade" ]; then + update-alternatives --remove dummy /usr/bin/dummy-alternative +fi + +if ([ "$1" = "upgrade" ] || [ "$1" = "remove" ]) && [ -L /usr/doc/maintainer-scripts ]; the +n + rm -f /usr/doc/maintainer-scripts +fi + +cat </dev/null +} + +source $FOO + +trap "echo hi" EXIT HUP 3 + +if [[ "$2" = "purge" ]]; then + kill -HUP $$ +fi + +#this is ok though +if test -n $(echo foo | perl -pe 's/[[:space:]]//go'); then + echo 1 +fi + +update-rc.d foo remove + +# More false positives for bashism checks. None of these are errors. +echo "$line" | grep -q '{fonts/map,}/{\$progname,pdftex,dvips,}//' +echo "$line" | grep -q "${fonts},${foo}" +echo '$[1+2]' +printf "foo |& bar" +perl -e "print q( kill -HUP $? )" + +# Still catch disallowed expansions in double-quotes, though. +echo "${line:3:1}" + +# The wrong way to run an init script (no invoke-rc.d). +/etc/init.d/package stop + +# This is the only install-sgmlcatalog call that's allowed. +install-sgmlcatalog --quiet --remove package + +# More bashisms checks + +read -x foo +read -x +read -r foo +read foo +read + +echo "a\\b" +echo 'a\nb' + +echo "${UID}" +echo "$EUID" +echo "$SHLVL" +echo "$DIRSTACK" +echo "$SECONDS" +echo "$BASH" +echo "$BASH_FOO" +echo "$SHELLOPTS" +echo "$PIPESTATUS" + +bar="$(cut '-d|' -f2 <<< "$foo")" + +VAR=1 +VAR+=a + +echos() { + echo -n -e "bar" + echo -e -n "bar" + echo -en "bar" + echo -ne "bar" + echo "bar" + echo "echo -e foo" +} + +ech.os() { + echo foo >& 2 + echo foo >&bar + echo foo >& bar +} + +echoes() { + echo "abc\nxyz" + echo 'xyz\rabc' + echo foo\cbar + + echo -e "abc\nxyz" + echo -net 'xyz\rabc' + echo -e foo\cbar +} + +foobar.() { + suspend x + suspended x + caller x + complete x + compgen x + declare -a foo +} + +.foobar() { + typeset -x bar + disown 1 + builtin foo + set -B + alias -p + unalias -a +} + +IFS="()" + +ulimit +shopt +type -v bar +time ls +dirs +diff <(tac a) <(tac b) + +pushd + +local foo=bar +local -x foo + +popd + +readonly -f + +echo bar > /dev/tcp +export x +export -x x +export -p x + +sh -x +sh -D +sh --foo +sh +O + +# Brace expansion checks +echo {a,b} +echo {abc},{bcd} + +foobar() +{ + # This is a function +} + + foo.bar() +( + # This is a function with a bad name +) + +foobar@() +{ + # As is this +} + +# This is ok +read -r foo +# but these aren't +read -r +read -p "Would you like to restart the service?" foo bar +read --fish + +set -e + +source "$BAR" +source '$BAR' +source ~/bar +source a diff --git a/t/recipes/checks/debian/changelog/legacy-maintainer-scripts/build-spec/debian/rules b/t/recipes/checks/debian/changelog/legacy-maintainer-scripts/build-spec/debian/rules new file mode 100755 index 0000000..5fcef00 --- /dev/null +++ b/t/recipes/checks/debian/changelog/legacy-maintainer-scripts/build-spec/debian/rules @@ -0,0 +1,35 @@ +#!/usr/bin/make -f + +build-arch: + +build-indep: + +build: build-arch build-indep + +binary-arch: + +binary-indep: + install -d debian/tmp/DEBIAN + install -m 0755 debian/preinst debian/tmp/DEBIAN + install -m 0755 debian/postinst debian/tmp/DEBIAN + install -m 0755 debian/prerm debian/tmp/DEBIAN + install -m 0755 debian/postrm debian/tmp/DEBIAN + install -m 0644 debian/triggers debian/tmp/DEBIAN + install -d debian/tmp/usr/share/doc/maintainer-scripts + install -m 0644 debian/changelog \ + debian/tmp/usr/share/doc/maintainer-scripts/changelog + gzip -n -9 debian/tmp/usr/share/doc/maintainer-scripts/changelog + dpkg-gencontrol -isp + dpkg --build debian/tmp .. + +binary: binary-arch binary-indep + +# Make sure we see dh_clean even in a rule clean depends on. Not the point of +# this test suite, but a convenient place to put it. +clean: clean1 clean2 clean3 +clean1: +clean2: + dh_clean +clean3: + +.PHONY: build-arch build-indep build binary-arch binary-indep binary clean diff --git a/t/recipes/checks/debian/changelog/legacy-maintainer-scripts/build-spec/debian/triggers b/t/recipes/checks/debian/changelog/legacy-maintainer-scripts/build-spec/debian/triggers new file mode 100644 index 0000000..f627094 --- /dev/null +++ b/t/recipes/checks/debian/changelog/legacy-maintainer-scripts/build-spec/debian/triggers @@ -0,0 +1,4 @@ +# Example triggers file +activate foo + +interest bar diff --git a/t/recipes/checks/debian/changelog/legacy-maintainer-scripts/build-spec/debian/watch b/t/recipes/checks/debian/changelog/legacy-maintainer-scripts/build-spec/debian/watch new file mode 100644 index 0000000..430eea3 --- /dev/null +++ b/t/recipes/checks/debian/changelog/legacy-maintainer-scripts/build-spec/debian/watch @@ -0,0 +1,11 @@ +# A whitespace is fine for uscan: + version=5 + +# Following line should not be matched: +#opts=uversionmangle=s/$/+debian/,dversionmangle=s/foo/bar/ \ +# Following one is incorrect, there's a missing backslash at the end +opts=uversionmangle=s/$/+dfsg/,dversionmangle=s/foo/bar/ + +# 'active' is useless here, but it works anyway +options=active \ +http://domain.tld/foo-(.+)\.tar\.gz \ No newline at end of file diff --git a/t/recipes/checks/debian/changelog/legacy-maintainer-scripts/build-spec/fill-values b/t/recipes/checks/debian/changelog/legacy-maintainer-scripts/build-spec/fill-values new file mode 100644 index 0000000..c281e87 --- /dev/null +++ b/t/recipes/checks/debian/changelog/legacy-maintainer-scripts/build-spec/fill-values @@ -0,0 +1,6 @@ +Skeleton: upload-non-native +Testname: legacy-maintainer-scripts +Source: maintainer-scripts +Version: 7+dfsg-0.1 +Description: Legacy test "maintainer-scripts" +Extra-Build-Depends: dash (>= 0.5.10.2) diff --git a/t/recipes/checks/debian/changelog/legacy-maintainer-scripts/eval/desc b/t/recipes/checks/debian/changelog/legacy-maintainer-scripts/eval/desc new file mode 100644 index 0000000..d41ac19 --- /dev/null +++ b/t/recipes/checks/debian/changelog/legacy-maintainer-scripts/eval/desc @@ -0,0 +1,2 @@ +Testname: legacy-maintainer-scripts +Check: debian/changelog diff --git a/t/recipes/checks/debian/changelog/legacy-maintainer-scripts/eval/hints b/t/recipes/checks/debian/changelog/legacy-maintainer-scripts/eval/hints new file mode 100644 index 0000000..1bae29f --- /dev/null +++ b/t/recipes/checks/debian/changelog/legacy-maintainer-scripts/eval/hints @@ -0,0 +1,2 @@ +maintainer-scripts (source): odd-historical-debian-changelog-version 6.1 (for non-native) [debian/changelog:8] +maintainer-scripts (binary): bogus-mail-host-in-debian-changelog jeroen@mordor (for version 6.1) [usr/share/doc/maintainer-scripts/changelog.gz:8] diff --git a/t/recipes/checks/debian/changelog/legacy-maintainer-scripts/eval/post-test b/t/recipes/checks/debian/changelog/legacy-maintainer-scripts/eval/post-test new file mode 100644 index 0000000..faeef0b --- /dev/null +++ b/t/recipes/checks/debian/changelog/legacy-maintainer-scripts/eval/post-test @@ -0,0 +1 @@ +s/\(current is ([0-9]+\.)+[0-9]\)/(current is CURRENT)/ diff --git a/t/recipes/checks/debian/changelog/legacy-relations/build-spec/debian/changelog.in b/t/recipes/checks/debian/changelog/legacy-relations/build-spec/debian/changelog.in new file mode 100644 index 0000000..9a82ea7 --- /dev/null +++ b/t/recipes/checks/debian/changelog/legacy-relations/build-spec/debian/changelog.in @@ -0,0 +1,33 @@ +relations ([% $version %]) [% $distribution %]; urgency=low + + * I'm orphaning this package -- I'm sick of it: it's completely broken, + lintian complains all over the place. + + -- Jeroen van Wolffelaar Sun, 02 Dec 2007 15:59:59 -0800 + +relations (4) unstable; urgency=low + + * Added a package that tests dependencies for multiple versions of + libraries, and test some description stuff in there as well. + + -- Josip Rodin Fri, 29 Nov 2002 20:13:33 +0100 + +relations (3) unstable; urgency=low + + * Added a virtual provides to test against my virtual depends without + a real package first test + + -- Sean 'Shaleh' Perry Thu, 8 Feb 2001 11:29:53 -0800 + +relations (2) unstable; urgency=low + + * Added a depends on dpkg (violates policy) and a versioned depends + on bash (follows policy) + + -- Sean 'Shaleh' Perry Fri, 2 Feb 2001 12:37:17 -0800 + +relations (1) unstable; urgency=low + + * Initial version + + -- Richard Braakman Tue, 7 Jul 1998 16:27:56 +0200 diff --git a/t/recipes/checks/debian/changelog/legacy-relations/build-spec/debian/control b/t/recipes/checks/debian/changelog/legacy-relations/build-spec/debian/control new file mode 100644 index 0000000..6cd1c04 --- /dev/null +++ b/t/recipes/checks/debian/changelog/legacy-relations/build-spec/debian/control @@ -0,0 +1,51 @@ +Source: relations +Section: misc +Priority: optional +Build-Depends: mail-transport-agent, libc6-dev, findutils, foo (= 3) [!amd64 !i386], bar, arch-test1 [i386], arch-test2 [!i386], quilt (>= 0.40), perl +Build-Depends-Indep: make, bash, debmake, build-essential, baz (= 2.0), ghostscript | gs, + car (>= 1.0), car (<= 2.0), caz (= 1.0) [amd64], caz (>= 2.0) [i386], + caz (= 2.0) [powerpc], perl (>= 5.0), foo (<< 4) [!amd64 !i386], libfoo (>= 1.2-1), bozzle [kfreebsd-i386] +Build-Conflicts: foo [amd64 i386], bar [alpha test], xlibs-dev, arch-test1 [powerpc], arch-test2 [!sparc] +Build-Conflicts-Indep: debmake [!powerpc] +Maintainer: Debian QA Group +Standards-Version: 3.7.3 +Homepage: lintian.debian.org +Origin: Debian +Bugs: debbugs://bugs.debian.org/ + +Package: relations +Architecture: all +Section: contrib/misc +Pre-Depends: awk|gawk +Depends: relations(<< 3), dpkg, bash (>> 2.0 ), mail-transport-agent, gawk | awk, foo (>> 2.0), foo (<< 2.2), coreutils, ,null (>= 0), ${misc:Depends}, makedev +Provides: mail-reader +Replaces: relations +Conflicts: foobar (<< 5+5), foo, relations, + gnuwdf, +Suggests: alpha, gnu (>= 44-3-4-8-11.4) | ung (<< 89beta) | nug | ngu, beta, some-other-package +Recommends: emacs21 | emacsen, dpkg, null, some-other-package, ${f-oo:b-ar}, gs | ghostscript | gs-aladdin +Description: Strange dependency relationships (dummy) + This package declares relationships designed to tickle lintian's "fields" + check. It should generate a number of tags for these. + . + The package is built with "dpkg --build --no-check", because some of the + relationships used here are normally rejected by dpkg. + +Package: relations-multiple-libs +Architecture: all +Section: non-free/misc +Depends: libstdc++2.10, libstdc++2.10-glibc2.2, libstdc++3.0, tk8.2, tk8.3, tcl8.0, tcl8.2, tkx8.2, tkx8.3, tclx8.2, libpng2, libpng3, xorg, ${shlibs:Depends}, makedev | udev +Provides: awk +Enhances: foo +Recommends: ${shlibs:Depends}, relations-multiple-libs, gs | gs-gpl, makedev +Breaks: libpng3 (<< 1.0), libpng2 +Suggests: x-dev, ghostscript | gs +Description: Duplicate library dependency relationships. + Duplicate library dependency relationships. + This tests the depending on different versions of the same library + at the same time. + . + At the same time, it conveniently tests some description file checks. :) + . + It is a metapackage from the lintian perspective, so the xorg dependency + should be allowed. diff --git a/t/recipes/checks/debian/changelog/legacy-relations/build-spec/debian/rules b/t/recipes/checks/debian/changelog/legacy-relations/build-spec/debian/rules new file mode 100755 index 0000000..5027f33 --- /dev/null +++ b/t/recipes/checks/debian/changelog/legacy-relations/build-spec/debian/rules @@ -0,0 +1,49 @@ +#!/usr/bin/make -f + +# Copyright (C) 1998 Richard Braakman +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +build-arch: + +build-indep: + +build: build-arch build-indep + +binary-arch: + +binary-indep: + install -d debian/tmp/DEBIAN + dpkg-gencontrol -prelations -isp + dpkg --build debian/tmp ../relations_5_all.deb + install -d debian/tmp/usr/share/doc/ + ln -s relations debian/tmp/usr/share/doc/relations-multiple-libs + dpkg-gencontrol -prelations-multiple-libs -isp + dpkg --build debian/tmp ../relations-multiple-libs_5_all.deb + +binary: binary-arch binary-indep + +clean:: + rm -rf debian/tmp debian/files + +# Test allowing quilt Build-Depends for manual quilt invocations. + TESTING=foo ANOTHER=bar quilt || true + +# Test requiring perl Build-Depends for manual perl invocations. + [ ! -f Build ] || $(PERL) Build distclean + +.PHONY: build-arch build-indep build binary-arch binary-indep binary clean diff --git a/t/recipes/checks/debian/changelog/legacy-relations/build-spec/debian/tmp/DEBIAN/control b/t/recipes/checks/debian/changelog/legacy-relations/build-spec/debian/tmp/DEBIAN/control new file mode 100644 index 0000000..87e7fe6 --- /dev/null +++ b/t/recipes/checks/debian/changelog/legacy-relations/build-spec/debian/tmp/DEBIAN/control @@ -0,0 +1,14 @@ +Package: relations-multiple-libs +Version: 4 +Section: misc +Priority: optional +Architecture: all +Depends: libstdc++2.10, libstdc++2.10-glibc2.2, libstdc++3.0, tk8.2, tk8.3, tcl8.0, tcl8.2, tkx8.2, tkx8.3, tclx8.2, libpng2, libpng3 +Installed-Size: 12 +Maintainer: Lintian Maintainer +Source: relations +Description: Duplicate library dependency relationships. + Duplicate library dependency relationships. This tests the depending on + different versions of the same library at the same time. + . + At the same time, it conveniently tests some description file checks. :) diff --git a/t/recipes/checks/debian/changelog/legacy-relations/build-spec/fill-values b/t/recipes/checks/debian/changelog/legacy-relations/build-spec/fill-values new file mode 100644 index 0000000..7e4661b --- /dev/null +++ b/t/recipes/checks/debian/changelog/legacy-relations/build-spec/fill-values @@ -0,0 +1,5 @@ +Skeleton: upload-native +Testname: legacy-relations +Source: relations +Version: 5 +Description: Legacy test "relations" diff --git a/t/recipes/checks/debian/changelog/legacy-relations/eval/desc b/t/recipes/checks/debian/changelog/legacy-relations/eval/desc new file mode 100644 index 0000000..5093618 --- /dev/null +++ b/t/recipes/checks/debian/changelog/legacy-relations/eval/desc @@ -0,0 +1,2 @@ +Testname: legacy-relations +Check: debian/changelog diff --git a/t/recipes/checks/debian/changelog/legacy-relations/eval/hints b/t/recipes/checks/debian/changelog/legacy-relations/eval/hints new file mode 100644 index 0000000..f3ccfcb --- /dev/null +++ b/t/recipes/checks/debian/changelog/legacy-relations/eval/hints @@ -0,0 +1 @@ +relations (binary): no-changelog usr/share/doc/relations/changelog.gz (native package) diff --git a/t/recipes/checks/debian/changelog/legacy-relations/eval/post-test b/t/recipes/checks/debian/changelog/legacy-relations/eval/post-test new file mode 100644 index 0000000..faeef0b --- /dev/null +++ b/t/recipes/checks/debian/changelog/legacy-relations/eval/post-test @@ -0,0 +1 @@ +s/\(current is ([0-9]+\.)+[0-9]\)/(current is CURRENT)/ diff --git a/t/recipes/checks/debian/changelog/missing-explicit-entry-fp-unrel/build-spec/fill-values b/t/recipes/checks/debian/changelog/missing-explicit-entry-fp-unrel/build-spec/fill-values new file mode 100644 index 0000000..806df46 --- /dev/null +++ b/t/recipes/checks/debian/changelog/missing-explicit-entry-fp-unrel/build-spec/fill-values @@ -0,0 +1,5 @@ +Testname: missing-explicit-entry-fp-unrel +Skeleton: upload-non-native +Version: 1.13.7-0.1 +Prev-Version: 1.13.2-1 +Description: Test for false positive of missing changelog entry, with a source NMU on a new upstream version. diff --git a/t/recipes/checks/debian/changelog/missing-explicit-entry-fp-unrel/eval/desc b/t/recipes/checks/debian/changelog/missing-explicit-entry-fp-unrel/eval/desc new file mode 100644 index 0000000..e6b2d13 --- /dev/null +++ b/t/recipes/checks/debian/changelog/missing-explicit-entry-fp-unrel/eval/desc @@ -0,0 +1,5 @@ +Testname: missing-explicit-entry-fp-unrel +Test-Against: + changelog-file-missing-explicit-entry +Check: debian/changelog +See-Also: Debian Bug #942411 diff --git a/t/recipes/checks/debian/changelog/missing-explicit-entry-fp-unrel/eval/hints b/t/recipes/checks/debian/changelog/missing-explicit-entry-fp-unrel/eval/hints new file mode 100644 index 0000000..e69de29 diff --git a/t/recipes/checks/debian/changelog/missing-explicit-entry-fp/build-spec/fill-values b/t/recipes/checks/debian/changelog/missing-explicit-entry-fp/build-spec/fill-values new file mode 100644 index 0000000..ced3c4e --- /dev/null +++ b/t/recipes/checks/debian/changelog/missing-explicit-entry-fp/build-spec/fill-values @@ -0,0 +1,5 @@ +Testname: missing-explicit-entry-fp +Skeleton: upload-non-native +Version: 1.2-0+deb9u1 +Prev-Version: 0.9-1 +Description: Test for missing (stable update, etc.) entries, false positive, exception on 0. diff --git a/t/recipes/checks/debian/changelog/missing-explicit-entry-fp/eval/desc b/t/recipes/checks/debian/changelog/missing-explicit-entry-fp/eval/desc new file mode 100644 index 0000000..b0514b1 --- /dev/null +++ b/t/recipes/checks/debian/changelog/missing-explicit-entry-fp/eval/desc @@ -0,0 +1,4 @@ +Testname: missing-explicit-entry-fp +Test-Against: + changelog-file-missing-explicit-entry +Check: debian/changelog diff --git a/t/recipes/checks/debian/changelog/missing-explicit-entry-fp/eval/hints b/t/recipes/checks/debian/changelog/missing-explicit-entry-fp/eval/hints new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/t/recipes/checks/debian/changelog/missing-explicit-entry-fp/eval/hints @@ -0,0 +1 @@ + diff --git a/t/recipes/checks/debian/changelog/nmu-local-changelog/build-spec/debian/changelog.in b/t/recipes/checks/debian/changelog/nmu-local-changelog/build-spec/debian/changelog.in new file mode 100644 index 0000000..8deb337 --- /dev/null +++ b/t/recipes/checks/debian/changelog/nmu-local-changelog/build-spec/debian/changelog.in @@ -0,0 +1,9 @@ +[% $source %] ([% $version %]) unstable; urgency=low + + * Local package. + * Lintian Test Suite. + * Test: [% $testname %] + + * Suppress "should close ITP bug" messages. (Closes: #123456) + + -- Russ Allbery [% $date %] diff --git a/t/recipes/checks/debian/changelog/nmu-local-changelog/build-spec/fill-values b/t/recipes/checks/debian/changelog/nmu-local-changelog/build-spec/fill-values new file mode 100644 index 0000000..2f60c73 --- /dev/null +++ b/t/recipes/checks/debian/changelog/nmu-local-changelog/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: upload-native +Testname: nmu-local-changelog +Description: Test suppression of NMU tags for local packages diff --git a/t/recipes/checks/debian/changelog/nmu-local-changelog/eval/desc b/t/recipes/checks/debian/changelog/nmu-local-changelog/eval/desc new file mode 100644 index 0000000..4140200 --- /dev/null +++ b/t/recipes/checks/debian/changelog/nmu-local-changelog/eval/desc @@ -0,0 +1,4 @@ +Testname: nmu-local-changelog +Test-Against: malformed-debian-changelog-version +See-Also: Debian Bug#501523 +Check: debian/changelog diff --git a/t/recipes/checks/debian/changelog/nmu-local-changelog/eval/hints b/t/recipes/checks/debian/changelog/nmu-local-changelog/eval/hints new file mode 100644 index 0000000..e69de29 diff --git a/t/recipes/checks/debian/changelog/nmu-local-version/build-spec/debian/changelog.in b/t/recipes/checks/debian/changelog/nmu-local-version/build-spec/debian/changelog.in new file mode 100644 index 0000000..8eba4c0 --- /dev/null +++ b/t/recipes/checks/debian/changelog/nmu-local-version/build-spec/debian/changelog.in @@ -0,0 +1,8 @@ +[% $source %] ([% $version %]) unstable; urgency=low + + * Lintian Test Suite. + * Test: [% $testname %] + + * Suppress "should close ITP bug" messages. (Closes: #123456) + + -- Russ Allbery [% $date %] diff --git a/t/recipes/checks/debian/changelog/nmu-local-version/build-spec/fill-values b/t/recipes/checks/debian/changelog/nmu-local-version/build-spec/fill-values new file mode 100644 index 0000000..e04302d --- /dev/null +++ b/t/recipes/checks/debian/changelog/nmu-local-version/build-spec/fill-values @@ -0,0 +1,4 @@ +Skeleton: upload-native +Testname: nmu-local-version +Version: 1.0local1 +Description: Test suppression of NMU tags for local packages diff --git a/t/recipes/checks/debian/changelog/nmu-local-version/eval/desc b/t/recipes/checks/debian/changelog/nmu-local-version/eval/desc new file mode 100644 index 0000000..1cffe96 --- /dev/null +++ b/t/recipes/checks/debian/changelog/nmu-local-version/eval/desc @@ -0,0 +1,4 @@ +Testname: nmu-local-version +Test-Against: malformed-debian-changelog-version +See-Also: Debian Bug#501523 +Check: debian/changelog diff --git a/t/recipes/checks/debian/changelog/nmu-local-version/eval/hints b/t/recipes/checks/debian/changelog/nmu-local-version/eval/hints new file mode 100644 index 0000000..e69de29 diff --git a/t/recipes/checks/debian/changelog/nmu-new-upstream-version/build-spec/debian/changelog.in b/t/recipes/checks/debian/changelog/nmu-new-upstream-version/build-spec/debian/changelog.in new file mode 100644 index 0000000..4017019 --- /dev/null +++ b/t/recipes/checks/debian/changelog/nmu-new-upstream-version/build-spec/debian/changelog.in @@ -0,0 +1,7 @@ +[% $source %] ([% $version %]) unstable; urgency=low + + * Non-maintainer upload. + * Lintian Test Suite. + * Test: [% $testname %] + + -- Thadeu Lima de Souza Cascardo [% $date %] diff --git a/t/recipes/checks/debian/changelog/nmu-new-upstream-version/build-spec/fill-values b/t/recipes/checks/debian/changelog/nmu-new-upstream-version/build-spec/fill-values new file mode 100644 index 0000000..409b82b --- /dev/null +++ b/t/recipes/checks/debian/changelog/nmu-new-upstream-version/build-spec/fill-values @@ -0,0 +1,4 @@ +Testname: nmu-new-upstream-version +Version: 3.1-0.1 +Description: Test for new upstream NMU versions +Skeleton: upload-non-native diff --git a/t/recipes/checks/debian/changelog/nmu-new-upstream-version/eval/desc b/t/recipes/checks/debian/changelog/nmu-new-upstream-version/eval/desc new file mode 100644 index 0000000..7f8b8b3 --- /dev/null +++ b/t/recipes/checks/debian/changelog/nmu-new-upstream-version/eval/desc @@ -0,0 +1,4 @@ +Testname: nmu-new-upstream-version +Test-Against: + malformed-debian-changelog-version +Check: debian/changelog diff --git a/t/recipes/checks/debian/changelog/nmu-new-upstream-version/eval/hints b/t/recipes/checks/debian/changelog/nmu-new-upstream-version/eval/hints new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/t/recipes/checks/debian/changelog/nmu-new-upstream-version/eval/hints @@ -0,0 +1 @@ + diff --git a/t/recipes/checks/debian/changelog/nmu-team-upload/build-spec/debian/changelog.in b/t/recipes/checks/debian/changelog/nmu-team-upload/build-spec/debian/changelog.in new file mode 100644 index 0000000..6745296 --- /dev/null +++ b/t/recipes/checks/debian/changelog/nmu-team-upload/build-spec/debian/changelog.in @@ -0,0 +1,9 @@ +[% $source %] ([% $version %]) unstable; urgency=low + + * Team upload. + * Lintian Test Suite. + * Test: [% $testname %] + + * Suppress "should close ITP bug" messages. (Closes: #123456) + + -- Russ Allbery [% $date %] diff --git a/t/recipes/checks/debian/changelog/nmu-team-upload/build-spec/fill-values b/t/recipes/checks/debian/changelog/nmu-team-upload/build-spec/fill-values new file mode 100644 index 0000000..0da98e2 --- /dev/null +++ b/t/recipes/checks/debian/changelog/nmu-team-upload/build-spec/fill-values @@ -0,0 +1,4 @@ +Skeleton: upload-native +Testname: nmu-team-upload +Version: 1.0+nmu1 +Description: Test for versioning of a team upload diff --git a/t/recipes/checks/debian/changelog/nmu-team-upload/eval/desc b/t/recipes/checks/debian/changelog/nmu-team-upload/eval/desc new file mode 100644 index 0000000..c867e9e --- /dev/null +++ b/t/recipes/checks/debian/changelog/nmu-team-upload/eval/desc @@ -0,0 +1,3 @@ +Testname: nmu-team-upload +Test-Against: malformed-debian-changelog-version +Check: debian/changelog diff --git a/t/recipes/checks/debian/changelog/nmu-team-upload/eval/hints b/t/recipes/checks/debian/changelog/nmu-team-upload/eval/hints new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/t/recipes/checks/debian/changelog/nmu-team-upload/eval/hints @@ -0,0 +1 @@ + diff --git a/t/recipes/checks/debian/changelog/package-version-0/build-spec/fill-values b/t/recipes/checks/debian/changelog/package-version-0/build-spec/fill-values new file mode 100644 index 0000000..d0d3daa --- /dev/null +++ b/t/recipes/checks/debian/changelog/package-version-0/build-spec/fill-values @@ -0,0 +1,4 @@ +Skeleton: source-native +Testname: package-version-0 +Version: 0 +Description: Test a package with version 0 diff --git a/t/recipes/checks/debian/changelog/package-version-0/eval/desc b/t/recipes/checks/debian/changelog/package-version-0/eval/desc new file mode 100644 index 0000000..98ff4b3 --- /dev/null +++ b/t/recipes/checks/debian/changelog/package-version-0/eval/desc @@ -0,0 +1,4 @@ +Testname: package-version-0 +Test-Against: + malformed-debian-changelog-version +Check: debian/changelog diff --git a/t/recipes/checks/debian/changelog/package-version-0/eval/hints b/t/recipes/checks/debian/changelog/package-version-0/eval/hints new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/t/recipes/checks/debian/changelog/package-version-0/eval/hints @@ -0,0 +1 @@ + diff --git a/t/recipes/checks/debian/changelog/sid-and-unstable-match-in-changes/build-spec/fill-values b/t/recipes/checks/debian/changelog/sid-and-unstable-match-in-changes/build-spec/fill-values new file mode 100644 index 0000000..373fa4c --- /dev/null +++ b/t/recipes/checks/debian/changelog/sid-and-unstable-match-in-changes/build-spec/fill-values @@ -0,0 +1,4 @@ +Testname: sid-and-unstable-match-in-changes +Skeleton: upload-native +Distribution: sid +Description: Test if Debian changelog is missing diff --git a/t/recipes/checks/debian/changelog/sid-and-unstable-match-in-changes/build-spec/post-build.in b/t/recipes/checks/debian/changelog/sid-and-unstable-match-in-changes/build-spec/post-build.in new file mode 100755 index 0000000..0048c4d --- /dev/null +++ b/t/recipes/checks/debian/changelog/sid-and-unstable-match-in-changes/build-spec/post-build.in @@ -0,0 +1,5 @@ +#!/bin/sh + +set -e + +perl -pi -e 's/(Distribution:\s*)sid/$1unstable/' "[% $build_product %]" diff --git a/t/recipes/checks/debian/changelog/sid-and-unstable-match-in-changes/eval/desc b/t/recipes/checks/debian/changelog/sid-and-unstable-match-in-changes/eval/desc new file mode 100644 index 0000000..7f785c9 --- /dev/null +++ b/t/recipes/checks/debian/changelog/sid-and-unstable-match-in-changes/eval/desc @@ -0,0 +1,4 @@ +Testname: sid-and-unstable-match-in-changes +Test-Against: + changelog-distribution-does-not-match-changes-file +Check: debian/changelog diff --git a/t/recipes/checks/debian/changelog/sid-and-unstable-match-in-changes/eval/hints b/t/recipes/checks/debian/changelog/sid-and-unstable-match-in-changes/eval/hints new file mode 100644 index 0000000..e69de29 diff --git a/t/recipes/checks/debian/changelog/spelling-general/build-spec/debian/changelog.in b/t/recipes/checks/debian/changelog/spelling-general/build-spec/debian/changelog.in new file mode 100644 index 0000000..2d380f5 --- /dev/null +++ b/t/recipes/checks/debian/changelog/spelling-general/build-spec/debian/changelog.in @@ -0,0 +1,13 @@ +[% $source %] ([% $version %]) unstable; urgency=low + + * Lintian Test Suite. + * Test: [% $testname %] + + * Suppress "should close ITP bug" messages. (Closes: #123456) + * This line has a speling error. + - This line has the same speling error, but we should only + get one tag for it. + * Corrected spelling: abov -> above. + * Corrected typo: abov -> above. + + -- [% $author %] [% $date %] diff --git a/t/recipes/checks/debian/changelog/spelling-general/build-spec/debian/copyright b/t/recipes/checks/debian/changelog/spelling-general/build-spec/debian/copyright new file mode 100644 index 0000000..30cbe5c --- /dev/null +++ b/t/recipes/checks/debian/changelog/spelling-general/build-spec/debian/copyright @@ -0,0 +1,21 @@ +This duplicate duplicate word should not trigger. (re. #897402) + +This is part of the testsuite of lintian. See the file debian/copyright +in the lintian source directory for more details. + +Insofar as this is copyrightable, it is: + + Copyright 2010 Russ Allbery + +This text should not generate a spelling error for "ment": + + computer software documentation," as such terms are used in + 48 C.F.R. 12.212 (SEPT 1995) and is provided to the U.S. Govern- + ment only as a commercial end item. Consistent with 48 C.F.R. + 12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4 (JUNE 1995), + +But deafult is still a spelling error. + +This text should not generate a spelling error for the duplicate "a" (re. #844166) + + following Attribution Information: (a) a copyright notice including the name diff --git a/t/recipes/checks/debian/changelog/spelling-general/build-spec/debian/doc-base b/t/recipes/checks/debian/changelog/spelling-general/build-spec/debian/doc-base new file mode 100644 index 0000000..3839a9b --- /dev/null +++ b/t/recipes/checks/debian/changelog/spelling-general/build-spec/debian/doc-base @@ -0,0 +1,9 @@ +Document: spelling-general +Title: Check for debian doc-base spelling errors +Author: Russ Allbery +Abstract: This control file exercises, picky, speling error checks for + Debian doc-base files, such as meta-package. +Section: Programming + +Format: text +Files: /usr/share/doc/spelling-general/copyright diff --git a/t/recipes/checks/debian/changelog/spelling-general/build-spec/debian/patches/add-readme b/t/recipes/checks/debian/changelog/spelling-general/build-spec/debian/patches/add-readme new file mode 100644 index 0000000..b1647ba --- /dev/null +++ b/t/recipes/checks/debian/changelog/spelling-general/build-spec/debian/patches/add-readme @@ -0,0 +1,8 @@ +This is a deliberate speling error. duplicate + +duplicate + +--- upstream.orig/README ++++ upstream/README +@@ -0,0 +1 @@ ++Added by patch system. diff --git a/t/recipes/checks/debian/changelog/spelling-general/build-spec/debian/patches/nonrel b/t/recipes/checks/debian/changelog/spelling-general/build-spec/debian/patches/nonrel new file mode 100644 index 0000000..48e7740 --- /dev/null +++ b/t/recipes/checks/debian/changelog/spelling-general/build-spec/debian/patches/nonrel @@ -0,0 +1,6 @@ +This is a deliberate speling error. (false positive; description mentions typo) + +--- upstream.orig/nonrel ++++ upstream/nonrel +@@ -0,0 +1 @@ ++Added by patch system. diff --git a/t/recipes/checks/debian/changelog/spelling-general/build-spec/debian/patches/series b/t/recipes/checks/debian/changelog/spelling-general/build-spec/debian/patches/series new file mode 100644 index 0000000..0bfb03d --- /dev/null +++ b/t/recipes/checks/debian/changelog/spelling-general/build-spec/debian/patches/series @@ -0,0 +1,3 @@ +add-readme +spelling +nonrel diff --git a/t/recipes/checks/debian/changelog/spelling-general/build-spec/debian/patches/spelling b/t/recipes/checks/debian/changelog/spelling-general/build-spec/debian/patches/spelling new file mode 100644 index 0000000..29b9cfd --- /dev/null +++ b/t/recipes/checks/debian/changelog/spelling-general/build-spec/debian/patches/spelling @@ -0,0 +1,6 @@ +This is a deliberate speling error. (false positive; filename match) + +--- upstream.orig/spelling ++++ upstream/spelling +@@ -0,0 +1 @@ ++Added by patch system. diff --git a/t/recipes/checks/debian/changelog/spelling-general/build-spec/fill-values b/t/recipes/checks/debian/changelog/spelling-general/build-spec/fill-values new file mode 100644 index 0000000..1c8c790 --- /dev/null +++ b/t/recipes/checks/debian/changelog/spelling-general/build-spec/fill-values @@ -0,0 +1,4 @@ +Testname: spelling-general +Skeleton: upload-non-native +Source-Format: 3.0 (quilt) +Description: General checks for spelling errors diff --git a/t/recipes/checks/debian/changelog/spelling-general/eval/desc b/t/recipes/checks/debian/changelog/spelling-general/eval/desc new file mode 100644 index 0000000..c42796e --- /dev/null +++ b/t/recipes/checks/debian/changelog/spelling-general/eval/desc @@ -0,0 +1,2 @@ +Testname: spelling-general +Check: debian/changelog diff --git a/t/recipes/checks/debian/changelog/spelling-general/eval/hints b/t/recipes/checks/debian/changelog/spelling-general/eval/hints new file mode 100644 index 0000000..70278a2 --- /dev/null +++ b/t/recipes/checks/debian/changelog/spelling-general/eval/hints @@ -0,0 +1 @@ +spelling-general (binary): spelling-error-in-changelog speling spelling [usr/share/doc/spelling-general/changelog.Debian.gz] diff --git a/t/recipes/checks/debian/changelog/two-dashes-in-non-native-version/build-spec/fill-values b/t/recipes/checks/debian/changelog/two-dashes-in-non-native-version/build-spec/fill-values new file mode 100644 index 0000000..073f011 --- /dev/null +++ b/t/recipes/checks/debian/changelog/two-dashes-in-non-native-version/build-spec/fill-values @@ -0,0 +1,4 @@ +Skeleton: upload-non-native +Testname: two-dashes-in-non-native-version +Version: 4.6.2-1-1 +Description: Two dashes in a non-native version diff --git a/t/recipes/checks/debian/changelog/two-dashes-in-non-native-version/eval/desc b/t/recipes/checks/debian/changelog/two-dashes-in-non-native-version/eval/desc new file mode 100644 index 0000000..2c2a6d1 --- /dev/null +++ b/t/recipes/checks/debian/changelog/two-dashes-in-non-native-version/eval/desc @@ -0,0 +1,3 @@ +Testname: two-dashes-in-non-native-version +Test-Against: malformed-debian-changelog-version +Check: debian/changelog diff --git a/t/recipes/checks/debian/changelog/two-dashes-in-non-native-version/eval/hints b/t/recipes/checks/debian/changelog/two-dashes-in-non-native-version/eval/hints new file mode 100644 index 0000000..c5e0665 --- /dev/null +++ b/t/recipes/checks/debian/changelog/two-dashes-in-non-native-version/eval/hints @@ -0,0 +1 @@ +two-dashes-in-non-native-version (source): hyphen-in-upstream-part-of-debian-changelog-version 4.6.2-1 [debian/changelog:1] diff --git a/t/recipes/checks/debian/control/field/adopted/control-file-general/build-spec/debian/control.in b/t/recipes/checks/debian/control/field/adopted/control-file-general/build-spec/debian/control.in new file mode 100644 index 0000000..3058e5a --- /dev/null +++ b/t/recipes/checks/debian/control/field/adopted/control-file-general/build-spec/debian/control.in @@ -0,0 +1,118 @@ +Source: [% $source %] +Priority: optional +Maintainer: [% $author %] +Standards-Version: [% $standards_version %] +Build-Depends: [% $build_depends %], + fiddle [amd64 powerpc mips mipsel hppa s390], + faddle + (>> + 2) [ + sparc i386 amd64 + ] +Build-Depends-Indep: perl (> 5.8) +Rules-Requires-Root: no +XS-Vcs-Svn: https://svn.example.com/[% $source %]/trunk +#Vcs-Git: git://git.debian.org/collab-maint/.git +#Vcs-Browser: http://git.debian.org/?p=collab-maint/.git;a=summary + +Package: [% $source %] +Section: [% $section %] +Maintainer: [% $author %] +Build-Conflicts: foo +Architecture: all +Pre-depends: ${misc:Pre-depends}, multiarch-support +Depends: [% $source %], foo, baz, ${shlibs:Depends} ${some:Depends}, ${misc:Depends} +Recommends: foo, bar, no-match${lintian:Foo}, match${lintian:Match}, no-match${lintian:Bar}-foo +Suggests: bar | baz, no-match${lintian:Bar}, match${lintian:Match} +Description: [% $description %] + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. + +Package: [% $source %]-1 +Section: [% $section %] +Architecture: all +Depends: ${shlibs:Depends}, ${misc:Depends} +Breaks: libsqlite3-0 (< 3.6.12) +Description: [% $description %] + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. + +Package: [% $source %]-2 +Section: [% $section %] +Architecture: all +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: [% $description %] (two) + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. + +Package: [% $source %]-3 +Section: [% $section %] +Architecture: all +Depends: ${shlibs:Depends}, ${misc:Depends}, foo (>= 1), + baz (<< 2), + fizz (= 2.0), gcc-${pv:gcc} ${reqv:gcc} +Description: [% $description %] (three) + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. + +Package: [% $source %]-4 +Section: [% $section %] +Architecture: all +Depends: ${shlibs:Depends}, ${misc:Depends}, foo | + bar (>= 1), baz +Description: [% $description %] (four) + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. + +Package: [% $source %]-5 +Section: [% $section %] +Architecture: all +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: Description: [% $description %] + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. + +Package: [% $source %]-dbgsym +Section: debug +Architecture: all +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: Description: dbg-sym + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. + +Package: [% $source %]-dbg +Section: debug +Architecture: all +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: Description: debug + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. + +Package: [% $source %]-udeb +Section: debian-installer +Package-Type: udeb +Architecture: all +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: [% $description %] (udeb) + udeb tests. + . + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. diff --git a/t/recipes/checks/debian/control/field/adopted/control-file-general/build-spec/debian/rules b/t/recipes/checks/debian/control/field/adopted/control-file-general/build-spec/debian/rules new file mode 100644 index 0000000..f5db4bb --- /dev/null +++ b/t/recipes/checks/debian/control/field/adopted/control-file-general/build-spec/debian/rules @@ -0,0 +1,8 @@ +#!/usr/bin/make -f +%: + dh $@ + +override_dh_gencontrol: + echo 'pv:gcc=4.3' >> debian/substvars + echo 'reqv:gcc=(>= 4.3-1)' >> debian/substvars + dh_gencontrol diff --git a/t/recipes/checks/debian/control/field/adopted/control-file-general/build-spec/fill-values b/t/recipes/checks/debian/control/field/adopted/control-file-general/build-spec/fill-values new file mode 100644 index 0000000..7338a95 --- /dev/null +++ b/t/recipes/checks/debian/control/field/adopted/control-file-general/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: upload-native +Testname: control-file-general +Description: Various problems with debian/control diff --git a/t/recipes/checks/debian/control/field/adopted/control-file-general/eval/desc b/t/recipes/checks/debian/control/field/adopted/control-file-general/eval/desc new file mode 100644 index 0000000..da4b5c8 --- /dev/null +++ b/t/recipes/checks/debian/control/field/adopted/control-file-general/eval/desc @@ -0,0 +1,11 @@ +Testname: control-file-general +Check: debian/control/field/adopted +See-Also: + Debian Bug#30020, + Debian Bug#409099, + Debian Bug#516706, + Debian Bug#533202, + Debian Bug#557971, + Debian Bug#573399, + Debian Bug#580494, + Debian Bug#657110 diff --git a/t/recipes/checks/debian/control/field/adopted/control-file-general/eval/hints b/t/recipes/checks/debian/control/field/adopted/control-file-general/eval/hints new file mode 100644 index 0000000..0c6607a --- /dev/null +++ b/t/recipes/checks/debian/control/field/adopted/control-file-general/eval/hints @@ -0,0 +1 @@ +control-file-general (source): adopted-extended-field (in section for source) XS-Vcs-Svn [debian/control:14] diff --git a/t/recipes/checks/debian/control/field/adopted/control-file-golang-xs-go-import-path/build-spec/debian/control-file-golang-xs-go-import-path.install b/t/recipes/checks/debian/control/field/adopted/control-file-golang-xs-go-import-path/build-spec/debian/control-file-golang-xs-go-import-path.install new file mode 100644 index 0000000..0ba75d6 --- /dev/null +++ b/t/recipes/checks/debian/control/field/adopted/control-file-golang-xs-go-import-path/build-spec/debian/control-file-golang-xs-go-import-path.install @@ -0,0 +1 @@ +static usr/lib/foo/ diff --git a/t/recipes/checks/debian/control/field/adopted/control-file-golang-xs-go-import-path/build-spec/debian/control.in b/t/recipes/checks/debian/control/field/adopted/control-file-golang-xs-go-import-path/build-spec/debian/control.in new file mode 100644 index 0000000..65425a5 --- /dev/null +++ b/t/recipes/checks/debian/control/field/adopted/control-file-golang-xs-go-import-path/build-spec/debian/control.in @@ -0,0 +1,42 @@ +Source: [% $source %] +Section: net +Priority: optional +Maintainer: [% $author %] +Standards-Version: [% $standards_version %] +Rules-Requires-Root: [% $rules_requires_root %] +Build-Depends: [% $build_depends %], + golang-go (>= 2:1.1.1-4) +XS-Go-Import-Path: github.com/Debian/lintian-test-package +Go-Import-Path: github.com/Debian/lintian-test-package + +Package: [% $source %] +Architecture: [% $package_architecture %] +Depends: ${misc:Depends} +Built-Using: ${misc:Built-Using} +Description: [% $description %] + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. + +Package: [% $source %]-dev +Architecture: all +Depends: ${misc:Depends} +Description: [% $description %] (dev) + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. + . + This package contains the source. + +Package: [% $source %]-clean-dev +Architecture: all +Depends: ${misc:Depends} +Description: [% $description %] (clean dev) + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. + . + This package contains the source, without a built-using tag. diff --git a/t/recipes/checks/debian/control/field/adopted/control-file-golang-xs-go-import-path/build-spec/fill-values b/t/recipes/checks/debian/control/field/adopted/control-file-golang-xs-go-import-path/build-spec/fill-values new file mode 100644 index 0000000..130e255 --- /dev/null +++ b/t/recipes/checks/debian/control/field/adopted/control-file-golang-xs-go-import-path/build-spec/fill-values @@ -0,0 +1,4 @@ +Skeleton: upload-native +Testname: control-file-golang-xs-go-import-path +Description: False-positive test for XS-Go-Import field +Package-Architecture: any diff --git a/t/recipes/checks/debian/control/field/adopted/control-file-golang-xs-go-import-path/build-spec/orig/Makefile b/t/recipes/checks/debian/control/field/adopted/control-file-golang-xs-go-import-path/build-spec/orig/Makefile new file mode 100644 index 0000000..6047afb --- /dev/null +++ b/t/recipes/checks/debian/control/field/adopted/control-file-golang-xs-go-import-path/build-spec/orig/Makefile @@ -0,0 +1,12 @@ +NOPIE_CFLAGS = $(filter-out -fPIE,$(CFLAGS)) +NOPIE_LDFLAGS = $(filter-out -fPIE -pie,$(LDFLAGS)) +COMPILE:= $(CC) $(NOPIE_CFLAGS) $(CPPFLAGS) $(NOPIE_LDFLAGS) + +all: + # static version + $(COMPILE) -static -o static basic.c + +clean distclean: + rm -f basic + +check test: diff --git a/t/recipes/checks/debian/control/field/adopted/control-file-golang-xs-go-import-path/build-spec/orig/basic.c b/t/recipes/checks/debian/control/field/adopted/control-file-golang-xs-go-import-path/build-spec/orig/basic.c new file mode 100644 index 0000000..7dea5a0 --- /dev/null +++ b/t/recipes/checks/debian/control/field/adopted/control-file-golang-xs-go-import-path/build-spec/orig/basic.c @@ -0,0 +1,12 @@ +#include + +int +main(void) +{ + char t[10]; + printf("Hello world!\n"); + /* Bad choice for reading from stdin, but it forces a stack + protector, so meh. + */ + gets (t); +} diff --git a/t/recipes/checks/debian/control/field/adopted/control-file-golang-xs-go-import-path/eval/desc b/t/recipes/checks/debian/control/field/adopted/control-file-golang-xs-go-import-path/eval/desc new file mode 100644 index 0000000..c5ce740 --- /dev/null +++ b/t/recipes/checks/debian/control/field/adopted/control-file-golang-xs-go-import-path/eval/desc @@ -0,0 +1,3 @@ +Testname: control-file-golang-xs-go-import-path +Test-Against: adopted-extended-field +Check: debian/control/field/adopted diff --git a/t/recipes/checks/debian/control/field/adopted/control-file-golang-xs-go-import-path/eval/hint b/t/recipes/checks/debian/control/field/adopted/control-file-golang-xs-go-import-path/eval/hint new file mode 100644 index 0000000..e69de29 diff --git a/t/recipes/checks/debian/control/field/adopted/control-file-golang-xs-go-import-path/eval/hints b/t/recipes/checks/debian/control/field/adopted/control-file-golang-xs-go-import-path/eval/hints new file mode 100644 index 0000000..e69de29 diff --git a/t/recipes/checks/debian/control/field/adopted/control-file-pedantic/build-spec/debian/control.in b/t/recipes/checks/debian/control/field/adopted/control-file-pedantic/build-spec/debian/control.in new file mode 100644 index 0000000..bb46277 --- /dev/null +++ b/t/recipes/checks/debian/control/field/adopted/control-file-pedantic/build-spec/debian/control.in @@ -0,0 +1,19 @@ +Source: [% $source %] +Priority: optional +Section: [% $section %] +Maintainer: [% $author %] +Standards-Version: [% $standards_version %] +Build-Depends: [% $build_depends %] +Rules-Requires-Root: no +Homepage: https://lintian.debian.org/ + +Package: [% $source %]-udeb +Section: debian-installer +Architecture: [% $package_architecture %] +Depends: ${misc:Depends} +XC-Package-Type: udeb +Description: [% $description %] + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. diff --git a/t/recipes/checks/debian/control/field/adopted/control-file-pedantic/build-spec/fill-values b/t/recipes/checks/debian/control/field/adopted/control-file-pedantic/build-spec/fill-values new file mode 100644 index 0000000..d31fe5e --- /dev/null +++ b/t/recipes/checks/debian/control/field/adopted/control-file-pedantic/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: upload-native +Testname: control-file-pedantic +Description: Pedantic tests for control file issues diff --git a/t/recipes/checks/debian/control/field/adopted/control-file-pedantic/eval/desc b/t/recipes/checks/debian/control/field/adopted/control-file-pedantic/eval/desc new file mode 100644 index 0000000..d8e0f7f --- /dev/null +++ b/t/recipes/checks/debian/control/field/adopted/control-file-pedantic/eval/desc @@ -0,0 +1,2 @@ +Testname: control-file-pedantic +Check: debian/control/field/adopted diff --git a/t/recipes/checks/debian/control/field/adopted/control-file-pedantic/eval/hints b/t/recipes/checks/debian/control/field/adopted/control-file-pedantic/eval/hints new file mode 100644 index 0000000..d3770ad --- /dev/null +++ b/t/recipes/checks/debian/control/field/adopted/control-file-pedantic/eval/hints @@ -0,0 +1 @@ +control-file-pedantic (source): adopted-extended-field (in section for control-file-pedantic-udeb) XC-Package-Type [debian/control:14] diff --git a/t/recipes/checks/debian/control/field/adopted/control-file-source-upload-to-non-free-without-autobuild/build-spec/debian/control.in b/t/recipes/checks/debian/control/field/adopted/control-file-source-upload-to-non-free-without-autobuild/build-spec/debian/control.in new file mode 100644 index 0000000..920b4e2 --- /dev/null +++ b/t/recipes/checks/debian/control/field/adopted/control-file-source-upload-to-non-free-without-autobuild/build-spec/debian/control.in @@ -0,0 +1,18 @@ +Source: [% $source %] +Priority: optional +Section: non-free/[% $section %] +Maintainer: [% $author %] +Standards-Version: [% $standards_version %] +Build-Depends: [% $build_depends %] +Rules-Requires-Root: no +XS-Autobuild: no +Autobuild: no + +Package: [% $source %] +Architecture: [% $package_architecture %] +Depends: ${misc:Depends} +Description: [% $description %] + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. diff --git a/t/recipes/checks/debian/control/field/adopted/control-file-source-upload-to-non-free-without-autobuild/build-spec/fill-values b/t/recipes/checks/debian/control/field/adopted/control-file-source-upload-to-non-free-without-autobuild/build-spec/fill-values new file mode 100644 index 0000000..07d27d1 --- /dev/null +++ b/t/recipes/checks/debian/control/field/adopted/control-file-source-upload-to-non-free-without-autobuild/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: upload-native +Testname: control-file-source-upload-to-non-free-without-autobuild +Description: Check for source-only uploads to non-free without autobuild diff --git a/t/recipes/checks/debian/control/field/adopted/control-file-source-upload-to-non-free-without-autobuild/eval/desc b/t/recipes/checks/debian/control/field/adopted/control-file-source-upload-to-non-free-without-autobuild/eval/desc new file mode 100644 index 0000000..d59a609 --- /dev/null +++ b/t/recipes/checks/debian/control/field/adopted/control-file-source-upload-to-non-free-without-autobuild/eval/desc @@ -0,0 +1,3 @@ +Testname: control-file-source-upload-to-non-free-without-autobuild +Test-Against: adopted-extended-field +Check: debian/control/field/adopted diff --git a/t/recipes/checks/debian/control/field/adopted/control-file-source-upload-to-non-free-without-autobuild/eval/hints b/t/recipes/checks/debian/control/field/adopted/control-file-source-upload-to-non-free-without-autobuild/eval/hints new file mode 100644 index 0000000..e69de29 diff --git a/t/recipes/checks/debian/control/field/adopted/legacy-binary/build-spec/debian/NEWS.Debian b/t/recipes/checks/debian/control/field/adopted/legacy-binary/build-spec/debian/NEWS.Debian new file mode 100644 index 0000000..29f561c --- /dev/null +++ b/t/recipes/checks/debian/control/field/adopted/legacy-binary/build-spec/debian/NEWS.Debian @@ -0,0 +1,12 @@ +binary (4-1.1) UNRELEASED; urgency=high + + This is a Debian NEWS entry that isn't encoded properly in UTF-8: . + It also has a usefull speling error. + + -- Russ Allbery Sun, 14 Oct 2007 17:11:36 -0700 + +binary (1) unstable; urgency=low + + This is another entry but this one isn't syntactically valid. + + -- Russ Allbery 2007-10-14 diff --git a/t/recipes/checks/debian/control/field/adopted/legacy-binary/build-spec/debian/README.Debian b/t/recipes/checks/debian/control/field/adopted/legacy-binary/build-spec/debian/README.Debian new file mode 100644 index 0000000..94bcc0a --- /dev/null +++ b/t/recipes/checks/debian/control/field/adopted/legacy-binary/build-spec/debian/README.Debian @@ -0,0 +1,5 @@ +this is a binary package to test lintian's handling of bins. +Check handling of D-Bus and dbus (neither of which should produce +warnings). + + -- Russ Allbery , Wed, 6 Feb 2008 18:35:11 -0800 diff --git a/t/recipes/checks/debian/control/field/adopted/legacy-binary/build-spec/debian/changelog.in b/t/recipes/checks/debian/control/field/adopted/legacy-binary/build-spec/debian/changelog.in new file mode 100644 index 0000000..39301d6 --- /dev/null +++ b/t/recipes/checks/debian/control/field/adopted/legacy-binary/build-spec/debian/changelog.in @@ -0,0 +1,47 @@ +binary ([% $version %]) [% $distribution %]; urgency=low + + * I'm doing an comaintainer-upload, acknowledging a NMU, but with a version + number which suggests I'm doing a NMU myself. + + Lintian-maintainers: Please don't update this changelog, otherwise you'll + probably break the checks/nmu checks. + + -- Jeroen van Wolffelaar Sun, 18 Apr 2004 01:49:42 +0200 + +binary (4-1) unstable; urgency=low + + * Weird version number for the new check for accidents with native + packaging. + * Date was fixed by BR and this test was put on changelog-file-strange-date + due to dpkg bug, see #794674. + + -- Marc 'HE' Brockschmidt Thu, 15 Apr 2004 23:33:51 +0200 + +binary (4) unstable; urgency=low + + * Add big file to /usr/share to trigger the big-usr-share check + + -- Jeroen van Wolffelaar Fri, 27 Feb 2004 10:15:59 +0100 + +binary (3) unstable; urgency=unlimited + + * Add some bogus menu entries using su-to-root in a bogus way + + -- Jeroen van Wolffelaar Thu, 12 Feb 2004 20:11:22 +0100 + +binary (2) unstable; urgency=low + + * Added an INSTALL document which policy 6.3 suggests not to do + + -- Sean 'Shaleh' Perry Tue, 30 Jan 2001 15:23:59 -0800 + +binary (1) unstable; urgency=low + + * hello.c added + * hello-static is same as hello, but compiled statically + * added a menu entry which lacks a Section + * added a postinst + * postinst calls suidregister which is no longer policy compliant + + -- Sean 'Shaleh' Perry Wed, 10 Jan 2001 08:55:34 -0800 + diff --git a/t/recipes/checks/debian/control/field/adopted/legacy-binary/build-spec/debian/conffiles b/t/recipes/checks/debian/control/field/adopted/legacy-binary/build-spec/debian/conffiles new file mode 100644 index 0000000..d1a0843 --- /dev/null +++ b/t/recipes/checks/debian/control/field/adopted/legacy-binary/build-spec/debian/conffiles @@ -0,0 +1 @@ +/etc/menu-methods/lintian diff --git a/t/recipes/checks/debian/control/field/adopted/legacy-binary/build-spec/debian/control b/t/recipes/checks/debian/control/field/adopted/legacy-binary/build-spec/debian/control new file mode 100644 index 0000000..c797357 --- /dev/null +++ b/t/recipes/checks/debian/control/field/adopted/legacy-binary/build-spec/debian/control @@ -0,0 +1,42 @@ +Source: binary +Section: misc +Priority: optional +Maintainer: Lintian Maintainers +Uploaders: Co-maintainer one , Jeroen van Wolffelaar , Co-maintainer three +Standards-Version: 3.2.1 +Homepage: http://lintian.debian.org/ +Vcs-Svn: http://svn.wolffelaar.nl/lintian/trunk +XS-Vcs-Browser: http://svn.wolffelaar.nl/lintian/trunk +XS-Dm-Upload-Allowed: yes + +Package: binary +Architecture: any +Pre-Depends: ${shlibs:Depends}, xorg, binary-data (= ${source:Version}), libssl0.9.8 +Homepage: +Vcs-Svn: http://svn.wolffelaar.nl/lintian/trunk +Description: test handling of binary files + Regression test for lintian's handling of binary files for debian. This + is checked for picky spelling errors. + . + This package list [ subversion | gconf ] should not be flagged as a spelling + mistake. The spelling correction for dont should be correct. + . + Homepage: http://lintian.debian.org/ + +Package: binary-data +Architecture: all +Depends: binary (= ${source:Version}), libssl-not-openssl, + libssl0.9.8 | or-something-else +Description: test handling of binary relationships + Regression test for lintian's checking of package relationships between + arch:any and arch:all packages. + . + This mention of subversion should be flagged as a spelling mistake. + +#Package: binary-comment +#Architecture: space-almonds +#Depends: * +#Depends: * +#Description: test comment support +# Yes, comments are actually allowed in debian/control, so none of the +# above should produce errors. diff --git a/t/recipes/checks/debian/control/field/adopted/legacy-binary/build-spec/debian/copyright b/t/recipes/checks/debian/control/field/adopted/legacy-binary/build-spec/debian/copyright new file mode 100644 index 0000000..1d6806d --- /dev/null +++ b/t/recipes/checks/debian/control/field/adopted/legacy-binary/build-spec/debian/copyright @@ -0,0 +1,15 @@ +hello.c is released under public domain. This is distributed in the hope that +it will be useful, but without any warranty; without even the implied warranty +of merchantability or fitness for a particular purpose. + +A reference to /usr/share/common-licenses/GPL-2 to make it look like this +package is under the GPL and trigger the OpenSSL warning. + +Test for old FSF address: + +Free Software Foundation, Inc., 59 Temple Place - Suite 330, +Boston, MA 02111-1307, USA. + +Test for deprecated ntionl ncoding. + +Improper capitalization of linux or debian isn't caught here. diff --git a/t/recipes/checks/debian/control/field/adopted/legacy-binary/build-spec/debian/doc-base b/t/recipes/checks/debian/control/field/adopted/legacy-binary/build-spec/debian/doc-base new file mode 100644 index 0000000..7e5b38f --- /dev/null +++ b/t/recipes/checks/debian/control/field/adopted/legacy-binary/build-spec/debian/doc-base @@ -0,0 +1,41 @@ +Document: binary!docs +Title: Broken debian binary doc-base control file +Author: Russ Allbery +Abstract: This control file exercises various tests of doc-base control + files, including several things that aren't tested yet. The third and + fourth one has trailing whitespace. + . + This section has a speling error and bad character. + . + The above separator was fine. +Section: Non/Existant +Unknown: Some field + + + +Format: debiandoc-sgML +Files: /usr/share/doc/binary/binary.sgml.gz +Unknown: Some field + +Format: ESP +Index: /usr/share/doc/binary/binary.txt + +Index: /usr/share/doc/binary/html/index.html + /usr/share/doc/binary/html/ch1.html + /usr/share/doc/binary/html/ch4.html + + +Format: HTML +Index: /usr/share/doc/binary/html/index.html +Files: /usr/share/doc/binary/html/ch?.h*l + /usr/share/doc/binary/hml/*.html + +Format: inFO +Files: /usr/share/info/binary.info.gz + +Format: HTML +Index: /usr/share/doc/binary/html/index.html +Files: /usr/share/doc/binary/html/ch5.html + /usr/share/doc/binary/html/ch6.html + + diff --git a/t/recipes/checks/debian/control/field/adopted/legacy-binary/build-spec/debian/goodbye.desktop b/t/recipes/checks/debian/control/field/adopted/legacy-binary/build-spec/debian/goodbye.desktop new file mode 100644 index 0000000..f6ce8e3 --- /dev/null +++ b/t/recipes/checks/debian/control/field/adopted/legacy-binary/build-spec/debian/goodbye.desktop @@ -0,0 +1,13 @@ +[Desktop Entry] +Name:Goodbye +# Name=Goodbye +Comment=Say hello! +SpecialTag=This doesn't exist! +Exec=goodbye +icon=hello +Terminal=true +Type=Application +Categories=WeirdStuff;Screensaver; +Encoding=ISO-10646-1 +[Other Entry] +Name=Goodbye diff --git a/t/recipes/checks/debian/control/field/adopted/legacy-binary/build-spec/debian/hello.desktop b/t/recipes/checks/debian/control/field/adopted/legacy-binary/build-spec/debian/hello.desktop new file mode 100644 index 0000000..f795468 --- /dev/null +++ b/t/recipes/checks/debian/control/field/adopted/legacy-binary/build-spec/debian/hello.desktop @@ -0,0 +1,14 @@ +# some random comment + +# [Foo Bar] +[KDE Desktop Entry] +Name=Hello +Name[en_US]=Hello +Comment=Say hello! +Exec=kdesu hello +Icon=hello +Terminal=true +Type=Application +Categories=GNOME;GTK;System;Applet;X-Foo;Settings; +Encoding=UTF-8 +OnlyShowIn=GNOME; diff --git a/t/recipes/checks/debian/control/field/adopted/legacy-binary/build-spec/debian/menu b/t/recipes/checks/debian/control/field/adopted/legacy-binary/build-spec/debian/menu new file mode 100644 index 0000000..e8972f4 --- /dev/null +++ b/t/recipes/checks/debian/control/field/adopted/legacy-binary/build-spec/debian/menu @@ -0,0 +1,26 @@ +?package(binary):needs=text title="Hello World" command="/usr/bin/hello" +?package(binary):needs=text section="Applications/System" title="Run cfdisk (0)" command="/usr/bin/su-to-root cfdisk" +?package(binary):needs="text" section="Applications/System/Hardware" title="Run cfdisk (1)" command="sux -p cfdisk" +?package(binary):needs="x11" section="Window Managers" title="Run xfdisk" command="/usr/sbin/su-to-root -c xfdisk" +?package(binary):needs="wm" section="Applications/System/Administration" title="Run fdisk-wm" command="su-to-root -c hello" +?package(binary):section="Apps/Games" title="I'm not root!" command="su-to-root -c imnothere" +?package(binary):needs="text" section="Apps/System" title="I'm not here!" command="/imnothere" +?package(binary,other-binary):\ + needs="text"\ + section="Applications/Shells"\ + title="more than one required"\ + command="other-bin -s omething" +?package(binary):needs="wmmodule" section="WindowManagers/Modules" title="somemodule" command="ModuleCmd" +?package(binary):needs="wmmodule" section="FVWM Modules" title="somemodule" command="ModuleCmd" +?package(binary):needs="text" section="Applications/System/Administration" title="I'm not in /usr/bin!" command="iminusrbin" +?package(binary):needs="text"\ + section="Applications/System/Administration"\ + title="I'm not root!" command="su-to-root -c imnothere" +?package(binary):needs="text" section="Applications/System/Administration"\ + title="Run cfdisk (0)" command="cfdisk" +?package(binary):needs="text" section="Applications/System/Administration" title="Hello World" command="/usr/bin/hello" +?package(binary):needs="wm" section="FVWM Modules" title="Fake Module" command="hello" +?package(binary):needs="fvwmmodule" section="Window Maker" title="Fake Module"\ + command="hello" +?package(binary):needs="x11" section="Applications/System/Hardware" title="Run xfdisk" command="su-to-root -c 'xfdisk -f'" +?package(binary):needs="text" section="Applications/System/Administration" title="foo" command="sh /path/to/foo" diff --git a/t/recipes/checks/debian/control/field/adopted/legacy-binary/build-spec/debian/menu-method b/t/recipes/checks/debian/control/field/adopted/legacy-binary/build-spec/debian/menu-method new file mode 100644 index 0000000..9f07bd7 --- /dev/null +++ b/t/recipes/checks/debian/control/field/adopted/legacy-binary/build-spec/debian/menu-method @@ -0,0 +1,22 @@ +#!/usr/bin/install-menu + +# -*- mode: shell-script; -*- +#I need menu-1! +# + +!include notmenu.h + +compat="menu-2" + +outputencoding="UTF-8"; +outputlanguage="C"; + +x11 = AppEntry("false"); +text = AppEntry("true"); + +startmenu = ""; +endmenu = ""; +submenutitle = ""; +rootprefix = "/var/lib/lintian/menu"; +userprefix = ".local/share/lintian/menu"; + diff --git a/t/recipes/checks/debian/control/field/adopted/legacy-binary/build-spec/debian/postinst b/t/recipes/checks/debian/control/field/adopted/legacy-binary/build-spec/debian/postinst new file mode 100644 index 0000000..29e1861 --- /dev/null +++ b/t/recipes/checks/debian/control/field/adopted/legacy-binary/build-spec/debian/postinst @@ -0,0 +1,6 @@ +#! /bin/bash -e + +if [ $1 eq 'configure' ] +then + suidregister hello-static root root 4755 +fi diff --git a/t/recipes/checks/debian/control/field/adopted/legacy-binary/build-spec/debian/rules b/t/recipes/checks/debian/control/field/adopted/legacy-binary/build-spec/debian/rules new file mode 100755 index 0000000..a962ea9 --- /dev/null +++ b/t/recipes/checks/debian/control/field/adopted/legacy-binary/build-spec/debian/rules @@ -0,0 +1,92 @@ +#!/usr/bin/make -f + +tmp=debian/tmp + +# This reference to $(PWD) should not cause an error but the one below +# should. +build-arch: + make + echo $(PWD) + +build: build-arch + +clean: + make -i clean + [ ! -f debian/files ] || rm -f debian/files + [ ! -f debian/substvars ] || rm -f debian/substvars + [ ! -d debian/tmp ] || rm -rf debian/tmp + [ ! -d debian/binary ] || rm -rf debian/binary + [ ! -d debian/binary-data ] || rm -rf debian/binary-data + +binary-arch: build + install -d $(tmp)/usr/bin + install -d $(tmp)/boot/hello + install -m 755 hello $(tmp)/usr/bin + touch $(tmp)/usr/bin/iminusrbin + chmod 755 $(tmp)/usr/bin/iminusrbin + install -m 755 hello-static $(tmp)/usr/bin + strip $(tmp)/usr/bin/hello-static + install -m 755 hello-static $(tmp)/usr/bin/hello.static + strip --remove-section=.comment --remove-section=.note $(tmp)/usr/bin/hello.static + ln $(tmp)/usr/bin/hello.static $(tmp)/usr/bin/static-hello + install -m 755 hello-static $(tmp)/boot/hello + strip --remove-section=.comment --remove-section=.note $(tmp)/boot/hello/hello-static + install -d $(tmp)/usr/share/doc/binary + install -m 644 INSTALL $(tmp)/usr/share/doc/binary + install -d $(tmp)/usr/share/doc/binary/html + echo '' > $(tmp)/usr/share/doc/binary/html/index.html + echo '' > $(tmp)/usr/share/doc/binary/html/ch1.html + ln -s ../html/./ch1.html $(tmp)/usr/share/doc/binary/html/ch2.html + ln -s /usr/share/doc/binary/htm/ch1.html $(tmp)/usr/share/doc/binary/html/ch3.html + echo '' > $(tmp)/usr/share/doc/binary/html/ch5.html + ln $(tmp)/usr/share/doc/binary/html/ch5.html \ + $(tmp)/usr/share/doc/binary/html/ch6.html + install -d $(tmp)/usr/share/menu + install -d $(tmp)/usr/lib/menu + install -d $(tmp)/usr/share/binary + install -m 644 debian/menu $(tmp)/usr/share/menu/binary + install -m 644 debian/menu $(tmp)/usr/lib/menu/binary + install -d $(tmp)/etc/menu-methods + install -m 755 debian/menu-method $(tmp)/etc/menu-methods/lintian + install -d $(tmp)/usr/share/doc-base + install -m 644 debian/doc-base $(tmp)/usr/share/doc-base/binary + touch '$(tmp)/usr/share/doc-base/space ' + install -m 644 debian/README.Debian $(tmp)/usr/share/doc/binary + install -m 644 debian/NEWS.Debian $(tmp)/usr/share/doc/binary + gzip -n -9 $(tmp)/usr/share/doc/binary/NEWS.Debian + install -m 644 debian/copyright $(tmp)/usr/share/doc/binary + install -m 644 debian/changelog $(tmp)/usr/share/doc/binary + #gzip -n -9 $(tmp)/usr/share/doc/binary/changelog + install -d $(tmp)/DEBIAN + install -m 755 debian/postinst $(tmp)/DEBIAN + install -m 644 debian/conffiles $(tmp)/DEBIAN + + install -d $(tmp)/usr/share/applications + install -m 644 debian/hello.desktop \ + $(tmp)/usr/share/applications/hello.desktop + install -m 755 debian/goodbye.desktop \ + $(tmp)/usr/share/applications/goodbye.desktop + + # should be ok... + echo boe > $(tmp)/usr/bar + ln $(tmp)/usr/bar $(tmp)/usr/foo + # but this isn't + echo boe > $(tmp)/usr/bar2 + ln $(tmp)/usr/bar2 $(tmp)/usr/share/baz + + dd if=/dev/zero of=$(tmp)/usr/share/binary/largefile bs=1024 count=4000 + + install -d debian/binary-data/DEBIAN + install -d debian/binary-data/usr/share/doc + ln -s binary debian/binary-data/usr/share/doc/binary-data + + dpkg-shlibdeps $(tmp)/usr/bin/hello + dpkg-gencontrol -pbinary -isp + dpkg-gencontrol -pbinary-data -Pdebian/binary-data -isp + + dpkg --build debian/tmp .. + dpkg --build debian/binary-data .. + +binary: binary-arch + +.PHONY: build-arch build binary-arch binary clean diff --git a/t/recipes/checks/debian/control/field/adopted/legacy-binary/build-spec/debian/templates b/t/recipes/checks/debian/control/field/adopted/legacy-binary/build-spec/debian/templates new file mode 100644 index 0000000..3d92861 --- /dev/null +++ b/t/recipes/checks/debian/control/field/adopted/legacy-binary/build-spec/debian/templates @@ -0,0 +1,16 @@ +# The debconf templates defined here are the sort that you'd use if +# providing a wordlist and an ispell dictionary for the language +# "perl". This shouldn't trigger warnings about not using debconf-po. + +Template: shared/packages-ispell +Type: text +Description: + +Template: shared/packages-wordlist +Type: text +Description: + +Template: miscfiles/languages +Type: text +Default: perl (Pathologically Eclectic Rubbish Lister) +Description: diff --git a/t/recipes/checks/debian/control/field/adopted/legacy-binary/build-spec/fill-values b/t/recipes/checks/debian/control/field/adopted/legacy-binary/build-spec/fill-values new file mode 100644 index 0000000..b503871 --- /dev/null +++ b/t/recipes/checks/debian/control/field/adopted/legacy-binary/build-spec/fill-values @@ -0,0 +1,5 @@ +Skeleton: upload-non-native +Testname: legacy-binary +Source: binary +Version: 4-1.1 +Description: Legacy test "binary" diff --git a/t/recipes/checks/debian/control/field/adopted/legacy-binary/build-spec/orig/INSTALL b/t/recipes/checks/debian/control/field/adopted/legacy-binary/build-spec/orig/INSTALL new file mode 100644 index 0000000..3b50ea9 --- /dev/null +++ b/t/recipes/checks/debian/control/field/adopted/legacy-binary/build-spec/orig/INSTALL @@ -0,0 +1,176 @@ +Basic Installation +================== + + These are generic installation instructions. + + The `configure' shell script attempts to guess correct values for +various system-dependent variables used during compilation. It uses +those values to create a `Makefile' in each directory of the package. +It may also create one or more `.h' files containing system-dependent +definitions. Finally, it creates a shell script `config.status' that +you can run in the future to recreate the current configuration, a file +`config.cache' that saves the results of its tests to speed up +reconfiguring, and a file `config.log' containing compiler output +(useful mainly for debugging `configure'). + + If you need to do unusual things to compile the package, please try +to figure out how `configure' could check whether to do them, and mail +diffs or instructions to the address given in the `README' so they can +be considered for the next release. If at some point `config.cache' +contains results you don't want to keep, you may remove or edit it. + + The file `configure.in' is used to create `configure' by a program +called `autoconf'. You only need `configure.in' if you want to change +it or regenerate `configure' using a newer version of `autoconf'. + +The simplest way to compile this package is: + + 1. `cd' to the directory containing the package's source code and type + `./configure' to configure the package for your system. If you're + using `csh' on an old version of System V, you might need to type + `sh ./configure' instead to prevent `csh' from trying to execute + `configure' itself. + + Running `configure' takes a while. While running, it prints some + messages telling which features it is checking for. + + 2. Type `make' to compile the package. + + 3. Optionally, type `make check' to run any self-tests that come with + the package. + + 4. Type `make install' to install the programs and any data files and + documentation. + + 5. You can remove the program binaries and object files from the + source code directory by typing `make clean'. To also remove the + files that `configure' created (so you can compile the package for + a different kind of computer), type `make distclean'. There is + also a `make maintainer-clean' target, but that is intended mainly + for the package's developers. If you use it, you may have to get + all sorts of other programs in order to regenerate files that came + with the distribution. + +Compilers and Options +===================== + + Some systems require unusual options for compilation or linking that +the `configure' script does not know about. You can give `configure' +initial values for variables by setting them in the environment. Using +a Bourne-compatible shell, you can do that on the command line like +this: + CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure + +Or on systems that have the `env' program, you can do it like this: + env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure + +Compiling For Multiple Architectures +==================================== + + You can compile the package for more than one kind of computer at the +same time, by placing the object files for each architecture in their +own directory. To do this, you must use a version of `make' that +supports the `VPATH' variable, such as GNU `make'. `cd' to the +directory where you want the object files and executables to go and run +the `configure' script. `configure' automatically checks for the +source code in the directory that `configure' is in and in `..'. + + If you have to use a `make' that does not supports the `VPATH' +variable, you have to compile the package for one architecture at a time +in the source code directory. After you have installed the package for +one architecture, use `make distclean' before reconfiguring for another +architecture. + +Installation Names +================== + + By default, `make install' will install the package's files in +`/usr/local/bin', `/usr/local/man', etc. You can specify an +installation prefix other than `/usr/local' by giving `configure' the +option `--prefix=PATH'. + + You can specify separate installation prefixes for +architecture-specific files and architecture-independent files. If you +give `configure' the option `--exec-prefix=PATH', the package will use +PATH as the prefix for installing programs and libraries. +Documentation and other data files will still use the regular prefix. + + If the package supports it, you can cause programs to be installed +with an extra prefix or suffix on their names by giving `configure' the +option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. + +Optional Features +================= + + Some packages pay attention to `--enable-FEATURE' options to +`configure', where FEATURE indicates an optional part of the package. +They may also pay attention to `--with-PACKAGE' options, where PACKAGE +is something like `gnu-as' or `x' (for the X Window System). The +`README' should mention any `--enable-' and `--with-' options that the +package recognizes. + + For packages that use the X Window System, `configure' can usually +find the X include and library files automatically, but if it doesn't, +you can use the `configure' options `--x-includes=DIR' and +`--x-libraries=DIR' to specify their locations. + +Specifying the System Type +========================== + + There may be some features `configure' can not figure out +automatically, but needs to determine by the type of host the package +will run on. Usually `configure' can figure that out, but if it prints +a message saying it can not guess the host type, give it the +`--host=TYPE' option. TYPE can either be a short name for the system +type, such as `sun4', or a canonical name with three fields: + CPU-COMPANY-SYSTEM + +See the file `config.sub' for the possible values of each field. If +`config.sub' isn't included in this package, then this package doesn't +need to know the host type. + + If you are building compiler tools for cross-compiling, you can also +use the `--target=TYPE' option to select the type of system they will +produce code for and the `--build=TYPE' option to select the type of +system on which you are compiling the package. + +Sharing Defaults +================ + + If you want to set default values for `configure' scripts to share, +you can create a site shell script called `config.site' that gives +default values for variables like `CC', `cache_file', and `prefix'. +`configure' looks for `PREFIX/share/config.site' if it exists, then +`PREFIX/etc/config.site' if it exists. Or, you can set the +`CONFIG_SITE' environment variable to the location of the site script. +A warning: not all `configure' scripts look for a site script. + +Operation Controls +================== + + `configure' recognizes the following options to control how it +operates. + +`--cache-file=FILE' + Use and save the results of the tests in FILE instead of + `./config.cache'. Set FILE to `/dev/null' to disable caching, for + debugging `configure'. + +`--help' + Print a summary of the options to `configure', and exit. + +`--quiet' +`--silent' +`-q' + Do not print messages saying which checks are being made. + +`--srcdir=DIR' + Look for the package's source code in directory DIR. Usually + `configure' can determine that directory automatically. + +`--version' + Print the version of Autoconf used to generate the `configure' + script, and exit. + +`configure' also accepts some other, not widely useful, options. + diff --git a/t/recipes/checks/debian/control/field/adopted/legacy-binary/build-spec/orig/Makefile b/t/recipes/checks/debian/control/field/adopted/legacy-binary/build-spec/orig/Makefile new file mode 100644 index 0000000..da1dc55 --- /dev/null +++ b/t/recipes/checks/debian/control/field/adopted/legacy-binary/build-spec/orig/Makefile @@ -0,0 +1,12 @@ +all: hello hello-static + +hello: hello.c + gcc hello.c -o hello + +hello-static: hello.c + gcc -static hello.c -o hello-static + +clean: + rm -f hello hello-static + +distclean: clean diff --git a/t/recipes/checks/debian/control/field/adopted/legacy-binary/build-spec/orig/hello.c b/t/recipes/checks/debian/control/field/adopted/legacy-binary/build-spec/orig/hello.c new file mode 100644 index 0000000..2fb04e1 --- /dev/null +++ b/t/recipes/checks/debian/control/field/adopted/legacy-binary/build-spec/orig/hello.c @@ -0,0 +1,8 @@ +#include +#include + +int main(int argc, char *argv[]) { + + printf("Hello, World!\n"); + exit(0); +} diff --git a/t/recipes/checks/debian/control/field/adopted/legacy-binary/eval/desc b/t/recipes/checks/debian/control/field/adopted/legacy-binary/eval/desc new file mode 100644 index 0000000..700e237 --- /dev/null +++ b/t/recipes/checks/debian/control/field/adopted/legacy-binary/eval/desc @@ -0,0 +1,2 @@ +Testname: legacy-binary +Check: debian/control/field/adopted diff --git a/t/recipes/checks/debian/control/field/adopted/legacy-binary/eval/hints b/t/recipes/checks/debian/control/field/adopted/legacy-binary/eval/hints new file mode 100644 index 0000000..bf0c2ff --- /dev/null +++ b/t/recipes/checks/debian/control/field/adopted/legacy-binary/eval/hints @@ -0,0 +1,2 @@ +binary (source): adopted-extended-field (in section for source) XS-Vcs-Browser [debian/control:9] +binary (source): adopted-extended-field (in section for source) XS-Dm-Upload-Allowed [debian/control:10] diff --git a/t/recipes/checks/debian/control/field/adopted/legacy-binary/eval/post-test b/t/recipes/checks/debian/control/field/adopted/legacy-binary/eval/post-test new file mode 100644 index 0000000..3deefd5 --- /dev/null +++ b/t/recipes/checks/debian/control/field/adopted/legacy-binary/eval/post-test @@ -0,0 +1,3 @@ +s/arch-dep-package-has-big-usr-share .*kB .*%/arch-dep-package-has-big-usr-share/ +/: hardening-.*/ d +s/\(current is ([0-9]+\.)+[0-9]\)/(current is CURRENT)/ diff --git a/t/recipes/checks/debian/control/field/adopted/legacy-foo++/build-spec/debian/README.Debian b/t/recipes/checks/debian/control/field/adopted/legacy-foo++/build-spec/debian/README.Debian new file mode 100644 index 0000000..87bfcdf --- /dev/null +++ b/t/recipes/checks/debian/control/field/adopted/legacy-foo++/build-spec/debian/README.Debian @@ -0,0 +1,7 @@ +foo++ for Debian +---------------- + +This should trigger a warning, as i use a fake mail address. + + -- Marc 'HE' Brockschmidt , Wed, 14 Apr 2004 01:44:18 +0200 + diff --git a/t/recipes/checks/debian/control/field/adopted/legacy-foo++/build-spec/debian/changelog.in b/t/recipes/checks/debian/control/field/adopted/legacy-foo++/build-spec/debian/changelog.in new file mode 100644 index 0000000..f838939 --- /dev/null +++ b/t/recipes/checks/debian/control/field/adopted/legacy-foo++/build-spec/debian/changelog.in @@ -0,0 +1,31 @@ +foo++ ([% $version %]) [% $distribution %]; urgency=low + + * Add a fake README.Debian to trigger a warning. + * This should trigger + debian-changelog-file-contains-debmake-default-email-address. + + -- Marc 'HE' Brockschmidt Wed, 14 Apr 2003 01:35:47 +0200 + +foo++ (4) unstable; urgency=low + + * This changelog now includes a ISO-8859-1 character: '' + + -- Frank Lichtenheld Fri, 5 Mar 2004 13:41:39 +0100 + +foo++ (3) unstable; urgency=low + + * Set maintainers + uploaders incorrectly + + -- Jeroen van Wolffelaar Fri, 5 Mar 2004 04:20:24 +0100 + +foo++ (2) unstable; urgency=low + + * Added a foo++-helper package to try and catch even more ++ bugs. + + -- Sean 'Shaleh' Perry Sat, 10 Feb 2001 23:16:17 -0800 + +foo++ (1) unstable; urgency=low + + * Initial version + + -- Sean 'Shaleh' Perry Thu, 16 Nov 2000 09:11:40 -0800 diff --git a/t/recipes/checks/debian/control/field/adopted/legacy-foo++/build-spec/debian/control b/t/recipes/checks/debian/control/field/adopted/legacy-foo++/build-spec/debian/control new file mode 100644 index 0000000..1e276d7 --- /dev/null +++ b/t/recipes/checks/debian/control/field/adopted/legacy-foo++/build-spec/debian/control @@ -0,0 +1,30 @@ +Source: foo++ +Section: misc +Priority: optional +Maintainer: Lintian Maintainer +Uploaders: Marc 'HE' Brockschmidt , Jeroen van Wolffelaar, + Frank , Yama@gotchi, Josip, + I am afraid of spam and think this helps +Standards-Version: 3.1.1 +XS-Dm-Upload-Allowed: no + +Package: foo++ +Architecture: all +Build-Depends: test +Depends: test, libssl0.9.7 +Description: see how lintian reacts to plus signs in the package name + Regression test to see if lintian tests work on a package with plus signs in + its name. + . + This description also uses some UTF8 high bytes chars: ÄÖÜß + +Package: foo++-helper +Architecture: all +Depends: test, foo++ +Description: see how lintian reacts to plus signs in the package name + Regression test to see if lintian tests work on a package with plus signs in + its name. This has /usr/share/doc links to foo++ to trigger even more checks. + . + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. diff --git a/t/recipes/checks/debian/control/field/adopted/legacy-foo++/build-spec/debian/copyright b/t/recipes/checks/debian/control/field/adopted/legacy-foo++/build-spec/debian/copyright new file mode 100644 index 0000000..e2d6d93 --- /dev/null +++ b/t/recipes/checks/debian/control/field/adopted/legacy-foo++/build-spec/debian/copyright @@ -0,0 +1,7 @@ +A reference to /usr/share/common-licenses/GPL to make it look like this +package is under the GPL and trigger the OpenSSL warning. + +However, there is also a reference to /usr/share/common-licenses/LGPL, so +who knows what bits actually depend on libssl. + +Copr. 2007 Somebody. diff --git a/t/recipes/checks/debian/control/field/adopted/legacy-foo++/build-spec/debian/rules b/t/recipes/checks/debian/control/field/adopted/legacy-foo++/build-spec/debian/rules new file mode 100755 index 0000000..63bb4db --- /dev/null +++ b/t/recipes/checks/debian/control/field/adopted/legacy-foo++/build-spec/debian/rules @@ -0,0 +1,36 @@ +#!/usr/bin/make -f + +foo=foo++ +helper=foo++-helper + +build-arch: + +build-indep: + +build: build-arch build-indep + +binary-arch: + +binary-indep: + install -d debian/$(foo)/DEBIAN + install -d debian/$(foo)/usr/share/doc/$(foo) + install -m 644 debian/changelog \ + debian/$(foo)/usr/share/doc/$(foo)/changelog + gzip -n -9 debian/$(foo)/usr/share/doc/$(foo)/changelog + install -m 644 debian/README.Debian \ + debian/$(foo)/usr/share/doc/$(foo)/README.Debian + gzip -n -9 debian/$(foo)/usr/share/doc/$(foo)/README.Debian + dpkg-gencontrol -isp -p$(foo) -Pdebian/$(foo) + dpkg --build debian/$(foo) .. + + install -d debian/$(helper)/DEBIAN + install -d debian/$(helper)/usr/share/doc/ + ln -sf $(foo) debian/$(helper)/usr/share/doc/$(helper) + dpkg-gencontrol -isp -p$(helper) -Pdebian/$(helper) + dpkg --build debian/$(helper) .. + +binary: binary-arch binary-indep + +clean: + +.PHONY: build-arch build-indep build binary-arch binary-indep binary clean diff --git a/t/recipes/checks/debian/control/field/adopted/legacy-foo++/build-spec/debian/watch b/t/recipes/checks/debian/control/field/adopted/legacy-foo++/build-spec/debian/watch new file mode 100644 index 0000000..26f9a3c --- /dev/null +++ b/t/recipes/checks/debian/control/field/adopted/legacy-foo++/build-spec/debian/watch @@ -0,0 +1,6 @@ +# A comment \ +version=0 + +# uscan does not interpret the backslash above, it is just part of the comment + +http://domain.tld/file-(.*)\.tar\.gz diff --git a/t/recipes/checks/debian/control/field/adopted/legacy-foo++/build-spec/fill-values b/t/recipes/checks/debian/control/field/adopted/legacy-foo++/build-spec/fill-values new file mode 100644 index 0000000..86d43bc --- /dev/null +++ b/t/recipes/checks/debian/control/field/adopted/legacy-foo++/build-spec/fill-values @@ -0,0 +1,5 @@ +Skeleton: upload-native +Testname: legacy-foo++ +Source: foo++ +Version: 5 +Description: Legacy test "foo++" diff --git a/t/recipes/checks/debian/control/field/adopted/legacy-foo++/eval/desc b/t/recipes/checks/debian/control/field/adopted/legacy-foo++/eval/desc new file mode 100644 index 0000000..4f6731b --- /dev/null +++ b/t/recipes/checks/debian/control/field/adopted/legacy-foo++/eval/desc @@ -0,0 +1,2 @@ +Testname: legacy-foo++ +Check: debian/control/field/adopted diff --git a/t/recipes/checks/debian/control/field/adopted/legacy-foo++/eval/hints b/t/recipes/checks/debian/control/field/adopted/legacy-foo++/eval/hints new file mode 100644 index 0000000..7d978ef --- /dev/null +++ b/t/recipes/checks/debian/control/field/adopted/legacy-foo++/eval/hints @@ -0,0 +1 @@ +foo++ (source): adopted-extended-field (in section for source) XS-Dm-Upload-Allowed [debian/control:9] diff --git a/t/recipes/checks/debian/control/field/adopted/legacy-foo++/eval/post-test b/t/recipes/checks/debian/control/field/adopted/legacy-foo++/eval/post-test new file mode 100644 index 0000000..faeef0b --- /dev/null +++ b/t/recipes/checks/debian/control/field/adopted/legacy-foo++/eval/post-test @@ -0,0 +1 @@ +s/\(current is ([0-9]+\.)+[0-9]\)/(current is CURRENT)/ diff --git a/t/recipes/checks/debian/control/field/adopted/testsuite-unknown-suite/build-spec/debian/control.in b/t/recipes/checks/debian/control/field/adopted/testsuite-unknown-suite/build-spec/debian/control.in new file mode 100644 index 0000000..b8807cf --- /dev/null +++ b/t/recipes/checks/debian/control/field/adopted/testsuite-unknown-suite/build-spec/debian/control.in @@ -0,0 +1,17 @@ +Source: [% $source %] +Priority: optional +Section: [% $section %] +Maintainer: [% $author %] +Standards-Version: [% $standards_version %] +Build-Depends: [% $build_depends %] +Rules-Requires-Root: no +XS-Testsuite: autopkgtest, golf + +Package: [% $source %] +Architecture: [% $package_architecture %] +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: [% $description %] + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. diff --git a/t/recipes/checks/debian/control/field/adopted/testsuite-unknown-suite/build-spec/debian/tests/control b/t/recipes/checks/debian/control/field/adopted/testsuite-unknown-suite/build-spec/debian/tests/control new file mode 100644 index 0000000..19e2aee --- /dev/null +++ b/t/recipes/checks/debian/control/field/adopted/testsuite-unknown-suite/build-spec/debian/tests/control @@ -0,0 +1 @@ +Tests: test-1 diff --git a/t/recipes/checks/debian/control/field/adopted/testsuite-unknown-suite/build-spec/debian/tests/test-1 b/t/recipes/checks/debian/control/field/adopted/testsuite-unknown-suite/build-spec/debian/tests/test-1 new file mode 100644 index 0000000..039e4d0 --- /dev/null +++ b/t/recipes/checks/debian/control/field/adopted/testsuite-unknown-suite/build-spec/debian/tests/test-1 @@ -0,0 +1,2 @@ +#!/bin/sh +exit 0 diff --git a/t/recipes/checks/debian/control/field/adopted/testsuite-unknown-suite/build-spec/fill-values b/t/recipes/checks/debian/control/field/adopted/testsuite-unknown-suite/build-spec/fill-values new file mode 100644 index 0000000..11a2f63 --- /dev/null +++ b/t/recipes/checks/debian/control/field/adopted/testsuite-unknown-suite/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: upload-native +Testname: testsuite-unknown-suite +Description: Tests for unknown suite in the control being non-file diff --git a/t/recipes/checks/debian/control/field/adopted/testsuite-unknown-suite/eval/desc b/t/recipes/checks/debian/control/field/adopted/testsuite-unknown-suite/eval/desc new file mode 100644 index 0000000..e36143f --- /dev/null +++ b/t/recipes/checks/debian/control/field/adopted/testsuite-unknown-suite/eval/desc @@ -0,0 +1,2 @@ +Testname: testsuite-unknown-suite +Check: debian/control/field/adopted diff --git a/t/recipes/checks/debian/control/field/adopted/testsuite-unknown-suite/eval/hints b/t/recipes/checks/debian/control/field/adopted/testsuite-unknown-suite/eval/hints new file mode 100644 index 0000000..ad57ccd --- /dev/null +++ b/t/recipes/checks/debian/control/field/adopted/testsuite-unknown-suite/eval/hints @@ -0,0 +1 @@ +testsuite-unknown-suite (source): adopted-extended-field (in section for source) XS-Testsuite [debian/control:8] diff --git a/t/recipes/checks/debian/control/field/architecture/multiline/control-file-important-space/build-spec/debian/control.in b/t/recipes/checks/debian/control/field/architecture/multiline/control-file-important-space/build-spec/debian/control.in new file mode 100644 index 0000000..25e3070 --- /dev/null +++ b/t/recipes/checks/debian/control/field/architecture/multiline/control-file-important-space/build-spec/debian/control.in @@ -0,0 +1,43 @@ +Source: [% $source %] +Priority: optional +Section: [% $section %] +Maintainer: [% $author %] +Standards-Version: [% $standards_version %] +Build-Depends: [% $build_depends %] +Rules-Requires-Root: no +Homepage: http://lintian.debian.org/ + +Package: [% $source %]-broken +Architecture: any-amd64 any-arm64 any-mips64 any-mips64el any-ia64 + any-ppc64 any-ppc64el any-sparc64 +Depends: ${misc:Depends} +Description: [% $description %] (multiline architecture, broken) + This is a (broken) test package designed to exercise some feature or + tag of Lintian. It is part of the Lintian test suite and may do very + odd things. It should not be installed like a regular package. It + may be an empty package. + . + The Architecture (multi-)line example above is taken from + https://bugs.debian.org/780473 + +Package: [% $source %]-fine-any-something +Architecture: any-amd64 any-arm64 any-mips64 any-mips64el any-ia64 any-ppc64 any-ppc64el any-sparc64 +Depends: ${misc:Depends} +Description: [% $description %] (any-something, fine) + This is a (non-broken) test package designed to exercise some feature + or tag of Lintian. It is part of the Lintian test suite and may do + very odd things. It should not be installed like a regular package. + It may be an empty package. + . + This "any-something" package should not show up. + +Package: [% $source %]-fine-all +Architecture: all +Depends: ${misc:Depends} +Description: [% $description %] (all, fine) + This is a (non-broken) test package designed to exercise some feature + or tag of Lintian. It is part of the Lintian test suite and may do + very odd things. It should not be installed like a regular package. + It may be an empty package. + . + This "all" package should not show up. diff --git a/t/recipes/checks/debian/control/field/architecture/multiline/control-file-important-space/build-spec/fill-values b/t/recipes/checks/debian/control/field/architecture/multiline/control-file-important-space/build-spec/fill-values new file mode 100644 index 0000000..b1b9f17 --- /dev/null +++ b/t/recipes/checks/debian/control/field/architecture/multiline/control-file-important-space/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: upload-native +Testname: control-file-important-space +Description: Important tests for control file spacing diff --git a/t/recipes/checks/debian/control/field/architecture/multiline/control-file-important-space/eval/desc b/t/recipes/checks/debian/control/field/architecture/multiline/control-file-important-space/eval/desc new file mode 100644 index 0000000..1fcd3a9 --- /dev/null +++ b/t/recipes/checks/debian/control/field/architecture/multiline/control-file-important-space/eval/desc @@ -0,0 +1,2 @@ +Testname: control-file-important-space +Check: debian/control/field/architecture/multiline diff --git a/t/recipes/checks/debian/control/field/architecture/multiline/control-file-important-space/eval/hints b/t/recipes/checks/debian/control/field/architecture/multiline/control-file-important-space/eval/hints new file mode 100644 index 0000000..366ed52 --- /dev/null +++ b/t/recipes/checks/debian/control/field/architecture/multiline/control-file-important-space/eval/hints @@ -0,0 +1 @@ +control-file-important-space (source): multiline-architecture-field Architecture (in section for control-file-important-space-broken) [debian/control:11] diff --git a/t/recipes/checks/debian/control/field/build-profiles/fields-build-profiles-general/build-spec/debian/control.in b/t/recipes/checks/debian/control/field/build-profiles/fields-build-profiles-general/build-spec/debian/control.in new file mode 100644 index 0000000..7df1b9f --- /dev/null +++ b/t/recipes/checks/debian/control/field/build-profiles/fields-build-profiles-general/build-spec/debian/control.in @@ -0,0 +1,33 @@ +Source: [% $source %] +Priority: optional +Section: devel +Maintainer: [% $author %] +Standards-Version: [% $standards_version %] +Build-Depends: [% $build_depends %], + big , bpfail1 , + bpcomplicated +Rules-Requires-Root: no + +Package: [% $source %]-wrong-syntax +Architecture: [% $package_architecture %] +Depends: ${shlibs:Depends}, ${misc:Depends} +Build-Profiles: +Description: [% $description %] (wrong syntax) + Check the syntax of the Build-Profiles field + . + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. + +Package: [% $source %]-unknown-profile +Architecture: [% $package_architecture %] +Depends: ${shlibs:Depends}, ${misc:Depends} +Build-Profiles: +Description: [% $description %] (unknown profile) + Check for unknown profile names + . + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. diff --git a/t/recipes/checks/debian/control/field/build-profiles/fields-build-profiles-general/build-spec/fill-values b/t/recipes/checks/debian/control/field/build-profiles/fields-build-profiles-general/build-spec/fill-values new file mode 100644 index 0000000..7fd9fd0 --- /dev/null +++ b/t/recipes/checks/debian/control/field/build-profiles/fields-build-profiles-general/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: upload-native +Testname: fields-build-profiles-general +Description: General tests for build profiles diff --git a/t/recipes/checks/debian/control/field/build-profiles/fields-build-profiles-general/eval/desc b/t/recipes/checks/debian/control/field/build-profiles/fields-build-profiles-general/eval/desc new file mode 100644 index 0000000..20c61ee --- /dev/null +++ b/t/recipes/checks/debian/control/field/build-profiles/fields-build-profiles-general/eval/desc @@ -0,0 +1,5 @@ +Testname: fields-build-profiles-general +Check: debian/control/field/build-profiles +See-Also: + Debian Bug#540594, + Debian Bug#551793 diff --git a/t/recipes/checks/debian/control/field/build-profiles/fields-build-profiles-general/eval/hints b/t/recipes/checks/debian/control/field/build-profiles/fields-build-profiles-general/eval/hints new file mode 100644 index 0000000..e100e00 --- /dev/null +++ b/t/recipes/checks/debian/control/field/build-profiles/fields-build-profiles-general/eval/hints @@ -0,0 +1,2 @@ +fields-build-profiles-general (source): invalid-restriction-formula-in-build-profiles-field (in section for fields-build-profiles-general-wrong-syntax) [debian/control:14] +fields-build-profiles-general (source): invalid-profile-name-in-build-profiles-field unknown (in section for fields-build-profiles-general-unknown-profile) [debian/control:26] diff --git a/t/recipes/checks/debian/control/field/built-using/control-file-golang-built-using/build-spec/debian/control-file-golang-built-using.install b/t/recipes/checks/debian/control/field/built-using/control-file-golang-built-using/build-spec/debian/control-file-golang-built-using.install new file mode 100644 index 0000000..c07a6cb --- /dev/null +++ b/t/recipes/checks/debian/control/field/built-using/control-file-golang-built-using/build-spec/debian/control-file-golang-built-using.install @@ -0,0 +1 @@ +static /usr/lib/foo/ diff --git a/t/recipes/checks/debian/control/field/built-using/control-file-golang-built-using/build-spec/debian/control.in b/t/recipes/checks/debian/control/field/built-using/control-file-golang-built-using/build-spec/debian/control.in new file mode 100644 index 0000000..d060140 --- /dev/null +++ b/t/recipes/checks/debian/control/field/built-using/control-file-golang-built-using/build-spec/debian/control.in @@ -0,0 +1,41 @@ +Source: [% $source %] +Section: net +Priority: optional +Maintainer: [% $author %] +Standards-Version: [% $standards_version %] +Rules-Requires-Root: [% $rules_requires_root %] +Build-Depends: [% $build_depends %], + golang-go (>= 2:1.1.1-4) + +Package: [% $source %] +Architecture: [% $package_architecture %] +Depends: ${misc:Depends} +Built-Using: ${misc:Built-Using} +Description: [% $description %] + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. + +Package: [% $source %]-dev +Architecture: all +Depends: ${misc:Depends} +Built-Using: ${misc:Built-Using} +Description: [% $description %] (dev) + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. + . + This package contains the source. + +Package: [% $source %]-clean-dev +Architecture: all +Depends: ${misc:Depends} +Description: [% $description %] (clean dev) + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. + . + This package contains the source, without a built-using tag. diff --git a/t/recipes/checks/debian/control/field/built-using/control-file-golang-built-using/build-spec/fill-values b/t/recipes/checks/debian/control/field/built-using/control-file-golang-built-using/build-spec/fill-values new file mode 100644 index 0000000..2c9dd7d --- /dev/null +++ b/t/recipes/checks/debian/control/field/built-using/control-file-golang-built-using/build-spec/fill-values @@ -0,0 +1,4 @@ +Skeleton: upload-native +Testname: control-file-golang-built-using +Description: False-positive test for Built-Using field +Package-Architecture: any diff --git a/t/recipes/checks/debian/control/field/built-using/control-file-golang-built-using/build-spec/orig/Makefile b/t/recipes/checks/debian/control/field/built-using/control-file-golang-built-using/build-spec/orig/Makefile new file mode 100644 index 0000000..6047afb --- /dev/null +++ b/t/recipes/checks/debian/control/field/built-using/control-file-golang-built-using/build-spec/orig/Makefile @@ -0,0 +1,12 @@ +NOPIE_CFLAGS = $(filter-out -fPIE,$(CFLAGS)) +NOPIE_LDFLAGS = $(filter-out -fPIE -pie,$(LDFLAGS)) +COMPILE:= $(CC) $(NOPIE_CFLAGS) $(CPPFLAGS) $(NOPIE_LDFLAGS) + +all: + # static version + $(COMPILE) -static -o static basic.c + +clean distclean: + rm -f basic + +check test: diff --git a/t/recipes/checks/debian/control/field/built-using/control-file-golang-built-using/build-spec/orig/basic.c b/t/recipes/checks/debian/control/field/built-using/control-file-golang-built-using/build-spec/orig/basic.c new file mode 100644 index 0000000..7dea5a0 --- /dev/null +++ b/t/recipes/checks/debian/control/field/built-using/control-file-golang-built-using/build-spec/orig/basic.c @@ -0,0 +1,12 @@ +#include + +int +main(void) +{ + char t[10]; + printf("Hello world!\n"); + /* Bad choice for reading from stdin, but it forces a stack + protector, so meh. + */ + gets (t); +} diff --git a/t/recipes/checks/debian/control/field/built-using/control-file-golang-built-using/eval/desc b/t/recipes/checks/debian/control/field/built-using/control-file-golang-built-using/eval/desc new file mode 100644 index 0000000..89280b2 --- /dev/null +++ b/t/recipes/checks/debian/control/field/built-using/control-file-golang-built-using/eval/desc @@ -0,0 +1,2 @@ +Testname: control-file-golang-built-using +Check: debian/control/field/built-using diff --git a/t/recipes/checks/debian/control/field/built-using/control-file-golang-built-using/eval/hints b/t/recipes/checks/debian/control/field/built-using/control-file-golang-built-using/eval/hints new file mode 100644 index 0000000..ffc3280 --- /dev/null +++ b/t/recipes/checks/debian/control/field/built-using/control-file-golang-built-using/eval/hints @@ -0,0 +1 @@ +control-file-golang-built-using (source): built-using-field-on-arch-all-package (in section for control-file-golang-built-using-dev) Built-Using ${misc:Built-Using} [debian/control:23] diff --git a/t/recipes/checks/debian/control/field/description/duplicate/control-file-general/build-spec/debian/control.in b/t/recipes/checks/debian/control/field/description/duplicate/control-file-general/build-spec/debian/control.in new file mode 100644 index 0000000..3058e5a --- /dev/null +++ b/t/recipes/checks/debian/control/field/description/duplicate/control-file-general/build-spec/debian/control.in @@ -0,0 +1,118 @@ +Source: [% $source %] +Priority: optional +Maintainer: [% $author %] +Standards-Version: [% $standards_version %] +Build-Depends: [% $build_depends %], + fiddle [amd64 powerpc mips mipsel hppa s390], + faddle + (>> + 2) [ + sparc i386 amd64 + ] +Build-Depends-Indep: perl (> 5.8) +Rules-Requires-Root: no +XS-Vcs-Svn: https://svn.example.com/[% $source %]/trunk +#Vcs-Git: git://git.debian.org/collab-maint/.git +#Vcs-Browser: http://git.debian.org/?p=collab-maint/.git;a=summary + +Package: [% $source %] +Section: [% $section %] +Maintainer: [% $author %] +Build-Conflicts: foo +Architecture: all +Pre-depends: ${misc:Pre-depends}, multiarch-support +Depends: [% $source %], foo, baz, ${shlibs:Depends} ${some:Depends}, ${misc:Depends} +Recommends: foo, bar, no-match${lintian:Foo}, match${lintian:Match}, no-match${lintian:Bar}-foo +Suggests: bar | baz, no-match${lintian:Bar}, match${lintian:Match} +Description: [% $description %] + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. + +Package: [% $source %]-1 +Section: [% $section %] +Architecture: all +Depends: ${shlibs:Depends}, ${misc:Depends} +Breaks: libsqlite3-0 (< 3.6.12) +Description: [% $description %] + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. + +Package: [% $source %]-2 +Section: [% $section %] +Architecture: all +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: [% $description %] (two) + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. + +Package: [% $source %]-3 +Section: [% $section %] +Architecture: all +Depends: ${shlibs:Depends}, ${misc:Depends}, foo (>= 1), + baz (<< 2), + fizz (= 2.0), gcc-${pv:gcc} ${reqv:gcc} +Description: [% $description %] (three) + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. + +Package: [% $source %]-4 +Section: [% $section %] +Architecture: all +Depends: ${shlibs:Depends}, ${misc:Depends}, foo | + bar (>= 1), baz +Description: [% $description %] (four) + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. + +Package: [% $source %]-5 +Section: [% $section %] +Architecture: all +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: Description: [% $description %] + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. + +Package: [% $source %]-dbgsym +Section: debug +Architecture: all +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: Description: dbg-sym + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. + +Package: [% $source %]-dbg +Section: debug +Architecture: all +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: Description: debug + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. + +Package: [% $source %]-udeb +Section: debian-installer +Package-Type: udeb +Architecture: all +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: [% $description %] (udeb) + udeb tests. + . + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. diff --git a/t/recipes/checks/debian/control/field/description/duplicate/control-file-general/build-spec/debian/rules b/t/recipes/checks/debian/control/field/description/duplicate/control-file-general/build-spec/debian/rules new file mode 100644 index 0000000..f5db4bb --- /dev/null +++ b/t/recipes/checks/debian/control/field/description/duplicate/control-file-general/build-spec/debian/rules @@ -0,0 +1,8 @@ +#!/usr/bin/make -f +%: + dh $@ + +override_dh_gencontrol: + echo 'pv:gcc=4.3' >> debian/substvars + echo 'reqv:gcc=(>= 4.3-1)' >> debian/substvars + dh_gencontrol diff --git a/t/recipes/checks/debian/control/field/description/duplicate/control-file-general/build-spec/fill-values b/t/recipes/checks/debian/control/field/description/duplicate/control-file-general/build-spec/fill-values new file mode 100644 index 0000000..7338a95 --- /dev/null +++ b/t/recipes/checks/debian/control/field/description/duplicate/control-file-general/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: upload-native +Testname: control-file-general +Description: Various problems with debian/control diff --git a/t/recipes/checks/debian/control/field/description/duplicate/control-file-general/eval/desc b/t/recipes/checks/debian/control/field/description/duplicate/control-file-general/eval/desc new file mode 100644 index 0000000..69e1475 --- /dev/null +++ b/t/recipes/checks/debian/control/field/description/duplicate/control-file-general/eval/desc @@ -0,0 +1,11 @@ +Testname: control-file-general +Check: debian/control/field/description/duplicate +See-Also: + Debian Bug#30020, + Debian Bug#409099, + Debian Bug#516706, + Debian Bug#533202, + Debian Bug#557971, + Debian Bug#573399, + Debian Bug#580494, + Debian Bug#657110 diff --git a/t/recipes/checks/debian/control/field/description/duplicate/control-file-general/eval/hints b/t/recipes/checks/debian/control/field/description/duplicate/control-file-general/eval/hints new file mode 100644 index 0000000..cc92e1d --- /dev/null +++ b/t/recipes/checks/debian/control/field/description/duplicate/control-file-general/eval/hints @@ -0,0 +1,2 @@ +control-file-general (source): duplicate-short-description control-file-general control-file-general-1 [debian/control] +control-file-general (source): duplicate-long-description control-file-general control-file-general-1 control-file-general-2 control-file-general-3 control-file-general-4 control-file-general-5 control-file-general-dbg control-file-general-dbgsym [debian/control] diff --git a/t/recipes/checks/debian/control/field/doubled-up/control-file-general/build-spec/debian/control.in b/t/recipes/checks/debian/control/field/doubled-up/control-file-general/build-spec/debian/control.in new file mode 100644 index 0000000..3058e5a --- /dev/null +++ b/t/recipes/checks/debian/control/field/doubled-up/control-file-general/build-spec/debian/control.in @@ -0,0 +1,118 @@ +Source: [% $source %] +Priority: optional +Maintainer: [% $author %] +Standards-Version: [% $standards_version %] +Build-Depends: [% $build_depends %], + fiddle [amd64 powerpc mips mipsel hppa s390], + faddle + (>> + 2) [ + sparc i386 amd64 + ] +Build-Depends-Indep: perl (> 5.8) +Rules-Requires-Root: no +XS-Vcs-Svn: https://svn.example.com/[% $source %]/trunk +#Vcs-Git: git://git.debian.org/collab-maint/.git +#Vcs-Browser: http://git.debian.org/?p=collab-maint/.git;a=summary + +Package: [% $source %] +Section: [% $section %] +Maintainer: [% $author %] +Build-Conflicts: foo +Architecture: all +Pre-depends: ${misc:Pre-depends}, multiarch-support +Depends: [% $source %], foo, baz, ${shlibs:Depends} ${some:Depends}, ${misc:Depends} +Recommends: foo, bar, no-match${lintian:Foo}, match${lintian:Match}, no-match${lintian:Bar}-foo +Suggests: bar | baz, no-match${lintian:Bar}, match${lintian:Match} +Description: [% $description %] + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. + +Package: [% $source %]-1 +Section: [% $section %] +Architecture: all +Depends: ${shlibs:Depends}, ${misc:Depends} +Breaks: libsqlite3-0 (< 3.6.12) +Description: [% $description %] + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. + +Package: [% $source %]-2 +Section: [% $section %] +Architecture: all +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: [% $description %] (two) + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. + +Package: [% $source %]-3 +Section: [% $section %] +Architecture: all +Depends: ${shlibs:Depends}, ${misc:Depends}, foo (>= 1), + baz (<< 2), + fizz (= 2.0), gcc-${pv:gcc} ${reqv:gcc} +Description: [% $description %] (three) + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. + +Package: [% $source %]-4 +Section: [% $section %] +Architecture: all +Depends: ${shlibs:Depends}, ${misc:Depends}, foo | + bar (>= 1), baz +Description: [% $description %] (four) + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. + +Package: [% $source %]-5 +Section: [% $section %] +Architecture: all +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: Description: [% $description %] + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. + +Package: [% $source %]-dbgsym +Section: debug +Architecture: all +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: Description: dbg-sym + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. + +Package: [% $source %]-dbg +Section: debug +Architecture: all +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: Description: debug + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. + +Package: [% $source %]-udeb +Section: debian-installer +Package-Type: udeb +Architecture: all +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: [% $description %] (udeb) + udeb tests. + . + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. diff --git a/t/recipes/checks/debian/control/field/doubled-up/control-file-general/build-spec/debian/rules b/t/recipes/checks/debian/control/field/doubled-up/control-file-general/build-spec/debian/rules new file mode 100644 index 0000000..f5db4bb --- /dev/null +++ b/t/recipes/checks/debian/control/field/doubled-up/control-file-general/build-spec/debian/rules @@ -0,0 +1,8 @@ +#!/usr/bin/make -f +%: + dh $@ + +override_dh_gencontrol: + echo 'pv:gcc=4.3' >> debian/substvars + echo 'reqv:gcc=(>= 4.3-1)' >> debian/substvars + dh_gencontrol diff --git a/t/recipes/checks/debian/control/field/doubled-up/control-file-general/build-spec/fill-values b/t/recipes/checks/debian/control/field/doubled-up/control-file-general/build-spec/fill-values new file mode 100644 index 0000000..7338a95 --- /dev/null +++ b/t/recipes/checks/debian/control/field/doubled-up/control-file-general/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: upload-native +Testname: control-file-general +Description: Various problems with debian/control diff --git a/t/recipes/checks/debian/control/field/doubled-up/control-file-general/eval/desc b/t/recipes/checks/debian/control/field/doubled-up/control-file-general/eval/desc new file mode 100644 index 0000000..981eddf --- /dev/null +++ b/t/recipes/checks/debian/control/field/doubled-up/control-file-general/eval/desc @@ -0,0 +1,11 @@ +Testname: control-file-general +Check: debian/control/field/doubled-up +See-Also: + Debian Bug#30020, + Debian Bug#409099, + Debian Bug#516706, + Debian Bug#533202, + Debian Bug#557971, + Debian Bug#573399, + Debian Bug#580494, + Debian Bug#657110 diff --git a/t/recipes/checks/debian/control/field/doubled-up/control-file-general/eval/hints b/t/recipes/checks/debian/control/field/doubled-up/control-file-general/eval/hints new file mode 100644 index 0000000..5d69243 --- /dev/null +++ b/t/recipes/checks/debian/control/field/doubled-up/control-file-general/eval/hints @@ -0,0 +1,3 @@ +control-file-general (source): debian-control-repeats-field-name-in-value (in section for control-file-general-dbgsym) Description [debian/control:91] +control-file-general (source): debian-control-repeats-field-name-in-value (in section for control-file-general-dbg) Description [debian/control:101] +control-file-general (source): debian-control-repeats-field-name-in-value (in section for control-file-general-5) Description [debian/control:81] diff --git a/t/recipes/checks/debian/control/field/empty/control-has-empty-field/build-spec/debian/control.in b/t/recipes/checks/debian/control/field/empty/control-has-empty-field/build-spec/debian/control.in new file mode 100644 index 0000000..c1c9cdc --- /dev/null +++ b/t/recipes/checks/debian/control/field/empty/control-has-empty-field/build-spec/debian/control.in @@ -0,0 +1,26 @@ +Source: [% $source %] +Priority: optional +Section: [% $section %] +Maintainer: [% $author %] +Uploaders: + Wrapped Onto New Line +Standards-Version: [% $standards_version %] +Build-Depends: [% $build_depends %] +Rules-Requires-Root: binary-targets +Homepage: https://lintian.debian.org/ +Vcs-Browser: +# The following line contains "Vcs-Git: \n" +Vcs-Git: + +Package: [% $source %] +Architecture: [% $package_architecture %] +Depends: ${shlibs:Depends}, ${misc:Depends} +Suggests: +# The following line contains "Provides: \n" +Provides: +Recommends: ${false:Positive} +Description: [% $description %] + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. diff --git a/t/recipes/checks/debian/control/field/empty/control-has-empty-field/build-spec/fill-values b/t/recipes/checks/debian/control/field/empty/control-has-empty-field/build-spec/fill-values new file mode 100644 index 0000000..65e572e --- /dev/null +++ b/t/recipes/checks/debian/control/field/empty/control-has-empty-field/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: upload-native +Testname: control-has-empty-field +Description: Check for empty fields diff --git a/t/recipes/checks/debian/control/field/empty/control-has-empty-field/eval/desc b/t/recipes/checks/debian/control/field/empty/control-has-empty-field/eval/desc new file mode 100644 index 0000000..5f7696d --- /dev/null +++ b/t/recipes/checks/debian/control/field/empty/control-has-empty-field/eval/desc @@ -0,0 +1,2 @@ +Testname: control-has-empty-field +Check: debian/control/field/empty diff --git a/t/recipes/checks/debian/control/field/empty/control-has-empty-field/eval/hints b/t/recipes/checks/debian/control/field/empty/control-has-empty-field/eval/hints new file mode 100644 index 0000000..8f187c3 --- /dev/null +++ b/t/recipes/checks/debian/control/field/empty/control-has-empty-field/eval/hints @@ -0,0 +1,4 @@ +control-has-empty-field (source): debian-control-has-empty-field (in source paragraph) Vcs-Git [debian/control:13] +control-has-empty-field (source): debian-control-has-empty-field (in source paragraph) Vcs-Browser [debian/control:11] +control-has-empty-field (source): debian-control-has-empty-field (in section for control-has-empty-field) Suggests [debian/control:18] +control-has-empty-field (source): debian-control-has-empty-field (in section for control-has-empty-field) Provides [debian/control:20] diff --git a/t/recipes/checks/debian/control/field/misplaced/control-file-general/build-spec/debian/control.in b/t/recipes/checks/debian/control/field/misplaced/control-file-general/build-spec/debian/control.in new file mode 100644 index 0000000..3058e5a --- /dev/null +++ b/t/recipes/checks/debian/control/field/misplaced/control-file-general/build-spec/debian/control.in @@ -0,0 +1,118 @@ +Source: [% $source %] +Priority: optional +Maintainer: [% $author %] +Standards-Version: [% $standards_version %] +Build-Depends: [% $build_depends %], + fiddle [amd64 powerpc mips mipsel hppa s390], + faddle + (>> + 2) [ + sparc i386 amd64 + ] +Build-Depends-Indep: perl (> 5.8) +Rules-Requires-Root: no +XS-Vcs-Svn: https://svn.example.com/[% $source %]/trunk +#Vcs-Git: git://git.debian.org/collab-maint/.git +#Vcs-Browser: http://git.debian.org/?p=collab-maint/.git;a=summary + +Package: [% $source %] +Section: [% $section %] +Maintainer: [% $author %] +Build-Conflicts: foo +Architecture: all +Pre-depends: ${misc:Pre-depends}, multiarch-support +Depends: [% $source %], foo, baz, ${shlibs:Depends} ${some:Depends}, ${misc:Depends} +Recommends: foo, bar, no-match${lintian:Foo}, match${lintian:Match}, no-match${lintian:Bar}-foo +Suggests: bar | baz, no-match${lintian:Bar}, match${lintian:Match} +Description: [% $description %] + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. + +Package: [% $source %]-1 +Section: [% $section %] +Architecture: all +Depends: ${shlibs:Depends}, ${misc:Depends} +Breaks: libsqlite3-0 (< 3.6.12) +Description: [% $description %] + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. + +Package: [% $source %]-2 +Section: [% $section %] +Architecture: all +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: [% $description %] (two) + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. + +Package: [% $source %]-3 +Section: [% $section %] +Architecture: all +Depends: ${shlibs:Depends}, ${misc:Depends}, foo (>= 1), + baz (<< 2), + fizz (= 2.0), gcc-${pv:gcc} ${reqv:gcc} +Description: [% $description %] (three) + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. + +Package: [% $source %]-4 +Section: [% $section %] +Architecture: all +Depends: ${shlibs:Depends}, ${misc:Depends}, foo | + bar (>= 1), baz +Description: [% $description %] (four) + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. + +Package: [% $source %]-5 +Section: [% $section %] +Architecture: all +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: Description: [% $description %] + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. + +Package: [% $source %]-dbgsym +Section: debug +Architecture: all +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: Description: dbg-sym + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. + +Package: [% $source %]-dbg +Section: debug +Architecture: all +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: Description: debug + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. + +Package: [% $source %]-udeb +Section: debian-installer +Package-Type: udeb +Architecture: all +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: [% $description %] (udeb) + udeb tests. + . + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. diff --git a/t/recipes/checks/debian/control/field/misplaced/control-file-general/build-spec/debian/rules b/t/recipes/checks/debian/control/field/misplaced/control-file-general/build-spec/debian/rules new file mode 100644 index 0000000..f5db4bb --- /dev/null +++ b/t/recipes/checks/debian/control/field/misplaced/control-file-general/build-spec/debian/rules @@ -0,0 +1,8 @@ +#!/usr/bin/make -f +%: + dh $@ + +override_dh_gencontrol: + echo 'pv:gcc=4.3' >> debian/substvars + echo 'reqv:gcc=(>= 4.3-1)' >> debian/substvars + dh_gencontrol diff --git a/t/recipes/checks/debian/control/field/misplaced/control-file-general/build-spec/fill-values b/t/recipes/checks/debian/control/field/misplaced/control-file-general/build-spec/fill-values new file mode 100644 index 0000000..7338a95 --- /dev/null +++ b/t/recipes/checks/debian/control/field/misplaced/control-file-general/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: upload-native +Testname: control-file-general +Description: Various problems with debian/control diff --git a/t/recipes/checks/debian/control/field/misplaced/control-file-general/eval/desc b/t/recipes/checks/debian/control/field/misplaced/control-file-general/eval/desc new file mode 100644 index 0000000..869cae4 --- /dev/null +++ b/t/recipes/checks/debian/control/field/misplaced/control-file-general/eval/desc @@ -0,0 +1,11 @@ +Testname: control-file-general +Check: debian/control/field/misplaced +See-Also: + Debian Bug#30020, + Debian Bug#409099, + Debian Bug#516706, + Debian Bug#533202, + Debian Bug#557971, + Debian Bug#573399, + Debian Bug#580494, + Debian Bug#657110 diff --git a/t/recipes/checks/debian/control/field/misplaced/control-file-general/eval/hints b/t/recipes/checks/debian/control/field/misplaced/control-file-general/eval/hints new file mode 100644 index 0000000..f2cf497 --- /dev/null +++ b/t/recipes/checks/debian/control/field/misplaced/control-file-general/eval/hints @@ -0,0 +1 @@ +control-file-general (source): build-prerequisite-in-installable-section Build-Conflicts (in section for control-file-general) [debian/control:21] diff --git a/t/recipes/checks/debian/control/field/misplaced/legacy-foo++/build-spec/debian/README.Debian b/t/recipes/checks/debian/control/field/misplaced/legacy-foo++/build-spec/debian/README.Debian new file mode 100644 index 0000000..87bfcdf --- /dev/null +++ b/t/recipes/checks/debian/control/field/misplaced/legacy-foo++/build-spec/debian/README.Debian @@ -0,0 +1,7 @@ +foo++ for Debian +---------------- + +This should trigger a warning, as i use a fake mail address. + + -- Marc 'HE' Brockschmidt , Wed, 14 Apr 2004 01:44:18 +0200 + diff --git a/t/recipes/checks/debian/control/field/misplaced/legacy-foo++/build-spec/debian/changelog.in b/t/recipes/checks/debian/control/field/misplaced/legacy-foo++/build-spec/debian/changelog.in new file mode 100644 index 0000000..f838939 --- /dev/null +++ b/t/recipes/checks/debian/control/field/misplaced/legacy-foo++/build-spec/debian/changelog.in @@ -0,0 +1,31 @@ +foo++ ([% $version %]) [% $distribution %]; urgency=low + + * Add a fake README.Debian to trigger a warning. + * This should trigger + debian-changelog-file-contains-debmake-default-email-address. + + -- Marc 'HE' Brockschmidt Wed, 14 Apr 2003 01:35:47 +0200 + +foo++ (4) unstable; urgency=low + + * This changelog now includes a ISO-8859-1 character: '' + + -- Frank Lichtenheld Fri, 5 Mar 2004 13:41:39 +0100 + +foo++ (3) unstable; urgency=low + + * Set maintainers + uploaders incorrectly + + -- Jeroen van Wolffelaar Fri, 5 Mar 2004 04:20:24 +0100 + +foo++ (2) unstable; urgency=low + + * Added a foo++-helper package to try and catch even more ++ bugs. + + -- Sean 'Shaleh' Perry Sat, 10 Feb 2001 23:16:17 -0800 + +foo++ (1) unstable; urgency=low + + * Initial version + + -- Sean 'Shaleh' Perry Thu, 16 Nov 2000 09:11:40 -0800 diff --git a/t/recipes/checks/debian/control/field/misplaced/legacy-foo++/build-spec/debian/control b/t/recipes/checks/debian/control/field/misplaced/legacy-foo++/build-spec/debian/control new file mode 100644 index 0000000..1e276d7 --- /dev/null +++ b/t/recipes/checks/debian/control/field/misplaced/legacy-foo++/build-spec/debian/control @@ -0,0 +1,30 @@ +Source: foo++ +Section: misc +Priority: optional +Maintainer: Lintian Maintainer +Uploaders: Marc 'HE' Brockschmidt , Jeroen van Wolffelaar, + Frank , Yama@gotchi, Josip, + I am afraid of spam and think this helps +Standards-Version: 3.1.1 +XS-Dm-Upload-Allowed: no + +Package: foo++ +Architecture: all +Build-Depends: test +Depends: test, libssl0.9.7 +Description: see how lintian reacts to plus signs in the package name + Regression test to see if lintian tests work on a package with plus signs in + its name. + . + This description also uses some UTF8 high bytes chars: ÄÖÜß + +Package: foo++-helper +Architecture: all +Depends: test, foo++ +Description: see how lintian reacts to plus signs in the package name + Regression test to see if lintian tests work on a package with plus signs in + its name. This has /usr/share/doc links to foo++ to trigger even more checks. + . + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. diff --git a/t/recipes/checks/debian/control/field/misplaced/legacy-foo++/build-spec/debian/copyright b/t/recipes/checks/debian/control/field/misplaced/legacy-foo++/build-spec/debian/copyright new file mode 100644 index 0000000..e2d6d93 --- /dev/null +++ b/t/recipes/checks/debian/control/field/misplaced/legacy-foo++/build-spec/debian/copyright @@ -0,0 +1,7 @@ +A reference to /usr/share/common-licenses/GPL to make it look like this +package is under the GPL and trigger the OpenSSL warning. + +However, there is also a reference to /usr/share/common-licenses/LGPL, so +who knows what bits actually depend on libssl. + +Copr. 2007 Somebody. diff --git a/t/recipes/checks/debian/control/field/misplaced/legacy-foo++/build-spec/debian/rules b/t/recipes/checks/debian/control/field/misplaced/legacy-foo++/build-spec/debian/rules new file mode 100755 index 0000000..63bb4db --- /dev/null +++ b/t/recipes/checks/debian/control/field/misplaced/legacy-foo++/build-spec/debian/rules @@ -0,0 +1,36 @@ +#!/usr/bin/make -f + +foo=foo++ +helper=foo++-helper + +build-arch: + +build-indep: + +build: build-arch build-indep + +binary-arch: + +binary-indep: + install -d debian/$(foo)/DEBIAN + install -d debian/$(foo)/usr/share/doc/$(foo) + install -m 644 debian/changelog \ + debian/$(foo)/usr/share/doc/$(foo)/changelog + gzip -n -9 debian/$(foo)/usr/share/doc/$(foo)/changelog + install -m 644 debian/README.Debian \ + debian/$(foo)/usr/share/doc/$(foo)/README.Debian + gzip -n -9 debian/$(foo)/usr/share/doc/$(foo)/README.Debian + dpkg-gencontrol -isp -p$(foo) -Pdebian/$(foo) + dpkg --build debian/$(foo) .. + + install -d debian/$(helper)/DEBIAN + install -d debian/$(helper)/usr/share/doc/ + ln -sf $(foo) debian/$(helper)/usr/share/doc/$(helper) + dpkg-gencontrol -isp -p$(helper) -Pdebian/$(helper) + dpkg --build debian/$(helper) .. + +binary: binary-arch binary-indep + +clean: + +.PHONY: build-arch build-indep build binary-arch binary-indep binary clean diff --git a/t/recipes/checks/debian/control/field/misplaced/legacy-foo++/build-spec/debian/watch b/t/recipes/checks/debian/control/field/misplaced/legacy-foo++/build-spec/debian/watch new file mode 100644 index 0000000..26f9a3c --- /dev/null +++ b/t/recipes/checks/debian/control/field/misplaced/legacy-foo++/build-spec/debian/watch @@ -0,0 +1,6 @@ +# A comment \ +version=0 + +# uscan does not interpret the backslash above, it is just part of the comment + +http://domain.tld/file-(.*)\.tar\.gz diff --git a/t/recipes/checks/debian/control/field/misplaced/legacy-foo++/build-spec/fill-values b/t/recipes/checks/debian/control/field/misplaced/legacy-foo++/build-spec/fill-values new file mode 100644 index 0000000..86d43bc --- /dev/null +++ b/t/recipes/checks/debian/control/field/misplaced/legacy-foo++/build-spec/fill-values @@ -0,0 +1,5 @@ +Skeleton: upload-native +Testname: legacy-foo++ +Source: foo++ +Version: 5 +Description: Legacy test "foo++" diff --git a/t/recipes/checks/debian/control/field/misplaced/legacy-foo++/eval/desc b/t/recipes/checks/debian/control/field/misplaced/legacy-foo++/eval/desc new file mode 100644 index 0000000..d2bbe00 --- /dev/null +++ b/t/recipes/checks/debian/control/field/misplaced/legacy-foo++/eval/desc @@ -0,0 +1,2 @@ +Testname: legacy-foo++ +Check: debian/control/field/misplaced diff --git a/t/recipes/checks/debian/control/field/misplaced/legacy-foo++/eval/hints b/t/recipes/checks/debian/control/field/misplaced/legacy-foo++/eval/hints new file mode 100644 index 0000000..71d7bec --- /dev/null +++ b/t/recipes/checks/debian/control/field/misplaced/legacy-foo++/eval/hints @@ -0,0 +1 @@ +foo++ (source): build-prerequisite-in-installable-section Build-Depends (in section for foo++) [debian/control:13] diff --git a/t/recipes/checks/debian/control/field/misplaced/legacy-foo++/eval/post-test b/t/recipes/checks/debian/control/field/misplaced/legacy-foo++/eval/post-test new file mode 100644 index 0000000..faeef0b --- /dev/null +++ b/t/recipes/checks/debian/control/field/misplaced/legacy-foo++/eval/post-test @@ -0,0 +1 @@ +s/\(current is ([0-9]+\.)+[0-9]\)/(current is CURRENT)/ diff --git a/t/recipes/checks/debian/control/field/redundant/control-file-general/build-spec/debian/control.in b/t/recipes/checks/debian/control/field/redundant/control-file-general/build-spec/debian/control.in new file mode 100644 index 0000000..3058e5a --- /dev/null +++ b/t/recipes/checks/debian/control/field/redundant/control-file-general/build-spec/debian/control.in @@ -0,0 +1,118 @@ +Source: [% $source %] +Priority: optional +Maintainer: [% $author %] +Standards-Version: [% $standards_version %] +Build-Depends: [% $build_depends %], + fiddle [amd64 powerpc mips mipsel hppa s390], + faddle + (>> + 2) [ + sparc i386 amd64 + ] +Build-Depends-Indep: perl (> 5.8) +Rules-Requires-Root: no +XS-Vcs-Svn: https://svn.example.com/[% $source %]/trunk +#Vcs-Git: git://git.debian.org/collab-maint/.git +#Vcs-Browser: http://git.debian.org/?p=collab-maint/.git;a=summary + +Package: [% $source %] +Section: [% $section %] +Maintainer: [% $author %] +Build-Conflicts: foo +Architecture: all +Pre-depends: ${misc:Pre-depends}, multiarch-support +Depends: [% $source %], foo, baz, ${shlibs:Depends} ${some:Depends}, ${misc:Depends} +Recommends: foo, bar, no-match${lintian:Foo}, match${lintian:Match}, no-match${lintian:Bar}-foo +Suggests: bar | baz, no-match${lintian:Bar}, match${lintian:Match} +Description: [% $description %] + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. + +Package: [% $source %]-1 +Section: [% $section %] +Architecture: all +Depends: ${shlibs:Depends}, ${misc:Depends} +Breaks: libsqlite3-0 (< 3.6.12) +Description: [% $description %] + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. + +Package: [% $source %]-2 +Section: [% $section %] +Architecture: all +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: [% $description %] (two) + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. + +Package: [% $source %]-3 +Section: [% $section %] +Architecture: all +Depends: ${shlibs:Depends}, ${misc:Depends}, foo (>= 1), + baz (<< 2), + fizz (= 2.0), gcc-${pv:gcc} ${reqv:gcc} +Description: [% $description %] (three) + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. + +Package: [% $source %]-4 +Section: [% $section %] +Architecture: all +Depends: ${shlibs:Depends}, ${misc:Depends}, foo | + bar (>= 1), baz +Description: [% $description %] (four) + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. + +Package: [% $source %]-5 +Section: [% $section %] +Architecture: all +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: Description: [% $description %] + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. + +Package: [% $source %]-dbgsym +Section: debug +Architecture: all +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: Description: dbg-sym + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. + +Package: [% $source %]-dbg +Section: debug +Architecture: all +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: Description: debug + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. + +Package: [% $source %]-udeb +Section: debian-installer +Package-Type: udeb +Architecture: all +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: [% $description %] (udeb) + udeb tests. + . + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. diff --git a/t/recipes/checks/debian/control/field/redundant/control-file-general/build-spec/debian/rules b/t/recipes/checks/debian/control/field/redundant/control-file-general/build-spec/debian/rules new file mode 100644 index 0000000..f5db4bb --- /dev/null +++ b/t/recipes/checks/debian/control/field/redundant/control-file-general/build-spec/debian/rules @@ -0,0 +1,8 @@ +#!/usr/bin/make -f +%: + dh $@ + +override_dh_gencontrol: + echo 'pv:gcc=4.3' >> debian/substvars + echo 'reqv:gcc=(>= 4.3-1)' >> debian/substvars + dh_gencontrol diff --git a/t/recipes/checks/debian/control/field/redundant/control-file-general/build-spec/fill-values b/t/recipes/checks/debian/control/field/redundant/control-file-general/build-spec/fill-values new file mode 100644 index 0000000..7338a95 --- /dev/null +++ b/t/recipes/checks/debian/control/field/redundant/control-file-general/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: upload-native +Testname: control-file-general +Description: Various problems with debian/control diff --git a/t/recipes/checks/debian/control/field/redundant/control-file-general/eval/desc b/t/recipes/checks/debian/control/field/redundant/control-file-general/eval/desc new file mode 100644 index 0000000..f74e37c --- /dev/null +++ b/t/recipes/checks/debian/control/field/redundant/control-file-general/eval/desc @@ -0,0 +1,11 @@ +Testname: control-file-general +Check: debian/control/field/redundant +See-Also: + Debian Bug#30020, + Debian Bug#409099, + Debian Bug#516706, + Debian Bug#533202, + Debian Bug#557971, + Debian Bug#573399, + Debian Bug#580494, + Debian Bug#657110 diff --git a/t/recipes/checks/debian/control/field/redundant/control-file-general/eval/hints b/t/recipes/checks/debian/control/field/redundant/control-file-general/eval/hints new file mode 100644 index 0000000..d7ec903 --- /dev/null +++ b/t/recipes/checks/debian/control/field/redundant/control-file-general/eval/hints @@ -0,0 +1 @@ +control-file-general (source): installable-field-mirrors-source (in section for control-file-general) Maintainer [debian/control:20] diff --git a/t/recipes/checks/debian/control/field/redundant/legacy-binary/build-spec/debian/NEWS.Debian b/t/recipes/checks/debian/control/field/redundant/legacy-binary/build-spec/debian/NEWS.Debian new file mode 100644 index 0000000..29f561c --- /dev/null +++ b/t/recipes/checks/debian/control/field/redundant/legacy-binary/build-spec/debian/NEWS.Debian @@ -0,0 +1,12 @@ +binary (4-1.1) UNRELEASED; urgency=high + + This is a Debian NEWS entry that isn't encoded properly in UTF-8: . + It also has a usefull speling error. + + -- Russ Allbery Sun, 14 Oct 2007 17:11:36 -0700 + +binary (1) unstable; urgency=low + + This is another entry but this one isn't syntactically valid. + + -- Russ Allbery 2007-10-14 diff --git a/t/recipes/checks/debian/control/field/redundant/legacy-binary/build-spec/debian/README.Debian b/t/recipes/checks/debian/control/field/redundant/legacy-binary/build-spec/debian/README.Debian new file mode 100644 index 0000000..94bcc0a --- /dev/null +++ b/t/recipes/checks/debian/control/field/redundant/legacy-binary/build-spec/debian/README.Debian @@ -0,0 +1,5 @@ +this is a binary package to test lintian's handling of bins. +Check handling of D-Bus and dbus (neither of which should produce +warnings). + + -- Russ Allbery , Wed, 6 Feb 2008 18:35:11 -0800 diff --git a/t/recipes/checks/debian/control/field/redundant/legacy-binary/build-spec/debian/changelog.in b/t/recipes/checks/debian/control/field/redundant/legacy-binary/build-spec/debian/changelog.in new file mode 100644 index 0000000..39301d6 --- /dev/null +++ b/t/recipes/checks/debian/control/field/redundant/legacy-binary/build-spec/debian/changelog.in @@ -0,0 +1,47 @@ +binary ([% $version %]) [% $distribution %]; urgency=low + + * I'm doing an comaintainer-upload, acknowledging a NMU, but with a version + number which suggests I'm doing a NMU myself. + + Lintian-maintainers: Please don't update this changelog, otherwise you'll + probably break the checks/nmu checks. + + -- Jeroen van Wolffelaar Sun, 18 Apr 2004 01:49:42 +0200 + +binary (4-1) unstable; urgency=low + + * Weird version number for the new check for accidents with native + packaging. + * Date was fixed by BR and this test was put on changelog-file-strange-date + due to dpkg bug, see #794674. + + -- Marc 'HE' Brockschmidt Thu, 15 Apr 2004 23:33:51 +0200 + +binary (4) unstable; urgency=low + + * Add big file to /usr/share to trigger the big-usr-share check + + -- Jeroen van Wolffelaar Fri, 27 Feb 2004 10:15:59 +0100 + +binary (3) unstable; urgency=unlimited + + * Add some bogus menu entries using su-to-root in a bogus way + + -- Jeroen van Wolffelaar Thu, 12 Feb 2004 20:11:22 +0100 + +binary (2) unstable; urgency=low + + * Added an INSTALL document which policy 6.3 suggests not to do + + -- Sean 'Shaleh' Perry Tue, 30 Jan 2001 15:23:59 -0800 + +binary (1) unstable; urgency=low + + * hello.c added + * hello-static is same as hello, but compiled statically + * added a menu entry which lacks a Section + * added a postinst + * postinst calls suidregister which is no longer policy compliant + + -- Sean 'Shaleh' Perry Wed, 10 Jan 2001 08:55:34 -0800 + diff --git a/t/recipes/checks/debian/control/field/redundant/legacy-binary/build-spec/debian/conffiles b/t/recipes/checks/debian/control/field/redundant/legacy-binary/build-spec/debian/conffiles new file mode 100644 index 0000000..d1a0843 --- /dev/null +++ b/t/recipes/checks/debian/control/field/redundant/legacy-binary/build-spec/debian/conffiles @@ -0,0 +1 @@ +/etc/menu-methods/lintian diff --git a/t/recipes/checks/debian/control/field/redundant/legacy-binary/build-spec/debian/control b/t/recipes/checks/debian/control/field/redundant/legacy-binary/build-spec/debian/control new file mode 100644 index 0000000..c797357 --- /dev/null +++ b/t/recipes/checks/debian/control/field/redundant/legacy-binary/build-spec/debian/control @@ -0,0 +1,42 @@ +Source: binary +Section: misc +Priority: optional +Maintainer: Lintian Maintainers +Uploaders: Co-maintainer one , Jeroen van Wolffelaar , Co-maintainer three +Standards-Version: 3.2.1 +Homepage: http://lintian.debian.org/ +Vcs-Svn: http://svn.wolffelaar.nl/lintian/trunk +XS-Vcs-Browser: http://svn.wolffelaar.nl/lintian/trunk +XS-Dm-Upload-Allowed: yes + +Package: binary +Architecture: any +Pre-Depends: ${shlibs:Depends}, xorg, binary-data (= ${source:Version}), libssl0.9.8 +Homepage: +Vcs-Svn: http://svn.wolffelaar.nl/lintian/trunk +Description: test handling of binary files + Regression test for lintian's handling of binary files for debian. This + is checked for picky spelling errors. + . + This package list [ subversion | gconf ] should not be flagged as a spelling + mistake. The spelling correction for dont should be correct. + . + Homepage: http://lintian.debian.org/ + +Package: binary-data +Architecture: all +Depends: binary (= ${source:Version}), libssl-not-openssl, + libssl0.9.8 | or-something-else +Description: test handling of binary relationships + Regression test for lintian's checking of package relationships between + arch:any and arch:all packages. + . + This mention of subversion should be flagged as a spelling mistake. + +#Package: binary-comment +#Architecture: space-almonds +#Depends: * +#Depends: * +#Description: test comment support +# Yes, comments are actually allowed in debian/control, so none of the +# above should produce errors. diff --git a/t/recipes/checks/debian/control/field/redundant/legacy-binary/build-spec/debian/copyright b/t/recipes/checks/debian/control/field/redundant/legacy-binary/build-spec/debian/copyright new file mode 100644 index 0000000..1d6806d --- /dev/null +++ b/t/recipes/checks/debian/control/field/redundant/legacy-binary/build-spec/debian/copyright @@ -0,0 +1,15 @@ +hello.c is released under public domain. This is distributed in the hope that +it will be useful, but without any warranty; without even the implied warranty +of merchantability or fitness for a particular purpose. + +A reference to /usr/share/common-licenses/GPL-2 to make it look like this +package is under the GPL and trigger the OpenSSL warning. + +Test for old FSF address: + +Free Software Foundation, Inc., 59 Temple Place - Suite 330, +Boston, MA 02111-1307, USA. + +Test for deprecated ntionl ncoding. + +Improper capitalization of linux or debian isn't caught here. diff --git a/t/recipes/checks/debian/control/field/redundant/legacy-binary/build-spec/debian/doc-base b/t/recipes/checks/debian/control/field/redundant/legacy-binary/build-spec/debian/doc-base new file mode 100644 index 0000000..7e5b38f --- /dev/null +++ b/t/recipes/checks/debian/control/field/redundant/legacy-binary/build-spec/debian/doc-base @@ -0,0 +1,41 @@ +Document: binary!docs +Title: Broken debian binary doc-base control file +Author: Russ Allbery +Abstract: This control file exercises various tests of doc-base control + files, including several things that aren't tested yet. The third and + fourth one has trailing whitespace. + . + This section has a speling error and bad character. + . + The above separator was fine. +Section: Non/Existant +Unknown: Some field + + + +Format: debiandoc-sgML +Files: /usr/share/doc/binary/binary.sgml.gz +Unknown: Some field + +Format: ESP +Index: /usr/share/doc/binary/binary.txt + +Index: /usr/share/doc/binary/html/index.html + /usr/share/doc/binary/html/ch1.html + /usr/share/doc/binary/html/ch4.html + + +Format: HTML +Index: /usr/share/doc/binary/html/index.html +Files: /usr/share/doc/binary/html/ch?.h*l + /usr/share/doc/binary/hml/*.html + +Format: inFO +Files: /usr/share/info/binary.info.gz + +Format: HTML +Index: /usr/share/doc/binary/html/index.html +Files: /usr/share/doc/binary/html/ch5.html + /usr/share/doc/binary/html/ch6.html + + diff --git a/t/recipes/checks/debian/control/field/redundant/legacy-binary/build-spec/debian/goodbye.desktop b/t/recipes/checks/debian/control/field/redundant/legacy-binary/build-spec/debian/goodbye.desktop new file mode 100644 index 0000000..f6ce8e3 --- /dev/null +++ b/t/recipes/checks/debian/control/field/redundant/legacy-binary/build-spec/debian/goodbye.desktop @@ -0,0 +1,13 @@ +[Desktop Entry] +Name:Goodbye +# Name=Goodbye +Comment=Say hello! +SpecialTag=This doesn't exist! +Exec=goodbye +icon=hello +Terminal=true +Type=Application +Categories=WeirdStuff;Screensaver; +Encoding=ISO-10646-1 +[Other Entry] +Name=Goodbye diff --git a/t/recipes/checks/debian/control/field/redundant/legacy-binary/build-spec/debian/hello.desktop b/t/recipes/checks/debian/control/field/redundant/legacy-binary/build-spec/debian/hello.desktop new file mode 100644 index 0000000..f795468 --- /dev/null +++ b/t/recipes/checks/debian/control/field/redundant/legacy-binary/build-spec/debian/hello.desktop @@ -0,0 +1,14 @@ +# some random comment + +# [Foo Bar] +[KDE Desktop Entry] +Name=Hello +Name[en_US]=Hello +Comment=Say hello! +Exec=kdesu hello +Icon=hello +Terminal=true +Type=Application +Categories=GNOME;GTK;System;Applet;X-Foo;Settings; +Encoding=UTF-8 +OnlyShowIn=GNOME; diff --git a/t/recipes/checks/debian/control/field/redundant/legacy-binary/build-spec/debian/menu b/t/recipes/checks/debian/control/field/redundant/legacy-binary/build-spec/debian/menu new file mode 100644 index 0000000..e8972f4 --- /dev/null +++ b/t/recipes/checks/debian/control/field/redundant/legacy-binary/build-spec/debian/menu @@ -0,0 +1,26 @@ +?package(binary):needs=text title="Hello World" command="/usr/bin/hello" +?package(binary):needs=text section="Applications/System" title="Run cfdisk (0)" command="/usr/bin/su-to-root cfdisk" +?package(binary):needs="text" section="Applications/System/Hardware" title="Run cfdisk (1)" command="sux -p cfdisk" +?package(binary):needs="x11" section="Window Managers" title="Run xfdisk" command="/usr/sbin/su-to-root -c xfdisk" +?package(binary):needs="wm" section="Applications/System/Administration" title="Run fdisk-wm" command="su-to-root -c hello" +?package(binary):section="Apps/Games" title="I'm not root!" command="su-to-root -c imnothere" +?package(binary):needs="text" section="Apps/System" title="I'm not here!" command="/imnothere" +?package(binary,other-binary):\ + needs="text"\ + section="Applications/Shells"\ + title="more than one required"\ + command="other-bin -s omething" +?package(binary):needs="wmmodule" section="WindowManagers/Modules" title="somemodule" command="ModuleCmd" +?package(binary):needs="wmmodule" section="FVWM Modules" title="somemodule" command="ModuleCmd" +?package(binary):needs="text" section="Applications/System/Administration" title="I'm not in /usr/bin!" command="iminusrbin" +?package(binary):needs="text"\ + section="Applications/System/Administration"\ + title="I'm not root!" command="su-to-root -c imnothere" +?package(binary):needs="text" section="Applications/System/Administration"\ + title="Run cfdisk (0)" command="cfdisk" +?package(binary):needs="text" section="Applications/System/Administration" title="Hello World" command="/usr/bin/hello" +?package(binary):needs="wm" section="FVWM Modules" title="Fake Module" command="hello" +?package(binary):needs="fvwmmodule" section="Window Maker" title="Fake Module"\ + command="hello" +?package(binary):needs="x11" section="Applications/System/Hardware" title="Run xfdisk" command="su-to-root -c 'xfdisk -f'" +?package(binary):needs="text" section="Applications/System/Administration" title="foo" command="sh /path/to/foo" diff --git a/t/recipes/checks/debian/control/field/redundant/legacy-binary/build-spec/debian/menu-method b/t/recipes/checks/debian/control/field/redundant/legacy-binary/build-spec/debian/menu-method new file mode 100644 index 0000000..9f07bd7 --- /dev/null +++ b/t/recipes/checks/debian/control/field/redundant/legacy-binary/build-spec/debian/menu-method @@ -0,0 +1,22 @@ +#!/usr/bin/install-menu + +# -*- mode: shell-script; -*- +#I need menu-1! +# + +!include notmenu.h + +compat="menu-2" + +outputencoding="UTF-8"; +outputlanguage="C"; + +x11 = AppEntry("false"); +text = AppEntry("true"); + +startmenu = ""; +endmenu = ""; +submenutitle = ""; +rootprefix = "/var/lib/lintian/menu"; +userprefix = ".local/share/lintian/menu"; + diff --git a/t/recipes/checks/debian/control/field/redundant/legacy-binary/build-spec/debian/postinst b/t/recipes/checks/debian/control/field/redundant/legacy-binary/build-spec/debian/postinst new file mode 100644 index 0000000..29e1861 --- /dev/null +++ b/t/recipes/checks/debian/control/field/redundant/legacy-binary/build-spec/debian/postinst @@ -0,0 +1,6 @@ +#! /bin/bash -e + +if [ $1 eq 'configure' ] +then + suidregister hello-static root root 4755 +fi diff --git a/t/recipes/checks/debian/control/field/redundant/legacy-binary/build-spec/debian/rules b/t/recipes/checks/debian/control/field/redundant/legacy-binary/build-spec/debian/rules new file mode 100755 index 0000000..a962ea9 --- /dev/null +++ b/t/recipes/checks/debian/control/field/redundant/legacy-binary/build-spec/debian/rules @@ -0,0 +1,92 @@ +#!/usr/bin/make -f + +tmp=debian/tmp + +# This reference to $(PWD) should not cause an error but the one below +# should. +build-arch: + make + echo $(PWD) + +build: build-arch + +clean: + make -i clean + [ ! -f debian/files ] || rm -f debian/files + [ ! -f debian/substvars ] || rm -f debian/substvars + [ ! -d debian/tmp ] || rm -rf debian/tmp + [ ! -d debian/binary ] || rm -rf debian/binary + [ ! -d debian/binary-data ] || rm -rf debian/binary-data + +binary-arch: build + install -d $(tmp)/usr/bin + install -d $(tmp)/boot/hello + install -m 755 hello $(tmp)/usr/bin + touch $(tmp)/usr/bin/iminusrbin + chmod 755 $(tmp)/usr/bin/iminusrbin + install -m 755 hello-static $(tmp)/usr/bin + strip $(tmp)/usr/bin/hello-static + install -m 755 hello-static $(tmp)/usr/bin/hello.static + strip --remove-section=.comment --remove-section=.note $(tmp)/usr/bin/hello.static + ln $(tmp)/usr/bin/hello.static $(tmp)/usr/bin/static-hello + install -m 755 hello-static $(tmp)/boot/hello + strip --remove-section=.comment --remove-section=.note $(tmp)/boot/hello/hello-static + install -d $(tmp)/usr/share/doc/binary + install -m 644 INSTALL $(tmp)/usr/share/doc/binary + install -d $(tmp)/usr/share/doc/binary/html + echo '' > $(tmp)/usr/share/doc/binary/html/index.html + echo '' > $(tmp)/usr/share/doc/binary/html/ch1.html + ln -s ../html/./ch1.html $(tmp)/usr/share/doc/binary/html/ch2.html + ln -s /usr/share/doc/binary/htm/ch1.html $(tmp)/usr/share/doc/binary/html/ch3.html + echo '' > $(tmp)/usr/share/doc/binary/html/ch5.html + ln $(tmp)/usr/share/doc/binary/html/ch5.html \ + $(tmp)/usr/share/doc/binary/html/ch6.html + install -d $(tmp)/usr/share/menu + install -d $(tmp)/usr/lib/menu + install -d $(tmp)/usr/share/binary + install -m 644 debian/menu $(tmp)/usr/share/menu/binary + install -m 644 debian/menu $(tmp)/usr/lib/menu/binary + install -d $(tmp)/etc/menu-methods + install -m 755 debian/menu-method $(tmp)/etc/menu-methods/lintian + install -d $(tmp)/usr/share/doc-base + install -m 644 debian/doc-base $(tmp)/usr/share/doc-base/binary + touch '$(tmp)/usr/share/doc-base/space ' + install -m 644 debian/README.Debian $(tmp)/usr/share/doc/binary + install -m 644 debian/NEWS.Debian $(tmp)/usr/share/doc/binary + gzip -n -9 $(tmp)/usr/share/doc/binary/NEWS.Debian + install -m 644 debian/copyright $(tmp)/usr/share/doc/binary + install -m 644 debian/changelog $(tmp)/usr/share/doc/binary + #gzip -n -9 $(tmp)/usr/share/doc/binary/changelog + install -d $(tmp)/DEBIAN + install -m 755 debian/postinst $(tmp)/DEBIAN + install -m 644 debian/conffiles $(tmp)/DEBIAN + + install -d $(tmp)/usr/share/applications + install -m 644 debian/hello.desktop \ + $(tmp)/usr/share/applications/hello.desktop + install -m 755 debian/goodbye.desktop \ + $(tmp)/usr/share/applications/goodbye.desktop + + # should be ok... + echo boe > $(tmp)/usr/bar + ln $(tmp)/usr/bar $(tmp)/usr/foo + # but this isn't + echo boe > $(tmp)/usr/bar2 + ln $(tmp)/usr/bar2 $(tmp)/usr/share/baz + + dd if=/dev/zero of=$(tmp)/usr/share/binary/largefile bs=1024 count=4000 + + install -d debian/binary-data/DEBIAN + install -d debian/binary-data/usr/share/doc + ln -s binary debian/binary-data/usr/share/doc/binary-data + + dpkg-shlibdeps $(tmp)/usr/bin/hello + dpkg-gencontrol -pbinary -isp + dpkg-gencontrol -pbinary-data -Pdebian/binary-data -isp + + dpkg --build debian/tmp .. + dpkg --build debian/binary-data .. + +binary: binary-arch + +.PHONY: build-arch build binary-arch binary clean diff --git a/t/recipes/checks/debian/control/field/redundant/legacy-binary/build-spec/debian/templates b/t/recipes/checks/debian/control/field/redundant/legacy-binary/build-spec/debian/templates new file mode 100644 index 0000000..3d92861 --- /dev/null +++ b/t/recipes/checks/debian/control/field/redundant/legacy-binary/build-spec/debian/templates @@ -0,0 +1,16 @@ +# The debconf templates defined here are the sort that you'd use if +# providing a wordlist and an ispell dictionary for the language +# "perl". This shouldn't trigger warnings about not using debconf-po. + +Template: shared/packages-ispell +Type: text +Description: + +Template: shared/packages-wordlist +Type: text +Description: + +Template: miscfiles/languages +Type: text +Default: perl (Pathologically Eclectic Rubbish Lister) +Description: diff --git a/t/recipes/checks/debian/control/field/redundant/legacy-binary/build-spec/fill-values b/t/recipes/checks/debian/control/field/redundant/legacy-binary/build-spec/fill-values new file mode 100644 index 0000000..b503871 --- /dev/null +++ b/t/recipes/checks/debian/control/field/redundant/legacy-binary/build-spec/fill-values @@ -0,0 +1,5 @@ +Skeleton: upload-non-native +Testname: legacy-binary +Source: binary +Version: 4-1.1 +Description: Legacy test "binary" diff --git a/t/recipes/checks/debian/control/field/redundant/legacy-binary/build-spec/orig/INSTALL b/t/recipes/checks/debian/control/field/redundant/legacy-binary/build-spec/orig/INSTALL new file mode 100644 index 0000000..3b50ea9 --- /dev/null +++ b/t/recipes/checks/debian/control/field/redundant/legacy-binary/build-spec/orig/INSTALL @@ -0,0 +1,176 @@ +Basic Installation +================== + + These are generic installation instructions. + + The `configure' shell script attempts to guess correct values for +various system-dependent variables used during compilation. It uses +those values to create a `Makefile' in each directory of the package. +It may also create one or more `.h' files containing system-dependent +definitions. Finally, it creates a shell script `config.status' that +you can run in the future to recreate the current configuration, a file +`config.cache' that saves the results of its tests to speed up +reconfiguring, and a file `config.log' containing compiler output +(useful mainly for debugging `configure'). + + If you need to do unusual things to compile the package, please try +to figure out how `configure' could check whether to do them, and mail +diffs or instructions to the address given in the `README' so they can +be considered for the next release. If at some point `config.cache' +contains results you don't want to keep, you may remove or edit it. + + The file `configure.in' is used to create `configure' by a program +called `autoconf'. You only need `configure.in' if you want to change +it or regenerate `configure' using a newer version of `autoconf'. + +The simplest way to compile this package is: + + 1. `cd' to the directory containing the package's source code and type + `./configure' to configure the package for your system. If you're + using `csh' on an old version of System V, you might need to type + `sh ./configure' instead to prevent `csh' from trying to execute + `configure' itself. + + Running `configure' takes a while. While running, it prints some + messages telling which features it is checking for. + + 2. Type `make' to compile the package. + + 3. Optionally, type `make check' to run any self-tests that come with + the package. + + 4. Type `make install' to install the programs and any data files and + documentation. + + 5. You can remove the program binaries and object files from the + source code directory by typing `make clean'. To also remove the + files that `configure' created (so you can compile the package for + a different kind of computer), type `make distclean'. There is + also a `make maintainer-clean' target, but that is intended mainly + for the package's developers. If you use it, you may have to get + all sorts of other programs in order to regenerate files that came + with the distribution. + +Compilers and Options +===================== + + Some systems require unusual options for compilation or linking that +the `configure' script does not know about. You can give `configure' +initial values for variables by setting them in the environment. Using +a Bourne-compatible shell, you can do that on the command line like +this: + CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure + +Or on systems that have the `env' program, you can do it like this: + env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure + +Compiling For Multiple Architectures +==================================== + + You can compile the package for more than one kind of computer at the +same time, by placing the object files for each architecture in their +own directory. To do this, you must use a version of `make' that +supports the `VPATH' variable, such as GNU `make'. `cd' to the +directory where you want the object files and executables to go and run +the `configure' script. `configure' automatically checks for the +source code in the directory that `configure' is in and in `..'. + + If you have to use a `make' that does not supports the `VPATH' +variable, you have to compile the package for one architecture at a time +in the source code directory. After you have installed the package for +one architecture, use `make distclean' before reconfiguring for another +architecture. + +Installation Names +================== + + By default, `make install' will install the package's files in +`/usr/local/bin', `/usr/local/man', etc. You can specify an +installation prefix other than `/usr/local' by giving `configure' the +option `--prefix=PATH'. + + You can specify separate installation prefixes for +architecture-specific files and architecture-independent files. If you +give `configure' the option `--exec-prefix=PATH', the package will use +PATH as the prefix for installing programs and libraries. +Documentation and other data files will still use the regular prefix. + + If the package supports it, you can cause programs to be installed +with an extra prefix or suffix on their names by giving `configure' the +option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. + +Optional Features +================= + + Some packages pay attention to `--enable-FEATURE' options to +`configure', where FEATURE indicates an optional part of the package. +They may also pay attention to `--with-PACKAGE' options, where PACKAGE +is something like `gnu-as' or `x' (for the X Window System). The +`README' should mention any `--enable-' and `--with-' options that the +package recognizes. + + For packages that use the X Window System, `configure' can usually +find the X include and library files automatically, but if it doesn't, +you can use the `configure' options `--x-includes=DIR' and +`--x-libraries=DIR' to specify their locations. + +Specifying the System Type +========================== + + There may be some features `configure' can not figure out +automatically, but needs to determine by the type of host the package +will run on. Usually `configure' can figure that out, but if it prints +a message saying it can not guess the host type, give it the +`--host=TYPE' option. TYPE can either be a short name for the system +type, such as `sun4', or a canonical name with three fields: + CPU-COMPANY-SYSTEM + +See the file `config.sub' for the possible values of each field. If +`config.sub' isn't included in this package, then this package doesn't +need to know the host type. + + If you are building compiler tools for cross-compiling, you can also +use the `--target=TYPE' option to select the type of system they will +produce code for and the `--build=TYPE' option to select the type of +system on which you are compiling the package. + +Sharing Defaults +================ + + If you want to set default values for `configure' scripts to share, +you can create a site shell script called `config.site' that gives +default values for variables like `CC', `cache_file', and `prefix'. +`configure' looks for `PREFIX/share/config.site' if it exists, then +`PREFIX/etc/config.site' if it exists. Or, you can set the +`CONFIG_SITE' environment variable to the location of the site script. +A warning: not all `configure' scripts look for a site script. + +Operation Controls +================== + + `configure' recognizes the following options to control how it +operates. + +`--cache-file=FILE' + Use and save the results of the tests in FILE instead of + `./config.cache'. Set FILE to `/dev/null' to disable caching, for + debugging `configure'. + +`--help' + Print a summary of the options to `configure', and exit. + +`--quiet' +`--silent' +`-q' + Do not print messages saying which checks are being made. + +`--srcdir=DIR' + Look for the package's source code in directory DIR. Usually + `configure' can determine that directory automatically. + +`--version' + Print the version of Autoconf used to generate the `configure' + script, and exit. + +`configure' also accepts some other, not widely useful, options. + diff --git a/t/recipes/checks/debian/control/field/redundant/legacy-binary/build-spec/orig/Makefile b/t/recipes/checks/debian/control/field/redundant/legacy-binary/build-spec/orig/Makefile new file mode 100644 index 0000000..da1dc55 --- /dev/null +++ b/t/recipes/checks/debian/control/field/redundant/legacy-binary/build-spec/orig/Makefile @@ -0,0 +1,12 @@ +all: hello hello-static + +hello: hello.c + gcc hello.c -o hello + +hello-static: hello.c + gcc -static hello.c -o hello-static + +clean: + rm -f hello hello-static + +distclean: clean diff --git a/t/recipes/checks/debian/control/field/redundant/legacy-binary/build-spec/orig/hello.c b/t/recipes/checks/debian/control/field/redundant/legacy-binary/build-spec/orig/hello.c new file mode 100644 index 0000000..2fb04e1 --- /dev/null +++ b/t/recipes/checks/debian/control/field/redundant/legacy-binary/build-spec/orig/hello.c @@ -0,0 +1,8 @@ +#include +#include + +int main(int argc, char *argv[]) { + + printf("Hello, World!\n"); + exit(0); +} diff --git a/t/recipes/checks/debian/control/field/redundant/legacy-binary/eval/desc b/t/recipes/checks/debian/control/field/redundant/legacy-binary/eval/desc new file mode 100644 index 0000000..8a0c040 --- /dev/null +++ b/t/recipes/checks/debian/control/field/redundant/legacy-binary/eval/desc @@ -0,0 +1,2 @@ +Testname: legacy-binary +Check: debian/control/field/redundant diff --git a/t/recipes/checks/debian/control/field/redundant/legacy-binary/eval/hints b/t/recipes/checks/debian/control/field/redundant/legacy-binary/eval/hints new file mode 100644 index 0000000..6d49eb7 --- /dev/null +++ b/t/recipes/checks/debian/control/field/redundant/legacy-binary/eval/hints @@ -0,0 +1 @@ +binary (source): installable-field-mirrors-source (in section for binary) Vcs-Svn [debian/control:16] diff --git a/t/recipes/checks/debian/control/field/redundant/legacy-binary/eval/post-test b/t/recipes/checks/debian/control/field/redundant/legacy-binary/eval/post-test new file mode 100644 index 0000000..3deefd5 --- /dev/null +++ b/t/recipes/checks/debian/control/field/redundant/legacy-binary/eval/post-test @@ -0,0 +1,3 @@ +s/arch-dep-package-has-big-usr-share .*kB .*%/arch-dep-package-has-big-usr-share/ +/: hardening-.*/ d +s/\(current is ([0-9]+\.)+[0-9]\)/(current is CURRENT)/ diff --git a/t/recipes/checks/debian/control/field/redundant/legacy-libbaz/build-spec/debian/changelog.in b/t/recipes/checks/debian/control/field/redundant/legacy-libbaz/build-spec/debian/changelog.in new file mode 100644 index 0000000..91a6bb5 --- /dev/null +++ b/t/recipes/checks/debian/control/field/redundant/legacy-libbaz/build-spec/debian/changelog.in @@ -0,0 +1,6 @@ +libbaz ([% $version %]) [% $distribution %]; urgency=low + + * Initial setup + + -- Sean 'Shaleh' Perry Tue, 30 Jan 2001 15:23:59 -0800 + diff --git a/t/recipes/checks/debian/control/field/redundant/legacy-libbaz/build-spec/debian/compat.in b/t/recipes/checks/debian/control/field/redundant/legacy-libbaz/build-spec/debian/compat.in new file mode 100644 index 0000000..640a566 --- /dev/null +++ b/t/recipes/checks/debian/control/field/redundant/legacy-libbaz/build-spec/debian/compat.in @@ -0,0 +1 @@ +[% $dh_compat_level %] diff --git a/t/recipes/checks/debian/control/field/redundant/legacy-libbaz/build-spec/debian/control b/t/recipes/checks/debian/control/field/redundant/legacy-libbaz/build-spec/debian/control new file mode 100644 index 0000000..1506687 --- /dev/null +++ b/t/recipes/checks/debian/control/field/redundant/legacy-libbaz/build-spec/debian/control @@ -0,0 +1,58 @@ +Source: libbaz +Section: libs +Priority: optional +Maintainer: Lintian Maintainer +Build-depends: debhelper (>=4) +Standards-Version: 3.2.1 + +Package: libbaz1 +Architecture: any +Provides: libbaz +Description: test handling of library packages + Regression test for lintian's handling of libraries. + . + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. + +Package: libbaz1-dev +Architecture: any +Depends: libbaz1 (= ${source:Version}), perlapi-5.8.8 +Description: development package + Regression test for lintian's handling of libraries (dev). + . + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. + +Package: libbaz2 +Architecture: any +Depends: ${shlibs:Depends}, libssl0.9.8 +Description: test handling of library packages (good) + Regression test for lintian's handling of libraries (good). + . + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. + +Package: libbaz2-dev +Architecture: any +Depends: ${shlibs:Depends}, libbaz2 (= ${source:Version}) +Description: development package (good) + Regression test for lintian's handling of libraries (dev good). + . + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. + +Package: libbaz2-dbg +Architecture: any +Depends: libbaz2 (= ${binary:Version}) +Priority: optional +Description: debugging package + Regression test for lintian's handling of libraries (debug). + . + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. + diff --git a/t/recipes/checks/debian/control/field/redundant/legacy-libbaz/build-spec/debian/copyright b/t/recipes/checks/debian/control/field/redundant/legacy-libbaz/build-spec/debian/copyright new file mode 100644 index 0000000..a874c87 --- /dev/null +++ b/t/recipes/checks/debian/control/field/redundant/legacy-libbaz/build-spec/debian/copyright @@ -0,0 +1,8 @@ +This package is released under public domain. This is distributed in the hope +that it will be useful, but without any warranty; without even the implied +warranty of merchantability or fitness for a particular purpose. + +A reference to /usr/share/common-licenses/GPL-2 to make it look like this +package is under the GPL and trigger the OpenSSL warning. + +However, this has an OpenSSL exception. diff --git a/t/recipes/checks/debian/control/field/redundant/legacy-libbaz/build-spec/debian/dev.postinst b/t/recipes/checks/debian/control/field/redundant/legacy-libbaz/build-spec/debian/dev.postinst new file mode 100644 index 0000000..683e3cc --- /dev/null +++ b/t/recipes/checks/debian/control/field/redundant/legacy-libbaz/build-spec/debian/dev.postinst @@ -0,0 +1,4 @@ +#!/bin/sh -e + +$PKG=libbaz1-dev + diff --git a/t/recipes/checks/debian/control/field/redundant/legacy-libbaz/build-spec/debian/dev.prerm b/t/recipes/checks/debian/control/field/redundant/legacy-libbaz/build-spec/debian/dev.prerm new file mode 100644 index 0000000..683e3cc --- /dev/null +++ b/t/recipes/checks/debian/control/field/redundant/legacy-libbaz/build-spec/debian/dev.prerm @@ -0,0 +1,4 @@ +#!/bin/sh -e + +$PKG=libbaz1-dev + diff --git a/t/recipes/checks/debian/control/field/redundant/legacy-libbaz/build-spec/debian/lib.postinst b/t/recipes/checks/debian/control/field/redundant/legacy-libbaz/build-spec/debian/lib.postinst new file mode 100644 index 0000000..ec0b98a --- /dev/null +++ b/t/recipes/checks/debian/control/field/redundant/legacy-libbaz/build-spec/debian/lib.postinst @@ -0,0 +1,10 @@ +#!/bin/sh -e + +$PKG=libbaz1 + +if [ "$1" = "configure" ]; then + if [ -d /usr/doc -a ! -e /usr/doc/$PKG -a -d /usr/share/doc/$PKG ] +; then + ln -sf ../share/doc/$PKG /usr/doc/$PKG + fi +fi diff --git a/t/recipes/checks/debian/control/field/redundant/legacy-libbaz/build-spec/debian/lib.prerm b/t/recipes/checks/debian/control/field/redundant/legacy-libbaz/build-spec/debian/lib.prerm new file mode 100644 index 0000000..50e37c3 --- /dev/null +++ b/t/recipes/checks/debian/control/field/redundant/legacy-libbaz/build-spec/debian/lib.prerm @@ -0,0 +1,7 @@ +#!/bin/sh -e + +$PKG=libbaz1 + +if [ \( "$1" = "upgrade" -o "$1" = "remove" \) -a -L /usr/doc/$PKG ]; then + rm -f /usr/doc/$PKG +fi diff --git a/t/recipes/checks/debian/control/field/redundant/legacy-libbaz/build-spec/debian/lib.shlibs b/t/recipes/checks/debian/control/field/redundant/legacy-libbaz/build-spec/debian/lib.shlibs new file mode 100644 index 0000000..b88e288 --- /dev/null +++ b/t/recipes/checks/debian/control/field/redundant/legacy-libbaz/build-spec/debian/lib.shlibs @@ -0,0 +1,8 @@ +libdoesntexist2 1.0 libbaz1 +libdoesntexist2 1.0 libbaz1 +libbaz2 1.1 libbaz +libbaz3 1 libbaz1 (>> 1-1) +libbaz4 1 libbaz1 (= 1-1) +libbaz5 1 libbaz2 +udeb: libdoesntexist2 1.0 libbaz2 +udeb: libdoesntexist2 1.0 libbaz2 diff --git a/t/recipes/checks/debian/control/field/redundant/legacy-libbaz/build-spec/debian/lib.symbols b/t/recipes/checks/debian/control/field/redundant/legacy-libbaz/build-spec/debian/lib.symbols new file mode 100644 index 0000000..72f9d8a --- /dev/null +++ b/t/recipes/checks/debian/control/field/redundant/legacy-libbaz/build-spec/debian/lib.symbols @@ -0,0 +1,3 @@ +libbaz.so.2 libbaz1 #MINVER# + pw 1-1 + foo 1.1-1 diff --git a/t/recipes/checks/debian/control/field/redundant/legacy-libbaz/build-spec/debian/rules b/t/recipes/checks/debian/control/field/redundant/legacy-libbaz/build-spec/debian/rules new file mode 100755 index 0000000..fa99bc8 --- /dev/null +++ b/t/recipes/checks/debian/control/field/redundant/legacy-libbaz/build-spec/debian/rules @@ -0,0 +1,121 @@ +#!/usr/bin/make -f + +lib_tmp=debian/tmp-lib +dev_tmp=debian/tmp-dev + +LIB=libbaz1 +DEV=libbaz1-dev + +VENDORARCH := $(shell perl -MConfig -wE'say substr($$Config{vendorarch},1)') + +build-arch: + $(MAKE) + +build-indep: + +build: build-arch build-indep + +clean: + $(MAKE) clean + dh_clean -plibbaz2 -plibbaz2-dev + rm -f debian/files debian/substvars + rm -rf $(lib_tmp) $(dev_tmp) + +# Now the correct libbaz2-dev package +binary-correct: + install -d debian/libbaz2-dev/usr/lib + cp -a libbaz2.a libbaz2.so debian/libbaz2-dev/usr/lib + # usually, I'd also include some .h files to /usr/include + + # Now the correct libbaz2 package + install -d debian/libbaz2/usr/lib + cp -a libbaz2.so.* debian/libbaz2/usr/lib + chmod a-x debian/libbaz2/usr/lib/* + + # General stuff that is tested in other testsets: + dh_installdocs -plibbaz2 -plibbaz2-dev -plibbaz2-dbg + dh_compress -plibbaz2 -plibbaz2-dev -plibbaz2-dbg + + # Mess up the libbaz2 changelog files to test the symlink handling. + ln -s /usr/share/doc/lintian/changelog.gz \ + debian/libbaz2/usr/share/doc/libbaz2/changelog.gz + install -m 644 debian/changelog \ + debian/libbaz2-dev/usr/share/doc/libbaz2-dev/foo + ln -s foo debian/libbaz2-dev/usr/share/doc/libbaz2-dev/changelog + + # Okay, if either line is omitted, it should be noted + dh_strip --dbg-package=libbaz2-dbg -plibbaz2 -plibbaz2-dev + dh_makeshlibs -plibbaz2 -plibbaz2-dev -plibbaz2-dbg + dh_shlibdeps -plibbaz2 -plibbaz2-dev -plibbaz2-dbg + + # and again, regular packaging stuff + dh_installdeb -plibbaz2 -plibbaz2-dev -plibbaz2-dbg + echo udeb: libbaz2 1.0 libbaz2 >> debian/libbaz2/DEBIAN/shlibs + dh_gencontrol -plibbaz2 -plibbaz2-dev -plibbaz2-dbg + dh_builddeb -plibbaz2 -plibbaz2-dev -plibbaz2-dbg + +# and the incorrect one +binary-arch: build-arch binary-correct + # first, the lib package + install -d $(lib_tmp)/usr/lib + # resp. no soname (check), wrong soname (check), and no-pic (check) + cp -a libbaz1.so.1.0* $(lib_tmp)/usr/lib + cp -a libbaz2.so.1.0.3b $(lib_tmp)/usr/lib/libfoo2.so.1.0.3b + install -m644 libbaz3.so.1.0.3b $(lib_tmp)/usr/lib/libbaz3.so.1.0.3b + # let's include the .a in the non-dev too (TODO) + # Also, libbaz1.a hasn't a symbol table (TODO) + cp -a *.a $(lib_tmp)/usr/lib + # And a wrong .so symlink (wrong, only in -dev, TODO) + ln -s libfoo3.so.0.9 $(lib_tmp)/usr/lib/libfoo3.so + # And a wrong .so.X symlink (wrong, should point to a real existing + # shlib, TODO) + ln -s libfoo.so.0.9.1 $(lib_tmp)/usr/lib/libfoo.so.0.9 + # And a plain .so (wrong, TODO) + touch $(lib_tmp)/usr/lib/libbar2.so + # And a non-versioned SONAME. + install -m644 libbaz.so $(lib_tmp)/usr/lib/libbaz.so + strip --remove-section=.comment --strip-unneeded $(lib_tmp)/usr/lib/libbaz.so + # Pretend to be a Perl module to test a lack of Perl dependencies. + install -d $(lib_tmp)/$(VENDORARCH)/auto/Foo + install -m 644 libbaz2.so.1.0.3b $(lib_tmp)/$(VENDORARCH)/auto/Foo/Foo.so + strip $(lib_tmp)/$(VENDORARCH)/auto/Foo/Foo.so + + install -d $(lib_tmp)/usr/share/doc/$(LIB) + install -m 644 debian/copyright $(lib_tmp)/usr/share/doc/$(LIB) + install -m 644 debian/changelog $(lib_tmp)/usr/share/doc/$(LIB) + gzip -n -9 $(lib_tmp)/usr/share/doc/$(LIB)/changelog + install -d $(lib_tmp)/DEBIAN + install -m 755 debian/lib.postinst $(lib_tmp)/DEBIAN/postinst + install -m 755 debian/lib.prerm $(lib_tmp)/DEBIAN/prerm + touch $(lib_tmp)/usr/share/doc/README.Debian + #dpkg-shlibdeps $(lib_tmp)/usr/lib/libbaz.so.1.0 + install -m 755 debian/lib.shlibs $(lib_tmp)/DEBIAN/shlibs + install -m 755 debian/lib.symbols $(lib_tmp)/DEBIAN/symbols + dpkg-gencontrol -isp -p$(LIB) -P$(lib_tmp) + dpkg --build $(lib_tmp) .. + + # now the -dev package + install -d $(dev_tmp)/usr/include + install -d $(lib_tmp)/usr/lib + # let's also install the .so at the same time... (wrong, TODO) + cp -a *.a *.so.* $(lib_tmp)/usr/lib + # and fuck up permission (TODO) + chmod a+x $(lib_tmp)/usr/lib/*.a + # Pretend to be a Perl module to test a lack of Perl dependencies. + install -d $(dev_tmp)/$(VENDORARCH)/auto/Foo + install -m 644 libbaz2.so.1.0.3b $(dev_tmp)/$(VENDORARCH)/auto/Foo/Foo.so + strip $(dev_tmp)/$(VENDORARCH)/auto/Foo/Foo.so + install -d $(dev_tmp)/usr/share/doc + ln -s $(LIB) $(dev_tmp)/usr/share/doc/$(DEV) + install -d $(dev_tmp)/DEBIAN + install -m 755 debian/dev.postinst $(dev_tmp)/DEBIAN/postinst + install -m 755 debian/dev.prerm $(dev_tmp)/DEBIAN/prerm + dpkg-gencontrol -isp -p$(DEV) -P$(dev_tmp) + dpkg --build $(dev_tmp) .. + + +binary: binary-arch + +# The mention of binary-indep here should be sufficient to suppress the +# warning that it's not present. +.PHONY: build-arch build-indep build binary-arch binary-indep binary clean diff --git a/t/recipes/checks/debian/control/field/redundant/legacy-libbaz/build-spec/debian/source.lintian-overrides b/t/recipes/checks/debian/control/field/redundant/legacy-libbaz/build-spec/debian/source.lintian-overrides new file mode 100644 index 0000000..6008d27 --- /dev/null +++ b/t/recipes/checks/debian/control/field/redundant/legacy-libbaz/build-spec/debian/source.lintian-overrides @@ -0,0 +1 @@ +libbaz source: maintainer-script-lacks-debhelper-token diff --git a/t/recipes/checks/debian/control/field/redundant/legacy-libbaz/build-spec/fill-values b/t/recipes/checks/debian/control/field/redundant/legacy-libbaz/build-spec/fill-values new file mode 100644 index 0000000..7effe4f --- /dev/null +++ b/t/recipes/checks/debian/control/field/redundant/legacy-libbaz/build-spec/fill-values @@ -0,0 +1,6 @@ +Skeleton: upload-non-native +Testname: legacy-libbaz +Source: libbaz +Version: 1-1 +Default-Build-Depends: debhelper (>= 9.20151004~) +Description: Legacy test "libbaz" diff --git a/t/recipes/checks/debian/control/field/redundant/legacy-libbaz/build-spec/orig/Makefile b/t/recipes/checks/debian/control/field/redundant/legacy-libbaz/build-spec/orig/Makefile new file mode 100644 index 0000000..657dc2a --- /dev/null +++ b/t/recipes/checks/debian/control/field/redundant/legacy-libbaz/build-spec/orig/Makefile @@ -0,0 +1,55 @@ +# This is the correct way to build a lib + +CC=gcc +CFLAGS=-g -Wall -Winline -O2 +LDFLAGS=-Wl,--no-as-needed + +OBJS=baz.o extra.o +SHOBJS=baz.sho extra.sho +NOPICOBJS = $(SHOBJS) + +all: libbaz1.a libbaz2.a libbaz1.so.1.0.3b libbaz2.so libbaz3.so.1.0.3b \ + libbaz.so + +libbaz2.so: libbaz2.so.1.0 + ln -sf $^ $@ +libbaz2.so.1.0: libbaz2.so.1.0.3b + ln -sf $^ $@ + +# Oops, forget the soname altogether +libbaz1.so.1.0.3b: $(NOPICOBJS) + $(CC) $(LDFLAGS) -o $@ -shared $^ -lc + +libbaz2.so.1.0.3b: $(SHOBJS) + $(CC) $(LDFLAGS) -o $@ -shared -Wl,-soname,libbaz2.so.1.0 $^ -lc + +# Non-PIC. We can't test this on all architectures +libbaz3.so.1.0.3b: $(NOPICOBJS) + $(CC) $(LDFLAGS) -o $@ -shared -Wl,-soname,libbaz3.so.1 $^ -lc + +# Non-versioned SONAME. +libbaz.so: $(SHOBJS) + $(CC) $(LDFLAGS) -o $@ -shared -Wl,-soname,libbaz.so $^ -lc + +#%.o-noreentrant: %.c +# $(CC) $(LDFLAGS) $(CFLAGS) -o $@ -c $< + +%.sho: %.c + $(CC) $(LDFLAGS) $(CFLAGS) -D_REENTRANT -fPIC -o $@ -c $< + +%.o: %.c + $(CC) $(LDFLAGS) $(CFLAGS) -D_REENTRANT -o $@ -c $< + +libbaz2.a: $(OBJS) + ar cq $@ $(OBJS) + strip --strip-unneeded --remove-section=.comment \ + --remove-section=-note $@ + ranlib $@ + +# The pic one in the .a (wrong), no archive table +libbaz1.a: $(SHOBJS) + ar cqS $@ $^ + strip --strip-unneeded --remove-section=.comment \ + --remove-section=-note $@ +clean: + rm -f *.a *.o *.so* *.sho diff --git a/t/recipes/checks/debian/control/field/redundant/legacy-libbaz/build-spec/orig/baz.c b/t/recipes/checks/debian/control/field/redundant/legacy-libbaz/build-spec/orig/baz.c new file mode 100644 index 0000000..4d5fc45 --- /dev/null +++ b/t/recipes/checks/debian/control/field/redundant/legacy-libbaz/build-spec/orig/baz.c @@ -0,0 +1,6 @@ +#include + +double pw(double p) +{ + return exp(p); +} diff --git a/t/recipes/checks/debian/control/field/redundant/legacy-libbaz/build-spec/orig/extra.c b/t/recipes/checks/debian/control/field/redundant/legacy-libbaz/build-spec/orig/extra.c new file mode 100644 index 0000000..e69de29 diff --git a/t/recipes/checks/debian/control/field/redundant/legacy-libbaz/eval/desc b/t/recipes/checks/debian/control/field/redundant/legacy-libbaz/eval/desc new file mode 100644 index 0000000..485af32 --- /dev/null +++ b/t/recipes/checks/debian/control/field/redundant/legacy-libbaz/eval/desc @@ -0,0 +1,2 @@ +Testname: legacy-libbaz +Check: debian/control/field/redundant diff --git a/t/recipes/checks/debian/control/field/redundant/legacy-libbaz/eval/hints b/t/recipes/checks/debian/control/field/redundant/legacy-libbaz/eval/hints new file mode 100644 index 0000000..fc30343 --- /dev/null +++ b/t/recipes/checks/debian/control/field/redundant/legacy-libbaz/eval/hints @@ -0,0 +1 @@ +libbaz (source): installable-field-mirrors-source (in section for libbaz2-dbg) Priority [debian/control:51] diff --git a/t/recipes/checks/debian/control/field/redundant/legacy-libbaz/eval/post-test b/t/recipes/checks/debian/control/field/redundant/legacy-libbaz/eval/post-test new file mode 100755 index 0000000..29dc3f4 --- /dev/null +++ b/t/recipes/checks/debian/control/field/redundant/legacy-libbaz/eval/post-test @@ -0,0 +1,4 @@ +/: hardening-.*/ d +s/\(current is ([0-9]+\.)+[0-9]\)/(current is CURRENT)/ +s,usr/lib/([^\/]*/)?perl[0-9]*(/[0-9]*\.[0-9]*)?/,usr/lib/ma-dir/perl/version/,g +/: file-references-package-build-path / d diff --git a/t/recipes/checks/debian/control/field/relation/control-file-duplicate/build-spec/debian/compat.in b/t/recipes/checks/debian/control/field/relation/control-file-duplicate/build-spec/debian/compat.in new file mode 100644 index 0000000..640a566 --- /dev/null +++ b/t/recipes/checks/debian/control/field/relation/control-file-duplicate/build-spec/debian/compat.in @@ -0,0 +1 @@ +[% $dh_compat_level %] diff --git a/t/recipes/checks/debian/control/field/relation/control-file-duplicate/build-spec/debian/control.in b/t/recipes/checks/debian/control/field/relation/control-file-duplicate/build-spec/debian/control.in new file mode 100644 index 0000000..961052e --- /dev/null +++ b/t/recipes/checks/debian/control/field/relation/control-file-duplicate/build-spec/debian/control.in @@ -0,0 +1,22 @@ +Source: [% $source %] +Priority: optional +Section: [% $section %] +Maintainer: [% $author %] +Standards-Version: [% $standards_version %] +Build-Depends: [% $build_depends %], debhelper +Build-Depends-Indep: foobar, foo, foobar +Build-Conflicts: bar, + baz, + bar [i386] +Rules-Requires-Root: no + +Package: [% $source %] +Architecture: [% $package_architecture %] +Depends: ${shlibs:Depends}, ${misc:Depends}, ${misc:Depends} +Recommends: foo (>> 1.0) | bar, foo +Suggests: baz (= 1.0), baz, baz (>= 2.0) +Description: [% $description %] + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. diff --git a/t/recipes/checks/debian/control/field/relation/control-file-duplicate/build-spec/fill-values b/t/recipes/checks/debian/control/field/relation/control-file-duplicate/build-spec/fill-values new file mode 100644 index 0000000..51e95fe --- /dev/null +++ b/t/recipes/checks/debian/control/field/relation/control-file-duplicate/build-spec/fill-values @@ -0,0 +1,5 @@ +Skeleton: upload-native +Testname: control-file-duplicate +Package-Architecture: all +Description: Pedantic test for duplicate relations +Default-Build-Depends: debhelper (>= [% $dh_compat_level %]~) diff --git a/t/recipes/checks/debian/control/field/relation/control-file-duplicate/eval/desc b/t/recipes/checks/debian/control/field/relation/control-file-duplicate/eval/desc new file mode 100644 index 0000000..a819543 --- /dev/null +++ b/t/recipes/checks/debian/control/field/relation/control-file-duplicate/eval/desc @@ -0,0 +1,2 @@ +Testname: control-file-duplicate +Check: debian/control/field/relation diff --git a/t/recipes/checks/debian/control/field/relation/control-file-duplicate/eval/hints b/t/recipes/checks/debian/control/field/relation/control-file-duplicate/eval/hints new file mode 100644 index 0000000..2633892 --- /dev/null +++ b/t/recipes/checks/debian/control/field/relation/control-file-duplicate/eval/hints @@ -0,0 +1,5 @@ +control-file-duplicate (source): redundant-control-relation (in source paragraph) Build-Depends-Indep foobar, foobar [debian/control:7] +control-file-duplicate (source): redundant-control-relation (in source paragraph) Build-Depends debhelper, debhelper (>= 13~) [debian/control:6] +control-file-duplicate (source): redundant-control-relation (in source paragraph) Build-Conflicts bar, bar [i386] [debian/control:8] +control-file-duplicate (source): redundant-control-relation (in section for control-file-duplicate) Suggests baz, baz (= 1.0), baz (>= 2.0) [debian/control:17] +control-file-duplicate (source): redundant-control-relation (in section for control-file-duplicate) Depends ${misc:Depends}, ${misc:Depends} [debian/control:15] diff --git a/t/recipes/checks/debian/control/field/relation/control-file-general/build-spec/debian/control.in b/t/recipes/checks/debian/control/field/relation/control-file-general/build-spec/debian/control.in new file mode 100644 index 0000000..3058e5a --- /dev/null +++ b/t/recipes/checks/debian/control/field/relation/control-file-general/build-spec/debian/control.in @@ -0,0 +1,118 @@ +Source: [% $source %] +Priority: optional +Maintainer: [% $author %] +Standards-Version: [% $standards_version %] +Build-Depends: [% $build_depends %], + fiddle [amd64 powerpc mips mipsel hppa s390], + faddle + (>> + 2) [ + sparc i386 amd64 + ] +Build-Depends-Indep: perl (> 5.8) +Rules-Requires-Root: no +XS-Vcs-Svn: https://svn.example.com/[% $source %]/trunk +#Vcs-Git: git://git.debian.org/collab-maint/.git +#Vcs-Browser: http://git.debian.org/?p=collab-maint/.git;a=summary + +Package: [% $source %] +Section: [% $section %] +Maintainer: [% $author %] +Build-Conflicts: foo +Architecture: all +Pre-depends: ${misc:Pre-depends}, multiarch-support +Depends: [% $source %], foo, baz, ${shlibs:Depends} ${some:Depends}, ${misc:Depends} +Recommends: foo, bar, no-match${lintian:Foo}, match${lintian:Match}, no-match${lintian:Bar}-foo +Suggests: bar | baz, no-match${lintian:Bar}, match${lintian:Match} +Description: [% $description %] + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. + +Package: [% $source %]-1 +Section: [% $section %] +Architecture: all +Depends: ${shlibs:Depends}, ${misc:Depends} +Breaks: libsqlite3-0 (< 3.6.12) +Description: [% $description %] + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. + +Package: [% $source %]-2 +Section: [% $section %] +Architecture: all +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: [% $description %] (two) + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. + +Package: [% $source %]-3 +Section: [% $section %] +Architecture: all +Depends: ${shlibs:Depends}, ${misc:Depends}, foo (>= 1), + baz (<< 2), + fizz (= 2.0), gcc-${pv:gcc} ${reqv:gcc} +Description: [% $description %] (three) + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. + +Package: [% $source %]-4 +Section: [% $section %] +Architecture: all +Depends: ${shlibs:Depends}, ${misc:Depends}, foo | + bar (>= 1), baz +Description: [% $description %] (four) + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. + +Package: [% $source %]-5 +Section: [% $section %] +Architecture: all +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: Description: [% $description %] + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. + +Package: [% $source %]-dbgsym +Section: debug +Architecture: all +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: Description: dbg-sym + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. + +Package: [% $source %]-dbg +Section: debug +Architecture: all +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: Description: debug + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. + +Package: [% $source %]-udeb +Section: debian-installer +Package-Type: udeb +Architecture: all +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: [% $description %] (udeb) + udeb tests. + . + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. diff --git a/t/recipes/checks/debian/control/field/relation/control-file-general/build-spec/debian/rules b/t/recipes/checks/debian/control/field/relation/control-file-general/build-spec/debian/rules new file mode 100644 index 0000000..f5db4bb --- /dev/null +++ b/t/recipes/checks/debian/control/field/relation/control-file-general/build-spec/debian/rules @@ -0,0 +1,8 @@ +#!/usr/bin/make -f +%: + dh $@ + +override_dh_gencontrol: + echo 'pv:gcc=4.3' >> debian/substvars + echo 'reqv:gcc=(>= 4.3-1)' >> debian/substvars + dh_gencontrol diff --git a/t/recipes/checks/debian/control/field/relation/control-file-general/build-spec/fill-values b/t/recipes/checks/debian/control/field/relation/control-file-general/build-spec/fill-values new file mode 100644 index 0000000..7338a95 --- /dev/null +++ b/t/recipes/checks/debian/control/field/relation/control-file-general/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: upload-native +Testname: control-file-general +Description: Various problems with debian/control diff --git a/t/recipes/checks/debian/control/field/relation/control-file-general/eval/desc b/t/recipes/checks/debian/control/field/relation/control-file-general/eval/desc new file mode 100644 index 0000000..27425f4 --- /dev/null +++ b/t/recipes/checks/debian/control/field/relation/control-file-general/eval/desc @@ -0,0 +1,11 @@ +Testname: control-file-general +Check: debian/control/field/relation +See-Also: + Debian Bug#30020, + Debian Bug#409099, + Debian Bug#516706, + Debian Bug#533202, + Debian Bug#557971, + Debian Bug#573399, + Debian Bug#580494, + Debian Bug#657110 diff --git a/t/recipes/checks/debian/control/field/relation/control-file-general/eval/hints b/t/recipes/checks/debian/control/field/relation/control-file-general/eval/hints new file mode 100644 index 0000000..67abb80 --- /dev/null +++ b/t/recipes/checks/debian/control/field/relation/control-file-general/eval/hints @@ -0,0 +1,3 @@ +control-file-general (source): obsolete-relation-form-in-source (in source paragraph) Build-Depends-Indep perl (> 5.8) [debian/control:12] +control-file-general (source): obsolete-relation-form-in-source (in section for control-file-general-1) Breaks libsqlite3-0 (< 3.6.12) [debian/control:37] +control-file-general (source): missing-separator-between-items (in section for control-file-general) '${shlibs:Depends}' and '${some:Depends}' [debian/control:24] diff --git a/t/recipes/checks/debian/control/field/relation/control-file-missing-separator/build-spec/debian/control.in b/t/recipes/checks/debian/control/field/relation/control-file-missing-separator/build-spec/debian/control.in new file mode 100644 index 0000000..fff0af8 --- /dev/null +++ b/t/recipes/checks/debian/control/field/relation/control-file-missing-separator/build-spec/debian/control.in @@ -0,0 +1,30 @@ +Source: control-file-missing-separator +Section: devel +Priority: optional +Maintainer: [% $author %] +Build-Depends: [% $build_depends %], + fiddle [amd64 powerpc + mips mipsel + hppa + s390], + faddle + (>> + 2) [ + sparc i386 amd64 + ] +Standards-Version: [% $standards_version %] + +Package: control-file-missing-separator +Architecture: all +Depends: ${shlibs:Depends}, ${misc:Depends}, foo (>= 1) + baz (<< 2), + fizz (= 2.0) +Suggests: p1 + p2 + p3 + p4 + p5 +Description: Test for missing separators in control files + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. diff --git a/t/recipes/checks/debian/control/field/relation/control-file-missing-separator/build-spec/fill-values b/t/recipes/checks/debian/control/field/relation/control-file-missing-separator/build-spec/fill-values new file mode 100644 index 0000000..1a4a198 --- /dev/null +++ b/t/recipes/checks/debian/control/field/relation/control-file-missing-separator/build-spec/fill-values @@ -0,0 +1,4 @@ +Skeleton: source-native +Testname: control-file-missing-separator +Version: 1 +Description: Test for missing separators in control files diff --git a/t/recipes/checks/debian/control/field/relation/control-file-missing-separator/eval/desc b/t/recipes/checks/debian/control/field/relation/control-file-missing-separator/eval/desc new file mode 100644 index 0000000..134b1a6 --- /dev/null +++ b/t/recipes/checks/debian/control/field/relation/control-file-missing-separator/eval/desc @@ -0,0 +1,2 @@ +Testname: control-file-missing-separator +Check: debian/control/field/relation diff --git a/t/recipes/checks/debian/control/field/relation/control-file-missing-separator/eval/hints b/t/recipes/checks/debian/control/field/relation/control-file-missing-separator/eval/hints new file mode 100644 index 0000000..232c263 --- /dev/null +++ b/t/recipes/checks/debian/control/field/relation/control-file-missing-separator/eval/hints @@ -0,0 +1,2 @@ +control-file-missing-separator (source): missing-separator-between-items (in section for control-file-missing-separator) 'p1' and 'p2' [debian/control:22] +control-file-missing-separator (source): missing-separator-between-items (in section for control-file-missing-separator) 'foo (>= 1)' and 'baz (<< 2)' [debian/control:19] diff --git a/t/recipes/checks/debian/control/field/rules-requires-root/control-file-missing-separator/build-spec/debian/control.in b/t/recipes/checks/debian/control/field/rules-requires-root/control-file-missing-separator/build-spec/debian/control.in new file mode 100644 index 0000000..fff0af8 --- /dev/null +++ b/t/recipes/checks/debian/control/field/rules-requires-root/control-file-missing-separator/build-spec/debian/control.in @@ -0,0 +1,30 @@ +Source: control-file-missing-separator +Section: devel +Priority: optional +Maintainer: [% $author %] +Build-Depends: [% $build_depends %], + fiddle [amd64 powerpc + mips mipsel + hppa + s390], + faddle + (>> + 2) [ + sparc i386 amd64 + ] +Standards-Version: [% $standards_version %] + +Package: control-file-missing-separator +Architecture: all +Depends: ${shlibs:Depends}, ${misc:Depends}, foo (>= 1) + baz (<< 2), + fizz (= 2.0) +Suggests: p1 + p2 + p3 + p4 + p5 +Description: Test for missing separators in control files + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. diff --git a/t/recipes/checks/debian/control/field/rules-requires-root/control-file-missing-separator/build-spec/fill-values b/t/recipes/checks/debian/control/field/rules-requires-root/control-file-missing-separator/build-spec/fill-values new file mode 100644 index 0000000..1a4a198 --- /dev/null +++ b/t/recipes/checks/debian/control/field/rules-requires-root/control-file-missing-separator/build-spec/fill-values @@ -0,0 +1,4 @@ +Skeleton: source-native +Testname: control-file-missing-separator +Version: 1 +Description: Test for missing separators in control files diff --git a/t/recipes/checks/debian/control/field/rules-requires-root/control-file-missing-separator/eval/desc b/t/recipes/checks/debian/control/field/rules-requires-root/control-file-missing-separator/eval/desc new file mode 100644 index 0000000..b788a20 --- /dev/null +++ b/t/recipes/checks/debian/control/field/rules-requires-root/control-file-missing-separator/eval/desc @@ -0,0 +1,2 @@ +Testname: control-file-missing-separator +Check: debian/control/field/rules-requires-root diff --git a/t/recipes/checks/debian/control/field/rules-requires-root/control-file-missing-separator/eval/hints b/t/recipes/checks/debian/control/field/rules-requires-root/control-file-missing-separator/eval/hints new file mode 100644 index 0000000..7fc3867 --- /dev/null +++ b/t/recipes/checks/debian/control/field/rules-requires-root/control-file-missing-separator/eval/hints @@ -0,0 +1 @@ +control-file-missing-separator (source): silent-on-rules-requiring-root [debian/control] diff --git a/t/recipes/checks/debian/control/field/rules-requires-root/control-file-rules-requires-root-binary-targets/build-spec/debian/control.in b/t/recipes/checks/debian/control/field/rules-requires-root/control-file-rules-requires-root-binary-targets/build-spec/debian/control.in new file mode 100644 index 0000000..9b17d19 --- /dev/null +++ b/t/recipes/checks/debian/control/field/rules-requires-root/control-file-rules-requires-root-binary-targets/build-spec/debian/control.in @@ -0,0 +1,17 @@ +Source: [% $source %] +Priority: optional +Section: [% $section %] +Maintainer: [% $author %] +Standards-Version: [% $standards_version %] +Build-Depends: [% $build_depends %] +Rules-Requires-Root: binary-targets +Homepage: https://lintian.debian.org/ + +Package: [% $source %] +Architecture: [% $package_architecture %] +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: [% $description %] + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. diff --git a/t/recipes/checks/debian/control/field/rules-requires-root/control-file-rules-requires-root-binary-targets/build-spec/debian/rules b/t/recipes/checks/debian/control/field/rules-requires-root/control-file-rules-requires-root-binary-targets/build-spec/debian/rules new file mode 100644 index 0000000..3d706f5 --- /dev/null +++ b/t/recipes/checks/debian/control/field/rules-requires-root/control-file-rules-requires-root-binary-targets/build-spec/debian/rules @@ -0,0 +1,7 @@ +#!/usr/bin/make -f + +%: + dh $@ + +override_dh_builddeb: + dh_builddeb -- -Zgzip diff --git a/t/recipes/checks/debian/control/field/rules-requires-root/control-file-rules-requires-root-binary-targets/build-spec/fill-values b/t/recipes/checks/debian/control/field/rules-requires-root/control-file-rules-requires-root-binary-targets/build-spec/fill-values new file mode 100644 index 0000000..f97b076 --- /dev/null +++ b/t/recipes/checks/debian/control/field/rules-requires-root/control-file-rules-requires-root-binary-targets/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: upload-native +Testname: control-file-rules-requires-root-binary-targets +Description: Test for "Rules-Requires-Root: binary-targets" diff --git a/t/recipes/checks/debian/control/field/rules-requires-root/control-file-rules-requires-root-binary-targets/eval/desc b/t/recipes/checks/debian/control/field/rules-requires-root/control-file-rules-requires-root-binary-targets/eval/desc new file mode 100644 index 0000000..7d4185b --- /dev/null +++ b/t/recipes/checks/debian/control/field/rules-requires-root/control-file-rules-requires-root-binary-targets/eval/desc @@ -0,0 +1,2 @@ +Testname: control-file-rules-requires-root-binary-targets +Check: debian/control/field/rules-requires-root diff --git a/t/recipes/checks/debian/control/field/rules-requires-root/control-file-rules-requires-root-binary-targets/eval/hints b/t/recipes/checks/debian/control/field/rules-requires-root/control-file-rules-requires-root-binary-targets/eval/hints new file mode 100644 index 0000000..bd286c7 --- /dev/null +++ b/t/recipes/checks/debian/control/field/rules-requires-root/control-file-rules-requires-root-binary-targets/eval/hints @@ -0,0 +1 @@ +control-file-rules-requires-root-binary-targets (source): rules-require-root-explicitly [debian/control:7] diff --git a/t/recipes/checks/debian/control/field/rules-requires-root/control-file-rules-requires-root-no/build-spec/debian/control.in b/t/recipes/checks/debian/control/field/rules-requires-root/control-file-rules-requires-root-no/build-spec/debian/control.in new file mode 100644 index 0000000..503994d --- /dev/null +++ b/t/recipes/checks/debian/control/field/rules-requires-root/control-file-rules-requires-root-no/build-spec/debian/control.in @@ -0,0 +1,17 @@ +Source: [% $source %] +Priority: optional +Section: [% $section %] +Maintainer: [% $author %] +Standards-Version: [% $standards_version %] +Build-Depends: [% $build_depends %] +Rules-Requires-Root: no +Homepage: https://lintian.debian.org/ + +Package: [% $source %] +Architecture: [% $package_architecture %] +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: [% $description %] + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. diff --git a/t/recipes/checks/debian/control/field/rules-requires-root/control-file-rules-requires-root-no/build-spec/debian/rules b/t/recipes/checks/debian/control/field/rules-requires-root/control-file-rules-requires-root-no/build-spec/debian/rules new file mode 100644 index 0000000..3d706f5 --- /dev/null +++ b/t/recipes/checks/debian/control/field/rules-requires-root/control-file-rules-requires-root-no/build-spec/debian/rules @@ -0,0 +1,7 @@ +#!/usr/bin/make -f + +%: + dh $@ + +override_dh_builddeb: + dh_builddeb -- -Zgzip diff --git a/t/recipes/checks/debian/control/field/rules-requires-root/control-file-rules-requires-root-no/build-spec/fill-values b/t/recipes/checks/debian/control/field/rules-requires-root/control-file-rules-requires-root-no/build-spec/fill-values new file mode 100644 index 0000000..7359a3f --- /dev/null +++ b/t/recipes/checks/debian/control/field/rules-requires-root/control-file-rules-requires-root-no/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: upload-native +Testname: control-file-rules-requires-root-no +Description: Test for "Rules-Requires-Root: no" diff --git a/t/recipes/checks/debian/control/field/rules-requires-root/control-file-rules-requires-root-no/eval/desc b/t/recipes/checks/debian/control/field/rules-requires-root/control-file-rules-requires-root-no/eval/desc new file mode 100644 index 0000000..daf6c23 --- /dev/null +++ b/t/recipes/checks/debian/control/field/rules-requires-root/control-file-rules-requires-root-no/eval/desc @@ -0,0 +1,2 @@ +Testname: control-file-rules-requires-root-no +Check: debian/control/field/rules-requires-root diff --git a/t/recipes/checks/debian/control/field/rules-requires-root/control-file-rules-requires-root-no/eval/hints b/t/recipes/checks/debian/control/field/rules-requires-root/control-file-rules-requires-root-no/eval/hints new file mode 100644 index 0000000..faa5fc4 --- /dev/null +++ b/t/recipes/checks/debian/control/field/rules-requires-root/control-file-rules-requires-root-no/eval/hints @@ -0,0 +1 @@ +control-file-rules-requires-root-no (source): rules-do-not-require-root [debian/control:7] diff --git a/t/recipes/checks/debian/control/field/rules-requires-root/control-file-symlink/build-spec/fill-values b/t/recipes/checks/debian/control/field/rules-requires-root/control-file-symlink/build-spec/fill-values new file mode 100644 index 0000000..9db2167 --- /dev/null +++ b/t/recipes/checks/debian/control/field/rules-requires-root/control-file-symlink/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: upload-native +Testname: control-file-symlink +Description: Test if debian/control is a symlink diff --git a/t/recipes/checks/debian/control/field/rules-requires-root/control-file-symlink/build-spec/pre-build b/t/recipes/checks/debian/control/field/rules-requires-root/control-file-symlink/build-spec/pre-build new file mode 100755 index 0000000..d872c36 --- /dev/null +++ b/t/recipes/checks/debian/control/field/rules-requires-root/control-file-symlink/build-spec/pre-build @@ -0,0 +1,6 @@ +#!/bin/sh + +ROOT_DIR="$1" + +mv "${ROOT_DIR}/debian/control" "${ROOT_DIR}/debian/control.real" +ln -s control.real "${ROOT_DIR}/debian/control" diff --git a/t/recipes/checks/debian/control/field/rules-requires-root/control-file-symlink/eval/desc b/t/recipes/checks/debian/control/field/rules-requires-root/control-file-symlink/eval/desc new file mode 100644 index 0000000..8ddc4fb --- /dev/null +++ b/t/recipes/checks/debian/control/field/rules-requires-root/control-file-symlink/eval/desc @@ -0,0 +1,2 @@ +Testname: control-file-symlink +Check: debian/control/field/rules-requires-root diff --git a/t/recipes/checks/debian/control/field/rules-requires-root/control-file-symlink/eval/hints b/t/recipes/checks/debian/control/field/rules-requires-root/control-file-symlink/eval/hints new file mode 100644 index 0000000..b191772 --- /dev/null +++ b/t/recipes/checks/debian/control/field/rules-requires-root/control-file-symlink/eval/hints @@ -0,0 +1 @@ +control-file-symlink (source): rules-do-not-require-root [debian/control.real:7] diff --git a/t/recipes/checks/debian/control/field/rules-requires-root/fields-unknown-fields/build-spec/debian/control.in b/t/recipes/checks/debian/control/field/rules-requires-root/fields-unknown-fields/build-spec/debian/control.in new file mode 100644 index 0000000..c69c988 --- /dev/null +++ b/t/recipes/checks/debian/control/field/rules-requires-root/fields-unknown-fields/build-spec/debian/control.in @@ -0,0 +1,19 @@ +Source: [% $source %] +Priority: optional +Section: devel +Maintainer: [% $author %] +Standards-Version: [% $standards_version %] +Build-Depends: [% $build_depends %] +Rules-Require-Root: no +Rules-Requires-Root: no +XS-Comment: This is random comment ending up in the dsc file. + +Package: [% $source %] +Architecture: [% $package_architecture %] +Depends: ${misc:Depends}, +Description: [% $description %] + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. + diff --git a/t/recipes/checks/debian/control/field/rules-requires-root/fields-unknown-fields/build-spec/fill-values b/t/recipes/checks/debian/control/field/rules-requires-root/fields-unknown-fields/build-spec/fill-values new file mode 100644 index 0000000..df47230 --- /dev/null +++ b/t/recipes/checks/debian/control/field/rules-requires-root/fields-unknown-fields/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: upload-native +Testname: fields-unknown-fields +Description: General tests for unknown fields diff --git a/t/recipes/checks/debian/control/field/rules-requires-root/fields-unknown-fields/eval/desc b/t/recipes/checks/debian/control/field/rules-requires-root/fields-unknown-fields/eval/desc new file mode 100644 index 0000000..c37168e --- /dev/null +++ b/t/recipes/checks/debian/control/field/rules-requires-root/fields-unknown-fields/eval/desc @@ -0,0 +1,2 @@ +Testname: fields-unknown-fields +Check: debian/control/field/rules-requires-root diff --git a/t/recipes/checks/debian/control/field/rules-requires-root/fields-unknown-fields/eval/hints b/t/recipes/checks/debian/control/field/rules-requires-root/fields-unknown-fields/eval/hints new file mode 100644 index 0000000..a698c7f --- /dev/null +++ b/t/recipes/checks/debian/control/field/rules-requires-root/fields-unknown-fields/eval/hints @@ -0,0 +1,2 @@ +fields-unknown-fields (source): spelling-error-in-rules-requires-root Rules-Require-Root [debian/control:7] +fields-unknown-fields (source): rules-do-not-require-root [debian/control:8] diff --git a/t/recipes/checks/debian/control/field/rules-requires-root/legacy-relations/build-spec/debian/changelog.in b/t/recipes/checks/debian/control/field/rules-requires-root/legacy-relations/build-spec/debian/changelog.in new file mode 100644 index 0000000..9a82ea7 --- /dev/null +++ b/t/recipes/checks/debian/control/field/rules-requires-root/legacy-relations/build-spec/debian/changelog.in @@ -0,0 +1,33 @@ +relations ([% $version %]) [% $distribution %]; urgency=low + + * I'm orphaning this package -- I'm sick of it: it's completely broken, + lintian complains all over the place. + + -- Jeroen van Wolffelaar Sun, 02 Dec 2007 15:59:59 -0800 + +relations (4) unstable; urgency=low + + * Added a package that tests dependencies for multiple versions of + libraries, and test some description stuff in there as well. + + -- Josip Rodin Fri, 29 Nov 2002 20:13:33 +0100 + +relations (3) unstable; urgency=low + + * Added a virtual provides to test against my virtual depends without + a real package first test + + -- Sean 'Shaleh' Perry Thu, 8 Feb 2001 11:29:53 -0800 + +relations (2) unstable; urgency=low + + * Added a depends on dpkg (violates policy) and a versioned depends + on bash (follows policy) + + -- Sean 'Shaleh' Perry Fri, 2 Feb 2001 12:37:17 -0800 + +relations (1) unstable; urgency=low + + * Initial version + + -- Richard Braakman Tue, 7 Jul 1998 16:27:56 +0200 diff --git a/t/recipes/checks/debian/control/field/rules-requires-root/legacy-relations/build-spec/debian/control b/t/recipes/checks/debian/control/field/rules-requires-root/legacy-relations/build-spec/debian/control new file mode 100644 index 0000000..6cd1c04 --- /dev/null +++ b/t/recipes/checks/debian/control/field/rules-requires-root/legacy-relations/build-spec/debian/control @@ -0,0 +1,51 @@ +Source: relations +Section: misc +Priority: optional +Build-Depends: mail-transport-agent, libc6-dev, findutils, foo (= 3) [!amd64 !i386], bar, arch-test1 [i386], arch-test2 [!i386], quilt (>= 0.40), perl +Build-Depends-Indep: make, bash, debmake, build-essential, baz (= 2.0), ghostscript | gs, + car (>= 1.0), car (<= 2.0), caz (= 1.0) [amd64], caz (>= 2.0) [i386], + caz (= 2.0) [powerpc], perl (>= 5.0), foo (<< 4) [!amd64 !i386], libfoo (>= 1.2-1), bozzle [kfreebsd-i386] +Build-Conflicts: foo [amd64 i386], bar [alpha test], xlibs-dev, arch-test1 [powerpc], arch-test2 [!sparc] +Build-Conflicts-Indep: debmake [!powerpc] +Maintainer: Debian QA Group +Standards-Version: 3.7.3 +Homepage: lintian.debian.org +Origin: Debian +Bugs: debbugs://bugs.debian.org/ + +Package: relations +Architecture: all +Section: contrib/misc +Pre-Depends: awk|gawk +Depends: relations(<< 3), dpkg, bash (>> 2.0 ), mail-transport-agent, gawk | awk, foo (>> 2.0), foo (<< 2.2), coreutils, ,null (>= 0), ${misc:Depends}, makedev +Provides: mail-reader +Replaces: relations +Conflicts: foobar (<< 5+5), foo, relations, + gnuwdf, +Suggests: alpha, gnu (>= 44-3-4-8-11.4) | ung (<< 89beta) | nug | ngu, beta, some-other-package +Recommends: emacs21 | emacsen, dpkg, null, some-other-package, ${f-oo:b-ar}, gs | ghostscript | gs-aladdin +Description: Strange dependency relationships (dummy) + This package declares relationships designed to tickle lintian's "fields" + check. It should generate a number of tags for these. + . + The package is built with "dpkg --build --no-check", because some of the + relationships used here are normally rejected by dpkg. + +Package: relations-multiple-libs +Architecture: all +Section: non-free/misc +Depends: libstdc++2.10, libstdc++2.10-glibc2.2, libstdc++3.0, tk8.2, tk8.3, tcl8.0, tcl8.2, tkx8.2, tkx8.3, tclx8.2, libpng2, libpng3, xorg, ${shlibs:Depends}, makedev | udev +Provides: awk +Enhances: foo +Recommends: ${shlibs:Depends}, relations-multiple-libs, gs | gs-gpl, makedev +Breaks: libpng3 (<< 1.0), libpng2 +Suggests: x-dev, ghostscript | gs +Description: Duplicate library dependency relationships. + Duplicate library dependency relationships. + This tests the depending on different versions of the same library + at the same time. + . + At the same time, it conveniently tests some description file checks. :) + . + It is a metapackage from the lintian perspective, so the xorg dependency + should be allowed. diff --git a/t/recipes/checks/debian/control/field/rules-requires-root/legacy-relations/build-spec/debian/rules b/t/recipes/checks/debian/control/field/rules-requires-root/legacy-relations/build-spec/debian/rules new file mode 100755 index 0000000..5027f33 --- /dev/null +++ b/t/recipes/checks/debian/control/field/rules-requires-root/legacy-relations/build-spec/debian/rules @@ -0,0 +1,49 @@ +#!/usr/bin/make -f + +# Copyright (C) 1998 Richard Braakman +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +build-arch: + +build-indep: + +build: build-arch build-indep + +binary-arch: + +binary-indep: + install -d debian/tmp/DEBIAN + dpkg-gencontrol -prelations -isp + dpkg --build debian/tmp ../relations_5_all.deb + install -d debian/tmp/usr/share/doc/ + ln -s relations debian/tmp/usr/share/doc/relations-multiple-libs + dpkg-gencontrol -prelations-multiple-libs -isp + dpkg --build debian/tmp ../relations-multiple-libs_5_all.deb + +binary: binary-arch binary-indep + +clean:: + rm -rf debian/tmp debian/files + +# Test allowing quilt Build-Depends for manual quilt invocations. + TESTING=foo ANOTHER=bar quilt || true + +# Test requiring perl Build-Depends for manual perl invocations. + [ ! -f Build ] || $(PERL) Build distclean + +.PHONY: build-arch build-indep build binary-arch binary-indep binary clean diff --git a/t/recipes/checks/debian/control/field/rules-requires-root/legacy-relations/build-spec/debian/tmp/DEBIAN/control b/t/recipes/checks/debian/control/field/rules-requires-root/legacy-relations/build-spec/debian/tmp/DEBIAN/control new file mode 100644 index 0000000..87e7fe6 --- /dev/null +++ b/t/recipes/checks/debian/control/field/rules-requires-root/legacy-relations/build-spec/debian/tmp/DEBIAN/control @@ -0,0 +1,14 @@ +Package: relations-multiple-libs +Version: 4 +Section: misc +Priority: optional +Architecture: all +Depends: libstdc++2.10, libstdc++2.10-glibc2.2, libstdc++3.0, tk8.2, tk8.3, tcl8.0, tcl8.2, tkx8.2, tkx8.3, tclx8.2, libpng2, libpng3 +Installed-Size: 12 +Maintainer: Lintian Maintainer +Source: relations +Description: Duplicate library dependency relationships. + Duplicate library dependency relationships. This tests the depending on + different versions of the same library at the same time. + . + At the same time, it conveniently tests some description file checks. :) diff --git a/t/recipes/checks/debian/control/field/rules-requires-root/legacy-relations/build-spec/fill-values b/t/recipes/checks/debian/control/field/rules-requires-root/legacy-relations/build-spec/fill-values new file mode 100644 index 0000000..7e4661b --- /dev/null +++ b/t/recipes/checks/debian/control/field/rules-requires-root/legacy-relations/build-spec/fill-values @@ -0,0 +1,5 @@ +Skeleton: upload-native +Testname: legacy-relations +Source: relations +Version: 5 +Description: Legacy test "relations" diff --git a/t/recipes/checks/debian/control/field/rules-requires-root/legacy-relations/eval/desc b/t/recipes/checks/debian/control/field/rules-requires-root/legacy-relations/eval/desc new file mode 100644 index 0000000..02acb73 --- /dev/null +++ b/t/recipes/checks/debian/control/field/rules-requires-root/legacy-relations/eval/desc @@ -0,0 +1,2 @@ +Testname: legacy-relations +Check: debian/control/field/rules-requires-root diff --git a/t/recipes/checks/debian/control/field/rules-requires-root/legacy-relations/eval/hints b/t/recipes/checks/debian/control/field/rules-requires-root/legacy-relations/eval/hints new file mode 100644 index 0000000..2404d59 --- /dev/null +++ b/t/recipes/checks/debian/control/field/rules-requires-root/legacy-relations/eval/hints @@ -0,0 +1 @@ +relations (source): silent-on-rules-requiring-root [debian/control] diff --git a/t/recipes/checks/debian/control/field/rules-requires-root/legacy-relations/eval/post-test b/t/recipes/checks/debian/control/field/rules-requires-root/legacy-relations/eval/post-test new file mode 100644 index 0000000..faeef0b --- /dev/null +++ b/t/recipes/checks/debian/control/field/rules-requires-root/legacy-relations/eval/post-test @@ -0,0 +1 @@ +s/\(current is ([0-9]+\.)+[0-9]\)/(current is CURRENT)/ diff --git a/t/recipes/checks/debian/control/field/rules-requires-root/rules-requires-root-missing/build-spec/debian/control.in b/t/recipes/checks/debian/control/field/rules-requires-root/rules-requires-root-missing/build-spec/debian/control.in new file mode 100644 index 0000000..fb3b62f --- /dev/null +++ b/t/recipes/checks/debian/control/field/rules-requires-root/rules-requires-root-missing/build-spec/debian/control.in @@ -0,0 +1,17 @@ +Source: [% $source %] +Priority: [% $priority %] +Section: [% $section %] +Maintainer: [% $author %] +Standards-Version: [% $standards_version %] +Build-Depends: [% $build_depends %] +Homepage: [% $homepage %] + +Package: [% $source %] +Architecture: [% $package_architecture %] +Pre-Depends: ${misc:Pre-Depends} +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: [% $description %] + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. diff --git a/t/recipes/checks/debian/control/field/rules-requires-root/rules-requires-root-missing/build-spec/fill-values b/t/recipes/checks/debian/control/field/rules-requires-root/rules-requires-root-missing/build-spec/fill-values new file mode 100644 index 0000000..a1b35c5 --- /dev/null +++ b/t/recipes/checks/debian/control/field/rules-requires-root/rules-requires-root-missing/build-spec/fill-values @@ -0,0 +1,3 @@ +Testname: rules-requires-root-missing +Skeleton: upload-native +Description: d/control without explicit rules-requires-root diff --git a/t/recipes/checks/debian/control/field/rules-requires-root/rules-requires-root-missing/eval/desc b/t/recipes/checks/debian/control/field/rules-requires-root/rules-requires-root-missing/eval/desc new file mode 100644 index 0000000..ca896c2 --- /dev/null +++ b/t/recipes/checks/debian/control/field/rules-requires-root/rules-requires-root-missing/eval/desc @@ -0,0 +1,2 @@ +Testname: rules-requires-root-missing +Check: debian/control/field/rules-requires-root diff --git a/t/recipes/checks/debian/control/field/rules-requires-root/rules-requires-root-missing/eval/hints b/t/recipes/checks/debian/control/field/rules-requires-root/rules-requires-root-missing/eval/hints new file mode 100644 index 0000000..32edc86 --- /dev/null +++ b/t/recipes/checks/debian/control/field/rules-requires-root/rules-requires-root-missing/eval/hints @@ -0,0 +1 @@ +rules-requires-root-missing (source): silent-on-rules-requiring-root [debian/control] diff --git a/t/recipes/checks/debian/control/field/section/no-section-in-source-stanza/build-spec/debian/control.in b/t/recipes/checks/debian/control/field/section/no-section-in-source-stanza/build-spec/debian/control.in new file mode 100644 index 0000000..cf9ff9a --- /dev/null +++ b/t/recipes/checks/debian/control/field/section/no-section-in-source-stanza/build-spec/debian/control.in @@ -0,0 +1,17 @@ +Source: [% $source %] +Priority: optional +Maintainer: [% $author %] +Standards-Version: [% $standards_version %] +Build-Depends: [% $build_depends %] +Rules-Requires-Root: no +Homepage: https://lintian.debian.org/ + +Package: [% $source %] +Section: [% $section %] +Architecture: [% $package_architecture %] +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: [% $description %] + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. diff --git a/t/recipes/checks/debian/control/field/section/no-section-in-source-stanza/build-spec/fill-values b/t/recipes/checks/debian/control/field/section/no-section-in-source-stanza/build-spec/fill-values new file mode 100644 index 0000000..0b221ac --- /dev/null +++ b/t/recipes/checks/debian/control/field/section/no-section-in-source-stanza/build-spec/fill-values @@ -0,0 +1,4 @@ +Skeleton: source-native +Testname: no-section-in-source-stanza +Description: No Section declared in source stanza of d/control + diff --git a/t/recipes/checks/debian/control/field/section/no-section-in-source-stanza/eval/desc b/t/recipes/checks/debian/control/field/section/no-section-in-source-stanza/eval/desc new file mode 100644 index 0000000..5e52eb8 --- /dev/null +++ b/t/recipes/checks/debian/control/field/section/no-section-in-source-stanza/eval/desc @@ -0,0 +1,2 @@ +Testname: no-section-in-source-stanza +Check: debian/control/field/section diff --git a/t/recipes/checks/debian/control/field/section/no-section-in-source-stanza/eval/hints b/t/recipes/checks/debian/control/field/section/no-section-in-source-stanza/eval/hints new file mode 100644 index 0000000..e12b62a --- /dev/null +++ b/t/recipes/checks/debian/control/field/section/no-section-in-source-stanza/eval/hints @@ -0,0 +1 @@ +no-section-in-source-stanza (source): no-source-section [debian/control] diff --git a/t/recipes/checks/debian/control/field/spacing/control-file-pedantic-space/build-spec/debian/control.in b/t/recipes/checks/debian/control/field/spacing/control-file-pedantic-space/build-spec/debian/control.in new file mode 100644 index 0000000..9af359b --- /dev/null +++ b/t/recipes/checks/debian/control/field/spacing/control-file-pedantic-space/build-spec/debian/control.in @@ -0,0 +1,17 @@ +Source: [% $source %] +Priority:optional +Section: [% $section %] +Maintainer: [% $author %] +Standards-Version: [% $standards_version %] +Build-Depends: [% $build_depends %] +Rules-Requires-Root: no +Homepage: https://lintian.debian.org/ + +Package: [% $source %] +Architecture: [% $package_architecture %] +Depends: ${misc:Depends} +Description: [% $description %] + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. diff --git a/t/recipes/checks/debian/control/field/spacing/control-file-pedantic-space/build-spec/fill-values b/t/recipes/checks/debian/control/field/spacing/control-file-pedantic-space/build-spec/fill-values new file mode 100644 index 0000000..f44d584 --- /dev/null +++ b/t/recipes/checks/debian/control/field/spacing/control-file-pedantic-space/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: upload-native +Testname: control-file-pedantic-space +Description: Pedantic tests for control file spacing diff --git a/t/recipes/checks/debian/control/field/spacing/control-file-pedantic-space/eval/desc b/t/recipes/checks/debian/control/field/spacing/control-file-pedantic-space/eval/desc new file mode 100644 index 0000000..86d452c --- /dev/null +++ b/t/recipes/checks/debian/control/field/spacing/control-file-pedantic-space/eval/desc @@ -0,0 +1,2 @@ +Testname: control-file-pedantic-space +Check: debian/control/field/spacing diff --git a/t/recipes/checks/debian/control/field/spacing/control-file-pedantic-space/eval/hints b/t/recipes/checks/debian/control/field/spacing/control-file-pedantic-space/eval/hints new file mode 100644 index 0000000..df949b0 --- /dev/null +++ b/t/recipes/checks/debian/control/field/spacing/control-file-pedantic-space/eval/hints @@ -0,0 +1,3 @@ +control-file-pedantic-space (source): debian-control-has-unusual-field-spacing Source [debian/control:1] +control-file-pedantic-space (source): debian-control-has-unusual-field-spacing Section [debian/control:3] +control-file-pedantic-space (source): debian-control-has-unusual-field-spacing Priority [debian/control:2] diff --git a/t/recipes/checks/debian/control/link/control-file-symlink/build-spec/fill-values b/t/recipes/checks/debian/control/link/control-file-symlink/build-spec/fill-values new file mode 100644 index 0000000..9db2167 --- /dev/null +++ b/t/recipes/checks/debian/control/link/control-file-symlink/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: upload-native +Testname: control-file-symlink +Description: Test if debian/control is a symlink diff --git a/t/recipes/checks/debian/control/link/control-file-symlink/build-spec/pre-build b/t/recipes/checks/debian/control/link/control-file-symlink/build-spec/pre-build new file mode 100755 index 0000000..d872c36 --- /dev/null +++ b/t/recipes/checks/debian/control/link/control-file-symlink/build-spec/pre-build @@ -0,0 +1,6 @@ +#!/bin/sh + +ROOT_DIR="$1" + +mv "${ROOT_DIR}/debian/control" "${ROOT_DIR}/debian/control.real" +ln -s control.real "${ROOT_DIR}/debian/control" diff --git a/t/recipes/checks/debian/control/link/control-file-symlink/eval/desc b/t/recipes/checks/debian/control/link/control-file-symlink/eval/desc new file mode 100644 index 0000000..556a375 --- /dev/null +++ b/t/recipes/checks/debian/control/link/control-file-symlink/eval/desc @@ -0,0 +1,2 @@ +Testname: control-file-symlink +Check: debian/control/link diff --git a/t/recipes/checks/debian/control/link/control-file-symlink/eval/hints b/t/recipes/checks/debian/control/link/control-file-symlink/eval/hints new file mode 100644 index 0000000..04be3f2 --- /dev/null +++ b/t/recipes/checks/debian/control/link/control-file-symlink/eval/hints @@ -0,0 +1 @@ +control-file-symlink (source): debian-control-file-is-a-symlink [debian/control] diff --git a/t/recipes/checks/debian/control/prerequisite/circular/control-file-general/build-spec/debian/control.in b/t/recipes/checks/debian/control/prerequisite/circular/control-file-general/build-spec/debian/control.in new file mode 100644 index 0000000..3058e5a --- /dev/null +++ b/t/recipes/checks/debian/control/prerequisite/circular/control-file-general/build-spec/debian/control.in @@ -0,0 +1,118 @@ +Source: [% $source %] +Priority: optional +Maintainer: [% $author %] +Standards-Version: [% $standards_version %] +Build-Depends: [% $build_depends %], + fiddle [amd64 powerpc mips mipsel hppa s390], + faddle + (>> + 2) [ + sparc i386 amd64 + ] +Build-Depends-Indep: perl (> 5.8) +Rules-Requires-Root: no +XS-Vcs-Svn: https://svn.example.com/[% $source %]/trunk +#Vcs-Git: git://git.debian.org/collab-maint/.git +#Vcs-Browser: http://git.debian.org/?p=collab-maint/.git;a=summary + +Package: [% $source %] +Section: [% $section %] +Maintainer: [% $author %] +Build-Conflicts: foo +Architecture: all +Pre-depends: ${misc:Pre-depends}, multiarch-support +Depends: [% $source %], foo, baz, ${shlibs:Depends} ${some:Depends}, ${misc:Depends} +Recommends: foo, bar, no-match${lintian:Foo}, match${lintian:Match}, no-match${lintian:Bar}-foo +Suggests: bar | baz, no-match${lintian:Bar}, match${lintian:Match} +Description: [% $description %] + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. + +Package: [% $source %]-1 +Section: [% $section %] +Architecture: all +Depends: ${shlibs:Depends}, ${misc:Depends} +Breaks: libsqlite3-0 (< 3.6.12) +Description: [% $description %] + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. + +Package: [% $source %]-2 +Section: [% $section %] +Architecture: all +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: [% $description %] (two) + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. + +Package: [% $source %]-3 +Section: [% $section %] +Architecture: all +Depends: ${shlibs:Depends}, ${misc:Depends}, foo (>= 1), + baz (<< 2), + fizz (= 2.0), gcc-${pv:gcc} ${reqv:gcc} +Description: [% $description %] (three) + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. + +Package: [% $source %]-4 +Section: [% $section %] +Architecture: all +Depends: ${shlibs:Depends}, ${misc:Depends}, foo | + bar (>= 1), baz +Description: [% $description %] (four) + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. + +Package: [% $source %]-5 +Section: [% $section %] +Architecture: all +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: Description: [% $description %] + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. + +Package: [% $source %]-dbgsym +Section: debug +Architecture: all +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: Description: dbg-sym + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. + +Package: [% $source %]-dbg +Section: debug +Architecture: all +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: Description: debug + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. + +Package: [% $source %]-udeb +Section: debian-installer +Package-Type: udeb +Architecture: all +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: [% $description %] (udeb) + udeb tests. + . + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. diff --git a/t/recipes/checks/debian/control/prerequisite/circular/control-file-general/build-spec/debian/rules b/t/recipes/checks/debian/control/prerequisite/circular/control-file-general/build-spec/debian/rules new file mode 100644 index 0000000..f5db4bb --- /dev/null +++ b/t/recipes/checks/debian/control/prerequisite/circular/control-file-general/build-spec/debian/rules @@ -0,0 +1,8 @@ +#!/usr/bin/make -f +%: + dh $@ + +override_dh_gencontrol: + echo 'pv:gcc=4.3' >> debian/substvars + echo 'reqv:gcc=(>= 4.3-1)' >> debian/substvars + dh_gencontrol diff --git a/t/recipes/checks/debian/control/prerequisite/circular/control-file-general/build-spec/fill-values b/t/recipes/checks/debian/control/prerequisite/circular/control-file-general/build-spec/fill-values new file mode 100644 index 0000000..7338a95 --- /dev/null +++ b/t/recipes/checks/debian/control/prerequisite/circular/control-file-general/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: upload-native +Testname: control-file-general +Description: Various problems with debian/control diff --git a/t/recipes/checks/debian/control/prerequisite/circular/control-file-general/eval/desc b/t/recipes/checks/debian/control/prerequisite/circular/control-file-general/eval/desc new file mode 100644 index 0000000..02f41b5 --- /dev/null +++ b/t/recipes/checks/debian/control/prerequisite/circular/control-file-general/eval/desc @@ -0,0 +1,11 @@ +Testname: control-file-general +Check: debian/control/prerequisite/circular +See-Also: + Debian Bug#30020, + Debian Bug#409099, + Debian Bug#516706, + Debian Bug#533202, + Debian Bug#557971, + Debian Bug#573399, + Debian Bug#580494, + Debian Bug#657110 diff --git a/t/recipes/checks/debian/control/prerequisite/circular/control-file-general/eval/hints b/t/recipes/checks/debian/control/prerequisite/circular/control-file-general/eval/hints new file mode 100644 index 0000000..1c51dc4 --- /dev/null +++ b/t/recipes/checks/debian/control/prerequisite/circular/control-file-general/eval/hints @@ -0,0 +1 @@ +control-file-general (source): circular-installation-prerequisite (in section for control-file-general) Depends control-file-general, foo, baz, ${shlibs:Depends} ${some:Depends}, ${misc:Depends} [debian/control:24] diff --git a/t/recipes/checks/debian/control/prerequisite/circular/control-file-suggests-itself/build-spec/debian/control.in b/t/recipes/checks/debian/control/prerequisite/circular/control-file-suggests-itself/build-spec/debian/control.in new file mode 100644 index 0000000..c69e042 --- /dev/null +++ b/t/recipes/checks/debian/control/prerequisite/circular/control-file-suggests-itself/build-spec/debian/control.in @@ -0,0 +1,17 @@ +Source: [% $source %] +Priority: optional +Section: [% $section %] +Maintainer: [% $author %] +Standards-Version: [% $standards_version %] +Build-Depends: [% $build_depends %] +Rules-Requires-Root: no + +Package: [% $source %] +Architecture: [% $package_architecture %] +Depends: ${shlibs:Depends}, ${misc:Depends} +Suggests: [% $source %] +Description: [% $description %] + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. diff --git a/t/recipes/checks/debian/control/prerequisite/circular/control-file-suggests-itself/build-spec/fill-values b/t/recipes/checks/debian/control/prerequisite/circular/control-file-suggests-itself/build-spec/fill-values new file mode 100644 index 0000000..837abce --- /dev/null +++ b/t/recipes/checks/debian/control/prerequisite/circular/control-file-suggests-itself/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: upload-native +Testname: control-file-suggests-itself +Description: Test a package Suggesting itself diff --git a/t/recipes/checks/debian/control/prerequisite/circular/control-file-suggests-itself/eval/desc b/t/recipes/checks/debian/control/prerequisite/circular/control-file-suggests-itself/eval/desc new file mode 100644 index 0000000..b880eed --- /dev/null +++ b/t/recipes/checks/debian/control/prerequisite/circular/control-file-suggests-itself/eval/desc @@ -0,0 +1,2 @@ +Testname: control-file-suggests-itself +Check: debian/control/prerequisite/circular diff --git a/t/recipes/checks/debian/control/prerequisite/circular/control-file-suggests-itself/eval/hints b/t/recipes/checks/debian/control/prerequisite/circular/control-file-suggests-itself/eval/hints new file mode 100644 index 0000000..c2e5627 --- /dev/null +++ b/t/recipes/checks/debian/control/prerequisite/circular/control-file-suggests-itself/eval/hints @@ -0,0 +1 @@ +control-file-suggests-itself (source): circular-installation-prerequisite (in section for control-file-suggests-itself) Suggests control-file-suggests-itself [debian/control:12] diff --git a/t/recipes/checks/debian/control/prerequisite/circular/fields-depends-general/build-spec/debian/control.in b/t/recipes/checks/debian/control/prerequisite/circular/fields-depends-general/build-spec/debian/control.in new file mode 100644 index 0000000..054ffc3 --- /dev/null +++ b/t/recipes/checks/debian/control/prerequisite/circular/fields-depends-general/build-spec/debian/control.in @@ -0,0 +1,81 @@ +Source: [% $source %] +Priority: optional +Section: [% $section %] +Maintainer: [% $author %] +Standards-Version: [% $standards_version %] +Build-Depends: [% $build_depends %], libtest-simple-perl (>= 0.98), perl-modules +Rules-Requires-Root: no + +Package: [% $source %] +Architecture: all +Depends: ${shlibs:Depends}, ${misc:Depends}, xorg, bash, + conflict-dep, gawk | awk, new-package | xbase-clients (>= 0.1), [% $source %], + gaim (>= 0.1), emacs21, emacs22, emacs23, makedev, libtest-simple-perl (>= 0.98), + packaging-dev, xfont-a, emacs22-gtk, emacs23-el, emacs23-nox, emacs23-lucid, + emacs222, perl-modules, debhelper +Breaks: package-without-version, [% $source %] (<< 0.1), + replaced-wo-version +Replaces: replaced-wo-version +Conflicts: package-with-version (<< 3.0), conflict-dep +Description: [% $description %] + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. + +Package: lib[% $source %] +Architecture: all +Depends: ${shlibs:Depends}, ${misc:Depends}, libdb1-compat, perl-modules-5.22 +Recommends: debconf-doc, cdbs +Conflicts: debhelper +Section: libs +Description: [% $description %] -- fake library + This is a fake library designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. + +Package: py-[% $source %] +Architecture: all +Depends: ${shlibs:Depends}, ${misc:Depends}, python-minimal +Description: [% $description %] - Fake Python package + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. + . + The fake Python package. + +Package: [% $source %]-doc +Section: doc +Architecture: all +Depends: ${shlibs:Depends}, ${misc:Depends}, [% $source %] +Description: [% $description %] - Fake Doc package + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. + . + The fake doc package. + +Package: dh-[% $source %] +Architecture: all +Depends: ${shlibs:Depends}, ${misc:Depends}, debhelper +Description: [% $description %] - Fake Debhelper package + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. + . + The fake Debhelper package to test false-positives in + binary-package-depends-on-toolchain-package. + +Package: [% $source %]-source +Architecture: all +Depends: ${shlibs:Depends}, ${misc:Depends}, debhelper +Description: [% $description %] - Fake DKMS-like package + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. + . + The fake DKMS-like package to test false-positives in + binary-package-depends-on-toolchain-package. diff --git a/t/recipes/checks/debian/control/prerequisite/circular/fields-depends-general/build-spec/debian/install b/t/recipes/checks/debian/control/prerequisite/circular/fields-depends-general/build-spec/debian/install new file mode 100644 index 0000000..6c37889 --- /dev/null +++ b/t/recipes/checks/debian/control/prerequisite/circular/fields-depends-general/build-spec/debian/install @@ -0,0 +1 @@ +some-file usr/share/lintian diff --git a/t/recipes/checks/debian/control/prerequisite/circular/fields-depends-general/build-spec/fill-values b/t/recipes/checks/debian/control/prerequisite/circular/fields-depends-general/build-spec/fill-values new file mode 100644 index 0000000..6e84753 --- /dev/null +++ b/t/recipes/checks/debian/control/prerequisite/circular/fields-depends-general/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: upload-native +Testname: fields-depends-general +Description: General tests for binary package dependencies diff --git a/t/recipes/checks/debian/control/prerequisite/circular/fields-depends-general/build-spec/orig/some-file b/t/recipes/checks/debian/control/prerequisite/circular/fields-depends-general/build-spec/orig/some-file new file mode 100644 index 0000000..7bf08f7 --- /dev/null +++ b/t/recipes/checks/debian/control/prerequisite/circular/fields-depends-general/build-spec/orig/some-file @@ -0,0 +1,2 @@ +This file is installed into /usr/share/lintian just to ensure that this +package doesn't look like a metapackage for the dependency checks. diff --git a/t/recipes/checks/debian/control/prerequisite/circular/fields-depends-general/eval/desc b/t/recipes/checks/debian/control/prerequisite/circular/fields-depends-general/eval/desc new file mode 100644 index 0000000..e47d658 --- /dev/null +++ b/t/recipes/checks/debian/control/prerequisite/circular/fields-depends-general/eval/desc @@ -0,0 +1,2 @@ +Testname: fields-depends-general +Check: debian/control/prerequisite/circular diff --git a/t/recipes/checks/debian/control/prerequisite/circular/fields-depends-general/eval/hints b/t/recipes/checks/debian/control/prerequisite/circular/fields-depends-general/eval/hints new file mode 100644 index 0000000..44047f1 --- /dev/null +++ b/t/recipes/checks/debian/control/prerequisite/circular/fields-depends-general/eval/hints @@ -0,0 +1 @@ +fields-depends-general (source): circular-installation-prerequisite (in section for fields-depends-general) Depends ${shlibs:Depends}, ${misc:Depends}, xorg, bash, conflict-dep, gawk | awk, new-package | xbase-clients (>= 0.1), fields-depends-general, gaim (>= 0.1), emacs21, emacs22, emacs23, makedev, libtest-simple-perl (>= 0.98), packaging-dev, xfont-a, emacs22-gtk, emacs23-el, emacs23-nox, emacs23-lucid, emacs222, perl-modules, debhelper [debian/control:11] diff --git a/t/recipes/checks/debian/control/prerequisite/circular/legacy-relations/build-spec/debian/changelog.in b/t/recipes/checks/debian/control/prerequisite/circular/legacy-relations/build-spec/debian/changelog.in new file mode 100644 index 0000000..9a82ea7 --- /dev/null +++ b/t/recipes/checks/debian/control/prerequisite/circular/legacy-relations/build-spec/debian/changelog.in @@ -0,0 +1,33 @@ +relations ([% $version %]) [% $distribution %]; urgency=low + + * I'm orphaning this package -- I'm sick of it: it's completely broken, + lintian complains all over the place. + + -- Jeroen van Wolffelaar Sun, 02 Dec 2007 15:59:59 -0800 + +relations (4) unstable; urgency=low + + * Added a package that tests dependencies for multiple versions of + libraries, and test some description stuff in there as well. + + -- Josip Rodin Fri, 29 Nov 2002 20:13:33 +0100 + +relations (3) unstable; urgency=low + + * Added a virtual provides to test against my virtual depends without + a real package first test + + -- Sean 'Shaleh' Perry Thu, 8 Feb 2001 11:29:53 -0800 + +relations (2) unstable; urgency=low + + * Added a depends on dpkg (violates policy) and a versioned depends + on bash (follows policy) + + -- Sean 'Shaleh' Perry Fri, 2 Feb 2001 12:37:17 -0800 + +relations (1) unstable; urgency=low + + * Initial version + + -- Richard Braakman Tue, 7 Jul 1998 16:27:56 +0200 diff --git a/t/recipes/checks/debian/control/prerequisite/circular/legacy-relations/build-spec/debian/control b/t/recipes/checks/debian/control/prerequisite/circular/legacy-relations/build-spec/debian/control new file mode 100644 index 0000000..6cd1c04 --- /dev/null +++ b/t/recipes/checks/debian/control/prerequisite/circular/legacy-relations/build-spec/debian/control @@ -0,0 +1,51 @@ +Source: relations +Section: misc +Priority: optional +Build-Depends: mail-transport-agent, libc6-dev, findutils, foo (= 3) [!amd64 !i386], bar, arch-test1 [i386], arch-test2 [!i386], quilt (>= 0.40), perl +Build-Depends-Indep: make, bash, debmake, build-essential, baz (= 2.0), ghostscript | gs, + car (>= 1.0), car (<= 2.0), caz (= 1.0) [amd64], caz (>= 2.0) [i386], + caz (= 2.0) [powerpc], perl (>= 5.0), foo (<< 4) [!amd64 !i386], libfoo (>= 1.2-1), bozzle [kfreebsd-i386] +Build-Conflicts: foo [amd64 i386], bar [alpha test], xlibs-dev, arch-test1 [powerpc], arch-test2 [!sparc] +Build-Conflicts-Indep: debmake [!powerpc] +Maintainer: Debian QA Group +Standards-Version: 3.7.3 +Homepage: lintian.debian.org +Origin: Debian +Bugs: debbugs://bugs.debian.org/ + +Package: relations +Architecture: all +Section: contrib/misc +Pre-Depends: awk|gawk +Depends: relations(<< 3), dpkg, bash (>> 2.0 ), mail-transport-agent, gawk | awk, foo (>> 2.0), foo (<< 2.2), coreutils, ,null (>= 0), ${misc:Depends}, makedev +Provides: mail-reader +Replaces: relations +Conflicts: foobar (<< 5+5), foo, relations, + gnuwdf, +Suggests: alpha, gnu (>= 44-3-4-8-11.4) | ung (<< 89beta) | nug | ngu, beta, some-other-package +Recommends: emacs21 | emacsen, dpkg, null, some-other-package, ${f-oo:b-ar}, gs | ghostscript | gs-aladdin +Description: Strange dependency relationships (dummy) + This package declares relationships designed to tickle lintian's "fields" + check. It should generate a number of tags for these. + . + The package is built with "dpkg --build --no-check", because some of the + relationships used here are normally rejected by dpkg. + +Package: relations-multiple-libs +Architecture: all +Section: non-free/misc +Depends: libstdc++2.10, libstdc++2.10-glibc2.2, libstdc++3.0, tk8.2, tk8.3, tcl8.0, tcl8.2, tkx8.2, tkx8.3, tclx8.2, libpng2, libpng3, xorg, ${shlibs:Depends}, makedev | udev +Provides: awk +Enhances: foo +Recommends: ${shlibs:Depends}, relations-multiple-libs, gs | gs-gpl, makedev +Breaks: libpng3 (<< 1.0), libpng2 +Suggests: x-dev, ghostscript | gs +Description: Duplicate library dependency relationships. + Duplicate library dependency relationships. + This tests the depending on different versions of the same library + at the same time. + . + At the same time, it conveniently tests some description file checks. :) + . + It is a metapackage from the lintian perspective, so the xorg dependency + should be allowed. diff --git a/t/recipes/checks/debian/control/prerequisite/circular/legacy-relations/build-spec/debian/rules b/t/recipes/checks/debian/control/prerequisite/circular/legacy-relations/build-spec/debian/rules new file mode 100755 index 0000000..5027f33 --- /dev/null +++ b/t/recipes/checks/debian/control/prerequisite/circular/legacy-relations/build-spec/debian/rules @@ -0,0 +1,49 @@ +#!/usr/bin/make -f + +# Copyright (C) 1998 Richard Braakman +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +build-arch: + +build-indep: + +build: build-arch build-indep + +binary-arch: + +binary-indep: + install -d debian/tmp/DEBIAN + dpkg-gencontrol -prelations -isp + dpkg --build debian/tmp ../relations_5_all.deb + install -d debian/tmp/usr/share/doc/ + ln -s relations debian/tmp/usr/share/doc/relations-multiple-libs + dpkg-gencontrol -prelations-multiple-libs -isp + dpkg --build debian/tmp ../relations-multiple-libs_5_all.deb + +binary: binary-arch binary-indep + +clean:: + rm -rf debian/tmp debian/files + +# Test allowing quilt Build-Depends for manual quilt invocations. + TESTING=foo ANOTHER=bar quilt || true + +# Test requiring perl Build-Depends for manual perl invocations. + [ ! -f Build ] || $(PERL) Build distclean + +.PHONY: build-arch build-indep build binary-arch binary-indep binary clean diff --git a/t/recipes/checks/debian/control/prerequisite/circular/legacy-relations/build-spec/debian/tmp/DEBIAN/control b/t/recipes/checks/debian/control/prerequisite/circular/legacy-relations/build-spec/debian/tmp/DEBIAN/control new file mode 100644 index 0000000..87e7fe6 --- /dev/null +++ b/t/recipes/checks/debian/control/prerequisite/circular/legacy-relations/build-spec/debian/tmp/DEBIAN/control @@ -0,0 +1,14 @@ +Package: relations-multiple-libs +Version: 4 +Section: misc +Priority: optional +Architecture: all +Depends: libstdc++2.10, libstdc++2.10-glibc2.2, libstdc++3.0, tk8.2, tk8.3, tcl8.0, tcl8.2, tkx8.2, tkx8.3, tclx8.2, libpng2, libpng3 +Installed-Size: 12 +Maintainer: Lintian Maintainer +Source: relations +Description: Duplicate library dependency relationships. + Duplicate library dependency relationships. This tests the depending on + different versions of the same library at the same time. + . + At the same time, it conveniently tests some description file checks. :) diff --git a/t/recipes/checks/debian/control/prerequisite/circular/legacy-relations/build-spec/fill-values b/t/recipes/checks/debian/control/prerequisite/circular/legacy-relations/build-spec/fill-values new file mode 100644 index 0000000..7e4661b --- /dev/null +++ b/t/recipes/checks/debian/control/prerequisite/circular/legacy-relations/build-spec/fill-values @@ -0,0 +1,5 @@ +Skeleton: upload-native +Testname: legacy-relations +Source: relations +Version: 5 +Description: Legacy test "relations" diff --git a/t/recipes/checks/debian/control/prerequisite/circular/legacy-relations/eval/desc b/t/recipes/checks/debian/control/prerequisite/circular/legacy-relations/eval/desc new file mode 100644 index 0000000..515312a --- /dev/null +++ b/t/recipes/checks/debian/control/prerequisite/circular/legacy-relations/eval/desc @@ -0,0 +1,2 @@ +Testname: legacy-relations +Check: debian/control/prerequisite/circular diff --git a/t/recipes/checks/debian/control/prerequisite/circular/legacy-relations/eval/hints b/t/recipes/checks/debian/control/prerequisite/circular/legacy-relations/eval/hints new file mode 100644 index 0000000..3285321 --- /dev/null +++ b/t/recipes/checks/debian/control/prerequisite/circular/legacy-relations/eval/hints @@ -0,0 +1,2 @@ +relations (source): circular-installation-prerequisite (in section for relations-multiple-libs) Recommends ${shlibs:Depends}, relations-multiple-libs, gs | gs-gpl, makedev [debian/control:40] +relations (source): circular-installation-prerequisite (in section for relations) Depends relations (<< 3), dpkg, bash (>> 2.0 ), mail-transport-agent, gawk | awk, foo (>> 2.0), foo (<< 2.2), coreutils, null (>= 0), ${misc:Depends}, makedev [debian/control:20] diff --git a/t/recipes/checks/debian/control/prerequisite/circular/legacy-relations/eval/post-test b/t/recipes/checks/debian/control/prerequisite/circular/legacy-relations/eval/post-test new file mode 100644 index 0000000..faeef0b --- /dev/null +++ b/t/recipes/checks/debian/control/prerequisite/circular/legacy-relations/eval/post-test @@ -0,0 +1 @@ +s/\(current is ([0-9]+\.)+[0-9]\)/(current is CURRENT)/ diff --git a/t/recipes/checks/debian/control/prerequisite/development/control-file-library-dev/build-spec/debian/control.in b/t/recipes/checks/debian/control/prerequisite/development/control-file-library-dev/build-spec/debian/control.in new file mode 100644 index 0000000..170132e --- /dev/null +++ b/t/recipes/checks/debian/control/prerequisite/development/control-file-library-dev/build-spec/debian/control.in @@ -0,0 +1,115 @@ +Source: [% $source %] +Priority: optional +Section: [% $section %] +Maintainer: [% $author %] +Standards-Version: [% $standards_version %] +Build-Depends: [% $build_depends %] +Rules-Requires-Root: no + +Package: libcontrol-file-foo1 +Section: libs +Architecture: [% $package_architecture %] +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: [% $description %] (shared lib 1) + First shared library. + . + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. + +Package: libcontrol-file-bar7ldbl +Architecture: [% $package_architecture %] +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: [% $description %] (shared lib 2) + Second shared library. + . + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. + +Package: libcontrol-file-dev +Section: libdevel +Architecture: [% $package_architecture %] +Depends: ${shlibs:Depends}, ${misc:Depends}, + libcontrol-file-foo1 (= ${binary:Version}), + libcontrol-file-bar7ldbl, libcontrol-file-baz9-4 (>= ${binary:Version}), + libfoo4, libcontrol-file-doc, libcontrol-file4-dev +Description: [% $description %] (dev package) + Dev package. + . + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. + +Package: libcontrol-file-baz9-4 +Section: libs +Architecture: [% $package_architecture %] +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: [% $description %] (shared lib 3) + Third shared library. + . + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. + +Package: libcontrol-file-doc +Section: doc +Architecture: all +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: [% $description %] (doc package) + Doc package. + . + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. + +Package: libcontrol-file4-dev +Section: libdevel +Architecture: [% $package_architecture %] +Depends: ${shlibs:Depends}, ${misc:Depends}, + libcontrol-file-foo1 (<= ${source:Upstream-Version}-99) + | libcontrol-file-baz9-4 (<= ${source:Upstream-Version}-99), + libcontrol-file-foo1 (>= ${binary:Version}) + | libcontrol-file-baz9-4 (>= ${binary:Version}) +Description: [% $description %] (dev package with version) + Dev package containing a number. + . + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. + +Package: libcontrol-file-all-dev +Section: libdevel +Architecture: all +Depends: ${shlibs:Depends}, ${misc:Depends}, libcontrol-file-doc, + libcontrol-file-foo1 (>= ${source:Upstream-Version}), + libcontrol-file-foo1 (<= ${source:Version}.1~), + libcontrol-file-baz9-4 (>= ${source:Version}) +Description: [% $description %] (arch: all dev package) + Architecture-independent development package. + . + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. + +Package: libcontrol-baz-dev +Section: libdevel +Architecture: [% $package_architecture %] +Depends: + libcontrol-file-baz9-4 (= ${binary:Version}), + ${misc:Depends}, + ${shlibs:Depends} +Description: [% $description %] (dev whitespace) + Test proper parsing of leading whitespace in Depends + . + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. diff --git a/t/recipes/checks/debian/control/prerequisite/development/control-file-library-dev/build-spec/fill-values b/t/recipes/checks/debian/control/prerequisite/development/control-file-library-dev/build-spec/fill-values new file mode 100644 index 0000000..3651a6c --- /dev/null +++ b/t/recipes/checks/debian/control/prerequisite/development/control-file-library-dev/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: upload-native +Testname: control-file-library-dev +Description: Check control file handling of library dev packages diff --git a/t/recipes/checks/debian/control/prerequisite/development/control-file-library-dev/eval/desc b/t/recipes/checks/debian/control/prerequisite/development/control-file-library-dev/eval/desc new file mode 100644 index 0000000..07a35fd --- /dev/null +++ b/t/recipes/checks/debian/control/prerequisite/development/control-file-library-dev/eval/desc @@ -0,0 +1,2 @@ +Testname: control-file-library-dev +Check: debian/control/prerequisite/development diff --git a/t/recipes/checks/debian/control/prerequisite/development/control-file-library-dev/eval/hints b/t/recipes/checks/debian/control/prerequisite/development/control-file-library-dev/eval/hints new file mode 100644 index 0000000..5d06a02 --- /dev/null +++ b/t/recipes/checks/debian/control/prerequisite/development/control-file-library-dev/eval/hints @@ -0,0 +1,3 @@ +control-file-library-dev (source): weak-library-dev-dependency (in section for libcontrol-file-dev) Depends libcontrol-file-baz9-4 (>= ${binary:Version}) [debian/control:35] +control-file-library-dev (source): weak-library-dev-dependency (in section for libcontrol-file-dev) Depends libcontrol-file-bar7ldbl [debian/control:35] +control-file-library-dev (source): weak-library-dev-dependency (in section for libcontrol-file-all-dev) Depends libcontrol-file-baz9-4 (>= ${source:Version}) [debian/control:90] diff --git a/t/recipes/checks/debian/control/prerequisite/development/legacy-libbaz/build-spec/debian/changelog.in b/t/recipes/checks/debian/control/prerequisite/development/legacy-libbaz/build-spec/debian/changelog.in new file mode 100644 index 0000000..91a6bb5 --- /dev/null +++ b/t/recipes/checks/debian/control/prerequisite/development/legacy-libbaz/build-spec/debian/changelog.in @@ -0,0 +1,6 @@ +libbaz ([% $version %]) [% $distribution %]; urgency=low + + * Initial setup + + -- Sean 'Shaleh' Perry Tue, 30 Jan 2001 15:23:59 -0800 + diff --git a/t/recipes/checks/debian/control/prerequisite/development/legacy-libbaz/build-spec/debian/compat.in b/t/recipes/checks/debian/control/prerequisite/development/legacy-libbaz/build-spec/debian/compat.in new file mode 100644 index 0000000..640a566 --- /dev/null +++ b/t/recipes/checks/debian/control/prerequisite/development/legacy-libbaz/build-spec/debian/compat.in @@ -0,0 +1 @@ +[% $dh_compat_level %] diff --git a/t/recipes/checks/debian/control/prerequisite/development/legacy-libbaz/build-spec/debian/control b/t/recipes/checks/debian/control/prerequisite/development/legacy-libbaz/build-spec/debian/control new file mode 100644 index 0000000..1506687 --- /dev/null +++ b/t/recipes/checks/debian/control/prerequisite/development/legacy-libbaz/build-spec/debian/control @@ -0,0 +1,58 @@ +Source: libbaz +Section: libs +Priority: optional +Maintainer: Lintian Maintainer +Build-depends: debhelper (>=4) +Standards-Version: 3.2.1 + +Package: libbaz1 +Architecture: any +Provides: libbaz +Description: test handling of library packages + Regression test for lintian's handling of libraries. + . + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. + +Package: libbaz1-dev +Architecture: any +Depends: libbaz1 (= ${source:Version}), perlapi-5.8.8 +Description: development package + Regression test for lintian's handling of libraries (dev). + . + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. + +Package: libbaz2 +Architecture: any +Depends: ${shlibs:Depends}, libssl0.9.8 +Description: test handling of library packages (good) + Regression test for lintian's handling of libraries (good). + . + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. + +Package: libbaz2-dev +Architecture: any +Depends: ${shlibs:Depends}, libbaz2 (= ${source:Version}) +Description: development package (good) + Regression test for lintian's handling of libraries (dev good). + . + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. + +Package: libbaz2-dbg +Architecture: any +Depends: libbaz2 (= ${binary:Version}) +Priority: optional +Description: debugging package + Regression test for lintian's handling of libraries (debug). + . + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. + diff --git a/t/recipes/checks/debian/control/prerequisite/development/legacy-libbaz/build-spec/debian/copyright b/t/recipes/checks/debian/control/prerequisite/development/legacy-libbaz/build-spec/debian/copyright new file mode 100644 index 0000000..a874c87 --- /dev/null +++ b/t/recipes/checks/debian/control/prerequisite/development/legacy-libbaz/build-spec/debian/copyright @@ -0,0 +1,8 @@ +This package is released under public domain. This is distributed in the hope +that it will be useful, but without any warranty; without even the implied +warranty of merchantability or fitness for a particular purpose. + +A reference to /usr/share/common-licenses/GPL-2 to make it look like this +package is under the GPL and trigger the OpenSSL warning. + +However, this has an OpenSSL exception. diff --git a/t/recipes/checks/debian/control/prerequisite/development/legacy-libbaz/build-spec/debian/dev.postinst b/t/recipes/checks/debian/control/prerequisite/development/legacy-libbaz/build-spec/debian/dev.postinst new file mode 100644 index 0000000..683e3cc --- /dev/null +++ b/t/recipes/checks/debian/control/prerequisite/development/legacy-libbaz/build-spec/debian/dev.postinst @@ -0,0 +1,4 @@ +#!/bin/sh -e + +$PKG=libbaz1-dev + diff --git a/t/recipes/checks/debian/control/prerequisite/development/legacy-libbaz/build-spec/debian/dev.prerm b/t/recipes/checks/debian/control/prerequisite/development/legacy-libbaz/build-spec/debian/dev.prerm new file mode 100644 index 0000000..683e3cc --- /dev/null +++ b/t/recipes/checks/debian/control/prerequisite/development/legacy-libbaz/build-spec/debian/dev.prerm @@ -0,0 +1,4 @@ +#!/bin/sh -e + +$PKG=libbaz1-dev + diff --git a/t/recipes/checks/debian/control/prerequisite/development/legacy-libbaz/build-spec/debian/lib.postinst b/t/recipes/checks/debian/control/prerequisite/development/legacy-libbaz/build-spec/debian/lib.postinst new file mode 100644 index 0000000..ec0b98a --- /dev/null +++ b/t/recipes/checks/debian/control/prerequisite/development/legacy-libbaz/build-spec/debian/lib.postinst @@ -0,0 +1,10 @@ +#!/bin/sh -e + +$PKG=libbaz1 + +if [ "$1" = "configure" ]; then + if [ -d /usr/doc -a ! -e /usr/doc/$PKG -a -d /usr/share/doc/$PKG ] +; then + ln -sf ../share/doc/$PKG /usr/doc/$PKG + fi +fi diff --git a/t/recipes/checks/debian/control/prerequisite/development/legacy-libbaz/build-spec/debian/lib.prerm b/t/recipes/checks/debian/control/prerequisite/development/legacy-libbaz/build-spec/debian/lib.prerm new file mode 100644 index 0000000..50e37c3 --- /dev/null +++ b/t/recipes/checks/debian/control/prerequisite/development/legacy-libbaz/build-spec/debian/lib.prerm @@ -0,0 +1,7 @@ +#!/bin/sh -e + +$PKG=libbaz1 + +if [ \( "$1" = "upgrade" -o "$1" = "remove" \) -a -L /usr/doc/$PKG ]; then + rm -f /usr/doc/$PKG +fi diff --git a/t/recipes/checks/debian/control/prerequisite/development/legacy-libbaz/build-spec/debian/lib.shlibs b/t/recipes/checks/debian/control/prerequisite/development/legacy-libbaz/build-spec/debian/lib.shlibs new file mode 100644 index 0000000..b88e288 --- /dev/null +++ b/t/recipes/checks/debian/control/prerequisite/development/legacy-libbaz/build-spec/debian/lib.shlibs @@ -0,0 +1,8 @@ +libdoesntexist2 1.0 libbaz1 +libdoesntexist2 1.0 libbaz1 +libbaz2 1.1 libbaz +libbaz3 1 libbaz1 (>> 1-1) +libbaz4 1 libbaz1 (= 1-1) +libbaz5 1 libbaz2 +udeb: libdoesntexist2 1.0 libbaz2 +udeb: libdoesntexist2 1.0 libbaz2 diff --git a/t/recipes/checks/debian/control/prerequisite/development/legacy-libbaz/build-spec/debian/lib.symbols b/t/recipes/checks/debian/control/prerequisite/development/legacy-libbaz/build-spec/debian/lib.symbols new file mode 100644 index 0000000..72f9d8a --- /dev/null +++ b/t/recipes/checks/debian/control/prerequisite/development/legacy-libbaz/build-spec/debian/lib.symbols @@ -0,0 +1,3 @@ +libbaz.so.2 libbaz1 #MINVER# + pw 1-1 + foo 1.1-1 diff --git a/t/recipes/checks/debian/control/prerequisite/development/legacy-libbaz/build-spec/debian/rules b/t/recipes/checks/debian/control/prerequisite/development/legacy-libbaz/build-spec/debian/rules new file mode 100755 index 0000000..fa99bc8 --- /dev/null +++ b/t/recipes/checks/debian/control/prerequisite/development/legacy-libbaz/build-spec/debian/rules @@ -0,0 +1,121 @@ +#!/usr/bin/make -f + +lib_tmp=debian/tmp-lib +dev_tmp=debian/tmp-dev + +LIB=libbaz1 +DEV=libbaz1-dev + +VENDORARCH := $(shell perl -MConfig -wE'say substr($$Config{vendorarch},1)') + +build-arch: + $(MAKE) + +build-indep: + +build: build-arch build-indep + +clean: + $(MAKE) clean + dh_clean -plibbaz2 -plibbaz2-dev + rm -f debian/files debian/substvars + rm -rf $(lib_tmp) $(dev_tmp) + +# Now the correct libbaz2-dev package +binary-correct: + install -d debian/libbaz2-dev/usr/lib + cp -a libbaz2.a libbaz2.so debian/libbaz2-dev/usr/lib + # usually, I'd also include some .h files to /usr/include + + # Now the correct libbaz2 package + install -d debian/libbaz2/usr/lib + cp -a libbaz2.so.* debian/libbaz2/usr/lib + chmod a-x debian/libbaz2/usr/lib/* + + # General stuff that is tested in other testsets: + dh_installdocs -plibbaz2 -plibbaz2-dev -plibbaz2-dbg + dh_compress -plibbaz2 -plibbaz2-dev -plibbaz2-dbg + + # Mess up the libbaz2 changelog files to test the symlink handling. + ln -s /usr/share/doc/lintian/changelog.gz \ + debian/libbaz2/usr/share/doc/libbaz2/changelog.gz + install -m 644 debian/changelog \ + debian/libbaz2-dev/usr/share/doc/libbaz2-dev/foo + ln -s foo debian/libbaz2-dev/usr/share/doc/libbaz2-dev/changelog + + # Okay, if either line is omitted, it should be noted + dh_strip --dbg-package=libbaz2-dbg -plibbaz2 -plibbaz2-dev + dh_makeshlibs -plibbaz2 -plibbaz2-dev -plibbaz2-dbg + dh_shlibdeps -plibbaz2 -plibbaz2-dev -plibbaz2-dbg + + # and again, regular packaging stuff + dh_installdeb -plibbaz2 -plibbaz2-dev -plibbaz2-dbg + echo udeb: libbaz2 1.0 libbaz2 >> debian/libbaz2/DEBIAN/shlibs + dh_gencontrol -plibbaz2 -plibbaz2-dev -plibbaz2-dbg + dh_builddeb -plibbaz2 -plibbaz2-dev -plibbaz2-dbg + +# and the incorrect one +binary-arch: build-arch binary-correct + # first, the lib package + install -d $(lib_tmp)/usr/lib + # resp. no soname (check), wrong soname (check), and no-pic (check) + cp -a libbaz1.so.1.0* $(lib_tmp)/usr/lib + cp -a libbaz2.so.1.0.3b $(lib_tmp)/usr/lib/libfoo2.so.1.0.3b + install -m644 libbaz3.so.1.0.3b $(lib_tmp)/usr/lib/libbaz3.so.1.0.3b + # let's include the .a in the non-dev too (TODO) + # Also, libbaz1.a hasn't a symbol table (TODO) + cp -a *.a $(lib_tmp)/usr/lib + # And a wrong .so symlink (wrong, only in -dev, TODO) + ln -s libfoo3.so.0.9 $(lib_tmp)/usr/lib/libfoo3.so + # And a wrong .so.X symlink (wrong, should point to a real existing + # shlib, TODO) + ln -s libfoo.so.0.9.1 $(lib_tmp)/usr/lib/libfoo.so.0.9 + # And a plain .so (wrong, TODO) + touch $(lib_tmp)/usr/lib/libbar2.so + # And a non-versioned SONAME. + install -m644 libbaz.so $(lib_tmp)/usr/lib/libbaz.so + strip --remove-section=.comment --strip-unneeded $(lib_tmp)/usr/lib/libbaz.so + # Pretend to be a Perl module to test a lack of Perl dependencies. + install -d $(lib_tmp)/$(VENDORARCH)/auto/Foo + install -m 644 libbaz2.so.1.0.3b $(lib_tmp)/$(VENDORARCH)/auto/Foo/Foo.so + strip $(lib_tmp)/$(VENDORARCH)/auto/Foo/Foo.so + + install -d $(lib_tmp)/usr/share/doc/$(LIB) + install -m 644 debian/copyright $(lib_tmp)/usr/share/doc/$(LIB) + install -m 644 debian/changelog $(lib_tmp)/usr/share/doc/$(LIB) + gzip -n -9 $(lib_tmp)/usr/share/doc/$(LIB)/changelog + install -d $(lib_tmp)/DEBIAN + install -m 755 debian/lib.postinst $(lib_tmp)/DEBIAN/postinst + install -m 755 debian/lib.prerm $(lib_tmp)/DEBIAN/prerm + touch $(lib_tmp)/usr/share/doc/README.Debian + #dpkg-shlibdeps $(lib_tmp)/usr/lib/libbaz.so.1.0 + install -m 755 debian/lib.shlibs $(lib_tmp)/DEBIAN/shlibs + install -m 755 debian/lib.symbols $(lib_tmp)/DEBIAN/symbols + dpkg-gencontrol -isp -p$(LIB) -P$(lib_tmp) + dpkg --build $(lib_tmp) .. + + # now the -dev package + install -d $(dev_tmp)/usr/include + install -d $(lib_tmp)/usr/lib + # let's also install the .so at the same time... (wrong, TODO) + cp -a *.a *.so.* $(lib_tmp)/usr/lib + # and fuck up permission (TODO) + chmod a+x $(lib_tmp)/usr/lib/*.a + # Pretend to be a Perl module to test a lack of Perl dependencies. + install -d $(dev_tmp)/$(VENDORARCH)/auto/Foo + install -m 644 libbaz2.so.1.0.3b $(dev_tmp)/$(VENDORARCH)/auto/Foo/Foo.so + strip $(dev_tmp)/$(VENDORARCH)/auto/Foo/Foo.so + install -d $(dev_tmp)/usr/share/doc + ln -s $(LIB) $(dev_tmp)/usr/share/doc/$(DEV) + install -d $(dev_tmp)/DEBIAN + install -m 755 debian/dev.postinst $(dev_tmp)/DEBIAN/postinst + install -m 755 debian/dev.prerm $(dev_tmp)/DEBIAN/prerm + dpkg-gencontrol -isp -p$(DEV) -P$(dev_tmp) + dpkg --build $(dev_tmp) .. + + +binary: binary-arch + +# The mention of binary-indep here should be sufficient to suppress the +# warning that it's not present. +.PHONY: build-arch build-indep build binary-arch binary-indep binary clean diff --git a/t/recipes/checks/debian/control/prerequisite/development/legacy-libbaz/build-spec/debian/source.lintian-overrides b/t/recipes/checks/debian/control/prerequisite/development/legacy-libbaz/build-spec/debian/source.lintian-overrides new file mode 100644 index 0000000..6008d27 --- /dev/null +++ b/t/recipes/checks/debian/control/prerequisite/development/legacy-libbaz/build-spec/debian/source.lintian-overrides @@ -0,0 +1 @@ +libbaz source: maintainer-script-lacks-debhelper-token diff --git a/t/recipes/checks/debian/control/prerequisite/development/legacy-libbaz/build-spec/fill-values b/t/recipes/checks/debian/control/prerequisite/development/legacy-libbaz/build-spec/fill-values new file mode 100644 index 0000000..7effe4f --- /dev/null +++ b/t/recipes/checks/debian/control/prerequisite/development/legacy-libbaz/build-spec/fill-values @@ -0,0 +1,6 @@ +Skeleton: upload-non-native +Testname: legacy-libbaz +Source: libbaz +Version: 1-1 +Default-Build-Depends: debhelper (>= 9.20151004~) +Description: Legacy test "libbaz" diff --git a/t/recipes/checks/debian/control/prerequisite/development/legacy-libbaz/build-spec/orig/Makefile b/t/recipes/checks/debian/control/prerequisite/development/legacy-libbaz/build-spec/orig/Makefile new file mode 100644 index 0000000..657dc2a --- /dev/null +++ b/t/recipes/checks/debian/control/prerequisite/development/legacy-libbaz/build-spec/orig/Makefile @@ -0,0 +1,55 @@ +# This is the correct way to build a lib + +CC=gcc +CFLAGS=-g -Wall -Winline -O2 +LDFLAGS=-Wl,--no-as-needed + +OBJS=baz.o extra.o +SHOBJS=baz.sho extra.sho +NOPICOBJS = $(SHOBJS) + +all: libbaz1.a libbaz2.a libbaz1.so.1.0.3b libbaz2.so libbaz3.so.1.0.3b \ + libbaz.so + +libbaz2.so: libbaz2.so.1.0 + ln -sf $^ $@ +libbaz2.so.1.0: libbaz2.so.1.0.3b + ln -sf $^ $@ + +# Oops, forget the soname altogether +libbaz1.so.1.0.3b: $(NOPICOBJS) + $(CC) $(LDFLAGS) -o $@ -shared $^ -lc + +libbaz2.so.1.0.3b: $(SHOBJS) + $(CC) $(LDFLAGS) -o $@ -shared -Wl,-soname,libbaz2.so.1.0 $^ -lc + +# Non-PIC. We can't test this on all architectures +libbaz3.so.1.0.3b: $(NOPICOBJS) + $(CC) $(LDFLAGS) -o $@ -shared -Wl,-soname,libbaz3.so.1 $^ -lc + +# Non-versioned SONAME. +libbaz.so: $(SHOBJS) + $(CC) $(LDFLAGS) -o $@ -shared -Wl,-soname,libbaz.so $^ -lc + +#%.o-noreentrant: %.c +# $(CC) $(LDFLAGS) $(CFLAGS) -o $@ -c $< + +%.sho: %.c + $(CC) $(LDFLAGS) $(CFLAGS) -D_REENTRANT -fPIC -o $@ -c $< + +%.o: %.c + $(CC) $(LDFLAGS) $(CFLAGS) -D_REENTRANT -o $@ -c $< + +libbaz2.a: $(OBJS) + ar cq $@ $(OBJS) + strip --strip-unneeded --remove-section=.comment \ + --remove-section=-note $@ + ranlib $@ + +# The pic one in the .a (wrong), no archive table +libbaz1.a: $(SHOBJS) + ar cqS $@ $^ + strip --strip-unneeded --remove-section=.comment \ + --remove-section=-note $@ +clean: + rm -f *.a *.o *.so* *.sho diff --git a/t/recipes/checks/debian/control/prerequisite/development/legacy-libbaz/build-spec/orig/baz.c b/t/recipes/checks/debian/control/prerequisite/development/legacy-libbaz/build-spec/orig/baz.c new file mode 100644 index 0000000..4d5fc45 --- /dev/null +++ b/t/recipes/checks/debian/control/prerequisite/development/legacy-libbaz/build-spec/orig/baz.c @@ -0,0 +1,6 @@ +#include + +double pw(double p) +{ + return exp(p); +} diff --git a/t/recipes/checks/debian/control/prerequisite/development/legacy-libbaz/build-spec/orig/extra.c b/t/recipes/checks/debian/control/prerequisite/development/legacy-libbaz/build-spec/orig/extra.c new file mode 100644 index 0000000..e69de29 diff --git a/t/recipes/checks/debian/control/prerequisite/development/legacy-libbaz/eval/desc b/t/recipes/checks/debian/control/prerequisite/development/legacy-libbaz/eval/desc new file mode 100644 index 0000000..1b2d731 --- /dev/null +++ b/t/recipes/checks/debian/control/prerequisite/development/legacy-libbaz/eval/desc @@ -0,0 +1,2 @@ +Testname: legacy-libbaz +Check: debian/control/prerequisite/development diff --git a/t/recipes/checks/debian/control/prerequisite/development/legacy-libbaz/eval/hints b/t/recipes/checks/debian/control/prerequisite/development/legacy-libbaz/eval/hints new file mode 100644 index 0000000..8113d34 --- /dev/null +++ b/t/recipes/checks/debian/control/prerequisite/development/legacy-libbaz/eval/hints @@ -0,0 +1,2 @@ +libbaz (source): weak-library-dev-dependency (in section for libbaz2-dev) Depends libbaz2 (= ${source:Version}) [debian/control:40] +libbaz (source): weak-library-dev-dependency (in section for libbaz1-dev) Depends libbaz1 (= ${source:Version}) [debian/control:20] diff --git a/t/recipes/checks/debian/control/prerequisite/development/legacy-libbaz/eval/post-test b/t/recipes/checks/debian/control/prerequisite/development/legacy-libbaz/eval/post-test new file mode 100755 index 0000000..29dc3f4 --- /dev/null +++ b/t/recipes/checks/debian/control/prerequisite/development/legacy-libbaz/eval/post-test @@ -0,0 +1,4 @@ +/: hardening-.*/ d +s/\(current is ([0-9]+\.)+[0-9]\)/(current is CURRENT)/ +s,usr/lib/([^\/]*/)?perl[0-9]*(/[0-9]*\.[0-9]*)?/,usr/lib/ma-dir/perl/version/,g +/: file-references-package-build-path / d diff --git a/t/recipes/checks/debian/control/prerequisite/redundant/control-file-general/build-spec/debian/control.in b/t/recipes/checks/debian/control/prerequisite/redundant/control-file-general/build-spec/debian/control.in new file mode 100644 index 0000000..3058e5a --- /dev/null +++ b/t/recipes/checks/debian/control/prerequisite/redundant/control-file-general/build-spec/debian/control.in @@ -0,0 +1,118 @@ +Source: [% $source %] +Priority: optional +Maintainer: [% $author %] +Standards-Version: [% $standards_version %] +Build-Depends: [% $build_depends %], + fiddle [amd64 powerpc mips mipsel hppa s390], + faddle + (>> + 2) [ + sparc i386 amd64 + ] +Build-Depends-Indep: perl (> 5.8) +Rules-Requires-Root: no +XS-Vcs-Svn: https://svn.example.com/[% $source %]/trunk +#Vcs-Git: git://git.debian.org/collab-maint/.git +#Vcs-Browser: http://git.debian.org/?p=collab-maint/.git;a=summary + +Package: [% $source %] +Section: [% $section %] +Maintainer: [% $author %] +Build-Conflicts: foo +Architecture: all +Pre-depends: ${misc:Pre-depends}, multiarch-support +Depends: [% $source %], foo, baz, ${shlibs:Depends} ${some:Depends}, ${misc:Depends} +Recommends: foo, bar, no-match${lintian:Foo}, match${lintian:Match}, no-match${lintian:Bar}-foo +Suggests: bar | baz, no-match${lintian:Bar}, match${lintian:Match} +Description: [% $description %] + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. + +Package: [% $source %]-1 +Section: [% $section %] +Architecture: all +Depends: ${shlibs:Depends}, ${misc:Depends} +Breaks: libsqlite3-0 (< 3.6.12) +Description: [% $description %] + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. + +Package: [% $source %]-2 +Section: [% $section %] +Architecture: all +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: [% $description %] (two) + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. + +Package: [% $source %]-3 +Section: [% $section %] +Architecture: all +Depends: ${shlibs:Depends}, ${misc:Depends}, foo (>= 1), + baz (<< 2), + fizz (= 2.0), gcc-${pv:gcc} ${reqv:gcc} +Description: [% $description %] (three) + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. + +Package: [% $source %]-4 +Section: [% $section %] +Architecture: all +Depends: ${shlibs:Depends}, ${misc:Depends}, foo | + bar (>= 1), baz +Description: [% $description %] (four) + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. + +Package: [% $source %]-5 +Section: [% $section %] +Architecture: all +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: Description: [% $description %] + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. + +Package: [% $source %]-dbgsym +Section: debug +Architecture: all +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: Description: dbg-sym + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. + +Package: [% $source %]-dbg +Section: debug +Architecture: all +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: Description: debug + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. + +Package: [% $source %]-udeb +Section: debian-installer +Package-Type: udeb +Architecture: all +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: [% $description %] (udeb) + udeb tests. + . + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. diff --git a/t/recipes/checks/debian/control/prerequisite/redundant/control-file-general/build-spec/debian/rules b/t/recipes/checks/debian/control/prerequisite/redundant/control-file-general/build-spec/debian/rules new file mode 100644 index 0000000..f5db4bb --- /dev/null +++ b/t/recipes/checks/debian/control/prerequisite/redundant/control-file-general/build-spec/debian/rules @@ -0,0 +1,8 @@ +#!/usr/bin/make -f +%: + dh $@ + +override_dh_gencontrol: + echo 'pv:gcc=4.3' >> debian/substvars + echo 'reqv:gcc=(>= 4.3-1)' >> debian/substvars + dh_gencontrol diff --git a/t/recipes/checks/debian/control/prerequisite/redundant/control-file-general/build-spec/fill-values b/t/recipes/checks/debian/control/prerequisite/redundant/control-file-general/build-spec/fill-values new file mode 100644 index 0000000..7338a95 --- /dev/null +++ b/t/recipes/checks/debian/control/prerequisite/redundant/control-file-general/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: upload-native +Testname: control-file-general +Description: Various problems with debian/control diff --git a/t/recipes/checks/debian/control/prerequisite/redundant/control-file-general/eval/desc b/t/recipes/checks/debian/control/prerequisite/redundant/control-file-general/eval/desc new file mode 100644 index 0000000..7f12c44 --- /dev/null +++ b/t/recipes/checks/debian/control/prerequisite/redundant/control-file-general/eval/desc @@ -0,0 +1,11 @@ +Testname: control-file-general +Check: debian/control/prerequisite/redundant +See-Also: + Debian Bug#30020, + Debian Bug#409099, + Debian Bug#516706, + Debian Bug#533202, + Debian Bug#557971, + Debian Bug#573399, + Debian Bug#580494, + Debian Bug#657110 diff --git a/t/recipes/checks/debian/control/prerequisite/redundant/control-file-general/eval/hints b/t/recipes/checks/debian/control/prerequisite/redundant/control-file-general/eval/hints new file mode 100644 index 0000000..0671905 --- /dev/null +++ b/t/recipes/checks/debian/control/prerequisite/redundant/control-file-general/eval/hints @@ -0,0 +1,4 @@ +control-file-general (source): redundant-installation-prerequisite (in section for control-file-general) Suggests -> Recommends match${lintian:Match} [debian/control:25] +control-file-general (source): redundant-installation-prerequisite (in section for control-file-general) Suggests -> Recommends bar | baz [debian/control:25] +control-file-general (source): redundant-installation-prerequisite (in section for control-file-general) Suggests -> Depends bar | baz [debian/control:24] +control-file-general (source): redundant-installation-prerequisite (in section for control-file-general) Recommends -> Depends foo [debian/control:24] diff --git a/t/recipes/checks/debian/control/prerequisite/redundant/legacy-relations/build-spec/debian/changelog.in b/t/recipes/checks/debian/control/prerequisite/redundant/legacy-relations/build-spec/debian/changelog.in new file mode 100644 index 0000000..9a82ea7 --- /dev/null +++ b/t/recipes/checks/debian/control/prerequisite/redundant/legacy-relations/build-spec/debian/changelog.in @@ -0,0 +1,33 @@ +relations ([% $version %]) [% $distribution %]; urgency=low + + * I'm orphaning this package -- I'm sick of it: it's completely broken, + lintian complains all over the place. + + -- Jeroen van Wolffelaar Sun, 02 Dec 2007 15:59:59 -0800 + +relations (4) unstable; urgency=low + + * Added a package that tests dependencies for multiple versions of + libraries, and test some description stuff in there as well. + + -- Josip Rodin Fri, 29 Nov 2002 20:13:33 +0100 + +relations (3) unstable; urgency=low + + * Added a virtual provides to test against my virtual depends without + a real package first test + + -- Sean 'Shaleh' Perry Thu, 8 Feb 2001 11:29:53 -0800 + +relations (2) unstable; urgency=low + + * Added a depends on dpkg (violates policy) and a versioned depends + on bash (follows policy) + + -- Sean 'Shaleh' Perry Fri, 2 Feb 2001 12:37:17 -0800 + +relations (1) unstable; urgency=low + + * Initial version + + -- Richard Braakman Tue, 7 Jul 1998 16:27:56 +0200 diff --git a/t/recipes/checks/debian/control/prerequisite/redundant/legacy-relations/build-spec/debian/control b/t/recipes/checks/debian/control/prerequisite/redundant/legacy-relations/build-spec/debian/control new file mode 100644 index 0000000..6cd1c04 --- /dev/null +++ b/t/recipes/checks/debian/control/prerequisite/redundant/legacy-relations/build-spec/debian/control @@ -0,0 +1,51 @@ +Source: relations +Section: misc +Priority: optional +Build-Depends: mail-transport-agent, libc6-dev, findutils, foo (= 3) [!amd64 !i386], bar, arch-test1 [i386], arch-test2 [!i386], quilt (>= 0.40), perl +Build-Depends-Indep: make, bash, debmake, build-essential, baz (= 2.0), ghostscript | gs, + car (>= 1.0), car (<= 2.0), caz (= 1.0) [amd64], caz (>= 2.0) [i386], + caz (= 2.0) [powerpc], perl (>= 5.0), foo (<< 4) [!amd64 !i386], libfoo (>= 1.2-1), bozzle [kfreebsd-i386] +Build-Conflicts: foo [amd64 i386], bar [alpha test], xlibs-dev, arch-test1 [powerpc], arch-test2 [!sparc] +Build-Conflicts-Indep: debmake [!powerpc] +Maintainer: Debian QA Group +Standards-Version: 3.7.3 +Homepage: lintian.debian.org +Origin: Debian +Bugs: debbugs://bugs.debian.org/ + +Package: relations +Architecture: all +Section: contrib/misc +Pre-Depends: awk|gawk +Depends: relations(<< 3), dpkg, bash (>> 2.0 ), mail-transport-agent, gawk | awk, foo (>> 2.0), foo (<< 2.2), coreutils, ,null (>= 0), ${misc:Depends}, makedev +Provides: mail-reader +Replaces: relations +Conflicts: foobar (<< 5+5), foo, relations, + gnuwdf, +Suggests: alpha, gnu (>= 44-3-4-8-11.4) | ung (<< 89beta) | nug | ngu, beta, some-other-package +Recommends: emacs21 | emacsen, dpkg, null, some-other-package, ${f-oo:b-ar}, gs | ghostscript | gs-aladdin +Description: Strange dependency relationships (dummy) + This package declares relationships designed to tickle lintian's "fields" + check. It should generate a number of tags for these. + . + The package is built with "dpkg --build --no-check", because some of the + relationships used here are normally rejected by dpkg. + +Package: relations-multiple-libs +Architecture: all +Section: non-free/misc +Depends: libstdc++2.10, libstdc++2.10-glibc2.2, libstdc++3.0, tk8.2, tk8.3, tcl8.0, tcl8.2, tkx8.2, tkx8.3, tclx8.2, libpng2, libpng3, xorg, ${shlibs:Depends}, makedev | udev +Provides: awk +Enhances: foo +Recommends: ${shlibs:Depends}, relations-multiple-libs, gs | gs-gpl, makedev +Breaks: libpng3 (<< 1.0), libpng2 +Suggests: x-dev, ghostscript | gs +Description: Duplicate library dependency relationships. + Duplicate library dependency relationships. + This tests the depending on different versions of the same library + at the same time. + . + At the same time, it conveniently tests some description file checks. :) + . + It is a metapackage from the lintian perspective, so the xorg dependency + should be allowed. diff --git a/t/recipes/checks/debian/control/prerequisite/redundant/legacy-relations/build-spec/debian/rules b/t/recipes/checks/debian/control/prerequisite/redundant/legacy-relations/build-spec/debian/rules new file mode 100755 index 0000000..5027f33 --- /dev/null +++ b/t/recipes/checks/debian/control/prerequisite/redundant/legacy-relations/build-spec/debian/rules @@ -0,0 +1,49 @@ +#!/usr/bin/make -f + +# Copyright (C) 1998 Richard Braakman +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +build-arch: + +build-indep: + +build: build-arch build-indep + +binary-arch: + +binary-indep: + install -d debian/tmp/DEBIAN + dpkg-gencontrol -prelations -isp + dpkg --build debian/tmp ../relations_5_all.deb + install -d debian/tmp/usr/share/doc/ + ln -s relations debian/tmp/usr/share/doc/relations-multiple-libs + dpkg-gencontrol -prelations-multiple-libs -isp + dpkg --build debian/tmp ../relations-multiple-libs_5_all.deb + +binary: binary-arch binary-indep + +clean:: + rm -rf debian/tmp debian/files + +# Test allowing quilt Build-Depends for manual quilt invocations. + TESTING=foo ANOTHER=bar quilt || true + +# Test requiring perl Build-Depends for manual perl invocations. + [ ! -f Build ] || $(PERL) Build distclean + +.PHONY: build-arch build-indep build binary-arch binary-indep binary clean diff --git a/t/recipes/checks/debian/control/prerequisite/redundant/legacy-relations/build-spec/debian/tmp/DEBIAN/control b/t/recipes/checks/debian/control/prerequisite/redundant/legacy-relations/build-spec/debian/tmp/DEBIAN/control new file mode 100644 index 0000000..87e7fe6 --- /dev/null +++ b/t/recipes/checks/debian/control/prerequisite/redundant/legacy-relations/build-spec/debian/tmp/DEBIAN/control @@ -0,0 +1,14 @@ +Package: relations-multiple-libs +Version: 4 +Section: misc +Priority: optional +Architecture: all +Depends: libstdc++2.10, libstdc++2.10-glibc2.2, libstdc++3.0, tk8.2, tk8.3, tcl8.0, tcl8.2, tkx8.2, tkx8.3, tclx8.2, libpng2, libpng3 +Installed-Size: 12 +Maintainer: Lintian Maintainer +Source: relations +Description: Duplicate library dependency relationships. + Duplicate library dependency relationships. This tests the depending on + different versions of the same library at the same time. + . + At the same time, it conveniently tests some description file checks. :) diff --git a/t/recipes/checks/debian/control/prerequisite/redundant/legacy-relations/build-spec/fill-values b/t/recipes/checks/debian/control/prerequisite/redundant/legacy-relations/build-spec/fill-values new file mode 100644 index 0000000..7e4661b --- /dev/null +++ b/t/recipes/checks/debian/control/prerequisite/redundant/legacy-relations/build-spec/fill-values @@ -0,0 +1,5 @@ +Skeleton: upload-native +Testname: legacy-relations +Source: relations +Version: 5 +Description: Legacy test "relations" diff --git a/t/recipes/checks/debian/control/prerequisite/redundant/legacy-relations/eval/desc b/t/recipes/checks/debian/control/prerequisite/redundant/legacy-relations/eval/desc new file mode 100644 index 0000000..68843a4 --- /dev/null +++ b/t/recipes/checks/debian/control/prerequisite/redundant/legacy-relations/eval/desc @@ -0,0 +1,2 @@ +Testname: legacy-relations +Check: debian/control/prerequisite/redundant diff --git a/t/recipes/checks/debian/control/prerequisite/redundant/legacy-relations/eval/hints b/t/recipes/checks/debian/control/prerequisite/redundant/legacy-relations/eval/hints new file mode 100644 index 0000000..2c936c4 --- /dev/null +++ b/t/recipes/checks/debian/control/prerequisite/redundant/legacy-relations/eval/hints @@ -0,0 +1,5 @@ +relations (source): redundant-installation-prerequisite (in section for relations-multiple-libs) Recommends -> Depends ${shlibs:Depends} [debian/control:37] +relations (source): redundant-installation-prerequisite (in section for relations) Suggests -> Recommends some-other-package [debian/control:26] +relations (source): redundant-installation-prerequisite (in section for relations) Recommends -> Depends null [debian/control:20] +relations (source): redundant-installation-prerequisite (in section for relations) Recommends -> Depends dpkg [debian/control:20] +relations (source): redundant-installation-prerequisite (in section for relations) Depends -> Pre-Depends gawk | awk [debian/control:19] diff --git a/t/recipes/checks/debian/control/prerequisite/redundant/legacy-relations/eval/post-test b/t/recipes/checks/debian/control/prerequisite/redundant/legacy-relations/eval/post-test new file mode 100644 index 0000000..faeef0b --- /dev/null +++ b/t/recipes/checks/debian/control/prerequisite/redundant/legacy-relations/eval/post-test @@ -0,0 +1 @@ +s/\(current is ([0-9]+\.)+[0-9]\)/(current is CURRENT)/ diff --git a/t/recipes/checks/debian/copyright/apache-notice/source-copyright-missing-notice-file-for-apache-license-unrel/build-spec/debian/copyright b/t/recipes/checks/debian/copyright/apache-notice/source-copyright-missing-notice-file-for-apache-license-unrel/build-spec/debian/copyright new file mode 100644 index 0000000..61e14af --- /dev/null +++ b/t/recipes/checks/debian/copyright/apache-notice/source-copyright-missing-notice-file-for-apache-license-unrel/build-spec/debian/copyright @@ -0,0 +1,23 @@ +Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Upstream-Name: Doohickey +Upstream-Contact: J. Random Hacker +Source: http://examples.com/doohickey/source/ + +Files: * +Copyright: © 2011 J. Random Hacker +License: Apache-2.0 + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + . + http://www.apache.org/licenses/LICENSE-2.0 + . + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + . + On Debian systems, the complete text of the Apache version 2.0 license + can be found in "/usr/share/common-licenses/Apache-2.0". + diff --git a/t/recipes/checks/debian/copyright/apache-notice/source-copyright-missing-notice-file-for-apache-license-unrel/build-spec/debian/source-copyright-missing-notice-file-for-apache-license-unrel.install b/t/recipes/checks/debian/copyright/apache-notice/source-copyright-missing-notice-file-for-apache-license-unrel/build-spec/debian/source-copyright-missing-notice-file-for-apache-license-unrel.install new file mode 100644 index 0000000..4268786 --- /dev/null +++ b/t/recipes/checks/debian/copyright/apache-notice/source-copyright-missing-notice-file-for-apache-license-unrel/build-spec/debian/source-copyright-missing-notice-file-for-apache-license-unrel.install @@ -0,0 +1 @@ +NOTICE usr/share/doc/foo diff --git a/t/recipes/checks/debian/copyright/apache-notice/source-copyright-missing-notice-file-for-apache-license-unrel/build-spec/fill-values b/t/recipes/checks/debian/copyright/apache-notice/source-copyright-missing-notice-file-for-apache-license-unrel/build-spec/fill-values new file mode 100644 index 0000000..f38f171 --- /dev/null +++ b/t/recipes/checks/debian/copyright/apache-notice/source-copyright-missing-notice-file-for-apache-license-unrel/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: upload-native +Testname: source-copyright-missing-notice-file-for-apache-license-unrel +Description: Test for no packages missing Apache NOTICE files (false-positive) diff --git a/t/recipes/checks/debian/copyright/apache-notice/source-copyright-missing-notice-file-for-apache-license-unrel/build-spec/orig/NOTICE b/t/recipes/checks/debian/copyright/apache-notice/source-copyright-missing-notice-file-for-apache-license-unrel/build-spec/orig/NOTICE new file mode 100644 index 0000000..2a74156 --- /dev/null +++ b/t/recipes/checks/debian/copyright/apache-notice/source-copyright-missing-notice-file-for-apache-license-unrel/build-spec/orig/NOTICE @@ -0,0 +1 @@ +This file is installed to the binary package. diff --git a/t/recipes/checks/debian/copyright/apache-notice/source-copyright-missing-notice-file-for-apache-license-unrel/eval/desc b/t/recipes/checks/debian/copyright/apache-notice/source-copyright-missing-notice-file-for-apache-license-unrel/eval/desc new file mode 100644 index 0000000..ddbf70f --- /dev/null +++ b/t/recipes/checks/debian/copyright/apache-notice/source-copyright-missing-notice-file-for-apache-license-unrel/eval/desc @@ -0,0 +1,4 @@ +Testname: source-copyright-missing-notice-file-for-apache-license-unrel +Test-Against: + missing-notice-file-for-apache-license +Check: debian/copyright/apache-notice diff --git a/t/recipes/checks/debian/copyright/apache-notice/source-copyright-missing-notice-file-for-apache-license-unrel/eval/hints b/t/recipes/checks/debian/copyright/apache-notice/source-copyright-missing-notice-file-for-apache-license-unrel/eval/hints new file mode 100644 index 0000000..e69de29 diff --git a/t/recipes/checks/debian/copyright/apache-notice/source-copyright-missing-notice-file-for-apache-license/build-spec/debian/copyright b/t/recipes/checks/debian/copyright/apache-notice/source-copyright-missing-notice-file-for-apache-license/build-spec/debian/copyright new file mode 100644 index 0000000..61e14af --- /dev/null +++ b/t/recipes/checks/debian/copyright/apache-notice/source-copyright-missing-notice-file-for-apache-license/build-spec/debian/copyright @@ -0,0 +1,23 @@ +Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Upstream-Name: Doohickey +Upstream-Contact: J. Random Hacker +Source: http://examples.com/doohickey/source/ + +Files: * +Copyright: © 2011 J. Random Hacker +License: Apache-2.0 + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + . + http://www.apache.org/licenses/LICENSE-2.0 + . + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + . + On Debian systems, the complete text of the Apache version 2.0 license + can be found in "/usr/share/common-licenses/Apache-2.0". + diff --git a/t/recipes/checks/debian/copyright/apache-notice/source-copyright-missing-notice-file-for-apache-license/build-spec/fill-values b/t/recipes/checks/debian/copyright/apache-notice/source-copyright-missing-notice-file-for-apache-license/build-spec/fill-values new file mode 100644 index 0000000..482a07b --- /dev/null +++ b/t/recipes/checks/debian/copyright/apache-notice/source-copyright-missing-notice-file-for-apache-license/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: upload-native +Testname: source-copyright-missing-notice-file-for-apache-license +Description: Test for no packages missing Apache NOTICE files diff --git a/t/recipes/checks/debian/copyright/apache-notice/source-copyright-missing-notice-file-for-apache-license/build-spec/orig/NOTICE b/t/recipes/checks/debian/copyright/apache-notice/source-copyright-missing-notice-file-for-apache-license/build-spec/orig/NOTICE new file mode 100644 index 0000000..6c64526 --- /dev/null +++ b/t/recipes/checks/debian/copyright/apache-notice/source-copyright-missing-notice-file-for-apache-license/build-spec/orig/NOTICE @@ -0,0 +1 @@ +This Apache 2.0 license NOTICE is not installed to any binary package. diff --git a/t/recipes/checks/debian/copyright/apache-notice/source-copyright-missing-notice-file-for-apache-license/build-spec/orig/NOTICE.txt b/t/recipes/checks/debian/copyright/apache-notice/source-copyright-missing-notice-file-for-apache-license/build-spec/orig/NOTICE.txt new file mode 100644 index 0000000..6c64526 --- /dev/null +++ b/t/recipes/checks/debian/copyright/apache-notice/source-copyright-missing-notice-file-for-apache-license/build-spec/orig/NOTICE.txt @@ -0,0 +1 @@ +This Apache 2.0 license NOTICE is not installed to any binary package. diff --git a/t/recipes/checks/debian/copyright/apache-notice/source-copyright-missing-notice-file-for-apache-license/build-spec/orig/subdir/NOTICE b/t/recipes/checks/debian/copyright/apache-notice/source-copyright-missing-notice-file-for-apache-license/build-spec/orig/subdir/NOTICE new file mode 100644 index 0000000..6c64526 --- /dev/null +++ b/t/recipes/checks/debian/copyright/apache-notice/source-copyright-missing-notice-file-for-apache-license/build-spec/orig/subdir/NOTICE @@ -0,0 +1 @@ +This Apache 2.0 license NOTICE is not installed to any binary package. diff --git a/t/recipes/checks/debian/copyright/apache-notice/source-copyright-missing-notice-file-for-apache-license/build-spec/orig/unrel/NOTICE b/t/recipes/checks/debian/copyright/apache-notice/source-copyright-missing-notice-file-for-apache-license/build-spec/orig/unrel/NOTICE new file mode 100644 index 0000000..bdc5a71 --- /dev/null +++ b/t/recipes/checks/debian/copyright/apache-notice/source-copyright-missing-notice-file-for-apache-license/build-spec/orig/unrel/NOTICE @@ -0,0 +1 @@ +This file is not installed but is not a A_pache license NOTICE file anyway. diff --git a/t/recipes/checks/debian/copyright/apache-notice/source-copyright-missing-notice-file-for-apache-license/eval/desc b/t/recipes/checks/debian/copyright/apache-notice/source-copyright-missing-notice-file-for-apache-license/eval/desc new file mode 100644 index 0000000..97324bb --- /dev/null +++ b/t/recipes/checks/debian/copyright/apache-notice/source-copyright-missing-notice-file-for-apache-license/eval/desc @@ -0,0 +1,2 @@ +Testname: source-copyright-missing-notice-file-for-apache-license +Check: debian/copyright/apache-notice diff --git a/t/recipes/checks/debian/copyright/apache-notice/source-copyright-missing-notice-file-for-apache-license/eval/hints b/t/recipes/checks/debian/copyright/apache-notice/source-copyright-missing-notice-file-for-apache-license/eval/hints new file mode 100644 index 0000000..0f6d607 --- /dev/null +++ b/t/recipes/checks/debian/copyright/apache-notice/source-copyright-missing-notice-file-for-apache-license/eval/hints @@ -0,0 +1,3 @@ +source-copyright-missing-notice-file-for-apache-license (source): missing-notice-file-for-apache-license [subdir/NOTICE] +source-copyright-missing-notice-file-for-apache-license (source): missing-notice-file-for-apache-license [NOTICE] +source-copyright-missing-notice-file-for-apache-license (source): missing-notice-file-for-apache-license [NOTICE.txt] diff --git a/t/recipes/checks/debian/copyright/copyright-file-doc-symlink/build-spec/debian/control.in b/t/recipes/checks/debian/copyright/copyright-file-doc-symlink/build-spec/debian/control.in new file mode 100644 index 0000000..324f170 --- /dev/null +++ b/t/recipes/checks/debian/copyright/copyright-file-doc-symlink/build-spec/debian/control.in @@ -0,0 +1,39 @@ +Source: [% $source %] +Priority: optional +Section: [% $section %] +Maintainer: [% $author %] +Standards-Version: [% $standards_version %] +Build-Depends: [% $build_depends %] +Rules-Requires-Root: no + +Package: [% $source %] +Architecture: [% $package_architecture %] +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: [% $description %] + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. + +Package: [% $source %]-helper +Architecture: [% $package_architecture %] +Depends: [% $source %] (= [% $version %]), ${shlibs:Depends}, ${misc:Depends} +Description: [% $description %] (symlink) + Helper package with a legitimate /usr/share/doc symlink. + . + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. + +Package: [% $source %]-weak +Architecture: [% $package_architecture %] +Depends: [% $source %], ${shlibs:Depends}, ${misc:Depends} +Description: [% $description %] (weak) + Helper package with a /usr/share/doc symlink but an insufficiently + strong dependency. Lintian intentionally doesn't diagnose this. + . + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. diff --git a/t/recipes/checks/debian/copyright/copyright-file-doc-symlink/build-spec/debian/rules b/t/recipes/checks/debian/copyright/copyright-file-doc-symlink/build-spec/debian/rules new file mode 100755 index 0000000..32f23a0 --- /dev/null +++ b/t/recipes/checks/debian/copyright/copyright-file-doc-symlink/build-spec/debian/rules @@ -0,0 +1,12 @@ +#!/usr/bin/make -f + +pkg := copyright-file-doc-symlink + +%: + dh $@ + +override_dh_prep: + mkdir -p debian/$(pkg)-helper/usr/share/doc + ln -s $(pkg) debian/$(pkg)-helper/usr/share/doc/$(pkg)-helper + mkdir -p debian/$(pkg)-weak/usr/share/doc + ln -s $(pkg) debian/$(pkg)-weak/usr/share/doc/$(pkg)-weak diff --git a/t/recipes/checks/debian/copyright/copyright-file-doc-symlink/build-spec/fill-values b/t/recipes/checks/debian/copyright/copyright-file-doc-symlink/build-spec/fill-values new file mode 100644 index 0000000..77a06bf --- /dev/null +++ b/t/recipes/checks/debian/copyright/copyright-file-doc-symlink/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: upload-native +Testname: copyright-file-doc-symlink +Description: Test a symlinked /usr/share/doc diff --git a/t/recipes/checks/debian/copyright/copyright-file-doc-symlink/eval/desc b/t/recipes/checks/debian/copyright/copyright-file-doc-symlink/eval/desc new file mode 100644 index 0000000..d56438f --- /dev/null +++ b/t/recipes/checks/debian/copyright/copyright-file-doc-symlink/eval/desc @@ -0,0 +1,3 @@ +Testname: copyright-file-doc-symlink +Test-Against: usr-share-doc-symlink-without-dependency +Check: debian/copyright diff --git a/t/recipes/checks/debian/copyright/copyright-file-doc-symlink/eval/hints b/t/recipes/checks/debian/copyright/copyright-file-doc-symlink/eval/hints new file mode 100644 index 0000000..e69de29 diff --git a/t/recipes/checks/debian/copyright/copyright-file-foreign-package/build-spec/DEBIAN/control.in b/t/recipes/checks/debian/copyright/copyright-file-foreign-package/build-spec/DEBIAN/control.in new file mode 100644 index 0000000..e70b359 --- /dev/null +++ b/t/recipes/checks/debian/copyright/copyright-file-foreign-package/build-spec/DEBIAN/control.in @@ -0,0 +1,12 @@ +Package: [% $source %] +Version: [% $version %] +Architecture: [% $package_architecture %] +Maintainer: [% $author %] +Section: [% $section %] +Priority: optional +Depends: other-package +Description: [% $description %] + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. diff --git a/t/recipes/checks/debian/copyright/copyright-file-foreign-package/build-spec/control-members b/t/recipes/checks/debian/copyright/copyright-file-foreign-package/build-spec/control-members new file mode 100644 index 0000000..4db28ac --- /dev/null +++ b/t/recipes/checks/debian/copyright/copyright-file-foreign-package/build-spec/control-members @@ -0,0 +1 @@ +control diff --git a/t/recipes/checks/debian/copyright/copyright-file-foreign-package/build-spec/fill-values b/t/recipes/checks/debian/copyright/copyright-file-foreign-package/build-spec/fill-values new file mode 100644 index 0000000..caef6c4 --- /dev/null +++ b/t/recipes/checks/debian/copyright/copyright-file-foreign-package/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: deb +Testname: copyright-file-foreign-package +Description: Test for foreign symlink in package diff --git a/t/recipes/checks/debian/copyright/copyright-file-foreign-package/build-spec/pre-control b/t/recipes/checks/debian/copyright/copyright-file-foreign-package/build-spec/pre-control new file mode 100755 index 0000000..0f99335 --- /dev/null +++ b/t/recipes/checks/debian/copyright/copyright-file-foreign-package/build-spec/pre-control @@ -0,0 +1,7 @@ +#!/bin/sh + +set -e + +builddir="$1" + +rm -f "$builddir/md5sums" diff --git a/t/recipes/checks/debian/copyright/copyright-file-foreign-package/build-spec/pre-data b/t/recipes/checks/debian/copyright/copyright-file-foreign-package/build-spec/pre-data new file mode 100755 index 0000000..5794ed0 --- /dev/null +++ b/t/recipes/checks/debian/copyright/copyright-file-foreign-package/build-spec/pre-data @@ -0,0 +1,13 @@ +#!/bin/sh + +set -e + +rootdir="$1" +name="$2" + +docdir="$rootdir/usr/share/doc" + +rm -rf "$docdir" + +mkdir -p "$docdir" +ln -sf other-package "$docdir/$name" diff --git a/t/recipes/checks/debian/copyright/copyright-file-foreign-package/eval/desc b/t/recipes/checks/debian/copyright/copyright-file-foreign-package/eval/desc new file mode 100644 index 0000000..1ad0379 --- /dev/null +++ b/t/recipes/checks/debian/copyright/copyright-file-foreign-package/eval/desc @@ -0,0 +1,2 @@ +Testname: copyright-file-foreign-package +Check: debian/copyright diff --git a/t/recipes/checks/debian/copyright/copyright-file-foreign-package/eval/hints b/t/recipes/checks/debian/copyright/copyright-file-foreign-package/eval/hints new file mode 100644 index 0000000..d4bd58a --- /dev/null +++ b/t/recipes/checks/debian/copyright/copyright-file-foreign-package/eval/hints @@ -0,0 +1 @@ +copyright-file-foreign-package (binary): cannot-check-whether-usr-share-doc-symlink-points-to-foreign-package diff --git a/t/recipes/checks/debian/copyright/copyright-file-general/build-spec/debian/control.in b/t/recipes/checks/debian/copyright/copyright-file-general/build-spec/debian/control.in new file mode 100644 index 0000000..d347ec7 --- /dev/null +++ b/t/recipes/checks/debian/copyright/copyright-file-general/build-spec/debian/control.in @@ -0,0 +1,243 @@ +Source: [% $source %] +Priority: optional +Section: [% $section %] +Maintainer: [% $author %] +Standards-Version: [% $standards_version %] +Build-Depends: [% $build_depends %] +Rules-Requires-Root: no + +Package: copyright-iso-8859-1 +Architecture: all +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: checks for non-utf-8-encodings + Tests non-UTF-8 encodings. + . + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. + +Package: copyright-full-gpl +Architecture: all +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: checks inclusion of GPL in full text + Tests the tag for including all of the GPL. + . + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. + +Package: copyright-full-lgpl +Architecture: all +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: checks inclusion of LGPL in full text + Tests the tag for including all of the LGPL. + . + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. + +Package: copyright-full-gfdl +Architecture: all +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: checks inclusion of GFDL in full text + Tests the tag for including all of the GFDL. + . + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. + +Package: copyright-full-apache-2 +Architecture: all +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: checks inclusion of Apache 2.0 in full text + Tests the tag for including all of the Apache 2.0 license. + . + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. + +Package: copyright-misc-errors +Architecture: all +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: checks various errors in copyright files + Tests various random errors in copyright files. + . + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. + +Package: copyright-symlink +Architecture: all +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: just use a symlink for the copyright file + Tests the check for a symlinked copyright file. + . + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. + +Package: copyright-compressed +Architecture: all +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: include a valid copyright file and compress it + Tests the check for a compressed copyright file. + . + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. + +Package: copyright-old-style +Architecture: all +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: use an old-style directory structure + Tests a copyright file using an old-style directory structure. + . + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. + +Package: copyright-full-gpl-1 +Architecture: all +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: checks inclusion of GPL1 + This should trigger errors as GPL1 is in the common license dir. + . + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. + +Package: copyright-full-gpl-2 +Architecture: all +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: checks inclusion of GPL2 + This should trigger errors as GPL2 is in the common license dir. + . + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. + +Package: copyright-php +Architecture: all +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: checks problematic PHP licenses + The PHP licenses are problematic for any software that isn't PHP. + . + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. + +Package: copyright-w3c +Architecture: all +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: checks inclusion of the W3C license + The W3C license text claims to be "GPL compatible", which shouldn't + trigger warnings. + . + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. + +Package: copyright-no-errors +Architecture: all +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: this should not emit any error + This copyright file should be fine. + . + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. + +Package: copyright-versionless +Architecture: all +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: checks a valid versionless GPL reference + Refers to the GPL and truly doesn't mention any version. + . + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. + +Package: copyright-missing-perl-license-pointer +Architecture: all +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: checks for perl packages not pointing to common-licenses + Packages under the "same terms as Perl itself" should reference a + license in common-licenses. + . + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. + +Package: copyright-missing-apache2-license-pointer +Architecture: all +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: checks for apache2 packages not pointing to common-licenses + Packages under the apache2-license should reference a + license in common-licenses. + . + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. + +Package: copyright-poor-common-licenses +Architecture: all +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: checks not referring to common licenses + Packages should refer to common licenses with full path if they + use a common license. + . + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. + +Package: copyright-crln +Architecture: all +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: check for Windows newlines + This package should trigger a tag for having Windows newlines in + the copyright file. + . + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. + +Package: copyright-full-agpl-3 +Architecture: all +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: checks inclusion of AGPL-3 in full text + This should not trigger a tag as AGPL-3 is not in common-licenses. + . + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. + +Package: copyright-old-fsf +Architecture: all +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: checks use of old FSF address + This should trigger a tag for using old FSF address. + . + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. diff --git a/t/recipes/checks/debian/copyright/copyright-file-general/build-spec/debian/copyright-crln.copyright b/t/recipes/checks/debian/copyright/copyright-file-general/build-spec/debian/copyright-crln.copyright new file mode 100644 index 0000000..43b49cf --- /dev/null +++ b/t/recipes/checks/debian/copyright/copyright-file-general/build-spec/debian/copyright-crln.copyright @@ -0,0 +1,36 @@ +This package was debianized by Tobias Toedter on +Thu, 20 Mar 2008 23:48:15 +0100 + +It was downloaded from + +Format-Specification: http://wiki.debian.org/Proposals/CopyrightFormat?recall=184 + +Upstream Authors: + + Tobias Toedter + +Copyright: + + Copyright (C) 2008 Tobias Toedter + +License: + + This package is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This package is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this package; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +On Debian systems, the complete text of the GNU General +Public License can be found in `/usr/share/common-licenses/GPL-2'. + +The Debian packaging is Copyright 2008, Tobias Toedter +and is licensed under the GPL, see above. diff --git a/t/recipes/checks/debian/copyright/copyright-file-general/build-spec/debian/copyright-full-agpl-3.copyright b/t/recipes/checks/debian/copyright/copyright-file-general/build-spec/debian/copyright-full-agpl-3.copyright new file mode 100644 index 0000000..dba13ed --- /dev/null +++ b/t/recipes/checks/debian/copyright/copyright-file-general/build-spec/debian/copyright-full-agpl-3.copyright @@ -0,0 +1,661 @@ + GNU AFFERO GENERAL PUBLIC LICENSE + Version 3, 19 November 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU Affero General Public License is a free, copyleft license for +software and other kinds of works, specifically designed to ensure +cooperation with the community in the case of network server software. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +our General Public Licenses are intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + Developers that use our General Public Licenses protect your rights +with two steps: (1) assert copyright on the software, and (2) offer +you this License which gives you legal permission to copy, distribute +and/or modify the software. + + A secondary benefit of defending all users' freedom is that +improvements made in alternate versions of the program, if they +receive widespread use, become available for other developers to +incorporate. Many developers of free software are heartened and +encouraged by the resulting cooperation. However, in the case of +software used on network servers, this result may fail to come about. +The GNU General Public License permits making a modified version and +letting the public access it on a server without ever releasing its +source code to the public. + + The GNU Affero General Public License is designed specifically to +ensure that, in such cases, the modified source code becomes available +to the community. It requires the operator of a network server to +provide the source code of the modified version running there to the +users of that server. Therefore, public use of a modified version, on +a publicly accessible server, gives the public access to the source +code of the modified version. + + An older license, called the Affero General Public License and +published by Affero, was designed to accomplish similar goals. This is +a different license, not a version of the Affero GPL, but Affero has +released a new version of the Affero GPL which permits relicensing under +this license. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU Affero General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Remote Network Interaction; Use with the GNU General Public License. + + Notwithstanding any other provision of this License, if you modify the +Program, your modified version must prominently offer all users +interacting with it remotely through a computer network (if your version +supports such interaction) an opportunity to receive the Corresponding +Source of your version by providing access to the Corresponding Source +from a network server at no charge, through some standard or customary +means of facilitating copying of software. This Corresponding Source +shall include the Corresponding Source for any work covered by version 3 +of the GNU General Public License that is incorporated pursuant to the +following paragraph. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the work with which it is combined will remain governed by version +3 of the GNU General Public License. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU Affero General Public License from time to time. Such new versions +will be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU Affero General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU Affero General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU Affero General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . + +Also add information on how to contact you by electronic and paper mail. + + If your software can interact with users remotely through a computer +network, you should also make sure that it provides a way for users to +get its source. For example, if your program is a web application, its +interface could display a "Source" link that leads users to an archive +of the code. There are many ways you could offer source, and different +solutions will be better for different programs; see section 13 for the +specific requirements. + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU AGPL, see +. diff --git a/t/recipes/checks/debian/copyright/copyright-file-general/build-spec/debian/copyright-full-apache-2.copyright b/t/recipes/checks/debian/copyright/copyright-file-general/build-spec/debian/copyright-full-apache-2.copyright new file mode 100644 index 0000000..d645695 --- /dev/null +++ b/t/recipes/checks/debian/copyright/copyright-file-general/build-spec/debian/copyright-full-apache-2.copyright @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/t/recipes/checks/debian/copyright/copyright-file-general/build-spec/debian/copyright-full-gfdl.copyright b/t/recipes/checks/debian/copyright/copyright-file-general/build-spec/debian/copyright-full-gfdl.copyright new file mode 100644 index 0000000..4a0fe1c --- /dev/null +++ b/t/recipes/checks/debian/copyright/copyright-file-general/build-spec/debian/copyright-full-gfdl.copyright @@ -0,0 +1,397 @@ + GNU Free Documentation License + Version 1.2, November 2002 + + + Copyright (C) 2000,2001,2002 Free Software Foundation, Inc. + 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + +0. PREAMBLE + +The purpose of this License is to make a manual, textbook, or other +functional and useful document "free" in the sense of freedom: to +assure everyone the effective freedom to copy and redistribute it, +with or without modifying it, either commercially or noncommercially. +Secondarily, this License preserves for the author and publisher a way +to get credit for their work, while not being considered responsible +for modifications made by others. + +This License is a kind of "copyleft", which means that derivative +works of the document must themselves be free in the same sense. It +complements the GNU General Public License, which is a copyleft +license designed for free software. + +We have designed this License in order to use it for manuals for free +software, because free software needs free documentation: a free +program should come with manuals providing the same freedoms that the +software does. But this License is not limited to software manuals; +it can be used for any textual work, regardless of subject matter or +whether it is published as a printed book. We recommend this License +principally for works whose purpose is instruction or reference. + + +1. APPLICABILITY AND DEFINITIONS + +This License applies to any manual or other work, in any medium, that +contains a notice placed by the copyright holder saying it can be +distributed under the terms of this License. Such a notice grants a +world-wide, royalty-free license, unlimited in duration, to use that +work under the conditions stated herein. The "Document", below, +refers to any such manual or work. Any member of the public is a +licensee, and is addressed as "you". You accept the license if you +copy, modify or distribute the work in a way requiring permission +under copyright law. + +A "Modified Version" of the Document means any work containing the +Document or a portion of it, either copied verbatim, or with +modifications and/or translated into another language. + +A "Secondary Section" is a named appendix or a front-matter section of +the Document that deals exclusively with the relationship of the +publishers or authors of the Document to the Document's overall subject +(or to related matters) and contains nothing that could fall directly +within that overall subject. (Thus, if the Document is in part a +textbook of mathematics, a Secondary Section may not explain any +mathematics.) The relationship could be a matter of historical +connection with the subject or with related matters, or of legal, +commercial, philosophical, ethical or political position regarding +them. + +The "Invariant Sections" are certain Secondary Sections whose titles +are designated, as being those of Invariant Sections, in the notice +that says that the Document is released under this License. If a +section does not fit the above definition of Secondary then it is not +allowed to be designated as Invariant. The Document may contain zero +Invariant Sections. If the Document does not identify any Invariant +Sections then there are none. + +The "Cover Texts" are certain short passages of text that are listed, +as Front-Cover Texts or Back-Cover Texts, in the notice that says that +the Document is released under this License. A Front-Cover Text may +be at most 5 words, and a Back-Cover Text may be at most 25 words. + +A "Transparent" copy of the Document means a machine-readable copy, +represented in a format whose specification is available to the +general public, that is suitable for revising the document +straightforwardly with generic text editors or (for images composed of +pixels) generic paint programs or (for drawings) some widely available +drawing editor, and that is suitable for input to text formatters or +for automatic translation to a variety of formats suitable for input +to text formatters. A copy made in an otherwise Transparent file +format whose markup, or absence of markup, has been arranged to thwart +or discourage subsequent modification by readers is not Transparent. +An image format is not Transparent if used for any substantial amount +of text. A copy that is not "Transparent" is called "Opaque". + +Examples of suitable formats for Transparent copies include plain +ASCII without markup, Texinfo input format, LaTeX input format, SGML +or XML using a publicly available DTD, and standard-conforming simple +HTML, PostScript or PDF designed for human modification. Examples of +transparent image formats include PNG, XCF and JPG. Opaque formats +include proprietary formats that can be read and edited only by +proprietary word processors, SGML or XML for which the DTD and/or +processing tools are not generally available, and the +machine-generated HTML, PostScript or PDF produced by some word +processors for output purposes only. + +The "Title Page" means, for a printed book, the title page itself, +plus such following pages as are needed to hold, legibly, the material +this License requires to appear in the title page. For works in +formats which do not have any title page as such, "Title Page" means +the text near the most prominent appearance of the work's title, +preceding the beginning of the body of the text. + +A section "Entitled XYZ" means a named subunit of the Document whose +title either is precisely XYZ or contains XYZ in parentheses following +text that translates XYZ in another language. (Here XYZ stands for a +specific section name mentioned below, such as "Acknowledgements", +"Dedications", "Endorsements", or "History".) To "Preserve the Title" +of such a section when you modify the Document means that it remains a +section "Entitled XYZ" according to this definition. + +The Document may include Warranty Disclaimers next to the notice which +states that this License applies to the Document. These Warranty +Disclaimers are considered to be included by reference in this +License, but only as regards disclaiming warranties: any other +implication that these Warranty Disclaimers may have is void and has +no effect on the meaning of this License. + + +2. VERBATIM COPYING + +You may copy and distribute the Document in any medium, either +commercially or noncommercially, provided that this License, the +copyright notices, and the license notice saying this License applies +to the Document are reproduced in all copies, and that you add no other +conditions whatsoever to those of this License. You may not use +technical measures to obstruct or control the reading or further +copying of the copies you make or distribute. However, you may accept +compensation in exchange for copies. If you distribute a large enough +number of copies you must also follow the conditions in section 3. + +You may also lend copies, under the same conditions stated above, and +you may publicly display copies. + + +3. COPYING IN QUANTITY + +If you publish printed copies (or copies in media that commonly have +printed covers) of the Document, numbering more than 100, and the +Document's license notice requires Cover Texts, you must enclose the +copies in covers that carry, clearly and legibly, all these Cover +Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on +the back cover. Both covers must also clearly and legibly identify +you as the publisher of these copies. The front cover must present +the full title with all words of the title equally prominent and +visible. You may add other material on the covers in addition. +Copying with changes limited to the covers, as long as they preserve +the title of the Document and satisfy these conditions, can be treated +as verbatim copying in other respects. + +If the required texts for either cover are too voluminous to fit +legibly, you should put the first ones listed (as many as fit +reasonably) on the actual cover, and continue the rest onto adjacent +pages. + +If you publish or distribute Opaque copies of the Document numbering +more than 100, you must either include a machine-readable Transparent +copy along with each Opaque copy, or state in or with each Opaque copy +a computer-network location from which the general network-using +public has access to download using public-standard network protocols +a complete Transparent copy of the Document, free of added material. +If you use the latter option, you must take reasonably prudent steps, +when you begin distribution of Opaque copies in quantity, to ensure +that this Transparent copy will remain thus accessible at the stated +location until at least one year after the last time you distribute an +Opaque copy (directly or through your agents or retailers) of that +edition to the public. + +It is requested, but not required, that you contact the authors of the +Document well before redistributing any large number of copies, to give +them a chance to provide you with an updated version of the Document. + + +4. MODIFICATIONS + +You may copy and distribute a Modified Version of the Document under +the conditions of sections 2 and 3 above, provided that you release +the Modified Version under precisely this License, with the Modified +Version filling the role of the Document, thus licensing distribution +and modification of the Modified Version to whoever possesses a copy +of it. In addition, you must do these things in the Modified Version: + +A. Use in the Title Page (and on the covers, if any) a title distinct + from that of the Document, and from those of previous versions + (which should, if there were any, be listed in the History section + of the Document). You may use the same title as a previous version + if the original publisher of that version gives permission. +B. List on the Title Page, as authors, one or more persons or entities + responsible for authorship of the modifications in the Modified + Version, together with at least five of the principal authors of the + Document (all of its principal authors, if it has fewer than five), + unless they release you from this requirement. +C. State on the Title page the name of the publisher of the + Modified Version, as the publisher. +D. Preserve all the copyright notices of the Document. +E. Add an appropriate copyright notice for your modifications + adjacent to the other copyright notices. +F. Include, immediately after the copyright notices, a license notice + giving the public permission to use the Modified Version under the + terms of this License, in the form shown in the Addendum below. +G. Preserve in that license notice the full lists of Invariant Sections + and required Cover Texts given in the Document's license notice. +H. Include an unaltered copy of this License. +I. Preserve the section Entitled "History", Preserve its Title, and add + to it an item stating at least the title, year, new authors, and + publisher of the Modified Version as given on the Title Page. If + there is no section Entitled "History" in the Document, create one + stating the title, year, authors, and publisher of the Document as + given on its Title Page, then add an item describing the Modified + Version as stated in the previous sentence. +J. Preserve the network location, if any, given in the Document for + public access to a Transparent copy of the Document, and likewise + the network locations given in the Document for previous versions + it was based on. These may be placed in the "History" section. + You may omit a network location for a work that was published at + least four years before the Document itself, or if the original + publisher of the version it refers to gives permission. +K. For any section Entitled "Acknowledgements" or "Dedications", + Preserve the Title of the section, and preserve in the section all + the substance and tone of each of the contributor acknowledgements + and/or dedications given therein. +L. Preserve all the Invariant Sections of the Document, + unaltered in their text and in their titles. Section numbers + or the equivalent are not considered part of the section titles. +M. Delete any section Entitled "Endorsements". Such a section + may not be included in the Modified Version. +N. Do not retitle any existing section to be Entitled "Endorsements" + or to conflict in title with any Invariant Section. +O. Preserve any Warranty Disclaimers. + +If the Modified Version includes new front-matter sections or +appendices that qualify as Secondary Sections and contain no material +copied from the Document, you may at your option designate some or all +of these sections as invariant. To do this, add their titles to the +list of Invariant Sections in the Modified Version's license notice. +These titles must be distinct from any other section titles. + +You may add a section Entitled "Endorsements", provided it contains +nothing but endorsements of your Modified Version by various +parties--for example, statements of peer review or that the text has +been approved by an organization as the authoritative definition of a +standard. + +You may add a passage of up to five words as a Front-Cover Text, and a +passage of up to 25 words as a Back-Cover Text, to the end of the list +of Cover Texts in the Modified Version. Only one passage of +Front-Cover Text and one of Back-Cover Text may be added by (or +through arrangements made by) any one entity. If the Document already +includes a cover text for the same cover, previously added by you or +by arrangement made by the same entity you are acting on behalf of, +you may not add another; but you may replace the old one, on explicit +permission from the previous publisher that added the old one. + +The author(s) and publisher(s) of the Document do not by this License +give permission to use their names for publicity for or to assert or +imply endorsement of any Modified Version. + + +5. COMBINING DOCUMENTS + +You may combine the Document with other documents released under this +License, under the terms defined in section 4 above for modified +versions, provided that you include in the combination all of the +Invariant Sections of all of the original documents, unmodified, and +list them all as Invariant Sections of your combined work in its +license notice, and that you preserve all their Warranty Disclaimers. + +The combined work need only contain one copy of this License, and +multiple identical Invariant Sections may be replaced with a single +copy. If there are multiple Invariant Sections with the same name but +different contents, make the title of each such section unique by +adding at the end of it, in parentheses, the name of the original +author or publisher of that section if known, or else a unique number. +Make the same adjustment to the section titles in the list of +Invariant Sections in the license notice of the combined work. + +In the combination, you must combine any sections Entitled "History" +in the various original documents, forming one section Entitled +"History"; likewise combine any sections Entitled "Acknowledgements", +and any sections Entitled "Dedications". You must delete all sections +Entitled "Endorsements". + + +6. COLLECTIONS OF DOCUMENTS + +You may make a collection consisting of the Document and other documents +released under this License, and replace the individual copies of this +License in the various documents with a single copy that is included in +the collection, provided that you follow the rules of this License for +verbatim copying of each of the documents in all other respects. + +You may extract a single document from such a collection, and distribute +it individually under this License, provided you insert a copy of this +License into the extracted document, and follow this License in all +other respects regarding verbatim copying of that document. + + +7. AGGREGATION WITH INDEPENDENT WORKS + +A compilation of the Document or its derivatives with other separate +and independent documents or works, in or on a volume of a storage or +distribution medium, is called an "aggregate" if the copyright +resulting from the compilation is not used to limit the legal rights +of the compilation's users beyond what the individual works permit. +When the Document is included in an aggregate, this License does not +apply to the other works in the aggregate which are not themselves +derivative works of the Document. + +If the Cover Text requirement of section 3 is applicable to these +copies of the Document, then if the Document is less than one half of +the entire aggregate, the Document's Cover Texts may be placed on +covers that bracket the Document within the aggregate, or the +electronic equivalent of covers if the Document is in electronic form. +Otherwise they must appear on printed covers that bracket the whole +aggregate. + + +8. TRANSLATION + +Translation is considered a kind of modification, so you may +distribute translations of the Document under the terms of section 4. +Replacing Invariant Sections with translations requires special +permission from their copyright holders, but you may include +translations of some or all Invariant Sections in addition to the +original versions of these Invariant Sections. You may include a +translation of this License, and all the license notices in the +Document, and any Warranty Disclaimers, provided that you also include +the original English version of this License and the original versions +of those notices and disclaimers. In case of a disagreement between +the translation and the original version of this License or a notice +or disclaimer, the original version will prevail. + +If a section in the Document is Entitled "Acknowledgements", +"Dedications", or "History", the requirement (section 4) to Preserve +its Title (section 1) will typically require changing the actual +title. + + +9. TERMINATION + +You may not copy, modify, sublicense, or distribute the Document except +as expressly provided for under this License. Any other attempt to +copy, modify, sublicense or distribute the Document is void, and will +automatically terminate your rights under this License. However, +parties who have received copies, or rights, from you under this +License will not have their licenses terminated so long as such +parties remain in full compliance. + + +10. FUTURE REVISIONS OF THIS LICENSE + +The Free Software Foundation may publish new, revised versions +of the GNU Free Documentation License from time to time. Such new +versions will be similar in spirit to the present version, but may +differ in detail to address new problems or concerns. See +http://www.gnu.org/copyleft/. + +Each version of the License is given a distinguishing version number. +If the Document specifies that a particular numbered version of this +License "or any later version" applies to it, you have the option of +following the terms and conditions either of that specified version or +of any later version that has been published (not as a draft) by the +Free Software Foundation. If the Document does not specify a version +number of this License, you may choose any version ever published (not +as a draft) by the Free Software Foundation. + + +ADDENDUM: How to use this License for your documents + +To use this License in a document you have written, include a copy of +the License in the document and put the following copyright and +license notices just after the title page: + + Copyright (c) YEAR YOUR NAME. + Permission is granted to copy, distribute and/or modify this document + under the terms of the GNU Free Documentation License, Version 1.2 + or any later version published by the Free Software Foundation; + with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. + A copy of the license is included in the section entitled "GNU + Free Documentation License". + +If you have Invariant Sections, Front-Cover Texts and Back-Cover Texts, +replace the "with...Texts." line with this: + + with the Invariant Sections being LIST THEIR TITLES, with the + Front-Cover Texts being LIST, and with the Back-Cover Texts being LIST. + +If you have Invariant Sections without Cover Texts, or some other +combination of the three, merge those two alternatives to suit the +situation. + +If your document contains nontrivial examples of program code, we +recommend releasing these examples in parallel under your choice of +free software license, such as the GNU General Public License, +to permit their use in free software. diff --git a/t/recipes/checks/debian/copyright/copyright-file-general/build-spec/debian/copyright-full-gpl-1.copyright b/t/recipes/checks/debian/copyright/copyright-file-general/build-spec/debian/copyright-full-gpl-1.copyright new file mode 100644 index 0000000..1facebe --- /dev/null +++ b/t/recipes/checks/debian/copyright/copyright-file-general/build-spec/debian/copyright-full-gpl-1.copyright @@ -0,0 +1,206 @@ +A copy of the GNU General Public License is available on +the World Wide Web at `http://www.gnu.org/licenses/old-licenses/gpl-1.0.txt'. You can +also obtain it by writing to the Free Software Foundation, Inc., 51 +Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + THE COPYRIGHT HOLDER DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, + INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO + EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY SPECIAL, INDIRECT OR + CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, + DATA, PROFITS, QPA OR GPA, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE + OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR + PERFORMANCE OF THIS SOFTWARE. + + + GNU GENERAL PUBLIC LICENSE + Version 1, February 1989 + + Copyright (C) 1989 Free Software Foundation, Inc. + 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The license agreements of most software companies try to keep users +at the mercy of those companies. By contrast, our General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. The +General Public License applies to the Free Software Foundation's +software and to any other program whose authors commit to using it. +You can use it for your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Specifically, the General Public License is designed to make +sure that you have the freedom to give away or sell copies of free +software, that you receive source code or can get it if you want it, +that you can change the software or use pieces of it in new free +programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of a such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must tell them their rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License Agreement applies to any program or other work which +contains a notice placed by the copyright holder saying it may be +distributed under the terms of this General Public License. The +"Program", below, refers to any such program or work, and a "work based +on the Program" means either the Program or any work containing the +Program or a portion of it, either verbatim or with modifications. Each +licensee is addressed as "you". + + 1. You may copy and distribute verbatim copies of the Program's source +code as you receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice and +disclaimer of warranty; keep intact all the notices that refer to this +General Public License and to the absence of any warranty; and give any +other recipients of the Program a copy of this General Public License +along with the Program. You may charge a fee for the physical act of +transferring a copy. + + 2. You may modify your copy or copies of the Program or any portion of +it, and copy and distribute such modifications under the terms of Paragraph +1 above, provided that you also do the following: + + a) cause the modified files to carry prominent notices stating that + you changed the files and the date of any change; and + + b) cause the whole of any work that you distribute or publish, that + in whole or in part contains the Program or any part thereof, either + with or without modifications, to be licensed at no charge to all + third parties under the terms of this General Public License (except + that you may choose to grant warranty protection to some or all + third parties, at your option). + + c) If the modified program normally reads commands interactively when + run, you must cause it, when started running for such interactive use + in the simplest and most usual way, to print or display an + announcement including an appropriate copyright notice and a notice + that there is no warranty (or else, saying that you provide a + warranty) and that users may redistribute the program under these + conditions, and telling the user how to view a copy of this General + Public License. + + d) You may charge a fee for the physical act of transferring a + copy, and you may at your option offer warranty protection in + exchange for a fee. + +Mere aggregation of another independent work with the Program (or its +derivative) on a volume of a storage or distribution medium does not bring +the other work under the scope of these terms. + + 3. You may copy and distribute the Program (or a portion or derivative of +it, under Paragraph 2) in object code or executable form under the terms of +Paragraphs 1 and 2 above provided that you also do one of the following: + + a) accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of + Paragraphs 1 and 2 above; or, + + b) accompany it with a written offer, valid for at least three + years, to give any third party free (except for a nominal charge + for the cost of distribution) a complete machine-readable copy of the + corresponding source code, to be distributed under the terms of + Paragraphs 1 and 2 above; or, + + c) accompany it with the information you received as to where the + corresponding source code may be obtained. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form alone.) + +Source code for a work means the preferred form of the work for making +modifications to it. For an executable file, complete source code means +all the source code for all modules it contains; but, as a special +exception, it need not include source code for modules which are standard +libraries that accompany the operating system on which the executable +file runs, or for standard header files or definitions files that +accompany that operating system. + + 4. You may not copy, modify, sublicense, distribute or transfer the +Program except as expressly provided under this General Public License. +Any attempt otherwise to copy, modify, sublicense, distribute or transfer +the Program is void, and will automatically terminate your rights to use +the Program under this License. However, parties who have received +copies, or rights to use copies, from you under this General Public +License will not have their licenses terminated so long as such parties +remain in full compliance. + + 5. By copying, distributing or modifying the Program (or any work based +on the Program) you indicate your acceptance of this license to do so, +and all its terms and conditions. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the original +licensor to copy, distribute or modify the Program subject to these +terms and conditions. You may not impose any further restrictions on the +recipients' exercise of the rights granted herein. + + 7. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of the license which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +the license, you may choose any version ever published by the Free Software +Foundation. + + 8. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 9. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 10. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + diff --git a/t/recipes/checks/debian/copyright/copyright-file-general/build-spec/debian/copyright-full-gpl-2.copyright b/t/recipes/checks/debian/copyright/copyright-file-general/build-spec/debian/copyright-full-gpl-2.copyright new file mode 100644 index 0000000..f94bb0d --- /dev/null +++ b/t/recipes/checks/debian/copyright/copyright-file-general/build-spec/debian/copyright-full-gpl-2.copyright @@ -0,0 +1,344 @@ +A copy of the GNU General Public License is available on +the World Wide Web at `http://www.gnu.org/licenses/gpl-2.0.txt'. You can +also obtain it by writing to the Free Software Foundation, Inc., 51 +Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Lesser General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + , 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. diff --git a/t/recipes/checks/debian/copyright/copyright-file-general/build-spec/debian/copyright-full-gpl.copyright b/t/recipes/checks/debian/copyright/copyright-file-general/build-spec/debian/copyright-full-gpl.copyright new file mode 100644 index 0000000..94a9ed0 --- /dev/null +++ b/t/recipes/checks/debian/copyright/copyright-file-general/build-spec/debian/copyright-full-gpl.copyright @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + Copyright (C) + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +. + + The GNU General Public License does not permit incorporating your program +into proprietary programs. If your program is a subroutine library, you +may consider it more useful to permit linking proprietary applications with +the library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. But first, please read +. diff --git a/t/recipes/checks/debian/copyright/copyright-file-general/build-spec/debian/copyright-full-lgpl.copyright b/t/recipes/checks/debian/copyright/copyright-file-general/build-spec/debian/copyright-full-lgpl.copyright new file mode 100644 index 0000000..5dabe34 --- /dev/null +++ b/t/recipes/checks/debian/copyright/copyright-file-general/build-spec/debian/copyright-full-lgpl.copyright @@ -0,0 +1,171 @@ +A copy of the GNU Lesser General Public License is available on +the World Wide Web at `http://www.gnu.org/licenses/lgpl-3.0.txt'. You can +also obtain it by writing to the Free Software Foundation, Inc., 51 +Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + + GNU LESSER GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + + This version of the GNU Lesser General Public License incorporates +the terms and conditions of version 3 of the GNU General Public +License, supplemented by the additional permissions listed below. + + 0. Additional Definitions. + + As used herein, "this License" refers to version 3 of the GNU Lesser +General Public License, and the "GNU GPL" refers to version 3 of the GNU +General Public License. + + "The Library" refers to a covered work governed by this License, +other than an Application or a Combined Work as defined below. + + An "Application" is any work that makes use of an interface provided +by the Library, but which is not otherwise based on the Library. +Defining a subclass of a class defined by the Library is deemed a mode +of using an interface provided by the Library. + + A "Combined Work" is a work produced by combining or linking an +Application with the Library. The particular version of the Library +with which the Combined Work was made is also called the "Linked +Version". + + The "Minimal Corresponding Source" for a Combined Work means the +Corresponding Source for the Combined Work, excluding any source code +for portions of the Combined Work that, considered in isolation, are +based on the Application, and not on the Linked Version. + + The "Corresponding Application Code" for a Combined Work means the +object code and/or source code for the Application, including any data +and utility programs needed for reproducing the Combined Work from the +Application, but excluding the System Libraries of the Combined Work. + + 1. Exception to Section 3 of the GNU GPL. + + You may convey a covered work under sections 3 and 4 of this License +without being bound by section 3 of the GNU GPL. + + 2. Conveying Modified Versions. + + If you modify a copy of the Library, and, in your modifications, a +facility refers to a function or data to be supplied by an Application +that uses the facility (other than as an argument passed when the +facility is invoked), then you may convey a copy of the modified +version: + + a) under this License, provided that you make a good faith effort to + ensure that, in the event an Application does not supply the + function or data, the facility still operates, and performs + whatever part of its purpose remains meaningful, or + + b) under the GNU GPL, with none of the additional permissions of + this License applicable to that copy. + + 3. Object Code Incorporating Material from Library Header Files. + + The object code form of an Application may incorporate material from +a header file that is part of the Library. You may convey such object +code under terms of your choice, provided that, if the incorporated +material is not limited to numerical parameters, data structure +layouts and accessors, or small macros, inline functions and templates +(ten or fewer lines in length), you do both of the following: + + a) Give prominent notice with each copy of the object code that the + Library is used in it and that the Library and its use are + covered by this License. + + b) Accompany the object code with a copy of the GNU GPL and this license + document. + + 4. Combined Works. + + You may convey a Combined Work under terms of your choice that, +taken together, effectively do not restrict modification of the +portions of the Library contained in the Combined Work and reverse +engineering for debugging such modifications, if you also do each of +the following: + + a) Give prominent notice with each copy of the Combined Work that + the Library is used in it and that the Library and its use are + covered by this License. + + b) Accompany the Combined Work with a copy of the GNU GPL and this license + document. + + c) For a Combined Work that displays copyright notices during + execution, include the copyright notice for the Library among + these notices, as well as a reference directing the user to the + copies of the GNU GPL and this license document. + + d) Do one of the following: + + 0) Convey the Minimal Corresponding Source under the terms of this + License, and the Corresponding Application Code in a form + suitable for, and under terms that permit, the user to + recombine or relink the Application with a modified version of + the Linked Version to produce a modified Combined Work, in the + manner specified by section 6 of the GNU GPL for conveying + Corresponding Source. + + 1) Use a suitable shared library mechanism for linking with the + Library. A suitable mechanism is one that (a) uses at run time + a copy of the Library already present on the user's computer + system, and (b) will operate properly with a modified version + of the Library that is interface-compatible with the Linked + Version. + + e) Provide Installation Information, but only if you would otherwise + be required to provide such information under section 6 of the + GNU GPL, and only to the extent that such information is + necessary to install and execute a modified version of the + Combined Work produced by recombining or relinking the + Application with a modified version of the Linked Version. (If + you use option 4d0, the Installation Information must accompany + the Minimal Corresponding Source and Corresponding Application + Code. If you use option 4d1, you must provide the Installation + Information in the manner specified by section 6 of the GNU GPL + for conveying Corresponding Source.) + + 5. Combined Libraries. + + You may place library facilities that are a work based on the +Library side by side in a single library together with other library +facilities that are not Applications and are not covered by this +License, and convey such a combined library under terms of your +choice, if you do both of the following: + + a) Accompany the combined library with a copy of the same work based + on the Library, uncombined with any other library facilities, + conveyed under the terms of this License. + + b) Give prominent notice with the combined library that part of it + is a work based on the Library, and explaining where to find the + accompanying uncombined form of the same work. + + 6. Revised Versions of the GNU Lesser General Public License. + + The Free Software Foundation may publish revised and/or new versions +of the GNU Lesser General Public License from time to time. Such new +versions will be similar in spirit to the present version, but may +differ in detail to address new problems or concerns. + + Each version is given a distinguishing version number. If the +Library as you received it specifies that a certain numbered version +of the GNU Lesser General Public License "or any later version" +applies to it, you have the option of following the terms and +conditions either of that published version or of any later version +published by the Free Software Foundation. If the Library as you +received it does not specify a version number of the GNU Lesser +General Public License, you may choose any version of the GNU Lesser +General Public License ever published by the Free Software Foundation. + + If the Library as you received it specifies that a proxy can decide +whether future versions of the GNU Lesser General Public License shall +apply, that proxy's public statement of acceptance of any version is +permanent authorization for you to choose that version for the +Library. diff --git a/t/recipes/checks/debian/copyright/copyright-file-general/build-spec/debian/copyright-iso-8859-1.copyright b/t/recipes/checks/debian/copyright/copyright-file-general/build-spec/debian/copyright-iso-8859-1.copyright new file mode 100644 index 0000000..78a493a --- /dev/null +++ b/t/recipes/checks/debian/copyright/copyright-file-general/build-spec/debian/copyright-iso-8859-1.copyright @@ -0,0 +1,3 @@ +Copyright (C) 2008 Author + +uerst rgerlich, falls nicht UTF-8 benutzt wrde. diff --git a/t/recipes/checks/debian/copyright/copyright-file-general/build-spec/debian/copyright-misc-errors.copyright b/t/recipes/checks/debian/copyright/copyright-file-general/build-spec/debian/copyright-misc-errors.copyright new file mode 100644 index 0000000..dceee0e --- /dev/null +++ b/t/recipes/checks/debian/copyright/copyright-file-general/build-spec/debian/copyright-misc-errors.copyright @@ -0,0 +1,22 @@ +This copyright file contains several errors. + +Downloaded from + +You should not use the template for +Upstream Author(s): Tobias +Copyright 2008 Tobias + +The path /usr/share/common-licences/GPL contains a spelling error. + +It's wrong to reference a compressed license, like this: +/usr/share/common-licenses/BSD.gz + +This path /usr/share/doc/copyright is obsolete. + +The path /usr/share/common-licenses/GPL2 is missing a hyphen. + +This copyright info was automatically extracted from the perl module. +It may not be accurate, so you better check the module sources +if you don't want to get into legal troubles. + +References to /usr/share/common-licenses/BSD are deprecated. diff --git a/t/recipes/checks/debian/copyright/copyright-file-general/build-spec/debian/copyright-missing-apache2-license-pointer.copyright b/t/recipes/checks/debian/copyright/copyright-file-general/build-spec/debian/copyright-missing-apache2-license-pointer.copyright new file mode 100644 index 0000000..e71e0f0 --- /dev/null +++ b/t/recipes/checks/debian/copyright/copyright-file-general/build-spec/debian/copyright-missing-apache2-license-pointer.copyright @@ -0,0 +1,25 @@ +Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Upstream-Name: Midnight Commander +Source: http://www.midnight-commander.org/downloads +Copyright: 1996-2013 Free Software Foundation +License: Apache-2.0 + +Files: * +Copyright: 2004,2007 Oren Ben-Kiki +License: Apache-2.0 + +License: Apache-2.0 + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with + the License. You may obtain a copy of the License at + . + http://www.apache.org/licenses/LICENSE-2.0 + . + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/t/recipes/checks/debian/copyright/copyright-file-general/build-spec/debian/copyright-missing-perl-license-pointer.copyright b/t/recipes/checks/debian/copyright/copyright-file-general/build-spec/debian/copyright-missing-perl-license-pointer.copyright new file mode 100644 index 0000000..97f8cda --- /dev/null +++ b/t/recipes/checks/debian/copyright/copyright-file-general/build-spec/debian/copyright-missing-perl-license-pointer.copyright @@ -0,0 +1,5 @@ +This copyright file is for libmythical-perl. The module is licenses under +the same terms as Perl itself but we've forgotten to add a reference to the +copy of the Perl license in common-licenses. + +Copyright 2010 The Mythical Perl Module Team diff --git a/t/recipes/checks/debian/copyright/copyright-file-general/build-spec/debian/copyright-no-errors.copyright b/t/recipes/checks/debian/copyright/copyright-file-general/build-spec/debian/copyright-no-errors.copyright new file mode 100644 index 0000000..d31a720 --- /dev/null +++ b/t/recipes/checks/debian/copyright/copyright-file-general/build-spec/debian/copyright-no-errors.copyright @@ -0,0 +1,36 @@ +This package was debianized by Tobias Toedter on +Thu, 20 Mar 2008 23:48:15 +0100 + +It was downloaded from + +Format-Specification: http://wiki.debian.org/Proposals/CopyrightFormat?recall=184 + +Upstream Authors: + + Tobias Toedter + +Copyright: + + Copyright (C) 2008 Tobias Toedter + +License: + + This package is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This package is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this package; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +On Debian systems, the complete text of the GNU General +Public License can be found in `/usr/share/common-licenses/GPL-2'. + +The Debian packaging is Copyright 2008, Tobias Toedter +and is licensed under the GPL, see above. diff --git a/t/recipes/checks/debian/copyright/copyright-file-general/build-spec/debian/copyright-old-fsf.copyright b/t/recipes/checks/debian/copyright/copyright-file-general/build-spec/debian/copyright-old-fsf.copyright new file mode 100644 index 0000000..00946fc --- /dev/null +++ b/t/recipes/checks/debian/copyright/copyright-file-general/build-spec/debian/copyright-old-fsf.copyright @@ -0,0 +1,19 @@ +To the extend this is copyrightable (if at all), it is: + Copyright 2012 Niels Thykier . + +This program is free software; you may redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +This is distributed in the hope that it will be useful, but without +any warranty; without even the implied warranty of merchantability or +fitness for a particular purpose. See the GNU General Public License +for more details. + +A copy of the GNU General Public License version 2 is available as +/usr/share/common-licenses/GPL-2 in the Debian GNU/Linux distribution +or at http://www.gnu.org/licenses/old-licenses/gpl-2.0.html. +You can also obtain it by writing to the Free Software Foundation, Inc., +Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + diff --git a/t/recipes/checks/debian/copyright/copyright-file-general/build-spec/debian/copyright-php.copyright b/t/recipes/checks/debian/copyright/copyright-file-general/build-spec/debian/copyright-php.copyright new file mode 100644 index 0000000..338cf09 --- /dev/null +++ b/t/recipes/checks/debian/copyright/copyright-file-general/build-spec/debian/copyright-php.copyright @@ -0,0 +1,151 @@ +A copyright file referring to two problematic PHP licenses. + +Copyright 2008 Some Guy. + +-------------------------------------------------------------------- + The PHP License, version 2.02 +Copyright (c) 1999 - 2002 The PHP Group. All rights reserved. +-------------------------------------------------------------------- + +Redistribution and use in source and binary forms, with or without +modification, is permitted provided that the following conditions +are met: + + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + + 3. The name "PHP" must not be used to endorse or promote products + derived from this software without prior permission from the + PHP Group. This does not apply to add-on libraries or tools + that work in conjunction with PHP. In such a case the PHP + name may be used to indicate that the product supports PHP. + + 4. The PHP Group may publish revised and/or new versions of the + license from time to time. Each version will be given a + distinguishing version number. + Once covered code has been published under a particular version + of the license, you may always continue to use it under the + terms of that version. You may also choose to use such covered + code under the terms of any subsequent version of the license + published by the PHP Group. No one other than the PHP Group has + the right to modify the terms applicable to covered code created + under this License. + + 5. Redistributions of any form whatsoever must retain the following + acknowledgment: + "This product includes PHP, freely available from + http://www.php.net/". + + 6. The software incorporates the Zend Engine, a product of Zend + Technologies, Ltd. ("Zend"). The Zend Engine is licensed to the + PHP Association (pursuant to a grant from Zend that can be + found at http://www.php.net/license/ZendGrant/) for + distribution to you under this license agreement, only as a + part of PHP. In the event that you separate the Zend Engine + (or any portion thereof) from the rest of the software, or + modify the Zend Engine, or any portion thereof, your use of the + separated or modified Zend Engine software shall not be governed + by this license, and instead shall be governed by the license + set forth at http://www.zend.com/license/ZendLicense/. + + + +THIS SOFTWARE IS PROVIDED BY THE PHP DEVELOPMENT TEAM ``AS IS'' AND +ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A +PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE PHP +DEVELOPMENT TEAM OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, +INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, +STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED +OF THE POSSIBILITY OF SUCH DAMAGE. + +-------------------------------------------------------------------- + +This software consists of voluntary contributions made by many +individuals on behalf of the PHP Group. + +The PHP Group can be contacted via Email at group@php.net. + +For more information on the PHP Group and the PHP project, +please see . + + + + +-------------------------------------------------------------------- + The PHP License, version 3.0 +Copyright (c) 1999 - 2003 The PHP Group. All rights reserved. +-------------------------------------------------------------------- + +Redistribution and use in source and binary forms, with or without +modification, is permitted provided that the following conditions +are met: + + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in + the documentation and/or other materials provided with the + distribution. + + 3. The name "PHP" must not be used to endorse or promote products + derived from this software without prior written permission. For + written permission, please contact group@php.net. + + 4. Products derived from this software may not be called "PHP", nor + may "PHP" appear in their name, without prior written permission + from group@php.net. You may indicate that your software works in + conjunction with PHP by saying "Foo for PHP" instead of calling + it "PHP Foo" or "phpfoo" + + 5. The PHP Group may publish revised and/or new versions of the + license from time to time. Each version will be given a + distinguishing version number. + Once covered code has been published under a particular version + of the license, you may always continue to use it under the terms + of that version. You may also choose to use such covered code + under the terms of any subsequent version of the license + published by the PHP Group. No one other than the PHP Group has + the right to modify the terms applicable to covered code created + under this License. + + 6. Redistributions of any form whatsoever must retain the following + acknowledgment: + "This product includes PHP, freely available from + ". + +THIS SOFTWARE IS PROVIDED BY THE PHP DEVELOPMENT TEAM ``AS IS'' AND +ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A +PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE PHP +DEVELOPMENT TEAM OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, +INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, +STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED +OF THE POSSIBILITY OF SUCH DAMAGE. + +-------------------------------------------------------------------- + +This software consists of voluntary contributions made by many +individuals on behalf of the PHP Group. + +The PHP Group can be contacted via Email at group@php.net. + +For more information on the PHP Group and the PHP project, +please see . + +This product includes the Zend Engine, freely available at +. diff --git a/t/recipes/checks/debian/copyright/copyright-file-general/build-spec/debian/copyright-poor-common-licenses.copyright b/t/recipes/checks/debian/copyright/copyright-file-general/build-spec/debian/copyright-poor-common-licenses.copyright new file mode 100644 index 0000000..5a24980 --- /dev/null +++ b/t/recipes/checks/debian/copyright/copyright-file-general/build-spec/debian/copyright-poor-common-licenses.copyright @@ -0,0 +1,24 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see + +The full text of this license is in common-licenses/GPL-3 + diff --git a/t/recipes/checks/debian/copyright/copyright-file-general/build-spec/debian/copyright-versionless.copyright b/t/recipes/checks/debian/copyright/copyright-file-general/build-spec/debian/copyright-versionless.copyright new file mode 100644 index 0000000..c08f501 --- /dev/null +++ b/t/recipes/checks/debian/copyright/copyright-file-general/build-spec/debian/copyright-versionless.copyright @@ -0,0 +1,2 @@ +This package is copyright (c) 2009, Some Name and is +licensed under the GPL, see `/usr/share/common-licenses/GPL'. diff --git a/t/recipes/checks/debian/copyright/copyright-file-general/build-spec/debian/copyright-w3c.copyright b/t/recipes/checks/debian/copyright/copyright-file-general/build-spec/debian/copyright-w3c.copyright new file mode 100644 index 0000000..95c3f40 --- /dev/null +++ b/t/recipes/checks/debian/copyright/copyright-file-general/build-spec/debian/copyright-w3c.copyright @@ -0,0 +1,95 @@ +This package was debianized by J Random Developer on +Tue, 8 Nov 2005 00:27:44 +0100. + +It was downloaded from http://search.cpan.org/dist/W3C-LinkChecker/ + +Copyright Holder: the software was developed by following people for the + W3C: + The W3C Link Checker Team + +License: according to the README file, the source code of the W3C linkchecker +is available under the terms of the W3C Software Copyright (compatible with +the GNU GPL), which can be found at + + http://www.w3.org/Consortium/Legal/copyright-software + +and is reproduced below: + + + W3C � SOFTWARE NOTICE AND LICENSE + + [1]http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231 + + This work (and included software, documentation such as READMEs, or + other related items) is being provided by the copyright holders under + the following license. By obtaining, using and/or copying this work, + you (the licensee) agree that you have read, understood, and will + comply with the following terms and conditions. + + Permission to copy, modify, and distribute this software and its + documentation, with or without modification, for any purpose and + without fee or royalty is hereby granted, provided that you include + the following on ALL copies of the software and documentation or + portions thereof, including modifications: + 1. The full text of this NOTICE in a location viewable to users of + the redistributed or derivative work. + 2. Any pre-existing intellectual property disclaimers, notices, or + terms and conditions. If none exist, the [2]W3C Software Short + Notice should be included (hypertext is preferred, text is + permitted) within the body of any redistributed or derivative + code. + 3. Notice of any changes or modifications to the files, including the + date changes were made. (We recommend you provide URIs to the + location from which the code is derived.) + + THIS SOFTWARE AND DOCUMENTATION IS PROVIDED "AS IS," AND COPYRIGHT + HOLDERS MAKE NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, + INCLUDING BUT NOT LIMITED TO, WARRANTIES OF MERCHANTABILITY OR FITNESS + FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF THE SOFTWARE OR + DOCUMENTATION WILL NOT INFRINGE ANY THIRD PARTY PATENTS, COPYRIGHTS, + TRADEMARKS OR OTHER RIGHTS. + + COPYRIGHT HOLDERS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL + OR CONSEQUENTIAL DAMAGES ARISING OUT OF ANY USE OF THE SOFTWARE OR + DOCUMENTATION. + + The name and trademarks of copyright holders may NOT be used in + advertising or publicity pertaining to the software without specific, + written prior permission. Title to copyright in this software and any + associated documentation will at all times remain with copyright + holders. + + ____________________________________ + + This formulation of W3C's notice and license became active on December + 31 2002. This version removes the copyright ownership notice such that + this license can be used with materials other than those owned by the + W3C, reflects that ERCIM is now a host of the W3C, includes references + to this specific dated version of the license, and removes the + ambiguous grant of "use". Otherwise, this version is the same as the + [3]previous version and is written so as to preserve the [4]Free + Software Foundation's assessment of GPL compatibility and [5]OSI's + certification under the [6]Open Source Definition. Please see our + [7]Copyright FAQ for common questions about using materials from our + site, including specific terms and conditions for packages like + libwww, Amaya, and Jigsaw. Other questions about this notice can be + directed to [8]site-policy@w3.org. + + + Joseph Reagle <[9]site-policy@w3.org> + + Last revised $Id: copyright-software-20021231.html,v 1.11 2004/07/06 + 16:02:49 slesch Exp $ + +References + + 1. http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231 + 2. http://www.w3.org/Consortium/Legal/2002/copyright-software-short-notice-20021231.html + 3. http://www.w3.org/Consortium/Legal/copyright-software-19980720 + 4. http://www.gnu.org/philosophy/license-list.html#GPLCompatibleLicenses + 5. http://www.opensource.org/licenses/W3C.php + 6. http://www.opensource.org/docs/definition.php + 7. http://www.w3.org/Consortium/Legal/IPR-FAQ + 8. mailto:site-policy@w3.org + 9. mailto:site-policy@w3.org + diff --git a/t/recipes/checks/debian/copyright/copyright-file-general/build-spec/debian/rules b/t/recipes/checks/debian/copyright/copyright-file-general/build-spec/debian/rules new file mode 100755 index 0000000..50ff78f --- /dev/null +++ b/t/recipes/checks/debian/copyright/copyright-file-general/build-spec/debian/rules @@ -0,0 +1,14 @@ +#!/usr/bin/make -f +%: + dh $@ + +override_dh_installdocs: + dh_installdocs + install -m 644 debian/copyright-no-errors.copyright debian/copyright-symlink/usr/share/doc/copyright-symlink/symlink + rm debian/copyright-symlink/usr/share/doc/copyright-symlink/copyright + ln -s symlink debian/copyright-symlink/usr/share/doc/copyright-symlink/copyright + gzip -n -9 debian/copyright-compressed/usr/share/doc/copyright-compressed/copyright + mkdir -p debian/copyright-old-style/usr/doc/copyright + # This should (now) trigger a no-copyright-file (as there is no copyright file + # in the right location). + mv debian/copyright-old-style/usr/share/doc/copyright-old-style/copyright debian/copyright-old-style/usr/doc/copyright/copyright-old-style diff --git a/t/recipes/checks/debian/copyright/copyright-file-general/build-spec/fill-values b/t/recipes/checks/debian/copyright/copyright-file-general/build-spec/fill-values new file mode 100644 index 0000000..1bf7f36 --- /dev/null +++ b/t/recipes/checks/debian/copyright/copyright-file-general/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: upload-native +Testname: copyright-file-general +Description: Test checking of copyright files diff --git a/t/recipes/checks/debian/copyright/copyright-file-general/eval/desc b/t/recipes/checks/debian/copyright/copyright-file-general/eval/desc new file mode 100644 index 0000000..2c7e36a --- /dev/null +++ b/t/recipes/checks/debian/copyright/copyright-file-general/eval/desc @@ -0,0 +1,2 @@ +Testname: copyright-file-general +Check: debian/copyright diff --git a/t/recipes/checks/debian/copyright/copyright-file-general/eval/hints b/t/recipes/checks/debian/copyright/copyright-file-general/eval/hints new file mode 100644 index 0000000..1b8bc03 --- /dev/null +++ b/t/recipes/checks/debian/copyright/copyright-file-general/eval/hints @@ -0,0 +1,28 @@ +copyright-symlink (binary): copyright-file-is-symlink [usr/share/doc/copyright-symlink/copyright] +copyright-poor-common-licenses (binary): copyright-not-using-common-license-for-gpl +copyright-poor-common-licenses (binary): copyright-does-not-refer-to-common-license-file /GPL-3 +copyright-old-style (binary): no-copyright-file +copyright-old-fsf (binary): old-fsf-address-in-copyright-file +copyright-missing-perl-license-pointer (binary): copyright-file-lacks-pointer-to-perl-license +copyright-missing-apache2-license-pointer (binary): copyright-not-using-common-license-for-apache2 +copyright-misc-errors (binary): helper-templates-in-copyright +copyright-misc-errors (binary): copyright-refers-to-old-directory +copyright-misc-errors (binary): copyright-refers-to-nonexistent-license-file usr/share/common-licenses/GPL2 +copyright-misc-errors (binary): copyright-refers-to-incorrect-directory usr/share/common-licences +copyright-misc-errors (binary): copyright-refers-to-deprecated-bsd-license-file +copyright-misc-errors (binary): copyright-refers-to-compressed-license usr/share/common-licenses/BSD.gz +copyright-misc-errors (binary): copyright-has-url-from-dh_make-boilerplate +copyright-misc-errors (binary): copyright-contains-automatically-extracted-boilerplate +copyright-full-lgpl (binary): copyright-not-using-common-license-for-lgpl +copyright-full-gpl-2 (binary): copyright-not-using-common-license-for-lgpl +copyright-full-gpl-2 (binary): copyright-file-contains-full-gpl-license +copyright-full-gpl-1 (binary): copyright-not-using-common-license-for-gpl +copyright-full-gpl (binary): copyright-not-using-common-license-for-gpl +copyright-full-gpl (binary): copyright-file-contains-full-gpl-license +copyright-full-gfdl (binary): copyright-not-using-common-license-for-gfdl +copyright-full-gfdl (binary): copyright-file-contains-full-gfdl-license +copyright-full-apache-2 (binary): copyright-without-copyright-notice +copyright-full-apache-2 (binary): copyright-not-using-common-license-for-apache2 +copyright-full-apache-2 (binary): copyright-file-contains-full-apache-2-license +copyright-crln (binary): copyright-has-crs +copyright-compressed (binary): copyright-file-compressed [usr/share/doc/copyright-compressed/copyright.gz] diff --git a/t/recipes/checks/debian/copyright/copyright-file-license-symlink/build-spec/debian/control.in b/t/recipes/checks/debian/copyright/copyright-file-license-symlink/build-spec/debian/control.in new file mode 100644 index 0000000..c41fc78 --- /dev/null +++ b/t/recipes/checks/debian/copyright/copyright-file-license-symlink/build-spec/debian/control.in @@ -0,0 +1,28 @@ +Source: [% $source %] +Priority: optional +Section: [% $section %] +Maintainer: [% $author %] +Standards-Version: [% $standards_version %] +Build-Depends: [% $build_depends %] +Rules-Requires-Root: no +Homepage: https://lintian.debian.org/ + +Package: [% $source %]-bad +Architecture: [% $package_architecture %] +Depends: ${misc:Depends} +Description: [% $description %] + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. + +Package: [% $source %]-pedantic +Architecture: [% $package_architecture %] +Depends: ${misc:Depends} +Description: [% $description %] -- pedantic edition :) + Checks the pedantic version of the versionless copyright file check. + . + This is a test package designed to exercise some check of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. diff --git a/t/recipes/checks/debian/copyright/copyright-file-license-symlink/build-spec/debian/copyright-file-license-symlink-bad.copyright b/t/recipes/checks/debian/copyright/copyright-file-license-symlink/build-spec/debian/copyright-file-license-symlink-bad.copyright new file mode 100644 index 0000000..b59cb92 --- /dev/null +++ b/t/recipes/checks/debian/copyright/copyright-file-license-symlink/build-spec/debian/copyright-file-license-symlink-bad.copyright @@ -0,0 +1,20 @@ +This is part of the testsuite of lintian. See the file debian/copyright +in the lintian source directory for more details. + +So far as it is copyrightable at all, this template is + Copyright (C) 2008 Frank Lichtenheld + +This program is free software; you may redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation in its version 3. + +This is distributed in the hope that it will be useful, but without +any warranty; without even the implied warranty of merchantability or +fitness for a particular purpose. See the GNU General Public License +for more details. + +A copy of the GNU General Public License version 3 is available as +/usr/share/common-licenses/GPL in the Debian GNU/Linux distribution +or at http://www.gnu.org/licenses/old-licenses/gpl-3.0.html. +You can also obtain it by writing to the Free Software Foundation, Inc., +51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/t/recipes/checks/debian/copyright/copyright-file-license-symlink/build-spec/debian/copyright-file-license-symlink-pedantic.copyright b/t/recipes/checks/debian/copyright/copyright-file-license-symlink/build-spec/debian/copyright-file-license-symlink-pedantic.copyright new file mode 100644 index 0000000..2591c9b --- /dev/null +++ b/t/recipes/checks/debian/copyright/copyright-file-license-symlink/build-spec/debian/copyright-file-license-symlink-pedantic.copyright @@ -0,0 +1,21 @@ +This is part of the testsuite of lintian. See the file debian/copyright +in the lintian source directory for more details. + +So far as it is copyrightable at all, this template is + Copyright (C) 2008 Frank Lichtenheld + +This program is free software; you may redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +This is distributed in the hope that it will be useful, but without +any warranty; without even the implied warranty of merchantability or +fitness for a particular purpose. See the GNU General Public License +for more details. + +A copy of the GNU General Public License version 2 is available as +/usr/share/common-licenses/GPL in the Debian GNU/Linux distribution +or at http://www.gnu.org/licenses/old-licenses/gpl-2.0.html. +You can also obtain it by writing to the Free Software Foundation, Inc., +51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/t/recipes/checks/debian/copyright/copyright-file-license-symlink/build-spec/fill-values b/t/recipes/checks/debian/copyright/copyright-file-license-symlink/build-spec/fill-values new file mode 100644 index 0000000..1a3cd35 --- /dev/null +++ b/t/recipes/checks/debian/copyright/copyright-file-license-symlink/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: upload-native +Testname: copyright-file-license-symlink +Description: Test the versionless license files checks diff --git a/t/recipes/checks/debian/copyright/copyright-file-license-symlink/eval/desc b/t/recipes/checks/debian/copyright/copyright-file-license-symlink/eval/desc new file mode 100644 index 0000000..17cc2f4 --- /dev/null +++ b/t/recipes/checks/debian/copyright/copyright-file-license-symlink/eval/desc @@ -0,0 +1,2 @@ +Testname: copyright-file-license-symlink +Check: debian/copyright diff --git a/t/recipes/checks/debian/copyright/copyright-file-license-symlink/eval/hints b/t/recipes/checks/debian/copyright/copyright-file-license-symlink/eval/hints new file mode 100644 index 0000000..39f1b25 --- /dev/null +++ b/t/recipes/checks/debian/copyright/copyright-file-license-symlink/eval/hints @@ -0,0 +1,2 @@ +copyright-file-license-symlink-pedantic (binary): copyright-refers-to-symlink-license usr/share/common-licenses/GPL +copyright-file-license-symlink-bad (binary): copyright-refers-to-versionless-license-file usr/share/common-licenses/GPL diff --git a/t/recipes/checks/debian/copyright/copyright-file-non-common-license/build-spec/debian/control.in b/t/recipes/checks/debian/copyright/copyright-file-non-common-license/build-spec/debian/control.in new file mode 100644 index 0000000..00c2ba8 --- /dev/null +++ b/t/recipes/checks/debian/copyright/copyright-file-non-common-license/build-spec/debian/control.in @@ -0,0 +1,95 @@ +Source: [% $source %] +Priority: optional +Section: [% $section %] +Maintainer: [% $author %] +Standards-Version: [% $standards_version %] +Build-Depends: [% $build_depends %] +Rules-Requires-Root: no + +Package: copyright-mentions-apache +Architecture: all +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: checks against common license false positive for Apache + Tests against common license false positive for Apache. + . + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. + +Package: copyright-mentions-apache2 +Architecture: all +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: checks against common license false positive for Apache (2) + Tests against common license false positive for Apache (2). + . + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. + +Package: copyright-mentions-apache3 +Architecture: all +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: checks against common license false positive for Apache (3) + Tests against common license false positive for Apache (3). + . + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. + +Package: copyright-mentions-gfdl +Architecture: all +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: checks against common license false positive for gfdl + Tests against common license false positive for gfdl. + . + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. + +Package: copyright-mentions-gpl +Architecture: all +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: checks against common license false positive for gpl + Tests against common license false positive for gpl. + . + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. + +Package: copyright-mentions-lgpl +Architecture: all +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: checks against common license false positive for lgpl + Tests against common license false positive for lgpl. + . + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. + +Package: copyright-mentions-lgpl2 +Architecture: all +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: checks against common license false positive for lgpl (2) + Tests against common license false positive for lgpl (2). + . + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. + +Package: copyright-mentions-perl +Architecture: all +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: checks against common license false positive for perl + Tests against common license false positive for perl. + . + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. diff --git a/t/recipes/checks/debian/copyright/copyright-file-non-common-license/build-spec/debian/copyright-mentions-apache.copyright b/t/recipes/checks/debian/copyright/copyright-file-non-common-license/build-spec/debian/copyright-mentions-apache.copyright new file mode 100644 index 0000000..627f564 --- /dev/null +++ b/t/recipes/checks/debian/copyright/copyright-file-non-common-license/build-spec/debian/copyright-mentions-apache.copyright @@ -0,0 +1,13 @@ +Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Upstream-Name: lintian +Upstream-Contact: Lintian Maintainers +Source: http://git.debian.org/?p=lintian/lintian.git + +Files: * +Copyright: 2015 Lintian Maintainers +License: Mentions-Other-License + +License: Mentions-Other-License + lorem ipsum + lorem ipsum Apache License , Version 2.0 lorem ipsum + lorem ipsum diff --git a/t/recipes/checks/debian/copyright/copyright-file-non-common-license/build-spec/debian/copyright-mentions-apache2.copyright b/t/recipes/checks/debian/copyright/copyright-file-non-common-license/build-spec/debian/copyright-mentions-apache2.copyright new file mode 100644 index 0000000..493add3 --- /dev/null +++ b/t/recipes/checks/debian/copyright/copyright-file-non-common-license/build-spec/debian/copyright-mentions-apache2.copyright @@ -0,0 +1,13 @@ +Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Upstream-Name: lintian +Upstream-Contact: Lintian Maintainers +Source: http://git.debian.org/?p=lintian/lintian.git + +Files: * +Copyright: 2015 Lintian Maintainers +License: Mentions-Other-License + +License: Mentions-Other-License + lorem ipsum + lorem ipsum Apache License Version 2.0 lorem ipsum + lorem ipsum diff --git a/t/recipes/checks/debian/copyright/copyright-file-non-common-license/build-spec/debian/copyright-mentions-apache3.copyright b/t/recipes/checks/debian/copyright/copyright-file-non-common-license/build-spec/debian/copyright-mentions-apache3.copyright new file mode 100644 index 0000000..28de0e9 --- /dev/null +++ b/t/recipes/checks/debian/copyright/copyright-file-non-common-license/build-spec/debian/copyright-mentions-apache3.copyright @@ -0,0 +1,13 @@ +Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Upstream-Name: lintian +Upstream-Contact: Lintian Maintainers +Source: http://git.debian.org/?p=lintian/lintian.git + +Files: * +Copyright: 2015 Lintian Maintainers +License: Mentions-Other-License + +License: Mentions-Other-License + lorem ipsum + lorem ipsum Apache-2 License lorem ipsum + lorem ipsum diff --git a/t/recipes/checks/debian/copyright/copyright-file-non-common-license/build-spec/debian/copyright-mentions-gfdl.copyright b/t/recipes/checks/debian/copyright/copyright-file-non-common-license/build-spec/debian/copyright-mentions-gfdl.copyright new file mode 100644 index 0000000..75ac1cb --- /dev/null +++ b/t/recipes/checks/debian/copyright/copyright-file-non-common-license/build-spec/debian/copyright-mentions-gfdl.copyright @@ -0,0 +1,13 @@ +Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Upstream-Name: lintian +Upstream-Contact: Lintian Maintainers +Source: http://git.debian.org/?p=lintian/lintian.git + +Files: * +Copyright: 2015 Lintian Maintainers +License: Mentions-Other-License + +License: Mentions-Other-License + lorem ipsum + lorem ipsum GNU Free Documentation License (GFDL) lorem ipsum + lorem ipsum diff --git a/t/recipes/checks/debian/copyright/copyright-file-non-common-license/build-spec/debian/copyright-mentions-gpl.copyright b/t/recipes/checks/debian/copyright/copyright-file-non-common-license/build-spec/debian/copyright-mentions-gpl.copyright new file mode 100644 index 0000000..a33353a --- /dev/null +++ b/t/recipes/checks/debian/copyright/copyright-file-non-common-license/build-spec/debian/copyright-mentions-gpl.copyright @@ -0,0 +1,14 @@ +Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Upstream-Name: lintian +Upstream-Contact: Lintian Maintainers +Source: http://git.debian.org/?p=lintian/lintian.git + +Files: * +Copyright: 2015 Lintian Maintainers +License: Mentions-Other-License + +License: Mentions-Other-License + lorem ipsum + lorem ipsum GNU General Public License (GPL) applies to the changes, + . + lorem ipsum diff --git a/t/recipes/checks/debian/copyright/copyright-file-non-common-license/build-spec/debian/copyright-mentions-lgpl.copyright b/t/recipes/checks/debian/copyright/copyright-file-non-common-license/build-spec/debian/copyright-mentions-lgpl.copyright new file mode 100644 index 0000000..93a0925 --- /dev/null +++ b/t/recipes/checks/debian/copyright/copyright-file-non-common-license/build-spec/debian/copyright-mentions-lgpl.copyright @@ -0,0 +1,13 @@ +Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Upstream-Name: lintian +Upstream-Contact: Lintian Maintainers +Source: http://git.debian.org/?p=lintian/lintian.git + +Files: * +Copyright: 2015 Lintian Maintainers +License: Mentions-Other-License + +License: Mentions-Other-License + lorem ipsum + lorem ipsum GNU Lesser General Public License (LGPL) lorem ipsum + lorem ipsum diff --git a/t/recipes/checks/debian/copyright/copyright-file-non-common-license/build-spec/debian/copyright-mentions-lgpl2.copyright b/t/recipes/checks/debian/copyright/copyright-file-non-common-license/build-spec/debian/copyright-mentions-lgpl2.copyright new file mode 100644 index 0000000..74632b5 --- /dev/null +++ b/t/recipes/checks/debian/copyright/copyright-file-non-common-license/build-spec/debian/copyright-mentions-lgpl2.copyright @@ -0,0 +1,13 @@ +Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Upstream-Name: lintian +Upstream-Contact: Lintian Maintainers +Source: http://git.debian.org/?p=lintian/lintian.git + +Files: * +Copyright: 2015 Lintian Maintainers +License: Mentions-Other-License + +License: Mentions-Other-License + lorem ipsum + lorem ipsum GNU Library General Public License (LGPL) lorem ipsum + lorem ipsum diff --git a/t/recipes/checks/debian/copyright/copyright-file-non-common-license/build-spec/debian/copyright-mentions-perl.copyright b/t/recipes/checks/debian/copyright/copyright-file-non-common-license/build-spec/debian/copyright-mentions-perl.copyright new file mode 100644 index 0000000..8a757ce --- /dev/null +++ b/t/recipes/checks/debian/copyright/copyright-file-non-common-license/build-spec/debian/copyright-mentions-perl.copyright @@ -0,0 +1,13 @@ +Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Upstream-Name: lintian +Upstream-Contact: Lintian Maintainers +Source: http://git.debian.org/?p=lintian/lintian.git + +Files: * +Copyright: 2015 Lintian Maintainers +License: Mentions-Other-License + +License: Mentions-Other-License + lorem ipsum + lorem ipsum under the same terms as Perl itself lorem ipsum + lorem ipsum diff --git a/t/recipes/checks/debian/copyright/copyright-file-non-common-license/build-spec/fill-values b/t/recipes/checks/debian/copyright/copyright-file-non-common-license/build-spec/fill-values new file mode 100644 index 0000000..efe9ba6 --- /dev/null +++ b/t/recipes/checks/debian/copyright/copyright-file-non-common-license/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: upload-native +Testname: copyright-file-non-common-license +Description: Test for false positive for a common license diff --git a/t/recipes/checks/debian/copyright/copyright-file-non-common-license/eval/desc b/t/recipes/checks/debian/copyright/copyright-file-non-common-license/eval/desc new file mode 100644 index 0000000..07eb186 --- /dev/null +++ b/t/recipes/checks/debian/copyright/copyright-file-non-common-license/eval/desc @@ -0,0 +1,8 @@ +Testname: copyright-file-non-common-license +Test-Against: + copyright-not-using-common-license-for-gpl + copyright-not-using-common-license-for-gfdl + copyright-not-using-common-license-for-lgpl + copyright-not-using-common-license-for-apache2 + copyright-file-lacks-pointer-to-perl-license +Check: debian/copyright diff --git a/t/recipes/checks/debian/copyright/copyright-file-non-common-license/eval/hints b/t/recipes/checks/debian/copyright/copyright-file-non-common-license/eval/hints new file mode 100644 index 0000000..e69de29 diff --git a/t/recipes/checks/debian/copyright/copyright-file-symlink/build-spec/debian/control.in b/t/recipes/checks/debian/copyright/copyright-file-symlink/build-spec/debian/control.in new file mode 100644 index 0000000..fb4666c --- /dev/null +++ b/t/recipes/checks/debian/copyright/copyright-file-symlink/build-spec/debian/control.in @@ -0,0 +1,40 @@ +Source: [% $source %] +Priority: optional +Section: [% $section %] +Maintainer: [% $author %] +Standards-Version: [% $standards_version %] +Build-Depends: [% $build_depends %] +Rules-Requires-Root: no + +Package: symlink-to-foreign +Architecture: all +Depends: ${misc:Depends}, foreign-package +Description: [% $description %] (foreign) + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. + . + Foreign. + +Package: symlink-outside-usd +Architecture: all +Depends: ${misc:Depends} +Description: [% $description %] (usd) + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. + . + USD. + +Package: symlink-without-depends +Architecture: all +Depends: ${misc:Depends} +Description: [% $description %] (no-deepnds) + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. + . + Symlinks without dependency. diff --git a/t/recipes/checks/debian/copyright/copyright-file-symlink/build-spec/debian/rules b/t/recipes/checks/debian/copyright/copyright-file-symlink/build-spec/debian/rules new file mode 100644 index 0000000..d48f723 --- /dev/null +++ b/t/recipes/checks/debian/copyright/copyright-file-symlink/build-spec/debian/rules @@ -0,0 +1,22 @@ +#!/usr/bin/make -f + +USD:=usr/share/doc +%: + dh $@ + + +override_dh_md5sums: + rm -fr debian/symlink-to-foreign/$(USD)/symlink-to-foreign + ln -sf foreign-package \ + debian/symlink-to-foreign/$(USD)/symlink-to-foreign + rm -fr debian/symlink-without-depends/$(USD)/symlink-without-depends + ln -sf foreign-package \ + debian/symlink-without-depends/$(USD)/symlink-without-depends + # Move all of it to usr/lib// + mkdir -p debian/symlink-outside-usd/usr/lib/ + mv debian/symlink-outside-usd/$(USD)/symlink-outside-usd \ + debian/symlink-outside-usd/usr/lib/symlink-outside-usd/ + # with symlink of course :) + ln -s ../../lib/symlink-outside-usd/copyright \ + debian/symlink-outside-usd/$(USD)/symlink-outside-usd + dh_md5sums diff --git a/t/recipes/checks/debian/copyright/copyright-file-symlink/build-spec/fill-values b/t/recipes/checks/debian/copyright/copyright-file-symlink/build-spec/fill-values new file mode 100644 index 0000000..f286c24 --- /dev/null +++ b/t/recipes/checks/debian/copyright/copyright-file-symlink/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: upload-native +Testname: copyright-file-symlink +Description: Test for symlinked doc directories diff --git a/t/recipes/checks/debian/copyright/copyright-file-symlink/eval/desc b/t/recipes/checks/debian/copyright/copyright-file-symlink/eval/desc new file mode 100644 index 0000000..4f60c40 --- /dev/null +++ b/t/recipes/checks/debian/copyright/copyright-file-symlink/eval/desc @@ -0,0 +1,2 @@ +Testname: copyright-file-symlink +Check: debian/copyright diff --git a/t/recipes/checks/debian/copyright/copyright-file-symlink/eval/hints b/t/recipes/checks/debian/copyright/copyright-file-symlink/eval/hints new file mode 100644 index 0000000..785fbc3 --- /dev/null +++ b/t/recipes/checks/debian/copyright/copyright-file-symlink/eval/hints @@ -0,0 +1,3 @@ +symlink-without-depends (binary): usr-share-doc-symlink-without-dependency foreign-package +symlink-to-foreign (binary): usr-share-doc-symlink-to-foreign-package foreign-package +symlink-outside-usd (binary): usr-share-doc-symlink-points-outside-of-usr-share-doc ../../lib/symlink-outside-usd/copyright [usr/share/doc/symlink-outside-usd] diff --git a/t/recipes/checks/debian/copyright/dep5/appstream-metadata/build-spec/debian/appstream-metadata-invalid.metadata.xml b/t/recipes/checks/debian/copyright/dep5/appstream-metadata/build-spec/debian/appstream-metadata-invalid.metadata.xml new file mode 100644 index 0000000..a823b8d --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/appstream-metadata/build-spec/debian/appstream-metadata-invalid.metadata.xml @@ -0,0 +1 @@ +This is not a valid XML document. diff --git a/t/recipes/checks/debian/copyright/dep5/appstream-metadata/build-spec/debian/appstream-metadata-obsolete.metadata.xml b/t/recipes/checks/debian/copyright/dep5/appstream-metadata/build-spec/debian/appstream-metadata-obsolete.metadata.xml new file mode 100644 index 0000000..31d281e --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/appstream-metadata/build-spec/debian/appstream-metadata-obsolete.metadata.xml @@ -0,0 +1,2 @@ + + diff --git a/t/recipes/checks/debian/copyright/dep5/appstream-metadata/build-spec/debian/appstream-metadata.desktop b/t/recipes/checks/debian/copyright/dep5/appstream-metadata/build-spec/debian/appstream-metadata.desktop new file mode 100644 index 0000000..4c91430 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/appstream-metadata/build-spec/debian/appstream-metadata.desktop @@ -0,0 +1,8 @@ +[Desktop Entry] +Version=1.0 +Type=Application +Name=appstream-udev-data +Terminal=true +Exec=true +Categories=ConsoleOnly;Game; +Keywords=Text; diff --git a/t/recipes/checks/debian/copyright/dep5/appstream-metadata/build-spec/debian/appstream-metadata.dirs b/t/recipes/checks/debian/copyright/dep5/appstream-metadata/build-spec/debian/appstream-metadata.dirs new file mode 100644 index 0000000..402f5d5 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/appstream-metadata/build-spec/debian/appstream-metadata.dirs @@ -0,0 +1,2 @@ +usr/share/metainfo +usr/share/appdata diff --git a/t/recipes/checks/debian/copyright/dep5/appstream-metadata/build-spec/debian/appstream-metadata.metadata.xml b/t/recipes/checks/debian/copyright/dep5/appstream-metadata/build-spec/debian/appstream-metadata.metadata.xml new file mode 100644 index 0000000..82294c1 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/appstream-metadata/build-spec/debian/appstream-metadata.metadata.xml @@ -0,0 +1,22 @@ + + + appstream-udev-data + MIT + lintian appstream-udev-data + Test AppStream and udev related checks in lintian + +

      + This is a test package designed to exercise some feature or tag + of Lintian. It is part of the Lintian test suite and may do + very odd things. It should not be installed like a regular + package. It may be an empty package. +

      +
      + + usb:v0000p0001d* + usb:v0000p0002d* + usb:v0000p0003d* + usb:v0000p0004d* + usb:v0000p000ad* + +
      diff --git a/t/recipes/checks/debian/copyright/dep5/appstream-metadata/build-spec/debian/appstream-metadata.udev b/t/recipes/checks/debian/copyright/dep5/appstream-metadata/build-spec/debian/appstream-metadata.udev new file mode 100644 index 0000000..e2f2841 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/appstream-metadata/build-spec/debian/appstream-metadata.udev @@ -0,0 +1,14 @@ +SUBSYSTEM=="usb", ACTION=="add", ATTR{idVendor}=="0000", ATTR{idProduct}=="0001", \ + MODE="0666" + +SUBSYSTEM=="usb", ACTION=="add", ATTR{idVendor}=="0000", ATTR{idProduct}=="0002", \ + MODE="0660", GROUP="plugdev" + +SUBSYSTEM=="usb", ACTION=="add", ATTR{idVendor}=="0000", ATTR{idProduct}=="0003", \ + TAG+="uaccess" + +SUBSYSTEM=="usb", ACTION=="add", ATTR{idVendor}=="0000", ATTR{idProduct}=="0004", \ + MODE="0660", GROUP="plugdev", TAG+="uaccess" + +SUBSYSTEM=="usb", ACTION=="add", ATTR{idVendor}=="0000", ATTR{idProduct}=="000a", \ + ID_TEST_DEVICE="1" diff --git a/t/recipes/checks/debian/copyright/dep5/appstream-metadata/build-spec/debian/rules b/t/recipes/checks/debian/copyright/dep5/appstream-metadata/build-spec/debian/rules new file mode 100644 index 0000000..5fb0c35 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/appstream-metadata/build-spec/debian/rules @@ -0,0 +1,15 @@ +#!/usr/bin/make -f + +DESTDIR = debian/$(shell dh_listpackages) +APPSYNC_DIR=$(DESTDIR)/usr/share/metainfo/ +OBSOLETE_APPSYNC_DIR=$(DESTDIR)/usr/share/appdata/ +UDEV_DIR=$(DESTDIR)/lib/udev/rules.d/ + +%: + dh $@ + +override_dh_install: + dh_install + install -m 0644 debian/appstream-metadata.metadata.xml $(APPSYNC_DIR) + install -m 0644 debian/appstream-metadata-invalid.metadata.xml $(APPSYNC_DIR) + install -m 0644 debian/appstream-metadata-obsolete.metadata.xml $(OBSOLETE_APPSYNC_DIR) diff --git a/t/recipes/checks/debian/copyright/dep5/appstream-metadata/build-spec/fill-values b/t/recipes/checks/debian/copyright/dep5/appstream-metadata/build-spec/fill-values new file mode 100644 index 0000000..cfd5595 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/appstream-metadata/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: upload-native +Testname: appstream-metadata +Description: Test AppStream and udev metadata in binary package diff --git a/t/recipes/checks/debian/copyright/dep5/appstream-metadata/eval/desc b/t/recipes/checks/debian/copyright/dep5/appstream-metadata/eval/desc new file mode 100644 index 0000000..4d651da --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/appstream-metadata/eval/desc @@ -0,0 +1,2 @@ +Testname: appstream-metadata +Check: debian/copyright/dep5 diff --git a/t/recipes/checks/debian/copyright/dep5/appstream-metadata/eval/hints b/t/recipes/checks/debian/copyright/dep5/appstream-metadata/eval/hints new file mode 100644 index 0000000..446654b --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/appstream-metadata/eval/hints @@ -0,0 +1 @@ +appstream-metadata (source): inconsistent-appstream-metadata-license debian/appstream-metadata.metadata.xml (mit != gpl-2+) [debian/copyright] diff --git a/t/recipes/checks/debian/copyright/dep5/components/control-file-upstream-signature-missing/build-spec/debian/upstream/signing-key.asc b/t/recipes/checks/debian/copyright/dep5/components/control-file-upstream-signature-missing/build-spec/debian/upstream/signing-key.asc new file mode 100644 index 0000000..bd03c4e --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/components/control-file-upstream-signature-missing/build-spec/debian/upstream/signing-key.asc @@ -0,0 +1 @@ +Too lazy to fake this file diff --git a/t/recipes/checks/debian/copyright/dep5/components/control-file-upstream-signature-missing/build-spec/fill-values b/t/recipes/checks/debian/copyright/dep5/components/control-file-upstream-signature-missing/build-spec/fill-values new file mode 100644 index 0000000..05147bb --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/components/control-file-upstream-signature-missing/build-spec/fill-values @@ -0,0 +1,6 @@ +Testname: control-file-upstream-signature-missing +Skeleton: upload-non-native +Source-Format: 3.0 (quilt) +Description: No upstream signature included but package contains a signing key +Extra-Build-Depends: dpkg (>= 1.18.5) +# dpkg 1.18.5 required in order to create multiple tarballs with detached signatures diff --git a/t/recipes/checks/debian/copyright/dep5/components/control-file-upstream-signature-missing/build-spec/pre-build b/t/recipes/checks/debian/copyright/dep5/components/control-file-upstream-signature-missing/build-spec/pre-build new file mode 100755 index 0000000..93d6006 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/components/control-file-upstream-signature-missing/build-spec/pre-build @@ -0,0 +1,18 @@ +#!/bin/sh + +set -e + +DIR="$1" +NAME="control-file-upstream-signature-missing" +VERSION="1.0" + +# Check all components +cp ${DIR}/../${NAME}_${VERSION}.orig.tar.gz ${DIR}/../${NAME}_${VERSION}.orig-component.tar.gz + +# Don't emit if we have a signature +cp ${DIR}/../${NAME}_${VERSION}.orig.tar.gz ${DIR}/../${NAME}_${VERSION}.orig-signed.tar.gz +touch ${DIR}/../${NAME}_${VERSION}.orig-signed.tar.gz.asc + +# Don't emit if we have .tar.asc (NB. not a .tar.gz.asc) +cp ${DIR}/../${NAME}_${VERSION}.orig.tar.gz ${DIR}/../${NAME}_${VERSION}.orig-noext.tar.gz +touch ${DIR}/../${NAME}_${VERSION}.orig-noext.tar.gz.asc diff --git a/t/recipes/checks/debian/copyright/dep5/components/control-file-upstream-signature-missing/eval/desc b/t/recipes/checks/debian/copyright/dep5/components/control-file-upstream-signature-missing/eval/desc new file mode 100644 index 0000000..22a5236 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/components/control-file-upstream-signature-missing/eval/desc @@ -0,0 +1,3 @@ +Testname: control-file-upstream-signature-missing +Check: debian/copyright/dep5/components +# dpkg 1.18.5 required in order to create multiple tarballs with detached signatures diff --git a/t/recipes/checks/debian/copyright/dep5/components/control-file-upstream-signature-missing/eval/hints b/t/recipes/checks/debian/copyright/dep5/components/control-file-upstream-signature-missing/eval/hints new file mode 100644 index 0000000..a4ea69b --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/components/control-file-upstream-signature-missing/eval/hints @@ -0,0 +1,3 @@ +control-file-upstream-signature-missing (source): add-component-copyright signed [debian/copyright] +control-file-upstream-signature-missing (source): add-component-copyright noext [debian/copyright] +control-file-upstream-signature-missing (source): add-component-copyright component [debian/copyright] diff --git a/t/recipes/checks/debian/copyright/dep5/conjunction-vs-alone/build-spec/debian/copyright b/t/recipes/checks/debian/copyright/dep5/conjunction-vs-alone/build-spec/debian/copyright new file mode 100644 index 0000000..3c3b46f --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/conjunction-vs-alone/build-spec/debian/copyright @@ -0,0 +1,21 @@ +# taken from https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=801182#8 +# except completed where needed, and with a secure URL +Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ + +Files: * +Copyright: (C) 2004-2012 NVIDIA Corporation +License: MooPL + +Files: XF86Config-parser/Generate.c +Copyright: (C) 2005 NVIDIA Corporation +License: GPL-2+ and other-GPL + +Files: debian/* +Copyright: 2005 Randall Donald +License: GPL-2+ + +License: GPL-2+ + Please call the Free Software Foundation for this license. + +License: other-GPL + Please call the Free Software Foundation for this license. diff --git a/t/recipes/checks/debian/copyright/dep5/conjunction-vs-alone/build-spec/fill-values b/t/recipes/checks/debian/copyright/dep5/conjunction-vs-alone/build-spec/fill-values new file mode 100644 index 0000000..f8fe653 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/conjunction-vs-alone/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: upload-native +Testname: conjunction-vs-alone +Description: Uses the same license in a conjuntion and alone (false positive) diff --git a/t/recipes/checks/debian/copyright/dep5/conjunction-vs-alone/eval/desc b/t/recipes/checks/debian/copyright/dep5/conjunction-vs-alone/eval/desc new file mode 100644 index 0000000..bd5b807 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/conjunction-vs-alone/eval/desc @@ -0,0 +1,5 @@ +Testname: conjunction-vs-alone +Check: debian/copyright/dep5 +Test-Against: + dep5-copyright-license-name-not-unique +See-Also: Bug#801182 diff --git a/t/recipes/checks/debian/copyright/dep5/conjunction-vs-alone/eval/hints b/t/recipes/checks/debian/copyright/dep5/conjunction-vs-alone/eval/hints new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/conjunction-vs-alone/eval/hints @@ -0,0 +1 @@ + diff --git a/t/recipes/checks/debian/copyright/dep5/copyright-file-general/build-spec/debian/control.in b/t/recipes/checks/debian/copyright/dep5/copyright-file-general/build-spec/debian/control.in new file mode 100644 index 0000000..d347ec7 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/copyright-file-general/build-spec/debian/control.in @@ -0,0 +1,243 @@ +Source: [% $source %] +Priority: optional +Section: [% $section %] +Maintainer: [% $author %] +Standards-Version: [% $standards_version %] +Build-Depends: [% $build_depends %] +Rules-Requires-Root: no + +Package: copyright-iso-8859-1 +Architecture: all +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: checks for non-utf-8-encodings + Tests non-UTF-8 encodings. + . + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. + +Package: copyright-full-gpl +Architecture: all +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: checks inclusion of GPL in full text + Tests the tag for including all of the GPL. + . + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. + +Package: copyright-full-lgpl +Architecture: all +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: checks inclusion of LGPL in full text + Tests the tag for including all of the LGPL. + . + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. + +Package: copyright-full-gfdl +Architecture: all +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: checks inclusion of GFDL in full text + Tests the tag for including all of the GFDL. + . + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. + +Package: copyright-full-apache-2 +Architecture: all +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: checks inclusion of Apache 2.0 in full text + Tests the tag for including all of the Apache 2.0 license. + . + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. + +Package: copyright-misc-errors +Architecture: all +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: checks various errors in copyright files + Tests various random errors in copyright files. + . + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. + +Package: copyright-symlink +Architecture: all +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: just use a symlink for the copyright file + Tests the check for a symlinked copyright file. + . + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. + +Package: copyright-compressed +Architecture: all +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: include a valid copyright file and compress it + Tests the check for a compressed copyright file. + . + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. + +Package: copyright-old-style +Architecture: all +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: use an old-style directory structure + Tests a copyright file using an old-style directory structure. + . + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. + +Package: copyright-full-gpl-1 +Architecture: all +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: checks inclusion of GPL1 + This should trigger errors as GPL1 is in the common license dir. + . + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. + +Package: copyright-full-gpl-2 +Architecture: all +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: checks inclusion of GPL2 + This should trigger errors as GPL2 is in the common license dir. + . + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. + +Package: copyright-php +Architecture: all +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: checks problematic PHP licenses + The PHP licenses are problematic for any software that isn't PHP. + . + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. + +Package: copyright-w3c +Architecture: all +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: checks inclusion of the W3C license + The W3C license text claims to be "GPL compatible", which shouldn't + trigger warnings. + . + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. + +Package: copyright-no-errors +Architecture: all +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: this should not emit any error + This copyright file should be fine. + . + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. + +Package: copyright-versionless +Architecture: all +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: checks a valid versionless GPL reference + Refers to the GPL and truly doesn't mention any version. + . + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. + +Package: copyright-missing-perl-license-pointer +Architecture: all +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: checks for perl packages not pointing to common-licenses + Packages under the "same terms as Perl itself" should reference a + license in common-licenses. + . + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. + +Package: copyright-missing-apache2-license-pointer +Architecture: all +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: checks for apache2 packages not pointing to common-licenses + Packages under the apache2-license should reference a + license in common-licenses. + . + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. + +Package: copyright-poor-common-licenses +Architecture: all +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: checks not referring to common licenses + Packages should refer to common licenses with full path if they + use a common license. + . + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. + +Package: copyright-crln +Architecture: all +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: check for Windows newlines + This package should trigger a tag for having Windows newlines in + the copyright file. + . + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. + +Package: copyright-full-agpl-3 +Architecture: all +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: checks inclusion of AGPL-3 in full text + This should not trigger a tag as AGPL-3 is not in common-licenses. + . + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. + +Package: copyright-old-fsf +Architecture: all +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: checks use of old FSF address + This should trigger a tag for using old FSF address. + . + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. diff --git a/t/recipes/checks/debian/copyright/dep5/copyright-file-general/build-spec/debian/copyright-crln.copyright b/t/recipes/checks/debian/copyright/dep5/copyright-file-general/build-spec/debian/copyright-crln.copyright new file mode 100644 index 0000000..43b49cf --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/copyright-file-general/build-spec/debian/copyright-crln.copyright @@ -0,0 +1,36 @@ +This package was debianized by Tobias Toedter on +Thu, 20 Mar 2008 23:48:15 +0100 + +It was downloaded from + +Format-Specification: http://wiki.debian.org/Proposals/CopyrightFormat?recall=184 + +Upstream Authors: + + Tobias Toedter + +Copyright: + + Copyright (C) 2008 Tobias Toedter + +License: + + This package is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This package is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this package; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +On Debian systems, the complete text of the GNU General +Public License can be found in `/usr/share/common-licenses/GPL-2'. + +The Debian packaging is Copyright 2008, Tobias Toedter +and is licensed under the GPL, see above. diff --git a/t/recipes/checks/debian/copyright/dep5/copyright-file-general/build-spec/debian/copyright-full-agpl-3.copyright b/t/recipes/checks/debian/copyright/dep5/copyright-file-general/build-spec/debian/copyright-full-agpl-3.copyright new file mode 100644 index 0000000..dba13ed --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/copyright-file-general/build-spec/debian/copyright-full-agpl-3.copyright @@ -0,0 +1,661 @@ + GNU AFFERO GENERAL PUBLIC LICENSE + Version 3, 19 November 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU Affero General Public License is a free, copyleft license for +software and other kinds of works, specifically designed to ensure +cooperation with the community in the case of network server software. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +our General Public Licenses are intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + Developers that use our General Public Licenses protect your rights +with two steps: (1) assert copyright on the software, and (2) offer +you this License which gives you legal permission to copy, distribute +and/or modify the software. + + A secondary benefit of defending all users' freedom is that +improvements made in alternate versions of the program, if they +receive widespread use, become available for other developers to +incorporate. Many developers of free software are heartened and +encouraged by the resulting cooperation. However, in the case of +software used on network servers, this result may fail to come about. +The GNU General Public License permits making a modified version and +letting the public access it on a server without ever releasing its +source code to the public. + + The GNU Affero General Public License is designed specifically to +ensure that, in such cases, the modified source code becomes available +to the community. It requires the operator of a network server to +provide the source code of the modified version running there to the +users of that server. Therefore, public use of a modified version, on +a publicly accessible server, gives the public access to the source +code of the modified version. + + An older license, called the Affero General Public License and +published by Affero, was designed to accomplish similar goals. This is +a different license, not a version of the Affero GPL, but Affero has +released a new version of the Affero GPL which permits relicensing under +this license. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU Affero General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Remote Network Interaction; Use with the GNU General Public License. + + Notwithstanding any other provision of this License, if you modify the +Program, your modified version must prominently offer all users +interacting with it remotely through a computer network (if your version +supports such interaction) an opportunity to receive the Corresponding +Source of your version by providing access to the Corresponding Source +from a network server at no charge, through some standard or customary +means of facilitating copying of software. This Corresponding Source +shall include the Corresponding Source for any work covered by version 3 +of the GNU General Public License that is incorporated pursuant to the +following paragraph. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the work with which it is combined will remain governed by version +3 of the GNU General Public License. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU Affero General Public License from time to time. Such new versions +will be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU Affero General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU Affero General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU Affero General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . + +Also add information on how to contact you by electronic and paper mail. + + If your software can interact with users remotely through a computer +network, you should also make sure that it provides a way for users to +get its source. For example, if your program is a web application, its +interface could display a "Source" link that leads users to an archive +of the code. There are many ways you could offer source, and different +solutions will be better for different programs; see section 13 for the +specific requirements. + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU AGPL, see +. diff --git a/t/recipes/checks/debian/copyright/dep5/copyright-file-general/build-spec/debian/copyright-full-apache-2.copyright b/t/recipes/checks/debian/copyright/dep5/copyright-file-general/build-spec/debian/copyright-full-apache-2.copyright new file mode 100644 index 0000000..d645695 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/copyright-file-general/build-spec/debian/copyright-full-apache-2.copyright @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/t/recipes/checks/debian/copyright/dep5/copyright-file-general/build-spec/debian/copyright-full-gfdl.copyright b/t/recipes/checks/debian/copyright/dep5/copyright-file-general/build-spec/debian/copyright-full-gfdl.copyright new file mode 100644 index 0000000..4a0fe1c --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/copyright-file-general/build-spec/debian/copyright-full-gfdl.copyright @@ -0,0 +1,397 @@ + GNU Free Documentation License + Version 1.2, November 2002 + + + Copyright (C) 2000,2001,2002 Free Software Foundation, Inc. + 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + +0. PREAMBLE + +The purpose of this License is to make a manual, textbook, or other +functional and useful document "free" in the sense of freedom: to +assure everyone the effective freedom to copy and redistribute it, +with or without modifying it, either commercially or noncommercially. +Secondarily, this License preserves for the author and publisher a way +to get credit for their work, while not being considered responsible +for modifications made by others. + +This License is a kind of "copyleft", which means that derivative +works of the document must themselves be free in the same sense. It +complements the GNU General Public License, which is a copyleft +license designed for free software. + +We have designed this License in order to use it for manuals for free +software, because free software needs free documentation: a free +program should come with manuals providing the same freedoms that the +software does. But this License is not limited to software manuals; +it can be used for any textual work, regardless of subject matter or +whether it is published as a printed book. We recommend this License +principally for works whose purpose is instruction or reference. + + +1. APPLICABILITY AND DEFINITIONS + +This License applies to any manual or other work, in any medium, that +contains a notice placed by the copyright holder saying it can be +distributed under the terms of this License. Such a notice grants a +world-wide, royalty-free license, unlimited in duration, to use that +work under the conditions stated herein. The "Document", below, +refers to any such manual or work. Any member of the public is a +licensee, and is addressed as "you". You accept the license if you +copy, modify or distribute the work in a way requiring permission +under copyright law. + +A "Modified Version" of the Document means any work containing the +Document or a portion of it, either copied verbatim, or with +modifications and/or translated into another language. + +A "Secondary Section" is a named appendix or a front-matter section of +the Document that deals exclusively with the relationship of the +publishers or authors of the Document to the Document's overall subject +(or to related matters) and contains nothing that could fall directly +within that overall subject. (Thus, if the Document is in part a +textbook of mathematics, a Secondary Section may not explain any +mathematics.) The relationship could be a matter of historical +connection with the subject or with related matters, or of legal, +commercial, philosophical, ethical or political position regarding +them. + +The "Invariant Sections" are certain Secondary Sections whose titles +are designated, as being those of Invariant Sections, in the notice +that says that the Document is released under this License. If a +section does not fit the above definition of Secondary then it is not +allowed to be designated as Invariant. The Document may contain zero +Invariant Sections. If the Document does not identify any Invariant +Sections then there are none. + +The "Cover Texts" are certain short passages of text that are listed, +as Front-Cover Texts or Back-Cover Texts, in the notice that says that +the Document is released under this License. A Front-Cover Text may +be at most 5 words, and a Back-Cover Text may be at most 25 words. + +A "Transparent" copy of the Document means a machine-readable copy, +represented in a format whose specification is available to the +general public, that is suitable for revising the document +straightforwardly with generic text editors or (for images composed of +pixels) generic paint programs or (for drawings) some widely available +drawing editor, and that is suitable for input to text formatters or +for automatic translation to a variety of formats suitable for input +to text formatters. A copy made in an otherwise Transparent file +format whose markup, or absence of markup, has been arranged to thwart +or discourage subsequent modification by readers is not Transparent. +An image format is not Transparent if used for any substantial amount +of text. A copy that is not "Transparent" is called "Opaque". + +Examples of suitable formats for Transparent copies include plain +ASCII without markup, Texinfo input format, LaTeX input format, SGML +or XML using a publicly available DTD, and standard-conforming simple +HTML, PostScript or PDF designed for human modification. Examples of +transparent image formats include PNG, XCF and JPG. Opaque formats +include proprietary formats that can be read and edited only by +proprietary word processors, SGML or XML for which the DTD and/or +processing tools are not generally available, and the +machine-generated HTML, PostScript or PDF produced by some word +processors for output purposes only. + +The "Title Page" means, for a printed book, the title page itself, +plus such following pages as are needed to hold, legibly, the material +this License requires to appear in the title page. For works in +formats which do not have any title page as such, "Title Page" means +the text near the most prominent appearance of the work's title, +preceding the beginning of the body of the text. + +A section "Entitled XYZ" means a named subunit of the Document whose +title either is precisely XYZ or contains XYZ in parentheses following +text that translates XYZ in another language. (Here XYZ stands for a +specific section name mentioned below, such as "Acknowledgements", +"Dedications", "Endorsements", or "History".) To "Preserve the Title" +of such a section when you modify the Document means that it remains a +section "Entitled XYZ" according to this definition. + +The Document may include Warranty Disclaimers next to the notice which +states that this License applies to the Document. These Warranty +Disclaimers are considered to be included by reference in this +License, but only as regards disclaiming warranties: any other +implication that these Warranty Disclaimers may have is void and has +no effect on the meaning of this License. + + +2. VERBATIM COPYING + +You may copy and distribute the Document in any medium, either +commercially or noncommercially, provided that this License, the +copyright notices, and the license notice saying this License applies +to the Document are reproduced in all copies, and that you add no other +conditions whatsoever to those of this License. You may not use +technical measures to obstruct or control the reading or further +copying of the copies you make or distribute. However, you may accept +compensation in exchange for copies. If you distribute a large enough +number of copies you must also follow the conditions in section 3. + +You may also lend copies, under the same conditions stated above, and +you may publicly display copies. + + +3. COPYING IN QUANTITY + +If you publish printed copies (or copies in media that commonly have +printed covers) of the Document, numbering more than 100, and the +Document's license notice requires Cover Texts, you must enclose the +copies in covers that carry, clearly and legibly, all these Cover +Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on +the back cover. Both covers must also clearly and legibly identify +you as the publisher of these copies. The front cover must present +the full title with all words of the title equally prominent and +visible. You may add other material on the covers in addition. +Copying with changes limited to the covers, as long as they preserve +the title of the Document and satisfy these conditions, can be treated +as verbatim copying in other respects. + +If the required texts for either cover are too voluminous to fit +legibly, you should put the first ones listed (as many as fit +reasonably) on the actual cover, and continue the rest onto adjacent +pages. + +If you publish or distribute Opaque copies of the Document numbering +more than 100, you must either include a machine-readable Transparent +copy along with each Opaque copy, or state in or with each Opaque copy +a computer-network location from which the general network-using +public has access to download using public-standard network protocols +a complete Transparent copy of the Document, free of added material. +If you use the latter option, you must take reasonably prudent steps, +when you begin distribution of Opaque copies in quantity, to ensure +that this Transparent copy will remain thus accessible at the stated +location until at least one year after the last time you distribute an +Opaque copy (directly or through your agents or retailers) of that +edition to the public. + +It is requested, but not required, that you contact the authors of the +Document well before redistributing any large number of copies, to give +them a chance to provide you with an updated version of the Document. + + +4. MODIFICATIONS + +You may copy and distribute a Modified Version of the Document under +the conditions of sections 2 and 3 above, provided that you release +the Modified Version under precisely this License, with the Modified +Version filling the role of the Document, thus licensing distribution +and modification of the Modified Version to whoever possesses a copy +of it. In addition, you must do these things in the Modified Version: + +A. Use in the Title Page (and on the covers, if any) a title distinct + from that of the Document, and from those of previous versions + (which should, if there were any, be listed in the History section + of the Document). You may use the same title as a previous version + if the original publisher of that version gives permission. +B. List on the Title Page, as authors, one or more persons or entities + responsible for authorship of the modifications in the Modified + Version, together with at least five of the principal authors of the + Document (all of its principal authors, if it has fewer than five), + unless they release you from this requirement. +C. State on the Title page the name of the publisher of the + Modified Version, as the publisher. +D. Preserve all the copyright notices of the Document. +E. Add an appropriate copyright notice for your modifications + adjacent to the other copyright notices. +F. Include, immediately after the copyright notices, a license notice + giving the public permission to use the Modified Version under the + terms of this License, in the form shown in the Addendum below. +G. Preserve in that license notice the full lists of Invariant Sections + and required Cover Texts given in the Document's license notice. +H. Include an unaltered copy of this License. +I. Preserve the section Entitled "History", Preserve its Title, and add + to it an item stating at least the title, year, new authors, and + publisher of the Modified Version as given on the Title Page. If + there is no section Entitled "History" in the Document, create one + stating the title, year, authors, and publisher of the Document as + given on its Title Page, then add an item describing the Modified + Version as stated in the previous sentence. +J. Preserve the network location, if any, given in the Document for + public access to a Transparent copy of the Document, and likewise + the network locations given in the Document for previous versions + it was based on. These may be placed in the "History" section. + You may omit a network location for a work that was published at + least four years before the Document itself, or if the original + publisher of the version it refers to gives permission. +K. For any section Entitled "Acknowledgements" or "Dedications", + Preserve the Title of the section, and preserve in the section all + the substance and tone of each of the contributor acknowledgements + and/or dedications given therein. +L. Preserve all the Invariant Sections of the Document, + unaltered in their text and in their titles. Section numbers + or the equivalent are not considered part of the section titles. +M. Delete any section Entitled "Endorsements". Such a section + may not be included in the Modified Version. +N. Do not retitle any existing section to be Entitled "Endorsements" + or to conflict in title with any Invariant Section. +O. Preserve any Warranty Disclaimers. + +If the Modified Version includes new front-matter sections or +appendices that qualify as Secondary Sections and contain no material +copied from the Document, you may at your option designate some or all +of these sections as invariant. To do this, add their titles to the +list of Invariant Sections in the Modified Version's license notice. +These titles must be distinct from any other section titles. + +You may add a section Entitled "Endorsements", provided it contains +nothing but endorsements of your Modified Version by various +parties--for example, statements of peer review or that the text has +been approved by an organization as the authoritative definition of a +standard. + +You may add a passage of up to five words as a Front-Cover Text, and a +passage of up to 25 words as a Back-Cover Text, to the end of the list +of Cover Texts in the Modified Version. Only one passage of +Front-Cover Text and one of Back-Cover Text may be added by (or +through arrangements made by) any one entity. If the Document already +includes a cover text for the same cover, previously added by you or +by arrangement made by the same entity you are acting on behalf of, +you may not add another; but you may replace the old one, on explicit +permission from the previous publisher that added the old one. + +The author(s) and publisher(s) of the Document do not by this License +give permission to use their names for publicity for or to assert or +imply endorsement of any Modified Version. + + +5. COMBINING DOCUMENTS + +You may combine the Document with other documents released under this +License, under the terms defined in section 4 above for modified +versions, provided that you include in the combination all of the +Invariant Sections of all of the original documents, unmodified, and +list them all as Invariant Sections of your combined work in its +license notice, and that you preserve all their Warranty Disclaimers. + +The combined work need only contain one copy of this License, and +multiple identical Invariant Sections may be replaced with a single +copy. If there are multiple Invariant Sections with the same name but +different contents, make the title of each such section unique by +adding at the end of it, in parentheses, the name of the original +author or publisher of that section if known, or else a unique number. +Make the same adjustment to the section titles in the list of +Invariant Sections in the license notice of the combined work. + +In the combination, you must combine any sections Entitled "History" +in the various original documents, forming one section Entitled +"History"; likewise combine any sections Entitled "Acknowledgements", +and any sections Entitled "Dedications". You must delete all sections +Entitled "Endorsements". + + +6. COLLECTIONS OF DOCUMENTS + +You may make a collection consisting of the Document and other documents +released under this License, and replace the individual copies of this +License in the various documents with a single copy that is included in +the collection, provided that you follow the rules of this License for +verbatim copying of each of the documents in all other respects. + +You may extract a single document from such a collection, and distribute +it individually under this License, provided you insert a copy of this +License into the extracted document, and follow this License in all +other respects regarding verbatim copying of that document. + + +7. AGGREGATION WITH INDEPENDENT WORKS + +A compilation of the Document or its derivatives with other separate +and independent documents or works, in or on a volume of a storage or +distribution medium, is called an "aggregate" if the copyright +resulting from the compilation is not used to limit the legal rights +of the compilation's users beyond what the individual works permit. +When the Document is included in an aggregate, this License does not +apply to the other works in the aggregate which are not themselves +derivative works of the Document. + +If the Cover Text requirement of section 3 is applicable to these +copies of the Document, then if the Document is less than one half of +the entire aggregate, the Document's Cover Texts may be placed on +covers that bracket the Document within the aggregate, or the +electronic equivalent of covers if the Document is in electronic form. +Otherwise they must appear on printed covers that bracket the whole +aggregate. + + +8. TRANSLATION + +Translation is considered a kind of modification, so you may +distribute translations of the Document under the terms of section 4. +Replacing Invariant Sections with translations requires special +permission from their copyright holders, but you may include +translations of some or all Invariant Sections in addition to the +original versions of these Invariant Sections. You may include a +translation of this License, and all the license notices in the +Document, and any Warranty Disclaimers, provided that you also include +the original English version of this License and the original versions +of those notices and disclaimers. In case of a disagreement between +the translation and the original version of this License or a notice +or disclaimer, the original version will prevail. + +If a section in the Document is Entitled "Acknowledgements", +"Dedications", or "History", the requirement (section 4) to Preserve +its Title (section 1) will typically require changing the actual +title. + + +9. TERMINATION + +You may not copy, modify, sublicense, or distribute the Document except +as expressly provided for under this License. Any other attempt to +copy, modify, sublicense or distribute the Document is void, and will +automatically terminate your rights under this License. However, +parties who have received copies, or rights, from you under this +License will not have their licenses terminated so long as such +parties remain in full compliance. + + +10. FUTURE REVISIONS OF THIS LICENSE + +The Free Software Foundation may publish new, revised versions +of the GNU Free Documentation License from time to time. Such new +versions will be similar in spirit to the present version, but may +differ in detail to address new problems or concerns. See +http://www.gnu.org/copyleft/. + +Each version of the License is given a distinguishing version number. +If the Document specifies that a particular numbered version of this +License "or any later version" applies to it, you have the option of +following the terms and conditions either of that specified version or +of any later version that has been published (not as a draft) by the +Free Software Foundation. If the Document does not specify a version +number of this License, you may choose any version ever published (not +as a draft) by the Free Software Foundation. + + +ADDENDUM: How to use this License for your documents + +To use this License in a document you have written, include a copy of +the License in the document and put the following copyright and +license notices just after the title page: + + Copyright (c) YEAR YOUR NAME. + Permission is granted to copy, distribute and/or modify this document + under the terms of the GNU Free Documentation License, Version 1.2 + or any later version published by the Free Software Foundation; + with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. + A copy of the license is included in the section entitled "GNU + Free Documentation License". + +If you have Invariant Sections, Front-Cover Texts and Back-Cover Texts, +replace the "with...Texts." line with this: + + with the Invariant Sections being LIST THEIR TITLES, with the + Front-Cover Texts being LIST, and with the Back-Cover Texts being LIST. + +If you have Invariant Sections without Cover Texts, or some other +combination of the three, merge those two alternatives to suit the +situation. + +If your document contains nontrivial examples of program code, we +recommend releasing these examples in parallel under your choice of +free software license, such as the GNU General Public License, +to permit their use in free software. diff --git a/t/recipes/checks/debian/copyright/dep5/copyright-file-general/build-spec/debian/copyright-full-gpl-1.copyright b/t/recipes/checks/debian/copyright/dep5/copyright-file-general/build-spec/debian/copyright-full-gpl-1.copyright new file mode 100644 index 0000000..1facebe --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/copyright-file-general/build-spec/debian/copyright-full-gpl-1.copyright @@ -0,0 +1,206 @@ +A copy of the GNU General Public License is available on +the World Wide Web at `http://www.gnu.org/licenses/old-licenses/gpl-1.0.txt'. You can +also obtain it by writing to the Free Software Foundation, Inc., 51 +Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + THE COPYRIGHT HOLDER DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, + INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO + EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY SPECIAL, INDIRECT OR + CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, + DATA, PROFITS, QPA OR GPA, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE + OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR + PERFORMANCE OF THIS SOFTWARE. + + + GNU GENERAL PUBLIC LICENSE + Version 1, February 1989 + + Copyright (C) 1989 Free Software Foundation, Inc. + 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The license agreements of most software companies try to keep users +at the mercy of those companies. By contrast, our General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. The +General Public License applies to the Free Software Foundation's +software and to any other program whose authors commit to using it. +You can use it for your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Specifically, the General Public License is designed to make +sure that you have the freedom to give away or sell copies of free +software, that you receive source code or can get it if you want it, +that you can change the software or use pieces of it in new free +programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of a such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must tell them their rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License Agreement applies to any program or other work which +contains a notice placed by the copyright holder saying it may be +distributed under the terms of this General Public License. The +"Program", below, refers to any such program or work, and a "work based +on the Program" means either the Program or any work containing the +Program or a portion of it, either verbatim or with modifications. Each +licensee is addressed as "you". + + 1. You may copy and distribute verbatim copies of the Program's source +code as you receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice and +disclaimer of warranty; keep intact all the notices that refer to this +General Public License and to the absence of any warranty; and give any +other recipients of the Program a copy of this General Public License +along with the Program. You may charge a fee for the physical act of +transferring a copy. + + 2. You may modify your copy or copies of the Program or any portion of +it, and copy and distribute such modifications under the terms of Paragraph +1 above, provided that you also do the following: + + a) cause the modified files to carry prominent notices stating that + you changed the files and the date of any change; and + + b) cause the whole of any work that you distribute or publish, that + in whole or in part contains the Program or any part thereof, either + with or without modifications, to be licensed at no charge to all + third parties under the terms of this General Public License (except + that you may choose to grant warranty protection to some or all + third parties, at your option). + + c) If the modified program normally reads commands interactively when + run, you must cause it, when started running for such interactive use + in the simplest and most usual way, to print or display an + announcement including an appropriate copyright notice and a notice + that there is no warranty (or else, saying that you provide a + warranty) and that users may redistribute the program under these + conditions, and telling the user how to view a copy of this General + Public License. + + d) You may charge a fee for the physical act of transferring a + copy, and you may at your option offer warranty protection in + exchange for a fee. + +Mere aggregation of another independent work with the Program (or its +derivative) on a volume of a storage or distribution medium does not bring +the other work under the scope of these terms. + + 3. You may copy and distribute the Program (or a portion or derivative of +it, under Paragraph 2) in object code or executable form under the terms of +Paragraphs 1 and 2 above provided that you also do one of the following: + + a) accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of + Paragraphs 1 and 2 above; or, + + b) accompany it with a written offer, valid for at least three + years, to give any third party free (except for a nominal charge + for the cost of distribution) a complete machine-readable copy of the + corresponding source code, to be distributed under the terms of + Paragraphs 1 and 2 above; or, + + c) accompany it with the information you received as to where the + corresponding source code may be obtained. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form alone.) + +Source code for a work means the preferred form of the work for making +modifications to it. For an executable file, complete source code means +all the source code for all modules it contains; but, as a special +exception, it need not include source code for modules which are standard +libraries that accompany the operating system on which the executable +file runs, or for standard header files or definitions files that +accompany that operating system. + + 4. You may not copy, modify, sublicense, distribute or transfer the +Program except as expressly provided under this General Public License. +Any attempt otherwise to copy, modify, sublicense, distribute or transfer +the Program is void, and will automatically terminate your rights to use +the Program under this License. However, parties who have received +copies, or rights to use copies, from you under this General Public +License will not have their licenses terminated so long as such parties +remain in full compliance. + + 5. By copying, distributing or modifying the Program (or any work based +on the Program) you indicate your acceptance of this license to do so, +and all its terms and conditions. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the original +licensor to copy, distribute or modify the Program subject to these +terms and conditions. You may not impose any further restrictions on the +recipients' exercise of the rights granted herein. + + 7. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of the license which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +the license, you may choose any version ever published by the Free Software +Foundation. + + 8. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 9. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 10. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + diff --git a/t/recipes/checks/debian/copyright/dep5/copyright-file-general/build-spec/debian/copyright-full-gpl-2.copyright b/t/recipes/checks/debian/copyright/dep5/copyright-file-general/build-spec/debian/copyright-full-gpl-2.copyright new file mode 100644 index 0000000..f94bb0d --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/copyright-file-general/build-spec/debian/copyright-full-gpl-2.copyright @@ -0,0 +1,344 @@ +A copy of the GNU General Public License is available on +the World Wide Web at `http://www.gnu.org/licenses/gpl-2.0.txt'. You can +also obtain it by writing to the Free Software Foundation, Inc., 51 +Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Lesser General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + , 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. diff --git a/t/recipes/checks/debian/copyright/dep5/copyright-file-general/build-spec/debian/copyright-full-gpl.copyright b/t/recipes/checks/debian/copyright/dep5/copyright-file-general/build-spec/debian/copyright-full-gpl.copyright new file mode 100644 index 0000000..94a9ed0 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/copyright-file-general/build-spec/debian/copyright-full-gpl.copyright @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + Copyright (C) + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +. + + The GNU General Public License does not permit incorporating your program +into proprietary programs. If your program is a subroutine library, you +may consider it more useful to permit linking proprietary applications with +the library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. But first, please read +. diff --git a/t/recipes/checks/debian/copyright/dep5/copyright-file-general/build-spec/debian/copyright-full-lgpl.copyright b/t/recipes/checks/debian/copyright/dep5/copyright-file-general/build-spec/debian/copyright-full-lgpl.copyright new file mode 100644 index 0000000..5dabe34 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/copyright-file-general/build-spec/debian/copyright-full-lgpl.copyright @@ -0,0 +1,171 @@ +A copy of the GNU Lesser General Public License is available on +the World Wide Web at `http://www.gnu.org/licenses/lgpl-3.0.txt'. You can +also obtain it by writing to the Free Software Foundation, Inc., 51 +Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + + GNU LESSER GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + + This version of the GNU Lesser General Public License incorporates +the terms and conditions of version 3 of the GNU General Public +License, supplemented by the additional permissions listed below. + + 0. Additional Definitions. + + As used herein, "this License" refers to version 3 of the GNU Lesser +General Public License, and the "GNU GPL" refers to version 3 of the GNU +General Public License. + + "The Library" refers to a covered work governed by this License, +other than an Application or a Combined Work as defined below. + + An "Application" is any work that makes use of an interface provided +by the Library, but which is not otherwise based on the Library. +Defining a subclass of a class defined by the Library is deemed a mode +of using an interface provided by the Library. + + A "Combined Work" is a work produced by combining or linking an +Application with the Library. The particular version of the Library +with which the Combined Work was made is also called the "Linked +Version". + + The "Minimal Corresponding Source" for a Combined Work means the +Corresponding Source for the Combined Work, excluding any source code +for portions of the Combined Work that, considered in isolation, are +based on the Application, and not on the Linked Version. + + The "Corresponding Application Code" for a Combined Work means the +object code and/or source code for the Application, including any data +and utility programs needed for reproducing the Combined Work from the +Application, but excluding the System Libraries of the Combined Work. + + 1. Exception to Section 3 of the GNU GPL. + + You may convey a covered work under sections 3 and 4 of this License +without being bound by section 3 of the GNU GPL. + + 2. Conveying Modified Versions. + + If you modify a copy of the Library, and, in your modifications, a +facility refers to a function or data to be supplied by an Application +that uses the facility (other than as an argument passed when the +facility is invoked), then you may convey a copy of the modified +version: + + a) under this License, provided that you make a good faith effort to + ensure that, in the event an Application does not supply the + function or data, the facility still operates, and performs + whatever part of its purpose remains meaningful, or + + b) under the GNU GPL, with none of the additional permissions of + this License applicable to that copy. + + 3. Object Code Incorporating Material from Library Header Files. + + The object code form of an Application may incorporate material from +a header file that is part of the Library. You may convey such object +code under terms of your choice, provided that, if the incorporated +material is not limited to numerical parameters, data structure +layouts and accessors, or small macros, inline functions and templates +(ten or fewer lines in length), you do both of the following: + + a) Give prominent notice with each copy of the object code that the + Library is used in it and that the Library and its use are + covered by this License. + + b) Accompany the object code with a copy of the GNU GPL and this license + document. + + 4. Combined Works. + + You may convey a Combined Work under terms of your choice that, +taken together, effectively do not restrict modification of the +portions of the Library contained in the Combined Work and reverse +engineering for debugging such modifications, if you also do each of +the following: + + a) Give prominent notice with each copy of the Combined Work that + the Library is used in it and that the Library and its use are + covered by this License. + + b) Accompany the Combined Work with a copy of the GNU GPL and this license + document. + + c) For a Combined Work that displays copyright notices during + execution, include the copyright notice for the Library among + these notices, as well as a reference directing the user to the + copies of the GNU GPL and this license document. + + d) Do one of the following: + + 0) Convey the Minimal Corresponding Source under the terms of this + License, and the Corresponding Application Code in a form + suitable for, and under terms that permit, the user to + recombine or relink the Application with a modified version of + the Linked Version to produce a modified Combined Work, in the + manner specified by section 6 of the GNU GPL for conveying + Corresponding Source. + + 1) Use a suitable shared library mechanism for linking with the + Library. A suitable mechanism is one that (a) uses at run time + a copy of the Library already present on the user's computer + system, and (b) will operate properly with a modified version + of the Library that is interface-compatible with the Linked + Version. + + e) Provide Installation Information, but only if you would otherwise + be required to provide such information under section 6 of the + GNU GPL, and only to the extent that such information is + necessary to install and execute a modified version of the + Combined Work produced by recombining or relinking the + Application with a modified version of the Linked Version. (If + you use option 4d0, the Installation Information must accompany + the Minimal Corresponding Source and Corresponding Application + Code. If you use option 4d1, you must provide the Installation + Information in the manner specified by section 6 of the GNU GPL + for conveying Corresponding Source.) + + 5. Combined Libraries. + + You may place library facilities that are a work based on the +Library side by side in a single library together with other library +facilities that are not Applications and are not covered by this +License, and convey such a combined library under terms of your +choice, if you do both of the following: + + a) Accompany the combined library with a copy of the same work based + on the Library, uncombined with any other library facilities, + conveyed under the terms of this License. + + b) Give prominent notice with the combined library that part of it + is a work based on the Library, and explaining where to find the + accompanying uncombined form of the same work. + + 6. Revised Versions of the GNU Lesser General Public License. + + The Free Software Foundation may publish revised and/or new versions +of the GNU Lesser General Public License from time to time. Such new +versions will be similar in spirit to the present version, but may +differ in detail to address new problems or concerns. + + Each version is given a distinguishing version number. If the +Library as you received it specifies that a certain numbered version +of the GNU Lesser General Public License "or any later version" +applies to it, you have the option of following the terms and +conditions either of that published version or of any later version +published by the Free Software Foundation. If the Library as you +received it does not specify a version number of the GNU Lesser +General Public License, you may choose any version of the GNU Lesser +General Public License ever published by the Free Software Foundation. + + If the Library as you received it specifies that a proxy can decide +whether future versions of the GNU Lesser General Public License shall +apply, that proxy's public statement of acceptance of any version is +permanent authorization for you to choose that version for the +Library. diff --git a/t/recipes/checks/debian/copyright/dep5/copyright-file-general/build-spec/debian/copyright-iso-8859-1.copyright b/t/recipes/checks/debian/copyright/dep5/copyright-file-general/build-spec/debian/copyright-iso-8859-1.copyright new file mode 100644 index 0000000..78a493a --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/copyright-file-general/build-spec/debian/copyright-iso-8859-1.copyright @@ -0,0 +1,3 @@ +Copyright (C) 2008 Author + +uerst rgerlich, falls nicht UTF-8 benutzt wrde. diff --git a/t/recipes/checks/debian/copyright/dep5/copyright-file-general/build-spec/debian/copyright-misc-errors.copyright b/t/recipes/checks/debian/copyright/dep5/copyright-file-general/build-spec/debian/copyright-misc-errors.copyright new file mode 100644 index 0000000..dceee0e --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/copyright-file-general/build-spec/debian/copyright-misc-errors.copyright @@ -0,0 +1,22 @@ +This copyright file contains several errors. + +Downloaded from + +You should not use the template for +Upstream Author(s): Tobias +Copyright 2008 Tobias + +The path /usr/share/common-licences/GPL contains a spelling error. + +It's wrong to reference a compressed license, like this: +/usr/share/common-licenses/BSD.gz + +This path /usr/share/doc/copyright is obsolete. + +The path /usr/share/common-licenses/GPL2 is missing a hyphen. + +This copyright info was automatically extracted from the perl module. +It may not be accurate, so you better check the module sources +if you don't want to get into legal troubles. + +References to /usr/share/common-licenses/BSD are deprecated. diff --git a/t/recipes/checks/debian/copyright/dep5/copyright-file-general/build-spec/debian/copyright-missing-apache2-license-pointer.copyright b/t/recipes/checks/debian/copyright/dep5/copyright-file-general/build-spec/debian/copyright-missing-apache2-license-pointer.copyright new file mode 100644 index 0000000..e71e0f0 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/copyright-file-general/build-spec/debian/copyright-missing-apache2-license-pointer.copyright @@ -0,0 +1,25 @@ +Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Upstream-Name: Midnight Commander +Source: http://www.midnight-commander.org/downloads +Copyright: 1996-2013 Free Software Foundation +License: Apache-2.0 + +Files: * +Copyright: 2004,2007 Oren Ben-Kiki +License: Apache-2.0 + +License: Apache-2.0 + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with + the License. You may obtain a copy of the License at + . + http://www.apache.org/licenses/LICENSE-2.0 + . + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/t/recipes/checks/debian/copyright/dep5/copyright-file-general/build-spec/debian/copyright-missing-perl-license-pointer.copyright b/t/recipes/checks/debian/copyright/dep5/copyright-file-general/build-spec/debian/copyright-missing-perl-license-pointer.copyright new file mode 100644 index 0000000..97f8cda --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/copyright-file-general/build-spec/debian/copyright-missing-perl-license-pointer.copyright @@ -0,0 +1,5 @@ +This copyright file is for libmythical-perl. The module is licenses under +the same terms as Perl itself but we've forgotten to add a reference to the +copy of the Perl license in common-licenses. + +Copyright 2010 The Mythical Perl Module Team diff --git a/t/recipes/checks/debian/copyright/dep5/copyright-file-general/build-spec/debian/copyright-no-errors.copyright b/t/recipes/checks/debian/copyright/dep5/copyright-file-general/build-spec/debian/copyright-no-errors.copyright new file mode 100644 index 0000000..d31a720 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/copyright-file-general/build-spec/debian/copyright-no-errors.copyright @@ -0,0 +1,36 @@ +This package was debianized by Tobias Toedter on +Thu, 20 Mar 2008 23:48:15 +0100 + +It was downloaded from + +Format-Specification: http://wiki.debian.org/Proposals/CopyrightFormat?recall=184 + +Upstream Authors: + + Tobias Toedter + +Copyright: + + Copyright (C) 2008 Tobias Toedter + +License: + + This package is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This package is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this package; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +On Debian systems, the complete text of the GNU General +Public License can be found in `/usr/share/common-licenses/GPL-2'. + +The Debian packaging is Copyright 2008, Tobias Toedter +and is licensed under the GPL, see above. diff --git a/t/recipes/checks/debian/copyright/dep5/copyright-file-general/build-spec/debian/copyright-old-fsf.copyright b/t/recipes/checks/debian/copyright/dep5/copyright-file-general/build-spec/debian/copyright-old-fsf.copyright new file mode 100644 index 0000000..00946fc --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/copyright-file-general/build-spec/debian/copyright-old-fsf.copyright @@ -0,0 +1,19 @@ +To the extend this is copyrightable (if at all), it is: + Copyright 2012 Niels Thykier . + +This program is free software; you may redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +This is distributed in the hope that it will be useful, but without +any warranty; without even the implied warranty of merchantability or +fitness for a particular purpose. See the GNU General Public License +for more details. + +A copy of the GNU General Public License version 2 is available as +/usr/share/common-licenses/GPL-2 in the Debian GNU/Linux distribution +or at http://www.gnu.org/licenses/old-licenses/gpl-2.0.html. +You can also obtain it by writing to the Free Software Foundation, Inc., +Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + diff --git a/t/recipes/checks/debian/copyright/dep5/copyright-file-general/build-spec/debian/copyright-php.copyright b/t/recipes/checks/debian/copyright/dep5/copyright-file-general/build-spec/debian/copyright-php.copyright new file mode 100644 index 0000000..338cf09 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/copyright-file-general/build-spec/debian/copyright-php.copyright @@ -0,0 +1,151 @@ +A copyright file referring to two problematic PHP licenses. + +Copyright 2008 Some Guy. + +-------------------------------------------------------------------- + The PHP License, version 2.02 +Copyright (c) 1999 - 2002 The PHP Group. All rights reserved. +-------------------------------------------------------------------- + +Redistribution and use in source and binary forms, with or without +modification, is permitted provided that the following conditions +are met: + + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + + 3. The name "PHP" must not be used to endorse or promote products + derived from this software without prior permission from the + PHP Group. This does not apply to add-on libraries or tools + that work in conjunction with PHP. In such a case the PHP + name may be used to indicate that the product supports PHP. + + 4. The PHP Group may publish revised and/or new versions of the + license from time to time. Each version will be given a + distinguishing version number. + Once covered code has been published under a particular version + of the license, you may always continue to use it under the + terms of that version. You may also choose to use such covered + code under the terms of any subsequent version of the license + published by the PHP Group. No one other than the PHP Group has + the right to modify the terms applicable to covered code created + under this License. + + 5. Redistributions of any form whatsoever must retain the following + acknowledgment: + "This product includes PHP, freely available from + http://www.php.net/". + + 6. The software incorporates the Zend Engine, a product of Zend + Technologies, Ltd. ("Zend"). The Zend Engine is licensed to the + PHP Association (pursuant to a grant from Zend that can be + found at http://www.php.net/license/ZendGrant/) for + distribution to you under this license agreement, only as a + part of PHP. In the event that you separate the Zend Engine + (or any portion thereof) from the rest of the software, or + modify the Zend Engine, or any portion thereof, your use of the + separated or modified Zend Engine software shall not be governed + by this license, and instead shall be governed by the license + set forth at http://www.zend.com/license/ZendLicense/. + + + +THIS SOFTWARE IS PROVIDED BY THE PHP DEVELOPMENT TEAM ``AS IS'' AND +ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A +PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE PHP +DEVELOPMENT TEAM OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, +INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, +STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED +OF THE POSSIBILITY OF SUCH DAMAGE. + +-------------------------------------------------------------------- + +This software consists of voluntary contributions made by many +individuals on behalf of the PHP Group. + +The PHP Group can be contacted via Email at group@php.net. + +For more information on the PHP Group and the PHP project, +please see . + + + + +-------------------------------------------------------------------- + The PHP License, version 3.0 +Copyright (c) 1999 - 2003 The PHP Group. All rights reserved. +-------------------------------------------------------------------- + +Redistribution and use in source and binary forms, with or without +modification, is permitted provided that the following conditions +are met: + + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in + the documentation and/or other materials provided with the + distribution. + + 3. The name "PHP" must not be used to endorse or promote products + derived from this software without prior written permission. For + written permission, please contact group@php.net. + + 4. Products derived from this software may not be called "PHP", nor + may "PHP" appear in their name, without prior written permission + from group@php.net. You may indicate that your software works in + conjunction with PHP by saying "Foo for PHP" instead of calling + it "PHP Foo" or "phpfoo" + + 5. The PHP Group may publish revised and/or new versions of the + license from time to time. Each version will be given a + distinguishing version number. + Once covered code has been published under a particular version + of the license, you may always continue to use it under the terms + of that version. You may also choose to use such covered code + under the terms of any subsequent version of the license + published by the PHP Group. No one other than the PHP Group has + the right to modify the terms applicable to covered code created + under this License. + + 6. Redistributions of any form whatsoever must retain the following + acknowledgment: + "This product includes PHP, freely available from + ". + +THIS SOFTWARE IS PROVIDED BY THE PHP DEVELOPMENT TEAM ``AS IS'' AND +ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A +PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE PHP +DEVELOPMENT TEAM OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, +INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, +STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED +OF THE POSSIBILITY OF SUCH DAMAGE. + +-------------------------------------------------------------------- + +This software consists of voluntary contributions made by many +individuals on behalf of the PHP Group. + +The PHP Group can be contacted via Email at group@php.net. + +For more information on the PHP Group and the PHP project, +please see . + +This product includes the Zend Engine, freely available at +. diff --git a/t/recipes/checks/debian/copyright/dep5/copyright-file-general/build-spec/debian/copyright-poor-common-licenses.copyright b/t/recipes/checks/debian/copyright/dep5/copyright-file-general/build-spec/debian/copyright-poor-common-licenses.copyright new file mode 100644 index 0000000..5a24980 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/copyright-file-general/build-spec/debian/copyright-poor-common-licenses.copyright @@ -0,0 +1,24 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see + +The full text of this license is in common-licenses/GPL-3 + diff --git a/t/recipes/checks/debian/copyright/dep5/copyright-file-general/build-spec/debian/copyright-versionless.copyright b/t/recipes/checks/debian/copyright/dep5/copyright-file-general/build-spec/debian/copyright-versionless.copyright new file mode 100644 index 0000000..c08f501 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/copyright-file-general/build-spec/debian/copyright-versionless.copyright @@ -0,0 +1,2 @@ +This package is copyright (c) 2009, Some Name and is +licensed under the GPL, see `/usr/share/common-licenses/GPL'. diff --git a/t/recipes/checks/debian/copyright/dep5/copyright-file-general/build-spec/debian/copyright-w3c.copyright b/t/recipes/checks/debian/copyright/dep5/copyright-file-general/build-spec/debian/copyright-w3c.copyright new file mode 100644 index 0000000..95c3f40 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/copyright-file-general/build-spec/debian/copyright-w3c.copyright @@ -0,0 +1,95 @@ +This package was debianized by J Random Developer on +Tue, 8 Nov 2005 00:27:44 +0100. + +It was downloaded from http://search.cpan.org/dist/W3C-LinkChecker/ + +Copyright Holder: the software was developed by following people for the + W3C: + The W3C Link Checker Team + +License: according to the README file, the source code of the W3C linkchecker +is available under the terms of the W3C Software Copyright (compatible with +the GNU GPL), which can be found at + + http://www.w3.org/Consortium/Legal/copyright-software + +and is reproduced below: + + + W3C � SOFTWARE NOTICE AND LICENSE + + [1]http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231 + + This work (and included software, documentation such as READMEs, or + other related items) is being provided by the copyright holders under + the following license. By obtaining, using and/or copying this work, + you (the licensee) agree that you have read, understood, and will + comply with the following terms and conditions. + + Permission to copy, modify, and distribute this software and its + documentation, with or without modification, for any purpose and + without fee or royalty is hereby granted, provided that you include + the following on ALL copies of the software and documentation or + portions thereof, including modifications: + 1. The full text of this NOTICE in a location viewable to users of + the redistributed or derivative work. + 2. Any pre-existing intellectual property disclaimers, notices, or + terms and conditions. If none exist, the [2]W3C Software Short + Notice should be included (hypertext is preferred, text is + permitted) within the body of any redistributed or derivative + code. + 3. Notice of any changes or modifications to the files, including the + date changes were made. (We recommend you provide URIs to the + location from which the code is derived.) + + THIS SOFTWARE AND DOCUMENTATION IS PROVIDED "AS IS," AND COPYRIGHT + HOLDERS MAKE NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, + INCLUDING BUT NOT LIMITED TO, WARRANTIES OF MERCHANTABILITY OR FITNESS + FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF THE SOFTWARE OR + DOCUMENTATION WILL NOT INFRINGE ANY THIRD PARTY PATENTS, COPYRIGHTS, + TRADEMARKS OR OTHER RIGHTS. + + COPYRIGHT HOLDERS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL + OR CONSEQUENTIAL DAMAGES ARISING OUT OF ANY USE OF THE SOFTWARE OR + DOCUMENTATION. + + The name and trademarks of copyright holders may NOT be used in + advertising or publicity pertaining to the software without specific, + written prior permission. Title to copyright in this software and any + associated documentation will at all times remain with copyright + holders. + + ____________________________________ + + This formulation of W3C's notice and license became active on December + 31 2002. This version removes the copyright ownership notice such that + this license can be used with materials other than those owned by the + W3C, reflects that ERCIM is now a host of the W3C, includes references + to this specific dated version of the license, and removes the + ambiguous grant of "use". Otherwise, this version is the same as the + [3]previous version and is written so as to preserve the [4]Free + Software Foundation's assessment of GPL compatibility and [5]OSI's + certification under the [6]Open Source Definition. Please see our + [7]Copyright FAQ for common questions about using materials from our + site, including specific terms and conditions for packages like + libwww, Amaya, and Jigsaw. Other questions about this notice can be + directed to [8]site-policy@w3.org. + + + Joseph Reagle <[9]site-policy@w3.org> + + Last revised $Id: copyright-software-20021231.html,v 1.11 2004/07/06 + 16:02:49 slesch Exp $ + +References + + 1. http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231 + 2. http://www.w3.org/Consortium/Legal/2002/copyright-software-short-notice-20021231.html + 3. http://www.w3.org/Consortium/Legal/copyright-software-19980720 + 4. http://www.gnu.org/philosophy/license-list.html#GPLCompatibleLicenses + 5. http://www.opensource.org/licenses/W3C.php + 6. http://www.opensource.org/docs/definition.php + 7. http://www.w3.org/Consortium/Legal/IPR-FAQ + 8. mailto:site-policy@w3.org + 9. mailto:site-policy@w3.org + diff --git a/t/recipes/checks/debian/copyright/dep5/copyright-file-general/build-spec/debian/rules b/t/recipes/checks/debian/copyright/dep5/copyright-file-general/build-spec/debian/rules new file mode 100755 index 0000000..50ff78f --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/copyright-file-general/build-spec/debian/rules @@ -0,0 +1,14 @@ +#!/usr/bin/make -f +%: + dh $@ + +override_dh_installdocs: + dh_installdocs + install -m 644 debian/copyright-no-errors.copyright debian/copyright-symlink/usr/share/doc/copyright-symlink/symlink + rm debian/copyright-symlink/usr/share/doc/copyright-symlink/copyright + ln -s symlink debian/copyright-symlink/usr/share/doc/copyright-symlink/copyright + gzip -n -9 debian/copyright-compressed/usr/share/doc/copyright-compressed/copyright + mkdir -p debian/copyright-old-style/usr/doc/copyright + # This should (now) trigger a no-copyright-file (as there is no copyright file + # in the right location). + mv debian/copyright-old-style/usr/share/doc/copyright-old-style/copyright debian/copyright-old-style/usr/doc/copyright/copyright-old-style diff --git a/t/recipes/checks/debian/copyright/dep5/copyright-file-general/build-spec/fill-values b/t/recipes/checks/debian/copyright/dep5/copyright-file-general/build-spec/fill-values new file mode 100644 index 0000000..1bf7f36 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/copyright-file-general/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: upload-native +Testname: copyright-file-general +Description: Test checking of copyright files diff --git a/t/recipes/checks/debian/copyright/dep5/copyright-file-general/eval/desc b/t/recipes/checks/debian/copyright/dep5/copyright-file-general/eval/desc new file mode 100644 index 0000000..aeb8c23 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/copyright-file-general/eval/desc @@ -0,0 +1,2 @@ +Testname: copyright-file-general +Check: debian/copyright/dep5 diff --git a/t/recipes/checks/debian/copyright/dep5/copyright-file-general/eval/hints b/t/recipes/checks/debian/copyright/dep5/copyright-file-general/eval/hints new file mode 100644 index 0000000..1247240 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/copyright-file-general/eval/hints @@ -0,0 +1,16 @@ +copyright-file-general (source): wiki-copyright-format-uri http://wiki.debian.org/Proposals/CopyrightFormat?recall=184 [debian/copyright-crln.copyright] +copyright-file-general (source): unknown-copyright-format-uri [debian/copyright-no-errors.copyright] +copyright-file-general (source): no-dep5-copyright [debian/copyright-w3c.copyright] +copyright-file-general (source): no-dep5-copyright [debian/copyright-versionless.copyright] +copyright-file-general (source): no-dep5-copyright [debian/copyright-poor-common-licenses.copyright] +copyright-file-general (source): no-dep5-copyright [debian/copyright-php.copyright] +copyright-file-general (source): no-dep5-copyright [debian/copyright-old-fsf.copyright] +copyright-file-general (source): no-dep5-copyright [debian/copyright-missing-perl-license-pointer.copyright] +copyright-file-general (source): no-dep5-copyright [debian/copyright-misc-errors.copyright] +copyright-file-general (source): no-dep5-copyright [debian/copyright-full-lgpl.copyright] +copyright-file-general (source): no-dep5-copyright [debian/copyright-full-gpl.copyright] +copyright-file-general (source): no-dep5-copyright [debian/copyright-full-gpl-2.copyright] +copyright-file-general (source): no-dep5-copyright [debian/copyright-full-gpl-1.copyright] +copyright-file-general (source): no-dep5-copyright [debian/copyright-full-gfdl.copyright] +copyright-file-general (source): no-dep5-copyright [debian/copyright-full-apache-2.copyright] +copyright-file-general (source): no-dep5-copyright [debian/copyright-full-agpl-3.copyright] diff --git a/t/recipes/checks/debian/copyright/dep5/copyright-file-license-symlink/build-spec/debian/control.in b/t/recipes/checks/debian/copyright/dep5/copyright-file-license-symlink/build-spec/debian/control.in new file mode 100644 index 0000000..c41fc78 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/copyright-file-license-symlink/build-spec/debian/control.in @@ -0,0 +1,28 @@ +Source: [% $source %] +Priority: optional +Section: [% $section %] +Maintainer: [% $author %] +Standards-Version: [% $standards_version %] +Build-Depends: [% $build_depends %] +Rules-Requires-Root: no +Homepage: https://lintian.debian.org/ + +Package: [% $source %]-bad +Architecture: [% $package_architecture %] +Depends: ${misc:Depends} +Description: [% $description %] + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. + +Package: [% $source %]-pedantic +Architecture: [% $package_architecture %] +Depends: ${misc:Depends} +Description: [% $description %] -- pedantic edition :) + Checks the pedantic version of the versionless copyright file check. + . + This is a test package designed to exercise some check of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. diff --git a/t/recipes/checks/debian/copyright/dep5/copyright-file-license-symlink/build-spec/debian/copyright-file-license-symlink-bad.copyright b/t/recipes/checks/debian/copyright/dep5/copyright-file-license-symlink/build-spec/debian/copyright-file-license-symlink-bad.copyright new file mode 100644 index 0000000..b59cb92 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/copyright-file-license-symlink/build-spec/debian/copyright-file-license-symlink-bad.copyright @@ -0,0 +1,20 @@ +This is part of the testsuite of lintian. See the file debian/copyright +in the lintian source directory for more details. + +So far as it is copyrightable at all, this template is + Copyright (C) 2008 Frank Lichtenheld + +This program is free software; you may redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation in its version 3. + +This is distributed in the hope that it will be useful, but without +any warranty; without even the implied warranty of merchantability or +fitness for a particular purpose. See the GNU General Public License +for more details. + +A copy of the GNU General Public License version 3 is available as +/usr/share/common-licenses/GPL in the Debian GNU/Linux distribution +or at http://www.gnu.org/licenses/old-licenses/gpl-3.0.html. +You can also obtain it by writing to the Free Software Foundation, Inc., +51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/t/recipes/checks/debian/copyright/dep5/copyright-file-license-symlink/build-spec/debian/copyright-file-license-symlink-pedantic.copyright b/t/recipes/checks/debian/copyright/dep5/copyright-file-license-symlink/build-spec/debian/copyright-file-license-symlink-pedantic.copyright new file mode 100644 index 0000000..2591c9b --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/copyright-file-license-symlink/build-spec/debian/copyright-file-license-symlink-pedantic.copyright @@ -0,0 +1,21 @@ +This is part of the testsuite of lintian. See the file debian/copyright +in the lintian source directory for more details. + +So far as it is copyrightable at all, this template is + Copyright (C) 2008 Frank Lichtenheld + +This program is free software; you may redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +This is distributed in the hope that it will be useful, but without +any warranty; without even the implied warranty of merchantability or +fitness for a particular purpose. See the GNU General Public License +for more details. + +A copy of the GNU General Public License version 2 is available as +/usr/share/common-licenses/GPL in the Debian GNU/Linux distribution +or at http://www.gnu.org/licenses/old-licenses/gpl-2.0.html. +You can also obtain it by writing to the Free Software Foundation, Inc., +51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/t/recipes/checks/debian/copyright/dep5/copyright-file-license-symlink/build-spec/fill-values b/t/recipes/checks/debian/copyright/dep5/copyright-file-license-symlink/build-spec/fill-values new file mode 100644 index 0000000..1a3cd35 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/copyright-file-license-symlink/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: upload-native +Testname: copyright-file-license-symlink +Description: Test the versionless license files checks diff --git a/t/recipes/checks/debian/copyright/dep5/copyright-file-license-symlink/eval/desc b/t/recipes/checks/debian/copyright/dep5/copyright-file-license-symlink/eval/desc new file mode 100644 index 0000000..dc6fefb --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/copyright-file-license-symlink/eval/desc @@ -0,0 +1,2 @@ +Testname: copyright-file-license-symlink +Check: debian/copyright/dep5 diff --git a/t/recipes/checks/debian/copyright/dep5/copyright-file-license-symlink/eval/hints b/t/recipes/checks/debian/copyright/dep5/copyright-file-license-symlink/eval/hints new file mode 100644 index 0000000..dff3886 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/copyright-file-license-symlink/eval/hints @@ -0,0 +1,2 @@ +copyright-file-license-symlink (source): no-dep5-copyright [debian/copyright-file-license-symlink-pedantic.copyright] +copyright-file-license-symlink (source): no-dep5-copyright [debian/copyright-file-license-symlink-bad.copyright] diff --git a/t/recipes/checks/debian/copyright/dep5/cruft-gfdl-invariants/build-spec/fill-values b/t/recipes/checks/debian/copyright/dep5/cruft-gfdl-invariants/build-spec/fill-values new file mode 100644 index 0000000..2c57a2a --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/cruft-gfdl-invariants/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: upload-native +Testname: cruft-gfdl-invariants +Description: Check for GFDL invariants sections diff --git a/t/recipes/checks/debian/copyright/dep5/cruft-gfdl-invariants/build-spec/orig/src/autoconf.texi b/t/recipes/checks/debian/copyright/dep5/cruft-gfdl-invariants/build-spec/orig/src/autoconf.texi new file mode 100644 index 0000000..ba8175d --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/cruft-gfdl-invariants/build-spec/orig/src/autoconf.texi @@ -0,0 +1,12 @@ +Permission is granted to copy, distribute and/or modify this document +under the terms of the @acronym{GNU} Free Documentation License, +Version 1.3 or any later version published by the Free Software +Foundation; with no Invariant Sections, with the Front-Cover texts +being ``A @acronym{GNU} Manual,'' and with the Back-Cover Texts as in +(a) below. A copy of the license is included in the section entitled +``@acronym{GNU} Free Documentation License.'' + +(a) The FSF's Back-Cover Text is: ``You have the freedom to copy and +modify this @acronym{GNU} manual. Buying copies from the @acronym{FSF} +supports it in developing @acronym{GNU} and promoting software +freedom.'' diff --git a/t/recipes/checks/debian/copyright/dep5/cruft-gfdl-invariants/build-spec/orig/src/dvipdfmx.tex b/t/recipes/checks/debian/copyright/dep5/cruft-gfdl-invariants/build-spec/orig/src/dvipdfmx.tex new file mode 100644 index 0000000..a0a6634 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/cruft-gfdl-invariants/build-spec/orig/src/dvipdfmx.tex @@ -0,0 +1,6 @@ +\section*{GNU Free Documentation License}\label{SEC:FDL} +\subsection*{GNU Free Documentation License}\label{SEC:FDL} + \subsubsection{GNU Free Documentation License}\label{SEC:FDL} + +This document is distributed under the term of the GNU Free Documentation +License. See, the attached file for copying conditions. diff --git a/t/recipes/checks/debian/copyright/dep5/cruft-gfdl-invariants/build-spec/orig/src/empty.texi b/t/recipes/checks/debian/copyright/dep5/cruft-gfdl-invariants/build-spec/orig/src/empty.texi new file mode 100644 index 0000000..8e87b5f --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/cruft-gfdl-invariants/build-spec/orig/src/empty.texi @@ -0,0 +1,5 @@ +Permission is granted to copy, distribute and/or modify this +document under the terms of the GNU Free Documentation License, +version 1.3 or any later version published by the Free Software +Foundation. A copy of the license is included in the +section entitled "GNU Free Documentation License". diff --git a/t/recipes/checks/debian/copyright/dep5/cruft-gfdl-invariants/build-spec/orig/src/emptybis.texi b/t/recipes/checks/debian/copyright/dep5/cruft-gfdl-invariants/build-spec/orig/src/emptybis.texi new file mode 100644 index 0000000..7ad0640 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/cruft-gfdl-invariants/build-spec/orig/src/emptybis.texi @@ -0,0 +1,7 @@ +Permission is granted to copy, distribute and/or modify this +document under the terms of the GNU Free Documentation License, +version 1.3 or any later version published by the Free Software +Foundation. + +A copy of the license is included in the +section entitled "GNU Free Documentation License". diff --git a/t/recipes/checks/debian/copyright/dep5/cruft-gfdl-invariants/build-spec/orig/src/false-positive.rtf b/t/recipes/checks/debian/copyright/dep5/cruft-gfdl-invariants/build-spec/orig/src/false-positive.rtf new file mode 100644 index 0000000..19560b4 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/cruft-gfdl-invariants/build-spec/orig/src/false-positive.rtf @@ -0,0 +1,125 @@ +{\rtf1\ansi\ansicpg1252\cocoartf102{\fonttbl\f2\fnil Bitstream Charter;\f0\fnil Droid Sans Mono;\f1\fnil FreeSans;} +{\colortbl;\red0\green0\blue200;\red0\green0\blue0;\red255\green0\blue0;} +{{\NeXTGraphic iconoGimp3.tif \width1816 \height1309}\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\f0\fs24 \'AC}\f1\fs48 \b\cf1 \'A1Welcome to FisicaLab!\cf0\fs24\b0\cf2 \par +\par +\fs20\i Copyright (C) 2009, 2010, 2012 German A. Arias.\par + Permission is granted to copy, distribute and/or modify this document\par + under the terms of the GNU Free Documentation License, Version 1.3\par + or any later version published by the Free Software Foundation;\par + with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts.\par + A copy of the license is included in the section entitled "GNU\par + Free Documentation License".\fs24\i0 \par +\par +\par +FisicaLab is an educational application to solve physics problems. Its main objective is let the user to focus in physics concepts, leaving aside the mathematical details (FisicaLab take care of them). This allows the user to become familiar with the physical concepts without running the risk of getting lost in mathematical details. And so, when the user gain confidence in applying physical concepts, will be better prepared to solve the problems by hand (with pen and paper). FisicaLab is easy to use and very intuitive. However, in order to take advantage of all its features, we recommend you read first these help files.\par +\par +FisicaLab display to two windows, one named \b Modules and elements\b0 and other named \b Chalkboard\b0 . The first of these windows, contain all modules that can be used to solve problems. These modules are grouped by: kinematics, static, dynamics, ... (see image below). You can select one of these groups with the buttons at the top of the window, marked with (1) in the image. When you leave the mouse\rquote s cursor above one of these buttons, a label with the group name is displayed. The buttons marked with (2) let you select the system of units, SI or English. You can see the modules of the selected group inside the box marked with (3). The tabs marked with (4) let you select one of the available modules. The elements of the selected module are displayed inside the box marked with (5). This elements let you set the problems. Inside the box marked with (6) you can write the element\rquote s data (if any element is selected, this box will be empty).\f2 \par +\par + \cf0\f0{{\NeXTGraphic FisicaLabPanel.jpg \width7680 \height10760}\'AC}\f2\cf2 \par +\pard\ql\pard\tx0\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\ql \par +\f1 The window named \b Chalkboard\b0 (see image below), have at the top two buttons, marked with (7). The button at the left let you solve the problem, and the other is to clean the chalkboard. The black box marked with (8) is the chalkboard, where you add the elements to set the problems. You need keep in mind, although you can\rquote t see, that the chalkboard is a grid formed with cells of 50x50 pixels. By default the chalkboard size is 26x18 cells. In \b Preferences\b0 panel you can change the size to a maximum of 100x100 cells (A greater size than the default could be useful for trusses problems). The text view marked with (9) is where FisicaLab show the answer and messages. The checkbox marked with (10) erase the content of the text view before show the next answer or message. If you want keep the previous content, unselect this checkbox. In this case you can add notes to identify the results of the different problems.\f2 \par +\par +\pard\ql\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql \cf0\f0{{\NeXTGraphic FisicaLabPizarra.jpg \width8540 \height6680}\'AC}\f2\cf2 \par +\pard\ql\pard\tx0\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\ql \par +\par +\f1\fs28\b Handling the elements\f2\fs24\b0 \par + \par +\f1 To add elements at the chalkboard, do a click above the desired element. The mouse\rquote s cursor will become in an open hand, meaning this that we will add an element. Do a click above the chalkboard in the position where you want the element, the mouse\rquote s cursor will back at its original shape. Each time you add a new element, or select one different, a yellow square will be drawn around the current element. The data of the current element are displayed, for its edition, at panel \b Modules and elements\b0 . When you leave the mouse\rquote s cursor above one element in the chalkboard, a label with the element\rquote s data is displayed. In \b Preferences\b0 panel you can configure the font size of these labels.\par +\par +\pard\ql\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql \cf0\f0{{\NeXTGraphic chalkboardProperties.jpg \width9020 \height4600}\'AC}\f1\cf2 \par +\pard\ql\pard\tx0\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\ql \par +If you want move an element, click above it with the \b Control\b0 key pressed, the mouse\rquote s cursor will become in a close hand, meaning this that we are moving an element. Do click in the new position and the mouse\rquote s cursor will back at its original shape. In other hand, if you want delete an element, do click above it with the \b Shift\b0 key pressed.\par +\par +Keep in mind that FisicaLab don\rquote t let you combine elements from different modules. The elements in each module are enough to set a wide variety of problems.\f2 \par +\par +\par +\f1\fs28\b Element data\f2\fs24\b0 \par +\par +\f1 When you select an element in the chalkboard, or add a new element, you will see a table at the bottom of the window \b Modules and elements\b0 . With a double click above any field of the second column, you can write the data. FisicaLab supports scientific notation, to use this use the letter E. For example, to write the number 3.45x10-5, write:\par +\par +\pard\ql\pard\tx0\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\qc 3.45E-5\par +\pard\ql\pard\tx0\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\ql \par +All numerical data must be without spaces. For example, the following numbers are wrong:\par +\par +\pard\ql\pard\tx0\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\qc - 5.3\par +7.8E - 8\par +\pard\ql\pard\tx0\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\ql \par +Also, FisicaLab can use many conversion factors. To use these, add the character @ before the conversion. If you have selected the SI system, FisicaLab assumes that all data are in meters, kg, seconds, etc. With the English system, FisicaLab assumes that all data are in feet, pounds, slugs, seconds, etc. (in the English system the mass must be in slugs). For example, if you want write an speed of 75 km/h, use:\par +\par +\pard\ql\pard\tx0\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\qc 75 @ km/h\par +\pard\ql\pard\tx0\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\ql \par +Here, we have one space before and after the character @, but these are for clarity, and are not required. Each module has its how conversion factors, as you can see in the sections that deal about these. \par +\par +You can use letters or words to represent the unknown data. If, for example, the final velocity is an unknown data, you can represent this like:\par +\par +\pard\ql\pard\tx0\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\qc fv\par +finalv\par +fvel\par +\par +\pard\ql\pard\tx0\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\ql or any other combination. But, we recommend you use letters or words that are related with the unknown data. Also, the conversion factors can be used with the unknown data. For example, if the time is unknown, and you want this in minutes, write something like:\par +\par +\pard\ql\pard\tx0\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\qc t @ min\par +\par +\pard\ql\pard\tx0\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\ql The scientific notation can be used with the unknowns, adding the characters #E at the end of the name. For example, for a coefficient of thermal expansion, that is a small value:\par +\par +\pard\ql\pard\tx0\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\qc coefficient#E\par +\pard\ql\pard\tx0\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\ql \par +Also, this can be used with a conversion factor. For example, for a very long distance that we want in kilometers:\par +\par +\pard\ql\pard\tx0\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\qc distance#E @ km\par +\pard\ql\pard\tx0\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\ql \par +All the conversion factors are available in a contextual menu. After select the row of data where want add the factor, a right mouse click open a context menu with all available factors.\par +\par +\pard\ql\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql \cf0\f0{{\NeXTGraphic menuContextual.jpg \width6120 \height5320}\'AC}\f1\cf2 \par +\pard\ql\pard\tx0\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\ql \par +FisicaLab allows mathematical operations directly on the fields where you enter data. Can be carried out operations of addition (+), subtraction (-), multiplication (*) and division (/). Although not allowed to group operations by parentheses. It also provides some useful functions for certain calculations. These are listed below with its description:\par +\par +\b cos(ang)\tab \tab Calculates the cosine of the sexagesimal angle "ang".\par +sin(ang)\tab \tab Calculates the sine of the sexagesimal angle "ang".\par +tan(ang)\tab \tab Calculates the tangent of the sexagesimal angle "ang".\par +sqrt(x)\tab \tab Calculates the square root of the number "x".\par +hypot(a,b)\tab Calculates the hypotenuse of a right triangle whose legs are "a" and "b".\par +leg(c,a)\tab \tab Calculates the leg of the right triangle whose hypotenuse is "c" and the\par +\tab \tab \tab other leg is "a".\par +rd(m1,m2,d)\tab Calculates the distance of the mass "m1" to the center of mass of the\par +\tab \tab \tab system consisting of the masses "m1" and "m2", which are spaced a\par +\tab \tab \tab distance "d".\b0 \par +\par +The numbers that are passed as parameters to these functions must have consistent units. For example, in the \b hypot()\b0 function both legs must be in the same units, whether centimeters, meters, inches, etc. These functions can be used in operations of addition, subtraction, multiplication and division. In these operations blank spaces are not allowed. Here are some examples:\par +\par +\pard\ql\b\pard\tx0\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\qc 8*cos(34)\par +hypot(4,3)-2\par +rd(3,6,40)*sin(30) @ cm\par +15*8/hypot(13,8)\b0 \par +\pard\ql\pard\tx0\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\ql \par +Once entered the operation, FisicaLab will do the calculation and will write the result in the entry. Note that is possible to apply conversion factors. Although these can also be applied after carrying out the calculation.\par +\par +The fields where you enter angles do not allow the operations and functions described above. This is because these fields have their own operations and functions. For example, FisicaLab allows write the angles as slopes (a/b), and automatically convert this to sexagesimal angles. What is very useful for problems of trusses.\par +\par +\pard\ql\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql \cf0\f0{{\NeXTGraphic angulos.jpg \width5080 \height2660}\'AC}\f1\cf2 \par +\pard\ql\pard\tx0\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\ql \par +For these fields are available two functions that calculates an angle from other relationships. These functions are:\par +\par +\b acos(a/c)\tab Calculates the sexagesimal angle whose cosine is the ratio "a/c".\par +asin(b/c)\tab \tab Calculates the sexagesimal angle whose sine is the ratio "b/c".\b0 \par +\par +If an operation is entered incorrectly, for example if it contains spaces or contains a function with an incorrect number of parameters, FisicaLab will do nothing and will take that string as an unknown.\par +\par +\par +\b Caution:\b0 \cf0\cf3 If, for example, you add a mass conversion factor in a time data, this will cause an error in the solution. And you will not get a message about this error.\cf0\f2\cf2 \par +\par +\par +\f1\fs28\b How it works\f2\fs24\b0 \par +\par +\f1 FisicaLab work over the base of \i number of equations = number of unknown data\i0 . In general you don\rquote t need worry about this. But in some cases you will see the error \b "The system is undetermined"\b0 . This occurs when you write numeric data in a field that must be an unknown data. The examples show this cases.\f2 \par +\par +\par +\f1\fs28\b Messages\f2\fs24\b0 \par +\par +\f1 FisicaLab write a wide variety of messages in the text view when a problem is wrong. However, you always will see a message about the calculation\rquote s status, as you can see in the following image:\par +\par +\pard\ql\f0\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql \cf0{{\NeXTGraphic cinema44.tif \width4760 \height800}\'AC}\f1\cf2 \par +\pard\ql\pard\tx0\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\ql \par +The last line say \b "State = success"\b0 , meaning that the calculation was successful. Any other status different as \i success\i0 , mean that or the set problem don\rquote t have a solution, or an unexpected error occurred.\par +\par +} \ No newline at end of file diff --git a/t/recipes/checks/debian/copyright/dep5/cruft-gfdl-invariants/build-spec/orig/src/frontback.html b/t/recipes/checks/debian/copyright/dep5/cruft-gfdl-invariants/build-spec/orig/src/frontback.html new file mode 100644 index 0000000..b8e14bc --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/cruft-gfdl-invariants/build-spec/orig/src/frontback.html @@ -0,0 +1,56 @@ + + +Some title + + + +This is +
      +
      +Copyright © 1988, 1989, 1992, 1993, 1994, 1995, 1996, 1997, +1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, +2010, 2011, 2012 + +

      Permission is granted to copy, distribute and/or modify this document +under the terms of the GNU Free Documentation License, Version 1.3 or +any later version published by the Free Software Foundation; with the +Invariant Sections being “Funding Free Software”, the Front-Cover +Texts being (a) (see below), and with the Back-Cover Texts being (b) +(see below). A copy of the license is included in the section entitled +“GNU Free Documentation License”. + +

      (a) The Front-Cover Text is: + +

      A GNU Manual + +

      (b) The Back-Cover Text is: + +

      You have freedom to copy and modify this GNU Manual, like GNU + software. Copies published raises funds. +

      +
      +
      + + diff --git a/t/recipes/checks/debian/copyright/dep5/cruft-gfdl-invariants/build-spec/orig/src/frontback.texi b/t/recipes/checks/debian/copyright/dep5/cruft-gfdl-invariants/build-spec/orig/src/frontback.texi new file mode 100644 index 0000000..aa1d8e0 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/cruft-gfdl-invariants/build-spec/orig/src/frontback.texi @@ -0,0 +1,7 @@ +Permission is granted to copy, distribute and/or modify this document +under the terms of the GNU Free Documentation License, Version 1.3 or +any later version published by the Free Software Foundation; with no +Invariant Sections, with the Front-Cover Texts being ``A Debian Manual'', +and with the Back-Cover Texts as in (a) below. A copy of the license +is included in the section entitled ``GNU Free Documentation +License''. diff --git a/t/recipes/checks/debian/copyright/dep5/cruft-gfdl-invariants/build-spec/orig/src/invariant.txt b/t/recipes/checks/debian/copyright/dep5/cruft-gfdl-invariants/build-spec/orig/src/invariant.txt new file mode 100644 index 0000000..e649d17 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/cruft-gfdl-invariants/build-spec/orig/src/invariant.txt @@ -0,0 +1,7 @@ +Permission is granted to copy, distribute and/or modify this +document under the terms of the GNU Free Documentation License, +Version 1.3 or any later version published by the Free Software +Foundation; with the Invariant Sections being just "GNU +Manifesto", with no Front-Cover Texts, and with no Back-Cover +Texts. A copy of the license is included in the section +entitled "GNU Free Documentation License". diff --git a/t/recipes/checks/debian/copyright/dep5/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/appendix.txt b/t/recipes/checks/debian/copyright/dep5/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/appendix.txt new file mode 100644 index 0000000..8883cac --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/appendix.txt @@ -0,0 +1,25 @@ +ADDENDUM: How to use this License for your documents +==================================================== + +To use this License in a document you have written, include a copy of +the License in the document and put the following copyright and license +notices just after the title page: + + Copyright (C) YEAR YOUR NAME. + Permission is granted to copy, distribute and/or modify this document + under the terms of the GNU Free Documentation License, Version 1.3 + or any later version published by the Free Software Foundation; + with no Invariant Sections, no Front-Cover Texts, and no Back-Cover + Texts. A copy of the license is included in the section entitled ``GNU + Free Documentation License''. + + If you have Invariant Sections, Front-Cover Texts and Back-Cover +Texts, replace the "with...Texts." line with this: + + with the Invariant Sections being LIST THEIR TITLES, with + the Front-Cover Texts being LIST, and with the Back-Cover Texts + being LIST. + + If you have Invariant Sections without Cover Texts, or some other +combination of the three, merge those two alternatives to suit the +situation. diff --git a/t/recipes/checks/debian/copyright/dep5/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/badpunctuation.txt b/t/recipes/checks/debian/copyright/dep5/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/badpunctuation.txt new file mode 100644 index 0000000..fd6ed32 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/badpunctuation.txt @@ -0,0 +1,8 @@ +No ;after version +Permission is granted to copy, distribute and/or modify this document +under the terms of the GNU Free Documentation License, Version 1.1 +with no Invariant Sections, no Front-Cover Texts and +no Back-Cover Texts; +A copy of the license is included in the section entitled +license GNU Free Documentation License + diff --git a/t/recipes/checks/debian/copyright/dep5/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/cflow.texi b/t/recipes/checks/debian/copyright/dep5/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/cflow.texi new file mode 100644 index 0000000..2be8767 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/cflow.texi @@ -0,0 +1,12 @@ +Published by the Free Software Foundation, +51 Franklin Street, Fifth Floor +Boston, MA 02110-1301, USA + +Copyright @copyright{} 2005, 2010, 2014-2016 Sergey Poznyakoff + +Permission is granted to copy, distribute and/or modify this document +under the terms of the GNU Free Documentation License, Version 1.2 or +any later version published by the Free Software Foundation; with no +Invariant Sections, no Front-Cover and Back-Cover texts. A copy of +the license is included in the section entitled ``GNU Free Documentation +License''. diff --git a/t/recipes/checks/debian/copyright/dep5/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/citetitle.po b/t/recipes/checks/debian/copyright/dep5/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/citetitle.po new file mode 100644 index 0000000..73f9c3a --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/citetitle.po @@ -0,0 +1,16 @@ +#: C/index.docbook:65(legalnotice/para) +msgid "" +"Permission is granted to copy, distribute and/or modify this document under " +"the terms of the GNU Free Documentation License, " +"Version 1.1 or any later version published by the Free Software Foundation " +"with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A " +"copy of the license is included." +msgstr "" +"Das vorliegende Dokument kann gemäß den Bedingungen der GNU Free " +"Documentation License (GFDL), Version 1.1 oder jeder späteren, von der Free " +"Software Foundation veröffentlichten Version ohne unveränderbare Abschnitte " +"sowie ohne Texte auf dem vorderen und hinteren Buchdeckel kopiert, verteilt " +"und/oder modifiziert werden. Eine Kopie der GFDL finden Sie unter diesem " +"Link oder in der mit diesem " +"Handbuch gelieferten Datei COPYING-DOCS." + diff --git a/t/recipes/checks/debian/copyright/dep5/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/clisp.txt b/t/recipes/checks/debian/copyright/dep5/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/clisp.txt new file mode 100644 index 0000000..d3490c4 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/clisp.txt @@ -0,0 +1,9 @@ + +Permission is granted to copy, distribute and/or modify this +document under the terms of the GNU Free Documentation License +(FDL), either version 1.2 of the license, +or (at your option) any later version published by the free software +foundation (FSF); with no invariant sections, +with no front-cover text, and with no back-cover texts +A copy of the license is included in the +section entitled "GNU Free Documentation License". \ No newline at end of file diff --git a/t/recipes/checks/debian/copyright/dep5/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/clisp.xml b/t/recipes/checks/debian/copyright/dep5/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/clisp.xml new file mode 100644 index 0000000..37449fb --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/clisp.xml @@ -0,0 +1,6 @@ + This document documents free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + (&gpl;), either version 2 of the License, or (at your option) any + later version published by the &fsf;. + A copy of the license is included in . + diff --git a/t/recipes/checks/debian/copyright/dep5/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/comments.po b/t/recipes/checks/debian/copyright/dep5/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/comments.po new file mode 100644 index 0000000..d11e67b --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/comments.po @@ -0,0 +1,9 @@ +# French translation for SANE backend options +# +# Permission is granted to copy, distribute and/or modify this document +# under the terms of the GNU Free Documentation License, Version 1.1 +# or any later version published by the Free Software Foundation; +# with no Invariant Sections, with no Front-Cover Texts, and with +# no Back-Cover. +# A copy of the license is included in the section entitled "GNU +# Free Documentation License". diff --git a/t/recipes/checks/debian/copyright/dep5/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/diveintopythonok.html b/t/recipes/checks/debian/copyright/dep5/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/diveintopythonok.html new file mode 100644 index 0000000..6ace5df --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/diveintopythonok.html @@ -0,0 +1,12 @@ + + + +
      +

      Permission is granted to copy, distribute, and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation; with no Invariant + Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in Appendix G, GNU Free Documentation License. +

      +

      The example programs in this book are free software; you can redistribute and/or modify them under the terms of the Python license as published by the Python Software Foundation. A copy of the license is included in Appendix H, Python license. +

      +
      + + diff --git a/t/recipes/checks/debian/copyright/dep5/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/findsutilsokinlinenewline.c b/t/recipes/checks/debian/copyright/dep5/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/findsutilsokinlinenewline.c new file mode 100644 index 0000000..5291fd3 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/findsutilsokinlinenewline.c @@ -0,0 +1,15 @@ +/* false positive from some package */ + static const char *copy_para[]= + { + "Copyright (C) 1994, 1996, 1998, 2000, 2001, 2003, 2004, 2005, 2006," + ,"2007, 2009, 2010, 2011 Free Software Foundation, Inc." + ,"" + ,"Permission is granted to copy, distribute and/or modify this document" + ,"under the terms of the GNU Free Documentation License, Version 1.3 or" + ,"any later version published by the Free Software Foundation; with no" + ,"Invariant\nSections, with no\nFront-Cover Texts,\nand with no Back-Cover" + ,"Texts. A copy of the license is included in the ``GNU Free" + ,"Documentation License'' file as part of this distribution." + "" + ,NULL + }; diff --git a/t/recipes/checks/debian/copyright/dep5/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/findutilsok.c b/t/recipes/checks/debian/copyright/dep5/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/findutilsok.c new file mode 100644 index 0000000..23aa0af --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/findutilsok.c @@ -0,0 +1,15 @@ +/* false positive from findutils */ + static const char *copy_para[]= + { + "Copyright (C) 1994, 1996, 1998, 2000, 2001, 2003, 2004, 2005, 2006," + ,"2007, 2009, 2010, 2011 Free Software Foundation, Inc." + ,"" + ,"Permission is granted to copy, distribute and/or modify this document" + ,"under the terms of the GNU Free Documentation License, Version 1.3 or" + ,"any later version published by the Free Software Foundation; with no" + ,"Invariant Sections, with no Front-Cover Texts, and with no Back-Cover" + ,"Texts. A copy of the license is included in the ``GNU Free" + ,"Documentation License'' file as part of this distribution." + "" + ,NULL + }; diff --git a/t/recipes/checks/debian/copyright/dep5/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/fonts.html b/t/recipes/checks/debian/copyright/dep5/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/fonts.html new file mode 100644 index 0000000..ee27a4f --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/fonts.html @@ -0,0 +1,9 @@ +

      +Permission is granted to copy, distribute +and/or modify this document under the terms +of the GNU Free Documentation License, Version +1.1 or any later version published by the +Free Software Foundation; with the Invariant +Sections being LIST THEIR TITLES, with the +Front-Cover Texts being LIST, and with the +Back-Cover Texts being LIST.

      \ No newline at end of file diff --git a/t/recipes/checks/debian/copyright/dep5/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/fontsMX.html b/t/recipes/checks/debian/copyright/dep5/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/fontsMX.html new file mode 100644 index 0000000..426c273 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/fontsMX.html @@ -0,0 +1 @@ +Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in the section entitled GNU Free Documentation License. \ No newline at end of file diff --git a/t/recipes/checks/debian/copyright/dep5/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/gfdllicenseexample.html b/t/recipes/checks/debian/copyright/dep5/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/gfdllicenseexample.html new file mode 100644 index 0000000..fffca61 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/gfdllicenseexample.html @@ -0,0 +1,13 @@ + + +false positive found in license text: +
      +Copyright (C)  year  your name.
      +Permission is granted to copy, distribute and/or modify this document
      +under the terms of the GNU Free Documentation License, Version 1.3
      +or any later version published by the Free Software Foundation;
      +with the Invariant Sections being list their titles, with
      +the Front-Cover Texts being list, and with the Back-Cover Texts
      +being list.
      +A copy of the license is included in the section entitled ``GNU Free Documentation License''.
      +
      diff --git a/t/recipes/checks/debian/copyright/dep5/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/gfdllicenseexample.texi b/t/recipes/checks/debian/copyright/dep5/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/gfdllicenseexample.texi
      new file mode 100644
      index 0000000..fc52ba9
      --- /dev/null
      +++ b/t/recipes/checks/debian/copyright/dep5/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/gfdllicenseexample.texi
      @@ -0,0 +1,13 @@
      +false positive found in license text:
      +@smallexample
      +@group
      +  Copyright (C)  @var{year}  @var{your name}.
      +  Permission is granted to copy, distribute and/or modify this document
      +  under the terms of the GNU Free Documentation License, Version 1.3
      +  or any later version published by the Free Software Foundation;
      +  with the Invariant Sections being @var{list their titles}, with the
      +  Front-Cover Texts being @var{list}, and with the Back-Cover Texts being @var{list}.
      +  A copy of the license is included in the section entitled ``GNU
      +  Free Documentation License''.
      +@end group
      +@end smallexample
      diff --git a/t/recipes/checks/debian/copyright/dep5/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/gfdllicenseexamplesbr.html b/t/recipes/checks/debian/copyright/dep5/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/gfdllicenseexamplesbr.html
      new file mode 100644
      index 0000000..46cbd2f
      --- /dev/null
      +++ b/t/recipes/checks/debian/copyright/dep5/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/gfdllicenseexamplesbr.html
      @@ -0,0 +1,13 @@
      +
      +
      +false positive found in license text:
      +
      +Copyright (C)  year  your name.
      +Permission is granted to copy, distribute and/or modify this document
      +under the terms of the GNU Free Documentation License, Version 1.3
      +or any later version published by the Free Software Foundation;
      +with the
      Invariant Sections
      being list their titles, with +the Front-Cover Texts being list, and with the Back-Cover Texts +being list. +A copy of the license is included in the section entitled ``GNU Free Documentation License''. + diff --git a/t/recipes/checks/debian/copyright/dep5/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/gfdltexcomments.tex b/t/recipes/checks/debian/copyright/dep5/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/gfdltexcomments.tex new file mode 100644 index 0000000..00e496c --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/gfdltexcomments.tex @@ -0,0 +1,7 @@ +% Permission is granted to copy, distribute and/or modify this document +% under the terms of the GNU Free Documentation License, Version 1.1 or +% any later version published by the Free Software Foundation; with no +% Invariant Sections, with no Front-Cover Texts, and with no Back-Cover +% Texts. A copy of the license is included in the section entitled +% ``GNU Free Documentation License.'' +% diff --git a/t/recipes/checks/debian/copyright/dep5/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/gnashfalsepositive.html b/t/recipes/checks/debian/copyright/dep5/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/gnashfalsepositive.html new file mode 100644 index 0000000..f01cd4c --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/gnashfalsepositive.html @@ -0,0 +1,15 @@ + + +

      + Copyright 2008, Free Software Foundation. +

      + Permission is granted to copy, distribute and/or modify this + document under the terms of the GNU Free Documentation + License, Version 1.1 or any later version published by the + Free Software Foundation; with noInvariant Sections, with no Front-Cover Texts, + and with no Back-Cover + Texts. A copy of the license is included in + the section entitled "GNU Free Documentation License". +

      + + diff --git a/t/recipes/checks/debian/copyright/dep5/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/gnashfalsepositive.info b/t/recipes/checks/debian/copyright/dep5/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/gnashfalsepositive.info new file mode 100644 index 0000000..cc7a754 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/gnashfalsepositive.info @@ -0,0 +1,14 @@ +To use this License in a document you have written, include a copy of +the License in the document and put the following copyright and license +notices just after the title page: + +Copyright 2008, Free Software Foundation. + +Permission is granted to copy, distribute and/or modify this +document under the terms of the GNU Free Documentation License, +version 1.1 or any later version published by the Free Software +Foundation; with noInvariant Sections (*note fdl-invariant::), +with no Front-Cover Texts (*note fdl-cover-texts::), and with no +Back-Cover Texts (*note fdl-cover-texts::). A copy of the license +is included in the section entitled "GNU Free Documentation +License". diff --git a/t/recipes/checks/debian/copyright/dep5/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/gnashfalsepositive.xml b/t/recipes/checks/debian/copyright/dep5/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/gnashfalsepositive.xml new file mode 100644 index 0000000..9e77873 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/gnashfalsepositive.xml @@ -0,0 +1,15 @@ + + +

      + Copyright 2008, Free Software Foundation. +

      + Permission is granted to copy, distribute and/or modify this + document under the terms of the GNU Free Documentation + License, Version 1.1 or any later version published by the + Free Software Foundation; with noInvariant Sections, with no Front-Cover Texts, + and with no Back-Cover + Texts. A copy of the license is included in + the section entitled "GNU Free Documentation License". +

      + + diff --git a/t/recipes/checks/debian/copyright/dep5/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/gtk-doc.po b/t/recipes/checks/debian/copyright/dep5/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/gtk-doc.po new file mode 100644 index 0000000..07b3003 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/gtk-doc.po @@ -0,0 +1,42 @@ +#: C/fdl-appendix.xml:79(sect1/para) +msgid "" +"A <_:quote-1/> is a named appendix or a front-matter section of the <_:" +"link-2/> that deals exclusively with the relationship of the publishers or " +"authors of the Document to the Document's overall subject (or to related " +"matters) and contains nothing that could fall directly within that overall " +"subject. (For example, if the Document is in part a textbook of mathematics, " +"a Secondary Section may not explain any mathematics.) The relationship could " +"be a matter of historical connection with the subject or with related " +"matters, or of legal, commercial, philosophical, ethical or political " +"position regarding them." +msgstr "" +"Une <_:quote-1/> désigne une annexe au <_:link-2/>, ou toute information " +"indiquant les rapports entre l'auteur ou l'éditeur et le sujet (ou tout " +"autre sujet connexe) du Document, sans toutefois être en rapport direct avec " +"le sujet lui-même (par exemple, si le Document est un manuel de " +"mathématiques, une Section secondaire ne traitera d'aucune notion " +"mathématique). Cette section peut contenir des informations relatives à " +"l'historique du Document, des sources documentaires, des dispositions " +"légales, commerciales, philosophiques, ou des positions éthiques ou " +"politiques susceptibles de concerner le sujet traité." + + +#: C/fdl-appendix.xml:632(blockquote/para) +#, fuzzy +msgid "" +"Permission is granted to copy, distribute and/or modify this document under " +"the terms of the GNU Free Documentation License, Version 1.1 or any later " +"version published by the Free Software Foundation; with the <_:link-1/> being " +"LIST THEIR TITLES, with the <_:link-2/> being LIST, and with the <_:link-3/> " +"being LIST. A copy of the license is included in the section entitled <_:" +"quote-4/>." +msgstr "" +"Es wird die Erlaubnis gegeben, dieses Dokument zu kopieren, verteilen und/" +"oder zu verändern unter den Bedingungen der GNU Free Documentation License, " +"Version 1.1 oder einer späteren, von der Free Software Foundation " +"veröffentlichten Version; mit den Unveränderlichen Abschnitten. DEREN TITEL AUFGEZÄHLT sind, mit den " +"Vorderseitentexten, die AUFGEZÄHLT " +"sind, und mit den Rückseitentexten, " +"die AUFGEZÄHLT sind. Eine Kopie dieser Lizenz ist in dem Abschnitt enthalten, " +"der mit GNU Free Documentation License betitelt ist." diff --git a/t/recipes/checks/debian/copyright/dep5/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/hyphen-used-as-minus-sign.diff b/t/recipes/checks/debian/copyright/dep5/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/hyphen-used-as-minus-sign.diff new file mode 100644 index 0000000..ae8c973 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/hyphen-used-as-minus-sign.diff @@ -0,0 +1,102 @@ +Description: hyphen-used-as-minus-sign + This manual page seems to contain a hyphen where a minus sign was + intended. +Author: Ruben Molina +Forwarded: no +Last-Update: 2011-06-25 + +Index: kst-2.0.3/src/kst/kst.1.txt +=================================================================== +--- kst-2.0.3.orig/src/kst/kst.1.txt ++++ kst-2.0.3/src/kst/kst.1.txt +@@ -47,7 +47,7 @@ kst may be run entirely from within its + command line arguments are needed. kst has a powerful wizard for + easily setting up new plots. + +-In the second invocation, kst loads pre-saved plot specifications from the ++In the second invocation, kst loads pre\-saved plot specifications from the + file + .I kstfile + and optionally may override some of the settings in that file. +@@ -64,7 +64,7 @@ plot all curves in separate plots + .TP + .B \-a\fR + average frames (simple mean) when plotting with +-.B -s\fR. ++.B \-s\fR. + .TP + .B \-\-A4\fR + use A4 sized paper for printing. Requires +@@ -90,7 +90,7 @@ and instead use + .B \-f\ STARTFRAME\fR + begin plotting at + .I STARTFRAME +-frames into the data. Set to -1 to start at ++frames into the data. Set to \-1 to start at + .I NUMFRAMES + from the end of the data. + .TP +@@ -112,7 +112,7 @@ use US Letter sized paper for printing. + .B \-n\ NUMFRAMES\fR + plot at most + .I NUMFRAMES +-frames of data. Set to -1 to indicate all of the data. ++frames of data. Set to \-1 to indicate all of the data. + .TP + .B \-P\ PLOTNAME\fR + plot all plots in the plot named +@@ -145,7 +145,7 @@ frames when plotting. + .B \-x\ FIELD\fR + use + .I FIELD +-as the X-axis vector. ++as the X\-axis vector. + .TP + .B \-y\ FIELD\fR + plot +@@ -158,30 +158,30 @@ plot + as an image. + .SH EXAMPLES + Plot all data in column 2 from data.dat. +- kst data.dat -y 2 ++ kst data.dat \-y 2 + + Same as above, except only read 20 lines, starting at line 10. +- kst data.dat -f 10 -n 20 -y 2 ++ kst data.dat \-f 10 \-n 20 \-y 2 + + also read col 1. One plot per curve. +- kst data.dat -f 10 -n 20 -y 1 -y 2 ++ kst data.dat \-f 10 \-n 20 \-y 1 \-y 2 + + Read col 1 from data2.dat and col 1 from data.dat +- kst data.dat -f 10 -n 20 -y 2 data2.dat -y 1 ++ kst data.dat \-f 10 \-n 20 \-y 2 data2.dat \-y 1 + + Same as above, except read 40 lines starting at 30 in data2.dat +- kst data.dat -f 10 -n 20 -y 2 data2.dat -f 30 -n 40 -y 1 ++ kst data.dat \-f 10 \-n 20 \-y 2 data2.dat \-f 30 \-n 40 \-y 1 + + Specify the X vector and error bars: + Plot x = col 1 and Y = col 2 and error flags = col 3 from data.dat +- kst data.dat -x 1 -e 3 -y 2 ++ kst data.dat \-x 1 \-e 3 \-y 2 + + Get the X vector from data1.dat, and the Y vector from data2.dat. +- kst data1.dat -x 1 data2.dat -y 1 ++ kst data1.dat \-x 1 data2.dat \-y 1 + + Placement: + Plot column 2 and column 3 in plot P1 and column 4 in plot P2 +- kst data.dat -P P1 -y 2 -y 3 -P P2 -y 4 ++ kst data.dat \-P P1 \-y 2 \-y 3 \-P P2 \-y 4 + .SH BUGS + Please report bugs to either the kst mailing list at + .I kst@kde.org +@@ -198,6 +198,6 @@ Matthew Truch + Permission is granted to copy, distribute and/or modify this document + under the terms of the GNU Free Documentation License, Version 1.2 or + any later version published by the Free Software Foundation; with no ++Invariant Sections, with no Front\-Cover Texts, and with no Back\-Cover + Texts. A copy of the license is included in the `COPYING.DOC' file + as part of the kst distribution. diff --git a/t/recipes/checks/debian/copyright/dep5/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/kdoctools/customization/ru/entities/fdl-notice.docbook b/t/recipes/checks/debian/copyright/dep5/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/kdoctools/customization/ru/entities/fdl-notice.docbook new file mode 100644 index 0000000..0168da6 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/kdoctools/customization/ru/entities/fdl-notice.docbook @@ -0,0 +1,6 @@ +Permission is granted to copy, distribute and/or modify this +document under the terms of the GNU Free Documentation License, +Version 1.2 or any later version published by the Free Software +Foundation; with &FDLInvariantSections;, with &FDLFrontCoverText;, and +with &FDLBackCoverText;. A copy of the license is included in . + diff --git a/t/recipes/checks/debian/copyright/dep5/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/krusader b/t/recipes/checks/debian/copyright/dep5/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/krusader new file mode 100644 index 0000000..96f3be3 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/krusader @@ -0,0 +1,20 @@ + \ No newline at end of file diff --git a/t/recipes/checks/debian/copyright/dep5/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/latexhref.tex b/t/recipes/checks/debian/copyright/dep5/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/latexhref.tex new file mode 100644 index 0000000..d082bfc --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/latexhref.tex @@ -0,0 +1,7 @@ +Permission is granted to copy, distribute and/or modify this document +under the terms of the GNU Free Documentation License, Version 1.2 +or any later version published by the +\href{http://www.fsf.org}{Free Software Foundation}; +with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. +A copy of the license is included in the section entitled +``\hyperlink{GFDL_GFDL}{GNU Free Documentation License}''. diff --git a/t/recipes/checks/debian/copyright/dep5/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/latexhyperlink.tex b/t/recipes/checks/debian/copyright/dep5/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/latexhyperlink.tex new file mode 100644 index 0000000..e193a16 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/latexhyperlink.tex @@ -0,0 +1,7 @@ +Permission is granted to copy, distribute and/or modify this document +under the terms of the GNU Free Documentation License, Version 1.2 +or any later version published by the +\hyperlink{http://www.fsf.org}{Free Software Foundation}; +with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. +A copy of the license is included in the section entitled +``\hyperlink{GFDL_GFDL}{GNU Free Documentation License}''. diff --git a/t/recipes/checks/debian/copyright/dep5/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/latexhyphenslash.tex b/t/recipes/checks/debian/copyright/dep5/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/latexhyphenslash.tex new file mode 100644 index 0000000..370ea73 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/latexhyphenslash.tex @@ -0,0 +1,2 @@ +Copyright @sx(c) YEAR YOUR NAME. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-\/Cover Texts, and no Back-\/Cover Texts. A copy of the license is included in the section entitled \char`\"{}GNU +Free Documentation License\char`\"{}. \ No newline at end of file diff --git a/t/recipes/checks/debian/copyright/dep5/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/latexurl.tex b/t/recipes/checks/debian/copyright/dep5/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/latexurl.tex new file mode 100644 index 0000000..107d9fb --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/latexurl.tex @@ -0,0 +1,7 @@ +Permission is granted to copy, distribute and/or modify this document +under the terms of the GNU Free Documentation +License\url{http://www.gnu.org/copyleft/fdl.html}, Version 1.1 or any +later version published by the Free Software Foundation; with no +Invariant Sections, with no Front-Cover Texts, and with no Back-Cover +Texts. A copy of the license is included in the chapter entitled "GNU +Free Documentation License". \ No newline at end of file diff --git a/t/recipes/checks/debian/copyright/dep5/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/libnss-pgsql.xml b/t/recipes/checks/debian/copyright/dep5/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/libnss-pgsql.xml new file mode 100644 index 0000000..8a5eb6e --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/libnss-pgsql.xml @@ -0,0 +1,7 @@ + + Permission is granted to copy, distribute and/or modify this document + under the terms of the GNU Free Documentation License, Version 1.1 or + any later version published by the Free Software Foundation. There + are no invariant sections. A copy of the license is included in the + section entitled "GNU Free Documentation License". + diff --git a/t/recipes/checks/debian/copyright/dep5/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/lilypond.texi b/t/recipes/checks/debian/copyright/dep5/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/lilypond.texi new file mode 100644 index 0000000..56939ee --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/lilypond.texi @@ -0,0 +1,6 @@ +Permission is granted to copy, distribute and/or modify this document +under the terms of the GNU Free Documentation License, Version 1.1 +or any later version published by the Free Software Foundation; +with no Invariant Sections. +A copy of the license is included in the section entitled ``GNU +Free Documentation License''. diff --git a/t/recipes/checks/debian/copyright/dep5/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/lilypond2.txt b/t/recipes/checks/debian/copyright/dep5/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/lilypond2.txt new file mode 100644 index 0000000..4e66d64 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/lilypond2.txt @@ -0,0 +1,19 @@ +Permission is granted to copy, distribute and/or modify the +documentation for GNU LilyPond under the terms of the GNU Free +Documentation License as published by the Free Software Foundation, +either version 1.3, or (at your option) any later version; with no +Invariant Sections, no Front-Cover Texts and no Back-Cover Texts. + +A copy of the license is contained in the file COPYING.FDL. + +The following exceptions apply: + + * It does not apply to input files (contained in the + directory tree Documentation/snippets/); these are in + the public domain. + + * It does not apply to any manual which explicitly states + another license. + + * It does not apply to the MusicXML unit test suite, + which is licensed under the MIT license. diff --git a/t/recipes/checks/debian/copyright/dep5/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/mailutils.texi b/t/recipes/checks/debian/copyright/dep5/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/mailutils.texi new file mode 100644 index 0000000..dffaccc --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/mailutils.texi @@ -0,0 +1,6 @@ +Permission is granted to copy, distribute and/or modify this document +under the terms of the GNU Free Documentation License, Version 1.2 or +any later version published by the Free Software Foundation; with no +Invariant Sections, no Front-Cover, and no Back-Cover texts. +A copy of the license is included in the section entitled ``GNU Free +Documentation License''. diff --git a/t/recipes/checks/debian/copyright/dep5/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/maintain.html b/t/recipes/checks/debian/copyright/dep5/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/maintain.html new file mode 100644 index 0000000..e1fd5a2 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/maintain.html @@ -0,0 +1,28 @@ + + +

      Documentation files should have license notices also. Manuals should +use the GNU Free Documentation License. Following is an example of the +license notice to use after the copyright line(s) using all the +features of the GFDL. +

      +
      +
      Permission is granted to copy, distribute and/or modify this document
      +under the terms of the GNU Free Documentation License, Version 1.3 or
      +any later version published by the Free Software Foundation; with the
      +Invariant Sections being ``GNU General Public License'', with the
      +Front-Cover Texts being ``A GNU Manual'', and with the Back-Cover Texts
      +as in (a) below.  A copy of the license is included in the section
      +entitled ``GNU Free Documentation License''.
      +
      +(a) The FSF's Back-Cover Text is: ``You have the freedom to
      +copy and modify this GNU manual.  Buying copies from the FSF
      +supports it in developing GNU and promoting software freedom.''
      +
      + +

      If the FSF does not publish this manual on paper, then omit the last +sentence in (a) that talks about copies from GNU Press. If the FSF is +not the copyright holder, then replace ‘FSF’ with the appropriate +name. +

      + + diff --git a/t/recipes/checks/debian/copyright/dep5/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/maintain.texi b/t/recipes/checks/debian/copyright/dep5/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/maintain.texi new file mode 100644 index 0000000..633e758 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/maintain.texi @@ -0,0 +1,13 @@ +Documentation files should have license notices also. Manuals should +use the GNU Free Documentation License. Following is an example of the +license notice to use after the copyright line(s) using all the +features of the GFDL. + +@smallexample +Permission is granted to copy, distribute and/or modify this document +under the terms of the GNU Free Documentation License, Version 1.3 or +any later version published by the Free Software Foundation; with the +Invariant Sections being ``GNU General Public License'', with the +Front-Cover Texts being ``A GNU Manual'', and with the Back-Cover Texts +as in (a) below. A copy of the license is included in the section +entitled ``GNU Free Documentation License''. diff --git a/t/recipes/checks/debian/copyright/dep5/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/make-stds.texi b/t/recipes/checks/debian/copyright/dep5/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/make-stds.texi new file mode 100644 index 0000000..b5c2685 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/make-stds.texi @@ -0,0 +1,7 @@ +@c Permission is granted to copy, distribute and/or modify this document +@c under the terms of the GNU Free Documentation License, Version 1.1 +@c or any later version published by the Free Software Foundation; +@c with no Invariant Sections, with no +@c Front-Cover Texts, and with no Back-Cover Texts. +@c A copy of the license is included in the section entitled ``GNU +@c Free Documentation License''. diff --git a/t/recipes/checks/debian/copyright/dep5/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/normal.c b/t/recipes/checks/debian/copyright/dep5/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/normal.c new file mode 100644 index 0000000..a58e927 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/normal.c @@ -0,0 +1,13 @@ + /*****************************************************************************/ +/** \mainpage Cal3D API Reference + *
      + *

      + * Permission is granted to copy, distribute and/or modify this document + * under the terms of the GNU Free Documentation License, Version 1.1 or + * any later version published by the Free Software Foundation; + * with no Invariant Sections, no Front-Cover Texts and + * no Back-Cover Texts; + * A copy of the license is included in the section entitled + * \link license "GNU Free Documentation License" \endlink . + *

      + *****************************************************************************/ diff --git a/t/recipes/checks/debian/copyright/dep5/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/normal.texi b/t/recipes/checks/debian/copyright/dep5/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/normal.texi new file mode 100644 index 0000000..d9c1b54 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/normal.texi @@ -0,0 +1,6 @@ +Permission is granted to copy, distribute and/or modify this +document under the terms of the GNU Free Documentation License, +version 1.3 or any later version published by the Free Software +Foundation; with no Invariant Sections, no Front-Cover Texts and +no Back-Cover Texts. A copy of the license is included in the +section entitled "GNU Free Documentation License". diff --git a/t/recipes/checks/debian/copyright/dep5/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/normalbkchem.texi b/t/recipes/checks/debian/copyright/dep5/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/normalbkchem.texi new file mode 100644 index 0000000..dd888e2 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/normalbkchem.texi @@ -0,0 +1,6 @@ +Permission is granted to copy, distribute and/or modify this +document under the terms of the GNU Free Documentation License, +version 1.3 or any later version published by the Free Software +Foundation; no Invariant Sections, no Front-Cover Texts, +no Back-Cover Texts. A copy of the license is included in the +section entitled "GNU Free Documentation License". diff --git a/t/recipes/checks/debian/copyright/dep5/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/normalhtmlcomment.html b/t/recipes/checks/debian/copyright/dep5/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/normalhtmlcomment.html new file mode 100644 index 0000000..747d2e0 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/normalhtmlcomment.html @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/t/recipes/checks/debian/copyright/dep5/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/normalmancomment.txt b/t/recipes/checks/debian/copyright/dep5/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/normalmancomment.txt new file mode 100644 index 0000000..f33dfcd --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/normalmancomment.txt @@ -0,0 +1,7 @@ +.\" manual page for blaze, a command wrapper for BlazeBlogger +.\" +.\" Permission is granted to copy, distribute and/or modify this document +.\" under the terms of the GNU Free Documentation License, Version 1.3 or +.\" any later version published by the Free Software Foundation; with no +.\" Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. +.\" A copy of the license is included below. \ No newline at end of file diff --git a/t/recipes/checks/debian/copyright/dep5/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/normalwithbreakathyphen.texi b/t/recipes/checks/debian/copyright/dep5/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/normalwithbreakathyphen.texi new file mode 100644 index 0000000..22ae575 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/normalwithbreakathyphen.texi @@ -0,0 +1,8 @@ +Permission is granted to copy, distribute and/or modify this +document under the terms of the GNU Free Documentation License, +version 1.3 or any later version published by the Free Software +Foundation; with no Invariant Sections, no Front- +Cover Texts and +no Back- +Cover Texts. A copy of the license is included in the +section entitled "GNU Free Documentation License". diff --git a/t/recipes/checks/debian/copyright/dep5/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/oidentd.8 b/t/recipes/checks/debian/copyright/dep5/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/oidentd.8 new file mode 100644 index 0000000..5a4df93 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/oidentd.8 @@ -0,0 +1,9 @@ +.\" Copyright (C) XXX +.\" +.\" Permission is granted to copy, distribute and/or modify this document +.\" under the terms of the GNU Free Documentation License, Version 1.1 +.\" or any later version published by the Free Software Foundation; +.\" with the Invariant Sections being no invariant sections, with the +.\" Front-Cover Texts being no front-cover texts, and with the Back-Cover +.\" Texts being no back-cover texts. A copy of the license is included with +.\" this package in the file "COPYING.DOC." \ No newline at end of file diff --git a/t/recipes/checks/debian/copyright/dep5/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/opentoken.txt b/t/recipes/checks/debian/copyright/dep5/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/opentoken.txt new file mode 100644 index 0000000..3241276 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/opentoken.txt @@ -0,0 +1,5 @@ +Permission is granted to copy, distribute and/or modify this document +under the terms of the GNU Free Documentation License, Version 1.3 or +any later version published by the Free Software Foundation; with no +Invariant Sections, Front-Cover or Back-Cover texts. A copy of the license +is included in the section entitled ``GNU Free Documentation License''. \ No newline at end of file diff --git a/t/recipes/checks/debian/copyright/dep5/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/parsewiki.txt b/t/recipes/checks/debian/copyright/dep5/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/parsewiki.txt new file mode 100644 index 0000000..950d936 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/parsewiki.txt @@ -0,0 +1,4 @@ +Permission is granted to copy, distribute and/or modify this document under \ +the terms of the GNU Free Documentation License, Version 1.1 or any later \ +version published by the Free Software Foundation; without any Invariant \ +Sections. A copy of the license is included in the file GFDL. diff --git a/t/recipes/checks/debian/copyright/dep5/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/partedvariant.txt b/t/recipes/checks/debian/copyright/dep5/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/partedvariant.txt new file mode 100644 index 0000000..96037ac --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/partedvariant.txt @@ -0,0 +1,8 @@ +Parted 2.13 version with strange grammar. + +Permission is granted to copy, distribute and/or modify this document +under the terms of the GNU Free Documentation License, Version 1.3 +or any later version published by the Free Software Foundation; +with the no Invariant Sections, with the no Front-Cover Texts, and +with no Back-Cover Texts. A copy of the license is included in the +file, COPYING.DOC. diff --git a/t/recipes/checks/debian/copyright/dep5/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/partialtranslation.po b/t/recipes/checks/debian/copyright/dep5/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/partialtranslation.po new file mode 100644 index 0000000..f1d17a5 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/partialtranslation.po @@ -0,0 +1,15 @@ +För att använda GNU Free Documentation License för ett dokument du har skrivit, inkludera en kopia av licensen [det engelska originalet] i dokumentet och placera följande copyrightklausul omedelbart efter titelsidan: + +
      + + Permission is granted to copy, distribute and/or modify this + document under the terms of the GNU Free Documentation + License, Version 1.1 or any later version published by the + Free Software Foundation; with the Invariant Sections being LIST + THEIR TITLES, with the Front-Cover Texts being LIST, + and with the Back-Cover + Texts being LIST. A copy of the license is included in + the section entitled GNU Free Documentation + License. + +
      diff --git a/t/recipes/checks/debian/copyright/dep5/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/patch-R.diff b/t/recipes/checks/debian/copyright/dep5/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/patch-R.diff new file mode 100644 index 0000000..73e379b --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/patch-R.diff @@ -0,0 +1,7 @@ +1,6d0 +< Permission is granted to copy, distribute and/or modify this +< document under the terms of the GNU Free Documentation License, +< version 1.3 or any later version published by the Free Software +< Foundation; with no Invariant Sections, no Front-Cover Texts and +< no Back-Cover Texts. A copy of the license is included in the +< section entitled "GNU Free Documentation License". diff --git a/t/recipes/checks/debian/copyright/dep5/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/patch-c0.diff b/t/recipes/checks/debian/copyright/dep5/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/patch-c0.diff new file mode 100644 index 0000000..600653e --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/patch-c0.diff @@ -0,0 +1,18 @@ +*** make-stds.texi 2013-02-17 21:44:05.485250349 +0100 +--- normal.texi 2012-12-20 21:23:22.829397718 +0100 +*************** +*** 1,7 **** +! @c Permission is granted to copy, distribute and/or modify this document +! @c under the terms of the GNU Free Documentation License, Version 1.1 +! @c or any later version published by the Free Software Foundation; +! @c with no Invariant Sections, with no +! @c Front-Cover Texts, and with no Back-Cover Texts. +! @c A copy of the license is included in the section entitled ``GNU +! @c Free Documentation License''. +--- 1,6 ---- +! Permission is granted to copy, distribute and/or modify this +! document under the terms of the GNU Free Documentation License, +! version 1.3 or any later version published by the Free Software +! Foundation; with no Invariant Sections, no Front-Cover Texts and +! no Back-Cover Texts. A copy of the license is included in the +! section entitled "GNU Free Documentation License". diff --git a/t/recipes/checks/debian/copyright/dep5/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/patch-u.diff b/t/recipes/checks/debian/copyright/dep5/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/patch-u.diff new file mode 100644 index 0000000..db6e4f9 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/patch-u.diff @@ -0,0 +1,9 @@ +--- /dev/null 2013-05-15 23:18:30.206386135 +0200 ++++ normal.texi 2012-12-20 21:23:22.829397718 +0100 +@@ -0,0 +1,6 @@ ++Permission is granted to copy, distribute and/or modify this ++document under the terms of the GNU Free Documentation License, ++version 1.3 or any later version published by the Free Software ++Foundation; with no Invariant Sections, no Front-Cover Texts and ++no Back-Cover Texts. A copy of the license is included in the ++section entitled "GNU Free Documentation License". diff --git a/t/recipes/checks/debian/copyright/dep5/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/patch-uR.diff b/t/recipes/checks/debian/copyright/dep5/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/patch-uR.diff new file mode 100644 index 0000000..347adff --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/patch-uR.diff @@ -0,0 +1,9 @@ +--- normal.texi 2012-12-20 21:23:22.829397718 +0100 ++++ /dev/null 2013-05-15 23:18:30.206386135 +0200 +@@ -1,6 +0,0 @@ +-Permission is granted to copy, distribute and/or modify this +-document under the terms of the GNU Free Documentation License, +-version 1.3 or any later version published by the Free Software +-Foundation; with no Invariant Sections, no Front-Cover Texts and +-no Back-Cover Texts. A copy of the license is included in the +-section entitled "GNU Free Documentation License". diff --git a/t/recipes/checks/debian/copyright/dep5/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/patch.diff b/t/recipes/checks/debian/copyright/dep5/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/patch.diff new file mode 100644 index 0000000..f64bfaf --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/patch.diff @@ -0,0 +1,7 @@ +0a1,6 +> Permission is granted to copy, distribute and/or modify this +> document under the terms of the GNU Free Documentation License, +> version 1.3 or any later version published by the Free Software +> Foundation; with no Invariant Sections, no Front-Cover Texts and +> no Back-Cover Texts. A copy of the license is included in the +> section entitled "GNU Free Documentation License". diff --git a/t/recipes/checks/debian/copyright/dep5/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/php-elisp.texi b/t/recipes/checks/debian/copyright/dep5/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/php-elisp.texi new file mode 100644 index 0000000..2ab3103 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/php-elisp.texi @@ -0,0 +1,19 @@ +@copying +This manual documents PHP mode version @value{version} for +use with GNU Emacs. + +Copyright @copyright{} 2008 Aaron S. Hawley + +@quotation +Permission is granted to copy, distribute and/or modify this +document under the terms of the GNU Free Documentation +License, Version 1.2 or any later version published by the +Free Software Foundation; with no Invariant Sections, and no +Cover Texts. A copy of the license is included in the +section entitled ``Copying This Manual.'' + +A copy of the license is also available from the Free +Software Foundation Web site at +@url{http://www.gnu.org/licenses/fdl.html}. + +@end quotation \ No newline at end of file diff --git a/t/recipes/checks/debian/copyright/dep5/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/pipeindent.txt b/t/recipes/checks/debian/copyright/dep5/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/pipeindent.txt new file mode 100644 index 0000000..8a0594a --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/pipeindent.txt @@ -0,0 +1,7 @@ +Some user ident with pipe (|) + | Permission is granted to copy, distribute and/or modify this + | document under the terms of the GNU Free Documentation License, + | version 1.3 or any later version published by the Free Software + | Foundation; with no Invariant Sections, no Front-Cover Texts and + | no Back-Cover Texts. A copy of the license is included in the + | section entitled "GNU Free Documentation License". diff --git a/t/recipes/checks/debian/copyright/dep5/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/quotes.xml b/t/recipes/checks/debian/copyright/dep5/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/quotes.xml new file mode 100644 index 0000000..58edd5b --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/quotes.xml @@ -0,0 +1,8 @@ +Permission is granted to copy, distribute and/or modify this +document under the terms of the GNU Free Documentation +License, Version 1.2 or any later version published by the +Free Software Foundation; with no Invariant Sections, no +Front-Cover Texts, and no Back-Cover Texts. +A copy of the license +is included in the section entitled "GNU Free Documentation +License". \ No newline at end of file diff --git a/t/recipes/checks/debian/copyright/dep5/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/quoteswithasdefined.xml b/t/recipes/checks/debian/copyright/dep5/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/quoteswithasdefined.xml new file mode 100644 index 0000000..112c734 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/quoteswithasdefined.xml @@ -0,0 +1,9 @@ +Permission is granted to copy, distribute and/or modify this +document under the terms of the GNU Free Documentation +License, Version 1.2 or any later version published by the +Free Software Foundation; +with no invariant sections, front-cover texts or back-cover texts, +each as defined in the license. +A copy of the license +is included in the section entitled "GNU Free Documentation +License". \ No newline at end of file diff --git a/t/recipes/checks/debian/copyright/dep5/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/sdlbasic.html b/t/recipes/checks/debian/copyright/dep5/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/sdlbasic.html new file mode 100644 index 0000000..ff31741 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/sdlbasic.html @@ -0,0 +1,11 @@ +
      +Permission is granted to copy, distribute +and/or modify this document under the terms of the GNU Free +Documentation License, Version 1.2 or any later version published by +the Free Software Foundation; with no Invariant Sections Texts.
      + + +A copy of the license is included here below.
      + + +
      diff --git a/t/recipes/checks/debian/copyright/dep5/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/smbc.texi b/t/recipes/checks/debian/copyright/dep5/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/smbc.texi new file mode 100644 index 0000000..c803dc5 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/smbc.texi @@ -0,0 +1,9 @@ +@quotation +Permission is granted to copy, distribute and/or modify this document +under the terms of the GNU Free Documentation License, Version 1.1 or +any later version published by the Free Software Foundation; with the +Invariant Sections being ``GNU General Public License'' and ``GNU Free +Documentation License'', with no Front-Cover Texts, and with no +Back-Cover Texts. A copy of the license is included in the section +entitled ``GNU Free Documentation License''. +@end quotation \ No newline at end of file diff --git a/t/recipes/checks/debian/copyright/dep5/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/soundjuicer.po b/t/recipes/checks/debian/copyright/dep5/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/soundjuicer.po new file mode 100644 index 0000000..e0a41a6 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/soundjuicer.po @@ -0,0 +1,8 @@ +#~ "Permission is granted to copy, distribute and/or modify this document " +#~ "under the terms of the GNU Free Documentation License, Version 1.1 or any " +#~ "later version published by the Free Software Foundation; with the Invariant Sections being LIST THEIR " +#~ "TITLES, with the Front-Cover Texts being LIST, and with the Back-" +#~ "Cover Texts being LIST. A copy of the license is included in the " +#~ "section entitled GNU Free Documentation License." \ No newline at end of file diff --git a/t/recipes/checks/debian/copyright/dep5/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/texignu.texi b/t/recipes/checks/debian/copyright/dep5/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/texignu.texi new file mode 100644 index 0000000..9327024 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/texignu.texi @@ -0,0 +1,6 @@ +Permission is granted to copy, distribute and/or modify this document +under the terms of the @acronym{GNU} Free Documentation License, +Version 1.3 or any later version published by the Free Software +Foundation; with no Invariant Sections, with no Front-Cover texts +and with no Back-Cover Texts. A copy of the license is included in the section entitled +``@acronym{GNU} Free Documentation License.'' diff --git a/t/recipes/checks/debian/copyright/dep5/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/texlive.tex b/t/recipes/checks/debian/copyright/dep5/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/texlive.tex new file mode 100644 index 0000000..b6e1240 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/texlive.tex @@ -0,0 +1,8 @@ +% note the end is not classical... +% Copyright (c) 2002--2004 Philipp Lehman +% Permission is granted to copy, distribute and/or modify this document under +% the terms of the GNU Free Documentation License, version 1.2, with no +% invariant sections, with no front-cover texts, and no back-cover texts. This +% document is distributed in the hope that it will be useful, but without any +% warranty; without even the implied warranty of merchantability or fitness for +% a particular purpose. diff --git a/t/recipes/checks/debian/copyright/dep5/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/texlivefont.tex b/t/recipes/checks/debian/copyright/dep5/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/texlivefont.tex new file mode 100644 index 0000000..d4b872c --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/texlivefont.tex @@ -0,0 +1,6 @@ +Copyright 2002--2004 Philipp Lehman + +Permission is granted to copy, distribute and\slash or modify this document under the terms of the GNU Free Documentation License, version 1.2, with no invariant sections, no front-cover texts, and no back-cover texts. + +A copy of the license is included in the appendix. + diff --git a/t/recipes/checks/debian/copyright/dep5/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/tla.txt b/t/recipes/checks/debian/copyright/dep5/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/tla.txt new file mode 100644 index 0000000..2043b26 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/tla.txt @@ -0,0 +1,21 @@ +/* + * :permissions ("Permission is granted to copy, distribute and/or modify this document" + * "under the terms of the GNU Free Documentation License, Version 1.1" + * "or any later version published by the Free Software Foundation;" + * "with the Invariant Sections being:" + * "" + * " The GNU General Public License" + * " The GNU Free Documentation License" + * "" + * "with the Front-Cover Texts being" + * "" + * " (none)," + * "" + * "and with the Back-Cover Texts being" + * "" + * " (none)." + * "" + * "A copy of the license is included in the section entitled \"GNU" + * "Free Documentation License\".")) + * + */ \ No newline at end of file diff --git a/t/recipes/checks/debian/copyright/dep5/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/ulink.xml b/t/recipes/checks/debian/copyright/dep5/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/ulink.xml new file mode 100644 index 0000000..6f634a6 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/ulink.xml @@ -0,0 +1,7 @@ +Permission is granted to copy, distribute and/or modify this +document under the terms of the GNU Free Documentation +License, Version 1.2 or any later version published by the +Free Software Foundation; with no Invariant Sections, no +Front-Cover Texts, and no Back-Cover Texts. A copy of the license +is included in the section entitled "GNU Free Documentation +License". \ No newline at end of file diff --git a/t/recipes/checks/debian/copyright/dep5/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/variantdictfold.txt b/t/recipes/checks/debian/copyright/dep5/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/variantdictfold.txt new file mode 100644 index 0000000..8463a59 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/variantdictfold.txt @@ -0,0 +1,7 @@ +This is ok + Permission is granted to copy, distribute and/or modify this + document under the terms of the GNU Free Documentation + License, Version 1.1 or any later version published by the + Free Software Foundation; with no Invariant Sections, Front- + or Back-Cover Texts. A copy of the license is included in the + section entitled "{GNU Free Documentation License}". diff --git a/t/recipes/checks/debian/copyright/dep5/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/zeroisnotplural.texi b/t/recipes/checks/debian/copyright/dep5/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/zeroisnotplural.texi new file mode 100644 index 0000000..8782eed --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/cruft-gfdl-invariants/build-spec/orig/src/oldfalsepositive/zeroisnotplural.texi @@ -0,0 +1,6 @@ +Permission is granted to copy, distribute and/or modify this +document under the terms of the GNU Free Documentation License, +version 1.3 or any later version published by the Free Software +Foundation; with no Invariant Section, no Front-Cover Text and +no Back-Cover Text. A copy of the license is included in the +section entitled "GNU Free Documentation License". diff --git a/t/recipes/checks/debian/copyright/dep5/cruft-gfdl-invariants/build-spec/orig/src/oldmanpagesgfdlproblem.1 b/t/recipes/checks/debian/copyright/dep5/cruft-gfdl-invariants/build-spec/orig/src/oldmanpagesgfdlproblem.1 new file mode 100644 index 0000000..83a4acf --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/cruft-gfdl-invariants/build-spec/orig/src/oldmanpagesgfdlproblem.1 @@ -0,0 +1,12 @@ +.\" +.\" Manpage example +.\" +.PP +Permission is granted to copy, distribute and/or modify this document +under the terms of the \s-1GNU\s0 Free Documentation License, Version 1.2 or +any later version published by the Free Software Foundation; with the +Invariant Sections being \*(L"\s-1GNU\s0 General Public License\*(R" and \*(L"Funding +Free Software\*(R", the Front-Cover texts being (a) (see below), and with +the Back-Cover Texts being (b) (see below). A copy of the license is +included in the \fIgfdl\fR\|(7) man page. +.PP diff --git a/t/recipes/checks/debian/copyright/dep5/cruft-gfdl-invariants/eval/desc b/t/recipes/checks/debian/copyright/dep5/cruft-gfdl-invariants/eval/desc new file mode 100644 index 0000000..4120bab --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/cruft-gfdl-invariants/eval/desc @@ -0,0 +1,3 @@ +Testname: cruft-gfdl-invariants +Test-Against: inconsistent-appstream-metadata-license +Check: debian/copyright/dep5 diff --git a/t/recipes/checks/debian/copyright/dep5/cruft-gfdl-invariants/eval/hints b/t/recipes/checks/debian/copyright/dep5/cruft-gfdl-invariants/eval/hints new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/cruft-gfdl-invariants/eval/hints @@ -0,0 +1 @@ + diff --git a/t/recipes/checks/debian/copyright/dep5/excluded-files-in-native/build-spec/debian/copyright b/t/recipes/checks/debian/copyright/dep5/excluded-files-in-native/build-spec/debian/copyright new file mode 100644 index 0000000..4d23981 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/excluded-files-in-native/build-spec/debian/copyright @@ -0,0 +1,30 @@ +Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Upstream-Name: Lintian +Upstream-Contact: +Source: http://lintian.debian.org +Comment: This is part of the testsuite of lintian. + See the file debian/copyright + in the lintian source directory for more details. +Files-Excluded: some-file + +Files: * +Copyright: + 2008 Frank Lichtenheld + 2009 Russ Allbery + 2018 Felix Lechner +License: GPL-2+ + This program is free software; you may redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + . + This is distributed in the hope that it will be useful, but without + any warranty; without even the implied warranty of merchantability or + fitness for a particular purpose. See the GNU General Public License + for more details. + . + A copy of the GNU General Public License version 2 is available as + /usr/share/common-licenses/GPL-2 in the Debian GNU/Linux distribution + or at http://www.gnu.org/licenses/old-licenses/gpl-2.0.html. + You can also obtain it by writing to the Free Software Foundation, Inc., + 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/t/recipes/checks/debian/copyright/dep5/excluded-files-in-native/build-spec/fill-values b/t/recipes/checks/debian/copyright/dep5/excluded-files-in-native/build-spec/fill-values new file mode 100644 index 0000000..d8608d8 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/excluded-files-in-native/build-spec/fill-values @@ -0,0 +1,4 @@ +Skeleton: upload-native +Testname: excluded-files-in-native +Description: Field Excluded-Files is present in native package. +Version: 1.7+ds diff --git a/t/recipes/checks/debian/copyright/dep5/excluded-files-in-native/build-spec/orig/some-file b/t/recipes/checks/debian/copyright/dep5/excluded-files-in-native/build-spec/orig/some-file new file mode 100644 index 0000000..c3f1f94 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/excluded-files-in-native/build-spec/orig/some-file @@ -0,0 +1 @@ +SOME CONTENTS. diff --git a/t/recipes/checks/debian/copyright/dep5/excluded-files-in-native/eval/desc b/t/recipes/checks/debian/copyright/dep5/excluded-files-in-native/eval/desc new file mode 100644 index 0000000..275bc5e --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/excluded-files-in-native/eval/desc @@ -0,0 +1,2 @@ +Testname: excluded-files-in-native +Check: debian/copyright/dep5 diff --git a/t/recipes/checks/debian/copyright/dep5/excluded-files-in-native/eval/hints b/t/recipes/checks/debian/copyright/dep5/excluded-files-in-native/eval/hints new file mode 100644 index 0000000..7c683c1 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/excluded-files-in-native/eval/hints @@ -0,0 +1 @@ +excluded-files-in-native (source): source-ships-excluded-file some-file [debian/copyright:8] diff --git a/t/recipes/checks/debian/copyright/dep5/file-does-not-exist/build-spec/debian/copyright b/t/recipes/checks/debian/copyright/dep5/file-does-not-exist/build-spec/debian/copyright new file mode 100644 index 0000000..fa106e9 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/file-does-not-exist/build-spec/debian/copyright @@ -0,0 +1,13 @@ +Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Comment: Test case from https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=888001#33 + +Files: * +License: GPL-3 +Copyright: © 2014 Mattia Rizzolo + +Files: file-does-not-exist +License: GPL-3 +Copyright: © 2014 Mattia Rizzolo + +License: GPL-3 + Please call the Free Software Foundation for a copy of the license. diff --git a/t/recipes/checks/debian/copyright/dep5/file-does-not-exist/build-spec/fill-values b/t/recipes/checks/debian/copyright/dep5/file-does-not-exist/build-spec/fill-values new file mode 100644 index 0000000..7072fa8 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/file-does-not-exist/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: upload-native +Testname: file-does-not-exist +Description: Files paragraph references a file that does not exist. diff --git a/t/recipes/checks/debian/copyright/dep5/file-does-not-exist/eval/desc b/t/recipes/checks/debian/copyright/dep5/file-does-not-exist/eval/desc new file mode 100644 index 0000000..dc5290f --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/file-does-not-exist/eval/desc @@ -0,0 +1,3 @@ +Testname: file-does-not-exist +Check: debian/copyright/dep5 +See-Also: Bug#888001 diff --git a/t/recipes/checks/debian/copyright/dep5/file-does-not-exist/eval/hints b/t/recipes/checks/debian/copyright/dep5/file-does-not-exist/eval/hints new file mode 100644 index 0000000..71b2f98 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/file-does-not-exist/eval/hints @@ -0,0 +1 @@ +file-does-not-exist (source): superfluous-file-pattern file-does-not-exist [debian/copyright:8] diff --git a/t/recipes/checks/debian/copyright/dep5/files-included-covers-none/build-spec/debian/copyright b/t/recipes/checks/debian/copyright/dep5/files-included-covers-none/build-spec/debian/copyright new file mode 100644 index 0000000..7935e5d --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/files-included-covers-none/build-spec/debian/copyright @@ -0,0 +1,21 @@ +Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Files-Included: + include-this + +Files: * +Copyright: 2011 J. Random Hacker +License: GPL-2 + This package is free software; you can redistribute it and/or modify it under + the terms of the GNU General Public License as published by the Free Software + Foundation; version 2 dated June, 1991. + . + This package is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. + . + You should have received a copy of the GNU General Public License along with + this package; if not, write to the Free Software Foundation, Inc., 51 Franklin + St, Fifth Floor, Boston, MA 02110-1301, USA. + . + On Debian systems, the full text of the GNU General Public License version 2 + can be found in the file `/usr/share/common-licenses/GPL-2'. diff --git a/t/recipes/checks/debian/copyright/dep5/files-included-covers-none/build-spec/fill-values b/t/recipes/checks/debian/copyright/dep5/files-included-covers-none/build-spec/fill-values new file mode 100644 index 0000000..1e3bf97 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/files-included-covers-none/build-spec/fill-values @@ -0,0 +1,3 @@ +Testname: lone-files-included +Skeleton: upload-non-native +Description: Filex-Included without Files-Excluded diff --git a/t/recipes/checks/debian/copyright/dep5/files-included-covers-none/eval/desc b/t/recipes/checks/debian/copyright/dep5/files-included-covers-none/eval/desc new file mode 100644 index 0000000..bc56f04 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/files-included-covers-none/eval/desc @@ -0,0 +1,2 @@ +Testname: files-included-covers-none +Check: debian/copyright/dep5 diff --git a/t/recipes/checks/debian/copyright/dep5/files-included-covers-none/eval/hints b/t/recipes/checks/debian/copyright/dep5/files-included-covers-none/eval/hints new file mode 100644 index 0000000..51d4974 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/files-included-covers-none/eval/hints @@ -0,0 +1 @@ +lone-files-included (source): superfluous-file-pattern (Files-Included) include-this [debian/copyright:2] diff --git a/t/recipes/checks/debian/copyright/dep5/legacy-binary/build-spec/debian/NEWS.Debian b/t/recipes/checks/debian/copyright/dep5/legacy-binary/build-spec/debian/NEWS.Debian new file mode 100644 index 0000000..29f561c --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/legacy-binary/build-spec/debian/NEWS.Debian @@ -0,0 +1,12 @@ +binary (4-1.1) UNRELEASED; urgency=high + + This is a Debian NEWS entry that isn't encoded properly in UTF-8: . + It also has a usefull speling error. + + -- Russ Allbery Sun, 14 Oct 2007 17:11:36 -0700 + +binary (1) unstable; urgency=low + + This is another entry but this one isn't syntactically valid. + + -- Russ Allbery 2007-10-14 diff --git a/t/recipes/checks/debian/copyright/dep5/legacy-binary/build-spec/debian/README.Debian b/t/recipes/checks/debian/copyright/dep5/legacy-binary/build-spec/debian/README.Debian new file mode 100644 index 0000000..94bcc0a --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/legacy-binary/build-spec/debian/README.Debian @@ -0,0 +1,5 @@ +this is a binary package to test lintian's handling of bins. +Check handling of D-Bus and dbus (neither of which should produce +warnings). + + -- Russ Allbery , Wed, 6 Feb 2008 18:35:11 -0800 diff --git a/t/recipes/checks/debian/copyright/dep5/legacy-binary/build-spec/debian/changelog.in b/t/recipes/checks/debian/copyright/dep5/legacy-binary/build-spec/debian/changelog.in new file mode 100644 index 0000000..39301d6 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/legacy-binary/build-spec/debian/changelog.in @@ -0,0 +1,47 @@ +binary ([% $version %]) [% $distribution %]; urgency=low + + * I'm doing an comaintainer-upload, acknowledging a NMU, but with a version + number which suggests I'm doing a NMU myself. + + Lintian-maintainers: Please don't update this changelog, otherwise you'll + probably break the checks/nmu checks. + + -- Jeroen van Wolffelaar Sun, 18 Apr 2004 01:49:42 +0200 + +binary (4-1) unstable; urgency=low + + * Weird version number for the new check for accidents with native + packaging. + * Date was fixed by BR and this test was put on changelog-file-strange-date + due to dpkg bug, see #794674. + + -- Marc 'HE' Brockschmidt Thu, 15 Apr 2004 23:33:51 +0200 + +binary (4) unstable; urgency=low + + * Add big file to /usr/share to trigger the big-usr-share check + + -- Jeroen van Wolffelaar Fri, 27 Feb 2004 10:15:59 +0100 + +binary (3) unstable; urgency=unlimited + + * Add some bogus menu entries using su-to-root in a bogus way + + -- Jeroen van Wolffelaar Thu, 12 Feb 2004 20:11:22 +0100 + +binary (2) unstable; urgency=low + + * Added an INSTALL document which policy 6.3 suggests not to do + + -- Sean 'Shaleh' Perry Tue, 30 Jan 2001 15:23:59 -0800 + +binary (1) unstable; urgency=low + + * hello.c added + * hello-static is same as hello, but compiled statically + * added a menu entry which lacks a Section + * added a postinst + * postinst calls suidregister which is no longer policy compliant + + -- Sean 'Shaleh' Perry Wed, 10 Jan 2001 08:55:34 -0800 + diff --git a/t/recipes/checks/debian/copyright/dep5/legacy-binary/build-spec/debian/conffiles b/t/recipes/checks/debian/copyright/dep5/legacy-binary/build-spec/debian/conffiles new file mode 100644 index 0000000..d1a0843 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/legacy-binary/build-spec/debian/conffiles @@ -0,0 +1 @@ +/etc/menu-methods/lintian diff --git a/t/recipes/checks/debian/copyright/dep5/legacy-binary/build-spec/debian/control b/t/recipes/checks/debian/copyright/dep5/legacy-binary/build-spec/debian/control new file mode 100644 index 0000000..c797357 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/legacy-binary/build-spec/debian/control @@ -0,0 +1,42 @@ +Source: binary +Section: misc +Priority: optional +Maintainer: Lintian Maintainers +Uploaders: Co-maintainer one , Jeroen van Wolffelaar , Co-maintainer three +Standards-Version: 3.2.1 +Homepage: http://lintian.debian.org/ +Vcs-Svn: http://svn.wolffelaar.nl/lintian/trunk +XS-Vcs-Browser: http://svn.wolffelaar.nl/lintian/trunk +XS-Dm-Upload-Allowed: yes + +Package: binary +Architecture: any +Pre-Depends: ${shlibs:Depends}, xorg, binary-data (= ${source:Version}), libssl0.9.8 +Homepage: +Vcs-Svn: http://svn.wolffelaar.nl/lintian/trunk +Description: test handling of binary files + Regression test for lintian's handling of binary files for debian. This + is checked for picky spelling errors. + . + This package list [ subversion | gconf ] should not be flagged as a spelling + mistake. The spelling correction for dont should be correct. + . + Homepage: http://lintian.debian.org/ + +Package: binary-data +Architecture: all +Depends: binary (= ${source:Version}), libssl-not-openssl, + libssl0.9.8 | or-something-else +Description: test handling of binary relationships + Regression test for lintian's checking of package relationships between + arch:any and arch:all packages. + . + This mention of subversion should be flagged as a spelling mistake. + +#Package: binary-comment +#Architecture: space-almonds +#Depends: * +#Depends: * +#Description: test comment support +# Yes, comments are actually allowed in debian/control, so none of the +# above should produce errors. diff --git a/t/recipes/checks/debian/copyright/dep5/legacy-binary/build-spec/debian/copyright b/t/recipes/checks/debian/copyright/dep5/legacy-binary/build-spec/debian/copyright new file mode 100644 index 0000000..4546c62 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/legacy-binary/build-spec/debian/copyright @@ -0,0 +1,15 @@ +hello.c is released under public domain. This is distributed in the hope that +it will be useful, but without any warranty; without even the implied warranty +of merchantability or fitness for a particular purpose. + +A reference to /usr/share/common-licenses/GPL-2 to make it look like this +package is under the GPL and trigger the OpenSSL warning. + +Test for old FSF address: + +Free Software Foundation, Inc., 59 Temple Place - Suite 330, +Boston, MA 02111-1307, USA. + +Test for deprecated nätionäl äncoding. + +Improper capitalization of linux or debian isn't caught here. diff --git a/t/recipes/checks/debian/copyright/dep5/legacy-binary/build-spec/debian/doc-base b/t/recipes/checks/debian/copyright/dep5/legacy-binary/build-spec/debian/doc-base new file mode 100644 index 0000000..7e5b38f --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/legacy-binary/build-spec/debian/doc-base @@ -0,0 +1,41 @@ +Document: binary!docs +Title: Broken debian binary doc-base control file +Author: Russ Allbery +Abstract: This control file exercises various tests of doc-base control + files, including several things that aren't tested yet. The third and + fourth one has trailing whitespace. + . + This section has a speling error and bad character. + . + The above separator was fine. +Section: Non/Existant +Unknown: Some field + + + +Format: debiandoc-sgML +Files: /usr/share/doc/binary/binary.sgml.gz +Unknown: Some field + +Format: ESP +Index: /usr/share/doc/binary/binary.txt + +Index: /usr/share/doc/binary/html/index.html + /usr/share/doc/binary/html/ch1.html + /usr/share/doc/binary/html/ch4.html + + +Format: HTML +Index: /usr/share/doc/binary/html/index.html +Files: /usr/share/doc/binary/html/ch?.h*l + /usr/share/doc/binary/hml/*.html + +Format: inFO +Files: /usr/share/info/binary.info.gz + +Format: HTML +Index: /usr/share/doc/binary/html/index.html +Files: /usr/share/doc/binary/html/ch5.html + /usr/share/doc/binary/html/ch6.html + + diff --git a/t/recipes/checks/debian/copyright/dep5/legacy-binary/build-spec/debian/goodbye.desktop b/t/recipes/checks/debian/copyright/dep5/legacy-binary/build-spec/debian/goodbye.desktop new file mode 100644 index 0000000..f6ce8e3 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/legacy-binary/build-spec/debian/goodbye.desktop @@ -0,0 +1,13 @@ +[Desktop Entry] +Name:Goodbye +# Name=Goodbye +Comment=Say hello! +SpecialTag=This doesn't exist! +Exec=goodbye +icon=hello +Terminal=true +Type=Application +Categories=WeirdStuff;Screensaver; +Encoding=ISO-10646-1 +[Other Entry] +Name=Goodbye diff --git a/t/recipes/checks/debian/copyright/dep5/legacy-binary/build-spec/debian/hello.desktop b/t/recipes/checks/debian/copyright/dep5/legacy-binary/build-spec/debian/hello.desktop new file mode 100644 index 0000000..f795468 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/legacy-binary/build-spec/debian/hello.desktop @@ -0,0 +1,14 @@ +# some random comment + +# [Foo Bar] +[KDE Desktop Entry] +Name=Hello +Name[en_US]=Hello +Comment=Say hello! +Exec=kdesu hello +Icon=hello +Terminal=true +Type=Application +Categories=GNOME;GTK;System;Applet;X-Foo;Settings; +Encoding=UTF-8 +OnlyShowIn=GNOME; diff --git a/t/recipes/checks/debian/copyright/dep5/legacy-binary/build-spec/debian/menu b/t/recipes/checks/debian/copyright/dep5/legacy-binary/build-spec/debian/menu new file mode 100644 index 0000000..e8972f4 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/legacy-binary/build-spec/debian/menu @@ -0,0 +1,26 @@ +?package(binary):needs=text title="Hello World" command="/usr/bin/hello" +?package(binary):needs=text section="Applications/System" title="Run cfdisk (0)" command="/usr/bin/su-to-root cfdisk" +?package(binary):needs="text" section="Applications/System/Hardware" title="Run cfdisk (1)" command="sux -p cfdisk" +?package(binary):needs="x11" section="Window Managers" title="Run xfdisk" command="/usr/sbin/su-to-root -c xfdisk" +?package(binary):needs="wm" section="Applications/System/Administration" title="Run fdisk-wm" command="su-to-root -c hello" +?package(binary):section="Apps/Games" title="I'm not root!" command="su-to-root -c imnothere" +?package(binary):needs="text" section="Apps/System" title="I'm not here!" command="/imnothere" +?package(binary,other-binary):\ + needs="text"\ + section="Applications/Shells"\ + title="more than one required"\ + command="other-bin -s omething" +?package(binary):needs="wmmodule" section="WindowManagers/Modules" title="somemodule" command="ModuleCmd" +?package(binary):needs="wmmodule" section="FVWM Modules" title="somemodule" command="ModuleCmd" +?package(binary):needs="text" section="Applications/System/Administration" title="I'm not in /usr/bin!" command="iminusrbin" +?package(binary):needs="text"\ + section="Applications/System/Administration"\ + title="I'm not root!" command="su-to-root -c imnothere" +?package(binary):needs="text" section="Applications/System/Administration"\ + title="Run cfdisk (0)" command="cfdisk" +?package(binary):needs="text" section="Applications/System/Administration" title="Hello World" command="/usr/bin/hello" +?package(binary):needs="wm" section="FVWM Modules" title="Fake Module" command="hello" +?package(binary):needs="fvwmmodule" section="Window Maker" title="Fake Module"\ + command="hello" +?package(binary):needs="x11" section="Applications/System/Hardware" title="Run xfdisk" command="su-to-root -c 'xfdisk -f'" +?package(binary):needs="text" section="Applications/System/Administration" title="foo" command="sh /path/to/foo" diff --git a/t/recipes/checks/debian/copyright/dep5/legacy-binary/build-spec/debian/menu-method b/t/recipes/checks/debian/copyright/dep5/legacy-binary/build-spec/debian/menu-method new file mode 100644 index 0000000..9f07bd7 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/legacy-binary/build-spec/debian/menu-method @@ -0,0 +1,22 @@ +#!/usr/bin/install-menu + +# -*- mode: shell-script; -*- +#I need menu-1! +# + +!include notmenu.h + +compat="menu-2" + +outputencoding="UTF-8"; +outputlanguage="C"; + +x11 = AppEntry("false"); +text = AppEntry("true"); + +startmenu = ""; +endmenu = ""; +submenutitle = ""; +rootprefix = "/var/lib/lintian/menu"; +userprefix = ".local/share/lintian/menu"; + diff --git a/t/recipes/checks/debian/copyright/dep5/legacy-binary/build-spec/debian/postinst b/t/recipes/checks/debian/copyright/dep5/legacy-binary/build-spec/debian/postinst new file mode 100644 index 0000000..29e1861 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/legacy-binary/build-spec/debian/postinst @@ -0,0 +1,6 @@ +#! /bin/bash -e + +if [ $1 eq 'configure' ] +then + suidregister hello-static root root 4755 +fi diff --git a/t/recipes/checks/debian/copyright/dep5/legacy-binary/build-spec/debian/rules b/t/recipes/checks/debian/copyright/dep5/legacy-binary/build-spec/debian/rules new file mode 100755 index 0000000..a962ea9 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/legacy-binary/build-spec/debian/rules @@ -0,0 +1,92 @@ +#!/usr/bin/make -f + +tmp=debian/tmp + +# This reference to $(PWD) should not cause an error but the one below +# should. +build-arch: + make + echo $(PWD) + +build: build-arch + +clean: + make -i clean + [ ! -f debian/files ] || rm -f debian/files + [ ! -f debian/substvars ] || rm -f debian/substvars + [ ! -d debian/tmp ] || rm -rf debian/tmp + [ ! -d debian/binary ] || rm -rf debian/binary + [ ! -d debian/binary-data ] || rm -rf debian/binary-data + +binary-arch: build + install -d $(tmp)/usr/bin + install -d $(tmp)/boot/hello + install -m 755 hello $(tmp)/usr/bin + touch $(tmp)/usr/bin/iminusrbin + chmod 755 $(tmp)/usr/bin/iminusrbin + install -m 755 hello-static $(tmp)/usr/bin + strip $(tmp)/usr/bin/hello-static + install -m 755 hello-static $(tmp)/usr/bin/hello.static + strip --remove-section=.comment --remove-section=.note $(tmp)/usr/bin/hello.static + ln $(tmp)/usr/bin/hello.static $(tmp)/usr/bin/static-hello + install -m 755 hello-static $(tmp)/boot/hello + strip --remove-section=.comment --remove-section=.note $(tmp)/boot/hello/hello-static + install -d $(tmp)/usr/share/doc/binary + install -m 644 INSTALL $(tmp)/usr/share/doc/binary + install -d $(tmp)/usr/share/doc/binary/html + echo '' > $(tmp)/usr/share/doc/binary/html/index.html + echo '' > $(tmp)/usr/share/doc/binary/html/ch1.html + ln -s ../html/./ch1.html $(tmp)/usr/share/doc/binary/html/ch2.html + ln -s /usr/share/doc/binary/htm/ch1.html $(tmp)/usr/share/doc/binary/html/ch3.html + echo '' > $(tmp)/usr/share/doc/binary/html/ch5.html + ln $(tmp)/usr/share/doc/binary/html/ch5.html \ + $(tmp)/usr/share/doc/binary/html/ch6.html + install -d $(tmp)/usr/share/menu + install -d $(tmp)/usr/lib/menu + install -d $(tmp)/usr/share/binary + install -m 644 debian/menu $(tmp)/usr/share/menu/binary + install -m 644 debian/menu $(tmp)/usr/lib/menu/binary + install -d $(tmp)/etc/menu-methods + install -m 755 debian/menu-method $(tmp)/etc/menu-methods/lintian + install -d $(tmp)/usr/share/doc-base + install -m 644 debian/doc-base $(tmp)/usr/share/doc-base/binary + touch '$(tmp)/usr/share/doc-base/space ' + install -m 644 debian/README.Debian $(tmp)/usr/share/doc/binary + install -m 644 debian/NEWS.Debian $(tmp)/usr/share/doc/binary + gzip -n -9 $(tmp)/usr/share/doc/binary/NEWS.Debian + install -m 644 debian/copyright $(tmp)/usr/share/doc/binary + install -m 644 debian/changelog $(tmp)/usr/share/doc/binary + #gzip -n -9 $(tmp)/usr/share/doc/binary/changelog + install -d $(tmp)/DEBIAN + install -m 755 debian/postinst $(tmp)/DEBIAN + install -m 644 debian/conffiles $(tmp)/DEBIAN + + install -d $(tmp)/usr/share/applications + install -m 644 debian/hello.desktop \ + $(tmp)/usr/share/applications/hello.desktop + install -m 755 debian/goodbye.desktop \ + $(tmp)/usr/share/applications/goodbye.desktop + + # should be ok... + echo boe > $(tmp)/usr/bar + ln $(tmp)/usr/bar $(tmp)/usr/foo + # but this isn't + echo boe > $(tmp)/usr/bar2 + ln $(tmp)/usr/bar2 $(tmp)/usr/share/baz + + dd if=/dev/zero of=$(tmp)/usr/share/binary/largefile bs=1024 count=4000 + + install -d debian/binary-data/DEBIAN + install -d debian/binary-data/usr/share/doc + ln -s binary debian/binary-data/usr/share/doc/binary-data + + dpkg-shlibdeps $(tmp)/usr/bin/hello + dpkg-gencontrol -pbinary -isp + dpkg-gencontrol -pbinary-data -Pdebian/binary-data -isp + + dpkg --build debian/tmp .. + dpkg --build debian/binary-data .. + +binary: binary-arch + +.PHONY: build-arch build binary-arch binary clean diff --git a/t/recipes/checks/debian/copyright/dep5/legacy-binary/build-spec/debian/templates b/t/recipes/checks/debian/copyright/dep5/legacy-binary/build-spec/debian/templates new file mode 100644 index 0000000..3d92861 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/legacy-binary/build-spec/debian/templates @@ -0,0 +1,16 @@ +# The debconf templates defined here are the sort that you'd use if +# providing a wordlist and an ispell dictionary for the language +# "perl". This shouldn't trigger warnings about not using debconf-po. + +Template: shared/packages-ispell +Type: text +Description: + +Template: shared/packages-wordlist +Type: text +Description: + +Template: miscfiles/languages +Type: text +Default: perl (Pathologically Eclectic Rubbish Lister) +Description: diff --git a/t/recipes/checks/debian/copyright/dep5/legacy-binary/build-spec/fill-values b/t/recipes/checks/debian/copyright/dep5/legacy-binary/build-spec/fill-values new file mode 100644 index 0000000..b503871 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/legacy-binary/build-spec/fill-values @@ -0,0 +1,5 @@ +Skeleton: upload-non-native +Testname: legacy-binary +Source: binary +Version: 4-1.1 +Description: Legacy test "binary" diff --git a/t/recipes/checks/debian/copyright/dep5/legacy-binary/build-spec/orig/INSTALL b/t/recipes/checks/debian/copyright/dep5/legacy-binary/build-spec/orig/INSTALL new file mode 100644 index 0000000..3b50ea9 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/legacy-binary/build-spec/orig/INSTALL @@ -0,0 +1,176 @@ +Basic Installation +================== + + These are generic installation instructions. + + The `configure' shell script attempts to guess correct values for +various system-dependent variables used during compilation. It uses +those values to create a `Makefile' in each directory of the package. +It may also create one or more `.h' files containing system-dependent +definitions. Finally, it creates a shell script `config.status' that +you can run in the future to recreate the current configuration, a file +`config.cache' that saves the results of its tests to speed up +reconfiguring, and a file `config.log' containing compiler output +(useful mainly for debugging `configure'). + + If you need to do unusual things to compile the package, please try +to figure out how `configure' could check whether to do them, and mail +diffs or instructions to the address given in the `README' so they can +be considered for the next release. If at some point `config.cache' +contains results you don't want to keep, you may remove or edit it. + + The file `configure.in' is used to create `configure' by a program +called `autoconf'. You only need `configure.in' if you want to change +it or regenerate `configure' using a newer version of `autoconf'. + +The simplest way to compile this package is: + + 1. `cd' to the directory containing the package's source code and type + `./configure' to configure the package for your system. If you're + using `csh' on an old version of System V, you might need to type + `sh ./configure' instead to prevent `csh' from trying to execute + `configure' itself. + + Running `configure' takes a while. While running, it prints some + messages telling which features it is checking for. + + 2. Type `make' to compile the package. + + 3. Optionally, type `make check' to run any self-tests that come with + the package. + + 4. Type `make install' to install the programs and any data files and + documentation. + + 5. You can remove the program binaries and object files from the + source code directory by typing `make clean'. To also remove the + files that `configure' created (so you can compile the package for + a different kind of computer), type `make distclean'. There is + also a `make maintainer-clean' target, but that is intended mainly + for the package's developers. If you use it, you may have to get + all sorts of other programs in order to regenerate files that came + with the distribution. + +Compilers and Options +===================== + + Some systems require unusual options for compilation or linking that +the `configure' script does not know about. You can give `configure' +initial values for variables by setting them in the environment. Using +a Bourne-compatible shell, you can do that on the command line like +this: + CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure + +Or on systems that have the `env' program, you can do it like this: + env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure + +Compiling For Multiple Architectures +==================================== + + You can compile the package for more than one kind of computer at the +same time, by placing the object files for each architecture in their +own directory. To do this, you must use a version of `make' that +supports the `VPATH' variable, such as GNU `make'. `cd' to the +directory where you want the object files and executables to go and run +the `configure' script. `configure' automatically checks for the +source code in the directory that `configure' is in and in `..'. + + If you have to use a `make' that does not supports the `VPATH' +variable, you have to compile the package for one architecture at a time +in the source code directory. After you have installed the package for +one architecture, use `make distclean' before reconfiguring for another +architecture. + +Installation Names +================== + + By default, `make install' will install the package's files in +`/usr/local/bin', `/usr/local/man', etc. You can specify an +installation prefix other than `/usr/local' by giving `configure' the +option `--prefix=PATH'. + + You can specify separate installation prefixes for +architecture-specific files and architecture-independent files. If you +give `configure' the option `--exec-prefix=PATH', the package will use +PATH as the prefix for installing programs and libraries. +Documentation and other data files will still use the regular prefix. + + If the package supports it, you can cause programs to be installed +with an extra prefix or suffix on their names by giving `configure' the +option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. + +Optional Features +================= + + Some packages pay attention to `--enable-FEATURE' options to +`configure', where FEATURE indicates an optional part of the package. +They may also pay attention to `--with-PACKAGE' options, where PACKAGE +is something like `gnu-as' or `x' (for the X Window System). The +`README' should mention any `--enable-' and `--with-' options that the +package recognizes. + + For packages that use the X Window System, `configure' can usually +find the X include and library files automatically, but if it doesn't, +you can use the `configure' options `--x-includes=DIR' and +`--x-libraries=DIR' to specify their locations. + +Specifying the System Type +========================== + + There may be some features `configure' can not figure out +automatically, but needs to determine by the type of host the package +will run on. Usually `configure' can figure that out, but if it prints +a message saying it can not guess the host type, give it the +`--host=TYPE' option. TYPE can either be a short name for the system +type, such as `sun4', or a canonical name with three fields: + CPU-COMPANY-SYSTEM + +See the file `config.sub' for the possible values of each field. If +`config.sub' isn't included in this package, then this package doesn't +need to know the host type. + + If you are building compiler tools for cross-compiling, you can also +use the `--target=TYPE' option to select the type of system they will +produce code for and the `--build=TYPE' option to select the type of +system on which you are compiling the package. + +Sharing Defaults +================ + + If you want to set default values for `configure' scripts to share, +you can create a site shell script called `config.site' that gives +default values for variables like `CC', `cache_file', and `prefix'. +`configure' looks for `PREFIX/share/config.site' if it exists, then +`PREFIX/etc/config.site' if it exists. Or, you can set the +`CONFIG_SITE' environment variable to the location of the site script. +A warning: not all `configure' scripts look for a site script. + +Operation Controls +================== + + `configure' recognizes the following options to control how it +operates. + +`--cache-file=FILE' + Use and save the results of the tests in FILE instead of + `./config.cache'. Set FILE to `/dev/null' to disable caching, for + debugging `configure'. + +`--help' + Print a summary of the options to `configure', and exit. + +`--quiet' +`--silent' +`-q' + Do not print messages saying which checks are being made. + +`--srcdir=DIR' + Look for the package's source code in directory DIR. Usually + `configure' can determine that directory automatically. + +`--version' + Print the version of Autoconf used to generate the `configure' + script, and exit. + +`configure' also accepts some other, not widely useful, options. + diff --git a/t/recipes/checks/debian/copyright/dep5/legacy-binary/build-spec/orig/Makefile b/t/recipes/checks/debian/copyright/dep5/legacy-binary/build-spec/orig/Makefile new file mode 100644 index 0000000..da1dc55 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/legacy-binary/build-spec/orig/Makefile @@ -0,0 +1,12 @@ +all: hello hello-static + +hello: hello.c + gcc hello.c -o hello + +hello-static: hello.c + gcc -static hello.c -o hello-static + +clean: + rm -f hello hello-static + +distclean: clean diff --git a/t/recipes/checks/debian/copyright/dep5/legacy-binary/build-spec/orig/hello.c b/t/recipes/checks/debian/copyright/dep5/legacy-binary/build-spec/orig/hello.c new file mode 100644 index 0000000..2fb04e1 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/legacy-binary/build-spec/orig/hello.c @@ -0,0 +1,8 @@ +#include +#include + +int main(int argc, char *argv[]) { + + printf("Hello, World!\n"); + exit(0); +} diff --git a/t/recipes/checks/debian/copyright/dep5/legacy-binary/eval/desc b/t/recipes/checks/debian/copyright/dep5/legacy-binary/eval/desc new file mode 100644 index 0000000..03b128e --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/legacy-binary/eval/desc @@ -0,0 +1,2 @@ +Testname: legacy-binary +Check: debian/copyright/dep5 diff --git a/t/recipes/checks/debian/copyright/dep5/legacy-binary/eval/hints b/t/recipes/checks/debian/copyright/dep5/legacy-binary/eval/hints new file mode 100644 index 0000000..ecc0a09 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/legacy-binary/eval/hints @@ -0,0 +1 @@ +binary (source): no-dep5-copyright [debian/copyright] diff --git a/t/recipes/checks/debian/copyright/dep5/legacy-binary/eval/post-test b/t/recipes/checks/debian/copyright/dep5/legacy-binary/eval/post-test new file mode 100644 index 0000000..3deefd5 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/legacy-binary/eval/post-test @@ -0,0 +1,3 @@ +s/arch-dep-package-has-big-usr-share .*kB .*%/arch-dep-package-has-big-usr-share/ +/: hardening-.*/ d +s/\(current is ([0-9]+\.)+[0-9]\)/(current is CURRENT)/ diff --git a/t/recipes/checks/debian/copyright/dep5/legacy-debconf/build-spec/debian/changelog.in b/t/recipes/checks/debian/copyright/dep5/legacy-debconf/build-spec/debian/changelog.in new file mode 100644 index 0000000..f5e308e --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/legacy-debconf/build-spec/debian/changelog.in @@ -0,0 +1,6 @@ +debconf ([% $version %]) [% $distribution %]; urgency=low + + * Initial Release + * Changelog line with exactly 80 characters which tests the line-too-long tag. + + -- Lintian Maintainers Wed, 3 May 2006 18:07:19 -0500 diff --git a/t/recipes/checks/debian/copyright/dep5/legacy-debconf/build-spec/debian/compat.in b/t/recipes/checks/debian/copyright/dep5/legacy-debconf/build-spec/debian/compat.in new file mode 100644 index 0000000..640a566 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/legacy-debconf/build-spec/debian/compat.in @@ -0,0 +1 @@ +[% $dh_compat_level %] diff --git a/t/recipes/checks/debian/copyright/dep5/legacy-debconf/build-spec/debian/control b/t/recipes/checks/debian/copyright/dep5/legacy-debconf/build-spec/debian/control new file mode 100644 index 0000000..bf9f4e9 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/legacy-debconf/build-spec/debian/control @@ -0,0 +1,52 @@ +Source: debconf +Section: utils +Priority: optional +Build-Depends: debhelper (>= 4), dpatch +Maintainer: Lintian Maintainers +Standards-Version: 3.7.2 + +Package: debconf-test +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: Test package for the debconf checks of lintian (dummy) + +Package: debconf-test-noscripts +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: Test package for the debconf checks of lintian (noscripts) + Package missing postinst/postrm/config. + . + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. + +Package: debconf-test-preinst +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: Test package for the debconf checks of lintian (preinst) + Package uses debconf only in preinst. + . + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. + +Package: debconf-test-postinst +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: Test package for the debconf checks of lintian (postinst) + Package uses debconf only in postinst. + . + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. + +Package: debconf-udeb +Section: debian-installer +XC-Package-Type: udeb +XB-Installer-Menu-Item: 100 +Architecture: any +Depends: ${shlibs:Depends} +Description: Test udeb package for the debconf checks of lintian (dummy) diff --git a/t/recipes/checks/debian/copyright/dep5/legacy-debconf/build-spec/debian/copyright b/t/recipes/checks/debian/copyright/dep5/legacy-debconf/build-spec/debian/copyright new file mode 100644 index 0000000..84843ee --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/legacy-debconf/build-spec/debian/copyright @@ -0,0 +1,10 @@ +Copyright (C) 2004 Frank Lichtenheld + +Test for really old FSF address: + +Free Software Foundation, Inc., 675 Mass Ave, Cambridge, +MA 02139, USA. + +Test for a dh-make boilerplate: +# Please also look if there are files or directories which have a +# different copyright/license attached and list them here. diff --git a/t/recipes/checks/debian/copyright/dep5/legacy-debconf/build-spec/debian/debconf-test-noscripts.templates b/t/recipes/checks/debian/copyright/dep5/legacy-debconf/build-spec/debian/debconf-test-noscripts.templates new file mode 100644 index 0000000..93f8071 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/legacy-debconf/build-spec/debian/debconf-test-noscripts.templates @@ -0,0 +1,3 @@ +Template: debconf/test +Type: text +_description: Foo bar (1) diff --git a/t/recipes/checks/debian/copyright/dep5/legacy-debconf/build-spec/debian/debconf-test-postinst.postinst b/t/recipes/checks/debian/copyright/dep5/legacy-debconf/build-spec/debian/debconf-test-postinst.postinst new file mode 100644 index 0000000..56ab871 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/legacy-debconf/build-spec/debian/debconf-test-postinst.postinst @@ -0,0 +1,10 @@ +#!/bin/sh +set -e + +. /usr/share/debconf/confmodule + +db_input medium debconf/test + +#DEBHELPER# + +true diff --git a/t/recipes/checks/debian/copyright/dep5/legacy-debconf/build-spec/debian/debconf-test-postinst.postrm b/t/recipes/checks/debian/copyright/dep5/legacy-debconf/build-spec/debian/debconf-test-postinst.postrm new file mode 100644 index 0000000..cbf5e3b --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/legacy-debconf/build-spec/debian/debconf-test-postinst.postrm @@ -0,0 +1,7 @@ +#!/bin/sh +set -e +if [ "$1" = purge ] && [ -e /usr/share/debconf/confmodule ]; then + . /usr/share/debconf/confmodule + db_purge +fi +#DEBHELPER# diff --git a/t/recipes/checks/debian/copyright/dep5/legacy-debconf/build-spec/debian/debconf-test-postinst.templates b/t/recipes/checks/debian/copyright/dep5/legacy-debconf/build-spec/debian/debconf-test-postinst.templates new file mode 100644 index 0000000..2a2a8ab --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/legacy-debconf/build-spec/debian/debconf-test-postinst.templates @@ -0,0 +1,3 @@ +Template: debconf/test +Type: text +_description: Enter something: diff --git a/t/recipes/checks/debian/copyright/dep5/legacy-debconf/build-spec/debian/debconf-test-preinst.postrm b/t/recipes/checks/debian/copyright/dep5/legacy-debconf/build-spec/debian/debconf-test-preinst.postrm new file mode 100644 index 0000000..cbf5e3b --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/legacy-debconf/build-spec/debian/debconf-test-preinst.postrm @@ -0,0 +1,7 @@ +#!/bin/sh +set -e +if [ "$1" = purge ] && [ -e /usr/share/debconf/confmodule ]; then + . /usr/share/debconf/confmodule + db_purge +fi +#DEBHELPER# diff --git a/t/recipes/checks/debian/copyright/dep5/legacy-debconf/build-spec/debian/debconf-test-preinst.preinst b/t/recipes/checks/debian/copyright/dep5/legacy-debconf/build-spec/debian/debconf-test-preinst.preinst new file mode 100644 index 0000000..bf6f074 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/legacy-debconf/build-spec/debian/debconf-test-preinst.preinst @@ -0,0 +1,13 @@ +#!/bin/sh +set -e + +# Obsolete name for the confmodule +. /usr/share/debconf/confmodule.sh + +. /usr/share/debconf/confmodule + +db_input medium debconf/test + +#DEBHELPER# + +true diff --git a/t/recipes/checks/debian/copyright/dep5/legacy-debconf/build-spec/debian/debconf-test-preinst.templates b/t/recipes/checks/debian/copyright/dep5/legacy-debconf/build-spec/debian/debconf-test-preinst.templates new file mode 100644 index 0000000..2a2a8ab --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/legacy-debconf/build-spec/debian/debconf-test-preinst.templates @@ -0,0 +1,3 @@ +Template: debconf/test +Type: text +_description: Enter something: diff --git a/t/recipes/checks/debian/copyright/dep5/legacy-debconf/build-spec/debian/debconf-test.config b/t/recipes/checks/debian/copyright/dep5/legacy-debconf/build-spec/debian/debconf-test.config new file mode 100644 index 0000000..9e32d06 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/legacy-debconf/build-spec/debian/debconf-test.config @@ -0,0 +1,24 @@ +#!/bin/sh + +set -e + +. /usr/share/debconf/confmodule + +db_settitle "Funky lintian test" + +# Bad priorities. +db_text LOW debconf/test +db_input normal debconf/test + +# Valid priorities. +db_text \ +high debconf/test +foo=medium +db_input $foo debconf/test +db_input "$foo" debconf/test +db_input 'medium' debconf/test + +# debconf/transtring should not be flagged as unused +# (it's aliased to debconf/alias, which is used) +db_register debconf/transtring debconf/alias +db_input medium debconf/alias diff --git a/t/recipes/checks/debian/copyright/dep5/legacy-debconf/build-spec/debian/debconf-test.postinst b/t/recipes/checks/debian/copyright/dep5/legacy-debconf/build-spec/debian/debconf-test.postinst new file mode 100644 index 0000000..b387037 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/legacy-debconf/build-spec/debian/debconf-test.postinst @@ -0,0 +1,10 @@ +#!/bin/sh + +set -e + +. /usr/share/debconf/confmodule + +# Not supposed to do this here. +db_input medium debconf/test + +true diff --git a/t/recipes/checks/debian/copyright/dep5/legacy-debconf/build-spec/debian/debconf-test.templates b/t/recipes/checks/debian/copyright/dep5/legacy-debconf/build-spec/debian/debconf-test.templates new file mode 100644 index 0000000..811bb6c --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/legacy-debconf/build-spec/debian/debconf-test.templates @@ -0,0 +1,101 @@ +Template: debconf/test +Type: text +_description: Foo bar (1) + +Template: debconf/testmulti +Type: multiselect +__Choices: foo, bar, boo +_Description: test comma usages in choices fields + +Template: debconf/testmulti-escape +Type: multiselect +_Choices: foo\, bar, boo +_Description: test escaped comma usages in choices fields: + +Template: debconf/testboolean +Type: boolean +_Description: Enter yes or no: + Do you want to answer this question? + +Template: debconf/teststring +Type: string +_Description: This template goes on and on. + This template goes on and on. + This template goes on and on. + This template goes on and on. + This template goes on and on. + This template goes on and on. + This template goes on and on. + This template goes on and on. + This template goes on and on. + This template goes on and on. + This template goes on and on. + This template goes on and on. + This template goes on and on. + This template goes on and on. + This template goes on and on. + This template goes on and on. + This template goes on and on. + This template goes on and on. + This template goes on and on. + This template goes on and on. + This template goes on and on. + This template goes on and on. + +Template: debconf/testnote +Type: note +Description: This should be a title and not a really long sentence that ends in a regular period. + +Template: debconf/1st-person +Type: select +__Choices: one, two +_Description: Select one of these: + I am a stupid test of first-person syntax that tells you to select yes + even though yes isn't an option in this prompt. + +Template: debconf/internal +Type: boolean +Description: For internal use only + We are testing that style checks are not applied to templates that are + marked as internal. + +Template: debconf/no-description +Type: string + +Template: debconf/translate +Type: boolean +_Default: false +_Description: Should this really be translated? + +Template: debconf/transtring +Type: string +_Default: 1 +_Description: Count of templates: + The number of useless numbers that a translator would have to translate + for this template. + +Template: debconf/language +__Choices: English, Spanish, German, French +# This is the default choice. Translators should put their own language, +# if available, here instead, but the value MUST be the English version +# of the value for the package scripts to work properly. +_Default: English[ translators, see the comment in the PO files] +_Description: The default language, an example of a default that should + be translated. + +Template: debconf/error +Type: error +_Description: An error occurred + This is a sample Debconf error template. + +Template: debconf/should-be-boolean +Type: select +__Choices: yes, no +_Description: Choose: + Pick yes or no. + +Template: debconf/should-be-no-longer-a-problem +Type: boolean +_Description: Decide, lintian + Using "no longer" should no longer be detected as + making-assumptions-about-interfaces-in-templates by lintian. diff --git a/t/recipes/checks/debian/copyright/dep5/legacy-debconf/build-spec/debian/debconf-test.templates.de b/t/recipes/checks/debian/copyright/dep5/legacy-debconf/build-spec/debian/debconf-test.templates.de new file mode 100644 index 0000000..f9ea121 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/legacy-debconf/build-spec/debian/debconf-test.templates.de @@ -0,0 +1,3 @@ +Template: debconf/testmulti +Type: multiselect +Choices: foo, bar\, boo, boo diff --git a/t/recipes/checks/debian/copyright/dep5/legacy-debconf/build-spec/debian/debconf-test.templates.in b/t/recipes/checks/debian/copyright/dep5/legacy-debconf/build-spec/debian/debconf-test.templates.in new file mode 100644 index 0000000..e69de29 diff --git a/t/recipes/checks/debian/copyright/dep5/legacy-debconf/build-spec/debian/debconf-udeb.postinst b/t/recipes/checks/debian/copyright/dep5/legacy-debconf/build-spec/debian/debconf-udeb.postinst new file mode 100644 index 0000000..4ce41f0 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/legacy-debconf/build-spec/debian/debconf-udeb.postinst @@ -0,0 +1,9 @@ +#!/bin/sh + +set -e + +. /usr/share/debconf/confmodule + +ldconfig + +true diff --git a/t/recipes/checks/debian/copyright/dep5/legacy-debconf/build-spec/debian/debconf-udeb.templates b/t/recipes/checks/debian/copyright/dep5/legacy-debconf/build-spec/debian/debconf-udeb.templates new file mode 100644 index 0000000..5d7cf5a --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/legacy-debconf/build-spec/debian/debconf-udeb.templates @@ -0,0 +1,3 @@ +Template: debian-installer/debconf-udeb/title +Type: text +_description: This is just a test diff --git a/t/recipes/checks/debian/copyright/dep5/legacy-debconf/build-spec/debian/po/POTFILES.in b/t/recipes/checks/debian/copyright/dep5/legacy-debconf/build-spec/debian/po/POTFILES.in new file mode 100644 index 0000000..d0c82f0 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/legacy-debconf/build-spec/debian/po/POTFILES.in @@ -0,0 +1,2 @@ +[type: gettext/rfc822deb] debconf-test.templates +[type: gettext/rfc822deb] debconf-udeb.templates diff --git a/t/recipes/checks/debian/copyright/dep5/legacy-debconf/build-spec/debian/po/de.po b/t/recipes/checks/debian/copyright/dep5/legacy-debconf/build-spec/debian/po/de.po new file mode 100644 index 0000000..86c5796 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/legacy-debconf/build-spec/debian/po/de.po @@ -0,0 +1,66 @@ +# +# Translators, if you are not familiar with the PO format, gettext +# documentation is worth reading, especially sections dedicated to +# this format, e.g. by running: +# info -n '(gettext)PO Files' +# info -n '(gettext)Header Entry' +# +# Some information specific to po-debconf are available at +# /usr/share/doc/po-debconf/README-trans +# or http://www.debian.org/intl/l10n/po-debconf/README-trans +# +# Developers do not need to manually edit POT or PO files. +# +msgid "" +msgstr "" +"Project-Id-Version: debconf-test 1\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2004-12-06 00:51+0100\n" +"PO-Revision-Date: 2004-12-06 01:01+0100\n" +"Last-Translator: Frank Lichtenheld \n" +"Language-Team: debian-l10n-german@l.d.o\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Type: text +#. description +#: ../debconf-test.templates:3 +msgid "Foo bar (2)" +msgstr "" + +#. Type: multiselect +#. Choices +#: ../debconf-test.templates:7 +msgid "foo" +msgstr "foo" + +#. Type: multiselect +#. Choices +#: ../debconf-test.templates:7 +msgid "bar" +msgstr "bar, boo" + +#. Type: multiselect +#. Choices +#: ../debconf-test.templates:7 +msgid "boo" +msgstr "boo" + +#. Type: multiselect +#. Description +#: ../debconf-test.templates:8 +msgid "test comma usages in choices fields" +msgstr "" + +#. Type: multiselect +#. Choices +#: ../debconf-test.templates:11 +msgid "foo\\, bar, boo" +msgstr "foo, bar, boo" + +#. Type: text +#. description +#: ../debconf-udeb.templates:3 +msgid "This is just a test" +msgstr "Dies ist nur ein Test" diff --git a/t/recipes/checks/debian/copyright/dep5/legacy-debconf/build-spec/debian/po/fr.po b/t/recipes/checks/debian/copyright/dep5/legacy-debconf/build-spec/debian/po/fr.po new file mode 100644 index 0000000..c74deb2 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/legacy-debconf/build-spec/debian/po/fr.po @@ -0,0 +1,60 @@ +# +# Translators, if you are not familiar with the PO format, gettext +# documentation is worth reading, especially sections dedicated to +# this format, e.g. by running: +# info -n '(gettext)PO Files' +# info -n '(gettext)Header Entry' +# +# Some information specific to po-debconf are available at +# /usr/share/doc/po-debconf/README-trans +# or http://www.debian.org/intl/l10n/po-debconf/README-trans +# +# Developers do not need to manually edit POT or PO files. +# +msgid "" +msgstr "" +"Project-Id-Version: debconf-test 1\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2004-12-06 00:51+0100\n" +"PO-Revision-Date: 2005-10-13 15:03+0200\n" +"Last-Translator: Frank Lichtenheld \n" +"Language-Team: debian-l10n-german@l.d.o\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=CHARSET\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Type: text +#. description +#: ../debconf-test.templates:3 +msgid "Foo bar (2)" +msgstr "" + +#. Type: multiselect +#. Choices +#: ../debconf-test.templates:7 +msgid "foo" +msgstr "foo" + +#. Type: multiselect +#. Choices +#: ../debconf-test.templates:7 +msgid "bar" +msgstr "bar, boo" + +#. Type: multiselect +#. Choices +#: ../debconf-test.templates:7 +msgid "boo" +msgstr "boo" + +#. Type: multiselect +#. Description +#: ../debconf-test.templates:8 +msgid "test comma usages in choices fields" +msgstr "" + +#. Type: text +#. description +#: ../debconf-udeb.templates:3 +msgid "This is just a test" +msgstr " diff --git a/t/recipes/checks/debian/copyright/dep5/legacy-debconf/build-spec/debian/po/lang.po b/t/recipes/checks/debian/copyright/dep5/legacy-debconf/build-spec/debian/po/lang.po new file mode 100644 index 0000000..7ac498a --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/legacy-debconf/build-spec/debian/po/lang.po @@ -0,0 +1,15 @@ +msgid "" +msgstr "" +"Project-Id-Version: debconf-test 1\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2004-12-06 00:51+0100\n" +"PO-Revision-Date: 2005-10-13 15:03+0200\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Type: text +#. description +#: ../debconf-test.templates:3 +msgid "Foo bar (2)" +msgstr "" diff --git a/t/recipes/checks/debian/copyright/dep5/legacy-debconf/build-spec/debian/po/nds.po b/t/recipes/checks/debian/copyright/dep5/legacy-debconf/build-spec/debian/po/nds.po new file mode 100644 index 0000000..7ac498a --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/legacy-debconf/build-spec/debian/po/nds.po @@ -0,0 +1,15 @@ +msgid "" +msgstr "" +"Project-Id-Version: debconf-test 1\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2004-12-06 00:51+0100\n" +"PO-Revision-Date: 2005-10-13 15:03+0200\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Type: text +#. description +#: ../debconf-test.templates:3 +msgid "Foo bar (2)" +msgstr "" diff --git a/t/recipes/checks/debian/copyright/dep5/legacy-debconf/build-spec/debian/po/output b/t/recipes/checks/debian/copyright/dep5/legacy-debconf/build-spec/debian/po/output new file mode 100644 index 0000000..c3df1a5 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/legacy-debconf/build-spec/debian/po/output @@ -0,0 +1 @@ +2 utf8 diff --git a/t/recipes/checks/debian/copyright/dep5/legacy-debconf/build-spec/debian/po/pt_BR.po b/t/recipes/checks/debian/copyright/dep5/legacy-debconf/build-spec/debian/po/pt_BR.po new file mode 100644 index 0000000..7ac498a --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/legacy-debconf/build-spec/debian/po/pt_BR.po @@ -0,0 +1,15 @@ +msgid "" +msgstr "" +"Project-Id-Version: debconf-test 1\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2004-12-06 00:51+0100\n" +"PO-Revision-Date: 2005-10-13 15:03+0200\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Type: text +#. description +#: ../debconf-test.templates:3 +msgid "Foo bar (2)" +msgstr "" diff --git a/t/recipes/checks/debian/copyright/dep5/legacy-debconf/build-spec/debian/po/sample-file.po b/t/recipes/checks/debian/copyright/dep5/legacy-debconf/build-spec/debian/po/sample-file.po new file mode 100644 index 0000000..8dcc0ff --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/legacy-debconf/build-spec/debian/po/sample-file.po @@ -0,0 +1 @@ +This is some file that isn't actually a valid .po file. diff --git a/t/recipes/checks/debian/copyright/dep5/legacy-debconf/build-spec/debian/po/templates.pot b/t/recipes/checks/debian/copyright/dep5/legacy-debconf/build-spec/debian/po/templates.pot new file mode 100644 index 0000000..914c77f --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/legacy-debconf/build-spec/debian/po/templates.pot @@ -0,0 +1,61 @@ +# +# Translators, if you are not familiar with the PO format, gettext +# documentation is worth reading, especially sections dedicated to +# this format, e.g. by running: +# info -n '(gettext)PO Files' +# info -n '(gettext)Header Entry' +# +# Some information specific to po-debconf are available at +# /usr/share/doc/po-debconf/README-trans +# or http://www.debian.org/intl/l10n/po-debconf/README-trans +# +# Developers do not need to manually edit POT or PO files. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2004-12-06 00:51+0100\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=CHARSET\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Type: text +#. description +#: ../debconf-test.templates:3 +msgid "Foo bar (2)" +msgstr "" + +#. Type: multiselect +#. Choices +#: ../debconf-test.templates:7 +msgid "foo" +msgstr "" + +#. Type: multiselect +#. Choices +#: ../debconf-test.templates:7 +msgid "bar" +msgstr "" + +#. Type: multiselect +#. Choices +#: ../debconf-test.templates:7 +msgid "boo" +msgstr "" + +#. Type: multiselect +#. Description +#: ../debconf-test.templates:8 +msgid "test comma usages in choices fields" +msgstr "" + +#. Type: text +#. description +#: ../debconf-udeb.templates:3 +msgid "This is just a test" +msgstr "" diff --git a/t/recipes/checks/debian/copyright/dep5/legacy-debconf/build-spec/debian/pycompat b/t/recipes/checks/debian/copyright/dep5/legacy-debconf/build-spec/debian/pycompat new file mode 100644 index 0000000..0cfbf08 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/legacy-debconf/build-spec/debian/pycompat @@ -0,0 +1 @@ +2 diff --git a/t/recipes/checks/debian/copyright/dep5/legacy-debconf/build-spec/debian/pyversions b/t/recipes/checks/debian/copyright/dep5/legacy-debconf/build-spec/debian/pyversions new file mode 100644 index 0000000..6f290b0 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/legacy-debconf/build-spec/debian/pyversions @@ -0,0 +1 @@ +>= 2.7 diff --git a/t/recipes/checks/debian/copyright/dep5/legacy-debconf/build-spec/debian/rules b/t/recipes/checks/debian/copyright/dep5/legacy-debconf/build-spec/debian/rules new file mode 100755 index 0000000..933901a --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/legacy-debconf/build-spec/debian/rules @@ -0,0 +1,64 @@ +#!/usr/bin/make -f + +deb_dir = debian/debconf +udeb_dir = debian/debconf-udeb +build_dirs = $(deb_dir) $(udeb_dir) + +build-indep: +# There are no architecture-independent files to be built +# by this package. If there were any they would be made +# here. + +build-arch: + dh_testdir + touch build + +build: build-indep build-arch + +clean: + dh_testdir + dh_testroot + -rm -f build + + dh_clean + +binary-indep: build +# There are no architecture-independent files to be uploaded +# generated by this package. If there were any they would be +# made here. + +binary-arch: build + dh_testdir + dh_testroot + dh_prep + dh_installdirs -a + + dh_installchangelogs -a + dh_installdocs -a + dh_installdebconf -pdebconf-test + dh_installdebconf -pdebconf-test-noscripts --noscripts + dh_installdebconf -pdebconf-test-preinst --noscripts + dh_installdebconf -pdebconf-test-postinst --noscripts + dh_installdebconf -pdebconf-udeb + + + + + dh_compress -a + dh_fixperms -a + +# The shlibs stuff doesn't matter here so do it in a weird order to +# test warnings. + dh_installdeb -a + dh_shlibdeps -a + dh_makeshlibs -a + dh_gencontrol -a + dh_md5sums + dh_builddeb -a + dh_makeshlibs -a + +# Below here is fairly generic really + +binary: binary-indep binary-arch + +.PHONY: build-arch build-indep build binary binary-arch binary-indep clean checkroot diff --git a/t/recipes/checks/debian/copyright/dep5/legacy-debconf/build-spec/fill-values b/t/recipes/checks/debian/copyright/dep5/legacy-debconf/build-spec/fill-values new file mode 100644 index 0000000..186615f --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/legacy-debconf/build-spec/fill-values @@ -0,0 +1,6 @@ +Skeleton: upload-native +Testname: legacy-debconf +Source: debconf +Version: 1~rc1 +Description: Legacy test "debconf" +Default-Build-Depends: debhelper (>= [% $dh_compat_level %]~) diff --git a/t/recipes/checks/debian/copyright/dep5/legacy-debconf/eval/desc b/t/recipes/checks/debian/copyright/dep5/legacy-debconf/eval/desc new file mode 100644 index 0000000..639a1ff --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/legacy-debconf/eval/desc @@ -0,0 +1,2 @@ +Testname: legacy-debconf +Check: debian/copyright/dep5 diff --git a/t/recipes/checks/debian/copyright/dep5/legacy-debconf/eval/hints b/t/recipes/checks/debian/copyright/dep5/legacy-debconf/eval/hints new file mode 100644 index 0000000..a925398 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/legacy-debconf/eval/hints @@ -0,0 +1 @@ +debconf (source): no-dep5-copyright [debian/copyright] diff --git a/t/recipes/checks/debian/copyright/dep5/legacy-debconf/eval/post-test b/t/recipes/checks/debian/copyright/dep5/legacy-debconf/eval/post-test new file mode 100644 index 0000000..faeef0b --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/legacy-debconf/eval/post-test @@ -0,0 +1 @@ +s/\(current is ([0-9]+\.)+[0-9]\)/(current is CURRENT)/ diff --git a/t/recipes/checks/debian/copyright/dep5/legacy-foo++/build-spec/debian/README.Debian b/t/recipes/checks/debian/copyright/dep5/legacy-foo++/build-spec/debian/README.Debian new file mode 100644 index 0000000..87bfcdf --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/legacy-foo++/build-spec/debian/README.Debian @@ -0,0 +1,7 @@ +foo++ for Debian +---------------- + +This should trigger a warning, as i use a fake mail address. + + -- Marc 'HE' Brockschmidt , Wed, 14 Apr 2004 01:44:18 +0200 + diff --git a/t/recipes/checks/debian/copyright/dep5/legacy-foo++/build-spec/debian/changelog.in b/t/recipes/checks/debian/copyright/dep5/legacy-foo++/build-spec/debian/changelog.in new file mode 100644 index 0000000..f838939 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/legacy-foo++/build-spec/debian/changelog.in @@ -0,0 +1,31 @@ +foo++ ([% $version %]) [% $distribution %]; urgency=low + + * Add a fake README.Debian to trigger a warning. + * This should trigger + debian-changelog-file-contains-debmake-default-email-address. + + -- Marc 'HE' Brockschmidt Wed, 14 Apr 2003 01:35:47 +0200 + +foo++ (4) unstable; urgency=low + + * This changelog now includes a ISO-8859-1 character: '' + + -- Frank Lichtenheld Fri, 5 Mar 2004 13:41:39 +0100 + +foo++ (3) unstable; urgency=low + + * Set maintainers + uploaders incorrectly + + -- Jeroen van Wolffelaar Fri, 5 Mar 2004 04:20:24 +0100 + +foo++ (2) unstable; urgency=low + + * Added a foo++-helper package to try and catch even more ++ bugs. + + -- Sean 'Shaleh' Perry Sat, 10 Feb 2001 23:16:17 -0800 + +foo++ (1) unstable; urgency=low + + * Initial version + + -- Sean 'Shaleh' Perry Thu, 16 Nov 2000 09:11:40 -0800 diff --git a/t/recipes/checks/debian/copyright/dep5/legacy-foo++/build-spec/debian/control b/t/recipes/checks/debian/copyright/dep5/legacy-foo++/build-spec/debian/control new file mode 100644 index 0000000..3e86b96 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/legacy-foo++/build-spec/debian/control @@ -0,0 +1,30 @@ +Source: foo++ +Section: misc +Priority: optional +Maintainer: Lintian Maintainer +Uploaders: Marc 'HE' Brockschmidt , Jeroen van Wolffelaar, + Frank , Yama@gotchi, Josip, + I am afraid of spam and think this helps +Standards-Version: 3.1.1 +XS-Dm-Upload-Allowed: no + +Package: foo++ +Architecture: all +Build-Depends: test +Depends: test, libssl0.9.7 +Description: see how lintian reacts to plus signs in the package name + Regression test to see if lintian tests work on a package with plus signs in + its name. + . + This description also uses non-UTF8 high bytes chars: ÄÖÜß + +Package: foo++-helper +Architecture: all +Depends: test, foo++ +Description: see how lintian reacts to plus signs in the package name + Regression test to see if lintian tests work on a package with plus signs in + its name. This has /usr/share/doc links to foo++ to trigger even more checks. + . + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. diff --git a/t/recipes/checks/debian/copyright/dep5/legacy-foo++/build-spec/debian/copyright b/t/recipes/checks/debian/copyright/dep5/legacy-foo++/build-spec/debian/copyright new file mode 100644 index 0000000..e2d6d93 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/legacy-foo++/build-spec/debian/copyright @@ -0,0 +1,7 @@ +A reference to /usr/share/common-licenses/GPL to make it look like this +package is under the GPL and trigger the OpenSSL warning. + +However, there is also a reference to /usr/share/common-licenses/LGPL, so +who knows what bits actually depend on libssl. + +Copr. 2007 Somebody. diff --git a/t/recipes/checks/debian/copyright/dep5/legacy-foo++/build-spec/debian/rules b/t/recipes/checks/debian/copyright/dep5/legacy-foo++/build-spec/debian/rules new file mode 100755 index 0000000..63bb4db --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/legacy-foo++/build-spec/debian/rules @@ -0,0 +1,36 @@ +#!/usr/bin/make -f + +foo=foo++ +helper=foo++-helper + +build-arch: + +build-indep: + +build: build-arch build-indep + +binary-arch: + +binary-indep: + install -d debian/$(foo)/DEBIAN + install -d debian/$(foo)/usr/share/doc/$(foo) + install -m 644 debian/changelog \ + debian/$(foo)/usr/share/doc/$(foo)/changelog + gzip -n -9 debian/$(foo)/usr/share/doc/$(foo)/changelog + install -m 644 debian/README.Debian \ + debian/$(foo)/usr/share/doc/$(foo)/README.Debian + gzip -n -9 debian/$(foo)/usr/share/doc/$(foo)/README.Debian + dpkg-gencontrol -isp -p$(foo) -Pdebian/$(foo) + dpkg --build debian/$(foo) .. + + install -d debian/$(helper)/DEBIAN + install -d debian/$(helper)/usr/share/doc/ + ln -sf $(foo) debian/$(helper)/usr/share/doc/$(helper) + dpkg-gencontrol -isp -p$(helper) -Pdebian/$(helper) + dpkg --build debian/$(helper) .. + +binary: binary-arch binary-indep + +clean: + +.PHONY: build-arch build-indep build binary-arch binary-indep binary clean diff --git a/t/recipes/checks/debian/copyright/dep5/legacy-foo++/build-spec/debian/watch b/t/recipes/checks/debian/copyright/dep5/legacy-foo++/build-spec/debian/watch new file mode 100644 index 0000000..26f9a3c --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/legacy-foo++/build-spec/debian/watch @@ -0,0 +1,6 @@ +# A comment \ +version=0 + +# uscan does not interpret the backslash above, it is just part of the comment + +http://domain.tld/file-(.*)\.tar\.gz diff --git a/t/recipes/checks/debian/copyright/dep5/legacy-foo++/build-spec/fill-values b/t/recipes/checks/debian/copyright/dep5/legacy-foo++/build-spec/fill-values new file mode 100644 index 0000000..86d43bc --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/legacy-foo++/build-spec/fill-values @@ -0,0 +1,5 @@ +Skeleton: upload-native +Testname: legacy-foo++ +Source: foo++ +Version: 5 +Description: Legacy test "foo++" diff --git a/t/recipes/checks/debian/copyright/dep5/legacy-foo++/eval/desc b/t/recipes/checks/debian/copyright/dep5/legacy-foo++/eval/desc new file mode 100644 index 0000000..97216a4 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/legacy-foo++/eval/desc @@ -0,0 +1,2 @@ +Testname: legacy-foo++ +Check: debian/copyright/dep5 diff --git a/t/recipes/checks/debian/copyright/dep5/legacy-foo++/eval/hints b/t/recipes/checks/debian/copyright/dep5/legacy-foo++/eval/hints new file mode 100644 index 0000000..07ecb25 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/legacy-foo++/eval/hints @@ -0,0 +1 @@ +foo++ (source): no-dep5-copyright [debian/copyright] diff --git a/t/recipes/checks/debian/copyright/dep5/legacy-foo++/eval/post-test b/t/recipes/checks/debian/copyright/dep5/legacy-foo++/eval/post-test new file mode 100644 index 0000000..faeef0b --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/legacy-foo++/eval/post-test @@ -0,0 +1 @@ +s/\(current is ([0-9]+\.)+[0-9]\)/(current is CURRENT)/ diff --git a/t/recipes/checks/debian/copyright/dep5/legacy-scripts/build-spec/debian/changelog.in b/t/recipes/checks/debian/copyright/dep5/legacy-scripts/build-spec/debian/changelog.in new file mode 100644 index 0000000..935c633 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/legacy-scripts/build-spec/debian/changelog.in @@ -0,0 +1,41 @@ +scripts ([% $version %]) [% $distribution %]; urgency=low + + * I'm also not able to write my name. + * Added a script in /etc/Xsession.d + * Bizarre version number courtesy of + https://wiki.ubuntu.com/SecurityUpdateProcedures#Prepare + + -- Mark 'HE' Brokschmitt Thu, 23 Jun 2005 14:32:39 +0200 + +scripts (5-1) unstable; urgency=low + + * I'm making a typo in my own name... And I want lintian to warn me about + it. + + -- Jeroen van Wolffelaar Sun, 18 Apr 2004 02:26:34 +0200 + +scripts (4-1) unstable; urgency=low + + * Add new example to check that not executable files with a shebang line + called *in don't trigger the script-not-executable warning. + + -- Marc 'HE' Brockschmidt Wed, 14 Apr 2004 19:44:04 +0200 + +scripts (3-3) unstable; urgency=low + + * Add suidperlfoo and some code in debian/rules to + check the new suidperl checks + + -- Frank Lichtenheld Wed, 31 Mar 2004 21:06:20 +0000 + +scripts (2-1) unstable; urgency=low + + * Add tkfoo script for tk checkings + + -- Lintian Maintainers Sat, 21 Feb 2004 17:13:36 +0100 + +scripts (1-0) unstable; urgency=low + + * Initial version + + -- Lintian Maintainers Sat, 10 Feb 2001 15:37:31 -0800 diff --git a/t/recipes/checks/debian/copyright/dep5/legacy-scripts/build-spec/debian/control.in b/t/recipes/checks/debian/copyright/dep5/legacy-scripts/build-spec/debian/control.in new file mode 100644 index 0000000..75a521f --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/legacy-scripts/build-spec/debian/control.in @@ -0,0 +1,16 @@ +Source: scripts +Section: interpreters +Priority: optional +Maintainer: Lintian Maintainers +Uploaders: Jeroen van Wolfelaar , Marc 'HE' Brockschmidt +Build-Depends-Indep: dpatch +Standards-Version: 3.2.1 + +Package: scripts +Architecture: [% $package_architecture %] +Depends: test, ruby1.8, build-essential, libssl0.9.7, php7.0-cli +Recommends: tk8.4 | wish +Description: test lintian's script file checks + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. diff --git a/t/recipes/checks/debian/copyright/dep5/legacy-scripts/build-spec/debian/copyright b/t/recipes/checks/debian/copyright/dep5/legacy-scripts/build-spec/debian/copyright new file mode 100644 index 0000000..ad8a119 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/legacy-scripts/build-spec/debian/copyright @@ -0,0 +1,5 @@ +This file contains the phrase "under the same terms as Perl itself" to +trigger warnings about not having common-licenses references. + +This file contains the phrase "public domain" which should suppress +warnings about no copyright date. diff --git a/t/recipes/checks/debian/copyright/dep5/legacy-scripts/build-spec/debian/patches/00list b/t/recipes/checks/debian/copyright/dep5/legacy-scripts/build-spec/debian/patches/00list new file mode 100644 index 0000000..3b9d37e --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/legacy-scripts/build-spec/debian/patches/00list @@ -0,0 +1,11 @@ +01_not_here_right_now.dpatch + +# some comment +/* some more + elaborate comment + which needs DPATCH_OPTION_CPP=1 + */02_i_dont_have_a_description.patch 03_specified_without_dpatch + +// and again a comment + +04_i_dont_have_a_description_either.patch diff --git a/t/recipes/checks/debian/copyright/dep5/legacy-scripts/build-spec/debian/patches/00list.sparc b/t/recipes/checks/debian/copyright/dep5/legacy-scripts/build-spec/debian/patches/00list.sparc new file mode 100644 index 0000000..8b47ab3 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/legacy-scripts/build-spec/debian/patches/00list.sparc @@ -0,0 +1 @@ +01_some_other_patch_thats_not_in_the_package.dpatch diff --git a/t/recipes/checks/debian/copyright/dep5/legacy-scripts/build-spec/debian/patches/00options b/t/recipes/checks/debian/copyright/dep5/legacy-scripts/build-spec/debian/patches/00options new file mode 100644 index 0000000..57ffeb6 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/legacy-scripts/build-spec/debian/patches/00options @@ -0,0 +1 @@ +DPATCH_OPTION_CPP=1 diff --git a/t/recipes/checks/debian/copyright/dep5/legacy-scripts/build-spec/debian/patches/02_i_dont_have_a_description.patch b/t/recipes/checks/debian/copyright/dep5/legacy-scripts/build-spec/debian/patches/02_i_dont_have_a_description.patch new file mode 100644 index 0000000..9279c1b --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/legacy-scripts/build-spec/debian/patches/02_i_dont_have_a_description.patch @@ -0,0 +1,7 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 02_i_dont_have_a_description.patch.dpatch by Marc 'HE' Brockschmidt > +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: No description. + +@DPATCH@ diff --git a/t/recipes/checks/debian/copyright/dep5/legacy-scripts/build-spec/debian/patches/03_specified_without_dpatch.dpatch b/t/recipes/checks/debian/copyright/dep5/legacy-scripts/build-spec/debian/patches/03_specified_without_dpatch.dpatch new file mode 100644 index 0000000..8303ac6 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/legacy-scripts/build-spec/debian/patches/03_specified_without_dpatch.dpatch @@ -0,0 +1,5 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## All lines beginning with `## DP:' are a description of the patch. +## DP: Listed in 00list without .dpatch suffix. + +@DPATCH@ diff --git a/t/recipes/checks/debian/copyright/dep5/legacy-scripts/build-spec/debian/patches/04_i_dont_have_a_description_either.patch b/t/recipes/checks/debian/copyright/dep5/legacy-scripts/build-spec/debian/patches/04_i_dont_have_a_description_either.patch new file mode 100644 index 0000000..b603f16 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/legacy-scripts/build-spec/debian/patches/04_i_dont_have_a_description_either.patch @@ -0,0 +1,7 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 04_i_dont_have_a_description_either.patch by Adam D. Barratt +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: + +@DPATCH@ diff --git a/t/recipes/checks/debian/copyright/dep5/legacy-scripts/build-spec/debian/postinst b/t/recipes/checks/debian/copyright/dep5/legacy-scripts/build-spec/debian/postinst new file mode 100644 index 0000000..7c5baf1 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/legacy-scripts/build-spec/debian/postinst @@ -0,0 +1,14 @@ +#!/bin/sh + +if [ -x "/etc/init.d/lsb-broken" ] ; then + update-rc.d lsb-broken defaults >/dev/null +fi +if [ -x "/etc/init.d/no-lsb" ] ; then + update-rc.d no-lsb defaults >/dev/null +fi +if [ -x "/etc/init.d/skeleton" ] ; then + update-rc.d skeleton defaults >/dev/null +fi +if [ -x "/etc/init.d/lsb-other" ] ; then + update-rc.d lsb-other defaults >/dev/null +fi diff --git a/t/recipes/checks/debian/copyright/dep5/legacy-scripts/build-spec/debian/postrm b/t/recipes/checks/debian/copyright/dep5/legacy-scripts/build-spec/debian/postrm new file mode 100644 index 0000000..8fa75a2 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/legacy-scripts/build-spec/debian/postrm @@ -0,0 +1,9 @@ +#!/bin/sh -e + +if [ "$1" = purge ] ; then + update-rc.d lsb-broken remove >/dev/null + update-rc.d no-lsb remove >/dev/null + update-rc.d skeleton remove >/dev/null + update-rc.d lsb-other remove >/dev/null + update-rc.d lsb-other remove >/dev/null +fi diff --git a/t/recipes/checks/debian/copyright/dep5/legacy-scripts/build-spec/debian/preinst b/t/recipes/checks/debian/copyright/dep5/legacy-scripts/build-spec/debian/preinst new file mode 100644 index 0000000..0799557 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/legacy-scripts/build-spec/debian/preinst @@ -0,0 +1,15 @@ +#!/bin/sh + +set -e +set -x + +# +# Some comments here +# + +# This serves as an example of an "empty" script, so +# please do not add any real code here, thank you :) + +#DEBHELPER# + +exit 0 diff --git a/t/recipes/checks/debian/copyright/dep5/legacy-scripts/build-spec/debian/rules b/t/recipes/checks/debian/copyright/dep5/legacy-scripts/build-spec/debian/rules new file mode 100755 index 0000000..ee3677e --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/legacy-scripts/build-spec/debian/rules @@ -0,0 +1,105 @@ +#!/usr/bin/make -f + +tmp=debian/tmp + +build-arch: + echo "Hi, in an arch: all package, I am a bug!" + +build-indep: + +build: build-arch build-indep + +binary-arch: + echo "Hi, in an arch: all package, I am a bug!" + +binary-indep: + install -d $(tmp)/usr/bin/ + install -d $(tmp)/etc/X11/Xsession.d/ + install -d $(tmp)/etc/init.d/ + install -d $(tmp)/etc/csh/login.d/ + install -d $(tmp)/etc/fish.d/ + install -d $(tmp)/usr/share/scripts/ + install -d $(tmp)/usr/share/doc/scripts/ + install -d $(tmp)/usr/lib/cgi-bin + install -d $(tmp)/usr/src/scripts + install -d $(tmp)/DEBIAN + + install -m 755 csh-foo $(tmp)/etc/csh/login.d/ + install -m 755 envfoo $(tmp)/usr/bin/ + install -m 755 fish-foo $(tmp)/etc/fish.d/ + install -m 755 jruby-broken $(tmp)/usr/bin/ + install -m 755 perlfoo $(tmp)/usr/bin/ + install -m 755 rubyfoo $(tmp)/usr/bin/ +# This doesn't use "env" but should also trigger script-in-usr-share-doc + install -m 755 rubyfoo $(tmp)/usr/share/doc/scripts/ + install -m 755 make-foo $(tmp)/usr/bin/ + install -m 755 lefty-foo $(tmp)/usr/bin/ + install -m 4751 perlfoo $(tmp)/usr/bin/suidperlfoo2 + install -m 755 sh-broken $(tmp)/usr/bin/ + install -m 4555 suidperlfoo $(tmp)/usr/bin/ + install -m 755 tkfoo $(tmp)/usr/bin/ + install -m 755 wishfoo $(tmp)/usr/bin/ + install -m 644 xsession-test $(tmp)/etc/X11/Xsession.d/ + +# Permissions here aren't part of what's being tested, but let us exercise +# some other errors. + install -m 755 perl-bizarre-1 $(tmp)/usr/bin/ + install -m 750 perl-bizarre-2 $(tmp)/usr/bin/ + install -m 754 perl-bizarre-3 $(tmp)/usr/bin/ + install -m 705 guile-bizarre $(tmp)/usr/bin/ + +# First one should produce a warning; second one shouldn't. + install -m 755 gccbug.dpatch $(tmp)/usr/share/scripts/ + install -m 755 gccbug.dpatch $(tmp)/usr/src/scripts/ + + install -m 644 init-skeleton $(tmp)/etc/init.d/skeleton + install -m 755 init-no-lsb $(tmp)/etc/init.d/no-lsb + install -m 755 init-lsb-broken $(tmp)/etc/init.d/lsb-broken + install -m 755 init-lsb-other $(tmp)/etc/init.d/lsb-other + + install -m 755 phpfoo $(tmp)/usr/share/scripts/ + sed 's/php$$/php7.0/' phpfoo > $(tmp)/usr/share/scripts/php7.0foo + chmod 755 $(tmp)/usr/share/scripts/php7.0foo + + install -m 755 phpenvfoo $(tmp)/usr/share/scripts/ + sed 's/php$$/php7.0/' phpenvfoo > $(tmp)/usr/share/scripts/php7.0envfoo + chmod 755 $(tmp)/usr/share/scripts/php7.0envfoo + + echo "#!/usr/bin/perl" >> $(tmp)/usr/share/scripts/foobar.in + chmod 644 $(tmp)/usr/share/scripts/foobar.in + + touch $(tmp)/usr/share/scripts/mono.exe + chmod 755 $(tmp)/usr/share/scripts/mono.exe + + echo "#!/bin/sh" > $(tmp)/usr/share/scripts/foo\$$bar + chmod 755 $(tmp)/usr/share/scripts/foo\$$bar + + echo "#!/bin/sh" > $(tmp)/usr/lib/cgi-bin/cgi-script + chmod 755 $(tmp)/usr/lib/cgi-bin/cgi-script + + echo "#!/bin/sh" > $(tmp)/usr/bin/test.sh + chmod 755 $(tmp)/usr/bin/test.sh + + + dh_testroot # dummy to test missing debhelper dependency + + + install -m 644 debian/changelog $(tmp)/usr/share/doc/scripts/changelog.Debian + gzip -n -9 $(tmp)/usr/share/doc/scripts/changelog.Debian + install -m 644 debian/copyright $(tmp)/usr/share/doc/scripts/copyright + + install -m 644 debian/scripts.conffiles $(tmp)/DEBIAN/conffiles + install -m 755 debian/preinst $(tmp)/DEBIAN/preinst + install -m 755 debian/postinst $(tmp)/DEBIAN/postinst + install -m 755 debian/postrm $(tmp)/DEBIAN/postrm + touch $(tmp)/DEBIAN/prerm + chmod 755 $(tmp)/DEBIAN/prerm + dpkg-gencontrol -isp + dpkg --build $(tmp) .. + +binary: binary-arch binary-indep + +clean: + rm -rf debian/files $(tmp) debian/substvars + +.PHONY: build-arch build-indep build binary-arch binary-indep binary clean diff --git a/t/recipes/checks/debian/copyright/dep5/legacy-scripts/build-spec/debian/scripts.conffiles b/t/recipes/checks/debian/copyright/dep5/legacy-scripts/build-spec/debian/scripts.conffiles new file mode 100644 index 0000000..01a371a --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/legacy-scripts/build-spec/debian/scripts.conffiles @@ -0,0 +1,6 @@ +/etc/init.d/lsb-broken +/etc/init.d/lsb-other +/etc/init.d/no-lsb +/etc/X11/Xsession.d/xsession-test +/etc/csh/login.d/csh-foo +/etc/fish.d/fish-foo diff --git a/t/recipes/checks/debian/copyright/dep5/legacy-scripts/build-spec/debian/watch b/t/recipes/checks/debian/copyright/dep5/legacy-scripts/build-spec/debian/watch new file mode 100644 index 0000000..dba5815 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/legacy-scripts/build-spec/debian/watch @@ -0,0 +1,8 @@ +# watch file with upstream version mangling + +version=2 +opts="uversionmangle=s/$/ds/" \ +http://qa.debian.org/watch/sf.php?project=foo scripts\.([\d.]+)\.tar\.gz debian uupdate + +version=3 +http://ftp.sf.net/foo/foo_bar(.+)\.Z 5 uupdate \ No newline at end of file diff --git a/t/recipes/checks/debian/copyright/dep5/legacy-scripts/build-spec/fill-values b/t/recipes/checks/debian/copyright/dep5/legacy-scripts/build-spec/fill-values new file mode 100644 index 0000000..8a68457 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/legacy-scripts/build-spec/fill-values @@ -0,0 +1,6 @@ +Testname: legacy-scripts +Source: scripts +Version: 6ds-1ubuntu0.5.10.1 +Package-Architecture: all +Skeleton: upload-non-native +Description: Legacy test "scripts" diff --git a/t/recipes/checks/debian/copyright/dep5/legacy-scripts/build-spec/orig/csh-foo b/t/recipes/checks/debian/copyright/dep5/legacy-scripts/build-spec/orig/csh-foo new file mode 100644 index 0000000..eaf47a1 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/legacy-scripts/build-spec/orig/csh-foo @@ -0,0 +1,2 @@ +#! /bin/csh + diff --git a/t/recipes/checks/debian/copyright/dep5/legacy-scripts/build-spec/orig/envfoo b/t/recipes/checks/debian/copyright/dep5/legacy-scripts/build-spec/orig/envfoo new file mode 100755 index 0000000..e005037 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/legacy-scripts/build-spec/orig/envfoo @@ -0,0 +1,4 @@ +#! /bin/env python + +if __name__ == '__main__': + print 'Hi there' diff --git a/t/recipes/checks/debian/copyright/dep5/legacy-scripts/build-spec/orig/fish-foo b/t/recipes/checks/debian/copyright/dep5/legacy-scripts/build-spec/orig/fish-foo new file mode 100644 index 0000000..7f59139 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/legacy-scripts/build-spec/orig/fish-foo @@ -0,0 +1,2 @@ +#! /usr/bin/fish + diff --git a/t/recipes/checks/debian/copyright/dep5/legacy-scripts/build-spec/orig/gccbug.dpatch b/t/recipes/checks/debian/copyright/dep5/legacy-scripts/build-spec/orig/gccbug.dpatch new file mode 100755 index 0000000..65cbf37 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/legacy-scripts/build-spec/orig/gccbug.dpatch @@ -0,0 +1,39 @@ +#! /bin/sh -e + +# DP: Use sensible-editor instead of vi as fallback editor + +# Taken from gcc-4.1-source. Chokes bash -n (due to the patch) despite being +# a valid dpatch, so don't warn about it if it's in /usr/src. + +dir= +if [ $# -eq 3 -a "$2" = '-d' ]; then + pdir="-d $3" + dir="$3/" +elif [ $# -ne 1 ]; then + echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" + exit 1 +fi +case "$1" in + -patch) + patch $pdir -f --no-backup-if-mismatch -p0 < $0 + ;; + -unpatch) + patch $pdir -f --no-backup-if-mismatch -R -p0 < $0 + ;; + *) + echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" + exit 1 +esac +exit 0 + +--- gcc/gccbug.in~ 2003-03-01 00:51:42.000000000 +0100 ++++ gcc/gccbug.in 2003-03-02 12:08:36.000000000 +0100 +@@ -134,7 +134,7 @@ + # If they don't have a preferred editor set, then use + if [ -z "$VISUAL" ]; then + if [ -z "$EDITOR" ]; then +- EDIT=vi ++ EDIT=/usr/bin/sensible-editor + else + EDIT="$EDITOR" + fi diff --git a/t/recipes/checks/debian/copyright/dep5/legacy-scripts/build-spec/orig/guile-bizarre b/t/recipes/checks/debian/copyright/dep5/legacy-scripts/build-spec/orig/guile-bizarre new file mode 100644 index 0000000..70e2c74 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/legacy-scripts/build-spec/orig/guile-bizarre @@ -0,0 +1,6 @@ +#! /bin/sh +# -*- scheme -*- +exec guile -s $0 $* +# Seen in the wild as build-guile-gtk in libguilegtk-1.2-dev (0.31-5.1) +# Tests script_is_evil_and_wrong +!# diff --git a/t/recipes/checks/debian/copyright/dep5/legacy-scripts/build-spec/orig/init-lsb-broken b/t/recipes/checks/debian/copyright/dep5/legacy-scripts/build-spec/orig/init-lsb-broken new file mode 100644 index 0000000..e4dfa92 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/legacy-scripts/build-spec/orig/init-lsb-broken @@ -0,0 +1,34 @@ +#! /bin/sh +### BEGIN INIT INFO +# Provides: bad-lsb +# Required-Start: $local_fs $remote_fs +# Required-Stop: +# Default-Start: 1 2 3 4 5 +# Default-Stop: S 0 1 6 X +# Short-Description: Example Lintian initscript +# but this can't be continued +# Description: An example of a bad LSB section in an init script. +# This continuation is allowed (with spaces). +# This one is too (with tabs). +# X-Debian-Foo: Some unknown but valid keyword. +# Foo: Some invalid keyword. + +# Whoops, no terminating line. + +# And then we have this duplicate section. +### BEGIN INIT INFO +# Required-Start: This one doesn't count. +### END INIT INFO + +# Hey, look at all of those missing actions! But stop isn't missing. +case "$1" in + start|stop) + echo "Blah" + ;; + *) + echo "Usage: foo start" >&2 + exit 3 + ;; +esac + +: diff --git a/t/recipes/checks/debian/copyright/dep5/legacy-scripts/build-spec/orig/init-lsb-other b/t/recipes/checks/debian/copyright/dep5/legacy-scripts/build-spec/orig/init-lsb-other new file mode 100644 index 0000000..adb4795 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/legacy-scripts/build-spec/orig/init-lsb-other @@ -0,0 +1,22 @@ +#! /bin/sh +### BEGIN INIT INFO +# Provides: lsb-other +# Required-Start: $local_fs $remote_fs +# Required-Stop: $local_fs $remote_fs +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +# Description: This is another LSB script test, which has a missing +# Short-Description. +### END INIT INFO + +case "$1" in + start|stop|restart|reload|force-reload) + echo "Blah" + ;; + *) + echo "Usage: foo start" >&2 + exit 3 + ;; +esac + +: diff --git a/t/recipes/checks/debian/copyright/dep5/legacy-scripts/build-spec/orig/init-no-lsb b/t/recipes/checks/debian/copyright/dep5/legacy-scripts/build-spec/orig/init-no-lsb new file mode 100644 index 0000000..6b994dd --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/legacy-scripts/build-spec/orig/init-no-lsb @@ -0,0 +1,17 @@ +#! /bin/sh +# No LSB section, but otherwise okay. (Well, the messages are bad, but we +# don't check that yet.) + +case "$1" in + start) + echo "Blah starting" + ;; + stop) + echo "Blah stopping" + ;; + restart|force-reload) + echo "Blah restarting" + ;; +esac + +: diff --git a/t/recipes/checks/debian/copyright/dep5/legacy-scripts/build-spec/orig/init-skeleton b/t/recipes/checks/debian/copyright/dep5/legacy-scripts/build-spec/orig/init-skeleton new file mode 100644 index 0000000..c868508 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/legacy-scripts/build-spec/orig/init-skeleton @@ -0,0 +1,150 @@ +#! /bin/sh +### BEGIN INIT INFO +# Provides: skeleton +# Required-Start: $local_fs $remote_fs +# Required-Stop: $local_fs $remote_fs +# Default-Start: 2 3 4 5 +# Default-Stop: S 0 1 6 +# Short-Description: Example Lintian initscript +# Description: This file should be used to construct scripts to be +# placed in /etc/init.d. +### END INIT INFO + +# Do NOT "set -e" + +# PATH should only include /usr/* if it runs after the mountnfs.sh script +PATH=/usr/sbin:/usr/bin:/sbin:/bin +DESC="Description of the service" +NAME=daemonexecutablename +DAEMON=/usr/sbin/$NAME +DAEMON_ARGS="--options args" +PIDFILE=/var/run/$NAME.pid +SCRIPTNAME=/etc/init.d/$NAME + +# Exit if the package is not installed +[ -x "$DAEMON" ] || exit 0 + +# Read configuration variable file if it is present +[ -r /etc/default/$NAME ] && . /etc/default/$NAME + +# Load the VERBOSE setting and other rcS variables +[ -f /etc/default/rcS ] && . /etc/default/rcS + +# Define LSB log_* functions. +# Depend on lsb-base (>= 3.0-6) to ensure that this file is present. +. /lib/lsb/init-functions + +# +# Function that starts the daemon/service +# +do_start() +{ + # Return + # 0 if daemon has been started + # 1 if daemon was already running + # 2 if daemon could not be started + start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON --test > /dev/null \ + || return 1 + start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON -- \ + $DAEMON_ARGS \ + || return 2 + # Add code here, if necessary, that waits for the process to be ready + # to handle requests from services started subsequently which depend + # on this one. As a last resort, sleep for some time. +} + +# +# Function that stops the daemon/service +# +do_stop() +{ + # Return + # 0 if daemon has been stopped + # 1 if daemon was already stopped + # 2 if daemon could not be stopped + # other if a failure occurred + start-stop-daemon --stop --quiet --retry=TERM/30/KILL/5 --pidfile $PIDFILE --name $NAME + RETVAL="$?" + [ "$RETVAL" = 2 ] && return 2 + # Wait for children to finish too if this is a daemon that forks + # and if the daemon is only ever run from this initscript. + # If the above conditions are not satisfied then add some other code + # that waits for the process to drop all resources that could be + # needed by services started subsequently. A last resort is to + # sleep for some time. + start-stop-daemon --stop --quiet --oknodo --retry=0/30/KILL/5 --exec $DAEMON + [ "$?" = 2 ] && return 2 + # Many daemons don't delete their pidfiles when they exit. + rm -f $PIDFILE + return "$RETVAL" +} + +# +# Function that sends a SIGHUP to the daemon/service +# +do_reload() { + # + # If the daemon can reload its configuration without + # restarting (for example, when it is sent a SIGHUP), + # then implement that here. + # + start-stop-daemon --stop --signal 1 --quiet --pidfile $PIDFILE --name $NAME + return 0 +} + +case "$1" in + start) + [ "$VERBOSE" != no ] && log_daemon_msg "Starting $DESC" "$NAME" + do_start + case "$?" in + 0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;; + 2) [ "$VERBOSE" != no ] && log_end_msg 1 ;; + esac + ;; + stop) + [ "$VERBOSE" != no ] && log_daemon_msg "Stopping $DESC" "$NAME" + do_stop + case "$?" in + 0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;; + 2) [ "$VERBOSE" != no ] && log_end_msg 1 ;; + esac + ;; + #reload|force-reload) + # + # If do_reload() is not implemented then leave this commented out + # and leave 'force-reload' as an alias for 'restart'. + # + #log_daemon_msg "Reloading $DESC" "$NAME" + #do_reload + #log_end_msg $? + #;; + restart|force-reload) + # + # If the "reload" option is implemented then remove the + # 'force-reload' alias + # + log_daemon_msg "Restarting $DESC" "$NAME" + do_stop + case "$?" in + 0|1) + do_start + case "$?" in + 0) log_end_msg 0 ;; + 1) log_end_msg 1 ;; # Old process is still running + *) log_end_msg 1 ;; # Failed to start + esac + ;; + *) + # Failed to stop + log_end_msg 1 + ;; + esac + ;; + *) + #echo "Usage: $SCRIPTNAME {start|stop|restart|reload|force-reload}" >&2 + echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload}" >&2 + exit 3 + ;; +esac + +: diff --git a/t/recipes/checks/debian/copyright/dep5/legacy-scripts/build-spec/orig/jruby-broken b/t/recipes/checks/debian/copyright/dep5/legacy-scripts/build-spec/orig/jruby-broken new file mode 100644 index 0000000..56f574d --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/legacy-scripts/build-spec/orig/jruby-broken @@ -0,0 +1,2 @@ +#!/usr/bin/jruby +# There's no non-versioned jruby, so this should be an error. diff --git a/t/recipes/checks/debian/copyright/dep5/legacy-scripts/build-spec/orig/lefty-foo b/t/recipes/checks/debian/copyright/dep5/legacy-scripts/build-spec/orig/lefty-foo new file mode 100644 index 0000000..52c003e --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/legacy-scripts/build-spec/orig/lefty-foo @@ -0,0 +1,2 @@ +#!/usr/local/bin/lefty + diff --git a/t/recipes/checks/debian/copyright/dep5/legacy-scripts/build-spec/orig/make-foo b/t/recipes/checks/debian/copyright/dep5/legacy-scripts/build-spec/orig/make-foo new file mode 100644 index 0000000..6b787b5 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/legacy-scripts/build-spec/orig/make-foo @@ -0,0 +1,3 @@ +#!/usr/bin/make + + diff --git a/t/recipes/checks/debian/copyright/dep5/legacy-scripts/build-spec/orig/perl-bizarre-1 b/t/recipes/checks/debian/copyright/dep5/legacy-scripts/build-spec/orig/perl-bizarre-1 new file mode 100644 index 0000000..fc632c8 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/legacy-scripts/build-spec/orig/perl-bizarre-1 @@ -0,0 +1,11 @@ +#! /bin/sh +eval '(exit $?0)' && eval 'PERL_BADLANG=x;export PERL_BADLANG;: \ +;exec perl -x -S -- "$0" ${1+"$@"};#'if 0; +eval 'setenv PERL_BADLANG x;exec perl -x -S -- "$0" $argv:q;#'.q+ +#!perl -w +package Htex::a2ping; $0=~/(.*)/s;unshift@INC,'.';do($1);die$@if$@;__END__+if !1; +# This Perl script was generated by JustLib2 at Wed Apr 23 09:14:13 2003. +# Don't touch/remove any lines above; http://www.inf.bme.hu/~pts/justlib + +# The above was actually seen in the wild and stresses the +# script_is_evil_and_wrong test. diff --git a/t/recipes/checks/debian/copyright/dep5/legacy-scripts/build-spec/orig/perl-bizarre-2 b/t/recipes/checks/debian/copyright/dep5/legacy-scripts/build-spec/orig/perl-bizarre-2 new file mode 100644 index 0000000..afd9cfe --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/legacy-scripts/build-spec/orig/perl-bizarre-2 @@ -0,0 +1,7 @@ +#!/bin/sh +eval 'exec /usr/bin/perl -wS $0 ${1+"$@"}' + if $running_under_some_shell; + +# I'm someone following perlrun except without using the Perl #! line. +# Now something to choke bash. +while (<>) { if (/%#/) { print } } diff --git a/t/recipes/checks/debian/copyright/dep5/legacy-scripts/build-spec/orig/perl-bizarre-3 b/t/recipes/checks/debian/copyright/dep5/legacy-scripts/build-spec/orig/perl-bizarre-3 new file mode 100644 index 0000000..44baf75 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/legacy-scripts/build-spec/orig/perl-bizarre-3 @@ -0,0 +1,6 @@ +eval '(exit $?0)' && eval 'exec perl -wS $0 ${1+"$@"}' +& eval 'exec /usr/bin/perl -wS $0 $argv:q' + if $running_under_some_shell; + +# More utterly bizarreness from perlrun. This one even doesn't work if +# there's a valid #! line on the first line. I don't understand why.... diff --git a/t/recipes/checks/debian/copyright/dep5/legacy-scripts/build-spec/orig/perlfoo b/t/recipes/checks/debian/copyright/dep5/legacy-scripts/build-spec/orig/perlfoo new file mode 100644 index 0000000..5b27ed0 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/legacy-scripts/build-spec/orig/perlfoo @@ -0,0 +1,3 @@ +#! /usr/bin/perl + +print "Hello, World!"; diff --git a/t/recipes/checks/debian/copyright/dep5/legacy-scripts/build-spec/orig/phpenvfoo b/t/recipes/checks/debian/copyright/dep5/legacy-scripts/build-spec/orig/phpenvfoo new file mode 100644 index 0000000..cbbfb2e --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/legacy-scripts/build-spec/orig/phpenvfoo @@ -0,0 +1,7 @@ +#!/usr/bin/env php + + +Dumb PHP script + + + diff --git a/t/recipes/checks/debian/copyright/dep5/legacy-scripts/build-spec/orig/phpfoo b/t/recipes/checks/debian/copyright/dep5/legacy-scripts/build-spec/orig/phpfoo new file mode 100644 index 0000000..e0595e6 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/legacy-scripts/build-spec/orig/phpfoo @@ -0,0 +1,7 @@ +#!/usr/bin/php + + +Dumb PHP script + + + diff --git a/t/recipes/checks/debian/copyright/dep5/legacy-scripts/build-spec/orig/rubyfoo b/t/recipes/checks/debian/copyright/dep5/legacy-scripts/build-spec/orig/rubyfoo new file mode 100644 index 0000000..8024605 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/legacy-scripts/build-spec/orig/rubyfoo @@ -0,0 +1,4 @@ +#!/bin/ruby1.8 + +# Ok, that example is really pathetic, but until we have +# some better code in checks/scripts, it will do diff --git a/t/recipes/checks/debian/copyright/dep5/legacy-scripts/build-spec/orig/sh-broken b/t/recipes/checks/debian/copyright/dep5/legacy-scripts/build-spec/orig/sh-broken new file mode 100644 index 0000000..7b79074 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/legacy-scripts/build-spec/orig/sh-broken @@ -0,0 +1,2 @@ +#!/bin/sh +if fi diff --git a/t/recipes/checks/debian/copyright/dep5/legacy-scripts/build-spec/orig/suidperlfoo b/t/recipes/checks/debian/copyright/dep5/legacy-scripts/build-spec/orig/suidperlfoo new file mode 100644 index 0000000..bcbc471 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/legacy-scripts/build-spec/orig/suidperlfoo @@ -0,0 +1,3 @@ +#! /usr/bin/suidperl + +print "Hello, World!"; diff --git a/t/recipes/checks/debian/copyright/dep5/legacy-scripts/build-spec/orig/tkfoo b/t/recipes/checks/debian/copyright/dep5/legacy-scripts/build-spec/orig/tkfoo new file mode 100755 index 0000000..533595a --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/legacy-scripts/build-spec/orig/tkfoo @@ -0,0 +1,31 @@ +#!/bin/sh +# +# Insane amount of empty lines and comments + +# +# +# +# + +# +# + +# +# +# + +# +# + +# +# This line makes the next one a comment in Tcl \ +exec wish "$0" -- ${1+"$@"} + +# lintian should not check the following for syntax +# if it detects the line above correctly +# Code snippet taken from eTkTab + +if { [array names prefs keybindings] != "" } { + # Read in the file + array set unparsed_bindings [ read_settings_file $prefs(keybindings)] +} diff --git a/t/recipes/checks/debian/copyright/dep5/legacy-scripts/build-spec/orig/wishfoo b/t/recipes/checks/debian/copyright/dep5/legacy-scripts/build-spec/orig/wishfoo new file mode 100644 index 0000000..035c9ad --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/legacy-scripts/build-spec/orig/wishfoo @@ -0,0 +1,4 @@ +#!/usr/bin/wish +# +# This is not actually a wish script, here to force a test of wish +# dependencies. diff --git a/t/recipes/checks/debian/copyright/dep5/legacy-scripts/build-spec/orig/xsession-test b/t/recipes/checks/debian/copyright/dep5/legacy-scripts/build-spec/orig/xsession-test new file mode 100644 index 0000000..ca49d72 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/legacy-scripts/build-spec/orig/xsession-test @@ -0,0 +1,3 @@ +#!/bin/sh + +echo "Foo." diff --git a/t/recipes/checks/debian/copyright/dep5/legacy-scripts/build-spec/pre-build b/t/recipes/checks/debian/copyright/dep5/legacy-scripts/build-spec/pre-build new file mode 100755 index 0000000..b5649a8 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/legacy-scripts/build-spec/pre-build @@ -0,0 +1,5 @@ +#!/bin/sh + +DIR="$1" + +rm -f "$DIR/debian/compat" diff --git a/t/recipes/checks/debian/copyright/dep5/legacy-scripts/eval/desc b/t/recipes/checks/debian/copyright/dep5/legacy-scripts/eval/desc new file mode 100644 index 0000000..3dbe0ee --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/legacy-scripts/eval/desc @@ -0,0 +1,2 @@ +Testname: legacy-scripts +Check: debian/copyright/dep5 diff --git a/t/recipes/checks/debian/copyright/dep5/legacy-scripts/eval/hints b/t/recipes/checks/debian/copyright/dep5/legacy-scripts/eval/hints new file mode 100644 index 0000000..6140e09 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/legacy-scripts/eval/hints @@ -0,0 +1 @@ +scripts (source): no-dep5-copyright [debian/copyright] diff --git a/t/recipes/checks/debian/copyright/dep5/legacy-scripts/eval/post-test b/t/recipes/checks/debian/copyright/dep5/legacy-scripts/eval/post-test new file mode 100644 index 0000000..faeef0b --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/legacy-scripts/eval/post-test @@ -0,0 +1 @@ +s/\(current is ([0-9]+\.)+[0-9]\)/(current is CURRENT)/ diff --git a/t/recipes/checks/debian/copyright/dep5/license-file-listed-in-debian-copyright/build-spec/debian/copyright b/t/recipes/checks/debian/copyright/dep5/license-file-listed-in-debian-copyright/build-spec/debian/copyright new file mode 100644 index 0000000..7c7783e --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/license-file-listed-in-debian-copyright/build-spec/debian/copyright @@ -0,0 +1,38 @@ +Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Upstream-Name: wolfssl +Upstream-Contact: David Garske +Source: https://github.com/wolfssl/wolfssl/releases + +Files: + COPYING +Copyright: + 1989, 1991 Free Software Foundation, Inc. +License: No-Modify + +Files: + debian/* +Copyright: + 2014-2019 Felix Lechner +License: GPL-2+ + + +License: No-Modify + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + +License: GPL-2+ + This package is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + . + This package is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + . + You should have received a copy of the GNU General Public License + along with this program. If not, see + . + On Debian systems, the complete text of the GNU General + Public License version 2 can be found in "/usr/share/common-licenses/GPL-2". diff --git a/t/recipes/checks/debian/copyright/dep5/license-file-listed-in-debian-copyright/build-spec/fill-values b/t/recipes/checks/debian/copyright/dep5/license-file-listed-in-debian-copyright/build-spec/fill-values new file mode 100644 index 0000000..5874162 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/license-file-listed-in-debian-copyright/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: upload-native +Testname: license-file-listed-in-debian-copyright +Description: License files do not need entries in d/copyright. diff --git a/t/recipes/checks/debian/copyright/dep5/license-file-listed-in-debian-copyright/build-spec/orig/COPYING b/t/recipes/checks/debian/copyright/dep5/license-file-listed-in-debian-copyright/build-spec/orig/COPYING new file mode 100644 index 0000000..c1e7ac7 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/license-file-listed-in-debian-copyright/build-spec/orig/COPYING @@ -0,0 +1 @@ +TERMS OF SOFTWARE LICENSE diff --git a/t/recipes/checks/debian/copyright/dep5/license-file-listed-in-debian-copyright/eval/desc b/t/recipes/checks/debian/copyright/dep5/license-file-listed-in-debian-copyright/eval/desc new file mode 100644 index 0000000..6cb134b --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/license-file-listed-in-debian-copyright/eval/desc @@ -0,0 +1,2 @@ +Testname: license-file-listed-in-debian-copyright +Check: debian/copyright/dep5 diff --git a/t/recipes/checks/debian/copyright/dep5/license-file-listed-in-debian-copyright/eval/hints b/t/recipes/checks/debian/copyright/dep5/license-file-listed-in-debian-copyright/eval/hints new file mode 100644 index 0000000..fc2d25f --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/license-file-listed-in-debian-copyright/eval/hints @@ -0,0 +1,2 @@ +license-file-listed-in-debian-copyright (source): update-debian-copyright 2019 vs CHANGELOG-YEAR [debian/copyright:14] +license-file-listed-in-debian-copyright (source): license-file-listed-in-debian-copyright COPYING [debian/copyright] diff --git a/t/recipes/checks/debian/copyright/dep5/license-file-listed-in-debian-copyright/eval/post-test b/t/recipes/checks/debian/copyright/dep5/license-file-listed-in-debian-copyright/eval/post-test new file mode 100644 index 0000000..feeacfc --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/license-file-listed-in-debian-copyright/eval/post-test @@ -0,0 +1 @@ +s/vs [0-9]+/vs CHANGELOG-YEAR/ diff --git a/t/recipes/checks/debian/copyright/dep5/lone-files-included/build-spec/debian/copyright b/t/recipes/checks/debian/copyright/dep5/lone-files-included/build-spec/debian/copyright new file mode 100644 index 0000000..7935e5d --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/lone-files-included/build-spec/debian/copyright @@ -0,0 +1,21 @@ +Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Files-Included: + include-this + +Files: * +Copyright: 2011 J. Random Hacker +License: GPL-2 + This package is free software; you can redistribute it and/or modify it under + the terms of the GNU General Public License as published by the Free Software + Foundation; version 2 dated June, 1991. + . + This package is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. + . + You should have received a copy of the GNU General Public License along with + this package; if not, write to the Free Software Foundation, Inc., 51 Franklin + St, Fifth Floor, Boston, MA 02110-1301, USA. + . + On Debian systems, the full text of the GNU General Public License version 2 + can be found in the file `/usr/share/common-licenses/GPL-2'. diff --git a/t/recipes/checks/debian/copyright/dep5/lone-files-included/build-spec/fill-values b/t/recipes/checks/debian/copyright/dep5/lone-files-included/build-spec/fill-values new file mode 100644 index 0000000..00de540 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/lone-files-included/build-spec/fill-values @@ -0,0 +1,3 @@ +Testname: lone-files-included +Skeleton: upload-non-native +Description: File-Included without Files-Excluded diff --git a/t/recipes/checks/debian/copyright/dep5/lone-files-included/build-spec/orig/.matches b/t/recipes/checks/debian/copyright/dep5/lone-files-included/build-spec/orig/.matches new file mode 100644 index 0000000..e69de29 diff --git a/t/recipes/checks/debian/copyright/dep5/lone-files-included/build-spec/orig/include-this b/t/recipes/checks/debian/copyright/dep5/lone-files-included/build-spec/orig/include-this new file mode 100644 index 0000000..e69de29 diff --git a/t/recipes/checks/debian/copyright/dep5/lone-files-included/eval/desc b/t/recipes/checks/debian/copyright/dep5/lone-files-included/eval/desc new file mode 100644 index 0000000..26325ad --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/lone-files-included/eval/desc @@ -0,0 +1,2 @@ +Testname: lone-files-included +Check: debian/copyright/dep5 diff --git a/t/recipes/checks/debian/copyright/dep5/lone-files-included/eval/hints b/t/recipes/checks/debian/copyright/dep5/lone-files-included/eval/hints new file mode 100644 index 0000000..e6e0778 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/lone-files-included/eval/hints @@ -0,0 +1 @@ +lone-files-included (source): file-included-already include-this [debian/copyright:2] diff --git a/t/recipes/checks/debian/copyright/dep5/patch-empties-directory/build-spec/debian/copyright b/t/recipes/checks/debian/copyright/dep5/patch-empties-directory/build-spec/debian/copyright new file mode 100644 index 0000000..5dd52d9 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/patch-empties-directory/build-spec/debian/copyright @@ -0,0 +1,34 @@ +Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Upstream-Name: Lintian +Upstream-Contact: +Source: http://lintian.debian.org +Comment: This is part of the testsuite of lintian. + See the file debian/copyright + in the lintian source directory for more details. + +Files: * +Copyright: + 2019 Felix Lechner +License: GPL-2+ + +Files: will-be-empty/* +Copyright: + 2019 Felix Lechner +License: GPL-2+ + +License: GPL-2+ + This program is free software; you may redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + . + This is distributed in the hope that it will be useful, but without + any warranty; without even the implied warranty of merchantability or + fitness for a particular purpose. See the GNU General Public License + for more details. + . + A copy of the GNU General Public License version 2 is available as + /usr/share/common-licenses/GPL-2 in the Debian GNU/Linux distribution + or at http://www.gnu.org/licenses/old-licenses/gpl-2.0.html. + You can also obtain it by writing to the Free Software Foundation, Inc., + 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/t/recipes/checks/debian/copyright/dep5/patch-empties-directory/build-spec/debian/patches/remove-file.patch b/t/recipes/checks/debian/copyright/dep5/patch-empties-directory/build-spec/debian/patches/remove-file.patch new file mode 100644 index 0000000..e572221 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/patch-empties-directory/build-spec/debian/patches/remove-file.patch @@ -0,0 +1,10 @@ +Description: Remove the sole file in a directory + Should not trigger wildcard-matches-nothing-in-dep5-copyright. + For more information, please see Bug#844274. +Author: Felix Lechner +--- +This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ +--- a/will-be-empty/removed-by-patch ++++ /dev/null +@@ -1 +0,0 @@ +-SOME CONTENT diff --git a/t/recipes/checks/debian/copyright/dep5/patch-empties-directory/build-spec/debian/patches/series b/t/recipes/checks/debian/copyright/dep5/patch-empties-directory/build-spec/debian/patches/series new file mode 100644 index 0000000..56b4ebb --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/patch-empties-directory/build-spec/debian/patches/series @@ -0,0 +1 @@ +remove-file.patch diff --git a/t/recipes/checks/debian/copyright/dep5/patch-empties-directory/build-spec/fill-values b/t/recipes/checks/debian/copyright/dep5/patch-empties-directory/build-spec/fill-values new file mode 100644 index 0000000..43ae87c --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/patch-empties-directory/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: source-non-native +Testname: patch-empties-directory +Description: False positive for wildcard-matches-nothing-in-dep5-copyright diff --git a/t/recipes/checks/debian/copyright/dep5/patch-empties-directory/build-spec/orig/will-be-empty/removed-by-patch b/t/recipes/checks/debian/copyright/dep5/patch-empties-directory/build-spec/orig/will-be-empty/removed-by-patch new file mode 100644 index 0000000..2517541 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/patch-empties-directory/build-spec/orig/will-be-empty/removed-by-patch @@ -0,0 +1 @@ +SOME CONTENT diff --git a/t/recipes/checks/debian/copyright/dep5/patch-empties-directory/eval/desc b/t/recipes/checks/debian/copyright/dep5/patch-empties-directory/eval/desc new file mode 100644 index 0000000..d1935af --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/patch-empties-directory/eval/desc @@ -0,0 +1,5 @@ +Testname: patch-empties-directory +Check: debian/copyright/dep5 +Test-Against: + superfluous-file-pattern +See-Also: Bug#844274 diff --git a/t/recipes/checks/debian/copyright/dep5/patch-empties-directory/eval/hints b/t/recipes/checks/debian/copyright/dep5/patch-empties-directory/eval/hints new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/patch-empties-directory/eval/hints @@ -0,0 +1 @@ + diff --git a/t/recipes/checks/debian/copyright/dep5/redundant-wildcard/build-spec/debian/copyright b/t/recipes/checks/debian/copyright/dep5/redundant-wildcard/build-spec/debian/copyright new file mode 100644 index 0000000..3ff770b --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/redundant-wildcard/build-spec/debian/copyright @@ -0,0 +1,11 @@ +# taken from https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=905747#5 +# but split up for each of the two conditions +Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ + +Files: * + debian/patches/* +Copyright: (C) 2018 Niels Thykier +License: License1 + +License: License1 + Please call the author for this license. diff --git a/t/recipes/checks/debian/copyright/dep5/redundant-wildcard/build-spec/debian/patches/a.patch b/t/recipes/checks/debian/copyright/dep5/redundant-wildcard/build-spec/debian/patches/a.patch new file mode 100644 index 0000000..294a68c --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/redundant-wildcard/build-spec/debian/patches/a.patch @@ -0,0 +1 @@ +A PATCH diff --git a/t/recipes/checks/debian/copyright/dep5/redundant-wildcard/build-spec/fill-values b/t/recipes/checks/debian/copyright/dep5/redundant-wildcard/build-spec/fill-values new file mode 100644 index 0000000..412ba3e --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/redundant-wildcard/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: upload-native +Testname: redundant-wildcard +Description: Two wildcards matching the same file in the same section diff --git a/t/recipes/checks/debian/copyright/dep5/redundant-wildcard/build-spec/orig/a-file b/t/recipes/checks/debian/copyright/dep5/redundant-wildcard/build-spec/orig/a-file new file mode 100644 index 0000000..fadb157 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/redundant-wildcard/build-spec/orig/a-file @@ -0,0 +1 @@ +A FILE diff --git a/t/recipes/checks/debian/copyright/dep5/redundant-wildcard/eval/desc b/t/recipes/checks/debian/copyright/dep5/redundant-wildcard/eval/desc new file mode 100644 index 0000000..dd15714 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/redundant-wildcard/eval/desc @@ -0,0 +1,3 @@ +Testname: redundant-wildcard +Check: debian/copyright/dep5 +See-Also: Bug#905747 diff --git a/t/recipes/checks/debian/copyright/dep5/redundant-wildcard/eval/hints b/t/recipes/checks/debian/copyright/dep5/redundant-wildcard/eval/hints new file mode 100644 index 0000000..21912fa --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/redundant-wildcard/eval/hints @@ -0,0 +1,2 @@ +redundant-wildcard (source): update-debian-copyright 2018 vs CHANGELOG-YEAR [debian/copyright:7] +redundant-wildcard (source): redundant-globbing-patterns (* debian/patches/*) for debian/patches/a.patch [debian/copyright:5] diff --git a/t/recipes/checks/debian/copyright/dep5/redundant-wildcard/eval/post-test b/t/recipes/checks/debian/copyright/dep5/redundant-wildcard/eval/post-test new file mode 100644 index 0000000..feeacfc --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/redundant-wildcard/eval/post-test @@ -0,0 +1 @@ +s/vs [0-9]+/vs CHANGELOG-YEAR/ diff --git a/t/recipes/checks/debian/copyright/dep5/repackaged-upstream-sources-not-advertised/build-spec/debian/copyright b/t/recipes/checks/debian/copyright/dep5/repackaged-upstream-sources-not-advertised/build-spec/debian/copyright new file mode 100644 index 0000000..e6d13df --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/repackaged-upstream-sources-not-advertised/build-spec/debian/copyright @@ -0,0 +1,23 @@ +Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Upstream-Name: Lintian +Upstream-Contact: +Source: http://lintian.debian.org +Files-Excluded: gone + +Files: * +Copyright: 2011 J. Random Hacker +License: GPL-2 + This package is free software; you can redistribute it and/or modify it under + the terms of the GNU General Public License as published by the Free Software + Foundation; version 2 dated June, 1991. + . + This package is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. + . + You should have received a copy of the GNU General Public License along with + this package; if not, write to the Free Software Foundation, Inc., 51 Franklin + St, Fifth Floor, Boston, MA 02110-1301, USA. + . + On Debian systems, the full text of the GNU General Public License version 2 + can be found in the file `/usr/share/common-licenses/GPL-2'. diff --git a/t/recipes/checks/debian/copyright/dep5/repackaged-upstream-sources-not-advertised/build-spec/fill-values b/t/recipes/checks/debian/copyright/dep5/repackaged-upstream-sources-not-advertised/build-spec/fill-values new file mode 100644 index 0000000..3ccc5e1 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/repackaged-upstream-sources-not-advertised/build-spec/fill-values @@ -0,0 +1,3 @@ +Testname: repackaged-upstream-sources-not-advertised +Skeleton: upload-non-native +Description: Sources indicate they have been repacked diff --git a/t/recipes/checks/debian/copyright/dep5/repackaged-upstream-sources-not-advertised/eval/desc b/t/recipes/checks/debian/copyright/dep5/repackaged-upstream-sources-not-advertised/eval/desc new file mode 100644 index 0000000..e233fa0 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/repackaged-upstream-sources-not-advertised/eval/desc @@ -0,0 +1,2 @@ +Testname: repackaged-upstream-sources-not-advertised +Check: debian/copyright/dep5 diff --git a/t/recipes/checks/debian/copyright/dep5/repackaged-upstream-sources-not-advertised/eval/hints b/t/recipes/checks/debian/copyright/dep5/repackaged-upstream-sources-not-advertised/eval/hints new file mode 100644 index 0000000..e4baeb6 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/repackaged-upstream-sources-not-advertised/eval/hints @@ -0,0 +1 @@ +repackaged-upstream-sources-not-advertised (source): repackaged-source-not-advertised [debian/copyright] diff --git a/t/recipes/checks/debian/copyright/dep5/reuse-identifier-in-files/build-spec/debian/copyright b/t/recipes/checks/debian/copyright/dep5/reuse-identifier-in-files/build-spec/debian/copyright new file mode 100644 index 0000000..6cd1530 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/reuse-identifier-in-files/build-spec/debian/copyright @@ -0,0 +1,47 @@ +# taken from https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=779676#30 +# except for secure URL immediately below and block comment further down +Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Upstream-Name: ipe-tools +Upstream-Contact: Otfried Cheong +Source: https://github.com/otfried/ipe-tools + +Files: figtoipe/* +Copyright: 1993-2008, Otfried Cheong + 2007-2015, Alexander Bürger +License: GPL-2+ + See /usr/share/common-licenses/GPL-2 + +Files: ipe5toxml/* +Copyright: 2005, Otfried Cheong + 2015, Alexander Bürger +License: public-domain + While the source code of svgtoipe does not include any licensing + information, the homepage of the ipe tool, + http://ipe7.sourceforge.net/, includes a hyperlink to the ipe-tools + github repository and says: + ``The source to ipe5toxml is in the public domain.'' + +Files: pdftoipe/* +Copyright: 2003-2014, Otfried Cheong +License: GPL-2 + See /usr/share/common-licenses/GPL-2 +Comment: + the pdftoipe source code itself is GPL-2+, but it is linked + to GPL-2 only libpoppler so it must be GPL-2, too + +Files: svgtoipe/* +Copyright: 2009-2014, Otfried Cheong +License: GPL-3+ + See /usr/share/common-licenses/GPL-3 + +#Files: matplotlib/* +#Copyright: 2014, Otfried Cheong +# 2014, Soyeon Baek +#Comment: +# not included in debian package + +Files: debian/* +Copyright: 2005-2011 Steve Robbins + 2008-2015, Alexander Bürger +License: GPL-2+ + See /usr/share/common-licenses/GPL-2 diff --git a/t/recipes/checks/debian/copyright/dep5/reuse-identifier-in-files/build-spec/fill-values b/t/recipes/checks/debian/copyright/dep5/reuse-identifier-in-files/build-spec/fill-values new file mode 100644 index 0000000..dc39a8e --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/reuse-identifier-in-files/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: source-native +Testname: reuse-identifier-in-files +Description: Reuse a license idenfifier in another Files paragraph (false positive) diff --git a/t/recipes/checks/debian/copyright/dep5/reuse-identifier-in-files/build-spec/orig/figtoipe/a-file b/t/recipes/checks/debian/copyright/dep5/reuse-identifier-in-files/build-spec/orig/figtoipe/a-file new file mode 100644 index 0000000..01d2c17 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/reuse-identifier-in-files/build-spec/orig/figtoipe/a-file @@ -0,0 +1 @@ +SOME TEXT diff --git a/t/recipes/checks/debian/copyright/dep5/reuse-identifier-in-files/build-spec/orig/ipe5toxml/a-file b/t/recipes/checks/debian/copyright/dep5/reuse-identifier-in-files/build-spec/orig/ipe5toxml/a-file new file mode 100644 index 0000000..01d2c17 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/reuse-identifier-in-files/build-spec/orig/ipe5toxml/a-file @@ -0,0 +1 @@ +SOME TEXT diff --git a/t/recipes/checks/debian/copyright/dep5/reuse-identifier-in-files/build-spec/orig/pdftoipe/a-file b/t/recipes/checks/debian/copyright/dep5/reuse-identifier-in-files/build-spec/orig/pdftoipe/a-file new file mode 100644 index 0000000..01d2c17 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/reuse-identifier-in-files/build-spec/orig/pdftoipe/a-file @@ -0,0 +1 @@ +SOME TEXT diff --git a/t/recipes/checks/debian/copyright/dep5/reuse-identifier-in-files/build-spec/orig/svgtoipe/a-file b/t/recipes/checks/debian/copyright/dep5/reuse-identifier-in-files/build-spec/orig/svgtoipe/a-file new file mode 100644 index 0000000..01d2c17 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/reuse-identifier-in-files/build-spec/orig/svgtoipe/a-file @@ -0,0 +1 @@ +SOME TEXT diff --git a/t/recipes/checks/debian/copyright/dep5/reuse-identifier-in-files/eval/desc b/t/recipes/checks/debian/copyright/dep5/reuse-identifier-in-files/eval/desc new file mode 100644 index 0000000..155b1fd --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/reuse-identifier-in-files/eval/desc @@ -0,0 +1,5 @@ +Testname: reuse-identifier-in-files +Check: debian/copyright/dep5 +Test-Against: + dep5-copyright-license-name-not-unique +See-Also: Bug#779676 diff --git a/t/recipes/checks/debian/copyright/dep5/reuse-identifier-in-files/eval/hints b/t/recipes/checks/debian/copyright/dep5/reuse-identifier-in-files/eval/hints new file mode 100644 index 0000000..f7d27de --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/reuse-identifier-in-files/eval/hints @@ -0,0 +1 @@ +reuse-identifier-in-files (source): update-debian-copyright 2015 vs CHANGELOG-YEAR [debian/copyright:44] diff --git a/t/recipes/checks/debian/copyright/dep5/reuse-identifier-in-files/eval/post-test b/t/recipes/checks/debian/copyright/dep5/reuse-identifier-in-files/eval/post-test new file mode 100644 index 0000000..feeacfc --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/reuse-identifier-in-files/eval/post-test @@ -0,0 +1 @@ +s/vs [0-9]+/vs CHANGELOG-YEAR/ diff --git a/t/recipes/checks/debian/copyright/dep5/reused-wildcard/build-spec/debian/copyright b/t/recipes/checks/debian/copyright/dep5/reused-wildcard/build-spec/debian/copyright new file mode 100644 index 0000000..1c5f619 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/reused-wildcard/build-spec/debian/copyright @@ -0,0 +1,19 @@ +Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ + +Files: * +Copyright: (C) 2018 Niels Thykier +License: License1 + +Files: debian/* +Copyright: (C) 2018 Niels Thykier +License: License1 + +Files: debian/* +Copyright: (C) 2019 Niels Thykier +License: License2 + +License: License1 + Please call the author for this license. + +License: License2 + Please call the author for this license. diff --git a/t/recipes/checks/debian/copyright/dep5/reused-wildcard/build-spec/fill-values b/t/recipes/checks/debian/copyright/dep5/reused-wildcard/build-spec/fill-values new file mode 100644 index 0000000..6c5f8e6 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/reused-wildcard/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: upload-native +Testname: reused-wildcard +Description: Same globbing pattern appears twice diff --git a/t/recipes/checks/debian/copyright/dep5/reused-wildcard/build-spec/orig/a-file b/t/recipes/checks/debian/copyright/dep5/reused-wildcard/build-spec/orig/a-file new file mode 100644 index 0000000..fadb157 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/reused-wildcard/build-spec/orig/a-file @@ -0,0 +1 @@ +A FILE diff --git a/t/recipes/checks/debian/copyright/dep5/reused-wildcard/eval/desc b/t/recipes/checks/debian/copyright/dep5/reused-wildcard/eval/desc new file mode 100644 index 0000000..e3f0551 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/reused-wildcard/eval/desc @@ -0,0 +1,3 @@ +Testname: reused-wildcard +Check: debian/copyright/dep5 +See-Also: Bug#905747 diff --git a/t/recipes/checks/debian/copyright/dep5/reused-wildcard/eval/hints b/t/recipes/checks/debian/copyright/dep5/reused-wildcard/eval/hints new file mode 100644 index 0000000..0b4a3c5 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/reused-wildcard/eval/hints @@ -0,0 +1,2 @@ +reused-wildcard (source): update-debian-copyright 2019 vs CHANGELOG-YEAR [debian/copyright:12] +reused-wildcard (source): duplicate-globbing-patterns debian/* (lines 7 11) [debian/copyright] diff --git a/t/recipes/checks/debian/copyright/dep5/reused-wildcard/eval/post-test b/t/recipes/checks/debian/copyright/dep5/reused-wildcard/eval/post-test new file mode 100644 index 0000000..feeacfc --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/reused-wildcard/eval/post-test @@ -0,0 +1 @@ +s/vs [0-9]+/vs CHANGELOG-YEAR/ diff --git a/t/recipes/checks/debian/copyright/dep5/source-copyright-bad-short-name/build-spec/debian/copyright b/t/recipes/checks/debian/copyright/dep5/source-copyright-bad-short-name/build-spec/debian/copyright new file mode 100644 index 0000000..0c826f0 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/source-copyright-bad-short-name/build-spec/debian/copyright @@ -0,0 +1,20 @@ +Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Upstream-Name: Doohickey +Upstream-Contact: J. Random Hacker +Source: http://examples.com/doohickey/source/ + +Files: * +Copyright: 2014, somebody1 +License: gplv1 + something + +Files: space +Copyright: 2014, somebody1 +License: some space license + something + +Files: debian/* +Copyright: 2014, somebody1 +License: bsd + this is a valid license short name + diff --git a/t/recipes/checks/debian/copyright/dep5/source-copyright-bad-short-name/build-spec/fill-values b/t/recipes/checks/debian/copyright/dep5/source-copyright-bad-short-name/build-spec/fill-values new file mode 100644 index 0000000..105eb13 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/source-copyright-bad-short-name/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: upload-native +Testname: source-copyright-bad-short-name +Description: Test for bad short name diff --git a/t/recipes/checks/debian/copyright/dep5/source-copyright-bad-short-name/build-spec/orig/README b/t/recipes/checks/debian/copyright/dep5/source-copyright-bad-short-name/build-spec/orig/README new file mode 100644 index 0000000..1a9d2ad --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/source-copyright-bad-short-name/build-spec/orig/README @@ -0,0 +1 @@ +trivial diff --git a/t/recipes/checks/debian/copyright/dep5/source-copyright-bad-short-name/build-spec/orig/space b/t/recipes/checks/debian/copyright/dep5/source-copyright-bad-short-name/build-spec/orig/space new file mode 100644 index 0000000..82cbe04 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/source-copyright-bad-short-name/build-spec/orig/space @@ -0,0 +1 @@ +space \ No newline at end of file diff --git a/t/recipes/checks/debian/copyright/dep5/source-copyright-bad-short-name/eval/desc b/t/recipes/checks/debian/copyright/dep5/source-copyright-bad-short-name/eval/desc new file mode 100644 index 0000000..2f2c957 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/source-copyright-bad-short-name/eval/desc @@ -0,0 +1,2 @@ +Testname: source-copyright-bad-short-name +Check: debian/copyright/dep5 diff --git a/t/recipes/checks/debian/copyright/dep5/source-copyright-bad-short-name/eval/hints b/t/recipes/checks/debian/copyright/dep5/source-copyright-bad-short-name/eval/hints new file mode 100644 index 0000000..2c8bb8a --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/source-copyright-bad-short-name/eval/hints @@ -0,0 +1,4 @@ +source-copyright-bad-short-name (source): update-debian-copyright 2014 vs CHANGELOG-YEAR [debian/copyright:17] +source-copyright-bad-short-name (source): space-in-std-shortname-in-dep5-copyright some space license [debian/copyright:13] +source-copyright-bad-short-name (source): invalid-short-name-in-dep5-copyright gplv1 [debian/copyright:8] +source-copyright-bad-short-name (source): invalid-short-name-in-dep5-copyright bsd [debian/copyright:18] diff --git a/t/recipes/checks/debian/copyright/dep5/source-copyright-bad-short-name/eval/post-test b/t/recipes/checks/debian/copyright/dep5/source-copyright-bad-short-name/eval/post-test new file mode 100644 index 0000000..feeacfc --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/source-copyright-bad-short-name/eval/post-test @@ -0,0 +1 @@ +s/vs [0-9]+/vs CHANGELOG-YEAR/ diff --git a/t/recipes/checks/debian/copyright/dep5/source-copyright-boilerplate-uri/build-spec/debian/copyright b/t/recipes/checks/debian/copyright/dep5/source-copyright-boilerplate-uri/build-spec/debian/copyright new file mode 100644 index 0000000..d890aa5 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/source-copyright-boilerplate-uri/build-spec/debian/copyright @@ -0,0 +1,22 @@ +Format: +Upstream-Name: Doohickey +Upstream-Contact: J. Random Hacker +Source: http://examples.com/doohickey/source/ + +Files: * +Copyright: 2011 J. Random Hacker +License: GPL-2 + This package is free software; you can redistribute it and/or modify it under + the terms of the GNU General Public License as published by the Free Software + Foundation; version 2 dated June, 1991. + . + This package is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. + . + You should have received a copy of the GNU General Public License along with + this package; if not, write to the Free Software Foundation, Inc., 51 Franklin + St, Fifth Floor, Boston, MA 02110-1301, USA. + . + On Debian systems, the full text of the GNU General Public License version 2 + can be found in the file `/usr/share/common-licenses/GPL-2'. diff --git a/t/recipes/checks/debian/copyright/dep5/source-copyright-boilerplate-uri/build-spec/fill-values b/t/recipes/checks/debian/copyright/dep5/source-copyright-boilerplate-uri/build-spec/fill-values new file mode 100644 index 0000000..e23273f --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/source-copyright-boilerplate-uri/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: upload-native +Testname: source-copyright-boilerplate-uri +Description: Test for boilerplate DEP 5-like URI diff --git a/t/recipes/checks/debian/copyright/dep5/source-copyright-boilerplate-uri/eval/desc b/t/recipes/checks/debian/copyright/dep5/source-copyright-boilerplate-uri/eval/desc new file mode 100644 index 0000000..d581f76 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/source-copyright-boilerplate-uri/eval/desc @@ -0,0 +1,2 @@ +Testname: source-copyright-boilerplate-uri +Check: debian/copyright/dep5 diff --git a/t/recipes/checks/debian/copyright/dep5/source-copyright-boilerplate-uri/eval/hints b/t/recipes/checks/debian/copyright/dep5/source-copyright-boilerplate-uri/eval/hints new file mode 100644 index 0000000..81f7b8c --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/source-copyright-boilerplate-uri/eval/hints @@ -0,0 +1 @@ +source-copyright-boilerplate-uri (source): boilerplate-copyright-format-uri [debian/copyright] diff --git a/t/recipes/checks/debian/copyright/dep5/source-copyright-dep5-general/build-spec/debian/copyright b/t/recipes/checks/debian/copyright/dep5/source-copyright-dep5-general/build-spec/debian/copyright new file mode 100644 index 0000000..eadfebd --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/source-copyright-dep5-general/build-spec/debian/copyright @@ -0,0 +1,113 @@ +Format: https://anonscm.debian.org/viewvc/dep/web/deps/dep5.mdwn?revision=174 +Upstream-Name: Doohickey +Upstream-Maintainer: J. Random Hacker +Source: http://examples.com/doohickey/source/ + +Comment: I'm a bogus paragraph. + +Files: a/*, b/* +Copyright: 2011 J. Random Hacker +License: GPL-2 + +Files: c +Copyright: 2010 J. Random Hacker + +Files: d +License: GPL-3 + +Files: 5 +License: MIT +Copyright: 2010 J. Random Hacker + +Comment: Oops, missing a Files for this paragraph. +License: BSD-3 +Copyright: 2010 J. Random Hacker + +Files: debian/* +License: GPL-2 or GPL-3 with Font +Copyright: 2010 J. Random Hacker + +Files: debian/copyright +License: GPL-2 or GPL-3 with Font exception +Copyright: 2012 J. Random Hacker + +Files: debian/control +License: GPL-2 and custom +Copyright: 2010 J. Random Hacker + +License: custom + Custom test license + + +License: GPL-2 + This package is free software; you can redistribute it and/or modify it under + the terms of the GNU General Public License as published by the Free Software + Foundation; version 2 dated June, 1991. + . + This package is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. + . + You should have received a copy of the GNU General Public License along with + this package; if not, write to the Free Software Foundation, Inc., 51 Franklin + St, Fifth Floor, Boston, MA 02110-1301, USA. + . + On Debian systems, the full text of the GNU General Public License version 2 + can be found in the file `/usr/share/common-licenses/GPL-2'. + +License: GPL-3 with Font + This package is free software; you can redistribute it and/or modify it under + the terms of the GNU General Public License as published by the Free Software + Foundation; version 2 dated June, 1991. + . + This package is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. + . + You should have received a copy of the GNU General Public License along with + this package; if not, write to the Free Software Foundation, Inc., 51 Franklin + St, Fifth Floor, Boston, MA 02110-1301, USA. + . + On Debian systems, the full text of the GNU General Public License version 2 + can be found in the file `/usr/share/common-licenses/GPL-2'. + . + A fake font exception. + +License: GPL-3 with Font exception + This package is free software; you can redistribute it and/or modify it under + the terms of the GNU General Public License as published by the Free Software + Foundation; version 2 dated June, 1991. + . + This package is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. + . + You should have received a copy of the GNU General Public License along with + this package; if not, write to the Free Software Foundation, Inc., 51 Franklin + St, Fifth Floor, Boston, MA 02110-1301, USA. + . + On Debian systems, the full text of the GNU General Public License version 2 + can be found in the file `/usr/share/common-licenses/GPL-2'. + . + Fake font exception. + +License: GPL-3 + +License: Expat + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the “Software”), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + . + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + . + THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE. diff --git a/t/recipes/checks/debian/copyright/dep5/source-copyright-dep5-general/build-spec/fill-values b/t/recipes/checks/debian/copyright/dep5/source-copyright-dep5-general/build-spec/fill-values new file mode 100644 index 0000000..e433ff8 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/source-copyright-dep5-general/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: upload-native +Testname: source-copyright-dep5-general +Description: Test for various errors in DEP 5 copyright files diff --git a/t/recipes/checks/debian/copyright/dep5/source-copyright-dep5-general/eval/desc b/t/recipes/checks/debian/copyright/dep5/source-copyright-dep5-general/eval/desc new file mode 100644 index 0000000..677c43f --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/source-copyright-dep5-general/eval/desc @@ -0,0 +1,4 @@ +Testname: source-copyright-dep5-general +Test-Against: + incomplete-creative-commons-license +Check: debian/copyright/dep5 diff --git a/t/recipes/checks/debian/copyright/dep5/source-copyright-dep5-general/eval/hints b/t/recipes/checks/debian/copyright/dep5/source-copyright-dep5-general/eval/hints new file mode 100644 index 0000000..341af85 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/source-copyright-dep5-general/eval/hints @@ -0,0 +1,14 @@ +source-copyright-dep5-general (source): update-debian-copyright 2012 vs CHANGELOG-YEAR [debian/copyright:32] +source-copyright-dep5-general (source): unused-license-paragraph-in-dep5-copyright expat [debian/copyright:96] +source-copyright-dep5-general (source): unknown-paragraph-in-dep5-copyright [debian/copyright:6] +source-copyright-dep5-general (source): obsolete-field-in-dep5-copyright Upstream-Maintainer Upstream-Contact [debian/copyright:3] +source-copyright-dep5-general (source): missing-license-text-in-dep5-copyright GPL-3 [debian/copyright:94] +source-copyright-dep5-general (source): missing-license-text-in-dep5-copyright BSD-3 [debian/copyright:23] +source-copyright-dep5-general (source): missing-license-paragraph-in-dep5-copyright mit [debian/copyright:19] +source-copyright-dep5-general (source): missing-license-paragraph-in-dep5-copyright gpl-3 [debian/copyright:16] +source-copyright-dep5-general (source): missing-field-in-dep5-copyright License [debian/copyright:12] +source-copyright-dep5-general (source): missing-field-in-dep5-copyright Copyright [debian/copyright:15] +source-copyright-dep5-general (source): comma-separated-files-in-dep5-copyright [debian/copyright:8] +source-copyright-dep5-general (source): bad-exception-format-in-dep5-copyright gpl-3 with font [debian/copyright:58] +source-copyright-dep5-general (source): bad-exception-format-in-dep5-copyright gpl-3 with font [debian/copyright:27] +source-copyright-dep5-general (source): ambiguous-paragraph-in-dep5-copyright [debian/copyright:22] diff --git a/t/recipes/checks/debian/copyright/dep5/source-copyright-dep5-general/eval/post-test b/t/recipes/checks/debian/copyright/dep5/source-copyright-dep5-general/eval/post-test new file mode 100644 index 0000000..feeacfc --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/source-copyright-dep5-general/eval/post-test @@ -0,0 +1 @@ +s/vs [0-9]+/vs CHANGELOG-YEAR/ diff --git a/t/recipes/checks/debian/copyright/dep5/source-copyright-dep5-syntax-error/build-spec/debian/copyright b/t/recipes/checks/debian/copyright/dep5/source-copyright-dep5-syntax-error/build-spec/debian/copyright new file mode 100644 index 0000000..30c307c --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/source-copyright-dep5-syntax-error/build-spec/debian/copyright @@ -0,0 +1,22 @@ +Format: https://anonscm.debian.org/viewvc/dep/web/deps/dep5.mdwn?revision=174 +Upstream-Name: Doohickey +Upstream-Contact: J. Random Hacker +Source: http://examples.com/doohickey/source/ + +Files: * +Copyright: 2011 J. Random Hacker +License: GPL-2 + This package is free software; you can redistribute it and/or modify it under + the terms of the GNU General Public License as published by the Free Software + Foundation; version 2 dated June, 1991. + + This package is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with + this package; if not, write to the Free Software Foundation, Inc., 51 Franklin + St, Fifth Floor, Boston, MA 02110-1301, USA. + + On Debian systems, the full text of the GNU General Public License version 2 + can be found in the file `/usr/share/common-licenses/GPL-2'. diff --git a/t/recipes/checks/debian/copyright/dep5/source-copyright-dep5-syntax-error/build-spec/fill-values b/t/recipes/checks/debian/copyright/dep5/source-copyright-dep5-syntax-error/build-spec/fill-values new file mode 100644 index 0000000..1b5f611 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/source-copyright-dep5-syntax-error/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: upload-native +Testname: source-copyright-dep5-syntax-error +Description: Test for DEP 5 syntax error diff --git a/t/recipes/checks/debian/copyright/dep5/source-copyright-dep5-syntax-error/eval/desc b/t/recipes/checks/debian/copyright/dep5/source-copyright-dep5-syntax-error/eval/desc new file mode 100644 index 0000000..f6cc383 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/source-copyright-dep5-syntax-error/eval/desc @@ -0,0 +1,2 @@ +Testname: source-copyright-dep5-syntax-error +Check: debian/copyright/dep5 diff --git a/t/recipes/checks/debian/copyright/dep5/source-copyright-dep5-syntax-error/eval/hints b/t/recipes/checks/debian/copyright/dep5/source-copyright-dep5-syntax-error/eval/hints new file mode 100644 index 0000000..0f97785 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/source-copyright-dep5-syntax-error/eval/hints @@ -0,0 +1 @@ +source-copyright-dep5-syntax-error (source): syntax-error-in-dep5-copyright Continuation line not in paragraph (line 13). Missing a dot on the previous line? [debian/copyright] diff --git a/t/recipes/checks/debian/copyright/dep5/source-copyright-empty-field/build-spec/debian/copyright b/t/recipes/checks/debian/copyright/dep5/source-copyright-empty-field/build-spec/debian/copyright new file mode 100644 index 0000000..f9d5a2a --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/source-copyright-empty-field/build-spec/debian/copyright @@ -0,0 +1,97 @@ +Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Upstream-Name: Doohickey +Upstream-Contact: J. Random Hacker +Source: http://examples.com/doohickey/source/ +License: + +Files: * +Copyright: +License: GPL-2 + This package is free software; you can redistribute it and/or modify it under + the terms of the GNU General Public License as published by the Free Software + Foundation; version 2 dated June, 1991. + . + This package is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. + . + You should have received a copy of the GNU General Public License along with + this package; if not, write to the Free Software Foundation, Inc., 51 Franklin + St, Fifth Floor, Boston, MA 02110-1301, USA. + . + On Debian systems, the full text of the GNU General Public License version 2 + can be found in the file `/usr/share/common-licenses/GPL-2'. + +Files: debian/* +Copyright: 2014, somebodydebian +License: + This package is free software; you can redistribute it and/or modify it under + the terms of the GNU General Public License as published by the Free Software + Foundation; version 2 dated June, 1991. + . + This package is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. + . + You should have received a copy of the GNU General Public License along with + this package; if not, write to the Free Software Foundation, Inc., 51 Franklin + St, Fifth Floor, Boston, MA 02110-1301, USA. + . + On Debian systems, the full text of the GNU General Public License version 2 + can be found in the file `/usr/share/common-licenses/GPL-2'. + +Files: +Copyright: 2014, somebody +License: GPL-2+ + This package is free software; you can redistribute it and/or modify it under + the terms of the GNU General Public License as published by the Free Software + Foundation; version 2 dated June, 1991. + . + This package is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. + . + You should have received a copy of the GNU General Public License along with + this package; if not, write to the Free Software Foundation, Inc., 51 Franklin + St, Fifth Floor, Boston, MA 02110-1301, USA. + . + On Debian systems, the full text of the GNU General Public License version 2 + can be found in the file `/usr/share/common-licenses/GPL-2'. + +License: + This package is free software; you can redistribute it and/or modify it under + the terms of the GNU General Public License as published by the Free Software + Foundation; version 2 dated June, 1991. + . + This package is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. + . + You should have received a copy of the GNU General Public License along with + this package; if not, write to the Free Software Foundation, Inc., 51 Franklin + St, Fifth Floor, Boston, MA 02110-1301, USA. + . + On Debian systems, the full text of the GNU General Public License version 2 + can be found in the file `/usr/share/common-licenses/GPL-2'. + +Files: m4/ +Copyright: 2014, somebodym4 +License: + This package is free software; you can redistribute it and/or modify it under + the terms of the GNU General Public License as published by the Free Software + Foundation; version 2 dated June, 1991. + . + This package is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. + . + You should have received a copy of the GNU General Public License along with + this package; if not, write to the Free Software Foundation, Inc., 51 Franklin + St, Fifth Floor, Boston, MA 02110-1301, USA. + . + On Debian systems, the full text of the GNU General Public License version 2 + can be found in the file `/usr/share/common-licenses/GPL-2'. + +License: + +License: GPL-2+ diff --git a/t/recipes/checks/debian/copyright/dep5/source-copyright-empty-field/build-spec/fill-values b/t/recipes/checks/debian/copyright/dep5/source-copyright-empty-field/build-spec/fill-values new file mode 100644 index 0000000..2fe94f7 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/source-copyright-empty-field/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: upload-native +Testname: source-copyright-empty-field +Description: Test for empty required field diff --git a/t/recipes/checks/debian/copyright/dep5/source-copyright-empty-field/eval/desc b/t/recipes/checks/debian/copyright/dep5/source-copyright-empty-field/eval/desc new file mode 100644 index 0000000..d43f068 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/source-copyright-empty-field/eval/desc @@ -0,0 +1,2 @@ +Testname: source-copyright-empty-field +Check: debian/copyright/dep5 diff --git a/t/recipes/checks/debian/copyright/dep5/source-copyright-empty-field/eval/hints b/t/recipes/checks/debian/copyright/dep5/source-copyright-empty-field/eval/hints new file mode 100644 index 0000000..e826004 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/source-copyright-empty-field/eval/hints @@ -0,0 +1,12 @@ +source-copyright-empty-field (source): update-debian-copyright 2014 vs CHANGELOG-YEAR [debian/copyright:26] +source-copyright-empty-field (source): superfluous-file-pattern m4/ [debian/copyright:77] +source-copyright-empty-field (source): superfluous-file-pattern * [debian/copyright:7] +source-copyright-empty-field (source): missing-license-text-in-dep5-copyright [debian/copyright:95] +source-copyright-empty-field (source): missing-license-text-in-dep5-copyright GPL-2+ [debian/copyright:97] +source-copyright-empty-field (source): missing-field-in-dep5-copyright (empty field) Files [debian/copyright:43] +source-copyright-empty-field (source): missing-field-in-dep5-copyright (empty field) Copyright [debian/copyright:8] +source-copyright-empty-field (source): empty-short-license-in-dep5-copyright [debian/copyright:95] +source-copyright-empty-field (source): empty-short-license-in-dep5-copyright [debian/copyright:79] +source-copyright-empty-field (source): empty-short-license-in-dep5-copyright [debian/copyright:61] +source-copyright-empty-field (source): empty-short-license-in-dep5-copyright [debian/copyright:5] +source-copyright-empty-field (source): empty-short-license-in-dep5-copyright [debian/copyright:27] diff --git a/t/recipes/checks/debian/copyright/dep5/source-copyright-empty-field/eval/post-test b/t/recipes/checks/debian/copyright/dep5/source-copyright-empty-field/eval/post-test new file mode 100644 index 0000000..feeacfc --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/source-copyright-empty-field/eval/post-test @@ -0,0 +1 @@ +s/vs [0-9]+/vs CHANGELOG-YEAR/ diff --git a/t/recipes/checks/debian/copyright/dep5/source-copyright-files-excluded-without-copyright-format-1.0/build-spec/debian/copyright b/t/recipes/checks/debian/copyright/dep5/source-copyright-files-excluded-without-copyright-format-1.0/build-spec/debian/copyright new file mode 100644 index 0000000..fa0be7c --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/source-copyright-files-excluded-without-copyright-format-1.0/build-spec/debian/copyright @@ -0,0 +1,19 @@ +Files-Excluded: foo + +Files: * +Copyright: 2011 J. Random Hacker +License: GPL-2 + This package is free software; you can redistribute it and/or modify it under + the terms of the GNU General Public License as published by the Free Software + Foundation; version 2 dated June, 1991. + . + This package is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. + . + You should have received a copy of the GNU General Public License along with + this package; if not, write to the Free Software Foundation, Inc., 51 Franklin + St, Fifth Floor, Boston, MA 02110-1301, USA. + . + On Debian systems, the full text of the GNU General Public License version 2 + can be found in the file `/usr/share/common-licenses/GPL-2'. diff --git a/t/recipes/checks/debian/copyright/dep5/source-copyright-files-excluded-without-copyright-format-1.0/build-spec/fill-values b/t/recipes/checks/debian/copyright/dep5/source-copyright-files-excluded-without-copyright-format-1.0/build-spec/fill-values new file mode 100644 index 0000000..c5f012e --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/source-copyright-files-excluded-without-copyright-format-1.0/build-spec/fill-values @@ -0,0 +1,3 @@ +Testname: source-copyright-files-excluded-without-copyright-format-1.0 +Skeleton: upload-non-native +Description: Test for files listed in Files-Excluded diff --git a/t/recipes/checks/debian/copyright/dep5/source-copyright-files-excluded-without-copyright-format-1.0/eval/desc b/t/recipes/checks/debian/copyright/dep5/source-copyright-files-excluded-without-copyright-format-1.0/eval/desc new file mode 100644 index 0000000..0956e4c --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/source-copyright-files-excluded-without-copyright-format-1.0/eval/desc @@ -0,0 +1,2 @@ +Testname: source-copyright-files-excluded-without-copyright-format-1.0 +Check: debian/copyright/dep5 diff --git a/t/recipes/checks/debian/copyright/dep5/source-copyright-files-excluded-without-copyright-format-1.0/eval/hints b/t/recipes/checks/debian/copyright/dep5/source-copyright-files-excluded-without-copyright-format-1.0/eval/hints new file mode 100644 index 0000000..2ca5e41 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/source-copyright-files-excluded-without-copyright-format-1.0/eval/hints @@ -0,0 +1,2 @@ +source-copyright-files-excluded-without-copyright-format-1.0 (source): no-dep5-copyright [debian/copyright] +source-copyright-files-excluded-without-copyright-format-1.0 (source): files-excluded-without-copyright-format-1.0 [debian/copyright] diff --git a/t/recipes/checks/debian/copyright/dep5/source-copyright-global-files-wildcard-not-first-paragraph/build-spec/debian/copyright b/t/recipes/checks/debian/copyright/dep5/source-copyright-global-files-wildcard-not-first-paragraph/build-spec/debian/copyright new file mode 100644 index 0000000..b8340bc --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/source-copyright-global-files-wildcard-not-first-paragraph/build-spec/debian/copyright @@ -0,0 +1,28 @@ +Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Upstream-Name: lintian +Upstream-Contact: Lintian Maintainers +Source: http://git.debian.org/?p=lintian/lintian.git + +Files: filea +Copyright: 2011 J. Random Hacker +License: GPL-2 + +Files: * +Copyright: 2011 J. Random Hacker +License: GPL-2 + +License: GPL-2 + This package is free software; you can redistribute it and/or modify it under + the terms of the GNU General Public License as published by the Free Software + Foundation; version 2 dated June, 1991. + . + This package is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. + . + You should have received a copy of the GNU General Public License along with + this package; if not, write to the Free Software Foundation, Inc., 51 Franklin + St, Fifth Floor, Boston, MA 02110-1301, USA. + . + On Debian systems, the full text of the GNU General Public License version 2 + can be found in the file `/usr/share/common-licenses/GPL-2'. diff --git a/t/recipes/checks/debian/copyright/dep5/source-copyright-global-files-wildcard-not-first-paragraph/build-spec/fill-values b/t/recipes/checks/debian/copyright/dep5/source-copyright-global-files-wildcard-not-first-paragraph/build-spec/fill-values new file mode 100644 index 0000000..fad1ab9 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/source-copyright-global-files-wildcard-not-first-paragraph/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: upload-native +Testname: source-copyright-global-files-wildcard-not-first-paragraph +Description: Test for Files: * not being the first paragraph diff --git a/t/recipes/checks/debian/copyright/dep5/source-copyright-global-files-wildcard-not-first-paragraph/build-spec/orig/filea b/t/recipes/checks/debian/copyright/dep5/source-copyright-global-files-wildcard-not-first-paragraph/build-spec/orig/filea new file mode 100644 index 0000000..e69de29 diff --git a/t/recipes/checks/debian/copyright/dep5/source-copyright-global-files-wildcard-not-first-paragraph/eval/desc b/t/recipes/checks/debian/copyright/dep5/source-copyright-global-files-wildcard-not-first-paragraph/eval/desc new file mode 100644 index 0000000..6cdbf3c --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/source-copyright-global-files-wildcard-not-first-paragraph/eval/desc @@ -0,0 +1,2 @@ +Testname: source-copyright-global-files-wildcard-not-first-paragraph +Check: debian/copyright/dep5 diff --git a/t/recipes/checks/debian/copyright/dep5/source-copyright-global-files-wildcard-not-first-paragraph/eval/hints b/t/recipes/checks/debian/copyright/dep5/source-copyright-global-files-wildcard-not-first-paragraph/eval/hints new file mode 100644 index 0000000..9ec205d --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/source-copyright-global-files-wildcard-not-first-paragraph/eval/hints @@ -0,0 +1,2 @@ +source-copyright-global-files-wildcard-not-first-paragraph (source): superfluous-file-pattern filea [debian/copyright:6] +source-copyright-global-files-wildcard-not-first-paragraph (source): global-files-wildcard-not-first-paragraph-in-dep5-copyright [debian/copyright:10] diff --git a/t/recipes/checks/debian/copyright/dep5/source-copyright-incomplete-creative-commons-b/build-spec/debian/copyright b/t/recipes/checks/debian/copyright/dep5/source-copyright-incomplete-creative-commons-b/build-spec/debian/copyright new file mode 100644 index 0000000..9102490 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/source-copyright-incomplete-creative-commons-b/build-spec/debian/copyright @@ -0,0 +1,81 @@ +Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Upstream-Name: opensesame +Upstream-Contact: Sebastiaan Mathot +Source: http://www.cogsci.nl/software/opensesame + +Files: * +Copyright: 2010-2012, Sebastiaan Mathot +License: GPL-3 + On Debian systems, the full text of the GNU General Public License version 3 + can be found in the file `/usr/share/common-licenses/GPL-3'. + +Files: resources/*.ttf +Copyright: 2006, 2007, 2008, 2009, 2010 Google Corp. + Droid is a trademark of Google Corp. +License: Apache-2.0 + On Debian systems, the complete text of the Apache License Version 2.0 + can be found in `/usr/share/common-licenses/Apache-2.0'. + +Files: sounds/* +Copyright: 1996-2011, The K Desktop Environment project http://www.kde.org + Marc-Andre Lureau + Bastien Nocera + Andreas Hyden + Seth Nickell + Ronald Bultje + Thomas Vander Stichele + William Jon McCann +License: GPL-2+ + The full text of the GNU General Public License version 2 is available on + Debian systems in /usr/share/common-licenses/GPL-2. + +Files: resources/theme/default/os-custom-icons/* +Copyright: 2010-2011, Matthieu James + 2012, Daniel Fore + 2012, Sebastiaan Mathot +License: GPL-3 + The full text of the GNU General Public License version 3 is available on + Debian systems in /usr/share/common-licenses/GPL-3. + +Files: debian/* +Copyright: 2010-2012, Sebastiaan Mathot + 2011, Michael Hanke +License: GPL-3 + The full text of the GNU General Public License version 3 is available on + Debian systems in /usr/share/common-licenses/GPL-3. + +Files: resources/ts/it_IT.ts +Copyright: 2012, Andrea Epifani +License: GPL-3 + The full text of the GNU General Public License version 3 is available on + Debian systems in /usr/share/common-licenses/GPL-3. + +Files: resources/ts/fr_FR.ts +Copyright: 2013, Romain Monfollet +License: GPL-3 + The full text of the GNU General Public License version 3 is available on + Debian systems in /usr/share/common-licenses/GPL-3. + +Files: resources/ts/zh_CN.ts +Copyright: 2013, Gabriel Chan + 2013, Jerry Li +License: GPL-3 + The full text of the GNU General Public License version 3 is available on + Debian systems in /usr/share/common-licenses/GPL-3. + +Files: resources/templates/eco_alt_template.opensesame.tar.gz +Copyright: 2012, Francisco Javier Moreno-Martinez + 2012, Pedro R. Montoro + 2012, Sebastiaan Mathot +License: CC-BY-3.0 + +License: CC-BY-3.0 + You are free: + to Share (to copy, distribute and transmit the work) and + to Remix (to adapt the work) under the following conditions: + . + Attribution — You must attribute the work in the manner specified by the + author or licensor (but not in any way that suggests that they endorse you + or your use of the work). + . + For more information, see http://creativecommons.org/licenses/by/3.0/ diff --git a/t/recipes/checks/debian/copyright/dep5/source-copyright-incomplete-creative-commons-b/build-spec/fill-values b/t/recipes/checks/debian/copyright/dep5/source-copyright-incomplete-creative-commons-b/build-spec/fill-values new file mode 100644 index 0000000..444f75c --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/source-copyright-incomplete-creative-commons-b/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: upload-native +Testname: source-copyright-incomplete-creative-commons-b +Description: Test for incomplete Creative Commons licenses (b) diff --git a/t/recipes/checks/debian/copyright/dep5/source-copyright-incomplete-creative-commons-b/eval/desc b/t/recipes/checks/debian/copyright/dep5/source-copyright-incomplete-creative-commons-b/eval/desc new file mode 100644 index 0000000..b65de32 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/source-copyright-incomplete-creative-commons-b/eval/desc @@ -0,0 +1,2 @@ +Testname: source-copyright-incomplete-creative-commons-b +Check: debian/copyright/dep5 diff --git a/t/recipes/checks/debian/copyright/dep5/source-copyright-incomplete-creative-commons-b/eval/hints b/t/recipes/checks/debian/copyright/dep5/source-copyright-incomplete-creative-commons-b/eval/hints new file mode 100644 index 0000000..6abf857 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/source-copyright-incomplete-creative-commons-b/eval/hints @@ -0,0 +1,11 @@ +source-copyright-incomplete-creative-commons-b (source): update-debian-copyright 2012 vs CHANGELOG-YEAR [debian/copyright:41] +source-copyright-incomplete-creative-commons-b (source): superfluous-file-pattern sounds/* [debian/copyright:19] +source-copyright-incomplete-creative-commons-b (source): superfluous-file-pattern resources/ts/zh_CN.ts [debian/copyright:59] +source-copyright-incomplete-creative-commons-b (source): superfluous-file-pattern resources/ts/it_IT.ts [debian/copyright:47] +source-copyright-incomplete-creative-commons-b (source): superfluous-file-pattern resources/ts/fr_FR.ts [debian/copyright:53] +source-copyright-incomplete-creative-commons-b (source): superfluous-file-pattern resources/theme/default/os-custom-icons/* [debian/copyright:32] +source-copyright-incomplete-creative-commons-b (source): superfluous-file-pattern resources/templates/eco_alt_template.opensesame.tar.gz [debian/copyright:66] +source-copyright-incomplete-creative-commons-b (source): superfluous-file-pattern resources/*.ttf [debian/copyright:12] +source-copyright-incomplete-creative-commons-b (source): superfluous-file-pattern * [debian/copyright:6] +source-copyright-incomplete-creative-commons-b (source): insecure-copyright-format-uri http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ [debian/copyright] +source-copyright-incomplete-creative-commons-b (source): incomplete-creative-commons-license cc-by-3.0 [debian/copyright:72] diff --git a/t/recipes/checks/debian/copyright/dep5/source-copyright-incomplete-creative-commons-b/eval/post-test b/t/recipes/checks/debian/copyright/dep5/source-copyright-incomplete-creative-commons-b/eval/post-test new file mode 100644 index 0000000..daec1dd --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/source-copyright-incomplete-creative-commons-b/eval/post-test @@ -0,0 +1,4 @@ +/: dep5-copyright-license-name-not-unique .*/ d +/: unused-file-paragraph-in-dep5-copyright .*/ d +/: wildcard-matches-nothing-in-dep5-copyright .*/ d +s/vs [0-9]+/vs CHANGELOG-YEAR/ diff --git a/t/recipes/checks/debian/copyright/dep5/source-copyright-incomplete-creative-commons-unrel/build-spec/debian/copyright b/t/recipes/checks/debian/copyright/dep5/source-copyright-incomplete-creative-commons-unrel/build-spec/debian/copyright new file mode 100644 index 0000000..9a5bb1d --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/source-copyright-incomplete-creative-commons-unrel/build-spec/debian/copyright @@ -0,0 +1,379 @@ +Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Upstream-Name: flycheck +Source: https://github.com/flycheck/flycheck + +Files: * +Copyright: (C) 2012-2015, 2016, 2017 Sebastian Wiesner and Flycheck contributors + (C) 2013, 2014 Free Software Foundation, Inc. +License: GPL-3+ + +Files: doc/* +Copyright: (C) 2012-2015, 2017 Sebastian Wiesner and Flycheck contributors +License: CC-BY-SA-4.0 + +Files: doc/*.py +Copyright: (C) 2012-2015 Sebastian Wiesner and Flycheck contributors +License: GPL-3+ + +Files: flycheck.svg +Copyright: (C) 2014-2015 Sebastian Wiesner +License: CC-BY-SA-4.0 + +Files: debian/* +Copyright: (C) 2016, 2017 Sean Whitton +License: GPL-3+ + +License: GPL-3+ + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + . + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + . + You should have received a copy of the GNU General Public License + along with this program. If not, see . + . + On Debian systems, the complete text of the GNU General + Public License version 3 can be found in "/usr/share/common-licenses/GPL-3 + +License: CC-BY-SA-4.0 + By exercising the Licensed Rights (defined below), You accept and agree + to be bound by the terms and conditions of this Creative Commons + Attribution-ShareAlike 4.0 International Public License ("Public + License"). To the extent this Public License may be interpreted as a + contract, You are granted the Licensed Rights in consideration of Your + acceptance of these terms and conditions, and the Licensor grants You + such rights in consideration of benefits the Licensor receives from + making the Licensed Material available under these terms and + conditions. + . + Section 1 – Definitions. + . + a. Adapted Material means material subject to Copyright and Similar + Rights that is derived from or based upon the Licensed Material and in + which the Licensed Material is translated, altered, arranged, + transformed, or otherwise modified in a manner requiring permission + under the Copyright and Similar Rights held by the Licensor. For + purposes of this Public License, where the Licensed Material is a + musical work, performance, or sound recording, Adapted Material is + always produced where the Licensed Material is synched in timed + relation with a moving image. + . + b. Adapter's License means the license You apply to Your Copyright and + Similar Rights in Your contributions to Adapted Material in accordance + with the terms and conditions of this Public License. + . + c. BY-SA Compatible License means a license listed at + creativecommons.org/compatiblelicenses, approved by Creative Commons + as essentially the equivalent of this Public License. + . + d. Copyright and Similar Rights means copyright and/or similar rights + closely related to copyright including, without limitation, + performance, broadcast, sound recording, and Sui Generis Database + Rights, without regard to how the rights are labeled or + categorized. For purposes of this Public License, the rights specified + in Section 2(b)(1)-(2) are not Copyright and Similar Rights. + . + e. Effective Technological Measures means those measures that, in the + absence of proper authority, may not be circumvented under laws + fulfilling obligations under Article 11 of the WIPO Copyright Treaty + adopted on December 20, 1996, and/or similar international agreements. + . + f. Exceptions and Limitations means fair use, fair dealing, and/or any + other exception or limitation to Copyright and Similar Rights that + applies to Your use of the Licensed Material. + . + g. License Elements means the license attributes listed in the name of + a Creative Commons Public License. The License Elements of this Public + License are Attribution and ShareAlike. + . + h. Licensed Material means the artistic or literary work, database, or + other material to which the Licensor applied this Public License. + . + i. Licensed Rights means the rights granted to You subject to the + terms and conditions of this Public License, which are limited to all + Copyright and Similar Rights that apply to Your use of the Licensed + Material and that the Licensor has authority to license. + . + j. Licensor means the individual(s) or entity(ies) granting rights + under this Public License. + . + k. Share means to provide material to the public by any means or + process that requires permission under the Licensed Rights, such as + reproduction, public display, public performance, distribution, + dissemination, communication, or importation, and to make material + available to the public including in ways that members of the public + may access the material from a place and at a time individually chosen + by them. + . + l. Sui Generis Database Rights means rights other than copyright + resulting from Directive 96/9/EC of the European Parliament and of the + Council of 11 March 1996 on the legal protection of databases, as + amended and/or succeeded, as well as other essentially equivalent + rights anywhere in the world. + . + m. You means the individual or entity exercising the Licensed Rights + under this Public License. Your has a corresponding meaning. + . + Section 2 – Scope. + . + a. License grant. + . + 1. Subject to the terms and conditions of this Public License, the + Licensor hereby grants You a worldwide, royalty-free, + non-sublicensable, non-exclusive, irrevocable license to exercise the + Licensed Rights in the Licensed Material to: + . + A. reproduce and Share the Licensed Material, in whole or in part; and + . + B. produce, reproduce, and Share Adapted Material. + . + 2. Exceptions and Limitations. For the avoidance of doubt, where + Exceptions and Limitations apply to Your use, this Public License does + not apply, and You do not need to comply with its terms and + conditions. + . + 3. Term. The term of this Public License is specified in Section 6(a). + . + 4. Media and formats; technical modifications allowed. The Licensor + authorizes You to exercise the Licensed Rights in all media and + formats whether now known or hereafter created, and to make technical + modifications necessary to do so. The Licensor waives and/or agrees + not to assert any right or authority to forbid You from making + technical modifications necessary to exercise the Licensed Rights, + including technical modifications necessary to circumvent Effective + Technological Measures. For purposes of this Public License, simply + making modifications authorized by this Section 2(a)(4) never produces + Adapted Material. + . + 5. Downstream recipients. + . + A. Offer from the Licensor – Licensed Material. Every recipient of the + Licensed Material automatically receives an offer from the Licensor to + exercise the Licensed Rights under the terms and conditions of this + Public License. + . + B. Additional offer from the Licensor – Adapted Material. Every + recipient of Adapted Material from You automatically receives an offer + from the Licensor to exercise the Licensed Rights in the Adapted + Material under the conditions of the Adapter’s License You apply. + . + C. No downstream restrictions. You may not offer or impose any + additional or different terms or conditions on, or apply any Effective + Technological Measures to, the Licensed Material if doing so restricts + exercise of the Licensed Rights by any recipient of the Licensed + Material. + . + 6. No endorsement. Nothing in this Public License constitutes or may + be construed as permission to assert or imply that You are, or that + Your use of the Licensed Material is, connected with, or sponsored, + endorsed, or granted official status by, the Licensor or others + designated to receive attribution as provided in Section + 3(a)(1)(A)(i). + . + b. Other rights. + . + 1. Moral rights, such as the right of integrity, are not licensed + under this Public License, nor are publicity, privacy, and/or other + similar personality rights; however, to the extent possible, the + Licensor waives and/or agrees not to assert any such rights held by + the Licensor to the limited extent necessary to allow You to exercise + the Licensed Rights, but not otherwise. + . + 2. Patent and trademark rights are not licensed under this Public + License. + . + 3. To the extent possible, the Licensor waives any right to collect + royalties from You for the exercise of the Licensed Rights, whether + directly or through a collecting society under any voluntary or + waivable statutory or compulsory licensing scheme. In all other cases + the Licensor expressly reserves any right to collect such royalties. + . + Section 3 – License Conditions. + . + Your exercise of the Licensed Rights is expressly made subject to the + following conditions. + . + a. Attribution. + . + 1. If You Share the Licensed Material (including in modified form), + You must: + . + A. retain the following if it is supplied by the Licensor with the + Licensed Material: + . + i. identification of the creator(s) of the Licensed Material and any + others designated to receive attribution, in any reasonable manner + requested by the Licensor (including by pseudonym if designated); + . + ii. a copyright notice; + . + iii. a notice that refers to this Public License; + . + iv. a notice that refers to the disclaimer of warranties; + . + v. a URI or hyperlink to the Licensed Material to the extent + reasonably practicable; + . + B. indicate if You modified the Licensed Material and retain an + indication of any previous modifications; and + . + C. indicate the Licensed Material is licensed under this Public + License, and include the text of, or the URI or hyperlink to, this + Public License. + . + 2. You may satisfy the conditions in Section 3(a)(1) in any reasonable + manner based on the medium, means, and context in which You Share the + Licensed Material. For example, it may be reasonable to satisfy the + conditions by providing a URI or hyperlink to a resource that includes + the required information. + . + 3. If requested by the Licensor, You must remove any of the + information required by Section 3(a)(1)(A) to the extent reasonably + practicable. + . + b. ShareAlike.In addition to the conditions in Section 3(a), if You + Share Adapted Material You produce, the following conditions also + apply. + . + 1. The Adapter’s License You apply must be a Creative Commons license + with the same License Elements, this version or later, or a BY-SA + Compatible License. + . + 2. You must include the text of, or the URI or hyperlink to, the + Adapter's License You apply. You may satisfy this condition in any + reasonable manner based on the medium, means, and context in which You + Share Adapted Material. + . + 3. You may not offer or impose any additional or different terms or + conditions on, or apply any Effective Technological Measures to, + Adapted Material that restrict exercise of the rights granted under + the Adapter's License You apply. + . + Section 4 – Sui Generis Database Rights. + . + Where the Licensed Rights include Sui Generis Database Rights that + apply to Your use of the Licensed Material: + . + a. for the avoidance of doubt, Section 2(a)(1) grants You the right to + extract, reuse, reproduce, and Share all or a substantial portion of + the contents of the database; + . + b. if You include all or a substantial portion of the database + contents in a database in which You have Sui Generis Database Rights, + then the database in which You have Sui Generis Database Rights (but + not its individual contents) is Adapted Material, including for + purposes of Section 3(b); and + . + c. You must comply with the conditions in Section 3(a) if You Share + all or a substantial portion of the contents of the database. For the + avoidance of doubt, this Section 4 supplements and does not replace + Your obligations under this Public License where the Licensed Rights + include other Copyright and Similar Rights. + . + Section 5 – Disclaimer of Warranties and Limitation of Liability. + . + a. Unless otherwise separately undertaken by the Licensor, to the + extent possible, the Licensor offers the Licensed Material as-is and + as-available, and makes no representations or warranties of any kind + concerning the Licensed Material, whether express, implied, statutory, + or other. This includes, without limitation, warranties of title, + merchantability, fitness for a particular purpose, non-infringement, + absence of latent or other defects, accuracy, or the presence or + absence of errors, whether or not known or discoverable. Where + disclaimers of warranties are not allowed in full or in part, this + disclaimer may not apply to You. + . + b. To the extent possible, in no event will the Licensor be liable to + You on any legal theory (including, without limitation, negligence) or + otherwise for any direct, special, indirect, incidental, + consequential, punitive, exemplary, or other losses, costs, expenses, + or damages arising out of this Public License or use of the Licensed + Material, even if the Licensor has been advised of the possibility of + such losses, costs, expenses, or damages. Where a limitation of + liability is not allowed in full or in part, this limitation may not + apply to You. + . + c. The disclaimer of warranties and limitation of liability provided + above shall be interpreted in a manner that, to the extent possible, + most closely approximates an absolute disclaimer and waiver of all + liability. + . + Section 6 – Term and Termination. + . + a. This Public License applies for the term of the Copyright and + Similar Rights licensed here. However, if You fail to comply with this + Public License, then Your rights under this Public License terminate + automatically. + . + b. Where Your right to use the Licensed Material has terminated under + Section 6(a), it reinstates: + . + 1. automatically as of the date the violation is cured, provided it is + cured within 30 days of Your discovery of the violation; or + . + 2. upon express reinstatement by the Licensor. + . + c. For the avoidance of doubt, this Section 6(b) does not affect any + right the Licensor may have to seek remedies for Your violations of + this Public License. + . + d. For the avoidance of doubt, the Licensor may also offer the + Licensed Material under separate terms or conditions or stop + distributing the Licensed Material at any time; however, doing so will + not terminate this Public License. + . + e. Sections 1, 5, 6, 7, and 8 survive termination of this Public + License. + . + Section 7 – Other Terms and Conditions. + . + a. The Licensor shall not be bound by any additional or different + terms or conditions communicated by You unless expressly agreed. + . + b. Any arrangements, understandings, or agreements regarding the + Licensed Material not stated herein are separate from and independent + of the terms and conditions of this Public License. + . + Section 8 – Interpretation. + . + a. For the avoidance of doubt, this Public License does not, and shall + not be interpreted to, reduce, limit, restrict, or impose conditions + on any use of the Licensed Material that could lawfully be made + without permission under this Public License. + . + b. To the extent possible, if any provision of this Public License is + deemed unenforceable, it shall be automatically reformed to the + minimum extent necessary to make it enforceable. If the provision + cannot be reformed, it shall be severed from this Public License + without affecting the enforceability of the remaining terms and + conditions. + . + c. No term or condition of this Public License will be waived and no + failure to comply consented to unless expressly agreed to by the + Licensor. + . + d. Nothing in this Public License constitutes or may be interpreted as + a limitation upon, or waiver of, any privileges and immunities that + apply to the Licensor or You, including from the legal processes of + any jurisdiction or authority. + . + Creative Commons is not a party to its public + licenses. Notwithstanding, Creative Commons may elect to apply one of + its public licenses to material it publishes and in those instances + will be considered the “Licensor.” Except for the limited purpose of + indicating that material is shared under a Creative Commons public + license or as otherwise permitted by the Creative Commons policies + published at creativecommons.org/policies, Creative Commons does not + authorize the use of the trademark “Creative Commons” or any other + trademark or logo of Creative Commons without its prior written + consent including, without limitation, in connection with any + unauthorized modifications to any of its public licenses or any other + arrangements, understandings, or agreements concerning use of licensed + material. For the avoidance of doubt, this paragraph does not form + part of the public licenses. Creative Commons may be contacted at + creativecommons.org. diff --git a/t/recipes/checks/debian/copyright/dep5/source-copyright-incomplete-creative-commons-unrel/build-spec/fill-values b/t/recipes/checks/debian/copyright/dep5/source-copyright-incomplete-creative-commons-unrel/build-spec/fill-values new file mode 100644 index 0000000..7f24052 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/source-copyright-incomplete-creative-commons-unrel/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: upload-native +Testname: source-copyright-incomplete-creative-commons-unrel +Description: Test for incomplete Creative Commons licenses (good) diff --git a/t/recipes/checks/debian/copyright/dep5/source-copyright-incomplete-creative-commons-unrel/eval/desc b/t/recipes/checks/debian/copyright/dep5/source-copyright-incomplete-creative-commons-unrel/eval/desc new file mode 100644 index 0000000..7d96eef --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/source-copyright-incomplete-creative-commons-unrel/eval/desc @@ -0,0 +1,4 @@ +Testname: source-copyright-incomplete-creative-commons-unrel +Test-Against: + incomplete-creative-commons-license +Check: debian/copyright/dep5 diff --git a/t/recipes/checks/debian/copyright/dep5/source-copyright-incomplete-creative-commons-unrel/eval/hints b/t/recipes/checks/debian/copyright/dep5/source-copyright-incomplete-creative-commons-unrel/eval/hints new file mode 100644 index 0000000..3669c43 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/source-copyright-incomplete-creative-commons-unrel/eval/hints @@ -0,0 +1,5 @@ +source-copyright-incomplete-creative-commons-unrel (source): update-debian-copyright 2017 vs CHANGELOG-YEAR [debian/copyright:23] +source-copyright-incomplete-creative-commons-unrel (source): superfluous-file-pattern flycheck.svg [debian/copyright:18] +source-copyright-incomplete-creative-commons-unrel (source): superfluous-file-pattern doc/*.py [debian/copyright:14] +source-copyright-incomplete-creative-commons-unrel (source): superfluous-file-pattern doc/* [debian/copyright:10] +source-copyright-incomplete-creative-commons-unrel (source): superfluous-file-pattern * [debian/copyright:5] diff --git a/t/recipes/checks/debian/copyright/dep5/source-copyright-incomplete-creative-commons-unrel/eval/post-test b/t/recipes/checks/debian/copyright/dep5/source-copyright-incomplete-creative-commons-unrel/eval/post-test new file mode 100644 index 0000000..279aa2e --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/source-copyright-incomplete-creative-commons-unrel/eval/post-test @@ -0,0 +1,3 @@ +/: unused-file-paragraph-in-dep5-copyright .*/ d +/: wildcard-matches-nothing-in-dep5-copyright .*/ d +s/vs [0-9]+/vs CHANGELOG-YEAR/ diff --git a/t/recipes/checks/debian/copyright/dep5/source-copyright-incomplete-creative-commons/build-spec/debian/copyright b/t/recipes/checks/debian/copyright/dep5/source-copyright-incomplete-creative-commons/build-spec/debian/copyright new file mode 100644 index 0000000..641bb23 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/source-copyright-incomplete-creative-commons/build-spec/debian/copyright @@ -0,0 +1,79 @@ +Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Upstream-Name: opensesame +Upstream-Contact: Sebastiaan Mathot +Source: http://www.cogsci.nl/software/opensesame + +Files: * +Copyright: 2010-2012, Sebastiaan Mathot +License: GPL-3 + On Debian systems, the full text of the GNU General Public License version 3 + can be found in the file `/usr/share/common-licenses/GPL-3'. + +Files: resources/*.ttf +Copyright: 2006, 2007, 2008, 2009, 2010 Google Corp. + Droid is a trademark of Google Corp. +License: Apache-2.0 + On Debian systems, the complete text of the Apache License Version 2.0 + can be found in `/usr/share/common-licenses/Apache-2.0'. + +Files: sounds/* +Copyright: 1996-2011, The K Desktop Environment project http://www.kde.org + Marc-Andre Lureau + Bastien Nocera + Andreas Hyden + Seth Nickell + Ronald Bultje + Thomas Vander Stichele + William Jon McCann +License: GPL-2+ + The full text of the GNU General Public License version 2 is available on + Debian systems in /usr/share/common-licenses/GPL-2. + +Files: resources/theme/default/os-custom-icons/* +Copyright: 2010-2011, Matthieu James + 2012, Daniel Fore + 2012, Sebastiaan Mathot +License: GPL-3 + The full text of the GNU General Public License version 3 is available on + Debian systems in /usr/share/common-licenses/GPL-3. + +Files: debian/* +Copyright: 2010-2012, Sebastiaan Mathot + 2011, Michael Hanke +License: GPL-3 + The full text of the GNU General Public License version 3 is available on + Debian systems in /usr/share/common-licenses/GPL-3. + +Files: resources/ts/it_IT.ts +Copyright: 2012, Andrea Epifani +License: GPL-3 + The full text of the GNU General Public License version 3 is available on + Debian systems in /usr/share/common-licenses/GPL-3. + +Files: resources/ts/fr_FR.ts +Copyright: 2013, Romain Monfollet +License: GPL-3 + The full text of the GNU General Public License version 3 is available on + Debian systems in /usr/share/common-licenses/GPL-3. + +Files: resources/ts/zh_CN.ts +Copyright: 2013, Gabriel Chan + 2013, Jerry Li +License: GPL-3 + The full text of the GNU General Public License version 3 is available on + Debian systems in /usr/share/common-licenses/GPL-3. + +Files: resources/templates/eco_alt_template.opensesame.tar.gz +Copyright: 2012, Francisco Javier Moreno-Martinez + 2012, Pedro R. Montoro + 2012, Sebastiaan Mathot +License: CC-BY-3.0 + You are free: + to Share (to copy, distribute and transmit the work) and + to Remix (to adapt the work) under the following conditions: + . + Attribution — You must attribute the work in the manner specified by the + author or licensor (but not in any way that suggests that they endorse you + or your use of the work). + . + For more information, see http://creativecommons.org/licenses/by/3.0/ diff --git a/t/recipes/checks/debian/copyright/dep5/source-copyright-incomplete-creative-commons/build-spec/fill-values b/t/recipes/checks/debian/copyright/dep5/source-copyright-incomplete-creative-commons/build-spec/fill-values new file mode 100644 index 0000000..83a1c12 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/source-copyright-incomplete-creative-commons/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: upload-native +Testname: source-copyright-incomplete-creative-commons +Description: Test for incomplete Creative Commons licenses diff --git a/t/recipes/checks/debian/copyright/dep5/source-copyright-incomplete-creative-commons/eval/desc b/t/recipes/checks/debian/copyright/dep5/source-copyright-incomplete-creative-commons/eval/desc new file mode 100644 index 0000000..58178db --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/source-copyright-incomplete-creative-commons/eval/desc @@ -0,0 +1,2 @@ +Testname: source-copyright-incomplete-creative-commons +Check: debian/copyright/dep5 diff --git a/t/recipes/checks/debian/copyright/dep5/source-copyright-incomplete-creative-commons/eval/hints b/t/recipes/checks/debian/copyright/dep5/source-copyright-incomplete-creative-commons/eval/hints new file mode 100644 index 0000000..2ffb3e6 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/source-copyright-incomplete-creative-commons/eval/hints @@ -0,0 +1,11 @@ +source-copyright-incomplete-creative-commons (source): update-debian-copyright 2012 vs CHANGELOG-YEAR [debian/copyright:41] +source-copyright-incomplete-creative-commons (source): superfluous-file-pattern sounds/* [debian/copyright:19] +source-copyright-incomplete-creative-commons (source): superfluous-file-pattern resources/ts/zh_CN.ts [debian/copyright:59] +source-copyright-incomplete-creative-commons (source): superfluous-file-pattern resources/ts/it_IT.ts [debian/copyright:47] +source-copyright-incomplete-creative-commons (source): superfluous-file-pattern resources/ts/fr_FR.ts [debian/copyright:53] +source-copyright-incomplete-creative-commons (source): superfluous-file-pattern resources/theme/default/os-custom-icons/* [debian/copyright:32] +source-copyright-incomplete-creative-commons (source): superfluous-file-pattern resources/templates/eco_alt_template.opensesame.tar.gz [debian/copyright:66] +source-copyright-incomplete-creative-commons (source): superfluous-file-pattern resources/*.ttf [debian/copyright:12] +source-copyright-incomplete-creative-commons (source): superfluous-file-pattern * [debian/copyright:6] +source-copyright-incomplete-creative-commons (source): insecure-copyright-format-uri http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ [debian/copyright] +source-copyright-incomplete-creative-commons (source): incomplete-creative-commons-license cc-by-3.0 [debian/copyright:70] diff --git a/t/recipes/checks/debian/copyright/dep5/source-copyright-incomplete-creative-commons/eval/post-test b/t/recipes/checks/debian/copyright/dep5/source-copyright-incomplete-creative-commons/eval/post-test new file mode 100644 index 0000000..daec1dd --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/source-copyright-incomplete-creative-commons/eval/post-test @@ -0,0 +1,4 @@ +/: dep5-copyright-license-name-not-unique .*/ d +/: unused-file-paragraph-in-dep5-copyright .*/ d +/: wildcard-matches-nothing-in-dep5-copyright .*/ d +s/vs [0-9]+/vs CHANGELOG-YEAR/ diff --git a/t/recipes/checks/debian/copyright/dep5/source-copyright-inconsistent-appstream-metadata-license/build-spec/debian/copyright b/t/recipes/checks/debian/copyright/dep5/source-copyright-inconsistent-appstream-metadata-license/build-spec/debian/copyright new file mode 100644 index 0000000..22d390a --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/source-copyright-inconsistent-appstream-metadata-license/build-spec/debian/copyright @@ -0,0 +1,16 @@ +Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Upstream-Name: Doohickey +Upstream-Contact: J. Random Hacker +Source: http://examples.com/doohickey/source/ + +Files: * +Copyright: 2014, somebody1 +License: CC0-1.0 + Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla tortor + dolor, laoreet et laoreet non, pretium in nunc. Sed dapibus quis lorem + quis gravida. Cras sed purus consequat, dictum purus nec, venenatis sem. + Nullam placerat et lacus at bibendum. Maecenas varius sapien ut aliquet + elementum. Vestibulum vel rutrum ligula, quis pellentesque velit. Duis + molestie velit eget aliquet sollicitudin. Nunc eget metus nec nibh + maximus iaculis in non urna. Cras maximus dui ac mauris maximus + porttitor. diff --git a/t/recipes/checks/debian/copyright/dep5/source-copyright-inconsistent-appstream-metadata-license/build-spec/fill-values b/t/recipes/checks/debian/copyright/dep5/source-copyright-inconsistent-appstream-metadata-license/build-spec/fill-values new file mode 100644 index 0000000..7f31358 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/source-copyright-inconsistent-appstream-metadata-license/build-spec/fill-values @@ -0,0 +1,2 @@ +Testname: source-copyright-inconsistent-appstream-metadata-license +Skeleton: upload-native diff --git a/t/recipes/checks/debian/copyright/dep5/source-copyright-inconsistent-appstream-metadata-license/build-spec/orig/bad.xml b/t/recipes/checks/debian/copyright/dep5/source-copyright-inconsistent-appstream-metadata-license/build-spec/orig/bad.xml new file mode 100644 index 0000000..bb4f84c --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/source-copyright-inconsistent-appstream-metadata-license/build-spec/orig/bad.xml @@ -0,0 +1,18 @@ + + + org.gnupg.scdaemon + does-not-match-anything + scdaemon + USB SmartCard Readers + +

      + GnuPG's scdaemon provides access to USB tokens and smartcard + readers that provide cryptographic functionality (e.g. use of + protected secret keys). +

      +
      + + usb:v046Ap0005d* + usb:v0BF8p1006d* + +
      diff --git a/t/recipes/checks/debian/copyright/dep5/source-copyright-inconsistent-appstream-metadata-license/build-spec/orig/good.xml b/t/recipes/checks/debian/copyright/dep5/source-copyright-inconsistent-appstream-metadata-license/build-spec/orig/good.xml new file mode 100644 index 0000000..b316fd5 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/source-copyright-inconsistent-appstream-metadata-license/build-spec/orig/good.xml @@ -0,0 +1,18 @@ + + + org.gnupg.scdaemon + CC0-1.0 + scdaemon + USB SmartCard Readers + +

      + GnuPG's scdaemon provides access to USB tokens and smartcard + readers that provide cryptographic functionality (e.g. use of + protected secret keys). +

      +
      + + usb:v046Ap0005d* + usb:v046Ap0010d* + +
      diff --git a/t/recipes/checks/debian/copyright/dep5/source-copyright-inconsistent-appstream-metadata-license/eval/desc b/t/recipes/checks/debian/copyright/dep5/source-copyright-inconsistent-appstream-metadata-license/eval/desc new file mode 100644 index 0000000..da84972 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/source-copyright-inconsistent-appstream-metadata-license/eval/desc @@ -0,0 +1,2 @@ +Testname: source-copyright-inconsistent-appstream-metadata-license +Check: debian/copyright/dep5 diff --git a/t/recipes/checks/debian/copyright/dep5/source-copyright-inconsistent-appstream-metadata-license/eval/hints b/t/recipes/checks/debian/copyright/dep5/source-copyright-inconsistent-appstream-metadata-license/eval/hints new file mode 100644 index 0000000..5471a72 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/source-copyright-inconsistent-appstream-metadata-license/eval/hints @@ -0,0 +1 @@ +source-copyright-inconsistent-appstream-metadata-license (source): inconsistent-appstream-metadata-license bad.xml (does-not-match-anything != cc0-1.0) [debian/copyright] diff --git a/t/recipes/checks/debian/copyright/dep5/source-copyright-insecure-uri/build-spec/debian/copyright b/t/recipes/checks/debian/copyright/dep5/source-copyright-insecure-uri/build-spec/debian/copyright new file mode 100644 index 0000000..082beb1 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/source-copyright-insecure-uri/build-spec/debian/copyright @@ -0,0 +1,23 @@ +Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Upstream-Name: Doohickey +Upstream-Contact: J. Random Hacker +Source: http://examples.com/doohickey/source/ + +Files: * +Copyright: © 2011 J. Random Hacker +License: Apache-2.0 + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + . + http://www.apache.org/licenses/LICENSE-2.0 + . + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + . + On Debian systems, the complete text of the Apache version 2.0 license + can be found in "/usr/share/common-licenses/Apache-2.0". + diff --git a/t/recipes/checks/debian/copyright/dep5/source-copyright-insecure-uri/build-spec/fill-values b/t/recipes/checks/debian/copyright/dep5/source-copyright-insecure-uri/build-spec/fill-values new file mode 100644 index 0000000..c7f18be --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/source-copyright-insecure-uri/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: upload-native +Testname: source-copyright-insecure-uri +Description: Test for insecure Format: URIs diff --git a/t/recipes/checks/debian/copyright/dep5/source-copyright-insecure-uri/eval/desc b/t/recipes/checks/debian/copyright/dep5/source-copyright-insecure-uri/eval/desc new file mode 100644 index 0000000..7673493 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/source-copyright-insecure-uri/eval/desc @@ -0,0 +1,2 @@ +Testname: source-copyright-insecure-uri +Check: debian/copyright/dep5 diff --git a/t/recipes/checks/debian/copyright/dep5/source-copyright-insecure-uri/eval/hints b/t/recipes/checks/debian/copyright/dep5/source-copyright-insecure-uri/eval/hints new file mode 100644 index 0000000..be71ba9 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/source-copyright-insecure-uri/eval/hints @@ -0,0 +1 @@ +source-copyright-insecure-uri (source): insecure-copyright-format-uri http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ [debian/copyright] diff --git a/t/recipes/checks/debian/copyright/dep5/source-copyright-missing-non-free-explanation-unrel/build-spec/fill-values b/t/recipes/checks/debian/copyright/dep5/source-copyright-missing-non-free-explanation-unrel/build-spec/fill-values new file mode 100644 index 0000000..63a3f72 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/source-copyright-missing-non-free-explanation-unrel/build-spec/fill-values @@ -0,0 +1,4 @@ +Skeleton: upload-native +Testname: source-copyright-missing-non-free-explanation-unrel +Description: Test for missing contrib/non-free explanations +Section: contrib/doc diff --git a/t/recipes/checks/debian/copyright/dep5/source-copyright-missing-non-free-explanation-unrel/eval/desc b/t/recipes/checks/debian/copyright/dep5/source-copyright-missing-non-free-explanation-unrel/eval/desc new file mode 100644 index 0000000..1d6ed08 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/source-copyright-missing-non-free-explanation-unrel/eval/desc @@ -0,0 +1,4 @@ +Testname: source-copyright-missing-non-free-explanation-unrel +Test-Against: + missing-explanation-for-contrib-or-non-free-package +Check: debian/copyright/dep5 diff --git a/t/recipes/checks/debian/copyright/dep5/source-copyright-missing-non-free-explanation-unrel/eval/hints b/t/recipes/checks/debian/copyright/dep5/source-copyright-missing-non-free-explanation-unrel/eval/hints new file mode 100644 index 0000000..e69de29 diff --git a/t/recipes/checks/debian/copyright/dep5/source-copyright-missing-non-free-explanation/build-spec/debian/copyright b/t/recipes/checks/debian/copyright/dep5/source-copyright-missing-non-free-explanation/build-spec/debian/copyright new file mode 100644 index 0000000..5c38963 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/source-copyright-missing-non-free-explanation/build-spec/debian/copyright @@ -0,0 +1,23 @@ +Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Upstream-Name: Lintian +Upstream-Contact: +Source: http://lintian.debian.org + +Files: * +Copyright: 2009, Russ Allbery +License: GPL-2+ + This program is free software; you may redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + . + This is distributed in the hope that it will be useful, but without + any warranty; without even the implied warranty of merchantability or + fitness for a particular purpose. See the GNU General Public License + for more details. + . + A copy of the GNU General Public License version 2 is available as + /usr/share/common-licenses/GPL-2 in the Debian GNU/Linux distribution + or at http://www.gnu.org/licenses/old-licenses/gpl-2.0.html. + You can also obtain it by writing to the Free Software Foundation, Inc., + 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/t/recipes/checks/debian/copyright/dep5/source-copyright-missing-non-free-explanation/build-spec/fill-values b/t/recipes/checks/debian/copyright/dep5/source-copyright-missing-non-free-explanation/build-spec/fill-values new file mode 100644 index 0000000..0ebd510 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/source-copyright-missing-non-free-explanation/build-spec/fill-values @@ -0,0 +1,4 @@ +Skeleton: upload-native +Testname: source-copyright-missing-non-free-explanation +Description: Test for missing contrib/non-free explanations +Section: contrib/doc diff --git a/t/recipes/checks/debian/copyright/dep5/source-copyright-missing-non-free-explanation/eval/desc b/t/recipes/checks/debian/copyright/dep5/source-copyright-missing-non-free-explanation/eval/desc new file mode 100644 index 0000000..e9487f9 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/source-copyright-missing-non-free-explanation/eval/desc @@ -0,0 +1,2 @@ +Testname: source-copyright-missing-non-free-explanation +Check: debian/copyright/dep5 diff --git a/t/recipes/checks/debian/copyright/dep5/source-copyright-missing-non-free-explanation/eval/hints b/t/recipes/checks/debian/copyright/dep5/source-copyright-missing-non-free-explanation/eval/hints new file mode 100644 index 0000000..4767345 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/source-copyright-missing-non-free-explanation/eval/hints @@ -0,0 +1 @@ +source-copyright-missing-non-free-explanation (source): missing-explanation-for-contrib-or-non-free-package [debian/copyright:1] diff --git a/t/recipes/checks/debian/copyright/dep5/source-copyright-missing-repack-explanation-unrel/build-spec/debian/copyright b/t/recipes/checks/debian/copyright/dep5/source-copyright-missing-repack-explanation-unrel/build-spec/debian/copyright new file mode 100644 index 0000000..6a3aeb6 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/source-copyright-missing-repack-explanation-unrel/build-spec/debian/copyright @@ -0,0 +1,24 @@ +Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Upstream-Name: Lintian +Upstream-Contact: +Source: http://lintian.debian.org +Files-Excluded: dummy + +Files: * +Copyright: 2009, Russ Allbery +License: GPL-2+ + This program is free software; you may redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + . + This is distributed in the hope that it will be useful, but without + any warranty; without even the implied warranty of merchantability or + fitness for a particular purpose. See the GNU General Public License + for more details. + . + A copy of the GNU General Public License version 2 is available as + /usr/share/common-licenses/GPL-2 in the Debian GNU/Linux distribution + or at http://www.gnu.org/licenses/old-licenses/gpl-2.0.html. + You can also obtain it by writing to the Free Software Foundation, Inc., + 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/t/recipes/checks/debian/copyright/dep5/source-copyright-missing-repack-explanation-unrel/build-spec/fill-values b/t/recipes/checks/debian/copyright/dep5/source-copyright-missing-repack-explanation-unrel/build-spec/fill-values new file mode 100644 index 0000000..24f64b0 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/source-copyright-missing-repack-explanation-unrel/build-spec/fill-values @@ -0,0 +1,4 @@ +Testname: source-copyright-missing-repack-explanation-unrel +Skeleton: upload-non-native +Version: 1+dfsg-1 +Description: Test for missing repack explanations (false-positive) diff --git a/t/recipes/checks/debian/copyright/dep5/source-copyright-missing-repack-explanation-unrel/eval/desc b/t/recipes/checks/debian/copyright/dep5/source-copyright-missing-repack-explanation-unrel/eval/desc new file mode 100644 index 0000000..1e95830 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/source-copyright-missing-repack-explanation-unrel/eval/desc @@ -0,0 +1,4 @@ +Testname: source-copyright-missing-repack-explanation-unrel +Test-Against: + missing-explanation-for-repacked-upstream-tarball +Check: debian/copyright/dep5 diff --git a/t/recipes/checks/debian/copyright/dep5/source-copyright-missing-repack-explanation-unrel/eval/hints b/t/recipes/checks/debian/copyright/dep5/source-copyright-missing-repack-explanation-unrel/eval/hints new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/source-copyright-missing-repack-explanation-unrel/eval/hints @@ -0,0 +1 @@ + diff --git a/t/recipes/checks/debian/copyright/dep5/source-copyright-missing-repack-explanation/build-spec/debian/copyright b/t/recipes/checks/debian/copyright/dep5/source-copyright-missing-repack-explanation/build-spec/debian/copyright new file mode 100644 index 0000000..5c38963 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/source-copyright-missing-repack-explanation/build-spec/debian/copyright @@ -0,0 +1,23 @@ +Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Upstream-Name: Lintian +Upstream-Contact: +Source: http://lintian.debian.org + +Files: * +Copyright: 2009, Russ Allbery +License: GPL-2+ + This program is free software; you may redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + . + This is distributed in the hope that it will be useful, but without + any warranty; without even the implied warranty of merchantability or + fitness for a particular purpose. See the GNU General Public License + for more details. + . + A copy of the GNU General Public License version 2 is available as + /usr/share/common-licenses/GPL-2 in the Debian GNU/Linux distribution + or at http://www.gnu.org/licenses/old-licenses/gpl-2.0.html. + You can also obtain it by writing to the Free Software Foundation, Inc., + 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/t/recipes/checks/debian/copyright/dep5/source-copyright-missing-repack-explanation/build-spec/fill-values b/t/recipes/checks/debian/copyright/dep5/source-copyright-missing-repack-explanation/build-spec/fill-values new file mode 100644 index 0000000..9137106 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/source-copyright-missing-repack-explanation/build-spec/fill-values @@ -0,0 +1,4 @@ +Testname: source-copyright-missing-repack-explanation +Skeleton: upload-non-native +Version: 1+dfsg-1 +Description: Test for missing repack explanations diff --git a/t/recipes/checks/debian/copyright/dep5/source-copyright-missing-repack-explanation/eval/desc b/t/recipes/checks/debian/copyright/dep5/source-copyright-missing-repack-explanation/eval/desc new file mode 100644 index 0000000..4721a46 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/source-copyright-missing-repack-explanation/eval/desc @@ -0,0 +1,2 @@ +Testname: source-copyright-missing-repack-explanation +Check: debian/copyright/dep5 diff --git a/t/recipes/checks/debian/copyright/dep5/source-copyright-missing-repack-explanation/eval/hints b/t/recipes/checks/debian/copyright/dep5/source-copyright-missing-repack-explanation/eval/hints new file mode 100644 index 0000000..94889c1 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/source-copyright-missing-repack-explanation/eval/hints @@ -0,0 +1 @@ +source-copyright-missing-repack-explanation (source): missing-explanation-for-repacked-upstream-tarball [debian/copyright:1] diff --git a/t/recipes/checks/debian/copyright/dep5/source-copyright-nodep5/build-spec/debian/copyright b/t/recipes/checks/debian/copyright/dep5/source-copyright-nodep5/build-spec/debian/copyright new file mode 100644 index 0000000..3fcbad9 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/source-copyright-nodep5/build-spec/debian/copyright @@ -0,0 +1,21 @@ +This is not a dep5 copyright file + +Copyright (c) 2013 + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the “Software”), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + . + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + . + THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE. diff --git a/t/recipes/checks/debian/copyright/dep5/source-copyright-nodep5/build-spec/fill-values b/t/recipes/checks/debian/copyright/dep5/source-copyright-nodep5/build-spec/fill-values new file mode 100644 index 0000000..6d211ea --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/source-copyright-nodep5/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: upload-native +Testname: source-copyright-nodep5 +Description: Test for no dep5 source copyright diff --git a/t/recipes/checks/debian/copyright/dep5/source-copyright-nodep5/eval/desc b/t/recipes/checks/debian/copyright/dep5/source-copyright-nodep5/eval/desc new file mode 100644 index 0000000..9701b2b --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/source-copyright-nodep5/eval/desc @@ -0,0 +1,2 @@ +Testname: source-copyright-nodep5 +Check: debian/copyright/dep5 diff --git a/t/recipes/checks/debian/copyright/dep5/source-copyright-nodep5/eval/hints b/t/recipes/checks/debian/copyright/dep5/source-copyright-nodep5/eval/hints new file mode 100644 index 0000000..23dbe21 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/source-copyright-nodep5/eval/hints @@ -0,0 +1 @@ +source-copyright-nodep5 (source): no-dep5-copyright [debian/copyright] diff --git a/t/recipes/checks/debian/copyright/dep5/source-copyright-ood-uri/build-spec/debian/copyright b/t/recipes/checks/debian/copyright/dep5/source-copyright-ood-uri/build-spec/debian/copyright new file mode 100644 index 0000000..f73439f --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/source-copyright-ood-uri/build-spec/debian/copyright @@ -0,0 +1,22 @@ +Format-Specification: http://svn.debian.org/wsvn/dep/web/deps/dep5.mdwn?op=file&rev=135 +Name: Doohickey +Maintainer: J. Random Hacker +Source: http://examples.com/doohickey/source/ + +Files: * +Copyright: 2011 J. Random Hacker +License: GPL-2 + This package is free software; you can redistribute it and/or modify it under + the terms of the GNU General Public License as published by the Free Software + Foundation; version 2 dated June, 1991. + . + This package is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. + . + You should have received a copy of the GNU General Public License along with + this package; if not, write to the Free Software Foundation, Inc., 51 Franklin + St, Fifth Floor, Boston, MA 02110-1301, USA. + . + On Debian systems, the full text of the GNU General Public License version 2 + can be found in the file `/usr/share/common-licenses/GPL-2'. diff --git a/t/recipes/checks/debian/copyright/dep5/source-copyright-ood-uri/build-spec/fill-values b/t/recipes/checks/debian/copyright/dep5/source-copyright-ood-uri/build-spec/fill-values new file mode 100644 index 0000000..b13e28f --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/source-copyright-ood-uri/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: upload-native +Testname: source-copyright-ood-uri +Description: Test for out-of-date DEP 5-like URI diff --git a/t/recipes/checks/debian/copyright/dep5/source-copyright-ood-uri/eval/desc b/t/recipes/checks/debian/copyright/dep5/source-copyright-ood-uri/eval/desc new file mode 100644 index 0000000..030b769 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/source-copyright-ood-uri/eval/desc @@ -0,0 +1,2 @@ +Testname: source-copyright-ood-uri +Check: debian/copyright/dep5 diff --git a/t/recipes/checks/debian/copyright/dep5/source-copyright-ood-uri/eval/hints b/t/recipes/checks/debian/copyright/dep5/source-copyright-ood-uri/eval/hints new file mode 100644 index 0000000..3907382 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/source-copyright-ood-uri/eval/hints @@ -0,0 +1 @@ +source-copyright-ood-uri (source): out-of-date-copyright-format-uri http://svn.debian.org/wsvn/dep/web/deps/dep5.mdwn?op=file&rev=135 [debian/copyright] diff --git a/t/recipes/checks/debian/copyright/dep5/source-copyright-pipe-as-or/build-spec/debian/copyright b/t/recipes/checks/debian/copyright/dep5/source-copyright-pipe-as-or/build-spec/debian/copyright new file mode 100644 index 0000000..31e3563 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/source-copyright-pipe-as-or/build-spec/debian/copyright @@ -0,0 +1,16 @@ +Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Upstream-Name: Doohickey +Upstream-Contact: J. Random Hacker +Source: http://examples.com/doohickey/source/ + +Files: * +Copyright: 2014, somebody1 +License: this | that + +Files: debian/* +Copyright: 2014, somebody1 +License: this|that + this is a valid license short name + +License: this | that + should be "this or that" diff --git a/t/recipes/checks/debian/copyright/dep5/source-copyright-pipe-as-or/build-spec/fill-values b/t/recipes/checks/debian/copyright/dep5/source-copyright-pipe-as-or/build-spec/fill-values new file mode 100644 index 0000000..a5bfa60 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/source-copyright-pipe-as-or/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: upload-native +Testname: source-copyright-pipe-as-or +Description: Test for the pipe symbol being used as an "or" diff --git a/t/recipes/checks/debian/copyright/dep5/source-copyright-pipe-as-or/build-spec/orig/README b/t/recipes/checks/debian/copyright/dep5/source-copyright-pipe-as-or/build-spec/orig/README new file mode 100644 index 0000000..1a9d2ad --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/source-copyright-pipe-as-or/build-spec/orig/README @@ -0,0 +1 @@ +trivial diff --git a/t/recipes/checks/debian/copyright/dep5/source-copyright-pipe-as-or/eval/desc b/t/recipes/checks/debian/copyright/dep5/source-copyright-pipe-as-or/eval/desc new file mode 100644 index 0000000..2ddc75d --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/source-copyright-pipe-as-or/eval/desc @@ -0,0 +1,2 @@ +Testname: source-copyright-pipe-as-or +Check: debian/copyright/dep5 diff --git a/t/recipes/checks/debian/copyright/dep5/source-copyright-pipe-as-or/eval/hints b/t/recipes/checks/debian/copyright/dep5/source-copyright-pipe-as-or/eval/hints new file mode 100644 index 0000000..7ecd5b0 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/source-copyright-pipe-as-or/eval/hints @@ -0,0 +1,5 @@ +source-copyright-pipe-as-or (source): update-debian-copyright 2014 vs CHANGELOG-YEAR [debian/copyright:11] +source-copyright-pipe-as-or (source): space-in-std-shortname-in-dep5-copyright this | that [debian/copyright:8] +source-copyright-pipe-as-or (source): space-in-std-shortname-in-dep5-copyright this | that [debian/copyright:15] +source-copyright-pipe-as-or (source): pipe-symbol-used-as-license-disjunction this | that [debian/copyright:8] +source-copyright-pipe-as-or (source): pipe-symbol-used-as-license-disjunction this | that [debian/copyright:15] diff --git a/t/recipes/checks/debian/copyright/dep5/source-copyright-pipe-as-or/eval/post-test b/t/recipes/checks/debian/copyright/dep5/source-copyright-pipe-as-or/eval/post-test new file mode 100644 index 0000000..feeacfc --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/source-copyright-pipe-as-or/eval/post-test @@ -0,0 +1 @@ +s/vs [0-9]+/vs CHANGELOG-YEAR/ diff --git a/t/recipes/checks/debian/copyright/dep5/source-copyright-source-files-excluded/build-spec/debian/copyright b/t/recipes/checks/debian/copyright/dep5/source-copyright-source-files-excluded/build-spec/debian/copyright new file mode 100644 index 0000000..82dfe2c --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/source-copyright-source-files-excluded/build-spec/debian/copyright @@ -0,0 +1,29 @@ +Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Files-Excluded: exclude-this + exclude-dir + */exclude-dir + exclude-dir-2/* + .* + */js/jquery.js + lib/* + debian/* + debian/copyright + recreated-file + +Files: * +Copyright: 2011 J. Random Hacker +License: GPL-2 + This package is free software; you can redistribute it and/or modify it under + the terms of the GNU General Public License as published by the Free Software + Foundation; version 2 dated June, 1991. + . + This package is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. + . + You should have received a copy of the GNU General Public License along with + this package; if not, write to the Free Software Foundation, Inc., 51 Franklin + St, Fifth Floor, Boston, MA 02110-1301, USA. + . + On Debian systems, the full text of the GNU General Public License version 2 + can be found in the file `/usr/share/common-licenses/GPL-2'. diff --git a/t/recipes/checks/debian/copyright/dep5/source-copyright-source-files-excluded/build-spec/debian/patches/0001-recreate-file.diff b/t/recipes/checks/debian/copyright/dep5/source-copyright-source-files-excluded/build-spec/debian/patches/0001-recreate-file.diff new file mode 100644 index 0000000..a40e2b1 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/source-copyright-source-files-excluded/build-spec/debian/patches/0001-recreate-file.diff @@ -0,0 +1,6 @@ +Re-create a file. + +--- /dev/null ++++ debian/recreated-file +@@ -0,0 +1 @@ ++This file was created via a patch system and should be ignored. diff --git a/t/recipes/checks/debian/copyright/dep5/source-copyright-source-files-excluded/build-spec/debian/patches/series b/t/recipes/checks/debian/copyright/dep5/source-copyright-source-files-excluded/build-spec/debian/patches/series new file mode 100644 index 0000000..ab898ca --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/source-copyright-source-files-excluded/build-spec/debian/patches/series @@ -0,0 +1 @@ +0001-recreate-file.diff diff --git a/t/recipes/checks/debian/copyright/dep5/source-copyright-source-files-excluded/build-spec/fill-values b/t/recipes/checks/debian/copyright/dep5/source-copyright-source-files-excluded/build-spec/fill-values new file mode 100644 index 0000000..6cef61f --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/source-copyright-source-files-excluded/build-spec/fill-values @@ -0,0 +1,4 @@ +Testname: source-copyright-source-files-excluded +Skeleton: upload-non-native +Version: 1.0+dfsg-1 +Description: Test for files listed in Files-Excluded diff --git a/t/recipes/checks/debian/copyright/dep5/source-copyright-source-files-excluded/build-spec/orig/.matches b/t/recipes/checks/debian/copyright/dep5/source-copyright-source-files-excluded/build-spec/orig/.matches new file mode 100644 index 0000000..e69de29 diff --git a/t/recipes/checks/debian/copyright/dep5/source-copyright-source-files-excluded/build-spec/orig/exclude-dir-2/filename b/t/recipes/checks/debian/copyright/dep5/source-copyright-source-files-excluded/build-spec/orig/exclude-dir-2/filename new file mode 100644 index 0000000..e69de29 diff --git a/t/recipes/checks/debian/copyright/dep5/source-copyright-source-files-excluded/build-spec/orig/exclude-dir/filename b/t/recipes/checks/debian/copyright/dep5/source-copyright-source-files-excluded/build-spec/orig/exclude-dir/filename new file mode 100644 index 0000000..e69de29 diff --git a/t/recipes/checks/debian/copyright/dep5/source-copyright-source-files-excluded/build-spec/orig/exclude-dir/filename-2 b/t/recipes/checks/debian/copyright/dep5/source-copyright-source-files-excluded/build-spec/orig/exclude-dir/filename-2 new file mode 100644 index 0000000..e69de29 diff --git a/t/recipes/checks/debian/copyright/dep5/source-copyright-source-files-excluded/build-spec/orig/exclude-this b/t/recipes/checks/debian/copyright/dep5/source-copyright-source-files-excluded/build-spec/orig/exclude-this new file mode 100644 index 0000000..e69de29 diff --git a/t/recipes/checks/debian/copyright/dep5/source-copyright-source-files-excluded/build-spec/orig/foolib/false-positive b/t/recipes/checks/debian/copyright/dep5/source-copyright-source-files-excluded/build-spec/orig/foolib/false-positive new file mode 100644 index 0000000..e69de29 diff --git a/t/recipes/checks/debian/copyright/dep5/source-copyright-source-files-excluded/eval/desc b/t/recipes/checks/debian/copyright/dep5/source-copyright-source-files-excluded/eval/desc new file mode 100644 index 0000000..2605614 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/source-copyright-source-files-excluded/eval/desc @@ -0,0 +1,4 @@ +Testname: source-copyright-source-files-excluded +Test-Against: + files-excluded-without-copyright-format-1.0 +Check: debian/copyright/dep5 diff --git a/t/recipes/checks/debian/copyright/dep5/source-copyright-source-files-excluded/eval/hints b/t/recipes/checks/debian/copyright/dep5/source-copyright-source-files-excluded/eval/hints new file mode 100644 index 0000000..2f9d869 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/source-copyright-source-files-excluded/eval/hints @@ -0,0 +1,5 @@ +source-copyright-source-files-excluded (source): source-ships-excluded-file exclude-this [debian/copyright:2] +source-copyright-source-files-excluded (source): source-ships-excluded-file exclude-dir/filename-2 [debian/copyright:2] +source-copyright-source-files-excluded (source): source-ships-excluded-file exclude-dir/filename [debian/copyright:2] +source-copyright-source-files-excluded (source): source-ships-excluded-file exclude-dir-2/filename [debian/copyright:2] +source-copyright-source-files-excluded (source): source-ships-excluded-file .matches [debian/copyright:2] diff --git a/t/recipes/checks/debian/copyright/dep5/source-copyright-undefined/build-spec/debian/copyright b/t/recipes/checks/debian/copyright/dep5/source-copyright-undefined/build-spec/debian/copyright new file mode 100644 index 0000000..8ff4ab0 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/source-copyright-undefined/build-spec/debian/copyright @@ -0,0 +1,56 @@ +Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Upstream-Name: Doohickey +Upstream-Contact: J. Random Hacker +Source: http://examples.com/doohickey/source/ + +Files: * +Copyright: 2014, somebody1 +License: Fixme + Fixme-license text + + +Files: debian/* +Copyright: 2015, somebody2 +License: unknown + Fixme + +Files: debian/a +Copyright: 2016, somebody2 +License: unknow + Fixme + +Files: debian/b +Copyright: 2014, somebody2 +License: todo + Fixme + +Files: debian/c +comment: some spacing +Copyright: 2017, somebody2 +License: - + Fixme + +Files: debian/d +comment: some spacing +Copyright: 2014, somebody2 +License: - + Fixme + +Files: debian/e +Comment: too many false positive with space +Copyright: 2014, somebody2 +License: undefined license + Fixme + +Files: debian/f +comment: some spacing +Copyright: 2014, somebody2 +License: undefined + Fixme + +Files: debian/g +comment: false positive +Copyright: 2014, somebody2 +License: common public license - v 1.0 + Fixme + diff --git a/t/recipes/checks/debian/copyright/dep5/source-copyright-undefined/build-spec/debian/plus+file b/t/recipes/checks/debian/copyright/dep5/source-copyright-undefined/build-spec/debian/plus+file new file mode 100644 index 0000000..e69de29 diff --git a/t/recipes/checks/debian/copyright/dep5/source-copyright-undefined/build-spec/fill-values b/t/recipes/checks/debian/copyright/dep5/source-copyright-undefined/build-spec/fill-values new file mode 100644 index 0000000..9588707 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/source-copyright-undefined/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: upload-native +Testname: source-copyright-undefined +Description: Test for fixme/todo/unknown diff --git a/t/recipes/checks/debian/copyright/dep5/source-copyright-undefined/eval/desc b/t/recipes/checks/debian/copyright/dep5/source-copyright-undefined/eval/desc new file mode 100644 index 0000000..f0c691e --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/source-copyright-undefined/eval/desc @@ -0,0 +1,2 @@ +Testname: source-copyright-undefined +Check: debian/copyright/dep5 diff --git a/t/recipes/checks/debian/copyright/dep5/source-copyright-undefined/eval/hints b/t/recipes/checks/debian/copyright/dep5/source-copyright-undefined/eval/hints new file mode 100644 index 0000000..eb13a9f --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/source-copyright-undefined/eval/hints @@ -0,0 +1,19 @@ +source-copyright-undefined (source): update-debian-copyright 2017 vs CHANGELOG-YEAR [debian/copyright:29] +source-copyright-undefined (source): superfluous-file-pattern debian/g [debian/copyright:51] +source-copyright-undefined (source): superfluous-file-pattern debian/f [debian/copyright:45] +source-copyright-undefined (source): superfluous-file-pattern debian/e [debian/copyright:39] +source-copyright-undefined (source): superfluous-file-pattern debian/d [debian/copyright:33] +source-copyright-undefined (source): superfluous-file-pattern debian/c [debian/copyright:27] +source-copyright-undefined (source): superfluous-file-pattern debian/b [debian/copyright:22] +source-copyright-undefined (source): superfluous-file-pattern debian/a [debian/copyright:17] +source-copyright-undefined (source): superfluous-file-pattern * [debian/copyright:6] +source-copyright-undefined (source): space-in-std-shortname-in-dep5-copyright undefined license [debian/copyright:42] +source-copyright-undefined (source): space-in-std-shortname-in-dep5-copyright common public license - v 1.0 [debian/copyright:54] +source-copyright-undefined (source): license-problem-undefined-license unknown [debian/copyright:14] +source-copyright-undefined (source): license-problem-undefined-license unknow [debian/copyright:19] +source-copyright-undefined (source): license-problem-undefined-license undefined license [debian/copyright:42] +source-copyright-undefined (source): license-problem-undefined-license undefined [debian/copyright:48] +source-copyright-undefined (source): license-problem-undefined-license todo [debian/copyright:24] +source-copyright-undefined (source): license-problem-undefined-license fixme [debian/copyright:8] +source-copyright-undefined (source): license-problem-undefined-license - [debian/copyright:36] +source-copyright-undefined (source): license-problem-undefined-license - [debian/copyright:30] diff --git a/t/recipes/checks/debian/copyright/dep5/source-copyright-undefined/eval/post-test b/t/recipes/checks/debian/copyright/dep5/source-copyright-undefined/eval/post-test new file mode 100644 index 0000000..feeacfc --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/source-copyright-undefined/eval/post-test @@ -0,0 +1 @@ +s/vs [0-9]+/vs CHANGELOG-YEAR/ diff --git a/t/recipes/checks/debian/copyright/dep5/source-copyright-unique/build-spec/debian/copyright b/t/recipes/checks/debian/copyright/dep5/source-copyright-unique/build-spec/debian/copyright new file mode 100644 index 0000000..1f88946 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/source-copyright-unique/build-spec/debian/copyright @@ -0,0 +1,36 @@ +Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Upstream-Name: Doohickey +Upstream-Contact: J. Random Hacker +Source: http://examples.com/doohickey/source/ +License: some-license + some license + +Files: * +Copyright: 2014, somebody1 +License: some-license + +Files: code +Copyright: none +License: public-domain + this work is PD because I say so + +Files: code2 +Copyright: none +License: public-domain + this work is also in the public domain + +Files: debian/* +Copyright: 2014, somebody1 +License: other-license + this is a valid license short name + +Files: NEWS +Copyright: 2014, somebody1 +License: other-license + this is a valid license short name 3 + +License: other-license + other-license + +License: other-license + other-license 2 diff --git a/t/recipes/checks/debian/copyright/dep5/source-copyright-unique/build-spec/fill-values b/t/recipes/checks/debian/copyright/dep5/source-copyright-unique/build-spec/fill-values new file mode 100644 index 0000000..f730d09 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/source-copyright-unique/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: upload-native +Testname: source-copyright-unique +Description: Test if standalone paragraph name are unique diff --git a/t/recipes/checks/debian/copyright/dep5/source-copyright-unique/build-spec/orig/NEWS b/t/recipes/checks/debian/copyright/dep5/source-copyright-unique/build-spec/orig/NEWS new file mode 100644 index 0000000..8a7f3d9 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/source-copyright-unique/build-spec/orig/NEWS @@ -0,0 +1 @@ +no news \ No newline at end of file diff --git a/t/recipes/checks/debian/copyright/dep5/source-copyright-unique/build-spec/orig/README b/t/recipes/checks/debian/copyright/dep5/source-copyright-unique/build-spec/orig/README new file mode 100644 index 0000000..1a9d2ad --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/source-copyright-unique/build-spec/orig/README @@ -0,0 +1 @@ +trivial diff --git a/t/recipes/checks/debian/copyright/dep5/source-copyright-unique/build-spec/orig/code b/t/recipes/checks/debian/copyright/dep5/source-copyright-unique/build-spec/orig/code new file mode 100644 index 0000000..1e2b25a --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/source-copyright-unique/build-spec/orig/code @@ -0,0 +1 @@ +simple 3rd party code diff --git a/t/recipes/checks/debian/copyright/dep5/source-copyright-unique/build-spec/orig/code2 b/t/recipes/checks/debian/copyright/dep5/source-copyright-unique/build-spec/orig/code2 new file mode 100644 index 0000000..31d7114 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/source-copyright-unique/build-spec/orig/code2 @@ -0,0 +1 @@ +another simple 3rd party code diff --git a/t/recipes/checks/debian/copyright/dep5/source-copyright-unique/eval/desc b/t/recipes/checks/debian/copyright/dep5/source-copyright-unique/eval/desc new file mode 100644 index 0000000..68f492a --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/source-copyright-unique/eval/desc @@ -0,0 +1,2 @@ +Testname: source-copyright-unique +Check: debian/copyright/dep5 diff --git a/t/recipes/checks/debian/copyright/dep5/source-copyright-unique/eval/hints b/t/recipes/checks/debian/copyright/dep5/source-copyright-unique/eval/hints new file mode 100644 index 0000000..9474fab --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/source-copyright-unique/eval/hints @@ -0,0 +1,6 @@ +source-copyright-unique (source): update-debian-copyright 2014 vs CHANGELOG-YEAR [debian/copyright:23] +source-copyright-unique (source): unused-license-paragraph-in-dep5-copyright other-license [debian/copyright:35] +source-copyright-unique (source): unused-license-paragraph-in-dep5-copyright other-license [debian/copyright:32] +source-copyright-unique (source): dep5-file-paragraph-references-header-paragraph some-license [debian/copyright:8] +source-copyright-unique (source): dep5-copyright-license-name-not-unique other-license [debian/copyright:35] +source-copyright-unique (source): dep5-copyright-license-name-not-unique other-license [debian/copyright:32] diff --git a/t/recipes/checks/debian/copyright/dep5/source-copyright-unique/eval/post-test b/t/recipes/checks/debian/copyright/dep5/source-copyright-unique/eval/post-test new file mode 100644 index 0000000..feeacfc --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/source-copyright-unique/eval/post-test @@ -0,0 +1 @@ +s/vs [0-9]+/vs CHANGELOG-YEAR/ diff --git a/t/recipes/checks/debian/copyright/dep5/source-copyright-unknown-uri/build-spec/debian/copyright b/t/recipes/checks/debian/copyright/dep5/source-copyright-unknown-uri/build-spec/debian/copyright new file mode 100644 index 0000000..63e0f4b --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/source-copyright-unknown-uri/build-spec/debian/copyright @@ -0,0 +1,22 @@ +Format-Specification: http://bzr.debian.org/loggerhead/dep/dep5/trunk/annotate/110/dep5.mdwn +Upstream-Name: Doohickey +Upstream-Contact: J. Random Hacker +Source: http://examples.com/doohickey/source/ + +Files: * +Copyright: 2011 J. Random Hacker +License: GPL-2 + This package is free software; you can redistribute it and/or modify it under + the terms of the GNU General Public License as published by the Free Software + Foundation; version 2 dated June, 1991. + . + This package is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. + . + You should have received a copy of the GNU General Public License along with + this package; if not, write to the Free Software Foundation, Inc., 51 Franklin + St, Fifth Floor, Boston, MA 02110-1301, USA. + . + On Debian systems, the full text of the GNU General Public License version 2 + can be found in the file `/usr/share/common-licenses/GPL-2'. diff --git a/t/recipes/checks/debian/copyright/dep5/source-copyright-unknown-uri/build-spec/fill-values b/t/recipes/checks/debian/copyright/dep5/source-copyright-unknown-uri/build-spec/fill-values new file mode 100644 index 0000000..a8c3d18 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/source-copyright-unknown-uri/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: upload-native +Testname: source-copyright-unknown-uri +Description: Test for unknown DEP 5-like URI diff --git a/t/recipes/checks/debian/copyright/dep5/source-copyright-unknown-uri/eval/desc b/t/recipes/checks/debian/copyright/dep5/source-copyright-unknown-uri/eval/desc new file mode 100644 index 0000000..19eb061 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/source-copyright-unknown-uri/eval/desc @@ -0,0 +1,2 @@ +Testname: source-copyright-unknown-uri +Check: debian/copyright/dep5 diff --git a/t/recipes/checks/debian/copyright/dep5/source-copyright-unknown-uri/eval/hints b/t/recipes/checks/debian/copyright/dep5/source-copyright-unknown-uri/eval/hints new file mode 100644 index 0000000..eb7e817 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/source-copyright-unknown-uri/eval/hints @@ -0,0 +1 @@ +source-copyright-unknown-uri (source): unknown-copyright-format-uri http://bzr.debian.org/loggerhead/dep/dep5/trunk/annotate/110/dep5.mdwn [debian/copyright] diff --git a/t/recipes/checks/debian/copyright/dep5/source-copyright-unversioned-uri/build-spec/debian/copyright b/t/recipes/checks/debian/copyright/dep5/source-copyright-unversioned-uri/build-spec/debian/copyright new file mode 100644 index 0000000..cf66541 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/source-copyright-unversioned-uri/build-spec/debian/copyright @@ -0,0 +1,22 @@ +Format: http://dep.debian.net/deps/dep5/ +Upstream-Name: Doohickey +Upstream-Contact: J. Random Hacker +Source: http://examples.com/doohickey/source/ + +Files: * +Copyright: 2011 J. Random Hacker +License: GPL-2 + This package is free software; you can redistribute it and/or modify it under + the terms of the GNU General Public License as published by the Free Software + Foundation; version 2 dated June, 1991. + . + This package is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. + . + You should have received a copy of the GNU General Public License along with + this package; if not, write to the Free Software Foundation, Inc., 51 Franklin + St, Fifth Floor, Boston, MA 02110-1301, USA. + . + On Debian systems, the full text of the GNU General Public License version 2 + can be found in the file `/usr/share/common-licenses/GPL-2'. diff --git a/t/recipes/checks/debian/copyright/dep5/source-copyright-unversioned-uri/build-spec/fill-values b/t/recipes/checks/debian/copyright/dep5/source-copyright-unversioned-uri/build-spec/fill-values new file mode 100644 index 0000000..d6c7346 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/source-copyright-unversioned-uri/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: upload-native +Testname: source-copyright-unversioned-uri +Description: Test for unversioned DEP 5-like URI diff --git a/t/recipes/checks/debian/copyright/dep5/source-copyright-unversioned-uri/eval/desc b/t/recipes/checks/debian/copyright/dep5/source-copyright-unversioned-uri/eval/desc new file mode 100644 index 0000000..0ac0fed --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/source-copyright-unversioned-uri/eval/desc @@ -0,0 +1,2 @@ +Testname: source-copyright-unversioned-uri +Check: debian/copyright/dep5 diff --git a/t/recipes/checks/debian/copyright/dep5/source-copyright-unversioned-uri/eval/hints b/t/recipes/checks/debian/copyright/dep5/source-copyright-unversioned-uri/eval/hints new file mode 100644 index 0000000..24233ca --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/source-copyright-unversioned-uri/eval/hints @@ -0,0 +1 @@ +source-copyright-unversioned-uri (source): unversioned-copyright-format-uri http://dep.debian.net/deps/dep5/ [debian/copyright] diff --git a/t/recipes/checks/debian/copyright/dep5/source-copyright-wiki-uri/build-spec/debian/copyright b/t/recipes/checks/debian/copyright/dep5/source-copyright-wiki-uri/build-spec/debian/copyright new file mode 100644 index 0000000..4b8947c --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/source-copyright-wiki-uri/build-spec/debian/copyright @@ -0,0 +1,22 @@ +Format-Specification: http://wiki.debian.org/Proposals/CopyrightFormat?action=recall&rev=196 +Upstream-Name: Doohickey +Upstream-Maintainer: J. Random Hacker +Upstream-Source: http://examples.com/doohickey/source/ + +Files: * +Copyright: 2011 J. Random Hacker +License: GPL-2 + This package is free software; you can redistribute it and/or modify it under + the terms of the GNU General Public License as published by the Free Software + Foundation; version 2 dated June, 1991. + . + This package is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. + . + You should have received a copy of the GNU General Public License along with + this package; if not, write to the Free Software Foundation, Inc., 51 Franklin + St, Fifth Floor, Boston, MA 02110-1301, USA. + . + On Debian systems, the full text of the GNU General Public License version 2 + can be found in the file `/usr/share/common-licenses/GPL-2'. diff --git a/t/recipes/checks/debian/copyright/dep5/source-copyright-wiki-uri/build-spec/fill-values b/t/recipes/checks/debian/copyright/dep5/source-copyright-wiki-uri/build-spec/fill-values new file mode 100644 index 0000000..c25663d --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/source-copyright-wiki-uri/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: upload-native +Testname: source-copyright-wiki-uri +Description: Test for wiki.debian.org DEP 5-like URI diff --git a/t/recipes/checks/debian/copyright/dep5/source-copyright-wiki-uri/eval/desc b/t/recipes/checks/debian/copyright/dep5/source-copyright-wiki-uri/eval/desc new file mode 100644 index 0000000..62b154c --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/source-copyright-wiki-uri/eval/desc @@ -0,0 +1,2 @@ +Testname: source-copyright-wiki-uri +Check: debian/copyright/dep5 diff --git a/t/recipes/checks/debian/copyright/dep5/source-copyright-wiki-uri/eval/hints b/t/recipes/checks/debian/copyright/dep5/source-copyright-wiki-uri/eval/hints new file mode 100644 index 0000000..11c2375 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/source-copyright-wiki-uri/eval/hints @@ -0,0 +1 @@ +source-copyright-wiki-uri (source): wiki-copyright-format-uri http://wiki.debian.org/Proposals/CopyrightFormat?action=recall&rev=196 [debian/copyright] diff --git a/t/recipes/checks/debian/copyright/dep5/source-copyright-wildcard-matching/build-spec/debian/copyright b/t/recipes/checks/debian/copyright/dep5/source-copyright-wildcard-matching/build-spec/debian/copyright new file mode 100644 index 0000000..e9828d4 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/source-copyright-wildcard-matching/build-spec/debian/copyright @@ -0,0 +1,43 @@ +Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Upstream-Name: Doohickey +Upstream-Contact: J. Random Hacker +Source: http://examples.com/doohickey/source/ + +Files: file?with?commas + deb* +Copyright: 2014, somebody1 +Comment: this paragraph is superfluous because all files are matched + by the following paragraphs +License: mylicense + Fixme + +Files: i-do-not-exist +Copyright: 2014, somebody1 +License: mylicense-1 + Fixme + +Files: invalid-escape\n +Copyright: 2014, somebody1 +License: mylicense-2 + Fixme + +Files: debian/* +Copyright: 2014, somebody1 +License: mylicense-3 + Fixme + +Files: + file,with,commas +Copyright: 2014, somebody1 +Comment: this paragraph starts with a newline and ends with a space +License: mylicense-4 + Fixme + +Files: rare-filenames/01-file-with-(something-in-parenthesis).png + rare-filenames/02-or-perhaps-only-one-{-which-causes-a-compile-failure.png + rare-filenames/03-even-]-is-not-safe.png + rare-filenames/04-Perhaps-even-|-will-cause-problems.png + rare-filenames/05-Lets-not-forget-^-and-$-for-added-fun.png +Copyright: 2014, somebody1 +License: mylicense-5 + Fixme diff --git a/t/recipes/checks/debian/copyright/dep5/source-copyright-wildcard-matching/build-spec/fill-values b/t/recipes/checks/debian/copyright/dep5/source-copyright-wildcard-matching/build-spec/fill-values new file mode 100644 index 0000000..4861b6c --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/source-copyright-wildcard-matching/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: upload-native +Testname: source-copyright-wildcard-matching +Description: Test whether the Files wildcards match all files in the source diff --git a/t/recipes/checks/debian/copyright/dep5/source-copyright-wildcard-matching/build-spec/orig/COPYING b/t/recipes/checks/debian/copyright/dep5/source-copyright-wildcard-matching/build-spec/orig/COPYING new file mode 100644 index 0000000..421376d --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/source-copyright-wildcard-matching/build-spec/orig/COPYING @@ -0,0 +1 @@ +dummy diff --git a/t/recipes/checks/debian/copyright/dep5/source-copyright-wildcard-matching/build-spec/orig/COPYING.CC-BY-SA-3.0 b/t/recipes/checks/debian/copyright/dep5/source-copyright-wildcard-matching/build-spec/orig/COPYING.CC-BY-SA-3.0 new file mode 100644 index 0000000..421376d --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/source-copyright-wildcard-matching/build-spec/orig/COPYING.CC-BY-SA-3.0 @@ -0,0 +1 @@ +dummy diff --git a/t/recipes/checks/debian/copyright/dep5/source-copyright-wildcard-matching/build-spec/orig/LICENSE b/t/recipes/checks/debian/copyright/dep5/source-copyright-wildcard-matching/build-spec/orig/LICENSE new file mode 100644 index 0000000..421376d --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/source-copyright-wildcard-matching/build-spec/orig/LICENSE @@ -0,0 +1 @@ +dummy diff --git a/t/recipes/checks/debian/copyright/dep5/source-copyright-wildcard-matching/build-spec/orig/file,with,commas b/t/recipes/checks/debian/copyright/dep5/source-copyright-wildcard-matching/build-spec/orig/file,with,commas new file mode 100644 index 0000000..e69de29 diff --git a/t/recipes/checks/debian/copyright/dep5/source-copyright-wildcard-matching/build-spec/orig/i-have-no-copyright-information b/t/recipes/checks/debian/copyright/dep5/source-copyright-wildcard-matching/build-spec/orig/i-have-no-copyright-information new file mode 100644 index 0000000..e69de29 diff --git a/t/recipes/checks/debian/copyright/dep5/source-copyright-wildcard-matching/build-spec/orig/rare-filenames/01-file-with-(something-in-parenthesis).png b/t/recipes/checks/debian/copyright/dep5/source-copyright-wildcard-matching/build-spec/orig/rare-filenames/01-file-with-(something-in-parenthesis).png new file mode 100644 index 0000000..e69de29 diff --git a/t/recipes/checks/debian/copyright/dep5/source-copyright-wildcard-matching/build-spec/orig/rare-filenames/02-or-perhaps-only-one-{-which-causes-a-compile-failure.png b/t/recipes/checks/debian/copyright/dep5/source-copyright-wildcard-matching/build-spec/orig/rare-filenames/02-or-perhaps-only-one-{-which-causes-a-compile-failure.png new file mode 100644 index 0000000..e69de29 diff --git a/t/recipes/checks/debian/copyright/dep5/source-copyright-wildcard-matching/build-spec/orig/rare-filenames/03-even-]-is-not-safe.png b/t/recipes/checks/debian/copyright/dep5/source-copyright-wildcard-matching/build-spec/orig/rare-filenames/03-even-]-is-not-safe.png new file mode 100644 index 0000000..e69de29 diff --git a/t/recipes/checks/debian/copyright/dep5/source-copyright-wildcard-matching/build-spec/orig/rare-filenames/04-Perhaps-even-|-will-cause-problems.png b/t/recipes/checks/debian/copyright/dep5/source-copyright-wildcard-matching/build-spec/orig/rare-filenames/04-Perhaps-even-|-will-cause-problems.png new file mode 100644 index 0000000..e69de29 diff --git a/t/recipes/checks/debian/copyright/dep5/source-copyright-wildcard-matching/build-spec/orig/rare-filenames/05-Lets-not-forget-^-and-$-for-added-fun.png b/t/recipes/checks/debian/copyright/dep5/source-copyright-wildcard-matching/build-spec/orig/rare-filenames/05-Lets-not-forget-^-and-$-for-added-fun.png new file mode 100644 index 0000000..e69de29 diff --git a/t/recipes/checks/debian/copyright/dep5/source-copyright-wildcard-matching/eval/desc b/t/recipes/checks/debian/copyright/dep5/source-copyright-wildcard-matching/eval/desc new file mode 100644 index 0000000..660d288 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/source-copyright-wildcard-matching/eval/desc @@ -0,0 +1,2 @@ +Testname: source-copyright-wildcard-matching +Check: debian/copyright/dep5 diff --git a/t/recipes/checks/debian/copyright/dep5/source-copyright-wildcard-matching/eval/hints b/t/recipes/checks/debian/copyright/dep5/source-copyright-wildcard-matching/eval/hints new file mode 100644 index 0000000..2fc8b34 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/source-copyright-wildcard-matching/eval/hints @@ -0,0 +1,7 @@ +source-copyright-wildcard-matching (source): update-debian-copyright 2014 vs CHANGELOG-YEAR [debian/copyright:25] +source-copyright-wildcard-matching (source): superfluous-file-pattern invalid-escape\n [debian/copyright:19] +source-copyright-wildcard-matching (source): superfluous-file-pattern i-do-not-exist [debian/copyright:14] +source-copyright-wildcard-matching (source): superfluous-file-pattern file?with?commas [debian/copyright:6] +source-copyright-wildcard-matching (source): superfluous-file-pattern deb* [debian/copyright:6] +source-copyright-wildcard-matching (source): invalid-escape-sequence-in-dep5-copyright \n [debian/copyright:19] +source-copyright-wildcard-matching (source): file-without-copyright-information i-have-no-copyright-information [debian/copyright] diff --git a/t/recipes/checks/debian/copyright/dep5/source-copyright-wildcard-matching/eval/post-test b/t/recipes/checks/debian/copyright/dep5/source-copyright-wildcard-matching/eval/post-test new file mode 100644 index 0000000..feeacfc --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/source-copyright-wildcard-matching/eval/post-test @@ -0,0 +1 @@ +s/vs [0-9]+/vs CHANGELOG-YEAR/ diff --git a/t/recipes/checks/debian/copyright/dep5/spelling-general/build-spec/debian/changelog.in b/t/recipes/checks/debian/copyright/dep5/spelling-general/build-spec/debian/changelog.in new file mode 100644 index 0000000..2d380f5 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/spelling-general/build-spec/debian/changelog.in @@ -0,0 +1,13 @@ +[% $source %] ([% $version %]) unstable; urgency=low + + * Lintian Test Suite. + * Test: [% $testname %] + + * Suppress "should close ITP bug" messages. (Closes: #123456) + * This line has a speling error. + - This line has the same speling error, but we should only + get one tag for it. + * Corrected spelling: abov -> above. + * Corrected typo: abov -> above. + + -- [% $author %] [% $date %] diff --git a/t/recipes/checks/debian/copyright/dep5/spelling-general/build-spec/debian/copyright b/t/recipes/checks/debian/copyright/dep5/spelling-general/build-spec/debian/copyright new file mode 100644 index 0000000..30cbe5c --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/spelling-general/build-spec/debian/copyright @@ -0,0 +1,21 @@ +This duplicate duplicate word should not trigger. (re. #897402) + +This is part of the testsuite of lintian. See the file debian/copyright +in the lintian source directory for more details. + +Insofar as this is copyrightable, it is: + + Copyright 2010 Russ Allbery + +This text should not generate a spelling error for "ment": + + computer software documentation," as such terms are used in + 48 C.F.R. 12.212 (SEPT 1995) and is provided to the U.S. Govern- + ment only as a commercial end item. Consistent with 48 C.F.R. + 12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4 (JUNE 1995), + +But deafult is still a spelling error. + +This text should not generate a spelling error for the duplicate "a" (re. #844166) + + following Attribution Information: (a) a copyright notice including the name diff --git a/t/recipes/checks/debian/copyright/dep5/spelling-general/build-spec/debian/doc-base b/t/recipes/checks/debian/copyright/dep5/spelling-general/build-spec/debian/doc-base new file mode 100644 index 0000000..3839a9b --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/spelling-general/build-spec/debian/doc-base @@ -0,0 +1,9 @@ +Document: spelling-general +Title: Check for debian doc-base spelling errors +Author: Russ Allbery +Abstract: This control file exercises, picky, speling error checks for + Debian doc-base files, such as meta-package. +Section: Programming + +Format: text +Files: /usr/share/doc/spelling-general/copyright diff --git a/t/recipes/checks/debian/copyright/dep5/spelling-general/build-spec/debian/patches/add-readme b/t/recipes/checks/debian/copyright/dep5/spelling-general/build-spec/debian/patches/add-readme new file mode 100644 index 0000000..b1647ba --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/spelling-general/build-spec/debian/patches/add-readme @@ -0,0 +1,8 @@ +This is a deliberate speling error. duplicate + +duplicate + +--- upstream.orig/README ++++ upstream/README +@@ -0,0 +1 @@ ++Added by patch system. diff --git a/t/recipes/checks/debian/copyright/dep5/spelling-general/build-spec/debian/patches/nonrel b/t/recipes/checks/debian/copyright/dep5/spelling-general/build-spec/debian/patches/nonrel new file mode 100644 index 0000000..48e7740 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/spelling-general/build-spec/debian/patches/nonrel @@ -0,0 +1,6 @@ +This is a deliberate speling error. (false positive; description mentions typo) + +--- upstream.orig/nonrel ++++ upstream/nonrel +@@ -0,0 +1 @@ ++Added by patch system. diff --git a/t/recipes/checks/debian/copyright/dep5/spelling-general/build-spec/debian/patches/series b/t/recipes/checks/debian/copyright/dep5/spelling-general/build-spec/debian/patches/series new file mode 100644 index 0000000..0bfb03d --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/spelling-general/build-spec/debian/patches/series @@ -0,0 +1,3 @@ +add-readme +spelling +nonrel diff --git a/t/recipes/checks/debian/copyright/dep5/spelling-general/build-spec/debian/patches/spelling b/t/recipes/checks/debian/copyright/dep5/spelling-general/build-spec/debian/patches/spelling new file mode 100644 index 0000000..29b9cfd --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/spelling-general/build-spec/debian/patches/spelling @@ -0,0 +1,6 @@ +This is a deliberate speling error. (false positive; filename match) + +--- upstream.orig/spelling ++++ upstream/spelling +@@ -0,0 +1 @@ ++Added by patch system. diff --git a/t/recipes/checks/debian/copyright/dep5/spelling-general/build-spec/fill-values b/t/recipes/checks/debian/copyright/dep5/spelling-general/build-spec/fill-values new file mode 100644 index 0000000..1c8c790 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/spelling-general/build-spec/fill-values @@ -0,0 +1,4 @@ +Testname: spelling-general +Skeleton: upload-non-native +Source-Format: 3.0 (quilt) +Description: General checks for spelling errors diff --git a/t/recipes/checks/debian/copyright/dep5/spelling-general/eval/desc b/t/recipes/checks/debian/copyright/dep5/spelling-general/eval/desc new file mode 100644 index 0000000..bb19368 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/spelling-general/eval/desc @@ -0,0 +1,2 @@ +Testname: spelling-general +Check: debian/copyright/dep5 diff --git a/t/recipes/checks/debian/copyright/dep5/spelling-general/eval/hints b/t/recipes/checks/debian/copyright/dep5/spelling-general/eval/hints new file mode 100644 index 0000000..6ec43c5 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/spelling-general/eval/hints @@ -0,0 +1 @@ +spelling-general (source): no-dep5-copyright [debian/copyright] diff --git a/t/recipes/checks/debian/copyright/dep5/tab-in-license-text/build-spec/debian/copyright b/t/recipes/checks/debian/copyright/dep5/tab-in-license-text/build-spec/debian/copyright new file mode 100644 index 0000000..b6f6c00 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/tab-in-license-text/build-spec/debian/copyright @@ -0,0 +1,35 @@ +Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Upstream-Name: Lintian +Upstream-Contact: +Source: http://lintian.debian.org +Comment: This is part of the testsuite of lintian. + See the file debian/copyright + in the lintian source directory for more details. + +Files: * +Copyright: + 2008 Frank Lichtenheld + 2009 Russ Allbery + 2018 Felix Lechner +License: GPL-2+ + This program is free software; you may redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + . + TAB FOLLOWS. + . + PARAGRAPH INDENTED WITH TAB. + . + TAB PRECEDES. + . + This is distributed in the hope that it will be useful, but without + any warranty; without even the implied warranty of merchantability or + fitness for a particular purpose. See the GNU General Public License + for more details. + . + A copy of the GNU General Public License version 2 is available as + /usr/share/common-licenses/GPL-2 in the Debian GNU/Linux distribution + or at http://www.gnu.org/licenses/old-licenses/gpl-2.0.html. + You can also obtain it by writing to the Free Software Foundation, Inc., + 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/t/recipes/checks/debian/copyright/dep5/tab-in-license-text/build-spec/fill-values b/t/recipes/checks/debian/copyright/dep5/tab-in-license-text/build-spec/fill-values new file mode 100644 index 0000000..c815b61 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/tab-in-license-text/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: upload-native +Testname: tab-in-license-text +Description: Test for disallowed tab character in DEP-5 long license text diff --git a/t/recipes/checks/debian/copyright/dep5/tab-in-license-text/eval/desc b/t/recipes/checks/debian/copyright/dep5/tab-in-license-text/eval/desc new file mode 100644 index 0000000..be68783 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/tab-in-license-text/eval/desc @@ -0,0 +1,2 @@ +Testname: tab-in-license-text +Check: debian/copyright/dep5 diff --git a/t/recipes/checks/debian/copyright/dep5/tab-in-license-text/eval/hints b/t/recipes/checks/debian/copyright/dep5/tab-in-license-text/eval/hints new file mode 100644 index 0000000..b3655d2 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/tab-in-license-text/eval/hints @@ -0,0 +1 @@ +tab-in-license-text (source): tab-in-license-text [debian/copyright:14] diff --git a/t/recipes/checks/debian/copyright/dep5/udev-rules/build-spec/debian/rules b/t/recipes/checks/debian/copyright/dep5/udev-rules/build-spec/debian/rules new file mode 100644 index 0000000..1ecb975 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/udev-rules/build-spec/debian/rules @@ -0,0 +1,13 @@ +#!/usr/bin/make -f + +DESTDIR = debian/$(shell dh_listpackages) +APPSYNC_DIR=$(DESTDIR)/usr/share/metainfo/ +UDEV_DIR=$(DESTDIR)/lib/udev/rules.d/ + +%: + dh $@ + +override_dh_install: + dh_install + install -m 0644 debian/udev-rules.metadata.xml $(APPSYNC_DIR) + ln -s dangling $(UDEV_DIR)/60-dangling-symlink.rules diff --git a/t/recipes/checks/debian/copyright/dep5/udev-rules/build-spec/debian/udev-rules.dirs b/t/recipes/checks/debian/copyright/dep5/udev-rules/build-spec/debian/udev-rules.dirs new file mode 100644 index 0000000..d0cd146 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/udev-rules/build-spec/debian/udev-rules.dirs @@ -0,0 +1,2 @@ +lib/udev/rules.d +usr/share/metainfo diff --git a/t/recipes/checks/debian/copyright/dep5/udev-rules/build-spec/debian/udev-rules.metadata.xml b/t/recipes/checks/debian/copyright/dep5/udev-rules/build-spec/debian/udev-rules.metadata.xml new file mode 100644 index 0000000..2564e98 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/udev-rules/build-spec/debian/udev-rules.metadata.xml @@ -0,0 +1,22 @@ + + + udev-rules + MIT + lintian udev-rules test + Test udev related checks in lintian + +

      + This is a test package designed to exercise some feature or tag + of Lintian. It is part of the Lintian test suite and may do + very odd things. It should not be installed like a regular + package. It may be an empty package. +

      +
      + + usb:v0000p0001d* + usb:v0000p0002d* + usb:v0000p0003d* + usb:v0000p0004d* + usb:v0000p000Ad* + +
      diff --git a/t/recipes/checks/debian/copyright/dep5/udev-rules/build-spec/debian/udev-rules.udev b/t/recipes/checks/debian/copyright/dep5/udev-rules/build-spec/debian/udev-rules.udev new file mode 100644 index 0000000..e35482d --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/udev-rules/build-spec/debian/udev-rules.udev @@ -0,0 +1,25 @@ +SUBSYSTEM=="usb", ACTION=="add", ATTR{idVendor}=="0000", ATTR{idProduct}=="0001", \ + MODE="0666" + +SUBSYSTEM=="usb", ACTION=="add", ATTR{idVendor}=="0000", ATTR{idProduct}=="0002", \ + MODE="0660", GROUP="plugdev" + +SUBSYSTEM=="usb", ACTION=="add", ATTR{idVendor}=="0000", ATTR{idProduct}=="0003", \ + TAG+="uaccess" + +SUBSYSTEM=="usb", ACTION=="add", ATTR{idVendor}=="0000", ATTR{idProduct}=="0004", \ + MODE="0660", GROUP="plugdev", TAG+="uaccess" + +ACTION=="add", ATTR{idVendor}=="0000", ATTR{idProduct}=="0005", \ + MODE="0660", GROUP="plugdev", TAG+="uaccess" + +SUBSYSTEM=="usb", ACTION=="add", ATTR{idVendor}=="0000", ATTR{idProduct}=="000a", \ + ID_TEST_DEVICE="1" + +SUBSYSTEM!="usb", GOTO="target" +ENV{DEVTYPE}!="usb_device", GOTO="target" +ATTR{idVendor}=="0000", ATTR{idProduct}=="0000", RUN+="missing-subsystem-false-positive" +LABEL="target" + +# Ensure we trigger this one after a GOTO +ATTR{idVendor}=="0000", ATTR{idProduct}=="0000", RUN+="missing-subsystem" diff --git a/t/recipes/checks/debian/copyright/dep5/udev-rules/build-spec/fill-values b/t/recipes/checks/debian/copyright/dep5/udev-rules/build-spec/fill-values new file mode 100644 index 0000000..6463c54 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/udev-rules/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: upload-native +Testname: udev-rules +Description: Check udev rules for mistakes diff --git a/t/recipes/checks/debian/copyright/dep5/udev-rules/eval/desc b/t/recipes/checks/debian/copyright/dep5/udev-rules/eval/desc new file mode 100644 index 0000000..3d6a92e --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/udev-rules/eval/desc @@ -0,0 +1,2 @@ +Testname: udev-rules +Check: debian/copyright/dep5 diff --git a/t/recipes/checks/debian/copyright/dep5/udev-rules/eval/hints b/t/recipes/checks/debian/copyright/dep5/udev-rules/eval/hints new file mode 100644 index 0000000..291b20d --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/udev-rules/eval/hints @@ -0,0 +1 @@ +udev-rules (source): inconsistent-appstream-metadata-license debian/udev-rules.metadata.xml (mit != gpl-2+) [debian/copyright] diff --git a/t/recipes/checks/debian/copyright/dep5/wildcard-out-of-order/build-spec/debian/copyright b/t/recipes/checks/debian/copyright/dep5/wildcard-out-of-order/build-spec/debian/copyright new file mode 100644 index 0000000..4fd9937 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/wildcard-out-of-order/build-spec/debian/copyright @@ -0,0 +1,21 @@ +# taken from https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=905747#5 +# but split up for each of the two conditions +Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ + +Files: * +Copyright: (C) 2018 Niels Thykier +License: License1 + +Files: debian/patches/* +Copyright: (C) 2019 Niels Thykier +License: License1 + +Files: debian/* +Copyright: (C) 2018 Niels Thykier +License: License2 + +License: License1 + Please call the author for this license. + +License: License2 + Please call the author for this license. diff --git a/t/recipes/checks/debian/copyright/dep5/wildcard-out-of-order/build-spec/debian/patches/a.patch b/t/recipes/checks/debian/copyright/dep5/wildcard-out-of-order/build-spec/debian/patches/a.patch new file mode 100644 index 0000000..294a68c --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/wildcard-out-of-order/build-spec/debian/patches/a.patch @@ -0,0 +1 @@ +A PATCH diff --git a/t/recipes/checks/debian/copyright/dep5/wildcard-out-of-order/build-spec/fill-values b/t/recipes/checks/debian/copyright/dep5/wildcard-out-of-order/build-spec/fill-values new file mode 100644 index 0000000..79c5734 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/wildcard-out-of-order/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: upload-native +Testname: wildcard-out-of-order +Description: Wildcards not ordered by depth in the directory tree diff --git a/t/recipes/checks/debian/copyright/dep5/wildcard-out-of-order/build-spec/orig/a-file b/t/recipes/checks/debian/copyright/dep5/wildcard-out-of-order/build-spec/orig/a-file new file mode 100644 index 0000000..fadb157 --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/wildcard-out-of-order/build-spec/orig/a-file @@ -0,0 +1 @@ +A FILE diff --git a/t/recipes/checks/debian/copyright/dep5/wildcard-out-of-order/eval/desc b/t/recipes/checks/debian/copyright/dep5/wildcard-out-of-order/eval/desc new file mode 100644 index 0000000..ffd1a6d --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/wildcard-out-of-order/eval/desc @@ -0,0 +1,3 @@ +Testname: wildcard-out-of-order +Check: debian/copyright/dep5 +See-Also: Bug#905747 diff --git a/t/recipes/checks/debian/copyright/dep5/wildcard-out-of-order/eval/hints b/t/recipes/checks/debian/copyright/dep5/wildcard-out-of-order/eval/hints new file mode 100644 index 0000000..e2ec0eb --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/wildcard-out-of-order/eval/hints @@ -0,0 +1,3 @@ +wildcard-out-of-order (source): update-debian-copyright 2019 vs CHANGELOG-YEAR [debian/copyright:10] +wildcard-out-of-order (source): superfluous-file-pattern debian/patches/* [debian/copyright:9] +wildcard-out-of-order (source): globbing-patterns-out-of-order debian/patches/* debian/* debian/patches/a.patch [debian/copyright:13] diff --git a/t/recipes/checks/debian/copyright/dep5/wildcard-out-of-order/eval/post-test b/t/recipes/checks/debian/copyright/dep5/wildcard-out-of-order/eval/post-test new file mode 100644 index 0000000..feeacfc --- /dev/null +++ b/t/recipes/checks/debian/copyright/dep5/wildcard-out-of-order/eval/post-test @@ -0,0 +1 @@ +s/vs [0-9]+/vs CHANGELOG-YEAR/ diff --git a/t/recipes/checks/debian/copyright/generic-dh-make-2008/build-spec/debian/README.Debian b/t/recipes/checks/debian/copyright/generic-dh-make-2008/build-spec/debian/README.Debian new file mode 100644 index 0000000..69112e6 --- /dev/null +++ b/t/recipes/checks/debian/copyright/generic-dh-make-2008/build-spec/debian/README.Debian @@ -0,0 +1,6 @@ +generic-dh-make-2008 for Debian +------------------------------- + + + + -- Russ Allbery Mon, 29 Dec 2008 17:33:59 -0800 diff --git a/t/recipes/checks/debian/copyright/generic-dh-make-2008/build-spec/debian/changelog.in b/t/recipes/checks/debian/copyright/generic-dh-make-2008/build-spec/debian/changelog.in new file mode 100644 index 0000000..8d16a3d --- /dev/null +++ b/t/recipes/checks/debian/copyright/generic-dh-make-2008/build-spec/debian/changelog.in @@ -0,0 +1,5 @@ +generic-dh-make-2008 ([% $version %]) [% $distribution %]; urgency=low + + * Initial release (Closes: #nnnn) + + -- Russ Allbery Mon, 29 Dec 2008 17:33:59 -0800 diff --git a/t/recipes/checks/debian/copyright/generic-dh-make-2008/build-spec/debian/compat.in b/t/recipes/checks/debian/copyright/generic-dh-make-2008/build-spec/debian/compat.in new file mode 100644 index 0000000..640a566 --- /dev/null +++ b/t/recipes/checks/debian/copyright/generic-dh-make-2008/build-spec/debian/compat.in @@ -0,0 +1 @@ +[% $dh_compat_level %] diff --git a/t/recipes/checks/debian/copyright/generic-dh-make-2008/build-spec/debian/control.in b/t/recipes/checks/debian/copyright/generic-dh-make-2008/build-spec/debian/control.in new file mode 100644 index 0000000..a668392 --- /dev/null +++ b/t/recipes/checks/debian/copyright/generic-dh-make-2008/build-spec/debian/control.in @@ -0,0 +1,13 @@ +Source: generic-dh-make-2008 +Section: unknown +Priority: optional +Maintainer: Russ Allbery +Build-Depends: debhelper (>= 7) +Standards-Version: 3.7.3 +Homepage: + +Package: generic-dh-make-2008 +Architecture: [% $package_architecture %] +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: + diff --git a/t/recipes/checks/debian/copyright/generic-dh-make-2008/build-spec/debian/copyright b/t/recipes/checks/debian/copyright/generic-dh-make-2008/build-spec/debian/copyright new file mode 100644 index 0000000..31b796a --- /dev/null +++ b/t/recipes/checks/debian/copyright/generic-dh-make-2008/build-spec/debian/copyright @@ -0,0 +1,24 @@ +This package was debianized by Russ Allbery on +Mon, 29 Dec 2008 17:33:59 -0800. + +It was downloaded from + +Upstream Author(s): + + + + +Copyright: + + + + +License: + + + +The Debian packaging is (C) 2008, Russ Allbery and +is licensed under the GPL, see `/usr/share/common-licenses/GPL'. + +# Please also look if there are files or directories which have a +# different copyright/license attached and list them here. diff --git a/t/recipes/checks/debian/copyright/generic-dh-make-2008/build-spec/debian/cron.d.ex b/t/recipes/checks/debian/copyright/generic-dh-make-2008/build-spec/debian/cron.d.ex new file mode 100644 index 0000000..d00b7d0 --- /dev/null +++ b/t/recipes/checks/debian/copyright/generic-dh-make-2008/build-spec/debian/cron.d.ex @@ -0,0 +1,4 @@ +# +# Regular cron jobs for the generic-dh-make-2008 package +# +0 4 * * * root [ -x /usr/bin/generic-dh-make-2008_maintenance ] && /usr/bin/generic-dh-make-2008_maintenance diff --git a/t/recipes/checks/debian/copyright/generic-dh-make-2008/build-spec/debian/dirs b/t/recipes/checks/debian/copyright/generic-dh-make-2008/build-spec/debian/dirs new file mode 100644 index 0000000..ca882bb --- /dev/null +++ b/t/recipes/checks/debian/copyright/generic-dh-make-2008/build-spec/debian/dirs @@ -0,0 +1,2 @@ +usr/bin +usr/sbin diff --git a/t/recipes/checks/debian/copyright/generic-dh-make-2008/build-spec/debian/docs b/t/recipes/checks/debian/copyright/generic-dh-make-2008/build-spec/debian/docs new file mode 100644 index 0000000..e845566 --- /dev/null +++ b/t/recipes/checks/debian/copyright/generic-dh-make-2008/build-spec/debian/docs @@ -0,0 +1 @@ +README diff --git a/t/recipes/checks/debian/copyright/generic-dh-make-2008/build-spec/debian/emacsen-install.ex b/t/recipes/checks/debian/copyright/generic-dh-make-2008/build-spec/debian/emacsen-install.ex new file mode 100644 index 0000000..393594b --- /dev/null +++ b/t/recipes/checks/debian/copyright/generic-dh-make-2008/build-spec/debian/emacsen-install.ex @@ -0,0 +1,45 @@ +#! /bin/sh -e +# /usr/lib/emacsen-common/packages/install/generic-dh-make-2008 + +# Written by Jim Van Zandt , borrowing heavily +# from the install scripts for gettext by Santiago Vila +# and octave by Dirk Eddelbuettel . + +FLAVOR=$1 +PACKAGE=generic-dh-make-2008 + +if [ ${FLAVOR} = emacs ]; then exit 0; fi + +echo install/${PACKAGE}: Handling install for emacsen flavor ${FLAVOR} + +#FLAVORTEST=`echo $FLAVOR | cut -c-6` +#if [ ${FLAVORTEST} = xemacs ] ; then +# SITEFLAG="-no-site-file" +#else +# SITEFLAG="--no-site-file" +#fi +FLAGS="${SITEFLAG} -q -batch -l path.el -f batch-byte-compile" + +ELDIR=/usr/share/emacs/site-lisp/${PACKAGE} +ELCDIR=/usr/share/${FLAVOR}/site-lisp/${PACKAGE} + +# Install-info-altdir does not actually exist. +# Maybe somebody will write it. +if test -x /usr/sbin/install-info-altdir; then + echo install/${PACKAGE}: install Info links for ${FLAVOR} + install-info-altdir --quiet --section "" "" --dirname=${FLAVOR} /usr/share/info/${PACKAGE}.info.gz +fi + +install -m 755 -d ${ELCDIR} +cd ${ELDIR} +FILES=`echo *.el` +cp ${FILES} ${ELCDIR} +cd ${ELCDIR} + +cat << EOF > path.el +(setq load-path (cons "." load-path) byte-compile-warnings nil) +EOF +${FLAVOR} ${FLAGS} ${FILES} +rm -f *.el path.el + +exit 0 diff --git a/t/recipes/checks/debian/copyright/generic-dh-make-2008/build-spec/debian/emacsen-remove.ex b/t/recipes/checks/debian/copyright/generic-dh-make-2008/build-spec/debian/emacsen-remove.ex new file mode 100644 index 0000000..c48d194 --- /dev/null +++ b/t/recipes/checks/debian/copyright/generic-dh-make-2008/build-spec/debian/emacsen-remove.ex @@ -0,0 +1,15 @@ +#!/bin/sh -e +# /usr/lib/emacsen-common/packages/remove/generic-dh-make-2008 + +FLAVOR=$1 +PACKAGE=generic-dh-make-2008 + +if [ ${FLAVOR} != emacs ]; then + if test -x /usr/sbin/install-info-altdir; then + echo remove/${PACKAGE}: removing Info links for ${FLAVOR} + install-info-altdir --quiet --remove --dirname=${FLAVOR} /usr/share/info/generic-dh-make-2008.info.gz + fi + + echo remove/${PACKAGE}: purging byte-compiled files for ${FLAVOR} + rm -rf /usr/share/${FLAVOR}/site-lisp/${PACKAGE} +fi diff --git a/t/recipes/checks/debian/copyright/generic-dh-make-2008/build-spec/debian/emacsen-startup.ex b/t/recipes/checks/debian/copyright/generic-dh-make-2008/build-spec/debian/emacsen-startup.ex new file mode 100644 index 0000000..b51657a --- /dev/null +++ b/t/recipes/checks/debian/copyright/generic-dh-make-2008/build-spec/debian/emacsen-startup.ex @@ -0,0 +1,25 @@ +;; -*-emacs-lisp-*- +;; +;; Emacs startup file, e.g. /etc/emacs/site-start.d/50generic-dh-make-2008.el +;; for the Debian generic-dh-make-2008 package +;; +;; Originally contributed by Nils Naumann +;; Modified by Dirk Eddelbuettel +;; Adapted for dh-make by Jim Van Zandt + +;; The generic-dh-make-2008 package follows the Debian/GNU Linux 'emacsen' policy and +;; byte-compiles its elisp files for each 'emacs flavor' (emacs19, +;; xemacs19, emacs20, xemacs20...). The compiled code is then +;; installed in a subdirectory of the respective site-lisp directory. +;; We have to add this to the load-path: +(let ((package-dir (concat "/usr/share/" + (symbol-name flavor) + "/site-lisp/generic-dh-make-2008"))) +;; If package-dir does not exist, the generic-dh-make-2008 package must have +;; removed but not purged, and we should skip the setup. + (when (file-directory-p package-dir) + (setq load-path (cons package-dir load-path)) + (autoload 'generic-dh-make-2008-mode "generic-dh-make-2008-mode" + "Major mode for editing generic-dh-make-2008 files." t) + (add-to-list 'auto-mode-alist '("\\.generic-dh-make-2008$" . generic-dh-make-2008-mode)))) + diff --git a/t/recipes/checks/debian/copyright/generic-dh-make-2008/build-spec/debian/generic-dh-make-2008.default.ex b/t/recipes/checks/debian/copyright/generic-dh-make-2008/build-spec/debian/generic-dh-make-2008.default.ex new file mode 100644 index 0000000..d770c6e --- /dev/null +++ b/t/recipes/checks/debian/copyright/generic-dh-make-2008/build-spec/debian/generic-dh-make-2008.default.ex @@ -0,0 +1,10 @@ +# Defaults for generic-dh-make-2008 initscript +# sourced by /etc/init.d/generic-dh-make-2008 +# installed at /etc/default/generic-dh-make-2008 by the maintainer scripts + +# +# This is a POSIX shell fragment +# + +# Additional options that are passed to the Daemon. +DAEMON_OPTS="" diff --git a/t/recipes/checks/debian/copyright/generic-dh-make-2008/build-spec/debian/generic-dh-make-2008.doc-base.EX b/t/recipes/checks/debian/copyright/generic-dh-make-2008/build-spec/debian/generic-dh-make-2008.doc-base.EX new file mode 100644 index 0000000..3b966d1 --- /dev/null +++ b/t/recipes/checks/debian/copyright/generic-dh-make-2008/build-spec/debian/generic-dh-make-2008.doc-base.EX @@ -0,0 +1,22 @@ +Document: generic-dh-make-2008 +Title: Debian generic-dh-make-2008 Manual +Author: +Abstract: This manual describes what generic-dh-make-2008 is + and how it can be used to + manage online manuals on Debian systems. +Section: unknown + +Format: debiandoc-sgml +Files: /usr/share/doc/generic-dh-make-2008/generic-dh-make-2008.sgml.gz + +Format: postscript +Files: /usr/share/doc/generic-dh-make-2008/generic-dh-make-2008.ps.gz + +Format: text +Files: /usr/share/doc/generic-dh-make-2008/generic-dh-make-2008.text.gz + +Format: HTML +Index: /usr/share/doc/generic-dh-make-2008/html/index.html +Files: /usr/share/doc/generic-dh-make-2008/html/*.html + + diff --git a/t/recipes/checks/debian/copyright/generic-dh-make-2008/build-spec/debian/init.d.ex b/t/recipes/checks/debian/copyright/generic-dh-make-2008/build-spec/debian/init.d.ex new file mode 100644 index 0000000..b464594 --- /dev/null +++ b/t/recipes/checks/debian/copyright/generic-dh-make-2008/build-spec/debian/init.d.ex @@ -0,0 +1,157 @@ +#! /bin/sh +# +# skeleton example file to build /etc/init.d/ scripts. +# This file should be used to construct scripts for /etc/init.d. +# +# Written by Miquel van Smoorenburg . +# Modified for Debian +# by Ian Murdock . +# Further changes by Javier Fernandez-Sanguino +# +# Version: @(#)skeleton 1.9 26-Feb-2001 miquels@cistron.nl +# + +PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin +DAEMON=/usr/sbin/generic-dh-make-2008 +NAME=generic-dh-make-2008 +DESC=generic-dh-make-2008 + +test -x $DAEMON || exit 0 + +LOGDIR=/var/log/generic-dh-make-2008 +PIDFILE=/var/run/$NAME.pid +DODTIME=1 # Time to wait for the server to die, in seconds + # If this value is set too low you might not + # let some servers to die gracefully and + # 'restart' will not work + +# Include generic-dh-make-2008 defaults if available +if [ -f /etc/default/generic-dh-make-2008 ] ; then + . /etc/default/generic-dh-make-2008 +fi + +set -e + +running_pid() +{ + # Check if a given process pid's cmdline matches a given name + pid=$1 + name=$2 + [ -z "$pid" ] && return 1 + [ ! -d /proc/$pid ] && return 1 + cmd=`cat /proc/$pid/cmdline | tr "\000" "\n"|head -n 1 |cut -d : -f 1` + # Is this the expected child? + [ "$cmd" != "$name" ] && return 1 + return 0 +} + +running() +{ +# Check if the process is running looking at /proc +# (works for all users) + + # No pidfile, probably no daemon present + [ ! -f "$PIDFILE" ] && return 1 + # Obtain the pid and check it against the binary name + pid=`cat $PIDFILE` + running_pid $pid $DAEMON || return 1 + return 0 +} + +force_stop() { +# Forcefully kill the process + [ ! -f "$PIDFILE" ] && return + if running ; then + kill -15 $pid + # Is it really dead? + [ -n "$DODTIME" ] && sleep "$DODTIME"s + if running ; then + kill -9 $pid + [ -n "$DODTIME" ] && sleep "$DODTIME"s + if running ; then + echo "Cannot kill $LABEL (pid=$pid)!" + exit 1 + fi + fi + fi + rm -f $PIDFILE + return 0 +} + +case "$1" in + start) + echo -n "Starting $DESC: " + start-stop-daemon --start --quiet --pidfile $PIDFILE \ + --exec $DAEMON -- $DAEMON_OPTS + if running ; then + echo "$NAME." + else + echo " ERROR." + fi + ;; + stop) + echo -n "Stopping $DESC: " + start-stop-daemon --stop --quiet --pidfile $PIDFILE \ + --exec $DAEMON + echo "$NAME." + ;; + force-stop) + echo -n "Forcefully stopping $DESC: " + force_stop + if ! running ; then + echo "$NAME." + else + echo " ERROR." + fi + ;; + #reload) + # + # If the daemon can reload its config files on the fly + # for example by sending it SIGHUP, do it here. + # + # If the daemon responds to changes in its config file + # directly anyway, make this a do-nothing entry. + # + # echo "Reloading $DESC configuration files." + # start-stop-daemon --stop --signal 1 --quiet --pidfile \ + # /var/run/$NAME.pid --exec $DAEMON + #;; + force-reload) + # + # If the "reload" option is implemented, move the "force-reload" + # option to the "reload" entry above. If not, "force-reload" is + # just the same as "restart" except that it does nothing if the + # daemon isn't already running. + # check wether $DAEMON is running. If so, restart + start-stop-daemon --stop --test --quiet --pidfile \ + /var/run/$NAME.pid --exec $DAEMON \ + && $0 restart \ + || exit 0 + ;; + restart) + echo -n "Restarting $DESC: " + start-stop-daemon --stop --quiet --pidfile \ + /var/run/$NAME.pid --exec $DAEMON + [ -n "$DODTIME" ] && sleep $DODTIME + start-stop-daemon --start --quiet --pidfile \ + /var/run/$NAME.pid --exec $DAEMON -- $DAEMON_OPTS + echo "$NAME." + ;; + status) + echo -n "$LABEL is " + if running ; then + echo "running" + else + echo " not running." + exit 1 + fi + ;; + *) + N=/etc/init.d/$NAME + # echo "Usage: $N {start|stop|restart|reload|force-reload}" >&2 + echo "Usage: $N {start|stop|restart|force-reload|status|force-stop}" >&2 + exit 1 + ;; +esac + +exit 0 diff --git a/t/recipes/checks/debian/copyright/generic-dh-make-2008/build-spec/debian/init.d.lsb.ex b/t/recipes/checks/debian/copyright/generic-dh-make-2008/build-spec/debian/init.d.lsb.ex new file mode 100644 index 0000000..b3559de --- /dev/null +++ b/t/recipes/checks/debian/copyright/generic-dh-make-2008/build-spec/debian/init.d.lsb.ex @@ -0,0 +1,296 @@ +#!/bin/sh +# +# Example init.d script with LSB support. +# +# Please read this init.d carefully and modify the sections to +# adjust it to the program you want to run. +# +# Copyright (c) 2007 Javier Fernandez-Sanguino +# +# This is free software; you may redistribute it and/or modify +# it under the terms of the GNU General Public License as +# published by the Free Software Foundation; either version 2, +# or (at your option) any later version. +# +# This is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License with +# the Debian operating system, in /usr/share/common-licenses/GPL; if +# not, write to the Free Software Foundation, Inc., 59 Temple Place, +# Suite 330, Boston, MA 02111-1307 USA +# +### BEGIN INIT INFO +# Provides: generic-dh-make-2008 +# Required-Start: $network $local_fs +# Required-Stop: +# Should-Start: $named +# Should-Stop: +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +# Short-Description: +# Description: +# <...> +# <...> +### END INIT INFO + +PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin + +DAEMON=/usr/sbin/generic-dh-make-2008 # Introduce the server's location here +NAME=#PACKAGE # Introduce the short server's name here +DESC=#PACKAGE # Introduce a short description here +LOGDIR=/var/log/generic-dh-make-2008 # Log directory to use + +PIDFILE=/var/run/$NAME.pid + +test -x $DAEMON || exit 0 + +. /lib/lsb/init-functions + +# Default options, these can be overriden by the information +# at /etc/default/$NAME +DAEMON_OPTS="" # Additional options given to the server + +DIETIME=10 # Time to wait for the server to die, in seconds + # If this value is set too low you might not + # let some servers to die gracefully and + # 'restart' will not work + +#STARTTIME=2 # Time to wait for the server to start, in seconds + # If this value is set each time the server is + # started (on start or restart) the script will + # stall to try to determine if it is running + # If it is not set and the server takes time + # to setup a pid file the log message might + # be a false positive (says it did not start + # when it actually did) + +LOGFILE=$LOGDIR/$NAME.log # Server logfile +#DAEMONUSER=generic-dh-make-2008 # Users to run the daemons as. If this value + # is set start-stop-daemon will chuid the server + +# Include defaults if available +if [ -f /etc/default/$NAME ] ; then + . /etc/default/$NAME +fi + +# Use this if you want the user to explicitly set 'RUN' in +# /etc/default/ +#if [ "x$RUN" != "xyes" ] ; then +# log_failure_msg "$NAME disabled, please adjust the configuration to your needs " +# log_failure_msg "and then set RUN to 'yes' in /etc/default/$NAME to enable it." +# exit 1 +#fi + +# Check that the user exists (if we set a user) +# Does the user exist? +if [ -n "$DAEMONUSER" ] ; then + if getent passwd | grep -q "^$DAEMONUSER:"; then + # Obtain the uid and gid + DAEMONUID=`getent passwd |grep "^$DAEMONUSER:" | awk -F : '{print $3}'` + DAEMONGID=`getent passwd |grep "^$DAEMONUSER:" | awk -F : '{print $4}'` + else + log_failure_msg "The user $DAEMONUSER, required to run $NAME does not exist." + exit 1 + fi +fi + + +set -e + +running_pid() { +# Check if a given process pid's cmdline matches a given name + pid=$1 + name=$2 + [ -z "$pid" ] && return 1 + [ ! -d /proc/$pid ] && return 1 + cmd=`cat /proc/$pid/cmdline | tr "\000" "\n"|head -n 1 |cut -d : -f 1` + # Is this the expected server + [ "$cmd" != "$name" ] && return 1 + return 0 +} + +running() { +# Check if the process is running looking at /proc +# (works for all users) + + # No pidfile, probably no daemon present + [ ! -f "$PIDFILE" ] && return 1 + pid=`cat $PIDFILE` + running_pid $pid $DAEMON || return 1 + return 0 +} + +start_server() { +# Start the process using the wrapper + if [ -z "$DAEMONUSER" ] ; then + start_daemon -p $PIDFILE $DAEMON -- $DAEMON_OPTS + errcode=$? + else +# if we are using a daemonuser then change the user id + start-stop-daemon --start --quiet --pidfile $PIDFILE \ + --chuid $DAEMONUSER \ + --exec $DAEMON -- $DAEMON_OPTS + errcode=$? + fi + return $errcode +} + +stop_server() { +# Stop the process using the wrapper + if [ -z "$DAEMONUSER" ] ; then + killproc -p $PIDFILE $DAEMON + errcode=$? + else +# if we are using a daemonuser then look for process that match + start-stop-daemon --stop --quiet --pidfile $PIDFILE \ + --user $DAEMONUSER \ + --exec $DAEMON + errcode=$? + fi + + return $errcode +} + +reload_server() { + [ ! -f "$PIDFILE" ] && return 1 + pid=pidofproc $PIDFILE # This is the daemon's pid + # Send a SIGHUP + kill -1 $pid + return $? +} + +force_stop() { +# Force the process to die killing it manually + [ ! -e "$PIDFILE" ] && return + if running ; then + kill -15 $pid + # Is it really dead? + sleep "$DIETIME"s + if running ; then + kill -9 $pid + sleep "$DIETIME"s + if running ; then + echo "Cannot kill $NAME (pid=$pid)!" + exit 1 + fi + fi + fi + rm -f $PIDFILE +} + + +case "$1" in + start) + log_daemon_msg "Starting $DESC " "$NAME" + # Check if it's running first + if running ; then + log_progress_msg "apparently already running" + log_end_msg 0 + exit 0 + fi + if start_server ; then + # NOTE: Some servers might die some time after they start, + # this code will detect this issue if STARTTIME is set + # to a reasonable value + [ -n "$STARTTIME" ] && sleep $STARTTIME # Wait some time + if running ; then + # It's ok, the server started and is running + log_end_msg 0 + else + # It is not running after we did start + log_end_msg 1 + fi + else + # Either we could not start it + log_end_msg 1 + fi + ;; + stop) + log_daemon_msg "Stopping $DESC" "$NAME" + if running ; then + # Only stop the server if we see it running + errcode=0 + stop_server || errcode=$? + log_end_msg $errcode + else + # If it's not running don't do anything + log_progress_msg "apparently not running" + log_end_msg 0 + exit 0 + fi + ;; + force-stop) + # First try to stop gracefully the program + $0 stop + if running; then + # If it's still running try to kill it more forcefully + log_daemon_msg "Stopping (force) $DESC" "$NAME" + errcode=0 + force_stop || errcode=$? + log_end_msg $errcode + fi + ;; + restart|force-reload) + log_daemon_msg "Restarting $DESC" "$NAME" + errcode=0 + stop_server || errcode=$? + # Wait some sensible amount, some server need this + [ -n "$DIETIME" ] && sleep $DIETIME + start_server || errcode=$? + [ -n "$STARTTIME" ] && sleep $STARTTIME + running || errcode=$? + log_end_msg $errcode + ;; + status) + + log_daemon_msg "Checking status of $DESC" "$NAME" + if running ; then + log_progress_msg "running" + log_end_msg 0 + else + log_progress_msg "apparently not running" + log_end_msg 1 + exit 1 + fi + ;; + # Use this if the daemon cannot reload + reload) + log_warning_msg "Reloading $NAME daemon: not implemented, as the daemon" + log_warning_msg "cannot re-read the config file (use restart)." + ;; + # And this if it cann + #reload) + # + # If the daemon can reload its config files on the fly + # for example by sending it SIGHUP, do it here. + # + # If the daemon responds to changes in its config file + # directly anyway, make this a do-nothing entry. + # + # log_daemon_msg "Reloading $DESC configuration files" "$NAME" + # if running ; then + # reload_server + # if ! running ; then + # Process died after we tried to reload + # log_progress_msg "died on reload" + # log_end_msg 1 + # exit 1 + # fi + # else + # log_progress_msg "server is not running" + # log_end_msg 1 + # exit 1 + # fi + #;; + + *) + N=/etc/init.d/$NAME + echo "Usage: $N {start|stop|force-stop|restart|force-reload|status}" >&2 + exit 1 + ;; +esac + +exit 0 diff --git a/t/recipes/checks/debian/copyright/generic-dh-make-2008/build-spec/debian/manpage.1.ex b/t/recipes/checks/debian/copyright/generic-dh-make-2008/build-spec/debian/manpage.1.ex new file mode 100644 index 0000000..d67baa2 --- /dev/null +++ b/t/recipes/checks/debian/copyright/generic-dh-make-2008/build-spec/debian/manpage.1.ex @@ -0,0 +1,59 @@ +.\" Hey, EMACS: -*- nroff -*- +.\" First parameter, NAME, should be all caps +.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection +.\" other parameters are allowed: see man(7), man(1) +.TH GENERIC-DH-MAKE-2008 SECTION "December 29, 2008" +.\" Please adjust this date whenever revising the manpage. +.\" +.\" Some roff macros, for reference: +.\" .nh disable hyphenation +.\" .hy enable hyphenation +.\" .ad l left justify +.\" .ad b justify to both left and right margins +.\" .nf disable filling +.\" .fi enable filling +.\" .br insert line break +.\" .sp insert n+1 empty lines +.\" for manpage-specific macros, see man(7) +.SH NAME +generic-dh-make-2008 \- program to do something +.SH SYNOPSIS +.B generic-dh-make-2008 +.RI [ options ] " files" ... +.br +.B bar +.RI [ options ] " files" ... +.SH DESCRIPTION +This manual page documents briefly the +.B generic-dh-make-2008 +and +.B bar +commands. +.PP +.\" TeX users may be more comfortable with the \fB\fP and +.\" \fI\fP escape sequences to invode bold face and italics, +.\" respectively. +\fBgeneric-dh-make-2008\fP is a program that... +.SH OPTIONS +These programs follow the usual GNU command line syntax, with long +options starting with two dashes (`-'). +A summary of options is included below. +For a complete description, see the Info files. +.TP +.B \-h, \-\-help +Show summary of options. +.TP +.B \-v, \-\-version +Show version of program. +.SH SEE ALSO +.BR bar (1), +.BR baz (1). +.br +The programs are documented fully by +.IR "The Rise and Fall of a Fooish Bar" , +available via the Info system. +.SH AUTHOR +generic-dh-make-2008 was written by . +.PP +This manual page was written by Russ Allbery , +for the Debian project (but may be used by others). diff --git a/t/recipes/checks/debian/copyright/generic-dh-make-2008/build-spec/debian/manpage.sgml.ex b/t/recipes/checks/debian/copyright/generic-dh-make-2008/build-spec/debian/manpage.sgml.ex new file mode 100644 index 0000000..26b3e0c --- /dev/null +++ b/t/recipes/checks/debian/copyright/generic-dh-make-2008/build-spec/debian/manpage.sgml.ex @@ -0,0 +1,156 @@ + manpage.1'. You may view + the manual page with: `docbook-to-man manpage.sgml | nroff -man | + less'. A typical entry in a Makefile or Makefile.am is: + +manpage.1: manpage.sgml + docbook-to-man $< > $@ + + + The docbook-to-man binary is found in the docbook-to-man package. + Please remember that if you create the nroff version in one of the + debian/rules file targets (such as build), you will need to include + docbook-to-man in your Build-Depends control field. + + --> + + + FIRSTNAME"> + SURNAME"> + + December 29, 2008"> + + SECTION"> + rra@debian.org"> + + GENERIC-DH-MAKE-2008"> + + + Debian"> + GNU"> + GPL"> +]> + + + +
      + &dhemail; +
      + + &dhfirstname; + &dhsurname; + + + 2003 + &dhusername; + + &dhdate; +
      + + &dhucpackage; + + &dhsection; + + + &dhpackage; + + program to do something + + + + &dhpackage; + + + + + + + + DESCRIPTION + + This manual page documents briefly the + &dhpackage; and bar + commands. + + This manual page was written for the &debian; distribution + because the original program does not have a manual page. + Instead, it has documentation in the &gnu; + Info format; see below. + + &dhpackage; is a program that... + + + + OPTIONS + + These programs follow the usual &gnu; command line syntax, + with long options starting with two dashes (`-'). A summary of + options is included below. For a complete description, see the + Info files. + + + + + + + + Show summary of options. + + + + + + + + Show version of program. + + + + + + SEE ALSO + + bar (1), baz (1). + + The programs are documented fully by The Rise and + Fall of a Fooish Bar available via the + Info system. + + + AUTHOR + + This manual page was written by &dhusername; &dhemail; for + the &debian; system (but may be used by others). Permission is + granted to copy, distribute and/or modify this document under + the terms of the &gnu; General Public License, Version 2 any + later version published by the Free Software Foundation. + + + On Debian systems, the complete text of the GNU General Public + License can be found in /usr/share/common-licenses/GPL. + + + +
      + + + + diff --git a/t/recipes/checks/debian/copyright/generic-dh-make-2008/build-spec/debian/manpage.xml.ex b/t/recipes/checks/debian/copyright/generic-dh-make-2008/build-spec/debian/manpage.xml.ex new file mode 100644 index 0000000..2d01c6f --- /dev/null +++ b/t/recipes/checks/debian/copyright/generic-dh-make-2008/build-spec/debian/manpage.xml.ex @@ -0,0 +1,291 @@ + +.
      will be generated. You may view the +manual page with: nroff -man .
      | less'. A typical entry +in a Makefile or Makefile.am is: + +DB2MAN = /usr/share/sgml/docbook/stylesheet/xsl/nwalsh/manpages/docbook.xsl +XP = xsltproc -''-nonet -''-param man.charmap.use.subset "0" + +manpage.1: manpage.xml + $(XP) $(DB2MAN) $< + +The xsltproc binary is found in the xsltproc package. The XSL files are in +docbook-xsl. A description of the parameters you can use can be found in the +docbook-xsl-doc-* packages. Please remember that if you create the nroff +version in one of the debian/rules file targets (such as build), you will need +to include xsltproc and docbook-xsl in your Build-Depends control field. +Alternatively use the xmlto command/package. That will also automatically +pull in xsltproc and docbook-xsl. + +Notes for using docbook2x: docbook2x-man does not automatically create the +AUTHOR(S) and COPYRIGHT sections. In this case, please add them manually as + ... . + +To disable the automatic creation of the AUTHOR(S) and COPYRIGHT sections +read /usr/share/doc/docbook-xsl/doc/manpages/authors.html. This file can be +found in the docbook-xsl-doc-html package. + +Validation can be done using: `xmllint -''-noout -''-valid manpage.xml` + +General documentation about man-pages and man-page-formatting: +man(1), man(7), http://www.tldp.org/HOWTO/Man-Page/ + +--> + + + + + + + + + + + + + +]> + + + + &dhtitle; + &dhpackage; + + + &dhfirstname; + &dhsurname; + Wrote this manpage for the Debian system. +
      + &dhemail; +
      +
      +
      + + 2007 + &dhusername; + + + This manual page was written for the Debian system + (but may be used by others). + Permission is granted to copy, distribute and/or modify this + document under the terms of the GNU General Public License, + Version 2 or (at your option) any later version published by + the Free Software Foundation. + On Debian systems, the complete text of the GNU General Public + License can be found in + /usr/share/common-licenses/GPL. + +
      + + &dhucpackage; + &dhsection; + + + &dhpackage; + program to do something + + + + &dhpackage; + + + + + + + + + this + + + + + + + + this + that + + + + + &dhpackage; + + + + + + + + + + + + + + + + + + + DESCRIPTION + This manual page documents briefly the + &dhpackage; and bar + commands. + This manual page was written for the Debian distribution + because the original program does not have a manual page. + Instead, it has documentation in the GNU + info + 1 + format; see below. + &dhpackage; is a program that... + + + OPTIONS + The program follows the usual GNU command line syntax, + with long options starting with two dashes (`-'). A summary of + options is included below. For a complete description, see the + + info + 1 + files. + + + + + + + Does this and that. + + + + + + + Show summary of options. + + + + + + + Show version of program. + + + + + + FILES + + + /etc/foo.conf + + The system-wide configuration file to control the + behaviour of &dhpackage;. See + + foo.conf + 5 + for further details. + + + + ${HOME}/.foo.conf + + The per-user configuration file to control the + behaviour of &dhpackage;. See + + foo.conf + 5 + for further details. + + + + + + ENVIONMENT + + + FOO_CONF + + If used, the defined file is used as configuration + file (see also ). + + + + + + DIAGNOSTICS + The following diagnostics may be issued + on stderr: + + + Bad configuration file. Exiting. + + The configuration file seems to contain a broken configuration + line. Use the option, to get more info. + + + + + &dhpackage; provides some return codes, that can + be used in scripts: + + Code + Diagnostic + + 0 + Program exited successfully. + + + 1 + The configuration file seems to be broken. + + + + + + BUGS + The program is currently limited to only work + with the foobar library. + The upstreams BTS can be found + at . + + + SEE ALSO + + + bar + 1 + , + baz + 1 + , + foo.conf + 5 + + The programs are documented fully by The Rise and + Fall of a Fooish Bar available via the + info + 1 + system. + +
      + diff --git a/t/recipes/checks/debian/copyright/generic-dh-make-2008/build-spec/debian/menu.ex b/t/recipes/checks/debian/copyright/generic-dh-make-2008/build-spec/debian/menu.ex new file mode 100644 index 0000000..8a67e62 --- /dev/null +++ b/t/recipes/checks/debian/copyright/generic-dh-make-2008/build-spec/debian/menu.ex @@ -0,0 +1,2 @@ +?package(generic-dh-make-2008):needs="X11|text|vc|wm" section="Applications/see-menu-manual"\ + title="generic-dh-make-2008" command="/usr/bin/generic-dh-make-2008" diff --git a/t/recipes/checks/debian/copyright/generic-dh-make-2008/build-spec/debian/postinst.ex b/t/recipes/checks/debian/copyright/generic-dh-make-2008/build-spec/debian/postinst.ex new file mode 100644 index 0000000..b5f5ca7 --- /dev/null +++ b/t/recipes/checks/debian/copyright/generic-dh-make-2008/build-spec/debian/postinst.ex @@ -0,0 +1,41 @@ +#!/bin/sh +# postinst script for generic-dh-make-2008 +# +# see: dh_installdeb(1) + +set -e + +# summary of how this script can be called: +# * `configure' +# * `abort-upgrade' +# * `abort-remove' `in-favour' +# +# * `abort-remove' +# * `abort-deconfigure' `in-favour' +# `removing' +# +# for details, see http://www.debian.org/doc/debian-policy/ or +# the debian-policy package + + +case "$1" in + configure) + ;; + + abort-upgrade|abort-remove|abort-deconfigure) + ;; + + *) + echo "postinst called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# + +exit 0 + + diff --git a/t/recipes/checks/debian/copyright/generic-dh-make-2008/build-spec/debian/postrm.ex b/t/recipes/checks/debian/copyright/generic-dh-make-2008/build-spec/debian/postrm.ex new file mode 100644 index 0000000..1d8a18a --- /dev/null +++ b/t/recipes/checks/debian/copyright/generic-dh-make-2008/build-spec/debian/postrm.ex @@ -0,0 +1,39 @@ +#!/bin/sh +# postrm script for generic-dh-make-2008 +# +# see: dh_installdeb(1) + +set -e + +# summary of how this script can be called: +# * `remove' +# * `purge' +# * `upgrade' +# * `failed-upgrade' +# * `abort-install' +# * `abort-install' +# * `abort-upgrade' +# * `disappear' +# +# for details, see http://www.debian.org/doc/debian-policy/ or +# the debian-policy package + + +case "$1" in + purge|remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear) + ;; + + *) + echo "postrm called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# + +exit 0 + + diff --git a/t/recipes/checks/debian/copyright/generic-dh-make-2008/build-spec/debian/preinst.ex b/t/recipes/checks/debian/copyright/generic-dh-make-2008/build-spec/debian/preinst.ex new file mode 100644 index 0000000..3134ccf --- /dev/null +++ b/t/recipes/checks/debian/copyright/generic-dh-make-2008/build-spec/debian/preinst.ex @@ -0,0 +1,37 @@ +#!/bin/sh +# preinst script for generic-dh-make-2008 +# +# see: dh_installdeb(1) + +set -e + +# summary of how this script can be called: +# * `install' +# * `install' +# * `upgrade' +# * `abort-upgrade' +# for details, see http://www.debian.org/doc/debian-policy/ or +# the debian-policy package + + +case "$1" in + install|upgrade) + ;; + + abort-upgrade) + ;; + + *) + echo "preinst called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# + +exit 0 + + diff --git a/t/recipes/checks/debian/copyright/generic-dh-make-2008/build-spec/debian/prerm.ex b/t/recipes/checks/debian/copyright/generic-dh-make-2008/build-spec/debian/prerm.ex new file mode 100644 index 0000000..4e5dd3f --- /dev/null +++ b/t/recipes/checks/debian/copyright/generic-dh-make-2008/build-spec/debian/prerm.ex @@ -0,0 +1,40 @@ +#!/bin/sh +# prerm script for generic-dh-make-2008 +# +# see: dh_installdeb(1) + +set -e + +# summary of how this script can be called: +# * `remove' +# * `upgrade' +# * `failed-upgrade' +# * `remove' `in-favour' +# * `deconfigure' `in-favour' +# `removing' +# +# for details, see http://www.debian.org/doc/debian-policy/ or +# the debian-policy package + + +case "$1" in + remove|upgrade|deconfigure) + ;; + + failed-upgrade) + ;; + + *) + echo "prerm called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# + +exit 0 + + diff --git a/t/recipes/checks/debian/copyright/generic-dh-make-2008/build-spec/debian/rules b/t/recipes/checks/debian/copyright/generic-dh-make-2008/build-spec/debian/rules new file mode 100755 index 0000000..92aa2b1 --- /dev/null +++ b/t/recipes/checks/debian/copyright/generic-dh-make-2008/build-spec/debian/rules @@ -0,0 +1,91 @@ +#!/usr/bin/make -f +# -*- makefile -*- +# Sample debian/rules that uses debhelper. +# This file was originally written by Joey Hess and Craig Small. +# As a special exception, when this file is copied by dh-make into a +# dh-make output file, you may use that output file without restriction. +# This special exception was added by Craig Small in version 0.37 of dh-make. + +# Uncomment this to turn on verbose mode. +#export DH_VERBOSE=1 + + + + + +configure: configure-stamp +configure-stamp: + dh_testdir + # Add here commands to configure the package. + + touch configure-stamp + + +build: build-stamp + +build-stamp: configure-stamp + dh_testdir + + # Add here commands to compile the package. + $(MAKE) + #docbook-to-man debian/generic-dh-make-2008.sgml > generic-dh-make-2008.1 + + touch $@ + +clean: + dh_testdir + dh_testroot + rm -f build-stamp configure-stamp + + # Add here commands to clean up after the build process. + $(MAKE) clean + + dh_clean + +install: build + dh_testdir + dh_testroot + dh_clean -k + dh_installdirs + + # Add here commands to install the package into debian/generic-dh-make-2008. + $(MAKE) DESTDIR=$(CURDIR)/debian/generic-dh-make-2008 install + + +# Build architecture-independent files here. +binary-indep: build install +# We have nothing to do by default. + +# Build architecture-dependent files here. +binary-arch: build install + dh_testdir + dh_testroot + dh_installchangelogs + dh_installdocs + dh_installexamples +# dh_install +# dh_installmenu +# dh_installdebconf +# dh_installlogrotate +# dh_installemacsen +# dh_installpam +# dh_installmime +# dh_python +# dh_installinit +# dh_installcron +# dh_installinfo + dh_installman + dh_link + dh_strip + dh_compress + dh_fixperms +# dh_perl +# dh_makeshlibs + dh_installdeb + dh_shlibdeps + dh_gencontrol + dh_md5sums + dh_builddeb + +binary: binary-indep binary-arch +.PHONY: build clean binary-indep binary-arch binary install configure diff --git a/t/recipes/checks/debian/copyright/generic-dh-make-2008/build-spec/debian/watch.ex b/t/recipes/checks/debian/copyright/generic-dh-make-2008/build-spec/debian/watch.ex new file mode 100644 index 0000000..e62d18f --- /dev/null +++ b/t/recipes/checks/debian/copyright/generic-dh-make-2008/build-spec/debian/watch.ex @@ -0,0 +1,23 @@ +# Example watch control file for uscan +# Rename this file to "watch" and then you can run the "uscan" command +# to check for upstream updates and more. +# See uscan(1) for format + +# Compulsory line, this is a version 3 file +version=3 + +# Uncomment to examine a Webpage +# +#http://www.example.com/downloads.php generic-dh-make-2008-(.*)\.tar\.gz + +# Uncomment to examine a Webserver directory +#http://www.example.com/pub/generic-dh-make-2008-(.*)\.tar\.gz + +# Uncommment to examine a FTP server +#ftp://ftp.example.com/pub/generic-dh-make-2008-(.*)\.tar\.gz debian uupdate + +# Uncomment to find new files on sourceforge, for devscripts >= 2.9 +# http://sf.net/generic-dh-make-2008/generic-dh-make-2008-(.*)\.tar\.gz + +# Uncomment to find new files on GooglePages +# http://example.googlepages.com/foo.html generic-dh-make-2008-(.*)\.tar\.gz diff --git a/t/recipes/checks/debian/copyright/generic-dh-make-2008/build-spec/fill-values b/t/recipes/checks/debian/copyright/generic-dh-make-2008/build-spec/fill-values new file mode 100644 index 0000000..ef7a896 --- /dev/null +++ b/t/recipes/checks/debian/copyright/generic-dh-make-2008/build-spec/fill-values @@ -0,0 +1,7 @@ +Testname: generic-dh-make-2008 +Skeleton: upload-builder-only +Author: Russ Allbery +Package-Architecture: any +Dh-Compat-Level: 7 +Description: Generic dh_make template generated in 2008 +Default-Build-Depends: debhelper (>= [% $dh_compat_level %]~) diff --git a/t/recipes/checks/debian/copyright/generic-dh-make-2008/build-spec/orig/Makefile b/t/recipes/checks/debian/copyright/generic-dh-make-2008/build-spec/orig/Makefile new file mode 100644 index 0000000..4f762d8 --- /dev/null +++ b/t/recipes/checks/debian/copyright/generic-dh-make-2008/build-spec/orig/Makefile @@ -0,0 +1,4 @@ +# Stub Makefile that's just enough so that the default rules file doesn't +# error out. + +clean install: diff --git a/t/recipes/checks/debian/copyright/generic-dh-make-2008/build-spec/orig/README b/t/recipes/checks/debian/copyright/generic-dh-make-2008/build-spec/orig/README new file mode 100644 index 0000000..6a3c009 --- /dev/null +++ b/t/recipes/checks/debian/copyright/generic-dh-make-2008/build-spec/orig/README @@ -0,0 +1,13 @@ +dh_make 0.46 test +================= + +This is the results of running dh_make 0.46 on an upstream tarball +containing only this file. It's a useful test for the various dh_make +template and boilerplate tags, as well as many tags for ways of doing +things dh_make used to promote but are now deprecated or old debhelper +commands that are now deprecated. + +Please don't modify anything about the files in this package; instead, add +new tags as needed when Lintian adds new checks. This test case is +intended to continue to be a test of Lintian's handling of old and +template packages. diff --git a/t/recipes/checks/debian/copyright/generic-dh-make-2008/build-spec/pre-build.in b/t/recipes/checks/debian/copyright/generic-dh-make-2008/build-spec/pre-build.in new file mode 100755 index 0000000..bbdb5cb --- /dev/null +++ b/t/recipes/checks/debian/copyright/generic-dh-make-2008/build-spec/pre-build.in @@ -0,0 +1,5 @@ +#!/bin/sh + +# not using any templates, but dh_clean requires compat + +echo "[% $dh_compat_level %]" > "$1/debian/compat" diff --git a/t/recipes/checks/debian/copyright/generic-dh-make-2008/eval/desc b/t/recipes/checks/debian/copyright/generic-dh-make-2008/eval/desc new file mode 100644 index 0000000..35dfeaf --- /dev/null +++ b/t/recipes/checks/debian/copyright/generic-dh-make-2008/eval/desc @@ -0,0 +1,4 @@ +Testname: generic-dh-make-2008 +Check: debian/copyright +See-Also: + Bug#497347 diff --git a/t/recipes/checks/debian/copyright/generic-dh-make-2008/eval/hints b/t/recipes/checks/debian/copyright/generic-dh-make-2008/eval/hints new file mode 100644 index 0000000..b5417b3 --- /dev/null +++ b/t/recipes/checks/debian/copyright/generic-dh-make-2008/eval/hints @@ -0,0 +1,5 @@ +generic-dh-make-2008 (binary): helper-templates-in-copyright +generic-dh-make-2008 (binary): copyright-without-copyright-notice +generic-dh-make-2008 (binary): copyright-with-old-dh-make-debian-copyright +generic-dh-make-2008 (binary): copyright-has-url-from-dh_make-boilerplate +generic-dh-make-2008 (binary): copyright-contains-dh_make-todo-boilerplate diff --git a/t/recipes/checks/debian/copyright/generic-dh-make-2008/eval/post-test b/t/recipes/checks/debian/copyright/generic-dh-make-2008/eval/post-test new file mode 100644 index 0000000..faeef0b --- /dev/null +++ b/t/recipes/checks/debian/copyright/generic-dh-make-2008/eval/post-test @@ -0,0 +1 @@ +s/\(current is ([0-9]+\.)+[0-9]\)/(current is CURRENT)/ diff --git a/t/recipes/checks/debian/copyright/generic-empty/build-spec/debian/changelog.in b/t/recipes/checks/debian/copyright/generic-empty/build-spec/debian/changelog.in new file mode 100644 index 0000000..7a4298d --- /dev/null +++ b/t/recipes/checks/debian/copyright/generic-empty/build-spec/debian/changelog.in @@ -0,0 +1,2 @@ +[% $source %] ([% $version %]) unstable; + -- a <> Tue, 30 Dec 2008 17:34:02 -0800 diff --git a/t/recipes/checks/debian/copyright/generic-empty/build-spec/debian/control.in b/t/recipes/checks/debian/copyright/generic-empty/build-spec/debian/control.in new file mode 100644 index 0000000..575773e --- /dev/null +++ b/t/recipes/checks/debian/copyright/generic-empty/build-spec/debian/control.in @@ -0,0 +1,5 @@ +Source: [% $source %] +Maintainer: a + +Package: [% $source %] +Architecture: [% $package_architecture %] diff --git a/t/recipes/checks/debian/copyright/generic-empty/build-spec/debian/rules b/t/recipes/checks/debian/copyright/generic-empty/build-spec/debian/rules new file mode 100755 index 0000000..62da96d --- /dev/null +++ b/t/recipes/checks/debian/copyright/generic-empty/build-spec/debian/rules @@ -0,0 +1,9 @@ +#!/usr/bin/make -f +build: +binary: + install -d debian/generic-empty debian/generic-empty/DEBIAN + dpkg-gencontrol -pgeneric-empty -Pdebian/generic-empty + dpkg --build debian/generic-empty .. + +clean: + rm -rf debian/generic-empty diff --git a/t/recipes/checks/debian/copyright/generic-empty/build-spec/fill-values b/t/recipes/checks/debian/copyright/generic-empty/build-spec/fill-values new file mode 100644 index 0000000..26d9bdc --- /dev/null +++ b/t/recipes/checks/debian/copyright/generic-empty/build-spec/fill-values @@ -0,0 +1,4 @@ +Skeleton: upload-native +Testname: generic-empty +Package-Architecture: all +Description: Pathological empty package diff --git a/t/recipes/checks/debian/copyright/generic-empty/build-spec/orig/README b/t/recipes/checks/debian/copyright/generic-empty/build-spec/orig/README new file mode 100644 index 0000000..ed1b149 --- /dev/null +++ b/t/recipes/checks/debian/copyright/generic-empty/build-spec/orig/README @@ -0,0 +1,4 @@ +This is the smallest possible Debian package that I can get +dpkg-buildpackage to build (with the exception of this documentation). +It tests Lintian handling of packages that are missing everything one +would normally expect to have. diff --git a/t/recipes/checks/debian/copyright/generic-empty/build-spec/pre-build b/t/recipes/checks/debian/copyright/generic-empty/build-spec/pre-build new file mode 100755 index 0000000..1a3929a --- /dev/null +++ b/t/recipes/checks/debian/copyright/generic-empty/build-spec/pre-build @@ -0,0 +1,6 @@ +#!/bin/sh +# +# Remove as many files from the package as possible. + +rm -f "$1/debian/compat" +rm -f "$1/debian/copyright" diff --git a/t/recipes/checks/debian/copyright/generic-empty/eval/desc b/t/recipes/checks/debian/copyright/generic-empty/eval/desc new file mode 100644 index 0000000..eee49bb --- /dev/null +++ b/t/recipes/checks/debian/copyright/generic-empty/eval/desc @@ -0,0 +1,2 @@ +Testname: generic-empty +Check: debian/copyright diff --git a/t/recipes/checks/debian/copyright/generic-empty/eval/hints b/t/recipes/checks/debian/copyright/generic-empty/eval/hints new file mode 100644 index 0000000..4c97d8f --- /dev/null +++ b/t/recipes/checks/debian/copyright/generic-empty/eval/hints @@ -0,0 +1,2 @@ +generic-empty (source): no-debian-copyright-in-source +generic-empty (binary): no-copyright-file diff --git a/t/recipes/checks/debian/copyright/legacy-binary/build-spec/debian/NEWS.Debian b/t/recipes/checks/debian/copyright/legacy-binary/build-spec/debian/NEWS.Debian new file mode 100644 index 0000000..29f561c --- /dev/null +++ b/t/recipes/checks/debian/copyright/legacy-binary/build-spec/debian/NEWS.Debian @@ -0,0 +1,12 @@ +binary (4-1.1) UNRELEASED; urgency=high + + This is a Debian NEWS entry that isn't encoded properly in UTF-8: . + It also has a usefull speling error. + + -- Russ Allbery Sun, 14 Oct 2007 17:11:36 -0700 + +binary (1) unstable; urgency=low + + This is another entry but this one isn't syntactically valid. + + -- Russ Allbery 2007-10-14 diff --git a/t/recipes/checks/debian/copyright/legacy-binary/build-spec/debian/README.Debian b/t/recipes/checks/debian/copyright/legacy-binary/build-spec/debian/README.Debian new file mode 100644 index 0000000..94bcc0a --- /dev/null +++ b/t/recipes/checks/debian/copyright/legacy-binary/build-spec/debian/README.Debian @@ -0,0 +1,5 @@ +this is a binary package to test lintian's handling of bins. +Check handling of D-Bus and dbus (neither of which should produce +warnings). + + -- Russ Allbery , Wed, 6 Feb 2008 18:35:11 -0800 diff --git a/t/recipes/checks/debian/copyright/legacy-binary/build-spec/debian/changelog.in b/t/recipes/checks/debian/copyright/legacy-binary/build-spec/debian/changelog.in new file mode 100644 index 0000000..39301d6 --- /dev/null +++ b/t/recipes/checks/debian/copyright/legacy-binary/build-spec/debian/changelog.in @@ -0,0 +1,47 @@ +binary ([% $version %]) [% $distribution %]; urgency=low + + * I'm doing an comaintainer-upload, acknowledging a NMU, but with a version + number which suggests I'm doing a NMU myself. + + Lintian-maintainers: Please don't update this changelog, otherwise you'll + probably break the checks/nmu checks. + + -- Jeroen van Wolffelaar Sun, 18 Apr 2004 01:49:42 +0200 + +binary (4-1) unstable; urgency=low + + * Weird version number for the new check for accidents with native + packaging. + * Date was fixed by BR and this test was put on changelog-file-strange-date + due to dpkg bug, see #794674. + + -- Marc 'HE' Brockschmidt Thu, 15 Apr 2004 23:33:51 +0200 + +binary (4) unstable; urgency=low + + * Add big file to /usr/share to trigger the big-usr-share check + + -- Jeroen van Wolffelaar Fri, 27 Feb 2004 10:15:59 +0100 + +binary (3) unstable; urgency=unlimited + + * Add some bogus menu entries using su-to-root in a bogus way + + -- Jeroen van Wolffelaar Thu, 12 Feb 2004 20:11:22 +0100 + +binary (2) unstable; urgency=low + + * Added an INSTALL document which policy 6.3 suggests not to do + + -- Sean 'Shaleh' Perry Tue, 30 Jan 2001 15:23:59 -0800 + +binary (1) unstable; urgency=low + + * hello.c added + * hello-static is same as hello, but compiled statically + * added a menu entry which lacks a Section + * added a postinst + * postinst calls suidregister which is no longer policy compliant + + -- Sean 'Shaleh' Perry Wed, 10 Jan 2001 08:55:34 -0800 + diff --git a/t/recipes/checks/debian/copyright/legacy-binary/build-spec/debian/conffiles b/t/recipes/checks/debian/copyright/legacy-binary/build-spec/debian/conffiles new file mode 100644 index 0000000..d1a0843 --- /dev/null +++ b/t/recipes/checks/debian/copyright/legacy-binary/build-spec/debian/conffiles @@ -0,0 +1 @@ +/etc/menu-methods/lintian diff --git a/t/recipes/checks/debian/copyright/legacy-binary/build-spec/debian/control b/t/recipes/checks/debian/copyright/legacy-binary/build-spec/debian/control new file mode 100644 index 0000000..c797357 --- /dev/null +++ b/t/recipes/checks/debian/copyright/legacy-binary/build-spec/debian/control @@ -0,0 +1,42 @@ +Source: binary +Section: misc +Priority: optional +Maintainer: Lintian Maintainers +Uploaders: Co-maintainer one , Jeroen van Wolffelaar , Co-maintainer three +Standards-Version: 3.2.1 +Homepage: http://lintian.debian.org/ +Vcs-Svn: http://svn.wolffelaar.nl/lintian/trunk +XS-Vcs-Browser: http://svn.wolffelaar.nl/lintian/trunk +XS-Dm-Upload-Allowed: yes + +Package: binary +Architecture: any +Pre-Depends: ${shlibs:Depends}, xorg, binary-data (= ${source:Version}), libssl0.9.8 +Homepage: +Vcs-Svn: http://svn.wolffelaar.nl/lintian/trunk +Description: test handling of binary files + Regression test for lintian's handling of binary files for debian. This + is checked for picky spelling errors. + . + This package list [ subversion | gconf ] should not be flagged as a spelling + mistake. The spelling correction for dont should be correct. + . + Homepage: http://lintian.debian.org/ + +Package: binary-data +Architecture: all +Depends: binary (= ${source:Version}), libssl-not-openssl, + libssl0.9.8 | or-something-else +Description: test handling of binary relationships + Regression test for lintian's checking of package relationships between + arch:any and arch:all packages. + . + This mention of subversion should be flagged as a spelling mistake. + +#Package: binary-comment +#Architecture: space-almonds +#Depends: * +#Depends: * +#Description: test comment support +# Yes, comments are actually allowed in debian/control, so none of the +# above should produce errors. diff --git a/t/recipes/checks/debian/copyright/legacy-binary/build-spec/debian/copyright b/t/recipes/checks/debian/copyright/legacy-binary/build-spec/debian/copyright new file mode 100644 index 0000000..4546c62 --- /dev/null +++ b/t/recipes/checks/debian/copyright/legacy-binary/build-spec/debian/copyright @@ -0,0 +1,15 @@ +hello.c is released under public domain. This is distributed in the hope that +it will be useful, but without any warranty; without even the implied warranty +of merchantability or fitness for a particular purpose. + +A reference to /usr/share/common-licenses/GPL-2 to make it look like this +package is under the GPL and trigger the OpenSSL warning. + +Test for old FSF address: + +Free Software Foundation, Inc., 59 Temple Place - Suite 330, +Boston, MA 02111-1307, USA. + +Test for deprecated nätionäl äncoding. + +Improper capitalization of linux or debian isn't caught here. diff --git a/t/recipes/checks/debian/copyright/legacy-binary/build-spec/debian/doc-base b/t/recipes/checks/debian/copyright/legacy-binary/build-spec/debian/doc-base new file mode 100644 index 0000000..7e5b38f --- /dev/null +++ b/t/recipes/checks/debian/copyright/legacy-binary/build-spec/debian/doc-base @@ -0,0 +1,41 @@ +Document: binary!docs +Title: Broken debian binary doc-base control file +Author: Russ Allbery +Abstract: This control file exercises various tests of doc-base control + files, including several things that aren't tested yet. The third and + fourth one has trailing whitespace. + . + This section has a speling error and bad character. + . + The above separator was fine. +Section: Non/Existant +Unknown: Some field + + + +Format: debiandoc-sgML +Files: /usr/share/doc/binary/binary.sgml.gz +Unknown: Some field + +Format: ESP +Index: /usr/share/doc/binary/binary.txt + +Index: /usr/share/doc/binary/html/index.html + /usr/share/doc/binary/html/ch1.html + /usr/share/doc/binary/html/ch4.html + + +Format: HTML +Index: /usr/share/doc/binary/html/index.html +Files: /usr/share/doc/binary/html/ch?.h*l + /usr/share/doc/binary/hml/*.html + +Format: inFO +Files: /usr/share/info/binary.info.gz + +Format: HTML +Index: /usr/share/doc/binary/html/index.html +Files: /usr/share/doc/binary/html/ch5.html + /usr/share/doc/binary/html/ch6.html + + diff --git a/t/recipes/checks/debian/copyright/legacy-binary/build-spec/debian/goodbye.desktop b/t/recipes/checks/debian/copyright/legacy-binary/build-spec/debian/goodbye.desktop new file mode 100644 index 0000000..f6ce8e3 --- /dev/null +++ b/t/recipes/checks/debian/copyright/legacy-binary/build-spec/debian/goodbye.desktop @@ -0,0 +1,13 @@ +[Desktop Entry] +Name:Goodbye +# Name=Goodbye +Comment=Say hello! +SpecialTag=This doesn't exist! +Exec=goodbye +icon=hello +Terminal=true +Type=Application +Categories=WeirdStuff;Screensaver; +Encoding=ISO-10646-1 +[Other Entry] +Name=Goodbye diff --git a/t/recipes/checks/debian/copyright/legacy-binary/build-spec/debian/hello.desktop b/t/recipes/checks/debian/copyright/legacy-binary/build-spec/debian/hello.desktop new file mode 100644 index 0000000..f795468 --- /dev/null +++ b/t/recipes/checks/debian/copyright/legacy-binary/build-spec/debian/hello.desktop @@ -0,0 +1,14 @@ +# some random comment + +# [Foo Bar] +[KDE Desktop Entry] +Name=Hello +Name[en_US]=Hello +Comment=Say hello! +Exec=kdesu hello +Icon=hello +Terminal=true +Type=Application +Categories=GNOME;GTK;System;Applet;X-Foo;Settings; +Encoding=UTF-8 +OnlyShowIn=GNOME; diff --git a/t/recipes/checks/debian/copyright/legacy-binary/build-spec/debian/menu b/t/recipes/checks/debian/copyright/legacy-binary/build-spec/debian/menu new file mode 100644 index 0000000..e8972f4 --- /dev/null +++ b/t/recipes/checks/debian/copyright/legacy-binary/build-spec/debian/menu @@ -0,0 +1,26 @@ +?package(binary):needs=text title="Hello World" command="/usr/bin/hello" +?package(binary):needs=text section="Applications/System" title="Run cfdisk (0)" command="/usr/bin/su-to-root cfdisk" +?package(binary):needs="text" section="Applications/System/Hardware" title="Run cfdisk (1)" command="sux -p cfdisk" +?package(binary):needs="x11" section="Window Managers" title="Run xfdisk" command="/usr/sbin/su-to-root -c xfdisk" +?package(binary):needs="wm" section="Applications/System/Administration" title="Run fdisk-wm" command="su-to-root -c hello" +?package(binary):section="Apps/Games" title="I'm not root!" command="su-to-root -c imnothere" +?package(binary):needs="text" section="Apps/System" title="I'm not here!" command="/imnothere" +?package(binary,other-binary):\ + needs="text"\ + section="Applications/Shells"\ + title="more than one required"\ + command="other-bin -s omething" +?package(binary):needs="wmmodule" section="WindowManagers/Modules" title="somemodule" command="ModuleCmd" +?package(binary):needs="wmmodule" section="FVWM Modules" title="somemodule" command="ModuleCmd" +?package(binary):needs="text" section="Applications/System/Administration" title="I'm not in /usr/bin!" command="iminusrbin" +?package(binary):needs="text"\ + section="Applications/System/Administration"\ + title="I'm not root!" command="su-to-root -c imnothere" +?package(binary):needs="text" section="Applications/System/Administration"\ + title="Run cfdisk (0)" command="cfdisk" +?package(binary):needs="text" section="Applications/System/Administration" title="Hello World" command="/usr/bin/hello" +?package(binary):needs="wm" section="FVWM Modules" title="Fake Module" command="hello" +?package(binary):needs="fvwmmodule" section="Window Maker" title="Fake Module"\ + command="hello" +?package(binary):needs="x11" section="Applications/System/Hardware" title="Run xfdisk" command="su-to-root -c 'xfdisk -f'" +?package(binary):needs="text" section="Applications/System/Administration" title="foo" command="sh /path/to/foo" diff --git a/t/recipes/checks/debian/copyright/legacy-binary/build-spec/debian/menu-method b/t/recipes/checks/debian/copyright/legacy-binary/build-spec/debian/menu-method new file mode 100644 index 0000000..9f07bd7 --- /dev/null +++ b/t/recipes/checks/debian/copyright/legacy-binary/build-spec/debian/menu-method @@ -0,0 +1,22 @@ +#!/usr/bin/install-menu + +# -*- mode: shell-script; -*- +#I need menu-1! +# + +!include notmenu.h + +compat="menu-2" + +outputencoding="UTF-8"; +outputlanguage="C"; + +x11 = AppEntry("false"); +text = AppEntry("true"); + +startmenu = ""; +endmenu = ""; +submenutitle = ""; +rootprefix = "/var/lib/lintian/menu"; +userprefix = ".local/share/lintian/menu"; + diff --git a/t/recipes/checks/debian/copyright/legacy-binary/build-spec/debian/postinst b/t/recipes/checks/debian/copyright/legacy-binary/build-spec/debian/postinst new file mode 100644 index 0000000..29e1861 --- /dev/null +++ b/t/recipes/checks/debian/copyright/legacy-binary/build-spec/debian/postinst @@ -0,0 +1,6 @@ +#! /bin/bash -e + +if [ $1 eq 'configure' ] +then + suidregister hello-static root root 4755 +fi diff --git a/t/recipes/checks/debian/copyright/legacy-binary/build-spec/debian/rules b/t/recipes/checks/debian/copyright/legacy-binary/build-spec/debian/rules new file mode 100755 index 0000000..a962ea9 --- /dev/null +++ b/t/recipes/checks/debian/copyright/legacy-binary/build-spec/debian/rules @@ -0,0 +1,92 @@ +#!/usr/bin/make -f + +tmp=debian/tmp + +# This reference to $(PWD) should not cause an error but the one below +# should. +build-arch: + make + echo $(PWD) + +build: build-arch + +clean: + make -i clean + [ ! -f debian/files ] || rm -f debian/files + [ ! -f debian/substvars ] || rm -f debian/substvars + [ ! -d debian/tmp ] || rm -rf debian/tmp + [ ! -d debian/binary ] || rm -rf debian/binary + [ ! -d debian/binary-data ] || rm -rf debian/binary-data + +binary-arch: build + install -d $(tmp)/usr/bin + install -d $(tmp)/boot/hello + install -m 755 hello $(tmp)/usr/bin + touch $(tmp)/usr/bin/iminusrbin + chmod 755 $(tmp)/usr/bin/iminusrbin + install -m 755 hello-static $(tmp)/usr/bin + strip $(tmp)/usr/bin/hello-static + install -m 755 hello-static $(tmp)/usr/bin/hello.static + strip --remove-section=.comment --remove-section=.note $(tmp)/usr/bin/hello.static + ln $(tmp)/usr/bin/hello.static $(tmp)/usr/bin/static-hello + install -m 755 hello-static $(tmp)/boot/hello + strip --remove-section=.comment --remove-section=.note $(tmp)/boot/hello/hello-static + install -d $(tmp)/usr/share/doc/binary + install -m 644 INSTALL $(tmp)/usr/share/doc/binary + install -d $(tmp)/usr/share/doc/binary/html + echo '' > $(tmp)/usr/share/doc/binary/html/index.html + echo '' > $(tmp)/usr/share/doc/binary/html/ch1.html + ln -s ../html/./ch1.html $(tmp)/usr/share/doc/binary/html/ch2.html + ln -s /usr/share/doc/binary/htm/ch1.html $(tmp)/usr/share/doc/binary/html/ch3.html + echo '' > $(tmp)/usr/share/doc/binary/html/ch5.html + ln $(tmp)/usr/share/doc/binary/html/ch5.html \ + $(tmp)/usr/share/doc/binary/html/ch6.html + install -d $(tmp)/usr/share/menu + install -d $(tmp)/usr/lib/menu + install -d $(tmp)/usr/share/binary + install -m 644 debian/menu $(tmp)/usr/share/menu/binary + install -m 644 debian/menu $(tmp)/usr/lib/menu/binary + install -d $(tmp)/etc/menu-methods + install -m 755 debian/menu-method $(tmp)/etc/menu-methods/lintian + install -d $(tmp)/usr/share/doc-base + install -m 644 debian/doc-base $(tmp)/usr/share/doc-base/binary + touch '$(tmp)/usr/share/doc-base/space ' + install -m 644 debian/README.Debian $(tmp)/usr/share/doc/binary + install -m 644 debian/NEWS.Debian $(tmp)/usr/share/doc/binary + gzip -n -9 $(tmp)/usr/share/doc/binary/NEWS.Debian + install -m 644 debian/copyright $(tmp)/usr/share/doc/binary + install -m 644 debian/changelog $(tmp)/usr/share/doc/binary + #gzip -n -9 $(tmp)/usr/share/doc/binary/changelog + install -d $(tmp)/DEBIAN + install -m 755 debian/postinst $(tmp)/DEBIAN + install -m 644 debian/conffiles $(tmp)/DEBIAN + + install -d $(tmp)/usr/share/applications + install -m 644 debian/hello.desktop \ + $(tmp)/usr/share/applications/hello.desktop + install -m 755 debian/goodbye.desktop \ + $(tmp)/usr/share/applications/goodbye.desktop + + # should be ok... + echo boe > $(tmp)/usr/bar + ln $(tmp)/usr/bar $(tmp)/usr/foo + # but this isn't + echo boe > $(tmp)/usr/bar2 + ln $(tmp)/usr/bar2 $(tmp)/usr/share/baz + + dd if=/dev/zero of=$(tmp)/usr/share/binary/largefile bs=1024 count=4000 + + install -d debian/binary-data/DEBIAN + install -d debian/binary-data/usr/share/doc + ln -s binary debian/binary-data/usr/share/doc/binary-data + + dpkg-shlibdeps $(tmp)/usr/bin/hello + dpkg-gencontrol -pbinary -isp + dpkg-gencontrol -pbinary-data -Pdebian/binary-data -isp + + dpkg --build debian/tmp .. + dpkg --build debian/binary-data .. + +binary: binary-arch + +.PHONY: build-arch build binary-arch binary clean diff --git a/t/recipes/checks/debian/copyright/legacy-binary/build-spec/debian/templates b/t/recipes/checks/debian/copyright/legacy-binary/build-spec/debian/templates new file mode 100644 index 0000000..3d92861 --- /dev/null +++ b/t/recipes/checks/debian/copyright/legacy-binary/build-spec/debian/templates @@ -0,0 +1,16 @@ +# The debconf templates defined here are the sort that you'd use if +# providing a wordlist and an ispell dictionary for the language +# "perl". This shouldn't trigger warnings about not using debconf-po. + +Template: shared/packages-ispell +Type: text +Description: + +Template: shared/packages-wordlist +Type: text +Description: + +Template: miscfiles/languages +Type: text +Default: perl (Pathologically Eclectic Rubbish Lister) +Description: diff --git a/t/recipes/checks/debian/copyright/legacy-binary/build-spec/fill-values b/t/recipes/checks/debian/copyright/legacy-binary/build-spec/fill-values new file mode 100644 index 0000000..b503871 --- /dev/null +++ b/t/recipes/checks/debian/copyright/legacy-binary/build-spec/fill-values @@ -0,0 +1,5 @@ +Skeleton: upload-non-native +Testname: legacy-binary +Source: binary +Version: 4-1.1 +Description: Legacy test "binary" diff --git a/t/recipes/checks/debian/copyright/legacy-binary/build-spec/orig/INSTALL b/t/recipes/checks/debian/copyright/legacy-binary/build-spec/orig/INSTALL new file mode 100644 index 0000000..3b50ea9 --- /dev/null +++ b/t/recipes/checks/debian/copyright/legacy-binary/build-spec/orig/INSTALL @@ -0,0 +1,176 @@ +Basic Installation +================== + + These are generic installation instructions. + + The `configure' shell script attempts to guess correct values for +various system-dependent variables used during compilation. It uses +those values to create a `Makefile' in each directory of the package. +It may also create one or more `.h' files containing system-dependent +definitions. Finally, it creates a shell script `config.status' that +you can run in the future to recreate the current configuration, a file +`config.cache' that saves the results of its tests to speed up +reconfiguring, and a file `config.log' containing compiler output +(useful mainly for debugging `configure'). + + If you need to do unusual things to compile the package, please try +to figure out how `configure' could check whether to do them, and mail +diffs or instructions to the address given in the `README' so they can +be considered for the next release. If at some point `config.cache' +contains results you don't want to keep, you may remove or edit it. + + The file `configure.in' is used to create `configure' by a program +called `autoconf'. You only need `configure.in' if you want to change +it or regenerate `configure' using a newer version of `autoconf'. + +The simplest way to compile this package is: + + 1. `cd' to the directory containing the package's source code and type + `./configure' to configure the package for your system. If you're + using `csh' on an old version of System V, you might need to type + `sh ./configure' instead to prevent `csh' from trying to execute + `configure' itself. + + Running `configure' takes a while. While running, it prints some + messages telling which features it is checking for. + + 2. Type `make' to compile the package. + + 3. Optionally, type `make check' to run any self-tests that come with + the package. + + 4. Type `make install' to install the programs and any data files and + documentation. + + 5. You can remove the program binaries and object files from the + source code directory by typing `make clean'. To also remove the + files that `configure' created (so you can compile the package for + a different kind of computer), type `make distclean'. There is + also a `make maintainer-clean' target, but that is intended mainly + for the package's developers. If you use it, you may have to get + all sorts of other programs in order to regenerate files that came + with the distribution. + +Compilers and Options +===================== + + Some systems require unusual options for compilation or linking that +the `configure' script does not know about. You can give `configure' +initial values for variables by setting them in the environment. Using +a Bourne-compatible shell, you can do that on the command line like +this: + CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure + +Or on systems that have the `env' program, you can do it like this: + env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure + +Compiling For Multiple Architectures +==================================== + + You can compile the package for more than one kind of computer at the +same time, by placing the object files for each architecture in their +own directory. To do this, you must use a version of `make' that +supports the `VPATH' variable, such as GNU `make'. `cd' to the +directory where you want the object files and executables to go and run +the `configure' script. `configure' automatically checks for the +source code in the directory that `configure' is in and in `..'. + + If you have to use a `make' that does not supports the `VPATH' +variable, you have to compile the package for one architecture at a time +in the source code directory. After you have installed the package for +one architecture, use `make distclean' before reconfiguring for another +architecture. + +Installation Names +================== + + By default, `make install' will install the package's files in +`/usr/local/bin', `/usr/local/man', etc. You can specify an +installation prefix other than `/usr/local' by giving `configure' the +option `--prefix=PATH'. + + You can specify separate installation prefixes for +architecture-specific files and architecture-independent files. If you +give `configure' the option `--exec-prefix=PATH', the package will use +PATH as the prefix for installing programs and libraries. +Documentation and other data files will still use the regular prefix. + + If the package supports it, you can cause programs to be installed +with an extra prefix or suffix on their names by giving `configure' the +option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. + +Optional Features +================= + + Some packages pay attention to `--enable-FEATURE' options to +`configure', where FEATURE indicates an optional part of the package. +They may also pay attention to `--with-PACKAGE' options, where PACKAGE +is something like `gnu-as' or `x' (for the X Window System). The +`README' should mention any `--enable-' and `--with-' options that the +package recognizes. + + For packages that use the X Window System, `configure' can usually +find the X include and library files automatically, but if it doesn't, +you can use the `configure' options `--x-includes=DIR' and +`--x-libraries=DIR' to specify their locations. + +Specifying the System Type +========================== + + There may be some features `configure' can not figure out +automatically, but needs to determine by the type of host the package +will run on. Usually `configure' can figure that out, but if it prints +a message saying it can not guess the host type, give it the +`--host=TYPE' option. TYPE can either be a short name for the system +type, such as `sun4', or a canonical name with three fields: + CPU-COMPANY-SYSTEM + +See the file `config.sub' for the possible values of each field. If +`config.sub' isn't included in this package, then this package doesn't +need to know the host type. + + If you are building compiler tools for cross-compiling, you can also +use the `--target=TYPE' option to select the type of system they will +produce code for and the `--build=TYPE' option to select the type of +system on which you are compiling the package. + +Sharing Defaults +================ + + If you want to set default values for `configure' scripts to share, +you can create a site shell script called `config.site' that gives +default values for variables like `CC', `cache_file', and `prefix'. +`configure' looks for `PREFIX/share/config.site' if it exists, then +`PREFIX/etc/config.site' if it exists. Or, you can set the +`CONFIG_SITE' environment variable to the location of the site script. +A warning: not all `configure' scripts look for a site script. + +Operation Controls +================== + + `configure' recognizes the following options to control how it +operates. + +`--cache-file=FILE' + Use and save the results of the tests in FILE instead of + `./config.cache'. Set FILE to `/dev/null' to disable caching, for + debugging `configure'. + +`--help' + Print a summary of the options to `configure', and exit. + +`--quiet' +`--silent' +`-q' + Do not print messages saying which checks are being made. + +`--srcdir=DIR' + Look for the package's source code in directory DIR. Usually + `configure' can determine that directory automatically. + +`--version' + Print the version of Autoconf used to generate the `configure' + script, and exit. + +`configure' also accepts some other, not widely useful, options. + diff --git a/t/recipes/checks/debian/copyright/legacy-binary/build-spec/orig/Makefile b/t/recipes/checks/debian/copyright/legacy-binary/build-spec/orig/Makefile new file mode 100644 index 0000000..da1dc55 --- /dev/null +++ b/t/recipes/checks/debian/copyright/legacy-binary/build-spec/orig/Makefile @@ -0,0 +1,12 @@ +all: hello hello-static + +hello: hello.c + gcc hello.c -o hello + +hello-static: hello.c + gcc -static hello.c -o hello-static + +clean: + rm -f hello hello-static + +distclean: clean diff --git a/t/recipes/checks/debian/copyright/legacy-binary/build-spec/orig/hello.c b/t/recipes/checks/debian/copyright/legacy-binary/build-spec/orig/hello.c new file mode 100644 index 0000000..2fb04e1 --- /dev/null +++ b/t/recipes/checks/debian/copyright/legacy-binary/build-spec/orig/hello.c @@ -0,0 +1,8 @@ +#include +#include + +int main(int argc, char *argv[]) { + + printf("Hello, World!\n"); + exit(0); +} diff --git a/t/recipes/checks/debian/copyright/legacy-binary/eval/desc b/t/recipes/checks/debian/copyright/legacy-binary/eval/desc new file mode 100644 index 0000000..060c487 --- /dev/null +++ b/t/recipes/checks/debian/copyright/legacy-binary/eval/desc @@ -0,0 +1,2 @@ +Testname: legacy-binary +Check: debian/copyright diff --git a/t/recipes/checks/debian/copyright/legacy-binary/eval/hints b/t/recipes/checks/debian/copyright/legacy-binary/eval/hints new file mode 100644 index 0000000..aaada18 --- /dev/null +++ b/t/recipes/checks/debian/copyright/legacy-binary/eval/hints @@ -0,0 +1,2 @@ +binary (binary): possible-gpl-code-linked-with-openssl +binary (binary): old-fsf-address-in-copyright-file diff --git a/t/recipes/checks/debian/copyright/legacy-binary/eval/post-test b/t/recipes/checks/debian/copyright/legacy-binary/eval/post-test new file mode 100644 index 0000000..3deefd5 --- /dev/null +++ b/t/recipes/checks/debian/copyright/legacy-binary/eval/post-test @@ -0,0 +1,3 @@ +s/arch-dep-package-has-big-usr-share .*kB .*%/arch-dep-package-has-big-usr-share/ +/: hardening-.*/ d +s/\(current is ([0-9]+\.)+[0-9]\)/(current is CURRENT)/ diff --git a/t/recipes/checks/debian/copyright/legacy-debconf/build-spec/debian/changelog.in b/t/recipes/checks/debian/copyright/legacy-debconf/build-spec/debian/changelog.in new file mode 100644 index 0000000..f5e308e --- /dev/null +++ b/t/recipes/checks/debian/copyright/legacy-debconf/build-spec/debian/changelog.in @@ -0,0 +1,6 @@ +debconf ([% $version %]) [% $distribution %]; urgency=low + + * Initial Release + * Changelog line with exactly 80 characters which tests the line-too-long tag. + + -- Lintian Maintainers Wed, 3 May 2006 18:07:19 -0500 diff --git a/t/recipes/checks/debian/copyright/legacy-debconf/build-spec/debian/compat.in b/t/recipes/checks/debian/copyright/legacy-debconf/build-spec/debian/compat.in new file mode 100644 index 0000000..640a566 --- /dev/null +++ b/t/recipes/checks/debian/copyright/legacy-debconf/build-spec/debian/compat.in @@ -0,0 +1 @@ +[% $dh_compat_level %] diff --git a/t/recipes/checks/debian/copyright/legacy-debconf/build-spec/debian/control b/t/recipes/checks/debian/copyright/legacy-debconf/build-spec/debian/control new file mode 100644 index 0000000..bf9f4e9 --- /dev/null +++ b/t/recipes/checks/debian/copyright/legacy-debconf/build-spec/debian/control @@ -0,0 +1,52 @@ +Source: debconf +Section: utils +Priority: optional +Build-Depends: debhelper (>= 4), dpatch +Maintainer: Lintian Maintainers +Standards-Version: 3.7.2 + +Package: debconf-test +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: Test package for the debconf checks of lintian (dummy) + +Package: debconf-test-noscripts +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: Test package for the debconf checks of lintian (noscripts) + Package missing postinst/postrm/config. + . + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. + +Package: debconf-test-preinst +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: Test package for the debconf checks of lintian (preinst) + Package uses debconf only in preinst. + . + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. + +Package: debconf-test-postinst +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: Test package for the debconf checks of lintian (postinst) + Package uses debconf only in postinst. + . + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. + +Package: debconf-udeb +Section: debian-installer +XC-Package-Type: udeb +XB-Installer-Menu-Item: 100 +Architecture: any +Depends: ${shlibs:Depends} +Description: Test udeb package for the debconf checks of lintian (dummy) diff --git a/t/recipes/checks/debian/copyright/legacy-debconf/build-spec/debian/copyright b/t/recipes/checks/debian/copyright/legacy-debconf/build-spec/debian/copyright new file mode 100644 index 0000000..84843ee --- /dev/null +++ b/t/recipes/checks/debian/copyright/legacy-debconf/build-spec/debian/copyright @@ -0,0 +1,10 @@ +Copyright (C) 2004 Frank Lichtenheld + +Test for really old FSF address: + +Free Software Foundation, Inc., 675 Mass Ave, Cambridge, +MA 02139, USA. + +Test for a dh-make boilerplate: +# Please also look if there are files or directories which have a +# different copyright/license attached and list them here. diff --git a/t/recipes/checks/debian/copyright/legacy-debconf/build-spec/debian/debconf-test-noscripts.templates b/t/recipes/checks/debian/copyright/legacy-debconf/build-spec/debian/debconf-test-noscripts.templates new file mode 100644 index 0000000..93f8071 --- /dev/null +++ b/t/recipes/checks/debian/copyright/legacy-debconf/build-spec/debian/debconf-test-noscripts.templates @@ -0,0 +1,3 @@ +Template: debconf/test +Type: text +_description: Foo bar (1) diff --git a/t/recipes/checks/debian/copyright/legacy-debconf/build-spec/debian/debconf-test-postinst.postinst b/t/recipes/checks/debian/copyright/legacy-debconf/build-spec/debian/debconf-test-postinst.postinst new file mode 100644 index 0000000..56ab871 --- /dev/null +++ b/t/recipes/checks/debian/copyright/legacy-debconf/build-spec/debian/debconf-test-postinst.postinst @@ -0,0 +1,10 @@ +#!/bin/sh +set -e + +. /usr/share/debconf/confmodule + +db_input medium debconf/test + +#DEBHELPER# + +true diff --git a/t/recipes/checks/debian/copyright/legacy-debconf/build-spec/debian/debconf-test-postinst.postrm b/t/recipes/checks/debian/copyright/legacy-debconf/build-spec/debian/debconf-test-postinst.postrm new file mode 100644 index 0000000..cbf5e3b --- /dev/null +++ b/t/recipes/checks/debian/copyright/legacy-debconf/build-spec/debian/debconf-test-postinst.postrm @@ -0,0 +1,7 @@ +#!/bin/sh +set -e +if [ "$1" = purge ] && [ -e /usr/share/debconf/confmodule ]; then + . /usr/share/debconf/confmodule + db_purge +fi +#DEBHELPER# diff --git a/t/recipes/checks/debian/copyright/legacy-debconf/build-spec/debian/debconf-test-postinst.templates b/t/recipes/checks/debian/copyright/legacy-debconf/build-spec/debian/debconf-test-postinst.templates new file mode 100644 index 0000000..2a2a8ab --- /dev/null +++ b/t/recipes/checks/debian/copyright/legacy-debconf/build-spec/debian/debconf-test-postinst.templates @@ -0,0 +1,3 @@ +Template: debconf/test +Type: text +_description: Enter something: diff --git a/t/recipes/checks/debian/copyright/legacy-debconf/build-spec/debian/debconf-test-preinst.postrm b/t/recipes/checks/debian/copyright/legacy-debconf/build-spec/debian/debconf-test-preinst.postrm new file mode 100644 index 0000000..cbf5e3b --- /dev/null +++ b/t/recipes/checks/debian/copyright/legacy-debconf/build-spec/debian/debconf-test-preinst.postrm @@ -0,0 +1,7 @@ +#!/bin/sh +set -e +if [ "$1" = purge ] && [ -e /usr/share/debconf/confmodule ]; then + . /usr/share/debconf/confmodule + db_purge +fi +#DEBHELPER# diff --git a/t/recipes/checks/debian/copyright/legacy-debconf/build-spec/debian/debconf-test-preinst.preinst b/t/recipes/checks/debian/copyright/legacy-debconf/build-spec/debian/debconf-test-preinst.preinst new file mode 100644 index 0000000..bf6f074 --- /dev/null +++ b/t/recipes/checks/debian/copyright/legacy-debconf/build-spec/debian/debconf-test-preinst.preinst @@ -0,0 +1,13 @@ +#!/bin/sh +set -e + +# Obsolete name for the confmodule +. /usr/share/debconf/confmodule.sh + +. /usr/share/debconf/confmodule + +db_input medium debconf/test + +#DEBHELPER# + +true diff --git a/t/recipes/checks/debian/copyright/legacy-debconf/build-spec/debian/debconf-test-preinst.templates b/t/recipes/checks/debian/copyright/legacy-debconf/build-spec/debian/debconf-test-preinst.templates new file mode 100644 index 0000000..2a2a8ab --- /dev/null +++ b/t/recipes/checks/debian/copyright/legacy-debconf/build-spec/debian/debconf-test-preinst.templates @@ -0,0 +1,3 @@ +Template: debconf/test +Type: text +_description: Enter something: diff --git a/t/recipes/checks/debian/copyright/legacy-debconf/build-spec/debian/debconf-test.config b/t/recipes/checks/debian/copyright/legacy-debconf/build-spec/debian/debconf-test.config new file mode 100644 index 0000000..9e32d06 --- /dev/null +++ b/t/recipes/checks/debian/copyright/legacy-debconf/build-spec/debian/debconf-test.config @@ -0,0 +1,24 @@ +#!/bin/sh + +set -e + +. /usr/share/debconf/confmodule + +db_settitle "Funky lintian test" + +# Bad priorities. +db_text LOW debconf/test +db_input normal debconf/test + +# Valid priorities. +db_text \ +high debconf/test +foo=medium +db_input $foo debconf/test +db_input "$foo" debconf/test +db_input 'medium' debconf/test + +# debconf/transtring should not be flagged as unused +# (it's aliased to debconf/alias, which is used) +db_register debconf/transtring debconf/alias +db_input medium debconf/alias diff --git a/t/recipes/checks/debian/copyright/legacy-debconf/build-spec/debian/debconf-test.postinst b/t/recipes/checks/debian/copyright/legacy-debconf/build-spec/debian/debconf-test.postinst new file mode 100644 index 0000000..b387037 --- /dev/null +++ b/t/recipes/checks/debian/copyright/legacy-debconf/build-spec/debian/debconf-test.postinst @@ -0,0 +1,10 @@ +#!/bin/sh + +set -e + +. /usr/share/debconf/confmodule + +# Not supposed to do this here. +db_input medium debconf/test + +true diff --git a/t/recipes/checks/debian/copyright/legacy-debconf/build-spec/debian/debconf-test.templates b/t/recipes/checks/debian/copyright/legacy-debconf/build-spec/debian/debconf-test.templates new file mode 100644 index 0000000..811bb6c --- /dev/null +++ b/t/recipes/checks/debian/copyright/legacy-debconf/build-spec/debian/debconf-test.templates @@ -0,0 +1,101 @@ +Template: debconf/test +Type: text +_description: Foo bar (1) + +Template: debconf/testmulti +Type: multiselect +__Choices: foo, bar, boo +_Description: test comma usages in choices fields + +Template: debconf/testmulti-escape +Type: multiselect +_Choices: foo\, bar, boo +_Description: test escaped comma usages in choices fields: + +Template: debconf/testboolean +Type: boolean +_Description: Enter yes or no: + Do you want to answer this question? + +Template: debconf/teststring +Type: string +_Description: This template goes on and on. + This template goes on and on. + This template goes on and on. + This template goes on and on. + This template goes on and on. + This template goes on and on. + This template goes on and on. + This template goes on and on. + This template goes on and on. + This template goes on and on. + This template goes on and on. + This template goes on and on. + This template goes on and on. + This template goes on and on. + This template goes on and on. + This template goes on and on. + This template goes on and on. + This template goes on and on. + This template goes on and on. + This template goes on and on. + This template goes on and on. + This template goes on and on. + +Template: debconf/testnote +Type: note +Description: This should be a title and not a really long sentence that ends in a regular period. + +Template: debconf/1st-person +Type: select +__Choices: one, two +_Description: Select one of these: + I am a stupid test of first-person syntax that tells you to select yes + even though yes isn't an option in this prompt. + +Template: debconf/internal +Type: boolean +Description: For internal use only + We are testing that style checks are not applied to templates that are + marked as internal. + +Template: debconf/no-description +Type: string + +Template: debconf/translate +Type: boolean +_Default: false +_Description: Should this really be translated? + +Template: debconf/transtring +Type: string +_Default: 1 +_Description: Count of templates: + The number of useless numbers that a translator would have to translate + for this template. + +Template: debconf/language +__Choices: English, Spanish, German, French +# This is the default choice. Translators should put their own language, +# if available, here instead, but the value MUST be the English version +# of the value for the package scripts to work properly. +_Default: English[ translators, see the comment in the PO files] +_Description: The default language, an example of a default that should + be translated. + +Template: debconf/error +Type: error +_Description: An error occurred + This is a sample Debconf error template. + +Template: debconf/should-be-boolean +Type: select +__Choices: yes, no +_Description: Choose: + Pick yes or no. + +Template: debconf/should-be-no-longer-a-problem +Type: boolean +_Description: Decide, lintian + Using "no longer" should no longer be detected as + making-assumptions-about-interfaces-in-templates by lintian. diff --git a/t/recipes/checks/debian/copyright/legacy-debconf/build-spec/debian/debconf-test.templates.de b/t/recipes/checks/debian/copyright/legacy-debconf/build-spec/debian/debconf-test.templates.de new file mode 100644 index 0000000..f9ea121 --- /dev/null +++ b/t/recipes/checks/debian/copyright/legacy-debconf/build-spec/debian/debconf-test.templates.de @@ -0,0 +1,3 @@ +Template: debconf/testmulti +Type: multiselect +Choices: foo, bar\, boo, boo diff --git a/t/recipes/checks/debian/copyright/legacy-debconf/build-spec/debian/debconf-test.templates.in b/t/recipes/checks/debian/copyright/legacy-debconf/build-spec/debian/debconf-test.templates.in new file mode 100644 index 0000000..e69de29 diff --git a/t/recipes/checks/debian/copyright/legacy-debconf/build-spec/debian/debconf-udeb.postinst b/t/recipes/checks/debian/copyright/legacy-debconf/build-spec/debian/debconf-udeb.postinst new file mode 100644 index 0000000..4ce41f0 --- /dev/null +++ b/t/recipes/checks/debian/copyright/legacy-debconf/build-spec/debian/debconf-udeb.postinst @@ -0,0 +1,9 @@ +#!/bin/sh + +set -e + +. /usr/share/debconf/confmodule + +ldconfig + +true diff --git a/t/recipes/checks/debian/copyright/legacy-debconf/build-spec/debian/debconf-udeb.templates b/t/recipes/checks/debian/copyright/legacy-debconf/build-spec/debian/debconf-udeb.templates new file mode 100644 index 0000000..5d7cf5a --- /dev/null +++ b/t/recipes/checks/debian/copyright/legacy-debconf/build-spec/debian/debconf-udeb.templates @@ -0,0 +1,3 @@ +Template: debian-installer/debconf-udeb/title +Type: text +_description: This is just a test diff --git a/t/recipes/checks/debian/copyright/legacy-debconf/build-spec/debian/po/POTFILES.in b/t/recipes/checks/debian/copyright/legacy-debconf/build-spec/debian/po/POTFILES.in new file mode 100644 index 0000000..d0c82f0 --- /dev/null +++ b/t/recipes/checks/debian/copyright/legacy-debconf/build-spec/debian/po/POTFILES.in @@ -0,0 +1,2 @@ +[type: gettext/rfc822deb] debconf-test.templates +[type: gettext/rfc822deb] debconf-udeb.templates diff --git a/t/recipes/checks/debian/copyright/legacy-debconf/build-spec/debian/po/de.po b/t/recipes/checks/debian/copyright/legacy-debconf/build-spec/debian/po/de.po new file mode 100644 index 0000000..86c5796 --- /dev/null +++ b/t/recipes/checks/debian/copyright/legacy-debconf/build-spec/debian/po/de.po @@ -0,0 +1,66 @@ +# +# Translators, if you are not familiar with the PO format, gettext +# documentation is worth reading, especially sections dedicated to +# this format, e.g. by running: +# info -n '(gettext)PO Files' +# info -n '(gettext)Header Entry' +# +# Some information specific to po-debconf are available at +# /usr/share/doc/po-debconf/README-trans +# or http://www.debian.org/intl/l10n/po-debconf/README-trans +# +# Developers do not need to manually edit POT or PO files. +# +msgid "" +msgstr "" +"Project-Id-Version: debconf-test 1\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2004-12-06 00:51+0100\n" +"PO-Revision-Date: 2004-12-06 01:01+0100\n" +"Last-Translator: Frank Lichtenheld \n" +"Language-Team: debian-l10n-german@l.d.o\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Type: text +#. description +#: ../debconf-test.templates:3 +msgid "Foo bar (2)" +msgstr "" + +#. Type: multiselect +#. Choices +#: ../debconf-test.templates:7 +msgid "foo" +msgstr "foo" + +#. Type: multiselect +#. Choices +#: ../debconf-test.templates:7 +msgid "bar" +msgstr "bar, boo" + +#. Type: multiselect +#. Choices +#: ../debconf-test.templates:7 +msgid "boo" +msgstr "boo" + +#. Type: multiselect +#. Description +#: ../debconf-test.templates:8 +msgid "test comma usages in choices fields" +msgstr "" + +#. Type: multiselect +#. Choices +#: ../debconf-test.templates:11 +msgid "foo\\, bar, boo" +msgstr "foo, bar, boo" + +#. Type: text +#. description +#: ../debconf-udeb.templates:3 +msgid "This is just a test" +msgstr "Dies ist nur ein Test" diff --git a/t/recipes/checks/debian/copyright/legacy-debconf/build-spec/debian/po/fr.po b/t/recipes/checks/debian/copyright/legacy-debconf/build-spec/debian/po/fr.po new file mode 100644 index 0000000..c74deb2 --- /dev/null +++ b/t/recipes/checks/debian/copyright/legacy-debconf/build-spec/debian/po/fr.po @@ -0,0 +1,60 @@ +# +# Translators, if you are not familiar with the PO format, gettext +# documentation is worth reading, especially sections dedicated to +# this format, e.g. by running: +# info -n '(gettext)PO Files' +# info -n '(gettext)Header Entry' +# +# Some information specific to po-debconf are available at +# /usr/share/doc/po-debconf/README-trans +# or http://www.debian.org/intl/l10n/po-debconf/README-trans +# +# Developers do not need to manually edit POT or PO files. +# +msgid "" +msgstr "" +"Project-Id-Version: debconf-test 1\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2004-12-06 00:51+0100\n" +"PO-Revision-Date: 2005-10-13 15:03+0200\n" +"Last-Translator: Frank Lichtenheld \n" +"Language-Team: debian-l10n-german@l.d.o\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=CHARSET\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Type: text +#. description +#: ../debconf-test.templates:3 +msgid "Foo bar (2)" +msgstr "" + +#. Type: multiselect +#. Choices +#: ../debconf-test.templates:7 +msgid "foo" +msgstr "foo" + +#. Type: multiselect +#. Choices +#: ../debconf-test.templates:7 +msgid "bar" +msgstr "bar, boo" + +#. Type: multiselect +#. Choices +#: ../debconf-test.templates:7 +msgid "boo" +msgstr "boo" + +#. Type: multiselect +#. Description +#: ../debconf-test.templates:8 +msgid "test comma usages in choices fields" +msgstr "" + +#. Type: text +#. description +#: ../debconf-udeb.templates:3 +msgid "This is just a test" +msgstr " diff --git a/t/recipes/checks/debian/copyright/legacy-debconf/build-spec/debian/po/lang.po b/t/recipes/checks/debian/copyright/legacy-debconf/build-spec/debian/po/lang.po new file mode 100644 index 0000000..7ac498a --- /dev/null +++ b/t/recipes/checks/debian/copyright/legacy-debconf/build-spec/debian/po/lang.po @@ -0,0 +1,15 @@ +msgid "" +msgstr "" +"Project-Id-Version: debconf-test 1\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2004-12-06 00:51+0100\n" +"PO-Revision-Date: 2005-10-13 15:03+0200\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Type: text +#. description +#: ../debconf-test.templates:3 +msgid "Foo bar (2)" +msgstr "" diff --git a/t/recipes/checks/debian/copyright/legacy-debconf/build-spec/debian/po/nds.po b/t/recipes/checks/debian/copyright/legacy-debconf/build-spec/debian/po/nds.po new file mode 100644 index 0000000..7ac498a --- /dev/null +++ b/t/recipes/checks/debian/copyright/legacy-debconf/build-spec/debian/po/nds.po @@ -0,0 +1,15 @@ +msgid "" +msgstr "" +"Project-Id-Version: debconf-test 1\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2004-12-06 00:51+0100\n" +"PO-Revision-Date: 2005-10-13 15:03+0200\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Type: text +#. description +#: ../debconf-test.templates:3 +msgid "Foo bar (2)" +msgstr "" diff --git a/t/recipes/checks/debian/copyright/legacy-debconf/build-spec/debian/po/output b/t/recipes/checks/debian/copyright/legacy-debconf/build-spec/debian/po/output new file mode 100644 index 0000000..c3df1a5 --- /dev/null +++ b/t/recipes/checks/debian/copyright/legacy-debconf/build-spec/debian/po/output @@ -0,0 +1 @@ +2 utf8 diff --git a/t/recipes/checks/debian/copyright/legacy-debconf/build-spec/debian/po/pt_BR.po b/t/recipes/checks/debian/copyright/legacy-debconf/build-spec/debian/po/pt_BR.po new file mode 100644 index 0000000..7ac498a --- /dev/null +++ b/t/recipes/checks/debian/copyright/legacy-debconf/build-spec/debian/po/pt_BR.po @@ -0,0 +1,15 @@ +msgid "" +msgstr "" +"Project-Id-Version: debconf-test 1\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2004-12-06 00:51+0100\n" +"PO-Revision-Date: 2005-10-13 15:03+0200\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Type: text +#. description +#: ../debconf-test.templates:3 +msgid "Foo bar (2)" +msgstr "" diff --git a/t/recipes/checks/debian/copyright/legacy-debconf/build-spec/debian/po/sample-file.po b/t/recipes/checks/debian/copyright/legacy-debconf/build-spec/debian/po/sample-file.po new file mode 100644 index 0000000..8dcc0ff --- /dev/null +++ b/t/recipes/checks/debian/copyright/legacy-debconf/build-spec/debian/po/sample-file.po @@ -0,0 +1 @@ +This is some file that isn't actually a valid .po file. diff --git a/t/recipes/checks/debian/copyright/legacy-debconf/build-spec/debian/po/templates.pot b/t/recipes/checks/debian/copyright/legacy-debconf/build-spec/debian/po/templates.pot new file mode 100644 index 0000000..914c77f --- /dev/null +++ b/t/recipes/checks/debian/copyright/legacy-debconf/build-spec/debian/po/templates.pot @@ -0,0 +1,61 @@ +# +# Translators, if you are not familiar with the PO format, gettext +# documentation is worth reading, especially sections dedicated to +# this format, e.g. by running: +# info -n '(gettext)PO Files' +# info -n '(gettext)Header Entry' +# +# Some information specific to po-debconf are available at +# /usr/share/doc/po-debconf/README-trans +# or http://www.debian.org/intl/l10n/po-debconf/README-trans +# +# Developers do not need to manually edit POT or PO files. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2004-12-06 00:51+0100\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=CHARSET\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Type: text +#. description +#: ../debconf-test.templates:3 +msgid "Foo bar (2)" +msgstr "" + +#. Type: multiselect +#. Choices +#: ../debconf-test.templates:7 +msgid "foo" +msgstr "" + +#. Type: multiselect +#. Choices +#: ../debconf-test.templates:7 +msgid "bar" +msgstr "" + +#. Type: multiselect +#. Choices +#: ../debconf-test.templates:7 +msgid "boo" +msgstr "" + +#. Type: multiselect +#. Description +#: ../debconf-test.templates:8 +msgid "test comma usages in choices fields" +msgstr "" + +#. Type: text +#. description +#: ../debconf-udeb.templates:3 +msgid "This is just a test" +msgstr "" diff --git a/t/recipes/checks/debian/copyright/legacy-debconf/build-spec/debian/pycompat b/t/recipes/checks/debian/copyright/legacy-debconf/build-spec/debian/pycompat new file mode 100644 index 0000000..0cfbf08 --- /dev/null +++ b/t/recipes/checks/debian/copyright/legacy-debconf/build-spec/debian/pycompat @@ -0,0 +1 @@ +2 diff --git a/t/recipes/checks/debian/copyright/legacy-debconf/build-spec/debian/pyversions b/t/recipes/checks/debian/copyright/legacy-debconf/build-spec/debian/pyversions new file mode 100644 index 0000000..6f290b0 --- /dev/null +++ b/t/recipes/checks/debian/copyright/legacy-debconf/build-spec/debian/pyversions @@ -0,0 +1 @@ +>= 2.7 diff --git a/t/recipes/checks/debian/copyright/legacy-debconf/build-spec/debian/rules b/t/recipes/checks/debian/copyright/legacy-debconf/build-spec/debian/rules new file mode 100755 index 0000000..933901a --- /dev/null +++ b/t/recipes/checks/debian/copyright/legacy-debconf/build-spec/debian/rules @@ -0,0 +1,64 @@ +#!/usr/bin/make -f + +deb_dir = debian/debconf +udeb_dir = debian/debconf-udeb +build_dirs = $(deb_dir) $(udeb_dir) + +build-indep: +# There are no architecture-independent files to be built +# by this package. If there were any they would be made +# here. + +build-arch: + dh_testdir + touch build + +build: build-indep build-arch + +clean: + dh_testdir + dh_testroot + -rm -f build + + dh_clean + +binary-indep: build +# There are no architecture-independent files to be uploaded +# generated by this package. If there were any they would be +# made here. + +binary-arch: build + dh_testdir + dh_testroot + dh_prep + dh_installdirs -a + + dh_installchangelogs -a + dh_installdocs -a + dh_installdebconf -pdebconf-test + dh_installdebconf -pdebconf-test-noscripts --noscripts + dh_installdebconf -pdebconf-test-preinst --noscripts + dh_installdebconf -pdebconf-test-postinst --noscripts + dh_installdebconf -pdebconf-udeb + + + + + dh_compress -a + dh_fixperms -a + +# The shlibs stuff doesn't matter here so do it in a weird order to +# test warnings. + dh_installdeb -a + dh_shlibdeps -a + dh_makeshlibs -a + dh_gencontrol -a + dh_md5sums + dh_builddeb -a + dh_makeshlibs -a + +# Below here is fairly generic really + +binary: binary-indep binary-arch + +.PHONY: build-arch build-indep build binary binary-arch binary-indep clean checkroot diff --git a/t/recipes/checks/debian/copyright/legacy-debconf/build-spec/fill-values b/t/recipes/checks/debian/copyright/legacy-debconf/build-spec/fill-values new file mode 100644 index 0000000..186615f --- /dev/null +++ b/t/recipes/checks/debian/copyright/legacy-debconf/build-spec/fill-values @@ -0,0 +1,6 @@ +Skeleton: upload-native +Testname: legacy-debconf +Source: debconf +Version: 1~rc1 +Description: Legacy test "debconf" +Default-Build-Depends: debhelper (>= [% $dh_compat_level %]~) diff --git a/t/recipes/checks/debian/copyright/legacy-debconf/eval/desc b/t/recipes/checks/debian/copyright/legacy-debconf/eval/desc new file mode 100644 index 0000000..6ea363a --- /dev/null +++ b/t/recipes/checks/debian/copyright/legacy-debconf/eval/desc @@ -0,0 +1,2 @@ +Testname: legacy-debconf +Check: debian/copyright diff --git a/t/recipes/checks/debian/copyright/legacy-debconf/eval/hints b/t/recipes/checks/debian/copyright/legacy-debconf/eval/hints new file mode 100644 index 0000000..bed3522 --- /dev/null +++ b/t/recipes/checks/debian/copyright/legacy-debconf/eval/hints @@ -0,0 +1,8 @@ +debconf-test-preinst (binary): old-fsf-address-in-copyright-file +debconf-test-preinst (binary): copyright-contains-dh_make-todo-boilerplate +debconf-test-postinst (binary): old-fsf-address-in-copyright-file +debconf-test-postinst (binary): copyright-contains-dh_make-todo-boilerplate +debconf-test-noscripts (binary): old-fsf-address-in-copyright-file +debconf-test-noscripts (binary): copyright-contains-dh_make-todo-boilerplate +debconf-test (binary): old-fsf-address-in-copyright-file +debconf-test (binary): copyright-contains-dh_make-todo-boilerplate diff --git a/t/recipes/checks/debian/copyright/legacy-debconf/eval/post-test b/t/recipes/checks/debian/copyright/legacy-debconf/eval/post-test new file mode 100644 index 0000000..faeef0b --- /dev/null +++ b/t/recipes/checks/debian/copyright/legacy-debconf/eval/post-test @@ -0,0 +1 @@ +s/\(current is ([0-9]+\.)+[0-9]\)/(current is CURRENT)/ diff --git a/t/recipes/checks/debian/copyright/legacy-etcfiles/build-spec/debian/README.Debian b/t/recipes/checks/debian/copyright/legacy-etcfiles/build-spec/debian/README.Debian new file mode 100644 index 0000000..e289bfb --- /dev/null +++ b/t/recipes/checks/debian/copyright/legacy-etcfiles/build-spec/debian/README.Debian @@ -0,0 +1,5 @@ +this is a package to test lintian's handling of files in /etc. +Also, there's a random mention of /usr/doc here to prompt a warning. +But /usr/documentation doesn't. + + -- Russ Allbery , Mon, 18 Feb 2008 16:40:55 -0800 diff --git a/t/recipes/checks/debian/copyright/legacy-etcfiles/build-spec/debian/changelog.in b/t/recipes/checks/debian/copyright/legacy-etcfiles/build-spec/debian/changelog.in new file mode 100644 index 0000000..00cdc77 --- /dev/null +++ b/t/recipes/checks/debian/copyright/legacy-etcfiles/build-spec/debian/changelog.in @@ -0,0 +1,7 @@ +etcfiles ([% $version %]) [% $distribution %]; urgency=low + + * Acknowledge NMU (Closes: #123456). + * initial setup + + -- Lintian Maintainers Fri, 21 Sep 2001 11:56:02 -0700 + diff --git a/t/recipes/checks/debian/copyright/legacy-etcfiles/build-spec/debian/conffiles b/t/recipes/checks/debian/copyright/legacy-etcfiles/build-spec/debian/conffiles new file mode 100644 index 0000000..76032b7 --- /dev/null +++ b/t/recipes/checks/debian/copyright/legacy-etcfiles/build-spec/debian/conffiles @@ -0,0 +1,5 @@ +/etc/proper +/var/lib/foo +/etc/cron.daily/cronfile-normal +/etc/cron.daily/.cronfile-begins-with-fullstop +/etc/cron.daily/cronfile-contains.fullstop diff --git a/t/recipes/checks/debian/copyright/legacy-etcfiles/build-spec/debian/conffiles.only b/t/recipes/checks/debian/copyright/legacy-etcfiles/build-spec/debian/conffiles.only new file mode 100644 index 0000000..a4b3895 --- /dev/null +++ b/t/recipes/checks/debian/copyright/legacy-etcfiles/build-spec/debian/conffiles.only @@ -0,0 +1,2 @@ +/etc/etcfiles/foo +/etc/etcfiles/bar diff --git a/t/recipes/checks/debian/copyright/legacy-etcfiles/build-spec/debian/control b/t/recipes/checks/debian/copyright/legacy-etcfiles/build-spec/debian/control new file mode 100644 index 0000000..f3dbda7 --- /dev/null +++ b/t/recipes/checks/debian/copyright/legacy-etcfiles/build-spec/debian/control @@ -0,0 +1,20 @@ +Source: etcfiles +Section: misc +Priority: optional +Maintainer: Lintian Maintainers +Standards-Version: 3.5.0 + +Package: etcfiles +Architecture: any +Depends: ${shlibs:Depends} +Description: test handling of files in /etc + Regression test for lintian's handling of files in /etc. + . + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. + +Package: only-etcfiles +Architecture: all +Depends: etcfiles (= ${source:Version}) +Description: test handling of conffile-only package diff --git a/t/recipes/checks/debian/copyright/legacy-etcfiles/build-spec/debian/rules b/t/recipes/checks/debian/copyright/legacy-etcfiles/build-spec/debian/rules new file mode 100755 index 0000000..97ff09f --- /dev/null +++ b/t/recipes/checks/debian/copyright/legacy-etcfiles/build-spec/debian/rules @@ -0,0 +1,64 @@ +#!/usr/bin/make -f + +tmp=debian/tmp +tmponly=debian/only-etcfiles + +clean: + rm -f debian/files debian/substvars + rm -rf debian/tmp + rm -rf debian/only-etcfiles + +build: +build-arch: +build-indep: +binary-indep: + install -d $(tmp)/etc + install -m 644 proper $(tmp)/etc + install -m 644 improper $(tmp)/etc + mkdir $(tmp)/etc/cron.daily + touch $(tmp)/etc/cron.daily/cronfile-normal + touch $(tmp)/etc/cron.daily/.cronfile-begins-with-fullstop + touch $(tmp)/etc/cron.daily/cronfile-contains.fullstop + ln $(tmp)/etc/improper $(tmp)/etc/improper-link + install -d $(tmp)/usr/share/doc/etcfiles + install -d $(tmp)/var/lib + install -m 644 proper $(tmp)/var/lib/foo + install -m 644 debian/README.Debian $(tmp)/usr/share/doc/etcfiles + install -m 644 debian/changelog $(tmp)/usr/share/doc/etcfiles + #gzip -9 $(tmp)/usr/share/doc/etcfiles/changelog + install -d $(tmp)/DEBIAN + install -m 644 debian/conffiles $(tmp)/DEBIAN + + echo 'd41d8cd98f00b204e9800998ecf8427e ./etc/cron.daily/cronfile-normal' \ + > debian/tmp/DEBIAN/md5sums + echo 'd41d8cd98f00b204e9800998ecf8427e ./etc/cron.daily/.cronfile-begins-with-fullstop' \ + >> debian/tmp/DEBIAN/md5sums + echo 'd41d8cd98f00b204e9800998ecf8427e ./etc/cron.daily/cronfile-contains.fullstop' \ + >> debian/tmp/DEBIAN/md5sums + echo '05c72cacce994208128b7d081116b04a ./etc/proper' \ + >> debian/tmp/DEBIAN/md5sums + echo 'ab371382468880299e5ebd05921764ce etc/improper' \ + >> debian/tmp/DEBIAN/md5sums + echo 'ab371382468880299e5ebd05921764ce usr/bin/foo' \ + >> debian/tmp/DEBIAN/md5sums + echo 'this is a malformed line' \ + >> debian/tmp/DEBIAN/md5sums + echo '56fb27e455dd86d8801f1ecd3a4cee49 usr/share/doc/etcfiles/README.Debian' \ + >> debian/tmp/DEBIAN/md5sums + + install -d $(tmponly)/etc/etcfiles + touch $(tmponly)/etc/etcfiles/foo + touch $(tmponly)/etc/etcfiles/bar + install -d $(tmponly)/usr/share/doc + cd $(tmponly)/usr/share/doc && ln -s etcfiles only-etcfiles + install -d $(tmponly)/DEBIAN + install -m 644 debian/conffiles.only $(tmponly)/DEBIAN/conffiles + + dpkg-gencontrol -isp -petcfiles + dpkg-gencontrol -isp -ponly-etcfiles -P$(tmponly) + dpkg --build $(tmp) .. + dpkg --build $(tmponly) .. + +binary: binary-indep + +.PHONY: binary-indep binary clean diff --git a/t/recipes/checks/debian/copyright/legacy-etcfiles/build-spec/fill-values b/t/recipes/checks/debian/copyright/legacy-etcfiles/build-spec/fill-values new file mode 100644 index 0000000..86deb10 --- /dev/null +++ b/t/recipes/checks/debian/copyright/legacy-etcfiles/build-spec/fill-values @@ -0,0 +1,5 @@ +Skeleton: upload-native +Testname: legacy-etcfiles +Source: etcfiles +Version: 1 +Description: Legacy test "etcfiles" diff --git a/t/recipes/checks/debian/copyright/legacy-etcfiles/build-spec/orig/improper b/t/recipes/checks/debian/copyright/legacy-etcfiles/build-spec/orig/improper new file mode 100644 index 0000000..23656f4 --- /dev/null +++ b/t/recipes/checks/debian/copyright/legacy-etcfiles/build-spec/orig/improper @@ -0,0 +1,2 @@ +[config] + var = value \ No newline at end of file diff --git a/t/recipes/checks/debian/copyright/legacy-etcfiles/build-spec/orig/proper b/t/recipes/checks/debian/copyright/legacy-etcfiles/build-spec/orig/proper new file mode 100644 index 0000000..f3dc68b --- /dev/null +++ b/t/recipes/checks/debian/copyright/legacy-etcfiles/build-spec/orig/proper @@ -0,0 +1,2 @@ +# i am a config file +foo = var \ No newline at end of file diff --git a/t/recipes/checks/debian/copyright/legacy-etcfiles/eval/desc b/t/recipes/checks/debian/copyright/legacy-etcfiles/eval/desc new file mode 100644 index 0000000..1782fc0 --- /dev/null +++ b/t/recipes/checks/debian/copyright/legacy-etcfiles/eval/desc @@ -0,0 +1,2 @@ +Testname: legacy-etcfiles +Check: debian/copyright diff --git a/t/recipes/checks/debian/copyright/legacy-etcfiles/eval/hints b/t/recipes/checks/debian/copyright/legacy-etcfiles/eval/hints new file mode 100644 index 0000000..2ebfa16 --- /dev/null +++ b/t/recipes/checks/debian/copyright/legacy-etcfiles/eval/hints @@ -0,0 +1 @@ +etcfiles (binary): no-copyright-file diff --git a/t/recipes/checks/debian/copyright/legacy-etcfiles/eval/post-test b/t/recipes/checks/debian/copyright/legacy-etcfiles/eval/post-test new file mode 100644 index 0000000..faeef0b --- /dev/null +++ b/t/recipes/checks/debian/copyright/legacy-etcfiles/eval/post-test @@ -0,0 +1 @@ +s/\(current is ([0-9]+\.)+[0-9]\)/(current is CURRENT)/ diff --git a/t/recipes/checks/debian/copyright/legacy-fields/build-spec/debian/changelog.in b/t/recipes/checks/debian/copyright/legacy-fields/build-spec/debian/changelog.in new file mode 100644 index 0000000..38fc4e9 --- /dev/null +++ b/t/recipes/checks/debian/copyright/legacy-fields/build-spec/debian/changelog.in @@ -0,0 +1,10 @@ +fields ([% $version %]) [% $distribution %]; urgency=low + + * This package adds tests for the following tags: + - debian-revision-not-well-formed + - depends-on-python-minimal + - essential-no-not-needed + - debian-revision-should-not-be-zero + - new-essential-package + + -- Tobias Quathamer Sun, 10 Apr 2011 14:30:00 +0100 diff --git a/t/recipes/checks/debian/copyright/legacy-fields/build-spec/debian/control b/t/recipes/checks/debian/copyright/legacy-fields/build-spec/debian/control new file mode 100644 index 0000000..d980a6e --- /dev/null +++ b/t/recipes/checks/debian/copyright/legacy-fields/build-spec/debian/control @@ -0,0 +1,28 @@ +Source: fields +Section: does-not-exist +Priority: standard +Maintainer: Lintian Maintainers +Standards-Version: 3.9.2 + +Package: fields +Essential: no +Architecture: all +Depends: python-minimal +Description: Generate some errors + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. + +Package: another-version +Essential: yes +Section: admin +Architecture: all +Description: Also generate some errors + This package gets another version number and tries to sneak in a new + essential package. + . + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. diff --git a/t/recipes/checks/debian/copyright/legacy-fields/build-spec/debian/rules b/t/recipes/checks/debian/copyright/legacy-fields/build-spec/debian/rules new file mode 100755 index 0000000..11ad4a7 --- /dev/null +++ b/t/recipes/checks/debian/copyright/legacy-fields/build-spec/debian/rules @@ -0,0 +1,33 @@ +#!/usr/bin/make -f + +tmp=debian/tmp + +build-arch: + +build-indep: + +build: build-arch build-indep + +binary-arch: + +binary-indep: + install -d $(tmp)/usr/share/doc/fields + install -m 644 debian/changelog \ + $(tmp)/usr/share/doc/fields/changelog + gzip -n -9 $(tmp)/usr/share/doc/fields/changelog + dh_md5sums -pfields -P$(tmp) + dpkg-gencontrol -pfields -P$(tmp) + dpkg --build $(tmp) .. + rm -rf $(tmp) + + # Create another package with a different version + dh_md5sums -panother-version -P$(tmp) + dpkg-gencontrol -panother-version -v123.4-0 -P$(tmp) + dpkg --build $(tmp) .. + +binary: binary-arch binary-indep + +clean: + rm -rf debian/files $(tmp) debian/substvars + +.PHONY: build-arch build-indep build binary-arch binary-indep binary clean diff --git a/t/recipes/checks/debian/copyright/legacy-fields/build-spec/fill-values b/t/recipes/checks/debian/copyright/legacy-fields/build-spec/fill-values new file mode 100644 index 0000000..fe90eb0 --- /dev/null +++ b/t/recipes/checks/debian/copyright/legacy-fields/build-spec/fill-values @@ -0,0 +1,5 @@ +Skeleton: upload-non-native +Testname: legacy-fields +Source: fields +Version: 1.5-.3 +Description: Legacy test "fields" diff --git a/t/recipes/checks/debian/copyright/legacy-fields/eval/desc b/t/recipes/checks/debian/copyright/legacy-fields/eval/desc new file mode 100644 index 0000000..10be13b --- /dev/null +++ b/t/recipes/checks/debian/copyright/legacy-fields/eval/desc @@ -0,0 +1,2 @@ +Testname: legacy-fields +Check: debian/copyright diff --git a/t/recipes/checks/debian/copyright/legacy-fields/eval/hints b/t/recipes/checks/debian/copyright/legacy-fields/eval/hints new file mode 100644 index 0000000..6ce7d6e --- /dev/null +++ b/t/recipes/checks/debian/copyright/legacy-fields/eval/hints @@ -0,0 +1,2 @@ +fields (binary): no-copyright-file +another-version (binary): no-copyright-file diff --git a/t/recipes/checks/debian/copyright/legacy-fields/eval/post-test b/t/recipes/checks/debian/copyright/legacy-fields/eval/post-test new file mode 100644 index 0000000..faeef0b --- /dev/null +++ b/t/recipes/checks/debian/copyright/legacy-fields/eval/post-test @@ -0,0 +1 @@ +s/\(current is ([0-9]+\.)+[0-9]\)/(current is CURRENT)/ diff --git a/t/recipes/checks/debian/copyright/legacy-filenames/build-spec/debian/changelog.in b/t/recipes/checks/debian/copyright/legacy-filenames/build-spec/debian/changelog.in new file mode 100644 index 0000000..b79c4ca --- /dev/null +++ b/t/recipes/checks/debian/copyright/legacy-filenames/build-spec/debian/changelog.in @@ -0,0 +1,78 @@ +filenames ([% $version %]) [% $distribution %]; urgency=low + + * /me is doing a correct NMU of this package, bumping the epoch too. + + -- Jeroen van Wolffelaar Sun, 18 Apr 2004 02:04:39 +0200 + +filenames (11) unstable; urgency=low + + * Add a README.macos. + + -- Marc 'HE' Brockschmidt Mon, 12 Apr 2004 23:35:24 +0200 + +filenames (10) unstable; urgency=low + + * Some new files to check the checks for the use of /usr/*/X11 and + /usr/X11R6/*. + + -- Marc 'HE' Brockschmidt Sun, 11 Apr 2004 17:35:20 +0200 + +filenames (9) unstable; urgency=low + + * Add a two *.ali files, one with the right permission, one with + the more common, but false one. + + -- Marc 'HE' Brockschmidt Sun, 11 Apr 2004 00:18:16 +0200 + +filenames (8) unstable; urgency=low + + * Add a real ancient file + + -- Frank Lichtenheld Thu, 8 Apr 2004 22:22:40 +0200 + +filenames (7) unstable; urgency=low + + * Add a dozen symlinks, some correct, some not + + -- Jeroen van Wolffelaar Fri, 27 Feb 2004 01:28:42 +0100 + +filenames (6) unstable; urgency=low + + * Add perl files to check if + package-installs-nonbinary-perl-in-usr-lib-perl5 is correctly + issued even after attempting to suppress it in some cases + + -- Frank Lichtenheld Fri, 27 Feb 2004 00:49:44 +0100 + +filenames (5) unstable; urgency=low + + * Added check for too long symlink + + -- Sean 'Shaleh' Perry Wed, 3 Jan 2001 13:20:31 -0800 + +filenames (4) unstable; urgency=low + + * Add /usr/lib/menu/menu file to test the bad-menu-file-name tag. + * Add /usr/lib/menu/README to test the new execption for it. + + -- Richard Braakman Thu, 22 Oct 1998 15:42:52 +0200 + +filenames (3) unstable; urgency=low + + * Don't rely on the installer's umask. + + -- Richard Braakman Thu, 20 Aug 1998 12:45:47 +0200 + +filenames (2) unstable; urgency=low + + * Noted more limitations on what filenames lintian handles. + * Added Changes.gz in /usr/doc/filenames and made a symlink from changelog.gz + to Changes.gz. + + -- Richard Braakman Sat, 4 Jul 1998 15:46:11 +0200 + +filenames (1) unstable; urgency=low + + * Initial version + + -- Richard Braakman Sat, 4 Jul 1998 15:25:01 +0200 diff --git a/t/recipes/checks/debian/copyright/legacy-filenames/build-spec/debian/control b/t/recipes/checks/debian/copyright/legacy-filenames/build-spec/debian/control new file mode 100644 index 0000000..1ff9c50 --- /dev/null +++ b/t/recipes/checks/debian/copyright/legacy-filenames/build-spec/debian/control @@ -0,0 +1,42 @@ +Source: filenames +Maintainer: Lintian Maintainer +Standards-Version: 3.1.1 +Rules-Requires-Root: binary-targets + +Package: filenames +Architecture: any +Description: see how lintian reacts to weird filenames + This package contains files with the most evil names I could find, + except for ones that lintian is explicitly not designed to handle. + . + Lintian does not handle filenames containing newlines, or filenames + that contain the strings " link to ", " -> ", or ": ". The last one + is used as a separator by the file command, the others are used as + separators by tar. + . + Lintian also does not handle filenames that contain backslashes, or + other characters that are mangled by tar's -tv output. + +Package: filename-games +Architecture: all +Depends: filenames +Section: games +Description: Test game filename/location checks + This package contains files with slightly less evil names than + filenames. + . + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. + +Package: more-filename-games +Architecture: all +Depends: filenames, filename-games +Section: games +Priority: optional +Description: More test for game filename/location checks + This package contains no evil names, only evil locations. + . + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. diff --git a/t/recipes/checks/debian/copyright/legacy-filenames/build-spec/debian/doc-base b/t/recipes/checks/debian/copyright/legacy-filenames/build-spec/debian/doc-base new file mode 100644 index 0000000..e5a611b --- /dev/null +++ b/t/recipes/checks/debian/copyright/legacy-filenames/build-spec/debian/doc-base @@ -0,0 +1,11 @@ +Document: testing +Title: Working doc-base control file +Author: Russ Allbery +Abstract: This control file ensures that we don't get false positives for + correct doc-base files. + . + There isn't anything wrong with this one. +Section: Education + +Format: Text +Files: /usr/share/doc/filenames/README.macosx diff --git a/t/recipes/checks/debian/copyright/legacy-filenames/build-spec/debian/rules b/t/recipes/checks/debian/copyright/legacy-filenames/build-spec/debian/rules new file mode 100755 index 0000000..0b9e87c --- /dev/null +++ b/t/recipes/checks/debian/copyright/legacy-filenames/build-spec/debian/rules @@ -0,0 +1,231 @@ +#!/usr/bin/make -f + +# Copyright (C) 1998 Richard Braakman +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +VENDORARCH := $(shell perl -MConfig -wE'say substr($$Config{vendorarch},1)') + +clean: + mkdir -p .svn CVS "{arch}" .arch-ids .bzr + touch data/.cvsignore data/svn-commit.tmp data/svk-commitsEr9P.tmp + touch data/.arch-inventory + touch 'data/.#Maelstrom Sound.1.1.1' 'data/Maelstrom Sounce.r121' + touch 'data/Maelstrom Sound.mine' + touch "data/'\\ " + touch filenames.c~ + +build-arch: + +build-indep: + +build: build-arch build-indep + + +binary-arch: + +binary-indep: + install -d debian/tmp/DEBIAN + cp -a data debian/tmp/files + chmod -R go=rX debian/tmp/files + + install -d debian/tmp/usr/lib/filenames + install -m 555 -d debian/tmp/usr/lib/filenames/readonly + touch debian/tmp/usr/lib/filenames/readonly/test + + install -d debian/tmp/usr/lib/menu + install -d debian/tmp/usr/share/menu + touch debian/tmp/usr/lib/menu/README + touch debian/tmp/usr/share/menu/README + touch debian/tmp/usr/lib/menu/menu + touch debian/tmp/usr/share/menu/menu + chmod 644 debian/tmp/usr/lib/menu/* + + install -d debian/tmp/$(VENDORARCH)/foo + mkdir debian/tmp/$(VENDORARCH)/.svn + mkdir debian/tmp/$(VENDORARCH)/CVS + mkdir "debian/tmp/$(VENDORARCH)/{arch}" + mkdir debian/tmp/$(VENDORARCH)/.arch-ids + mkdir debian/tmp/$(VENDORARCH)/.bzr + mkdir debian/tmp/$(VENDORARCH)/.be + mkdir debian/tmp/$(VENDORARCH)/.ditrack + install -d debian/tmp/usr/share/perl5 + echo foo > debian/tmp/$(VENDORARCH)/foo/.gitignore + echo foo > debian/tmp/$(VENDORARCH)/foo/.hgignore + echo foo > debian/tmp/$(VENDORARCH)/foo/.hgtags + echo foo > debian/tmp/$(VENDORARCH)/foo/.hg_archival.txt + + touch debian/tmp/$(VENDORARCH)/foo/.packlist + chmod 644 debian/tmp/$(VENDORARCH)/foo/.packlist + touch debian/tmp/$(VENDORARCH)/foo/bar.pm + TZ=UTC touch -t 197501010101 debian/tmp/$(VENDORARCH)/foo/ancient.pm + chmod 644 debian/tmp/$(VENDORARCH)/foo/bar.pm + + install -d debian/tmp/usr/share/pixmaps + install -d debian/tmp/usr/share/pixmaps/foo + touch debian/tmp/usr/share/pixmaps/license.jpeg + touch debian/tmp/usr/share/pixmaps/licence.jpg + touch debian/tmp/usr/share/pixmaps/copying.xpm + touch debian/tmp/usr/share/pixmaps/foo/COPYING.svg + touch debian/tmp/usr/share/pixmaps/foo/copying.png + touch debian/tmp/usr/share/pixmaps/license.txt + touch debian/tmp/usr/share/pixmaps/license.foo + touch debian/tmp/usr/share/pixmaps/COPYING + + install -d debian/tmp/usr/share/linda/overrides + echo 'foo' > debian/tmp/usr/share/linda/overrides/filenames + + install -d debian/tmp/usr/share/doc/filenames + touch debian/tmp/usr/share/doc/filenames/README.macosx + + echo foo > debian/tmp/usr/share/doc/filenames/bokmål + echo foo > debian/tmp/usr/share/doc/filenames/bokm\\ål + echo foo > debian/tmp/usr/share/doc/filenames/bokml + echo foo > debian/tmp/usr/share/doc/filenames/bokm\\l + + echo foo > debian/tmp/usr/share/doc/filenames/Thumbs.db + echo foo > debian/tmp/usr/share/doc/filenames/.DS_Store + echo foo > debian/tmp/usr/share/doc/filenames/._NEWS.Debian + + touch debian/tmp/usr/share/doc/filenames/news.debian + gzip -n debian/tmp/usr/share/doc/filenames/news.debian + touch debian/tmp/usr/share/doc/filenames/NEWS.Debian + + echo foo > debian/tmp/usr/share/doc/filenames/link-one + ln debian/tmp/usr/share/doc/filenames/link-one \ + debian/tmp/usr/share/doc/filenames/link-two + + install -d debian/tmp/usr/share/doc/filenames/examples + touch debian/tmp/usr/share/doc/filenames/examples/__init__.py + touch debian/tmp/usr/share/doc/filenames/examples/very_interesting_example + touch debian/tmp/usr/share/doc/filenames/examples/very_interesting_example2 + gzip -n debian/tmp/usr/share/doc/filenames/examples/very_interesting_example2 + + install -d debian/tmp/usr/lib/ada/adalib/ + touch debian/tmp/usr/lib/ada/adalib/test.ali debian/tmp/usr/lib/ada/adalib/test2.ali + chmod 0644 debian/tmp/usr/lib/ada/adalib/test.ali + chmod 0444 debian/tmp/usr/lib/ada/adalib/test2.ali + + install -d debian/tmp/usr/bin/X11/ + touch debian/tmp/usr/bin/X11/testxbin + install -d debian/tmp/usr/X11R6/bin + touch debian/tmp/usr/X11R6/bin/testxbin2 + install -d debian/tmp/usr/include/X11 + touch debian/tmp/usr/include/X11/foo.h + + install -d debian/tmp/usr/bin/mh + touch debian/tmp/usr/bin/mh/read + chmod 755 debian/tmp/usr/bin/mh/read + install -d debian/tmp/usr/bin/bin + touch debian/tmp/usr/bin/bin/bad + chmod 755 debian/tmp/usr/bin/bin/bad + + install -m 644 debian/changelog debian/tmp/usr/share/doc/filenames/Changes + gzip -n -9 debian/tmp/usr/share/doc/filenames/Changes + ln -s Changes.gz debian/tmp/usr/share/doc/filenames/changelog.gz + + install -d debian/tmp/var/www + echo foo > debian/tmp/var/www/foo + + install -d debian/tmp/srv/foo + touch debian/tmp/srv/foo/bar + install -d debian/tmp/opt/foo + touch debian/tmp/opt/foo/bar + + install -d debian/tmp/etc/gconf/schemas + touch debian/tmp/etc/gconf/schemas/test.schema + + install -d debian/tmp/usr/lib/sgml + touch debian/tmp/usr/lib/sgml/package + + install -d debian/tmp/usr/share/gnome/apps/System + touch debian/tmp/usr/share/gnome/apps/System/foo.desktop + + install -d debian/tmp/usr/share/filenames + touch debian/tmp/usr/share/filenames/jquery.js + touch debian/tmp/usr/share/filenames/jquery.lite.js + touch debian/tmp/usr/share/filenames/jquery.min.js + touch debian/tmp/usr/share/filenames/jquery.pack.js + touch debian/tmp/usr/share/filenames/mochikit.js + touch debian/tmp/usr/share/filenames/prototype-1.2.3.4.js + touch debian/tmp/usr/share/filenames/prototype.js + touch debian/tmp/usr/share/filenames/prototype.js.gz + touch debian/tmp/usr/share/filenames/scriptaculous.js + touch debian/tmp/usr/share/filenames/yahoo-dom-event.js + touch debian/tmp/usr/share/filenames/yahoo-min.js + + ln -s '../filenames/doc/version6.txt.gz' debian/tmp/usr/share/doc/filenames/version.txt.gz + ln -s ../../share/symlink debian/tmp/usr/lib/filenames/symlink1ok + ln -s ../../../etc/symlink debian/tmp/usr/lib/filenames/symlink1wrong + ln -s ../../../../etc/symlink debian/tmp/usr/lib/filenames/symlink2wrong + ln -s /etc/symlink debian/tmp/usr/lib/filenames/symlink2ok + ln -s /usr/lib/filenames/symlink2 debian/tmp/usr/lib/filenames/symlink3wrong + ln -s test debian/tmp/usr/lib/filenames/symlink3ok + ln -s ../filenames/symlink2 debian/tmp/usr/lib/filenames/symlink4wrong + ln -s ../menu/../somethingelse debian/tmp/usr/lib/filenames/symlink5wrong + ln -s ../menu/somethingelse debian/tmp/usr/lib/filenames/symlink4ok + ln -s ./file4 debian/tmp/usr/lib/filenames/symlink6wrong + ln -s ../menu/./something debian/tmp/usr/lib/filenames/symlink7wrong + ln -s ../menu//something debian/tmp/usr/lib/filenames/symlink8wrong + ln -s ../menu/something/ debian/tmp/usr/lib/filenames/symlink9wrong + ln -s .. debian/tmp/usr/lib/filenames/symlink5ok+warn + ln -s . debian/tmp/usr/lib/filenames/symlink6ok+warn + ln -s / debian/tmp/usr/lib/filenames/symlink7ok+warn + ln -s ../../.. debian/tmp/usr/lib/filenames/symlink10wrong + +# devhelp tests. Files in /usr/share/gtk-doc/html or /usr/share/devhelp/books +# are okay. Files elsewhere are okay iff their parent path is symlinked into +# one of those paths. + install -d debian/tmp/usr/share/devhelp/books/filenames + echo 'Not really XML' > debian/tmp/usr/share/devhelp/books/filenames/a.devhelp + echo 'Not really XML' > debian/tmp/usr/share/devhelp/books/filenames/.devhelp2 + gzip -n -9 debian/tmp/usr/share/devhelp/books/filenames/.devhelp2 + install -d debian/tmp/usr/share/gtk-doc/html/filenames + echo 'Not really XML' > debian/tmp/usr/share/gtk-doc/html/filenames/b.devhelp + gzip -n -9 debian/tmp/usr/share/gtk-doc/html/filenames/b.devhelp + install -d debian/tmp/usr/share/doc/filenames/good-devhelp + echo 'Not really XML' > debian/tmp/usr/share/doc/filenames/good-devhelp/.devhelp2 + install -d debian/tmp/usr/share/doc/filenames/bad-devhelp + echo 'Not really XML' > debian/tmp/usr/share/doc/filenames/bad-devhelp/c.devhelp + gzip -n -9 debian/tmp/usr/share/doc/filenames/bad-devhelp/c.devhelp + ln -s ../../doc/filenames/good-devhelp debian/tmp/usr/share/gtk-doc/html/good + ln -s ../doc/filenames/bad-devhelp debian/tmp/usr/share/gtk-doc/html/bad + + install -d debian/tmp/usr/share/doc-base + install -m 644 debian/doc-base debian/tmp/usr/share/doc-base/filenames + + dpkg-gencontrol -pfilenames -Pdebian/tmp + dpkg --build debian/tmp .. + + install -d debian/filename-games debian/filename-games/DEBIAN + install -d debian/filename-games/usr debian/filename-games/usr/games debian/filename-games/usr/bin + echo '#! /bin/sh' > debian/filename-games/usr/bin/test-game + chmod 755 debian/filename-games/usr/bin/test-game + dpkg-gencontrol -pfilename-games -Pdebian/filename-games + dpkg --build debian/filename-games .. + + install -d debian/more-filename-games debian/more-filename-games/DEBIAN + install -d debian/more-filename-games/usr debian/more-filename-games/usr/games debian/more-filename-games/usr/bin + echo '#! /bin/sh' > debian/more-filename-games/usr/bin/another-test-game + echo '#! /bin/sh' > debian/more-filename-games/usr/games/yet-another-test-game + chmod 755 debian/more-filename-games/usr/bin/another-test-game debian/more-filename-games/usr/games/yet-another-test-game + dpkg-gencontrol -pmore-filename-games -Pdebian/more-filename-games + dpkg --build debian/more-filename-games .. + +binary: binary-arch binary-indep + +.PHONY: build-indep build-arch build binary-arch binary-indep binary clean diff --git a/t/recipes/checks/debian/copyright/legacy-filenames/build-spec/fill-values b/t/recipes/checks/debian/copyright/legacy-filenames/build-spec/fill-values new file mode 100644 index 0000000..062a1ea --- /dev/null +++ b/t/recipes/checks/debian/copyright/legacy-filenames/build-spec/fill-values @@ -0,0 +1,5 @@ +Skeleton: upload-non-native +Testname: legacy-filenames +Source: filenames +Version: 1:12-0.1 +Description: Legacy test "filenames" diff --git a/t/recipes/checks/debian/copyright/legacy-filenames/build-spec/orig/data/ .tif b/t/recipes/checks/debian/copyright/legacy-filenames/build-spec/orig/data/ .tif new file mode 100644 index 0000000..07fd914 --- /dev/null +++ b/t/recipes/checks/debian/copyright/legacy-filenames/build-spec/orig/data/ .tif @@ -0,0 +1,2 @@ +This filename was inspired by the ".tif used by fnlib. The real package +uses space.tif. diff --git "a/t/recipes/checks/debian/copyright/legacy-filenames/build-spec/orig/data/\".tif" "b/t/recipes/checks/debian/copyright/legacy-filenames/build-spec/orig/data/\".tif" new file mode 100644 index 0000000..e005775 --- /dev/null +++ "b/t/recipes/checks/debian/copyright/legacy-filenames/build-spec/orig/data/\".tif" @@ -0,0 +1 @@ +This filename is really used, by fnlib. diff --git a/t/recipes/checks/debian/copyright/legacy-filenames/build-spec/orig/data/Maelstrom Sound b/t/recipes/checks/debian/copyright/legacy-filenames/build-spec/orig/data/Maelstrom Sound new file mode 100644 index 0000000..4110410 --- /dev/null +++ b/t/recipes/checks/debian/copyright/legacy-filenames/build-spec/orig/data/Maelstrom Sound @@ -0,0 +1 @@ +This filename occurs in the maelstrom package. diff --git a/t/recipes/checks/debian/copyright/legacy-filenames/eval/desc b/t/recipes/checks/debian/copyright/legacy-filenames/eval/desc new file mode 100644 index 0000000..2f3ffb9 --- /dev/null +++ b/t/recipes/checks/debian/copyright/legacy-filenames/eval/desc @@ -0,0 +1,2 @@ +Testname: legacy-filenames +Check: debian/copyright diff --git a/t/recipes/checks/debian/copyright/legacy-filenames/eval/hints b/t/recipes/checks/debian/copyright/legacy-filenames/eval/hints new file mode 100644 index 0000000..577cfcf --- /dev/null +++ b/t/recipes/checks/debian/copyright/legacy-filenames/eval/hints @@ -0,0 +1,3 @@ +more-filename-games (binary): no-copyright-file +filenames (binary): no-copyright-file +filename-games (binary): no-copyright-file diff --git a/t/recipes/checks/debian/copyright/legacy-filenames/eval/post-test b/t/recipes/checks/debian/copyright/legacy-filenames/eval/post-test new file mode 100644 index 0000000..571e35d --- /dev/null +++ b/t/recipes/checks/debian/copyright/legacy-filenames/eval/post-test @@ -0,0 +1,3 @@ +s/\(current is ([0-9]+\.)+[0-9]\)/(current is CURRENT)/ +s,usr/lib/([^\/]*/)?perl[0-9]*(/[0-9]*\.[0-9]*)?/,usr/lib/ma-dir/perl/version/,g +/package-installs-packlist/ d diff --git a/t/recipes/checks/debian/copyright/legacy-foo++/build-spec/debian/README.Debian b/t/recipes/checks/debian/copyright/legacy-foo++/build-spec/debian/README.Debian new file mode 100644 index 0000000..87bfcdf --- /dev/null +++ b/t/recipes/checks/debian/copyright/legacy-foo++/build-spec/debian/README.Debian @@ -0,0 +1,7 @@ +foo++ for Debian +---------------- + +This should trigger a warning, as i use a fake mail address. + + -- Marc 'HE' Brockschmidt , Wed, 14 Apr 2004 01:44:18 +0200 + diff --git a/t/recipes/checks/debian/copyright/legacy-foo++/build-spec/debian/changelog.in b/t/recipes/checks/debian/copyright/legacy-foo++/build-spec/debian/changelog.in new file mode 100644 index 0000000..f838939 --- /dev/null +++ b/t/recipes/checks/debian/copyright/legacy-foo++/build-spec/debian/changelog.in @@ -0,0 +1,31 @@ +foo++ ([% $version %]) [% $distribution %]; urgency=low + + * Add a fake README.Debian to trigger a warning. + * This should trigger + debian-changelog-file-contains-debmake-default-email-address. + + -- Marc 'HE' Brockschmidt Wed, 14 Apr 2003 01:35:47 +0200 + +foo++ (4) unstable; urgency=low + + * This changelog now includes a ISO-8859-1 character: '' + + -- Frank Lichtenheld Fri, 5 Mar 2004 13:41:39 +0100 + +foo++ (3) unstable; urgency=low + + * Set maintainers + uploaders incorrectly + + -- Jeroen van Wolffelaar Fri, 5 Mar 2004 04:20:24 +0100 + +foo++ (2) unstable; urgency=low + + * Added a foo++-helper package to try and catch even more ++ bugs. + + -- Sean 'Shaleh' Perry Sat, 10 Feb 2001 23:16:17 -0800 + +foo++ (1) unstable; urgency=low + + * Initial version + + -- Sean 'Shaleh' Perry Thu, 16 Nov 2000 09:11:40 -0800 diff --git a/t/recipes/checks/debian/copyright/legacy-foo++/build-spec/debian/control b/t/recipes/checks/debian/copyright/legacy-foo++/build-spec/debian/control new file mode 100644 index 0000000..3e86b96 --- /dev/null +++ b/t/recipes/checks/debian/copyright/legacy-foo++/build-spec/debian/control @@ -0,0 +1,30 @@ +Source: foo++ +Section: misc +Priority: optional +Maintainer: Lintian Maintainer +Uploaders: Marc 'HE' Brockschmidt , Jeroen van Wolffelaar, + Frank , Yama@gotchi, Josip, + I am afraid of spam and think this helps +Standards-Version: 3.1.1 +XS-Dm-Upload-Allowed: no + +Package: foo++ +Architecture: all +Build-Depends: test +Depends: test, libssl0.9.7 +Description: see how lintian reacts to plus signs in the package name + Regression test to see if lintian tests work on a package with plus signs in + its name. + . + This description also uses non-UTF8 high bytes chars: ÄÖÜß + +Package: foo++-helper +Architecture: all +Depends: test, foo++ +Description: see how lintian reacts to plus signs in the package name + Regression test to see if lintian tests work on a package with plus signs in + its name. This has /usr/share/doc links to foo++ to trigger even more checks. + . + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. diff --git a/t/recipes/checks/debian/copyright/legacy-foo++/build-spec/debian/copyright b/t/recipes/checks/debian/copyright/legacy-foo++/build-spec/debian/copyright new file mode 100644 index 0000000..e2d6d93 --- /dev/null +++ b/t/recipes/checks/debian/copyright/legacy-foo++/build-spec/debian/copyright @@ -0,0 +1,7 @@ +A reference to /usr/share/common-licenses/GPL to make it look like this +package is under the GPL and trigger the OpenSSL warning. + +However, there is also a reference to /usr/share/common-licenses/LGPL, so +who knows what bits actually depend on libssl. + +Copr. 2007 Somebody. diff --git a/t/recipes/checks/debian/copyright/legacy-foo++/build-spec/debian/rules b/t/recipes/checks/debian/copyright/legacy-foo++/build-spec/debian/rules new file mode 100755 index 0000000..63bb4db --- /dev/null +++ b/t/recipes/checks/debian/copyright/legacy-foo++/build-spec/debian/rules @@ -0,0 +1,36 @@ +#!/usr/bin/make -f + +foo=foo++ +helper=foo++-helper + +build-arch: + +build-indep: + +build: build-arch build-indep + +binary-arch: + +binary-indep: + install -d debian/$(foo)/DEBIAN + install -d debian/$(foo)/usr/share/doc/$(foo) + install -m 644 debian/changelog \ + debian/$(foo)/usr/share/doc/$(foo)/changelog + gzip -n -9 debian/$(foo)/usr/share/doc/$(foo)/changelog + install -m 644 debian/README.Debian \ + debian/$(foo)/usr/share/doc/$(foo)/README.Debian + gzip -n -9 debian/$(foo)/usr/share/doc/$(foo)/README.Debian + dpkg-gencontrol -isp -p$(foo) -Pdebian/$(foo) + dpkg --build debian/$(foo) .. + + install -d debian/$(helper)/DEBIAN + install -d debian/$(helper)/usr/share/doc/ + ln -sf $(foo) debian/$(helper)/usr/share/doc/$(helper) + dpkg-gencontrol -isp -p$(helper) -Pdebian/$(helper) + dpkg --build debian/$(helper) .. + +binary: binary-arch binary-indep + +clean: + +.PHONY: build-arch build-indep build binary-arch binary-indep binary clean diff --git a/t/recipes/checks/debian/copyright/legacy-foo++/build-spec/debian/watch b/t/recipes/checks/debian/copyright/legacy-foo++/build-spec/debian/watch new file mode 100644 index 0000000..26f9a3c --- /dev/null +++ b/t/recipes/checks/debian/copyright/legacy-foo++/build-spec/debian/watch @@ -0,0 +1,6 @@ +# A comment \ +version=0 + +# uscan does not interpret the backslash above, it is just part of the comment + +http://domain.tld/file-(.*)\.tar\.gz diff --git a/t/recipes/checks/debian/copyright/legacy-foo++/build-spec/fill-values b/t/recipes/checks/debian/copyright/legacy-foo++/build-spec/fill-values new file mode 100644 index 0000000..86d43bc --- /dev/null +++ b/t/recipes/checks/debian/copyright/legacy-foo++/build-spec/fill-values @@ -0,0 +1,5 @@ +Skeleton: upload-native +Testname: legacy-foo++ +Source: foo++ +Version: 5 +Description: Legacy test "foo++" diff --git a/t/recipes/checks/debian/copyright/legacy-foo++/eval/desc b/t/recipes/checks/debian/copyright/legacy-foo++/eval/desc new file mode 100644 index 0000000..0dc67a8 --- /dev/null +++ b/t/recipes/checks/debian/copyright/legacy-foo++/eval/desc @@ -0,0 +1,2 @@ +Testname: legacy-foo++ +Check: debian/copyright diff --git a/t/recipes/checks/debian/copyright/legacy-foo++/eval/hints b/t/recipes/checks/debian/copyright/legacy-foo++/eval/hints new file mode 100644 index 0000000..22a97cb --- /dev/null +++ b/t/recipes/checks/debian/copyright/legacy-foo++/eval/hints @@ -0,0 +1 @@ +foo++ (binary): no-copyright-file diff --git a/t/recipes/checks/debian/copyright/legacy-foo++/eval/post-test b/t/recipes/checks/debian/copyright/legacy-foo++/eval/post-test new file mode 100644 index 0000000..faeef0b --- /dev/null +++ b/t/recipes/checks/debian/copyright/legacy-foo++/eval/post-test @@ -0,0 +1 @@ +s/\(current is ([0-9]+\.)+[0-9]\)/(current is CURRENT)/ diff --git a/t/recipes/checks/debian/copyright/legacy-maintainer-scripts/build-spec/debian/changelog.in b/t/recipes/checks/debian/copyright/legacy-maintainer-scripts/build-spec/debian/changelog.in new file mode 100644 index 0000000..a12fc8c --- /dev/null +++ b/t/recipes/checks/debian/copyright/legacy-maintainer-scripts/build-spec/debian/changelog.in @@ -0,0 +1,57 @@ +maintainer-scripts ([% $version %]) [% $distribution %]; urgency=low + + * Doing an upload for QA but I fail to give it a correct version number, + have some uploaders, and also fail to mention it... Bad me ;) + + -- Jeroen van Wolffelaar Sun, 18 Apr 2004 02:05:29 +0200 + +maintainer-scripts (6.1) unstable; urgency=low + + * I made this entry on my local PC, oops ;) + + -- Jeroen van Wolffelaar Sat, 21 Feb 2004 18:29:37 +0100 + +maintainer-scripts (6) unstable; urgency=low + + * added ldconfig calls to postrm to check test the postrm tests + from shared-libs + + -- Frank Lichtenheld Sat, 21 Feb 2004 18:29:36 +0100 + +maintainer-scripts (5) unstable; urgency=low + + * added bash style arrays to postinst, this one is for you Torsten (-: + + -- Sean 'Shaleh' Perry Fri, 30 Mar 2001 23:27:06 -0800 + +maintainer-scripts (4) unstable; urgency=low + + * added a here document to the prerm, along with two more bashisms + * made postrm a bash script to check that bash scripts are not searched + + -- Sean 'Shaleh' Perry Mon, 26 Feb 2001 13:02:57 -0800 + +maintainer-scripts (3) unstable; urgency=low + + * Added check for '.' called as '. foo || bar', lintian 1.11.15 failed this + thinking the '||' was a argument. + * also added an invalid call to '. foo bar' + * postinst now has a space between the #! and /bin/sh to test the interpreter + checking code. + + -- Sean 'Shaleh' Perry Tue, 9 Jan 2001 23:06:25 -0800 + +maintainer-scripts (2) unstable; urgency=low + + * Fix location of changelog. + * prerm and postrm do 'update-alternatives --remove'; should only complain + about postrm. + + -- Colin Watson Fri, 29 Dec 2000 06:01:24 +0000 + +maintainer-scripts (1) unstable; urgency=low + + * Initial version + * postinst and prerm set the usr/doc symlink + + -- Sean 'Shaleh' Perry Thu, 16 Nov 2000 09:11:40 -0800 diff --git a/t/recipes/checks/debian/copyright/legacy-maintainer-scripts/build-spec/debian/control.in b/t/recipes/checks/debian/copyright/legacy-maintainer-scripts/build-spec/debian/control.in new file mode 100644 index 0000000..63dd2db --- /dev/null +++ b/t/recipes/checks/debian/copyright/legacy-maintainer-scripts/build-spec/debian/control.in @@ -0,0 +1,18 @@ +Source: maintainer-scripts +Section: misc +Priority: optional +Maintainer: QA group +Uploaders: Anyone but Jeroen +Build-Depends: [% $build_depends %] +Standards-Version: 3.1.1 +Rules-Requires-Root: binary-targets +XS-Dm-Upload-Allowed: Yes + +Package: maintainer-scripts +Architecture: [% $package_architecture %] +Depends: test +Description: test lintian's maintainer script checks + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. diff --git a/t/recipes/checks/debian/copyright/legacy-maintainer-scripts/build-spec/debian/postinst b/t/recipes/checks/debian/copyright/legacy-maintainer-scripts/build-spec/debian/postinst new file mode 100644 index 0000000..e56ed3b --- /dev/null +++ b/t/recipes/checks/debian/copyright/legacy-maintainer-scripts/build-spec/debian/postinst @@ -0,0 +1,181 @@ +#! /bin/sh -e + +if [ "$1" = "configure" ]; then + if [ -d /usr/doc -a ! -e /usr/doc/maintainer-scripts -a -d /usr/share/doc/maintainer-scripts ]; then + ln -sf ../share/doc/maintainer-scripts /usr/doc/maintainer-scripts + fi +fi + +# valid +. /usr/share/lintian/shell || exit 0 +. /usr/share/lintian/shell >/dev/null +. /usr/share/lintian/shell 2>/dev/null +. /usr/share/lintian/shell /dev/null +update-rc.d $FOO defaults +update-rc.d foo remove + +# valid +FOO=/tmp +FOO=/var/tmp +: ${FOO:=/tmp} +FOO=`mktemp /tmp/scripts.XXXXXX` +rm "$FOO" +FOO=`tempfile -n/tmp/scripts.tmp` +mkdir /var/tmp/scripts +FOO="/tmp/false.positive.XXXXXX" +# invalid +echo foo >>/tmp/scripts.tmp +rm /tmp/scripts.tmp +rmdir /var/tmp/scripts + +# invalid, maintainer-script-hides-init-failure +invoke-rc.d foo start || exit 0 + +# The right way to invoke an rc script +if which invoke-rc.d >/dev/null 2>&1; then + invoke-rc.d package start +else + /etc/init.d/package start +fi + +# Example ucf invocation. +ucf /usr/share/foo/configuration /etc/foo.conf + +# Calling gconftool directly. +gconftool-2 --makefile-install-rule foo.schema + +# Calling gconf-schemas with no dependency. +gconf-schemas --register foo.schema + +# Calling update-xmlcatalog with no dependency. +update-xmlcatalog --add --type system --id "/usr/share/sgml/dtd/foo" \ + --package maintainer-scripts --root + +# Maintainer scripts shouldn't touch /var/lib/dpkg/status. This is the old +# recipe from the dpkg wiki that should be replaced with dpkg-query. +sed -n -e \"/^Conffiles:/,/^[^ ]/{\\\\' /etc/conffile'{s/.* //;p}}\" \ + /var/lib/dpkg/status + +# Don't modify these files. +echo 'broken 6714/tcp' >> /etc/services +cp /nonexistent /etc/protocols +mv /usr/share/doc/rpc /etc/rpc + +# But this is okay. +cp /etc/protocols /etc/protocols.new + +# This is also wrong. +echo 'broken' > /etc/inetd.conf +cp /etc/inetd.conf.new /etc/inetd.conf + +# But this is fine. +cp /etc/inetd.conf /srv/chroot/etc/inetd.conf + +# Deprecated +install-sgmlcatalog --install package +install-sgmlcatalog --remove package + +# This too is a heredoc. +some-program > /etc/config-file <<'EOF' +echo "All of the array is: ${H[@]}" +EOF + +# But this isn't. +cat '</dev/null; then + ucf --purge /etc/foo.conf +fi + +# This isn't allowed. +rm /tmp/foo /dev/device +rm /dev/device1 + +# But this is okay. +rm /tmp/foo > /dev/null + +# Not allowed here even with remove. +install-sgmlcatalog --remove package diff --git a/t/recipes/checks/debian/copyright/legacy-maintainer-scripts/build-spec/debian/preinst b/t/recipes/checks/debian/copyright/legacy-maintainer-scripts/build-spec/debian/preinst new file mode 100644 index 0000000..6058978 --- /dev/null +++ b/t/recipes/checks/debian/copyright/legacy-maintainer-scripts/build-spec/debian/preinst @@ -0,0 +1,18 @@ +#!/bin/sh + +update-rc.d foo remove +update-rc.d bar defaults + +# Obsolete dpkg assertions. +dpkg --assert-support-predepends || exit 1 +dpkg --assert-working-epoch || exit 1 +dpkg --assert-long-filenames || exit 1 +dpkg --assert-multi-conrep || exit 1 + +/bin/grep -E --mmap "^Package: foo$" /var/lib/dpkg/status + +# continuation lines +update-alternatives --install /usr/bin/fakeroot fakeroot \ + /usr/bin/fakeroot-ng 5 \ + --slave /usr/share/man/man1/fakeroot.1.gz \ + fakeroot.1.gz /usr/share/man/man1/fakeroot-ng.1.gz diff --git a/t/recipes/checks/debian/copyright/legacy-maintainer-scripts/build-spec/debian/prerm b/t/recipes/checks/debian/copyright/legacy-maintainer-scripts/build-spec/debian/prerm new file mode 100644 index 0000000..076ecaf --- /dev/null +++ b/t/recipes/checks/debian/copyright/legacy-maintainer-scripts/build-spec/debian/prerm @@ -0,0 +1,188 @@ +#!/bin/sh + +if [ "$1" != "upgrade" ]; then + update-alternatives --remove dummy /usr/bin/dummy-alternative +fi + +if ([ "$1" = "upgrade" ] || [ "$1" = "remove" ]) && [ -L /usr/doc/maintainer-scripts ]; the +n + rm -f /usr/doc/maintainer-scripts +fi + +cat </dev/null +} + +source $FOO + +trap "echo hi" EXIT HUP 3 + +if [[ "$2" = "purge" ]]; then + kill -HUP $$ +fi + +#this is ok though +if test -n $(echo foo | perl -pe 's/[[:space:]]//go'); then + echo 1 +fi + +update-rc.d foo remove + +# More false positives for bashism checks. None of these are errors. +echo "$line" | grep -q '{fonts/map,}/{\$progname,pdftex,dvips,}//' +echo "$line" | grep -q "${fonts},${foo}" +echo '$[1+2]' +printf "foo |& bar" +perl -e "print q( kill -HUP $? )" + +# Still catch disallowed expansions in double-quotes, though. +echo "${line:3:1}" + +# The wrong way to run an init script (no invoke-rc.d). +/etc/init.d/package stop + +# This is the only install-sgmlcatalog call that's allowed. +install-sgmlcatalog --quiet --remove package + +# More bashisms checks + +read -x foo +read -x +read -r foo +read foo +read + +echo "a\\b" +echo 'a\nb' + +echo "${UID}" +echo "$EUID" +echo "$SHLVL" +echo "$DIRSTACK" +echo "$SECONDS" +echo "$BASH" +echo "$BASH_FOO" +echo "$SHELLOPTS" +echo "$PIPESTATUS" + +bar="$(cut '-d|' -f2 <<< "$foo")" + +VAR=1 +VAR+=a + +echos() { + echo -n -e "bar" + echo -e -n "bar" + echo -en "bar" + echo -ne "bar" + echo "bar" + echo "echo -e foo" +} + +ech.os() { + echo foo >& 2 + echo foo >&bar + echo foo >& bar +} + +echoes() { + echo "abc\nxyz" + echo 'xyz\rabc' + echo foo\cbar + + echo -e "abc\nxyz" + echo -net 'xyz\rabc' + echo -e foo\cbar +} + +foobar.() { + suspend x + suspended x + caller x + complete x + compgen x + declare -a foo +} + +.foobar() { + typeset -x bar + disown 1 + builtin foo + set -B + alias -p + unalias -a +} + +IFS="()" + +ulimit +shopt +type -v bar +time ls +dirs +diff <(tac a) <(tac b) + +pushd + +local foo=bar +local -x foo + +popd + +readonly -f + +echo bar > /dev/tcp +export x +export -x x +export -p x + +sh -x +sh -D +sh --foo +sh +O + +# Brace expansion checks +echo {a,b} +echo {abc},{bcd} + +foobar() +{ + # This is a function +} + + foo.bar() +( + # This is a function with a bad name +) + +foobar@() +{ + # As is this +} + +# This is ok +read -r foo +# but these aren't +read -r +read -p "Would you like to restart the service?" foo bar +read --fish + +set -e + +source "$BAR" +source '$BAR' +source ~/bar +source a diff --git a/t/recipes/checks/debian/copyright/legacy-maintainer-scripts/build-spec/debian/rules b/t/recipes/checks/debian/copyright/legacy-maintainer-scripts/build-spec/debian/rules new file mode 100755 index 0000000..5fcef00 --- /dev/null +++ b/t/recipes/checks/debian/copyright/legacy-maintainer-scripts/build-spec/debian/rules @@ -0,0 +1,35 @@ +#!/usr/bin/make -f + +build-arch: + +build-indep: + +build: build-arch build-indep + +binary-arch: + +binary-indep: + install -d debian/tmp/DEBIAN + install -m 0755 debian/preinst debian/tmp/DEBIAN + install -m 0755 debian/postinst debian/tmp/DEBIAN + install -m 0755 debian/prerm debian/tmp/DEBIAN + install -m 0755 debian/postrm debian/tmp/DEBIAN + install -m 0644 debian/triggers debian/tmp/DEBIAN + install -d debian/tmp/usr/share/doc/maintainer-scripts + install -m 0644 debian/changelog \ + debian/tmp/usr/share/doc/maintainer-scripts/changelog + gzip -n -9 debian/tmp/usr/share/doc/maintainer-scripts/changelog + dpkg-gencontrol -isp + dpkg --build debian/tmp .. + +binary: binary-arch binary-indep + +# Make sure we see dh_clean even in a rule clean depends on. Not the point of +# this test suite, but a convenient place to put it. +clean: clean1 clean2 clean3 +clean1: +clean2: + dh_clean +clean3: + +.PHONY: build-arch build-indep build binary-arch binary-indep binary clean diff --git a/t/recipes/checks/debian/copyright/legacy-maintainer-scripts/build-spec/debian/triggers b/t/recipes/checks/debian/copyright/legacy-maintainer-scripts/build-spec/debian/triggers new file mode 100644 index 0000000..f627094 --- /dev/null +++ b/t/recipes/checks/debian/copyright/legacy-maintainer-scripts/build-spec/debian/triggers @@ -0,0 +1,4 @@ +# Example triggers file +activate foo + +interest bar diff --git a/t/recipes/checks/debian/copyright/legacy-maintainer-scripts/build-spec/debian/watch b/t/recipes/checks/debian/copyright/legacy-maintainer-scripts/build-spec/debian/watch new file mode 100644 index 0000000..430eea3 --- /dev/null +++ b/t/recipes/checks/debian/copyright/legacy-maintainer-scripts/build-spec/debian/watch @@ -0,0 +1,11 @@ +# A whitespace is fine for uscan: + version=5 + +# Following line should not be matched: +#opts=uversionmangle=s/$/+debian/,dversionmangle=s/foo/bar/ \ +# Following one is incorrect, there's a missing backslash at the end +opts=uversionmangle=s/$/+dfsg/,dversionmangle=s/foo/bar/ + +# 'active' is useless here, but it works anyway +options=active \ +http://domain.tld/foo-(.+)\.tar\.gz \ No newline at end of file diff --git a/t/recipes/checks/debian/copyright/legacy-maintainer-scripts/build-spec/fill-values b/t/recipes/checks/debian/copyright/legacy-maintainer-scripts/build-spec/fill-values new file mode 100644 index 0000000..c281e87 --- /dev/null +++ b/t/recipes/checks/debian/copyright/legacy-maintainer-scripts/build-spec/fill-values @@ -0,0 +1,6 @@ +Skeleton: upload-non-native +Testname: legacy-maintainer-scripts +Source: maintainer-scripts +Version: 7+dfsg-0.1 +Description: Legacy test "maintainer-scripts" +Extra-Build-Depends: dash (>= 0.5.10.2) diff --git a/t/recipes/checks/debian/copyright/legacy-maintainer-scripts/eval/desc b/t/recipes/checks/debian/copyright/legacy-maintainer-scripts/eval/desc new file mode 100644 index 0000000..234d577 --- /dev/null +++ b/t/recipes/checks/debian/copyright/legacy-maintainer-scripts/eval/desc @@ -0,0 +1,2 @@ +Testname: legacy-maintainer-scripts +Check: debian/copyright diff --git a/t/recipes/checks/debian/copyright/legacy-maintainer-scripts/eval/hints b/t/recipes/checks/debian/copyright/legacy-maintainer-scripts/eval/hints new file mode 100644 index 0000000..b0944ad --- /dev/null +++ b/t/recipes/checks/debian/copyright/legacy-maintainer-scripts/eval/hints @@ -0,0 +1 @@ +maintainer-scripts (binary): no-copyright-file diff --git a/t/recipes/checks/debian/copyright/legacy-maintainer-scripts/eval/post-test b/t/recipes/checks/debian/copyright/legacy-maintainer-scripts/eval/post-test new file mode 100644 index 0000000..faeef0b --- /dev/null +++ b/t/recipes/checks/debian/copyright/legacy-maintainer-scripts/eval/post-test @@ -0,0 +1 @@ +s/\(current is ([0-9]+\.)+[0-9]\)/(current is CURRENT)/ diff --git a/t/recipes/checks/debian/copyright/legacy-relations/build-spec/debian/changelog.in b/t/recipes/checks/debian/copyright/legacy-relations/build-spec/debian/changelog.in new file mode 100644 index 0000000..9a82ea7 --- /dev/null +++ b/t/recipes/checks/debian/copyright/legacy-relations/build-spec/debian/changelog.in @@ -0,0 +1,33 @@ +relations ([% $version %]) [% $distribution %]; urgency=low + + * I'm orphaning this package -- I'm sick of it: it's completely broken, + lintian complains all over the place. + + -- Jeroen van Wolffelaar Sun, 02 Dec 2007 15:59:59 -0800 + +relations (4) unstable; urgency=low + + * Added a package that tests dependencies for multiple versions of + libraries, and test some description stuff in there as well. + + -- Josip Rodin Fri, 29 Nov 2002 20:13:33 +0100 + +relations (3) unstable; urgency=low + + * Added a virtual provides to test against my virtual depends without + a real package first test + + -- Sean 'Shaleh' Perry Thu, 8 Feb 2001 11:29:53 -0800 + +relations (2) unstable; urgency=low + + * Added a depends on dpkg (violates policy) and a versioned depends + on bash (follows policy) + + -- Sean 'Shaleh' Perry Fri, 2 Feb 2001 12:37:17 -0800 + +relations (1) unstable; urgency=low + + * Initial version + + -- Richard Braakman Tue, 7 Jul 1998 16:27:56 +0200 diff --git a/t/recipes/checks/debian/copyright/legacy-relations/build-spec/debian/control b/t/recipes/checks/debian/copyright/legacy-relations/build-spec/debian/control new file mode 100644 index 0000000..6cd1c04 --- /dev/null +++ b/t/recipes/checks/debian/copyright/legacy-relations/build-spec/debian/control @@ -0,0 +1,51 @@ +Source: relations +Section: misc +Priority: optional +Build-Depends: mail-transport-agent, libc6-dev, findutils, foo (= 3) [!amd64 !i386], bar, arch-test1 [i386], arch-test2 [!i386], quilt (>= 0.40), perl +Build-Depends-Indep: make, bash, debmake, build-essential, baz (= 2.0), ghostscript | gs, + car (>= 1.0), car (<= 2.0), caz (= 1.0) [amd64], caz (>= 2.0) [i386], + caz (= 2.0) [powerpc], perl (>= 5.0), foo (<< 4) [!amd64 !i386], libfoo (>= 1.2-1), bozzle [kfreebsd-i386] +Build-Conflicts: foo [amd64 i386], bar [alpha test], xlibs-dev, arch-test1 [powerpc], arch-test2 [!sparc] +Build-Conflicts-Indep: debmake [!powerpc] +Maintainer: Debian QA Group +Standards-Version: 3.7.3 +Homepage: lintian.debian.org +Origin: Debian +Bugs: debbugs://bugs.debian.org/ + +Package: relations +Architecture: all +Section: contrib/misc +Pre-Depends: awk|gawk +Depends: relations(<< 3), dpkg, bash (>> 2.0 ), mail-transport-agent, gawk | awk, foo (>> 2.0), foo (<< 2.2), coreutils, ,null (>= 0), ${misc:Depends}, makedev +Provides: mail-reader +Replaces: relations +Conflicts: foobar (<< 5+5), foo, relations, + gnuwdf, +Suggests: alpha, gnu (>= 44-3-4-8-11.4) | ung (<< 89beta) | nug | ngu, beta, some-other-package +Recommends: emacs21 | emacsen, dpkg, null, some-other-package, ${f-oo:b-ar}, gs | ghostscript | gs-aladdin +Description: Strange dependency relationships (dummy) + This package declares relationships designed to tickle lintian's "fields" + check. It should generate a number of tags for these. + . + The package is built with "dpkg --build --no-check", because some of the + relationships used here are normally rejected by dpkg. + +Package: relations-multiple-libs +Architecture: all +Section: non-free/misc +Depends: libstdc++2.10, libstdc++2.10-glibc2.2, libstdc++3.0, tk8.2, tk8.3, tcl8.0, tcl8.2, tkx8.2, tkx8.3, tclx8.2, libpng2, libpng3, xorg, ${shlibs:Depends}, makedev | udev +Provides: awk +Enhances: foo +Recommends: ${shlibs:Depends}, relations-multiple-libs, gs | gs-gpl, makedev +Breaks: libpng3 (<< 1.0), libpng2 +Suggests: x-dev, ghostscript | gs +Description: Duplicate library dependency relationships. + Duplicate library dependency relationships. + This tests the depending on different versions of the same library + at the same time. + . + At the same time, it conveniently tests some description file checks. :) + . + It is a metapackage from the lintian perspective, so the xorg dependency + should be allowed. diff --git a/t/recipes/checks/debian/copyright/legacy-relations/build-spec/debian/rules b/t/recipes/checks/debian/copyright/legacy-relations/build-spec/debian/rules new file mode 100755 index 0000000..5027f33 --- /dev/null +++ b/t/recipes/checks/debian/copyright/legacy-relations/build-spec/debian/rules @@ -0,0 +1,49 @@ +#!/usr/bin/make -f + +# Copyright (C) 1998 Richard Braakman +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +build-arch: + +build-indep: + +build: build-arch build-indep + +binary-arch: + +binary-indep: + install -d debian/tmp/DEBIAN + dpkg-gencontrol -prelations -isp + dpkg --build debian/tmp ../relations_5_all.deb + install -d debian/tmp/usr/share/doc/ + ln -s relations debian/tmp/usr/share/doc/relations-multiple-libs + dpkg-gencontrol -prelations-multiple-libs -isp + dpkg --build debian/tmp ../relations-multiple-libs_5_all.deb + +binary: binary-arch binary-indep + +clean:: + rm -rf debian/tmp debian/files + +# Test allowing quilt Build-Depends for manual quilt invocations. + TESTING=foo ANOTHER=bar quilt || true + +# Test requiring perl Build-Depends for manual perl invocations. + [ ! -f Build ] || $(PERL) Build distclean + +.PHONY: build-arch build-indep build binary-arch binary-indep binary clean diff --git a/t/recipes/checks/debian/copyright/legacy-relations/build-spec/debian/tmp/DEBIAN/control b/t/recipes/checks/debian/copyright/legacy-relations/build-spec/debian/tmp/DEBIAN/control new file mode 100644 index 0000000..87e7fe6 --- /dev/null +++ b/t/recipes/checks/debian/copyright/legacy-relations/build-spec/debian/tmp/DEBIAN/control @@ -0,0 +1,14 @@ +Package: relations-multiple-libs +Version: 4 +Section: misc +Priority: optional +Architecture: all +Depends: libstdc++2.10, libstdc++2.10-glibc2.2, libstdc++3.0, tk8.2, tk8.3, tcl8.0, tcl8.2, tkx8.2, tkx8.3, tclx8.2, libpng2, libpng3 +Installed-Size: 12 +Maintainer: Lintian Maintainer +Source: relations +Description: Duplicate library dependency relationships. + Duplicate library dependency relationships. This tests the depending on + different versions of the same library at the same time. + . + At the same time, it conveniently tests some description file checks. :) diff --git a/t/recipes/checks/debian/copyright/legacy-relations/build-spec/fill-values b/t/recipes/checks/debian/copyright/legacy-relations/build-spec/fill-values new file mode 100644 index 0000000..7e4661b --- /dev/null +++ b/t/recipes/checks/debian/copyright/legacy-relations/build-spec/fill-values @@ -0,0 +1,5 @@ +Skeleton: upload-native +Testname: legacy-relations +Source: relations +Version: 5 +Description: Legacy test "relations" diff --git a/t/recipes/checks/debian/copyright/legacy-relations/eval/desc b/t/recipes/checks/debian/copyright/legacy-relations/eval/desc new file mode 100644 index 0000000..51af737 --- /dev/null +++ b/t/recipes/checks/debian/copyright/legacy-relations/eval/desc @@ -0,0 +1,2 @@ +Testname: legacy-relations +Check: debian/copyright diff --git a/t/recipes/checks/debian/copyright/legacy-relations/eval/hints b/t/recipes/checks/debian/copyright/legacy-relations/eval/hints new file mode 100644 index 0000000..ee30253 --- /dev/null +++ b/t/recipes/checks/debian/copyright/legacy-relations/eval/hints @@ -0,0 +1,2 @@ +relations-multiple-libs (binary): usr-share-doc-symlink-without-dependency relations +relations (binary): no-copyright-file diff --git a/t/recipes/checks/debian/copyright/legacy-relations/eval/post-test b/t/recipes/checks/debian/copyright/legacy-relations/eval/post-test new file mode 100644 index 0000000..faeef0b --- /dev/null +++ b/t/recipes/checks/debian/copyright/legacy-relations/eval/post-test @@ -0,0 +1 @@ +s/\(current is ([0-9]+\.)+[0-9]\)/(current is CURRENT)/ diff --git a/t/recipes/checks/debian/copyright/legacy-scripts/build-spec/debian/changelog.in b/t/recipes/checks/debian/copyright/legacy-scripts/build-spec/debian/changelog.in new file mode 100644 index 0000000..935c633 --- /dev/null +++ b/t/recipes/checks/debian/copyright/legacy-scripts/build-spec/debian/changelog.in @@ -0,0 +1,41 @@ +scripts ([% $version %]) [% $distribution %]; urgency=low + + * I'm also not able to write my name. + * Added a script in /etc/Xsession.d + * Bizarre version number courtesy of + https://wiki.ubuntu.com/SecurityUpdateProcedures#Prepare + + -- Mark 'HE' Brokschmitt Thu, 23 Jun 2005 14:32:39 +0200 + +scripts (5-1) unstable; urgency=low + + * I'm making a typo in my own name... And I want lintian to warn me about + it. + + -- Jeroen van Wolffelaar Sun, 18 Apr 2004 02:26:34 +0200 + +scripts (4-1) unstable; urgency=low + + * Add new example to check that not executable files with a shebang line + called *in don't trigger the script-not-executable warning. + + -- Marc 'HE' Brockschmidt Wed, 14 Apr 2004 19:44:04 +0200 + +scripts (3-3) unstable; urgency=low + + * Add suidperlfoo and some code in debian/rules to + check the new suidperl checks + + -- Frank Lichtenheld Wed, 31 Mar 2004 21:06:20 +0000 + +scripts (2-1) unstable; urgency=low + + * Add tkfoo script for tk checkings + + -- Lintian Maintainers Sat, 21 Feb 2004 17:13:36 +0100 + +scripts (1-0) unstable; urgency=low + + * Initial version + + -- Lintian Maintainers Sat, 10 Feb 2001 15:37:31 -0800 diff --git a/t/recipes/checks/debian/copyright/legacy-scripts/build-spec/debian/control.in b/t/recipes/checks/debian/copyright/legacy-scripts/build-spec/debian/control.in new file mode 100644 index 0000000..75a521f --- /dev/null +++ b/t/recipes/checks/debian/copyright/legacy-scripts/build-spec/debian/control.in @@ -0,0 +1,16 @@ +Source: scripts +Section: interpreters +Priority: optional +Maintainer: Lintian Maintainers +Uploaders: Jeroen van Wolfelaar , Marc 'HE' Brockschmidt +Build-Depends-Indep: dpatch +Standards-Version: 3.2.1 + +Package: scripts +Architecture: [% $package_architecture %] +Depends: test, ruby1.8, build-essential, libssl0.9.7, php7.0-cli +Recommends: tk8.4 | wish +Description: test lintian's script file checks + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. diff --git a/t/recipes/checks/debian/copyright/legacy-scripts/build-spec/debian/copyright b/t/recipes/checks/debian/copyright/legacy-scripts/build-spec/debian/copyright new file mode 100644 index 0000000..ad8a119 --- /dev/null +++ b/t/recipes/checks/debian/copyright/legacy-scripts/build-spec/debian/copyright @@ -0,0 +1,5 @@ +This file contains the phrase "under the same terms as Perl itself" to +trigger warnings about not having common-licenses references. + +This file contains the phrase "public domain" which should suppress +warnings about no copyright date. diff --git a/t/recipes/checks/debian/copyright/legacy-scripts/build-spec/debian/patches/00list b/t/recipes/checks/debian/copyright/legacy-scripts/build-spec/debian/patches/00list new file mode 100644 index 0000000..3b9d37e --- /dev/null +++ b/t/recipes/checks/debian/copyright/legacy-scripts/build-spec/debian/patches/00list @@ -0,0 +1,11 @@ +01_not_here_right_now.dpatch + +# some comment +/* some more + elaborate comment + which needs DPATCH_OPTION_CPP=1 + */02_i_dont_have_a_description.patch 03_specified_without_dpatch + +// and again a comment + +04_i_dont_have_a_description_either.patch diff --git a/t/recipes/checks/debian/copyright/legacy-scripts/build-spec/debian/patches/00list.sparc b/t/recipes/checks/debian/copyright/legacy-scripts/build-spec/debian/patches/00list.sparc new file mode 100644 index 0000000..8b47ab3 --- /dev/null +++ b/t/recipes/checks/debian/copyright/legacy-scripts/build-spec/debian/patches/00list.sparc @@ -0,0 +1 @@ +01_some_other_patch_thats_not_in_the_package.dpatch diff --git a/t/recipes/checks/debian/copyright/legacy-scripts/build-spec/debian/patches/00options b/t/recipes/checks/debian/copyright/legacy-scripts/build-spec/debian/patches/00options new file mode 100644 index 0000000..57ffeb6 --- /dev/null +++ b/t/recipes/checks/debian/copyright/legacy-scripts/build-spec/debian/patches/00options @@ -0,0 +1 @@ +DPATCH_OPTION_CPP=1 diff --git a/t/recipes/checks/debian/copyright/legacy-scripts/build-spec/debian/patches/02_i_dont_have_a_description.patch b/t/recipes/checks/debian/copyright/legacy-scripts/build-spec/debian/patches/02_i_dont_have_a_description.patch new file mode 100644 index 0000000..9279c1b --- /dev/null +++ b/t/recipes/checks/debian/copyright/legacy-scripts/build-spec/debian/patches/02_i_dont_have_a_description.patch @@ -0,0 +1,7 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 02_i_dont_have_a_description.patch.dpatch by Marc 'HE' Brockschmidt > +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: No description. + +@DPATCH@ diff --git a/t/recipes/checks/debian/copyright/legacy-scripts/build-spec/debian/patches/03_specified_without_dpatch.dpatch b/t/recipes/checks/debian/copyright/legacy-scripts/build-spec/debian/patches/03_specified_without_dpatch.dpatch new file mode 100644 index 0000000..8303ac6 --- /dev/null +++ b/t/recipes/checks/debian/copyright/legacy-scripts/build-spec/debian/patches/03_specified_without_dpatch.dpatch @@ -0,0 +1,5 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## All lines beginning with `## DP:' are a description of the patch. +## DP: Listed in 00list without .dpatch suffix. + +@DPATCH@ diff --git a/t/recipes/checks/debian/copyright/legacy-scripts/build-spec/debian/patches/04_i_dont_have_a_description_either.patch b/t/recipes/checks/debian/copyright/legacy-scripts/build-spec/debian/patches/04_i_dont_have_a_description_either.patch new file mode 100644 index 0000000..b603f16 --- /dev/null +++ b/t/recipes/checks/debian/copyright/legacy-scripts/build-spec/debian/patches/04_i_dont_have_a_description_either.patch @@ -0,0 +1,7 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 04_i_dont_have_a_description_either.patch by Adam D. Barratt +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: + +@DPATCH@ diff --git a/t/recipes/checks/debian/copyright/legacy-scripts/build-spec/debian/postinst b/t/recipes/checks/debian/copyright/legacy-scripts/build-spec/debian/postinst new file mode 100644 index 0000000..7c5baf1 --- /dev/null +++ b/t/recipes/checks/debian/copyright/legacy-scripts/build-spec/debian/postinst @@ -0,0 +1,14 @@ +#!/bin/sh + +if [ -x "/etc/init.d/lsb-broken" ] ; then + update-rc.d lsb-broken defaults >/dev/null +fi +if [ -x "/etc/init.d/no-lsb" ] ; then + update-rc.d no-lsb defaults >/dev/null +fi +if [ -x "/etc/init.d/skeleton" ] ; then + update-rc.d skeleton defaults >/dev/null +fi +if [ -x "/etc/init.d/lsb-other" ] ; then + update-rc.d lsb-other defaults >/dev/null +fi diff --git a/t/recipes/checks/debian/copyright/legacy-scripts/build-spec/debian/postrm b/t/recipes/checks/debian/copyright/legacy-scripts/build-spec/debian/postrm new file mode 100644 index 0000000..8fa75a2 --- /dev/null +++ b/t/recipes/checks/debian/copyright/legacy-scripts/build-spec/debian/postrm @@ -0,0 +1,9 @@ +#!/bin/sh -e + +if [ "$1" = purge ] ; then + update-rc.d lsb-broken remove >/dev/null + update-rc.d no-lsb remove >/dev/null + update-rc.d skeleton remove >/dev/null + update-rc.d lsb-other remove >/dev/null + update-rc.d lsb-other remove >/dev/null +fi diff --git a/t/recipes/checks/debian/copyright/legacy-scripts/build-spec/debian/preinst b/t/recipes/checks/debian/copyright/legacy-scripts/build-spec/debian/preinst new file mode 100644 index 0000000..0799557 --- /dev/null +++ b/t/recipes/checks/debian/copyright/legacy-scripts/build-spec/debian/preinst @@ -0,0 +1,15 @@ +#!/bin/sh + +set -e +set -x + +# +# Some comments here +# + +# This serves as an example of an "empty" script, so +# please do not add any real code here, thank you :) + +#DEBHELPER# + +exit 0 diff --git a/t/recipes/checks/debian/copyright/legacy-scripts/build-spec/debian/rules b/t/recipes/checks/debian/copyright/legacy-scripts/build-spec/debian/rules new file mode 100755 index 0000000..ee3677e --- /dev/null +++ b/t/recipes/checks/debian/copyright/legacy-scripts/build-spec/debian/rules @@ -0,0 +1,105 @@ +#!/usr/bin/make -f + +tmp=debian/tmp + +build-arch: + echo "Hi, in an arch: all package, I am a bug!" + +build-indep: + +build: build-arch build-indep + +binary-arch: + echo "Hi, in an arch: all package, I am a bug!" + +binary-indep: + install -d $(tmp)/usr/bin/ + install -d $(tmp)/etc/X11/Xsession.d/ + install -d $(tmp)/etc/init.d/ + install -d $(tmp)/etc/csh/login.d/ + install -d $(tmp)/etc/fish.d/ + install -d $(tmp)/usr/share/scripts/ + install -d $(tmp)/usr/share/doc/scripts/ + install -d $(tmp)/usr/lib/cgi-bin + install -d $(tmp)/usr/src/scripts + install -d $(tmp)/DEBIAN + + install -m 755 csh-foo $(tmp)/etc/csh/login.d/ + install -m 755 envfoo $(tmp)/usr/bin/ + install -m 755 fish-foo $(tmp)/etc/fish.d/ + install -m 755 jruby-broken $(tmp)/usr/bin/ + install -m 755 perlfoo $(tmp)/usr/bin/ + install -m 755 rubyfoo $(tmp)/usr/bin/ +# This doesn't use "env" but should also trigger script-in-usr-share-doc + install -m 755 rubyfoo $(tmp)/usr/share/doc/scripts/ + install -m 755 make-foo $(tmp)/usr/bin/ + install -m 755 lefty-foo $(tmp)/usr/bin/ + install -m 4751 perlfoo $(tmp)/usr/bin/suidperlfoo2 + install -m 755 sh-broken $(tmp)/usr/bin/ + install -m 4555 suidperlfoo $(tmp)/usr/bin/ + install -m 755 tkfoo $(tmp)/usr/bin/ + install -m 755 wishfoo $(tmp)/usr/bin/ + install -m 644 xsession-test $(tmp)/etc/X11/Xsession.d/ + +# Permissions here aren't part of what's being tested, but let us exercise +# some other errors. + install -m 755 perl-bizarre-1 $(tmp)/usr/bin/ + install -m 750 perl-bizarre-2 $(tmp)/usr/bin/ + install -m 754 perl-bizarre-3 $(tmp)/usr/bin/ + install -m 705 guile-bizarre $(tmp)/usr/bin/ + +# First one should produce a warning; second one shouldn't. + install -m 755 gccbug.dpatch $(tmp)/usr/share/scripts/ + install -m 755 gccbug.dpatch $(tmp)/usr/src/scripts/ + + install -m 644 init-skeleton $(tmp)/etc/init.d/skeleton + install -m 755 init-no-lsb $(tmp)/etc/init.d/no-lsb + install -m 755 init-lsb-broken $(tmp)/etc/init.d/lsb-broken + install -m 755 init-lsb-other $(tmp)/etc/init.d/lsb-other + + install -m 755 phpfoo $(tmp)/usr/share/scripts/ + sed 's/php$$/php7.0/' phpfoo > $(tmp)/usr/share/scripts/php7.0foo + chmod 755 $(tmp)/usr/share/scripts/php7.0foo + + install -m 755 phpenvfoo $(tmp)/usr/share/scripts/ + sed 's/php$$/php7.0/' phpenvfoo > $(tmp)/usr/share/scripts/php7.0envfoo + chmod 755 $(tmp)/usr/share/scripts/php7.0envfoo + + echo "#!/usr/bin/perl" >> $(tmp)/usr/share/scripts/foobar.in + chmod 644 $(tmp)/usr/share/scripts/foobar.in + + touch $(tmp)/usr/share/scripts/mono.exe + chmod 755 $(tmp)/usr/share/scripts/mono.exe + + echo "#!/bin/sh" > $(tmp)/usr/share/scripts/foo\$$bar + chmod 755 $(tmp)/usr/share/scripts/foo\$$bar + + echo "#!/bin/sh" > $(tmp)/usr/lib/cgi-bin/cgi-script + chmod 755 $(tmp)/usr/lib/cgi-bin/cgi-script + + echo "#!/bin/sh" > $(tmp)/usr/bin/test.sh + chmod 755 $(tmp)/usr/bin/test.sh + + + dh_testroot # dummy to test missing debhelper dependency + + + install -m 644 debian/changelog $(tmp)/usr/share/doc/scripts/changelog.Debian + gzip -n -9 $(tmp)/usr/share/doc/scripts/changelog.Debian + install -m 644 debian/copyright $(tmp)/usr/share/doc/scripts/copyright + + install -m 644 debian/scripts.conffiles $(tmp)/DEBIAN/conffiles + install -m 755 debian/preinst $(tmp)/DEBIAN/preinst + install -m 755 debian/postinst $(tmp)/DEBIAN/postinst + install -m 755 debian/postrm $(tmp)/DEBIAN/postrm + touch $(tmp)/DEBIAN/prerm + chmod 755 $(tmp)/DEBIAN/prerm + dpkg-gencontrol -isp + dpkg --build $(tmp) .. + +binary: binary-arch binary-indep + +clean: + rm -rf debian/files $(tmp) debian/substvars + +.PHONY: build-arch build-indep build binary-arch binary-indep binary clean diff --git a/t/recipes/checks/debian/copyright/legacy-scripts/build-spec/debian/scripts.conffiles b/t/recipes/checks/debian/copyright/legacy-scripts/build-spec/debian/scripts.conffiles new file mode 100644 index 0000000..01a371a --- /dev/null +++ b/t/recipes/checks/debian/copyright/legacy-scripts/build-spec/debian/scripts.conffiles @@ -0,0 +1,6 @@ +/etc/init.d/lsb-broken +/etc/init.d/lsb-other +/etc/init.d/no-lsb +/etc/X11/Xsession.d/xsession-test +/etc/csh/login.d/csh-foo +/etc/fish.d/fish-foo diff --git a/t/recipes/checks/debian/copyright/legacy-scripts/build-spec/debian/watch b/t/recipes/checks/debian/copyright/legacy-scripts/build-spec/debian/watch new file mode 100644 index 0000000..dba5815 --- /dev/null +++ b/t/recipes/checks/debian/copyright/legacy-scripts/build-spec/debian/watch @@ -0,0 +1,8 @@ +# watch file with upstream version mangling + +version=2 +opts="uversionmangle=s/$/ds/" \ +http://qa.debian.org/watch/sf.php?project=foo scripts\.([\d.]+)\.tar\.gz debian uupdate + +version=3 +http://ftp.sf.net/foo/foo_bar(.+)\.Z 5 uupdate \ No newline at end of file diff --git a/t/recipes/checks/debian/copyright/legacy-scripts/build-spec/fill-values b/t/recipes/checks/debian/copyright/legacy-scripts/build-spec/fill-values new file mode 100644 index 0000000..8a68457 --- /dev/null +++ b/t/recipes/checks/debian/copyright/legacy-scripts/build-spec/fill-values @@ -0,0 +1,6 @@ +Testname: legacy-scripts +Source: scripts +Version: 6ds-1ubuntu0.5.10.1 +Package-Architecture: all +Skeleton: upload-non-native +Description: Legacy test "scripts" diff --git a/t/recipes/checks/debian/copyright/legacy-scripts/build-spec/orig/csh-foo b/t/recipes/checks/debian/copyright/legacy-scripts/build-spec/orig/csh-foo new file mode 100644 index 0000000..eaf47a1 --- /dev/null +++ b/t/recipes/checks/debian/copyright/legacy-scripts/build-spec/orig/csh-foo @@ -0,0 +1,2 @@ +#! /bin/csh + diff --git a/t/recipes/checks/debian/copyright/legacy-scripts/build-spec/orig/envfoo b/t/recipes/checks/debian/copyright/legacy-scripts/build-spec/orig/envfoo new file mode 100755 index 0000000..e005037 --- /dev/null +++ b/t/recipes/checks/debian/copyright/legacy-scripts/build-spec/orig/envfoo @@ -0,0 +1,4 @@ +#! /bin/env python + +if __name__ == '__main__': + print 'Hi there' diff --git a/t/recipes/checks/debian/copyright/legacy-scripts/build-spec/orig/fish-foo b/t/recipes/checks/debian/copyright/legacy-scripts/build-spec/orig/fish-foo new file mode 100644 index 0000000..7f59139 --- /dev/null +++ b/t/recipes/checks/debian/copyright/legacy-scripts/build-spec/orig/fish-foo @@ -0,0 +1,2 @@ +#! /usr/bin/fish + diff --git a/t/recipes/checks/debian/copyright/legacy-scripts/build-spec/orig/gccbug.dpatch b/t/recipes/checks/debian/copyright/legacy-scripts/build-spec/orig/gccbug.dpatch new file mode 100755 index 0000000..65cbf37 --- /dev/null +++ b/t/recipes/checks/debian/copyright/legacy-scripts/build-spec/orig/gccbug.dpatch @@ -0,0 +1,39 @@ +#! /bin/sh -e + +# DP: Use sensible-editor instead of vi as fallback editor + +# Taken from gcc-4.1-source. Chokes bash -n (due to the patch) despite being +# a valid dpatch, so don't warn about it if it's in /usr/src. + +dir= +if [ $# -eq 3 -a "$2" = '-d' ]; then + pdir="-d $3" + dir="$3/" +elif [ $# -ne 1 ]; then + echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" + exit 1 +fi +case "$1" in + -patch) + patch $pdir -f --no-backup-if-mismatch -p0 < $0 + ;; + -unpatch) + patch $pdir -f --no-backup-if-mismatch -R -p0 < $0 + ;; + *) + echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" + exit 1 +esac +exit 0 + +--- gcc/gccbug.in~ 2003-03-01 00:51:42.000000000 +0100 ++++ gcc/gccbug.in 2003-03-02 12:08:36.000000000 +0100 +@@ -134,7 +134,7 @@ + # If they don't have a preferred editor set, then use + if [ -z "$VISUAL" ]; then + if [ -z "$EDITOR" ]; then +- EDIT=vi ++ EDIT=/usr/bin/sensible-editor + else + EDIT="$EDITOR" + fi diff --git a/t/recipes/checks/debian/copyright/legacy-scripts/build-spec/orig/guile-bizarre b/t/recipes/checks/debian/copyright/legacy-scripts/build-spec/orig/guile-bizarre new file mode 100644 index 0000000..70e2c74 --- /dev/null +++ b/t/recipes/checks/debian/copyright/legacy-scripts/build-spec/orig/guile-bizarre @@ -0,0 +1,6 @@ +#! /bin/sh +# -*- scheme -*- +exec guile -s $0 $* +# Seen in the wild as build-guile-gtk in libguilegtk-1.2-dev (0.31-5.1) +# Tests script_is_evil_and_wrong +!# diff --git a/t/recipes/checks/debian/copyright/legacy-scripts/build-spec/orig/init-lsb-broken b/t/recipes/checks/debian/copyright/legacy-scripts/build-spec/orig/init-lsb-broken new file mode 100644 index 0000000..e4dfa92 --- /dev/null +++ b/t/recipes/checks/debian/copyright/legacy-scripts/build-spec/orig/init-lsb-broken @@ -0,0 +1,34 @@ +#! /bin/sh +### BEGIN INIT INFO +# Provides: bad-lsb +# Required-Start: $local_fs $remote_fs +# Required-Stop: +# Default-Start: 1 2 3 4 5 +# Default-Stop: S 0 1 6 X +# Short-Description: Example Lintian initscript +# but this can't be continued +# Description: An example of a bad LSB section in an init script. +# This continuation is allowed (with spaces). +# This one is too (with tabs). +# X-Debian-Foo: Some unknown but valid keyword. +# Foo: Some invalid keyword. + +# Whoops, no terminating line. + +# And then we have this duplicate section. +### BEGIN INIT INFO +# Required-Start: This one doesn't count. +### END INIT INFO + +# Hey, look at all of those missing actions! But stop isn't missing. +case "$1" in + start|stop) + echo "Blah" + ;; + *) + echo "Usage: foo start" >&2 + exit 3 + ;; +esac + +: diff --git a/t/recipes/checks/debian/copyright/legacy-scripts/build-spec/orig/init-lsb-other b/t/recipes/checks/debian/copyright/legacy-scripts/build-spec/orig/init-lsb-other new file mode 100644 index 0000000..adb4795 --- /dev/null +++ b/t/recipes/checks/debian/copyright/legacy-scripts/build-spec/orig/init-lsb-other @@ -0,0 +1,22 @@ +#! /bin/sh +### BEGIN INIT INFO +# Provides: lsb-other +# Required-Start: $local_fs $remote_fs +# Required-Stop: $local_fs $remote_fs +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +# Description: This is another LSB script test, which has a missing +# Short-Description. +### END INIT INFO + +case "$1" in + start|stop|restart|reload|force-reload) + echo "Blah" + ;; + *) + echo "Usage: foo start" >&2 + exit 3 + ;; +esac + +: diff --git a/t/recipes/checks/debian/copyright/legacy-scripts/build-spec/orig/init-no-lsb b/t/recipes/checks/debian/copyright/legacy-scripts/build-spec/orig/init-no-lsb new file mode 100644 index 0000000..6b994dd --- /dev/null +++ b/t/recipes/checks/debian/copyright/legacy-scripts/build-spec/orig/init-no-lsb @@ -0,0 +1,17 @@ +#! /bin/sh +# No LSB section, but otherwise okay. (Well, the messages are bad, but we +# don't check that yet.) + +case "$1" in + start) + echo "Blah starting" + ;; + stop) + echo "Blah stopping" + ;; + restart|force-reload) + echo "Blah restarting" + ;; +esac + +: diff --git a/t/recipes/checks/debian/copyright/legacy-scripts/build-spec/orig/init-skeleton b/t/recipes/checks/debian/copyright/legacy-scripts/build-spec/orig/init-skeleton new file mode 100644 index 0000000..c868508 --- /dev/null +++ b/t/recipes/checks/debian/copyright/legacy-scripts/build-spec/orig/init-skeleton @@ -0,0 +1,150 @@ +#! /bin/sh +### BEGIN INIT INFO +# Provides: skeleton +# Required-Start: $local_fs $remote_fs +# Required-Stop: $local_fs $remote_fs +# Default-Start: 2 3 4 5 +# Default-Stop: S 0 1 6 +# Short-Description: Example Lintian initscript +# Description: This file should be used to construct scripts to be +# placed in /etc/init.d. +### END INIT INFO + +# Do NOT "set -e" + +# PATH should only include /usr/* if it runs after the mountnfs.sh script +PATH=/usr/sbin:/usr/bin:/sbin:/bin +DESC="Description of the service" +NAME=daemonexecutablename +DAEMON=/usr/sbin/$NAME +DAEMON_ARGS="--options args" +PIDFILE=/var/run/$NAME.pid +SCRIPTNAME=/etc/init.d/$NAME + +# Exit if the package is not installed +[ -x "$DAEMON" ] || exit 0 + +# Read configuration variable file if it is present +[ -r /etc/default/$NAME ] && . /etc/default/$NAME + +# Load the VERBOSE setting and other rcS variables +[ -f /etc/default/rcS ] && . /etc/default/rcS + +# Define LSB log_* functions. +# Depend on lsb-base (>= 3.0-6) to ensure that this file is present. +. /lib/lsb/init-functions + +# +# Function that starts the daemon/service +# +do_start() +{ + # Return + # 0 if daemon has been started + # 1 if daemon was already running + # 2 if daemon could not be started + start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON --test > /dev/null \ + || return 1 + start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON -- \ + $DAEMON_ARGS \ + || return 2 + # Add code here, if necessary, that waits for the process to be ready + # to handle requests from services started subsequently which depend + # on this one. As a last resort, sleep for some time. +} + +# +# Function that stops the daemon/service +# +do_stop() +{ + # Return + # 0 if daemon has been stopped + # 1 if daemon was already stopped + # 2 if daemon could not be stopped + # other if a failure occurred + start-stop-daemon --stop --quiet --retry=TERM/30/KILL/5 --pidfile $PIDFILE --name $NAME + RETVAL="$?" + [ "$RETVAL" = 2 ] && return 2 + # Wait for children to finish too if this is a daemon that forks + # and if the daemon is only ever run from this initscript. + # If the above conditions are not satisfied then add some other code + # that waits for the process to drop all resources that could be + # needed by services started subsequently. A last resort is to + # sleep for some time. + start-stop-daemon --stop --quiet --oknodo --retry=0/30/KILL/5 --exec $DAEMON + [ "$?" = 2 ] && return 2 + # Many daemons don't delete their pidfiles when they exit. + rm -f $PIDFILE + return "$RETVAL" +} + +# +# Function that sends a SIGHUP to the daemon/service +# +do_reload() { + # + # If the daemon can reload its configuration without + # restarting (for example, when it is sent a SIGHUP), + # then implement that here. + # + start-stop-daemon --stop --signal 1 --quiet --pidfile $PIDFILE --name $NAME + return 0 +} + +case "$1" in + start) + [ "$VERBOSE" != no ] && log_daemon_msg "Starting $DESC" "$NAME" + do_start + case "$?" in + 0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;; + 2) [ "$VERBOSE" != no ] && log_end_msg 1 ;; + esac + ;; + stop) + [ "$VERBOSE" != no ] && log_daemon_msg "Stopping $DESC" "$NAME" + do_stop + case "$?" in + 0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;; + 2) [ "$VERBOSE" != no ] && log_end_msg 1 ;; + esac + ;; + #reload|force-reload) + # + # If do_reload() is not implemented then leave this commented out + # and leave 'force-reload' as an alias for 'restart'. + # + #log_daemon_msg "Reloading $DESC" "$NAME" + #do_reload + #log_end_msg $? + #;; + restart|force-reload) + # + # If the "reload" option is implemented then remove the + # 'force-reload' alias + # + log_daemon_msg "Restarting $DESC" "$NAME" + do_stop + case "$?" in + 0|1) + do_start + case "$?" in + 0) log_end_msg 0 ;; + 1) log_end_msg 1 ;; # Old process is still running + *) log_end_msg 1 ;; # Failed to start + esac + ;; + *) + # Failed to stop + log_end_msg 1 + ;; + esac + ;; + *) + #echo "Usage: $SCRIPTNAME {start|stop|restart|reload|force-reload}" >&2 + echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload}" >&2 + exit 3 + ;; +esac + +: diff --git a/t/recipes/checks/debian/copyright/legacy-scripts/build-spec/orig/jruby-broken b/t/recipes/checks/debian/copyright/legacy-scripts/build-spec/orig/jruby-broken new file mode 100644 index 0000000..56f574d --- /dev/null +++ b/t/recipes/checks/debian/copyright/legacy-scripts/build-spec/orig/jruby-broken @@ -0,0 +1,2 @@ +#!/usr/bin/jruby +# There's no non-versioned jruby, so this should be an error. diff --git a/t/recipes/checks/debian/copyright/legacy-scripts/build-spec/orig/lefty-foo b/t/recipes/checks/debian/copyright/legacy-scripts/build-spec/orig/lefty-foo new file mode 100644 index 0000000..52c003e --- /dev/null +++ b/t/recipes/checks/debian/copyright/legacy-scripts/build-spec/orig/lefty-foo @@ -0,0 +1,2 @@ +#!/usr/local/bin/lefty + diff --git a/t/recipes/checks/debian/copyright/legacy-scripts/build-spec/orig/make-foo b/t/recipes/checks/debian/copyright/legacy-scripts/build-spec/orig/make-foo new file mode 100644 index 0000000..6b787b5 --- /dev/null +++ b/t/recipes/checks/debian/copyright/legacy-scripts/build-spec/orig/make-foo @@ -0,0 +1,3 @@ +#!/usr/bin/make + + diff --git a/t/recipes/checks/debian/copyright/legacy-scripts/build-spec/orig/perl-bizarre-1 b/t/recipes/checks/debian/copyright/legacy-scripts/build-spec/orig/perl-bizarre-1 new file mode 100644 index 0000000..fc632c8 --- /dev/null +++ b/t/recipes/checks/debian/copyright/legacy-scripts/build-spec/orig/perl-bizarre-1 @@ -0,0 +1,11 @@ +#! /bin/sh +eval '(exit $?0)' && eval 'PERL_BADLANG=x;export PERL_BADLANG;: \ +;exec perl -x -S -- "$0" ${1+"$@"};#'if 0; +eval 'setenv PERL_BADLANG x;exec perl -x -S -- "$0" $argv:q;#'.q+ +#!perl -w +package Htex::a2ping; $0=~/(.*)/s;unshift@INC,'.';do($1);die$@if$@;__END__+if !1; +# This Perl script was generated by JustLib2 at Wed Apr 23 09:14:13 2003. +# Don't touch/remove any lines above; http://www.inf.bme.hu/~pts/justlib + +# The above was actually seen in the wild and stresses the +# script_is_evil_and_wrong test. diff --git a/t/recipes/checks/debian/copyright/legacy-scripts/build-spec/orig/perl-bizarre-2 b/t/recipes/checks/debian/copyright/legacy-scripts/build-spec/orig/perl-bizarre-2 new file mode 100644 index 0000000..afd9cfe --- /dev/null +++ b/t/recipes/checks/debian/copyright/legacy-scripts/build-spec/orig/perl-bizarre-2 @@ -0,0 +1,7 @@ +#!/bin/sh +eval 'exec /usr/bin/perl -wS $0 ${1+"$@"}' + if $running_under_some_shell; + +# I'm someone following perlrun except without using the Perl #! line. +# Now something to choke bash. +while (<>) { if (/%#/) { print } } diff --git a/t/recipes/checks/debian/copyright/legacy-scripts/build-spec/orig/perl-bizarre-3 b/t/recipes/checks/debian/copyright/legacy-scripts/build-spec/orig/perl-bizarre-3 new file mode 100644 index 0000000..44baf75 --- /dev/null +++ b/t/recipes/checks/debian/copyright/legacy-scripts/build-spec/orig/perl-bizarre-3 @@ -0,0 +1,6 @@ +eval '(exit $?0)' && eval 'exec perl -wS $0 ${1+"$@"}' +& eval 'exec /usr/bin/perl -wS $0 $argv:q' + if $running_under_some_shell; + +# More utterly bizarreness from perlrun. This one even doesn't work if +# there's a valid #! line on the first line. I don't understand why.... diff --git a/t/recipes/checks/debian/copyright/legacy-scripts/build-spec/orig/perlfoo b/t/recipes/checks/debian/copyright/legacy-scripts/build-spec/orig/perlfoo new file mode 100644 index 0000000..5b27ed0 --- /dev/null +++ b/t/recipes/checks/debian/copyright/legacy-scripts/build-spec/orig/perlfoo @@ -0,0 +1,3 @@ +#! /usr/bin/perl + +print "Hello, World!"; diff --git a/t/recipes/checks/debian/copyright/legacy-scripts/build-spec/orig/phpenvfoo b/t/recipes/checks/debian/copyright/legacy-scripts/build-spec/orig/phpenvfoo new file mode 100644 index 0000000..cbbfb2e --- /dev/null +++ b/t/recipes/checks/debian/copyright/legacy-scripts/build-spec/orig/phpenvfoo @@ -0,0 +1,7 @@ +#!/usr/bin/env php + + +Dumb PHP script + + + diff --git a/t/recipes/checks/debian/copyright/legacy-scripts/build-spec/orig/phpfoo b/t/recipes/checks/debian/copyright/legacy-scripts/build-spec/orig/phpfoo new file mode 100644 index 0000000..e0595e6 --- /dev/null +++ b/t/recipes/checks/debian/copyright/legacy-scripts/build-spec/orig/phpfoo @@ -0,0 +1,7 @@ +#!/usr/bin/php + + +Dumb PHP script + + + diff --git a/t/recipes/checks/debian/copyright/legacy-scripts/build-spec/orig/rubyfoo b/t/recipes/checks/debian/copyright/legacy-scripts/build-spec/orig/rubyfoo new file mode 100644 index 0000000..8024605 --- /dev/null +++ b/t/recipes/checks/debian/copyright/legacy-scripts/build-spec/orig/rubyfoo @@ -0,0 +1,4 @@ +#!/bin/ruby1.8 + +# Ok, that example is really pathetic, but until we have +# some better code in checks/scripts, it will do diff --git a/t/recipes/checks/debian/copyright/legacy-scripts/build-spec/orig/sh-broken b/t/recipes/checks/debian/copyright/legacy-scripts/build-spec/orig/sh-broken new file mode 100644 index 0000000..7b79074 --- /dev/null +++ b/t/recipes/checks/debian/copyright/legacy-scripts/build-spec/orig/sh-broken @@ -0,0 +1,2 @@ +#!/bin/sh +if fi diff --git a/t/recipes/checks/debian/copyright/legacy-scripts/build-spec/orig/suidperlfoo b/t/recipes/checks/debian/copyright/legacy-scripts/build-spec/orig/suidperlfoo new file mode 100644 index 0000000..bcbc471 --- /dev/null +++ b/t/recipes/checks/debian/copyright/legacy-scripts/build-spec/orig/suidperlfoo @@ -0,0 +1,3 @@ +#! /usr/bin/suidperl + +print "Hello, World!"; diff --git a/t/recipes/checks/debian/copyright/legacy-scripts/build-spec/orig/tkfoo b/t/recipes/checks/debian/copyright/legacy-scripts/build-spec/orig/tkfoo new file mode 100755 index 0000000..533595a --- /dev/null +++ b/t/recipes/checks/debian/copyright/legacy-scripts/build-spec/orig/tkfoo @@ -0,0 +1,31 @@ +#!/bin/sh +# +# Insane amount of empty lines and comments + +# +# +# +# + +# +# + +# +# +# + +# +# + +# +# This line makes the next one a comment in Tcl \ +exec wish "$0" -- ${1+"$@"} + +# lintian should not check the following for syntax +# if it detects the line above correctly +# Code snippet taken from eTkTab + +if { [array names prefs keybindings] != "" } { + # Read in the file + array set unparsed_bindings [ read_settings_file $prefs(keybindings)] +} diff --git a/t/recipes/checks/debian/copyright/legacy-scripts/build-spec/orig/wishfoo b/t/recipes/checks/debian/copyright/legacy-scripts/build-spec/orig/wishfoo new file mode 100644 index 0000000..035c9ad --- /dev/null +++ b/t/recipes/checks/debian/copyright/legacy-scripts/build-spec/orig/wishfoo @@ -0,0 +1,4 @@ +#!/usr/bin/wish +# +# This is not actually a wish script, here to force a test of wish +# dependencies. diff --git a/t/recipes/checks/debian/copyright/legacy-scripts/build-spec/orig/xsession-test b/t/recipes/checks/debian/copyright/legacy-scripts/build-spec/orig/xsession-test new file mode 100644 index 0000000..ca49d72 --- /dev/null +++ b/t/recipes/checks/debian/copyright/legacy-scripts/build-spec/orig/xsession-test @@ -0,0 +1,3 @@ +#!/bin/sh + +echo "Foo." diff --git a/t/recipes/checks/debian/copyright/legacy-scripts/build-spec/pre-build b/t/recipes/checks/debian/copyright/legacy-scripts/build-spec/pre-build new file mode 100755 index 0000000..b5649a8 --- /dev/null +++ b/t/recipes/checks/debian/copyright/legacy-scripts/build-spec/pre-build @@ -0,0 +1,5 @@ +#!/bin/sh + +DIR="$1" + +rm -f "$DIR/debian/compat" diff --git a/t/recipes/checks/debian/copyright/legacy-scripts/eval/desc b/t/recipes/checks/debian/copyright/legacy-scripts/eval/desc new file mode 100644 index 0000000..10da391 --- /dev/null +++ b/t/recipes/checks/debian/copyright/legacy-scripts/eval/desc @@ -0,0 +1,2 @@ +Testname: legacy-scripts +Check: debian/copyright diff --git a/t/recipes/checks/debian/copyright/legacy-scripts/eval/hints b/t/recipes/checks/debian/copyright/legacy-scripts/eval/hints new file mode 100644 index 0000000..5ab0622 --- /dev/null +++ b/t/recipes/checks/debian/copyright/legacy-scripts/eval/hints @@ -0,0 +1 @@ +scripts (binary): copyright-file-lacks-pointer-to-perl-license diff --git a/t/recipes/checks/debian/copyright/legacy-scripts/eval/post-test b/t/recipes/checks/debian/copyright/legacy-scripts/eval/post-test new file mode 100644 index 0000000..faeef0b --- /dev/null +++ b/t/recipes/checks/debian/copyright/legacy-scripts/eval/post-test @@ -0,0 +1 @@ +s/\(current is ([0-9]+\.)+[0-9]\)/(current is CURRENT)/ diff --git a/t/recipes/checks/debian/copyright/named-copyright-in-source/build-spec/fill-values b/t/recipes/checks/debian/copyright/named-copyright-in-source/build-spec/fill-values new file mode 100644 index 0000000..da1fd11 --- /dev/null +++ b/t/recipes/checks/debian/copyright/named-copyright-in-source/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: upload-native +Testname: named-copyright-in-source +Description: Builds single package and uses d/$package.copyright as name diff --git a/t/recipes/checks/debian/copyright/named-copyright-in-source/build-spec/pre-build b/t/recipes/checks/debian/copyright/named-copyright-in-source/build-spec/pre-build new file mode 100755 index 0000000..90f1ee3 --- /dev/null +++ b/t/recipes/checks/debian/copyright/named-copyright-in-source/build-spec/pre-build @@ -0,0 +1,4 @@ +#!/bin/sh + +cd "$1/debian" +mv copyright named-copyright-in-source.copyright diff --git a/t/recipes/checks/debian/copyright/named-copyright-in-source/eval/desc b/t/recipes/checks/debian/copyright/named-copyright-in-source/eval/desc new file mode 100644 index 0000000..f3ddca1 --- /dev/null +++ b/t/recipes/checks/debian/copyright/named-copyright-in-source/eval/desc @@ -0,0 +1,2 @@ +Testname: named-copyright-in-source +Check: debian/copyright diff --git a/t/recipes/checks/debian/copyright/named-copyright-in-source/eval/hints b/t/recipes/checks/debian/copyright/named-copyright-in-source/eval/hints new file mode 100644 index 0000000..4000c74 --- /dev/null +++ b/t/recipes/checks/debian/copyright/named-copyright-in-source/eval/hints @@ -0,0 +1 @@ +named-copyright-in-source (source): named-copyright-for-single-installable [debian/named-copyright-in-source.copyright] diff --git a/t/recipes/checks/debian/copyright/source-copyright-missing/build-spec/fill-values b/t/recipes/checks/debian/copyright/source-copyright-missing/build-spec/fill-values new file mode 100644 index 0000000..013c23c --- /dev/null +++ b/t/recipes/checks/debian/copyright/source-copyright-missing/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: upload-native +Testname: source-copyright-missing +Description: Test for missing copyright diff --git a/t/recipes/checks/debian/copyright/source-copyright-missing/build-spec/pre-build b/t/recipes/checks/debian/copyright/source-copyright-missing/build-spec/pre-build new file mode 100755 index 0000000..50ea07f --- /dev/null +++ b/t/recipes/checks/debian/copyright/source-copyright-missing/build-spec/pre-build @@ -0,0 +1,2 @@ +#!/bin/sh +rm -f "$1/debian/copyright" diff --git a/t/recipes/checks/debian/copyright/source-copyright-missing/eval/desc b/t/recipes/checks/debian/copyright/source-copyright-missing/eval/desc new file mode 100644 index 0000000..0cf3873 --- /dev/null +++ b/t/recipes/checks/debian/copyright/source-copyright-missing/eval/desc @@ -0,0 +1,2 @@ +Testname: source-copyright-missing +Check: debian/copyright diff --git a/t/recipes/checks/debian/copyright/source-copyright-missing/eval/hints b/t/recipes/checks/debian/copyright/source-copyright-missing/eval/hints new file mode 100644 index 0000000..73ace17 --- /dev/null +++ b/t/recipes/checks/debian/copyright/source-copyright-missing/eval/hints @@ -0,0 +1,2 @@ +source-copyright-missing (source): no-debian-copyright-in-source +source-copyright-missing (binary): no-copyright-file diff --git a/t/recipes/checks/debian/copyright/source-copyright-symlink/build-spec/fill-values b/t/recipes/checks/debian/copyright/source-copyright-symlink/build-spec/fill-values new file mode 100644 index 0000000..2b5fdb3 --- /dev/null +++ b/t/recipes/checks/debian/copyright/source-copyright-symlink/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: upload-native +Testname: source-copyright-symlink +Description: Test for symlinked debian/copyright diff --git a/t/recipes/checks/debian/copyright/source-copyright-symlink/build-spec/pre-build b/t/recipes/checks/debian/copyright/source-copyright-symlink/build-spec/pre-build new file mode 100755 index 0000000..0afeafe --- /dev/null +++ b/t/recipes/checks/debian/copyright/source-copyright-symlink/build-spec/pre-build @@ -0,0 +1,4 @@ +#!/bin/sh +cd "$1/debian" +mv copyright source-copyright-symlink.copyright +ln -sf source-copyright-symlink.copyright copyright diff --git a/t/recipes/checks/debian/copyright/source-copyright-symlink/eval/desc b/t/recipes/checks/debian/copyright/source-copyright-symlink/eval/desc new file mode 100644 index 0000000..8d47ecf --- /dev/null +++ b/t/recipes/checks/debian/copyright/source-copyright-symlink/eval/desc @@ -0,0 +1,2 @@ +Testname: source-copyright-symlink +Check: debian/copyright diff --git a/t/recipes/checks/debian/copyright/source-copyright-symlink/eval/hints b/t/recipes/checks/debian/copyright/source-copyright-symlink/eval/hints new file mode 100644 index 0000000..27b032a --- /dev/null +++ b/t/recipes/checks/debian/copyright/source-copyright-symlink/eval/hints @@ -0,0 +1 @@ +source-copyright-symlink (source): debian-copyright-is-symlink [debian/copyright] diff --git a/t/recipes/checks/debian/copyright/source-copyright-undefined/build-spec/debian/copyright b/t/recipes/checks/debian/copyright/source-copyright-undefined/build-spec/debian/copyright new file mode 100644 index 0000000..049fb78 --- /dev/null +++ b/t/recipes/checks/debian/copyright/source-copyright-undefined/build-spec/debian/copyright @@ -0,0 +1,56 @@ +Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Upstream-Name: Doohickey +Upstream-Contact: J. Random Hacker +Source: http://examples.com/doohickey/source/ + +Files: * +Copyright: 2014, somebody1 +License: Fixme + Fixme-license text + + +Files: debian/* +Copyright: 2014, somebody2 +License: unknown + Fixme + +Files: debian/a +Copyright: 2014, somebody2 +License: unknow + Fixme + +Files: debian/b +Copyright: 2014, somebody2 +License: todo + Fixme + +Files: debian/c +comment: some spacing +Copyright: 2014, somebody2 +License: - + Fixme + +Files: debian/d +comment: some spacing +Copyright: 2014, somebody2 +License: - + Fixme + +Files: debian/e +Comment: too many false positive with space +Copyright: 2014, somebody2 +License: undefined license + Fixme + +Files: debian/f +comment: some spacing +Copyright: 2014, somebody2 +License: undefined + Fixme + +Files: debian/g +comment: false positive +Copyright: 2014, somebody2 +License: common public license - v 1.0 + Fixme + diff --git a/t/recipes/checks/debian/copyright/source-copyright-undefined/build-spec/debian/plus+file b/t/recipes/checks/debian/copyright/source-copyright-undefined/build-spec/debian/plus+file new file mode 100644 index 0000000..e69de29 diff --git a/t/recipes/checks/debian/copyright/source-copyright-undefined/build-spec/fill-values b/t/recipes/checks/debian/copyright/source-copyright-undefined/build-spec/fill-values new file mode 100644 index 0000000..9588707 --- /dev/null +++ b/t/recipes/checks/debian/copyright/source-copyright-undefined/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: upload-native +Testname: source-copyright-undefined +Description: Test for fixme/todo/unknown diff --git a/t/recipes/checks/debian/copyright/source-copyright-undefined/eval/desc b/t/recipes/checks/debian/copyright/source-copyright-undefined/eval/desc new file mode 100644 index 0000000..7fa8574 --- /dev/null +++ b/t/recipes/checks/debian/copyright/source-copyright-undefined/eval/desc @@ -0,0 +1,2 @@ +Testname: source-copyright-undefined +Check: debian/copyright diff --git a/t/recipes/checks/debian/copyright/source-copyright-undefined/eval/hints b/t/recipes/checks/debian/copyright/source-copyright-undefined/eval/hints new file mode 100644 index 0000000..cff9e45 --- /dev/null +++ b/t/recipes/checks/debian/copyright/source-copyright-undefined/eval/hints @@ -0,0 +1 @@ +source-copyright-undefined (binary): spelling-error-in-copyright unknow unknown diff --git a/t/recipes/checks/debian/copyright/spelling-general/build-spec/debian/changelog.in b/t/recipes/checks/debian/copyright/spelling-general/build-spec/debian/changelog.in new file mode 100644 index 0000000..2d380f5 --- /dev/null +++ b/t/recipes/checks/debian/copyright/spelling-general/build-spec/debian/changelog.in @@ -0,0 +1,13 @@ +[% $source %] ([% $version %]) unstable; urgency=low + + * Lintian Test Suite. + * Test: [% $testname %] + + * Suppress "should close ITP bug" messages. (Closes: #123456) + * This line has a speling error. + - This line has the same speling error, but we should only + get one tag for it. + * Corrected spelling: abov -> above. + * Corrected typo: abov -> above. + + -- [% $author %] [% $date %] diff --git a/t/recipes/checks/debian/copyright/spelling-general/build-spec/debian/copyright b/t/recipes/checks/debian/copyright/spelling-general/build-spec/debian/copyright new file mode 100644 index 0000000..30cbe5c --- /dev/null +++ b/t/recipes/checks/debian/copyright/spelling-general/build-spec/debian/copyright @@ -0,0 +1,21 @@ +This duplicate duplicate word should not trigger. (re. #897402) + +This is part of the testsuite of lintian. See the file debian/copyright +in the lintian source directory for more details. + +Insofar as this is copyrightable, it is: + + Copyright 2010 Russ Allbery + +This text should not generate a spelling error for "ment": + + computer software documentation," as such terms are used in + 48 C.F.R. 12.212 (SEPT 1995) and is provided to the U.S. Govern- + ment only as a commercial end item. Consistent with 48 C.F.R. + 12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4 (JUNE 1995), + +But deafult is still a spelling error. + +This text should not generate a spelling error for the duplicate "a" (re. #844166) + + following Attribution Information: (a) a copyright notice including the name diff --git a/t/recipes/checks/debian/copyright/spelling-general/build-spec/debian/doc-base b/t/recipes/checks/debian/copyright/spelling-general/build-spec/debian/doc-base new file mode 100644 index 0000000..3839a9b --- /dev/null +++ b/t/recipes/checks/debian/copyright/spelling-general/build-spec/debian/doc-base @@ -0,0 +1,9 @@ +Document: spelling-general +Title: Check for debian doc-base spelling errors +Author: Russ Allbery +Abstract: This control file exercises, picky, speling error checks for + Debian doc-base files, such as meta-package. +Section: Programming + +Format: text +Files: /usr/share/doc/spelling-general/copyright diff --git a/t/recipes/checks/debian/copyright/spelling-general/build-spec/debian/patches/add-readme b/t/recipes/checks/debian/copyright/spelling-general/build-spec/debian/patches/add-readme new file mode 100644 index 0000000..b1647ba --- /dev/null +++ b/t/recipes/checks/debian/copyright/spelling-general/build-spec/debian/patches/add-readme @@ -0,0 +1,8 @@ +This is a deliberate speling error. duplicate + +duplicate + +--- upstream.orig/README ++++ upstream/README +@@ -0,0 +1 @@ ++Added by patch system. diff --git a/t/recipes/checks/debian/copyright/spelling-general/build-spec/debian/patches/nonrel b/t/recipes/checks/debian/copyright/spelling-general/build-spec/debian/patches/nonrel new file mode 100644 index 0000000..48e7740 --- /dev/null +++ b/t/recipes/checks/debian/copyright/spelling-general/build-spec/debian/patches/nonrel @@ -0,0 +1,6 @@ +This is a deliberate speling error. (false positive; description mentions typo) + +--- upstream.orig/nonrel ++++ upstream/nonrel +@@ -0,0 +1 @@ ++Added by patch system. diff --git a/t/recipes/checks/debian/copyright/spelling-general/build-spec/debian/patches/series b/t/recipes/checks/debian/copyright/spelling-general/build-spec/debian/patches/series new file mode 100644 index 0000000..0bfb03d --- /dev/null +++ b/t/recipes/checks/debian/copyright/spelling-general/build-spec/debian/patches/series @@ -0,0 +1,3 @@ +add-readme +spelling +nonrel diff --git a/t/recipes/checks/debian/copyright/spelling-general/build-spec/debian/patches/spelling b/t/recipes/checks/debian/copyright/spelling-general/build-spec/debian/patches/spelling new file mode 100644 index 0000000..29b9cfd --- /dev/null +++ b/t/recipes/checks/debian/copyright/spelling-general/build-spec/debian/patches/spelling @@ -0,0 +1,6 @@ +This is a deliberate speling error. (false positive; filename match) + +--- upstream.orig/spelling ++++ upstream/spelling +@@ -0,0 +1 @@ ++Added by patch system. diff --git a/t/recipes/checks/debian/copyright/spelling-general/build-spec/fill-values b/t/recipes/checks/debian/copyright/spelling-general/build-spec/fill-values new file mode 100644 index 0000000..1c8c790 --- /dev/null +++ b/t/recipes/checks/debian/copyright/spelling-general/build-spec/fill-values @@ -0,0 +1,4 @@ +Testname: spelling-general +Skeleton: upload-non-native +Source-Format: 3.0 (quilt) +Description: General checks for spelling errors diff --git a/t/recipes/checks/debian/copyright/spelling-general/eval/desc b/t/recipes/checks/debian/copyright/spelling-general/eval/desc new file mode 100644 index 0000000..62005c6 --- /dev/null +++ b/t/recipes/checks/debian/copyright/spelling-general/eval/desc @@ -0,0 +1,2 @@ +Testname: spelling-general +Check: debian/copyright diff --git a/t/recipes/checks/debian/copyright/spelling-general/eval/hints b/t/recipes/checks/debian/copyright/spelling-general/eval/hints new file mode 100644 index 0000000..66eb250 --- /dev/null +++ b/t/recipes/checks/debian/copyright/spelling-general/eval/hints @@ -0,0 +1 @@ +spelling-general (binary): spelling-error-in-copyright deafult default diff --git a/t/recipes/checks/debian/debconf/debconf-config-general/build-spec/debian/config b/t/recipes/checks/debian/debconf/debconf-config-general/build-spec/debian/config new file mode 100644 index 0000000..fdec12b --- /dev/null +++ b/t/recipes/checks/debian/debconf/debconf-config-general/build-spec/debian/config @@ -0,0 +1,22 @@ +#!/bin/sh + +set -e + +# Forget to load the confmodule +# . /usr/share/debconf/confmodule + + +db_input low debconf/note-abuse +db_go + + +db_input unknown debconf/unknown-priority +db_go + +db_fset debconf/deprecated-default isdefault true + +db_input low debconf/deprecated-default +db_go + +db_input low debconf/translated +db_go diff --git a/t/recipes/checks/debian/debconf/debconf-config-general/build-spec/debian/po/POTFILES.in b/t/recipes/checks/debian/debconf/debconf-config-general/build-spec/debian/po/POTFILES.in new file mode 100644 index 0000000..cef83a3 --- /dev/null +++ b/t/recipes/checks/debian/debconf/debconf-config-general/build-spec/debian/po/POTFILES.in @@ -0,0 +1 @@ +[type: gettext/rfc822deb] templates diff --git a/t/recipes/checks/debian/debconf/debconf-config-general/build-spec/debian/po/da.po b/t/recipes/checks/debian/debconf/debconf-config-general/build-spec/debian/po/da.po new file mode 100644 index 0000000..d659394 --- /dev/null +++ b/t/recipes/checks/debian/debconf/debconf-config-general/build-spec/debian/po/da.po @@ -0,0 +1,42 @@ +# Danish translations for PACKAGE package. +# Copyright (C) 2012 THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# Niels Thykier , 2012. +# +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2012-10-01 22:49+0200\n" +"PO-Revision-Date: 2012-07-23 23:08+0200\n" +"Last-Translator: Niels Thykier \n" +"Language-Team: Danish\n" +"Language: da\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#. Type: error +#. Description +#: ../templates:1001 +msgid "Useless note" +msgstr "Ubrugelig note" + +#. Type: note +#. Description +#: ../templates:2001 +msgid "This is a note abuse" +msgstr "Dette er et note misbrug" + +#. Type: error +#. Description +#: ../templates:3001 +msgid "Invoked with unknown debconf priority" +msgstr "Kaldt med ukendt debconf prioritet" + +#. Type: boolean +#. Description +#: ../templates:4001 +msgid "Is this use deprecated?" +msgstr "Er denne brug forældet?" diff --git a/t/recipes/checks/debian/debconf/debconf-config-general/build-spec/debian/po/templates.pot b/t/recipes/checks/debian/debconf/debconf-config-general/build-spec/debian/po/templates.pot new file mode 100644 index 0000000..2107421 --- /dev/null +++ b/t/recipes/checks/debian/debconf/debconf-config-general/build-spec/debian/po/templates.pot @@ -0,0 +1,42 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2012-10-01 22:49+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=CHARSET\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Type: error +#. Description +#: ../templates:1001 +msgid "Useless note" +msgstr "" + +#. Type: note +#. Description +#: ../templates:2001 +msgid "This is a note abuse" +msgstr "" + +#. Type: error +#. Description +#: ../templates:3001 +msgid "Invoked with unknown debconf priority" +msgstr "" + +#. Type: boolean +#. Description +#: ../templates:4001 +msgid "Is this use deprecated?" +msgstr "" diff --git a/t/recipes/checks/debian/debconf/debconf-config-general/build-spec/debian/postinst b/t/recipes/checks/debian/debconf/debconf-config-general/build-spec/debian/postinst new file mode 100644 index 0000000..4d6cb4d --- /dev/null +++ b/t/recipes/checks/debian/debconf/debconf-config-general/build-spec/debian/postinst @@ -0,0 +1,8 @@ +#!/bin/sh + +set -e + +#DEBHELPER# + +. /usr/share/debconf/confmodule + diff --git a/t/recipes/checks/debian/debconf/debconf-config-general/build-spec/debian/templates b/t/recipes/checks/debian/debconf/debconf-config-general/build-spec/debian/templates new file mode 100644 index 0000000..5097b3a --- /dev/null +++ b/t/recipes/checks/debian/debconf/debconf-config-general/build-spec/debian/templates @@ -0,0 +1,15 @@ +Template: debconf/translated +Type: error +_Description: Useless note + +Template: debconf/note-abuse +Type: note +_Description: This is a note abuse + +Template: debconf/unknown-priority +Type: error +_Description: Invoked with unknown debconf priority + +Template: debconf/deprecated-default +Type: boolean +_Description: Is this use deprecated? diff --git a/t/recipes/checks/debian/debconf/debconf-config-general/build-spec/fill-values b/t/recipes/checks/debian/debconf/debconf-config-general/build-spec/fill-values new file mode 100644 index 0000000..bf494b1 --- /dev/null +++ b/t/recipes/checks/debian/debconf/debconf-config-general/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: upload-native +Testname: debconf-config-general +Description: Test for various debconf config issues diff --git a/t/recipes/checks/debian/debconf/debconf-config-general/eval/desc b/t/recipes/checks/debian/debconf/debconf-config-general/eval/desc new file mode 100644 index 0000000..e2a46b0 --- /dev/null +++ b/t/recipes/checks/debian/debconf/debconf-config-general/eval/desc @@ -0,0 +1,2 @@ +Testname: debconf-config-general +Check: debian/debconf diff --git a/t/recipes/checks/debian/debconf/debconf-config-general/eval/hints b/t/recipes/checks/debian/debconf/debconf-config-general/eval/hints new file mode 100644 index 0000000..73b5290 --- /dev/null +++ b/t/recipes/checks/debian/debconf/debconf-config-general/eval/hints @@ -0,0 +1,4 @@ +debconf-config-general (binary): unknown-debconf-priority unknown [config:12] +debconf-config-general (binary): possible-debconf-note-abuse debconf/note-abuse [config:8] +debconf-config-general (binary): isdefault-flag-is-deprecated [config:15] +debconf-config-general (binary): config-does-not-load-confmodule [config] diff --git a/t/recipes/checks/debian/debconf/debconf-config-not-executable/build-spec/debian/config b/t/recipes/checks/debian/debconf/debconf-config-not-executable/build-spec/debian/config new file mode 100644 index 0000000..d429f9b --- /dev/null +++ b/t/recipes/checks/debian/debconf/debconf-config-not-executable/build-spec/debian/config @@ -0,0 +1,5 @@ +#!/bin/sh + +set -e + +. /usr/share/debconf/confmodule diff --git a/t/recipes/checks/debian/debconf/debconf-config-not-executable/build-spec/debian/control.in b/t/recipes/checks/debian/debconf/debconf-config-not-executable/build-spec/debian/control.in new file mode 100644 index 0000000..68a964d --- /dev/null +++ b/t/recipes/checks/debian/debconf/debconf-config-not-executable/build-spec/debian/control.in @@ -0,0 +1,15 @@ +Source: [% $source %] +Priority: optional +Section: [% $section %] +Maintainer: [% $author %] +Standards-Version: [% $standards_version %] +Build-Depends: [% $build_depends %] + +Package: [% $source %] +Architecture: [% $package_architecture %] +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: [% $description %] + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. diff --git a/t/recipes/checks/debian/debconf/debconf-config-not-executable/build-spec/debian/rules b/t/recipes/checks/debian/debconf/debconf-config-not-executable/build-spec/debian/rules new file mode 100755 index 0000000..558750b --- /dev/null +++ b/t/recipes/checks/debian/debconf/debconf-config-not-executable/build-spec/debian/rules @@ -0,0 +1,10 @@ +#!/usr/bin/make -f + +TMP=debian/$(shell dh_listpackages) + +%: + dh $@ + +override_dh_builddeb: + chmod 0644 "$(TMP)/DEBIAN/config" + dh_builddeb diff --git a/t/recipes/checks/debian/debconf/debconf-config-not-executable/build-spec/fill-values b/t/recipes/checks/debian/debconf/debconf-config-not-executable/build-spec/fill-values new file mode 100644 index 0000000..3ea2f84 --- /dev/null +++ b/t/recipes/checks/debian/debconf/debconf-config-not-executable/build-spec/fill-values @@ -0,0 +1,5 @@ +Skeleton: upload-native +Testname: debconf-config-not-executable +Description: Test for debian/config not being executable +Extra-Build-Depends: dpkg (<< 1.19.0) +# dpkg 1.19.0 will error out due to https://anonscm.debian.org/git/dpkg/dpkg.git/commit/?id=cd791ccf8117398ea765eda3a92db52a9cf04c23 diff --git a/t/recipes/checks/debian/debconf/debconf-config-not-executable/eval/desc b/t/recipes/checks/debian/debconf/debconf-config-not-executable/eval/desc new file mode 100644 index 0000000..be30442 --- /dev/null +++ b/t/recipes/checks/debian/debconf/debconf-config-not-executable/eval/desc @@ -0,0 +1,3 @@ +Testname: debconf-config-not-executable +Check: debian/debconf +# dpkg 1.19.0 will error out due to https://anonscm.debian.org/git/dpkg/dpkg.git/commit/?id=cd791ccf8117398ea765eda3a92db52a9cf04c23 diff --git a/t/recipes/checks/debian/debconf/debconf-config-not-executable/eval/hints b/t/recipes/checks/debian/debconf/debconf-config-not-executable/eval/hints new file mode 100644 index 0000000..e5b6aaa --- /dev/null +++ b/t/recipes/checks/debian/debconf/debconf-config-not-executable/eval/hints @@ -0,0 +1,4 @@ +debconf-config-not-executable (binary): postinst-does-not-load-confmodule +debconf-config-not-executable (binary): no-debconf-templates +debconf-config-not-executable (binary): debconf-config-not-executable +debconf-config-not-executable (binary): control-file-has-bad-permissions config 0644 != 0755 diff --git a/t/recipes/checks/debian/debconf/debconf-is-not-registry/build-spec/debian/install b/t/recipes/checks/debian/debconf/debconf-is-not-registry/build-spec/debian/install new file mode 100644 index 0000000..28c8417 --- /dev/null +++ b/t/recipes/checks/debian/debconf/debconf-is-not-registry/build-spec/debian/install @@ -0,0 +1 @@ +script usr/share/lintian diff --git a/t/recipes/checks/debian/debconf/debconf-is-not-registry/build-spec/debian/po/POTFILES.in b/t/recipes/checks/debian/debconf/debconf-is-not-registry/build-spec/debian/po/POTFILES.in new file mode 100644 index 0000000..cef83a3 --- /dev/null +++ b/t/recipes/checks/debian/debconf/debconf-is-not-registry/build-spec/debian/po/POTFILES.in @@ -0,0 +1 @@ +[type: gettext/rfc822deb] templates diff --git a/t/recipes/checks/debian/debconf/debconf-is-not-registry/build-spec/debian/po/da.po b/t/recipes/checks/debian/debconf/debconf-is-not-registry/build-spec/debian/po/da.po new file mode 100644 index 0000000..343c3e8 --- /dev/null +++ b/t/recipes/checks/debian/debconf/debconf-is-not-registry/build-spec/debian/po/da.po @@ -0,0 +1,25 @@ +# Danish translations for PACKAGE package. +# Copyright (C) 2012 THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# Niels Thykier , 2012. +# +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2012-07-25 11:04+0200\n" +"PO-Revision-Date: 2012-07-23 23:08+0200\n" +"Last-Translator: Niels Thykier \n" +"Language-Team: Danish\n" +"Language: da\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#. Type: error +#. Description +#: ../templates:1001 +msgid "Useless note" +msgstr "Ubrugelig note" + diff --git a/t/recipes/checks/debian/debconf/debconf-is-not-registry/build-spec/debian/po/templates.pot b/t/recipes/checks/debian/debconf/debconf-is-not-registry/build-spec/debian/po/templates.pot new file mode 100644 index 0000000..fd4f94f --- /dev/null +++ b/t/recipes/checks/debian/debconf/debconf-is-not-registry/build-spec/debian/po/templates.pot @@ -0,0 +1,25 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2012-07-25 11:04+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=CHARSET\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Type: error +#. Description +#: ../templates:1001 +msgid "Useless note" +msgstr "" + diff --git a/t/recipes/checks/debian/debconf/debconf-is-not-registry/build-spec/debian/postinst b/t/recipes/checks/debian/debconf/debconf-is-not-registry/build-spec/debian/postinst new file mode 100644 index 0000000..4d6cb4d --- /dev/null +++ b/t/recipes/checks/debian/debconf/debconf-is-not-registry/build-spec/debian/postinst @@ -0,0 +1,8 @@ +#!/bin/sh + +set -e + +#DEBHELPER# + +. /usr/share/debconf/confmodule + diff --git a/t/recipes/checks/debian/debconf/debconf-is-not-registry/build-spec/debian/templates b/t/recipes/checks/debian/debconf/debconf-is-not-registry/build-spec/debian/templates new file mode 100644 index 0000000..a45cfa3 --- /dev/null +++ b/t/recipes/checks/debian/debconf/debconf-is-not-registry/build-spec/debian/templates @@ -0,0 +1,4 @@ +Template: debconf/translated +Type: error +_Description: Useless note + diff --git a/t/recipes/checks/debian/debconf/debconf-is-not-registry/build-spec/fill-values b/t/recipes/checks/debian/debconf/debconf-is-not-registry/build-spec/fill-values new file mode 100644 index 0000000..98b6768 --- /dev/null +++ b/t/recipes/checks/debian/debconf/debconf-is-not-registry/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: upload-native +Testname: debconf-is-not-registry +Description: Test for using debconf as a registry diff --git a/t/recipes/checks/debian/debconf/debconf-is-not-registry/build-spec/orig/config-gen.pl b/t/recipes/checks/debian/debconf/debconf-is-not-registry/build-spec/orig/config-gen.pl new file mode 100644 index 0000000..e6588b7 --- /dev/null +++ b/t/recipes/checks/debian/debconf/debconf-is-not-registry/build-spec/orig/config-gen.pl @@ -0,0 +1,31 @@ +#!/usr/bin/perl + +# Helper script to generate d/config from d/templates. +# It is just here to make sure all templates are "used". + +use strict; +use warnings; + +print < ) { + + if ($line =~ /^Template:\s*(\S+)\s*$/) { + + my $template = $1; + next + unless defined $template; + + print "db_input high $template || true\n"; + print "db_go\n\n"; + } +} + +exit 0; diff --git a/t/recipes/checks/debian/debconf/debconf-is-not-registry/build-spec/orig/gen-source.mk b/t/recipes/checks/debian/debconf/debconf-is-not-registry/build-spec/orig/gen-source.mk new file mode 100755 index 0000000..f6f5975 --- /dev/null +++ b/t/recipes/checks/debian/debconf/debconf-is-not-registry/build-spec/orig/gen-source.mk @@ -0,0 +1,8 @@ +#!/usr/bin/make -f + +all: debian/config + +debian/config: debian/templates + perl config-gen.pl < $< > $@ + + diff --git a/t/recipes/checks/debian/debconf/debconf-is-not-registry/build-spec/orig/script b/t/recipes/checks/debian/debconf/debconf-is-not-registry/build-spec/orig/script new file mode 100755 index 0000000..3a05d3a --- /dev/null +++ b/t/recipes/checks/debian/debconf/debconf-is-not-registry/build-spec/orig/script @@ -0,0 +1,6 @@ +#!/bin/sh + +. /usr/share/debconf/confmodule + +db_get debconf/translated +db_go diff --git a/t/recipes/checks/debian/debconf/debconf-is-not-registry/build-spec/pre-build b/t/recipes/checks/debian/debconf/debconf-is-not-registry/build-spec/pre-build new file mode 100755 index 0000000..bfcb477 --- /dev/null +++ b/t/recipes/checks/debian/debconf/debconf-is-not-registry/build-spec/pre-build @@ -0,0 +1,4 @@ +#!/bin/sh + +DIR="$1" +make --silent -C "$DIR" -f "$DIR/gen-source.mk" all diff --git a/t/recipes/checks/debian/debconf/debconf-is-not-registry/eval/desc b/t/recipes/checks/debian/debconf/debconf-is-not-registry/eval/desc new file mode 100644 index 0000000..c4cd0cd --- /dev/null +++ b/t/recipes/checks/debian/debconf/debconf-is-not-registry/eval/desc @@ -0,0 +1,2 @@ +Testname: debconf-is-not-registry +Check: debian/debconf diff --git a/t/recipes/checks/debian/debconf/debconf-is-not-registry/eval/hints b/t/recipes/checks/debian/debconf/debconf-is-not-registry/eval/hints new file mode 100644 index 0000000..117dfba --- /dev/null +++ b/t/recipes/checks/debian/debconf/debconf-is-not-registry/eval/hints @@ -0,0 +1 @@ +debconf-is-not-registry (binary): debconf-is-not-a-registry [usr/share/lintian/script:3] diff --git a/t/recipes/checks/debian/debconf/debconf-maintscripts-deps/build-spec/debian/config b/t/recipes/checks/debian/debconf/debconf-maintscripts-deps/build-spec/debian/config new file mode 100644 index 0000000..9659eb3 --- /dev/null +++ b/t/recipes/checks/debian/debconf/debconf-maintscripts-deps/build-spec/debian/config @@ -0,0 +1,9 @@ +#!/bin/sh + +set -e + +. /usr/share/debconf/confmodule + +db_get debconf/translated +db_go + diff --git a/t/recipes/checks/debian/debconf/debconf-maintscripts-deps/build-spec/debian/po/POTFILES.in b/t/recipes/checks/debian/debconf/debconf-maintscripts-deps/build-spec/debian/po/POTFILES.in new file mode 100644 index 0000000..cef83a3 --- /dev/null +++ b/t/recipes/checks/debian/debconf/debconf-maintscripts-deps/build-spec/debian/po/POTFILES.in @@ -0,0 +1 @@ +[type: gettext/rfc822deb] templates diff --git a/t/recipes/checks/debian/debconf/debconf-maintscripts-deps/build-spec/debian/po/da.po b/t/recipes/checks/debian/debconf/debconf-maintscripts-deps/build-spec/debian/po/da.po new file mode 100644 index 0000000..e7cceb3 --- /dev/null +++ b/t/recipes/checks/debian/debconf/debconf-maintscripts-deps/build-spec/debian/po/da.po @@ -0,0 +1,24 @@ +# Danish translations for PACKAGE package. +# Copyright (C) 2012 THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# Niels Thykier , 2012. +# +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2012-07-23 23:07+0200\n" +"PO-Revision-Date: 2012-07-23 23:08+0200\n" +"Last-Translator: Niels Thykier \n" +"Language-Team: Danish\n" +"Language: da\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=ASCII\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#. Type: error +#. Description +#: ../templates:1001 +msgid "Useless note" +msgstr "Ubrugelig note" diff --git a/t/recipes/checks/debian/debconf/debconf-maintscripts-deps/build-spec/debian/po/templates.pot b/t/recipes/checks/debian/debconf/debconf-maintscripts-deps/build-spec/debian/po/templates.pot new file mode 100644 index 0000000..3edd4a9 --- /dev/null +++ b/t/recipes/checks/debian/debconf/debconf-maintscripts-deps/build-spec/debian/po/templates.pot @@ -0,0 +1,24 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2012-07-23 23:07+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=CHARSET\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Type: error +#. Description +#: ../templates:1001 +msgid "Useless note" +msgstr "" diff --git a/t/recipes/checks/debian/debconf/debconf-maintscripts-deps/build-spec/debian/postinst b/t/recipes/checks/debian/debconf/debconf-maintscripts-deps/build-spec/debian/postinst new file mode 100644 index 0000000..df9df64 --- /dev/null +++ b/t/recipes/checks/debian/debconf/debconf-maintscripts-deps/build-spec/debian/postinst @@ -0,0 +1,10 @@ +#!/bin/sh + +set -e + +#DEBHELPER# + +db_input low debconf/translated +db_go + + diff --git a/t/recipes/checks/debian/debconf/debconf-maintscripts-deps/build-spec/debian/postrm b/t/recipes/checks/debian/debconf/debconf-maintscripts-deps/build-spec/debian/postrm new file mode 100644 index 0000000..5169df8 --- /dev/null +++ b/t/recipes/checks/debian/debconf/debconf-maintscripts-deps/build-spec/debian/postrm @@ -0,0 +1,10 @@ +#!/bin/sh + +set -e + +#DEBHELPER# + +if [ -f /usr/share/debconf/confmodule.sh ] ; then + . /usr/share/debconf/confmodule.sh + # no debconf purging +fi diff --git a/t/recipes/checks/debian/debconf/debconf-maintscripts-deps/build-spec/debian/preinst b/t/recipes/checks/debian/debconf/debconf-maintscripts-deps/build-spec/debian/preinst new file mode 100644 index 0000000..8d41696 --- /dev/null +++ b/t/recipes/checks/debian/debconf/debconf-maintscripts-deps/build-spec/debian/preinst @@ -0,0 +1,11 @@ +#!/bin/sh + +set -e + +. /usr/share/debconf/confmodule + +db_get debconf/translated || true +db_go + +#DEBHELPER# + diff --git a/t/recipes/checks/debian/debconf/debconf-maintscripts-deps/build-spec/debian/rules b/t/recipes/checks/debian/debconf/debconf-maintscripts-deps/build-spec/debian/rules new file mode 100644 index 0000000..e1f0e1b --- /dev/null +++ b/t/recipes/checks/debian/debconf/debconf-maintscripts-deps/build-spec/debian/rules @@ -0,0 +1,16 @@ +#!/usr/bin/make -f + +PKG=debian/$(shell dh_listpackages) + +%: + dh $@ + +override_dh_builddeb: + # Manually copy the scripts - otherwise debhelper with insert + # the "correct magic" in each of them. + cp -a debian/preinst debian/postinst debian/postrm "$(PKG)/DEBIAN" + chmod 0755 "$(PKG)/DEBIAN/preinst" "$(PKG)/DEBIAN/postinst" \ + "$(PKG)/DEBIAN/postrm" + sed -i '/#DEBHELPER#/ d' "$(PKG)/DEBIAN/preinst" \ + "$(PKG)/DEBIAN/postinst" "$(PKG)/DEBIAN/postrm" + dh_builddeb diff --git a/t/recipes/checks/debian/debconf/debconf-maintscripts-deps/build-spec/debian/templates b/t/recipes/checks/debian/debconf/debconf-maintscripts-deps/build-spec/debian/templates new file mode 100644 index 0000000..a45cfa3 --- /dev/null +++ b/t/recipes/checks/debian/debconf/debconf-maintscripts-deps/build-spec/debian/templates @@ -0,0 +1,4 @@ +Template: debconf/translated +Type: error +_Description: Useless note + diff --git a/t/recipes/checks/debian/debconf/debconf-maintscripts-deps/build-spec/fill-values b/t/recipes/checks/debian/debconf/debconf-maintscripts-deps/build-spec/fill-values new file mode 100644 index 0000000..6f558ec --- /dev/null +++ b/t/recipes/checks/debian/debconf/debconf-maintscripts-deps/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: upload-native +Testname: debconf-maintscripts-deps +Description: Test for various debconf maintscripts and dep issues diff --git a/t/recipes/checks/debian/debconf/debconf-maintscripts-deps/eval/desc b/t/recipes/checks/debian/debconf/debconf-maintscripts-deps/eval/desc new file mode 100644 index 0000000..aac2cc6 --- /dev/null +++ b/t/recipes/checks/debian/debconf/debconf-maintscripts-deps/eval/desc @@ -0,0 +1,2 @@ +Testname: debconf-maintscripts-deps +Check: debian/debconf diff --git a/t/recipes/checks/debian/debconf/debconf-maintscripts-deps/eval/hints b/t/recipes/checks/debian/debconf/debconf-maintscripts-deps/eval/hints new file mode 100644 index 0000000..3c1fb67 --- /dev/null +++ b/t/recipes/checks/debian/debconf/debconf-maintscripts-deps/eval/hints @@ -0,0 +1,5 @@ +debconf-maintscripts-deps (binary): postrm-does-not-purge-debconf [postrm] +debconf-maintscripts-deps (binary): postinst-uses-db-input [postinst:5] +debconf-maintscripts-deps (binary): postinst-does-not-load-confmodule [postinst] +debconf-maintscripts-deps (binary): missing-debconf-dependency-for-preinst +debconf-maintscripts-deps (binary): loads-obsolete-confmodule /usr/share/debconf/confmodule.sh [postrm:5] diff --git a/t/recipes/checks/debian/debconf/debconf-missing-dep/build-spec/debian/po/POTFILES.in b/t/recipes/checks/debian/debconf/debconf-missing-dep/build-spec/debian/po/POTFILES.in new file mode 100644 index 0000000..cef83a3 --- /dev/null +++ b/t/recipes/checks/debian/debconf/debconf-missing-dep/build-spec/debian/po/POTFILES.in @@ -0,0 +1 @@ +[type: gettext/rfc822deb] templates diff --git a/t/recipes/checks/debian/debconf/debconf-missing-dep/build-spec/debian/po/da.po b/t/recipes/checks/debian/debconf/debconf-missing-dep/build-spec/debian/po/da.po new file mode 100644 index 0000000..343c3e8 --- /dev/null +++ b/t/recipes/checks/debian/debconf/debconf-missing-dep/build-spec/debian/po/da.po @@ -0,0 +1,25 @@ +# Danish translations for PACKAGE package. +# Copyright (C) 2012 THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# Niels Thykier , 2012. +# +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2012-07-25 11:04+0200\n" +"PO-Revision-Date: 2012-07-23 23:08+0200\n" +"Last-Translator: Niels Thykier \n" +"Language-Team: Danish\n" +"Language: da\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#. Type: error +#. Description +#: ../templates:1001 +msgid "Useless note" +msgstr "Ubrugelig note" + diff --git a/t/recipes/checks/debian/debconf/debconf-missing-dep/build-spec/debian/po/templates.pot b/t/recipes/checks/debian/debconf/debconf-missing-dep/build-spec/debian/po/templates.pot new file mode 100644 index 0000000..fd4f94f --- /dev/null +++ b/t/recipes/checks/debian/debconf/debconf-missing-dep/build-spec/debian/po/templates.pot @@ -0,0 +1,25 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2012-07-25 11:04+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=CHARSET\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Type: error +#. Description +#: ../templates:1001 +msgid "Useless note" +msgstr "" + diff --git a/t/recipes/checks/debian/debconf/debconf-missing-dep/build-spec/debian/postinst b/t/recipes/checks/debian/debconf/debconf-missing-dep/build-spec/debian/postinst new file mode 100644 index 0000000..4d6cb4d --- /dev/null +++ b/t/recipes/checks/debian/debconf/debconf-missing-dep/build-spec/debian/postinst @@ -0,0 +1,8 @@ +#!/bin/sh + +set -e + +#DEBHELPER# + +. /usr/share/debconf/confmodule + diff --git a/t/recipes/checks/debian/debconf/debconf-missing-dep/build-spec/debian/rules b/t/recipes/checks/debian/debconf/debconf-missing-dep/build-spec/debian/rules new file mode 100644 index 0000000..f8e47a0 --- /dev/null +++ b/t/recipes/checks/debian/debconf/debconf-missing-dep/build-spec/debian/rules @@ -0,0 +1,8 @@ +#!/usr/bin/make -f + +%: + dh $@ + +override_dh_gencontrol: + sed -i '/^misc:Depends=/ d' debian/*substvars + dh_gencontrol diff --git a/t/recipes/checks/debian/debconf/debconf-missing-dep/build-spec/debian/templates b/t/recipes/checks/debian/debconf/debconf-missing-dep/build-spec/debian/templates new file mode 100644 index 0000000..a45cfa3 --- /dev/null +++ b/t/recipes/checks/debian/debconf/debconf-missing-dep/build-spec/debian/templates @@ -0,0 +1,4 @@ +Template: debconf/translated +Type: error +_Description: Useless note + diff --git a/t/recipes/checks/debian/debconf/debconf-missing-dep/build-spec/fill-values b/t/recipes/checks/debian/debconf/debconf-missing-dep/build-spec/fill-values new file mode 100644 index 0000000..bc71e44 --- /dev/null +++ b/t/recipes/checks/debian/debconf/debconf-missing-dep/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: upload-native +Testname: debconf-missing-dep +Description: Test for missing debconf dependency diff --git a/t/recipes/checks/debian/debconf/debconf-missing-dep/build-spec/orig/config-gen.pl b/t/recipes/checks/debian/debconf/debconf-missing-dep/build-spec/orig/config-gen.pl new file mode 100644 index 0000000..e6588b7 --- /dev/null +++ b/t/recipes/checks/debian/debconf/debconf-missing-dep/build-spec/orig/config-gen.pl @@ -0,0 +1,31 @@ +#!/usr/bin/perl + +# Helper script to generate d/config from d/templates. +# It is just here to make sure all templates are "used". + +use strict; +use warnings; + +print < ) { + + if ($line =~ /^Template:\s*(\S+)\s*$/) { + + my $template = $1; + next + unless defined $template; + + print "db_input high $template || true\n"; + print "db_go\n\n"; + } +} + +exit 0; diff --git a/t/recipes/checks/debian/debconf/debconf-missing-dep/build-spec/orig/gen-source.mk b/t/recipes/checks/debian/debconf/debconf-missing-dep/build-spec/orig/gen-source.mk new file mode 100755 index 0000000..f6f5975 --- /dev/null +++ b/t/recipes/checks/debian/debconf/debconf-missing-dep/build-spec/orig/gen-source.mk @@ -0,0 +1,8 @@ +#!/usr/bin/make -f + +all: debian/config + +debian/config: debian/templates + perl config-gen.pl < $< > $@ + + diff --git a/t/recipes/checks/debian/debconf/debconf-missing-dep/build-spec/pre-build b/t/recipes/checks/debian/debconf/debconf-missing-dep/build-spec/pre-build new file mode 100755 index 0000000..bfcb477 --- /dev/null +++ b/t/recipes/checks/debian/debconf/debconf-missing-dep/build-spec/pre-build @@ -0,0 +1,4 @@ +#!/bin/sh + +DIR="$1" +make --silent -C "$DIR" -f "$DIR/gen-source.mk" all diff --git a/t/recipes/checks/debian/debconf/debconf-missing-dep/eval/desc b/t/recipes/checks/debian/debconf/debconf-missing-dep/eval/desc new file mode 100644 index 0000000..baab935 --- /dev/null +++ b/t/recipes/checks/debian/debconf/debconf-missing-dep/eval/desc @@ -0,0 +1,2 @@ +Testname: debconf-missing-dep +Check: debian/debconf diff --git a/t/recipes/checks/debian/debconf/debconf-missing-dep/eval/hints b/t/recipes/checks/debian/debconf/debconf-missing-dep/eval/hints new file mode 100644 index 0000000..4f4dcf5 --- /dev/null +++ b/t/recipes/checks/debian/debconf/debconf-missing-dep/eval/hints @@ -0,0 +1 @@ +debconf-missing-dep (binary): missing-debconf-dependency diff --git a/t/recipes/checks/debian/debconf/debconf-no-templates/build-spec/debian/config b/t/recipes/checks/debian/debconf/debconf-no-templates/build-spec/debian/config new file mode 100644 index 0000000..6f264ea --- /dev/null +++ b/t/recipes/checks/debian/debconf/debconf-no-templates/build-spec/debian/config @@ -0,0 +1,6 @@ +#!/bin/sh + +set -e + +. /usr/share/debconf/confmodule + diff --git a/t/recipes/checks/debian/debconf/debconf-no-templates/build-spec/debian/postinst b/t/recipes/checks/debian/debconf/debconf-no-templates/build-spec/debian/postinst new file mode 100644 index 0000000..0ae7a18 --- /dev/null +++ b/t/recipes/checks/debian/debconf/debconf-no-templates/build-spec/debian/postinst @@ -0,0 +1,7 @@ +#!/bin/sh + +set -e + +. /usr/share/debconf/confmodule + +#DEBHELPER# diff --git a/t/recipes/checks/debian/debconf/debconf-no-templates/build-spec/fill-values b/t/recipes/checks/debian/debconf/debconf-no-templates/build-spec/fill-values new file mode 100644 index 0000000..7075c56 --- /dev/null +++ b/t/recipes/checks/debian/debconf/debconf-no-templates/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: upload-native +Testname: debconf-no-templates +Description: Test for missing debconf templates diff --git a/t/recipes/checks/debian/debconf/debconf-no-templates/eval/desc b/t/recipes/checks/debian/debconf/debconf-no-templates/eval/desc new file mode 100644 index 0000000..f1d7d8e --- /dev/null +++ b/t/recipes/checks/debian/debconf/debconf-no-templates/eval/desc @@ -0,0 +1,2 @@ +Testname: debconf-no-templates +Check: debian/debconf diff --git a/t/recipes/checks/debian/debconf/debconf-no-templates/eval/hints b/t/recipes/checks/debian/debconf/debconf-no-templates/eval/hints new file mode 100644 index 0000000..dac69aa --- /dev/null +++ b/t/recipes/checks/debian/debconf/debconf-no-templates/eval/hints @@ -0,0 +1 @@ +debconf-no-templates (binary): no-debconf-templates diff --git a/t/recipes/checks/debian/debconf/debconf-syntax-error/build-spec/debian/config b/t/recipes/checks/debian/debconf/debconf-syntax-error/build-spec/debian/config new file mode 100644 index 0000000..6f264ea --- /dev/null +++ b/t/recipes/checks/debian/debconf/debconf-syntax-error/build-spec/debian/config @@ -0,0 +1,6 @@ +#!/bin/sh + +set -e + +. /usr/share/debconf/confmodule + diff --git a/t/recipes/checks/debian/debconf/debconf-syntax-error/build-spec/debian/postinst b/t/recipes/checks/debian/debconf/debconf-syntax-error/build-spec/debian/postinst new file mode 100644 index 0000000..4d6cb4d --- /dev/null +++ b/t/recipes/checks/debian/debconf/debconf-syntax-error/build-spec/debian/postinst @@ -0,0 +1,8 @@ +#!/bin/sh + +set -e + +#DEBHELPER# + +. /usr/share/debconf/confmodule + diff --git a/t/recipes/checks/debian/debconf/debconf-syntax-error/build-spec/debian/templates b/t/recipes/checks/debian/debconf/debconf-syntax-error/build-spec/debian/templates new file mode 100644 index 0000000..adf2ece --- /dev/null +++ b/t/recipes/checks/debian/debconf/debconf-syntax-error/build-spec/debian/templates @@ -0,0 +1,3 @@ +Template: debconf/syntax-error +Type: note +Description whoops, I forgot a colon diff --git a/t/recipes/checks/debian/debconf/debconf-syntax-error/build-spec/fill-values b/t/recipes/checks/debian/debconf/debconf-syntax-error/build-spec/fill-values new file mode 100644 index 0000000..2197de4 --- /dev/null +++ b/t/recipes/checks/debian/debconf/debconf-syntax-error/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: upload-native +Testname: debconf-syntax-error +Description: Test for syntax error in debconf files diff --git a/t/recipes/checks/debian/debconf/debconf-syntax-error/eval/desc b/t/recipes/checks/debian/debconf/debconf-syntax-error/eval/desc new file mode 100644 index 0000000..075c037 --- /dev/null +++ b/t/recipes/checks/debian/debconf/debconf-syntax-error/eval/desc @@ -0,0 +1,2 @@ +Testname: debconf-syntax-error +Check: debian/debconf diff --git a/t/recipes/checks/debian/debconf/debconf-syntax-error/eval/hints b/t/recipes/checks/debian/debconf/debconf-syntax-error/eval/hints new file mode 100644 index 0000000..d48999c --- /dev/null +++ b/t/recipes/checks/debian/debconf/debconf-syntax-error/eval/hints @@ -0,0 +1,2 @@ +debconf-syntax-error (source): syntax-error-in-debconf-template Cannot parse line 3: Description whoops, I forgot a colon [debian/templates] +debconf-syntax-error (binary): syntax-error-in-debconf-template Cannot parse line 3: Description whoops, I forgot a colon [templates] diff --git a/t/recipes/checks/debian/debconf/debconf-templates-general/build-spec/debian/control.in b/t/recipes/checks/debian/debconf/debconf-templates-general/build-spec/debian/control.in new file mode 100644 index 0000000..1140f19 --- /dev/null +++ b/t/recipes/checks/debian/debconf/debconf-templates-general/build-spec/debian/control.in @@ -0,0 +1,16 @@ +Source: [% $source %] +Priority: optional +Section: [% $section %] +Maintainer: [% $author %] +Standards-Version: [% $standards_version %] +Build-Depends: [% $build_depends %] +Rules-Requires-Root: no + +Package: [% $source %] +Architecture: [% $package_architecture %] +Depends: ${shlibs:Depends}, ${misc:Depends}, cdebconf +Description: [% $description %] + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. diff --git a/t/recipes/checks/debian/debconf/debconf-templates-general/build-spec/debian/po/POTFILES.in b/t/recipes/checks/debian/debconf/debconf-templates-general/build-spec/debian/po/POTFILES.in new file mode 100644 index 0000000..cef83a3 --- /dev/null +++ b/t/recipes/checks/debian/debconf/debconf-templates-general/build-spec/debian/po/POTFILES.in @@ -0,0 +1 @@ +[type: gettext/rfc822deb] templates diff --git a/t/recipes/checks/debian/debconf/debconf-templates-general/build-spec/debian/po/en.po b/t/recipes/checks/debian/debconf/debconf-templates-general/build-spec/debian/po/en.po new file mode 100644 index 0000000..0734922 --- /dev/null +++ b/t/recipes/checks/debian/debconf/debconf-templates-general/build-spec/debian/po/en.po @@ -0,0 +1,241 @@ +# English translations for PACKAGE package. +# Copyright (C) 2012 THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# Niels Thykier , 2012. +# +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2018-01-01 22:34+0000\n" +"PO-Revision-Date: 2012-10-01 22:54+0200\n" +"Last-Translator: Niels Thykier \n" +"Language-Team: English\n" +"Language: en_US\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=ASCII\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#. Type: error +#. Description +#: ../templates:1001 +msgid "Useless note" +msgstr "Useless note" + +#. Type: select +#. Choices +#: ../templates:2001 +msgid "left, right, up, down" +msgstr "left, right, up, down" + +#. Type: select +#. Description +#: ../templates:2002 +msgid "Pick the odd one out" +msgstr "Pick the odd one out" + +#. Type: text +#. Description +#: ../templates:3001 +msgid "Missing template field." +msgstr "Missing template field." + +#. Type: boolean +#. Description +#: ../templates:4001 +msgid "Is this a bad template?" +msgstr "Is this a bad template?" + +#. Type: boolean +#. Description +#: ../templates:5001 +msgid "Missing type" +msgstr "Missing type" + +#. Type: lintian +#. Description +#: ../templates:6001 +msgid "Template with unknown type" +msgstr "Template with unknown type" + +#. Type: boolean +#. Description +#: ../templates:7001 +msgid "How do you like the default?" +msgstr "How do you like the default?" + +#. Type: boolean +#. Description +#: ../templates:7001 +msgid "On a scale of \"false\" to \"true\"." +msgstr "On a scale of \"false\" to \"true\"." + +#. Type: select +#. Description +#: ../templates:8001 +msgid "A boolean type would have been better" +msgstr "A boolean type would have been better" + +#. Type: select +#. Description +#: ../templates:9001 +msgid "Preference" +msgstr "Preference" + +#. Type: select +#. Description +#: ../templates:10001 +msgid "Missing a Choices field" +msgstr "Missing a Choices field" + +#. Type: error +#. Description +#. Type: error +#. Description +#: ../templates:12001 +msgid "Duplicate long description" +msgstr "Duplicate long description" + +#. Type: boolean +#. Description +#: ../templates:13001 +msgid "Is the field below unknown?" +msgstr "Is the field below unknown?" + +#. Type: string +#. Description +#: ../templates:14001 +msgid "What is the name of this package checker:" +msgstr "What is the name of this package checker:" + +#. Type: select +#. Description +#: ../templates:15001 +msgid "Select either x or y" +msgstr "Select either x or y" + +#. Type: boolean +#. Description +#: ../templates:16001 +msgid "Lintian is the best!" +msgstr "Lintian is the best!" + +#. Type: boolean +#. Description +#: ../templates:17001 +msgid "Do you like sakana?" +msgstr "Do you like sakana?" + +#. Type: boolean +#. Description +#: ../templates:17001 +msgid "Or do you prefer sake?" +msgstr "Or do you prefer sake?" + +#. Type: note +#. Description +#: ../templates:18001 +msgid "Aren't you tired of all these debconf prompts?" +msgstr "Aren't you tired of all these debconf prompts?" + +#. Type: boolean +#. Description +#: ../templates:19001 +msgid "" +"This template has a very long short description, is that what you call an " +"oxymoron?" +msgstr "" +"This template has a very long short description, is that what you call an " +"oxymoron?" + +#. Type: select +#. Description +#: ../templates:20001 +msgid "I think Lintian is the best" +msgstr "I think Lintian is the best" + +#. Type: boolean +#. Description +#: ../templates:21001 +msgid "Do you like Lintian?" +msgstr "Do you like Lintian?" + +#. Type: boolean +#. Description +#: ../templates:21001 +msgid "Pick \"yes\" if you do." +msgstr "Pick \"yes\" if you do." + +#. Type: string +#. Description +#: ../templates:22001 +msgid "Name the title of this song:" +msgstr "Name the title of this song:" + +#. Type: string +#. Description +#: ../templates:22001 +msgid "" +"Five green bottles sitting on the wall, Five green bottles sitting on the " +"wall, And if one green bottle should accidentally fall, There'll be four " +"green bottles sitting on the wall." +msgstr "" +"Five green bottles sitting on the wall, Five green bottles sitting on the " +"wall, And if one green bottle should accidentally fall, There'll be four " +"green bottles sitting on the wall." + +#. Type: string +#. Description +#: ../templates:22001 +msgid "" +"Four green bottles sitting on the wall, Four green bottles sitting on the " +"wall, And if one green bottle should accidentally fall, There'll be three " +"green bottles sitting on the wall." +msgstr "" +"Four green bottles sitting on the wall, Four green bottles sitting on the " +"wall, And if one green bottle should accidentally fall, There'll be three " +"green bottles sitting on the wall." + +#. Type: string +#. Description +#: ../templates:22001 +msgid "" +"Three green bottles sitting on the wall, Three green bottles sitting on the " +"wall, And if one green bottle should accidentally fall, There'll be two " +"green bottles sitting on the wall." +msgstr "" +"Three green bottles sitting on the wall, Three green bottles sitting on the " +"wall, And if one green bottle should accidentally fall, There'll be two " +"green bottles sitting on the wall." + +#. Type: string +#. Description +#: ../templates:22001 +msgid "" +"Two green bottles sitting on the wall, Two green bottles sitting on the " +"wall, And if one green bottle should accidentally fall, There'll be one " +"green bottle sitting on the wall." +msgstr "" +"Two green bottles sitting on the wall, Two green bottles sitting on the " +"wall, And if one green bottle should accidentally fall, There'll be one " +"green bottle sitting on the wall." + +#. Type: string +#. Description +#: ../templates:22001 +msgid "" +"One green bottle sitting on the wall, One green bottle sitting on the wall, " +"And if one green bottle should accidentally fall, There'll be no green " +"bottles sitting on the wall." +msgstr "" +"One green bottle sitting on the wall, One green bottle sitting on the wall, " +"And if one green bottle should accidentally fall, There'll be no green " +"bottles sitting on the wall." + +#. Type: entropy +#. Description +#: ../templates:23001 +#| msgid "Template with unknown type" +msgid "Template with entropy type" +msgstr "Template with unknown type" diff --git a/t/recipes/checks/debian/debconf/debconf-templates-general/build-spec/debian/po/en_US.po b/t/recipes/checks/debian/debconf/debconf-templates-general/build-spec/debian/po/en_US.po new file mode 100644 index 0000000..450a03c --- /dev/null +++ b/t/recipes/checks/debian/debconf/debconf-templates-general/build-spec/debian/po/en_US.po @@ -0,0 +1,223 @@ +# English translations for PACKAGE package. +# Copyright (C) 2012 THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# Niels Thykier , 2012. +# +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2018-01-01 22:34+0000\n" +"PO-Revision-Date: 2012-10-01 22:54+0200\n" +"Last-Translator: Russ Allbery \n" +"Language-Team: English \n" +"Language: en_US\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=ASCII\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#. Type: error +#. Description +#: ../templates:1001 +msgid "Useless note" +msgstr "" + +#. Type: select +#. Choices +#: ../templates:2001 +msgid "left, right, up, down" +msgstr "" + +#. Type: select +#. Description +#: ../templates:2002 +msgid "Pick the odd one out" +msgstr "" + +#. Type: text +#. Description +#: ../templates:3001 +msgid "Missing template field." +msgstr "" + +#. Type: boolean +#. Description +#: ../templates:4001 +msgid "Is this a bad template?" +msgstr "" + +#. Type: boolean +#. Description +#: ../templates:5001 +msgid "Missing type" +msgstr "" + +#. Type: lintian +#. Description +#: ../templates:6001 +msgid "Template with unknown type" +msgstr "" + +#. Type: boolean +#. Description +#: ../templates:7001 +msgid "How do you like the default?" +msgstr "" + +#. Type: boolean +#. Description +#: ../templates:7001 +msgid "On a scale of \"false\" to \"true\"." +msgstr "" + +#. Type: select +#. Description +#: ../templates:8001 +msgid "A boolean type would have been better" +msgstr "" + +#. Type: select +#. Description +#: ../templates:9001 +msgid "Preference" +msgstr "" + +#. Type: select +#. Description +#: ../templates:10001 +msgid "Missing a Choices field" +msgstr "" + +#. Type: error +#. Description +#. Type: error +#. Description +#: ../templates:12001 +msgid "Duplicate long description" +msgstr "" + +#. Type: boolean +#. Description +#: ../templates:13001 +msgid "Is the field below unknown?" +msgstr "" + +#. Type: string +#. Description +#: ../templates:14001 +msgid "What is the name of this package checker:" +msgstr "" + +#. Type: select +#. Description +#: ../templates:15001 +msgid "Select either x or y" +msgstr "" + +#. Type: boolean +#. Description +#: ../templates:16001 +msgid "Lintian is the best!" +msgstr "" + +#. Type: boolean +#. Description +#: ../templates:17001 +msgid "Do you like sakana?" +msgstr "" + +#. Type: boolean +#. Description +#: ../templates:17001 +msgid "Or do you prefer sake?" +msgstr "" + +#. Type: note +#. Description +#: ../templates:18001 +msgid "Aren't you tired of all these debconf prompts?" +msgstr "" + +#. Type: boolean +#. Description +#: ../templates:19001 +msgid "" +"This template has a very long short description, is that what you call an " +"oxymoron?" +msgstr "" + +#. Type: select +#. Description +#: ../templates:20001 +msgid "I think Lintian is the best" +msgstr "" + +#. Type: boolean +#. Description +#: ../templates:21001 +msgid "Do you like Lintian?" +msgstr "" + +#. Type: boolean +#. Description +#: ../templates:21001 +msgid "Pick \"yes\" if you do." +msgstr "" + +#. Type: string +#. Description +#: ../templates:22001 +msgid "Name the title of this song:" +msgstr "" + +#. Type: string +#. Description +#: ../templates:22001 +msgid "" +"Five green bottles sitting on the wall, Five green bottles sitting on the " +"wall, And if one green bottle should accidentally fall, There'll be four " +"green bottles sitting on the wall." +msgstr "" + +#. Type: string +#. Description +#: ../templates:22001 +msgid "" +"Four green bottles sitting on the wall, Four green bottles sitting on the " +"wall, And if one green bottle should accidentally fall, There'll be three " +"green bottles sitting on the wall." +msgstr "" + +#. Type: string +#. Description +#: ../templates:22001 +msgid "" +"Three green bottles sitting on the wall, Three green bottles sitting on the " +"wall, And if one green bottle should accidentally fall, There'll be two " +"green bottles sitting on the wall." +msgstr "" + +#. Type: string +#. Description +#: ../templates:22001 +msgid "" +"Two green bottles sitting on the wall, Two green bottles sitting on the " +"wall, And if one green bottle should accidentally fall, There'll be one " +"green bottle sitting on the wall." +msgstr "" + +#. Type: string +#. Description +#: ../templates:22001 +msgid "" +"One green bottle sitting on the wall, One green bottle sitting on the wall, " +"And if one green bottle should accidentally fall, There'll be no green " +"bottles sitting on the wall." +msgstr "" + +#. Type: entropy +#. Description +#: ../templates:23001 +msgid "Template with entropy type" +msgstr "" diff --git a/t/recipes/checks/debian/debconf/debconf-templates-general/build-spec/debian/po/templates.pot b/t/recipes/checks/debian/debconf/debconf-templates-general/build-spec/debian/po/templates.pot new file mode 100644 index 0000000..b7f5a7b --- /dev/null +++ b/t/recipes/checks/debian/debconf/debconf-templates-general/build-spec/debian/po/templates.pot @@ -0,0 +1,223 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2018-01-01 22:34+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=CHARSET\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Type: error +#. Description +#: ../templates:1001 +msgid "Useless note" +msgstr "" + +#. Type: select +#. Choices +#: ../templates:2001 +msgid "left, right, up, down" +msgstr "" + +#. Type: select +#. Description +#: ../templates:2002 +msgid "Pick the odd one out" +msgstr "" + +#. Type: text +#. Description +#: ../templates:3001 +msgid "Missing template field." +msgstr "" + +#. Type: boolean +#. Description +#: ../templates:4001 +msgid "Is this a bad template?" +msgstr "" + +#. Type: boolean +#. Description +#: ../templates:5001 +msgid "Missing type" +msgstr "" + +#. Type: lintian +#. Description +#: ../templates:6001 +msgid "Template with unknown type" +msgstr "" + +#. Type: boolean +#. Description +#: ../templates:7001 +msgid "How do you like the default?" +msgstr "" + +#. Type: boolean +#. Description +#: ../templates:7001 +msgid "On a scale of \"false\" to \"true\"." +msgstr "" + +#. Type: select +#. Description +#: ../templates:8001 +msgid "A boolean type would have been better" +msgstr "" + +#. Type: select +#. Description +#: ../templates:9001 +msgid "Preference" +msgstr "" + +#. Type: select +#. Description +#: ../templates:10001 +msgid "Missing a Choices field" +msgstr "" + +#. Type: error +#. Description +#. Type: error +#. Description +#: ../templates:12001 +msgid "Duplicate long description" +msgstr "" + +#. Type: boolean +#. Description +#: ../templates:13001 +msgid "Is the field below unknown?" +msgstr "" + +#. Type: string +#. Description +#: ../templates:14001 +msgid "What is the name of this package checker:" +msgstr "" + +#. Type: select +#. Description +#: ../templates:15001 +msgid "Select either x or y" +msgstr "" + +#. Type: boolean +#. Description +#: ../templates:16001 +msgid "Lintian is the best!" +msgstr "" + +#. Type: boolean +#. Description +#: ../templates:17001 +msgid "Do you like sakana?" +msgstr "" + +#. Type: boolean +#. Description +#: ../templates:17001 +msgid "Or do you prefer sake?" +msgstr "" + +#. Type: note +#. Description +#: ../templates:18001 +msgid "Aren't you tired of all these debconf prompts?" +msgstr "" + +#. Type: boolean +#. Description +#: ../templates:19001 +msgid "" +"This template has a very long short description, is that what you call an " +"oxymoron?" +msgstr "" + +#. Type: select +#. Description +#: ../templates:20001 +msgid "I think Lintian is the best" +msgstr "" + +#. Type: boolean +#. Description +#: ../templates:21001 +msgid "Do you like Lintian?" +msgstr "" + +#. Type: boolean +#. Description +#: ../templates:21001 +msgid "Pick \"yes\" if you do." +msgstr "" + +#. Type: string +#. Description +#: ../templates:22001 +msgid "Name the title of this song:" +msgstr "" + +#. Type: string +#. Description +#: ../templates:22001 +msgid "" +"Five green bottles sitting on the wall, Five green bottles sitting on the " +"wall, And if one green bottle should accidentally fall, There'll be four " +"green bottles sitting on the wall." +msgstr "" + +#. Type: string +#. Description +#: ../templates:22001 +msgid "" +"Four green bottles sitting on the wall, Four green bottles sitting on the " +"wall, And if one green bottle should accidentally fall, There'll be three " +"green bottles sitting on the wall." +msgstr "" + +#. Type: string +#. Description +#: ../templates:22001 +msgid "" +"Three green bottles sitting on the wall, Three green bottles sitting on the " +"wall, And if one green bottle should accidentally fall, There'll be two " +"green bottles sitting on the wall." +msgstr "" + +#. Type: string +#. Description +#: ../templates:22001 +msgid "" +"Two green bottles sitting on the wall, Two green bottles sitting on the " +"wall, And if one green bottle should accidentally fall, There'll be one " +"green bottle sitting on the wall." +msgstr "" + +#. Type: string +#. Description +#: ../templates:22001 +msgid "" +"One green bottle sitting on the wall, One green bottle sitting on the wall, " +"And if one green bottle should accidentally fall, There'll be no green " +"bottles sitting on the wall." +msgstr "" + +#. Type: entropy +#. Description +#: ../templates:23001 +msgid "Template with entropy type" +msgstr "" diff --git a/t/recipes/checks/debian/debconf/debconf-templates-general/build-spec/debian/postinst b/t/recipes/checks/debian/debconf/debconf-templates-general/build-spec/debian/postinst new file mode 100644 index 0000000..4d6cb4d --- /dev/null +++ b/t/recipes/checks/debian/debconf/debconf-templates-general/build-spec/debian/postinst @@ -0,0 +1,8 @@ +#!/bin/sh + +set -e + +#DEBHELPER# + +. /usr/share/debconf/confmodule + diff --git a/t/recipes/checks/debian/debconf/debconf-templates-general/build-spec/debian/templates b/t/recipes/checks/debian/debconf/debconf-templates-general/build-spec/debian/templates new file mode 100644 index 0000000..46ca184 --- /dev/null +++ b/t/recipes/checks/debian/debconf/debconf-templates-general/build-spec/debian/templates @@ -0,0 +1,124 @@ +Template: debconf/translated +Type: error +_Description: Useless note + +Template: debconf/unsplit-choices +Type: select +_Choices: left, right, up, down +_Description: Pick the odd one out + +Type: text +_Description: Missing template field. + +Template: debconf-malformed-template +Type: boolean +_Description: Is this a bad template? + +Template: debconf/no-type +_Description: Missing type + +Template: debconf/unknown-type +Type: lintian +_Description: Template with unknown type + +Template: debconf/boolean-bogus-default +Type: boolean +Default: lintian +_Description: How do you like the default? + On a scale of "false" to "true". + +Template: debconf/select-boolean-choice +Type: select +Choices: yes, no +_Description: A boolean type would have been better + +Template: debconf/select-empty-trans-choices +Type: select +Choices: sakana, sake +Choices-Da: +_Description: Preference + +Template: debconf/select-without-choices +Type: select +_Description: Missing a Choices field + +Template: debconf/no-description +Type: error + +Template: debconf/duplicate-long-desc +Type: error +_Description: Duplicate long description + Duplicate long description + +Template: debconf/unknown-field +Type: boolean +_Description: Is the field below unknown? +Unknown-field: yes, it is. + +Template: debconf/malformed-prompt +Type: string +_Description: What is the name of this package checker: + +Template: debconf/imperative-select +Type: select +Choices: x,y +_Description: Select either x or y + +Template: debconf/malformed-question +Type: boolean +_Description: Lintian is the best! + +Template: debconf/question-in-extended +Type: boolean +_Description: Do you like sakana? + Or do you prefer sake? + +Template: debconf/malformed-note-title +Type: note +_Description: Aren't you tired of all these debconf prompts? + +Template: debconf/too-long-short-desc +Type: boolean +_Description: This template has a very long short description, is that what you call an oxymoron? + +Template: debconf/first-person +Type: select +Choices: lintian, no-lintian +_Description: I think Lintian is the best + +Template: debconf/assumption +Type: boolean +_Description: Do you like Lintian? + Pick "yes" if you do. + +Template: debconf/5-green-bottles-on-the-wall +Type: string +_Description: Name the title of this song: + Five green bottles sitting on the wall, + Five green bottles sitting on the wall, + And if one green bottle should accidentally fall, + There'll be four green bottles sitting on the wall. + . + Four green bottles sitting on the wall, + Four green bottles sitting on the wall, + And if one green bottle should accidentally fall, + There'll be three green bottles sitting on the wall. + . + Three green bottles sitting on the wall, + Three green bottles sitting on the wall, + And if one green bottle should accidentally fall, + There'll be two green bottles sitting on the wall. + . + Two green bottles sitting on the wall, + Two green bottles sitting on the wall, + And if one green bottle should accidentally fall, + There'll be one green bottle sitting on the wall. + . + One green bottle sitting on the wall, + One green bottle sitting on the wall, + And if one green bottle should accidentally fall, + There'll be no green bottles sitting on the wall. + +Template: debconf/entropy-type +Type: entropy +_Description: Template with entropy type diff --git a/t/recipes/checks/debian/debconf/debconf-templates-general/build-spec/fill-values b/t/recipes/checks/debian/debconf/debconf-templates-general/build-spec/fill-values new file mode 100644 index 0000000..2018d2c --- /dev/null +++ b/t/recipes/checks/debian/debconf/debconf-templates-general/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: upload-native +Testname: debconf-templates-general +Description: Test for various debconf template issues diff --git a/t/recipes/checks/debian/debconf/debconf-templates-general/build-spec/orig/config-gen.pl b/t/recipes/checks/debian/debconf/debconf-templates-general/build-spec/orig/config-gen.pl new file mode 100644 index 0000000..e6588b7 --- /dev/null +++ b/t/recipes/checks/debian/debconf/debconf-templates-general/build-spec/orig/config-gen.pl @@ -0,0 +1,31 @@ +#!/usr/bin/perl + +# Helper script to generate d/config from d/templates. +# It is just here to make sure all templates are "used". + +use strict; +use warnings; + +print < ) { + + if ($line =~ /^Template:\s*(\S+)\s*$/) { + + my $template = $1; + next + unless defined $template; + + print "db_input high $template || true\n"; + print "db_go\n\n"; + } +} + +exit 0; diff --git a/t/recipes/checks/debian/debconf/debconf-templates-general/build-spec/orig/gen-source.mk b/t/recipes/checks/debian/debconf/debconf-templates-general/build-spec/orig/gen-source.mk new file mode 100755 index 0000000..f6f5975 --- /dev/null +++ b/t/recipes/checks/debian/debconf/debconf-templates-general/build-spec/orig/gen-source.mk @@ -0,0 +1,8 @@ +#!/usr/bin/make -f + +all: debian/config + +debian/config: debian/templates + perl config-gen.pl < $< > $@ + + diff --git a/t/recipes/checks/debian/debconf/debconf-templates-general/build-spec/pre-build b/t/recipes/checks/debian/debconf/debconf-templates-general/build-spec/pre-build new file mode 100755 index 0000000..bfcb477 --- /dev/null +++ b/t/recipes/checks/debian/debconf/debconf-templates-general/build-spec/pre-build @@ -0,0 +1,4 @@ +#!/bin/sh + +DIR="$1" +make --silent -C "$DIR" -f "$DIR/gen-source.mk" all diff --git a/t/recipes/checks/debian/debconf/debconf-templates-general/eval/desc b/t/recipes/checks/debian/debconf/debconf-templates-general/eval/desc new file mode 100644 index 0000000..4e1bb81 --- /dev/null +++ b/t/recipes/checks/debian/debconf/debconf-templates-general/eval/desc @@ -0,0 +1,2 @@ +Testname: debconf-templates-general +Check: debian/debconf diff --git a/t/recipes/checks/debian/debconf/debconf-templates-general/eval/hints b/t/recipes/checks/debian/debconf/debconf-templates-general/eval/hints new file mode 100644 index 0000000..908230a --- /dev/null +++ b/t/recipes/checks/debian/debconf/debconf-templates-general/eval/hints @@ -0,0 +1,22 @@ +debconf-templates-general (source): template-uses-unsplit-choices debconf/unsplit-choices [debian/templates:7] +debconf-templates-general (binary): using-question-in-extended-description-in-templates debconf/question-in-extended [templates:91] +debconf-templates-general (binary): using-imperative-form-in-templates debconf/imperative-select [templates:81] +debconf-templates-general (binary): using-first-person-in-templates debconf/first-person [templates:109] +debconf-templates-general (binary): unknown-template-type lintian [templates:27] +debconf-templates-general (binary): unknown-field-in-templates debconf/unknown-field Unknown-field [templates:71] +debconf-templates-general (binary): too-long-short-description-in-templates debconf/too-long-short-desc [templates:103] +debconf-templates-general (binary): too-long-extended-description-in-templates debconf/5-green-bottles-on-the-wall [templates:121] +debconf-templates-general (binary): select-without-choices debconf/select-without-choices [templates:52] +debconf-templates-general (binary): select-with-boolean-choices debconf/select-boolean-choice [templates:41] +debconf-templates-general (binary): no-template-type debconf/no-type [templates:22] +debconf-templates-general (binary): no-template-name [templates:13] +debconf-templates-general (binary): no-template-description debconf/no-description [templates:57] +debconf-templates-general (binary): mismatch-translated-choices debconf/select-empty-trans-choices Choices-Da [templates:47] +debconf-templates-general (binary): malformed-title-in-templates debconf/malformed-note-title [templates:98] +debconf-templates-general (binary): malformed-template-name debconf-malformed-template [templates:17] +debconf-templates-general (binary): malformed-question-in-templates debconf/malformed-question [templates:86] +debconf-templates-general (binary): malformed-prompt-in-templates debconf/malformed-prompt [templates:75] +debconf-templates-general (binary): making-assumptions-about-interfaces-in-templates debconf/assumption [templates:114] +debconf-templates-general (binary): empty-translated-choices debconf/select-empty-trans-choices Choices-Da [templates:47] +debconf-templates-general (binary): duplicate-long-description-in-template debconf/duplicate-long-desc [templates:62] +debconf-templates-general (binary): boolean-template-has-bogus-default debconf/boolean-bogus-default lintian [templates:33] diff --git a/t/recipes/checks/debian/debconf/debconf-traversal/build-spec/dpkg-overrides b/t/recipes/checks/debian/debconf/debconf-traversal/build-spec/dpkg-overrides new file mode 100644 index 0000000..250f0b6 --- /dev/null +++ b/t/recipes/checks/debian/debconf/debconf-traversal/build-spec/dpkg-overrides @@ -0,0 +1 @@ +-DBinary="../unpacked/debian/changelog@NULL@" diff --git a/t/recipes/checks/debian/debconf/debconf-traversal/build-spec/fill-values b/t/recipes/checks/debian/debconf/debconf-traversal/build-spec/fill-values new file mode 100644 index 0000000..f979196 --- /dev/null +++ b/t/recipes/checks/debian/debconf/debconf-traversal/build-spec/fill-values @@ -0,0 +1,4 @@ +Skeleton: source-native +Testname: debconf-traversal +Version: 1 +Description: Test for traversal issues via debconf templates diff --git a/t/recipes/checks/debian/debconf/debconf-traversal/build-spec/post-build b/t/recipes/checks/debian/debconf/debconf-traversal/build-spec/post-build new file mode 100755 index 0000000..b419dc6 --- /dev/null +++ b/t/recipes/checks/debian/debconf/debconf-traversal/build-spec/post-build @@ -0,0 +1,7 @@ +#!/bin/sh + +set -e + +product="$1" + +perl -pi -e 's/\@NULL\@/\0/g' "$product" diff --git a/t/recipes/checks/debian/debconf/debconf-traversal/eval/desc b/t/recipes/checks/debian/debconf/debconf-traversal/eval/desc new file mode 100644 index 0000000..e4e1548 --- /dev/null +++ b/t/recipes/checks/debian/debconf/debconf-traversal/eval/desc @@ -0,0 +1,3 @@ +Testname: debconf-traversal +Test-Against: syntax-error-in-debconf-template +Check: debian/debconf diff --git a/t/recipes/checks/debian/debconf/debconf-traversal/eval/hints b/t/recipes/checks/debian/debconf/debconf-traversal/eval/hints new file mode 100644 index 0000000..e69de29 diff --git a/t/recipes/checks/debian/debconf/legacy-debconf/build-spec/debian/changelog.in b/t/recipes/checks/debian/debconf/legacy-debconf/build-spec/debian/changelog.in new file mode 100644 index 0000000..f5e308e --- /dev/null +++ b/t/recipes/checks/debian/debconf/legacy-debconf/build-spec/debian/changelog.in @@ -0,0 +1,6 @@ +debconf ([% $version %]) [% $distribution %]; urgency=low + + * Initial Release + * Changelog line with exactly 80 characters which tests the line-too-long tag. + + -- Lintian Maintainers Wed, 3 May 2006 18:07:19 -0500 diff --git a/t/recipes/checks/debian/debconf/legacy-debconf/build-spec/debian/compat.in b/t/recipes/checks/debian/debconf/legacy-debconf/build-spec/debian/compat.in new file mode 100644 index 0000000..640a566 --- /dev/null +++ b/t/recipes/checks/debian/debconf/legacy-debconf/build-spec/debian/compat.in @@ -0,0 +1 @@ +[% $dh_compat_level %] diff --git a/t/recipes/checks/debian/debconf/legacy-debconf/build-spec/debian/control b/t/recipes/checks/debian/debconf/legacy-debconf/build-spec/debian/control new file mode 100644 index 0000000..bf9f4e9 --- /dev/null +++ b/t/recipes/checks/debian/debconf/legacy-debconf/build-spec/debian/control @@ -0,0 +1,52 @@ +Source: debconf +Section: utils +Priority: optional +Build-Depends: debhelper (>= 4), dpatch +Maintainer: Lintian Maintainers +Standards-Version: 3.7.2 + +Package: debconf-test +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: Test package for the debconf checks of lintian (dummy) + +Package: debconf-test-noscripts +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: Test package for the debconf checks of lintian (noscripts) + Package missing postinst/postrm/config. + . + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. + +Package: debconf-test-preinst +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: Test package for the debconf checks of lintian (preinst) + Package uses debconf only in preinst. + . + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. + +Package: debconf-test-postinst +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: Test package for the debconf checks of lintian (postinst) + Package uses debconf only in postinst. + . + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. + +Package: debconf-udeb +Section: debian-installer +XC-Package-Type: udeb +XB-Installer-Menu-Item: 100 +Architecture: any +Depends: ${shlibs:Depends} +Description: Test udeb package for the debconf checks of lintian (dummy) diff --git a/t/recipes/checks/debian/debconf/legacy-debconf/build-spec/debian/copyright b/t/recipes/checks/debian/debconf/legacy-debconf/build-spec/debian/copyright new file mode 100644 index 0000000..84843ee --- /dev/null +++ b/t/recipes/checks/debian/debconf/legacy-debconf/build-spec/debian/copyright @@ -0,0 +1,10 @@ +Copyright (C) 2004 Frank Lichtenheld + +Test for really old FSF address: + +Free Software Foundation, Inc., 675 Mass Ave, Cambridge, +MA 02139, USA. + +Test for a dh-make boilerplate: +# Please also look if there are files or directories which have a +# different copyright/license attached and list them here. diff --git a/t/recipes/checks/debian/debconf/legacy-debconf/build-spec/debian/debconf-test-noscripts.templates b/t/recipes/checks/debian/debconf/legacy-debconf/build-spec/debian/debconf-test-noscripts.templates new file mode 100644 index 0000000..93f8071 --- /dev/null +++ b/t/recipes/checks/debian/debconf/legacy-debconf/build-spec/debian/debconf-test-noscripts.templates @@ -0,0 +1,3 @@ +Template: debconf/test +Type: text +_description: Foo bar (1) diff --git a/t/recipes/checks/debian/debconf/legacy-debconf/build-spec/debian/debconf-test-postinst.postinst b/t/recipes/checks/debian/debconf/legacy-debconf/build-spec/debian/debconf-test-postinst.postinst new file mode 100644 index 0000000..56ab871 --- /dev/null +++ b/t/recipes/checks/debian/debconf/legacy-debconf/build-spec/debian/debconf-test-postinst.postinst @@ -0,0 +1,10 @@ +#!/bin/sh +set -e + +. /usr/share/debconf/confmodule + +db_input medium debconf/test + +#DEBHELPER# + +true diff --git a/t/recipes/checks/debian/debconf/legacy-debconf/build-spec/debian/debconf-test-postinst.postrm b/t/recipes/checks/debian/debconf/legacy-debconf/build-spec/debian/debconf-test-postinst.postrm new file mode 100644 index 0000000..cbf5e3b --- /dev/null +++ b/t/recipes/checks/debian/debconf/legacy-debconf/build-spec/debian/debconf-test-postinst.postrm @@ -0,0 +1,7 @@ +#!/bin/sh +set -e +if [ "$1" = purge ] && [ -e /usr/share/debconf/confmodule ]; then + . /usr/share/debconf/confmodule + db_purge +fi +#DEBHELPER# diff --git a/t/recipes/checks/debian/debconf/legacy-debconf/build-spec/debian/debconf-test-postinst.templates b/t/recipes/checks/debian/debconf/legacy-debconf/build-spec/debian/debconf-test-postinst.templates new file mode 100644 index 0000000..2a2a8ab --- /dev/null +++ b/t/recipes/checks/debian/debconf/legacy-debconf/build-spec/debian/debconf-test-postinst.templates @@ -0,0 +1,3 @@ +Template: debconf/test +Type: text +_description: Enter something: diff --git a/t/recipes/checks/debian/debconf/legacy-debconf/build-spec/debian/debconf-test-preinst.postrm b/t/recipes/checks/debian/debconf/legacy-debconf/build-spec/debian/debconf-test-preinst.postrm new file mode 100644 index 0000000..cbf5e3b --- /dev/null +++ b/t/recipes/checks/debian/debconf/legacy-debconf/build-spec/debian/debconf-test-preinst.postrm @@ -0,0 +1,7 @@ +#!/bin/sh +set -e +if [ "$1" = purge ] && [ -e /usr/share/debconf/confmodule ]; then + . /usr/share/debconf/confmodule + db_purge +fi +#DEBHELPER# diff --git a/t/recipes/checks/debian/debconf/legacy-debconf/build-spec/debian/debconf-test-preinst.preinst b/t/recipes/checks/debian/debconf/legacy-debconf/build-spec/debian/debconf-test-preinst.preinst new file mode 100644 index 0000000..bf6f074 --- /dev/null +++ b/t/recipes/checks/debian/debconf/legacy-debconf/build-spec/debian/debconf-test-preinst.preinst @@ -0,0 +1,13 @@ +#!/bin/sh +set -e + +# Obsolete name for the confmodule +. /usr/share/debconf/confmodule.sh + +. /usr/share/debconf/confmodule + +db_input medium debconf/test + +#DEBHELPER# + +true diff --git a/t/recipes/checks/debian/debconf/legacy-debconf/build-spec/debian/debconf-test-preinst.templates b/t/recipes/checks/debian/debconf/legacy-debconf/build-spec/debian/debconf-test-preinst.templates new file mode 100644 index 0000000..2a2a8ab --- /dev/null +++ b/t/recipes/checks/debian/debconf/legacy-debconf/build-spec/debian/debconf-test-preinst.templates @@ -0,0 +1,3 @@ +Template: debconf/test +Type: text +_description: Enter something: diff --git a/t/recipes/checks/debian/debconf/legacy-debconf/build-spec/debian/debconf-test.config b/t/recipes/checks/debian/debconf/legacy-debconf/build-spec/debian/debconf-test.config new file mode 100644 index 0000000..9e32d06 --- /dev/null +++ b/t/recipes/checks/debian/debconf/legacy-debconf/build-spec/debian/debconf-test.config @@ -0,0 +1,24 @@ +#!/bin/sh + +set -e + +. /usr/share/debconf/confmodule + +db_settitle "Funky lintian test" + +# Bad priorities. +db_text LOW debconf/test +db_input normal debconf/test + +# Valid priorities. +db_text \ +high debconf/test +foo=medium +db_input $foo debconf/test +db_input "$foo" debconf/test +db_input 'medium' debconf/test + +# debconf/transtring should not be flagged as unused +# (it's aliased to debconf/alias, which is used) +db_register debconf/transtring debconf/alias +db_input medium debconf/alias diff --git a/t/recipes/checks/debian/debconf/legacy-debconf/build-spec/debian/debconf-test.postinst b/t/recipes/checks/debian/debconf/legacy-debconf/build-spec/debian/debconf-test.postinst new file mode 100644 index 0000000..b387037 --- /dev/null +++ b/t/recipes/checks/debian/debconf/legacy-debconf/build-spec/debian/debconf-test.postinst @@ -0,0 +1,10 @@ +#!/bin/sh + +set -e + +. /usr/share/debconf/confmodule + +# Not supposed to do this here. +db_input medium debconf/test + +true diff --git a/t/recipes/checks/debian/debconf/legacy-debconf/build-spec/debian/debconf-test.templates b/t/recipes/checks/debian/debconf/legacy-debconf/build-spec/debian/debconf-test.templates new file mode 100644 index 0000000..811bb6c --- /dev/null +++ b/t/recipes/checks/debian/debconf/legacy-debconf/build-spec/debian/debconf-test.templates @@ -0,0 +1,101 @@ +Template: debconf/test +Type: text +_description: Foo bar (1) + +Template: debconf/testmulti +Type: multiselect +__Choices: foo, bar, boo +_Description: test comma usages in choices fields + +Template: debconf/testmulti-escape +Type: multiselect +_Choices: foo\, bar, boo +_Description: test escaped comma usages in choices fields: + +Template: debconf/testboolean +Type: boolean +_Description: Enter yes or no: + Do you want to answer this question? + +Template: debconf/teststring +Type: string +_Description: This template goes on and on. + This template goes on and on. + This template goes on and on. + This template goes on and on. + This template goes on and on. + This template goes on and on. + This template goes on and on. + This template goes on and on. + This template goes on and on. + This template goes on and on. + This template goes on and on. + This template goes on and on. + This template goes on and on. + This template goes on and on. + This template goes on and on. + This template goes on and on. + This template goes on and on. + This template goes on and on. + This template goes on and on. + This template goes on and on. + This template goes on and on. + This template goes on and on. + +Template: debconf/testnote +Type: note +Description: This should be a title and not a really long sentence that ends in a regular period. + +Template: debconf/1st-person +Type: select +__Choices: one, two +_Description: Select one of these: + I am a stupid test of first-person syntax that tells you to select yes + even though yes isn't an option in this prompt. + +Template: debconf/internal +Type: boolean +Description: For internal use only + We are testing that style checks are not applied to templates that are + marked as internal. + +Template: debconf/no-description +Type: string + +Template: debconf/translate +Type: boolean +_Default: false +_Description: Should this really be translated? + +Template: debconf/transtring +Type: string +_Default: 1 +_Description: Count of templates: + The number of useless numbers that a translator would have to translate + for this template. + +Template: debconf/language +__Choices: English, Spanish, German, French +# This is the default choice. Translators should put their own language, +# if available, here instead, but the value MUST be the English version +# of the value for the package scripts to work properly. +_Default: English[ translators, see the comment in the PO files] +_Description: The default language, an example of a default that should + be translated. + +Template: debconf/error +Type: error +_Description: An error occurred + This is a sample Debconf error template. + +Template: debconf/should-be-boolean +Type: select +__Choices: yes, no +_Description: Choose: + Pick yes or no. + +Template: debconf/should-be-no-longer-a-problem +Type: boolean +_Description: Decide, lintian + Using "no longer" should no longer be detected as + making-assumptions-about-interfaces-in-templates by lintian. diff --git a/t/recipes/checks/debian/debconf/legacy-debconf/build-spec/debian/debconf-test.templates.de b/t/recipes/checks/debian/debconf/legacy-debconf/build-spec/debian/debconf-test.templates.de new file mode 100644 index 0000000..f9ea121 --- /dev/null +++ b/t/recipes/checks/debian/debconf/legacy-debconf/build-spec/debian/debconf-test.templates.de @@ -0,0 +1,3 @@ +Template: debconf/testmulti +Type: multiselect +Choices: foo, bar\, boo, boo diff --git a/t/recipes/checks/debian/debconf/legacy-debconf/build-spec/debian/debconf-test.templates.in b/t/recipes/checks/debian/debconf/legacy-debconf/build-spec/debian/debconf-test.templates.in new file mode 100644 index 0000000..e69de29 diff --git a/t/recipes/checks/debian/debconf/legacy-debconf/build-spec/debian/debconf-udeb.postinst b/t/recipes/checks/debian/debconf/legacy-debconf/build-spec/debian/debconf-udeb.postinst new file mode 100644 index 0000000..4ce41f0 --- /dev/null +++ b/t/recipes/checks/debian/debconf/legacy-debconf/build-spec/debian/debconf-udeb.postinst @@ -0,0 +1,9 @@ +#!/bin/sh + +set -e + +. /usr/share/debconf/confmodule + +ldconfig + +true diff --git a/t/recipes/checks/debian/debconf/legacy-debconf/build-spec/debian/debconf-udeb.templates b/t/recipes/checks/debian/debconf/legacy-debconf/build-spec/debian/debconf-udeb.templates new file mode 100644 index 0000000..5d7cf5a --- /dev/null +++ b/t/recipes/checks/debian/debconf/legacy-debconf/build-spec/debian/debconf-udeb.templates @@ -0,0 +1,3 @@ +Template: debian-installer/debconf-udeb/title +Type: text +_description: This is just a test diff --git a/t/recipes/checks/debian/debconf/legacy-debconf/build-spec/debian/po/POTFILES.in b/t/recipes/checks/debian/debconf/legacy-debconf/build-spec/debian/po/POTFILES.in new file mode 100644 index 0000000..d0c82f0 --- /dev/null +++ b/t/recipes/checks/debian/debconf/legacy-debconf/build-spec/debian/po/POTFILES.in @@ -0,0 +1,2 @@ +[type: gettext/rfc822deb] debconf-test.templates +[type: gettext/rfc822deb] debconf-udeb.templates diff --git a/t/recipes/checks/debian/debconf/legacy-debconf/build-spec/debian/po/de.po b/t/recipes/checks/debian/debconf/legacy-debconf/build-spec/debian/po/de.po new file mode 100644 index 0000000..86c5796 --- /dev/null +++ b/t/recipes/checks/debian/debconf/legacy-debconf/build-spec/debian/po/de.po @@ -0,0 +1,66 @@ +# +# Translators, if you are not familiar with the PO format, gettext +# documentation is worth reading, especially sections dedicated to +# this format, e.g. by running: +# info -n '(gettext)PO Files' +# info -n '(gettext)Header Entry' +# +# Some information specific to po-debconf are available at +# /usr/share/doc/po-debconf/README-trans +# or http://www.debian.org/intl/l10n/po-debconf/README-trans +# +# Developers do not need to manually edit POT or PO files. +# +msgid "" +msgstr "" +"Project-Id-Version: debconf-test 1\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2004-12-06 00:51+0100\n" +"PO-Revision-Date: 2004-12-06 01:01+0100\n" +"Last-Translator: Frank Lichtenheld \n" +"Language-Team: debian-l10n-german@l.d.o\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Type: text +#. description +#: ../debconf-test.templates:3 +msgid "Foo bar (2)" +msgstr "" + +#. Type: multiselect +#. Choices +#: ../debconf-test.templates:7 +msgid "foo" +msgstr "foo" + +#. Type: multiselect +#. Choices +#: ../debconf-test.templates:7 +msgid "bar" +msgstr "bar, boo" + +#. Type: multiselect +#. Choices +#: ../debconf-test.templates:7 +msgid "boo" +msgstr "boo" + +#. Type: multiselect +#. Description +#: ../debconf-test.templates:8 +msgid "test comma usages in choices fields" +msgstr "" + +#. Type: multiselect +#. Choices +#: ../debconf-test.templates:11 +msgid "foo\\, bar, boo" +msgstr "foo, bar, boo" + +#. Type: text +#. description +#: ../debconf-udeb.templates:3 +msgid "This is just a test" +msgstr "Dies ist nur ein Test" diff --git a/t/recipes/checks/debian/debconf/legacy-debconf/build-spec/debian/po/fr.po b/t/recipes/checks/debian/debconf/legacy-debconf/build-spec/debian/po/fr.po new file mode 100644 index 0000000..c74deb2 --- /dev/null +++ b/t/recipes/checks/debian/debconf/legacy-debconf/build-spec/debian/po/fr.po @@ -0,0 +1,60 @@ +# +# Translators, if you are not familiar with the PO format, gettext +# documentation is worth reading, especially sections dedicated to +# this format, e.g. by running: +# info -n '(gettext)PO Files' +# info -n '(gettext)Header Entry' +# +# Some information specific to po-debconf are available at +# /usr/share/doc/po-debconf/README-trans +# or http://www.debian.org/intl/l10n/po-debconf/README-trans +# +# Developers do not need to manually edit POT or PO files. +# +msgid "" +msgstr "" +"Project-Id-Version: debconf-test 1\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2004-12-06 00:51+0100\n" +"PO-Revision-Date: 2005-10-13 15:03+0200\n" +"Last-Translator: Frank Lichtenheld \n" +"Language-Team: debian-l10n-german@l.d.o\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=CHARSET\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Type: text +#. description +#: ../debconf-test.templates:3 +msgid "Foo bar (2)" +msgstr "" + +#. Type: multiselect +#. Choices +#: ../debconf-test.templates:7 +msgid "foo" +msgstr "foo" + +#. Type: multiselect +#. Choices +#: ../debconf-test.templates:7 +msgid "bar" +msgstr "bar, boo" + +#. Type: multiselect +#. Choices +#: ../debconf-test.templates:7 +msgid "boo" +msgstr "boo" + +#. Type: multiselect +#. Description +#: ../debconf-test.templates:8 +msgid "test comma usages in choices fields" +msgstr "" + +#. Type: text +#. description +#: ../debconf-udeb.templates:3 +msgid "This is just a test" +msgstr " diff --git a/t/recipes/checks/debian/debconf/legacy-debconf/build-spec/debian/po/lang.po b/t/recipes/checks/debian/debconf/legacy-debconf/build-spec/debian/po/lang.po new file mode 100644 index 0000000..7ac498a --- /dev/null +++ b/t/recipes/checks/debian/debconf/legacy-debconf/build-spec/debian/po/lang.po @@ -0,0 +1,15 @@ +msgid "" +msgstr "" +"Project-Id-Version: debconf-test 1\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2004-12-06 00:51+0100\n" +"PO-Revision-Date: 2005-10-13 15:03+0200\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Type: text +#. description +#: ../debconf-test.templates:3 +msgid "Foo bar (2)" +msgstr "" diff --git a/t/recipes/checks/debian/debconf/legacy-debconf/build-spec/debian/po/nds.po b/t/recipes/checks/debian/debconf/legacy-debconf/build-spec/debian/po/nds.po new file mode 100644 index 0000000..7ac498a --- /dev/null +++ b/t/recipes/checks/debian/debconf/legacy-debconf/build-spec/debian/po/nds.po @@ -0,0 +1,15 @@ +msgid "" +msgstr "" +"Project-Id-Version: debconf-test 1\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2004-12-06 00:51+0100\n" +"PO-Revision-Date: 2005-10-13 15:03+0200\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Type: text +#. description +#: ../debconf-test.templates:3 +msgid "Foo bar (2)" +msgstr "" diff --git a/t/recipes/checks/debian/debconf/legacy-debconf/build-spec/debian/po/output b/t/recipes/checks/debian/debconf/legacy-debconf/build-spec/debian/po/output new file mode 100644 index 0000000..c3df1a5 --- /dev/null +++ b/t/recipes/checks/debian/debconf/legacy-debconf/build-spec/debian/po/output @@ -0,0 +1 @@ +2 utf8 diff --git a/t/recipes/checks/debian/debconf/legacy-debconf/build-spec/debian/po/pt_BR.po b/t/recipes/checks/debian/debconf/legacy-debconf/build-spec/debian/po/pt_BR.po new file mode 100644 index 0000000..7ac498a --- /dev/null +++ b/t/recipes/checks/debian/debconf/legacy-debconf/build-spec/debian/po/pt_BR.po @@ -0,0 +1,15 @@ +msgid "" +msgstr "" +"Project-Id-Version: debconf-test 1\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2004-12-06 00:51+0100\n" +"PO-Revision-Date: 2005-10-13 15:03+0200\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Type: text +#. description +#: ../debconf-test.templates:3 +msgid "Foo bar (2)" +msgstr "" diff --git a/t/recipes/checks/debian/debconf/legacy-debconf/build-spec/debian/po/sample-file.po b/t/recipes/checks/debian/debconf/legacy-debconf/build-spec/debian/po/sample-file.po new file mode 100644 index 0000000..8dcc0ff --- /dev/null +++ b/t/recipes/checks/debian/debconf/legacy-debconf/build-spec/debian/po/sample-file.po @@ -0,0 +1 @@ +This is some file that isn't actually a valid .po file. diff --git a/t/recipes/checks/debian/debconf/legacy-debconf/build-spec/debian/po/templates.pot b/t/recipes/checks/debian/debconf/legacy-debconf/build-spec/debian/po/templates.pot new file mode 100644 index 0000000..914c77f --- /dev/null +++ b/t/recipes/checks/debian/debconf/legacy-debconf/build-spec/debian/po/templates.pot @@ -0,0 +1,61 @@ +# +# Translators, if you are not familiar with the PO format, gettext +# documentation is worth reading, especially sections dedicated to +# this format, e.g. by running: +# info -n '(gettext)PO Files' +# info -n '(gettext)Header Entry' +# +# Some information specific to po-debconf are available at +# /usr/share/doc/po-debconf/README-trans +# or http://www.debian.org/intl/l10n/po-debconf/README-trans +# +# Developers do not need to manually edit POT or PO files. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2004-12-06 00:51+0100\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=CHARSET\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Type: text +#. description +#: ../debconf-test.templates:3 +msgid "Foo bar (2)" +msgstr "" + +#. Type: multiselect +#. Choices +#: ../debconf-test.templates:7 +msgid "foo" +msgstr "" + +#. Type: multiselect +#. Choices +#: ../debconf-test.templates:7 +msgid "bar" +msgstr "" + +#. Type: multiselect +#. Choices +#: ../debconf-test.templates:7 +msgid "boo" +msgstr "" + +#. Type: multiselect +#. Description +#: ../debconf-test.templates:8 +msgid "test comma usages in choices fields" +msgstr "" + +#. Type: text +#. description +#: ../debconf-udeb.templates:3 +msgid "This is just a test" +msgstr "" diff --git a/t/recipes/checks/debian/debconf/legacy-debconf/build-spec/debian/pycompat b/t/recipes/checks/debian/debconf/legacy-debconf/build-spec/debian/pycompat new file mode 100644 index 0000000..0cfbf08 --- /dev/null +++ b/t/recipes/checks/debian/debconf/legacy-debconf/build-spec/debian/pycompat @@ -0,0 +1 @@ +2 diff --git a/t/recipes/checks/debian/debconf/legacy-debconf/build-spec/debian/pyversions b/t/recipes/checks/debian/debconf/legacy-debconf/build-spec/debian/pyversions new file mode 100644 index 0000000..6f290b0 --- /dev/null +++ b/t/recipes/checks/debian/debconf/legacy-debconf/build-spec/debian/pyversions @@ -0,0 +1 @@ +>= 2.7 diff --git a/t/recipes/checks/debian/debconf/legacy-debconf/build-spec/debian/rules b/t/recipes/checks/debian/debconf/legacy-debconf/build-spec/debian/rules new file mode 100755 index 0000000..933901a --- /dev/null +++ b/t/recipes/checks/debian/debconf/legacy-debconf/build-spec/debian/rules @@ -0,0 +1,64 @@ +#!/usr/bin/make -f + +deb_dir = debian/debconf +udeb_dir = debian/debconf-udeb +build_dirs = $(deb_dir) $(udeb_dir) + +build-indep: +# There are no architecture-independent files to be built +# by this package. If there were any they would be made +# here. + +build-arch: + dh_testdir + touch build + +build: build-indep build-arch + +clean: + dh_testdir + dh_testroot + -rm -f build + + dh_clean + +binary-indep: build +# There are no architecture-independent files to be uploaded +# generated by this package. If there were any they would be +# made here. + +binary-arch: build + dh_testdir + dh_testroot + dh_prep + dh_installdirs -a + + dh_installchangelogs -a + dh_installdocs -a + dh_installdebconf -pdebconf-test + dh_installdebconf -pdebconf-test-noscripts --noscripts + dh_installdebconf -pdebconf-test-preinst --noscripts + dh_installdebconf -pdebconf-test-postinst --noscripts + dh_installdebconf -pdebconf-udeb + + + + + dh_compress -a + dh_fixperms -a + +# The shlibs stuff doesn't matter here so do it in a weird order to +# test warnings. + dh_installdeb -a + dh_shlibdeps -a + dh_makeshlibs -a + dh_gencontrol -a + dh_md5sums + dh_builddeb -a + dh_makeshlibs -a + +# Below here is fairly generic really + +binary: binary-indep binary-arch + +.PHONY: build-arch build-indep build binary binary-arch binary-indep clean checkroot diff --git a/t/recipes/checks/debian/debconf/legacy-debconf/build-spec/fill-values b/t/recipes/checks/debian/debconf/legacy-debconf/build-spec/fill-values new file mode 100644 index 0000000..186615f --- /dev/null +++ b/t/recipes/checks/debian/debconf/legacy-debconf/build-spec/fill-values @@ -0,0 +1,6 @@ +Skeleton: upload-native +Testname: legacy-debconf +Source: debconf +Version: 1~rc1 +Description: Legacy test "debconf" +Default-Build-Depends: debhelper (>= [% $dh_compat_level %]~) diff --git a/t/recipes/checks/debian/debconf/legacy-debconf/eval/desc b/t/recipes/checks/debian/debconf/legacy-debconf/eval/desc new file mode 100644 index 0000000..d6e9b44 --- /dev/null +++ b/t/recipes/checks/debian/debconf/legacy-debconf/eval/desc @@ -0,0 +1,2 @@ +Testname: legacy-debconf +Check: debian/debconf diff --git a/t/recipes/checks/debian/debconf/legacy-debconf/eval/hints b/t/recipes/checks/debian/debconf/legacy-debconf/eval/hints new file mode 100644 index 0000000..688e979 --- /dev/null +++ b/t/recipes/checks/debian/debconf/legacy-debconf/eval/hints @@ -0,0 +1,49 @@ +debconf-udeb (udeb): unknown-field-in-templates debian-installer/debconf-udeb/title description-de.UTF-8 [templates:4] +debconf-udeb (udeb): unknown-field-in-templates debian-installer/debconf-udeb/title description [templates:3] +debconf-udeb (udeb): missing-debconf-dependency +debconf (source): template-uses-unsplit-choices debconf/testmulti-escape [debian/debconf-test.templates:12] +debconf-test-preinst (binary): unknown-field-in-templates debconf/test description [templates:3] +debconf-test-preinst (binary): possible-debconf-note-abuse debconf/test [preinst:8] +debconf-test-preinst (binary): missing-debconf-dependency-for-preinst +debconf-test-preinst (binary): loads-obsolete-confmodule /usr/share/debconf/confmodule.sh [preinst:4] +debconf-test-postinst (binary): unknown-field-in-templates debconf/test description [templates:3] +debconf-test-postinst (binary): postinst-uses-db-input [postinst:5] +debconf-test-postinst (binary): possible-debconf-note-abuse debconf/test [postinst:5] +debconf-test-postinst (binary): no-debconf-config +debconf-test-noscripts (binary): unused-debconf-template debconf/test [templates:1] +debconf-test-noscripts (binary): unknown-field-in-templates debconf/test description [templates:3] +debconf-test-noscripts (binary): postrm-does-not-purge-debconf postrm +debconf-test-noscripts (binary): no-debconf-config +debconf-test (binary): using-question-in-extended-description-in-templates debconf/testboolean [templates:19] +debconf-test (binary): using-imperative-form-in-templates debconf/should-be-boolean [templates:93] +debconf-test (binary): using-imperative-form-in-templates debconf/1st-person [templates:54] +debconf-test (binary): using-first-person-in-templates debconf/1st-person [templates:54] +debconf-test (binary): unused-debconf-template debconf/translate [templates:67] +debconf-test (binary): unused-debconf-template debconf/teststring [templates:22] +debconf-test (binary): unused-debconf-template debconf/testnote [templates:47] +debconf-test (binary): unused-debconf-template debconf/testmulti-escape [templates:11] +debconf-test (binary): unused-debconf-template debconf/testmulti [templates:5] +debconf-test (binary): unused-debconf-template debconf/testboolean [templates:17] +debconf-test (binary): unused-debconf-template debconf/should-be-no-longer-a-problem [templates:96] +debconf-test (binary): unused-debconf-template debconf/should-be-boolean [templates:90] +debconf-test (binary): unused-debconf-template debconf/no-description [templates:64] +debconf-test (binary): unused-debconf-template debconf/language [templates:79] +debconf-test (binary): unused-debconf-template debconf/internal [templates:58] +debconf-test (binary): unused-debconf-template debconf/error [templates:85] +debconf-test (binary): unused-debconf-template debconf/1st-person [templates:51] +debconf-test (binary): unknown-field-in-templates debconf/test description [templates:3] +debconf-test (binary): unknown-debconf-priority normal [config:10] +debconf-test (binary): unknown-debconf-priority LOW [config:9] +debconf-test (binary): too-long-short-description-in-templates debconf/testnote [templates:49] +debconf-test (binary): too-long-extended-description-in-templates debconf/teststring [templates:24] +debconf-test (binary): select-with-boolean-choices debconf/should-be-boolean [templates:92] +debconf-test (binary): possible-debconf-note-abuse debconf/test [postinst:7] +debconf-test (binary): possible-debconf-note-abuse debconf/test [config:18] +debconf-test (binary): no-template-type debconf/language [templates:79] +debconf-test (binary): no-template-description debconf/no-description [templates:64] +debconf-test (binary): mismatch-translated-choices debconf/testmulti-escape Choices-de.UTF-8 [templates:13] +debconf-test (binary): malformed-title-in-templates debconf/testnote [templates:49] +debconf-test (binary): malformed-question-in-templates debconf/testboolean [templates:19] +debconf-test (binary): malformed-question-in-templates debconf/should-be-no-longer-a-problem [templates:98] +debconf-test (binary): malformed-prompt-in-templates debconf/teststring [templates:24] +debconf-test (binary): making-assumptions-about-interfaces-in-templates debconf/testboolean [templates:19] diff --git a/t/recipes/checks/debian/debconf/legacy-debconf/eval/post-test b/t/recipes/checks/debian/debconf/legacy-debconf/eval/post-test new file mode 100644 index 0000000..faeef0b --- /dev/null +++ b/t/recipes/checks/debian/debconf/legacy-debconf/eval/post-test @@ -0,0 +1 @@ +s/\(current is ([0-9]+\.)+[0-9]\)/(current is CURRENT)/ diff --git a/t/recipes/checks/debian/debconf/national-encoding/build-spec/debian/templates b/t/recipes/checks/debian/debconf/national-encoding/build-spec/debian/templates new file mode 100644 index 0000000..9a2dfc1 --- /dev/null +++ b/t/recipes/checks/debian/debconf/national-encoding/build-spec/debian/templates @@ -0,0 +1,3 @@ +Template: debconf/translated +Type: error +_Description: Nicht ntzlich diff --git a/t/recipes/checks/debian/debconf/national-encoding/build-spec/fill-values b/t/recipes/checks/debian/debconf/national-encoding/build-spec/fill-values new file mode 100644 index 0000000..d6c7a70 --- /dev/null +++ b/t/recipes/checks/debian/debconf/national-encoding/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: upload-native +Testname: national-encoding +Description: National encoding in debconf template diff --git a/t/recipes/checks/debian/debconf/national-encoding/eval/desc b/t/recipes/checks/debian/debconf/national-encoding/eval/desc new file mode 100644 index 0000000..7350979 --- /dev/null +++ b/t/recipes/checks/debian/debconf/national-encoding/eval/desc @@ -0,0 +1,2 @@ +Testname: national-encoding +Check: debian/debconf diff --git a/t/recipes/checks/debian/debconf/national-encoding/eval/hints b/t/recipes/checks/debian/debconf/national-encoding/eval/hints new file mode 100644 index 0000000..6869670 --- /dev/null +++ b/t/recipes/checks/debian/debconf/national-encoding/eval/hints @@ -0,0 +1 @@ +national-encoding (binary): no-debconf-config diff --git a/t/recipes/checks/debian/debconf/po-debconf-general/build-spec/debian/po/English.po b/t/recipes/checks/debian/debconf/po-debconf-general/build-spec/debian/po/English.po new file mode 100644 index 0000000..e99b822 --- /dev/null +++ b/t/recipes/checks/debian/debconf/po-debconf-general/build-spec/debian/po/English.po @@ -0,0 +1 @@ +Not a PO file or an English translation. diff --git a/t/recipes/checks/debian/debconf/po-debconf-general/build-spec/debian/po/POTFILES.in b/t/recipes/checks/debian/debconf/po-debconf-general/build-spec/debian/po/POTFILES.in new file mode 100644 index 0000000..da5857e --- /dev/null +++ b/t/recipes/checks/debian/debconf/po-debconf-general/build-spec/debian/po/POTFILES.in @@ -0,0 +1,3 @@ +# This is a comment, which should be ignored. +[type: gettext/rfc822deb] templates +some-other-file diff --git a/t/recipes/checks/debian/debconf/po-debconf-general/build-spec/debian/po/de.po b/t/recipes/checks/debian/debconf/po-debconf-general/build-spec/debian/po/de.po new file mode 100644 index 0000000..545fd25 --- /dev/null +++ b/t/recipes/checks/debian/debconf/po-debconf-general/build-spec/debian/po/de.po @@ -0,0 +1,2 @@ +This is just some random other file that isn't a German translation at +all. diff --git a/t/recipes/checks/debian/debconf/po-debconf-general/build-spec/debian/po/templates.pot b/t/recipes/checks/debian/debconf/po-debconf-general/build-spec/debian/po/templates.pot new file mode 100644 index 0000000..420734f --- /dev/null +++ b/t/recipes/checks/debian/debconf/po-debconf-general/build-spec/debian/po/templates.pot @@ -0,0 +1,30 @@ +msgid "" +msgstr "" +"Project-Id-Version: Lintian 2.4.3\n" +"PO-Revision-Date: +2010-07-25 17:07 -0700\n" +"Last-Translator: Russ Allbery \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=CHARSET\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Type: string +#. Default +#: ../templates:1001 +msgid "foo" +msgstr "" + +#. Type: string +#. Description +#: ../templates:1001 +msgid "This is a string question used for testing:" +msgstr "" + +#. Type: string +#. Description +#: ../templates:1001 +msgid "This is a second string question:" + +#. Type: string +#. Description +#: ../templates:1001 +msgid "This one ensures no 100% translation of the template." diff --git a/t/recipes/checks/debian/debconf/po-debconf-general/build-spec/debian/templates b/t/recipes/checks/debian/debconf/po-debconf-general/build-spec/debian/templates new file mode 100644 index 0000000..b626825 --- /dev/null +++ b/t/recipes/checks/debian/debconf/po-debconf-general/build-spec/debian/templates @@ -0,0 +1,10 @@ +Template: po-debconf-general/test +Type: string +_Default: foo +Description: This is a string question used for testing: + +Template: po-debconf-general/test-2 +Type: string +Default: bar +_Description: This is a second string question: + This one ensures no 100% translation of the template. diff --git a/t/recipes/checks/debian/debconf/po-debconf-general/build-spec/debian/templates.en_US b/t/recipes/checks/debian/debconf/po-debconf-general/build-spec/debian/templates.en_US new file mode 100644 index 0000000..617a474 --- /dev/null +++ b/t/recipes/checks/debian/debconf/po-debconf-general/build-spec/debian/templates.en_US @@ -0,0 +1,5 @@ +Template: po-debconf-general/test +Type: string +Default: foo +_Description: This is an English translation that shouldn't be in this + directory. diff --git a/t/recipes/checks/debian/debconf/po-debconf-general/build-spec/fill-values b/t/recipes/checks/debian/debconf/po-debconf-general/build-spec/fill-values new file mode 100644 index 0000000..bbcbc61 --- /dev/null +++ b/t/recipes/checks/debian/debconf/po-debconf-general/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: upload-native +Testname: po-debconf-general +Description: General tests for debconf translations diff --git a/t/recipes/checks/debian/debconf/po-debconf-general/eval/desc b/t/recipes/checks/debian/debconf/po-debconf-general/eval/desc new file mode 100644 index 0000000..c4ebe68 --- /dev/null +++ b/t/recipes/checks/debian/debconf/po-debconf-general/eval/desc @@ -0,0 +1,2 @@ +Testname: po-debconf-general +Check: debian/debconf diff --git a/t/recipes/checks/debian/debconf/po-debconf-general/eval/hints b/t/recipes/checks/debian/debconf/po-debconf-general/eval/hints new file mode 100644 index 0000000..0d9bd21 --- /dev/null +++ b/t/recipes/checks/debian/debconf/po-debconf-general/eval/hints @@ -0,0 +1,3 @@ +po-debconf-general (binary): unused-debconf-template po-debconf-general/test-2 [templates:6] +po-debconf-general (binary): unused-debconf-template po-debconf-general/test [templates:1] +po-debconf-general (binary): no-debconf-config diff --git a/t/recipes/checks/debian/desktop-entries/desktop-file/build-spec/debian/not-forwarded.desktop b/t/recipes/checks/debian/desktop-entries/desktop-file/build-spec/debian/not-forwarded.desktop new file mode 100644 index 0000000..7d47ab9 --- /dev/null +++ b/t/recipes/checks/debian/desktop-entries/desktop-file/build-spec/debian/not-forwarded.desktop @@ -0,0 +1 @@ +A MENU ENTRY ACCORDING FREEDESKTOP.ORG diff --git a/t/recipes/checks/debian/desktop-entries/desktop-file/build-spec/fill-values b/t/recipes/checks/debian/desktop-entries/desktop-file/build-spec/fill-values new file mode 100644 index 0000000..3cf49b9 --- /dev/null +++ b/t/recipes/checks/debian/desktop-entries/desktop-file/build-spec/fill-values @@ -0,0 +1,3 @@ +Testname: desktop-file +Skeleton: source-non-native +Description: Maintainer keeps a *.desktop menu item in ./debian diff --git a/t/recipes/checks/debian/desktop-entries/desktop-file/eval/desc b/t/recipes/checks/debian/desktop-entries/desktop-file/eval/desc new file mode 100644 index 0000000..0e834a9 --- /dev/null +++ b/t/recipes/checks/debian/desktop-entries/desktop-file/eval/desc @@ -0,0 +1,3 @@ +Testname: desktop-file +Check: debian/desktop-entries +See-Also: social contract item 2, developer-reference 3.1.4, policy 4.3, Bug#755161 diff --git a/t/recipes/checks/debian/desktop-entries/desktop-file/eval/hints b/t/recipes/checks/debian/desktop-entries/desktop-file/eval/hints new file mode 100644 index 0000000..2da647f --- /dev/null +++ b/t/recipes/checks/debian/desktop-entries/desktop-file/eval/hints @@ -0,0 +1 @@ +desktop-file (source): maintainer-desktop-entry [debian/not-forwarded.desktop] diff --git a/t/recipes/checks/debian/filenames/duplicate-news-files/build-spec/debian/NEWS b/t/recipes/checks/debian/filenames/duplicate-news-files/build-spec/debian/NEWS new file mode 100644 index 0000000..da28de5 --- /dev/null +++ b/t/recipes/checks/debian/filenames/duplicate-news-files/build-spec/debian/NEWS @@ -0,0 +1,62 @@ +unison (2.48.4-3) unstable; urgency=medium + + This version is compiled with a new version of OCaml (4.08.1) and + is incompatible with previous versions of unison shipped in Debian, + in particular the one in Debian 10 (buster). + + -- Stéphane Glondu Tue, 03 Dec 2019 11:38:54 +0100 + +unison (2.40.63-1) experimental; urgency=low + + This new version uses a protocol incompatible with the precedent one + (2.32.52) which was the version available in Debian 6.0 (a.k.a. + "Squeeze"). If you want to synchronize with the previous version of + Unison, use the unison2.32.52 package. + + -- Stéphane Glondu Sat, 14 Jan 2012 11:31:14 +0100 + +unison (2.13.16-1) unstable; urgency=low + + As of version 2.10.2, the package use an alternative to let the user + choose between unison and unison2.9.1 binaries for unison and + unison-gtk. The binaries used in unison and unison-gtk package were + versionned binaries (ie unison2.10.2 and unison2.10.2-gtk). This was a + mistake. When trying to upgrade to new upstream version, former + alternatives were not removed and you keep symlinks to non existent + binaries (ie you stay with unison pointing to unison2.10.2). This + behavior is corrected by using a stable name for unison binaries (ie + unison-latest-stable). + + If you have configured alternatives, you may encounter some problem, + because during upgrade the symlink won't be updated, since it has been + user configured. In this case, you should run "update-alternatives + --auto unison && update-alternatives --auto unison-gtk" to restore the + good behavior. + + -- Sylvain Le Gall Sat, 13 Aug 2005 20:17:11 +0200 + +unison (2.10.2-2) unstable; urgency=low + + Upgrading from version 2.9.1 to 2.10.2 involves a lot of changes. In + particular, most of the configuration of the former stable release + (2.9.1) is no longer valid. Archive format has changed: if you have any + unsynchronized changes when you upgrade to this new archive format, you + have to merge them all by hand. You can also use the new package + unison2.9.1 (which is the former stable release) to synchronise your + old archive before migrating. + + Version 2.10.2 and 2.9.1 are not compatible. You will need to have the + same version of unison on both end of the synchronisation link (ie if + you need to synchronise two computers, you will need to have unison + 2.10.2 on both). + + -- Sylvain Le Gall Mon, 25 Apr 2005 23:06:44 +0200 + +unison (2.10.2-1) unstable; urgency=medium + + With this new stable release, a package split has been made. Now the + package unison will always hold the latest stable release of unison. + If you need to use the former stable release, you will need to install + unison2.9.1, which is a new debian package. + + -- Sylvain Le Gall Tue, 19 Apr 2005 00:08:05 +0200 diff --git a/t/recipes/checks/debian/filenames/duplicate-news-files/build-spec/debian/NEWS.Debian b/t/recipes/checks/debian/filenames/duplicate-news-files/build-spec/debian/NEWS.Debian new file mode 100644 index 0000000..da28de5 --- /dev/null +++ b/t/recipes/checks/debian/filenames/duplicate-news-files/build-spec/debian/NEWS.Debian @@ -0,0 +1,62 @@ +unison (2.48.4-3) unstable; urgency=medium + + This version is compiled with a new version of OCaml (4.08.1) and + is incompatible with previous versions of unison shipped in Debian, + in particular the one in Debian 10 (buster). + + -- Stéphane Glondu Tue, 03 Dec 2019 11:38:54 +0100 + +unison (2.40.63-1) experimental; urgency=low + + This new version uses a protocol incompatible with the precedent one + (2.32.52) which was the version available in Debian 6.0 (a.k.a. + "Squeeze"). If you want to synchronize with the previous version of + Unison, use the unison2.32.52 package. + + -- Stéphane Glondu Sat, 14 Jan 2012 11:31:14 +0100 + +unison (2.13.16-1) unstable; urgency=low + + As of version 2.10.2, the package use an alternative to let the user + choose between unison and unison2.9.1 binaries for unison and + unison-gtk. The binaries used in unison and unison-gtk package were + versionned binaries (ie unison2.10.2 and unison2.10.2-gtk). This was a + mistake. When trying to upgrade to new upstream version, former + alternatives were not removed and you keep symlinks to non existent + binaries (ie you stay with unison pointing to unison2.10.2). This + behavior is corrected by using a stable name for unison binaries (ie + unison-latest-stable). + + If you have configured alternatives, you may encounter some problem, + because during upgrade the symlink won't be updated, since it has been + user configured. In this case, you should run "update-alternatives + --auto unison && update-alternatives --auto unison-gtk" to restore the + good behavior. + + -- Sylvain Le Gall Sat, 13 Aug 2005 20:17:11 +0200 + +unison (2.10.2-2) unstable; urgency=low + + Upgrading from version 2.9.1 to 2.10.2 involves a lot of changes. In + particular, most of the configuration of the former stable release + (2.9.1) is no longer valid. Archive format has changed: if you have any + unsynchronized changes when you upgrade to this new archive format, you + have to merge them all by hand. You can also use the new package + unison2.9.1 (which is the former stable release) to synchronise your + old archive before migrating. + + Version 2.10.2 and 2.9.1 are not compatible. You will need to have the + same version of unison on both end of the synchronisation link (ie if + you need to synchronise two computers, you will need to have unison + 2.10.2 on both). + + -- Sylvain Le Gall Mon, 25 Apr 2005 23:06:44 +0200 + +unison (2.10.2-1) unstable; urgency=medium + + With this new stable release, a package split has been made. Now the + package unison will always hold the latest stable release of unison. + If you need to use the former stable release, you will need to install + unison2.9.1, which is a new debian package. + + -- Sylvain Le Gall Tue, 19 Apr 2005 00:08:05 +0200 diff --git a/t/recipes/checks/debian/filenames/duplicate-news-files/build-spec/fill-values b/t/recipes/checks/debian/filenames/duplicate-news-files/build-spec/fill-values new file mode 100644 index 0000000..630a0bb --- /dev/null +++ b/t/recipes/checks/debian/filenames/duplicate-news-files/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: source-native +Testname: duplicate-news-files +Description: Contains both NEWS and NEWS.Debian files. diff --git a/t/recipes/checks/debian/filenames/duplicate-news-files/eval/desc b/t/recipes/checks/debian/filenames/duplicate-news-files/eval/desc new file mode 100644 index 0000000..32c4856 --- /dev/null +++ b/t/recipes/checks/debian/filenames/duplicate-news-files/eval/desc @@ -0,0 +1,3 @@ +Testname: duplicate-news-files +See-Also: #429510, #946126 +Check: debian/filenames diff --git a/t/recipes/checks/debian/filenames/duplicate-news-files/eval/hints b/t/recipes/checks/debian/filenames/duplicate-news-files/eval/hints new file mode 100644 index 0000000..a307101 --- /dev/null +++ b/t/recipes/checks/debian/filenames/duplicate-news-files/eval/hints @@ -0,0 +1 @@ +duplicate-news-files (source): duplicate-packaging-file better: debian/NEWS [debian/NEWS.Debian] diff --git a/t/recipes/checks/debian/filenames/news-has-debian-extension/build-spec/debian/NEWS.Debian b/t/recipes/checks/debian/filenames/news-has-debian-extension/build-spec/debian/NEWS.Debian new file mode 100644 index 0000000..da28de5 --- /dev/null +++ b/t/recipes/checks/debian/filenames/news-has-debian-extension/build-spec/debian/NEWS.Debian @@ -0,0 +1,62 @@ +unison (2.48.4-3) unstable; urgency=medium + + This version is compiled with a new version of OCaml (4.08.1) and + is incompatible with previous versions of unison shipped in Debian, + in particular the one in Debian 10 (buster). + + -- Stéphane Glondu Tue, 03 Dec 2019 11:38:54 +0100 + +unison (2.40.63-1) experimental; urgency=low + + This new version uses a protocol incompatible with the precedent one + (2.32.52) which was the version available in Debian 6.0 (a.k.a. + "Squeeze"). If you want to synchronize with the previous version of + Unison, use the unison2.32.52 package. + + -- Stéphane Glondu Sat, 14 Jan 2012 11:31:14 +0100 + +unison (2.13.16-1) unstable; urgency=low + + As of version 2.10.2, the package use an alternative to let the user + choose between unison and unison2.9.1 binaries for unison and + unison-gtk. The binaries used in unison and unison-gtk package were + versionned binaries (ie unison2.10.2 and unison2.10.2-gtk). This was a + mistake. When trying to upgrade to new upstream version, former + alternatives were not removed and you keep symlinks to non existent + binaries (ie you stay with unison pointing to unison2.10.2). This + behavior is corrected by using a stable name for unison binaries (ie + unison-latest-stable). + + If you have configured alternatives, you may encounter some problem, + because during upgrade the symlink won't be updated, since it has been + user configured. In this case, you should run "update-alternatives + --auto unison && update-alternatives --auto unison-gtk" to restore the + good behavior. + + -- Sylvain Le Gall Sat, 13 Aug 2005 20:17:11 +0200 + +unison (2.10.2-2) unstable; urgency=low + + Upgrading from version 2.9.1 to 2.10.2 involves a lot of changes. In + particular, most of the configuration of the former stable release + (2.9.1) is no longer valid. Archive format has changed: if you have any + unsynchronized changes when you upgrade to this new archive format, you + have to merge them all by hand. You can also use the new package + unison2.9.1 (which is the former stable release) to synchronise your + old archive before migrating. + + Version 2.10.2 and 2.9.1 are not compatible. You will need to have the + same version of unison on both end of the synchronisation link (ie if + you need to synchronise two computers, you will need to have unison + 2.10.2 on both). + + -- Sylvain Le Gall Mon, 25 Apr 2005 23:06:44 +0200 + +unison (2.10.2-1) unstable; urgency=medium + + With this new stable release, a package split has been made. Now the + package unison will always hold the latest stable release of unison. + If you need to use the former stable release, you will need to install + unison2.9.1, which is a new debian package. + + -- Sylvain Le Gall Tue, 19 Apr 2005 00:08:05 +0200 diff --git a/t/recipes/checks/debian/filenames/news-has-debian-extension/build-spec/fill-values b/t/recipes/checks/debian/filenames/news-has-debian-extension/build-spec/fill-values new file mode 100644 index 0000000..91ce21d --- /dev/null +++ b/t/recipes/checks/debian/filenames/news-has-debian-extension/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: source-native +Testname: news-has-debian-extension +Description: Contains a NEWS.Debian file. diff --git a/t/recipes/checks/debian/filenames/news-has-debian-extension/eval/desc b/t/recipes/checks/debian/filenames/news-has-debian-extension/eval/desc new file mode 100644 index 0000000..bcecab7 --- /dev/null +++ b/t/recipes/checks/debian/filenames/news-has-debian-extension/eval/desc @@ -0,0 +1,3 @@ +Testname: news-has-debian-extension +See-Also: #429510, #946126, #946041 +Check: debian/filenames diff --git a/t/recipes/checks/debian/filenames/news-has-debian-extension/eval/hints b/t/recipes/checks/debian/filenames/news-has-debian-extension/eval/hints new file mode 100644 index 0000000..7227dd6 --- /dev/null +++ b/t/recipes/checks/debian/filenames/news-has-debian-extension/eval/hints @@ -0,0 +1 @@ +news-has-debian-extension (source): incorrect-packaging-filename better: debian/NEWS [debian/NEWS.Debian] diff --git a/t/recipes/checks/debian/line-separators/cruft-crlf-eols/build-spec/debian/changelog.in b/t/recipes/checks/debian/line-separators/cruft-crlf-eols/build-spec/debian/changelog.in new file mode 100644 index 0000000..7174e69 --- /dev/null +++ b/t/recipes/checks/debian/line-separators/cruft-crlf-eols/build-spec/debian/changelog.in @@ -0,0 +1,8 @@ +[% $source %] ([% $version %]) unstable; urgency=low + + * Lintian Test Suite. + * Test: [% $testname %] + + * Suppress "should close ITP bug" messages. (Closes: #123456) + + -- [% $author %] [% $date %] diff --git a/t/recipes/checks/debian/line-separators/cruft-crlf-eols/build-spec/debian/control.in b/t/recipes/checks/debian/line-separators/cruft-crlf-eols/build-spec/debian/control.in new file mode 100644 index 0000000..c4d5304 --- /dev/null +++ b/t/recipes/checks/debian/line-separators/cruft-crlf-eols/build-spec/debian/control.in @@ -0,0 +1,15 @@ +Source: [% $source %] +Priority: optional +Section: [% $section %] +Maintainer: [% $author %] +Standards-Version: [% $standards_version %] +Build-Depends: [% $build_depends %] +Rules-Requires-Root: no + +Package: [% $source %] +Architecture: [% $package_architecture %] +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: [% $description %] + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. diff --git a/t/recipes/checks/debian/line-separators/cruft-crlf-eols/build-spec/debian/install b/t/recipes/checks/debian/line-separators/cruft-crlf-eols/build-spec/debian/install new file mode 100644 index 0000000..47fc6a3 --- /dev/null +++ b/t/recipes/checks/debian/line-separators/cruft-crlf-eols/build-spec/debian/install @@ -0,0 +1 @@ +dummy usr/share/doc/foo/ diff --git a/t/recipes/checks/debian/line-separators/cruft-crlf-eols/build-spec/fill-values b/t/recipes/checks/debian/line-separators/cruft-crlf-eols/build-spec/fill-values new file mode 100644 index 0000000..faa216c --- /dev/null +++ b/t/recipes/checks/debian/line-separators/cruft-crlf-eols/build-spec/fill-values @@ -0,0 +1,4 @@ +Skeleton: upload-native +Testname: cruft-crlf-eols +Package-Architecture: all +Description: Check that control files with CRLF EOLs are reported diff --git a/t/recipes/checks/debian/line-separators/cruft-crlf-eols/build-spec/orig/dummy b/t/recipes/checks/debian/line-separators/cruft-crlf-eols/build-spec/orig/dummy new file mode 100644 index 0000000..5c3118d --- /dev/null +++ b/t/recipes/checks/debian/line-separators/cruft-crlf-eols/build-spec/orig/dummy @@ -0,0 +1 @@ +dummy file diff --git a/t/recipes/checks/debian/line-separators/cruft-crlf-eols/eval/desc b/t/recipes/checks/debian/line-separators/cruft-crlf-eols/eval/desc new file mode 100644 index 0000000..36a6eab --- /dev/null +++ b/t/recipes/checks/debian/line-separators/cruft-crlf-eols/eval/desc @@ -0,0 +1,2 @@ +Testname: cruft-crlf-eols +Check: debian/line-separators diff --git a/t/recipes/checks/debian/line-separators/cruft-crlf-eols/eval/hints b/t/recipes/checks/debian/line-separators/cruft-crlf-eols/eval/hints new file mode 100644 index 0000000..b1c59a6 --- /dev/null +++ b/t/recipes/checks/debian/line-separators/cruft-crlf-eols/eval/hints @@ -0,0 +1,2 @@ +cruft-crlf-eols (source): carriage-return-line-feed [debian/control] +cruft-crlf-eols (source): carriage-return-line-feed [debian/changelog] diff --git a/t/recipes/checks/debian/lintian-overrides/comments/absolutely-misspelled/build-spec/debian/lintian-overrides b/t/recipes/checks/debian/lintian-overrides/comments/absolutely-misspelled/build-spec/debian/lintian-overrides new file mode 100644 index 0000000..2bcfb95 --- /dev/null +++ b/t/recipes/checks/debian/lintian-overrides/comments/absolutely-misspelled/build-spec/debian/lintian-overrides @@ -0,0 +1,6 @@ +# This comment will not appear in the output, also the last +# tag should not have a comment due to the empty line between +# it and the one before it. + +# absolutly no context +cute-field diff --git a/t/recipes/checks/debian/lintian-overrides/comments/absolutely-misspelled/build-spec/fill-values b/t/recipes/checks/debian/lintian-overrides/comments/absolutely-misspelled/build-spec/fill-values new file mode 100644 index 0000000..2a6e91a --- /dev/null +++ b/t/recipes/checks/debian/lintian-overrides/comments/absolutely-misspelled/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: upload-native +Testname: absolutely-misspelled +Description: Absolutely misspelled in override comment diff --git a/t/recipes/checks/debian/lintian-overrides/comments/absolutely-misspelled/eval/desc b/t/recipes/checks/debian/lintian-overrides/comments/absolutely-misspelled/eval/desc new file mode 100644 index 0000000..5978f59 --- /dev/null +++ b/t/recipes/checks/debian/lintian-overrides/comments/absolutely-misspelled/eval/desc @@ -0,0 +1,2 @@ +Testname: absolutely-misspelled +Check: debian/lintian-overrides/comments diff --git a/t/recipes/checks/debian/lintian-overrides/comments/absolutely-misspelled/eval/hints b/t/recipes/checks/debian/lintian-overrides/comments/absolutely-misspelled/eval/hints new file mode 100644 index 0000000..4aa816e --- /dev/null +++ b/t/recipes/checks/debian/lintian-overrides/comments/absolutely-misspelled/eval/hints @@ -0,0 +1 @@ +absolutely-misspelled (binary): spelling-in-override-comment cute-field absolutly absolutely [usr/share/lintian/overrides/absolutely-misspelled:5] diff --git a/t/recipes/checks/debian/lintian-overrides/comments/lowercase-sql/build-spec/debian/lintian-overrides b/t/recipes/checks/debian/lintian-overrides/comments/lowercase-sql/build-spec/debian/lintian-overrides new file mode 100644 index 0000000..050ab92 --- /dev/null +++ b/t/recipes/checks/debian/lintian-overrides/comments/lowercase-sql/build-spec/debian/lintian-overrides @@ -0,0 +1,6 @@ +# This comment will not appear in the output, also the last +# tag should not have a comment due to the empty line between +# it and the one before it. + +# for postgresql +cute-field diff --git a/t/recipes/checks/debian/lintian-overrides/comments/lowercase-sql/build-spec/fill-values b/t/recipes/checks/debian/lintian-overrides/comments/lowercase-sql/build-spec/fill-values new file mode 100644 index 0000000..8aa25ef --- /dev/null +++ b/t/recipes/checks/debian/lintian-overrides/comments/lowercase-sql/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: upload-native +Testname: lowercase-sql +Description: PostgreSQL not properly capitalized in override comment diff --git a/t/recipes/checks/debian/lintian-overrides/comments/lowercase-sql/eval/desc b/t/recipes/checks/debian/lintian-overrides/comments/lowercase-sql/eval/desc new file mode 100644 index 0000000..3955372 --- /dev/null +++ b/t/recipes/checks/debian/lintian-overrides/comments/lowercase-sql/eval/desc @@ -0,0 +1,2 @@ +Testname: lowercase-sql +Check: debian/lintian-overrides/comments diff --git a/t/recipes/checks/debian/lintian-overrides/comments/lowercase-sql/eval/hints b/t/recipes/checks/debian/lintian-overrides/comments/lowercase-sql/eval/hints new file mode 100644 index 0000000..3ed46b3 --- /dev/null +++ b/t/recipes/checks/debian/lintian-overrides/comments/lowercase-sql/eval/hints @@ -0,0 +1 @@ +lowercase-sql (binary): capitalization-in-override-comment cute-field postgresql PostgreSQL [usr/share/lintian/overrides/lowercase-sql:5] diff --git a/t/recipes/checks/debian/lintian-overrides/duplicate/duplicate-context-cute-field/build-spec/debian/source/lintian-overrides b/t/recipes/checks/debian/lintian-overrides/duplicate/duplicate-context-cute-field/build-spec/debian/source/lintian-overrides new file mode 100644 index 0000000..c2811ff --- /dev/null +++ b/t/recipes/checks/debian/lintian-overrides/duplicate/duplicate-context-cute-field/build-spec/debian/source/lintian-overrides @@ -0,0 +1,2 @@ +cute-field duplicate-context-cute-field_1.0.dsc arch* +cute-field duplicate-context-cute-field_1.0.dsc arch* diff --git a/t/recipes/checks/debian/lintian-overrides/duplicate/duplicate-context-cute-field/build-spec/fill-values b/t/recipes/checks/debian/lintian-overrides/duplicate/duplicate-context-cute-field/build-spec/fill-values new file mode 100644 index 0000000..474697d --- /dev/null +++ b/t/recipes/checks/debian/lintian-overrides/duplicate/duplicate-context-cute-field/build-spec/fill-values @@ -0,0 +1,3 @@ +Testname: duplicate-context-cute-field +Skeleton: source-native +Description: Same context used in two overrides diff --git a/t/recipes/checks/debian/lintian-overrides/duplicate/duplicate-context-cute-field/build-spec/post-build b/t/recipes/checks/debian/lintian-overrides/duplicate/duplicate-context-cute-field/build-spec/post-build new file mode 100755 index 0000000..689ad67 --- /dev/null +++ b/t/recipes/checks/debian/lintian-overrides/duplicate/duplicate-context-cute-field/build-spec/post-build @@ -0,0 +1,7 @@ +#!/bin/sh + +set -e + +product="$1" + +perl -pi -e 's/^(Architecture:)/\L$1\E/' "$product" diff --git a/t/recipes/checks/debian/lintian-overrides/duplicate/duplicate-context-cute-field/eval/desc b/t/recipes/checks/debian/lintian-overrides/duplicate/duplicate-context-cute-field/eval/desc new file mode 100644 index 0000000..6e79c37 --- /dev/null +++ b/t/recipes/checks/debian/lintian-overrides/duplicate/duplicate-context-cute-field/eval/desc @@ -0,0 +1,2 @@ +Testname: duplicate-context-cute-field +Check: debian/lintian-overrides/duplicate diff --git a/t/recipes/checks/debian/lintian-overrides/duplicate/duplicate-context-cute-field/eval/hints b/t/recipes/checks/debian/lintian-overrides/duplicate/duplicate-context-cute-field/eval/hints new file mode 100644 index 0000000..ceb0be1 --- /dev/null +++ b/t/recipes/checks/debian/lintian-overrides/duplicate/duplicate-context-cute-field/eval/hints @@ -0,0 +1 @@ +duplicate-context-cute-field (source): duplicate-override-context cute-field (lines 1 2) [debian/source/lintian-overrides] diff --git a/t/recipes/checks/debian/lintian-overrides/files-override-misplaced/build-spec/fill-values b/t/recipes/checks/debian/lintian-overrides/files-override-misplaced/build-spec/fill-values new file mode 100644 index 0000000..7521c6c --- /dev/null +++ b/t/recipes/checks/debian/lintian-overrides/files-override-misplaced/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: upload-native +Testname: files-override-misplaced +Description: Check for misplaced override file detection diff --git a/t/recipes/checks/debian/lintian-overrides/files-override-misplaced/build-spec/orig/Makefile b/t/recipes/checks/debian/lintian-overrides/files-override-misplaced/build-spec/orig/Makefile new file mode 100644 index 0000000..a4c0682 --- /dev/null +++ b/t/recipes/checks/debian/lintian-overrides/files-override-misplaced/build-spec/orig/Makefile @@ -0,0 +1,18 @@ +ROOT = $(DESTDIR)/usr/share/doc/files-override-misplaced + +default: + : + +install: + mkdir -p $(DESTDIR)/usr/share/doc/files-override-misplaced + echo 'files-override-misplaced: some-override' \ + > $(DESTDIR)/usr/share/doc/files-override-misplaced/override.lintian + echo 'files-override-misplaced: some-override' \ + > $(DESTDIR)/usr/share/doc/files-override-misplaced/override.Lintian + gzip -n -9 $(DESTDIR)/usr/share/doc/files-override-misplaced/override.Lintian + mkdir -p $(DESTDIR)/usr/share/lintian/overrides/files-override-misplaced + touch $(DESTDIR)/usr/share/lintian/overrides/files-override-misplaced/some-override + mkdir -p $(DESTDIR)/usr/share/lintian/overrides/wrong-package + touch $(DESTDIR)/usr/share/lintian/overrides/wrong-package/some-override + +.PHONY: clean distclean realclean install check test diff --git a/t/recipes/checks/debian/lintian-overrides/files-override-misplaced/eval/desc b/t/recipes/checks/debian/lintian-overrides/files-override-misplaced/eval/desc new file mode 100644 index 0000000..2954af8 --- /dev/null +++ b/t/recipes/checks/debian/lintian-overrides/files-override-misplaced/eval/desc @@ -0,0 +1,2 @@ +Testname: files-override-misplaced +Check: debian/lintian-overrides diff --git a/t/recipes/checks/debian/lintian-overrides/files-override-misplaced/eval/hints b/t/recipes/checks/debian/lintian-overrides/files-override-misplaced/eval/hints new file mode 100644 index 0000000..788993e --- /dev/null +++ b/t/recipes/checks/debian/lintian-overrides/files-override-misplaced/eval/hints @@ -0,0 +1,4 @@ +files-override-misplaced (binary): override-file-in-wrong-package wrong-package [usr/share/lintian/overrides/wrong-package/some-override] +files-override-misplaced (binary): override-file-in-wrong-location [usr/share/lintian/overrides/files-override-misplaced/some-override] +files-override-misplaced (binary): override-file-in-wrong-location [usr/share/doc/files-override-misplaced/override.lintian] +files-override-misplaced (binary): override-file-in-wrong-location [usr/share/doc/files-override-misplaced/override.Lintian.gz] diff --git a/t/recipes/checks/debian/lintian-overrides/malformed/missing-colon/build-spec/debian/source/lintian-overrides b/t/recipes/checks/debian/lintian-overrides/malformed/missing-colon/build-spec/debian/source/lintian-overrides new file mode 100644 index 0000000..19eebe6 --- /dev/null +++ b/t/recipes/checks/debian/lintian-overrides/malformed/missing-colon/build-spec/debian/source/lintian-overrides @@ -0,0 +1 @@ +missing-colon (source) cute-field duplicate-context-cute-field_1.0.dsc arch* diff --git a/t/recipes/checks/debian/lintian-overrides/malformed/missing-colon/build-spec/fill-values b/t/recipes/checks/debian/lintian-overrides/malformed/missing-colon/build-spec/fill-values new file mode 100644 index 0000000..425ec11 --- /dev/null +++ b/t/recipes/checks/debian/lintian-overrides/malformed/missing-colon/build-spec/fill-values @@ -0,0 +1,3 @@ +Testname: missing-colon +Skeleton: source-native +Description: Missing colon in a source override diff --git a/t/recipes/checks/debian/lintian-overrides/malformed/missing-colon/eval/desc b/t/recipes/checks/debian/lintian-overrides/malformed/missing-colon/eval/desc new file mode 100644 index 0000000..2a5f4dc --- /dev/null +++ b/t/recipes/checks/debian/lintian-overrides/malformed/missing-colon/eval/desc @@ -0,0 +1,2 @@ +Testname: missing-colon +Check: debian/lintian-overrides/malformed diff --git a/t/recipes/checks/debian/lintian-overrides/malformed/missing-colon/eval/hints b/t/recipes/checks/debian/lintian-overrides/malformed/missing-colon/eval/hints new file mode 100644 index 0000000..81bace9 --- /dev/null +++ b/t/recipes/checks/debian/lintian-overrides/malformed/missing-colon/eval/hints @@ -0,0 +1 @@ +missing-colon (source): malformed-override Expected a colon [debian/source/lintian-overrides:1] diff --git a/t/recipes/checks/debian/lintian-overrides/mystery/fields-multi-arch-same-package-has-arch-specific-overrides/build-spec/debian/control.in b/t/recipes/checks/debian/lintian-overrides/mystery/fields-multi-arch-same-package-has-arch-specific-overrides/build-spec/debian/control.in new file mode 100644 index 0000000..88afb0f --- /dev/null +++ b/t/recipes/checks/debian/lintian-overrides/mystery/fields-multi-arch-same-package-has-arch-specific-overrides/build-spec/debian/control.in @@ -0,0 +1,28 @@ +Source: [% $source %] +Priority: optional +Section: [% $section %] +Maintainer: [% $author %] +Standards-Version: [% $standards_version %] +Build-Depends: [% $build_depends %] +Rules-Requires-Root: no + +Package: [% $source %] +Architecture: [% $package_architecture %] +Multi-Arch: same +Depends: ${misc:Depends} +Description: [% $description %] + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. + +Package: [% $source %]-nonrel +Architecture: [% $package_architecture %] +Depends: ${misc:Depends} +Description: [% $description %] (false positive) + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. + . + This is a false-positive. diff --git a/t/recipes/checks/debian/lintian-overrides/mystery/fields-multi-arch-same-package-has-arch-specific-overrides/build-spec/debian/fields-multi-arch-same-package-has-arch-specific-overrides-nonrel.lintian-overrides.amd64 b/t/recipes/checks/debian/lintian-overrides/mystery/fields-multi-arch-same-package-has-arch-specific-overrides/build-spec/debian/fields-multi-arch-same-package-has-arch-specific-overrides-nonrel.lintian-overrides.amd64 new file mode 100644 index 0000000..257cc56 --- /dev/null +++ b/t/recipes/checks/debian/lintian-overrides/mystery/fields-multi-arch-same-package-has-arch-specific-overrides/build-spec/debian/fields-multi-arch-same-package-has-arch-specific-overrides-nonrel.lintian-overrides.amd64 @@ -0,0 +1 @@ +foo diff --git a/t/recipes/checks/debian/lintian-overrides/mystery/fields-multi-arch-same-package-has-arch-specific-overrides/build-spec/debian/fields-multi-arch-same-package-has-arch-specific-overrides.lintian-overrides.amd64 b/t/recipes/checks/debian/lintian-overrides/mystery/fields-multi-arch-same-package-has-arch-specific-overrides/build-spec/debian/fields-multi-arch-same-package-has-arch-specific-overrides.lintian-overrides.amd64 new file mode 100644 index 0000000..257cc56 --- /dev/null +++ b/t/recipes/checks/debian/lintian-overrides/mystery/fields-multi-arch-same-package-has-arch-specific-overrides/build-spec/debian/fields-multi-arch-same-package-has-arch-specific-overrides.lintian-overrides.amd64 @@ -0,0 +1 @@ +foo diff --git a/t/recipes/checks/debian/lintian-overrides/mystery/fields-multi-arch-same-package-has-arch-specific-overrides/build-spec/fill-values b/t/recipes/checks/debian/lintian-overrides/mystery/fields-multi-arch-same-package-has-arch-specific-overrides/build-spec/fill-values new file mode 100644 index 0000000..085fb2f --- /dev/null +++ b/t/recipes/checks/debian/lintian-overrides/mystery/fields-multi-arch-same-package-has-arch-specific-overrides/build-spec/fill-values @@ -0,0 +1,4 @@ +Skeleton: upload-native +Testname: fields-multi-arch-same-package-has-arch-specific-overrides +Description: Test for Multi-Arch: same package with arch-specific overrides +Package-Architecture: any diff --git a/t/recipes/checks/debian/lintian-overrides/mystery/fields-multi-arch-same-package-has-arch-specific-overrides/eval/desc b/t/recipes/checks/debian/lintian-overrides/mystery/fields-multi-arch-same-package-has-arch-specific-overrides/eval/desc new file mode 100644 index 0000000..dce7d2b --- /dev/null +++ b/t/recipes/checks/debian/lintian-overrides/mystery/fields-multi-arch-same-package-has-arch-specific-overrides/eval/desc @@ -0,0 +1,3 @@ +Testname: fields-multi-arch-same-package-has-arch-specific-overrides +Test-Architectures: amd64 +Check: debian/lintian-overrides/mystery diff --git a/t/recipes/checks/debian/lintian-overrides/mystery/fields-multi-arch-same-package-has-arch-specific-overrides/eval/hints b/t/recipes/checks/debian/lintian-overrides/mystery/fields-multi-arch-same-package-has-arch-specific-overrides/eval/hints new file mode 100644 index 0000000..a731e06 --- /dev/null +++ b/t/recipes/checks/debian/lintian-overrides/mystery/fields-multi-arch-same-package-has-arch-specific-overrides/eval/hints @@ -0,0 +1,2 @@ +fields-multi-arch-same-package-has-arch-specific-overrides-nonrel (binary): alien-tag foo [usr/share/lintian/overrides/fields-multi-arch-same-package-has-arch-specific-overrides-nonrel:1] +fields-multi-arch-same-package-has-arch-specific-overrides (binary): alien-tag foo [usr/share/lintian/overrides/fields-multi-arch-same-package-has-arch-specific-overrides:1] diff --git a/t/recipes/checks/debian/lintian-overrides/mystery/lintian-overrides/build-spec/debian/overrides b/t/recipes/checks/debian/lintian-overrides/mystery/lintian-overrides/build-spec/debian/overrides new file mode 100644 index 0000000..fcf6f7b --- /dev/null +++ b/t/recipes/checks/debian/lintian-overrides/mystery/lintian-overrides/build-spec/debian/overrides @@ -0,0 +1,2 @@ +lintian-override: +lintian-overrides: copyright-contains-dh_make-todo-boilerplate foo-bar-extra diff --git a/t/recipes/checks/debian/lintian-overrides/mystery/lintian-overrides/build-spec/debian/rules b/t/recipes/checks/debian/lintian-overrides/mystery/lintian-overrides/build-spec/debian/rules new file mode 100755 index 0000000..8685ec8 --- /dev/null +++ b/t/recipes/checks/debian/lintian-overrides/mystery/lintian-overrides/build-spec/debian/rules @@ -0,0 +1,12 @@ +#!/usr/bin/make -f + +pkg=lintian-overrides + +%: + dh $@ + +override_dh_fixperms: + install -D -m 0644 $(CURDIR)/debian/overrides \ + $(CURDIR)/debian/$(pkg)/usr/share/lintian/overrides/$(pkg) + dh_fixperms + diff --git a/t/recipes/checks/debian/lintian-overrides/mystery/lintian-overrides/build-spec/fill-values b/t/recipes/checks/debian/lintian-overrides/mystery/lintian-overrides/build-spec/fill-values new file mode 100644 index 0000000..b52ea67 --- /dev/null +++ b/t/recipes/checks/debian/lintian-overrides/mystery/lintian-overrides/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: upload-native +Testname: lintian-overrides +Description: Test the couple of overrides-related tags diff --git a/t/recipes/checks/debian/lintian-overrides/mystery/lintian-overrides/eval/desc b/t/recipes/checks/debian/lintian-overrides/mystery/lintian-overrides/eval/desc new file mode 100644 index 0000000..e99d9d4 --- /dev/null +++ b/t/recipes/checks/debian/lintian-overrides/mystery/lintian-overrides/eval/desc @@ -0,0 +1,2 @@ +Testname: lintian-overrides +Check: debian/lintian-overrides/mystery diff --git a/t/recipes/checks/debian/lintian-overrides/mystery/lintian-overrides/eval/hints b/t/recipes/checks/debian/lintian-overrides/mystery/lintian-overrides/eval/hints new file mode 100644 index 0000000..0b32d54 --- /dev/null +++ b/t/recipes/checks/debian/lintian-overrides/mystery/lintian-overrides/eval/hints @@ -0,0 +1 @@ +lintian-overrides (binary): alien-tag lintian-override: [usr/share/lintian/overrides/lintian-overrides:1] diff --git a/t/recipes/checks/debian/lintian-overrides/mystery/mixed-overrides/build-spec/debian/install b/t/recipes/checks/debian/lintian-overrides/mystery/mixed-overrides/build-spec/debian/install new file mode 100644 index 0000000..747a313 --- /dev/null +++ b/t/recipes/checks/debian/lintian-overrides/mystery/mixed-overrides/build-spec/debian/install @@ -0,0 +1 @@ +foo.1 /etc/apt/sources.list.d \ No newline at end of file diff --git a/t/recipes/checks/debian/lintian-overrides/mystery/mixed-overrides/build-spec/debian/lintian-overrides b/t/recipes/checks/debian/lintian-overrides/mystery/mixed-overrides/build-spec/debian/lintian-overrides new file mode 100644 index 0000000..04ae11b --- /dev/null +++ b/t/recipes/checks/debian/lintian-overrides/mystery/mixed-overrides/build-spec/debian/lintian-overrides @@ -0,0 +1,20 @@ +# This comment will not appear in the output, also the last +# tag should not have a comment due to the empty line between +# it and the one before it. + +# override without extra information +manpage-has-bad-whatis-entry +# Architecture specific override +[i386]: FSSTND-dir-in-manual-page usr/share/man/man1/foo.1.gz:6 /usr/etc/ +[!i386]: FSSTND-dir-in-manual-page usr/share/man/man1/foo.1.gz:6 /usr/etc/ +# exact extra information +FSSTND-dir-in-manual-page usr/share/man/man1/foo.1.gz:4 /usr/dict/ +# These are wildcard overrides +FSSTND-dir-in-manual-page usr/share/man/man1/foo.1.gz:2* +FSSTND-dir-in-manual-page */foo.1.gz:5 /usr/doc/ +FSSTND-dir-in-manual-page */foo.1.gz:3* + +# renamed tag +package-install-apt-sources * + +#FSSTND-dir-in-manual-page usr/share/man/man1/foo.1.gz * more occurrences not shown diff --git a/t/recipes/checks/debian/lintian-overrides/mystery/mixed-overrides/build-spec/debian/manpages b/t/recipes/checks/debian/lintian-overrides/mystery/mixed-overrides/build-spec/debian/manpages new file mode 100644 index 0000000..efb5c57 --- /dev/null +++ b/t/recipes/checks/debian/lintian-overrides/mystery/mixed-overrides/build-spec/debian/manpages @@ -0,0 +1 @@ +foo.1 diff --git a/t/recipes/checks/debian/lintian-overrides/mystery/mixed-overrides/build-spec/fill-values b/t/recipes/checks/debian/lintian-overrides/mystery/mixed-overrides/build-spec/fill-values new file mode 100644 index 0000000..0facd1c --- /dev/null +++ b/t/recipes/checks/debian/lintian-overrides/mystery/mixed-overrides/build-spec/fill-values @@ -0,0 +1,4 @@ +Skeleton: upload-native +Testname: mixed-overrides +Package-Architecture: any +Description: Test override handling diff --git a/t/recipes/checks/debian/lintian-overrides/mystery/mixed-overrides/build-spec/orig/foo.1 b/t/recipes/checks/debian/lintian-overrides/mystery/mixed-overrides/build-spec/orig/foo.1 new file mode 100644 index 0000000..233a578 --- /dev/null +++ b/t/recipes/checks/debian/lintian-overrides/mystery/mixed-overrides/build-spec/orig/foo.1 @@ -0,0 +1,32 @@ +.TH FOO 1 "Sep 13, 2008" "Debian GNU/Linux" + +.SH DESCRIPTION +/usr/dict/ +/usr/doc/ +/usr/etc/ + + + + + +/usr/info/ +/usr/man/ +/usr/adm/ + + + + + + +/var/adm/ +/var/catman/ +/var/named/ + + + + + + +/var/nis/ +/var/preserve/ +/usr/preserve/ diff --git a/t/recipes/checks/debian/lintian-overrides/mystery/mixed-overrides/eval/desc b/t/recipes/checks/debian/lintian-overrides/mystery/mixed-overrides/eval/desc new file mode 100644 index 0000000..618dacd --- /dev/null +++ b/t/recipes/checks/debian/lintian-overrides/mystery/mixed-overrides/eval/desc @@ -0,0 +1,4 @@ +Testname: mixed-overrides +Check: debian/lintian-overrides/mystery +Test-Against: + alien-tag diff --git a/t/recipes/checks/debian/lintian-overrides/mystery/mixed-overrides/eval/hints b/t/recipes/checks/debian/lintian-overrides/mystery/mixed-overrides/eval/hints new file mode 100644 index 0000000..1a22602 --- /dev/null +++ b/t/recipes/checks/debian/lintian-overrides/mystery/mixed-overrides/eval/hints @@ -0,0 +1,2 @@ +mixed-overrides (binary): renamed-tag package-install-apt-sources => package-installs-apt-sources [usr/share/lintian/overrides/mixed-overrides:18] +mixed-overrides (binary): renamed-tag manpage-has-bad-whatis-entry => bad-whatis-entry [usr/share/lintian/overrides/mixed-overrides:6] diff --git a/t/recipes/checks/debian/lintian-overrides/mystery/overrides-shown/build-spec/debian/install b/t/recipes/checks/debian/lintian-overrides/mystery/overrides-shown/build-spec/debian/install new file mode 100644 index 0000000..747a313 --- /dev/null +++ b/t/recipes/checks/debian/lintian-overrides/mystery/overrides-shown/build-spec/debian/install @@ -0,0 +1 @@ +foo.1 /etc/apt/sources.list.d \ No newline at end of file diff --git a/t/recipes/checks/debian/lintian-overrides/mystery/overrides-shown/build-spec/debian/manpages b/t/recipes/checks/debian/lintian-overrides/mystery/overrides-shown/build-spec/debian/manpages new file mode 100644 index 0000000..efb5c57 --- /dev/null +++ b/t/recipes/checks/debian/lintian-overrides/mystery/overrides-shown/build-spec/debian/manpages @@ -0,0 +1 @@ +foo.1 diff --git a/t/recipes/checks/debian/lintian-overrides/mystery/overrides-shown/build-spec/debian/overrides-shown.lintian-overrides b/t/recipes/checks/debian/lintian-overrides/mystery/overrides-shown/build-spec/debian/overrides-shown.lintian-overrides new file mode 100644 index 0000000..bda39f8 --- /dev/null +++ b/t/recipes/checks/debian/lintian-overrides/mystery/overrides-shown/build-spec/debian/overrides-shown.lintian-overrides @@ -0,0 +1,21 @@ +# This comment will not appear in the output, also the last +# tag should not have a comment due to the empty line between +# it and the one before it. + +# override without extra information +manpage-has-bad-whatis-entry +# Architecture specific override +[i386]: FSSTND-dir-in-manual-page usr/share/man/man1/foo.1.gz:6 /usr/etc/ +[!i386]: FSSTND-dir-in-manual-page usr/share/man/man1/foo.1.gz:6 /usr/etc/ +# exact extra information +FSSTND-dir-in-manual-page usr/share/man/man1/foo.1.gz:4 /usr/dict/ +# These are wildcard overrides +FSSTND-dir-in-manual-page usr/share/man/man1/foo.1.gz:2* +FSSTND-dir-in-manual-page */foo.1.gz:5 /usr/doc/ +# Comments in UTF-8: ✓ (☃) +FSSTND-dir-in-manual-page */foo.1.gz:3* + +# renamed tag +package-install-apt-sources * + +#FSSTND-dir-in-manual-page usr/share/man/man1/foo.1.gz * more occurrences not shown diff --git a/t/recipes/checks/debian/lintian-overrides/mystery/overrides-shown/build-spec/fill-values b/t/recipes/checks/debian/lintian-overrides/mystery/overrides-shown/build-spec/fill-values new file mode 100644 index 0000000..ce9e283 --- /dev/null +++ b/t/recipes/checks/debian/lintian-overrides/mystery/overrides-shown/build-spec/fill-values @@ -0,0 +1,4 @@ +Skeleton: upload-native +Testname: overrides-shown +Package-Architecture: any +Description: Test override handling diff --git a/t/recipes/checks/debian/lintian-overrides/mystery/overrides-shown/build-spec/orig/foo.1 b/t/recipes/checks/debian/lintian-overrides/mystery/overrides-shown/build-spec/orig/foo.1 new file mode 100644 index 0000000..233a578 --- /dev/null +++ b/t/recipes/checks/debian/lintian-overrides/mystery/overrides-shown/build-spec/orig/foo.1 @@ -0,0 +1,32 @@ +.TH FOO 1 "Sep 13, 2008" "Debian GNU/Linux" + +.SH DESCRIPTION +/usr/dict/ +/usr/doc/ +/usr/etc/ + + + + + +/usr/info/ +/usr/man/ +/usr/adm/ + + + + + + +/var/adm/ +/var/catman/ +/var/named/ + + + + + + +/var/nis/ +/var/preserve/ +/usr/preserve/ diff --git a/t/recipes/checks/debian/lintian-overrides/mystery/overrides-shown/eval/desc b/t/recipes/checks/debian/lintian-overrides/mystery/overrides-shown/eval/desc new file mode 100644 index 0000000..3c82de2 --- /dev/null +++ b/t/recipes/checks/debian/lintian-overrides/mystery/overrides-shown/eval/desc @@ -0,0 +1,5 @@ +Testname: overrides-shown +Options: --show-overrides +Check: debian/lintian-overrides/mystery +Test-Against: + alien-tag diff --git a/t/recipes/checks/debian/lintian-overrides/mystery/overrides-shown/eval/hints b/t/recipes/checks/debian/lintian-overrides/mystery/overrides-shown/eval/hints new file mode 100644 index 0000000..d81abaf --- /dev/null +++ b/t/recipes/checks/debian/lintian-overrides/mystery/overrides-shown/eval/hints @@ -0,0 +1,2 @@ +overrides-shown (binary): renamed-tag package-install-apt-sources => package-installs-apt-sources [usr/share/lintian/overrides/overrides-shown:19] +overrides-shown (binary): renamed-tag manpage-has-bad-whatis-entry => bad-whatis-entry [usr/share/lintian/overrides/overrides-shown:6] diff --git a/t/recipes/checks/debian/lintian-overrides/restricted/amd64-on-arch-all/build-spec/debian/lintian-overrides b/t/recipes/checks/debian/lintian-overrides/restricted/amd64-on-arch-all/build-spec/debian/lintian-overrides new file mode 100644 index 0000000..deea577 --- /dev/null +++ b/t/recipes/checks/debian/lintian-overrides/restricted/amd64-on-arch-all/build-spec/debian/lintian-overrides @@ -0,0 +1 @@ +[amd64]: cute-field diff --git a/t/recipes/checks/debian/lintian-overrides/restricted/amd64-on-arch-all/build-spec/fill-values b/t/recipes/checks/debian/lintian-overrides/restricted/amd64-on-arch-all/build-spec/fill-values new file mode 100644 index 0000000..886cd60 --- /dev/null +++ b/t/recipes/checks/debian/lintian-overrides/restricted/amd64-on-arch-all/build-spec/fill-values @@ -0,0 +1,3 @@ +Testname: amd64-on-arch-all +Skeleton: upload-native +Description: Override with amd64 architecture restriction on an Arch: all installable. diff --git a/t/recipes/checks/debian/lintian-overrides/restricted/amd64-on-arch-all/eval/desc b/t/recipes/checks/debian/lintian-overrides/restricted/amd64-on-arch-all/eval/desc new file mode 100644 index 0000000..a34c828 --- /dev/null +++ b/t/recipes/checks/debian/lintian-overrides/restricted/amd64-on-arch-all/eval/desc @@ -0,0 +1,2 @@ +Testname: amd64-on-arch-all +Check: debian/lintian-overrides/restricted diff --git a/t/recipes/checks/debian/lintian-overrides/restricted/amd64-on-arch-all/eval/hints b/t/recipes/checks/debian/lintian-overrides/restricted/amd64-on-arch-all/eval/hints new file mode 100644 index 0000000..d74e878 --- /dev/null +++ b/t/recipes/checks/debian/lintian-overrides/restricted/amd64-on-arch-all/eval/hints @@ -0,0 +1 @@ +amd64-on-arch-all (binary): invalid-override-restriction Architecture list in Arch:all installable [usr/share/lintian/overrides/amd64-on-arch-all:1] diff --git a/t/recipes/checks/debian/lintian-overrides/restricted/arch-bingo/build-spec/debian/lintian-overrides b/t/recipes/checks/debian/lintian-overrides/restricted/arch-bingo/build-spec/debian/lintian-overrides new file mode 100644 index 0000000..bb1c669 --- /dev/null +++ b/t/recipes/checks/debian/lintian-overrides/restricted/arch-bingo/build-spec/debian/lintian-overrides @@ -0,0 +1 @@ +[bingo]: cute-field diff --git a/t/recipes/checks/debian/lintian-overrides/restricted/arch-bingo/build-spec/fill-values b/t/recipes/checks/debian/lintian-overrides/restricted/arch-bingo/build-spec/fill-values new file mode 100644 index 0000000..b30cb70 --- /dev/null +++ b/t/recipes/checks/debian/lintian-overrides/restricted/arch-bingo/build-spec/fill-values @@ -0,0 +1,4 @@ +Testname: arch-bingo +Skeleton: upload-native +Description: Override with 'bingo' architecture restriction on an Arch: any installable +Package-Architecture: any diff --git a/t/recipes/checks/debian/lintian-overrides/restricted/arch-bingo/eval/desc b/t/recipes/checks/debian/lintian-overrides/restricted/arch-bingo/eval/desc new file mode 100644 index 0000000..8dfe2b2 --- /dev/null +++ b/t/recipes/checks/debian/lintian-overrides/restricted/arch-bingo/eval/desc @@ -0,0 +1,2 @@ +Testname: arch-bingo +Check: debian/lintian-overrides/restricted diff --git a/t/recipes/checks/debian/lintian-overrides/restricted/arch-bingo/eval/hints b/t/recipes/checks/debian/lintian-overrides/restricted/arch-bingo/eval/hints new file mode 100644 index 0000000..667ea2f --- /dev/null +++ b/t/recipes/checks/debian/lintian-overrides/restricted/arch-bingo/eval/hints @@ -0,0 +1 @@ +arch-bingo (binary): invalid-override-restriction Unknown architecture wildcard bingo [usr/share/lintian/overrides/arch-bingo:1] diff --git a/t/recipes/checks/debian/lintian-overrides/restricted/fields-multi-arch-same-package-has-arch-specific-overrides/build-spec/debian/control.in b/t/recipes/checks/debian/lintian-overrides/restricted/fields-multi-arch-same-package-has-arch-specific-overrides/build-spec/debian/control.in new file mode 100644 index 0000000..88afb0f --- /dev/null +++ b/t/recipes/checks/debian/lintian-overrides/restricted/fields-multi-arch-same-package-has-arch-specific-overrides/build-spec/debian/control.in @@ -0,0 +1,28 @@ +Source: [% $source %] +Priority: optional +Section: [% $section %] +Maintainer: [% $author %] +Standards-Version: [% $standards_version %] +Build-Depends: [% $build_depends %] +Rules-Requires-Root: no + +Package: [% $source %] +Architecture: [% $package_architecture %] +Multi-Arch: same +Depends: ${misc:Depends} +Description: [% $description %] + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. + +Package: [% $source %]-nonrel +Architecture: [% $package_architecture %] +Depends: ${misc:Depends} +Description: [% $description %] (false positive) + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. + . + This is a false-positive. diff --git a/t/recipes/checks/debian/lintian-overrides/restricted/fields-multi-arch-same-package-has-arch-specific-overrides/build-spec/debian/fields-multi-arch-same-package-has-arch-specific-overrides-nonrel.lintian-overrides.amd64 b/t/recipes/checks/debian/lintian-overrides/restricted/fields-multi-arch-same-package-has-arch-specific-overrides/build-spec/debian/fields-multi-arch-same-package-has-arch-specific-overrides-nonrel.lintian-overrides.amd64 new file mode 100644 index 0000000..257cc56 --- /dev/null +++ b/t/recipes/checks/debian/lintian-overrides/restricted/fields-multi-arch-same-package-has-arch-specific-overrides/build-spec/debian/fields-multi-arch-same-package-has-arch-specific-overrides-nonrel.lintian-overrides.amd64 @@ -0,0 +1 @@ +foo diff --git a/t/recipes/checks/debian/lintian-overrides/restricted/fields-multi-arch-same-package-has-arch-specific-overrides/build-spec/debian/fields-multi-arch-same-package-has-arch-specific-overrides.lintian-overrides.amd64 b/t/recipes/checks/debian/lintian-overrides/restricted/fields-multi-arch-same-package-has-arch-specific-overrides/build-spec/debian/fields-multi-arch-same-package-has-arch-specific-overrides.lintian-overrides.amd64 new file mode 100644 index 0000000..257cc56 --- /dev/null +++ b/t/recipes/checks/debian/lintian-overrides/restricted/fields-multi-arch-same-package-has-arch-specific-overrides/build-spec/debian/fields-multi-arch-same-package-has-arch-specific-overrides.lintian-overrides.amd64 @@ -0,0 +1 @@ +foo diff --git a/t/recipes/checks/debian/lintian-overrides/restricted/fields-multi-arch-same-package-has-arch-specific-overrides/build-spec/fill-values b/t/recipes/checks/debian/lintian-overrides/restricted/fields-multi-arch-same-package-has-arch-specific-overrides/build-spec/fill-values new file mode 100644 index 0000000..085fb2f --- /dev/null +++ b/t/recipes/checks/debian/lintian-overrides/restricted/fields-multi-arch-same-package-has-arch-specific-overrides/build-spec/fill-values @@ -0,0 +1,4 @@ +Skeleton: upload-native +Testname: fields-multi-arch-same-package-has-arch-specific-overrides +Description: Test for Multi-Arch: same package with arch-specific overrides +Package-Architecture: any diff --git a/t/recipes/checks/debian/lintian-overrides/restricted/fields-multi-arch-same-package-has-arch-specific-overrides/eval/desc b/t/recipes/checks/debian/lintian-overrides/restricted/fields-multi-arch-same-package-has-arch-specific-overrides/eval/desc new file mode 100644 index 0000000..7aa72a6 --- /dev/null +++ b/t/recipes/checks/debian/lintian-overrides/restricted/fields-multi-arch-same-package-has-arch-specific-overrides/eval/desc @@ -0,0 +1,5 @@ +Testname: fields-multi-arch-same-package-has-arch-specific-overrides +Test-Architectures: amd64 +Check: debian/lintian-overrides/restricted +Test-Against: + invalid-override-restriction diff --git a/t/recipes/checks/debian/lintian-overrides/restricted/fields-multi-arch-same-package-has-arch-specific-overrides/eval/hints b/t/recipes/checks/debian/lintian-overrides/restricted/fields-multi-arch-same-package-has-arch-specific-overrides/eval/hints new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/t/recipes/checks/debian/lintian-overrides/restricted/fields-multi-arch-same-package-has-arch-specific-overrides/eval/hints @@ -0,0 +1 @@ + diff --git a/t/recipes/checks/debian/maintscript/maintscript-includes-maint-script-parameters/build-spec/debian/maintscript b/t/recipes/checks/debian/maintscript/maintscript-includes-maint-script-parameters/build-spec/debian/maintscript new file mode 100644 index 0000000..6a583d7 --- /dev/null +++ b/t/recipes/checks/debian/maintscript/maintscript-includes-maint-script-parameters/build-spec/debian/maintscript @@ -0,0 +1,4 @@ +rm_conffile /etc/correct.conf 0.2~ foo +rm_conffile /etc/incorrect.conf 0.2~ foo -- "$@" +rm_conffile /etc/incorrect.conf 0.2~ foo -- "${@}" +rm_conffile /etc/incorrect.conf 0.2~ foo -- "$@" diff --git a/t/recipes/checks/debian/maintscript/maintscript-includes-maint-script-parameters/build-spec/fill-values b/t/recipes/checks/debian/maintscript/maintscript-includes-maint-script-parameters/build-spec/fill-values new file mode 100644 index 0000000..c750dfe --- /dev/null +++ b/t/recipes/checks/debian/maintscript/maintscript-includes-maint-script-parameters/build-spec/fill-values @@ -0,0 +1,4 @@ +Skeleton: upload-native +Testname: maintscript-includes-maint-script-parameters +Dh-Compat-Level: 11 +Description: Check dh_installdeb .maintscript files diff --git a/t/recipes/checks/debian/maintscript/maintscript-includes-maint-script-parameters/eval/desc b/t/recipes/checks/debian/maintscript/maintscript-includes-maint-script-parameters/eval/desc new file mode 100644 index 0000000..453fab1 --- /dev/null +++ b/t/recipes/checks/debian/maintscript/maintscript-includes-maint-script-parameters/eval/desc @@ -0,0 +1,2 @@ +Testname: maintscript-includes-maint-script-parameters +Check: debian/maintscript diff --git a/t/recipes/checks/debian/maintscript/maintscript-includes-maint-script-parameters/eval/hints b/t/recipes/checks/debian/maintscript/maintscript-includes-maint-script-parameters/eval/hints new file mode 100644 index 0000000..6fcf5bf --- /dev/null +++ b/t/recipes/checks/debian/maintscript/maintscript-includes-maint-script-parameters/eval/hints @@ -0,0 +1,3 @@ +maintscript-includes-maint-script-parameters (source): maintscript-includes-maint-script-parameters [debian/maintscript:4] +maintscript-includes-maint-script-parameters (source): maintscript-includes-maint-script-parameters [debian/maintscript:3] +maintscript-includes-maint-script-parameters (source): maintscript-includes-maint-script-parameters [debian/maintscript:2] diff --git a/t/recipes/checks/debian/manual-pages/maintainer-provided-executable/build-spec/debian/bin/not-suitable-for-upstream b/t/recipes/checks/debian/manual-pages/maintainer-provided-executable/build-spec/debian/bin/not-suitable-for-upstream new file mode 100755 index 0000000..e47f731 --- /dev/null +++ b/t/recipes/checks/debian/manual-pages/maintainer-provided-executable/build-spec/debian/bin/not-suitable-for-upstream @@ -0,0 +1,3 @@ +#!/bin/sh + +# USER-FACING EXECUTABLE NOT SUITABLE FOR INCLUSION UPSTREAM diff --git a/t/recipes/checks/debian/manual-pages/maintainer-provided-executable/build-spec/debian/not-suitable-for-upstream.1 b/t/recipes/checks/debian/manual-pages/maintainer-provided-executable/build-spec/debian/not-suitable-for-upstream.1 new file mode 100644 index 0000000..1c0946b --- /dev/null +++ b/t/recipes/checks/debian/manual-pages/maintainer-provided-executable/build-spec/debian/not-suitable-for-upstream.1 @@ -0,0 +1 @@ +A MANPAGE diff --git a/t/recipes/checks/debian/manual-pages/maintainer-provided-executable/build-spec/fill-values b/t/recipes/checks/debian/manual-pages/maintainer-provided-executable/build-spec/fill-values new file mode 100644 index 0000000..763e8dd --- /dev/null +++ b/t/recipes/checks/debian/manual-pages/maintainer-provided-executable/build-spec/fill-values @@ -0,0 +1,3 @@ +Testname: maintainer-provided-executable +Skeleton: source-non-native +Description: Maintainer manual page with executable also so provided (false positive) diff --git a/t/recipes/checks/debian/manual-pages/maintainer-provided-executable/eval/desc b/t/recipes/checks/debian/manual-pages/maintainer-provided-executable/eval/desc new file mode 100644 index 0000000..82cc179 --- /dev/null +++ b/t/recipes/checks/debian/manual-pages/maintainer-provided-executable/eval/desc @@ -0,0 +1,9 @@ +Testname: maintainer-provided-executable +Check: debian/manual-pages +Test-Against: + maintainer-manual-page +See-Also: + social contract item 2, + developer-reference 3.1.4, + policy 4.3, + Bug#755161 diff --git a/t/recipes/checks/debian/manual-pages/maintainer-provided-executable/eval/hints b/t/recipes/checks/debian/manual-pages/maintainer-provided-executable/eval/hints new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/t/recipes/checks/debian/manual-pages/maintainer-provided-executable/eval/hints @@ -0,0 +1 @@ + diff --git a/t/recipes/checks/debian/manual-pages/manpage-in-1/build-spec/debian/not-forwarded.1 b/t/recipes/checks/debian/manual-pages/manpage-in-1/build-spec/debian/not-forwarded.1 new file mode 100644 index 0000000..1c0946b --- /dev/null +++ b/t/recipes/checks/debian/manual-pages/manpage-in-1/build-spec/debian/not-forwarded.1 @@ -0,0 +1 @@ +A MANPAGE diff --git a/t/recipes/checks/debian/manual-pages/manpage-in-1/build-spec/fill-values b/t/recipes/checks/debian/manual-pages/manpage-in-1/build-spec/fill-values new file mode 100644 index 0000000..e9cf9d4 --- /dev/null +++ b/t/recipes/checks/debian/manual-pages/manpage-in-1/build-spec/fill-values @@ -0,0 +1,3 @@ +Testname: manpage-in-1 +Skeleton: source-non-native +Description: Maintainer keeps a manpage from section 1 in ./debian diff --git a/t/recipes/checks/debian/manual-pages/manpage-in-1/eval/desc b/t/recipes/checks/debian/manual-pages/manpage-in-1/eval/desc new file mode 100644 index 0000000..bcce654 --- /dev/null +++ b/t/recipes/checks/debian/manual-pages/manpage-in-1/eval/desc @@ -0,0 +1,3 @@ +Testname: manpage-in-1 +Check: debian/manual-pages +See-Also: social contract item 2, developer-reference 3.1.4, policy 4.3, Bug#755161 diff --git a/t/recipes/checks/debian/manual-pages/manpage-in-1/eval/hints b/t/recipes/checks/debian/manual-pages/manpage-in-1/eval/hints new file mode 100644 index 0000000..818b90c --- /dev/null +++ b/t/recipes/checks/debian/manual-pages/manpage-in-1/eval/hints @@ -0,0 +1 @@ +manpage-in-1 (source): maintainer-manual-page [debian/not-forwarded.1] diff --git a/t/recipes/checks/debian/not-installed/triplet-in-library-path/build-spec/debian/not-installed b/t/recipes/checks/debian/not-installed/triplet-in-library-path/build-spec/debian/not-installed new file mode 100644 index 0000000..3bb0456 --- /dev/null +++ b/t/recipes/checks/debian/not-installed/triplet-in-library-path/build-spec/debian/not-installed @@ -0,0 +1 @@ +usr/lib/x86_64-linux-gnu/does-not-exist.a diff --git a/t/recipes/checks/debian/not-installed/triplet-in-library-path/build-spec/fill-values b/t/recipes/checks/debian/not-installed/triplet-in-library-path/build-spec/fill-values new file mode 100644 index 0000000..447697c --- /dev/null +++ b/t/recipes/checks/debian/not-installed/triplet-in-library-path/build-spec/fill-values @@ -0,0 +1,3 @@ +Testname: triplet-in-library-path +Skeleton: source-native +Description: Excludes a library from installation only on one architecture diff --git a/t/recipes/checks/debian/not-installed/triplet-in-library-path/eval/desc b/t/recipes/checks/debian/not-installed/triplet-in-library-path/eval/desc new file mode 100644 index 0000000..e46ecfc --- /dev/null +++ b/t/recipes/checks/debian/not-installed/triplet-in-library-path/eval/desc @@ -0,0 +1,3 @@ +Testname: triplet-in-library-path +Check: debian/not-installed +See-Also: Debian Bug#961973 diff --git a/t/recipes/checks/debian/not-installed/triplet-in-library-path/eval/hints b/t/recipes/checks/debian/not-installed/triplet-in-library-path/eval/hints new file mode 100644 index 0000000..32b37b5 --- /dev/null +++ b/t/recipes/checks/debian/not-installed/triplet-in-library-path/eval/hints @@ -0,0 +1 @@ +triplet-in-library-path (source): unwanted-path-too-specific usr/lib/x86_64-linux-gnu/does-not-exist.a [debian/not-installed:1] diff --git a/t/recipes/checks/debian/patches/count/two-patches/build-spec/debian/patches/patch1 b/t/recipes/checks/debian/patches/count/two-patches/build-spec/debian/patches/patch1 new file mode 100644 index 0000000..e69de29 diff --git a/t/recipes/checks/debian/patches/count/two-patches/build-spec/debian/patches/patch2 b/t/recipes/checks/debian/patches/count/two-patches/build-spec/debian/patches/patch2 new file mode 100644 index 0000000..e69de29 diff --git a/t/recipes/checks/debian/patches/count/two-patches/build-spec/debian/patches/series b/t/recipes/checks/debian/patches/count/two-patches/build-spec/debian/patches/series new file mode 100644 index 0000000..8c90984 --- /dev/null +++ b/t/recipes/checks/debian/patches/count/two-patches/build-spec/debian/patches/series @@ -0,0 +1,5 @@ +patch1 +# a comment +patch2 # another comment + # yet another comment +# patch3 diff --git a/t/recipes/checks/debian/patches/count/two-patches/build-spec/fill-values b/t/recipes/checks/debian/patches/count/two-patches/build-spec/fill-values new file mode 100644 index 0000000..436ad89 --- /dev/null +++ b/t/recipes/checks/debian/patches/count/two-patches/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: source-non-native +Testname: two-patches +Description: Package with two Debian patches diff --git a/t/recipes/checks/debian/patches/count/two-patches/eval/desc b/t/recipes/checks/debian/patches/count/two-patches/eval/desc new file mode 100644 index 0000000..333ef3b --- /dev/null +++ b/t/recipes/checks/debian/patches/count/two-patches/eval/desc @@ -0,0 +1,2 @@ +Testname: two-patches +Check: debian/patches/count diff --git a/t/recipes/checks/debian/patches/count/two-patches/eval/hints b/t/recipes/checks/debian/patches/count/two-patches/eval/hints new file mode 100644 index 0000000..e7e3e7d --- /dev/null +++ b/t/recipes/checks/debian/patches/count/two-patches/eval/hints @@ -0,0 +1 @@ +two-patches (source): number-of-patches 2 [debian/patches/series] diff --git a/t/recipes/checks/debian/patches/dep3/applied-upstream/build-spec/debian/patches/applied-upstream.patch b/t/recipes/checks/debian/patches/dep3/applied-upstream/build-spec/debian/patches/applied-upstream.patch new file mode 100644 index 0000000..a1193df --- /dev/null +++ b/t/recipes/checks/debian/patches/dep3/applied-upstream/build-spec/debian/patches/applied-upstream.patch @@ -0,0 +1,15 @@ +Description: Convert a source file to UTF-8 encoding. +Author: Felix Lechner +Applied-Upstream: https://gitlab.gnome.org/World/lollypop/-/commit/4c1435ee22220c4a7f2ccaa05bce60a3e64cb912 + +--- a/cyassl/ctaocrypt/tfm.h ++++ b/cyassl/ctaocrypt/tfm.h +@@ -28,7 +28,7 @@ + + + /** +- * Edited by Moiss Guimares (moises.guimaraes@phoebus.com.br) ++ * Edited by Moisés Guimarães (moises.guimaraes@phoebus.com.br) + * to fit CyaSSL's needs. + */ + diff --git a/t/recipes/checks/debian/patches/dep3/applied-upstream/build-spec/fill-values b/t/recipes/checks/debian/patches/dep3/applied-upstream/build-spec/fill-values new file mode 100644 index 0000000..3017656 --- /dev/null +++ b/t/recipes/checks/debian/patches/dep3/applied-upstream/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: source-non-native +Testname: applied-upstream +Description: Debian patch with Applied-Upstream (false positive) diff --git a/t/recipes/checks/debian/patches/dep3/applied-upstream/eval/desc b/t/recipes/checks/debian/patches/dep3/applied-upstream/eval/desc new file mode 100644 index 0000000..7dbb942 --- /dev/null +++ b/t/recipes/checks/debian/patches/dep3/applied-upstream/eval/desc @@ -0,0 +1,5 @@ +Testname: applied-upstream +Check: debian/patches/dep3 +Test-Against: + patch-not-forwarded-upstream +See-Also: Bug#965119 diff --git a/t/recipes/checks/debian/patches/dep3/applied-upstream/eval/hints b/t/recipes/checks/debian/patches/dep3/applied-upstream/eval/hints new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/t/recipes/checks/debian/patches/dep3/applied-upstream/eval/hints @@ -0,0 +1 @@ + diff --git a/t/recipes/checks/debian/patches/dep3/empty-forwarded-no-bug/build-spec/debian/patches/silent.patch b/t/recipes/checks/debian/patches/dep3/empty-forwarded-no-bug/build-spec/debian/patches/silent.patch new file mode 100644 index 0000000..f35f299 --- /dev/null +++ b/t/recipes/checks/debian/patches/dep3/empty-forwarded-no-bug/build-spec/debian/patches/silent.patch @@ -0,0 +1,14 @@ +Description: Convert a source file to UTF-8 encoding. +Author: Felix Lechner + +--- a/cyassl/ctaocrypt/tfm.h ++++ b/cyassl/ctaocrypt/tfm.h +@@ -28,7 +28,7 @@ + + + /** +- * Edited by Moiss Guimares (moises.guimaraes@phoebus.com.br) ++ * Edited by Moisés Guimarães (moises.guimaraes@phoebus.com.br) + * to fit CyaSSL's needs. + */ + diff --git a/t/recipes/checks/debian/patches/dep3/empty-forwarded-no-bug/build-spec/fill-values b/t/recipes/checks/debian/patches/dep3/empty-forwarded-no-bug/build-spec/fill-values new file mode 100644 index 0000000..479f07d --- /dev/null +++ b/t/recipes/checks/debian/patches/dep3/empty-forwarded-no-bug/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: source-non-native +Testname: empty-forwarded-no-bug +Description: Debian patch with empty Forwarded and no Bug diff --git a/t/recipes/checks/debian/patches/dep3/empty-forwarded-no-bug/eval/desc b/t/recipes/checks/debian/patches/dep3/empty-forwarded-no-bug/eval/desc new file mode 100644 index 0000000..0fd262b --- /dev/null +++ b/t/recipes/checks/debian/patches/dep3/empty-forwarded-no-bug/eval/desc @@ -0,0 +1,3 @@ +Testname: empty-forwarded-no-bug +Check: debian/patches/dep3 +See-Also: Bug#755153 diff --git a/t/recipes/checks/debian/patches/dep3/empty-forwarded-no-bug/eval/hints b/t/recipes/checks/debian/patches/dep3/empty-forwarded-no-bug/eval/hints new file mode 100644 index 0000000..8a913be --- /dev/null +++ b/t/recipes/checks/debian/patches/dep3/empty-forwarded-no-bug/eval/hints @@ -0,0 +1 @@ +empty-forwarded-no-bug (source): patch-not-forwarded-upstream [debian/patches/silent.patch] diff --git a/t/recipes/checks/debian/patches/dep3/forwarded-no/build-spec/debian/patches/not-forwarded.patch b/t/recipes/checks/debian/patches/dep3/forwarded-no/build-spec/debian/patches/not-forwarded.patch new file mode 100644 index 0000000..4b48b32 --- /dev/null +++ b/t/recipes/checks/debian/patches/dep3/forwarded-no/build-spec/debian/patches/not-forwarded.patch @@ -0,0 +1,15 @@ +Description: Convert a source file to UTF-8 encoding. +Author: Felix Lechner +Forwarded: no + +--- a/cyassl/ctaocrypt/tfm.h ++++ b/cyassl/ctaocrypt/tfm.h +@@ -28,7 +28,7 @@ + + + /** +- * Edited by Moiss Guimares (moises.guimaraes@phoebus.com.br) ++ * Edited by Moisés Guimarães (moises.guimaraes@phoebus.com.br) + * to fit CyaSSL's needs. + */ + diff --git a/t/recipes/checks/debian/patches/dep3/forwarded-no/build-spec/fill-values b/t/recipes/checks/debian/patches/dep3/forwarded-no/build-spec/fill-values new file mode 100644 index 0000000..4cd9c11 --- /dev/null +++ b/t/recipes/checks/debian/patches/dep3/forwarded-no/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: source-non-native +Testname: forwarded-no +Description: Debian patch with Forwarded: no diff --git a/t/recipes/checks/debian/patches/dep3/forwarded-no/eval/desc b/t/recipes/checks/debian/patches/dep3/forwarded-no/eval/desc new file mode 100644 index 0000000..edb980d --- /dev/null +++ b/t/recipes/checks/debian/patches/dep3/forwarded-no/eval/desc @@ -0,0 +1,3 @@ +Testname: forwarded-no +Check: debian/patches/dep3 +See-Also: Bug#755153 diff --git a/t/recipes/checks/debian/patches/dep3/forwarded-no/eval/hints b/t/recipes/checks/debian/patches/dep3/forwarded-no/eval/hints new file mode 100644 index 0000000..428ce9f --- /dev/null +++ b/t/recipes/checks/debian/patches/dep3/forwarded-no/eval/hints @@ -0,0 +1 @@ +forwarded-no (source): patch-not-forwarded-upstream [debian/patches/not-forwarded.patch] diff --git a/t/recipes/checks/debian/patches/dep3/forwarded-not-needed/build-spec/debian/patches/no-forwarding-needed.patch b/t/recipes/checks/debian/patches/dep3/forwarded-not-needed/build-spec/debian/patches/no-forwarding-needed.patch new file mode 100644 index 0000000..65e7f54 --- /dev/null +++ b/t/recipes/checks/debian/patches/dep3/forwarded-not-needed/build-spec/debian/patches/no-forwarding-needed.patch @@ -0,0 +1,15 @@ +Description: Convert a source file to UTF-8 encoding. +Author: Felix Lechner +Forwarded: not-needed + +--- a/cyassl/ctaocrypt/tfm.h ++++ b/cyassl/ctaocrypt/tfm.h +@@ -28,7 +28,7 @@ + + + /** +- * Edited by Moiss Guimares (moises.guimaraes@phoebus.com.br) ++ * Edited by Moisés Guimarães (moises.guimaraes@phoebus.com.br) + * to fit CyaSSL's needs. + */ + diff --git a/t/recipes/checks/debian/patches/dep3/forwarded-not-needed/build-spec/fill-values b/t/recipes/checks/debian/patches/dep3/forwarded-not-needed/build-spec/fill-values new file mode 100644 index 0000000..aae5187 --- /dev/null +++ b/t/recipes/checks/debian/patches/dep3/forwarded-not-needed/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: source-non-native +Testname: forwarded-not-needed +Description: Debian patch with Forwarded: not-needed (false positive) diff --git a/t/recipes/checks/debian/patches/dep3/forwarded-not-needed/eval/desc b/t/recipes/checks/debian/patches/dep3/forwarded-not-needed/eval/desc new file mode 100644 index 0000000..b69011f --- /dev/null +++ b/t/recipes/checks/debian/patches/dep3/forwarded-not-needed/eval/desc @@ -0,0 +1,5 @@ +Testname: forwarded-not-needed +Check: debian/patches/dep3 +Test-Against: + patch-not-forwarded-upstream +See-Also: Bug#755153 diff --git a/t/recipes/checks/debian/patches/dep3/forwarded-not-needed/eval/hints b/t/recipes/checks/debian/patches/dep3/forwarded-not-needed/eval/hints new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/t/recipes/checks/debian/patches/dep3/forwarded-not-needed/eval/hints @@ -0,0 +1 @@ + diff --git a/t/recipes/checks/debian/patches/dep3/origin-upstream/build-spec/debian/patches/13_document_modifiers.diff b/t/recipes/checks/debian/patches/dep3/origin-upstream/build-spec/debian/patches/13_document_modifiers.diff new file mode 100644 index 0000000..76548ba --- /dev/null +++ b/t/recipes/checks/debian/patches/dep3/origin-upstream/build-spec/debian/patches/13_document_modifiers.diff @@ -0,0 +1,41 @@ +Description: Better document modifiers +Author: Emanuele Giaquinta +Origin: upstream, https://github.com/exg/rxvt-unicode/commit/b881e3714ba253d08dc1b900d9333b73759db126 +Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=839769 +Last-Update: 2017-10-16 +--- +This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ +Index: rxvt-unicode/doc/rxvt.1.pod +=================================================================== +--- rxvt-unicode.orig/doc/rxvt.1.pod 2017-10-16 11:03:33.669407628 -0400 ++++ rxvt-unicode/doc/rxvt.1.pod 2017-10-16 11:03:33.629407435 -0400 +@@ -1081,10 +1081,25 @@ + + (modifiers-)key + +-Where I can be any combination of B, B, +-B, B, B, B, B, B, B, +-B, B, B, and the abbreviated B, B, B, B, +-B, B, B, B, B<1>, B<2>, B<3>, B<4>, B<5>. ++Where I can be any combination of the following full or ++abbreviated modifier names: ++ ++=begin table ++ ++ B B ++ B B ++ B B ++ B B ++ B B ++ B B B ++ B B ++ B B<1> ++ B B<2> ++ B B<3> ++ B B<4> ++ B B<5> ++ ++=end table + + The B, B and B modifiers are usually aliased to + whatever modifier the NumLock key, Meta/Alt keys or ISO Level3 Shift/AltGr diff --git a/t/recipes/checks/debian/patches/dep3/origin-upstream/build-spec/fill-values b/t/recipes/checks/debian/patches/dep3/origin-upstream/build-spec/fill-values new file mode 100644 index 0000000..d086fa1 --- /dev/null +++ b/t/recipes/checks/debian/patches/dep3/origin-upstream/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: source-non-native +Testname: origin-upstream +Description: Debian patch with Origin: upstream, URL (taken from Bug#966140) diff --git a/t/recipes/checks/debian/patches/dep3/origin-upstream/eval/desc b/t/recipes/checks/debian/patches/dep3/origin-upstream/eval/desc new file mode 100644 index 0000000..8dd636e --- /dev/null +++ b/t/recipes/checks/debian/patches/dep3/origin-upstream/eval/desc @@ -0,0 +1,5 @@ +Testname: origin-upstream +Check: debian/patches/dep3 +Test-Against: + patch-not-forwarded-upstream +See-Also: Bug#966140 diff --git a/t/recipes/checks/debian/patches/dep3/origin-upstream/eval/hints b/t/recipes/checks/debian/patches/dep3/origin-upstream/eval/hints new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/t/recipes/checks/debian/patches/dep3/origin-upstream/eval/hints @@ -0,0 +1 @@ + diff --git a/t/recipes/checks/debian/patches/dep3/pseudo-header/build-spec/debian/patches/no-forwarding-needed.patch b/t/recipes/checks/debian/patches/dep3/pseudo-header/build-spec/debian/patches/no-forwarding-needed.patch new file mode 100644 index 0000000..2c51d06 --- /dev/null +++ b/t/recipes/checks/debian/patches/dep3/pseudo-header/build-spec/debian/patches/no-forwarding-needed.patch @@ -0,0 +1,17 @@ +Description: Convert a source file to UTF-8 encoding. +Author: Felix Lechner + +# second pseudo-header allowed by DEP-3, see Bug#966024 +Forwarded: not-needed + +--- a/cyassl/ctaocrypt/tfm.h ++++ b/cyassl/ctaocrypt/tfm.h +@@ -28,7 +28,7 @@ + + + /** +- * Edited by Moiss Guimares (moises.guimaraes@phoebus.com.br) ++ * Edited by Moisés Guimarães (moises.guimaraes@phoebus.com.br) + * to fit CyaSSL's needs. + */ + diff --git a/t/recipes/checks/debian/patches/dep3/pseudo-header/build-spec/fill-values b/t/recipes/checks/debian/patches/dep3/pseudo-header/build-spec/fill-values new file mode 100644 index 0000000..1e762d9 --- /dev/null +++ b/t/recipes/checks/debian/patches/dep3/pseudo-header/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: source-non-native +Testname: pseudo-header +Description: Debian patch with Forwarded: not-needed in a pseudo-header (false positive) diff --git a/t/recipes/checks/debian/patches/dep3/pseudo-header/eval/desc b/t/recipes/checks/debian/patches/dep3/pseudo-header/eval/desc new file mode 100644 index 0000000..18c9f9d --- /dev/null +++ b/t/recipes/checks/debian/patches/dep3/pseudo-header/eval/desc @@ -0,0 +1,5 @@ +Testname: pseudo-header +Check: debian/patches/dep3 +Test-Against: + patch-not-forwarded-upstream +See-Also: Bug#966024 diff --git a/t/recipes/checks/debian/patches/dep3/pseudo-header/eval/hints b/t/recipes/checks/debian/patches/dep3/pseudo-header/eval/hints new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/t/recipes/checks/debian/patches/dep3/pseudo-header/eval/hints @@ -0,0 +1 @@ + diff --git a/t/recipes/checks/debian/patches/dpatch/legacy-scripts/build-spec/debian/changelog.in b/t/recipes/checks/debian/patches/dpatch/legacy-scripts/build-spec/debian/changelog.in new file mode 100644 index 0000000..935c633 --- /dev/null +++ b/t/recipes/checks/debian/patches/dpatch/legacy-scripts/build-spec/debian/changelog.in @@ -0,0 +1,41 @@ +scripts ([% $version %]) [% $distribution %]; urgency=low + + * I'm also not able to write my name. + * Added a script in /etc/Xsession.d + * Bizarre version number courtesy of + https://wiki.ubuntu.com/SecurityUpdateProcedures#Prepare + + -- Mark 'HE' Brokschmitt Thu, 23 Jun 2005 14:32:39 +0200 + +scripts (5-1) unstable; urgency=low + + * I'm making a typo in my own name... And I want lintian to warn me about + it. + + -- Jeroen van Wolffelaar Sun, 18 Apr 2004 02:26:34 +0200 + +scripts (4-1) unstable; urgency=low + + * Add new example to check that not executable files with a shebang line + called *in don't trigger the script-not-executable warning. + + -- Marc 'HE' Brockschmidt Wed, 14 Apr 2004 19:44:04 +0200 + +scripts (3-3) unstable; urgency=low + + * Add suidperlfoo and some code in debian/rules to + check the new suidperl checks + + -- Frank Lichtenheld Wed, 31 Mar 2004 21:06:20 +0000 + +scripts (2-1) unstable; urgency=low + + * Add tkfoo script for tk checkings + + -- Lintian Maintainers Sat, 21 Feb 2004 17:13:36 +0100 + +scripts (1-0) unstable; urgency=low + + * Initial version + + -- Lintian Maintainers Sat, 10 Feb 2001 15:37:31 -0800 diff --git a/t/recipes/checks/debian/patches/dpatch/legacy-scripts/build-spec/debian/control.in b/t/recipes/checks/debian/patches/dpatch/legacy-scripts/build-spec/debian/control.in new file mode 100644 index 0000000..75a521f --- /dev/null +++ b/t/recipes/checks/debian/patches/dpatch/legacy-scripts/build-spec/debian/control.in @@ -0,0 +1,16 @@ +Source: scripts +Section: interpreters +Priority: optional +Maintainer: Lintian Maintainers +Uploaders: Jeroen van Wolfelaar , Marc 'HE' Brockschmidt +Build-Depends-Indep: dpatch +Standards-Version: 3.2.1 + +Package: scripts +Architecture: [% $package_architecture %] +Depends: test, ruby1.8, build-essential, libssl0.9.7, php7.0-cli +Recommends: tk8.4 | wish +Description: test lintian's script file checks + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. diff --git a/t/recipes/checks/debian/patches/dpatch/legacy-scripts/build-spec/debian/copyright b/t/recipes/checks/debian/patches/dpatch/legacy-scripts/build-spec/debian/copyright new file mode 100644 index 0000000..ad8a119 --- /dev/null +++ b/t/recipes/checks/debian/patches/dpatch/legacy-scripts/build-spec/debian/copyright @@ -0,0 +1,5 @@ +This file contains the phrase "under the same terms as Perl itself" to +trigger warnings about not having common-licenses references. + +This file contains the phrase "public domain" which should suppress +warnings about no copyright date. diff --git a/t/recipes/checks/debian/patches/dpatch/legacy-scripts/build-spec/debian/patches/00list b/t/recipes/checks/debian/patches/dpatch/legacy-scripts/build-spec/debian/patches/00list new file mode 100644 index 0000000..3b9d37e --- /dev/null +++ b/t/recipes/checks/debian/patches/dpatch/legacy-scripts/build-spec/debian/patches/00list @@ -0,0 +1,11 @@ +01_not_here_right_now.dpatch + +# some comment +/* some more + elaborate comment + which needs DPATCH_OPTION_CPP=1 + */02_i_dont_have_a_description.patch 03_specified_without_dpatch + +// and again a comment + +04_i_dont_have_a_description_either.patch diff --git a/t/recipes/checks/debian/patches/dpatch/legacy-scripts/build-spec/debian/patches/00list.sparc b/t/recipes/checks/debian/patches/dpatch/legacy-scripts/build-spec/debian/patches/00list.sparc new file mode 100644 index 0000000..8b47ab3 --- /dev/null +++ b/t/recipes/checks/debian/patches/dpatch/legacy-scripts/build-spec/debian/patches/00list.sparc @@ -0,0 +1 @@ +01_some_other_patch_thats_not_in_the_package.dpatch diff --git a/t/recipes/checks/debian/patches/dpatch/legacy-scripts/build-spec/debian/patches/00options b/t/recipes/checks/debian/patches/dpatch/legacy-scripts/build-spec/debian/patches/00options new file mode 100644 index 0000000..57ffeb6 --- /dev/null +++ b/t/recipes/checks/debian/patches/dpatch/legacy-scripts/build-spec/debian/patches/00options @@ -0,0 +1 @@ +DPATCH_OPTION_CPP=1 diff --git a/t/recipes/checks/debian/patches/dpatch/legacy-scripts/build-spec/debian/patches/02_i_dont_have_a_description.patch b/t/recipes/checks/debian/patches/dpatch/legacy-scripts/build-spec/debian/patches/02_i_dont_have_a_description.patch new file mode 100644 index 0000000..9279c1b --- /dev/null +++ b/t/recipes/checks/debian/patches/dpatch/legacy-scripts/build-spec/debian/patches/02_i_dont_have_a_description.patch @@ -0,0 +1,7 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 02_i_dont_have_a_description.patch.dpatch by Marc 'HE' Brockschmidt > +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: No description. + +@DPATCH@ diff --git a/t/recipes/checks/debian/patches/dpatch/legacy-scripts/build-spec/debian/patches/03_specified_without_dpatch.dpatch b/t/recipes/checks/debian/patches/dpatch/legacy-scripts/build-spec/debian/patches/03_specified_without_dpatch.dpatch new file mode 100644 index 0000000..8303ac6 --- /dev/null +++ b/t/recipes/checks/debian/patches/dpatch/legacy-scripts/build-spec/debian/patches/03_specified_without_dpatch.dpatch @@ -0,0 +1,5 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## All lines beginning with `## DP:' are a description of the patch. +## DP: Listed in 00list without .dpatch suffix. + +@DPATCH@ diff --git a/t/recipes/checks/debian/patches/dpatch/legacy-scripts/build-spec/debian/patches/04_i_dont_have_a_description_either.patch b/t/recipes/checks/debian/patches/dpatch/legacy-scripts/build-spec/debian/patches/04_i_dont_have_a_description_either.patch new file mode 100644 index 0000000..b603f16 --- /dev/null +++ b/t/recipes/checks/debian/patches/dpatch/legacy-scripts/build-spec/debian/patches/04_i_dont_have_a_description_either.patch @@ -0,0 +1,7 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 04_i_dont_have_a_description_either.patch by Adam D. Barratt +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: + +@DPATCH@ diff --git a/t/recipes/checks/debian/patches/dpatch/legacy-scripts/build-spec/debian/postinst b/t/recipes/checks/debian/patches/dpatch/legacy-scripts/build-spec/debian/postinst new file mode 100644 index 0000000..7c5baf1 --- /dev/null +++ b/t/recipes/checks/debian/patches/dpatch/legacy-scripts/build-spec/debian/postinst @@ -0,0 +1,14 @@ +#!/bin/sh + +if [ -x "/etc/init.d/lsb-broken" ] ; then + update-rc.d lsb-broken defaults >/dev/null +fi +if [ -x "/etc/init.d/no-lsb" ] ; then + update-rc.d no-lsb defaults >/dev/null +fi +if [ -x "/etc/init.d/skeleton" ] ; then + update-rc.d skeleton defaults >/dev/null +fi +if [ -x "/etc/init.d/lsb-other" ] ; then + update-rc.d lsb-other defaults >/dev/null +fi diff --git a/t/recipes/checks/debian/patches/dpatch/legacy-scripts/build-spec/debian/postrm b/t/recipes/checks/debian/patches/dpatch/legacy-scripts/build-spec/debian/postrm new file mode 100644 index 0000000..8fa75a2 --- /dev/null +++ b/t/recipes/checks/debian/patches/dpatch/legacy-scripts/build-spec/debian/postrm @@ -0,0 +1,9 @@ +#!/bin/sh -e + +if [ "$1" = purge ] ; then + update-rc.d lsb-broken remove >/dev/null + update-rc.d no-lsb remove >/dev/null + update-rc.d skeleton remove >/dev/null + update-rc.d lsb-other remove >/dev/null + update-rc.d lsb-other remove >/dev/null +fi diff --git a/t/recipes/checks/debian/patches/dpatch/legacy-scripts/build-spec/debian/preinst b/t/recipes/checks/debian/patches/dpatch/legacy-scripts/build-spec/debian/preinst new file mode 100644 index 0000000..0799557 --- /dev/null +++ b/t/recipes/checks/debian/patches/dpatch/legacy-scripts/build-spec/debian/preinst @@ -0,0 +1,15 @@ +#!/bin/sh + +set -e +set -x + +# +# Some comments here +# + +# This serves as an example of an "empty" script, so +# please do not add any real code here, thank you :) + +#DEBHELPER# + +exit 0 diff --git a/t/recipes/checks/debian/patches/dpatch/legacy-scripts/build-spec/debian/rules b/t/recipes/checks/debian/patches/dpatch/legacy-scripts/build-spec/debian/rules new file mode 100755 index 0000000..ee3677e --- /dev/null +++ b/t/recipes/checks/debian/patches/dpatch/legacy-scripts/build-spec/debian/rules @@ -0,0 +1,105 @@ +#!/usr/bin/make -f + +tmp=debian/tmp + +build-arch: + echo "Hi, in an arch: all package, I am a bug!" + +build-indep: + +build: build-arch build-indep + +binary-arch: + echo "Hi, in an arch: all package, I am a bug!" + +binary-indep: + install -d $(tmp)/usr/bin/ + install -d $(tmp)/etc/X11/Xsession.d/ + install -d $(tmp)/etc/init.d/ + install -d $(tmp)/etc/csh/login.d/ + install -d $(tmp)/etc/fish.d/ + install -d $(tmp)/usr/share/scripts/ + install -d $(tmp)/usr/share/doc/scripts/ + install -d $(tmp)/usr/lib/cgi-bin + install -d $(tmp)/usr/src/scripts + install -d $(tmp)/DEBIAN + + install -m 755 csh-foo $(tmp)/etc/csh/login.d/ + install -m 755 envfoo $(tmp)/usr/bin/ + install -m 755 fish-foo $(tmp)/etc/fish.d/ + install -m 755 jruby-broken $(tmp)/usr/bin/ + install -m 755 perlfoo $(tmp)/usr/bin/ + install -m 755 rubyfoo $(tmp)/usr/bin/ +# This doesn't use "env" but should also trigger script-in-usr-share-doc + install -m 755 rubyfoo $(tmp)/usr/share/doc/scripts/ + install -m 755 make-foo $(tmp)/usr/bin/ + install -m 755 lefty-foo $(tmp)/usr/bin/ + install -m 4751 perlfoo $(tmp)/usr/bin/suidperlfoo2 + install -m 755 sh-broken $(tmp)/usr/bin/ + install -m 4555 suidperlfoo $(tmp)/usr/bin/ + install -m 755 tkfoo $(tmp)/usr/bin/ + install -m 755 wishfoo $(tmp)/usr/bin/ + install -m 644 xsession-test $(tmp)/etc/X11/Xsession.d/ + +# Permissions here aren't part of what's being tested, but let us exercise +# some other errors. + install -m 755 perl-bizarre-1 $(tmp)/usr/bin/ + install -m 750 perl-bizarre-2 $(tmp)/usr/bin/ + install -m 754 perl-bizarre-3 $(tmp)/usr/bin/ + install -m 705 guile-bizarre $(tmp)/usr/bin/ + +# First one should produce a warning; second one shouldn't. + install -m 755 gccbug.dpatch $(tmp)/usr/share/scripts/ + install -m 755 gccbug.dpatch $(tmp)/usr/src/scripts/ + + install -m 644 init-skeleton $(tmp)/etc/init.d/skeleton + install -m 755 init-no-lsb $(tmp)/etc/init.d/no-lsb + install -m 755 init-lsb-broken $(tmp)/etc/init.d/lsb-broken + install -m 755 init-lsb-other $(tmp)/etc/init.d/lsb-other + + install -m 755 phpfoo $(tmp)/usr/share/scripts/ + sed 's/php$$/php7.0/' phpfoo > $(tmp)/usr/share/scripts/php7.0foo + chmod 755 $(tmp)/usr/share/scripts/php7.0foo + + install -m 755 phpenvfoo $(tmp)/usr/share/scripts/ + sed 's/php$$/php7.0/' phpenvfoo > $(tmp)/usr/share/scripts/php7.0envfoo + chmod 755 $(tmp)/usr/share/scripts/php7.0envfoo + + echo "#!/usr/bin/perl" >> $(tmp)/usr/share/scripts/foobar.in + chmod 644 $(tmp)/usr/share/scripts/foobar.in + + touch $(tmp)/usr/share/scripts/mono.exe + chmod 755 $(tmp)/usr/share/scripts/mono.exe + + echo "#!/bin/sh" > $(tmp)/usr/share/scripts/foo\$$bar + chmod 755 $(tmp)/usr/share/scripts/foo\$$bar + + echo "#!/bin/sh" > $(tmp)/usr/lib/cgi-bin/cgi-script + chmod 755 $(tmp)/usr/lib/cgi-bin/cgi-script + + echo "#!/bin/sh" > $(tmp)/usr/bin/test.sh + chmod 755 $(tmp)/usr/bin/test.sh + + + dh_testroot # dummy to test missing debhelper dependency + + + install -m 644 debian/changelog $(tmp)/usr/share/doc/scripts/changelog.Debian + gzip -n -9 $(tmp)/usr/share/doc/scripts/changelog.Debian + install -m 644 debian/copyright $(tmp)/usr/share/doc/scripts/copyright + + install -m 644 debian/scripts.conffiles $(tmp)/DEBIAN/conffiles + install -m 755 debian/preinst $(tmp)/DEBIAN/preinst + install -m 755 debian/postinst $(tmp)/DEBIAN/postinst + install -m 755 debian/postrm $(tmp)/DEBIAN/postrm + touch $(tmp)/DEBIAN/prerm + chmod 755 $(tmp)/DEBIAN/prerm + dpkg-gencontrol -isp + dpkg --build $(tmp) .. + +binary: binary-arch binary-indep + +clean: + rm -rf debian/files $(tmp) debian/substvars + +.PHONY: build-arch build-indep build binary-arch binary-indep binary clean diff --git a/t/recipes/checks/debian/patches/dpatch/legacy-scripts/build-spec/debian/scripts.conffiles b/t/recipes/checks/debian/patches/dpatch/legacy-scripts/build-spec/debian/scripts.conffiles new file mode 100644 index 0000000..01a371a --- /dev/null +++ b/t/recipes/checks/debian/patches/dpatch/legacy-scripts/build-spec/debian/scripts.conffiles @@ -0,0 +1,6 @@ +/etc/init.d/lsb-broken +/etc/init.d/lsb-other +/etc/init.d/no-lsb +/etc/X11/Xsession.d/xsession-test +/etc/csh/login.d/csh-foo +/etc/fish.d/fish-foo diff --git a/t/recipes/checks/debian/patches/dpatch/legacy-scripts/build-spec/debian/watch b/t/recipes/checks/debian/patches/dpatch/legacy-scripts/build-spec/debian/watch new file mode 100644 index 0000000..dba5815 --- /dev/null +++ b/t/recipes/checks/debian/patches/dpatch/legacy-scripts/build-spec/debian/watch @@ -0,0 +1,8 @@ +# watch file with upstream version mangling + +version=2 +opts="uversionmangle=s/$/ds/" \ +http://qa.debian.org/watch/sf.php?project=foo scripts\.([\d.]+)\.tar\.gz debian uupdate + +version=3 +http://ftp.sf.net/foo/foo_bar(.+)\.Z 5 uupdate \ No newline at end of file diff --git a/t/recipes/checks/debian/patches/dpatch/legacy-scripts/build-spec/fill-values b/t/recipes/checks/debian/patches/dpatch/legacy-scripts/build-spec/fill-values new file mode 100644 index 0000000..8a68457 --- /dev/null +++ b/t/recipes/checks/debian/patches/dpatch/legacy-scripts/build-spec/fill-values @@ -0,0 +1,6 @@ +Testname: legacy-scripts +Source: scripts +Version: 6ds-1ubuntu0.5.10.1 +Package-Architecture: all +Skeleton: upload-non-native +Description: Legacy test "scripts" diff --git a/t/recipes/checks/debian/patches/dpatch/legacy-scripts/build-spec/orig/csh-foo b/t/recipes/checks/debian/patches/dpatch/legacy-scripts/build-spec/orig/csh-foo new file mode 100644 index 0000000..eaf47a1 --- /dev/null +++ b/t/recipes/checks/debian/patches/dpatch/legacy-scripts/build-spec/orig/csh-foo @@ -0,0 +1,2 @@ +#! /bin/csh + diff --git a/t/recipes/checks/debian/patches/dpatch/legacy-scripts/build-spec/orig/envfoo b/t/recipes/checks/debian/patches/dpatch/legacy-scripts/build-spec/orig/envfoo new file mode 100755 index 0000000..e005037 --- /dev/null +++ b/t/recipes/checks/debian/patches/dpatch/legacy-scripts/build-spec/orig/envfoo @@ -0,0 +1,4 @@ +#! /bin/env python + +if __name__ == '__main__': + print 'Hi there' diff --git a/t/recipes/checks/debian/patches/dpatch/legacy-scripts/build-spec/orig/fish-foo b/t/recipes/checks/debian/patches/dpatch/legacy-scripts/build-spec/orig/fish-foo new file mode 100644 index 0000000..7f59139 --- /dev/null +++ b/t/recipes/checks/debian/patches/dpatch/legacy-scripts/build-spec/orig/fish-foo @@ -0,0 +1,2 @@ +#! /usr/bin/fish + diff --git a/t/recipes/checks/debian/patches/dpatch/legacy-scripts/build-spec/orig/gccbug.dpatch b/t/recipes/checks/debian/patches/dpatch/legacy-scripts/build-spec/orig/gccbug.dpatch new file mode 100755 index 0000000..65cbf37 --- /dev/null +++ b/t/recipes/checks/debian/patches/dpatch/legacy-scripts/build-spec/orig/gccbug.dpatch @@ -0,0 +1,39 @@ +#! /bin/sh -e + +# DP: Use sensible-editor instead of vi as fallback editor + +# Taken from gcc-4.1-source. Chokes bash -n (due to the patch) despite being +# a valid dpatch, so don't warn about it if it's in /usr/src. + +dir= +if [ $# -eq 3 -a "$2" = '-d' ]; then + pdir="-d $3" + dir="$3/" +elif [ $# -ne 1 ]; then + echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" + exit 1 +fi +case "$1" in + -patch) + patch $pdir -f --no-backup-if-mismatch -p0 < $0 + ;; + -unpatch) + patch $pdir -f --no-backup-if-mismatch -R -p0 < $0 + ;; + *) + echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" + exit 1 +esac +exit 0 + +--- gcc/gccbug.in~ 2003-03-01 00:51:42.000000000 +0100 ++++ gcc/gccbug.in 2003-03-02 12:08:36.000000000 +0100 +@@ -134,7 +134,7 @@ + # If they don't have a preferred editor set, then use + if [ -z "$VISUAL" ]; then + if [ -z "$EDITOR" ]; then +- EDIT=vi ++ EDIT=/usr/bin/sensible-editor + else + EDIT="$EDITOR" + fi diff --git a/t/recipes/checks/debian/patches/dpatch/legacy-scripts/build-spec/orig/guile-bizarre b/t/recipes/checks/debian/patches/dpatch/legacy-scripts/build-spec/orig/guile-bizarre new file mode 100644 index 0000000..70e2c74 --- /dev/null +++ b/t/recipes/checks/debian/patches/dpatch/legacy-scripts/build-spec/orig/guile-bizarre @@ -0,0 +1,6 @@ +#! /bin/sh +# -*- scheme -*- +exec guile -s $0 $* +# Seen in the wild as build-guile-gtk in libguilegtk-1.2-dev (0.31-5.1) +# Tests script_is_evil_and_wrong +!# diff --git a/t/recipes/checks/debian/patches/dpatch/legacy-scripts/build-spec/orig/init-lsb-broken b/t/recipes/checks/debian/patches/dpatch/legacy-scripts/build-spec/orig/init-lsb-broken new file mode 100644 index 0000000..e4dfa92 --- /dev/null +++ b/t/recipes/checks/debian/patches/dpatch/legacy-scripts/build-spec/orig/init-lsb-broken @@ -0,0 +1,34 @@ +#! /bin/sh +### BEGIN INIT INFO +# Provides: bad-lsb +# Required-Start: $local_fs $remote_fs +# Required-Stop: +# Default-Start: 1 2 3 4 5 +# Default-Stop: S 0 1 6 X +# Short-Description: Example Lintian initscript +# but this can't be continued +# Description: An example of a bad LSB section in an init script. +# This continuation is allowed (with spaces). +# This one is too (with tabs). +# X-Debian-Foo: Some unknown but valid keyword. +# Foo: Some invalid keyword. + +# Whoops, no terminating line. + +# And then we have this duplicate section. +### BEGIN INIT INFO +# Required-Start: This one doesn't count. +### END INIT INFO + +# Hey, look at all of those missing actions! But stop isn't missing. +case "$1" in + start|stop) + echo "Blah" + ;; + *) + echo "Usage: foo start" >&2 + exit 3 + ;; +esac + +: diff --git a/t/recipes/checks/debian/patches/dpatch/legacy-scripts/build-spec/orig/init-lsb-other b/t/recipes/checks/debian/patches/dpatch/legacy-scripts/build-spec/orig/init-lsb-other new file mode 100644 index 0000000..adb4795 --- /dev/null +++ b/t/recipes/checks/debian/patches/dpatch/legacy-scripts/build-spec/orig/init-lsb-other @@ -0,0 +1,22 @@ +#! /bin/sh +### BEGIN INIT INFO +# Provides: lsb-other +# Required-Start: $local_fs $remote_fs +# Required-Stop: $local_fs $remote_fs +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +# Description: This is another LSB script test, which has a missing +# Short-Description. +### END INIT INFO + +case "$1" in + start|stop|restart|reload|force-reload) + echo "Blah" + ;; + *) + echo "Usage: foo start" >&2 + exit 3 + ;; +esac + +: diff --git a/t/recipes/checks/debian/patches/dpatch/legacy-scripts/build-spec/orig/init-no-lsb b/t/recipes/checks/debian/patches/dpatch/legacy-scripts/build-spec/orig/init-no-lsb new file mode 100644 index 0000000..6b994dd --- /dev/null +++ b/t/recipes/checks/debian/patches/dpatch/legacy-scripts/build-spec/orig/init-no-lsb @@ -0,0 +1,17 @@ +#! /bin/sh +# No LSB section, but otherwise okay. (Well, the messages are bad, but we +# don't check that yet.) + +case "$1" in + start) + echo "Blah starting" + ;; + stop) + echo "Blah stopping" + ;; + restart|force-reload) + echo "Blah restarting" + ;; +esac + +: diff --git a/t/recipes/checks/debian/patches/dpatch/legacy-scripts/build-spec/orig/init-skeleton b/t/recipes/checks/debian/patches/dpatch/legacy-scripts/build-spec/orig/init-skeleton new file mode 100644 index 0000000..c868508 --- /dev/null +++ b/t/recipes/checks/debian/patches/dpatch/legacy-scripts/build-spec/orig/init-skeleton @@ -0,0 +1,150 @@ +#! /bin/sh +### BEGIN INIT INFO +# Provides: skeleton +# Required-Start: $local_fs $remote_fs +# Required-Stop: $local_fs $remote_fs +# Default-Start: 2 3 4 5 +# Default-Stop: S 0 1 6 +# Short-Description: Example Lintian initscript +# Description: This file should be used to construct scripts to be +# placed in /etc/init.d. +### END INIT INFO + +# Do NOT "set -e" + +# PATH should only include /usr/* if it runs after the mountnfs.sh script +PATH=/usr/sbin:/usr/bin:/sbin:/bin +DESC="Description of the service" +NAME=daemonexecutablename +DAEMON=/usr/sbin/$NAME +DAEMON_ARGS="--options args" +PIDFILE=/var/run/$NAME.pid +SCRIPTNAME=/etc/init.d/$NAME + +# Exit if the package is not installed +[ -x "$DAEMON" ] || exit 0 + +# Read configuration variable file if it is present +[ -r /etc/default/$NAME ] && . /etc/default/$NAME + +# Load the VERBOSE setting and other rcS variables +[ -f /etc/default/rcS ] && . /etc/default/rcS + +# Define LSB log_* functions. +# Depend on lsb-base (>= 3.0-6) to ensure that this file is present. +. /lib/lsb/init-functions + +# +# Function that starts the daemon/service +# +do_start() +{ + # Return + # 0 if daemon has been started + # 1 if daemon was already running + # 2 if daemon could not be started + start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON --test > /dev/null \ + || return 1 + start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON -- \ + $DAEMON_ARGS \ + || return 2 + # Add code here, if necessary, that waits for the process to be ready + # to handle requests from services started subsequently which depend + # on this one. As a last resort, sleep for some time. +} + +# +# Function that stops the daemon/service +# +do_stop() +{ + # Return + # 0 if daemon has been stopped + # 1 if daemon was already stopped + # 2 if daemon could not be stopped + # other if a failure occurred + start-stop-daemon --stop --quiet --retry=TERM/30/KILL/5 --pidfile $PIDFILE --name $NAME + RETVAL="$?" + [ "$RETVAL" = 2 ] && return 2 + # Wait for children to finish too if this is a daemon that forks + # and if the daemon is only ever run from this initscript. + # If the above conditions are not satisfied then add some other code + # that waits for the process to drop all resources that could be + # needed by services started subsequently. A last resort is to + # sleep for some time. + start-stop-daemon --stop --quiet --oknodo --retry=0/30/KILL/5 --exec $DAEMON + [ "$?" = 2 ] && return 2 + # Many daemons don't delete their pidfiles when they exit. + rm -f $PIDFILE + return "$RETVAL" +} + +# +# Function that sends a SIGHUP to the daemon/service +# +do_reload() { + # + # If the daemon can reload its configuration without + # restarting (for example, when it is sent a SIGHUP), + # then implement that here. + # + start-stop-daemon --stop --signal 1 --quiet --pidfile $PIDFILE --name $NAME + return 0 +} + +case "$1" in + start) + [ "$VERBOSE" != no ] && log_daemon_msg "Starting $DESC" "$NAME" + do_start + case "$?" in + 0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;; + 2) [ "$VERBOSE" != no ] && log_end_msg 1 ;; + esac + ;; + stop) + [ "$VERBOSE" != no ] && log_daemon_msg "Stopping $DESC" "$NAME" + do_stop + case "$?" in + 0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;; + 2) [ "$VERBOSE" != no ] && log_end_msg 1 ;; + esac + ;; + #reload|force-reload) + # + # If do_reload() is not implemented then leave this commented out + # and leave 'force-reload' as an alias for 'restart'. + # + #log_daemon_msg "Reloading $DESC" "$NAME" + #do_reload + #log_end_msg $? + #;; + restart|force-reload) + # + # If the "reload" option is implemented then remove the + # 'force-reload' alias + # + log_daemon_msg "Restarting $DESC" "$NAME" + do_stop + case "$?" in + 0|1) + do_start + case "$?" in + 0) log_end_msg 0 ;; + 1) log_end_msg 1 ;; # Old process is still running + *) log_end_msg 1 ;; # Failed to start + esac + ;; + *) + # Failed to stop + log_end_msg 1 + ;; + esac + ;; + *) + #echo "Usage: $SCRIPTNAME {start|stop|restart|reload|force-reload}" >&2 + echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload}" >&2 + exit 3 + ;; +esac + +: diff --git a/t/recipes/checks/debian/patches/dpatch/legacy-scripts/build-spec/orig/jruby-broken b/t/recipes/checks/debian/patches/dpatch/legacy-scripts/build-spec/orig/jruby-broken new file mode 100644 index 0000000..56f574d --- /dev/null +++ b/t/recipes/checks/debian/patches/dpatch/legacy-scripts/build-spec/orig/jruby-broken @@ -0,0 +1,2 @@ +#!/usr/bin/jruby +# There's no non-versioned jruby, so this should be an error. diff --git a/t/recipes/checks/debian/patches/dpatch/legacy-scripts/build-spec/orig/lefty-foo b/t/recipes/checks/debian/patches/dpatch/legacy-scripts/build-spec/orig/lefty-foo new file mode 100644 index 0000000..52c003e --- /dev/null +++ b/t/recipes/checks/debian/patches/dpatch/legacy-scripts/build-spec/orig/lefty-foo @@ -0,0 +1,2 @@ +#!/usr/local/bin/lefty + diff --git a/t/recipes/checks/debian/patches/dpatch/legacy-scripts/build-spec/orig/make-foo b/t/recipes/checks/debian/patches/dpatch/legacy-scripts/build-spec/orig/make-foo new file mode 100644 index 0000000..6b787b5 --- /dev/null +++ b/t/recipes/checks/debian/patches/dpatch/legacy-scripts/build-spec/orig/make-foo @@ -0,0 +1,3 @@ +#!/usr/bin/make + + diff --git a/t/recipes/checks/debian/patches/dpatch/legacy-scripts/build-spec/orig/perl-bizarre-1 b/t/recipes/checks/debian/patches/dpatch/legacy-scripts/build-spec/orig/perl-bizarre-1 new file mode 100644 index 0000000..fc632c8 --- /dev/null +++ b/t/recipes/checks/debian/patches/dpatch/legacy-scripts/build-spec/orig/perl-bizarre-1 @@ -0,0 +1,11 @@ +#! /bin/sh +eval '(exit $?0)' && eval 'PERL_BADLANG=x;export PERL_BADLANG;: \ +;exec perl -x -S -- "$0" ${1+"$@"};#'if 0; +eval 'setenv PERL_BADLANG x;exec perl -x -S -- "$0" $argv:q;#'.q+ +#!perl -w +package Htex::a2ping; $0=~/(.*)/s;unshift@INC,'.';do($1);die$@if$@;__END__+if !1; +# This Perl script was generated by JustLib2 at Wed Apr 23 09:14:13 2003. +# Don't touch/remove any lines above; http://www.inf.bme.hu/~pts/justlib + +# The above was actually seen in the wild and stresses the +# script_is_evil_and_wrong test. diff --git a/t/recipes/checks/debian/patches/dpatch/legacy-scripts/build-spec/orig/perl-bizarre-2 b/t/recipes/checks/debian/patches/dpatch/legacy-scripts/build-spec/orig/perl-bizarre-2 new file mode 100644 index 0000000..afd9cfe --- /dev/null +++ b/t/recipes/checks/debian/patches/dpatch/legacy-scripts/build-spec/orig/perl-bizarre-2 @@ -0,0 +1,7 @@ +#!/bin/sh +eval 'exec /usr/bin/perl -wS $0 ${1+"$@"}' + if $running_under_some_shell; + +# I'm someone following perlrun except without using the Perl #! line. +# Now something to choke bash. +while (<>) { if (/%#/) { print } } diff --git a/t/recipes/checks/debian/patches/dpatch/legacy-scripts/build-spec/orig/perl-bizarre-3 b/t/recipes/checks/debian/patches/dpatch/legacy-scripts/build-spec/orig/perl-bizarre-3 new file mode 100644 index 0000000..44baf75 --- /dev/null +++ b/t/recipes/checks/debian/patches/dpatch/legacy-scripts/build-spec/orig/perl-bizarre-3 @@ -0,0 +1,6 @@ +eval '(exit $?0)' && eval 'exec perl -wS $0 ${1+"$@"}' +& eval 'exec /usr/bin/perl -wS $0 $argv:q' + if $running_under_some_shell; + +# More utterly bizarreness from perlrun. This one even doesn't work if +# there's a valid #! line on the first line. I don't understand why.... diff --git a/t/recipes/checks/debian/patches/dpatch/legacy-scripts/build-spec/orig/perlfoo b/t/recipes/checks/debian/patches/dpatch/legacy-scripts/build-spec/orig/perlfoo new file mode 100644 index 0000000..5b27ed0 --- /dev/null +++ b/t/recipes/checks/debian/patches/dpatch/legacy-scripts/build-spec/orig/perlfoo @@ -0,0 +1,3 @@ +#! /usr/bin/perl + +print "Hello, World!"; diff --git a/t/recipes/checks/debian/patches/dpatch/legacy-scripts/build-spec/orig/phpenvfoo b/t/recipes/checks/debian/patches/dpatch/legacy-scripts/build-spec/orig/phpenvfoo new file mode 100644 index 0000000..cbbfb2e --- /dev/null +++ b/t/recipes/checks/debian/patches/dpatch/legacy-scripts/build-spec/orig/phpenvfoo @@ -0,0 +1,7 @@ +#!/usr/bin/env php + + +Dumb PHP script + + + diff --git a/t/recipes/checks/debian/patches/dpatch/legacy-scripts/build-spec/orig/phpfoo b/t/recipes/checks/debian/patches/dpatch/legacy-scripts/build-spec/orig/phpfoo new file mode 100644 index 0000000..e0595e6 --- /dev/null +++ b/t/recipes/checks/debian/patches/dpatch/legacy-scripts/build-spec/orig/phpfoo @@ -0,0 +1,7 @@ +#!/usr/bin/php + + +Dumb PHP script + + + diff --git a/t/recipes/checks/debian/patches/dpatch/legacy-scripts/build-spec/orig/rubyfoo b/t/recipes/checks/debian/patches/dpatch/legacy-scripts/build-spec/orig/rubyfoo new file mode 100644 index 0000000..8024605 --- /dev/null +++ b/t/recipes/checks/debian/patches/dpatch/legacy-scripts/build-spec/orig/rubyfoo @@ -0,0 +1,4 @@ +#!/bin/ruby1.8 + +# Ok, that example is really pathetic, but until we have +# some better code in checks/scripts, it will do diff --git a/t/recipes/checks/debian/patches/dpatch/legacy-scripts/build-spec/orig/sh-broken b/t/recipes/checks/debian/patches/dpatch/legacy-scripts/build-spec/orig/sh-broken new file mode 100644 index 0000000..7b79074 --- /dev/null +++ b/t/recipes/checks/debian/patches/dpatch/legacy-scripts/build-spec/orig/sh-broken @@ -0,0 +1,2 @@ +#!/bin/sh +if fi diff --git a/t/recipes/checks/debian/patches/dpatch/legacy-scripts/build-spec/orig/suidperlfoo b/t/recipes/checks/debian/patches/dpatch/legacy-scripts/build-spec/orig/suidperlfoo new file mode 100644 index 0000000..bcbc471 --- /dev/null +++ b/t/recipes/checks/debian/patches/dpatch/legacy-scripts/build-spec/orig/suidperlfoo @@ -0,0 +1,3 @@ +#! /usr/bin/suidperl + +print "Hello, World!"; diff --git a/t/recipes/checks/debian/patches/dpatch/legacy-scripts/build-spec/orig/tkfoo b/t/recipes/checks/debian/patches/dpatch/legacy-scripts/build-spec/orig/tkfoo new file mode 100755 index 0000000..533595a --- /dev/null +++ b/t/recipes/checks/debian/patches/dpatch/legacy-scripts/build-spec/orig/tkfoo @@ -0,0 +1,31 @@ +#!/bin/sh +# +# Insane amount of empty lines and comments + +# +# +# +# + +# +# + +# +# +# + +# +# + +# +# This line makes the next one a comment in Tcl \ +exec wish "$0" -- ${1+"$@"} + +# lintian should not check the following for syntax +# if it detects the line above correctly +# Code snippet taken from eTkTab + +if { [array names prefs keybindings] != "" } { + # Read in the file + array set unparsed_bindings [ read_settings_file $prefs(keybindings)] +} diff --git a/t/recipes/checks/debian/patches/dpatch/legacy-scripts/build-spec/orig/wishfoo b/t/recipes/checks/debian/patches/dpatch/legacy-scripts/build-spec/orig/wishfoo new file mode 100644 index 0000000..035c9ad --- /dev/null +++ b/t/recipes/checks/debian/patches/dpatch/legacy-scripts/build-spec/orig/wishfoo @@ -0,0 +1,4 @@ +#!/usr/bin/wish +# +# This is not actually a wish script, here to force a test of wish +# dependencies. diff --git a/t/recipes/checks/debian/patches/dpatch/legacy-scripts/build-spec/orig/xsession-test b/t/recipes/checks/debian/patches/dpatch/legacy-scripts/build-spec/orig/xsession-test new file mode 100644 index 0000000..ca49d72 --- /dev/null +++ b/t/recipes/checks/debian/patches/dpatch/legacy-scripts/build-spec/orig/xsession-test @@ -0,0 +1,3 @@ +#!/bin/sh + +echo "Foo." diff --git a/t/recipes/checks/debian/patches/dpatch/legacy-scripts/build-spec/pre-build b/t/recipes/checks/debian/patches/dpatch/legacy-scripts/build-spec/pre-build new file mode 100755 index 0000000..b5649a8 --- /dev/null +++ b/t/recipes/checks/debian/patches/dpatch/legacy-scripts/build-spec/pre-build @@ -0,0 +1,5 @@ +#!/bin/sh + +DIR="$1" + +rm -f "$DIR/debian/compat" diff --git a/t/recipes/checks/debian/patches/dpatch/legacy-scripts/eval/desc b/t/recipes/checks/debian/patches/dpatch/legacy-scripts/eval/desc new file mode 100644 index 0000000..0dd0b1d --- /dev/null +++ b/t/recipes/checks/debian/patches/dpatch/legacy-scripts/eval/desc @@ -0,0 +1,2 @@ +Testname: legacy-scripts +Check: debian/patches/dpatch diff --git a/t/recipes/checks/debian/patches/dpatch/legacy-scripts/eval/hints b/t/recipes/checks/debian/patches/dpatch/legacy-scripts/eval/hints new file mode 100644 index 0000000..4a90e73 --- /dev/null +++ b/t/recipes/checks/debian/patches/dpatch/legacy-scripts/eval/hints @@ -0,0 +1,5 @@ +scripts (source): package-uses-deprecated-dpatch-patch-system +scripts (source): dpatch-missing-description [debian/patches/04_i_dont_have_a_description_either.patch] +scripts (source): dpatch-missing-description [debian/patches/02_i_dont_have_a_description.patch] +scripts (source): dpatch-index-references-non-existent-patch 01_some_other_patch_thats_not_in_the_package.dpatch +scripts (source): dpatch-index-references-non-existent-patch 01_not_here_right_now.dpatch diff --git a/t/recipes/checks/debian/patches/dpatch/legacy-scripts/eval/post-test b/t/recipes/checks/debian/patches/dpatch/legacy-scripts/eval/post-test new file mode 100644 index 0000000..faeef0b --- /dev/null +++ b/t/recipes/checks/debian/patches/dpatch/legacy-scripts/eval/post-test @@ -0,0 +1 @@ +s/\(current is ([0-9]+\.)+[0-9]\)/(current is CURRENT)/ diff --git a/t/recipes/checks/debian/patches/dpatch/patch-systems-dpatch-description/build-spec/debian/README.source b/t/recipes/checks/debian/patches/dpatch/patch-systems-dpatch-description/build-spec/debian/README.source new file mode 100644 index 0000000..4ff54b4 --- /dev/null +++ b/t/recipes/checks/debian/patches/dpatch/patch-systems-dpatch-description/build-spec/debian/README.source @@ -0,0 +1 @@ +I am using dpatch. diff --git a/t/recipes/checks/debian/patches/dpatch/patch-systems-dpatch-description/build-spec/debian/patches/00list b/t/recipes/checks/debian/patches/dpatch/patch-systems-dpatch-description/build-spec/debian/patches/00list new file mode 100644 index 0000000..52ee366 --- /dev/null +++ b/t/recipes/checks/debian/patches/dpatch/patch-systems-dpatch-description/build-spec/debian/patches/00list @@ -0,0 +1,12 @@ +01_not_here_right_now.dpatch + +# some comment +/* some more + elaborate comment + which needs DPATCH_OPTION_CPP=1 + */02_i_dont_have_a_description.patch 03_specified_without_dpatch + +// and again a comment + +04_i_dont_have_a_description_either.patch +05_dep3.diff diff --git a/t/recipes/checks/debian/patches/dpatch/patch-systems-dpatch-description/build-spec/debian/patches/00list.sparc b/t/recipes/checks/debian/patches/dpatch/patch-systems-dpatch-description/build-spec/debian/patches/00list.sparc new file mode 100644 index 0000000..8b47ab3 --- /dev/null +++ b/t/recipes/checks/debian/patches/dpatch/patch-systems-dpatch-description/build-spec/debian/patches/00list.sparc @@ -0,0 +1 @@ +01_some_other_patch_thats_not_in_the_package.dpatch diff --git a/t/recipes/checks/debian/patches/dpatch/patch-systems-dpatch-description/build-spec/debian/patches/00options b/t/recipes/checks/debian/patches/dpatch/patch-systems-dpatch-description/build-spec/debian/patches/00options new file mode 100644 index 0000000..57ffeb6 --- /dev/null +++ b/t/recipes/checks/debian/patches/dpatch/patch-systems-dpatch-description/build-spec/debian/patches/00options @@ -0,0 +1 @@ +DPATCH_OPTION_CPP=1 diff --git a/t/recipes/checks/debian/patches/dpatch/patch-systems-dpatch-description/build-spec/debian/patches/02_i_dont_have_a_description.patch b/t/recipes/checks/debian/patches/dpatch/patch-systems-dpatch-description/build-spec/debian/patches/02_i_dont_have_a_description.patch new file mode 100644 index 0000000..9279c1b --- /dev/null +++ b/t/recipes/checks/debian/patches/dpatch/patch-systems-dpatch-description/build-spec/debian/patches/02_i_dont_have_a_description.patch @@ -0,0 +1,7 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 02_i_dont_have_a_description.patch.dpatch by Marc 'HE' Brockschmidt > +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: No description. + +@DPATCH@ diff --git a/t/recipes/checks/debian/patches/dpatch/patch-systems-dpatch-description/build-spec/debian/patches/03_specified_without_dpatch.dpatch b/t/recipes/checks/debian/patches/dpatch/patch-systems-dpatch-description/build-spec/debian/patches/03_specified_without_dpatch.dpatch new file mode 100644 index 0000000..8303ac6 --- /dev/null +++ b/t/recipes/checks/debian/patches/dpatch/patch-systems-dpatch-description/build-spec/debian/patches/03_specified_without_dpatch.dpatch @@ -0,0 +1,5 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## All lines beginning with `## DP:' are a description of the patch. +## DP: Listed in 00list without .dpatch suffix. + +@DPATCH@ diff --git a/t/recipes/checks/debian/patches/dpatch/patch-systems-dpatch-description/build-spec/debian/patches/04_i_dont_have_a_description_either.patch b/t/recipes/checks/debian/patches/dpatch/patch-systems-dpatch-description/build-spec/debian/patches/04_i_dont_have_a_description_either.patch new file mode 100644 index 0000000..b603f16 --- /dev/null +++ b/t/recipes/checks/debian/patches/dpatch/patch-systems-dpatch-description/build-spec/debian/patches/04_i_dont_have_a_description_either.patch @@ -0,0 +1,7 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 04_i_dont_have_a_description_either.patch by Adam D. Barratt +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: + +@DPATCH@ diff --git a/t/recipes/checks/debian/patches/dpatch/patch-systems-dpatch-description/build-spec/debian/patches/05_dep3.diff b/t/recipes/checks/debian/patches/dpatch/patch-systems-dpatch-description/build-spec/debian/patches/05_dep3.diff new file mode 100644 index 0000000..5cbb237 --- /dev/null +++ b/t/recipes/checks/debian/patches/dpatch/patch-systems-dpatch-description/build-spec/debian/patches/05_dep3.diff @@ -0,0 +1,7 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 05_dep3.diff by Russ Allbery +# +# Description: Patch using the DEP 3 patch header +# Author: Russ Allbery + +@DPATCH@ diff --git a/t/recipes/checks/debian/patches/dpatch/patch-systems-dpatch-description/build-spec/fill-values b/t/recipes/checks/debian/patches/dpatch/patch-systems-dpatch-description/build-spec/fill-values new file mode 100644 index 0000000..cb818e9 --- /dev/null +++ b/t/recipes/checks/debian/patches/dpatch/patch-systems-dpatch-description/build-spec/fill-values @@ -0,0 +1,4 @@ +Skeleton: upload-native +Testname: patch-systems-dpatch-description +Description: Test patch-system tags for a dpatch package +Extra-Build-Depends: dpatch diff --git a/t/recipes/checks/debian/patches/dpatch/patch-systems-dpatch-description/eval/desc b/t/recipes/checks/debian/patches/dpatch/patch-systems-dpatch-description/eval/desc new file mode 100644 index 0000000..7212807 --- /dev/null +++ b/t/recipes/checks/debian/patches/dpatch/patch-systems-dpatch-description/eval/desc @@ -0,0 +1,2 @@ +Testname: patch-systems-dpatch-description +Check: debian/patches/dpatch diff --git a/t/recipes/checks/debian/patches/dpatch/patch-systems-dpatch-description/eval/hints b/t/recipes/checks/debian/patches/dpatch/patch-systems-dpatch-description/eval/hints new file mode 100644 index 0000000..f617634 --- /dev/null +++ b/t/recipes/checks/debian/patches/dpatch/patch-systems-dpatch-description/eval/hints @@ -0,0 +1,5 @@ +patch-systems-dpatch-description (source): package-uses-deprecated-dpatch-patch-system +patch-systems-dpatch-description (source): dpatch-missing-description [debian/patches/04_i_dont_have_a_description_either.patch] +patch-systems-dpatch-description (source): dpatch-missing-description [debian/patches/02_i_dont_have_a_description.patch] +patch-systems-dpatch-description (source): dpatch-index-references-non-existent-patch 01_some_other_patch_thats_not_in_the_package.dpatch +patch-systems-dpatch-description (source): dpatch-index-references-non-existent-patch 01_not_here_right_now.dpatch diff --git a/t/recipes/checks/debian/patches/dpatch/patch-systems-quilt-general/build-spec/debian/README.source b/t/recipes/checks/debian/patches/dpatch/patch-systems-quilt-general/build-spec/debian/README.source new file mode 100644 index 0000000..052084e --- /dev/null +++ b/t/recipes/checks/debian/patches/dpatch/patch-systems-quilt-general/build-spec/debian/README.source @@ -0,0 +1 @@ +Some stuff about quilt here. diff --git a/t/recipes/checks/debian/patches/dpatch/patch-systems-quilt-general/build-spec/debian/patches/README b/t/recipes/checks/debian/patches/dpatch/patch-systems-quilt-general/build-spec/debian/patches/README new file mode 100644 index 0000000..843d249 --- /dev/null +++ b/t/recipes/checks/debian/patches/dpatch/patch-systems-quilt-general/build-spec/debian/patches/README @@ -0,0 +1 @@ +false positive for patch-file-present-but-not-mentioned-in-series tag diff --git a/t/recipes/checks/debian/patches/dpatch/patch-systems-quilt-general/build-spec/debian/patches/README.patches b/t/recipes/checks/debian/patches/dpatch/patch-systems-quilt-general/build-spec/debian/patches/README.patches new file mode 100644 index 0000000..843d249 --- /dev/null +++ b/t/recipes/checks/debian/patches/dpatch/patch-systems-quilt-general/build-spec/debian/patches/README.patches @@ -0,0 +1 @@ +false positive for patch-file-present-but-not-mentioned-in-series tag diff --git a/t/recipes/checks/debian/patches/dpatch/patch-systems-quilt-general/build-spec/debian/patches/file-commented-out b/t/recipes/checks/debian/patches/dpatch/patch-systems-quilt-general/build-spec/debian/patches/file-commented-out new file mode 100644 index 0000000..257cc56 --- /dev/null +++ b/t/recipes/checks/debian/patches/dpatch/patch-systems-quilt-general/build-spec/debian/patches/file-commented-out @@ -0,0 +1 @@ +foo diff --git a/t/recipes/checks/debian/patches/dpatch/patch-systems-quilt-general/build-spec/debian/patches/file-mentioned-in-vendor-series b/t/recipes/checks/debian/patches/dpatch/patch-systems-quilt-general/build-spec/debian/patches/file-mentioned-in-vendor-series new file mode 100644 index 0000000..257cc56 --- /dev/null +++ b/t/recipes/checks/debian/patches/dpatch/patch-systems-quilt-general/build-spec/debian/patches/file-mentioned-in-vendor-series @@ -0,0 +1 @@ +foo diff --git a/t/recipes/checks/debian/patches/dpatch/patch-systems-quilt-general/build-spec/debian/patches/file-not-referenced-in-series b/t/recipes/checks/debian/patches/dpatch/patch-systems-quilt-general/build-spec/debian/patches/file-not-referenced-in-series new file mode 100644 index 0000000..257cc56 --- /dev/null +++ b/t/recipes/checks/debian/patches/dpatch/patch-systems-quilt-general/build-spec/debian/patches/file-not-referenced-in-series @@ -0,0 +1 @@ +foo diff --git a/t/recipes/checks/debian/patches/dpatch/patch-systems-quilt-general/build-spec/debian/patches/series b/t/recipes/checks/debian/patches/dpatch/patch-systems-quilt-general/build-spec/debian/patches/series new file mode 100644 index 0000000..040d7e8 --- /dev/null +++ b/t/recipes/checks/debian/patches/dpatch/patch-systems-quilt-general/build-spec/debian/patches/series @@ -0,0 +1,6 @@ +# tries to create an existing file, which fails in dpkg-source +# some-file +some-other-file -p0 +# non-existent patches trigger error in dpkg-source +# some-nonexistent-patch +# file-commented-out diff --git a/t/recipes/checks/debian/patches/dpatch/patch-systems-quilt-general/build-spec/debian/patches/some-file b/t/recipes/checks/debian/patches/dpatch/patch-systems-quilt-general/build-spec/debian/patches/some-file new file mode 100644 index 0000000..7749d40 --- /dev/null +++ b/t/recipes/checks/debian/patches/dpatch/patch-systems-quilt-general/build-spec/debian/patches/some-file @@ -0,0 +1,11 @@ +Some regular patch creating a file. + +--- /dev/null ++++ debian/debian/some-file +@@ -0,0 +1,6 @@ ++Some ++file ++created ++in ++debian ++directory. diff --git a/t/recipes/checks/debian/patches/dpatch/patch-systems-quilt-general/build-spec/debian/patches/some-other-file b/t/recipes/checks/debian/patches/dpatch/patch-systems-quilt-general/build-spec/debian/patches/some-other-file new file mode 100644 index 0000000..ed24c8f --- /dev/null +++ b/t/recipes/checks/debian/patches/dpatch/patch-systems-quilt-general/build-spec/debian/patches/some-other-file @@ -0,0 +1,12 @@ +Some -p0 patch creating a file. + +--- /dev/null ++++ debian/some-other-file +@@ -0,0 +1,7 @@ ++Some ++other ++file ++created ++in ++debian ++directory. diff --git a/t/recipes/checks/debian/patches/dpatch/patch-systems-quilt-general/build-spec/debian/patches/subdir/README b/t/recipes/checks/debian/patches/dpatch/patch-systems-quilt-general/build-spec/debian/patches/subdir/README new file mode 100644 index 0000000..843d249 --- /dev/null +++ b/t/recipes/checks/debian/patches/dpatch/patch-systems-quilt-general/build-spec/debian/patches/subdir/README @@ -0,0 +1 @@ +false positive for patch-file-present-but-not-mentioned-in-series tag diff --git a/t/recipes/checks/debian/patches/dpatch/patch-systems-quilt-general/build-spec/debian/patches/subdir/file-not-referenced-in-series-2 b/t/recipes/checks/debian/patches/dpatch/patch-systems-quilt-general/build-spec/debian/patches/subdir/file-not-referenced-in-series-2 new file mode 100644 index 0000000..257cc56 --- /dev/null +++ b/t/recipes/checks/debian/patches/dpatch/patch-systems-quilt-general/build-spec/debian/patches/subdir/file-not-referenced-in-series-2 @@ -0,0 +1 @@ +foo diff --git a/t/recipes/checks/debian/patches/dpatch/patch-systems-quilt-general/build-spec/debian/patches/vendorname.series b/t/recipes/checks/debian/patches/dpatch/patch-systems-quilt-general/build-spec/debian/patches/vendorname.series new file mode 100644 index 0000000..4232ed0 --- /dev/null +++ b/t/recipes/checks/debian/patches/dpatch/patch-systems-quilt-general/build-spec/debian/patches/vendorname.series @@ -0,0 +1 @@ +file-mentioned-in-vendor-series diff --git a/t/recipes/checks/debian/patches/dpatch/patch-systems-quilt-general/build-spec/diff/README b/t/recipes/checks/debian/patches/dpatch/patch-systems-quilt-general/build-spec/diff/README new file mode 100644 index 0000000..55d9771 --- /dev/null +++ b/t/recipes/checks/debian/patches/dpatch/patch-systems-quilt-general/build-spec/diff/README @@ -0,0 +1 @@ +Debian README diff --git a/t/recipes/checks/debian/patches/dpatch/patch-systems-quilt-general/build-spec/fill-values b/t/recipes/checks/debian/patches/dpatch/patch-systems-quilt-general/build-spec/fill-values new file mode 100644 index 0000000..ced4b7a --- /dev/null +++ b/t/recipes/checks/debian/patches/dpatch/patch-systems-quilt-general/build-spec/fill-values @@ -0,0 +1,4 @@ +Testname: patch-systems-quilt-general +Skeleton: upload-non-native +Extra-Build-Depends: quilt, dpatch +Description: General tests of a quilt patch system diff --git a/t/recipes/checks/debian/patches/dpatch/patch-systems-quilt-general/eval/desc b/t/recipes/checks/debian/patches/dpatch/patch-systems-quilt-general/eval/desc new file mode 100644 index 0000000..154b396 --- /dev/null +++ b/t/recipes/checks/debian/patches/dpatch/patch-systems-quilt-general/eval/desc @@ -0,0 +1,2 @@ +Testname: patch-systems-quilt-general +Check: debian/patches/dpatch diff --git a/t/recipes/checks/debian/patches/dpatch/patch-systems-quilt-general/eval/hints b/t/recipes/checks/debian/patches/dpatch/patch-systems-quilt-general/eval/hints new file mode 100644 index 0000000..24b71da --- /dev/null +++ b/t/recipes/checks/debian/patches/dpatch/patch-systems-quilt-general/eval/hints @@ -0,0 +1,2 @@ +patch-systems-quilt-general (source): package-uses-deprecated-dpatch-patch-system +patch-systems-quilt-general (source): dpatch-build-dep-but-no-patch-list diff --git a/t/recipes/checks/debian/patches/legacy-debconf/build-spec/debian/changelog.in b/t/recipes/checks/debian/patches/legacy-debconf/build-spec/debian/changelog.in new file mode 100644 index 0000000..f5e308e --- /dev/null +++ b/t/recipes/checks/debian/patches/legacy-debconf/build-spec/debian/changelog.in @@ -0,0 +1,6 @@ +debconf ([% $version %]) [% $distribution %]; urgency=low + + * Initial Release + * Changelog line with exactly 80 characters which tests the line-too-long tag. + + -- Lintian Maintainers Wed, 3 May 2006 18:07:19 -0500 diff --git a/t/recipes/checks/debian/patches/legacy-debconf/build-spec/debian/compat.in b/t/recipes/checks/debian/patches/legacy-debconf/build-spec/debian/compat.in new file mode 100644 index 0000000..640a566 --- /dev/null +++ b/t/recipes/checks/debian/patches/legacy-debconf/build-spec/debian/compat.in @@ -0,0 +1 @@ +[% $dh_compat_level %] diff --git a/t/recipes/checks/debian/patches/legacy-debconf/build-spec/debian/control b/t/recipes/checks/debian/patches/legacy-debconf/build-spec/debian/control new file mode 100644 index 0000000..bf9f4e9 --- /dev/null +++ b/t/recipes/checks/debian/patches/legacy-debconf/build-spec/debian/control @@ -0,0 +1,52 @@ +Source: debconf +Section: utils +Priority: optional +Build-Depends: debhelper (>= 4), dpatch +Maintainer: Lintian Maintainers +Standards-Version: 3.7.2 + +Package: debconf-test +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: Test package for the debconf checks of lintian (dummy) + +Package: debconf-test-noscripts +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: Test package for the debconf checks of lintian (noscripts) + Package missing postinst/postrm/config. + . + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. + +Package: debconf-test-preinst +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: Test package for the debconf checks of lintian (preinst) + Package uses debconf only in preinst. + . + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. + +Package: debconf-test-postinst +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: Test package for the debconf checks of lintian (postinst) + Package uses debconf only in postinst. + . + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. + +Package: debconf-udeb +Section: debian-installer +XC-Package-Type: udeb +XB-Installer-Menu-Item: 100 +Architecture: any +Depends: ${shlibs:Depends} +Description: Test udeb package for the debconf checks of lintian (dummy) diff --git a/t/recipes/checks/debian/patches/legacy-debconf/build-spec/debian/copyright b/t/recipes/checks/debian/patches/legacy-debconf/build-spec/debian/copyright new file mode 100644 index 0000000..84843ee --- /dev/null +++ b/t/recipes/checks/debian/patches/legacy-debconf/build-spec/debian/copyright @@ -0,0 +1,10 @@ +Copyright (C) 2004 Frank Lichtenheld + +Test for really old FSF address: + +Free Software Foundation, Inc., 675 Mass Ave, Cambridge, +MA 02139, USA. + +Test for a dh-make boilerplate: +# Please also look if there are files or directories which have a +# different copyright/license attached and list them here. diff --git a/t/recipes/checks/debian/patches/legacy-debconf/build-spec/debian/debconf-test-noscripts.templates b/t/recipes/checks/debian/patches/legacy-debconf/build-spec/debian/debconf-test-noscripts.templates new file mode 100644 index 0000000..93f8071 --- /dev/null +++ b/t/recipes/checks/debian/patches/legacy-debconf/build-spec/debian/debconf-test-noscripts.templates @@ -0,0 +1,3 @@ +Template: debconf/test +Type: text +_description: Foo bar (1) diff --git a/t/recipes/checks/debian/patches/legacy-debconf/build-spec/debian/debconf-test-postinst.postinst b/t/recipes/checks/debian/patches/legacy-debconf/build-spec/debian/debconf-test-postinst.postinst new file mode 100644 index 0000000..56ab871 --- /dev/null +++ b/t/recipes/checks/debian/patches/legacy-debconf/build-spec/debian/debconf-test-postinst.postinst @@ -0,0 +1,10 @@ +#!/bin/sh +set -e + +. /usr/share/debconf/confmodule + +db_input medium debconf/test + +#DEBHELPER# + +true diff --git a/t/recipes/checks/debian/patches/legacy-debconf/build-spec/debian/debconf-test-postinst.postrm b/t/recipes/checks/debian/patches/legacy-debconf/build-spec/debian/debconf-test-postinst.postrm new file mode 100644 index 0000000..cbf5e3b --- /dev/null +++ b/t/recipes/checks/debian/patches/legacy-debconf/build-spec/debian/debconf-test-postinst.postrm @@ -0,0 +1,7 @@ +#!/bin/sh +set -e +if [ "$1" = purge ] && [ -e /usr/share/debconf/confmodule ]; then + . /usr/share/debconf/confmodule + db_purge +fi +#DEBHELPER# diff --git a/t/recipes/checks/debian/patches/legacy-debconf/build-spec/debian/debconf-test-postinst.templates b/t/recipes/checks/debian/patches/legacy-debconf/build-spec/debian/debconf-test-postinst.templates new file mode 100644 index 0000000..2a2a8ab --- /dev/null +++ b/t/recipes/checks/debian/patches/legacy-debconf/build-spec/debian/debconf-test-postinst.templates @@ -0,0 +1,3 @@ +Template: debconf/test +Type: text +_description: Enter something: diff --git a/t/recipes/checks/debian/patches/legacy-debconf/build-spec/debian/debconf-test-preinst.postrm b/t/recipes/checks/debian/patches/legacy-debconf/build-spec/debian/debconf-test-preinst.postrm new file mode 100644 index 0000000..cbf5e3b --- /dev/null +++ b/t/recipes/checks/debian/patches/legacy-debconf/build-spec/debian/debconf-test-preinst.postrm @@ -0,0 +1,7 @@ +#!/bin/sh +set -e +if [ "$1" = purge ] && [ -e /usr/share/debconf/confmodule ]; then + . /usr/share/debconf/confmodule + db_purge +fi +#DEBHELPER# diff --git a/t/recipes/checks/debian/patches/legacy-debconf/build-spec/debian/debconf-test-preinst.preinst b/t/recipes/checks/debian/patches/legacy-debconf/build-spec/debian/debconf-test-preinst.preinst new file mode 100644 index 0000000..bf6f074 --- /dev/null +++ b/t/recipes/checks/debian/patches/legacy-debconf/build-spec/debian/debconf-test-preinst.preinst @@ -0,0 +1,13 @@ +#!/bin/sh +set -e + +# Obsolete name for the confmodule +. /usr/share/debconf/confmodule.sh + +. /usr/share/debconf/confmodule + +db_input medium debconf/test + +#DEBHELPER# + +true diff --git a/t/recipes/checks/debian/patches/legacy-debconf/build-spec/debian/debconf-test-preinst.templates b/t/recipes/checks/debian/patches/legacy-debconf/build-spec/debian/debconf-test-preinst.templates new file mode 100644 index 0000000..2a2a8ab --- /dev/null +++ b/t/recipes/checks/debian/patches/legacy-debconf/build-spec/debian/debconf-test-preinst.templates @@ -0,0 +1,3 @@ +Template: debconf/test +Type: text +_description: Enter something: diff --git a/t/recipes/checks/debian/patches/legacy-debconf/build-spec/debian/debconf-test.config b/t/recipes/checks/debian/patches/legacy-debconf/build-spec/debian/debconf-test.config new file mode 100644 index 0000000..9e32d06 --- /dev/null +++ b/t/recipes/checks/debian/patches/legacy-debconf/build-spec/debian/debconf-test.config @@ -0,0 +1,24 @@ +#!/bin/sh + +set -e + +. /usr/share/debconf/confmodule + +db_settitle "Funky lintian test" + +# Bad priorities. +db_text LOW debconf/test +db_input normal debconf/test + +# Valid priorities. +db_text \ +high debconf/test +foo=medium +db_input $foo debconf/test +db_input "$foo" debconf/test +db_input 'medium' debconf/test + +# debconf/transtring should not be flagged as unused +# (it's aliased to debconf/alias, which is used) +db_register debconf/transtring debconf/alias +db_input medium debconf/alias diff --git a/t/recipes/checks/debian/patches/legacy-debconf/build-spec/debian/debconf-test.postinst b/t/recipes/checks/debian/patches/legacy-debconf/build-spec/debian/debconf-test.postinst new file mode 100644 index 0000000..b387037 --- /dev/null +++ b/t/recipes/checks/debian/patches/legacy-debconf/build-spec/debian/debconf-test.postinst @@ -0,0 +1,10 @@ +#!/bin/sh + +set -e + +. /usr/share/debconf/confmodule + +# Not supposed to do this here. +db_input medium debconf/test + +true diff --git a/t/recipes/checks/debian/patches/legacy-debconf/build-spec/debian/debconf-test.templates b/t/recipes/checks/debian/patches/legacy-debconf/build-spec/debian/debconf-test.templates new file mode 100644 index 0000000..811bb6c --- /dev/null +++ b/t/recipes/checks/debian/patches/legacy-debconf/build-spec/debian/debconf-test.templates @@ -0,0 +1,101 @@ +Template: debconf/test +Type: text +_description: Foo bar (1) + +Template: debconf/testmulti +Type: multiselect +__Choices: foo, bar, boo +_Description: test comma usages in choices fields + +Template: debconf/testmulti-escape +Type: multiselect +_Choices: foo\, bar, boo +_Description: test escaped comma usages in choices fields: + +Template: debconf/testboolean +Type: boolean +_Description: Enter yes or no: + Do you want to answer this question? + +Template: debconf/teststring +Type: string +_Description: This template goes on and on. + This template goes on and on. + This template goes on and on. + This template goes on and on. + This template goes on and on. + This template goes on and on. + This template goes on and on. + This template goes on and on. + This template goes on and on. + This template goes on and on. + This template goes on and on. + This template goes on and on. + This template goes on and on. + This template goes on and on. + This template goes on and on. + This template goes on and on. + This template goes on and on. + This template goes on and on. + This template goes on and on. + This template goes on and on. + This template goes on and on. + This template goes on and on. + +Template: debconf/testnote +Type: note +Description: This should be a title and not a really long sentence that ends in a regular period. + +Template: debconf/1st-person +Type: select +__Choices: one, two +_Description: Select one of these: + I am a stupid test of first-person syntax that tells you to select yes + even though yes isn't an option in this prompt. + +Template: debconf/internal +Type: boolean +Description: For internal use only + We are testing that style checks are not applied to templates that are + marked as internal. + +Template: debconf/no-description +Type: string + +Template: debconf/translate +Type: boolean +_Default: false +_Description: Should this really be translated? + +Template: debconf/transtring +Type: string +_Default: 1 +_Description: Count of templates: + The number of useless numbers that a translator would have to translate + for this template. + +Template: debconf/language +__Choices: English, Spanish, German, French +# This is the default choice. Translators should put their own language, +# if available, here instead, but the value MUST be the English version +# of the value for the package scripts to work properly. +_Default: English[ translators, see the comment in the PO files] +_Description: The default language, an example of a default that should + be translated. + +Template: debconf/error +Type: error +_Description: An error occurred + This is a sample Debconf error template. + +Template: debconf/should-be-boolean +Type: select +__Choices: yes, no +_Description: Choose: + Pick yes or no. + +Template: debconf/should-be-no-longer-a-problem +Type: boolean +_Description: Decide, lintian + Using "no longer" should no longer be detected as + making-assumptions-about-interfaces-in-templates by lintian. diff --git a/t/recipes/checks/debian/patches/legacy-debconf/build-spec/debian/debconf-test.templates.de b/t/recipes/checks/debian/patches/legacy-debconf/build-spec/debian/debconf-test.templates.de new file mode 100644 index 0000000..f9ea121 --- /dev/null +++ b/t/recipes/checks/debian/patches/legacy-debconf/build-spec/debian/debconf-test.templates.de @@ -0,0 +1,3 @@ +Template: debconf/testmulti +Type: multiselect +Choices: foo, bar\, boo, boo diff --git a/t/recipes/checks/debian/patches/legacy-debconf/build-spec/debian/debconf-test.templates.in b/t/recipes/checks/debian/patches/legacy-debconf/build-spec/debian/debconf-test.templates.in new file mode 100644 index 0000000..e69de29 diff --git a/t/recipes/checks/debian/patches/legacy-debconf/build-spec/debian/debconf-udeb.postinst b/t/recipes/checks/debian/patches/legacy-debconf/build-spec/debian/debconf-udeb.postinst new file mode 100644 index 0000000..4ce41f0 --- /dev/null +++ b/t/recipes/checks/debian/patches/legacy-debconf/build-spec/debian/debconf-udeb.postinst @@ -0,0 +1,9 @@ +#!/bin/sh + +set -e + +. /usr/share/debconf/confmodule + +ldconfig + +true diff --git a/t/recipes/checks/debian/patches/legacy-debconf/build-spec/debian/debconf-udeb.templates b/t/recipes/checks/debian/patches/legacy-debconf/build-spec/debian/debconf-udeb.templates new file mode 100644 index 0000000..5d7cf5a --- /dev/null +++ b/t/recipes/checks/debian/patches/legacy-debconf/build-spec/debian/debconf-udeb.templates @@ -0,0 +1,3 @@ +Template: debian-installer/debconf-udeb/title +Type: text +_description: This is just a test diff --git a/t/recipes/checks/debian/patches/legacy-debconf/build-spec/debian/po/POTFILES.in b/t/recipes/checks/debian/patches/legacy-debconf/build-spec/debian/po/POTFILES.in new file mode 100644 index 0000000..d0c82f0 --- /dev/null +++ b/t/recipes/checks/debian/patches/legacy-debconf/build-spec/debian/po/POTFILES.in @@ -0,0 +1,2 @@ +[type: gettext/rfc822deb] debconf-test.templates +[type: gettext/rfc822deb] debconf-udeb.templates diff --git a/t/recipes/checks/debian/patches/legacy-debconf/build-spec/debian/po/de.po b/t/recipes/checks/debian/patches/legacy-debconf/build-spec/debian/po/de.po new file mode 100644 index 0000000..86c5796 --- /dev/null +++ b/t/recipes/checks/debian/patches/legacy-debconf/build-spec/debian/po/de.po @@ -0,0 +1,66 @@ +# +# Translators, if you are not familiar with the PO format, gettext +# documentation is worth reading, especially sections dedicated to +# this format, e.g. by running: +# info -n '(gettext)PO Files' +# info -n '(gettext)Header Entry' +# +# Some information specific to po-debconf are available at +# /usr/share/doc/po-debconf/README-trans +# or http://www.debian.org/intl/l10n/po-debconf/README-trans +# +# Developers do not need to manually edit POT or PO files. +# +msgid "" +msgstr "" +"Project-Id-Version: debconf-test 1\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2004-12-06 00:51+0100\n" +"PO-Revision-Date: 2004-12-06 01:01+0100\n" +"Last-Translator: Frank Lichtenheld \n" +"Language-Team: debian-l10n-german@l.d.o\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Type: text +#. description +#: ../debconf-test.templates:3 +msgid "Foo bar (2)" +msgstr "" + +#. Type: multiselect +#. Choices +#: ../debconf-test.templates:7 +msgid "foo" +msgstr "foo" + +#. Type: multiselect +#. Choices +#: ../debconf-test.templates:7 +msgid "bar" +msgstr "bar, boo" + +#. Type: multiselect +#. Choices +#: ../debconf-test.templates:7 +msgid "boo" +msgstr "boo" + +#. Type: multiselect +#. Description +#: ../debconf-test.templates:8 +msgid "test comma usages in choices fields" +msgstr "" + +#. Type: multiselect +#. Choices +#: ../debconf-test.templates:11 +msgid "foo\\, bar, boo" +msgstr "foo, bar, boo" + +#. Type: text +#. description +#: ../debconf-udeb.templates:3 +msgid "This is just a test" +msgstr "Dies ist nur ein Test" diff --git a/t/recipes/checks/debian/patches/legacy-debconf/build-spec/debian/po/fr.po b/t/recipes/checks/debian/patches/legacy-debconf/build-spec/debian/po/fr.po new file mode 100644 index 0000000..c74deb2 --- /dev/null +++ b/t/recipes/checks/debian/patches/legacy-debconf/build-spec/debian/po/fr.po @@ -0,0 +1,60 @@ +# +# Translators, if you are not familiar with the PO format, gettext +# documentation is worth reading, especially sections dedicated to +# this format, e.g. by running: +# info -n '(gettext)PO Files' +# info -n '(gettext)Header Entry' +# +# Some information specific to po-debconf are available at +# /usr/share/doc/po-debconf/README-trans +# or http://www.debian.org/intl/l10n/po-debconf/README-trans +# +# Developers do not need to manually edit POT or PO files. +# +msgid "" +msgstr "" +"Project-Id-Version: debconf-test 1\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2004-12-06 00:51+0100\n" +"PO-Revision-Date: 2005-10-13 15:03+0200\n" +"Last-Translator: Frank Lichtenheld \n" +"Language-Team: debian-l10n-german@l.d.o\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=CHARSET\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Type: text +#. description +#: ../debconf-test.templates:3 +msgid "Foo bar (2)" +msgstr "" + +#. Type: multiselect +#. Choices +#: ../debconf-test.templates:7 +msgid "foo" +msgstr "foo" + +#. Type: multiselect +#. Choices +#: ../debconf-test.templates:7 +msgid "bar" +msgstr "bar, boo" + +#. Type: multiselect +#. Choices +#: ../debconf-test.templates:7 +msgid "boo" +msgstr "boo" + +#. Type: multiselect +#. Description +#: ../debconf-test.templates:8 +msgid "test comma usages in choices fields" +msgstr "" + +#. Type: text +#. description +#: ../debconf-udeb.templates:3 +msgid "This is just a test" +msgstr " diff --git a/t/recipes/checks/debian/patches/legacy-debconf/build-spec/debian/po/lang.po b/t/recipes/checks/debian/patches/legacy-debconf/build-spec/debian/po/lang.po new file mode 100644 index 0000000..7ac498a --- /dev/null +++ b/t/recipes/checks/debian/patches/legacy-debconf/build-spec/debian/po/lang.po @@ -0,0 +1,15 @@ +msgid "" +msgstr "" +"Project-Id-Version: debconf-test 1\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2004-12-06 00:51+0100\n" +"PO-Revision-Date: 2005-10-13 15:03+0200\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Type: text +#. description +#: ../debconf-test.templates:3 +msgid "Foo bar (2)" +msgstr "" diff --git a/t/recipes/checks/debian/patches/legacy-debconf/build-spec/debian/po/nds.po b/t/recipes/checks/debian/patches/legacy-debconf/build-spec/debian/po/nds.po new file mode 100644 index 0000000..7ac498a --- /dev/null +++ b/t/recipes/checks/debian/patches/legacy-debconf/build-spec/debian/po/nds.po @@ -0,0 +1,15 @@ +msgid "" +msgstr "" +"Project-Id-Version: debconf-test 1\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2004-12-06 00:51+0100\n" +"PO-Revision-Date: 2005-10-13 15:03+0200\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Type: text +#. description +#: ../debconf-test.templates:3 +msgid "Foo bar (2)" +msgstr "" diff --git a/t/recipes/checks/debian/patches/legacy-debconf/build-spec/debian/po/output b/t/recipes/checks/debian/patches/legacy-debconf/build-spec/debian/po/output new file mode 100644 index 0000000..c3df1a5 --- /dev/null +++ b/t/recipes/checks/debian/patches/legacy-debconf/build-spec/debian/po/output @@ -0,0 +1 @@ +2 utf8 diff --git a/t/recipes/checks/debian/patches/legacy-debconf/build-spec/debian/po/pt_BR.po b/t/recipes/checks/debian/patches/legacy-debconf/build-spec/debian/po/pt_BR.po new file mode 100644 index 0000000..7ac498a --- /dev/null +++ b/t/recipes/checks/debian/patches/legacy-debconf/build-spec/debian/po/pt_BR.po @@ -0,0 +1,15 @@ +msgid "" +msgstr "" +"Project-Id-Version: debconf-test 1\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2004-12-06 00:51+0100\n" +"PO-Revision-Date: 2005-10-13 15:03+0200\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Type: text +#. description +#: ../debconf-test.templates:3 +msgid "Foo bar (2)" +msgstr "" diff --git a/t/recipes/checks/debian/patches/legacy-debconf/build-spec/debian/po/sample-file.po b/t/recipes/checks/debian/patches/legacy-debconf/build-spec/debian/po/sample-file.po new file mode 100644 index 0000000..8dcc0ff --- /dev/null +++ b/t/recipes/checks/debian/patches/legacy-debconf/build-spec/debian/po/sample-file.po @@ -0,0 +1 @@ +This is some file that isn't actually a valid .po file. diff --git a/t/recipes/checks/debian/patches/legacy-debconf/build-spec/debian/po/templates.pot b/t/recipes/checks/debian/patches/legacy-debconf/build-spec/debian/po/templates.pot new file mode 100644 index 0000000..914c77f --- /dev/null +++ b/t/recipes/checks/debian/patches/legacy-debconf/build-spec/debian/po/templates.pot @@ -0,0 +1,61 @@ +# +# Translators, if you are not familiar with the PO format, gettext +# documentation is worth reading, especially sections dedicated to +# this format, e.g. by running: +# info -n '(gettext)PO Files' +# info -n '(gettext)Header Entry' +# +# Some information specific to po-debconf are available at +# /usr/share/doc/po-debconf/README-trans +# or http://www.debian.org/intl/l10n/po-debconf/README-trans +# +# Developers do not need to manually edit POT or PO files. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2004-12-06 00:51+0100\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=CHARSET\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Type: text +#. description +#: ../debconf-test.templates:3 +msgid "Foo bar (2)" +msgstr "" + +#. Type: multiselect +#. Choices +#: ../debconf-test.templates:7 +msgid "foo" +msgstr "" + +#. Type: multiselect +#. Choices +#: ../debconf-test.templates:7 +msgid "bar" +msgstr "" + +#. Type: multiselect +#. Choices +#: ../debconf-test.templates:7 +msgid "boo" +msgstr "" + +#. Type: multiselect +#. Description +#: ../debconf-test.templates:8 +msgid "test comma usages in choices fields" +msgstr "" + +#. Type: text +#. description +#: ../debconf-udeb.templates:3 +msgid "This is just a test" +msgstr "" diff --git a/t/recipes/checks/debian/patches/legacy-debconf/build-spec/debian/pycompat b/t/recipes/checks/debian/patches/legacy-debconf/build-spec/debian/pycompat new file mode 100644 index 0000000..0cfbf08 --- /dev/null +++ b/t/recipes/checks/debian/patches/legacy-debconf/build-spec/debian/pycompat @@ -0,0 +1 @@ +2 diff --git a/t/recipes/checks/debian/patches/legacy-debconf/build-spec/debian/pyversions b/t/recipes/checks/debian/patches/legacy-debconf/build-spec/debian/pyversions new file mode 100644 index 0000000..6f290b0 --- /dev/null +++ b/t/recipes/checks/debian/patches/legacy-debconf/build-spec/debian/pyversions @@ -0,0 +1 @@ +>= 2.7 diff --git a/t/recipes/checks/debian/patches/legacy-debconf/build-spec/debian/rules b/t/recipes/checks/debian/patches/legacy-debconf/build-spec/debian/rules new file mode 100755 index 0000000..933901a --- /dev/null +++ b/t/recipes/checks/debian/patches/legacy-debconf/build-spec/debian/rules @@ -0,0 +1,64 @@ +#!/usr/bin/make -f + +deb_dir = debian/debconf +udeb_dir = debian/debconf-udeb +build_dirs = $(deb_dir) $(udeb_dir) + +build-indep: +# There are no architecture-independent files to be built +# by this package. If there were any they would be made +# here. + +build-arch: + dh_testdir + touch build + +build: build-indep build-arch + +clean: + dh_testdir + dh_testroot + -rm -f build + + dh_clean + +binary-indep: build +# There are no architecture-independent files to be uploaded +# generated by this package. If there were any they would be +# made here. + +binary-arch: build + dh_testdir + dh_testroot + dh_prep + dh_installdirs -a + + dh_installchangelogs -a + dh_installdocs -a + dh_installdebconf -pdebconf-test + dh_installdebconf -pdebconf-test-noscripts --noscripts + dh_installdebconf -pdebconf-test-preinst --noscripts + dh_installdebconf -pdebconf-test-postinst --noscripts + dh_installdebconf -pdebconf-udeb + + + + + dh_compress -a + dh_fixperms -a + +# The shlibs stuff doesn't matter here so do it in a weird order to +# test warnings. + dh_installdeb -a + dh_shlibdeps -a + dh_makeshlibs -a + dh_gencontrol -a + dh_md5sums + dh_builddeb -a + dh_makeshlibs -a + +# Below here is fairly generic really + +binary: binary-indep binary-arch + +.PHONY: build-arch build-indep build binary binary-arch binary-indep clean checkroot diff --git a/t/recipes/checks/debian/patches/legacy-debconf/build-spec/fill-values b/t/recipes/checks/debian/patches/legacy-debconf/build-spec/fill-values new file mode 100644 index 0000000..186615f --- /dev/null +++ b/t/recipes/checks/debian/patches/legacy-debconf/build-spec/fill-values @@ -0,0 +1,6 @@ +Skeleton: upload-native +Testname: legacy-debconf +Source: debconf +Version: 1~rc1 +Description: Legacy test "debconf" +Default-Build-Depends: debhelper (>= [% $dh_compat_level %]~) diff --git a/t/recipes/checks/debian/patches/legacy-debconf/eval/desc b/t/recipes/checks/debian/patches/legacy-debconf/eval/desc new file mode 100644 index 0000000..3043d9c --- /dev/null +++ b/t/recipes/checks/debian/patches/legacy-debconf/eval/desc @@ -0,0 +1,2 @@ +Testname: legacy-debconf +Check: debian/patches diff --git a/t/recipes/checks/debian/patches/legacy-debconf/eval/hints b/t/recipes/checks/debian/patches/legacy-debconf/eval/hints new file mode 100644 index 0000000..d46c37c --- /dev/null +++ b/t/recipes/checks/debian/patches/legacy-debconf/eval/hints @@ -0,0 +1,2 @@ +debconf (source): patch-system-but-no-source-readme +debconf (source): patch-system dpatch diff --git a/t/recipes/checks/debian/patches/legacy-debconf/eval/post-test b/t/recipes/checks/debian/patches/legacy-debconf/eval/post-test new file mode 100644 index 0000000..faeef0b --- /dev/null +++ b/t/recipes/checks/debian/patches/legacy-debconf/eval/post-test @@ -0,0 +1 @@ +s/\(current is ([0-9]+\.)+[0-9]\)/(current is CURRENT)/ diff --git a/t/recipes/checks/debian/patches/legacy-relations/build-spec/debian/changelog.in b/t/recipes/checks/debian/patches/legacy-relations/build-spec/debian/changelog.in new file mode 100644 index 0000000..9a82ea7 --- /dev/null +++ b/t/recipes/checks/debian/patches/legacy-relations/build-spec/debian/changelog.in @@ -0,0 +1,33 @@ +relations ([% $version %]) [% $distribution %]; urgency=low + + * I'm orphaning this package -- I'm sick of it: it's completely broken, + lintian complains all over the place. + + -- Jeroen van Wolffelaar Sun, 02 Dec 2007 15:59:59 -0800 + +relations (4) unstable; urgency=low + + * Added a package that tests dependencies for multiple versions of + libraries, and test some description stuff in there as well. + + -- Josip Rodin Fri, 29 Nov 2002 20:13:33 +0100 + +relations (3) unstable; urgency=low + + * Added a virtual provides to test against my virtual depends without + a real package first test + + -- Sean 'Shaleh' Perry Thu, 8 Feb 2001 11:29:53 -0800 + +relations (2) unstable; urgency=low + + * Added a depends on dpkg (violates policy) and a versioned depends + on bash (follows policy) + + -- Sean 'Shaleh' Perry Fri, 2 Feb 2001 12:37:17 -0800 + +relations (1) unstable; urgency=low + + * Initial version + + -- Richard Braakman Tue, 7 Jul 1998 16:27:56 +0200 diff --git a/t/recipes/checks/debian/patches/legacy-relations/build-spec/debian/control b/t/recipes/checks/debian/patches/legacy-relations/build-spec/debian/control new file mode 100644 index 0000000..6cd1c04 --- /dev/null +++ b/t/recipes/checks/debian/patches/legacy-relations/build-spec/debian/control @@ -0,0 +1,51 @@ +Source: relations +Section: misc +Priority: optional +Build-Depends: mail-transport-agent, libc6-dev, findutils, foo (= 3) [!amd64 !i386], bar, arch-test1 [i386], arch-test2 [!i386], quilt (>= 0.40), perl +Build-Depends-Indep: make, bash, debmake, build-essential, baz (= 2.0), ghostscript | gs, + car (>= 1.0), car (<= 2.0), caz (= 1.0) [amd64], caz (>= 2.0) [i386], + caz (= 2.0) [powerpc], perl (>= 5.0), foo (<< 4) [!amd64 !i386], libfoo (>= 1.2-1), bozzle [kfreebsd-i386] +Build-Conflicts: foo [amd64 i386], bar [alpha test], xlibs-dev, arch-test1 [powerpc], arch-test2 [!sparc] +Build-Conflicts-Indep: debmake [!powerpc] +Maintainer: Debian QA Group +Standards-Version: 3.7.3 +Homepage: lintian.debian.org +Origin: Debian +Bugs: debbugs://bugs.debian.org/ + +Package: relations +Architecture: all +Section: contrib/misc +Pre-Depends: awk|gawk +Depends: relations(<< 3), dpkg, bash (>> 2.0 ), mail-transport-agent, gawk | awk, foo (>> 2.0), foo (<< 2.2), coreutils, ,null (>= 0), ${misc:Depends}, makedev +Provides: mail-reader +Replaces: relations +Conflicts: foobar (<< 5+5), foo, relations, + gnuwdf, +Suggests: alpha, gnu (>= 44-3-4-8-11.4) | ung (<< 89beta) | nug | ngu, beta, some-other-package +Recommends: emacs21 | emacsen, dpkg, null, some-other-package, ${f-oo:b-ar}, gs | ghostscript | gs-aladdin +Description: Strange dependency relationships (dummy) + This package declares relationships designed to tickle lintian's "fields" + check. It should generate a number of tags for these. + . + The package is built with "dpkg --build --no-check", because some of the + relationships used here are normally rejected by dpkg. + +Package: relations-multiple-libs +Architecture: all +Section: non-free/misc +Depends: libstdc++2.10, libstdc++2.10-glibc2.2, libstdc++3.0, tk8.2, tk8.3, tcl8.0, tcl8.2, tkx8.2, tkx8.3, tclx8.2, libpng2, libpng3, xorg, ${shlibs:Depends}, makedev | udev +Provides: awk +Enhances: foo +Recommends: ${shlibs:Depends}, relations-multiple-libs, gs | gs-gpl, makedev +Breaks: libpng3 (<< 1.0), libpng2 +Suggests: x-dev, ghostscript | gs +Description: Duplicate library dependency relationships. + Duplicate library dependency relationships. + This tests the depending on different versions of the same library + at the same time. + . + At the same time, it conveniently tests some description file checks. :) + . + It is a metapackage from the lintian perspective, so the xorg dependency + should be allowed. diff --git a/t/recipes/checks/debian/patches/legacy-relations/build-spec/debian/rules b/t/recipes/checks/debian/patches/legacy-relations/build-spec/debian/rules new file mode 100755 index 0000000..5027f33 --- /dev/null +++ b/t/recipes/checks/debian/patches/legacy-relations/build-spec/debian/rules @@ -0,0 +1,49 @@ +#!/usr/bin/make -f + +# Copyright (C) 1998 Richard Braakman +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +build-arch: + +build-indep: + +build: build-arch build-indep + +binary-arch: + +binary-indep: + install -d debian/tmp/DEBIAN + dpkg-gencontrol -prelations -isp + dpkg --build debian/tmp ../relations_5_all.deb + install -d debian/tmp/usr/share/doc/ + ln -s relations debian/tmp/usr/share/doc/relations-multiple-libs + dpkg-gencontrol -prelations-multiple-libs -isp + dpkg --build debian/tmp ../relations-multiple-libs_5_all.deb + +binary: binary-arch binary-indep + +clean:: + rm -rf debian/tmp debian/files + +# Test allowing quilt Build-Depends for manual quilt invocations. + TESTING=foo ANOTHER=bar quilt || true + +# Test requiring perl Build-Depends for manual perl invocations. + [ ! -f Build ] || $(PERL) Build distclean + +.PHONY: build-arch build-indep build binary-arch binary-indep binary clean diff --git a/t/recipes/checks/debian/patches/legacy-relations/build-spec/debian/tmp/DEBIAN/control b/t/recipes/checks/debian/patches/legacy-relations/build-spec/debian/tmp/DEBIAN/control new file mode 100644 index 0000000..87e7fe6 --- /dev/null +++ b/t/recipes/checks/debian/patches/legacy-relations/build-spec/debian/tmp/DEBIAN/control @@ -0,0 +1,14 @@ +Package: relations-multiple-libs +Version: 4 +Section: misc +Priority: optional +Architecture: all +Depends: libstdc++2.10, libstdc++2.10-glibc2.2, libstdc++3.0, tk8.2, tk8.3, tcl8.0, tcl8.2, tkx8.2, tkx8.3, tclx8.2, libpng2, libpng3 +Installed-Size: 12 +Maintainer: Lintian Maintainer +Source: relations +Description: Duplicate library dependency relationships. + Duplicate library dependency relationships. This tests the depending on + different versions of the same library at the same time. + . + At the same time, it conveniently tests some description file checks. :) diff --git a/t/recipes/checks/debian/patches/legacy-relations/build-spec/fill-values b/t/recipes/checks/debian/patches/legacy-relations/build-spec/fill-values new file mode 100644 index 0000000..7e4661b --- /dev/null +++ b/t/recipes/checks/debian/patches/legacy-relations/build-spec/fill-values @@ -0,0 +1,5 @@ +Skeleton: upload-native +Testname: legacy-relations +Source: relations +Version: 5 +Description: Legacy test "relations" diff --git a/t/recipes/checks/debian/patches/legacy-relations/eval/desc b/t/recipes/checks/debian/patches/legacy-relations/eval/desc new file mode 100644 index 0000000..adcbfe1 --- /dev/null +++ b/t/recipes/checks/debian/patches/legacy-relations/eval/desc @@ -0,0 +1,2 @@ +Testname: legacy-relations +Check: debian/patches diff --git a/t/recipes/checks/debian/patches/legacy-relations/eval/hints b/t/recipes/checks/debian/patches/legacy-relations/eval/hints new file mode 100644 index 0000000..e3cb73d --- /dev/null +++ b/t/recipes/checks/debian/patches/legacy-relations/eval/hints @@ -0,0 +1,2 @@ +relations (source): patch-system-but-no-source-readme +relations (source): patch-system quilt diff --git a/t/recipes/checks/debian/patches/legacy-relations/eval/post-test b/t/recipes/checks/debian/patches/legacy-relations/eval/post-test new file mode 100644 index 0000000..faeef0b --- /dev/null +++ b/t/recipes/checks/debian/patches/legacy-relations/eval/post-test @@ -0,0 +1 @@ +s/\(current is ([0-9]+\.)+[0-9]\)/(current is CURRENT)/ diff --git a/t/recipes/checks/debian/patches/legacy-scripts/build-spec/debian/changelog.in b/t/recipes/checks/debian/patches/legacy-scripts/build-spec/debian/changelog.in new file mode 100644 index 0000000..935c633 --- /dev/null +++ b/t/recipes/checks/debian/patches/legacy-scripts/build-spec/debian/changelog.in @@ -0,0 +1,41 @@ +scripts ([% $version %]) [% $distribution %]; urgency=low + + * I'm also not able to write my name. + * Added a script in /etc/Xsession.d + * Bizarre version number courtesy of + https://wiki.ubuntu.com/SecurityUpdateProcedures#Prepare + + -- Mark 'HE' Brokschmitt Thu, 23 Jun 2005 14:32:39 +0200 + +scripts (5-1) unstable; urgency=low + + * I'm making a typo in my own name... And I want lintian to warn me about + it. + + -- Jeroen van Wolffelaar Sun, 18 Apr 2004 02:26:34 +0200 + +scripts (4-1) unstable; urgency=low + + * Add new example to check that not executable files with a shebang line + called *in don't trigger the script-not-executable warning. + + -- Marc 'HE' Brockschmidt Wed, 14 Apr 2004 19:44:04 +0200 + +scripts (3-3) unstable; urgency=low + + * Add suidperlfoo and some code in debian/rules to + check the new suidperl checks + + -- Frank Lichtenheld Wed, 31 Mar 2004 21:06:20 +0000 + +scripts (2-1) unstable; urgency=low + + * Add tkfoo script for tk checkings + + -- Lintian Maintainers Sat, 21 Feb 2004 17:13:36 +0100 + +scripts (1-0) unstable; urgency=low + + * Initial version + + -- Lintian Maintainers Sat, 10 Feb 2001 15:37:31 -0800 diff --git a/t/recipes/checks/debian/patches/legacy-scripts/build-spec/debian/control.in b/t/recipes/checks/debian/patches/legacy-scripts/build-spec/debian/control.in new file mode 100644 index 0000000..75a521f --- /dev/null +++ b/t/recipes/checks/debian/patches/legacy-scripts/build-spec/debian/control.in @@ -0,0 +1,16 @@ +Source: scripts +Section: interpreters +Priority: optional +Maintainer: Lintian Maintainers +Uploaders: Jeroen van Wolfelaar , Marc 'HE' Brockschmidt +Build-Depends-Indep: dpatch +Standards-Version: 3.2.1 + +Package: scripts +Architecture: [% $package_architecture %] +Depends: test, ruby1.8, build-essential, libssl0.9.7, php7.0-cli +Recommends: tk8.4 | wish +Description: test lintian's script file checks + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. diff --git a/t/recipes/checks/debian/patches/legacy-scripts/build-spec/debian/copyright b/t/recipes/checks/debian/patches/legacy-scripts/build-spec/debian/copyright new file mode 100644 index 0000000..ad8a119 --- /dev/null +++ b/t/recipes/checks/debian/patches/legacy-scripts/build-spec/debian/copyright @@ -0,0 +1,5 @@ +This file contains the phrase "under the same terms as Perl itself" to +trigger warnings about not having common-licenses references. + +This file contains the phrase "public domain" which should suppress +warnings about no copyright date. diff --git a/t/recipes/checks/debian/patches/legacy-scripts/build-spec/debian/patches/00list b/t/recipes/checks/debian/patches/legacy-scripts/build-spec/debian/patches/00list new file mode 100644 index 0000000..3b9d37e --- /dev/null +++ b/t/recipes/checks/debian/patches/legacy-scripts/build-spec/debian/patches/00list @@ -0,0 +1,11 @@ +01_not_here_right_now.dpatch + +# some comment +/* some more + elaborate comment + which needs DPATCH_OPTION_CPP=1 + */02_i_dont_have_a_description.patch 03_specified_without_dpatch + +// and again a comment + +04_i_dont_have_a_description_either.patch diff --git a/t/recipes/checks/debian/patches/legacy-scripts/build-spec/debian/patches/00list.sparc b/t/recipes/checks/debian/patches/legacy-scripts/build-spec/debian/patches/00list.sparc new file mode 100644 index 0000000..8b47ab3 --- /dev/null +++ b/t/recipes/checks/debian/patches/legacy-scripts/build-spec/debian/patches/00list.sparc @@ -0,0 +1 @@ +01_some_other_patch_thats_not_in_the_package.dpatch diff --git a/t/recipes/checks/debian/patches/legacy-scripts/build-spec/debian/patches/00options b/t/recipes/checks/debian/patches/legacy-scripts/build-spec/debian/patches/00options new file mode 100644 index 0000000..57ffeb6 --- /dev/null +++ b/t/recipes/checks/debian/patches/legacy-scripts/build-spec/debian/patches/00options @@ -0,0 +1 @@ +DPATCH_OPTION_CPP=1 diff --git a/t/recipes/checks/debian/patches/legacy-scripts/build-spec/debian/patches/02_i_dont_have_a_description.patch b/t/recipes/checks/debian/patches/legacy-scripts/build-spec/debian/patches/02_i_dont_have_a_description.patch new file mode 100644 index 0000000..9279c1b --- /dev/null +++ b/t/recipes/checks/debian/patches/legacy-scripts/build-spec/debian/patches/02_i_dont_have_a_description.patch @@ -0,0 +1,7 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 02_i_dont_have_a_description.patch.dpatch by Marc 'HE' Brockschmidt > +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: No description. + +@DPATCH@ diff --git a/t/recipes/checks/debian/patches/legacy-scripts/build-spec/debian/patches/03_specified_without_dpatch.dpatch b/t/recipes/checks/debian/patches/legacy-scripts/build-spec/debian/patches/03_specified_without_dpatch.dpatch new file mode 100644 index 0000000..8303ac6 --- /dev/null +++ b/t/recipes/checks/debian/patches/legacy-scripts/build-spec/debian/patches/03_specified_without_dpatch.dpatch @@ -0,0 +1,5 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## All lines beginning with `## DP:' are a description of the patch. +## DP: Listed in 00list without .dpatch suffix. + +@DPATCH@ diff --git a/t/recipes/checks/debian/patches/legacy-scripts/build-spec/debian/patches/04_i_dont_have_a_description_either.patch b/t/recipes/checks/debian/patches/legacy-scripts/build-spec/debian/patches/04_i_dont_have_a_description_either.patch new file mode 100644 index 0000000..b603f16 --- /dev/null +++ b/t/recipes/checks/debian/patches/legacy-scripts/build-spec/debian/patches/04_i_dont_have_a_description_either.patch @@ -0,0 +1,7 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 04_i_dont_have_a_description_either.patch by Adam D. Barratt +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: + +@DPATCH@ diff --git a/t/recipes/checks/debian/patches/legacy-scripts/build-spec/debian/postinst b/t/recipes/checks/debian/patches/legacy-scripts/build-spec/debian/postinst new file mode 100644 index 0000000..7c5baf1 --- /dev/null +++ b/t/recipes/checks/debian/patches/legacy-scripts/build-spec/debian/postinst @@ -0,0 +1,14 @@ +#!/bin/sh + +if [ -x "/etc/init.d/lsb-broken" ] ; then + update-rc.d lsb-broken defaults >/dev/null +fi +if [ -x "/etc/init.d/no-lsb" ] ; then + update-rc.d no-lsb defaults >/dev/null +fi +if [ -x "/etc/init.d/skeleton" ] ; then + update-rc.d skeleton defaults >/dev/null +fi +if [ -x "/etc/init.d/lsb-other" ] ; then + update-rc.d lsb-other defaults >/dev/null +fi diff --git a/t/recipes/checks/debian/patches/legacy-scripts/build-spec/debian/postrm b/t/recipes/checks/debian/patches/legacy-scripts/build-spec/debian/postrm new file mode 100644 index 0000000..8fa75a2 --- /dev/null +++ b/t/recipes/checks/debian/patches/legacy-scripts/build-spec/debian/postrm @@ -0,0 +1,9 @@ +#!/bin/sh -e + +if [ "$1" = purge ] ; then + update-rc.d lsb-broken remove >/dev/null + update-rc.d no-lsb remove >/dev/null + update-rc.d skeleton remove >/dev/null + update-rc.d lsb-other remove >/dev/null + update-rc.d lsb-other remove >/dev/null +fi diff --git a/t/recipes/checks/debian/patches/legacy-scripts/build-spec/debian/preinst b/t/recipes/checks/debian/patches/legacy-scripts/build-spec/debian/preinst new file mode 100644 index 0000000..0799557 --- /dev/null +++ b/t/recipes/checks/debian/patches/legacy-scripts/build-spec/debian/preinst @@ -0,0 +1,15 @@ +#!/bin/sh + +set -e +set -x + +# +# Some comments here +# + +# This serves as an example of an "empty" script, so +# please do not add any real code here, thank you :) + +#DEBHELPER# + +exit 0 diff --git a/t/recipes/checks/debian/patches/legacy-scripts/build-spec/debian/rules b/t/recipes/checks/debian/patches/legacy-scripts/build-spec/debian/rules new file mode 100755 index 0000000..ee3677e --- /dev/null +++ b/t/recipes/checks/debian/patches/legacy-scripts/build-spec/debian/rules @@ -0,0 +1,105 @@ +#!/usr/bin/make -f + +tmp=debian/tmp + +build-arch: + echo "Hi, in an arch: all package, I am a bug!" + +build-indep: + +build: build-arch build-indep + +binary-arch: + echo "Hi, in an arch: all package, I am a bug!" + +binary-indep: + install -d $(tmp)/usr/bin/ + install -d $(tmp)/etc/X11/Xsession.d/ + install -d $(tmp)/etc/init.d/ + install -d $(tmp)/etc/csh/login.d/ + install -d $(tmp)/etc/fish.d/ + install -d $(tmp)/usr/share/scripts/ + install -d $(tmp)/usr/share/doc/scripts/ + install -d $(tmp)/usr/lib/cgi-bin + install -d $(tmp)/usr/src/scripts + install -d $(tmp)/DEBIAN + + install -m 755 csh-foo $(tmp)/etc/csh/login.d/ + install -m 755 envfoo $(tmp)/usr/bin/ + install -m 755 fish-foo $(tmp)/etc/fish.d/ + install -m 755 jruby-broken $(tmp)/usr/bin/ + install -m 755 perlfoo $(tmp)/usr/bin/ + install -m 755 rubyfoo $(tmp)/usr/bin/ +# This doesn't use "env" but should also trigger script-in-usr-share-doc + install -m 755 rubyfoo $(tmp)/usr/share/doc/scripts/ + install -m 755 make-foo $(tmp)/usr/bin/ + install -m 755 lefty-foo $(tmp)/usr/bin/ + install -m 4751 perlfoo $(tmp)/usr/bin/suidperlfoo2 + install -m 755 sh-broken $(tmp)/usr/bin/ + install -m 4555 suidperlfoo $(tmp)/usr/bin/ + install -m 755 tkfoo $(tmp)/usr/bin/ + install -m 755 wishfoo $(tmp)/usr/bin/ + install -m 644 xsession-test $(tmp)/etc/X11/Xsession.d/ + +# Permissions here aren't part of what's being tested, but let us exercise +# some other errors. + install -m 755 perl-bizarre-1 $(tmp)/usr/bin/ + install -m 750 perl-bizarre-2 $(tmp)/usr/bin/ + install -m 754 perl-bizarre-3 $(tmp)/usr/bin/ + install -m 705 guile-bizarre $(tmp)/usr/bin/ + +# First one should produce a warning; second one shouldn't. + install -m 755 gccbug.dpatch $(tmp)/usr/share/scripts/ + install -m 755 gccbug.dpatch $(tmp)/usr/src/scripts/ + + install -m 644 init-skeleton $(tmp)/etc/init.d/skeleton + install -m 755 init-no-lsb $(tmp)/etc/init.d/no-lsb + install -m 755 init-lsb-broken $(tmp)/etc/init.d/lsb-broken + install -m 755 init-lsb-other $(tmp)/etc/init.d/lsb-other + + install -m 755 phpfoo $(tmp)/usr/share/scripts/ + sed 's/php$$/php7.0/' phpfoo > $(tmp)/usr/share/scripts/php7.0foo + chmod 755 $(tmp)/usr/share/scripts/php7.0foo + + install -m 755 phpenvfoo $(tmp)/usr/share/scripts/ + sed 's/php$$/php7.0/' phpenvfoo > $(tmp)/usr/share/scripts/php7.0envfoo + chmod 755 $(tmp)/usr/share/scripts/php7.0envfoo + + echo "#!/usr/bin/perl" >> $(tmp)/usr/share/scripts/foobar.in + chmod 644 $(tmp)/usr/share/scripts/foobar.in + + touch $(tmp)/usr/share/scripts/mono.exe + chmod 755 $(tmp)/usr/share/scripts/mono.exe + + echo "#!/bin/sh" > $(tmp)/usr/share/scripts/foo\$$bar + chmod 755 $(tmp)/usr/share/scripts/foo\$$bar + + echo "#!/bin/sh" > $(tmp)/usr/lib/cgi-bin/cgi-script + chmod 755 $(tmp)/usr/lib/cgi-bin/cgi-script + + echo "#!/bin/sh" > $(tmp)/usr/bin/test.sh + chmod 755 $(tmp)/usr/bin/test.sh + + + dh_testroot # dummy to test missing debhelper dependency + + + install -m 644 debian/changelog $(tmp)/usr/share/doc/scripts/changelog.Debian + gzip -n -9 $(tmp)/usr/share/doc/scripts/changelog.Debian + install -m 644 debian/copyright $(tmp)/usr/share/doc/scripts/copyright + + install -m 644 debian/scripts.conffiles $(tmp)/DEBIAN/conffiles + install -m 755 debian/preinst $(tmp)/DEBIAN/preinst + install -m 755 debian/postinst $(tmp)/DEBIAN/postinst + install -m 755 debian/postrm $(tmp)/DEBIAN/postrm + touch $(tmp)/DEBIAN/prerm + chmod 755 $(tmp)/DEBIAN/prerm + dpkg-gencontrol -isp + dpkg --build $(tmp) .. + +binary: binary-arch binary-indep + +clean: + rm -rf debian/files $(tmp) debian/substvars + +.PHONY: build-arch build-indep build binary-arch binary-indep binary clean diff --git a/t/recipes/checks/debian/patches/legacy-scripts/build-spec/debian/scripts.conffiles b/t/recipes/checks/debian/patches/legacy-scripts/build-spec/debian/scripts.conffiles new file mode 100644 index 0000000..01a371a --- /dev/null +++ b/t/recipes/checks/debian/patches/legacy-scripts/build-spec/debian/scripts.conffiles @@ -0,0 +1,6 @@ +/etc/init.d/lsb-broken +/etc/init.d/lsb-other +/etc/init.d/no-lsb +/etc/X11/Xsession.d/xsession-test +/etc/csh/login.d/csh-foo +/etc/fish.d/fish-foo diff --git a/t/recipes/checks/debian/patches/legacy-scripts/build-spec/debian/watch b/t/recipes/checks/debian/patches/legacy-scripts/build-spec/debian/watch new file mode 100644 index 0000000..dba5815 --- /dev/null +++ b/t/recipes/checks/debian/patches/legacy-scripts/build-spec/debian/watch @@ -0,0 +1,8 @@ +# watch file with upstream version mangling + +version=2 +opts="uversionmangle=s/$/ds/" \ +http://qa.debian.org/watch/sf.php?project=foo scripts\.([\d.]+)\.tar\.gz debian uupdate + +version=3 +http://ftp.sf.net/foo/foo_bar(.+)\.Z 5 uupdate \ No newline at end of file diff --git a/t/recipes/checks/debian/patches/legacy-scripts/build-spec/fill-values b/t/recipes/checks/debian/patches/legacy-scripts/build-spec/fill-values new file mode 100644 index 0000000..8a68457 --- /dev/null +++ b/t/recipes/checks/debian/patches/legacy-scripts/build-spec/fill-values @@ -0,0 +1,6 @@ +Testname: legacy-scripts +Source: scripts +Version: 6ds-1ubuntu0.5.10.1 +Package-Architecture: all +Skeleton: upload-non-native +Description: Legacy test "scripts" diff --git a/t/recipes/checks/debian/patches/legacy-scripts/build-spec/orig/csh-foo b/t/recipes/checks/debian/patches/legacy-scripts/build-spec/orig/csh-foo new file mode 100644 index 0000000..eaf47a1 --- /dev/null +++ b/t/recipes/checks/debian/patches/legacy-scripts/build-spec/orig/csh-foo @@ -0,0 +1,2 @@ +#! /bin/csh + diff --git a/t/recipes/checks/debian/patches/legacy-scripts/build-spec/orig/envfoo b/t/recipes/checks/debian/patches/legacy-scripts/build-spec/orig/envfoo new file mode 100755 index 0000000..e005037 --- /dev/null +++ b/t/recipes/checks/debian/patches/legacy-scripts/build-spec/orig/envfoo @@ -0,0 +1,4 @@ +#! /bin/env python + +if __name__ == '__main__': + print 'Hi there' diff --git a/t/recipes/checks/debian/patches/legacy-scripts/build-spec/orig/fish-foo b/t/recipes/checks/debian/patches/legacy-scripts/build-spec/orig/fish-foo new file mode 100644 index 0000000..7f59139 --- /dev/null +++ b/t/recipes/checks/debian/patches/legacy-scripts/build-spec/orig/fish-foo @@ -0,0 +1,2 @@ +#! /usr/bin/fish + diff --git a/t/recipes/checks/debian/patches/legacy-scripts/build-spec/orig/gccbug.dpatch b/t/recipes/checks/debian/patches/legacy-scripts/build-spec/orig/gccbug.dpatch new file mode 100755 index 0000000..65cbf37 --- /dev/null +++ b/t/recipes/checks/debian/patches/legacy-scripts/build-spec/orig/gccbug.dpatch @@ -0,0 +1,39 @@ +#! /bin/sh -e + +# DP: Use sensible-editor instead of vi as fallback editor + +# Taken from gcc-4.1-source. Chokes bash -n (due to the patch) despite being +# a valid dpatch, so don't warn about it if it's in /usr/src. + +dir= +if [ $# -eq 3 -a "$2" = '-d' ]; then + pdir="-d $3" + dir="$3/" +elif [ $# -ne 1 ]; then + echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" + exit 1 +fi +case "$1" in + -patch) + patch $pdir -f --no-backup-if-mismatch -p0 < $0 + ;; + -unpatch) + patch $pdir -f --no-backup-if-mismatch -R -p0 < $0 + ;; + *) + echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" + exit 1 +esac +exit 0 + +--- gcc/gccbug.in~ 2003-03-01 00:51:42.000000000 +0100 ++++ gcc/gccbug.in 2003-03-02 12:08:36.000000000 +0100 +@@ -134,7 +134,7 @@ + # If they don't have a preferred editor set, then use + if [ -z "$VISUAL" ]; then + if [ -z "$EDITOR" ]; then +- EDIT=vi ++ EDIT=/usr/bin/sensible-editor + else + EDIT="$EDITOR" + fi diff --git a/t/recipes/checks/debian/patches/legacy-scripts/build-spec/orig/guile-bizarre b/t/recipes/checks/debian/patches/legacy-scripts/build-spec/orig/guile-bizarre new file mode 100644 index 0000000..70e2c74 --- /dev/null +++ b/t/recipes/checks/debian/patches/legacy-scripts/build-spec/orig/guile-bizarre @@ -0,0 +1,6 @@ +#! /bin/sh +# -*- scheme -*- +exec guile -s $0 $* +# Seen in the wild as build-guile-gtk in libguilegtk-1.2-dev (0.31-5.1) +# Tests script_is_evil_and_wrong +!# diff --git a/t/recipes/checks/debian/patches/legacy-scripts/build-spec/orig/init-lsb-broken b/t/recipes/checks/debian/patches/legacy-scripts/build-spec/orig/init-lsb-broken new file mode 100644 index 0000000..e4dfa92 --- /dev/null +++ b/t/recipes/checks/debian/patches/legacy-scripts/build-spec/orig/init-lsb-broken @@ -0,0 +1,34 @@ +#! /bin/sh +### BEGIN INIT INFO +# Provides: bad-lsb +# Required-Start: $local_fs $remote_fs +# Required-Stop: +# Default-Start: 1 2 3 4 5 +# Default-Stop: S 0 1 6 X +# Short-Description: Example Lintian initscript +# but this can't be continued +# Description: An example of a bad LSB section in an init script. +# This continuation is allowed (with spaces). +# This one is too (with tabs). +# X-Debian-Foo: Some unknown but valid keyword. +# Foo: Some invalid keyword. + +# Whoops, no terminating line. + +# And then we have this duplicate section. +### BEGIN INIT INFO +# Required-Start: This one doesn't count. +### END INIT INFO + +# Hey, look at all of those missing actions! But stop isn't missing. +case "$1" in + start|stop) + echo "Blah" + ;; + *) + echo "Usage: foo start" >&2 + exit 3 + ;; +esac + +: diff --git a/t/recipes/checks/debian/patches/legacy-scripts/build-spec/orig/init-lsb-other b/t/recipes/checks/debian/patches/legacy-scripts/build-spec/orig/init-lsb-other new file mode 100644 index 0000000..adb4795 --- /dev/null +++ b/t/recipes/checks/debian/patches/legacy-scripts/build-spec/orig/init-lsb-other @@ -0,0 +1,22 @@ +#! /bin/sh +### BEGIN INIT INFO +# Provides: lsb-other +# Required-Start: $local_fs $remote_fs +# Required-Stop: $local_fs $remote_fs +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +# Description: This is another LSB script test, which has a missing +# Short-Description. +### END INIT INFO + +case "$1" in + start|stop|restart|reload|force-reload) + echo "Blah" + ;; + *) + echo "Usage: foo start" >&2 + exit 3 + ;; +esac + +: diff --git a/t/recipes/checks/debian/patches/legacy-scripts/build-spec/orig/init-no-lsb b/t/recipes/checks/debian/patches/legacy-scripts/build-spec/orig/init-no-lsb new file mode 100644 index 0000000..6b994dd --- /dev/null +++ b/t/recipes/checks/debian/patches/legacy-scripts/build-spec/orig/init-no-lsb @@ -0,0 +1,17 @@ +#! /bin/sh +# No LSB section, but otherwise okay. (Well, the messages are bad, but we +# don't check that yet.) + +case "$1" in + start) + echo "Blah starting" + ;; + stop) + echo "Blah stopping" + ;; + restart|force-reload) + echo "Blah restarting" + ;; +esac + +: diff --git a/t/recipes/checks/debian/patches/legacy-scripts/build-spec/orig/init-skeleton b/t/recipes/checks/debian/patches/legacy-scripts/build-spec/orig/init-skeleton new file mode 100644 index 0000000..c868508 --- /dev/null +++ b/t/recipes/checks/debian/patches/legacy-scripts/build-spec/orig/init-skeleton @@ -0,0 +1,150 @@ +#! /bin/sh +### BEGIN INIT INFO +# Provides: skeleton +# Required-Start: $local_fs $remote_fs +# Required-Stop: $local_fs $remote_fs +# Default-Start: 2 3 4 5 +# Default-Stop: S 0 1 6 +# Short-Description: Example Lintian initscript +# Description: This file should be used to construct scripts to be +# placed in /etc/init.d. +### END INIT INFO + +# Do NOT "set -e" + +# PATH should only include /usr/* if it runs after the mountnfs.sh script +PATH=/usr/sbin:/usr/bin:/sbin:/bin +DESC="Description of the service" +NAME=daemonexecutablename +DAEMON=/usr/sbin/$NAME +DAEMON_ARGS="--options args" +PIDFILE=/var/run/$NAME.pid +SCRIPTNAME=/etc/init.d/$NAME + +# Exit if the package is not installed +[ -x "$DAEMON" ] || exit 0 + +# Read configuration variable file if it is present +[ -r /etc/default/$NAME ] && . /etc/default/$NAME + +# Load the VERBOSE setting and other rcS variables +[ -f /etc/default/rcS ] && . /etc/default/rcS + +# Define LSB log_* functions. +# Depend on lsb-base (>= 3.0-6) to ensure that this file is present. +. /lib/lsb/init-functions + +# +# Function that starts the daemon/service +# +do_start() +{ + # Return + # 0 if daemon has been started + # 1 if daemon was already running + # 2 if daemon could not be started + start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON --test > /dev/null \ + || return 1 + start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON -- \ + $DAEMON_ARGS \ + || return 2 + # Add code here, if necessary, that waits for the process to be ready + # to handle requests from services started subsequently which depend + # on this one. As a last resort, sleep for some time. +} + +# +# Function that stops the daemon/service +# +do_stop() +{ + # Return + # 0 if daemon has been stopped + # 1 if daemon was already stopped + # 2 if daemon could not be stopped + # other if a failure occurred + start-stop-daemon --stop --quiet --retry=TERM/30/KILL/5 --pidfile $PIDFILE --name $NAME + RETVAL="$?" + [ "$RETVAL" = 2 ] && return 2 + # Wait for children to finish too if this is a daemon that forks + # and if the daemon is only ever run from this initscript. + # If the above conditions are not satisfied then add some other code + # that waits for the process to drop all resources that could be + # needed by services started subsequently. A last resort is to + # sleep for some time. + start-stop-daemon --stop --quiet --oknodo --retry=0/30/KILL/5 --exec $DAEMON + [ "$?" = 2 ] && return 2 + # Many daemons don't delete their pidfiles when they exit. + rm -f $PIDFILE + return "$RETVAL" +} + +# +# Function that sends a SIGHUP to the daemon/service +# +do_reload() { + # + # If the daemon can reload its configuration without + # restarting (for example, when it is sent a SIGHUP), + # then implement that here. + # + start-stop-daemon --stop --signal 1 --quiet --pidfile $PIDFILE --name $NAME + return 0 +} + +case "$1" in + start) + [ "$VERBOSE" != no ] && log_daemon_msg "Starting $DESC" "$NAME" + do_start + case "$?" in + 0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;; + 2) [ "$VERBOSE" != no ] && log_end_msg 1 ;; + esac + ;; + stop) + [ "$VERBOSE" != no ] && log_daemon_msg "Stopping $DESC" "$NAME" + do_stop + case "$?" in + 0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;; + 2) [ "$VERBOSE" != no ] && log_end_msg 1 ;; + esac + ;; + #reload|force-reload) + # + # If do_reload() is not implemented then leave this commented out + # and leave 'force-reload' as an alias for 'restart'. + # + #log_daemon_msg "Reloading $DESC" "$NAME" + #do_reload + #log_end_msg $? + #;; + restart|force-reload) + # + # If the "reload" option is implemented then remove the + # 'force-reload' alias + # + log_daemon_msg "Restarting $DESC" "$NAME" + do_stop + case "$?" in + 0|1) + do_start + case "$?" in + 0) log_end_msg 0 ;; + 1) log_end_msg 1 ;; # Old process is still running + *) log_end_msg 1 ;; # Failed to start + esac + ;; + *) + # Failed to stop + log_end_msg 1 + ;; + esac + ;; + *) + #echo "Usage: $SCRIPTNAME {start|stop|restart|reload|force-reload}" >&2 + echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload}" >&2 + exit 3 + ;; +esac + +: diff --git a/t/recipes/checks/debian/patches/legacy-scripts/build-spec/orig/jruby-broken b/t/recipes/checks/debian/patches/legacy-scripts/build-spec/orig/jruby-broken new file mode 100644 index 0000000..56f574d --- /dev/null +++ b/t/recipes/checks/debian/patches/legacy-scripts/build-spec/orig/jruby-broken @@ -0,0 +1,2 @@ +#!/usr/bin/jruby +# There's no non-versioned jruby, so this should be an error. diff --git a/t/recipes/checks/debian/patches/legacy-scripts/build-spec/orig/lefty-foo b/t/recipes/checks/debian/patches/legacy-scripts/build-spec/orig/lefty-foo new file mode 100644 index 0000000..52c003e --- /dev/null +++ b/t/recipes/checks/debian/patches/legacy-scripts/build-spec/orig/lefty-foo @@ -0,0 +1,2 @@ +#!/usr/local/bin/lefty + diff --git a/t/recipes/checks/debian/patches/legacy-scripts/build-spec/orig/make-foo b/t/recipes/checks/debian/patches/legacy-scripts/build-spec/orig/make-foo new file mode 100644 index 0000000..6b787b5 --- /dev/null +++ b/t/recipes/checks/debian/patches/legacy-scripts/build-spec/orig/make-foo @@ -0,0 +1,3 @@ +#!/usr/bin/make + + diff --git a/t/recipes/checks/debian/patches/legacy-scripts/build-spec/orig/perl-bizarre-1 b/t/recipes/checks/debian/patches/legacy-scripts/build-spec/orig/perl-bizarre-1 new file mode 100644 index 0000000..fc632c8 --- /dev/null +++ b/t/recipes/checks/debian/patches/legacy-scripts/build-spec/orig/perl-bizarre-1 @@ -0,0 +1,11 @@ +#! /bin/sh +eval '(exit $?0)' && eval 'PERL_BADLANG=x;export PERL_BADLANG;: \ +;exec perl -x -S -- "$0" ${1+"$@"};#'if 0; +eval 'setenv PERL_BADLANG x;exec perl -x -S -- "$0" $argv:q;#'.q+ +#!perl -w +package Htex::a2ping; $0=~/(.*)/s;unshift@INC,'.';do($1);die$@if$@;__END__+if !1; +# This Perl script was generated by JustLib2 at Wed Apr 23 09:14:13 2003. +# Don't touch/remove any lines above; http://www.inf.bme.hu/~pts/justlib + +# The above was actually seen in the wild and stresses the +# script_is_evil_and_wrong test. diff --git a/t/recipes/checks/debian/patches/legacy-scripts/build-spec/orig/perl-bizarre-2 b/t/recipes/checks/debian/patches/legacy-scripts/build-spec/orig/perl-bizarre-2 new file mode 100644 index 0000000..afd9cfe --- /dev/null +++ b/t/recipes/checks/debian/patches/legacy-scripts/build-spec/orig/perl-bizarre-2 @@ -0,0 +1,7 @@ +#!/bin/sh +eval 'exec /usr/bin/perl -wS $0 ${1+"$@"}' + if $running_under_some_shell; + +# I'm someone following perlrun except without using the Perl #! line. +# Now something to choke bash. +while (<>) { if (/%#/) { print } } diff --git a/t/recipes/checks/debian/patches/legacy-scripts/build-spec/orig/perl-bizarre-3 b/t/recipes/checks/debian/patches/legacy-scripts/build-spec/orig/perl-bizarre-3 new file mode 100644 index 0000000..44baf75 --- /dev/null +++ b/t/recipes/checks/debian/patches/legacy-scripts/build-spec/orig/perl-bizarre-3 @@ -0,0 +1,6 @@ +eval '(exit $?0)' && eval 'exec perl -wS $0 ${1+"$@"}' +& eval 'exec /usr/bin/perl -wS $0 $argv:q' + if $running_under_some_shell; + +# More utterly bizarreness from perlrun. This one even doesn't work if +# there's a valid #! line on the first line. I don't understand why.... diff --git a/t/recipes/checks/debian/patches/legacy-scripts/build-spec/orig/perlfoo b/t/recipes/checks/debian/patches/legacy-scripts/build-spec/orig/perlfoo new file mode 100644 index 0000000..5b27ed0 --- /dev/null +++ b/t/recipes/checks/debian/patches/legacy-scripts/build-spec/orig/perlfoo @@ -0,0 +1,3 @@ +#! /usr/bin/perl + +print "Hello, World!"; diff --git a/t/recipes/checks/debian/patches/legacy-scripts/build-spec/orig/phpenvfoo b/t/recipes/checks/debian/patches/legacy-scripts/build-spec/orig/phpenvfoo new file mode 100644 index 0000000..cbbfb2e --- /dev/null +++ b/t/recipes/checks/debian/patches/legacy-scripts/build-spec/orig/phpenvfoo @@ -0,0 +1,7 @@ +#!/usr/bin/env php + + +Dumb PHP script + + + diff --git a/t/recipes/checks/debian/patches/legacy-scripts/build-spec/orig/phpfoo b/t/recipes/checks/debian/patches/legacy-scripts/build-spec/orig/phpfoo new file mode 100644 index 0000000..e0595e6 --- /dev/null +++ b/t/recipes/checks/debian/patches/legacy-scripts/build-spec/orig/phpfoo @@ -0,0 +1,7 @@ +#!/usr/bin/php + + +Dumb PHP script + + + diff --git a/t/recipes/checks/debian/patches/legacy-scripts/build-spec/orig/rubyfoo b/t/recipes/checks/debian/patches/legacy-scripts/build-spec/orig/rubyfoo new file mode 100644 index 0000000..8024605 --- /dev/null +++ b/t/recipes/checks/debian/patches/legacy-scripts/build-spec/orig/rubyfoo @@ -0,0 +1,4 @@ +#!/bin/ruby1.8 + +# Ok, that example is really pathetic, but until we have +# some better code in checks/scripts, it will do diff --git a/t/recipes/checks/debian/patches/legacy-scripts/build-spec/orig/sh-broken b/t/recipes/checks/debian/patches/legacy-scripts/build-spec/orig/sh-broken new file mode 100644 index 0000000..7b79074 --- /dev/null +++ b/t/recipes/checks/debian/patches/legacy-scripts/build-spec/orig/sh-broken @@ -0,0 +1,2 @@ +#!/bin/sh +if fi diff --git a/t/recipes/checks/debian/patches/legacy-scripts/build-spec/orig/suidperlfoo b/t/recipes/checks/debian/patches/legacy-scripts/build-spec/orig/suidperlfoo new file mode 100644 index 0000000..bcbc471 --- /dev/null +++ b/t/recipes/checks/debian/patches/legacy-scripts/build-spec/orig/suidperlfoo @@ -0,0 +1,3 @@ +#! /usr/bin/suidperl + +print "Hello, World!"; diff --git a/t/recipes/checks/debian/patches/legacy-scripts/build-spec/orig/tkfoo b/t/recipes/checks/debian/patches/legacy-scripts/build-spec/orig/tkfoo new file mode 100755 index 0000000..533595a --- /dev/null +++ b/t/recipes/checks/debian/patches/legacy-scripts/build-spec/orig/tkfoo @@ -0,0 +1,31 @@ +#!/bin/sh +# +# Insane amount of empty lines and comments + +# +# +# +# + +# +# + +# +# +# + +# +# + +# +# This line makes the next one a comment in Tcl \ +exec wish "$0" -- ${1+"$@"} + +# lintian should not check the following for syntax +# if it detects the line above correctly +# Code snippet taken from eTkTab + +if { [array names prefs keybindings] != "" } { + # Read in the file + array set unparsed_bindings [ read_settings_file $prefs(keybindings)] +} diff --git a/t/recipes/checks/debian/patches/legacy-scripts/build-spec/orig/wishfoo b/t/recipes/checks/debian/patches/legacy-scripts/build-spec/orig/wishfoo new file mode 100644 index 0000000..035c9ad --- /dev/null +++ b/t/recipes/checks/debian/patches/legacy-scripts/build-spec/orig/wishfoo @@ -0,0 +1,4 @@ +#!/usr/bin/wish +# +# This is not actually a wish script, here to force a test of wish +# dependencies. diff --git a/t/recipes/checks/debian/patches/legacy-scripts/build-spec/orig/xsession-test b/t/recipes/checks/debian/patches/legacy-scripts/build-spec/orig/xsession-test new file mode 100644 index 0000000..ca49d72 --- /dev/null +++ b/t/recipes/checks/debian/patches/legacy-scripts/build-spec/orig/xsession-test @@ -0,0 +1,3 @@ +#!/bin/sh + +echo "Foo." diff --git a/t/recipes/checks/debian/patches/legacy-scripts/build-spec/pre-build b/t/recipes/checks/debian/patches/legacy-scripts/build-spec/pre-build new file mode 100755 index 0000000..b5649a8 --- /dev/null +++ b/t/recipes/checks/debian/patches/legacy-scripts/build-spec/pre-build @@ -0,0 +1,5 @@ +#!/bin/sh + +DIR="$1" + +rm -f "$DIR/debian/compat" diff --git a/t/recipes/checks/debian/patches/legacy-scripts/eval/desc b/t/recipes/checks/debian/patches/legacy-scripts/eval/desc new file mode 100644 index 0000000..2f22144 --- /dev/null +++ b/t/recipes/checks/debian/patches/legacy-scripts/eval/desc @@ -0,0 +1,2 @@ +Testname: legacy-scripts +Check: debian/patches diff --git a/t/recipes/checks/debian/patches/legacy-scripts/eval/hints b/t/recipes/checks/debian/patches/legacy-scripts/eval/hints new file mode 100644 index 0000000..672cda0 --- /dev/null +++ b/t/recipes/checks/debian/patches/legacy-scripts/eval/hints @@ -0,0 +1,3 @@ +scripts (source): patch-system quilt +scripts (source): patch-system dpatch +scripts (source): more-than-one-patch-system diff --git a/t/recipes/checks/debian/patches/legacy-scripts/eval/post-test b/t/recipes/checks/debian/patches/legacy-scripts/eval/post-test new file mode 100644 index 0000000..faeef0b --- /dev/null +++ b/t/recipes/checks/debian/patches/legacy-scripts/eval/post-test @@ -0,0 +1 @@ +s/\(current is ([0-9]+\.)+[0-9]\)/(current is CURRENT)/ diff --git a/t/recipes/checks/debian/patches/patch-systems-dpatch-description/build-spec/debian/README.source b/t/recipes/checks/debian/patches/patch-systems-dpatch-description/build-spec/debian/README.source new file mode 100644 index 0000000..4ff54b4 --- /dev/null +++ b/t/recipes/checks/debian/patches/patch-systems-dpatch-description/build-spec/debian/README.source @@ -0,0 +1 @@ +I am using dpatch. diff --git a/t/recipes/checks/debian/patches/patch-systems-dpatch-description/build-spec/debian/patches/00list b/t/recipes/checks/debian/patches/patch-systems-dpatch-description/build-spec/debian/patches/00list new file mode 100644 index 0000000..52ee366 --- /dev/null +++ b/t/recipes/checks/debian/patches/patch-systems-dpatch-description/build-spec/debian/patches/00list @@ -0,0 +1,12 @@ +01_not_here_right_now.dpatch + +# some comment +/* some more + elaborate comment + which needs DPATCH_OPTION_CPP=1 + */02_i_dont_have_a_description.patch 03_specified_without_dpatch + +// and again a comment + +04_i_dont_have_a_description_either.patch +05_dep3.diff diff --git a/t/recipes/checks/debian/patches/patch-systems-dpatch-description/build-spec/debian/patches/00list.sparc b/t/recipes/checks/debian/patches/patch-systems-dpatch-description/build-spec/debian/patches/00list.sparc new file mode 100644 index 0000000..8b47ab3 --- /dev/null +++ b/t/recipes/checks/debian/patches/patch-systems-dpatch-description/build-spec/debian/patches/00list.sparc @@ -0,0 +1 @@ +01_some_other_patch_thats_not_in_the_package.dpatch diff --git a/t/recipes/checks/debian/patches/patch-systems-dpatch-description/build-spec/debian/patches/00options b/t/recipes/checks/debian/patches/patch-systems-dpatch-description/build-spec/debian/patches/00options new file mode 100644 index 0000000..57ffeb6 --- /dev/null +++ b/t/recipes/checks/debian/patches/patch-systems-dpatch-description/build-spec/debian/patches/00options @@ -0,0 +1 @@ +DPATCH_OPTION_CPP=1 diff --git a/t/recipes/checks/debian/patches/patch-systems-dpatch-description/build-spec/debian/patches/02_i_dont_have_a_description.patch b/t/recipes/checks/debian/patches/patch-systems-dpatch-description/build-spec/debian/patches/02_i_dont_have_a_description.patch new file mode 100644 index 0000000..9279c1b --- /dev/null +++ b/t/recipes/checks/debian/patches/patch-systems-dpatch-description/build-spec/debian/patches/02_i_dont_have_a_description.patch @@ -0,0 +1,7 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 02_i_dont_have_a_description.patch.dpatch by Marc 'HE' Brockschmidt > +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: No description. + +@DPATCH@ diff --git a/t/recipes/checks/debian/patches/patch-systems-dpatch-description/build-spec/debian/patches/03_specified_without_dpatch.dpatch b/t/recipes/checks/debian/patches/patch-systems-dpatch-description/build-spec/debian/patches/03_specified_without_dpatch.dpatch new file mode 100644 index 0000000..8303ac6 --- /dev/null +++ b/t/recipes/checks/debian/patches/patch-systems-dpatch-description/build-spec/debian/patches/03_specified_without_dpatch.dpatch @@ -0,0 +1,5 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## All lines beginning with `## DP:' are a description of the patch. +## DP: Listed in 00list without .dpatch suffix. + +@DPATCH@ diff --git a/t/recipes/checks/debian/patches/patch-systems-dpatch-description/build-spec/debian/patches/04_i_dont_have_a_description_either.patch b/t/recipes/checks/debian/patches/patch-systems-dpatch-description/build-spec/debian/patches/04_i_dont_have_a_description_either.patch new file mode 100644 index 0000000..b603f16 --- /dev/null +++ b/t/recipes/checks/debian/patches/patch-systems-dpatch-description/build-spec/debian/patches/04_i_dont_have_a_description_either.patch @@ -0,0 +1,7 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 04_i_dont_have_a_description_either.patch by Adam D. Barratt +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: + +@DPATCH@ diff --git a/t/recipes/checks/debian/patches/patch-systems-dpatch-description/build-spec/debian/patches/05_dep3.diff b/t/recipes/checks/debian/patches/patch-systems-dpatch-description/build-spec/debian/patches/05_dep3.diff new file mode 100644 index 0000000..5cbb237 --- /dev/null +++ b/t/recipes/checks/debian/patches/patch-systems-dpatch-description/build-spec/debian/patches/05_dep3.diff @@ -0,0 +1,7 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 05_dep3.diff by Russ Allbery +# +# Description: Patch using the DEP 3 patch header +# Author: Russ Allbery + +@DPATCH@ diff --git a/t/recipes/checks/debian/patches/patch-systems-dpatch-description/build-spec/fill-values b/t/recipes/checks/debian/patches/patch-systems-dpatch-description/build-spec/fill-values new file mode 100644 index 0000000..cb818e9 --- /dev/null +++ b/t/recipes/checks/debian/patches/patch-systems-dpatch-description/build-spec/fill-values @@ -0,0 +1,4 @@ +Skeleton: upload-native +Testname: patch-systems-dpatch-description +Description: Test patch-system tags for a dpatch package +Extra-Build-Depends: dpatch diff --git a/t/recipes/checks/debian/patches/patch-systems-dpatch-description/eval/desc b/t/recipes/checks/debian/patches/patch-systems-dpatch-description/eval/desc new file mode 100644 index 0000000..11ff095 --- /dev/null +++ b/t/recipes/checks/debian/patches/patch-systems-dpatch-description/eval/desc @@ -0,0 +1,2 @@ +Testname: patch-systems-dpatch-description +Check: debian/patches diff --git a/t/recipes/checks/debian/patches/patch-systems-dpatch-description/eval/hints b/t/recipes/checks/debian/patches/patch-systems-dpatch-description/eval/hints new file mode 100644 index 0000000..646bd69 --- /dev/null +++ b/t/recipes/checks/debian/patches/patch-systems-dpatch-description/eval/hints @@ -0,0 +1 @@ +patch-systems-dpatch-description (source): patch-system dpatch diff --git a/t/recipes/checks/debian/patches/patch-systems-empty-series/build-spec/debian/README.source b/t/recipes/checks/debian/patches/patch-systems-empty-series/build-spec/debian/README.source new file mode 100644 index 0000000..17250a4 --- /dev/null +++ b/t/recipes/checks/debian/patches/patch-systems-empty-series/build-spec/debian/README.source @@ -0,0 +1 @@ +This package uses quilt. See /usr/share/doc/quilt/README.source. diff --git a/t/recipes/checks/debian/patches/patch-systems-empty-series/build-spec/debian/patches/series b/t/recipes/checks/debian/patches/patch-systems-empty-series/build-spec/debian/patches/series new file mode 100644 index 0000000..e69de29 diff --git a/t/recipes/checks/debian/patches/patch-systems-empty-series/build-spec/fill-values b/t/recipes/checks/debian/patches/patch-systems-empty-series/build-spec/fill-values new file mode 100644 index 0000000..7bfde22 --- /dev/null +++ b/t/recipes/checks/debian/patches/patch-systems-empty-series/build-spec/fill-values @@ -0,0 +1,4 @@ +Skeleton: upload-native +Testname: patch-systems-empty-series +Description: Test for quilt patches with empty series +Extra-Build-Depends: quilt diff --git a/t/recipes/checks/debian/patches/patch-systems-empty-series/eval/desc b/t/recipes/checks/debian/patches/patch-systems-empty-series/eval/desc new file mode 100644 index 0000000..de141e2 --- /dev/null +++ b/t/recipes/checks/debian/patches/patch-systems-empty-series/eval/desc @@ -0,0 +1,3 @@ +Testname: patch-systems-empty-series +See-Also: Debian Bug #525005 +Check: debian/patches diff --git a/t/recipes/checks/debian/patches/patch-systems-empty-series/eval/hints b/t/recipes/checks/debian/patches/patch-systems-empty-series/eval/hints new file mode 100644 index 0000000..c7f9fec --- /dev/null +++ b/t/recipes/checks/debian/patches/patch-systems-empty-series/eval/hints @@ -0,0 +1 @@ +patch-systems-empty-series (source): patch-system quilt diff --git a/t/recipes/checks/debian/patches/patch-systems-no-patch-system/build-spec/diff/README b/t/recipes/checks/debian/patches/patch-systems-no-patch-system/build-spec/diff/README new file mode 100644 index 0000000..c2513f3 --- /dev/null +++ b/t/recipes/checks/debian/patches/patch-systems-no-patch-system/build-spec/diff/README @@ -0,0 +1 @@ +README with some Debian change to create a diff diff --git a/t/recipes/checks/debian/patches/patch-systems-no-patch-system/build-spec/fill-values b/t/recipes/checks/debian/patches/patch-systems-no-patch-system/build-spec/fill-values new file mode 100644 index 0000000..0922b52 --- /dev/null +++ b/t/recipes/checks/debian/patches/patch-systems-no-patch-system/build-spec/fill-values @@ -0,0 +1,4 @@ +Testname: patch-systems-no-patch-system +Skeleton: upload-non-native +Source-Format: 1.0 +Description: Diagnose lack of a patch system diff --git a/t/recipes/checks/debian/patches/patch-systems-no-patch-system/eval/desc b/t/recipes/checks/debian/patches/patch-systems-no-patch-system/eval/desc new file mode 100644 index 0000000..a6feb2f --- /dev/null +++ b/t/recipes/checks/debian/patches/patch-systems-no-patch-system/eval/desc @@ -0,0 +1,2 @@ +Testname: patch-systems-no-patch-system +Check: debian/patches diff --git a/t/recipes/checks/debian/patches/patch-systems-no-patch-system/eval/hints b/t/recipes/checks/debian/patches/patch-systems-no-patch-system/eval/hints new file mode 100644 index 0000000..7e66d4d --- /dev/null +++ b/t/recipes/checks/debian/patches/patch-systems-no-patch-system/eval/hints @@ -0,0 +1 @@ +patch-systems-no-patch-system (source): direct-changes-in-diff-but-no-patch-system README diff --git a/t/recipes/checks/debian/patches/patch-systems-no-readme-source/build-spec/debian/patches/01_this_patch_is_ok b/t/recipes/checks/debian/patches/patch-systems-no-readme-source/build-spec/debian/patches/01_this_patch_is_ok new file mode 100644 index 0000000..7eee707 --- /dev/null +++ b/t/recipes/checks/debian/patches/patch-systems-no-readme-source/build-spec/debian/patches/01_this_patch_is_ok @@ -0,0 +1,7 @@ +This is a description of the patch + +--- a.orig 2008-11-11 19:38:12.000000000 +0000 ++++ a 2008-11-11 19:38:26.000000000 +0000 +@@ -1 +1,2 @@ + sample text ++and some more sample text diff --git a/t/recipes/checks/debian/patches/patch-systems-no-readme-source/build-spec/debian/patches/series b/t/recipes/checks/debian/patches/patch-systems-no-readme-source/build-spec/debian/patches/series new file mode 100644 index 0000000..a342eb3 --- /dev/null +++ b/t/recipes/checks/debian/patches/patch-systems-no-readme-source/build-spec/debian/patches/series @@ -0,0 +1 @@ +01_this_patch_is_ok diff --git a/t/recipes/checks/debian/patches/patch-systems-no-readme-source/build-spec/fill-values b/t/recipes/checks/debian/patches/patch-systems-no-readme-source/build-spec/fill-values new file mode 100644 index 0000000..d307faf --- /dev/null +++ b/t/recipes/checks/debian/patches/patch-systems-no-readme-source/build-spec/fill-values @@ -0,0 +1,4 @@ +Skeleton: upload-native +Testname: patch-systems-no-readme-source +Description: Patch system with no README.source +Extra-Build-Depends: quilt diff --git a/t/recipes/checks/debian/patches/patch-systems-no-readme-source/eval/desc b/t/recipes/checks/debian/patches/patch-systems-no-readme-source/eval/desc new file mode 100644 index 0000000..0d70fa3 --- /dev/null +++ b/t/recipes/checks/debian/patches/patch-systems-no-readme-source/eval/desc @@ -0,0 +1,3 @@ +Testname: patch-systems-no-readme-source +See-Also: Debian Bug #537969 +Check: debian/patches diff --git a/t/recipes/checks/debian/patches/patch-systems-no-readme-source/eval/hints b/t/recipes/checks/debian/patches/patch-systems-no-readme-source/eval/hints new file mode 100644 index 0000000..a53bbab --- /dev/null +++ b/t/recipes/checks/debian/patches/patch-systems-no-readme-source/eval/hints @@ -0,0 +1,2 @@ +patch-systems-no-readme-source (source): patch-system-but-no-source-readme +patch-systems-no-readme-source (source): patch-system quilt diff --git a/t/recipes/checks/debian/patches/patch-systems-quilt-debian-changes/build-spec/debian/patches/debian-changes-1.0-1 b/t/recipes/checks/debian/patches/patch-systems-quilt-debian-changes/build-spec/debian/patches/debian-changes-1.0-1 new file mode 100644 index 0000000..7d0132f --- /dev/null +++ b/t/recipes/checks/debian/patches/patch-systems-quilt-debian-changes/build-spec/debian/patches/debian-changes-1.0-1 @@ -0,0 +1,7 @@ +This is a description of the patch + +--- a/a 2008-11-11 19:38:12.000000000 +0000 ++++ a/a 2008-11-11 19:38:26.000000000 +0000 +@@ -1 +1,2 @@ + sample text ++and some more sample text diff --git a/t/recipes/checks/debian/patches/patch-systems-quilt-debian-changes/build-spec/debian/patches/series b/t/recipes/checks/debian/patches/patch-systems-quilt-debian-changes/build-spec/debian/patches/series new file mode 100644 index 0000000..9ca2b60 --- /dev/null +++ b/t/recipes/checks/debian/patches/patch-systems-quilt-debian-changes/build-spec/debian/patches/series @@ -0,0 +1 @@ +debian-changes-1.0-1 diff --git a/t/recipes/checks/debian/patches/patch-systems-quilt-debian-changes/build-spec/fill-values b/t/recipes/checks/debian/patches/patch-systems-quilt-debian-changes/build-spec/fill-values new file mode 100644 index 0000000..69be6ed --- /dev/null +++ b/t/recipes/checks/debian/patches/patch-systems-quilt-debian-changes/build-spec/fill-values @@ -0,0 +1,4 @@ +Testname: patch-systems-quilt-debian-changes +Description: Test a 3.0 (quilt) package which has a debian-changes-XXX patch +Skeleton: upload-non-native +Source-Format: 3.0 (quilt) diff --git a/t/recipes/checks/debian/patches/patch-systems-quilt-debian-changes/build-spec/orig/a b/t/recipes/checks/debian/patches/patch-systems-quilt-debian-changes/build-spec/orig/a new file mode 100644 index 0000000..c0acc64 --- /dev/null +++ b/t/recipes/checks/debian/patches/patch-systems-quilt-debian-changes/build-spec/orig/a @@ -0,0 +1 @@ +sample text diff --git a/t/recipes/checks/debian/patches/patch-systems-quilt-debian-changes/eval/desc b/t/recipes/checks/debian/patches/patch-systems-quilt-debian-changes/eval/desc new file mode 100644 index 0000000..db1fb19 --- /dev/null +++ b/t/recipes/checks/debian/patches/patch-systems-quilt-debian-changes/eval/desc @@ -0,0 +1,2 @@ +Testname: patch-systems-quilt-debian-changes +Check: debian/patches diff --git a/t/recipes/checks/debian/patches/patch-systems-quilt-debian-changes/eval/hints b/t/recipes/checks/debian/patches/patch-systems-quilt-debian-changes/eval/hints new file mode 100644 index 0000000..94bd4e2 --- /dev/null +++ b/t/recipes/checks/debian/patches/patch-systems-quilt-debian-changes/eval/hints @@ -0,0 +1 @@ +patch-systems-quilt-debian-changes (source): patch-system quilt diff --git a/t/recipes/checks/debian/patches/patch-systems-quilt-description/build-spec/debian/README.source b/t/recipes/checks/debian/patches/patch-systems-quilt-description/build-spec/debian/README.source new file mode 100644 index 0000000..17250a4 --- /dev/null +++ b/t/recipes/checks/debian/patches/patch-systems-quilt-description/build-spec/debian/README.source @@ -0,0 +1 @@ +This package uses quilt. See /usr/share/doc/quilt/README.source. diff --git a/t/recipes/checks/debian/patches/patch-systems-quilt-description/build-spec/debian/patches/01_this_patch_is_ok b/t/recipes/checks/debian/patches/patch-systems-quilt-description/build-spec/debian/patches/01_this_patch_is_ok new file mode 100644 index 0000000..7eee707 --- /dev/null +++ b/t/recipes/checks/debian/patches/patch-systems-quilt-description/build-spec/debian/patches/01_this_patch_is_ok @@ -0,0 +1,7 @@ +This is a description of the patch + +--- a.orig 2008-11-11 19:38:12.000000000 +0000 ++++ a 2008-11-11 19:38:26.000000000 +0000 +@@ -1 +1,2 @@ + sample text ++and some more sample text diff --git a/t/recipes/checks/debian/patches/patch-systems-quilt-description/build-spec/debian/patches/02_this_one_has_no_description b/t/recipes/checks/debian/patches/patch-systems-quilt-description/build-spec/debian/patches/02_this_one_has_no_description new file mode 100644 index 0000000..12128b8 --- /dev/null +++ b/t/recipes/checks/debian/patches/patch-systems-quilt-description/build-spec/debian/patches/02_this_one_has_no_description @@ -0,0 +1,5 @@ +--- a.orig 2008-11-11 19:38:12.000000000 +0000 ++++ a 2008-11-11 19:38:26.000000000 +0000 +@@ -1 +1,2 @@ + sample text ++and some more sample text diff --git a/t/recipes/checks/debian/patches/patch-systems-quilt-description/build-spec/debian/patches/03_a_git_patch b/t/recipes/checks/debian/patches/patch-systems-quilt-description/build-spec/debian/patches/03_a_git_patch new file mode 100644 index 0000000..025656a --- /dev/null +++ b/t/recipes/checks/debian/patches/patch-systems-quilt-description/build-spec/debian/patches/03_a_git_patch @@ -0,0 +1,8 @@ +diff --git a/a b/a +index eb39593..7258d2f 100644 +--- a 2008-11-11 19:38:12.000000000 +0000 ++++ a 2008-11-11 19:38:26.000000000 +0000 +@@ -1 +1,3 @@ + sample text + and some more sample text ++and yet another line diff --git a/t/recipes/checks/debian/patches/patch-systems-quilt-description/build-spec/debian/patches/04_template_description b/t/recipes/checks/debian/patches/patch-systems-quilt-description/build-spec/debian/patches/04_template_description new file mode 100644 index 0000000..09bfd88 --- /dev/null +++ b/t/recipes/checks/debian/patches/patch-systems-quilt-description/build-spec/debian/patches/04_template_description @@ -0,0 +1,17 @@ +Description: + This patch include a templated text for description + TODO: Put a short summary on the line above and replace this paragraph + with a longer explanation of this change. Complete the meta-information + with other relevant fields (see below for details). To make it easier, the + information below has been extracted from the changelog. Adjust it or drop + it. + . +diff --git a/a b/a +index eb39593..7258d2f 100644 +--- a 2008-11-11 19:38:12.000000000 +0000 ++++ a 2008-11-11 19:38:26.000000000 +0000 +@@ -1 +1,4 @@ + sample text + and some more sample text + and yet another line ++and so on diff --git a/t/recipes/checks/debian/patches/patch-systems-quilt-description/build-spec/debian/patches/series b/t/recipes/checks/debian/patches/patch-systems-quilt-description/build-spec/debian/patches/series new file mode 100644 index 0000000..a7ab472 --- /dev/null +++ b/t/recipes/checks/debian/patches/patch-systems-quilt-description/build-spec/debian/patches/series @@ -0,0 +1,4 @@ +01_this_patch_is_ok +02_this_one_has_no_description +03_a_git_patch +04_template_description diff --git a/t/recipes/checks/debian/patches/patch-systems-quilt-description/build-spec/fill-values b/t/recipes/checks/debian/patches/patch-systems-quilt-description/build-spec/fill-values new file mode 100644 index 0000000..d957fdd --- /dev/null +++ b/t/recipes/checks/debian/patches/patch-systems-quilt-description/build-spec/fill-values @@ -0,0 +1,4 @@ +Skeleton: upload-native +Testname: patch-systems-quilt-description +Description: Test for quilt patches which do not have accompanying descriptions +Extra-Build-Depends: quilt diff --git a/t/recipes/checks/debian/patches/patch-systems-quilt-description/eval/desc b/t/recipes/checks/debian/patches/patch-systems-quilt-description/eval/desc new file mode 100644 index 0000000..bcfc987 --- /dev/null +++ b/t/recipes/checks/debian/patches/patch-systems-quilt-description/eval/desc @@ -0,0 +1,3 @@ +Testname: patch-systems-quilt-description +See-Also: Debian Bug #498892 +Check: debian/patches diff --git a/t/recipes/checks/debian/patches/patch-systems-quilt-description/eval/hints b/t/recipes/checks/debian/patches/patch-systems-quilt-description/eval/hints new file mode 100644 index 0000000..c79c3e1 --- /dev/null +++ b/t/recipes/checks/debian/patches/patch-systems-quilt-description/eval/hints @@ -0,0 +1 @@ +patch-systems-quilt-description (source): patch-system quilt diff --git a/t/recipes/checks/debian/patches/patch-systems-quilt-general/build-spec/debian/README.source b/t/recipes/checks/debian/patches/patch-systems-quilt-general/build-spec/debian/README.source new file mode 100644 index 0000000..052084e --- /dev/null +++ b/t/recipes/checks/debian/patches/patch-systems-quilt-general/build-spec/debian/README.source @@ -0,0 +1 @@ +Some stuff about quilt here. diff --git a/t/recipes/checks/debian/patches/patch-systems-quilt-general/build-spec/debian/patches/README b/t/recipes/checks/debian/patches/patch-systems-quilt-general/build-spec/debian/patches/README new file mode 100644 index 0000000..843d249 --- /dev/null +++ b/t/recipes/checks/debian/patches/patch-systems-quilt-general/build-spec/debian/patches/README @@ -0,0 +1 @@ +false positive for patch-file-present-but-not-mentioned-in-series tag diff --git a/t/recipes/checks/debian/patches/patch-systems-quilt-general/build-spec/debian/patches/README.patches b/t/recipes/checks/debian/patches/patch-systems-quilt-general/build-spec/debian/patches/README.patches new file mode 100644 index 0000000..843d249 --- /dev/null +++ b/t/recipes/checks/debian/patches/patch-systems-quilt-general/build-spec/debian/patches/README.patches @@ -0,0 +1 @@ +false positive for patch-file-present-but-not-mentioned-in-series tag diff --git a/t/recipes/checks/debian/patches/patch-systems-quilt-general/build-spec/debian/patches/file-commented-out b/t/recipes/checks/debian/patches/patch-systems-quilt-general/build-spec/debian/patches/file-commented-out new file mode 100644 index 0000000..257cc56 --- /dev/null +++ b/t/recipes/checks/debian/patches/patch-systems-quilt-general/build-spec/debian/patches/file-commented-out @@ -0,0 +1 @@ +foo diff --git a/t/recipes/checks/debian/patches/patch-systems-quilt-general/build-spec/debian/patches/file-mentioned-in-vendor-series b/t/recipes/checks/debian/patches/patch-systems-quilt-general/build-spec/debian/patches/file-mentioned-in-vendor-series new file mode 100644 index 0000000..257cc56 --- /dev/null +++ b/t/recipes/checks/debian/patches/patch-systems-quilt-general/build-spec/debian/patches/file-mentioned-in-vendor-series @@ -0,0 +1 @@ +foo diff --git a/t/recipes/checks/debian/patches/patch-systems-quilt-general/build-spec/debian/patches/file-not-referenced-in-series b/t/recipes/checks/debian/patches/patch-systems-quilt-general/build-spec/debian/patches/file-not-referenced-in-series new file mode 100644 index 0000000..257cc56 --- /dev/null +++ b/t/recipes/checks/debian/patches/patch-systems-quilt-general/build-spec/debian/patches/file-not-referenced-in-series @@ -0,0 +1 @@ +foo diff --git a/t/recipes/checks/debian/patches/patch-systems-quilt-general/build-spec/debian/patches/series b/t/recipes/checks/debian/patches/patch-systems-quilt-general/build-spec/debian/patches/series new file mode 100644 index 0000000..040d7e8 --- /dev/null +++ b/t/recipes/checks/debian/patches/patch-systems-quilt-general/build-spec/debian/patches/series @@ -0,0 +1,6 @@ +# tries to create an existing file, which fails in dpkg-source +# some-file +some-other-file -p0 +# non-existent patches trigger error in dpkg-source +# some-nonexistent-patch +# file-commented-out diff --git a/t/recipes/checks/debian/patches/patch-systems-quilt-general/build-spec/debian/patches/some-file b/t/recipes/checks/debian/patches/patch-systems-quilt-general/build-spec/debian/patches/some-file new file mode 100644 index 0000000..7749d40 --- /dev/null +++ b/t/recipes/checks/debian/patches/patch-systems-quilt-general/build-spec/debian/patches/some-file @@ -0,0 +1,11 @@ +Some regular patch creating a file. + +--- /dev/null ++++ debian/debian/some-file +@@ -0,0 +1,6 @@ ++Some ++file ++created ++in ++debian ++directory. diff --git a/t/recipes/checks/debian/patches/patch-systems-quilt-general/build-spec/debian/patches/some-other-file b/t/recipes/checks/debian/patches/patch-systems-quilt-general/build-spec/debian/patches/some-other-file new file mode 100644 index 0000000..ed24c8f --- /dev/null +++ b/t/recipes/checks/debian/patches/patch-systems-quilt-general/build-spec/debian/patches/some-other-file @@ -0,0 +1,12 @@ +Some -p0 patch creating a file. + +--- /dev/null ++++ debian/some-other-file +@@ -0,0 +1,7 @@ ++Some ++other ++file ++created ++in ++debian ++directory. diff --git a/t/recipes/checks/debian/patches/patch-systems-quilt-general/build-spec/debian/patches/subdir/README b/t/recipes/checks/debian/patches/patch-systems-quilt-general/build-spec/debian/patches/subdir/README new file mode 100644 index 0000000..843d249 --- /dev/null +++ b/t/recipes/checks/debian/patches/patch-systems-quilt-general/build-spec/debian/patches/subdir/README @@ -0,0 +1 @@ +false positive for patch-file-present-but-not-mentioned-in-series tag diff --git a/t/recipes/checks/debian/patches/patch-systems-quilt-general/build-spec/debian/patches/subdir/file-not-referenced-in-series-2 b/t/recipes/checks/debian/patches/patch-systems-quilt-general/build-spec/debian/patches/subdir/file-not-referenced-in-series-2 new file mode 100644 index 0000000..257cc56 --- /dev/null +++ b/t/recipes/checks/debian/patches/patch-systems-quilt-general/build-spec/debian/patches/subdir/file-not-referenced-in-series-2 @@ -0,0 +1 @@ +foo diff --git a/t/recipes/checks/debian/patches/patch-systems-quilt-general/build-spec/debian/patches/vendorname.series b/t/recipes/checks/debian/patches/patch-systems-quilt-general/build-spec/debian/patches/vendorname.series new file mode 100644 index 0000000..4232ed0 --- /dev/null +++ b/t/recipes/checks/debian/patches/patch-systems-quilt-general/build-spec/debian/patches/vendorname.series @@ -0,0 +1 @@ +file-mentioned-in-vendor-series diff --git a/t/recipes/checks/debian/patches/patch-systems-quilt-general/build-spec/diff/README b/t/recipes/checks/debian/patches/patch-systems-quilt-general/build-spec/diff/README new file mode 100644 index 0000000..55d9771 --- /dev/null +++ b/t/recipes/checks/debian/patches/patch-systems-quilt-general/build-spec/diff/README @@ -0,0 +1 @@ +Debian README diff --git a/t/recipes/checks/debian/patches/patch-systems-quilt-general/build-spec/fill-values b/t/recipes/checks/debian/patches/patch-systems-quilt-general/build-spec/fill-values new file mode 100644 index 0000000..ced4b7a --- /dev/null +++ b/t/recipes/checks/debian/patches/patch-systems-quilt-general/build-spec/fill-values @@ -0,0 +1,4 @@ +Testname: patch-systems-quilt-general +Skeleton: upload-non-native +Extra-Build-Depends: quilt, dpatch +Description: General tests of a quilt patch system diff --git a/t/recipes/checks/debian/patches/patch-systems-quilt-general/eval/desc b/t/recipes/checks/debian/patches/patch-systems-quilt-general/eval/desc new file mode 100644 index 0000000..f856f3e --- /dev/null +++ b/t/recipes/checks/debian/patches/patch-systems-quilt-general/eval/desc @@ -0,0 +1,2 @@ +Testname: patch-systems-quilt-general +Check: debian/patches diff --git a/t/recipes/checks/debian/patches/patch-systems-quilt-general/eval/hints b/t/recipes/checks/debian/patches/patch-systems-quilt-general/eval/hints new file mode 100644 index 0000000..a78e16f --- /dev/null +++ b/t/recipes/checks/debian/patches/patch-systems-quilt-general/eval/hints @@ -0,0 +1,3 @@ +patch-systems-quilt-general (source): patch-system quilt +patch-systems-quilt-general (source): patch-system dpatch +patch-systems-quilt-general (source): more-than-one-patch-system diff --git a/t/recipes/checks/debian/patches/patch-systems-quilt-no-newline/build-spec/debian/README.source b/t/recipes/checks/debian/patches/patch-systems-quilt-no-newline/build-spec/debian/README.source new file mode 100644 index 0000000..17250a4 --- /dev/null +++ b/t/recipes/checks/debian/patches/patch-systems-quilt-no-newline/build-spec/debian/README.source @@ -0,0 +1 @@ +This package uses quilt. See /usr/share/doc/quilt/README.source. diff --git a/t/recipes/checks/debian/patches/patch-systems-quilt-no-newline/build-spec/debian/patches/01_this_patch_is_ok b/t/recipes/checks/debian/patches/patch-systems-quilt-no-newline/build-spec/debian/patches/01_this_patch_is_ok new file mode 100644 index 0000000..7eee707 --- /dev/null +++ b/t/recipes/checks/debian/patches/patch-systems-quilt-no-newline/build-spec/debian/patches/01_this_patch_is_ok @@ -0,0 +1,7 @@ +This is a description of the patch + +--- a.orig 2008-11-11 19:38:12.000000000 +0000 ++++ a 2008-11-11 19:38:26.000000000 +0000 +@@ -1 +1,2 @@ + sample text ++and some more sample text diff --git a/t/recipes/checks/debian/patches/patch-systems-quilt-no-newline/build-spec/debian/patches/series b/t/recipes/checks/debian/patches/patch-systems-quilt-no-newline/build-spec/debian/patches/series new file mode 100644 index 0000000..0ca9c9c --- /dev/null +++ b/t/recipes/checks/debian/patches/patch-systems-quilt-no-newline/build-spec/debian/patches/series @@ -0,0 +1 @@ +01_this_patch_is_ok \ No newline at end of file diff --git a/t/recipes/checks/debian/patches/patch-systems-quilt-no-newline/build-spec/fill-values b/t/recipes/checks/debian/patches/patch-systems-quilt-no-newline/build-spec/fill-values new file mode 100644 index 0000000..40b486d --- /dev/null +++ b/t/recipes/checks/debian/patches/patch-systems-quilt-no-newline/build-spec/fill-values @@ -0,0 +1,4 @@ +Skeleton: upload-native +Testname: patch-systems-quilt-no-newline +Description: Patch system with no debian/series that does not end with newline +Extra-Build-Depends: quilt diff --git a/t/recipes/checks/debian/patches/patch-systems-quilt-no-newline/eval/desc b/t/recipes/checks/debian/patches/patch-systems-quilt-no-newline/eval/desc new file mode 100644 index 0000000..32a8f15 --- /dev/null +++ b/t/recipes/checks/debian/patches/patch-systems-quilt-no-newline/eval/desc @@ -0,0 +1,2 @@ +Testname: patch-systems-quilt-no-newline +Check: debian/patches diff --git a/t/recipes/checks/debian/patches/patch-systems-quilt-no-newline/eval/hints b/t/recipes/checks/debian/patches/patch-systems-quilt-no-newline/eval/hints new file mode 100644 index 0000000..4e852b0 --- /dev/null +++ b/t/recipes/checks/debian/patches/patch-systems-quilt-no-newline/eval/hints @@ -0,0 +1 @@ +patch-systems-quilt-no-newline (source): patch-system quilt diff --git a/t/recipes/checks/debian/patches/patch-systems-quilt-no-series/build-spec/debian/README.source b/t/recipes/checks/debian/patches/patch-systems-quilt-no-series/build-spec/debian/README.source new file mode 100644 index 0000000..17250a4 --- /dev/null +++ b/t/recipes/checks/debian/patches/patch-systems-quilt-no-series/build-spec/debian/README.source @@ -0,0 +1 @@ +This package uses quilt. See /usr/share/doc/quilt/README.source. diff --git a/t/recipes/checks/debian/patches/patch-systems-quilt-no-series/build-spec/fill-values b/t/recipes/checks/debian/patches/patch-systems-quilt-no-series/build-spec/fill-values new file mode 100644 index 0000000..5234bfe --- /dev/null +++ b/t/recipes/checks/debian/patches/patch-systems-quilt-no-series/build-spec/fill-values @@ -0,0 +1,5 @@ +Testname: patch-systems-quilt-no-series +Skeleton: upload-non-native +Source-Format: 1.0 +Description: Test for quilt patches with no series +Extra-Build-Depends: quilt diff --git a/t/recipes/checks/debian/patches/patch-systems-quilt-no-series/build-spec/orig/README b/t/recipes/checks/debian/patches/patch-systems-quilt-no-series/build-spec/orig/README new file mode 100644 index 0000000..336f590 --- /dev/null +++ b/t/recipes/checks/debian/patches/patch-systems-quilt-no-series/build-spec/orig/README @@ -0,0 +1 @@ +Hallo World diff --git a/t/recipes/checks/debian/patches/patch-systems-quilt-no-series/eval/desc b/t/recipes/checks/debian/patches/patch-systems-quilt-no-series/eval/desc new file mode 100644 index 0000000..e57d098 --- /dev/null +++ b/t/recipes/checks/debian/patches/patch-systems-quilt-no-series/eval/desc @@ -0,0 +1,2 @@ +Testname: patch-systems-quilt-no-series +Check: debian/patches diff --git a/t/recipes/checks/debian/patches/patch-systems-quilt-no-series/eval/hints b/t/recipes/checks/debian/patches/patch-systems-quilt-no-series/eval/hints new file mode 100644 index 0000000..5067cf1 --- /dev/null +++ b/t/recipes/checks/debian/patches/patch-systems-quilt-no-series/eval/hints @@ -0,0 +1 @@ +patch-systems-quilt-no-series (source): patch-system quilt diff --git a/t/recipes/checks/debian/patches/quilt/cruft-general-wig-pen/build-spec/debian/patches/wig-pen b/t/recipes/checks/debian/patches/quilt/cruft-general-wig-pen/build-spec/debian/patches/wig-pen new file mode 100644 index 0000000..a452b53 --- /dev/null +++ b/t/recipes/checks/debian/patches/quilt/cruft-general-wig-pen/build-spec/debian/patches/wig-pen @@ -0,0 +1,5 @@ +--- upstream/README ++++ debian/README +@@ -1 +1 @@ +-README ++README for wig&pen diff --git a/t/recipes/checks/debian/patches/quilt/cruft-general-wig-pen/build-spec/debian/rules b/t/recipes/checks/debian/patches/quilt/cruft-general-wig-pen/build-spec/debian/rules new file mode 100755 index 0000000..413418b --- /dev/null +++ b/t/recipes/checks/debian/patches/quilt/cruft-general-wig-pen/build-spec/debian/rules @@ -0,0 +1,9 @@ +#!/usr/bin/make -f +%: + dh $@ + +override_dh_prep: + dh_prep -X~ -Xrej + +clean: + @echo 'Do nothing' diff --git a/t/recipes/checks/debian/patches/quilt/cruft-general-wig-pen/build-spec/debian/substvars b/t/recipes/checks/debian/patches/quilt/cruft-general-wig-pen/build-spec/debian/substvars new file mode 100644 index 0000000..abd3ebe --- /dev/null +++ b/t/recipes/checks/debian/patches/quilt/cruft-general-wig-pen/build-spec/debian/substvars @@ -0,0 +1 @@ +misc:Depends= diff --git a/t/recipes/checks/debian/patches/quilt/cruft-general-wig-pen/build-spec/fill-values b/t/recipes/checks/debian/patches/quilt/cruft-general-wig-pen/build-spec/fill-values new file mode 100644 index 0000000..edb39d9 --- /dev/null +++ b/t/recipes/checks/debian/patches/quilt/cruft-general-wig-pen/build-spec/fill-values @@ -0,0 +1,4 @@ +Testname: cruft-general-wig-pen +Skeleton: upload-non-native +Source-Format: 2.0 +Description: Check for cruft added in a 2.0 package diff --git a/t/recipes/checks/debian/patches/quilt/cruft-general-wig-pen/build-spec/orig/README b/t/recipes/checks/debian/patches/quilt/cruft-general-wig-pen/build-spec/orig/README new file mode 100644 index 0000000..e845566 --- /dev/null +++ b/t/recipes/checks/debian/patches/quilt/cruft-general-wig-pen/build-spec/orig/README @@ -0,0 +1 @@ +README diff --git a/t/recipes/checks/debian/patches/quilt/cruft-general-wig-pen/build-spec/pre-build b/t/recipes/checks/debian/patches/quilt/cruft-general-wig-pen/build-spec/pre-build new file mode 100755 index 0000000..78f359c --- /dev/null +++ b/t/recipes/checks/debian/patches/quilt/cruft-general-wig-pen/build-spec/pre-build @@ -0,0 +1,32 @@ +#!/bin/sh +# +# Create all the various junk that shouldn't exist in the diff so that we can +# trigger all the tags. + +set -e +dir="$1/debian" + +mkdir "${dir}/CVS" +echo 'diff-contains-cvs-control-dir' > "${dir}/CVS/Entries" +mkdir "${dir}/.svn" +echo 'diff-contains-svn-control-dir' > "${dir}/.svn/format" +mkdir "${dir}/.bzr" +echo 'diff-contains-bzr-control-dir' > "${dir}/.bzr/foo" +mkdir "${dir}/{arch}" +echo 'diff-contains-arch-control-dir' > "${dir}/{arch}/foo" +mkdir "${dir}/.git" +echo 'diff-contains-git-control-dir' > "${dir}/.git/foo" +mkdir "${dir}/.hg" +echo 'diff-contains-hg-control-dir' > "${dir}/.hg/foo" +mkdir "${dir}/.be" +echo 'diff-contains-bts-control-dir' > "${dir}/.be/foo" + +echo 'diff-contains-cmake-cache-file' > "${dir}/CMakeCache.txt" +echo 'diff-contains-svn-commit-file' > "${dir}/svn-commit.tmp" +echo 'diff-contains-svk-commit-file' > "${dir}/svk-commit444.tmp" +echo 'diff-contains-arch-inventory-file' > "${dir}/.arch-inventory" +echo 'diff-contains-hg-tags-file' > "${dir}/.hgtags" +echo 'diff-contains-cvs-conflict-copy' > "${dir}/.#foo.1.1" +echo 'diff-contains-svn-conflict-file' > "${dir}/foo.r1352" +echo 'diff-contains-patch-failure-file' > "${dir}/foo.rej" +echo 'diff-contains-editor-backup-file' > "${dir}/foo~" diff --git a/t/recipes/checks/debian/patches/quilt/cruft-general-wig-pen/eval/desc b/t/recipes/checks/debian/patches/quilt/cruft-general-wig-pen/eval/desc new file mode 100644 index 0000000..9e824e6 --- /dev/null +++ b/t/recipes/checks/debian/patches/quilt/cruft-general-wig-pen/eval/desc @@ -0,0 +1,3 @@ +Testname: cruft-general-wig-pen +Test-Against: patch-file-present-but-not-mentioned-in-series +Check: debian/patches/quilt diff --git a/t/recipes/checks/debian/patches/quilt/cruft-general-wig-pen/eval/hints b/t/recipes/checks/debian/patches/quilt/cruft-general-wig-pen/eval/hints new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/t/recipes/checks/debian/patches/quilt/cruft-general-wig-pen/eval/hints @@ -0,0 +1 @@ + diff --git a/t/recipes/checks/debian/patches/quilt/legacy-relations/build-spec/debian/changelog.in b/t/recipes/checks/debian/patches/quilt/legacy-relations/build-spec/debian/changelog.in new file mode 100644 index 0000000..9a82ea7 --- /dev/null +++ b/t/recipes/checks/debian/patches/quilt/legacy-relations/build-spec/debian/changelog.in @@ -0,0 +1,33 @@ +relations ([% $version %]) [% $distribution %]; urgency=low + + * I'm orphaning this package -- I'm sick of it: it's completely broken, + lintian complains all over the place. + + -- Jeroen van Wolffelaar Sun, 02 Dec 2007 15:59:59 -0800 + +relations (4) unstable; urgency=low + + * Added a package that tests dependencies for multiple versions of + libraries, and test some description stuff in there as well. + + -- Josip Rodin Fri, 29 Nov 2002 20:13:33 +0100 + +relations (3) unstable; urgency=low + + * Added a virtual provides to test against my virtual depends without + a real package first test + + -- Sean 'Shaleh' Perry Thu, 8 Feb 2001 11:29:53 -0800 + +relations (2) unstable; urgency=low + + * Added a depends on dpkg (violates policy) and a versioned depends + on bash (follows policy) + + -- Sean 'Shaleh' Perry Fri, 2 Feb 2001 12:37:17 -0800 + +relations (1) unstable; urgency=low + + * Initial version + + -- Richard Braakman Tue, 7 Jul 1998 16:27:56 +0200 diff --git a/t/recipes/checks/debian/patches/quilt/legacy-relations/build-spec/debian/control b/t/recipes/checks/debian/patches/quilt/legacy-relations/build-spec/debian/control new file mode 100644 index 0000000..6cd1c04 --- /dev/null +++ b/t/recipes/checks/debian/patches/quilt/legacy-relations/build-spec/debian/control @@ -0,0 +1,51 @@ +Source: relations +Section: misc +Priority: optional +Build-Depends: mail-transport-agent, libc6-dev, findutils, foo (= 3) [!amd64 !i386], bar, arch-test1 [i386], arch-test2 [!i386], quilt (>= 0.40), perl +Build-Depends-Indep: make, bash, debmake, build-essential, baz (= 2.0), ghostscript | gs, + car (>= 1.0), car (<= 2.0), caz (= 1.0) [amd64], caz (>= 2.0) [i386], + caz (= 2.0) [powerpc], perl (>= 5.0), foo (<< 4) [!amd64 !i386], libfoo (>= 1.2-1), bozzle [kfreebsd-i386] +Build-Conflicts: foo [amd64 i386], bar [alpha test], xlibs-dev, arch-test1 [powerpc], arch-test2 [!sparc] +Build-Conflicts-Indep: debmake [!powerpc] +Maintainer: Debian QA Group +Standards-Version: 3.7.3 +Homepage: lintian.debian.org +Origin: Debian +Bugs: debbugs://bugs.debian.org/ + +Package: relations +Architecture: all +Section: contrib/misc +Pre-Depends: awk|gawk +Depends: relations(<< 3), dpkg, bash (>> 2.0 ), mail-transport-agent, gawk | awk, foo (>> 2.0), foo (<< 2.2), coreutils, ,null (>= 0), ${misc:Depends}, makedev +Provides: mail-reader +Replaces: relations +Conflicts: foobar (<< 5+5), foo, relations, + gnuwdf, +Suggests: alpha, gnu (>= 44-3-4-8-11.4) | ung (<< 89beta) | nug | ngu, beta, some-other-package +Recommends: emacs21 | emacsen, dpkg, null, some-other-package, ${f-oo:b-ar}, gs | ghostscript | gs-aladdin +Description: Strange dependency relationships (dummy) + This package declares relationships designed to tickle lintian's "fields" + check. It should generate a number of tags for these. + . + The package is built with "dpkg --build --no-check", because some of the + relationships used here are normally rejected by dpkg. + +Package: relations-multiple-libs +Architecture: all +Section: non-free/misc +Depends: libstdc++2.10, libstdc++2.10-glibc2.2, libstdc++3.0, tk8.2, tk8.3, tcl8.0, tcl8.2, tkx8.2, tkx8.3, tclx8.2, libpng2, libpng3, xorg, ${shlibs:Depends}, makedev | udev +Provides: awk +Enhances: foo +Recommends: ${shlibs:Depends}, relations-multiple-libs, gs | gs-gpl, makedev +Breaks: libpng3 (<< 1.0), libpng2 +Suggests: x-dev, ghostscript | gs +Description: Duplicate library dependency relationships. + Duplicate library dependency relationships. + This tests the depending on different versions of the same library + at the same time. + . + At the same time, it conveniently tests some description file checks. :) + . + It is a metapackage from the lintian perspective, so the xorg dependency + should be allowed. diff --git a/t/recipes/checks/debian/patches/quilt/legacy-relations/build-spec/debian/rules b/t/recipes/checks/debian/patches/quilt/legacy-relations/build-spec/debian/rules new file mode 100755 index 0000000..5027f33 --- /dev/null +++ b/t/recipes/checks/debian/patches/quilt/legacy-relations/build-spec/debian/rules @@ -0,0 +1,49 @@ +#!/usr/bin/make -f + +# Copyright (C) 1998 Richard Braakman +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +build-arch: + +build-indep: + +build: build-arch build-indep + +binary-arch: + +binary-indep: + install -d debian/tmp/DEBIAN + dpkg-gencontrol -prelations -isp + dpkg --build debian/tmp ../relations_5_all.deb + install -d debian/tmp/usr/share/doc/ + ln -s relations debian/tmp/usr/share/doc/relations-multiple-libs + dpkg-gencontrol -prelations-multiple-libs -isp + dpkg --build debian/tmp ../relations-multiple-libs_5_all.deb + +binary: binary-arch binary-indep + +clean:: + rm -rf debian/tmp debian/files + +# Test allowing quilt Build-Depends for manual quilt invocations. + TESTING=foo ANOTHER=bar quilt || true + +# Test requiring perl Build-Depends for manual perl invocations. + [ ! -f Build ] || $(PERL) Build distclean + +.PHONY: build-arch build-indep build binary-arch binary-indep binary clean diff --git a/t/recipes/checks/debian/patches/quilt/legacy-relations/build-spec/debian/tmp/DEBIAN/control b/t/recipes/checks/debian/patches/quilt/legacy-relations/build-spec/debian/tmp/DEBIAN/control new file mode 100644 index 0000000..87e7fe6 --- /dev/null +++ b/t/recipes/checks/debian/patches/quilt/legacy-relations/build-spec/debian/tmp/DEBIAN/control @@ -0,0 +1,14 @@ +Package: relations-multiple-libs +Version: 4 +Section: misc +Priority: optional +Architecture: all +Depends: libstdc++2.10, libstdc++2.10-glibc2.2, libstdc++3.0, tk8.2, tk8.3, tcl8.0, tcl8.2, tkx8.2, tkx8.3, tclx8.2, libpng2, libpng3 +Installed-Size: 12 +Maintainer: Lintian Maintainer +Source: relations +Description: Duplicate library dependency relationships. + Duplicate library dependency relationships. This tests the depending on + different versions of the same library at the same time. + . + At the same time, it conveniently tests some description file checks. :) diff --git a/t/recipes/checks/debian/patches/quilt/legacy-relations/build-spec/fill-values b/t/recipes/checks/debian/patches/quilt/legacy-relations/build-spec/fill-values new file mode 100644 index 0000000..7e4661b --- /dev/null +++ b/t/recipes/checks/debian/patches/quilt/legacy-relations/build-spec/fill-values @@ -0,0 +1,5 @@ +Skeleton: upload-native +Testname: legacy-relations +Source: relations +Version: 5 +Description: Legacy test "relations" diff --git a/t/recipes/checks/debian/patches/quilt/legacy-relations/eval/desc b/t/recipes/checks/debian/patches/quilt/legacy-relations/eval/desc new file mode 100644 index 0000000..c70804e --- /dev/null +++ b/t/recipes/checks/debian/patches/quilt/legacy-relations/eval/desc @@ -0,0 +1,2 @@ +Testname: legacy-relations +Check: debian/patches/quilt diff --git a/t/recipes/checks/debian/patches/quilt/legacy-relations/eval/hints b/t/recipes/checks/debian/patches/quilt/legacy-relations/eval/hints new file mode 100644 index 0000000..d8929ea --- /dev/null +++ b/t/recipes/checks/debian/patches/quilt/legacy-relations/eval/hints @@ -0,0 +1 @@ +relations (source): quilt-build-dep-but-no-series-file diff --git a/t/recipes/checks/debian/patches/quilt/legacy-relations/eval/post-test b/t/recipes/checks/debian/patches/quilt/legacy-relations/eval/post-test new file mode 100644 index 0000000..faeef0b --- /dev/null +++ b/t/recipes/checks/debian/patches/quilt/legacy-relations/eval/post-test @@ -0,0 +1 @@ +s/\(current is ([0-9]+\.)+[0-9]\)/(current is CURRENT)/ diff --git a/t/recipes/checks/debian/patches/quilt/legacy-scripts/build-spec/debian/changelog.in b/t/recipes/checks/debian/patches/quilt/legacy-scripts/build-spec/debian/changelog.in new file mode 100644 index 0000000..935c633 --- /dev/null +++ b/t/recipes/checks/debian/patches/quilt/legacy-scripts/build-spec/debian/changelog.in @@ -0,0 +1,41 @@ +scripts ([% $version %]) [% $distribution %]; urgency=low + + * I'm also not able to write my name. + * Added a script in /etc/Xsession.d + * Bizarre version number courtesy of + https://wiki.ubuntu.com/SecurityUpdateProcedures#Prepare + + -- Mark 'HE' Brokschmitt Thu, 23 Jun 2005 14:32:39 +0200 + +scripts (5-1) unstable; urgency=low + + * I'm making a typo in my own name... And I want lintian to warn me about + it. + + -- Jeroen van Wolffelaar Sun, 18 Apr 2004 02:26:34 +0200 + +scripts (4-1) unstable; urgency=low + + * Add new example to check that not executable files with a shebang line + called *in don't trigger the script-not-executable warning. + + -- Marc 'HE' Brockschmidt Wed, 14 Apr 2004 19:44:04 +0200 + +scripts (3-3) unstable; urgency=low + + * Add suidperlfoo and some code in debian/rules to + check the new suidperl checks + + -- Frank Lichtenheld Wed, 31 Mar 2004 21:06:20 +0000 + +scripts (2-1) unstable; urgency=low + + * Add tkfoo script for tk checkings + + -- Lintian Maintainers Sat, 21 Feb 2004 17:13:36 +0100 + +scripts (1-0) unstable; urgency=low + + * Initial version + + -- Lintian Maintainers Sat, 10 Feb 2001 15:37:31 -0800 diff --git a/t/recipes/checks/debian/patches/quilt/legacy-scripts/build-spec/debian/control.in b/t/recipes/checks/debian/patches/quilt/legacy-scripts/build-spec/debian/control.in new file mode 100644 index 0000000..75a521f --- /dev/null +++ b/t/recipes/checks/debian/patches/quilt/legacy-scripts/build-spec/debian/control.in @@ -0,0 +1,16 @@ +Source: scripts +Section: interpreters +Priority: optional +Maintainer: Lintian Maintainers +Uploaders: Jeroen van Wolfelaar , Marc 'HE' Brockschmidt +Build-Depends-Indep: dpatch +Standards-Version: 3.2.1 + +Package: scripts +Architecture: [% $package_architecture %] +Depends: test, ruby1.8, build-essential, libssl0.9.7, php7.0-cli +Recommends: tk8.4 | wish +Description: test lintian's script file checks + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. diff --git a/t/recipes/checks/debian/patches/quilt/legacy-scripts/build-spec/debian/copyright b/t/recipes/checks/debian/patches/quilt/legacy-scripts/build-spec/debian/copyright new file mode 100644 index 0000000..ad8a119 --- /dev/null +++ b/t/recipes/checks/debian/patches/quilt/legacy-scripts/build-spec/debian/copyright @@ -0,0 +1,5 @@ +This file contains the phrase "under the same terms as Perl itself" to +trigger warnings about not having common-licenses references. + +This file contains the phrase "public domain" which should suppress +warnings about no copyright date. diff --git a/t/recipes/checks/debian/patches/quilt/legacy-scripts/build-spec/debian/patches/00list b/t/recipes/checks/debian/patches/quilt/legacy-scripts/build-spec/debian/patches/00list new file mode 100644 index 0000000..3b9d37e --- /dev/null +++ b/t/recipes/checks/debian/patches/quilt/legacy-scripts/build-spec/debian/patches/00list @@ -0,0 +1,11 @@ +01_not_here_right_now.dpatch + +# some comment +/* some more + elaborate comment + which needs DPATCH_OPTION_CPP=1 + */02_i_dont_have_a_description.patch 03_specified_without_dpatch + +// and again a comment + +04_i_dont_have_a_description_either.patch diff --git a/t/recipes/checks/debian/patches/quilt/legacy-scripts/build-spec/debian/patches/00list.sparc b/t/recipes/checks/debian/patches/quilt/legacy-scripts/build-spec/debian/patches/00list.sparc new file mode 100644 index 0000000..8b47ab3 --- /dev/null +++ b/t/recipes/checks/debian/patches/quilt/legacy-scripts/build-spec/debian/patches/00list.sparc @@ -0,0 +1 @@ +01_some_other_patch_thats_not_in_the_package.dpatch diff --git a/t/recipes/checks/debian/patches/quilt/legacy-scripts/build-spec/debian/patches/00options b/t/recipes/checks/debian/patches/quilt/legacy-scripts/build-spec/debian/patches/00options new file mode 100644 index 0000000..57ffeb6 --- /dev/null +++ b/t/recipes/checks/debian/patches/quilt/legacy-scripts/build-spec/debian/patches/00options @@ -0,0 +1 @@ +DPATCH_OPTION_CPP=1 diff --git a/t/recipes/checks/debian/patches/quilt/legacy-scripts/build-spec/debian/patches/02_i_dont_have_a_description.patch b/t/recipes/checks/debian/patches/quilt/legacy-scripts/build-spec/debian/patches/02_i_dont_have_a_description.patch new file mode 100644 index 0000000..9279c1b --- /dev/null +++ b/t/recipes/checks/debian/patches/quilt/legacy-scripts/build-spec/debian/patches/02_i_dont_have_a_description.patch @@ -0,0 +1,7 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 02_i_dont_have_a_description.patch.dpatch by Marc 'HE' Brockschmidt > +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: No description. + +@DPATCH@ diff --git a/t/recipes/checks/debian/patches/quilt/legacy-scripts/build-spec/debian/patches/03_specified_without_dpatch.dpatch b/t/recipes/checks/debian/patches/quilt/legacy-scripts/build-spec/debian/patches/03_specified_without_dpatch.dpatch new file mode 100644 index 0000000..8303ac6 --- /dev/null +++ b/t/recipes/checks/debian/patches/quilt/legacy-scripts/build-spec/debian/patches/03_specified_without_dpatch.dpatch @@ -0,0 +1,5 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## All lines beginning with `## DP:' are a description of the patch. +## DP: Listed in 00list without .dpatch suffix. + +@DPATCH@ diff --git a/t/recipes/checks/debian/patches/quilt/legacy-scripts/build-spec/debian/patches/04_i_dont_have_a_description_either.patch b/t/recipes/checks/debian/patches/quilt/legacy-scripts/build-spec/debian/patches/04_i_dont_have_a_description_either.patch new file mode 100644 index 0000000..b603f16 --- /dev/null +++ b/t/recipes/checks/debian/patches/quilt/legacy-scripts/build-spec/debian/patches/04_i_dont_have_a_description_either.patch @@ -0,0 +1,7 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 04_i_dont_have_a_description_either.patch by Adam D. Barratt +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: + +@DPATCH@ diff --git a/t/recipes/checks/debian/patches/quilt/legacy-scripts/build-spec/debian/postinst b/t/recipes/checks/debian/patches/quilt/legacy-scripts/build-spec/debian/postinst new file mode 100644 index 0000000..7c5baf1 --- /dev/null +++ b/t/recipes/checks/debian/patches/quilt/legacy-scripts/build-spec/debian/postinst @@ -0,0 +1,14 @@ +#!/bin/sh + +if [ -x "/etc/init.d/lsb-broken" ] ; then + update-rc.d lsb-broken defaults >/dev/null +fi +if [ -x "/etc/init.d/no-lsb" ] ; then + update-rc.d no-lsb defaults >/dev/null +fi +if [ -x "/etc/init.d/skeleton" ] ; then + update-rc.d skeleton defaults >/dev/null +fi +if [ -x "/etc/init.d/lsb-other" ] ; then + update-rc.d lsb-other defaults >/dev/null +fi diff --git a/t/recipes/checks/debian/patches/quilt/legacy-scripts/build-spec/debian/postrm b/t/recipes/checks/debian/patches/quilt/legacy-scripts/build-spec/debian/postrm new file mode 100644 index 0000000..8fa75a2 --- /dev/null +++ b/t/recipes/checks/debian/patches/quilt/legacy-scripts/build-spec/debian/postrm @@ -0,0 +1,9 @@ +#!/bin/sh -e + +if [ "$1" = purge ] ; then + update-rc.d lsb-broken remove >/dev/null + update-rc.d no-lsb remove >/dev/null + update-rc.d skeleton remove >/dev/null + update-rc.d lsb-other remove >/dev/null + update-rc.d lsb-other remove >/dev/null +fi diff --git a/t/recipes/checks/debian/patches/quilt/legacy-scripts/build-spec/debian/preinst b/t/recipes/checks/debian/patches/quilt/legacy-scripts/build-spec/debian/preinst new file mode 100644 index 0000000..0799557 --- /dev/null +++ b/t/recipes/checks/debian/patches/quilt/legacy-scripts/build-spec/debian/preinst @@ -0,0 +1,15 @@ +#!/bin/sh + +set -e +set -x + +# +# Some comments here +# + +# This serves as an example of an "empty" script, so +# please do not add any real code here, thank you :) + +#DEBHELPER# + +exit 0 diff --git a/t/recipes/checks/debian/patches/quilt/legacy-scripts/build-spec/debian/rules b/t/recipes/checks/debian/patches/quilt/legacy-scripts/build-spec/debian/rules new file mode 100755 index 0000000..ee3677e --- /dev/null +++ b/t/recipes/checks/debian/patches/quilt/legacy-scripts/build-spec/debian/rules @@ -0,0 +1,105 @@ +#!/usr/bin/make -f + +tmp=debian/tmp + +build-arch: + echo "Hi, in an arch: all package, I am a bug!" + +build-indep: + +build: build-arch build-indep + +binary-arch: + echo "Hi, in an arch: all package, I am a bug!" + +binary-indep: + install -d $(tmp)/usr/bin/ + install -d $(tmp)/etc/X11/Xsession.d/ + install -d $(tmp)/etc/init.d/ + install -d $(tmp)/etc/csh/login.d/ + install -d $(tmp)/etc/fish.d/ + install -d $(tmp)/usr/share/scripts/ + install -d $(tmp)/usr/share/doc/scripts/ + install -d $(tmp)/usr/lib/cgi-bin + install -d $(tmp)/usr/src/scripts + install -d $(tmp)/DEBIAN + + install -m 755 csh-foo $(tmp)/etc/csh/login.d/ + install -m 755 envfoo $(tmp)/usr/bin/ + install -m 755 fish-foo $(tmp)/etc/fish.d/ + install -m 755 jruby-broken $(tmp)/usr/bin/ + install -m 755 perlfoo $(tmp)/usr/bin/ + install -m 755 rubyfoo $(tmp)/usr/bin/ +# This doesn't use "env" but should also trigger script-in-usr-share-doc + install -m 755 rubyfoo $(tmp)/usr/share/doc/scripts/ + install -m 755 make-foo $(tmp)/usr/bin/ + install -m 755 lefty-foo $(tmp)/usr/bin/ + install -m 4751 perlfoo $(tmp)/usr/bin/suidperlfoo2 + install -m 755 sh-broken $(tmp)/usr/bin/ + install -m 4555 suidperlfoo $(tmp)/usr/bin/ + install -m 755 tkfoo $(tmp)/usr/bin/ + install -m 755 wishfoo $(tmp)/usr/bin/ + install -m 644 xsession-test $(tmp)/etc/X11/Xsession.d/ + +# Permissions here aren't part of what's being tested, but let us exercise +# some other errors. + install -m 755 perl-bizarre-1 $(tmp)/usr/bin/ + install -m 750 perl-bizarre-2 $(tmp)/usr/bin/ + install -m 754 perl-bizarre-3 $(tmp)/usr/bin/ + install -m 705 guile-bizarre $(tmp)/usr/bin/ + +# First one should produce a warning; second one shouldn't. + install -m 755 gccbug.dpatch $(tmp)/usr/share/scripts/ + install -m 755 gccbug.dpatch $(tmp)/usr/src/scripts/ + + install -m 644 init-skeleton $(tmp)/etc/init.d/skeleton + install -m 755 init-no-lsb $(tmp)/etc/init.d/no-lsb + install -m 755 init-lsb-broken $(tmp)/etc/init.d/lsb-broken + install -m 755 init-lsb-other $(tmp)/etc/init.d/lsb-other + + install -m 755 phpfoo $(tmp)/usr/share/scripts/ + sed 's/php$$/php7.0/' phpfoo > $(tmp)/usr/share/scripts/php7.0foo + chmod 755 $(tmp)/usr/share/scripts/php7.0foo + + install -m 755 phpenvfoo $(tmp)/usr/share/scripts/ + sed 's/php$$/php7.0/' phpenvfoo > $(tmp)/usr/share/scripts/php7.0envfoo + chmod 755 $(tmp)/usr/share/scripts/php7.0envfoo + + echo "#!/usr/bin/perl" >> $(tmp)/usr/share/scripts/foobar.in + chmod 644 $(tmp)/usr/share/scripts/foobar.in + + touch $(tmp)/usr/share/scripts/mono.exe + chmod 755 $(tmp)/usr/share/scripts/mono.exe + + echo "#!/bin/sh" > $(tmp)/usr/share/scripts/foo\$$bar + chmod 755 $(tmp)/usr/share/scripts/foo\$$bar + + echo "#!/bin/sh" > $(tmp)/usr/lib/cgi-bin/cgi-script + chmod 755 $(tmp)/usr/lib/cgi-bin/cgi-script + + echo "#!/bin/sh" > $(tmp)/usr/bin/test.sh + chmod 755 $(tmp)/usr/bin/test.sh + + + dh_testroot # dummy to test missing debhelper dependency + + + install -m 644 debian/changelog $(tmp)/usr/share/doc/scripts/changelog.Debian + gzip -n -9 $(tmp)/usr/share/doc/scripts/changelog.Debian + install -m 644 debian/copyright $(tmp)/usr/share/doc/scripts/copyright + + install -m 644 debian/scripts.conffiles $(tmp)/DEBIAN/conffiles + install -m 755 debian/preinst $(tmp)/DEBIAN/preinst + install -m 755 debian/postinst $(tmp)/DEBIAN/postinst + install -m 755 debian/postrm $(tmp)/DEBIAN/postrm + touch $(tmp)/DEBIAN/prerm + chmod 755 $(tmp)/DEBIAN/prerm + dpkg-gencontrol -isp + dpkg --build $(tmp) .. + +binary: binary-arch binary-indep + +clean: + rm -rf debian/files $(tmp) debian/substvars + +.PHONY: build-arch build-indep build binary-arch binary-indep binary clean diff --git a/t/recipes/checks/debian/patches/quilt/legacy-scripts/build-spec/debian/scripts.conffiles b/t/recipes/checks/debian/patches/quilt/legacy-scripts/build-spec/debian/scripts.conffiles new file mode 100644 index 0000000..01a371a --- /dev/null +++ b/t/recipes/checks/debian/patches/quilt/legacy-scripts/build-spec/debian/scripts.conffiles @@ -0,0 +1,6 @@ +/etc/init.d/lsb-broken +/etc/init.d/lsb-other +/etc/init.d/no-lsb +/etc/X11/Xsession.d/xsession-test +/etc/csh/login.d/csh-foo +/etc/fish.d/fish-foo diff --git a/t/recipes/checks/debian/patches/quilt/legacy-scripts/build-spec/debian/watch b/t/recipes/checks/debian/patches/quilt/legacy-scripts/build-spec/debian/watch new file mode 100644 index 0000000..dba5815 --- /dev/null +++ b/t/recipes/checks/debian/patches/quilt/legacy-scripts/build-spec/debian/watch @@ -0,0 +1,8 @@ +# watch file with upstream version mangling + +version=2 +opts="uversionmangle=s/$/ds/" \ +http://qa.debian.org/watch/sf.php?project=foo scripts\.([\d.]+)\.tar\.gz debian uupdate + +version=3 +http://ftp.sf.net/foo/foo_bar(.+)\.Z 5 uupdate \ No newline at end of file diff --git a/t/recipes/checks/debian/patches/quilt/legacy-scripts/build-spec/fill-values b/t/recipes/checks/debian/patches/quilt/legacy-scripts/build-spec/fill-values new file mode 100644 index 0000000..8a68457 --- /dev/null +++ b/t/recipes/checks/debian/patches/quilt/legacy-scripts/build-spec/fill-values @@ -0,0 +1,6 @@ +Testname: legacy-scripts +Source: scripts +Version: 6ds-1ubuntu0.5.10.1 +Package-Architecture: all +Skeleton: upload-non-native +Description: Legacy test "scripts" diff --git a/t/recipes/checks/debian/patches/quilt/legacy-scripts/build-spec/orig/csh-foo b/t/recipes/checks/debian/patches/quilt/legacy-scripts/build-spec/orig/csh-foo new file mode 100644 index 0000000..eaf47a1 --- /dev/null +++ b/t/recipes/checks/debian/patches/quilt/legacy-scripts/build-spec/orig/csh-foo @@ -0,0 +1,2 @@ +#! /bin/csh + diff --git a/t/recipes/checks/debian/patches/quilt/legacy-scripts/build-spec/orig/envfoo b/t/recipes/checks/debian/patches/quilt/legacy-scripts/build-spec/orig/envfoo new file mode 100755 index 0000000..e005037 --- /dev/null +++ b/t/recipes/checks/debian/patches/quilt/legacy-scripts/build-spec/orig/envfoo @@ -0,0 +1,4 @@ +#! /bin/env python + +if __name__ == '__main__': + print 'Hi there' diff --git a/t/recipes/checks/debian/patches/quilt/legacy-scripts/build-spec/orig/fish-foo b/t/recipes/checks/debian/patches/quilt/legacy-scripts/build-spec/orig/fish-foo new file mode 100644 index 0000000..7f59139 --- /dev/null +++ b/t/recipes/checks/debian/patches/quilt/legacy-scripts/build-spec/orig/fish-foo @@ -0,0 +1,2 @@ +#! /usr/bin/fish + diff --git a/t/recipes/checks/debian/patches/quilt/legacy-scripts/build-spec/orig/gccbug.dpatch b/t/recipes/checks/debian/patches/quilt/legacy-scripts/build-spec/orig/gccbug.dpatch new file mode 100755 index 0000000..65cbf37 --- /dev/null +++ b/t/recipes/checks/debian/patches/quilt/legacy-scripts/build-spec/orig/gccbug.dpatch @@ -0,0 +1,39 @@ +#! /bin/sh -e + +# DP: Use sensible-editor instead of vi as fallback editor + +# Taken from gcc-4.1-source. Chokes bash -n (due to the patch) despite being +# a valid dpatch, so don't warn about it if it's in /usr/src. + +dir= +if [ $# -eq 3 -a "$2" = '-d' ]; then + pdir="-d $3" + dir="$3/" +elif [ $# -ne 1 ]; then + echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" + exit 1 +fi +case "$1" in + -patch) + patch $pdir -f --no-backup-if-mismatch -p0 < $0 + ;; + -unpatch) + patch $pdir -f --no-backup-if-mismatch -R -p0 < $0 + ;; + *) + echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" + exit 1 +esac +exit 0 + +--- gcc/gccbug.in~ 2003-03-01 00:51:42.000000000 +0100 ++++ gcc/gccbug.in 2003-03-02 12:08:36.000000000 +0100 +@@ -134,7 +134,7 @@ + # If they don't have a preferred editor set, then use + if [ -z "$VISUAL" ]; then + if [ -z "$EDITOR" ]; then +- EDIT=vi ++ EDIT=/usr/bin/sensible-editor + else + EDIT="$EDITOR" + fi diff --git a/t/recipes/checks/debian/patches/quilt/legacy-scripts/build-spec/orig/guile-bizarre b/t/recipes/checks/debian/patches/quilt/legacy-scripts/build-spec/orig/guile-bizarre new file mode 100644 index 0000000..70e2c74 --- /dev/null +++ b/t/recipes/checks/debian/patches/quilt/legacy-scripts/build-spec/orig/guile-bizarre @@ -0,0 +1,6 @@ +#! /bin/sh +# -*- scheme -*- +exec guile -s $0 $* +# Seen in the wild as build-guile-gtk in libguilegtk-1.2-dev (0.31-5.1) +# Tests script_is_evil_and_wrong +!# diff --git a/t/recipes/checks/debian/patches/quilt/legacy-scripts/build-spec/orig/init-lsb-broken b/t/recipes/checks/debian/patches/quilt/legacy-scripts/build-spec/orig/init-lsb-broken new file mode 100644 index 0000000..e4dfa92 --- /dev/null +++ b/t/recipes/checks/debian/patches/quilt/legacy-scripts/build-spec/orig/init-lsb-broken @@ -0,0 +1,34 @@ +#! /bin/sh +### BEGIN INIT INFO +# Provides: bad-lsb +# Required-Start: $local_fs $remote_fs +# Required-Stop: +# Default-Start: 1 2 3 4 5 +# Default-Stop: S 0 1 6 X +# Short-Description: Example Lintian initscript +# but this can't be continued +# Description: An example of a bad LSB section in an init script. +# This continuation is allowed (with spaces). +# This one is too (with tabs). +# X-Debian-Foo: Some unknown but valid keyword. +# Foo: Some invalid keyword. + +# Whoops, no terminating line. + +# And then we have this duplicate section. +### BEGIN INIT INFO +# Required-Start: This one doesn't count. +### END INIT INFO + +# Hey, look at all of those missing actions! But stop isn't missing. +case "$1" in + start|stop) + echo "Blah" + ;; + *) + echo "Usage: foo start" >&2 + exit 3 + ;; +esac + +: diff --git a/t/recipes/checks/debian/patches/quilt/legacy-scripts/build-spec/orig/init-lsb-other b/t/recipes/checks/debian/patches/quilt/legacy-scripts/build-spec/orig/init-lsb-other new file mode 100644 index 0000000..adb4795 --- /dev/null +++ b/t/recipes/checks/debian/patches/quilt/legacy-scripts/build-spec/orig/init-lsb-other @@ -0,0 +1,22 @@ +#! /bin/sh +### BEGIN INIT INFO +# Provides: lsb-other +# Required-Start: $local_fs $remote_fs +# Required-Stop: $local_fs $remote_fs +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +# Description: This is another LSB script test, which has a missing +# Short-Description. +### END INIT INFO + +case "$1" in + start|stop|restart|reload|force-reload) + echo "Blah" + ;; + *) + echo "Usage: foo start" >&2 + exit 3 + ;; +esac + +: diff --git a/t/recipes/checks/debian/patches/quilt/legacy-scripts/build-spec/orig/init-no-lsb b/t/recipes/checks/debian/patches/quilt/legacy-scripts/build-spec/orig/init-no-lsb new file mode 100644 index 0000000..6b994dd --- /dev/null +++ b/t/recipes/checks/debian/patches/quilt/legacy-scripts/build-spec/orig/init-no-lsb @@ -0,0 +1,17 @@ +#! /bin/sh +# No LSB section, but otherwise okay. (Well, the messages are bad, but we +# don't check that yet.) + +case "$1" in + start) + echo "Blah starting" + ;; + stop) + echo "Blah stopping" + ;; + restart|force-reload) + echo "Blah restarting" + ;; +esac + +: diff --git a/t/recipes/checks/debian/patches/quilt/legacy-scripts/build-spec/orig/init-skeleton b/t/recipes/checks/debian/patches/quilt/legacy-scripts/build-spec/orig/init-skeleton new file mode 100644 index 0000000..c868508 --- /dev/null +++ b/t/recipes/checks/debian/patches/quilt/legacy-scripts/build-spec/orig/init-skeleton @@ -0,0 +1,150 @@ +#! /bin/sh +### BEGIN INIT INFO +# Provides: skeleton +# Required-Start: $local_fs $remote_fs +# Required-Stop: $local_fs $remote_fs +# Default-Start: 2 3 4 5 +# Default-Stop: S 0 1 6 +# Short-Description: Example Lintian initscript +# Description: This file should be used to construct scripts to be +# placed in /etc/init.d. +### END INIT INFO + +# Do NOT "set -e" + +# PATH should only include /usr/* if it runs after the mountnfs.sh script +PATH=/usr/sbin:/usr/bin:/sbin:/bin +DESC="Description of the service" +NAME=daemonexecutablename +DAEMON=/usr/sbin/$NAME +DAEMON_ARGS="--options args" +PIDFILE=/var/run/$NAME.pid +SCRIPTNAME=/etc/init.d/$NAME + +# Exit if the package is not installed +[ -x "$DAEMON" ] || exit 0 + +# Read configuration variable file if it is present +[ -r /etc/default/$NAME ] && . /etc/default/$NAME + +# Load the VERBOSE setting and other rcS variables +[ -f /etc/default/rcS ] && . /etc/default/rcS + +# Define LSB log_* functions. +# Depend on lsb-base (>= 3.0-6) to ensure that this file is present. +. /lib/lsb/init-functions + +# +# Function that starts the daemon/service +# +do_start() +{ + # Return + # 0 if daemon has been started + # 1 if daemon was already running + # 2 if daemon could not be started + start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON --test > /dev/null \ + || return 1 + start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON -- \ + $DAEMON_ARGS \ + || return 2 + # Add code here, if necessary, that waits for the process to be ready + # to handle requests from services started subsequently which depend + # on this one. As a last resort, sleep for some time. +} + +# +# Function that stops the daemon/service +# +do_stop() +{ + # Return + # 0 if daemon has been stopped + # 1 if daemon was already stopped + # 2 if daemon could not be stopped + # other if a failure occurred + start-stop-daemon --stop --quiet --retry=TERM/30/KILL/5 --pidfile $PIDFILE --name $NAME + RETVAL="$?" + [ "$RETVAL" = 2 ] && return 2 + # Wait for children to finish too if this is a daemon that forks + # and if the daemon is only ever run from this initscript. + # If the above conditions are not satisfied then add some other code + # that waits for the process to drop all resources that could be + # needed by services started subsequently. A last resort is to + # sleep for some time. + start-stop-daemon --stop --quiet --oknodo --retry=0/30/KILL/5 --exec $DAEMON + [ "$?" = 2 ] && return 2 + # Many daemons don't delete their pidfiles when they exit. + rm -f $PIDFILE + return "$RETVAL" +} + +# +# Function that sends a SIGHUP to the daemon/service +# +do_reload() { + # + # If the daemon can reload its configuration without + # restarting (for example, when it is sent a SIGHUP), + # then implement that here. + # + start-stop-daemon --stop --signal 1 --quiet --pidfile $PIDFILE --name $NAME + return 0 +} + +case "$1" in + start) + [ "$VERBOSE" != no ] && log_daemon_msg "Starting $DESC" "$NAME" + do_start + case "$?" in + 0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;; + 2) [ "$VERBOSE" != no ] && log_end_msg 1 ;; + esac + ;; + stop) + [ "$VERBOSE" != no ] && log_daemon_msg "Stopping $DESC" "$NAME" + do_stop + case "$?" in + 0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;; + 2) [ "$VERBOSE" != no ] && log_end_msg 1 ;; + esac + ;; + #reload|force-reload) + # + # If do_reload() is not implemented then leave this commented out + # and leave 'force-reload' as an alias for 'restart'. + # + #log_daemon_msg "Reloading $DESC" "$NAME" + #do_reload + #log_end_msg $? + #;; + restart|force-reload) + # + # If the "reload" option is implemented then remove the + # 'force-reload' alias + # + log_daemon_msg "Restarting $DESC" "$NAME" + do_stop + case "$?" in + 0|1) + do_start + case "$?" in + 0) log_end_msg 0 ;; + 1) log_end_msg 1 ;; # Old process is still running + *) log_end_msg 1 ;; # Failed to start + esac + ;; + *) + # Failed to stop + log_end_msg 1 + ;; + esac + ;; + *) + #echo "Usage: $SCRIPTNAME {start|stop|restart|reload|force-reload}" >&2 + echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload}" >&2 + exit 3 + ;; +esac + +: diff --git a/t/recipes/checks/debian/patches/quilt/legacy-scripts/build-spec/orig/jruby-broken b/t/recipes/checks/debian/patches/quilt/legacy-scripts/build-spec/orig/jruby-broken new file mode 100644 index 0000000..56f574d --- /dev/null +++ b/t/recipes/checks/debian/patches/quilt/legacy-scripts/build-spec/orig/jruby-broken @@ -0,0 +1,2 @@ +#!/usr/bin/jruby +# There's no non-versioned jruby, so this should be an error. diff --git a/t/recipes/checks/debian/patches/quilt/legacy-scripts/build-spec/orig/lefty-foo b/t/recipes/checks/debian/patches/quilt/legacy-scripts/build-spec/orig/lefty-foo new file mode 100644 index 0000000..52c003e --- /dev/null +++ b/t/recipes/checks/debian/patches/quilt/legacy-scripts/build-spec/orig/lefty-foo @@ -0,0 +1,2 @@ +#!/usr/local/bin/lefty + diff --git a/t/recipes/checks/debian/patches/quilt/legacy-scripts/build-spec/orig/make-foo b/t/recipes/checks/debian/patches/quilt/legacy-scripts/build-spec/orig/make-foo new file mode 100644 index 0000000..6b787b5 --- /dev/null +++ b/t/recipes/checks/debian/patches/quilt/legacy-scripts/build-spec/orig/make-foo @@ -0,0 +1,3 @@ +#!/usr/bin/make + + diff --git a/t/recipes/checks/debian/patches/quilt/legacy-scripts/build-spec/orig/perl-bizarre-1 b/t/recipes/checks/debian/patches/quilt/legacy-scripts/build-spec/orig/perl-bizarre-1 new file mode 100644 index 0000000..fc632c8 --- /dev/null +++ b/t/recipes/checks/debian/patches/quilt/legacy-scripts/build-spec/orig/perl-bizarre-1 @@ -0,0 +1,11 @@ +#! /bin/sh +eval '(exit $?0)' && eval 'PERL_BADLANG=x;export PERL_BADLANG;: \ +;exec perl -x -S -- "$0" ${1+"$@"};#'if 0; +eval 'setenv PERL_BADLANG x;exec perl -x -S -- "$0" $argv:q;#'.q+ +#!perl -w +package Htex::a2ping; $0=~/(.*)/s;unshift@INC,'.';do($1);die$@if$@;__END__+if !1; +# This Perl script was generated by JustLib2 at Wed Apr 23 09:14:13 2003. +# Don't touch/remove any lines above; http://www.inf.bme.hu/~pts/justlib + +# The above was actually seen in the wild and stresses the +# script_is_evil_and_wrong test. diff --git a/t/recipes/checks/debian/patches/quilt/legacy-scripts/build-spec/orig/perl-bizarre-2 b/t/recipes/checks/debian/patches/quilt/legacy-scripts/build-spec/orig/perl-bizarre-2 new file mode 100644 index 0000000..afd9cfe --- /dev/null +++ b/t/recipes/checks/debian/patches/quilt/legacy-scripts/build-spec/orig/perl-bizarre-2 @@ -0,0 +1,7 @@ +#!/bin/sh +eval 'exec /usr/bin/perl -wS $0 ${1+"$@"}' + if $running_under_some_shell; + +# I'm someone following perlrun except without using the Perl #! line. +# Now something to choke bash. +while (<>) { if (/%#/) { print } } diff --git a/t/recipes/checks/debian/patches/quilt/legacy-scripts/build-spec/orig/perl-bizarre-3 b/t/recipes/checks/debian/patches/quilt/legacy-scripts/build-spec/orig/perl-bizarre-3 new file mode 100644 index 0000000..44baf75 --- /dev/null +++ b/t/recipes/checks/debian/patches/quilt/legacy-scripts/build-spec/orig/perl-bizarre-3 @@ -0,0 +1,6 @@ +eval '(exit $?0)' && eval 'exec perl -wS $0 ${1+"$@"}' +& eval 'exec /usr/bin/perl -wS $0 $argv:q' + if $running_under_some_shell; + +# More utterly bizarreness from perlrun. This one even doesn't work if +# there's a valid #! line on the first line. I don't understand why.... diff --git a/t/recipes/checks/debian/patches/quilt/legacy-scripts/build-spec/orig/perlfoo b/t/recipes/checks/debian/patches/quilt/legacy-scripts/build-spec/orig/perlfoo new file mode 100644 index 0000000..5b27ed0 --- /dev/null +++ b/t/recipes/checks/debian/patches/quilt/legacy-scripts/build-spec/orig/perlfoo @@ -0,0 +1,3 @@ +#! /usr/bin/perl + +print "Hello, World!"; diff --git a/t/recipes/checks/debian/patches/quilt/legacy-scripts/build-spec/orig/phpenvfoo b/t/recipes/checks/debian/patches/quilt/legacy-scripts/build-spec/orig/phpenvfoo new file mode 100644 index 0000000..cbbfb2e --- /dev/null +++ b/t/recipes/checks/debian/patches/quilt/legacy-scripts/build-spec/orig/phpenvfoo @@ -0,0 +1,7 @@ +#!/usr/bin/env php + + +Dumb PHP script + + + diff --git a/t/recipes/checks/debian/patches/quilt/legacy-scripts/build-spec/orig/phpfoo b/t/recipes/checks/debian/patches/quilt/legacy-scripts/build-spec/orig/phpfoo new file mode 100644 index 0000000..e0595e6 --- /dev/null +++ b/t/recipes/checks/debian/patches/quilt/legacy-scripts/build-spec/orig/phpfoo @@ -0,0 +1,7 @@ +#!/usr/bin/php + + +Dumb PHP script + + + diff --git a/t/recipes/checks/debian/patches/quilt/legacy-scripts/build-spec/orig/rubyfoo b/t/recipes/checks/debian/patches/quilt/legacy-scripts/build-spec/orig/rubyfoo new file mode 100644 index 0000000..8024605 --- /dev/null +++ b/t/recipes/checks/debian/patches/quilt/legacy-scripts/build-spec/orig/rubyfoo @@ -0,0 +1,4 @@ +#!/bin/ruby1.8 + +# Ok, that example is really pathetic, but until we have +# some better code in checks/scripts, it will do diff --git a/t/recipes/checks/debian/patches/quilt/legacy-scripts/build-spec/orig/sh-broken b/t/recipes/checks/debian/patches/quilt/legacy-scripts/build-spec/orig/sh-broken new file mode 100644 index 0000000..7b79074 --- /dev/null +++ b/t/recipes/checks/debian/patches/quilt/legacy-scripts/build-spec/orig/sh-broken @@ -0,0 +1,2 @@ +#!/bin/sh +if fi diff --git a/t/recipes/checks/debian/patches/quilt/legacy-scripts/build-spec/orig/suidperlfoo b/t/recipes/checks/debian/patches/quilt/legacy-scripts/build-spec/orig/suidperlfoo new file mode 100644 index 0000000..bcbc471 --- /dev/null +++ b/t/recipes/checks/debian/patches/quilt/legacy-scripts/build-spec/orig/suidperlfoo @@ -0,0 +1,3 @@ +#! /usr/bin/suidperl + +print "Hello, World!"; diff --git a/t/recipes/checks/debian/patches/quilt/legacy-scripts/build-spec/orig/tkfoo b/t/recipes/checks/debian/patches/quilt/legacy-scripts/build-spec/orig/tkfoo new file mode 100755 index 0000000..533595a --- /dev/null +++ b/t/recipes/checks/debian/patches/quilt/legacy-scripts/build-spec/orig/tkfoo @@ -0,0 +1,31 @@ +#!/bin/sh +# +# Insane amount of empty lines and comments + +# +# +# +# + +# +# + +# +# +# + +# +# + +# +# This line makes the next one a comment in Tcl \ +exec wish "$0" -- ${1+"$@"} + +# lintian should not check the following for syntax +# if it detects the line above correctly +# Code snippet taken from eTkTab + +if { [array names prefs keybindings] != "" } { + # Read in the file + array set unparsed_bindings [ read_settings_file $prefs(keybindings)] +} diff --git a/t/recipes/checks/debian/patches/quilt/legacy-scripts/build-spec/orig/wishfoo b/t/recipes/checks/debian/patches/quilt/legacy-scripts/build-spec/orig/wishfoo new file mode 100644 index 0000000..035c9ad --- /dev/null +++ b/t/recipes/checks/debian/patches/quilt/legacy-scripts/build-spec/orig/wishfoo @@ -0,0 +1,4 @@ +#!/usr/bin/wish +# +# This is not actually a wish script, here to force a test of wish +# dependencies. diff --git a/t/recipes/checks/debian/patches/quilt/legacy-scripts/build-spec/orig/xsession-test b/t/recipes/checks/debian/patches/quilt/legacy-scripts/build-spec/orig/xsession-test new file mode 100644 index 0000000..ca49d72 --- /dev/null +++ b/t/recipes/checks/debian/patches/quilt/legacy-scripts/build-spec/orig/xsession-test @@ -0,0 +1,3 @@ +#!/bin/sh + +echo "Foo." diff --git a/t/recipes/checks/debian/patches/quilt/legacy-scripts/build-spec/pre-build b/t/recipes/checks/debian/patches/quilt/legacy-scripts/build-spec/pre-build new file mode 100755 index 0000000..b5649a8 --- /dev/null +++ b/t/recipes/checks/debian/patches/quilt/legacy-scripts/build-spec/pre-build @@ -0,0 +1,5 @@ +#!/bin/sh + +DIR="$1" + +rm -f "$DIR/debian/compat" diff --git a/t/recipes/checks/debian/patches/quilt/legacy-scripts/eval/desc b/t/recipes/checks/debian/patches/quilt/legacy-scripts/eval/desc new file mode 100644 index 0000000..d5236c9 --- /dev/null +++ b/t/recipes/checks/debian/patches/quilt/legacy-scripts/eval/desc @@ -0,0 +1,2 @@ +Testname: legacy-scripts +Check: debian/patches/quilt diff --git a/t/recipes/checks/debian/patches/quilt/legacy-scripts/eval/hints b/t/recipes/checks/debian/patches/quilt/legacy-scripts/eval/hints new file mode 100644 index 0000000..71dee45 --- /dev/null +++ b/t/recipes/checks/debian/patches/quilt/legacy-scripts/eval/hints @@ -0,0 +1,6 @@ +scripts (source): patch-file-present-but-not-mentioned-in-series [debian/patches/04_i_dont_have_a_description_either.patch] +scripts (source): patch-file-present-but-not-mentioned-in-series [debian/patches/03_specified_without_dpatch.dpatch] +scripts (source): patch-file-present-but-not-mentioned-in-series [debian/patches/02_i_dont_have_a_description.patch] +scripts (source): patch-file-present-but-not-mentioned-in-series [debian/patches/00options] +scripts (source): patch-file-present-but-not-mentioned-in-series [debian/patches/00list] +scripts (source): patch-file-present-but-not-mentioned-in-series [debian/patches/00list.sparc] diff --git a/t/recipes/checks/debian/patches/quilt/legacy-scripts/eval/post-test b/t/recipes/checks/debian/patches/quilt/legacy-scripts/eval/post-test new file mode 100644 index 0000000..faeef0b --- /dev/null +++ b/t/recipes/checks/debian/patches/quilt/legacy-scripts/eval/post-test @@ -0,0 +1 @@ +s/\(current is ([0-9]+\.)+[0-9]\)/(current is CURRENT)/ diff --git a/t/recipes/checks/debian/patches/quilt/patch-systems-empty-series/build-spec/debian/README.source b/t/recipes/checks/debian/patches/quilt/patch-systems-empty-series/build-spec/debian/README.source new file mode 100644 index 0000000..17250a4 --- /dev/null +++ b/t/recipes/checks/debian/patches/quilt/patch-systems-empty-series/build-spec/debian/README.source @@ -0,0 +1 @@ +This package uses quilt. See /usr/share/doc/quilt/README.source. diff --git a/t/recipes/checks/debian/patches/quilt/patch-systems-empty-series/build-spec/debian/patches/series b/t/recipes/checks/debian/patches/quilt/patch-systems-empty-series/build-spec/debian/patches/series new file mode 100644 index 0000000..e69de29 diff --git a/t/recipes/checks/debian/patches/quilt/patch-systems-empty-series/build-spec/fill-values b/t/recipes/checks/debian/patches/quilt/patch-systems-empty-series/build-spec/fill-values new file mode 100644 index 0000000..7bfde22 --- /dev/null +++ b/t/recipes/checks/debian/patches/quilt/patch-systems-empty-series/build-spec/fill-values @@ -0,0 +1,4 @@ +Skeleton: upload-native +Testname: patch-systems-empty-series +Description: Test for quilt patches with empty series +Extra-Build-Depends: quilt diff --git a/t/recipes/checks/debian/patches/quilt/patch-systems-empty-series/eval/desc b/t/recipes/checks/debian/patches/quilt/patch-systems-empty-series/eval/desc new file mode 100644 index 0000000..213374f --- /dev/null +++ b/t/recipes/checks/debian/patches/quilt/patch-systems-empty-series/eval/desc @@ -0,0 +1,4 @@ +Testname: patch-systems-empty-series +Test-Against: quilt-build-dep-but-no-series-file +See-Also: Debian Bug #525005 +Check: debian/patches/quilt diff --git a/t/recipes/checks/debian/patches/quilt/patch-systems-empty-series/eval/hints b/t/recipes/checks/debian/patches/quilt/patch-systems-empty-series/eval/hints new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/t/recipes/checks/debian/patches/quilt/patch-systems-empty-series/eval/hints @@ -0,0 +1 @@ + diff --git a/t/recipes/checks/debian/patches/quilt/patch-systems-quilt-debian-changes/build-spec/debian/patches/debian-changes-1.0-1 b/t/recipes/checks/debian/patches/quilt/patch-systems-quilt-debian-changes/build-spec/debian/patches/debian-changes-1.0-1 new file mode 100644 index 0000000..7d0132f --- /dev/null +++ b/t/recipes/checks/debian/patches/quilt/patch-systems-quilt-debian-changes/build-spec/debian/patches/debian-changes-1.0-1 @@ -0,0 +1,7 @@ +This is a description of the patch + +--- a/a 2008-11-11 19:38:12.000000000 +0000 ++++ a/a 2008-11-11 19:38:26.000000000 +0000 +@@ -1 +1,2 @@ + sample text ++and some more sample text diff --git a/t/recipes/checks/debian/patches/quilt/patch-systems-quilt-debian-changes/build-spec/debian/patches/series b/t/recipes/checks/debian/patches/quilt/patch-systems-quilt-debian-changes/build-spec/debian/patches/series new file mode 100644 index 0000000..9ca2b60 --- /dev/null +++ b/t/recipes/checks/debian/patches/quilt/patch-systems-quilt-debian-changes/build-spec/debian/patches/series @@ -0,0 +1 @@ +debian-changes-1.0-1 diff --git a/t/recipes/checks/debian/patches/quilt/patch-systems-quilt-debian-changes/build-spec/fill-values b/t/recipes/checks/debian/patches/quilt/patch-systems-quilt-debian-changes/build-spec/fill-values new file mode 100644 index 0000000..69be6ed --- /dev/null +++ b/t/recipes/checks/debian/patches/quilt/patch-systems-quilt-debian-changes/build-spec/fill-values @@ -0,0 +1,4 @@ +Testname: patch-systems-quilt-debian-changes +Description: Test a 3.0 (quilt) package which has a debian-changes-XXX patch +Skeleton: upload-non-native +Source-Format: 3.0 (quilt) diff --git a/t/recipes/checks/debian/patches/quilt/patch-systems-quilt-debian-changes/build-spec/orig/a b/t/recipes/checks/debian/patches/quilt/patch-systems-quilt-debian-changes/build-spec/orig/a new file mode 100644 index 0000000..c0acc64 --- /dev/null +++ b/t/recipes/checks/debian/patches/quilt/patch-systems-quilt-debian-changes/build-spec/orig/a @@ -0,0 +1 @@ +sample text diff --git a/t/recipes/checks/debian/patches/quilt/patch-systems-quilt-debian-changes/eval/desc b/t/recipes/checks/debian/patches/quilt/patch-systems-quilt-debian-changes/eval/desc new file mode 100644 index 0000000..2a5f21f --- /dev/null +++ b/t/recipes/checks/debian/patches/quilt/patch-systems-quilt-debian-changes/eval/desc @@ -0,0 +1,2 @@ +Testname: patch-systems-quilt-debian-changes +Check: debian/patches/quilt diff --git a/t/recipes/checks/debian/patches/quilt/patch-systems-quilt-debian-changes/eval/hints b/t/recipes/checks/debian/patches/quilt/patch-systems-quilt-debian-changes/eval/hints new file mode 100644 index 0000000..fd3a321 --- /dev/null +++ b/t/recipes/checks/debian/patches/quilt/patch-systems-quilt-debian-changes/eval/hints @@ -0,0 +1 @@ +patch-systems-quilt-debian-changes (source): format-3.0-but-debian-changes-patch [debian/patches/debian-changes-1.0-1] diff --git a/t/recipes/checks/debian/patches/quilt/patch-systems-quilt-description/build-spec/debian/README.source b/t/recipes/checks/debian/patches/quilt/patch-systems-quilt-description/build-spec/debian/README.source new file mode 100644 index 0000000..17250a4 --- /dev/null +++ b/t/recipes/checks/debian/patches/quilt/patch-systems-quilt-description/build-spec/debian/README.source @@ -0,0 +1 @@ +This package uses quilt. See /usr/share/doc/quilt/README.source. diff --git a/t/recipes/checks/debian/patches/quilt/patch-systems-quilt-description/build-spec/debian/patches/01_this_patch_is_ok b/t/recipes/checks/debian/patches/quilt/patch-systems-quilt-description/build-spec/debian/patches/01_this_patch_is_ok new file mode 100644 index 0000000..7eee707 --- /dev/null +++ b/t/recipes/checks/debian/patches/quilt/patch-systems-quilt-description/build-spec/debian/patches/01_this_patch_is_ok @@ -0,0 +1,7 @@ +This is a description of the patch + +--- a.orig 2008-11-11 19:38:12.000000000 +0000 ++++ a 2008-11-11 19:38:26.000000000 +0000 +@@ -1 +1,2 @@ + sample text ++and some more sample text diff --git a/t/recipes/checks/debian/patches/quilt/patch-systems-quilt-description/build-spec/debian/patches/02_this_one_has_no_description b/t/recipes/checks/debian/patches/quilt/patch-systems-quilt-description/build-spec/debian/patches/02_this_one_has_no_description new file mode 100644 index 0000000..12128b8 --- /dev/null +++ b/t/recipes/checks/debian/patches/quilt/patch-systems-quilt-description/build-spec/debian/patches/02_this_one_has_no_description @@ -0,0 +1,5 @@ +--- a.orig 2008-11-11 19:38:12.000000000 +0000 ++++ a 2008-11-11 19:38:26.000000000 +0000 +@@ -1 +1,2 @@ + sample text ++and some more sample text diff --git a/t/recipes/checks/debian/patches/quilt/patch-systems-quilt-description/build-spec/debian/patches/03_a_git_patch b/t/recipes/checks/debian/patches/quilt/patch-systems-quilt-description/build-spec/debian/patches/03_a_git_patch new file mode 100644 index 0000000..025656a --- /dev/null +++ b/t/recipes/checks/debian/patches/quilt/patch-systems-quilt-description/build-spec/debian/patches/03_a_git_patch @@ -0,0 +1,8 @@ +diff --git a/a b/a +index eb39593..7258d2f 100644 +--- a 2008-11-11 19:38:12.000000000 +0000 ++++ a 2008-11-11 19:38:26.000000000 +0000 +@@ -1 +1,3 @@ + sample text + and some more sample text ++and yet another line diff --git a/t/recipes/checks/debian/patches/quilt/patch-systems-quilt-description/build-spec/debian/patches/04_template_description b/t/recipes/checks/debian/patches/quilt/patch-systems-quilt-description/build-spec/debian/patches/04_template_description new file mode 100644 index 0000000..09bfd88 --- /dev/null +++ b/t/recipes/checks/debian/patches/quilt/patch-systems-quilt-description/build-spec/debian/patches/04_template_description @@ -0,0 +1,17 @@ +Description: + This patch include a templated text for description + TODO: Put a short summary on the line above and replace this paragraph + with a longer explanation of this change. Complete the meta-information + with other relevant fields (see below for details). To make it easier, the + information below has been extracted from the changelog. Adjust it or drop + it. + . +diff --git a/a b/a +index eb39593..7258d2f 100644 +--- a 2008-11-11 19:38:12.000000000 +0000 ++++ a 2008-11-11 19:38:26.000000000 +0000 +@@ -1 +1,4 @@ + sample text + and some more sample text + and yet another line ++and so on diff --git a/t/recipes/checks/debian/patches/quilt/patch-systems-quilt-description/build-spec/debian/patches/series b/t/recipes/checks/debian/patches/quilt/patch-systems-quilt-description/build-spec/debian/patches/series new file mode 100644 index 0000000..a7ab472 --- /dev/null +++ b/t/recipes/checks/debian/patches/quilt/patch-systems-quilt-description/build-spec/debian/patches/series @@ -0,0 +1,4 @@ +01_this_patch_is_ok +02_this_one_has_no_description +03_a_git_patch +04_template_description diff --git a/t/recipes/checks/debian/patches/quilt/patch-systems-quilt-description/build-spec/fill-values b/t/recipes/checks/debian/patches/quilt/patch-systems-quilt-description/build-spec/fill-values new file mode 100644 index 0000000..d957fdd --- /dev/null +++ b/t/recipes/checks/debian/patches/quilt/patch-systems-quilt-description/build-spec/fill-values @@ -0,0 +1,4 @@ +Skeleton: upload-native +Testname: patch-systems-quilt-description +Description: Test for quilt patches which do not have accompanying descriptions +Extra-Build-Depends: quilt diff --git a/t/recipes/checks/debian/patches/quilt/patch-systems-quilt-description/eval/desc b/t/recipes/checks/debian/patches/quilt/patch-systems-quilt-description/eval/desc new file mode 100644 index 0000000..90fcde3 --- /dev/null +++ b/t/recipes/checks/debian/patches/quilt/patch-systems-quilt-description/eval/desc @@ -0,0 +1,3 @@ +Testname: patch-systems-quilt-description +See-Also: Debian Bug #498892 +Check: debian/patches/quilt diff --git a/t/recipes/checks/debian/patches/quilt/patch-systems-quilt-description/eval/hints b/t/recipes/checks/debian/patches/quilt/patch-systems-quilt-description/eval/hints new file mode 100644 index 0000000..dd7eb59 --- /dev/null +++ b/t/recipes/checks/debian/patches/quilt/patch-systems-quilt-description/eval/hints @@ -0,0 +1,3 @@ +patch-systems-quilt-description (source): quilt-patch-using-template-description [debian/patches/04_template_description] +patch-systems-quilt-description (source): quilt-patch-missing-description [debian/patches/03_a_git_patch] +patch-systems-quilt-description (source): quilt-patch-missing-description [debian/patches/02_this_one_has_no_description] diff --git a/t/recipes/checks/debian/patches/quilt/patch-systems-quilt-general/build-spec/debian/README.source b/t/recipes/checks/debian/patches/quilt/patch-systems-quilt-general/build-spec/debian/README.source new file mode 100644 index 0000000..052084e --- /dev/null +++ b/t/recipes/checks/debian/patches/quilt/patch-systems-quilt-general/build-spec/debian/README.source @@ -0,0 +1 @@ +Some stuff about quilt here. diff --git a/t/recipes/checks/debian/patches/quilt/patch-systems-quilt-general/build-spec/debian/patches/README b/t/recipes/checks/debian/patches/quilt/patch-systems-quilt-general/build-spec/debian/patches/README new file mode 100644 index 0000000..843d249 --- /dev/null +++ b/t/recipes/checks/debian/patches/quilt/patch-systems-quilt-general/build-spec/debian/patches/README @@ -0,0 +1 @@ +false positive for patch-file-present-but-not-mentioned-in-series tag diff --git a/t/recipes/checks/debian/patches/quilt/patch-systems-quilt-general/build-spec/debian/patches/README.patches b/t/recipes/checks/debian/patches/quilt/patch-systems-quilt-general/build-spec/debian/patches/README.patches new file mode 100644 index 0000000..843d249 --- /dev/null +++ b/t/recipes/checks/debian/patches/quilt/patch-systems-quilt-general/build-spec/debian/patches/README.patches @@ -0,0 +1 @@ +false positive for patch-file-present-but-not-mentioned-in-series tag diff --git a/t/recipes/checks/debian/patches/quilt/patch-systems-quilt-general/build-spec/debian/patches/file-commented-out b/t/recipes/checks/debian/patches/quilt/patch-systems-quilt-general/build-spec/debian/patches/file-commented-out new file mode 100644 index 0000000..257cc56 --- /dev/null +++ b/t/recipes/checks/debian/patches/quilt/patch-systems-quilt-general/build-spec/debian/patches/file-commented-out @@ -0,0 +1 @@ +foo diff --git a/t/recipes/checks/debian/patches/quilt/patch-systems-quilt-general/build-spec/debian/patches/file-mentioned-in-vendor-series b/t/recipes/checks/debian/patches/quilt/patch-systems-quilt-general/build-spec/debian/patches/file-mentioned-in-vendor-series new file mode 100644 index 0000000..257cc56 --- /dev/null +++ b/t/recipes/checks/debian/patches/quilt/patch-systems-quilt-general/build-spec/debian/patches/file-mentioned-in-vendor-series @@ -0,0 +1 @@ +foo diff --git a/t/recipes/checks/debian/patches/quilt/patch-systems-quilt-general/build-spec/debian/patches/file-not-referenced-in-series b/t/recipes/checks/debian/patches/quilt/patch-systems-quilt-general/build-spec/debian/patches/file-not-referenced-in-series new file mode 100644 index 0000000..257cc56 --- /dev/null +++ b/t/recipes/checks/debian/patches/quilt/patch-systems-quilt-general/build-spec/debian/patches/file-not-referenced-in-series @@ -0,0 +1 @@ +foo diff --git a/t/recipes/checks/debian/patches/quilt/patch-systems-quilt-general/build-spec/debian/patches/series b/t/recipes/checks/debian/patches/quilt/patch-systems-quilt-general/build-spec/debian/patches/series new file mode 100644 index 0000000..040d7e8 --- /dev/null +++ b/t/recipes/checks/debian/patches/quilt/patch-systems-quilt-general/build-spec/debian/patches/series @@ -0,0 +1,6 @@ +# tries to create an existing file, which fails in dpkg-source +# some-file +some-other-file -p0 +# non-existent patches trigger error in dpkg-source +# some-nonexistent-patch +# file-commented-out diff --git a/t/recipes/checks/debian/patches/quilt/patch-systems-quilt-general/build-spec/debian/patches/some-file b/t/recipes/checks/debian/patches/quilt/patch-systems-quilt-general/build-spec/debian/patches/some-file new file mode 100644 index 0000000..7749d40 --- /dev/null +++ b/t/recipes/checks/debian/patches/quilt/patch-systems-quilt-general/build-spec/debian/patches/some-file @@ -0,0 +1,11 @@ +Some regular patch creating a file. + +--- /dev/null ++++ debian/debian/some-file +@@ -0,0 +1,6 @@ ++Some ++file ++created ++in ++debian ++directory. diff --git a/t/recipes/checks/debian/patches/quilt/patch-systems-quilt-general/build-spec/debian/patches/some-other-file b/t/recipes/checks/debian/patches/quilt/patch-systems-quilt-general/build-spec/debian/patches/some-other-file new file mode 100644 index 0000000..ed24c8f --- /dev/null +++ b/t/recipes/checks/debian/patches/quilt/patch-systems-quilt-general/build-spec/debian/patches/some-other-file @@ -0,0 +1,12 @@ +Some -p0 patch creating a file. + +--- /dev/null ++++ debian/some-other-file +@@ -0,0 +1,7 @@ ++Some ++other ++file ++created ++in ++debian ++directory. diff --git a/t/recipes/checks/debian/patches/quilt/patch-systems-quilt-general/build-spec/debian/patches/subdir/README b/t/recipes/checks/debian/patches/quilt/patch-systems-quilt-general/build-spec/debian/patches/subdir/README new file mode 100644 index 0000000..843d249 --- /dev/null +++ b/t/recipes/checks/debian/patches/quilt/patch-systems-quilt-general/build-spec/debian/patches/subdir/README @@ -0,0 +1 @@ +false positive for patch-file-present-but-not-mentioned-in-series tag diff --git a/t/recipes/checks/debian/patches/quilt/patch-systems-quilt-general/build-spec/debian/patches/subdir/file-not-referenced-in-series-2 b/t/recipes/checks/debian/patches/quilt/patch-systems-quilt-general/build-spec/debian/patches/subdir/file-not-referenced-in-series-2 new file mode 100644 index 0000000..257cc56 --- /dev/null +++ b/t/recipes/checks/debian/patches/quilt/patch-systems-quilt-general/build-spec/debian/patches/subdir/file-not-referenced-in-series-2 @@ -0,0 +1 @@ +foo diff --git a/t/recipes/checks/debian/patches/quilt/patch-systems-quilt-general/build-spec/debian/patches/vendorname.series b/t/recipes/checks/debian/patches/quilt/patch-systems-quilt-general/build-spec/debian/patches/vendorname.series new file mode 100644 index 0000000..4232ed0 --- /dev/null +++ b/t/recipes/checks/debian/patches/quilt/patch-systems-quilt-general/build-spec/debian/patches/vendorname.series @@ -0,0 +1 @@ +file-mentioned-in-vendor-series diff --git a/t/recipes/checks/debian/patches/quilt/patch-systems-quilt-general/build-spec/diff/README b/t/recipes/checks/debian/patches/quilt/patch-systems-quilt-general/build-spec/diff/README new file mode 100644 index 0000000..55d9771 --- /dev/null +++ b/t/recipes/checks/debian/patches/quilt/patch-systems-quilt-general/build-spec/diff/README @@ -0,0 +1 @@ +Debian README diff --git a/t/recipes/checks/debian/patches/quilt/patch-systems-quilt-general/build-spec/fill-values b/t/recipes/checks/debian/patches/quilt/patch-systems-quilt-general/build-spec/fill-values new file mode 100644 index 0000000..ced4b7a --- /dev/null +++ b/t/recipes/checks/debian/patches/quilt/patch-systems-quilt-general/build-spec/fill-values @@ -0,0 +1,4 @@ +Testname: patch-systems-quilt-general +Skeleton: upload-non-native +Extra-Build-Depends: quilt, dpatch +Description: General tests of a quilt patch system diff --git a/t/recipes/checks/debian/patches/quilt/patch-systems-quilt-general/eval/desc b/t/recipes/checks/debian/patches/quilt/patch-systems-quilt-general/eval/desc new file mode 100644 index 0000000..d60faca --- /dev/null +++ b/t/recipes/checks/debian/patches/quilt/patch-systems-quilt-general/eval/desc @@ -0,0 +1,2 @@ +Testname: patch-systems-quilt-general +Check: debian/patches/quilt diff --git a/t/recipes/checks/debian/patches/quilt/patch-systems-quilt-general/eval/hints b/t/recipes/checks/debian/patches/quilt/patch-systems-quilt-general/eval/hints new file mode 100644 index 0000000..211bcbd --- /dev/null +++ b/t/recipes/checks/debian/patches/quilt/patch-systems-quilt-general/eval/hints @@ -0,0 +1,6 @@ +patch-systems-quilt-general (source): quilt-patch-with-non-standard-options some-other-file -p0 [debian/patches/series:3] +patch-systems-quilt-general (source): quilt-patch-using-template-description [debian/patches/debian-changes-1.0-1] +patch-systems-quilt-general (source): patch-file-present-but-not-mentioned-in-series [debian/patches/subdir/file-not-referenced-in-series-2] +patch-systems-quilt-general (source): patch-file-present-but-not-mentioned-in-series [debian/patches/file-not-referenced-in-series] +patch-systems-quilt-general (source): package-uses-vendor-specific-patch-series [debian/patches/vendorname.series] +patch-systems-quilt-general (source): format-3.0-but-debian-changes-patch [debian/patches/debian-changes-1.0-1] diff --git a/t/recipes/checks/debian/patches/quilt/patch-systems-quilt-no-depends/build-spec/debian/patches/series b/t/recipes/checks/debian/patches/quilt/patch-systems-quilt-no-depends/build-spec/debian/patches/series new file mode 100644 index 0000000..a920a3a --- /dev/null +++ b/t/recipes/checks/debian/patches/quilt/patch-systems-quilt-no-depends/build-spec/debian/patches/series @@ -0,0 +1 @@ +some-change.patch diff --git a/t/recipes/checks/debian/patches/quilt/patch-systems-quilt-no-depends/build-spec/debian/patches/some-change.patch b/t/recipes/checks/debian/patches/quilt/patch-systems-quilt-no-depends/build-spec/debian/patches/some-change.patch new file mode 100644 index 0000000..c34fd8f --- /dev/null +++ b/t/recipes/checks/debian/patches/quilt/patch-systems-quilt-no-depends/build-spec/debian/patches/some-change.patch @@ -0,0 +1,6 @@ +Description: Does something very useful - it hides "empty-series" tag +--- a/README 2010-12-27 14:09:55.025074505 +0100 ++++ b/README 2010-12-27 14:10:09.656080199 +0100 +@@ -1 +1,2 @@ + Hello World ++Goodbye world diff --git a/t/recipes/checks/debian/patches/quilt/patch-systems-quilt-no-depends/build-spec/fill-values b/t/recipes/checks/debian/patches/quilt/patch-systems-quilt-no-depends/build-spec/fill-values new file mode 100644 index 0000000..16086dc --- /dev/null +++ b/t/recipes/checks/debian/patches/quilt/patch-systems-quilt-no-depends/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: upload-native +Testname: patch-systems-quilt-no-depends +Description: Test for quilt series but no B-D on quilt diff --git a/t/recipes/checks/debian/patches/quilt/patch-systems-quilt-no-depends/build-spec/orig/README b/t/recipes/checks/debian/patches/quilt/patch-systems-quilt-no-depends/build-spec/orig/README new file mode 100644 index 0000000..557db03 --- /dev/null +++ b/t/recipes/checks/debian/patches/quilt/patch-systems-quilt-no-depends/build-spec/orig/README @@ -0,0 +1 @@ +Hello World diff --git a/t/recipes/checks/debian/patches/quilt/patch-systems-quilt-no-depends/eval/desc b/t/recipes/checks/debian/patches/quilt/patch-systems-quilt-no-depends/eval/desc new file mode 100644 index 0000000..6b230a3 --- /dev/null +++ b/t/recipes/checks/debian/patches/quilt/patch-systems-quilt-no-depends/eval/desc @@ -0,0 +1,4 @@ +Testname: patch-systems-quilt-no-depends +Test-Against: + patch-file-present-but-not-mentioned-in-series +Check: debian/patches/quilt diff --git a/t/recipes/checks/debian/patches/quilt/patch-systems-quilt-no-depends/eval/hints b/t/recipes/checks/debian/patches/quilt/patch-systems-quilt-no-depends/eval/hints new file mode 100644 index 0000000..b868327 --- /dev/null +++ b/t/recipes/checks/debian/patches/quilt/patch-systems-quilt-no-depends/eval/hints @@ -0,0 +1 @@ +patch-systems-quilt-no-depends (source): quilt-series-but-no-build-dep [debian/patches/series] diff --git a/t/recipes/checks/debian/patches/quilt/patch-systems-quilt-no-newline/build-spec/debian/README.source b/t/recipes/checks/debian/patches/quilt/patch-systems-quilt-no-newline/build-spec/debian/README.source new file mode 100644 index 0000000..17250a4 --- /dev/null +++ b/t/recipes/checks/debian/patches/quilt/patch-systems-quilt-no-newline/build-spec/debian/README.source @@ -0,0 +1 @@ +This package uses quilt. See /usr/share/doc/quilt/README.source. diff --git a/t/recipes/checks/debian/patches/quilt/patch-systems-quilt-no-newline/build-spec/debian/patches/01_this_patch_is_ok b/t/recipes/checks/debian/patches/quilt/patch-systems-quilt-no-newline/build-spec/debian/patches/01_this_patch_is_ok new file mode 100644 index 0000000..7eee707 --- /dev/null +++ b/t/recipes/checks/debian/patches/quilt/patch-systems-quilt-no-newline/build-spec/debian/patches/01_this_patch_is_ok @@ -0,0 +1,7 @@ +This is a description of the patch + +--- a.orig 2008-11-11 19:38:12.000000000 +0000 ++++ a 2008-11-11 19:38:26.000000000 +0000 +@@ -1 +1,2 @@ + sample text ++and some more sample text diff --git a/t/recipes/checks/debian/patches/quilt/patch-systems-quilt-no-newline/build-spec/debian/patches/series b/t/recipes/checks/debian/patches/quilt/patch-systems-quilt-no-newline/build-spec/debian/patches/series new file mode 100644 index 0000000..0ca9c9c --- /dev/null +++ b/t/recipes/checks/debian/patches/quilt/patch-systems-quilt-no-newline/build-spec/debian/patches/series @@ -0,0 +1 @@ +01_this_patch_is_ok \ No newline at end of file diff --git a/t/recipes/checks/debian/patches/quilt/patch-systems-quilt-no-newline/build-spec/fill-values b/t/recipes/checks/debian/patches/quilt/patch-systems-quilt-no-newline/build-spec/fill-values new file mode 100644 index 0000000..40b486d --- /dev/null +++ b/t/recipes/checks/debian/patches/quilt/patch-systems-quilt-no-newline/build-spec/fill-values @@ -0,0 +1,4 @@ +Skeleton: upload-native +Testname: patch-systems-quilt-no-newline +Description: Patch system with no debian/series that does not end with newline +Extra-Build-Depends: quilt diff --git a/t/recipes/checks/debian/patches/quilt/patch-systems-quilt-no-newline/eval/desc b/t/recipes/checks/debian/patches/quilt/patch-systems-quilt-no-newline/eval/desc new file mode 100644 index 0000000..0cee74b --- /dev/null +++ b/t/recipes/checks/debian/patches/quilt/patch-systems-quilt-no-newline/eval/desc @@ -0,0 +1,2 @@ +Testname: patch-systems-quilt-no-newline +Check: debian/patches/quilt diff --git a/t/recipes/checks/debian/patches/quilt/patch-systems-quilt-no-newline/eval/hints b/t/recipes/checks/debian/patches/quilt/patch-systems-quilt-no-newline/eval/hints new file mode 100644 index 0000000..5417fe3 --- /dev/null +++ b/t/recipes/checks/debian/patches/quilt/patch-systems-quilt-no-newline/eval/hints @@ -0,0 +1 @@ +patch-systems-quilt-no-newline (source): quilt-series-without-trailing-newline [debian/patches/series] diff --git a/t/recipes/checks/debian/patches/quilt/patch-systems-quilt-no-series/build-spec/debian/README.source b/t/recipes/checks/debian/patches/quilt/patch-systems-quilt-no-series/build-spec/debian/README.source new file mode 100644 index 0000000..17250a4 --- /dev/null +++ b/t/recipes/checks/debian/patches/quilt/patch-systems-quilt-no-series/build-spec/debian/README.source @@ -0,0 +1 @@ +This package uses quilt. See /usr/share/doc/quilt/README.source. diff --git a/t/recipes/checks/debian/patches/quilt/patch-systems-quilt-no-series/build-spec/fill-values b/t/recipes/checks/debian/patches/quilt/patch-systems-quilt-no-series/build-spec/fill-values new file mode 100644 index 0000000..5234bfe --- /dev/null +++ b/t/recipes/checks/debian/patches/quilt/patch-systems-quilt-no-series/build-spec/fill-values @@ -0,0 +1,5 @@ +Testname: patch-systems-quilt-no-series +Skeleton: upload-non-native +Source-Format: 1.0 +Description: Test for quilt patches with no series +Extra-Build-Depends: quilt diff --git a/t/recipes/checks/debian/patches/quilt/patch-systems-quilt-no-series/build-spec/orig/README b/t/recipes/checks/debian/patches/quilt/patch-systems-quilt-no-series/build-spec/orig/README new file mode 100644 index 0000000..336f590 --- /dev/null +++ b/t/recipes/checks/debian/patches/quilt/patch-systems-quilt-no-series/build-spec/orig/README @@ -0,0 +1 @@ +Hallo World diff --git a/t/recipes/checks/debian/patches/quilt/patch-systems-quilt-no-series/eval/desc b/t/recipes/checks/debian/patches/quilt/patch-systems-quilt-no-series/eval/desc new file mode 100644 index 0000000..db2e53d --- /dev/null +++ b/t/recipes/checks/debian/patches/quilt/patch-systems-quilt-no-series/eval/desc @@ -0,0 +1,2 @@ +Testname: patch-systems-quilt-no-series +Check: debian/patches/quilt diff --git a/t/recipes/checks/debian/patches/quilt/patch-systems-quilt-no-series/eval/hints b/t/recipes/checks/debian/patches/quilt/patch-systems-quilt-no-series/eval/hints new file mode 100644 index 0000000..d9f628c --- /dev/null +++ b/t/recipes/checks/debian/patches/quilt/patch-systems-quilt-no-series/eval/hints @@ -0,0 +1 @@ +patch-systems-quilt-no-series (source): quilt-build-dep-but-no-series-file diff --git a/t/recipes/checks/debian/patches/quilt/spelling-general/build-spec/debian/changelog.in b/t/recipes/checks/debian/patches/quilt/spelling-general/build-spec/debian/changelog.in new file mode 100644 index 0000000..2d380f5 --- /dev/null +++ b/t/recipes/checks/debian/patches/quilt/spelling-general/build-spec/debian/changelog.in @@ -0,0 +1,13 @@ +[% $source %] ([% $version %]) unstable; urgency=low + + * Lintian Test Suite. + * Test: [% $testname %] + + * Suppress "should close ITP bug" messages. (Closes: #123456) + * This line has a speling error. + - This line has the same speling error, but we should only + get one tag for it. + * Corrected spelling: abov -> above. + * Corrected typo: abov -> above. + + -- [% $author %] [% $date %] diff --git a/t/recipes/checks/debian/patches/quilt/spelling-general/build-spec/debian/copyright b/t/recipes/checks/debian/patches/quilt/spelling-general/build-spec/debian/copyright new file mode 100644 index 0000000..30cbe5c --- /dev/null +++ b/t/recipes/checks/debian/patches/quilt/spelling-general/build-spec/debian/copyright @@ -0,0 +1,21 @@ +This duplicate duplicate word should not trigger. (re. #897402) + +This is part of the testsuite of lintian. See the file debian/copyright +in the lintian source directory for more details. + +Insofar as this is copyrightable, it is: + + Copyright 2010 Russ Allbery + +This text should not generate a spelling error for "ment": + + computer software documentation," as such terms are used in + 48 C.F.R. 12.212 (SEPT 1995) and is provided to the U.S. Govern- + ment only as a commercial end item. Consistent with 48 C.F.R. + 12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4 (JUNE 1995), + +But deafult is still a spelling error. + +This text should not generate a spelling error for the duplicate "a" (re. #844166) + + following Attribution Information: (a) a copyright notice including the name diff --git a/t/recipes/checks/debian/patches/quilt/spelling-general/build-spec/debian/doc-base b/t/recipes/checks/debian/patches/quilt/spelling-general/build-spec/debian/doc-base new file mode 100644 index 0000000..3839a9b --- /dev/null +++ b/t/recipes/checks/debian/patches/quilt/spelling-general/build-spec/debian/doc-base @@ -0,0 +1,9 @@ +Document: spelling-general +Title: Check for debian doc-base spelling errors +Author: Russ Allbery +Abstract: This control file exercises, picky, speling error checks for + Debian doc-base files, such as meta-package. +Section: Programming + +Format: text +Files: /usr/share/doc/spelling-general/copyright diff --git a/t/recipes/checks/debian/patches/quilt/spelling-general/build-spec/debian/patches/add-readme b/t/recipes/checks/debian/patches/quilt/spelling-general/build-spec/debian/patches/add-readme new file mode 100644 index 0000000..b1647ba --- /dev/null +++ b/t/recipes/checks/debian/patches/quilt/spelling-general/build-spec/debian/patches/add-readme @@ -0,0 +1,8 @@ +This is a deliberate speling error. duplicate + +duplicate + +--- upstream.orig/README ++++ upstream/README +@@ -0,0 +1 @@ ++Added by patch system. diff --git a/t/recipes/checks/debian/patches/quilt/spelling-general/build-spec/debian/patches/nonrel b/t/recipes/checks/debian/patches/quilt/spelling-general/build-spec/debian/patches/nonrel new file mode 100644 index 0000000..48e7740 --- /dev/null +++ b/t/recipes/checks/debian/patches/quilt/spelling-general/build-spec/debian/patches/nonrel @@ -0,0 +1,6 @@ +This is a deliberate speling error. (false positive; description mentions typo) + +--- upstream.orig/nonrel ++++ upstream/nonrel +@@ -0,0 +1 @@ ++Added by patch system. diff --git a/t/recipes/checks/debian/patches/quilt/spelling-general/build-spec/debian/patches/nonrel2 b/t/recipes/checks/debian/patches/quilt/spelling-general/build-spec/debian/patches/nonrel2 new file mode 100644 index 0000000..e7dd209 --- /dev/null +++ b/t/recipes/checks/debian/patches/quilt/spelling-general/build-spec/debian/patches/nonrel2 @@ -0,0 +1,8 @@ +From: Speling Error +Date: Mon, 10 Sep 2018 05:16:45 +0200 +Subject: Foo bar + +--- upstream.orig/nonrel2 ++++ upstream/nonrel2 +@@ -0,0 +1 @@ ++Added by patch system. diff --git a/t/recipes/checks/debian/patches/quilt/spelling-general/build-spec/debian/patches/series b/t/recipes/checks/debian/patches/quilt/spelling-general/build-spec/debian/patches/series new file mode 100644 index 0000000..d31f673 --- /dev/null +++ b/t/recipes/checks/debian/patches/quilt/spelling-general/build-spec/debian/patches/series @@ -0,0 +1,4 @@ +add-readme +spelling +nonrel +nonrel2 diff --git a/t/recipes/checks/debian/patches/quilt/spelling-general/build-spec/debian/patches/spelling b/t/recipes/checks/debian/patches/quilt/spelling-general/build-spec/debian/patches/spelling new file mode 100644 index 0000000..29b9cfd --- /dev/null +++ b/t/recipes/checks/debian/patches/quilt/spelling-general/build-spec/debian/patches/spelling @@ -0,0 +1,6 @@ +This is a deliberate speling error. (false positive; filename match) + +--- upstream.orig/spelling ++++ upstream/spelling +@@ -0,0 +1 @@ ++Added by patch system. diff --git a/t/recipes/checks/debian/patches/quilt/spelling-general/build-spec/fill-values b/t/recipes/checks/debian/patches/quilt/spelling-general/build-spec/fill-values new file mode 100644 index 0000000..1c8c790 --- /dev/null +++ b/t/recipes/checks/debian/patches/quilt/spelling-general/build-spec/fill-values @@ -0,0 +1,4 @@ +Testname: spelling-general +Skeleton: upload-non-native +Source-Format: 3.0 (quilt) +Description: General checks for spelling errors diff --git a/t/recipes/checks/debian/patches/quilt/spelling-general/eval/desc b/t/recipes/checks/debian/patches/quilt/spelling-general/eval/desc new file mode 100644 index 0000000..6d9495e --- /dev/null +++ b/t/recipes/checks/debian/patches/quilt/spelling-general/eval/desc @@ -0,0 +1,2 @@ +Testname: spelling-general +Check: debian/patches/quilt diff --git a/t/recipes/checks/debian/patches/quilt/spelling-general/eval/hints b/t/recipes/checks/debian/patches/quilt/spelling-general/eval/hints new file mode 100644 index 0000000..05d7e24 --- /dev/null +++ b/t/recipes/checks/debian/patches/quilt/spelling-general/eval/hints @@ -0,0 +1 @@ +spelling-general (source): spelling-error-in-patch-description speling spelling [debian/patches/add-readme] diff --git a/t/recipes/checks/debian/patches/spelling-general/build-spec/debian/changelog.in b/t/recipes/checks/debian/patches/spelling-general/build-spec/debian/changelog.in new file mode 100644 index 0000000..2d380f5 --- /dev/null +++ b/t/recipes/checks/debian/patches/spelling-general/build-spec/debian/changelog.in @@ -0,0 +1,13 @@ +[% $source %] ([% $version %]) unstable; urgency=low + + * Lintian Test Suite. + * Test: [% $testname %] + + * Suppress "should close ITP bug" messages. (Closes: #123456) + * This line has a speling error. + - This line has the same speling error, but we should only + get one tag for it. + * Corrected spelling: abov -> above. + * Corrected typo: abov -> above. + + -- [% $author %] [% $date %] diff --git a/t/recipes/checks/debian/patches/spelling-general/build-spec/debian/copyright b/t/recipes/checks/debian/patches/spelling-general/build-spec/debian/copyright new file mode 100644 index 0000000..30cbe5c --- /dev/null +++ b/t/recipes/checks/debian/patches/spelling-general/build-spec/debian/copyright @@ -0,0 +1,21 @@ +This duplicate duplicate word should not trigger. (re. #897402) + +This is part of the testsuite of lintian. See the file debian/copyright +in the lintian source directory for more details. + +Insofar as this is copyrightable, it is: + + Copyright 2010 Russ Allbery + +This text should not generate a spelling error for "ment": + + computer software documentation," as such terms are used in + 48 C.F.R. 12.212 (SEPT 1995) and is provided to the U.S. Govern- + ment only as a commercial end item. Consistent with 48 C.F.R. + 12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4 (JUNE 1995), + +But deafult is still a spelling error. + +This text should not generate a spelling error for the duplicate "a" (re. #844166) + + following Attribution Information: (a) a copyright notice including the name diff --git a/t/recipes/checks/debian/patches/spelling-general/build-spec/debian/doc-base b/t/recipes/checks/debian/patches/spelling-general/build-spec/debian/doc-base new file mode 100644 index 0000000..3839a9b --- /dev/null +++ b/t/recipes/checks/debian/patches/spelling-general/build-spec/debian/doc-base @@ -0,0 +1,9 @@ +Document: spelling-general +Title: Check for debian doc-base spelling errors +Author: Russ Allbery +Abstract: This control file exercises, picky, speling error checks for + Debian doc-base files, such as meta-package. +Section: Programming + +Format: text +Files: /usr/share/doc/spelling-general/copyright diff --git a/t/recipes/checks/debian/patches/spelling-general/build-spec/debian/patches/add-readme b/t/recipes/checks/debian/patches/spelling-general/build-spec/debian/patches/add-readme new file mode 100644 index 0000000..b1647ba --- /dev/null +++ b/t/recipes/checks/debian/patches/spelling-general/build-spec/debian/patches/add-readme @@ -0,0 +1,8 @@ +This is a deliberate speling error. duplicate + +duplicate + +--- upstream.orig/README ++++ upstream/README +@@ -0,0 +1 @@ ++Added by patch system. diff --git a/t/recipes/checks/debian/patches/spelling-general/build-spec/debian/patches/nonrel b/t/recipes/checks/debian/patches/spelling-general/build-spec/debian/patches/nonrel new file mode 100644 index 0000000..48e7740 --- /dev/null +++ b/t/recipes/checks/debian/patches/spelling-general/build-spec/debian/patches/nonrel @@ -0,0 +1,6 @@ +This is a deliberate speling error. (false positive; description mentions typo) + +--- upstream.orig/nonrel ++++ upstream/nonrel +@@ -0,0 +1 @@ ++Added by patch system. diff --git a/t/recipes/checks/debian/patches/spelling-general/build-spec/debian/patches/nonrel2 b/t/recipes/checks/debian/patches/spelling-general/build-spec/debian/patches/nonrel2 new file mode 100644 index 0000000..e7dd209 --- /dev/null +++ b/t/recipes/checks/debian/patches/spelling-general/build-spec/debian/patches/nonrel2 @@ -0,0 +1,8 @@ +From: Speling Error +Date: Mon, 10 Sep 2018 05:16:45 +0200 +Subject: Foo bar + +--- upstream.orig/nonrel2 ++++ upstream/nonrel2 +@@ -0,0 +1 @@ ++Added by patch system. diff --git a/t/recipes/checks/debian/patches/spelling-general/build-spec/debian/patches/series b/t/recipes/checks/debian/patches/spelling-general/build-spec/debian/patches/series new file mode 100644 index 0000000..d31f673 --- /dev/null +++ b/t/recipes/checks/debian/patches/spelling-general/build-spec/debian/patches/series @@ -0,0 +1,4 @@ +add-readme +spelling +nonrel +nonrel2 diff --git a/t/recipes/checks/debian/patches/spelling-general/build-spec/debian/patches/spelling b/t/recipes/checks/debian/patches/spelling-general/build-spec/debian/patches/spelling new file mode 100644 index 0000000..29b9cfd --- /dev/null +++ b/t/recipes/checks/debian/patches/spelling-general/build-spec/debian/patches/spelling @@ -0,0 +1,6 @@ +This is a deliberate speling error. (false positive; filename match) + +--- upstream.orig/spelling ++++ upstream/spelling +@@ -0,0 +1 @@ ++Added by patch system. diff --git a/t/recipes/checks/debian/patches/spelling-general/build-spec/fill-values b/t/recipes/checks/debian/patches/spelling-general/build-spec/fill-values new file mode 100644 index 0000000..1c8c790 --- /dev/null +++ b/t/recipes/checks/debian/patches/spelling-general/build-spec/fill-values @@ -0,0 +1,4 @@ +Testname: spelling-general +Skeleton: upload-non-native +Source-Format: 3.0 (quilt) +Description: General checks for spelling errors diff --git a/t/recipes/checks/debian/patches/spelling-general/eval/desc b/t/recipes/checks/debian/patches/spelling-general/eval/desc new file mode 100644 index 0000000..0af4036 --- /dev/null +++ b/t/recipes/checks/debian/patches/spelling-general/eval/desc @@ -0,0 +1,2 @@ +Testname: spelling-general +Check: debian/patches diff --git a/t/recipes/checks/debian/patches/spelling-general/eval/hints b/t/recipes/checks/debian/patches/spelling-general/eval/hints new file mode 100644 index 0000000..b86bb71 --- /dev/null +++ b/t/recipes/checks/debian/patches/spelling-general/eval/hints @@ -0,0 +1 @@ +spelling-general (source): patch-system quilt diff --git a/t/recipes/checks/debian/po-debconf/debconf-templates-general/build-spec/debian/control.in b/t/recipes/checks/debian/po-debconf/debconf-templates-general/build-spec/debian/control.in new file mode 100644 index 0000000..1140f19 --- /dev/null +++ b/t/recipes/checks/debian/po-debconf/debconf-templates-general/build-spec/debian/control.in @@ -0,0 +1,16 @@ +Source: [% $source %] +Priority: optional +Section: [% $section %] +Maintainer: [% $author %] +Standards-Version: [% $standards_version %] +Build-Depends: [% $build_depends %] +Rules-Requires-Root: no + +Package: [% $source %] +Architecture: [% $package_architecture %] +Depends: ${shlibs:Depends}, ${misc:Depends}, cdebconf +Description: [% $description %] + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. diff --git a/t/recipes/checks/debian/po-debconf/debconf-templates-general/build-spec/debian/po/POTFILES.in b/t/recipes/checks/debian/po-debconf/debconf-templates-general/build-spec/debian/po/POTFILES.in new file mode 100644 index 0000000..cef83a3 --- /dev/null +++ b/t/recipes/checks/debian/po-debconf/debconf-templates-general/build-spec/debian/po/POTFILES.in @@ -0,0 +1 @@ +[type: gettext/rfc822deb] templates diff --git a/t/recipes/checks/debian/po-debconf/debconf-templates-general/build-spec/debian/po/en.po b/t/recipes/checks/debian/po-debconf/debconf-templates-general/build-spec/debian/po/en.po new file mode 100644 index 0000000..0734922 --- /dev/null +++ b/t/recipes/checks/debian/po-debconf/debconf-templates-general/build-spec/debian/po/en.po @@ -0,0 +1,241 @@ +# English translations for PACKAGE package. +# Copyright (C) 2012 THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# Niels Thykier , 2012. +# +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2018-01-01 22:34+0000\n" +"PO-Revision-Date: 2012-10-01 22:54+0200\n" +"Last-Translator: Niels Thykier \n" +"Language-Team: English\n" +"Language: en_US\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=ASCII\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#. Type: error +#. Description +#: ../templates:1001 +msgid "Useless note" +msgstr "Useless note" + +#. Type: select +#. Choices +#: ../templates:2001 +msgid "left, right, up, down" +msgstr "left, right, up, down" + +#. Type: select +#. Description +#: ../templates:2002 +msgid "Pick the odd one out" +msgstr "Pick the odd one out" + +#. Type: text +#. Description +#: ../templates:3001 +msgid "Missing template field." +msgstr "Missing template field." + +#. Type: boolean +#. Description +#: ../templates:4001 +msgid "Is this a bad template?" +msgstr "Is this a bad template?" + +#. Type: boolean +#. Description +#: ../templates:5001 +msgid "Missing type" +msgstr "Missing type" + +#. Type: lintian +#. Description +#: ../templates:6001 +msgid "Template with unknown type" +msgstr "Template with unknown type" + +#. Type: boolean +#. Description +#: ../templates:7001 +msgid "How do you like the default?" +msgstr "How do you like the default?" + +#. Type: boolean +#. Description +#: ../templates:7001 +msgid "On a scale of \"false\" to \"true\"." +msgstr "On a scale of \"false\" to \"true\"." + +#. Type: select +#. Description +#: ../templates:8001 +msgid "A boolean type would have been better" +msgstr "A boolean type would have been better" + +#. Type: select +#. Description +#: ../templates:9001 +msgid "Preference" +msgstr "Preference" + +#. Type: select +#. Description +#: ../templates:10001 +msgid "Missing a Choices field" +msgstr "Missing a Choices field" + +#. Type: error +#. Description +#. Type: error +#. Description +#: ../templates:12001 +msgid "Duplicate long description" +msgstr "Duplicate long description" + +#. Type: boolean +#. Description +#: ../templates:13001 +msgid "Is the field below unknown?" +msgstr "Is the field below unknown?" + +#. Type: string +#. Description +#: ../templates:14001 +msgid "What is the name of this package checker:" +msgstr "What is the name of this package checker:" + +#. Type: select +#. Description +#: ../templates:15001 +msgid "Select either x or y" +msgstr "Select either x or y" + +#. Type: boolean +#. Description +#: ../templates:16001 +msgid "Lintian is the best!" +msgstr "Lintian is the best!" + +#. Type: boolean +#. Description +#: ../templates:17001 +msgid "Do you like sakana?" +msgstr "Do you like sakana?" + +#. Type: boolean +#. Description +#: ../templates:17001 +msgid "Or do you prefer sake?" +msgstr "Or do you prefer sake?" + +#. Type: note +#. Description +#: ../templates:18001 +msgid "Aren't you tired of all these debconf prompts?" +msgstr "Aren't you tired of all these debconf prompts?" + +#. Type: boolean +#. Description +#: ../templates:19001 +msgid "" +"This template has a very long short description, is that what you call an " +"oxymoron?" +msgstr "" +"This template has a very long short description, is that what you call an " +"oxymoron?" + +#. Type: select +#. Description +#: ../templates:20001 +msgid "I think Lintian is the best" +msgstr "I think Lintian is the best" + +#. Type: boolean +#. Description +#: ../templates:21001 +msgid "Do you like Lintian?" +msgstr "Do you like Lintian?" + +#. Type: boolean +#. Description +#: ../templates:21001 +msgid "Pick \"yes\" if you do." +msgstr "Pick \"yes\" if you do." + +#. Type: string +#. Description +#: ../templates:22001 +msgid "Name the title of this song:" +msgstr "Name the title of this song:" + +#. Type: string +#. Description +#: ../templates:22001 +msgid "" +"Five green bottles sitting on the wall, Five green bottles sitting on the " +"wall, And if one green bottle should accidentally fall, There'll be four " +"green bottles sitting on the wall." +msgstr "" +"Five green bottles sitting on the wall, Five green bottles sitting on the " +"wall, And if one green bottle should accidentally fall, There'll be four " +"green bottles sitting on the wall." + +#. Type: string +#. Description +#: ../templates:22001 +msgid "" +"Four green bottles sitting on the wall, Four green bottles sitting on the " +"wall, And if one green bottle should accidentally fall, There'll be three " +"green bottles sitting on the wall." +msgstr "" +"Four green bottles sitting on the wall, Four green bottles sitting on the " +"wall, And if one green bottle should accidentally fall, There'll be three " +"green bottles sitting on the wall." + +#. Type: string +#. Description +#: ../templates:22001 +msgid "" +"Three green bottles sitting on the wall, Three green bottles sitting on the " +"wall, And if one green bottle should accidentally fall, There'll be two " +"green bottles sitting on the wall." +msgstr "" +"Three green bottles sitting on the wall, Three green bottles sitting on the " +"wall, And if one green bottle should accidentally fall, There'll be two " +"green bottles sitting on the wall." + +#. Type: string +#. Description +#: ../templates:22001 +msgid "" +"Two green bottles sitting on the wall, Two green bottles sitting on the " +"wall, And if one green bottle should accidentally fall, There'll be one " +"green bottle sitting on the wall." +msgstr "" +"Two green bottles sitting on the wall, Two green bottles sitting on the " +"wall, And if one green bottle should accidentally fall, There'll be one " +"green bottle sitting on the wall." + +#. Type: string +#. Description +#: ../templates:22001 +msgid "" +"One green bottle sitting on the wall, One green bottle sitting on the wall, " +"And if one green bottle should accidentally fall, There'll be no green " +"bottles sitting on the wall." +msgstr "" +"One green bottle sitting on the wall, One green bottle sitting on the wall, " +"And if one green bottle should accidentally fall, There'll be no green " +"bottles sitting on the wall." + +#. Type: entropy +#. Description +#: ../templates:23001 +#| msgid "Template with unknown type" +msgid "Template with entropy type" +msgstr "Template with unknown type" diff --git a/t/recipes/checks/debian/po-debconf/debconf-templates-general/build-spec/debian/po/en_US.po b/t/recipes/checks/debian/po-debconf/debconf-templates-general/build-spec/debian/po/en_US.po new file mode 100644 index 0000000..450a03c --- /dev/null +++ b/t/recipes/checks/debian/po-debconf/debconf-templates-general/build-spec/debian/po/en_US.po @@ -0,0 +1,223 @@ +# English translations for PACKAGE package. +# Copyright (C) 2012 THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# Niels Thykier , 2012. +# +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2018-01-01 22:34+0000\n" +"PO-Revision-Date: 2012-10-01 22:54+0200\n" +"Last-Translator: Russ Allbery \n" +"Language-Team: English \n" +"Language: en_US\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=ASCII\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#. Type: error +#. Description +#: ../templates:1001 +msgid "Useless note" +msgstr "" + +#. Type: select +#. Choices +#: ../templates:2001 +msgid "left, right, up, down" +msgstr "" + +#. Type: select +#. Description +#: ../templates:2002 +msgid "Pick the odd one out" +msgstr "" + +#. Type: text +#. Description +#: ../templates:3001 +msgid "Missing template field." +msgstr "" + +#. Type: boolean +#. Description +#: ../templates:4001 +msgid "Is this a bad template?" +msgstr "" + +#. Type: boolean +#. Description +#: ../templates:5001 +msgid "Missing type" +msgstr "" + +#. Type: lintian +#. Description +#: ../templates:6001 +msgid "Template with unknown type" +msgstr "" + +#. Type: boolean +#. Description +#: ../templates:7001 +msgid "How do you like the default?" +msgstr "" + +#. Type: boolean +#. Description +#: ../templates:7001 +msgid "On a scale of \"false\" to \"true\"." +msgstr "" + +#. Type: select +#. Description +#: ../templates:8001 +msgid "A boolean type would have been better" +msgstr "" + +#. Type: select +#. Description +#: ../templates:9001 +msgid "Preference" +msgstr "" + +#. Type: select +#. Description +#: ../templates:10001 +msgid "Missing a Choices field" +msgstr "" + +#. Type: error +#. Description +#. Type: error +#. Description +#: ../templates:12001 +msgid "Duplicate long description" +msgstr "" + +#. Type: boolean +#. Description +#: ../templates:13001 +msgid "Is the field below unknown?" +msgstr "" + +#. Type: string +#. Description +#: ../templates:14001 +msgid "What is the name of this package checker:" +msgstr "" + +#. Type: select +#. Description +#: ../templates:15001 +msgid "Select either x or y" +msgstr "" + +#. Type: boolean +#. Description +#: ../templates:16001 +msgid "Lintian is the best!" +msgstr "" + +#. Type: boolean +#. Description +#: ../templates:17001 +msgid "Do you like sakana?" +msgstr "" + +#. Type: boolean +#. Description +#: ../templates:17001 +msgid "Or do you prefer sake?" +msgstr "" + +#. Type: note +#. Description +#: ../templates:18001 +msgid "Aren't you tired of all these debconf prompts?" +msgstr "" + +#. Type: boolean +#. Description +#: ../templates:19001 +msgid "" +"This template has a very long short description, is that what you call an " +"oxymoron?" +msgstr "" + +#. Type: select +#. Description +#: ../templates:20001 +msgid "I think Lintian is the best" +msgstr "" + +#. Type: boolean +#. Description +#: ../templates:21001 +msgid "Do you like Lintian?" +msgstr "" + +#. Type: boolean +#. Description +#: ../templates:21001 +msgid "Pick \"yes\" if you do." +msgstr "" + +#. Type: string +#. Description +#: ../templates:22001 +msgid "Name the title of this song:" +msgstr "" + +#. Type: string +#. Description +#: ../templates:22001 +msgid "" +"Five green bottles sitting on the wall, Five green bottles sitting on the " +"wall, And if one green bottle should accidentally fall, There'll be four " +"green bottles sitting on the wall." +msgstr "" + +#. Type: string +#. Description +#: ../templates:22001 +msgid "" +"Four green bottles sitting on the wall, Four green bottles sitting on the " +"wall, And if one green bottle should accidentally fall, There'll be three " +"green bottles sitting on the wall." +msgstr "" + +#. Type: string +#. Description +#: ../templates:22001 +msgid "" +"Three green bottles sitting on the wall, Three green bottles sitting on the " +"wall, And if one green bottle should accidentally fall, There'll be two " +"green bottles sitting on the wall." +msgstr "" + +#. Type: string +#. Description +#: ../templates:22001 +msgid "" +"Two green bottles sitting on the wall, Two green bottles sitting on the " +"wall, And if one green bottle should accidentally fall, There'll be one " +"green bottle sitting on the wall." +msgstr "" + +#. Type: string +#. Description +#: ../templates:22001 +msgid "" +"One green bottle sitting on the wall, One green bottle sitting on the wall, " +"And if one green bottle should accidentally fall, There'll be no green " +"bottles sitting on the wall." +msgstr "" + +#. Type: entropy +#. Description +#: ../templates:23001 +msgid "Template with entropy type" +msgstr "" diff --git a/t/recipes/checks/debian/po-debconf/debconf-templates-general/build-spec/debian/po/templates.pot b/t/recipes/checks/debian/po-debconf/debconf-templates-general/build-spec/debian/po/templates.pot new file mode 100644 index 0000000..b7f5a7b --- /dev/null +++ b/t/recipes/checks/debian/po-debconf/debconf-templates-general/build-spec/debian/po/templates.pot @@ -0,0 +1,223 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2018-01-01 22:34+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=CHARSET\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Type: error +#. Description +#: ../templates:1001 +msgid "Useless note" +msgstr "" + +#. Type: select +#. Choices +#: ../templates:2001 +msgid "left, right, up, down" +msgstr "" + +#. Type: select +#. Description +#: ../templates:2002 +msgid "Pick the odd one out" +msgstr "" + +#. Type: text +#. Description +#: ../templates:3001 +msgid "Missing template field." +msgstr "" + +#. Type: boolean +#. Description +#: ../templates:4001 +msgid "Is this a bad template?" +msgstr "" + +#. Type: boolean +#. Description +#: ../templates:5001 +msgid "Missing type" +msgstr "" + +#. Type: lintian +#. Description +#: ../templates:6001 +msgid "Template with unknown type" +msgstr "" + +#. Type: boolean +#. Description +#: ../templates:7001 +msgid "How do you like the default?" +msgstr "" + +#. Type: boolean +#. Description +#: ../templates:7001 +msgid "On a scale of \"false\" to \"true\"." +msgstr "" + +#. Type: select +#. Description +#: ../templates:8001 +msgid "A boolean type would have been better" +msgstr "" + +#. Type: select +#. Description +#: ../templates:9001 +msgid "Preference" +msgstr "" + +#. Type: select +#. Description +#: ../templates:10001 +msgid "Missing a Choices field" +msgstr "" + +#. Type: error +#. Description +#. Type: error +#. Description +#: ../templates:12001 +msgid "Duplicate long description" +msgstr "" + +#. Type: boolean +#. Description +#: ../templates:13001 +msgid "Is the field below unknown?" +msgstr "" + +#. Type: string +#. Description +#: ../templates:14001 +msgid "What is the name of this package checker:" +msgstr "" + +#. Type: select +#. Description +#: ../templates:15001 +msgid "Select either x or y" +msgstr "" + +#. Type: boolean +#. Description +#: ../templates:16001 +msgid "Lintian is the best!" +msgstr "" + +#. Type: boolean +#. Description +#: ../templates:17001 +msgid "Do you like sakana?" +msgstr "" + +#. Type: boolean +#. Description +#: ../templates:17001 +msgid "Or do you prefer sake?" +msgstr "" + +#. Type: note +#. Description +#: ../templates:18001 +msgid "Aren't you tired of all these debconf prompts?" +msgstr "" + +#. Type: boolean +#. Description +#: ../templates:19001 +msgid "" +"This template has a very long short description, is that what you call an " +"oxymoron?" +msgstr "" + +#. Type: select +#. Description +#: ../templates:20001 +msgid "I think Lintian is the best" +msgstr "" + +#. Type: boolean +#. Description +#: ../templates:21001 +msgid "Do you like Lintian?" +msgstr "" + +#. Type: boolean +#. Description +#: ../templates:21001 +msgid "Pick \"yes\" if you do." +msgstr "" + +#. Type: string +#. Description +#: ../templates:22001 +msgid "Name the title of this song:" +msgstr "" + +#. Type: string +#. Description +#: ../templates:22001 +msgid "" +"Five green bottles sitting on the wall, Five green bottles sitting on the " +"wall, And if one green bottle should accidentally fall, There'll be four " +"green bottles sitting on the wall." +msgstr "" + +#. Type: string +#. Description +#: ../templates:22001 +msgid "" +"Four green bottles sitting on the wall, Four green bottles sitting on the " +"wall, And if one green bottle should accidentally fall, There'll be three " +"green bottles sitting on the wall." +msgstr "" + +#. Type: string +#. Description +#: ../templates:22001 +msgid "" +"Three green bottles sitting on the wall, Three green bottles sitting on the " +"wall, And if one green bottle should accidentally fall, There'll be two " +"green bottles sitting on the wall." +msgstr "" + +#. Type: string +#. Description +#: ../templates:22001 +msgid "" +"Two green bottles sitting on the wall, Two green bottles sitting on the " +"wall, And if one green bottle should accidentally fall, There'll be one " +"green bottle sitting on the wall." +msgstr "" + +#. Type: string +#. Description +#: ../templates:22001 +msgid "" +"One green bottle sitting on the wall, One green bottle sitting on the wall, " +"And if one green bottle should accidentally fall, There'll be no green " +"bottles sitting on the wall." +msgstr "" + +#. Type: entropy +#. Description +#: ../templates:23001 +msgid "Template with entropy type" +msgstr "" diff --git a/t/recipes/checks/debian/po-debconf/debconf-templates-general/build-spec/debian/postinst b/t/recipes/checks/debian/po-debconf/debconf-templates-general/build-spec/debian/postinst new file mode 100644 index 0000000..4d6cb4d --- /dev/null +++ b/t/recipes/checks/debian/po-debconf/debconf-templates-general/build-spec/debian/postinst @@ -0,0 +1,8 @@ +#!/bin/sh + +set -e + +#DEBHELPER# + +. /usr/share/debconf/confmodule + diff --git a/t/recipes/checks/debian/po-debconf/debconf-templates-general/build-spec/debian/templates b/t/recipes/checks/debian/po-debconf/debconf-templates-general/build-spec/debian/templates new file mode 100644 index 0000000..46ca184 --- /dev/null +++ b/t/recipes/checks/debian/po-debconf/debconf-templates-general/build-spec/debian/templates @@ -0,0 +1,124 @@ +Template: debconf/translated +Type: error +_Description: Useless note + +Template: debconf/unsplit-choices +Type: select +_Choices: left, right, up, down +_Description: Pick the odd one out + +Type: text +_Description: Missing template field. + +Template: debconf-malformed-template +Type: boolean +_Description: Is this a bad template? + +Template: debconf/no-type +_Description: Missing type + +Template: debconf/unknown-type +Type: lintian +_Description: Template with unknown type + +Template: debconf/boolean-bogus-default +Type: boolean +Default: lintian +_Description: How do you like the default? + On a scale of "false" to "true". + +Template: debconf/select-boolean-choice +Type: select +Choices: yes, no +_Description: A boolean type would have been better + +Template: debconf/select-empty-trans-choices +Type: select +Choices: sakana, sake +Choices-Da: +_Description: Preference + +Template: debconf/select-without-choices +Type: select +_Description: Missing a Choices field + +Template: debconf/no-description +Type: error + +Template: debconf/duplicate-long-desc +Type: error +_Description: Duplicate long description + Duplicate long description + +Template: debconf/unknown-field +Type: boolean +_Description: Is the field below unknown? +Unknown-field: yes, it is. + +Template: debconf/malformed-prompt +Type: string +_Description: What is the name of this package checker: + +Template: debconf/imperative-select +Type: select +Choices: x,y +_Description: Select either x or y + +Template: debconf/malformed-question +Type: boolean +_Description: Lintian is the best! + +Template: debconf/question-in-extended +Type: boolean +_Description: Do you like sakana? + Or do you prefer sake? + +Template: debconf/malformed-note-title +Type: note +_Description: Aren't you tired of all these debconf prompts? + +Template: debconf/too-long-short-desc +Type: boolean +_Description: This template has a very long short description, is that what you call an oxymoron? + +Template: debconf/first-person +Type: select +Choices: lintian, no-lintian +_Description: I think Lintian is the best + +Template: debconf/assumption +Type: boolean +_Description: Do you like Lintian? + Pick "yes" if you do. + +Template: debconf/5-green-bottles-on-the-wall +Type: string +_Description: Name the title of this song: + Five green bottles sitting on the wall, + Five green bottles sitting on the wall, + And if one green bottle should accidentally fall, + There'll be four green bottles sitting on the wall. + . + Four green bottles sitting on the wall, + Four green bottles sitting on the wall, + And if one green bottle should accidentally fall, + There'll be three green bottles sitting on the wall. + . + Three green bottles sitting on the wall, + Three green bottles sitting on the wall, + And if one green bottle should accidentally fall, + There'll be two green bottles sitting on the wall. + . + Two green bottles sitting on the wall, + Two green bottles sitting on the wall, + And if one green bottle should accidentally fall, + There'll be one green bottle sitting on the wall. + . + One green bottle sitting on the wall, + One green bottle sitting on the wall, + And if one green bottle should accidentally fall, + There'll be no green bottles sitting on the wall. + +Template: debconf/entropy-type +Type: entropy +_Description: Template with entropy type diff --git a/t/recipes/checks/debian/po-debconf/debconf-templates-general/build-spec/fill-values b/t/recipes/checks/debian/po-debconf/debconf-templates-general/build-spec/fill-values new file mode 100644 index 0000000..2018d2c --- /dev/null +++ b/t/recipes/checks/debian/po-debconf/debconf-templates-general/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: upload-native +Testname: debconf-templates-general +Description: Test for various debconf template issues diff --git a/t/recipes/checks/debian/po-debconf/debconf-templates-general/build-spec/orig/config-gen.pl b/t/recipes/checks/debian/po-debconf/debconf-templates-general/build-spec/orig/config-gen.pl new file mode 100644 index 0000000..e6588b7 --- /dev/null +++ b/t/recipes/checks/debian/po-debconf/debconf-templates-general/build-spec/orig/config-gen.pl @@ -0,0 +1,31 @@ +#!/usr/bin/perl + +# Helper script to generate d/config from d/templates. +# It is just here to make sure all templates are "used". + +use strict; +use warnings; + +print < ) { + + if ($line =~ /^Template:\s*(\S+)\s*$/) { + + my $template = $1; + next + unless defined $template; + + print "db_input high $template || true\n"; + print "db_go\n\n"; + } +} + +exit 0; diff --git a/t/recipes/checks/debian/po-debconf/debconf-templates-general/build-spec/orig/gen-source.mk b/t/recipes/checks/debian/po-debconf/debconf-templates-general/build-spec/orig/gen-source.mk new file mode 100755 index 0000000..f6f5975 --- /dev/null +++ b/t/recipes/checks/debian/po-debconf/debconf-templates-general/build-spec/orig/gen-source.mk @@ -0,0 +1,8 @@ +#!/usr/bin/make -f + +all: debian/config + +debian/config: debian/templates + perl config-gen.pl < $< > $@ + + diff --git a/t/recipes/checks/debian/po-debconf/debconf-templates-general/build-spec/pre-build b/t/recipes/checks/debian/po-debconf/debconf-templates-general/build-spec/pre-build new file mode 100755 index 0000000..bfcb477 --- /dev/null +++ b/t/recipes/checks/debian/po-debconf/debconf-templates-general/build-spec/pre-build @@ -0,0 +1,4 @@ +#!/bin/sh + +DIR="$1" +make --silent -C "$DIR" -f "$DIR/gen-source.mk" all diff --git a/t/recipes/checks/debian/po-debconf/debconf-templates-general/eval/desc b/t/recipes/checks/debian/po-debconf/debconf-templates-general/eval/desc new file mode 100644 index 0000000..ab9ee47 --- /dev/null +++ b/t/recipes/checks/debian/po-debconf/debconf-templates-general/eval/desc @@ -0,0 +1,2 @@ +Testname: debconf-templates-general +Check: debian/po-debconf diff --git a/t/recipes/checks/debian/po-debconf/debconf-templates-general/eval/hints b/t/recipes/checks/debian/po-debconf/debconf-templates-general/eval/hints new file mode 100644 index 0000000..e225a5a --- /dev/null +++ b/t/recipes/checks/debian/po-debconf/debconf-templates-general/eval/hints @@ -0,0 +1 @@ +debconf-templates-general (source): debconf-translation-using-general-list [debian/po/en_US.po] diff --git a/t/recipes/checks/debian/po-debconf/invalid-potfiles-in/build-spec/debian/config b/t/recipes/checks/debian/po-debconf/invalid-potfiles-in/build-spec/debian/config new file mode 100755 index 0000000..224c204 --- /dev/null +++ b/t/recipes/checks/debian/po-debconf/invalid-potfiles-in/build-spec/debian/config @@ -0,0 +1,8 @@ +#!/bin/sh + +set -e + +. /usr/share/debconf/confmodule + +db_get test/checksum_error || true + diff --git a/t/recipes/checks/debian/po-debconf/invalid-potfiles-in/build-spec/debian/control.in b/t/recipes/checks/debian/po-debconf/invalid-potfiles-in/build-spec/debian/control.in new file mode 100644 index 0000000..1140f19 --- /dev/null +++ b/t/recipes/checks/debian/po-debconf/invalid-potfiles-in/build-spec/debian/control.in @@ -0,0 +1,16 @@ +Source: [% $source %] +Priority: optional +Section: [% $section %] +Maintainer: [% $author %] +Standards-Version: [% $standards_version %] +Build-Depends: [% $build_depends %] +Rules-Requires-Root: no + +Package: [% $source %] +Architecture: [% $package_architecture %] +Depends: ${shlibs:Depends}, ${misc:Depends}, cdebconf +Description: [% $description %] + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. diff --git a/t/recipes/checks/debian/po-debconf/invalid-potfiles-in/build-spec/debian/po/POTFILES.in b/t/recipes/checks/debian/po-debconf/invalid-potfiles-in/build-spec/debian/po/POTFILES.in new file mode 100644 index 0000000..1c61d48 --- /dev/null +++ b/t/recipes/checks/debian/po-debconf/invalid-potfiles-in/build-spec/debian/po/POTFILES.in @@ -0,0 +1,2 @@ +# taken from preseed 1.90; see #883653; FL +[type: gettext/rfc822deb] templates diff --git a/t/recipes/checks/debian/po-debconf/invalid-potfiles-in/build-spec/debian/po/templates.pot b/t/recipes/checks/debian/po-debconf/invalid-potfiles-in/build-spec/debian/po/templates.pot new file mode 100644 index 0000000..3abfcf6 --- /dev/null +++ b/t/recipes/checks/debian/po-debconf/invalid-potfiles-in/build-spec/debian/po/templates.pot @@ -0,0 +1,37 @@ +# taken from preseed 1.90; see #883653; FL + +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: preseed\n" +"Report-Msgid-Bugs-To: preseed@packages.debian.org\n" +"POT-Creation-Date: 2016-11-22 22:34+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=CHARSET\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Type: error +#. Description +#. XXX: should be made translatable after Stretch +#: ../templates:1001 +msgid "Checksum error" +msgstr "" + +#. Type: error +#. Description +#. XXX: should be made translatable after Stretch +#: ../templates:1001 +msgid "" +"The ${ALGORITHM} checksum of the file retrieved from <${LOCATION}> fails to " +"match the expected value of \"${CHECKSUM}\". The file may be corrupt, or " +"the provided checksums may be out of date." +msgstr "" diff --git a/t/recipes/checks/debian/po-debconf/invalid-potfiles-in/build-spec/debian/po/zh_CN.po b/t/recipes/checks/debian/po-debconf/invalid-potfiles-in/build-spec/debian/po/zh_CN.po new file mode 100644 index 0000000..5be7a86 --- /dev/null +++ b/t/recipes/checks/debian/po-debconf/invalid-potfiles-in/build-spec/debian/po/zh_CN.po @@ -0,0 +1,64 @@ +# taken from preseed 1.90; see #883653; FL + +# THIS FILE IS GENERATED AUTOMATICALLY FROM THE D-I PO MASTER FILES +# The master files can be found under packages/po/ +# +# DO NOT MODIFY THIS FILE DIRECTLY: SUCH CHANGES WILL BE LOST +# +# Simplified Chinese translation for Debian Installer. +# +# Copyright (C) 2003-2008 Software in the Public Interest, Inc. +# This file is distributed under the same license as debian-installer. +# +# Translated by Yijun Yuan (2004), Carlos Z.F. Liu (2004,2005,2006), +# Ming Hua (2005,2006,2007,2008), Xiyue Deng (2008), Kov Chai (2008), +# Kenlen Lai (2008), WCM (2008), Ren Xiaolei (2008). +# +# +# Translations from iso-codes: +# Tobias Toedter , 2007. +# Translations taken from ICU SVN on 2007-09-09 +# +# Free Software Foundation, Inc., 2002, 2003, 2007, 2008. +# Alastair McKinstry , 2001,2002. +# Translations taken from KDE: +# - Wang Jian , 2000. +# - Carlos Z.F. Liu , 2004 - 2006. +# LI Daobing , 2007, 2008, 2009, 2010. +# YunQiang Su , 2011. +# +# Mai Hao Hui , 2001 (translations from galeon) +# YunQiang Su , 2010, 2011, 2012, 2013. +# Yangfl , 2017. +# +msgstr "" +"Project-Id-Version: debian-installer\n" +"Report-Msgid-Bugs-To: preseed@packages.debian.org\n" +"POT-Creation-Date: 2016-11-22 22:34+0000\n" +"PO-Revision-Date: 2017-06-11 18:20+0800\n" +"Last-Translator: Yangfl \n" +"Language-Team: \n" +"Language: zh_CN\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=1; plural=0;\n" + +#. Type: error +#. Description +#. XXX: should be made translatable after Stretch +#: ../templates:1001 +msgid "Checksum error" +msgstr "校验码错误" + +#. Type: error +#. Description +#. XXX: should be made translatable after Stretch +#: ../templates:1001 +msgid "" +"The ${ALGORITHM} checksum of the file retrieved from <${LOCATION}> fails to " +"match the expected value of \"${CHECKSUM}\". The file may be corrupt, or " +"the provided checksums may be out of date." +msgstr "" +"从 <${LOCATION}> 下载的文件 ${ALGORITHM} 校验码不符合预期,预期的值" +"为“${CHECKSUM}”。文件可能已经损毁,或所提供的校验码可能已经过期。" diff --git a/t/recipes/checks/debian/po-debconf/invalid-potfiles-in/build-spec/debian/postinst b/t/recipes/checks/debian/po-debconf/invalid-potfiles-in/build-spec/debian/postinst new file mode 100644 index 0000000..4d6cb4d --- /dev/null +++ b/t/recipes/checks/debian/po-debconf/invalid-potfiles-in/build-spec/debian/postinst @@ -0,0 +1,8 @@ +#!/bin/sh + +set -e + +#DEBHELPER# + +. /usr/share/debconf/confmodule + diff --git a/t/recipes/checks/debian/po-debconf/invalid-potfiles-in/build-spec/debian/templates b/t/recipes/checks/debian/po-debconf/invalid-potfiles-in/build-spec/debian/templates new file mode 100644 index 0000000..144f922 --- /dev/null +++ b/t/recipes/checks/debian/po-debconf/invalid-potfiles-in/build-spec/debian/templates @@ -0,0 +1,22 @@ +Template: test/checksum_error +Type: error +# Lintian test note: The space between '# and CHECKSUM' in the lines +# below is the unicode character NO BREAK SPACE U+00A0 (\302\240 in +# UTF-8) and the sole reason why intltool-update fails. +# +# ERROR: xgettext failed to generate PO template file because there is non-ASCII +# string marked for translation. Please make sure that all strings marked +# for translation are in uniform encoding (say UTF-8), then *prepend* the +# following line to POTFILES.in and rerun intltool-update: +# +# [encoding: UTF-8] +# +# taken from preseed 1.90; see #883653; FL +# +# Translators : DO NOT TRANSLATE variable names : ALGORITHM, LOCATION +# and CHECKSUM +# :sl2: +_Description: Checksum error + The ${ALGORITHM} checksum of the file retrieved from <${LOCATION}> fails + to match the expected value of "${CHECKSUM}". The file may be corrupt, + or the provided checksums may be out of date. diff --git a/t/recipes/checks/debian/po-debconf/invalid-potfiles-in/build-spec/fill-values b/t/recipes/checks/debian/po-debconf/invalid-potfiles-in/build-spec/fill-values new file mode 100644 index 0000000..7862c3f --- /dev/null +++ b/t/recipes/checks/debian/po-debconf/invalid-potfiles-in/build-spec/fill-values @@ -0,0 +1,3 @@ +Testname: invalid-potfiles-in +Skeleton: upload-native +Description: Test for invalid POTFILES.in for debconf template diff --git a/t/recipes/checks/debian/po-debconf/invalid-potfiles-in/eval/desc b/t/recipes/checks/debian/po-debconf/invalid-potfiles-in/eval/desc new file mode 100644 index 0000000..4e65531 --- /dev/null +++ b/t/recipes/checks/debian/po-debconf/invalid-potfiles-in/eval/desc @@ -0,0 +1,2 @@ +Testname: invalid-potfiles-in +Check: debian/po-debconf diff --git a/t/recipes/checks/debian/po-debconf/invalid-potfiles-in/eval/hints b/t/recipes/checks/debian/po-debconf/invalid-potfiles-in/eval/hints new file mode 100644 index 0000000..40d9932 --- /dev/null +++ b/t/recipes/checks/debian/po-debconf/invalid-potfiles-in/eval/hints @@ -0,0 +1 @@ +invalid-potfiles-in (source): invalid-potfiles-in [debian/po/POTFILES.in] diff --git a/t/recipes/checks/debian/po-debconf/legacy-debconf/build-spec/debian/changelog.in b/t/recipes/checks/debian/po-debconf/legacy-debconf/build-spec/debian/changelog.in new file mode 100644 index 0000000..f5e308e --- /dev/null +++ b/t/recipes/checks/debian/po-debconf/legacy-debconf/build-spec/debian/changelog.in @@ -0,0 +1,6 @@ +debconf ([% $version %]) [% $distribution %]; urgency=low + + * Initial Release + * Changelog line with exactly 80 characters which tests the line-too-long tag. + + -- Lintian Maintainers Wed, 3 May 2006 18:07:19 -0500 diff --git a/t/recipes/checks/debian/po-debconf/legacy-debconf/build-spec/debian/compat.in b/t/recipes/checks/debian/po-debconf/legacy-debconf/build-spec/debian/compat.in new file mode 100644 index 0000000..640a566 --- /dev/null +++ b/t/recipes/checks/debian/po-debconf/legacy-debconf/build-spec/debian/compat.in @@ -0,0 +1 @@ +[% $dh_compat_level %] diff --git a/t/recipes/checks/debian/po-debconf/legacy-debconf/build-spec/debian/control b/t/recipes/checks/debian/po-debconf/legacy-debconf/build-spec/debian/control new file mode 100644 index 0000000..bf9f4e9 --- /dev/null +++ b/t/recipes/checks/debian/po-debconf/legacy-debconf/build-spec/debian/control @@ -0,0 +1,52 @@ +Source: debconf +Section: utils +Priority: optional +Build-Depends: debhelper (>= 4), dpatch +Maintainer: Lintian Maintainers +Standards-Version: 3.7.2 + +Package: debconf-test +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: Test package for the debconf checks of lintian (dummy) + +Package: debconf-test-noscripts +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: Test package for the debconf checks of lintian (noscripts) + Package missing postinst/postrm/config. + . + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. + +Package: debconf-test-preinst +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: Test package for the debconf checks of lintian (preinst) + Package uses debconf only in preinst. + . + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. + +Package: debconf-test-postinst +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: Test package for the debconf checks of lintian (postinst) + Package uses debconf only in postinst. + . + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. + +Package: debconf-udeb +Section: debian-installer +XC-Package-Type: udeb +XB-Installer-Menu-Item: 100 +Architecture: any +Depends: ${shlibs:Depends} +Description: Test udeb package for the debconf checks of lintian (dummy) diff --git a/t/recipes/checks/debian/po-debconf/legacy-debconf/build-spec/debian/copyright b/t/recipes/checks/debian/po-debconf/legacy-debconf/build-spec/debian/copyright new file mode 100644 index 0000000..84843ee --- /dev/null +++ b/t/recipes/checks/debian/po-debconf/legacy-debconf/build-spec/debian/copyright @@ -0,0 +1,10 @@ +Copyright (C) 2004 Frank Lichtenheld + +Test for really old FSF address: + +Free Software Foundation, Inc., 675 Mass Ave, Cambridge, +MA 02139, USA. + +Test for a dh-make boilerplate: +# Please also look if there are files or directories which have a +# different copyright/license attached and list them here. diff --git a/t/recipes/checks/debian/po-debconf/legacy-debconf/build-spec/debian/debconf-test-noscripts.templates b/t/recipes/checks/debian/po-debconf/legacy-debconf/build-spec/debian/debconf-test-noscripts.templates new file mode 100644 index 0000000..93f8071 --- /dev/null +++ b/t/recipes/checks/debian/po-debconf/legacy-debconf/build-spec/debian/debconf-test-noscripts.templates @@ -0,0 +1,3 @@ +Template: debconf/test +Type: text +_description: Foo bar (1) diff --git a/t/recipes/checks/debian/po-debconf/legacy-debconf/build-spec/debian/debconf-test-postinst.postinst b/t/recipes/checks/debian/po-debconf/legacy-debconf/build-spec/debian/debconf-test-postinst.postinst new file mode 100644 index 0000000..56ab871 --- /dev/null +++ b/t/recipes/checks/debian/po-debconf/legacy-debconf/build-spec/debian/debconf-test-postinst.postinst @@ -0,0 +1,10 @@ +#!/bin/sh +set -e + +. /usr/share/debconf/confmodule + +db_input medium debconf/test + +#DEBHELPER# + +true diff --git a/t/recipes/checks/debian/po-debconf/legacy-debconf/build-spec/debian/debconf-test-postinst.postrm b/t/recipes/checks/debian/po-debconf/legacy-debconf/build-spec/debian/debconf-test-postinst.postrm new file mode 100644 index 0000000..cbf5e3b --- /dev/null +++ b/t/recipes/checks/debian/po-debconf/legacy-debconf/build-spec/debian/debconf-test-postinst.postrm @@ -0,0 +1,7 @@ +#!/bin/sh +set -e +if [ "$1" = purge ] && [ -e /usr/share/debconf/confmodule ]; then + . /usr/share/debconf/confmodule + db_purge +fi +#DEBHELPER# diff --git a/t/recipes/checks/debian/po-debconf/legacy-debconf/build-spec/debian/debconf-test-postinst.templates b/t/recipes/checks/debian/po-debconf/legacy-debconf/build-spec/debian/debconf-test-postinst.templates new file mode 100644 index 0000000..2a2a8ab --- /dev/null +++ b/t/recipes/checks/debian/po-debconf/legacy-debconf/build-spec/debian/debconf-test-postinst.templates @@ -0,0 +1,3 @@ +Template: debconf/test +Type: text +_description: Enter something: diff --git a/t/recipes/checks/debian/po-debconf/legacy-debconf/build-spec/debian/debconf-test-preinst.postrm b/t/recipes/checks/debian/po-debconf/legacy-debconf/build-spec/debian/debconf-test-preinst.postrm new file mode 100644 index 0000000..cbf5e3b --- /dev/null +++ b/t/recipes/checks/debian/po-debconf/legacy-debconf/build-spec/debian/debconf-test-preinst.postrm @@ -0,0 +1,7 @@ +#!/bin/sh +set -e +if [ "$1" = purge ] && [ -e /usr/share/debconf/confmodule ]; then + . /usr/share/debconf/confmodule + db_purge +fi +#DEBHELPER# diff --git a/t/recipes/checks/debian/po-debconf/legacy-debconf/build-spec/debian/debconf-test-preinst.preinst b/t/recipes/checks/debian/po-debconf/legacy-debconf/build-spec/debian/debconf-test-preinst.preinst new file mode 100644 index 0000000..bf6f074 --- /dev/null +++ b/t/recipes/checks/debian/po-debconf/legacy-debconf/build-spec/debian/debconf-test-preinst.preinst @@ -0,0 +1,13 @@ +#!/bin/sh +set -e + +# Obsolete name for the confmodule +. /usr/share/debconf/confmodule.sh + +. /usr/share/debconf/confmodule + +db_input medium debconf/test + +#DEBHELPER# + +true diff --git a/t/recipes/checks/debian/po-debconf/legacy-debconf/build-spec/debian/debconf-test-preinst.templates b/t/recipes/checks/debian/po-debconf/legacy-debconf/build-spec/debian/debconf-test-preinst.templates new file mode 100644 index 0000000..2a2a8ab --- /dev/null +++ b/t/recipes/checks/debian/po-debconf/legacy-debconf/build-spec/debian/debconf-test-preinst.templates @@ -0,0 +1,3 @@ +Template: debconf/test +Type: text +_description: Enter something: diff --git a/t/recipes/checks/debian/po-debconf/legacy-debconf/build-spec/debian/debconf-test.config b/t/recipes/checks/debian/po-debconf/legacy-debconf/build-spec/debian/debconf-test.config new file mode 100644 index 0000000..9e32d06 --- /dev/null +++ b/t/recipes/checks/debian/po-debconf/legacy-debconf/build-spec/debian/debconf-test.config @@ -0,0 +1,24 @@ +#!/bin/sh + +set -e + +. /usr/share/debconf/confmodule + +db_settitle "Funky lintian test" + +# Bad priorities. +db_text LOW debconf/test +db_input normal debconf/test + +# Valid priorities. +db_text \ +high debconf/test +foo=medium +db_input $foo debconf/test +db_input "$foo" debconf/test +db_input 'medium' debconf/test + +# debconf/transtring should not be flagged as unused +# (it's aliased to debconf/alias, which is used) +db_register debconf/transtring debconf/alias +db_input medium debconf/alias diff --git a/t/recipes/checks/debian/po-debconf/legacy-debconf/build-spec/debian/debconf-test.postinst b/t/recipes/checks/debian/po-debconf/legacy-debconf/build-spec/debian/debconf-test.postinst new file mode 100644 index 0000000..b387037 --- /dev/null +++ b/t/recipes/checks/debian/po-debconf/legacy-debconf/build-spec/debian/debconf-test.postinst @@ -0,0 +1,10 @@ +#!/bin/sh + +set -e + +. /usr/share/debconf/confmodule + +# Not supposed to do this here. +db_input medium debconf/test + +true diff --git a/t/recipes/checks/debian/po-debconf/legacy-debconf/build-spec/debian/debconf-test.templates b/t/recipes/checks/debian/po-debconf/legacy-debconf/build-spec/debian/debconf-test.templates new file mode 100644 index 0000000..811bb6c --- /dev/null +++ b/t/recipes/checks/debian/po-debconf/legacy-debconf/build-spec/debian/debconf-test.templates @@ -0,0 +1,101 @@ +Template: debconf/test +Type: text +_description: Foo bar (1) + +Template: debconf/testmulti +Type: multiselect +__Choices: foo, bar, boo +_Description: test comma usages in choices fields + +Template: debconf/testmulti-escape +Type: multiselect +_Choices: foo\, bar, boo +_Description: test escaped comma usages in choices fields: + +Template: debconf/testboolean +Type: boolean +_Description: Enter yes or no: + Do you want to answer this question? + +Template: debconf/teststring +Type: string +_Description: This template goes on and on. + This template goes on and on. + This template goes on and on. + This template goes on and on. + This template goes on and on. + This template goes on and on. + This template goes on and on. + This template goes on and on. + This template goes on and on. + This template goes on and on. + This template goes on and on. + This template goes on and on. + This template goes on and on. + This template goes on and on. + This template goes on and on. + This template goes on and on. + This template goes on and on. + This template goes on and on. + This template goes on and on. + This template goes on and on. + This template goes on and on. + This template goes on and on. + +Template: debconf/testnote +Type: note +Description: This should be a title and not a really long sentence that ends in a regular period. + +Template: debconf/1st-person +Type: select +__Choices: one, two +_Description: Select one of these: + I am a stupid test of first-person syntax that tells you to select yes + even though yes isn't an option in this prompt. + +Template: debconf/internal +Type: boolean +Description: For internal use only + We are testing that style checks are not applied to templates that are + marked as internal. + +Template: debconf/no-description +Type: string + +Template: debconf/translate +Type: boolean +_Default: false +_Description: Should this really be translated? + +Template: debconf/transtring +Type: string +_Default: 1 +_Description: Count of templates: + The number of useless numbers that a translator would have to translate + for this template. + +Template: debconf/language +__Choices: English, Spanish, German, French +# This is the default choice. Translators should put their own language, +# if available, here instead, but the value MUST be the English version +# of the value for the package scripts to work properly. +_Default: English[ translators, see the comment in the PO files] +_Description: The default language, an example of a default that should + be translated. + +Template: debconf/error +Type: error +_Description: An error occurred + This is a sample Debconf error template. + +Template: debconf/should-be-boolean +Type: select +__Choices: yes, no +_Description: Choose: + Pick yes or no. + +Template: debconf/should-be-no-longer-a-problem +Type: boolean +_Description: Decide, lintian + Using "no longer" should no longer be detected as + making-assumptions-about-interfaces-in-templates by lintian. diff --git a/t/recipes/checks/debian/po-debconf/legacy-debconf/build-spec/debian/debconf-test.templates.de b/t/recipes/checks/debian/po-debconf/legacy-debconf/build-spec/debian/debconf-test.templates.de new file mode 100644 index 0000000..f9ea121 --- /dev/null +++ b/t/recipes/checks/debian/po-debconf/legacy-debconf/build-spec/debian/debconf-test.templates.de @@ -0,0 +1,3 @@ +Template: debconf/testmulti +Type: multiselect +Choices: foo, bar\, boo, boo diff --git a/t/recipes/checks/debian/po-debconf/legacy-debconf/build-spec/debian/debconf-test.templates.in b/t/recipes/checks/debian/po-debconf/legacy-debconf/build-spec/debian/debconf-test.templates.in new file mode 100644 index 0000000..e69de29 diff --git a/t/recipes/checks/debian/po-debconf/legacy-debconf/build-spec/debian/debconf-udeb.postinst b/t/recipes/checks/debian/po-debconf/legacy-debconf/build-spec/debian/debconf-udeb.postinst new file mode 100644 index 0000000..4ce41f0 --- /dev/null +++ b/t/recipes/checks/debian/po-debconf/legacy-debconf/build-spec/debian/debconf-udeb.postinst @@ -0,0 +1,9 @@ +#!/bin/sh + +set -e + +. /usr/share/debconf/confmodule + +ldconfig + +true diff --git a/t/recipes/checks/debian/po-debconf/legacy-debconf/build-spec/debian/debconf-udeb.templates b/t/recipes/checks/debian/po-debconf/legacy-debconf/build-spec/debian/debconf-udeb.templates new file mode 100644 index 0000000..5d7cf5a --- /dev/null +++ b/t/recipes/checks/debian/po-debconf/legacy-debconf/build-spec/debian/debconf-udeb.templates @@ -0,0 +1,3 @@ +Template: debian-installer/debconf-udeb/title +Type: text +_description: This is just a test diff --git a/t/recipes/checks/debian/po-debconf/legacy-debconf/build-spec/debian/po/POTFILES.in b/t/recipes/checks/debian/po-debconf/legacy-debconf/build-spec/debian/po/POTFILES.in new file mode 100644 index 0000000..d0c82f0 --- /dev/null +++ b/t/recipes/checks/debian/po-debconf/legacy-debconf/build-spec/debian/po/POTFILES.in @@ -0,0 +1,2 @@ +[type: gettext/rfc822deb] debconf-test.templates +[type: gettext/rfc822deb] debconf-udeb.templates diff --git a/t/recipes/checks/debian/po-debconf/legacy-debconf/build-spec/debian/po/de.po b/t/recipes/checks/debian/po-debconf/legacy-debconf/build-spec/debian/po/de.po new file mode 100644 index 0000000..86c5796 --- /dev/null +++ b/t/recipes/checks/debian/po-debconf/legacy-debconf/build-spec/debian/po/de.po @@ -0,0 +1,66 @@ +# +# Translators, if you are not familiar with the PO format, gettext +# documentation is worth reading, especially sections dedicated to +# this format, e.g. by running: +# info -n '(gettext)PO Files' +# info -n '(gettext)Header Entry' +# +# Some information specific to po-debconf are available at +# /usr/share/doc/po-debconf/README-trans +# or http://www.debian.org/intl/l10n/po-debconf/README-trans +# +# Developers do not need to manually edit POT or PO files. +# +msgid "" +msgstr "" +"Project-Id-Version: debconf-test 1\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2004-12-06 00:51+0100\n" +"PO-Revision-Date: 2004-12-06 01:01+0100\n" +"Last-Translator: Frank Lichtenheld \n" +"Language-Team: debian-l10n-german@l.d.o\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Type: text +#. description +#: ../debconf-test.templates:3 +msgid "Foo bar (2)" +msgstr "" + +#. Type: multiselect +#. Choices +#: ../debconf-test.templates:7 +msgid "foo" +msgstr "foo" + +#. Type: multiselect +#. Choices +#: ../debconf-test.templates:7 +msgid "bar" +msgstr "bar, boo" + +#. Type: multiselect +#. Choices +#: ../debconf-test.templates:7 +msgid "boo" +msgstr "boo" + +#. Type: multiselect +#. Description +#: ../debconf-test.templates:8 +msgid "test comma usages in choices fields" +msgstr "" + +#. Type: multiselect +#. Choices +#: ../debconf-test.templates:11 +msgid "foo\\, bar, boo" +msgstr "foo, bar, boo" + +#. Type: text +#. description +#: ../debconf-udeb.templates:3 +msgid "This is just a test" +msgstr "Dies ist nur ein Test" diff --git a/t/recipes/checks/debian/po-debconf/legacy-debconf/build-spec/debian/po/fr.po b/t/recipes/checks/debian/po-debconf/legacy-debconf/build-spec/debian/po/fr.po new file mode 100644 index 0000000..c74deb2 --- /dev/null +++ b/t/recipes/checks/debian/po-debconf/legacy-debconf/build-spec/debian/po/fr.po @@ -0,0 +1,60 @@ +# +# Translators, if you are not familiar with the PO format, gettext +# documentation is worth reading, especially sections dedicated to +# this format, e.g. by running: +# info -n '(gettext)PO Files' +# info -n '(gettext)Header Entry' +# +# Some information specific to po-debconf are available at +# /usr/share/doc/po-debconf/README-trans +# or http://www.debian.org/intl/l10n/po-debconf/README-trans +# +# Developers do not need to manually edit POT or PO files. +# +msgid "" +msgstr "" +"Project-Id-Version: debconf-test 1\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2004-12-06 00:51+0100\n" +"PO-Revision-Date: 2005-10-13 15:03+0200\n" +"Last-Translator: Frank Lichtenheld \n" +"Language-Team: debian-l10n-german@l.d.o\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=CHARSET\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Type: text +#. description +#: ../debconf-test.templates:3 +msgid "Foo bar (2)" +msgstr "" + +#. Type: multiselect +#. Choices +#: ../debconf-test.templates:7 +msgid "foo" +msgstr "foo" + +#. Type: multiselect +#. Choices +#: ../debconf-test.templates:7 +msgid "bar" +msgstr "bar, boo" + +#. Type: multiselect +#. Choices +#: ../debconf-test.templates:7 +msgid "boo" +msgstr "boo" + +#. Type: multiselect +#. Description +#: ../debconf-test.templates:8 +msgid "test comma usages in choices fields" +msgstr "" + +#. Type: text +#. description +#: ../debconf-udeb.templates:3 +msgid "This is just a test" +msgstr " diff --git a/t/recipes/checks/debian/po-debconf/legacy-debconf/build-spec/debian/po/lang.po b/t/recipes/checks/debian/po-debconf/legacy-debconf/build-spec/debian/po/lang.po new file mode 100644 index 0000000..7ac498a --- /dev/null +++ b/t/recipes/checks/debian/po-debconf/legacy-debconf/build-spec/debian/po/lang.po @@ -0,0 +1,15 @@ +msgid "" +msgstr "" +"Project-Id-Version: debconf-test 1\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2004-12-06 00:51+0100\n" +"PO-Revision-Date: 2005-10-13 15:03+0200\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Type: text +#. description +#: ../debconf-test.templates:3 +msgid "Foo bar (2)" +msgstr "" diff --git a/t/recipes/checks/debian/po-debconf/legacy-debconf/build-spec/debian/po/nds.po b/t/recipes/checks/debian/po-debconf/legacy-debconf/build-spec/debian/po/nds.po new file mode 100644 index 0000000..7ac498a --- /dev/null +++ b/t/recipes/checks/debian/po-debconf/legacy-debconf/build-spec/debian/po/nds.po @@ -0,0 +1,15 @@ +msgid "" +msgstr "" +"Project-Id-Version: debconf-test 1\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2004-12-06 00:51+0100\n" +"PO-Revision-Date: 2005-10-13 15:03+0200\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Type: text +#. description +#: ../debconf-test.templates:3 +msgid "Foo bar (2)" +msgstr "" diff --git a/t/recipes/checks/debian/po-debconf/legacy-debconf/build-spec/debian/po/output b/t/recipes/checks/debian/po-debconf/legacy-debconf/build-spec/debian/po/output new file mode 100644 index 0000000..c3df1a5 --- /dev/null +++ b/t/recipes/checks/debian/po-debconf/legacy-debconf/build-spec/debian/po/output @@ -0,0 +1 @@ +2 utf8 diff --git a/t/recipes/checks/debian/po-debconf/legacy-debconf/build-spec/debian/po/pt_BR.po b/t/recipes/checks/debian/po-debconf/legacy-debconf/build-spec/debian/po/pt_BR.po new file mode 100644 index 0000000..7ac498a --- /dev/null +++ b/t/recipes/checks/debian/po-debconf/legacy-debconf/build-spec/debian/po/pt_BR.po @@ -0,0 +1,15 @@ +msgid "" +msgstr "" +"Project-Id-Version: debconf-test 1\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2004-12-06 00:51+0100\n" +"PO-Revision-Date: 2005-10-13 15:03+0200\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Type: text +#. description +#: ../debconf-test.templates:3 +msgid "Foo bar (2)" +msgstr "" diff --git a/t/recipes/checks/debian/po-debconf/legacy-debconf/build-spec/debian/po/sample-file.po b/t/recipes/checks/debian/po-debconf/legacy-debconf/build-spec/debian/po/sample-file.po new file mode 100644 index 0000000..8dcc0ff --- /dev/null +++ b/t/recipes/checks/debian/po-debconf/legacy-debconf/build-spec/debian/po/sample-file.po @@ -0,0 +1 @@ +This is some file that isn't actually a valid .po file. diff --git a/t/recipes/checks/debian/po-debconf/legacy-debconf/build-spec/debian/po/templates.pot b/t/recipes/checks/debian/po-debconf/legacy-debconf/build-spec/debian/po/templates.pot new file mode 100644 index 0000000..914c77f --- /dev/null +++ b/t/recipes/checks/debian/po-debconf/legacy-debconf/build-spec/debian/po/templates.pot @@ -0,0 +1,61 @@ +# +# Translators, if you are not familiar with the PO format, gettext +# documentation is worth reading, especially sections dedicated to +# this format, e.g. by running: +# info -n '(gettext)PO Files' +# info -n '(gettext)Header Entry' +# +# Some information specific to po-debconf are available at +# /usr/share/doc/po-debconf/README-trans +# or http://www.debian.org/intl/l10n/po-debconf/README-trans +# +# Developers do not need to manually edit POT or PO files. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2004-12-06 00:51+0100\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=CHARSET\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Type: text +#. description +#: ../debconf-test.templates:3 +msgid "Foo bar (2)" +msgstr "" + +#. Type: multiselect +#. Choices +#: ../debconf-test.templates:7 +msgid "foo" +msgstr "" + +#. Type: multiselect +#. Choices +#: ../debconf-test.templates:7 +msgid "bar" +msgstr "" + +#. Type: multiselect +#. Choices +#: ../debconf-test.templates:7 +msgid "boo" +msgstr "" + +#. Type: multiselect +#. Description +#: ../debconf-test.templates:8 +msgid "test comma usages in choices fields" +msgstr "" + +#. Type: text +#. description +#: ../debconf-udeb.templates:3 +msgid "This is just a test" +msgstr "" diff --git a/t/recipes/checks/debian/po-debconf/legacy-debconf/build-spec/debian/pycompat b/t/recipes/checks/debian/po-debconf/legacy-debconf/build-spec/debian/pycompat new file mode 100644 index 0000000..0cfbf08 --- /dev/null +++ b/t/recipes/checks/debian/po-debconf/legacy-debconf/build-spec/debian/pycompat @@ -0,0 +1 @@ +2 diff --git a/t/recipes/checks/debian/po-debconf/legacy-debconf/build-spec/debian/pyversions b/t/recipes/checks/debian/po-debconf/legacy-debconf/build-spec/debian/pyversions new file mode 100644 index 0000000..6f290b0 --- /dev/null +++ b/t/recipes/checks/debian/po-debconf/legacy-debconf/build-spec/debian/pyversions @@ -0,0 +1 @@ +>= 2.7 diff --git a/t/recipes/checks/debian/po-debconf/legacy-debconf/build-spec/debian/rules b/t/recipes/checks/debian/po-debconf/legacy-debconf/build-spec/debian/rules new file mode 100755 index 0000000..933901a --- /dev/null +++ b/t/recipes/checks/debian/po-debconf/legacy-debconf/build-spec/debian/rules @@ -0,0 +1,64 @@ +#!/usr/bin/make -f + +deb_dir = debian/debconf +udeb_dir = debian/debconf-udeb +build_dirs = $(deb_dir) $(udeb_dir) + +build-indep: +# There are no architecture-independent files to be built +# by this package. If there were any they would be made +# here. + +build-arch: + dh_testdir + touch build + +build: build-indep build-arch + +clean: + dh_testdir + dh_testroot + -rm -f build + + dh_clean + +binary-indep: build +# There are no architecture-independent files to be uploaded +# generated by this package. If there were any they would be +# made here. + +binary-arch: build + dh_testdir + dh_testroot + dh_prep + dh_installdirs -a + + dh_installchangelogs -a + dh_installdocs -a + dh_installdebconf -pdebconf-test + dh_installdebconf -pdebconf-test-noscripts --noscripts + dh_installdebconf -pdebconf-test-preinst --noscripts + dh_installdebconf -pdebconf-test-postinst --noscripts + dh_installdebconf -pdebconf-udeb + + + + + dh_compress -a + dh_fixperms -a + +# The shlibs stuff doesn't matter here so do it in a weird order to +# test warnings. + dh_installdeb -a + dh_shlibdeps -a + dh_makeshlibs -a + dh_gencontrol -a + dh_md5sums + dh_builddeb -a + dh_makeshlibs -a + +# Below here is fairly generic really + +binary: binary-indep binary-arch + +.PHONY: build-arch build-indep build binary binary-arch binary-indep clean checkroot diff --git a/t/recipes/checks/debian/po-debconf/legacy-debconf/build-spec/fill-values b/t/recipes/checks/debian/po-debconf/legacy-debconf/build-spec/fill-values new file mode 100644 index 0000000..186615f --- /dev/null +++ b/t/recipes/checks/debian/po-debconf/legacy-debconf/build-spec/fill-values @@ -0,0 +1,6 @@ +Skeleton: upload-native +Testname: legacy-debconf +Source: debconf +Version: 1~rc1 +Description: Legacy test "debconf" +Default-Build-Depends: debhelper (>= [% $dh_compat_level %]~) diff --git a/t/recipes/checks/debian/po-debconf/legacy-debconf/eval/desc b/t/recipes/checks/debian/po-debconf/legacy-debconf/eval/desc new file mode 100644 index 0000000..93e1d45 --- /dev/null +++ b/t/recipes/checks/debian/po-debconf/legacy-debconf/eval/desc @@ -0,0 +1,2 @@ +Testname: legacy-debconf +Check: debian/po-debconf diff --git a/t/recipes/checks/debian/po-debconf/legacy-debconf/eval/hints b/t/recipes/checks/debian/po-debconf/legacy-debconf/eval/hints new file mode 100644 index 0000000..636bc66 --- /dev/null +++ b/t/recipes/checks/debian/po-debconf/legacy-debconf/eval/hints @@ -0,0 +1,12 @@ +debconf (source): untranslatable-debconf-templates [debian/debconf-test.templates:58] +debconf (source): untranslatable-debconf-templates [debian/debconf-test.templates:47] +debconf (source): unknown-encoding-in-po-file [debian/po/fr.po] +debconf (source): translated-default-field [debian/debconf-test.templates:72] +debconf (source): translated-default-field [debian/debconf-test.templates:67] +debconf (source): stray-translated-debconf-templates [debian/debconf-test.templates.de] +debconf (source): no-complete-debconf-translation +debconf (source): newer-debconf-templates [debian/po/templates.pot] +debconf (source): misnamed-po-file [debian/po/sample-file.po] +debconf (source): misnamed-po-file [debian/po/lang.po] +debconf (source): invalid-po-file [debian/po/sample-file.po] +debconf (source): invalid-po-file [debian/po/fr.po] diff --git a/t/recipes/checks/debian/po-debconf/legacy-debconf/eval/post-test b/t/recipes/checks/debian/po-debconf/legacy-debconf/eval/post-test new file mode 100644 index 0000000..faeef0b --- /dev/null +++ b/t/recipes/checks/debian/po-debconf/legacy-debconf/eval/post-test @@ -0,0 +1 @@ +s/\(current is ([0-9]+\.)+[0-9]\)/(current is CURRENT)/ diff --git a/t/recipes/checks/debian/po-debconf/po-debconf-general/build-spec/debian/po/English.po b/t/recipes/checks/debian/po-debconf/po-debconf-general/build-spec/debian/po/English.po new file mode 100644 index 0000000..e99b822 --- /dev/null +++ b/t/recipes/checks/debian/po-debconf/po-debconf-general/build-spec/debian/po/English.po @@ -0,0 +1 @@ +Not a PO file or an English translation. diff --git a/t/recipes/checks/debian/po-debconf/po-debconf-general/build-spec/debian/po/POTFILES.in b/t/recipes/checks/debian/po-debconf/po-debconf-general/build-spec/debian/po/POTFILES.in new file mode 100644 index 0000000..da5857e --- /dev/null +++ b/t/recipes/checks/debian/po-debconf/po-debconf-general/build-spec/debian/po/POTFILES.in @@ -0,0 +1,3 @@ +# This is a comment, which should be ignored. +[type: gettext/rfc822deb] templates +some-other-file diff --git a/t/recipes/checks/debian/po-debconf/po-debconf-general/build-spec/debian/po/de.po b/t/recipes/checks/debian/po-debconf/po-debconf-general/build-spec/debian/po/de.po new file mode 100644 index 0000000..545fd25 --- /dev/null +++ b/t/recipes/checks/debian/po-debconf/po-debconf-general/build-spec/debian/po/de.po @@ -0,0 +1,2 @@ +This is just some random other file that isn't a German translation at +all. diff --git a/t/recipes/checks/debian/po-debconf/po-debconf-general/build-spec/debian/po/templates.pot b/t/recipes/checks/debian/po-debconf/po-debconf-general/build-spec/debian/po/templates.pot new file mode 100644 index 0000000..420734f --- /dev/null +++ b/t/recipes/checks/debian/po-debconf/po-debconf-general/build-spec/debian/po/templates.pot @@ -0,0 +1,30 @@ +msgid "" +msgstr "" +"Project-Id-Version: Lintian 2.4.3\n" +"PO-Revision-Date: +2010-07-25 17:07 -0700\n" +"Last-Translator: Russ Allbery \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=CHARSET\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Type: string +#. Default +#: ../templates:1001 +msgid "foo" +msgstr "" + +#. Type: string +#. Description +#: ../templates:1001 +msgid "This is a string question used for testing:" +msgstr "" + +#. Type: string +#. Description +#: ../templates:1001 +msgid "This is a second string question:" + +#. Type: string +#. Description +#: ../templates:1001 +msgid "This one ensures no 100% translation of the template." diff --git a/t/recipes/checks/debian/po-debconf/po-debconf-general/build-spec/debian/templates b/t/recipes/checks/debian/po-debconf/po-debconf-general/build-spec/debian/templates new file mode 100644 index 0000000..b626825 --- /dev/null +++ b/t/recipes/checks/debian/po-debconf/po-debconf-general/build-spec/debian/templates @@ -0,0 +1,10 @@ +Template: po-debconf-general/test +Type: string +_Default: foo +Description: This is a string question used for testing: + +Template: po-debconf-general/test-2 +Type: string +Default: bar +_Description: This is a second string question: + This one ensures no 100% translation of the template. diff --git a/t/recipes/checks/debian/po-debconf/po-debconf-general/build-spec/debian/templates.en_US b/t/recipes/checks/debian/po-debconf/po-debconf-general/build-spec/debian/templates.en_US new file mode 100644 index 0000000..617a474 --- /dev/null +++ b/t/recipes/checks/debian/po-debconf/po-debconf-general/build-spec/debian/templates.en_US @@ -0,0 +1,5 @@ +Template: po-debconf-general/test +Type: string +Default: foo +_Description: This is an English translation that shouldn't be in this + directory. diff --git a/t/recipes/checks/debian/po-debconf/po-debconf-general/build-spec/fill-values b/t/recipes/checks/debian/po-debconf/po-debconf-general/build-spec/fill-values new file mode 100644 index 0000000..bbcbc61 --- /dev/null +++ b/t/recipes/checks/debian/po-debconf/po-debconf-general/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: upload-native +Testname: po-debconf-general +Description: General tests for debconf translations diff --git a/t/recipes/checks/debian/po-debconf/po-debconf-general/eval/desc b/t/recipes/checks/debian/po-debconf/po-debconf-general/eval/desc new file mode 100644 index 0000000..72652db --- /dev/null +++ b/t/recipes/checks/debian/po-debconf/po-debconf-general/eval/desc @@ -0,0 +1,2 @@ +Testname: po-debconf-general +Check: debian/po-debconf diff --git a/t/recipes/checks/debian/po-debconf/po-debconf-general/eval/hints b/t/recipes/checks/debian/po-debconf/po-debconf-general/eval/hints new file mode 100644 index 0000000..af584a3 --- /dev/null +++ b/t/recipes/checks/debian/po-debconf/po-debconf-general/eval/hints @@ -0,0 +1,8 @@ +po-debconf-general (source): untranslatable-debconf-templates [debian/templates:4] +po-debconf-general (source): translated-default-field [debian/templates:3] +po-debconf-general (source): stray-translated-debconf-templates [debian/templates.en_US] +po-debconf-general (source): no-complete-debconf-translation +po-debconf-general (source): missing-file-from-potfiles-in some-other-file [debian/po/POTFILES.in:3] +po-debconf-general (source): misnamed-po-file [debian/po/English.po] +po-debconf-general (source): invalid-po-file [debian/po/de.po] +po-debconf-general (source): invalid-po-file [debian/po/English.po] diff --git a/t/recipes/checks/debian/po-debconf/po-debconf-missing/build-spec/debian/config b/t/recipes/checks/debian/po-debconf/po-debconf-missing/build-spec/debian/config new file mode 100755 index 0000000..240b7f8 --- /dev/null +++ b/t/recipes/checks/debian/po-debconf/po-debconf-missing/build-spec/debian/config @@ -0,0 +1,9 @@ +#!/bin/sh + +set -e + +. /usr/share/debconf/confmodule + +db_get po-debconf-general/test || true +db_get po-debconf-general/test-2 || true + diff --git a/t/recipes/checks/debian/po-debconf/po-debconf-missing/build-spec/debian/po/en.po b/t/recipes/checks/debian/po-debconf/po-debconf-missing/build-spec/debian/po/en.po new file mode 100644 index 0000000..dbf7e69 --- /dev/null +++ b/t/recipes/checks/debian/po-debconf/po-debconf-missing/build-spec/debian/po/en.po @@ -0,0 +1,17 @@ +# Woohoo, translations - here to suppress a "no-complete-translation" +# +msgid "" +msgstr "" +"Project-Id-Version: po-debconf-missing\n" +"Report-Msgid-Bugs-To: po-debconf-missing@packages.debian.org\n" +"POT-Creation-Date: 2009-08-24 19:24+0200\n" +"PO-Revision-Date: 2010-09-03 23:51+0200\n" +"Last-Translator: Lintian Maintainers \n" +"Language-Team: Lintian Maintainers \n" +"Language: en\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + + diff --git a/t/recipes/checks/debian/po-debconf/po-debconf-missing/build-spec/debian/postinst b/t/recipes/checks/debian/po-debconf/po-debconf-missing/build-spec/debian/postinst new file mode 100644 index 0000000..0ae7a18 --- /dev/null +++ b/t/recipes/checks/debian/po-debconf/po-debconf-missing/build-spec/debian/postinst @@ -0,0 +1,7 @@ +#!/bin/sh + +set -e + +. /usr/share/debconf/confmodule + +#DEBHELPER# diff --git a/t/recipes/checks/debian/po-debconf/po-debconf-missing/build-spec/debian/templates b/t/recipes/checks/debian/po-debconf/po-debconf-missing/build-spec/debian/templates new file mode 100644 index 0000000..1285e40 --- /dev/null +++ b/t/recipes/checks/debian/po-debconf/po-debconf-missing/build-spec/debian/templates @@ -0,0 +1,10 @@ +Template: po-debconf-general/test +Type: string +Default: foo +_Description: This is a string question used for testing: + +Template: po-debconf-general/test-2 +Type: string +Default: bar +_Description: This is a second string question: + This one ensures no 100% translation of the template. diff --git a/t/recipes/checks/debian/po-debconf/po-debconf-missing/build-spec/fill-values b/t/recipes/checks/debian/po-debconf/po-debconf-missing/build-spec/fill-values new file mode 100644 index 0000000..0e4fc01 --- /dev/null +++ b/t/recipes/checks/debian/po-debconf/po-debconf-missing/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: upload-native +Testname: po-debconf-missing +Description: Test for missing po-debconf files diff --git a/t/recipes/checks/debian/po-debconf/po-debconf-missing/eval/desc b/t/recipes/checks/debian/po-debconf/po-debconf-missing/eval/desc new file mode 100644 index 0000000..9a65aef --- /dev/null +++ b/t/recipes/checks/debian/po-debconf/po-debconf-missing/eval/desc @@ -0,0 +1,2 @@ +Testname: po-debconf-missing +Check: debian/po-debconf diff --git a/t/recipes/checks/debian/po-debconf/po-debconf-missing/eval/hints b/t/recipes/checks/debian/po-debconf/po-debconf-missing/eval/hints new file mode 100644 index 0000000..6830040 --- /dev/null +++ b/t/recipes/checks/debian/po-debconf/po-debconf-missing/eval/hints @@ -0,0 +1,2 @@ +po-debconf-missing (source): missing-templates-pot +po-debconf-missing (source): missing-potfiles-in diff --git a/t/recipes/checks/debian/po-debconf/po-debconf-no-po-debconf/build-spec/debian/config b/t/recipes/checks/debian/po-debconf/po-debconf-no-po-debconf/build-spec/debian/config new file mode 100755 index 0000000..240b7f8 --- /dev/null +++ b/t/recipes/checks/debian/po-debconf/po-debconf-no-po-debconf/build-spec/debian/config @@ -0,0 +1,9 @@ +#!/bin/sh + +set -e + +. /usr/share/debconf/confmodule + +db_get po-debconf-general/test || true +db_get po-debconf-general/test-2 || true + diff --git a/t/recipes/checks/debian/po-debconf/po-debconf-no-po-debconf/build-spec/debian/postinst b/t/recipes/checks/debian/po-debconf/po-debconf-no-po-debconf/build-spec/debian/postinst new file mode 100644 index 0000000..0ae7a18 --- /dev/null +++ b/t/recipes/checks/debian/po-debconf/po-debconf-no-po-debconf/build-spec/debian/postinst @@ -0,0 +1,7 @@ +#!/bin/sh + +set -e + +. /usr/share/debconf/confmodule + +#DEBHELPER# diff --git a/t/recipes/checks/debian/po-debconf/po-debconf-no-po-debconf/build-spec/debian/templates b/t/recipes/checks/debian/po-debconf/po-debconf-no-po-debconf/build-spec/debian/templates new file mode 100644 index 0000000..1d685bc --- /dev/null +++ b/t/recipes/checks/debian/po-debconf/po-debconf-no-po-debconf/build-spec/debian/templates @@ -0,0 +1,10 @@ +Template: po-debconf-general/test +Type: string +Default: foo +Description: This is a string question used for testing: + +Template: po-debconf-general/test-2 +Type: string +Default: bar +Description: This is a second string question: + This one ensures no 100% translation of the template. diff --git a/t/recipes/checks/debian/po-debconf/po-debconf-no-po-debconf/build-spec/fill-values b/t/recipes/checks/debian/po-debconf/po-debconf-no-po-debconf/build-spec/fill-values new file mode 100644 index 0000000..1b56e55 --- /dev/null +++ b/t/recipes/checks/debian/po-debconf/po-debconf-no-po-debconf/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: upload-native +Testname: po-debconf-no-po-debconf +Description: Test for not using po-debconf diff --git a/t/recipes/checks/debian/po-debconf/po-debconf-no-po-debconf/eval/desc b/t/recipes/checks/debian/po-debconf/po-debconf-no-po-debconf/eval/desc new file mode 100644 index 0000000..d3b4ab1 --- /dev/null +++ b/t/recipes/checks/debian/po-debconf/po-debconf-no-po-debconf/eval/desc @@ -0,0 +1,2 @@ +Testname: po-debconf-no-po-debconf +Check: debian/po-debconf diff --git a/t/recipes/checks/debian/po-debconf/po-debconf-no-po-debconf/eval/hints b/t/recipes/checks/debian/po-debconf/po-debconf-no-po-debconf/eval/hints new file mode 100644 index 0000000..2fd5c5b --- /dev/null +++ b/t/recipes/checks/debian/po-debconf/po-debconf-no-po-debconf/eval/hints @@ -0,0 +1,3 @@ +po-debconf-no-po-debconf (source): untranslatable-debconf-templates [debian/templates:9] +po-debconf-no-po-debconf (source): untranslatable-debconf-templates [debian/templates:4] +po-debconf-no-po-debconf (source): not-using-po-debconf diff --git a/t/recipes/checks/debian/readme/bad-email-format/build-spec/debian/README.Debian b/t/recipes/checks/debian/readme/bad-email-format/build-spec/debian/README.Debian new file mode 100644 index 0000000..87bfcdf --- /dev/null +++ b/t/recipes/checks/debian/readme/bad-email-format/build-spec/debian/README.Debian @@ -0,0 +1,7 @@ +foo++ for Debian +---------------- + +This should trigger a warning, as i use a fake mail address. + + -- Marc 'HE' Brockschmidt , Wed, 14 Apr 2004 01:44:18 +0200 + diff --git a/t/recipes/checks/debian/readme/bad-email-format/build-spec/fill-values b/t/recipes/checks/debian/readme/bad-email-format/build-spec/fill-values new file mode 100644 index 0000000..d3e7aca --- /dev/null +++ b/t/recipes/checks/debian/readme/bad-email-format/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: upload-native +Testname: bad-email-format +Description: Debian.README with email address in unknown format diff --git a/t/recipes/checks/debian/readme/bad-email-format/eval/desc b/t/recipes/checks/debian/readme/bad-email-format/eval/desc new file mode 100644 index 0000000..0269f3d --- /dev/null +++ b/t/recipes/checks/debian/readme/bad-email-format/eval/desc @@ -0,0 +1,2 @@ +Testname: bad-email-format +Check: debian/readme diff --git a/t/recipes/checks/debian/readme/bad-email-format/eval/hints b/t/recipes/checks/debian/readme/bad-email-format/eval/hints new file mode 100644 index 0000000..72ab52d --- /dev/null +++ b/t/recipes/checks/debian/readme/bad-email-format/eval/hints @@ -0,0 +1 @@ +bad-email-format (binary): readme-debian-contains-invalid-email-address foo@unknown [usr/share/doc/bad-email-format/README.Debian] diff --git a/t/recipes/checks/debian/readme/bad-email-format/eval/post-test b/t/recipes/checks/debian/readme/bad-email-format/eval/post-test new file mode 100644 index 0000000..faeef0b --- /dev/null +++ b/t/recipes/checks/debian/readme/bad-email-format/eval/post-test @@ -0,0 +1 @@ +s/\(current is ([0-9]+\.)+[0-9]\)/(current is CURRENT)/ diff --git a/t/recipes/checks/debian/readme/debian-readme-general/build-spec/debian/README.Debian b/t/recipes/checks/debian/readme/debian-readme-general/build-spec/debian/README.Debian new file mode 100644 index 0000000..482b668 --- /dev/null +++ b/t/recipes/checks/debian/readme/debian-readme-general/build-spec/debian/README.Debian @@ -0,0 +1,11 @@ +This is a test README.Debian with a few problems that Lintian should +catch, like accidentaly misspelled words. + +Here is a reference to /usr/doc/debian-readme-general, which is an old +path that nothing should use any more. + +ALS is not a spelling error for also and ANG is not a spelling error for +and. In general, possible acronyms like COMIT should be ignored. But +only to a certain length; CHNAGES is still wrong. + + -- Unknown diff --git a/t/recipes/checks/debian/readme/debian-readme-general/build-spec/fill-values b/t/recipes/checks/debian/readme/debian-readme-general/build-spec/fill-values new file mode 100644 index 0000000..b2d9b73 --- /dev/null +++ b/t/recipes/checks/debian/readme/debian-readme-general/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: upload-native +Testname: debian-readme-general +Description: General tests for README.Debian diff --git a/t/recipes/checks/debian/readme/debian-readme-general/eval/desc b/t/recipes/checks/debian/readme/debian-readme-general/eval/desc new file mode 100644 index 0000000..0df2974 --- /dev/null +++ b/t/recipes/checks/debian/readme/debian-readme-general/eval/desc @@ -0,0 +1,3 @@ +Testname: debian-readme-general +See-Also: Debian Bug#556456 +Check: debian/readme diff --git a/t/recipes/checks/debian/readme/debian-readme-general/eval/hints b/t/recipes/checks/debian/readme/debian-readme-general/eval/hints new file mode 100644 index 0000000..a5b1e27 --- /dev/null +++ b/t/recipes/checks/debian/readme/debian-readme-general/eval/hints @@ -0,0 +1,4 @@ +debian-readme-general (binary): spelling-error-in-readme-debian accidentaly accidentally [usr/share/doc/debian-readme-general/README.Debian] +debian-readme-general (binary): spelling-error-in-readme-debian CHNAGES CHANGES [usr/share/doc/debian-readme-general/README.Debian] +debian-readme-general (binary): readme-debian-mentions-usr-doc [usr/share/doc/debian-readme-general/README.Debian:4] +debian-readme-general (binary): readme-debian-contains-invalid-email-address unknown@unknown [usr/share/doc/debian-readme-general/README.Debian] diff --git a/t/recipes/checks/debian/readme/generic-dh-make-2008/build-spec/debian/README.Debian b/t/recipes/checks/debian/readme/generic-dh-make-2008/build-spec/debian/README.Debian new file mode 100644 index 0000000..69112e6 --- /dev/null +++ b/t/recipes/checks/debian/readme/generic-dh-make-2008/build-spec/debian/README.Debian @@ -0,0 +1,6 @@ +generic-dh-make-2008 for Debian +------------------------------- + + + + -- Russ Allbery Mon, 29 Dec 2008 17:33:59 -0800 diff --git a/t/recipes/checks/debian/readme/generic-dh-make-2008/build-spec/debian/changelog.in b/t/recipes/checks/debian/readme/generic-dh-make-2008/build-spec/debian/changelog.in new file mode 100644 index 0000000..8d16a3d --- /dev/null +++ b/t/recipes/checks/debian/readme/generic-dh-make-2008/build-spec/debian/changelog.in @@ -0,0 +1,5 @@ +generic-dh-make-2008 ([% $version %]) [% $distribution %]; urgency=low + + * Initial release (Closes: #nnnn) + + -- Russ Allbery Mon, 29 Dec 2008 17:33:59 -0800 diff --git a/t/recipes/checks/debian/readme/generic-dh-make-2008/build-spec/debian/compat.in b/t/recipes/checks/debian/readme/generic-dh-make-2008/build-spec/debian/compat.in new file mode 100644 index 0000000..640a566 --- /dev/null +++ b/t/recipes/checks/debian/readme/generic-dh-make-2008/build-spec/debian/compat.in @@ -0,0 +1 @@ +[% $dh_compat_level %] diff --git a/t/recipes/checks/debian/readme/generic-dh-make-2008/build-spec/debian/control.in b/t/recipes/checks/debian/readme/generic-dh-make-2008/build-spec/debian/control.in new file mode 100644 index 0000000..a668392 --- /dev/null +++ b/t/recipes/checks/debian/readme/generic-dh-make-2008/build-spec/debian/control.in @@ -0,0 +1,13 @@ +Source: generic-dh-make-2008 +Section: unknown +Priority: optional +Maintainer: Russ Allbery +Build-Depends: debhelper (>= 7) +Standards-Version: 3.7.3 +Homepage: + +Package: generic-dh-make-2008 +Architecture: [% $package_architecture %] +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: + diff --git a/t/recipes/checks/debian/readme/generic-dh-make-2008/build-spec/debian/copyright b/t/recipes/checks/debian/readme/generic-dh-make-2008/build-spec/debian/copyright new file mode 100644 index 0000000..31b796a --- /dev/null +++ b/t/recipes/checks/debian/readme/generic-dh-make-2008/build-spec/debian/copyright @@ -0,0 +1,24 @@ +This package was debianized by Russ Allbery on +Mon, 29 Dec 2008 17:33:59 -0800. + +It was downloaded from + +Upstream Author(s): + + + + +Copyright: + + + + +License: + + + +The Debian packaging is (C) 2008, Russ Allbery and +is licensed under the GPL, see `/usr/share/common-licenses/GPL'. + +# Please also look if there are files or directories which have a +# different copyright/license attached and list them here. diff --git a/t/recipes/checks/debian/readme/generic-dh-make-2008/build-spec/debian/cron.d.ex b/t/recipes/checks/debian/readme/generic-dh-make-2008/build-spec/debian/cron.d.ex new file mode 100644 index 0000000..d00b7d0 --- /dev/null +++ b/t/recipes/checks/debian/readme/generic-dh-make-2008/build-spec/debian/cron.d.ex @@ -0,0 +1,4 @@ +# +# Regular cron jobs for the generic-dh-make-2008 package +# +0 4 * * * root [ -x /usr/bin/generic-dh-make-2008_maintenance ] && /usr/bin/generic-dh-make-2008_maintenance diff --git a/t/recipes/checks/debian/readme/generic-dh-make-2008/build-spec/debian/dirs b/t/recipes/checks/debian/readme/generic-dh-make-2008/build-spec/debian/dirs new file mode 100644 index 0000000..ca882bb --- /dev/null +++ b/t/recipes/checks/debian/readme/generic-dh-make-2008/build-spec/debian/dirs @@ -0,0 +1,2 @@ +usr/bin +usr/sbin diff --git a/t/recipes/checks/debian/readme/generic-dh-make-2008/build-spec/debian/docs b/t/recipes/checks/debian/readme/generic-dh-make-2008/build-spec/debian/docs new file mode 100644 index 0000000..e845566 --- /dev/null +++ b/t/recipes/checks/debian/readme/generic-dh-make-2008/build-spec/debian/docs @@ -0,0 +1 @@ +README diff --git a/t/recipes/checks/debian/readme/generic-dh-make-2008/build-spec/debian/emacsen-install.ex b/t/recipes/checks/debian/readme/generic-dh-make-2008/build-spec/debian/emacsen-install.ex new file mode 100644 index 0000000..393594b --- /dev/null +++ b/t/recipes/checks/debian/readme/generic-dh-make-2008/build-spec/debian/emacsen-install.ex @@ -0,0 +1,45 @@ +#! /bin/sh -e +# /usr/lib/emacsen-common/packages/install/generic-dh-make-2008 + +# Written by Jim Van Zandt , borrowing heavily +# from the install scripts for gettext by Santiago Vila +# and octave by Dirk Eddelbuettel . + +FLAVOR=$1 +PACKAGE=generic-dh-make-2008 + +if [ ${FLAVOR} = emacs ]; then exit 0; fi + +echo install/${PACKAGE}: Handling install for emacsen flavor ${FLAVOR} + +#FLAVORTEST=`echo $FLAVOR | cut -c-6` +#if [ ${FLAVORTEST} = xemacs ] ; then +# SITEFLAG="-no-site-file" +#else +# SITEFLAG="--no-site-file" +#fi +FLAGS="${SITEFLAG} -q -batch -l path.el -f batch-byte-compile" + +ELDIR=/usr/share/emacs/site-lisp/${PACKAGE} +ELCDIR=/usr/share/${FLAVOR}/site-lisp/${PACKAGE} + +# Install-info-altdir does not actually exist. +# Maybe somebody will write it. +if test -x /usr/sbin/install-info-altdir; then + echo install/${PACKAGE}: install Info links for ${FLAVOR} + install-info-altdir --quiet --section "" "" --dirname=${FLAVOR} /usr/share/info/${PACKAGE}.info.gz +fi + +install -m 755 -d ${ELCDIR} +cd ${ELDIR} +FILES=`echo *.el` +cp ${FILES} ${ELCDIR} +cd ${ELCDIR} + +cat << EOF > path.el +(setq load-path (cons "." load-path) byte-compile-warnings nil) +EOF +${FLAVOR} ${FLAGS} ${FILES} +rm -f *.el path.el + +exit 0 diff --git a/t/recipes/checks/debian/readme/generic-dh-make-2008/build-spec/debian/emacsen-remove.ex b/t/recipes/checks/debian/readme/generic-dh-make-2008/build-spec/debian/emacsen-remove.ex new file mode 100644 index 0000000..c48d194 --- /dev/null +++ b/t/recipes/checks/debian/readme/generic-dh-make-2008/build-spec/debian/emacsen-remove.ex @@ -0,0 +1,15 @@ +#!/bin/sh -e +# /usr/lib/emacsen-common/packages/remove/generic-dh-make-2008 + +FLAVOR=$1 +PACKAGE=generic-dh-make-2008 + +if [ ${FLAVOR} != emacs ]; then + if test -x /usr/sbin/install-info-altdir; then + echo remove/${PACKAGE}: removing Info links for ${FLAVOR} + install-info-altdir --quiet --remove --dirname=${FLAVOR} /usr/share/info/generic-dh-make-2008.info.gz + fi + + echo remove/${PACKAGE}: purging byte-compiled files for ${FLAVOR} + rm -rf /usr/share/${FLAVOR}/site-lisp/${PACKAGE} +fi diff --git a/t/recipes/checks/debian/readme/generic-dh-make-2008/build-spec/debian/emacsen-startup.ex b/t/recipes/checks/debian/readme/generic-dh-make-2008/build-spec/debian/emacsen-startup.ex new file mode 100644 index 0000000..b51657a --- /dev/null +++ b/t/recipes/checks/debian/readme/generic-dh-make-2008/build-spec/debian/emacsen-startup.ex @@ -0,0 +1,25 @@ +;; -*-emacs-lisp-*- +;; +;; Emacs startup file, e.g. /etc/emacs/site-start.d/50generic-dh-make-2008.el +;; for the Debian generic-dh-make-2008 package +;; +;; Originally contributed by Nils Naumann +;; Modified by Dirk Eddelbuettel +;; Adapted for dh-make by Jim Van Zandt + +;; The generic-dh-make-2008 package follows the Debian/GNU Linux 'emacsen' policy and +;; byte-compiles its elisp files for each 'emacs flavor' (emacs19, +;; xemacs19, emacs20, xemacs20...). The compiled code is then +;; installed in a subdirectory of the respective site-lisp directory. +;; We have to add this to the load-path: +(let ((package-dir (concat "/usr/share/" + (symbol-name flavor) + "/site-lisp/generic-dh-make-2008"))) +;; If package-dir does not exist, the generic-dh-make-2008 package must have +;; removed but not purged, and we should skip the setup. + (when (file-directory-p package-dir) + (setq load-path (cons package-dir load-path)) + (autoload 'generic-dh-make-2008-mode "generic-dh-make-2008-mode" + "Major mode for editing generic-dh-make-2008 files." t) + (add-to-list 'auto-mode-alist '("\\.generic-dh-make-2008$" . generic-dh-make-2008-mode)))) + diff --git a/t/recipes/checks/debian/readme/generic-dh-make-2008/build-spec/debian/generic-dh-make-2008.default.ex b/t/recipes/checks/debian/readme/generic-dh-make-2008/build-spec/debian/generic-dh-make-2008.default.ex new file mode 100644 index 0000000..d770c6e --- /dev/null +++ b/t/recipes/checks/debian/readme/generic-dh-make-2008/build-spec/debian/generic-dh-make-2008.default.ex @@ -0,0 +1,10 @@ +# Defaults for generic-dh-make-2008 initscript +# sourced by /etc/init.d/generic-dh-make-2008 +# installed at /etc/default/generic-dh-make-2008 by the maintainer scripts + +# +# This is a POSIX shell fragment +# + +# Additional options that are passed to the Daemon. +DAEMON_OPTS="" diff --git a/t/recipes/checks/debian/readme/generic-dh-make-2008/build-spec/debian/generic-dh-make-2008.doc-base.EX b/t/recipes/checks/debian/readme/generic-dh-make-2008/build-spec/debian/generic-dh-make-2008.doc-base.EX new file mode 100644 index 0000000..3b966d1 --- /dev/null +++ b/t/recipes/checks/debian/readme/generic-dh-make-2008/build-spec/debian/generic-dh-make-2008.doc-base.EX @@ -0,0 +1,22 @@ +Document: generic-dh-make-2008 +Title: Debian generic-dh-make-2008 Manual +Author: +Abstract: This manual describes what generic-dh-make-2008 is + and how it can be used to + manage online manuals on Debian systems. +Section: unknown + +Format: debiandoc-sgml +Files: /usr/share/doc/generic-dh-make-2008/generic-dh-make-2008.sgml.gz + +Format: postscript +Files: /usr/share/doc/generic-dh-make-2008/generic-dh-make-2008.ps.gz + +Format: text +Files: /usr/share/doc/generic-dh-make-2008/generic-dh-make-2008.text.gz + +Format: HTML +Index: /usr/share/doc/generic-dh-make-2008/html/index.html +Files: /usr/share/doc/generic-dh-make-2008/html/*.html + + diff --git a/t/recipes/checks/debian/readme/generic-dh-make-2008/build-spec/debian/init.d.ex b/t/recipes/checks/debian/readme/generic-dh-make-2008/build-spec/debian/init.d.ex new file mode 100644 index 0000000..b464594 --- /dev/null +++ b/t/recipes/checks/debian/readme/generic-dh-make-2008/build-spec/debian/init.d.ex @@ -0,0 +1,157 @@ +#! /bin/sh +# +# skeleton example file to build /etc/init.d/ scripts. +# This file should be used to construct scripts for /etc/init.d. +# +# Written by Miquel van Smoorenburg . +# Modified for Debian +# by Ian Murdock . +# Further changes by Javier Fernandez-Sanguino +# +# Version: @(#)skeleton 1.9 26-Feb-2001 miquels@cistron.nl +# + +PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin +DAEMON=/usr/sbin/generic-dh-make-2008 +NAME=generic-dh-make-2008 +DESC=generic-dh-make-2008 + +test -x $DAEMON || exit 0 + +LOGDIR=/var/log/generic-dh-make-2008 +PIDFILE=/var/run/$NAME.pid +DODTIME=1 # Time to wait for the server to die, in seconds + # If this value is set too low you might not + # let some servers to die gracefully and + # 'restart' will not work + +# Include generic-dh-make-2008 defaults if available +if [ -f /etc/default/generic-dh-make-2008 ] ; then + . /etc/default/generic-dh-make-2008 +fi + +set -e + +running_pid() +{ + # Check if a given process pid's cmdline matches a given name + pid=$1 + name=$2 + [ -z "$pid" ] && return 1 + [ ! -d /proc/$pid ] && return 1 + cmd=`cat /proc/$pid/cmdline | tr "\000" "\n"|head -n 1 |cut -d : -f 1` + # Is this the expected child? + [ "$cmd" != "$name" ] && return 1 + return 0 +} + +running() +{ +# Check if the process is running looking at /proc +# (works for all users) + + # No pidfile, probably no daemon present + [ ! -f "$PIDFILE" ] && return 1 + # Obtain the pid and check it against the binary name + pid=`cat $PIDFILE` + running_pid $pid $DAEMON || return 1 + return 0 +} + +force_stop() { +# Forcefully kill the process + [ ! -f "$PIDFILE" ] && return + if running ; then + kill -15 $pid + # Is it really dead? + [ -n "$DODTIME" ] && sleep "$DODTIME"s + if running ; then + kill -9 $pid + [ -n "$DODTIME" ] && sleep "$DODTIME"s + if running ; then + echo "Cannot kill $LABEL (pid=$pid)!" + exit 1 + fi + fi + fi + rm -f $PIDFILE + return 0 +} + +case "$1" in + start) + echo -n "Starting $DESC: " + start-stop-daemon --start --quiet --pidfile $PIDFILE \ + --exec $DAEMON -- $DAEMON_OPTS + if running ; then + echo "$NAME." + else + echo " ERROR." + fi + ;; + stop) + echo -n "Stopping $DESC: " + start-stop-daemon --stop --quiet --pidfile $PIDFILE \ + --exec $DAEMON + echo "$NAME." + ;; + force-stop) + echo -n "Forcefully stopping $DESC: " + force_stop + if ! running ; then + echo "$NAME." + else + echo " ERROR." + fi + ;; + #reload) + # + # If the daemon can reload its config files on the fly + # for example by sending it SIGHUP, do it here. + # + # If the daemon responds to changes in its config file + # directly anyway, make this a do-nothing entry. + # + # echo "Reloading $DESC configuration files." + # start-stop-daemon --stop --signal 1 --quiet --pidfile \ + # /var/run/$NAME.pid --exec $DAEMON + #;; + force-reload) + # + # If the "reload" option is implemented, move the "force-reload" + # option to the "reload" entry above. If not, "force-reload" is + # just the same as "restart" except that it does nothing if the + # daemon isn't already running. + # check wether $DAEMON is running. If so, restart + start-stop-daemon --stop --test --quiet --pidfile \ + /var/run/$NAME.pid --exec $DAEMON \ + && $0 restart \ + || exit 0 + ;; + restart) + echo -n "Restarting $DESC: " + start-stop-daemon --stop --quiet --pidfile \ + /var/run/$NAME.pid --exec $DAEMON + [ -n "$DODTIME" ] && sleep $DODTIME + start-stop-daemon --start --quiet --pidfile \ + /var/run/$NAME.pid --exec $DAEMON -- $DAEMON_OPTS + echo "$NAME." + ;; + status) + echo -n "$LABEL is " + if running ; then + echo "running" + else + echo " not running." + exit 1 + fi + ;; + *) + N=/etc/init.d/$NAME + # echo "Usage: $N {start|stop|restart|reload|force-reload}" >&2 + echo "Usage: $N {start|stop|restart|force-reload|status|force-stop}" >&2 + exit 1 + ;; +esac + +exit 0 diff --git a/t/recipes/checks/debian/readme/generic-dh-make-2008/build-spec/debian/init.d.lsb.ex b/t/recipes/checks/debian/readme/generic-dh-make-2008/build-spec/debian/init.d.lsb.ex new file mode 100644 index 0000000..b3559de --- /dev/null +++ b/t/recipes/checks/debian/readme/generic-dh-make-2008/build-spec/debian/init.d.lsb.ex @@ -0,0 +1,296 @@ +#!/bin/sh +# +# Example init.d script with LSB support. +# +# Please read this init.d carefully and modify the sections to +# adjust it to the program you want to run. +# +# Copyright (c) 2007 Javier Fernandez-Sanguino +# +# This is free software; you may redistribute it and/or modify +# it under the terms of the GNU General Public License as +# published by the Free Software Foundation; either version 2, +# or (at your option) any later version. +# +# This is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License with +# the Debian operating system, in /usr/share/common-licenses/GPL; if +# not, write to the Free Software Foundation, Inc., 59 Temple Place, +# Suite 330, Boston, MA 02111-1307 USA +# +### BEGIN INIT INFO +# Provides: generic-dh-make-2008 +# Required-Start: $network $local_fs +# Required-Stop: +# Should-Start: $named +# Should-Stop: +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +# Short-Description: +# Description: +# <...> +# <...> +### END INIT INFO + +PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin + +DAEMON=/usr/sbin/generic-dh-make-2008 # Introduce the server's location here +NAME=#PACKAGE # Introduce the short server's name here +DESC=#PACKAGE # Introduce a short description here +LOGDIR=/var/log/generic-dh-make-2008 # Log directory to use + +PIDFILE=/var/run/$NAME.pid + +test -x $DAEMON || exit 0 + +. /lib/lsb/init-functions + +# Default options, these can be overriden by the information +# at /etc/default/$NAME +DAEMON_OPTS="" # Additional options given to the server + +DIETIME=10 # Time to wait for the server to die, in seconds + # If this value is set too low you might not + # let some servers to die gracefully and + # 'restart' will not work + +#STARTTIME=2 # Time to wait for the server to start, in seconds + # If this value is set each time the server is + # started (on start or restart) the script will + # stall to try to determine if it is running + # If it is not set and the server takes time + # to setup a pid file the log message might + # be a false positive (says it did not start + # when it actually did) + +LOGFILE=$LOGDIR/$NAME.log # Server logfile +#DAEMONUSER=generic-dh-make-2008 # Users to run the daemons as. If this value + # is set start-stop-daemon will chuid the server + +# Include defaults if available +if [ -f /etc/default/$NAME ] ; then + . /etc/default/$NAME +fi + +# Use this if you want the user to explicitly set 'RUN' in +# /etc/default/ +#if [ "x$RUN" != "xyes" ] ; then +# log_failure_msg "$NAME disabled, please adjust the configuration to your needs " +# log_failure_msg "and then set RUN to 'yes' in /etc/default/$NAME to enable it." +# exit 1 +#fi + +# Check that the user exists (if we set a user) +# Does the user exist? +if [ -n "$DAEMONUSER" ] ; then + if getent passwd | grep -q "^$DAEMONUSER:"; then + # Obtain the uid and gid + DAEMONUID=`getent passwd |grep "^$DAEMONUSER:" | awk -F : '{print $3}'` + DAEMONGID=`getent passwd |grep "^$DAEMONUSER:" | awk -F : '{print $4}'` + else + log_failure_msg "The user $DAEMONUSER, required to run $NAME does not exist." + exit 1 + fi +fi + + +set -e + +running_pid() { +# Check if a given process pid's cmdline matches a given name + pid=$1 + name=$2 + [ -z "$pid" ] && return 1 + [ ! -d /proc/$pid ] && return 1 + cmd=`cat /proc/$pid/cmdline | tr "\000" "\n"|head -n 1 |cut -d : -f 1` + # Is this the expected server + [ "$cmd" != "$name" ] && return 1 + return 0 +} + +running() { +# Check if the process is running looking at /proc +# (works for all users) + + # No pidfile, probably no daemon present + [ ! -f "$PIDFILE" ] && return 1 + pid=`cat $PIDFILE` + running_pid $pid $DAEMON || return 1 + return 0 +} + +start_server() { +# Start the process using the wrapper + if [ -z "$DAEMONUSER" ] ; then + start_daemon -p $PIDFILE $DAEMON -- $DAEMON_OPTS + errcode=$? + else +# if we are using a daemonuser then change the user id + start-stop-daemon --start --quiet --pidfile $PIDFILE \ + --chuid $DAEMONUSER \ + --exec $DAEMON -- $DAEMON_OPTS + errcode=$? + fi + return $errcode +} + +stop_server() { +# Stop the process using the wrapper + if [ -z "$DAEMONUSER" ] ; then + killproc -p $PIDFILE $DAEMON + errcode=$? + else +# if we are using a daemonuser then look for process that match + start-stop-daemon --stop --quiet --pidfile $PIDFILE \ + --user $DAEMONUSER \ + --exec $DAEMON + errcode=$? + fi + + return $errcode +} + +reload_server() { + [ ! -f "$PIDFILE" ] && return 1 + pid=pidofproc $PIDFILE # This is the daemon's pid + # Send a SIGHUP + kill -1 $pid + return $? +} + +force_stop() { +# Force the process to die killing it manually + [ ! -e "$PIDFILE" ] && return + if running ; then + kill -15 $pid + # Is it really dead? + sleep "$DIETIME"s + if running ; then + kill -9 $pid + sleep "$DIETIME"s + if running ; then + echo "Cannot kill $NAME (pid=$pid)!" + exit 1 + fi + fi + fi + rm -f $PIDFILE +} + + +case "$1" in + start) + log_daemon_msg "Starting $DESC " "$NAME" + # Check if it's running first + if running ; then + log_progress_msg "apparently already running" + log_end_msg 0 + exit 0 + fi + if start_server ; then + # NOTE: Some servers might die some time after they start, + # this code will detect this issue if STARTTIME is set + # to a reasonable value + [ -n "$STARTTIME" ] && sleep $STARTTIME # Wait some time + if running ; then + # It's ok, the server started and is running + log_end_msg 0 + else + # It is not running after we did start + log_end_msg 1 + fi + else + # Either we could not start it + log_end_msg 1 + fi + ;; + stop) + log_daemon_msg "Stopping $DESC" "$NAME" + if running ; then + # Only stop the server if we see it running + errcode=0 + stop_server || errcode=$? + log_end_msg $errcode + else + # If it's not running don't do anything + log_progress_msg "apparently not running" + log_end_msg 0 + exit 0 + fi + ;; + force-stop) + # First try to stop gracefully the program + $0 stop + if running; then + # If it's still running try to kill it more forcefully + log_daemon_msg "Stopping (force) $DESC" "$NAME" + errcode=0 + force_stop || errcode=$? + log_end_msg $errcode + fi + ;; + restart|force-reload) + log_daemon_msg "Restarting $DESC" "$NAME" + errcode=0 + stop_server || errcode=$? + # Wait some sensible amount, some server need this + [ -n "$DIETIME" ] && sleep $DIETIME + start_server || errcode=$? + [ -n "$STARTTIME" ] && sleep $STARTTIME + running || errcode=$? + log_end_msg $errcode + ;; + status) + + log_daemon_msg "Checking status of $DESC" "$NAME" + if running ; then + log_progress_msg "running" + log_end_msg 0 + else + log_progress_msg "apparently not running" + log_end_msg 1 + exit 1 + fi + ;; + # Use this if the daemon cannot reload + reload) + log_warning_msg "Reloading $NAME daemon: not implemented, as the daemon" + log_warning_msg "cannot re-read the config file (use restart)." + ;; + # And this if it cann + #reload) + # + # If the daemon can reload its config files on the fly + # for example by sending it SIGHUP, do it here. + # + # If the daemon responds to changes in its config file + # directly anyway, make this a do-nothing entry. + # + # log_daemon_msg "Reloading $DESC configuration files" "$NAME" + # if running ; then + # reload_server + # if ! running ; then + # Process died after we tried to reload + # log_progress_msg "died on reload" + # log_end_msg 1 + # exit 1 + # fi + # else + # log_progress_msg "server is not running" + # log_end_msg 1 + # exit 1 + # fi + #;; + + *) + N=/etc/init.d/$NAME + echo "Usage: $N {start|stop|force-stop|restart|force-reload|status}" >&2 + exit 1 + ;; +esac + +exit 0 diff --git a/t/recipes/checks/debian/readme/generic-dh-make-2008/build-spec/debian/manpage.1.ex b/t/recipes/checks/debian/readme/generic-dh-make-2008/build-spec/debian/manpage.1.ex new file mode 100644 index 0000000..d67baa2 --- /dev/null +++ b/t/recipes/checks/debian/readme/generic-dh-make-2008/build-spec/debian/manpage.1.ex @@ -0,0 +1,59 @@ +.\" Hey, EMACS: -*- nroff -*- +.\" First parameter, NAME, should be all caps +.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection +.\" other parameters are allowed: see man(7), man(1) +.TH GENERIC-DH-MAKE-2008 SECTION "December 29, 2008" +.\" Please adjust this date whenever revising the manpage. +.\" +.\" Some roff macros, for reference: +.\" .nh disable hyphenation +.\" .hy enable hyphenation +.\" .ad l left justify +.\" .ad b justify to both left and right margins +.\" .nf disable filling +.\" .fi enable filling +.\" .br insert line break +.\" .sp insert n+1 empty lines +.\" for manpage-specific macros, see man(7) +.SH NAME +generic-dh-make-2008 \- program to do something +.SH SYNOPSIS +.B generic-dh-make-2008 +.RI [ options ] " files" ... +.br +.B bar +.RI [ options ] " files" ... +.SH DESCRIPTION +This manual page documents briefly the +.B generic-dh-make-2008 +and +.B bar +commands. +.PP +.\" TeX users may be more comfortable with the \fB\fP and +.\" \fI\fP escape sequences to invode bold face and italics, +.\" respectively. +\fBgeneric-dh-make-2008\fP is a program that... +.SH OPTIONS +These programs follow the usual GNU command line syntax, with long +options starting with two dashes (`-'). +A summary of options is included below. +For a complete description, see the Info files. +.TP +.B \-h, \-\-help +Show summary of options. +.TP +.B \-v, \-\-version +Show version of program. +.SH SEE ALSO +.BR bar (1), +.BR baz (1). +.br +The programs are documented fully by +.IR "The Rise and Fall of a Fooish Bar" , +available via the Info system. +.SH AUTHOR +generic-dh-make-2008 was written by . +.PP +This manual page was written by Russ Allbery , +for the Debian project (but may be used by others). diff --git a/t/recipes/checks/debian/readme/generic-dh-make-2008/build-spec/debian/manpage.sgml.ex b/t/recipes/checks/debian/readme/generic-dh-make-2008/build-spec/debian/manpage.sgml.ex new file mode 100644 index 0000000..26b3e0c --- /dev/null +++ b/t/recipes/checks/debian/readme/generic-dh-make-2008/build-spec/debian/manpage.sgml.ex @@ -0,0 +1,156 @@ + manpage.1'. You may view + the manual page with: `docbook-to-man manpage.sgml | nroff -man | + less'. A typical entry in a Makefile or Makefile.am is: + +manpage.1: manpage.sgml + docbook-to-man $< > $@ + + + The docbook-to-man binary is found in the docbook-to-man package. + Please remember that if you create the nroff version in one of the + debian/rules file targets (such as build), you will need to include + docbook-to-man in your Build-Depends control field. + + --> + + + FIRSTNAME"> + SURNAME"> + + December 29, 2008"> + + SECTION"> + rra@debian.org"> + + GENERIC-DH-MAKE-2008"> + + + Debian"> + GNU"> + GPL"> +]> + + + +
      + &dhemail; +
      + + &dhfirstname; + &dhsurname; + + + 2003 + &dhusername; + + &dhdate; +
      + + &dhucpackage; + + &dhsection; + + + &dhpackage; + + program to do something + + + + &dhpackage; + + + + + + + + DESCRIPTION + + This manual page documents briefly the + &dhpackage; and bar + commands. + + This manual page was written for the &debian; distribution + because the original program does not have a manual page. + Instead, it has documentation in the &gnu; + Info format; see below. + + &dhpackage; is a program that... + + + + OPTIONS + + These programs follow the usual &gnu; command line syntax, + with long options starting with two dashes (`-'). A summary of + options is included below. For a complete description, see the + Info files. + + + + + + + + Show summary of options. + + + + + + + + Show version of program. + + + + + + SEE ALSO + + bar (1), baz (1). + + The programs are documented fully by The Rise and + Fall of a Fooish Bar available via the + Info system. + + + AUTHOR + + This manual page was written by &dhusername; &dhemail; for + the &debian; system (but may be used by others). Permission is + granted to copy, distribute and/or modify this document under + the terms of the &gnu; General Public License, Version 2 any + later version published by the Free Software Foundation. + + + On Debian systems, the complete text of the GNU General Public + License can be found in /usr/share/common-licenses/GPL. + + + +
      + + + + diff --git a/t/recipes/checks/debian/readme/generic-dh-make-2008/build-spec/debian/manpage.xml.ex b/t/recipes/checks/debian/readme/generic-dh-make-2008/build-spec/debian/manpage.xml.ex new file mode 100644 index 0000000..2d01c6f --- /dev/null +++ b/t/recipes/checks/debian/readme/generic-dh-make-2008/build-spec/debian/manpage.xml.ex @@ -0,0 +1,291 @@ + +.
      will be generated. You may view the +manual page with: nroff -man .
      | less'. A typical entry +in a Makefile or Makefile.am is: + +DB2MAN = /usr/share/sgml/docbook/stylesheet/xsl/nwalsh/manpages/docbook.xsl +XP = xsltproc -''-nonet -''-param man.charmap.use.subset "0" + +manpage.1: manpage.xml + $(XP) $(DB2MAN) $< + +The xsltproc binary is found in the xsltproc package. The XSL files are in +docbook-xsl. A description of the parameters you can use can be found in the +docbook-xsl-doc-* packages. Please remember that if you create the nroff +version in one of the debian/rules file targets (such as build), you will need +to include xsltproc and docbook-xsl in your Build-Depends control field. +Alternatively use the xmlto command/package. That will also automatically +pull in xsltproc and docbook-xsl. + +Notes for using docbook2x: docbook2x-man does not automatically create the +AUTHOR(S) and COPYRIGHT sections. In this case, please add them manually as + ... . + +To disable the automatic creation of the AUTHOR(S) and COPYRIGHT sections +read /usr/share/doc/docbook-xsl/doc/manpages/authors.html. This file can be +found in the docbook-xsl-doc-html package. + +Validation can be done using: `xmllint -''-noout -''-valid manpage.xml` + +General documentation about man-pages and man-page-formatting: +man(1), man(7), http://www.tldp.org/HOWTO/Man-Page/ + +--> + + + + + + + + + + + + + +]> + + + + &dhtitle; + &dhpackage; + + + &dhfirstname; + &dhsurname; + Wrote this manpage for the Debian system. +
      + &dhemail; +
      +
      +
      + + 2007 + &dhusername; + + + This manual page was written for the Debian system + (but may be used by others). + Permission is granted to copy, distribute and/or modify this + document under the terms of the GNU General Public License, + Version 2 or (at your option) any later version published by + the Free Software Foundation. + On Debian systems, the complete text of the GNU General Public + License can be found in + /usr/share/common-licenses/GPL. + +
      + + &dhucpackage; + &dhsection; + + + &dhpackage; + program to do something + + + + &dhpackage; + + + + + + + + + this + + + + + + + + this + that + + + + + &dhpackage; + + + + + + + + + + + + + + + + + + + DESCRIPTION + This manual page documents briefly the + &dhpackage; and bar + commands. + This manual page was written for the Debian distribution + because the original program does not have a manual page. + Instead, it has documentation in the GNU + info + 1 + format; see below. + &dhpackage; is a program that... + + + OPTIONS + The program follows the usual GNU command line syntax, + with long options starting with two dashes (`-'). A summary of + options is included below. For a complete description, see the + + info + 1 + files. + + + + + + + Does this and that. + + + + + + + Show summary of options. + + + + + + + Show version of program. + + + + + + FILES + + + /etc/foo.conf + + The system-wide configuration file to control the + behaviour of &dhpackage;. See + + foo.conf + 5 + for further details. + + + + ${HOME}/.foo.conf + + The per-user configuration file to control the + behaviour of &dhpackage;. See + + foo.conf + 5 + for further details. + + + + + + ENVIONMENT + + + FOO_CONF + + If used, the defined file is used as configuration + file (see also ). + + + + + + DIAGNOSTICS + The following diagnostics may be issued + on stderr: + + + Bad configuration file. Exiting. + + The configuration file seems to contain a broken configuration + line. Use the option, to get more info. + + + + + &dhpackage; provides some return codes, that can + be used in scripts: + + Code + Diagnostic + + 0 + Program exited successfully. + + + 1 + The configuration file seems to be broken. + + + + + + BUGS + The program is currently limited to only work + with the foobar library. + The upstreams BTS can be found + at . + + + SEE ALSO + + + bar + 1 + , + baz + 1 + , + foo.conf + 5 + + The programs are documented fully by The Rise and + Fall of a Fooish Bar available via the + info + 1 + system. + +
      + diff --git a/t/recipes/checks/debian/readme/generic-dh-make-2008/build-spec/debian/menu.ex b/t/recipes/checks/debian/readme/generic-dh-make-2008/build-spec/debian/menu.ex new file mode 100644 index 0000000..8a67e62 --- /dev/null +++ b/t/recipes/checks/debian/readme/generic-dh-make-2008/build-spec/debian/menu.ex @@ -0,0 +1,2 @@ +?package(generic-dh-make-2008):needs="X11|text|vc|wm" section="Applications/see-menu-manual"\ + title="generic-dh-make-2008" command="/usr/bin/generic-dh-make-2008" diff --git a/t/recipes/checks/debian/readme/generic-dh-make-2008/build-spec/debian/postinst.ex b/t/recipes/checks/debian/readme/generic-dh-make-2008/build-spec/debian/postinst.ex new file mode 100644 index 0000000..b5f5ca7 --- /dev/null +++ b/t/recipes/checks/debian/readme/generic-dh-make-2008/build-spec/debian/postinst.ex @@ -0,0 +1,41 @@ +#!/bin/sh +# postinst script for generic-dh-make-2008 +# +# see: dh_installdeb(1) + +set -e + +# summary of how this script can be called: +# * `configure' +# * `abort-upgrade' +# * `abort-remove' `in-favour' +# +# * `abort-remove' +# * `abort-deconfigure' `in-favour' +# `removing' +# +# for details, see http://www.debian.org/doc/debian-policy/ or +# the debian-policy package + + +case "$1" in + configure) + ;; + + abort-upgrade|abort-remove|abort-deconfigure) + ;; + + *) + echo "postinst called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# + +exit 0 + + diff --git a/t/recipes/checks/debian/readme/generic-dh-make-2008/build-spec/debian/postrm.ex b/t/recipes/checks/debian/readme/generic-dh-make-2008/build-spec/debian/postrm.ex new file mode 100644 index 0000000..1d8a18a --- /dev/null +++ b/t/recipes/checks/debian/readme/generic-dh-make-2008/build-spec/debian/postrm.ex @@ -0,0 +1,39 @@ +#!/bin/sh +# postrm script for generic-dh-make-2008 +# +# see: dh_installdeb(1) + +set -e + +# summary of how this script can be called: +# * `remove' +# * `purge' +# * `upgrade' +# * `failed-upgrade' +# * `abort-install' +# * `abort-install' +# * `abort-upgrade' +# * `disappear' +# +# for details, see http://www.debian.org/doc/debian-policy/ or +# the debian-policy package + + +case "$1" in + purge|remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear) + ;; + + *) + echo "postrm called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# + +exit 0 + + diff --git a/t/recipes/checks/debian/readme/generic-dh-make-2008/build-spec/debian/preinst.ex b/t/recipes/checks/debian/readme/generic-dh-make-2008/build-spec/debian/preinst.ex new file mode 100644 index 0000000..3134ccf --- /dev/null +++ b/t/recipes/checks/debian/readme/generic-dh-make-2008/build-spec/debian/preinst.ex @@ -0,0 +1,37 @@ +#!/bin/sh +# preinst script for generic-dh-make-2008 +# +# see: dh_installdeb(1) + +set -e + +# summary of how this script can be called: +# * `install' +# * `install' +# * `upgrade' +# * `abort-upgrade' +# for details, see http://www.debian.org/doc/debian-policy/ or +# the debian-policy package + + +case "$1" in + install|upgrade) + ;; + + abort-upgrade) + ;; + + *) + echo "preinst called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# + +exit 0 + + diff --git a/t/recipes/checks/debian/readme/generic-dh-make-2008/build-spec/debian/prerm.ex b/t/recipes/checks/debian/readme/generic-dh-make-2008/build-spec/debian/prerm.ex new file mode 100644 index 0000000..4e5dd3f --- /dev/null +++ b/t/recipes/checks/debian/readme/generic-dh-make-2008/build-spec/debian/prerm.ex @@ -0,0 +1,40 @@ +#!/bin/sh +# prerm script for generic-dh-make-2008 +# +# see: dh_installdeb(1) + +set -e + +# summary of how this script can be called: +# * `remove' +# * `upgrade' +# * `failed-upgrade' +# * `remove' `in-favour' +# * `deconfigure' `in-favour' +# `removing' +# +# for details, see http://www.debian.org/doc/debian-policy/ or +# the debian-policy package + + +case "$1" in + remove|upgrade|deconfigure) + ;; + + failed-upgrade) + ;; + + *) + echo "prerm called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# + +exit 0 + + diff --git a/t/recipes/checks/debian/readme/generic-dh-make-2008/build-spec/debian/rules b/t/recipes/checks/debian/readme/generic-dh-make-2008/build-spec/debian/rules new file mode 100755 index 0000000..92aa2b1 --- /dev/null +++ b/t/recipes/checks/debian/readme/generic-dh-make-2008/build-spec/debian/rules @@ -0,0 +1,91 @@ +#!/usr/bin/make -f +# -*- makefile -*- +# Sample debian/rules that uses debhelper. +# This file was originally written by Joey Hess and Craig Small. +# As a special exception, when this file is copied by dh-make into a +# dh-make output file, you may use that output file without restriction. +# This special exception was added by Craig Small in version 0.37 of dh-make. + +# Uncomment this to turn on verbose mode. +#export DH_VERBOSE=1 + + + + + +configure: configure-stamp +configure-stamp: + dh_testdir + # Add here commands to configure the package. + + touch configure-stamp + + +build: build-stamp + +build-stamp: configure-stamp + dh_testdir + + # Add here commands to compile the package. + $(MAKE) + #docbook-to-man debian/generic-dh-make-2008.sgml > generic-dh-make-2008.1 + + touch $@ + +clean: + dh_testdir + dh_testroot + rm -f build-stamp configure-stamp + + # Add here commands to clean up after the build process. + $(MAKE) clean + + dh_clean + +install: build + dh_testdir + dh_testroot + dh_clean -k + dh_installdirs + + # Add here commands to install the package into debian/generic-dh-make-2008. + $(MAKE) DESTDIR=$(CURDIR)/debian/generic-dh-make-2008 install + + +# Build architecture-independent files here. +binary-indep: build install +# We have nothing to do by default. + +# Build architecture-dependent files here. +binary-arch: build install + dh_testdir + dh_testroot + dh_installchangelogs + dh_installdocs + dh_installexamples +# dh_install +# dh_installmenu +# dh_installdebconf +# dh_installlogrotate +# dh_installemacsen +# dh_installpam +# dh_installmime +# dh_python +# dh_installinit +# dh_installcron +# dh_installinfo + dh_installman + dh_link + dh_strip + dh_compress + dh_fixperms +# dh_perl +# dh_makeshlibs + dh_installdeb + dh_shlibdeps + dh_gencontrol + dh_md5sums + dh_builddeb + +binary: binary-indep binary-arch +.PHONY: build clean binary-indep binary-arch binary install configure diff --git a/t/recipes/checks/debian/readme/generic-dh-make-2008/build-spec/debian/watch.ex b/t/recipes/checks/debian/readme/generic-dh-make-2008/build-spec/debian/watch.ex new file mode 100644 index 0000000..e62d18f --- /dev/null +++ b/t/recipes/checks/debian/readme/generic-dh-make-2008/build-spec/debian/watch.ex @@ -0,0 +1,23 @@ +# Example watch control file for uscan +# Rename this file to "watch" and then you can run the "uscan" command +# to check for upstream updates and more. +# See uscan(1) for format + +# Compulsory line, this is a version 3 file +version=3 + +# Uncomment to examine a Webpage +# +#http://www.example.com/downloads.php generic-dh-make-2008-(.*)\.tar\.gz + +# Uncomment to examine a Webserver directory +#http://www.example.com/pub/generic-dh-make-2008-(.*)\.tar\.gz + +# Uncommment to examine a FTP server +#ftp://ftp.example.com/pub/generic-dh-make-2008-(.*)\.tar\.gz debian uupdate + +# Uncomment to find new files on sourceforge, for devscripts >= 2.9 +# http://sf.net/generic-dh-make-2008/generic-dh-make-2008-(.*)\.tar\.gz + +# Uncomment to find new files on GooglePages +# http://example.googlepages.com/foo.html generic-dh-make-2008-(.*)\.tar\.gz diff --git a/t/recipes/checks/debian/readme/generic-dh-make-2008/build-spec/fill-values b/t/recipes/checks/debian/readme/generic-dh-make-2008/build-spec/fill-values new file mode 100644 index 0000000..ef7a896 --- /dev/null +++ b/t/recipes/checks/debian/readme/generic-dh-make-2008/build-spec/fill-values @@ -0,0 +1,7 @@ +Testname: generic-dh-make-2008 +Skeleton: upload-builder-only +Author: Russ Allbery +Package-Architecture: any +Dh-Compat-Level: 7 +Description: Generic dh_make template generated in 2008 +Default-Build-Depends: debhelper (>= [% $dh_compat_level %]~) diff --git a/t/recipes/checks/debian/readme/generic-dh-make-2008/build-spec/orig/Makefile b/t/recipes/checks/debian/readme/generic-dh-make-2008/build-spec/orig/Makefile new file mode 100644 index 0000000..4f762d8 --- /dev/null +++ b/t/recipes/checks/debian/readme/generic-dh-make-2008/build-spec/orig/Makefile @@ -0,0 +1,4 @@ +# Stub Makefile that's just enough so that the default rules file doesn't +# error out. + +clean install: diff --git a/t/recipes/checks/debian/readme/generic-dh-make-2008/build-spec/orig/README b/t/recipes/checks/debian/readme/generic-dh-make-2008/build-spec/orig/README new file mode 100644 index 0000000..6a3c009 --- /dev/null +++ b/t/recipes/checks/debian/readme/generic-dh-make-2008/build-spec/orig/README @@ -0,0 +1,13 @@ +dh_make 0.46 test +================= + +This is the results of running dh_make 0.46 on an upstream tarball +containing only this file. It's a useful test for the various dh_make +template and boilerplate tags, as well as many tags for ways of doing +things dh_make used to promote but are now deprecated or old debhelper +commands that are now deprecated. + +Please don't modify anything about the files in this package; instead, add +new tags as needed when Lintian adds new checks. This test case is +intended to continue to be a test of Lintian's handling of old and +template packages. diff --git a/t/recipes/checks/debian/readme/generic-dh-make-2008/build-spec/pre-build.in b/t/recipes/checks/debian/readme/generic-dh-make-2008/build-spec/pre-build.in new file mode 100755 index 0000000..bbdb5cb --- /dev/null +++ b/t/recipes/checks/debian/readme/generic-dh-make-2008/build-spec/pre-build.in @@ -0,0 +1,5 @@ +#!/bin/sh + +# not using any templates, but dh_clean requires compat + +echo "[% $dh_compat_level %]" > "$1/debian/compat" diff --git a/t/recipes/checks/debian/readme/generic-dh-make-2008/eval/desc b/t/recipes/checks/debian/readme/generic-dh-make-2008/eval/desc new file mode 100644 index 0000000..5300245 --- /dev/null +++ b/t/recipes/checks/debian/readme/generic-dh-make-2008/eval/desc @@ -0,0 +1,4 @@ +Testname: generic-dh-make-2008 +Check: debian/readme +See-Also: + Bug#497347 diff --git a/t/recipes/checks/debian/readme/generic-dh-make-2008/eval/hints b/t/recipes/checks/debian/readme/generic-dh-make-2008/eval/hints new file mode 100644 index 0000000..31f43d3 --- /dev/null +++ b/t/recipes/checks/debian/readme/generic-dh-make-2008/eval/hints @@ -0,0 +1 @@ +generic-dh-make-2008 (binary): readme-debian-contains-debmake-template [usr/share/doc/generic-dh-make-2008/README.Debian] diff --git a/t/recipes/checks/debian/readme/generic-dh-make-2008/eval/post-test b/t/recipes/checks/debian/readme/generic-dh-make-2008/eval/post-test new file mode 100644 index 0000000..faeef0b --- /dev/null +++ b/t/recipes/checks/debian/readme/generic-dh-make-2008/eval/post-test @@ -0,0 +1 @@ +s/\(current is ([0-9]+\.)+[0-9]\)/(current is CURRENT)/ diff --git a/t/recipes/checks/debian/readme/legacy-etcfiles/build-spec/debian/README.Debian b/t/recipes/checks/debian/readme/legacy-etcfiles/build-spec/debian/README.Debian new file mode 100644 index 0000000..e289bfb --- /dev/null +++ b/t/recipes/checks/debian/readme/legacy-etcfiles/build-spec/debian/README.Debian @@ -0,0 +1,5 @@ +this is a package to test lintian's handling of files in /etc. +Also, there's a random mention of /usr/doc here to prompt a warning. +But /usr/documentation doesn't. + + -- Russ Allbery , Mon, 18 Feb 2008 16:40:55 -0800 diff --git a/t/recipes/checks/debian/readme/legacy-etcfiles/build-spec/debian/changelog.in b/t/recipes/checks/debian/readme/legacy-etcfiles/build-spec/debian/changelog.in new file mode 100644 index 0000000..00cdc77 --- /dev/null +++ b/t/recipes/checks/debian/readme/legacy-etcfiles/build-spec/debian/changelog.in @@ -0,0 +1,7 @@ +etcfiles ([% $version %]) [% $distribution %]; urgency=low + + * Acknowledge NMU (Closes: #123456). + * initial setup + + -- Lintian Maintainers Fri, 21 Sep 2001 11:56:02 -0700 + diff --git a/t/recipes/checks/debian/readme/legacy-etcfiles/build-spec/debian/conffiles b/t/recipes/checks/debian/readme/legacy-etcfiles/build-spec/debian/conffiles new file mode 100644 index 0000000..76032b7 --- /dev/null +++ b/t/recipes/checks/debian/readme/legacy-etcfiles/build-spec/debian/conffiles @@ -0,0 +1,5 @@ +/etc/proper +/var/lib/foo +/etc/cron.daily/cronfile-normal +/etc/cron.daily/.cronfile-begins-with-fullstop +/etc/cron.daily/cronfile-contains.fullstop diff --git a/t/recipes/checks/debian/readme/legacy-etcfiles/build-spec/debian/conffiles.only b/t/recipes/checks/debian/readme/legacy-etcfiles/build-spec/debian/conffiles.only new file mode 100644 index 0000000..a4b3895 --- /dev/null +++ b/t/recipes/checks/debian/readme/legacy-etcfiles/build-spec/debian/conffiles.only @@ -0,0 +1,2 @@ +/etc/etcfiles/foo +/etc/etcfiles/bar diff --git a/t/recipes/checks/debian/readme/legacy-etcfiles/build-spec/debian/control b/t/recipes/checks/debian/readme/legacy-etcfiles/build-spec/debian/control new file mode 100644 index 0000000..f3dbda7 --- /dev/null +++ b/t/recipes/checks/debian/readme/legacy-etcfiles/build-spec/debian/control @@ -0,0 +1,20 @@ +Source: etcfiles +Section: misc +Priority: optional +Maintainer: Lintian Maintainers +Standards-Version: 3.5.0 + +Package: etcfiles +Architecture: any +Depends: ${shlibs:Depends} +Description: test handling of files in /etc + Regression test for lintian's handling of files in /etc. + . + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. + +Package: only-etcfiles +Architecture: all +Depends: etcfiles (= ${source:Version}) +Description: test handling of conffile-only package diff --git a/t/recipes/checks/debian/readme/legacy-etcfiles/build-spec/debian/rules b/t/recipes/checks/debian/readme/legacy-etcfiles/build-spec/debian/rules new file mode 100755 index 0000000..97ff09f --- /dev/null +++ b/t/recipes/checks/debian/readme/legacy-etcfiles/build-spec/debian/rules @@ -0,0 +1,64 @@ +#!/usr/bin/make -f + +tmp=debian/tmp +tmponly=debian/only-etcfiles + +clean: + rm -f debian/files debian/substvars + rm -rf debian/tmp + rm -rf debian/only-etcfiles + +build: +build-arch: +build-indep: +binary-indep: + install -d $(tmp)/etc + install -m 644 proper $(tmp)/etc + install -m 644 improper $(tmp)/etc + mkdir $(tmp)/etc/cron.daily + touch $(tmp)/etc/cron.daily/cronfile-normal + touch $(tmp)/etc/cron.daily/.cronfile-begins-with-fullstop + touch $(tmp)/etc/cron.daily/cronfile-contains.fullstop + ln $(tmp)/etc/improper $(tmp)/etc/improper-link + install -d $(tmp)/usr/share/doc/etcfiles + install -d $(tmp)/var/lib + install -m 644 proper $(tmp)/var/lib/foo + install -m 644 debian/README.Debian $(tmp)/usr/share/doc/etcfiles + install -m 644 debian/changelog $(tmp)/usr/share/doc/etcfiles + #gzip -9 $(tmp)/usr/share/doc/etcfiles/changelog + install -d $(tmp)/DEBIAN + install -m 644 debian/conffiles $(tmp)/DEBIAN + + echo 'd41d8cd98f00b204e9800998ecf8427e ./etc/cron.daily/cronfile-normal' \ + > debian/tmp/DEBIAN/md5sums + echo 'd41d8cd98f00b204e9800998ecf8427e ./etc/cron.daily/.cronfile-begins-with-fullstop' \ + >> debian/tmp/DEBIAN/md5sums + echo 'd41d8cd98f00b204e9800998ecf8427e ./etc/cron.daily/cronfile-contains.fullstop' \ + >> debian/tmp/DEBIAN/md5sums + echo '05c72cacce994208128b7d081116b04a ./etc/proper' \ + >> debian/tmp/DEBIAN/md5sums + echo 'ab371382468880299e5ebd05921764ce etc/improper' \ + >> debian/tmp/DEBIAN/md5sums + echo 'ab371382468880299e5ebd05921764ce usr/bin/foo' \ + >> debian/tmp/DEBIAN/md5sums + echo 'this is a malformed line' \ + >> debian/tmp/DEBIAN/md5sums + echo '56fb27e455dd86d8801f1ecd3a4cee49 usr/share/doc/etcfiles/README.Debian' \ + >> debian/tmp/DEBIAN/md5sums + + install -d $(tmponly)/etc/etcfiles + touch $(tmponly)/etc/etcfiles/foo + touch $(tmponly)/etc/etcfiles/bar + install -d $(tmponly)/usr/share/doc + cd $(tmponly)/usr/share/doc && ln -s etcfiles only-etcfiles + install -d $(tmponly)/DEBIAN + install -m 644 debian/conffiles.only $(tmponly)/DEBIAN/conffiles + + dpkg-gencontrol -isp -petcfiles + dpkg-gencontrol -isp -ponly-etcfiles -P$(tmponly) + dpkg --build $(tmp) .. + dpkg --build $(tmponly) .. + +binary: binary-indep + +.PHONY: binary-indep binary clean diff --git a/t/recipes/checks/debian/readme/legacy-etcfiles/build-spec/fill-values b/t/recipes/checks/debian/readme/legacy-etcfiles/build-spec/fill-values new file mode 100644 index 0000000..86deb10 --- /dev/null +++ b/t/recipes/checks/debian/readme/legacy-etcfiles/build-spec/fill-values @@ -0,0 +1,5 @@ +Skeleton: upload-native +Testname: legacy-etcfiles +Source: etcfiles +Version: 1 +Description: Legacy test "etcfiles" diff --git a/t/recipes/checks/debian/readme/legacy-etcfiles/build-spec/orig/improper b/t/recipes/checks/debian/readme/legacy-etcfiles/build-spec/orig/improper new file mode 100644 index 0000000..23656f4 --- /dev/null +++ b/t/recipes/checks/debian/readme/legacy-etcfiles/build-spec/orig/improper @@ -0,0 +1,2 @@ +[config] + var = value \ No newline at end of file diff --git a/t/recipes/checks/debian/readme/legacy-etcfiles/build-spec/orig/proper b/t/recipes/checks/debian/readme/legacy-etcfiles/build-spec/orig/proper new file mode 100644 index 0000000..f3dc68b --- /dev/null +++ b/t/recipes/checks/debian/readme/legacy-etcfiles/build-spec/orig/proper @@ -0,0 +1,2 @@ +# i am a config file +foo = var \ No newline at end of file diff --git a/t/recipes/checks/debian/readme/legacy-etcfiles/eval/desc b/t/recipes/checks/debian/readme/legacy-etcfiles/eval/desc new file mode 100644 index 0000000..8573044 --- /dev/null +++ b/t/recipes/checks/debian/readme/legacy-etcfiles/eval/desc @@ -0,0 +1,2 @@ +Testname: legacy-etcfiles +Check: debian/readme diff --git a/t/recipes/checks/debian/readme/legacy-etcfiles/eval/hints b/t/recipes/checks/debian/readme/legacy-etcfiles/eval/hints new file mode 100644 index 0000000..8781179 --- /dev/null +++ b/t/recipes/checks/debian/readme/legacy-etcfiles/eval/hints @@ -0,0 +1 @@ +etcfiles (binary): readme-debian-mentions-usr-doc [usr/share/doc/etcfiles/README.Debian:2] diff --git a/t/recipes/checks/debian/readme/legacy-etcfiles/eval/post-test b/t/recipes/checks/debian/readme/legacy-etcfiles/eval/post-test new file mode 100644 index 0000000..faeef0b --- /dev/null +++ b/t/recipes/checks/debian/readme/legacy-etcfiles/eval/post-test @@ -0,0 +1 @@ +s/\(current is ([0-9]+\.)+[0-9]\)/(current is CURRENT)/ diff --git a/t/recipes/checks/debian/readme/legacy-foo++/build-spec/debian/README.Debian b/t/recipes/checks/debian/readme/legacy-foo++/build-spec/debian/README.Debian new file mode 100644 index 0000000..87bfcdf --- /dev/null +++ b/t/recipes/checks/debian/readme/legacy-foo++/build-spec/debian/README.Debian @@ -0,0 +1,7 @@ +foo++ for Debian +---------------- + +This should trigger a warning, as i use a fake mail address. + + -- Marc 'HE' Brockschmidt , Wed, 14 Apr 2004 01:44:18 +0200 + diff --git a/t/recipes/checks/debian/readme/legacy-foo++/build-spec/debian/changelog.in b/t/recipes/checks/debian/readme/legacy-foo++/build-spec/debian/changelog.in new file mode 100644 index 0000000..f838939 --- /dev/null +++ b/t/recipes/checks/debian/readme/legacy-foo++/build-spec/debian/changelog.in @@ -0,0 +1,31 @@ +foo++ ([% $version %]) [% $distribution %]; urgency=low + + * Add a fake README.Debian to trigger a warning. + * This should trigger + debian-changelog-file-contains-debmake-default-email-address. + + -- Marc 'HE' Brockschmidt Wed, 14 Apr 2003 01:35:47 +0200 + +foo++ (4) unstable; urgency=low + + * This changelog now includes a ISO-8859-1 character: '' + + -- Frank Lichtenheld Fri, 5 Mar 2004 13:41:39 +0100 + +foo++ (3) unstable; urgency=low + + * Set maintainers + uploaders incorrectly + + -- Jeroen van Wolffelaar Fri, 5 Mar 2004 04:20:24 +0100 + +foo++ (2) unstable; urgency=low + + * Added a foo++-helper package to try and catch even more ++ bugs. + + -- Sean 'Shaleh' Perry Sat, 10 Feb 2001 23:16:17 -0800 + +foo++ (1) unstable; urgency=low + + * Initial version + + -- Sean 'Shaleh' Perry Thu, 16 Nov 2000 09:11:40 -0800 diff --git a/t/recipes/checks/debian/readme/legacy-foo++/build-spec/debian/control b/t/recipes/checks/debian/readme/legacy-foo++/build-spec/debian/control new file mode 100644 index 0000000..3e86b96 --- /dev/null +++ b/t/recipes/checks/debian/readme/legacy-foo++/build-spec/debian/control @@ -0,0 +1,30 @@ +Source: foo++ +Section: misc +Priority: optional +Maintainer: Lintian Maintainer +Uploaders: Marc 'HE' Brockschmidt , Jeroen van Wolffelaar, + Frank , Yama@gotchi, Josip, + I am afraid of spam and think this helps +Standards-Version: 3.1.1 +XS-Dm-Upload-Allowed: no + +Package: foo++ +Architecture: all +Build-Depends: test +Depends: test, libssl0.9.7 +Description: see how lintian reacts to plus signs in the package name + Regression test to see if lintian tests work on a package with plus signs in + its name. + . + This description also uses non-UTF8 high bytes chars: ÄÖÜß + +Package: foo++-helper +Architecture: all +Depends: test, foo++ +Description: see how lintian reacts to plus signs in the package name + Regression test to see if lintian tests work on a package with plus signs in + its name. This has /usr/share/doc links to foo++ to trigger even more checks. + . + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. diff --git a/t/recipes/checks/debian/readme/legacy-foo++/build-spec/debian/copyright b/t/recipes/checks/debian/readme/legacy-foo++/build-spec/debian/copyright new file mode 100644 index 0000000..e2d6d93 --- /dev/null +++ b/t/recipes/checks/debian/readme/legacy-foo++/build-spec/debian/copyright @@ -0,0 +1,7 @@ +A reference to /usr/share/common-licenses/GPL to make it look like this +package is under the GPL and trigger the OpenSSL warning. + +However, there is also a reference to /usr/share/common-licenses/LGPL, so +who knows what bits actually depend on libssl. + +Copr. 2007 Somebody. diff --git a/t/recipes/checks/debian/readme/legacy-foo++/build-spec/debian/rules b/t/recipes/checks/debian/readme/legacy-foo++/build-spec/debian/rules new file mode 100755 index 0000000..63bb4db --- /dev/null +++ b/t/recipes/checks/debian/readme/legacy-foo++/build-spec/debian/rules @@ -0,0 +1,36 @@ +#!/usr/bin/make -f + +foo=foo++ +helper=foo++-helper + +build-arch: + +build-indep: + +build: build-arch build-indep + +binary-arch: + +binary-indep: + install -d debian/$(foo)/DEBIAN + install -d debian/$(foo)/usr/share/doc/$(foo) + install -m 644 debian/changelog \ + debian/$(foo)/usr/share/doc/$(foo)/changelog + gzip -n -9 debian/$(foo)/usr/share/doc/$(foo)/changelog + install -m 644 debian/README.Debian \ + debian/$(foo)/usr/share/doc/$(foo)/README.Debian + gzip -n -9 debian/$(foo)/usr/share/doc/$(foo)/README.Debian + dpkg-gencontrol -isp -p$(foo) -Pdebian/$(foo) + dpkg --build debian/$(foo) .. + + install -d debian/$(helper)/DEBIAN + install -d debian/$(helper)/usr/share/doc/ + ln -sf $(foo) debian/$(helper)/usr/share/doc/$(helper) + dpkg-gencontrol -isp -p$(helper) -Pdebian/$(helper) + dpkg --build debian/$(helper) .. + +binary: binary-arch binary-indep + +clean: + +.PHONY: build-arch build-indep build binary-arch binary-indep binary clean diff --git a/t/recipes/checks/debian/readme/legacy-foo++/build-spec/debian/watch b/t/recipes/checks/debian/readme/legacy-foo++/build-spec/debian/watch new file mode 100644 index 0000000..26f9a3c --- /dev/null +++ b/t/recipes/checks/debian/readme/legacy-foo++/build-spec/debian/watch @@ -0,0 +1,6 @@ +# A comment \ +version=0 + +# uscan does not interpret the backslash above, it is just part of the comment + +http://domain.tld/file-(.*)\.tar\.gz diff --git a/t/recipes/checks/debian/readme/legacy-foo++/build-spec/fill-values b/t/recipes/checks/debian/readme/legacy-foo++/build-spec/fill-values new file mode 100644 index 0000000..86d43bc --- /dev/null +++ b/t/recipes/checks/debian/readme/legacy-foo++/build-spec/fill-values @@ -0,0 +1,5 @@ +Skeleton: upload-native +Testname: legacy-foo++ +Source: foo++ +Version: 5 +Description: Legacy test "foo++" diff --git a/t/recipes/checks/debian/readme/legacy-foo++/eval/desc b/t/recipes/checks/debian/readme/legacy-foo++/eval/desc new file mode 100644 index 0000000..552bd50 --- /dev/null +++ b/t/recipes/checks/debian/readme/legacy-foo++/eval/desc @@ -0,0 +1,2 @@ +Testname: legacy-foo++ +Check: debian/readme diff --git a/t/recipes/checks/debian/readme/legacy-foo++/eval/hints b/t/recipes/checks/debian/readme/legacy-foo++/eval/hints new file mode 100644 index 0000000..3a3d628 --- /dev/null +++ b/t/recipes/checks/debian/readme/legacy-foo++/eval/hints @@ -0,0 +1 @@ +foo++ (binary): readme-debian-contains-invalid-email-address foo@unknown [usr/share/doc/foo++/README.Debian.gz] diff --git a/t/recipes/checks/debian/readme/legacy-foo++/eval/post-test b/t/recipes/checks/debian/readme/legacy-foo++/eval/post-test new file mode 100644 index 0000000..faeef0b --- /dev/null +++ b/t/recipes/checks/debian/readme/legacy-foo++/eval/post-test @@ -0,0 +1 @@ +s/\(current is ([0-9]+\.)+[0-9]\)/(current is CURRENT)/ diff --git a/t/recipes/checks/debian/rules/control-file-rules-requires-root-binary-targets/build-spec/debian/control.in b/t/recipes/checks/debian/rules/control-file-rules-requires-root-binary-targets/build-spec/debian/control.in new file mode 100644 index 0000000..9b17d19 --- /dev/null +++ b/t/recipes/checks/debian/rules/control-file-rules-requires-root-binary-targets/build-spec/debian/control.in @@ -0,0 +1,17 @@ +Source: [% $source %] +Priority: optional +Section: [% $section %] +Maintainer: [% $author %] +Standards-Version: [% $standards_version %] +Build-Depends: [% $build_depends %] +Rules-Requires-Root: binary-targets +Homepage: https://lintian.debian.org/ + +Package: [% $source %] +Architecture: [% $package_architecture %] +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: [% $description %] + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. diff --git a/t/recipes/checks/debian/rules/control-file-rules-requires-root-binary-targets/build-spec/debian/rules b/t/recipes/checks/debian/rules/control-file-rules-requires-root-binary-targets/build-spec/debian/rules new file mode 100644 index 0000000..3d706f5 --- /dev/null +++ b/t/recipes/checks/debian/rules/control-file-rules-requires-root-binary-targets/build-spec/debian/rules @@ -0,0 +1,7 @@ +#!/usr/bin/make -f + +%: + dh $@ + +override_dh_builddeb: + dh_builddeb -- -Zgzip diff --git a/t/recipes/checks/debian/rules/control-file-rules-requires-root-binary-targets/build-spec/fill-values b/t/recipes/checks/debian/rules/control-file-rules-requires-root-binary-targets/build-spec/fill-values new file mode 100644 index 0000000..f97b076 --- /dev/null +++ b/t/recipes/checks/debian/rules/control-file-rules-requires-root-binary-targets/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: upload-native +Testname: control-file-rules-requires-root-binary-targets +Description: Test for "Rules-Requires-Root: binary-targets" diff --git a/t/recipes/checks/debian/rules/control-file-rules-requires-root-binary-targets/eval/desc b/t/recipes/checks/debian/rules/control-file-rules-requires-root-binary-targets/eval/desc new file mode 100644 index 0000000..78f3775 --- /dev/null +++ b/t/recipes/checks/debian/rules/control-file-rules-requires-root-binary-targets/eval/desc @@ -0,0 +1,2 @@ +Testname: control-file-rules-requires-root-binary-targets +Check: debian/rules diff --git a/t/recipes/checks/debian/rules/control-file-rules-requires-root-binary-targets/eval/hints b/t/recipes/checks/debian/rules/control-file-rules-requires-root-binary-targets/eval/hints new file mode 100644 index 0000000..fedc8bd --- /dev/null +++ b/t/recipes/checks/debian/rules/control-file-rules-requires-root-binary-targets/eval/hints @@ -0,0 +1 @@ +control-file-rules-requires-root-binary-targets (source): custom-compression-in-debian-rules dh_builddeb -- -Zgzip [debian/rules:7] diff --git a/t/recipes/checks/debian/rules/control-file-rules-requires-root-no/build-spec/debian/control.in b/t/recipes/checks/debian/rules/control-file-rules-requires-root-no/build-spec/debian/control.in new file mode 100644 index 0000000..503994d --- /dev/null +++ b/t/recipes/checks/debian/rules/control-file-rules-requires-root-no/build-spec/debian/control.in @@ -0,0 +1,17 @@ +Source: [% $source %] +Priority: optional +Section: [% $section %] +Maintainer: [% $author %] +Standards-Version: [% $standards_version %] +Build-Depends: [% $build_depends %] +Rules-Requires-Root: no +Homepage: https://lintian.debian.org/ + +Package: [% $source %] +Architecture: [% $package_architecture %] +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: [% $description %] + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. diff --git a/t/recipes/checks/debian/rules/control-file-rules-requires-root-no/build-spec/debian/rules b/t/recipes/checks/debian/rules/control-file-rules-requires-root-no/build-spec/debian/rules new file mode 100644 index 0000000..3d706f5 --- /dev/null +++ b/t/recipes/checks/debian/rules/control-file-rules-requires-root-no/build-spec/debian/rules @@ -0,0 +1,7 @@ +#!/usr/bin/make -f + +%: + dh $@ + +override_dh_builddeb: + dh_builddeb -- -Zgzip diff --git a/t/recipes/checks/debian/rules/control-file-rules-requires-root-no/build-spec/fill-values b/t/recipes/checks/debian/rules/control-file-rules-requires-root-no/build-spec/fill-values new file mode 100644 index 0000000..7359a3f --- /dev/null +++ b/t/recipes/checks/debian/rules/control-file-rules-requires-root-no/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: upload-native +Testname: control-file-rules-requires-root-no +Description: Test for "Rules-Requires-Root: no" diff --git a/t/recipes/checks/debian/rules/control-file-rules-requires-root-no/eval/desc b/t/recipes/checks/debian/rules/control-file-rules-requires-root-no/eval/desc new file mode 100644 index 0000000..3b22695 --- /dev/null +++ b/t/recipes/checks/debian/rules/control-file-rules-requires-root-no/eval/desc @@ -0,0 +1,2 @@ +Testname: control-file-rules-requires-root-no +Check: debian/rules diff --git a/t/recipes/checks/debian/rules/control-file-rules-requires-root-no/eval/hints b/t/recipes/checks/debian/rules/control-file-rules-requires-root-no/eval/hints new file mode 100644 index 0000000..f1f23af --- /dev/null +++ b/t/recipes/checks/debian/rules/control-file-rules-requires-root-no/eval/hints @@ -0,0 +1 @@ +control-file-rules-requires-root-no (source): custom-compression-in-debian-rules dh_builddeb -- -Zgzip [debian/rules:7] diff --git a/t/recipes/checks/debian/rules/debhelper-compat-old/build-spec/debian/rules b/t/recipes/checks/debian/rules/debhelper-compat-old/build-spec/debian/rules new file mode 100644 index 0000000..3d706f5 --- /dev/null +++ b/t/recipes/checks/debian/rules/debhelper-compat-old/build-spec/debian/rules @@ -0,0 +1,7 @@ +#!/usr/bin/make -f + +%: + dh $@ + +override_dh_builddeb: + dh_builddeb -- -Zgzip diff --git a/t/recipes/checks/debian/rules/debhelper-compat-old/build-spec/fill-values b/t/recipes/checks/debian/rules/debhelper-compat-old/build-spec/fill-values new file mode 100644 index 0000000..97909d8 --- /dev/null +++ b/t/recipes/checks/debian/rules/debhelper-compat-old/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: upload-native +Testname: debhelper-compat-old +Description: Test for old debian/compat file diff --git a/t/recipes/checks/debian/rules/debhelper-compat-old/eval/desc b/t/recipes/checks/debian/rules/debhelper-compat-old/eval/desc new file mode 100644 index 0000000..769274c --- /dev/null +++ b/t/recipes/checks/debian/rules/debhelper-compat-old/eval/desc @@ -0,0 +1,4 @@ +Testname: debhelper-compat-old +Options: --include-dir ./lintian-include-dir +Profile: lintian-test +Check: debian/rules diff --git a/t/recipes/checks/debian/rules/debhelper-compat-old/eval/hints b/t/recipes/checks/debian/rules/debhelper-compat-old/eval/hints new file mode 100644 index 0000000..d7b6688 --- /dev/null +++ b/t/recipes/checks/debian/rules/debhelper-compat-old/eval/hints @@ -0,0 +1 @@ +debhelper-compat-old (source): custom-compression-in-debian-rules dh_builddeb -- -Zgzip [debian/rules:7] diff --git a/t/recipes/checks/debian/rules/debhelper-compat-old/eval/lintian-include-dir/profiles/lintian-test/main.profile b/t/recipes/checks/debian/rules/debhelper-compat-old/eval/lintian-include-dir/profiles/lintian-test/main.profile new file mode 100644 index 0000000..f0e27cf --- /dev/null +++ b/t/recipes/checks/debian/rules/debhelper-compat-old/eval/lintian-include-dir/profiles/lintian-test/main.profile @@ -0,0 +1,2 @@ +Profile: lintian-test/main +Extends: debian/main diff --git a/t/recipes/checks/debian/rules/debhelper-compat-old/eval/lintian-include-dir/vendors/lintian-test/main/data/debhelper/compat-level b/t/recipes/checks/debian/rules/debhelper-compat-old/eval/lintian-include-dir/vendors/lintian-test/main/data/debhelper/compat-level new file mode 100644 index 0000000..d91eeb3 --- /dev/null +++ b/t/recipes/checks/debian/rules/debhelper-compat-old/eval/lintian-include-dir/vendors/lintian-test/main/data/debhelper/compat-level @@ -0,0 +1,3 @@ +@include-parent +deprecated=1 +recommended=100 diff --git a/t/recipes/checks/debian/rules/debhelper-deb-build-options/build-spec/debian/rules b/t/recipes/checks/debian/rules/debhelper-deb-build-options/build-spec/debian/rules new file mode 100755 index 0000000..69a9f01 --- /dev/null +++ b/t/recipes/checks/debian/rules/debhelper-deb-build-options/build-spec/debian/rules @@ -0,0 +1,7 @@ +#!/usr/bin/make -f + +export DEB_BUILD_OPTIONS=nocheck +export DEB_BUILD_MAINT_OPTIONS=hardening=+pie,-fortify + +%: + dh $@ diff --git a/t/recipes/checks/debian/rules/debhelper-deb-build-options/build-spec/fill-values b/t/recipes/checks/debian/rules/debhelper-deb-build-options/build-spec/fill-values new file mode 100644 index 0000000..39b1f51 --- /dev/null +++ b/t/recipes/checks/debian/rules/debhelper-deb-build-options/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: upload-native +Testname: debhelper-deb-build-options +Description: Test the value of DEB_BUILD_OPTIONS diff --git a/t/recipes/checks/debian/rules/debhelper-deb-build-options/eval/desc b/t/recipes/checks/debian/rules/debhelper-deb-build-options/eval/desc new file mode 100644 index 0000000..f8ef095 --- /dev/null +++ b/t/recipes/checks/debian/rules/debhelper-deb-build-options/eval/desc @@ -0,0 +1,2 @@ +Testname: debhelper-deb-build-options +Check: debian/rules diff --git a/t/recipes/checks/debian/rules/debhelper-deb-build-options/eval/hints b/t/recipes/checks/debian/rules/debhelper-deb-build-options/eval/hints new file mode 100644 index 0000000..00e0056 --- /dev/null +++ b/t/recipes/checks/debian/rules/debhelper-deb-build-options/eval/hints @@ -0,0 +1 @@ +debhelper-deb-build-options (source): debian-rules-sets-DEB_BUILD_OPTIONS [debian/rules:3] diff --git a/t/recipes/checks/debian/rules/debhelper-dh-compat/build-spec/debian/rules b/t/recipes/checks/debian/rules/debhelper-dh-compat/build-spec/debian/rules new file mode 100755 index 0000000..111f495 --- /dev/null +++ b/t/recipes/checks/debian/rules/debhelper-dh-compat/build-spec/debian/rules @@ -0,0 +1,8 @@ +#!/usr/bin/make -f + +export DH_COMPAT=10 + +%: + dh $@ + +DH_COMPAT=8 diff --git a/t/recipes/checks/debian/rules/debhelper-dh-compat/build-spec/fill-values b/t/recipes/checks/debian/rules/debhelper-dh-compat/build-spec/fill-values new file mode 100644 index 0000000..31ffc38 --- /dev/null +++ b/t/recipes/checks/debian/rules/debhelper-dh-compat/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: upload-native +Testname: debhelper-dh-compat +Description: Test the value of DH_COMPAT diff --git a/t/recipes/checks/debian/rules/debhelper-dh-compat/eval/desc b/t/recipes/checks/debian/rules/debhelper-dh-compat/eval/desc new file mode 100644 index 0000000..72261d3 --- /dev/null +++ b/t/recipes/checks/debian/rules/debhelper-dh-compat/eval/desc @@ -0,0 +1,4 @@ +Testname: debhelper-dh-compat +Profile: lintian-test +Options: --include-dir ./lintian-include-dir +Check: debian/rules diff --git a/t/recipes/checks/debian/rules/debhelper-dh-compat/eval/hints b/t/recipes/checks/debian/rules/debhelper-dh-compat/eval/hints new file mode 100644 index 0000000..cd1a705 --- /dev/null +++ b/t/recipes/checks/debian/rules/debhelper-dh-compat/eval/hints @@ -0,0 +1 @@ +debhelper-dh-compat (source): debian-rules-sets-DH_COMPAT [debian/rules:3] diff --git a/t/recipes/checks/debian/rules/debhelper-dh-compat/eval/lintian-include-dir/profiles/lintian-test/main.profile b/t/recipes/checks/debian/rules/debhelper-dh-compat/eval/lintian-include-dir/profiles/lintian-test/main.profile new file mode 100644 index 0000000..f0e27cf --- /dev/null +++ b/t/recipes/checks/debian/rules/debhelper-dh-compat/eval/lintian-include-dir/profiles/lintian-test/main.profile @@ -0,0 +1,2 @@ +Profile: lintian-test/main +Extends: debian/main diff --git a/t/recipes/checks/debian/rules/debhelper-dh-compat/eval/lintian-include-dir/vendors/lintian-test/main/data/debhelper/compat-level b/t/recipes/checks/debian/rules/debhelper-dh-compat/eval/lintian-include-dir/vendors/lintian-test/main/data/debhelper/compat-level new file mode 100644 index 0000000..d91eeb3 --- /dev/null +++ b/t/recipes/checks/debian/rules/debhelper-dh-compat/eval/lintian-include-dir/vendors/lintian-test/main/data/debhelper/compat-level @@ -0,0 +1,3 @@ +@include-parent +deprecated=1 +recommended=100 diff --git a/t/recipes/checks/debian/rules/debhelper-no-depends/build-spec/debian/compat.in b/t/recipes/checks/debian/rules/debhelper-no-depends/build-spec/debian/compat.in new file mode 100644 index 0000000..640a566 --- /dev/null +++ b/t/recipes/checks/debian/rules/debhelper-no-depends/build-spec/debian/compat.in @@ -0,0 +1 @@ +[% $dh_compat_level %] diff --git a/t/recipes/checks/debian/rules/debhelper-no-depends/build-spec/debian/control.in b/t/recipes/checks/debian/rules/debhelper-no-depends/build-spec/debian/control.in new file mode 100644 index 0000000..6a7a04d --- /dev/null +++ b/t/recipes/checks/debian/rules/debhelper-no-depends/build-spec/debian/control.in @@ -0,0 +1,33 @@ +Source: [% $source %] +Priority: optional +Section: [% $section %] +Maintainer: [% $author %] +Standards-Version: [% $standards_version %] +Rules-Requires-Root: no + +Package: [% $source %] +Architecture: [% $package_architecture %] +Description: [% $description %] + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. + +Package: debhelper-pre-depends +Architecture: [% $package_architecture %] +Pre-Depends: ${misc:Depends} +Description: [% $description %] extra string + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. Extra + string to not to trigger duplicated description tags. It may + be an empty package. + +Package: debhelper-suggests +Architecture: [% $package_architecture %] +Suggests: ${misc:Depends} +Description: [% $description %] another extra string + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. Extra + string. It may be an empty package. diff --git a/t/recipes/checks/debian/rules/debhelper-no-depends/build-spec/debian/rules b/t/recipes/checks/debian/rules/debhelper-no-depends/build-spec/debian/rules new file mode 100755 index 0000000..a622013 --- /dev/null +++ b/t/recipes/checks/debian/rules/debhelper-no-depends/build-spec/debian/rules @@ -0,0 +1,24 @@ +#!/usr/bin/make -f +%: + dh $@ + +binary: binary-arch binary-indep +binary-arch: +binary-indep: + -dh_clideps + -dh_gstscancodecs + dh_lisp || true + # Should trigger a versioned dependency requirement for dpatch + -dh_dpatch_patch +# We don't warn about commands inside make conditionals, so none of these +# get any warnings. +ifeq "$(USE_DH_PYTHON3)" "y" + dh_python3 +else + ifeq "$(USE_PYSUPPORT)" "y" + dh_pysupport + endif +endif + dh binary-indep + -dh_strip_nondeterminism + -dh_scour diff --git a/t/recipes/checks/debian/rules/debhelper-no-depends/build-spec/fill-values b/t/recipes/checks/debian/rules/debhelper-no-depends/build-spec/fill-values new file mode 100644 index 0000000..7857128 --- /dev/null +++ b/t/recipes/checks/debian/rules/debhelper-no-depends/build-spec/fill-values @@ -0,0 +1,5 @@ +Skeleton: upload-native +Testname: debhelper-no-depends +Dh-Compat-Level: 9 +Description: Test dependency requirements for debhelper +# Overrides the "data/debhelper/compat-level" diff --git a/t/recipes/checks/debian/rules/debhelper-no-depends/eval/desc b/t/recipes/checks/debian/rules/debhelper-no-depends/eval/desc new file mode 100644 index 0000000..5d1b514 --- /dev/null +++ b/t/recipes/checks/debian/rules/debhelper-no-depends/eval/desc @@ -0,0 +1,5 @@ +Testname: debhelper-no-depends +Profile: lintian-test +Options: --include-dir ./lintian-include-dir +Check: debian/rules +# Overrides the "data/debhelper/compat-level" diff --git a/t/recipes/checks/debian/rules/debhelper-no-depends/eval/hints b/t/recipes/checks/debian/rules/debhelper-no-depends/eval/hints new file mode 100644 index 0000000..f4bb314 --- /dev/null +++ b/t/recipes/checks/debian/rules/debhelper-no-depends/eval/hints @@ -0,0 +1 @@ +debhelper-no-depends (source): rules-require-build-prerequisite (does not satisfy debhelper:any | debhelper-compat:any) [debian/rules] diff --git a/t/recipes/checks/debian/rules/debhelper-no-depends/eval/lintian-include-dir/profiles/lintian-test/main.profile b/t/recipes/checks/debian/rules/debhelper-no-depends/eval/lintian-include-dir/profiles/lintian-test/main.profile new file mode 100644 index 0000000..f0e27cf --- /dev/null +++ b/t/recipes/checks/debian/rules/debhelper-no-depends/eval/lintian-include-dir/profiles/lintian-test/main.profile @@ -0,0 +1,2 @@ +Profile: lintian-test/main +Extends: debian/main diff --git a/t/recipes/checks/debian/rules/debhelper-no-depends/eval/lintian-include-dir/vendors/lintian-test/main/data/debhelper/compat-level b/t/recipes/checks/debian/rules/debhelper-no-depends/eval/lintian-include-dir/vendors/lintian-test/main/data/debhelper/compat-level new file mode 100644 index 0000000..67c590a --- /dev/null +++ b/t/recipes/checks/debian/rules/debhelper-no-depends/eval/lintian-include-dir/vendors/lintian-test/main/data/debhelper/compat-level @@ -0,0 +1,2 @@ +@include-parent +pedantic=8 diff --git a/t/recipes/checks/debian/rules/debian-rules-uses-as-needed-linker-flag/build-spec/debian/rules b/t/recipes/checks/debian/rules/debian-rules-uses-as-needed-linker-flag/build-spec/debian/rules new file mode 100755 index 0000000..38cb607 --- /dev/null +++ b/t/recipes/checks/debian/rules/debian-rules-uses-as-needed-linker-flag/build-spec/debian/rules @@ -0,0 +1,12 @@ +#!/usr/bin/make -f + +export DEB_BADFLAGS_MAINT_APPEND = -Wl,--as-needed + +export DEB_GOODFLAGS_MAINT_APPEND = -lprefix -Wl,--no-as-needed -lfoo, -Wl,-as-needed -lsuffix +export DEB_GOODFLAGS_MAINT_APPEND = -lprefix -Wl,--as-needed -Wl,--no-as-needed -lsuffix + +%: + dh $@ + +override_dh_autoreconf: + -dh_autoreconf --as-needed diff --git a/t/recipes/checks/debian/rules/debian-rules-uses-as-needed-linker-flag/build-spec/fill-values b/t/recipes/checks/debian/rules/debian-rules-uses-as-needed-linker-flag/build-spec/fill-values new file mode 100644 index 0000000..54f985e --- /dev/null +++ b/t/recipes/checks/debian/rules/debian-rules-uses-as-needed-linker-flag/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: upload-native +Testname: debian-rules-uses-as-needed-linker-flag +Description: Test for --as-needed in debian/rules. diff --git a/t/recipes/checks/debian/rules/debian-rules-uses-as-needed-linker-flag/eval/desc b/t/recipes/checks/debian/rules/debian-rules-uses-as-needed-linker-flag/eval/desc new file mode 100644 index 0000000..5afa7c8 --- /dev/null +++ b/t/recipes/checks/debian/rules/debian-rules-uses-as-needed-linker-flag/eval/desc @@ -0,0 +1,2 @@ +Testname: debian-rules-uses-as-needed-linker-flag +Check: debian/rules diff --git a/t/recipes/checks/debian/rules/debian-rules-uses-as-needed-linker-flag/eval/hints b/t/recipes/checks/debian/rules/debian-rules-uses-as-needed-linker-flag/eval/hints new file mode 100644 index 0000000..f7f3eac --- /dev/null +++ b/t/recipes/checks/debian/rules/debian-rules-uses-as-needed-linker-flag/eval/hints @@ -0,0 +1,2 @@ +debian-rules-uses-as-needed-linker-flag (source): debian-rules-uses-as-needed-linker-flag [debian/rules:3] +debian-rules-uses-as-needed-linker-flag (source): debian-rules-uses-as-needed-linker-flag [debian/rules:12] diff --git a/t/recipes/checks/debian/rules/debian-rules-uses-installed-python-versions/build-spec/debian/rules b/t/recipes/checks/debian/rules/debian-rules-uses-installed-python-versions/build-spec/debian/rules new file mode 100755 index 0000000..88fd899 --- /dev/null +++ b/t/recipes/checks/debian/rules/debian-rules-uses-installed-python-versions/build-spec/debian/rules @@ -0,0 +1,17 @@ +#!/usr/bin/make -f + +%: + dh $@ + +override_dh_auto_test: + # Good + echo $(shell py3versions -s) + echo $(shell py3versions -vs) + echo $(shell py3versions -sv) + echo $(shell py3versions -v) + + # Bad + echo $(shell py3versions -i) + echo $(shell py3versions -vi) + echo $(shell py3versions --installed) + echo $(shell py3versions --verbose --installed) diff --git a/t/recipes/checks/debian/rules/debian-rules-uses-installed-python-versions/build-spec/fill-values b/t/recipes/checks/debian/rules/debian-rules-uses-installed-python-versions/build-spec/fill-values new file mode 100644 index 0000000..cf63f8e --- /dev/null +++ b/t/recipes/checks/debian/rules/debian-rules-uses-installed-python-versions/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: upload-native +Testname: debian-rules-uses-installed-python-versions +Description: Tests for py3versions -i diff --git a/t/recipes/checks/debian/rules/debian-rules-uses-installed-python-versions/eval/desc b/t/recipes/checks/debian/rules/debian-rules-uses-installed-python-versions/eval/desc new file mode 100644 index 0000000..86dc9f4 --- /dev/null +++ b/t/recipes/checks/debian/rules/debian-rules-uses-installed-python-versions/eval/desc @@ -0,0 +1,2 @@ +Testname: debian-rules-uses-installed-python-versions +Check: debian/rules diff --git a/t/recipes/checks/debian/rules/debian-rules-uses-installed-python-versions/eval/hints b/t/recipes/checks/debian/rules/debian-rules-uses-installed-python-versions/eval/hints new file mode 100644 index 0000000..baeea5d --- /dev/null +++ b/t/recipes/checks/debian/rules/debian-rules-uses-installed-python-versions/eval/hints @@ -0,0 +1,7 @@ +debian-rules-uses-installed-python-versions (source): debian-rules-uses-supported-python-versions-without-python-all-build-depends py3versions -vs [debian/rules:9] +debian-rules-uses-installed-python-versions (source): debian-rules-uses-supported-python-versions-without-python-all-build-depends py3versions -sv [debian/rules:10] +debian-rules-uses-installed-python-versions (source): debian-rules-uses-supported-python-versions-without-python-all-build-depends py3versions -s [debian/rules:8] +debian-rules-uses-installed-python-versions (source): debian-rules-uses-installed-python-versions py3versions -vi [debian/rules:15] +debian-rules-uses-installed-python-versions (source): debian-rules-uses-installed-python-versions py3versions -i [debian/rules:14] +debian-rules-uses-installed-python-versions (source): debian-rules-uses-installed-python-versions py3versions --verbose --installed [debian/rules:17] +debian-rules-uses-installed-python-versions (source): debian-rules-uses-installed-python-versions py3versions --installed [debian/rules:16] diff --git a/t/recipes/checks/debian/rules/debian-rules-uses-supported-python-versions-without-python-all-build-depends/build-spec/debian/rules b/t/recipes/checks/debian/rules/debian-rules-uses-supported-python-versions-without-python-all-build-depends/build-spec/debian/rules new file mode 100755 index 0000000..d92a6d5 --- /dev/null +++ b/t/recipes/checks/debian/rules/debian-rules-uses-supported-python-versions-without-python-all-build-depends/build-spec/debian/rules @@ -0,0 +1,14 @@ +#!/usr/bin/make -f + +%: + dh $@ + +override_dh_auto_build: + # Good + echo $(shell py3versions -v) + + # Bad + echo $(shell py3versions -s) + echo $(shell py3versions -vs) + echo $(shell py3versions -sv) + echo $(shell py3versions --supported) diff --git a/t/recipes/checks/debian/rules/debian-rules-uses-supported-python-versions-without-python-all-build-depends/build-spec/fill-values b/t/recipes/checks/debian/rules/debian-rules-uses-supported-python-versions-without-python-all-build-depends/build-spec/fill-values new file mode 100644 index 0000000..ee784f1 --- /dev/null +++ b/t/recipes/checks/debian/rules/debian-rules-uses-supported-python-versions-without-python-all-build-depends/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: upload-native +Testname: debian-rules-uses-supported-python-versions-without-python-all-build-depends +Description: Tests for py3versions -s without python3-all build-depends diff --git a/t/recipes/checks/debian/rules/debian-rules-uses-supported-python-versions-without-python-all-build-depends/eval/desc b/t/recipes/checks/debian/rules/debian-rules-uses-supported-python-versions-without-python-all-build-depends/eval/desc new file mode 100644 index 0000000..2068b7e --- /dev/null +++ b/t/recipes/checks/debian/rules/debian-rules-uses-supported-python-versions-without-python-all-build-depends/eval/desc @@ -0,0 +1,2 @@ +Testname: debian-rules-uses-supported-python-versions-without-python-all-build-depends +Check: debian/rules diff --git a/t/recipes/checks/debian/rules/debian-rules-uses-supported-python-versions-without-python-all-build-depends/eval/hints b/t/recipes/checks/debian/rules/debian-rules-uses-supported-python-versions-without-python-all-build-depends/eval/hints new file mode 100644 index 0000000..06b59c5 --- /dev/null +++ b/t/recipes/checks/debian/rules/debian-rules-uses-supported-python-versions-without-python-all-build-depends/eval/hints @@ -0,0 +1,4 @@ +debian-rules-uses-supported-python-versions-without-python-all-build-depends (source): debian-rules-uses-supported-python-versions-without-python-all-build-depends py3versions -vs [debian/rules:12] +debian-rules-uses-supported-python-versions-without-python-all-build-depends (source): debian-rules-uses-supported-python-versions-without-python-all-build-depends py3versions -sv [debian/rules:13] +debian-rules-uses-supported-python-versions-without-python-all-build-depends (source): debian-rules-uses-supported-python-versions-without-python-all-build-depends py3versions -s [debian/rules:11] +debian-rules-uses-supported-python-versions-without-python-all-build-depends (source): debian-rules-uses-supported-python-versions-without-python-all-build-depends py3versions --supported [debian/rules:14] diff --git a/t/recipes/checks/debian/rules/dh-sequencer/curly-braces/build-spec/debian/rules b/t/recipes/checks/debian/rules/dh-sequencer/curly-braces/build-spec/debian/rules new file mode 100644 index 0000000..000210b --- /dev/null +++ b/t/recipes/checks/debian/rules/dh-sequencer/curly-braces/build-spec/debian/rules @@ -0,0 +1,4 @@ +#!/usr/bin/make -f + +%: + dh ${@} diff --git a/t/recipes/checks/debian/rules/dh-sequencer/curly-braces/build-spec/fill-values b/t/recipes/checks/debian/rules/dh-sequencer/curly-braces/build-spec/fill-values new file mode 100644 index 0000000..eb6c44c --- /dev/null +++ b/t/recipes/checks/debian/rules/dh-sequencer/curly-braces/build-spec/fill-values @@ -0,0 +1,3 @@ +Testname: curly-braces +Skeleton: source-native +Description: Uses dh sequencer with curly variable notation (false positive) diff --git a/t/recipes/checks/debian/rules/dh-sequencer/curly-braces/eval/desc b/t/recipes/checks/debian/rules/dh-sequencer/curly-braces/eval/desc new file mode 100644 index 0000000..c37f999 --- /dev/null +++ b/t/recipes/checks/debian/rules/dh-sequencer/curly-braces/eval/desc @@ -0,0 +1,5 @@ +Testname: curly-braces +Check: debian/rules/dh-sequencer +Test-Against: + no-dh-sequencer +See-Also: Debian Bug#947115 diff --git a/t/recipes/checks/debian/rules/dh-sequencer/curly-braces/eval/hints b/t/recipes/checks/debian/rules/dh-sequencer/curly-braces/eval/hints new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/t/recipes/checks/debian/rules/dh-sequencer/curly-braces/eval/hints @@ -0,0 +1 @@ + diff --git a/t/recipes/checks/debian/rules/dh-sequencer/dependency/build-spec/debian/rules b/t/recipes/checks/debian/rules/dh-sequencer/dependency/build-spec/debian/rules new file mode 100644 index 0000000..76cf643 --- /dev/null +++ b/t/recipes/checks/debian/rules/dh-sequencer/dependency/build-spec/debian/rules @@ -0,0 +1,10 @@ +#!/usr/bin/make -f + +export USER=fake +export HOME=$(CURDIR)/debian/fake-home + +$(CURDIR)/debian/fake-home: + mkdir $(CURDIR)/debian/fake-home + +%: $(CURDIR)/debian/fake-home + dh $@ diff --git a/t/recipes/checks/debian/rules/dh-sequencer/dependency/build-spec/fill-values b/t/recipes/checks/debian/rules/dh-sequencer/dependency/build-spec/fill-values new file mode 100644 index 0000000..3fc8de8 --- /dev/null +++ b/t/recipes/checks/debian/rules/dh-sequencer/dependency/build-spec/fill-values @@ -0,0 +1,3 @@ +Testname: double-quotes +Skeleton: source-native +Description: Uses dh sequencer with explicit dependency (false positive) diff --git a/t/recipes/checks/debian/rules/dh-sequencer/dependency/eval/desc b/t/recipes/checks/debian/rules/dh-sequencer/dependency/eval/desc new file mode 100644 index 0000000..1c1cef1 --- /dev/null +++ b/t/recipes/checks/debian/rules/dh-sequencer/dependency/eval/desc @@ -0,0 +1,5 @@ +Testname: dependency +Check: debian/rules/dh-sequencer +Test-Against: + no-dh-sequencer +See-Also: #968108 diff --git a/t/recipes/checks/debian/rules/dh-sequencer/dependency/eval/hints b/t/recipes/checks/debian/rules/dh-sequencer/dependency/eval/hints new file mode 100644 index 0000000..e69de29 diff --git a/t/recipes/checks/debian/rules/dh-sequencer/double-quotes/build-spec/debian/rules b/t/recipes/checks/debian/rules/dh-sequencer/double-quotes/build-spec/debian/rules new file mode 100644 index 0000000..5875e30 --- /dev/null +++ b/t/recipes/checks/debian/rules/dh-sequencer/double-quotes/build-spec/debian/rules @@ -0,0 +1,4 @@ +#!/usr/bin/make -f + +%: + dh "$@" diff --git a/t/recipes/checks/debian/rules/dh-sequencer/double-quotes/build-spec/fill-values b/t/recipes/checks/debian/rules/dh-sequencer/double-quotes/build-spec/fill-values new file mode 100644 index 0000000..443e7fc --- /dev/null +++ b/t/recipes/checks/debian/rules/dh-sequencer/double-quotes/build-spec/fill-values @@ -0,0 +1,3 @@ +Testname: double-quotes +Skeleton: source-native +Description: Uses dh sequencer with double quotes around variable (false positive) diff --git a/t/recipes/checks/debian/rules/dh-sequencer/double-quotes/eval/desc b/t/recipes/checks/debian/rules/dh-sequencer/double-quotes/eval/desc new file mode 100644 index 0000000..10cff19 --- /dev/null +++ b/t/recipes/checks/debian/rules/dh-sequencer/double-quotes/eval/desc @@ -0,0 +1,5 @@ +Testname: double-quotes +Check: debian/rules/dh-sequencer +Test-Against: + no-dh-sequencer +See-Also: https://salsa.debian.org/lintian/lintian/merge_requests/288 diff --git a/t/recipes/checks/debian/rules/dh-sequencer/double-quotes/eval/hints b/t/recipes/checks/debian/rules/dh-sequencer/double-quotes/eval/hints new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/t/recipes/checks/debian/rules/dh-sequencer/double-quotes/eval/hints @@ -0,0 +1 @@ + diff --git a/t/recipes/checks/debian/rules/dh-sequencer/environment-prefix/build-spec/debian/rules b/t/recipes/checks/debian/rules/dh-sequencer/environment-prefix/build-spec/debian/rules new file mode 100644 index 0000000..6ad65cc --- /dev/null +++ b/t/recipes/checks/debian/rules/dh-sequencer/environment-prefix/build-spec/debian/rules @@ -0,0 +1,4 @@ +#!/usr/bin/make -f + +%: + PREFIX=/usr dh $@ diff --git a/t/recipes/checks/debian/rules/dh-sequencer/environment-prefix/build-spec/fill-values b/t/recipes/checks/debian/rules/dh-sequencer/environment-prefix/build-spec/fill-values new file mode 100644 index 0000000..cc67457 --- /dev/null +++ b/t/recipes/checks/debian/rules/dh-sequencer/environment-prefix/build-spec/fill-values @@ -0,0 +1,3 @@ +Testname: environment-prefix +Skeleton: source-native +Description: Uses dh sequencer with a prefix setting an environment variable (false positive) diff --git a/t/recipes/checks/debian/rules/dh-sequencer/environment-prefix/eval/desc b/t/recipes/checks/debian/rules/dh-sequencer/environment-prefix/eval/desc new file mode 100644 index 0000000..13dab36 --- /dev/null +++ b/t/recipes/checks/debian/rules/dh-sequencer/environment-prefix/eval/desc @@ -0,0 +1,6 @@ +Testname: environment-prefix +Check: debian/rules/dh-sequencer +Test-Against: + no-dh-sequencer +See-Also: + Bug#981712 diff --git a/t/recipes/checks/debian/rules/dh-sequencer/environment-prefix/eval/hints b/t/recipes/checks/debian/rules/dh-sequencer/environment-prefix/eval/hints new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/t/recipes/checks/debian/rules/dh-sequencer/environment-prefix/eval/hints @@ -0,0 +1 @@ + diff --git a/t/recipes/checks/debian/rules/dh-sequencer/explicit-targets/build-spec/debian/rules b/t/recipes/checks/debian/rules/dh-sequencer/explicit-targets/build-spec/debian/rules new file mode 100644 index 0000000..f7b25c5 --- /dev/null +++ b/t/recipes/checks/debian/rules/dh-sequencer/explicit-targets/build-spec/debian/rules @@ -0,0 +1,11 @@ +#!/usr/bin/make -f + +.PHONY: binary binary-arch binary-indep build build-arch build-indep clean install +binary-arch build build-arch build-indep clean install: + dh $@ + +binary binary-indep: + dh $@ + +build-stamp: + dh $@ diff --git a/t/recipes/checks/debian/rules/dh-sequencer/explicit-targets/build-spec/fill-values b/t/recipes/checks/debian/rules/dh-sequencer/explicit-targets/build-spec/fill-values new file mode 100644 index 0000000..50af747 --- /dev/null +++ b/t/recipes/checks/debian/rules/dh-sequencer/explicit-targets/build-spec/fill-values @@ -0,0 +1,3 @@ +Testname: explicit-targets +Skeleton: source-native +Description: Uses dh sequencer but not the % target wildcard diff --git a/t/recipes/checks/debian/rules/dh-sequencer/explicit-targets/eval/desc b/t/recipes/checks/debian/rules/dh-sequencer/explicit-targets/eval/desc new file mode 100644 index 0000000..7e1ff3d --- /dev/null +++ b/t/recipes/checks/debian/rules/dh-sequencer/explicit-targets/eval/desc @@ -0,0 +1,5 @@ +Testname: explicit-targets +Check: debian/rules/dh-sequencer +Test-Against: + no-dh-sequencer +See-Also: Debian Bug#930679 diff --git a/t/recipes/checks/debian/rules/dh-sequencer/explicit-targets/eval/hints b/t/recipes/checks/debian/rules/dh-sequencer/explicit-targets/eval/hints new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/t/recipes/checks/debian/rules/dh-sequencer/explicit-targets/eval/hints @@ -0,0 +1 @@ + diff --git a/t/recipes/checks/debian/rules/dh-sequencer/no-dh-sequencer/build-spec/debian/compat.in b/t/recipes/checks/debian/rules/dh-sequencer/no-dh-sequencer/build-spec/debian/compat.in new file mode 100644 index 0000000..640a566 --- /dev/null +++ b/t/recipes/checks/debian/rules/dh-sequencer/no-dh-sequencer/build-spec/debian/compat.in @@ -0,0 +1 @@ +[% $dh_compat_level %] diff --git a/t/recipes/checks/debian/rules/dh-sequencer/no-dh-sequencer/build-spec/debian/rules b/t/recipes/checks/debian/rules/dh-sequencer/no-dh-sequencer/build-spec/debian/rules new file mode 100755 index 0000000..c3ff202 --- /dev/null +++ b/t/recipes/checks/debian/rules/dh-sequencer/no-dh-sequencer/build-spec/debian/rules @@ -0,0 +1,76 @@ +#!/usr/bin/make -f +# -*- makefile -*- +# Sample debian/rules that uses debhelper. +# This file was originally written by Joey Hess and Craig Small. +# As a special exception, when this file is copied by dh-make into a +# dh-make output file, you may use that output file without restriction. +# This special exception was added by Craig Small in version 0.37 of dh-make. + +# Uncomment this to turn on verbose mode. +#export DH_VERBOSE=1 + +configure: configure-stamp +configure-stamp: + dh_testdir + # Add here commands to configure the package. + + touch configure-stamp + + +build: build-stamp + +build-stamp: configure-stamp + dh_testdir + + touch $@ + +clean: + dh_testdir + dh_testroot + rm -f build-stamp configure-stamp + + dh_clean + +install: build + dh_testdir + dh_testroot + dh_prep + dh_installdirs + +# Build architecture-independent files here. +binary-indep: build install +# We have nothing to do by default. + +# Build architecture-dependent files here. +binary-arch: build install + dh_testdir + dh_testroot + dh_installchangelogs + dh_installdocs + dh_installexamples +# dh_install +# dh_installmenu +# dh_installdebconf +# dh_installlogrotate +# dh_installemacsen +# dh_installpam +# dh_installmime +# dh_python +# dh_installinit +# dh_installcron +# dh_installinfo + dh_installman + dh_link + dh_strip + dh_compress + dh_fixperms +# dh_perl +# dh_makeshlibs + dh_installdeb + dh_shlibdeps + dh_gencontrol + dh_md5sums + dh_builddeb + +binary: binary-indep binary-arch +.PHONY: build clean binary-indep binary-arch binary install configure diff --git a/t/recipes/checks/debian/rules/dh-sequencer/no-dh-sequencer/build-spec/fill-values b/t/recipes/checks/debian/rules/dh-sequencer/no-dh-sequencer/build-spec/fill-values new file mode 100644 index 0000000..90a87b4 --- /dev/null +++ b/t/recipes/checks/debian/rules/dh-sequencer/no-dh-sequencer/build-spec/fill-values @@ -0,0 +1,6 @@ +Testname: no-dh-sequencer +Skeleton: upload-native +Package-Architecture: any +Dh-Compat-Level: 7 +Description: Uses standard debhelper targets but not the dh sequencer +Default-Build-Depends: debhelper (>= [% $dh_compat_level %]~) diff --git a/t/recipes/checks/debian/rules/dh-sequencer/no-dh-sequencer/build-spec/pre-build.in b/t/recipes/checks/debian/rules/dh-sequencer/no-dh-sequencer/build-spec/pre-build.in new file mode 100755 index 0000000..bbdb5cb --- /dev/null +++ b/t/recipes/checks/debian/rules/dh-sequencer/no-dh-sequencer/build-spec/pre-build.in @@ -0,0 +1,5 @@ +#!/bin/sh + +# not using any templates, but dh_clean requires compat + +echo "[% $dh_compat_level %]" > "$1/debian/compat" diff --git a/t/recipes/checks/debian/rules/dh-sequencer/no-dh-sequencer/eval/desc b/t/recipes/checks/debian/rules/dh-sequencer/no-dh-sequencer/eval/desc new file mode 100644 index 0000000..29c542e --- /dev/null +++ b/t/recipes/checks/debian/rules/dh-sequencer/no-dh-sequencer/eval/desc @@ -0,0 +1,3 @@ +Testname: no-dh-sequencer +Check: debian/rules/dh-sequencer +See-Also: Debian Bug#930679 diff --git a/t/recipes/checks/debian/rules/dh-sequencer/no-dh-sequencer/eval/hints b/t/recipes/checks/debian/rules/dh-sequencer/no-dh-sequencer/eval/hints new file mode 100644 index 0000000..a2ff5e0 --- /dev/null +++ b/t/recipes/checks/debian/rules/dh-sequencer/no-dh-sequencer/eval/hints @@ -0,0 +1 @@ +no-dh-sequencer (source): no-dh-sequencer [debian/rules] diff --git a/t/recipes/checks/debian/rules/dh-sequencer/parentheses/build-spec/debian/rules b/t/recipes/checks/debian/rules/dh-sequencer/parentheses/build-spec/debian/rules new file mode 100644 index 0000000..0ceea36 --- /dev/null +++ b/t/recipes/checks/debian/rules/dh-sequencer/parentheses/build-spec/debian/rules @@ -0,0 +1,4 @@ +#!/usr/bin/make -f + +%: + dh $(@) diff --git a/t/recipes/checks/debian/rules/dh-sequencer/parentheses/build-spec/fill-values b/t/recipes/checks/debian/rules/dh-sequencer/parentheses/build-spec/fill-values new file mode 100644 index 0000000..07d9a39 --- /dev/null +++ b/t/recipes/checks/debian/rules/dh-sequencer/parentheses/build-spec/fill-values @@ -0,0 +1,3 @@ +Testname: parentheses +Skeleton: source-native +Description: Uses dh sequencer with parentheses around variable name (false positive) diff --git a/t/recipes/checks/debian/rules/dh-sequencer/parentheses/eval/desc b/t/recipes/checks/debian/rules/dh-sequencer/parentheses/eval/desc new file mode 100644 index 0000000..95b6225 --- /dev/null +++ b/t/recipes/checks/debian/rules/dh-sequencer/parentheses/eval/desc @@ -0,0 +1,5 @@ +Testname: parentheses +Check: debian/rules/dh-sequencer +Test-Against: + no-dh-sequencer +See-Also: Debian Bug#947115 diff --git a/t/recipes/checks/debian/rules/dh-sequencer/parentheses/eval/hints b/t/recipes/checks/debian/rules/dh-sequencer/parentheses/eval/hints new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/t/recipes/checks/debian/rules/dh-sequencer/parentheses/eval/hints @@ -0,0 +1 @@ + diff --git a/t/recipes/checks/debian/rules/dh-sequencer/single-quotes/build-spec/debian/rules b/t/recipes/checks/debian/rules/dh-sequencer/single-quotes/build-spec/debian/rules new file mode 100644 index 0000000..2822991 --- /dev/null +++ b/t/recipes/checks/debian/rules/dh-sequencer/single-quotes/build-spec/debian/rules @@ -0,0 +1,4 @@ +#!/usr/bin/make -f + +%: + dh '$@' diff --git a/t/recipes/checks/debian/rules/dh-sequencer/single-quotes/build-spec/fill-values b/t/recipes/checks/debian/rules/dh-sequencer/single-quotes/build-spec/fill-values new file mode 100644 index 0000000..4add931 --- /dev/null +++ b/t/recipes/checks/debian/rules/dh-sequencer/single-quotes/build-spec/fill-values @@ -0,0 +1,3 @@ +Testname: single-quotes +Skeleton: source-native +Description: Uses dh sequencer with single quotes around variable (false positive) diff --git a/t/recipes/checks/debian/rules/dh-sequencer/single-quotes/eval/desc b/t/recipes/checks/debian/rules/dh-sequencer/single-quotes/eval/desc new file mode 100644 index 0000000..895f051 --- /dev/null +++ b/t/recipes/checks/debian/rules/dh-sequencer/single-quotes/eval/desc @@ -0,0 +1,5 @@ +Testname: single-quotes +Check: debian/rules/dh-sequencer +Test-Against: + no-dh-sequencer +See-Also: https://salsa.debian.org/lintian/lintian/merge_requests/288 diff --git a/t/recipes/checks/debian/rules/dh-sequencer/single-quotes/eval/hints b/t/recipes/checks/debian/rules/dh-sequencer/single-quotes/eval/hints new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/t/recipes/checks/debian/rules/dh-sequencer/single-quotes/eval/hints @@ -0,0 +1 @@ + diff --git a/t/recipes/checks/debian/rules/dh-sequencer/with-comments/build-spec/debian/rules b/t/recipes/checks/debian/rules/dh-sequencer/with-comments/build-spec/debian/rules new file mode 100644 index 0000000..f547287 --- /dev/null +++ b/t/recipes/checks/debian/rules/dh-sequencer/with-comments/build-spec/debian/rules @@ -0,0 +1,6 @@ +#!/usr/bin/make -f + +%: + # this comment should not trigger a false positive + # neither should this one + dh $(@) diff --git a/t/recipes/checks/debian/rules/dh-sequencer/with-comments/build-spec/fill-values b/t/recipes/checks/debian/rules/dh-sequencer/with-comments/build-spec/fill-values new file mode 100644 index 0000000..933afac --- /dev/null +++ b/t/recipes/checks/debian/rules/dh-sequencer/with-comments/build-spec/fill-values @@ -0,0 +1,3 @@ +Testname: with-comments +Skeleton: source-native +Description: Uses dh sequencer but with comments inside the Makefile recipe (false positive) diff --git a/t/recipes/checks/debian/rules/dh-sequencer/with-comments/eval/desc b/t/recipes/checks/debian/rules/dh-sequencer/with-comments/eval/desc new file mode 100644 index 0000000..6a234e4 --- /dev/null +++ b/t/recipes/checks/debian/rules/dh-sequencer/with-comments/eval/desc @@ -0,0 +1,5 @@ +Testname: with-comments +Check: debian/rules/dh-sequencer +Test-Against: + no-dh-sequencer +See-Also: Debian Bug#960485 diff --git a/t/recipes/checks/debian/rules/dh-sequencer/with-comments/eval/hints b/t/recipes/checks/debian/rules/dh-sequencer/with-comments/eval/hints new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/t/recipes/checks/debian/rules/dh-sequencer/with-comments/eval/hints @@ -0,0 +1 @@ + diff --git a/t/recipes/checks/debian/rules/generic-dh-make-2005/build-spec/debian/README.Debian b/t/recipes/checks/debian/rules/generic-dh-make-2005/build-spec/debian/README.Debian new file mode 100644 index 0000000..5ce4495 --- /dev/null +++ b/t/recipes/checks/debian/rules/generic-dh-make-2005/build-spec/debian/README.Debian @@ -0,0 +1,6 @@ +dh-test for Debian +------------------ + + + + -- Frank Lichtenheld , Thu, 4 Aug 2005 23:09:00 +0200 diff --git a/t/recipes/checks/debian/rules/generic-dh-make-2005/build-spec/debian/changelog.in b/t/recipes/checks/debian/rules/generic-dh-make-2005/build-spec/debian/changelog.in new file mode 100644 index 0000000..580f946 --- /dev/null +++ b/t/recipes/checks/debian/rules/generic-dh-make-2005/build-spec/debian/changelog.in @@ -0,0 +1,6 @@ +generic-dh-make-2005 ([% $version %]) [% $distribution %]; urgency=low + + * Initial release Closes: #nnnn (nnnn is the bug number of your ITP) + + -- Frank Lichtenheld Thu, 4 Aug 2005 23:09:00 +0200 + diff --git a/t/recipes/checks/debian/rules/generic-dh-make-2005/build-spec/debian/compat.in b/t/recipes/checks/debian/rules/generic-dh-make-2005/build-spec/debian/compat.in new file mode 100644 index 0000000..640a566 --- /dev/null +++ b/t/recipes/checks/debian/rules/generic-dh-make-2005/build-spec/debian/compat.in @@ -0,0 +1 @@ +[% $dh_compat_level %] diff --git a/t/recipes/checks/debian/rules/generic-dh-make-2005/build-spec/debian/control.in b/t/recipes/checks/debian/rules/generic-dh-make-2005/build-spec/debian/control.in new file mode 100644 index 0000000..4cbbc4e --- /dev/null +++ b/t/recipes/checks/debian/rules/generic-dh-make-2005/build-spec/debian/control.in @@ -0,0 +1,12 @@ +Source: generic-dh-make-2005 +Section: unknown +Priority: optional +Maintainer: Frank Lichtenheld +Build-Depends: debhelper (>= 4.0.0) +Standards-Version: 3.6.2 + +Package: generic-dh-make-2005 +Architecture: [% $package_architecture %] +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: + diff --git a/t/recipes/checks/debian/rules/generic-dh-make-2005/build-spec/debian/copyright b/t/recipes/checks/debian/rules/generic-dh-make-2005/build-spec/debian/copyright new file mode 100644 index 0000000..2bcce49 --- /dev/null +++ b/t/recipes/checks/debian/rules/generic-dh-make-2005/build-spec/debian/copyright @@ -0,0 +1,10 @@ +This package was debianized by Frank Lichtenheld on +Thu, 4 Aug 2005 23:09:00 +0200. + +It was downloaded from + +Copyright Holder: + +License: + + diff --git a/t/recipes/checks/debian/rules/generic-dh-make-2005/build-spec/debian/rules b/t/recipes/checks/debian/rules/generic-dh-make-2005/build-spec/debian/rules new file mode 100755 index 0000000..ee4bffb --- /dev/null +++ b/t/recipes/checks/debian/rules/generic-dh-make-2005/build-spec/debian/rules @@ -0,0 +1,100 @@ +#!/usr/bin/make -f +# -*- makefile -*- +# Sample debian/rules that uses debhelper. +# This file was originally written by Joey Hess and Craig Small. +# As a special exception, when this file is copied by dh-make into a +# dh-make output file, you may use that output file without restriction. +# This special exception was added by Craig Small in version 0.37 of dh-make. + +# Uncomment this to turn on verbose mode. +#export DH_VERBOSE=1 + + + +CFLAGS = -Wall -g + +ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) + CFLAGS += -O0 +else + CFLAGS += -O2 +endif + +configure: configure-stamp +configure-stamp: + dh_testdir + # Add here commands to configure the package. + + touch configure-stamp + + +build: build-stamp + +build-stamp: configure-stamp + dh_testdir + + # Add here commands to compile the package. +# $(MAKE) + #docbook-to-man debian/dh-test.sgml > dh-test.1 + + touch build-stamp + +clean: + dh_testdir + dh_testroot + rm -f build-stamp configure-stamp + + # Add here commands to clean up after the build process. + -$(MAKE) clean + + dh_clean + +install: build + dh_testdir + dh_testroot + dh_clean -k + dh_installdirs + + # Add here commands to install the package into debian/dh-test. +# $(MAKE) install DESTDIR=$(CURDIR)/debian/dh-test + + +# Build architecture-independent files here. +binary-indep: build install +# We have nothing to do by default. + +# Build architecture-dependent files here. +binary-arch: build install +# dh_testversion + dh_testdir + dh_testroot + dh_installchangelogs + dh_installdocs + dh_installexamples +# dh_install +# dh_installmenu +# dh_installdebconf +# dh_installlogrotate +# dh_installemacsen +# dh_installpam +# dh_installmime +# dh_installinit +# dh_installcron +# dh_installinfo + dh_installman +# dh_dhelp + #dh_suidregister # originally there, but no longer supported + dh_link + dh_strip + dh_compress + dh_fixperms +# dh_perl +# dh_python +# dh_makeshlibs + dh_installdeb + dh_shlibdeps + dh_gencontrol + dh_md5sums + dh_builddeb + +binary: binary-indep binary-arch +.PHONY: build clean binary-indep binary-arch binary install configure diff --git a/t/recipes/checks/debian/rules/generic-dh-make-2005/build-spec/fill-values b/t/recipes/checks/debian/rules/generic-dh-make-2005/build-spec/fill-values new file mode 100644 index 0000000..01371b6 --- /dev/null +++ b/t/recipes/checks/debian/rules/generic-dh-make-2005/build-spec/fill-values @@ -0,0 +1,8 @@ +Testname: generic-dh-make-2005 +Skeleton: upload-builder-only +Author: Frank Lichtenheld +Version: 1-1 +Package-Architecture: any +Dh-Compat-Level: 7 +Description: Generic dh_make template generated in 2005 +Default-Build-Depends: debhelper (>= [% $dh_compat_level %]~) diff --git a/t/recipes/checks/debian/rules/generic-dh-make-2005/build-spec/orig/README b/t/recipes/checks/debian/rules/generic-dh-make-2005/build-spec/orig/README new file mode 100644 index 0000000..e6a5a27 --- /dev/null +++ b/t/recipes/checks/debian/rules/generic-dh-make-2005/build-spec/orig/README @@ -0,0 +1,9 @@ +This is something close to the results of running dh_make on a basically +empty upstream tarball in 2005, but with the example files removed. It's +a useful test for the various dh_make template and boilerplate tags, as +well as many tags for ways of doing things dh_make used to promote but are +now deprecated or old debhelper commands that are now deprecated. + +Please don't modify anything about the files in this package; instead, add +new tags as needed when Lintian adds new checks. This test case is +intended to continue to be a test of Lintian's handling of old packages. diff --git a/t/recipes/checks/debian/rules/generic-dh-make-2005/build-spec/pre-build.in b/t/recipes/checks/debian/rules/generic-dh-make-2005/build-spec/pre-build.in new file mode 100755 index 0000000..bbdb5cb --- /dev/null +++ b/t/recipes/checks/debian/rules/generic-dh-make-2005/build-spec/pre-build.in @@ -0,0 +1,5 @@ +#!/bin/sh + +# not using any templates, but dh_clean requires compat + +echo "[% $dh_compat_level %]" > "$1/debian/compat" diff --git a/t/recipes/checks/debian/rules/generic-dh-make-2005/eval/desc b/t/recipes/checks/debian/rules/generic-dh-make-2005/eval/desc new file mode 100644 index 0000000..0608338 --- /dev/null +++ b/t/recipes/checks/debian/rules/generic-dh-make-2005/eval/desc @@ -0,0 +1,2 @@ +Testname: generic-dh-make-2005 +Check: debian/rules diff --git a/t/recipes/checks/debian/rules/generic-dh-make-2005/eval/hints b/t/recipes/checks/debian/rules/generic-dh-make-2005/eval/hints new file mode 100644 index 0000000..ccb5124 --- /dev/null +++ b/t/recipes/checks/debian/rules/generic-dh-make-2005/eval/hints @@ -0,0 +1,4 @@ +generic-dh-make-2005 (source): debian-rules-should-not-set-CFLAGS-from-noopt [debian/rules] +generic-dh-make-2005 (source): debian-rules-missing-required-target build-indep [debian/rules] +generic-dh-make-2005 (source): debian-rules-missing-required-target build-arch [debian/rules] +generic-dh-make-2005 (source): debian-rules-ignores-make-clean-error [debian/rules:47] diff --git a/t/recipes/checks/debian/rules/generic-dh-make-2005/eval/post-test b/t/recipes/checks/debian/rules/generic-dh-make-2005/eval/post-test new file mode 100644 index 0000000..faeef0b --- /dev/null +++ b/t/recipes/checks/debian/rules/generic-dh-make-2005/eval/post-test @@ -0,0 +1 @@ +s/\(current is ([0-9]+\.)+[0-9]\)/(current is CURRENT)/ diff --git a/t/recipes/checks/debian/rules/generic-empty/build-spec/debian/changelog.in b/t/recipes/checks/debian/rules/generic-empty/build-spec/debian/changelog.in new file mode 100644 index 0000000..7a4298d --- /dev/null +++ b/t/recipes/checks/debian/rules/generic-empty/build-spec/debian/changelog.in @@ -0,0 +1,2 @@ +[% $source %] ([% $version %]) unstable; + -- a <> Tue, 30 Dec 2008 17:34:02 -0800 diff --git a/t/recipes/checks/debian/rules/generic-empty/build-spec/debian/control.in b/t/recipes/checks/debian/rules/generic-empty/build-spec/debian/control.in new file mode 100644 index 0000000..575773e --- /dev/null +++ b/t/recipes/checks/debian/rules/generic-empty/build-spec/debian/control.in @@ -0,0 +1,5 @@ +Source: [% $source %] +Maintainer: a + +Package: [% $source %] +Architecture: [% $package_architecture %] diff --git a/t/recipes/checks/debian/rules/generic-empty/build-spec/debian/rules b/t/recipes/checks/debian/rules/generic-empty/build-spec/debian/rules new file mode 100755 index 0000000..62da96d --- /dev/null +++ b/t/recipes/checks/debian/rules/generic-empty/build-spec/debian/rules @@ -0,0 +1,9 @@ +#!/usr/bin/make -f +build: +binary: + install -d debian/generic-empty debian/generic-empty/DEBIAN + dpkg-gencontrol -pgeneric-empty -Pdebian/generic-empty + dpkg --build debian/generic-empty .. + +clean: + rm -rf debian/generic-empty diff --git a/t/recipes/checks/debian/rules/generic-empty/build-spec/fill-values b/t/recipes/checks/debian/rules/generic-empty/build-spec/fill-values new file mode 100644 index 0000000..26d9bdc --- /dev/null +++ b/t/recipes/checks/debian/rules/generic-empty/build-spec/fill-values @@ -0,0 +1,4 @@ +Skeleton: upload-native +Testname: generic-empty +Package-Architecture: all +Description: Pathological empty package diff --git a/t/recipes/checks/debian/rules/generic-empty/build-spec/orig/README b/t/recipes/checks/debian/rules/generic-empty/build-spec/orig/README new file mode 100644 index 0000000..ed1b149 --- /dev/null +++ b/t/recipes/checks/debian/rules/generic-empty/build-spec/orig/README @@ -0,0 +1,4 @@ +This is the smallest possible Debian package that I can get +dpkg-buildpackage to build (with the exception of this documentation). +It tests Lintian handling of packages that are missing everything one +would normally expect to have. diff --git a/t/recipes/checks/debian/rules/generic-empty/build-spec/pre-build b/t/recipes/checks/debian/rules/generic-empty/build-spec/pre-build new file mode 100755 index 0000000..1a3929a --- /dev/null +++ b/t/recipes/checks/debian/rules/generic-empty/build-spec/pre-build @@ -0,0 +1,6 @@ +#!/bin/sh +# +# Remove as many files from the package as possible. + +rm -f "$1/debian/compat" +rm -f "$1/debian/copyright" diff --git a/t/recipes/checks/debian/rules/generic-empty/eval/desc b/t/recipes/checks/debian/rules/generic-empty/eval/desc new file mode 100644 index 0000000..24610e0 --- /dev/null +++ b/t/recipes/checks/debian/rules/generic-empty/eval/desc @@ -0,0 +1,2 @@ +Testname: generic-empty +Check: debian/rules diff --git a/t/recipes/checks/debian/rules/generic-empty/eval/hints b/t/recipes/checks/debian/rules/generic-empty/eval/hints new file mode 100644 index 0000000..c6a9a40 --- /dev/null +++ b/t/recipes/checks/debian/rules/generic-empty/eval/hints @@ -0,0 +1,4 @@ +generic-empty (source): debian-rules-missing-required-target build-indep [debian/rules] +generic-empty (source): debian-rules-missing-required-target build-arch [debian/rules] +generic-empty (source): debian-rules-missing-required-target binary-indep [debian/rules] +generic-empty (source): debian-rules-missing-required-target binary-arch [debian/rules] diff --git a/t/recipes/checks/debian/rules/legacy-binary/build-spec/debian/NEWS.Debian b/t/recipes/checks/debian/rules/legacy-binary/build-spec/debian/NEWS.Debian new file mode 100644 index 0000000..29f561c --- /dev/null +++ b/t/recipes/checks/debian/rules/legacy-binary/build-spec/debian/NEWS.Debian @@ -0,0 +1,12 @@ +binary (4-1.1) UNRELEASED; urgency=high + + This is a Debian NEWS entry that isn't encoded properly in UTF-8: . + It also has a usefull speling error. + + -- Russ Allbery Sun, 14 Oct 2007 17:11:36 -0700 + +binary (1) unstable; urgency=low + + This is another entry but this one isn't syntactically valid. + + -- Russ Allbery 2007-10-14 diff --git a/t/recipes/checks/debian/rules/legacy-binary/build-spec/debian/README.Debian b/t/recipes/checks/debian/rules/legacy-binary/build-spec/debian/README.Debian new file mode 100644 index 0000000..94bcc0a --- /dev/null +++ b/t/recipes/checks/debian/rules/legacy-binary/build-spec/debian/README.Debian @@ -0,0 +1,5 @@ +this is a binary package to test lintian's handling of bins. +Check handling of D-Bus and dbus (neither of which should produce +warnings). + + -- Russ Allbery , Wed, 6 Feb 2008 18:35:11 -0800 diff --git a/t/recipes/checks/debian/rules/legacy-binary/build-spec/debian/changelog.in b/t/recipes/checks/debian/rules/legacy-binary/build-spec/debian/changelog.in new file mode 100644 index 0000000..39301d6 --- /dev/null +++ b/t/recipes/checks/debian/rules/legacy-binary/build-spec/debian/changelog.in @@ -0,0 +1,47 @@ +binary ([% $version %]) [% $distribution %]; urgency=low + + * I'm doing an comaintainer-upload, acknowledging a NMU, but with a version + number which suggests I'm doing a NMU myself. + + Lintian-maintainers: Please don't update this changelog, otherwise you'll + probably break the checks/nmu checks. + + -- Jeroen van Wolffelaar Sun, 18 Apr 2004 01:49:42 +0200 + +binary (4-1) unstable; urgency=low + + * Weird version number for the new check for accidents with native + packaging. + * Date was fixed by BR and this test was put on changelog-file-strange-date + due to dpkg bug, see #794674. + + -- Marc 'HE' Brockschmidt Thu, 15 Apr 2004 23:33:51 +0200 + +binary (4) unstable; urgency=low + + * Add big file to /usr/share to trigger the big-usr-share check + + -- Jeroen van Wolffelaar Fri, 27 Feb 2004 10:15:59 +0100 + +binary (3) unstable; urgency=unlimited + + * Add some bogus menu entries using su-to-root in a bogus way + + -- Jeroen van Wolffelaar Thu, 12 Feb 2004 20:11:22 +0100 + +binary (2) unstable; urgency=low + + * Added an INSTALL document which policy 6.3 suggests not to do + + -- Sean 'Shaleh' Perry Tue, 30 Jan 2001 15:23:59 -0800 + +binary (1) unstable; urgency=low + + * hello.c added + * hello-static is same as hello, but compiled statically + * added a menu entry which lacks a Section + * added a postinst + * postinst calls suidregister which is no longer policy compliant + + -- Sean 'Shaleh' Perry Wed, 10 Jan 2001 08:55:34 -0800 + diff --git a/t/recipes/checks/debian/rules/legacy-binary/build-spec/debian/conffiles b/t/recipes/checks/debian/rules/legacy-binary/build-spec/debian/conffiles new file mode 100644 index 0000000..d1a0843 --- /dev/null +++ b/t/recipes/checks/debian/rules/legacy-binary/build-spec/debian/conffiles @@ -0,0 +1 @@ +/etc/menu-methods/lintian diff --git a/t/recipes/checks/debian/rules/legacy-binary/build-spec/debian/control b/t/recipes/checks/debian/rules/legacy-binary/build-spec/debian/control new file mode 100644 index 0000000..c797357 --- /dev/null +++ b/t/recipes/checks/debian/rules/legacy-binary/build-spec/debian/control @@ -0,0 +1,42 @@ +Source: binary +Section: misc +Priority: optional +Maintainer: Lintian Maintainers +Uploaders: Co-maintainer one , Jeroen van Wolffelaar , Co-maintainer three +Standards-Version: 3.2.1 +Homepage: http://lintian.debian.org/ +Vcs-Svn: http://svn.wolffelaar.nl/lintian/trunk +XS-Vcs-Browser: http://svn.wolffelaar.nl/lintian/trunk +XS-Dm-Upload-Allowed: yes + +Package: binary +Architecture: any +Pre-Depends: ${shlibs:Depends}, xorg, binary-data (= ${source:Version}), libssl0.9.8 +Homepage: +Vcs-Svn: http://svn.wolffelaar.nl/lintian/trunk +Description: test handling of binary files + Regression test for lintian's handling of binary files for debian. This + is checked for picky spelling errors. + . + This package list [ subversion | gconf ] should not be flagged as a spelling + mistake. The spelling correction for dont should be correct. + . + Homepage: http://lintian.debian.org/ + +Package: binary-data +Architecture: all +Depends: binary (= ${source:Version}), libssl-not-openssl, + libssl0.9.8 | or-something-else +Description: test handling of binary relationships + Regression test for lintian's checking of package relationships between + arch:any and arch:all packages. + . + This mention of subversion should be flagged as a spelling mistake. + +#Package: binary-comment +#Architecture: space-almonds +#Depends: * +#Depends: * +#Description: test comment support +# Yes, comments are actually allowed in debian/control, so none of the +# above should produce errors. diff --git a/t/recipes/checks/debian/rules/legacy-binary/build-spec/debian/copyright b/t/recipes/checks/debian/rules/legacy-binary/build-spec/debian/copyright new file mode 100644 index 0000000..1d6806d --- /dev/null +++ b/t/recipes/checks/debian/rules/legacy-binary/build-spec/debian/copyright @@ -0,0 +1,15 @@ +hello.c is released under public domain. This is distributed in the hope that +it will be useful, but without any warranty; without even the implied warranty +of merchantability or fitness for a particular purpose. + +A reference to /usr/share/common-licenses/GPL-2 to make it look like this +package is under the GPL and trigger the OpenSSL warning. + +Test for old FSF address: + +Free Software Foundation, Inc., 59 Temple Place - Suite 330, +Boston, MA 02111-1307, USA. + +Test for deprecated ntionl ncoding. + +Improper capitalization of linux or debian isn't caught here. diff --git a/t/recipes/checks/debian/rules/legacy-binary/build-spec/debian/doc-base b/t/recipes/checks/debian/rules/legacy-binary/build-spec/debian/doc-base new file mode 100644 index 0000000..7e5b38f --- /dev/null +++ b/t/recipes/checks/debian/rules/legacy-binary/build-spec/debian/doc-base @@ -0,0 +1,41 @@ +Document: binary!docs +Title: Broken debian binary doc-base control file +Author: Russ Allbery +Abstract: This control file exercises various tests of doc-base control + files, including several things that aren't tested yet. The third and + fourth one has trailing whitespace. + . + This section has a speling error and bad character. + . + The above separator was fine. +Section: Non/Existant +Unknown: Some field + + + +Format: debiandoc-sgML +Files: /usr/share/doc/binary/binary.sgml.gz +Unknown: Some field + +Format: ESP +Index: /usr/share/doc/binary/binary.txt + +Index: /usr/share/doc/binary/html/index.html + /usr/share/doc/binary/html/ch1.html + /usr/share/doc/binary/html/ch4.html + + +Format: HTML +Index: /usr/share/doc/binary/html/index.html +Files: /usr/share/doc/binary/html/ch?.h*l + /usr/share/doc/binary/hml/*.html + +Format: inFO +Files: /usr/share/info/binary.info.gz + +Format: HTML +Index: /usr/share/doc/binary/html/index.html +Files: /usr/share/doc/binary/html/ch5.html + /usr/share/doc/binary/html/ch6.html + + diff --git a/t/recipes/checks/debian/rules/legacy-binary/build-spec/debian/goodbye.desktop b/t/recipes/checks/debian/rules/legacy-binary/build-spec/debian/goodbye.desktop new file mode 100644 index 0000000..f6ce8e3 --- /dev/null +++ b/t/recipes/checks/debian/rules/legacy-binary/build-spec/debian/goodbye.desktop @@ -0,0 +1,13 @@ +[Desktop Entry] +Name:Goodbye +# Name=Goodbye +Comment=Say hello! +SpecialTag=This doesn't exist! +Exec=goodbye +icon=hello +Terminal=true +Type=Application +Categories=WeirdStuff;Screensaver; +Encoding=ISO-10646-1 +[Other Entry] +Name=Goodbye diff --git a/t/recipes/checks/debian/rules/legacy-binary/build-spec/debian/hello.desktop b/t/recipes/checks/debian/rules/legacy-binary/build-spec/debian/hello.desktop new file mode 100644 index 0000000..f795468 --- /dev/null +++ b/t/recipes/checks/debian/rules/legacy-binary/build-spec/debian/hello.desktop @@ -0,0 +1,14 @@ +# some random comment + +# [Foo Bar] +[KDE Desktop Entry] +Name=Hello +Name[en_US]=Hello +Comment=Say hello! +Exec=kdesu hello +Icon=hello +Terminal=true +Type=Application +Categories=GNOME;GTK;System;Applet;X-Foo;Settings; +Encoding=UTF-8 +OnlyShowIn=GNOME; diff --git a/t/recipes/checks/debian/rules/legacy-binary/build-spec/debian/menu b/t/recipes/checks/debian/rules/legacy-binary/build-spec/debian/menu new file mode 100644 index 0000000..e8972f4 --- /dev/null +++ b/t/recipes/checks/debian/rules/legacy-binary/build-spec/debian/menu @@ -0,0 +1,26 @@ +?package(binary):needs=text title="Hello World" command="/usr/bin/hello" +?package(binary):needs=text section="Applications/System" title="Run cfdisk (0)" command="/usr/bin/su-to-root cfdisk" +?package(binary):needs="text" section="Applications/System/Hardware" title="Run cfdisk (1)" command="sux -p cfdisk" +?package(binary):needs="x11" section="Window Managers" title="Run xfdisk" command="/usr/sbin/su-to-root -c xfdisk" +?package(binary):needs="wm" section="Applications/System/Administration" title="Run fdisk-wm" command="su-to-root -c hello" +?package(binary):section="Apps/Games" title="I'm not root!" command="su-to-root -c imnothere" +?package(binary):needs="text" section="Apps/System" title="I'm not here!" command="/imnothere" +?package(binary,other-binary):\ + needs="text"\ + section="Applications/Shells"\ + title="more than one required"\ + command="other-bin -s omething" +?package(binary):needs="wmmodule" section="WindowManagers/Modules" title="somemodule" command="ModuleCmd" +?package(binary):needs="wmmodule" section="FVWM Modules" title="somemodule" command="ModuleCmd" +?package(binary):needs="text" section="Applications/System/Administration" title="I'm not in /usr/bin!" command="iminusrbin" +?package(binary):needs="text"\ + section="Applications/System/Administration"\ + title="I'm not root!" command="su-to-root -c imnothere" +?package(binary):needs="text" section="Applications/System/Administration"\ + title="Run cfdisk (0)" command="cfdisk" +?package(binary):needs="text" section="Applications/System/Administration" title="Hello World" command="/usr/bin/hello" +?package(binary):needs="wm" section="FVWM Modules" title="Fake Module" command="hello" +?package(binary):needs="fvwmmodule" section="Window Maker" title="Fake Module"\ + command="hello" +?package(binary):needs="x11" section="Applications/System/Hardware" title="Run xfdisk" command="su-to-root -c 'xfdisk -f'" +?package(binary):needs="text" section="Applications/System/Administration" title="foo" command="sh /path/to/foo" diff --git a/t/recipes/checks/debian/rules/legacy-binary/build-spec/debian/menu-method b/t/recipes/checks/debian/rules/legacy-binary/build-spec/debian/menu-method new file mode 100644 index 0000000..9f07bd7 --- /dev/null +++ b/t/recipes/checks/debian/rules/legacy-binary/build-spec/debian/menu-method @@ -0,0 +1,22 @@ +#!/usr/bin/install-menu + +# -*- mode: shell-script; -*- +#I need menu-1! +# + +!include notmenu.h + +compat="menu-2" + +outputencoding="UTF-8"; +outputlanguage="C"; + +x11 = AppEntry("false"); +text = AppEntry("true"); + +startmenu = ""; +endmenu = ""; +submenutitle = ""; +rootprefix = "/var/lib/lintian/menu"; +userprefix = ".local/share/lintian/menu"; + diff --git a/t/recipes/checks/debian/rules/legacy-binary/build-spec/debian/postinst b/t/recipes/checks/debian/rules/legacy-binary/build-spec/debian/postinst new file mode 100644 index 0000000..29e1861 --- /dev/null +++ b/t/recipes/checks/debian/rules/legacy-binary/build-spec/debian/postinst @@ -0,0 +1,6 @@ +#! /bin/bash -e + +if [ $1 eq 'configure' ] +then + suidregister hello-static root root 4755 +fi diff --git a/t/recipes/checks/debian/rules/legacy-binary/build-spec/debian/rules b/t/recipes/checks/debian/rules/legacy-binary/build-spec/debian/rules new file mode 100755 index 0000000..a962ea9 --- /dev/null +++ b/t/recipes/checks/debian/rules/legacy-binary/build-spec/debian/rules @@ -0,0 +1,92 @@ +#!/usr/bin/make -f + +tmp=debian/tmp + +# This reference to $(PWD) should not cause an error but the one below +# should. +build-arch: + make + echo $(PWD) + +build: build-arch + +clean: + make -i clean + [ ! -f debian/files ] || rm -f debian/files + [ ! -f debian/substvars ] || rm -f debian/substvars + [ ! -d debian/tmp ] || rm -rf debian/tmp + [ ! -d debian/binary ] || rm -rf debian/binary + [ ! -d debian/binary-data ] || rm -rf debian/binary-data + +binary-arch: build + install -d $(tmp)/usr/bin + install -d $(tmp)/boot/hello + install -m 755 hello $(tmp)/usr/bin + touch $(tmp)/usr/bin/iminusrbin + chmod 755 $(tmp)/usr/bin/iminusrbin + install -m 755 hello-static $(tmp)/usr/bin + strip $(tmp)/usr/bin/hello-static + install -m 755 hello-static $(tmp)/usr/bin/hello.static + strip --remove-section=.comment --remove-section=.note $(tmp)/usr/bin/hello.static + ln $(tmp)/usr/bin/hello.static $(tmp)/usr/bin/static-hello + install -m 755 hello-static $(tmp)/boot/hello + strip --remove-section=.comment --remove-section=.note $(tmp)/boot/hello/hello-static + install -d $(tmp)/usr/share/doc/binary + install -m 644 INSTALL $(tmp)/usr/share/doc/binary + install -d $(tmp)/usr/share/doc/binary/html + echo '' > $(tmp)/usr/share/doc/binary/html/index.html + echo '' > $(tmp)/usr/share/doc/binary/html/ch1.html + ln -s ../html/./ch1.html $(tmp)/usr/share/doc/binary/html/ch2.html + ln -s /usr/share/doc/binary/htm/ch1.html $(tmp)/usr/share/doc/binary/html/ch3.html + echo '' > $(tmp)/usr/share/doc/binary/html/ch5.html + ln $(tmp)/usr/share/doc/binary/html/ch5.html \ + $(tmp)/usr/share/doc/binary/html/ch6.html + install -d $(tmp)/usr/share/menu + install -d $(tmp)/usr/lib/menu + install -d $(tmp)/usr/share/binary + install -m 644 debian/menu $(tmp)/usr/share/menu/binary + install -m 644 debian/menu $(tmp)/usr/lib/menu/binary + install -d $(tmp)/etc/menu-methods + install -m 755 debian/menu-method $(tmp)/etc/menu-methods/lintian + install -d $(tmp)/usr/share/doc-base + install -m 644 debian/doc-base $(tmp)/usr/share/doc-base/binary + touch '$(tmp)/usr/share/doc-base/space ' + install -m 644 debian/README.Debian $(tmp)/usr/share/doc/binary + install -m 644 debian/NEWS.Debian $(tmp)/usr/share/doc/binary + gzip -n -9 $(tmp)/usr/share/doc/binary/NEWS.Debian + install -m 644 debian/copyright $(tmp)/usr/share/doc/binary + install -m 644 debian/changelog $(tmp)/usr/share/doc/binary + #gzip -n -9 $(tmp)/usr/share/doc/binary/changelog + install -d $(tmp)/DEBIAN + install -m 755 debian/postinst $(tmp)/DEBIAN + install -m 644 debian/conffiles $(tmp)/DEBIAN + + install -d $(tmp)/usr/share/applications + install -m 644 debian/hello.desktop \ + $(tmp)/usr/share/applications/hello.desktop + install -m 755 debian/goodbye.desktop \ + $(tmp)/usr/share/applications/goodbye.desktop + + # should be ok... + echo boe > $(tmp)/usr/bar + ln $(tmp)/usr/bar $(tmp)/usr/foo + # but this isn't + echo boe > $(tmp)/usr/bar2 + ln $(tmp)/usr/bar2 $(tmp)/usr/share/baz + + dd if=/dev/zero of=$(tmp)/usr/share/binary/largefile bs=1024 count=4000 + + install -d debian/binary-data/DEBIAN + install -d debian/binary-data/usr/share/doc + ln -s binary debian/binary-data/usr/share/doc/binary-data + + dpkg-shlibdeps $(tmp)/usr/bin/hello + dpkg-gencontrol -pbinary -isp + dpkg-gencontrol -pbinary-data -Pdebian/binary-data -isp + + dpkg --build debian/tmp .. + dpkg --build debian/binary-data .. + +binary: binary-arch + +.PHONY: build-arch build binary-arch binary clean diff --git a/t/recipes/checks/debian/rules/legacy-binary/build-spec/debian/templates b/t/recipes/checks/debian/rules/legacy-binary/build-spec/debian/templates new file mode 100644 index 0000000..3d92861 --- /dev/null +++ b/t/recipes/checks/debian/rules/legacy-binary/build-spec/debian/templates @@ -0,0 +1,16 @@ +# The debconf templates defined here are the sort that you'd use if +# providing a wordlist and an ispell dictionary for the language +# "perl". This shouldn't trigger warnings about not using debconf-po. + +Template: shared/packages-ispell +Type: text +Description: + +Template: shared/packages-wordlist +Type: text +Description: + +Template: miscfiles/languages +Type: text +Default: perl (Pathologically Eclectic Rubbish Lister) +Description: diff --git a/t/recipes/checks/debian/rules/legacy-binary/build-spec/fill-values b/t/recipes/checks/debian/rules/legacy-binary/build-spec/fill-values new file mode 100644 index 0000000..b503871 --- /dev/null +++ b/t/recipes/checks/debian/rules/legacy-binary/build-spec/fill-values @@ -0,0 +1,5 @@ +Skeleton: upload-non-native +Testname: legacy-binary +Source: binary +Version: 4-1.1 +Description: Legacy test "binary" diff --git a/t/recipes/checks/debian/rules/legacy-binary/build-spec/orig/INSTALL b/t/recipes/checks/debian/rules/legacy-binary/build-spec/orig/INSTALL new file mode 100644 index 0000000..3b50ea9 --- /dev/null +++ b/t/recipes/checks/debian/rules/legacy-binary/build-spec/orig/INSTALL @@ -0,0 +1,176 @@ +Basic Installation +================== + + These are generic installation instructions. + + The `configure' shell script attempts to guess correct values for +various system-dependent variables used during compilation. It uses +those values to create a `Makefile' in each directory of the package. +It may also create one or more `.h' files containing system-dependent +definitions. Finally, it creates a shell script `config.status' that +you can run in the future to recreate the current configuration, a file +`config.cache' that saves the results of its tests to speed up +reconfiguring, and a file `config.log' containing compiler output +(useful mainly for debugging `configure'). + + If you need to do unusual things to compile the package, please try +to figure out how `configure' could check whether to do them, and mail +diffs or instructions to the address given in the `README' so they can +be considered for the next release. If at some point `config.cache' +contains results you don't want to keep, you may remove or edit it. + + The file `configure.in' is used to create `configure' by a program +called `autoconf'. You only need `configure.in' if you want to change +it or regenerate `configure' using a newer version of `autoconf'. + +The simplest way to compile this package is: + + 1. `cd' to the directory containing the package's source code and type + `./configure' to configure the package for your system. If you're + using `csh' on an old version of System V, you might need to type + `sh ./configure' instead to prevent `csh' from trying to execute + `configure' itself. + + Running `configure' takes a while. While running, it prints some + messages telling which features it is checking for. + + 2. Type `make' to compile the package. + + 3. Optionally, type `make check' to run any self-tests that come with + the package. + + 4. Type `make install' to install the programs and any data files and + documentation. + + 5. You can remove the program binaries and object files from the + source code directory by typing `make clean'. To also remove the + files that `configure' created (so you can compile the package for + a different kind of computer), type `make distclean'. There is + also a `make maintainer-clean' target, but that is intended mainly + for the package's developers. If you use it, you may have to get + all sorts of other programs in order to regenerate files that came + with the distribution. + +Compilers and Options +===================== + + Some systems require unusual options for compilation or linking that +the `configure' script does not know about. You can give `configure' +initial values for variables by setting them in the environment. Using +a Bourne-compatible shell, you can do that on the command line like +this: + CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure + +Or on systems that have the `env' program, you can do it like this: + env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure + +Compiling For Multiple Architectures +==================================== + + You can compile the package for more than one kind of computer at the +same time, by placing the object files for each architecture in their +own directory. To do this, you must use a version of `make' that +supports the `VPATH' variable, such as GNU `make'. `cd' to the +directory where you want the object files and executables to go and run +the `configure' script. `configure' automatically checks for the +source code in the directory that `configure' is in and in `..'. + + If you have to use a `make' that does not supports the `VPATH' +variable, you have to compile the package for one architecture at a time +in the source code directory. After you have installed the package for +one architecture, use `make distclean' before reconfiguring for another +architecture. + +Installation Names +================== + + By default, `make install' will install the package's files in +`/usr/local/bin', `/usr/local/man', etc. You can specify an +installation prefix other than `/usr/local' by giving `configure' the +option `--prefix=PATH'. + + You can specify separate installation prefixes for +architecture-specific files and architecture-independent files. If you +give `configure' the option `--exec-prefix=PATH', the package will use +PATH as the prefix for installing programs and libraries. +Documentation and other data files will still use the regular prefix. + + If the package supports it, you can cause programs to be installed +with an extra prefix or suffix on their names by giving `configure' the +option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. + +Optional Features +================= + + Some packages pay attention to `--enable-FEATURE' options to +`configure', where FEATURE indicates an optional part of the package. +They may also pay attention to `--with-PACKAGE' options, where PACKAGE +is something like `gnu-as' or `x' (for the X Window System). The +`README' should mention any `--enable-' and `--with-' options that the +package recognizes. + + For packages that use the X Window System, `configure' can usually +find the X include and library files automatically, but if it doesn't, +you can use the `configure' options `--x-includes=DIR' and +`--x-libraries=DIR' to specify their locations. + +Specifying the System Type +========================== + + There may be some features `configure' can not figure out +automatically, but needs to determine by the type of host the package +will run on. Usually `configure' can figure that out, but if it prints +a message saying it can not guess the host type, give it the +`--host=TYPE' option. TYPE can either be a short name for the system +type, such as `sun4', or a canonical name with three fields: + CPU-COMPANY-SYSTEM + +See the file `config.sub' for the possible values of each field. If +`config.sub' isn't included in this package, then this package doesn't +need to know the host type. + + If you are building compiler tools for cross-compiling, you can also +use the `--target=TYPE' option to select the type of system they will +produce code for and the `--build=TYPE' option to select the type of +system on which you are compiling the package. + +Sharing Defaults +================ + + If you want to set default values for `configure' scripts to share, +you can create a site shell script called `config.site' that gives +default values for variables like `CC', `cache_file', and `prefix'. +`configure' looks for `PREFIX/share/config.site' if it exists, then +`PREFIX/etc/config.site' if it exists. Or, you can set the +`CONFIG_SITE' environment variable to the location of the site script. +A warning: not all `configure' scripts look for a site script. + +Operation Controls +================== + + `configure' recognizes the following options to control how it +operates. + +`--cache-file=FILE' + Use and save the results of the tests in FILE instead of + `./config.cache'. Set FILE to `/dev/null' to disable caching, for + debugging `configure'. + +`--help' + Print a summary of the options to `configure', and exit. + +`--quiet' +`--silent' +`-q' + Do not print messages saying which checks are being made. + +`--srcdir=DIR' + Look for the package's source code in directory DIR. Usually + `configure' can determine that directory automatically. + +`--version' + Print the version of Autoconf used to generate the `configure' + script, and exit. + +`configure' also accepts some other, not widely useful, options. + diff --git a/t/recipes/checks/debian/rules/legacy-binary/build-spec/orig/Makefile b/t/recipes/checks/debian/rules/legacy-binary/build-spec/orig/Makefile new file mode 100644 index 0000000..da1dc55 --- /dev/null +++ b/t/recipes/checks/debian/rules/legacy-binary/build-spec/orig/Makefile @@ -0,0 +1,12 @@ +all: hello hello-static + +hello: hello.c + gcc hello.c -o hello + +hello-static: hello.c + gcc -static hello.c -o hello-static + +clean: + rm -f hello hello-static + +distclean: clean diff --git a/t/recipes/checks/debian/rules/legacy-binary/build-spec/orig/hello.c b/t/recipes/checks/debian/rules/legacy-binary/build-spec/orig/hello.c new file mode 100644 index 0000000..2fb04e1 --- /dev/null +++ b/t/recipes/checks/debian/rules/legacy-binary/build-spec/orig/hello.c @@ -0,0 +1,8 @@ +#include +#include + +int main(int argc, char *argv[]) { + + printf("Hello, World!\n"); + exit(0); +} diff --git a/t/recipes/checks/debian/rules/legacy-binary/eval/desc b/t/recipes/checks/debian/rules/legacy-binary/eval/desc new file mode 100644 index 0000000..bf4eb52 --- /dev/null +++ b/t/recipes/checks/debian/rules/legacy-binary/eval/desc @@ -0,0 +1,2 @@ +Testname: legacy-binary +Check: debian/rules diff --git a/t/recipes/checks/debian/rules/legacy-binary/eval/hints b/t/recipes/checks/debian/rules/legacy-binary/eval/hints new file mode 100644 index 0000000..76fa038 --- /dev/null +++ b/t/recipes/checks/debian/rules/legacy-binary/eval/hints @@ -0,0 +1,4 @@ +binary (source): debian-rules-missing-required-target build-indep [debian/rules] +binary (source): debian-rules-missing-required-target binary-indep [debian/rules] +binary (source): debian-rules-ignores-make-clean-error [debian/rules:14] +binary (source): debian-rules-calls-pwd [debian/rules:9] diff --git a/t/recipes/checks/debian/rules/legacy-binary/eval/post-test b/t/recipes/checks/debian/rules/legacy-binary/eval/post-test new file mode 100644 index 0000000..3deefd5 --- /dev/null +++ b/t/recipes/checks/debian/rules/legacy-binary/eval/post-test @@ -0,0 +1,3 @@ +s/arch-dep-package-has-big-usr-share .*kB .*%/arch-dep-package-has-big-usr-share/ +/: hardening-.*/ d +s/\(current is ([0-9]+\.)+[0-9]\)/(current is CURRENT)/ diff --git a/t/recipes/checks/debian/rules/legacy-debconf/build-spec/debian/changelog.in b/t/recipes/checks/debian/rules/legacy-debconf/build-spec/debian/changelog.in new file mode 100644 index 0000000..f5e308e --- /dev/null +++ b/t/recipes/checks/debian/rules/legacy-debconf/build-spec/debian/changelog.in @@ -0,0 +1,6 @@ +debconf ([% $version %]) [% $distribution %]; urgency=low + + * Initial Release + * Changelog line with exactly 80 characters which tests the line-too-long tag. + + -- Lintian Maintainers Wed, 3 May 2006 18:07:19 -0500 diff --git a/t/recipes/checks/debian/rules/legacy-debconf/build-spec/debian/compat.in b/t/recipes/checks/debian/rules/legacy-debconf/build-spec/debian/compat.in new file mode 100644 index 0000000..640a566 --- /dev/null +++ b/t/recipes/checks/debian/rules/legacy-debconf/build-spec/debian/compat.in @@ -0,0 +1 @@ +[% $dh_compat_level %] diff --git a/t/recipes/checks/debian/rules/legacy-debconf/build-spec/debian/control b/t/recipes/checks/debian/rules/legacy-debconf/build-spec/debian/control new file mode 100644 index 0000000..bf9f4e9 --- /dev/null +++ b/t/recipes/checks/debian/rules/legacy-debconf/build-spec/debian/control @@ -0,0 +1,52 @@ +Source: debconf +Section: utils +Priority: optional +Build-Depends: debhelper (>= 4), dpatch +Maintainer: Lintian Maintainers +Standards-Version: 3.7.2 + +Package: debconf-test +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: Test package for the debconf checks of lintian (dummy) + +Package: debconf-test-noscripts +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: Test package for the debconf checks of lintian (noscripts) + Package missing postinst/postrm/config. + . + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. + +Package: debconf-test-preinst +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: Test package for the debconf checks of lintian (preinst) + Package uses debconf only in preinst. + . + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. + +Package: debconf-test-postinst +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: Test package for the debconf checks of lintian (postinst) + Package uses debconf only in postinst. + . + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. + +Package: debconf-udeb +Section: debian-installer +XC-Package-Type: udeb +XB-Installer-Menu-Item: 100 +Architecture: any +Depends: ${shlibs:Depends} +Description: Test udeb package for the debconf checks of lintian (dummy) diff --git a/t/recipes/checks/debian/rules/legacy-debconf/build-spec/debian/copyright b/t/recipes/checks/debian/rules/legacy-debconf/build-spec/debian/copyright new file mode 100644 index 0000000..84843ee --- /dev/null +++ b/t/recipes/checks/debian/rules/legacy-debconf/build-spec/debian/copyright @@ -0,0 +1,10 @@ +Copyright (C) 2004 Frank Lichtenheld + +Test for really old FSF address: + +Free Software Foundation, Inc., 675 Mass Ave, Cambridge, +MA 02139, USA. + +Test for a dh-make boilerplate: +# Please also look if there are files or directories which have a +# different copyright/license attached and list them here. diff --git a/t/recipes/checks/debian/rules/legacy-debconf/build-spec/debian/debconf-test-noscripts.templates b/t/recipes/checks/debian/rules/legacy-debconf/build-spec/debian/debconf-test-noscripts.templates new file mode 100644 index 0000000..93f8071 --- /dev/null +++ b/t/recipes/checks/debian/rules/legacy-debconf/build-spec/debian/debconf-test-noscripts.templates @@ -0,0 +1,3 @@ +Template: debconf/test +Type: text +_description: Foo bar (1) diff --git a/t/recipes/checks/debian/rules/legacy-debconf/build-spec/debian/debconf-test-postinst.postinst b/t/recipes/checks/debian/rules/legacy-debconf/build-spec/debian/debconf-test-postinst.postinst new file mode 100644 index 0000000..56ab871 --- /dev/null +++ b/t/recipes/checks/debian/rules/legacy-debconf/build-spec/debian/debconf-test-postinst.postinst @@ -0,0 +1,10 @@ +#!/bin/sh +set -e + +. /usr/share/debconf/confmodule + +db_input medium debconf/test + +#DEBHELPER# + +true diff --git a/t/recipes/checks/debian/rules/legacy-debconf/build-spec/debian/debconf-test-postinst.postrm b/t/recipes/checks/debian/rules/legacy-debconf/build-spec/debian/debconf-test-postinst.postrm new file mode 100644 index 0000000..cbf5e3b --- /dev/null +++ b/t/recipes/checks/debian/rules/legacy-debconf/build-spec/debian/debconf-test-postinst.postrm @@ -0,0 +1,7 @@ +#!/bin/sh +set -e +if [ "$1" = purge ] && [ -e /usr/share/debconf/confmodule ]; then + . /usr/share/debconf/confmodule + db_purge +fi +#DEBHELPER# diff --git a/t/recipes/checks/debian/rules/legacy-debconf/build-spec/debian/debconf-test-postinst.templates b/t/recipes/checks/debian/rules/legacy-debconf/build-spec/debian/debconf-test-postinst.templates new file mode 100644 index 0000000..2a2a8ab --- /dev/null +++ b/t/recipes/checks/debian/rules/legacy-debconf/build-spec/debian/debconf-test-postinst.templates @@ -0,0 +1,3 @@ +Template: debconf/test +Type: text +_description: Enter something: diff --git a/t/recipes/checks/debian/rules/legacy-debconf/build-spec/debian/debconf-test-preinst.postrm b/t/recipes/checks/debian/rules/legacy-debconf/build-spec/debian/debconf-test-preinst.postrm new file mode 100644 index 0000000..cbf5e3b --- /dev/null +++ b/t/recipes/checks/debian/rules/legacy-debconf/build-spec/debian/debconf-test-preinst.postrm @@ -0,0 +1,7 @@ +#!/bin/sh +set -e +if [ "$1" = purge ] && [ -e /usr/share/debconf/confmodule ]; then + . /usr/share/debconf/confmodule + db_purge +fi +#DEBHELPER# diff --git a/t/recipes/checks/debian/rules/legacy-debconf/build-spec/debian/debconf-test-preinst.preinst b/t/recipes/checks/debian/rules/legacy-debconf/build-spec/debian/debconf-test-preinst.preinst new file mode 100644 index 0000000..bf6f074 --- /dev/null +++ b/t/recipes/checks/debian/rules/legacy-debconf/build-spec/debian/debconf-test-preinst.preinst @@ -0,0 +1,13 @@ +#!/bin/sh +set -e + +# Obsolete name for the confmodule +. /usr/share/debconf/confmodule.sh + +. /usr/share/debconf/confmodule + +db_input medium debconf/test + +#DEBHELPER# + +true diff --git a/t/recipes/checks/debian/rules/legacy-debconf/build-spec/debian/debconf-test-preinst.templates b/t/recipes/checks/debian/rules/legacy-debconf/build-spec/debian/debconf-test-preinst.templates new file mode 100644 index 0000000..2a2a8ab --- /dev/null +++ b/t/recipes/checks/debian/rules/legacy-debconf/build-spec/debian/debconf-test-preinst.templates @@ -0,0 +1,3 @@ +Template: debconf/test +Type: text +_description: Enter something: diff --git a/t/recipes/checks/debian/rules/legacy-debconf/build-spec/debian/debconf-test.config b/t/recipes/checks/debian/rules/legacy-debconf/build-spec/debian/debconf-test.config new file mode 100644 index 0000000..9e32d06 --- /dev/null +++ b/t/recipes/checks/debian/rules/legacy-debconf/build-spec/debian/debconf-test.config @@ -0,0 +1,24 @@ +#!/bin/sh + +set -e + +. /usr/share/debconf/confmodule + +db_settitle "Funky lintian test" + +# Bad priorities. +db_text LOW debconf/test +db_input normal debconf/test + +# Valid priorities. +db_text \ +high debconf/test +foo=medium +db_input $foo debconf/test +db_input "$foo" debconf/test +db_input 'medium' debconf/test + +# debconf/transtring should not be flagged as unused +# (it's aliased to debconf/alias, which is used) +db_register debconf/transtring debconf/alias +db_input medium debconf/alias diff --git a/t/recipes/checks/debian/rules/legacy-debconf/build-spec/debian/debconf-test.postinst b/t/recipes/checks/debian/rules/legacy-debconf/build-spec/debian/debconf-test.postinst new file mode 100644 index 0000000..b387037 --- /dev/null +++ b/t/recipes/checks/debian/rules/legacy-debconf/build-spec/debian/debconf-test.postinst @@ -0,0 +1,10 @@ +#!/bin/sh + +set -e + +. /usr/share/debconf/confmodule + +# Not supposed to do this here. +db_input medium debconf/test + +true diff --git a/t/recipes/checks/debian/rules/legacy-debconf/build-spec/debian/debconf-test.templates b/t/recipes/checks/debian/rules/legacy-debconf/build-spec/debian/debconf-test.templates new file mode 100644 index 0000000..811bb6c --- /dev/null +++ b/t/recipes/checks/debian/rules/legacy-debconf/build-spec/debian/debconf-test.templates @@ -0,0 +1,101 @@ +Template: debconf/test +Type: text +_description: Foo bar (1) + +Template: debconf/testmulti +Type: multiselect +__Choices: foo, bar, boo +_Description: test comma usages in choices fields + +Template: debconf/testmulti-escape +Type: multiselect +_Choices: foo\, bar, boo +_Description: test escaped comma usages in choices fields: + +Template: debconf/testboolean +Type: boolean +_Description: Enter yes or no: + Do you want to answer this question? + +Template: debconf/teststring +Type: string +_Description: This template goes on and on. + This template goes on and on. + This template goes on and on. + This template goes on and on. + This template goes on and on. + This template goes on and on. + This template goes on and on. + This template goes on and on. + This template goes on and on. + This template goes on and on. + This template goes on and on. + This template goes on and on. + This template goes on and on. + This template goes on and on. + This template goes on and on. + This template goes on and on. + This template goes on and on. + This template goes on and on. + This template goes on and on. + This template goes on and on. + This template goes on and on. + This template goes on and on. + +Template: debconf/testnote +Type: note +Description: This should be a title and not a really long sentence that ends in a regular period. + +Template: debconf/1st-person +Type: select +__Choices: one, two +_Description: Select one of these: + I am a stupid test of first-person syntax that tells you to select yes + even though yes isn't an option in this prompt. + +Template: debconf/internal +Type: boolean +Description: For internal use only + We are testing that style checks are not applied to templates that are + marked as internal. + +Template: debconf/no-description +Type: string + +Template: debconf/translate +Type: boolean +_Default: false +_Description: Should this really be translated? + +Template: debconf/transtring +Type: string +_Default: 1 +_Description: Count of templates: + The number of useless numbers that a translator would have to translate + for this template. + +Template: debconf/language +__Choices: English, Spanish, German, French +# This is the default choice. Translators should put their own language, +# if available, here instead, but the value MUST be the English version +# of the value for the package scripts to work properly. +_Default: English[ translators, see the comment in the PO files] +_Description: The default language, an example of a default that should + be translated. + +Template: debconf/error +Type: error +_Description: An error occurred + This is a sample Debconf error template. + +Template: debconf/should-be-boolean +Type: select +__Choices: yes, no +_Description: Choose: + Pick yes or no. + +Template: debconf/should-be-no-longer-a-problem +Type: boolean +_Description: Decide, lintian + Using "no longer" should no longer be detected as + making-assumptions-about-interfaces-in-templates by lintian. diff --git a/t/recipes/checks/debian/rules/legacy-debconf/build-spec/debian/debconf-test.templates.de b/t/recipes/checks/debian/rules/legacy-debconf/build-spec/debian/debconf-test.templates.de new file mode 100644 index 0000000..f9ea121 --- /dev/null +++ b/t/recipes/checks/debian/rules/legacy-debconf/build-spec/debian/debconf-test.templates.de @@ -0,0 +1,3 @@ +Template: debconf/testmulti +Type: multiselect +Choices: foo, bar\, boo, boo diff --git a/t/recipes/checks/debian/rules/legacy-debconf/build-spec/debian/debconf-test.templates.in b/t/recipes/checks/debian/rules/legacy-debconf/build-spec/debian/debconf-test.templates.in new file mode 100644 index 0000000..e69de29 diff --git a/t/recipes/checks/debian/rules/legacy-debconf/build-spec/debian/debconf-udeb.postinst b/t/recipes/checks/debian/rules/legacy-debconf/build-spec/debian/debconf-udeb.postinst new file mode 100644 index 0000000..4ce41f0 --- /dev/null +++ b/t/recipes/checks/debian/rules/legacy-debconf/build-spec/debian/debconf-udeb.postinst @@ -0,0 +1,9 @@ +#!/bin/sh + +set -e + +. /usr/share/debconf/confmodule + +ldconfig + +true diff --git a/t/recipes/checks/debian/rules/legacy-debconf/build-spec/debian/debconf-udeb.templates b/t/recipes/checks/debian/rules/legacy-debconf/build-spec/debian/debconf-udeb.templates new file mode 100644 index 0000000..5d7cf5a --- /dev/null +++ b/t/recipes/checks/debian/rules/legacy-debconf/build-spec/debian/debconf-udeb.templates @@ -0,0 +1,3 @@ +Template: debian-installer/debconf-udeb/title +Type: text +_description: This is just a test diff --git a/t/recipes/checks/debian/rules/legacy-debconf/build-spec/debian/po/POTFILES.in b/t/recipes/checks/debian/rules/legacy-debconf/build-spec/debian/po/POTFILES.in new file mode 100644 index 0000000..d0c82f0 --- /dev/null +++ b/t/recipes/checks/debian/rules/legacy-debconf/build-spec/debian/po/POTFILES.in @@ -0,0 +1,2 @@ +[type: gettext/rfc822deb] debconf-test.templates +[type: gettext/rfc822deb] debconf-udeb.templates diff --git a/t/recipes/checks/debian/rules/legacy-debconf/build-spec/debian/po/de.po b/t/recipes/checks/debian/rules/legacy-debconf/build-spec/debian/po/de.po new file mode 100644 index 0000000..86c5796 --- /dev/null +++ b/t/recipes/checks/debian/rules/legacy-debconf/build-spec/debian/po/de.po @@ -0,0 +1,66 @@ +# +# Translators, if you are not familiar with the PO format, gettext +# documentation is worth reading, especially sections dedicated to +# this format, e.g. by running: +# info -n '(gettext)PO Files' +# info -n '(gettext)Header Entry' +# +# Some information specific to po-debconf are available at +# /usr/share/doc/po-debconf/README-trans +# or http://www.debian.org/intl/l10n/po-debconf/README-trans +# +# Developers do not need to manually edit POT or PO files. +# +msgid "" +msgstr "" +"Project-Id-Version: debconf-test 1\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2004-12-06 00:51+0100\n" +"PO-Revision-Date: 2004-12-06 01:01+0100\n" +"Last-Translator: Frank Lichtenheld \n" +"Language-Team: debian-l10n-german@l.d.o\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Type: text +#. description +#: ../debconf-test.templates:3 +msgid "Foo bar (2)" +msgstr "" + +#. Type: multiselect +#. Choices +#: ../debconf-test.templates:7 +msgid "foo" +msgstr "foo" + +#. Type: multiselect +#. Choices +#: ../debconf-test.templates:7 +msgid "bar" +msgstr "bar, boo" + +#. Type: multiselect +#. Choices +#: ../debconf-test.templates:7 +msgid "boo" +msgstr "boo" + +#. Type: multiselect +#. Description +#: ../debconf-test.templates:8 +msgid "test comma usages in choices fields" +msgstr "" + +#. Type: multiselect +#. Choices +#: ../debconf-test.templates:11 +msgid "foo\\, bar, boo" +msgstr "foo, bar, boo" + +#. Type: text +#. description +#: ../debconf-udeb.templates:3 +msgid "This is just a test" +msgstr "Dies ist nur ein Test" diff --git a/t/recipes/checks/debian/rules/legacy-debconf/build-spec/debian/po/fr.po b/t/recipes/checks/debian/rules/legacy-debconf/build-spec/debian/po/fr.po new file mode 100644 index 0000000..c74deb2 --- /dev/null +++ b/t/recipes/checks/debian/rules/legacy-debconf/build-spec/debian/po/fr.po @@ -0,0 +1,60 @@ +# +# Translators, if you are not familiar with the PO format, gettext +# documentation is worth reading, especially sections dedicated to +# this format, e.g. by running: +# info -n '(gettext)PO Files' +# info -n '(gettext)Header Entry' +# +# Some information specific to po-debconf are available at +# /usr/share/doc/po-debconf/README-trans +# or http://www.debian.org/intl/l10n/po-debconf/README-trans +# +# Developers do not need to manually edit POT or PO files. +# +msgid "" +msgstr "" +"Project-Id-Version: debconf-test 1\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2004-12-06 00:51+0100\n" +"PO-Revision-Date: 2005-10-13 15:03+0200\n" +"Last-Translator: Frank Lichtenheld \n" +"Language-Team: debian-l10n-german@l.d.o\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=CHARSET\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Type: text +#. description +#: ../debconf-test.templates:3 +msgid "Foo bar (2)" +msgstr "" + +#. Type: multiselect +#. Choices +#: ../debconf-test.templates:7 +msgid "foo" +msgstr "foo" + +#. Type: multiselect +#. Choices +#: ../debconf-test.templates:7 +msgid "bar" +msgstr "bar, boo" + +#. Type: multiselect +#. Choices +#: ../debconf-test.templates:7 +msgid "boo" +msgstr "boo" + +#. Type: multiselect +#. Description +#: ../debconf-test.templates:8 +msgid "test comma usages in choices fields" +msgstr "" + +#. Type: text +#. description +#: ../debconf-udeb.templates:3 +msgid "This is just a test" +msgstr " diff --git a/t/recipes/checks/debian/rules/legacy-debconf/build-spec/debian/po/lang.po b/t/recipes/checks/debian/rules/legacy-debconf/build-spec/debian/po/lang.po new file mode 100644 index 0000000..7ac498a --- /dev/null +++ b/t/recipes/checks/debian/rules/legacy-debconf/build-spec/debian/po/lang.po @@ -0,0 +1,15 @@ +msgid "" +msgstr "" +"Project-Id-Version: debconf-test 1\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2004-12-06 00:51+0100\n" +"PO-Revision-Date: 2005-10-13 15:03+0200\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Type: text +#. description +#: ../debconf-test.templates:3 +msgid "Foo bar (2)" +msgstr "" diff --git a/t/recipes/checks/debian/rules/legacy-debconf/build-spec/debian/po/nds.po b/t/recipes/checks/debian/rules/legacy-debconf/build-spec/debian/po/nds.po new file mode 100644 index 0000000..7ac498a --- /dev/null +++ b/t/recipes/checks/debian/rules/legacy-debconf/build-spec/debian/po/nds.po @@ -0,0 +1,15 @@ +msgid "" +msgstr "" +"Project-Id-Version: debconf-test 1\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2004-12-06 00:51+0100\n" +"PO-Revision-Date: 2005-10-13 15:03+0200\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Type: text +#. description +#: ../debconf-test.templates:3 +msgid "Foo bar (2)" +msgstr "" diff --git a/t/recipes/checks/debian/rules/legacy-debconf/build-spec/debian/po/output b/t/recipes/checks/debian/rules/legacy-debconf/build-spec/debian/po/output new file mode 100644 index 0000000..c3df1a5 --- /dev/null +++ b/t/recipes/checks/debian/rules/legacy-debconf/build-spec/debian/po/output @@ -0,0 +1 @@ +2 utf8 diff --git a/t/recipes/checks/debian/rules/legacy-debconf/build-spec/debian/po/pt_BR.po b/t/recipes/checks/debian/rules/legacy-debconf/build-spec/debian/po/pt_BR.po new file mode 100644 index 0000000..7ac498a --- /dev/null +++ b/t/recipes/checks/debian/rules/legacy-debconf/build-spec/debian/po/pt_BR.po @@ -0,0 +1,15 @@ +msgid "" +msgstr "" +"Project-Id-Version: debconf-test 1\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2004-12-06 00:51+0100\n" +"PO-Revision-Date: 2005-10-13 15:03+0200\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Type: text +#. description +#: ../debconf-test.templates:3 +msgid "Foo bar (2)" +msgstr "" diff --git a/t/recipes/checks/debian/rules/legacy-debconf/build-spec/debian/po/sample-file.po b/t/recipes/checks/debian/rules/legacy-debconf/build-spec/debian/po/sample-file.po new file mode 100644 index 0000000..8dcc0ff --- /dev/null +++ b/t/recipes/checks/debian/rules/legacy-debconf/build-spec/debian/po/sample-file.po @@ -0,0 +1 @@ +This is some file that isn't actually a valid .po file. diff --git a/t/recipes/checks/debian/rules/legacy-debconf/build-spec/debian/po/templates.pot b/t/recipes/checks/debian/rules/legacy-debconf/build-spec/debian/po/templates.pot new file mode 100644 index 0000000..914c77f --- /dev/null +++ b/t/recipes/checks/debian/rules/legacy-debconf/build-spec/debian/po/templates.pot @@ -0,0 +1,61 @@ +# +# Translators, if you are not familiar with the PO format, gettext +# documentation is worth reading, especially sections dedicated to +# this format, e.g. by running: +# info -n '(gettext)PO Files' +# info -n '(gettext)Header Entry' +# +# Some information specific to po-debconf are available at +# /usr/share/doc/po-debconf/README-trans +# or http://www.debian.org/intl/l10n/po-debconf/README-trans +# +# Developers do not need to manually edit POT or PO files. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2004-12-06 00:51+0100\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=CHARSET\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Type: text +#. description +#: ../debconf-test.templates:3 +msgid "Foo bar (2)" +msgstr "" + +#. Type: multiselect +#. Choices +#: ../debconf-test.templates:7 +msgid "foo" +msgstr "" + +#. Type: multiselect +#. Choices +#: ../debconf-test.templates:7 +msgid "bar" +msgstr "" + +#. Type: multiselect +#. Choices +#: ../debconf-test.templates:7 +msgid "boo" +msgstr "" + +#. Type: multiselect +#. Description +#: ../debconf-test.templates:8 +msgid "test comma usages in choices fields" +msgstr "" + +#. Type: text +#. description +#: ../debconf-udeb.templates:3 +msgid "This is just a test" +msgstr "" diff --git a/t/recipes/checks/debian/rules/legacy-debconf/build-spec/debian/pycompat b/t/recipes/checks/debian/rules/legacy-debconf/build-spec/debian/pycompat new file mode 100644 index 0000000..0cfbf08 --- /dev/null +++ b/t/recipes/checks/debian/rules/legacy-debconf/build-spec/debian/pycompat @@ -0,0 +1 @@ +2 diff --git a/t/recipes/checks/debian/rules/legacy-debconf/build-spec/debian/pyversions b/t/recipes/checks/debian/rules/legacy-debconf/build-spec/debian/pyversions new file mode 100644 index 0000000..6f290b0 --- /dev/null +++ b/t/recipes/checks/debian/rules/legacy-debconf/build-spec/debian/pyversions @@ -0,0 +1 @@ +>= 2.7 diff --git a/t/recipes/checks/debian/rules/legacy-debconf/build-spec/debian/rules b/t/recipes/checks/debian/rules/legacy-debconf/build-spec/debian/rules new file mode 100755 index 0000000..933901a --- /dev/null +++ b/t/recipes/checks/debian/rules/legacy-debconf/build-spec/debian/rules @@ -0,0 +1,64 @@ +#!/usr/bin/make -f + +deb_dir = debian/debconf +udeb_dir = debian/debconf-udeb +build_dirs = $(deb_dir) $(udeb_dir) + +build-indep: +# There are no architecture-independent files to be built +# by this package. If there were any they would be made +# here. + +build-arch: + dh_testdir + touch build + +build: build-indep build-arch + +clean: + dh_testdir + dh_testroot + -rm -f build + + dh_clean + +binary-indep: build +# There are no architecture-independent files to be uploaded +# generated by this package. If there were any they would be +# made here. + +binary-arch: build + dh_testdir + dh_testroot + dh_prep + dh_installdirs -a + + dh_installchangelogs -a + dh_installdocs -a + dh_installdebconf -pdebconf-test + dh_installdebconf -pdebconf-test-noscripts --noscripts + dh_installdebconf -pdebconf-test-preinst --noscripts + dh_installdebconf -pdebconf-test-postinst --noscripts + dh_installdebconf -pdebconf-udeb + + + + + dh_compress -a + dh_fixperms -a + +# The shlibs stuff doesn't matter here so do it in a weird order to +# test warnings. + dh_installdeb -a + dh_shlibdeps -a + dh_makeshlibs -a + dh_gencontrol -a + dh_md5sums + dh_builddeb -a + dh_makeshlibs -a + +# Below here is fairly generic really + +binary: binary-indep binary-arch + +.PHONY: build-arch build-indep build binary binary-arch binary-indep clean checkroot diff --git a/t/recipes/checks/debian/rules/legacy-debconf/build-spec/fill-values b/t/recipes/checks/debian/rules/legacy-debconf/build-spec/fill-values new file mode 100644 index 0000000..186615f --- /dev/null +++ b/t/recipes/checks/debian/rules/legacy-debconf/build-spec/fill-values @@ -0,0 +1,6 @@ +Skeleton: upload-native +Testname: legacy-debconf +Source: debconf +Version: 1~rc1 +Description: Legacy test "debconf" +Default-Build-Depends: debhelper (>= [% $dh_compat_level %]~) diff --git a/t/recipes/checks/debian/rules/legacy-debconf/eval/desc b/t/recipes/checks/debian/rules/legacy-debconf/eval/desc new file mode 100644 index 0000000..87b1b86 --- /dev/null +++ b/t/recipes/checks/debian/rules/legacy-debconf/eval/desc @@ -0,0 +1,2 @@ +Testname: legacy-debconf +Check: debian/rules diff --git a/t/recipes/checks/debian/rules/legacy-debconf/eval/hints b/t/recipes/checks/debian/rules/legacy-debconf/eval/hints new file mode 100644 index 0000000..fee3d99 --- /dev/null +++ b/t/recipes/checks/debian/rules/legacy-debconf/eval/hints @@ -0,0 +1,2 @@ +debconf (source): debian-rules-calls-debhelper-in-odd-order dh_makeshlibs [debian/rules:58] +debconf (source): debian-rules-calls-debhelper-in-odd-order dh_makeshlibs [debian/rules:54] diff --git a/t/recipes/checks/debian/rules/legacy-debconf/eval/post-test b/t/recipes/checks/debian/rules/legacy-debconf/eval/post-test new file mode 100644 index 0000000..faeef0b --- /dev/null +++ b/t/recipes/checks/debian/rules/legacy-debconf/eval/post-test @@ -0,0 +1 @@ +s/\(current is ([0-9]+\.)+[0-9]\)/(current is CURRENT)/ diff --git a/t/recipes/checks/debian/rules/legacy-etcfiles/build-spec/debian/README.Debian b/t/recipes/checks/debian/rules/legacy-etcfiles/build-spec/debian/README.Debian new file mode 100644 index 0000000..e289bfb --- /dev/null +++ b/t/recipes/checks/debian/rules/legacy-etcfiles/build-spec/debian/README.Debian @@ -0,0 +1,5 @@ +this is a package to test lintian's handling of files in /etc. +Also, there's a random mention of /usr/doc here to prompt a warning. +But /usr/documentation doesn't. + + -- Russ Allbery , Mon, 18 Feb 2008 16:40:55 -0800 diff --git a/t/recipes/checks/debian/rules/legacy-etcfiles/build-spec/debian/changelog.in b/t/recipes/checks/debian/rules/legacy-etcfiles/build-spec/debian/changelog.in new file mode 100644 index 0000000..00cdc77 --- /dev/null +++ b/t/recipes/checks/debian/rules/legacy-etcfiles/build-spec/debian/changelog.in @@ -0,0 +1,7 @@ +etcfiles ([% $version %]) [% $distribution %]; urgency=low + + * Acknowledge NMU (Closes: #123456). + * initial setup + + -- Lintian Maintainers Fri, 21 Sep 2001 11:56:02 -0700 + diff --git a/t/recipes/checks/debian/rules/legacy-etcfiles/build-spec/debian/conffiles b/t/recipes/checks/debian/rules/legacy-etcfiles/build-spec/debian/conffiles new file mode 100644 index 0000000..76032b7 --- /dev/null +++ b/t/recipes/checks/debian/rules/legacy-etcfiles/build-spec/debian/conffiles @@ -0,0 +1,5 @@ +/etc/proper +/var/lib/foo +/etc/cron.daily/cronfile-normal +/etc/cron.daily/.cronfile-begins-with-fullstop +/etc/cron.daily/cronfile-contains.fullstop diff --git a/t/recipes/checks/debian/rules/legacy-etcfiles/build-spec/debian/conffiles.only b/t/recipes/checks/debian/rules/legacy-etcfiles/build-spec/debian/conffiles.only new file mode 100644 index 0000000..a4b3895 --- /dev/null +++ b/t/recipes/checks/debian/rules/legacy-etcfiles/build-spec/debian/conffiles.only @@ -0,0 +1,2 @@ +/etc/etcfiles/foo +/etc/etcfiles/bar diff --git a/t/recipes/checks/debian/rules/legacy-etcfiles/build-spec/debian/control b/t/recipes/checks/debian/rules/legacy-etcfiles/build-spec/debian/control new file mode 100644 index 0000000..f3dbda7 --- /dev/null +++ b/t/recipes/checks/debian/rules/legacy-etcfiles/build-spec/debian/control @@ -0,0 +1,20 @@ +Source: etcfiles +Section: misc +Priority: optional +Maintainer: Lintian Maintainers +Standards-Version: 3.5.0 + +Package: etcfiles +Architecture: any +Depends: ${shlibs:Depends} +Description: test handling of files in /etc + Regression test for lintian's handling of files in /etc. + . + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. + +Package: only-etcfiles +Architecture: all +Depends: etcfiles (= ${source:Version}) +Description: test handling of conffile-only package diff --git a/t/recipes/checks/debian/rules/legacy-etcfiles/build-spec/debian/rules b/t/recipes/checks/debian/rules/legacy-etcfiles/build-spec/debian/rules new file mode 100755 index 0000000..97ff09f --- /dev/null +++ b/t/recipes/checks/debian/rules/legacy-etcfiles/build-spec/debian/rules @@ -0,0 +1,64 @@ +#!/usr/bin/make -f + +tmp=debian/tmp +tmponly=debian/only-etcfiles + +clean: + rm -f debian/files debian/substvars + rm -rf debian/tmp + rm -rf debian/only-etcfiles + +build: +build-arch: +build-indep: +binary-indep: + install -d $(tmp)/etc + install -m 644 proper $(tmp)/etc + install -m 644 improper $(tmp)/etc + mkdir $(tmp)/etc/cron.daily + touch $(tmp)/etc/cron.daily/cronfile-normal + touch $(tmp)/etc/cron.daily/.cronfile-begins-with-fullstop + touch $(tmp)/etc/cron.daily/cronfile-contains.fullstop + ln $(tmp)/etc/improper $(tmp)/etc/improper-link + install -d $(tmp)/usr/share/doc/etcfiles + install -d $(tmp)/var/lib + install -m 644 proper $(tmp)/var/lib/foo + install -m 644 debian/README.Debian $(tmp)/usr/share/doc/etcfiles + install -m 644 debian/changelog $(tmp)/usr/share/doc/etcfiles + #gzip -9 $(tmp)/usr/share/doc/etcfiles/changelog + install -d $(tmp)/DEBIAN + install -m 644 debian/conffiles $(tmp)/DEBIAN + + echo 'd41d8cd98f00b204e9800998ecf8427e ./etc/cron.daily/cronfile-normal' \ + > debian/tmp/DEBIAN/md5sums + echo 'd41d8cd98f00b204e9800998ecf8427e ./etc/cron.daily/.cronfile-begins-with-fullstop' \ + >> debian/tmp/DEBIAN/md5sums + echo 'd41d8cd98f00b204e9800998ecf8427e ./etc/cron.daily/cronfile-contains.fullstop' \ + >> debian/tmp/DEBIAN/md5sums + echo '05c72cacce994208128b7d081116b04a ./etc/proper' \ + >> debian/tmp/DEBIAN/md5sums + echo 'ab371382468880299e5ebd05921764ce etc/improper' \ + >> debian/tmp/DEBIAN/md5sums + echo 'ab371382468880299e5ebd05921764ce usr/bin/foo' \ + >> debian/tmp/DEBIAN/md5sums + echo 'this is a malformed line' \ + >> debian/tmp/DEBIAN/md5sums + echo '56fb27e455dd86d8801f1ecd3a4cee49 usr/share/doc/etcfiles/README.Debian' \ + >> debian/tmp/DEBIAN/md5sums + + install -d $(tmponly)/etc/etcfiles + touch $(tmponly)/etc/etcfiles/foo + touch $(tmponly)/etc/etcfiles/bar + install -d $(tmponly)/usr/share/doc + cd $(tmponly)/usr/share/doc && ln -s etcfiles only-etcfiles + install -d $(tmponly)/DEBIAN + install -m 644 debian/conffiles.only $(tmponly)/DEBIAN/conffiles + + dpkg-gencontrol -isp -petcfiles + dpkg-gencontrol -isp -ponly-etcfiles -P$(tmponly) + dpkg --build $(tmp) .. + dpkg --build $(tmponly) .. + +binary: binary-indep + +.PHONY: binary-indep binary clean diff --git a/t/recipes/checks/debian/rules/legacy-etcfiles/build-spec/fill-values b/t/recipes/checks/debian/rules/legacy-etcfiles/build-spec/fill-values new file mode 100644 index 0000000..86deb10 --- /dev/null +++ b/t/recipes/checks/debian/rules/legacy-etcfiles/build-spec/fill-values @@ -0,0 +1,5 @@ +Skeleton: upload-native +Testname: legacy-etcfiles +Source: etcfiles +Version: 1 +Description: Legacy test "etcfiles" diff --git a/t/recipes/checks/debian/rules/legacy-etcfiles/build-spec/orig/improper b/t/recipes/checks/debian/rules/legacy-etcfiles/build-spec/orig/improper new file mode 100644 index 0000000..23656f4 --- /dev/null +++ b/t/recipes/checks/debian/rules/legacy-etcfiles/build-spec/orig/improper @@ -0,0 +1,2 @@ +[config] + var = value \ No newline at end of file diff --git a/t/recipes/checks/debian/rules/legacy-etcfiles/build-spec/orig/proper b/t/recipes/checks/debian/rules/legacy-etcfiles/build-spec/orig/proper new file mode 100644 index 0000000..f3dc68b --- /dev/null +++ b/t/recipes/checks/debian/rules/legacy-etcfiles/build-spec/orig/proper @@ -0,0 +1,2 @@ +# i am a config file +foo = var \ No newline at end of file diff --git a/t/recipes/checks/debian/rules/legacy-etcfiles/eval/desc b/t/recipes/checks/debian/rules/legacy-etcfiles/eval/desc new file mode 100644 index 0000000..e11916e --- /dev/null +++ b/t/recipes/checks/debian/rules/legacy-etcfiles/eval/desc @@ -0,0 +1,2 @@ +Testname: legacy-etcfiles +Check: debian/rules diff --git a/t/recipes/checks/debian/rules/legacy-etcfiles/eval/hints b/t/recipes/checks/debian/rules/legacy-etcfiles/eval/hints new file mode 100644 index 0000000..0a58f09 --- /dev/null +++ b/t/recipes/checks/debian/rules/legacy-etcfiles/eval/hints @@ -0,0 +1 @@ +etcfiles (source): debian-rules-missing-required-target binary-arch [debian/rules] diff --git a/t/recipes/checks/debian/rules/legacy-etcfiles/eval/post-test b/t/recipes/checks/debian/rules/legacy-etcfiles/eval/post-test new file mode 100644 index 0000000..faeef0b --- /dev/null +++ b/t/recipes/checks/debian/rules/legacy-etcfiles/eval/post-test @@ -0,0 +1 @@ +s/\(current is ([0-9]+\.)+[0-9]\)/(current is CURRENT)/ diff --git a/t/recipes/checks/debian/rules/legacy-fields/build-spec/debian/changelog.in b/t/recipes/checks/debian/rules/legacy-fields/build-spec/debian/changelog.in new file mode 100644 index 0000000..38fc4e9 --- /dev/null +++ b/t/recipes/checks/debian/rules/legacy-fields/build-spec/debian/changelog.in @@ -0,0 +1,10 @@ +fields ([% $version %]) [% $distribution %]; urgency=low + + * This package adds tests for the following tags: + - debian-revision-not-well-formed + - depends-on-python-minimal + - essential-no-not-needed + - debian-revision-should-not-be-zero + - new-essential-package + + -- Tobias Quathamer Sun, 10 Apr 2011 14:30:00 +0100 diff --git a/t/recipes/checks/debian/rules/legacy-fields/build-spec/debian/control b/t/recipes/checks/debian/rules/legacy-fields/build-spec/debian/control new file mode 100644 index 0000000..d980a6e --- /dev/null +++ b/t/recipes/checks/debian/rules/legacy-fields/build-spec/debian/control @@ -0,0 +1,28 @@ +Source: fields +Section: does-not-exist +Priority: standard +Maintainer: Lintian Maintainers +Standards-Version: 3.9.2 + +Package: fields +Essential: no +Architecture: all +Depends: python-minimal +Description: Generate some errors + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. + +Package: another-version +Essential: yes +Section: admin +Architecture: all +Description: Also generate some errors + This package gets another version number and tries to sneak in a new + essential package. + . + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. diff --git a/t/recipes/checks/debian/rules/legacy-fields/build-spec/debian/rules b/t/recipes/checks/debian/rules/legacy-fields/build-spec/debian/rules new file mode 100755 index 0000000..11ad4a7 --- /dev/null +++ b/t/recipes/checks/debian/rules/legacy-fields/build-spec/debian/rules @@ -0,0 +1,33 @@ +#!/usr/bin/make -f + +tmp=debian/tmp + +build-arch: + +build-indep: + +build: build-arch build-indep + +binary-arch: + +binary-indep: + install -d $(tmp)/usr/share/doc/fields + install -m 644 debian/changelog \ + $(tmp)/usr/share/doc/fields/changelog + gzip -n -9 $(tmp)/usr/share/doc/fields/changelog + dh_md5sums -pfields -P$(tmp) + dpkg-gencontrol -pfields -P$(tmp) + dpkg --build $(tmp) .. + rm -rf $(tmp) + + # Create another package with a different version + dh_md5sums -panother-version -P$(tmp) + dpkg-gencontrol -panother-version -v123.4-0 -P$(tmp) + dpkg --build $(tmp) .. + +binary: binary-arch binary-indep + +clean: + rm -rf debian/files $(tmp) debian/substvars + +.PHONY: build-arch build-indep build binary-arch binary-indep binary clean diff --git a/t/recipes/checks/debian/rules/legacy-fields/build-spec/fill-values b/t/recipes/checks/debian/rules/legacy-fields/build-spec/fill-values new file mode 100644 index 0000000..fe90eb0 --- /dev/null +++ b/t/recipes/checks/debian/rules/legacy-fields/build-spec/fill-values @@ -0,0 +1,5 @@ +Skeleton: upload-non-native +Testname: legacy-fields +Source: fields +Version: 1.5-.3 +Description: Legacy test "fields" diff --git a/t/recipes/checks/debian/rules/legacy-fields/eval/desc b/t/recipes/checks/debian/rules/legacy-fields/eval/desc new file mode 100644 index 0000000..e29ae38 --- /dev/null +++ b/t/recipes/checks/debian/rules/legacy-fields/eval/desc @@ -0,0 +1,2 @@ +Testname: legacy-fields +Check: debian/rules diff --git a/t/recipes/checks/debian/rules/legacy-fields/eval/hints b/t/recipes/checks/debian/rules/legacy-fields/eval/hints new file mode 100644 index 0000000..4ec1eba --- /dev/null +++ b/t/recipes/checks/debian/rules/legacy-fields/eval/hints @@ -0,0 +1 @@ +fields (source): rules-require-build-prerequisite (does not satisfy debhelper:any | debhelper-compat:any) [debian/rules] diff --git a/t/recipes/checks/debian/rules/legacy-fields/eval/post-test b/t/recipes/checks/debian/rules/legacy-fields/eval/post-test new file mode 100644 index 0000000..faeef0b --- /dev/null +++ b/t/recipes/checks/debian/rules/legacy-fields/eval/post-test @@ -0,0 +1 @@ +s/\(current is ([0-9]+\.)+[0-9]\)/(current is CURRENT)/ diff --git a/t/recipes/checks/debian/rules/legacy-scripts/build-spec/debian/changelog.in b/t/recipes/checks/debian/rules/legacy-scripts/build-spec/debian/changelog.in new file mode 100644 index 0000000..935c633 --- /dev/null +++ b/t/recipes/checks/debian/rules/legacy-scripts/build-spec/debian/changelog.in @@ -0,0 +1,41 @@ +scripts ([% $version %]) [% $distribution %]; urgency=low + + * I'm also not able to write my name. + * Added a script in /etc/Xsession.d + * Bizarre version number courtesy of + https://wiki.ubuntu.com/SecurityUpdateProcedures#Prepare + + -- Mark 'HE' Brokschmitt Thu, 23 Jun 2005 14:32:39 +0200 + +scripts (5-1) unstable; urgency=low + + * I'm making a typo in my own name... And I want lintian to warn me about + it. + + -- Jeroen van Wolffelaar Sun, 18 Apr 2004 02:26:34 +0200 + +scripts (4-1) unstable; urgency=low + + * Add new example to check that not executable files with a shebang line + called *in don't trigger the script-not-executable warning. + + -- Marc 'HE' Brockschmidt Wed, 14 Apr 2004 19:44:04 +0200 + +scripts (3-3) unstable; urgency=low + + * Add suidperlfoo and some code in debian/rules to + check the new suidperl checks + + -- Frank Lichtenheld Wed, 31 Mar 2004 21:06:20 +0000 + +scripts (2-1) unstable; urgency=low + + * Add tkfoo script for tk checkings + + -- Lintian Maintainers Sat, 21 Feb 2004 17:13:36 +0100 + +scripts (1-0) unstable; urgency=low + + * Initial version + + -- Lintian Maintainers Sat, 10 Feb 2001 15:37:31 -0800 diff --git a/t/recipes/checks/debian/rules/legacy-scripts/build-spec/debian/control.in b/t/recipes/checks/debian/rules/legacy-scripts/build-spec/debian/control.in new file mode 100644 index 0000000..75a521f --- /dev/null +++ b/t/recipes/checks/debian/rules/legacy-scripts/build-spec/debian/control.in @@ -0,0 +1,16 @@ +Source: scripts +Section: interpreters +Priority: optional +Maintainer: Lintian Maintainers +Uploaders: Jeroen van Wolfelaar , Marc 'HE' Brockschmidt +Build-Depends-Indep: dpatch +Standards-Version: 3.2.1 + +Package: scripts +Architecture: [% $package_architecture %] +Depends: test, ruby1.8, build-essential, libssl0.9.7, php7.0-cli +Recommends: tk8.4 | wish +Description: test lintian's script file checks + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. diff --git a/t/recipes/checks/debian/rules/legacy-scripts/build-spec/debian/copyright b/t/recipes/checks/debian/rules/legacy-scripts/build-spec/debian/copyright new file mode 100644 index 0000000..ad8a119 --- /dev/null +++ b/t/recipes/checks/debian/rules/legacy-scripts/build-spec/debian/copyright @@ -0,0 +1,5 @@ +This file contains the phrase "under the same terms as Perl itself" to +trigger warnings about not having common-licenses references. + +This file contains the phrase "public domain" which should suppress +warnings about no copyright date. diff --git a/t/recipes/checks/debian/rules/legacy-scripts/build-spec/debian/patches/00list b/t/recipes/checks/debian/rules/legacy-scripts/build-spec/debian/patches/00list new file mode 100644 index 0000000..3b9d37e --- /dev/null +++ b/t/recipes/checks/debian/rules/legacy-scripts/build-spec/debian/patches/00list @@ -0,0 +1,11 @@ +01_not_here_right_now.dpatch + +# some comment +/* some more + elaborate comment + which needs DPATCH_OPTION_CPP=1 + */02_i_dont_have_a_description.patch 03_specified_without_dpatch + +// and again a comment + +04_i_dont_have_a_description_either.patch diff --git a/t/recipes/checks/debian/rules/legacy-scripts/build-spec/debian/patches/00list.sparc b/t/recipes/checks/debian/rules/legacy-scripts/build-spec/debian/patches/00list.sparc new file mode 100644 index 0000000..8b47ab3 --- /dev/null +++ b/t/recipes/checks/debian/rules/legacy-scripts/build-spec/debian/patches/00list.sparc @@ -0,0 +1 @@ +01_some_other_patch_thats_not_in_the_package.dpatch diff --git a/t/recipes/checks/debian/rules/legacy-scripts/build-spec/debian/patches/00options b/t/recipes/checks/debian/rules/legacy-scripts/build-spec/debian/patches/00options new file mode 100644 index 0000000..57ffeb6 --- /dev/null +++ b/t/recipes/checks/debian/rules/legacy-scripts/build-spec/debian/patches/00options @@ -0,0 +1 @@ +DPATCH_OPTION_CPP=1 diff --git a/t/recipes/checks/debian/rules/legacy-scripts/build-spec/debian/patches/02_i_dont_have_a_description.patch b/t/recipes/checks/debian/rules/legacy-scripts/build-spec/debian/patches/02_i_dont_have_a_description.patch new file mode 100644 index 0000000..9279c1b --- /dev/null +++ b/t/recipes/checks/debian/rules/legacy-scripts/build-spec/debian/patches/02_i_dont_have_a_description.patch @@ -0,0 +1,7 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 02_i_dont_have_a_description.patch.dpatch by Marc 'HE' Brockschmidt > +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: No description. + +@DPATCH@ diff --git a/t/recipes/checks/debian/rules/legacy-scripts/build-spec/debian/patches/03_specified_without_dpatch.dpatch b/t/recipes/checks/debian/rules/legacy-scripts/build-spec/debian/patches/03_specified_without_dpatch.dpatch new file mode 100644 index 0000000..8303ac6 --- /dev/null +++ b/t/recipes/checks/debian/rules/legacy-scripts/build-spec/debian/patches/03_specified_without_dpatch.dpatch @@ -0,0 +1,5 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## All lines beginning with `## DP:' are a description of the patch. +## DP: Listed in 00list without .dpatch suffix. + +@DPATCH@ diff --git a/t/recipes/checks/debian/rules/legacy-scripts/build-spec/debian/patches/04_i_dont_have_a_description_either.patch b/t/recipes/checks/debian/rules/legacy-scripts/build-spec/debian/patches/04_i_dont_have_a_description_either.patch new file mode 100644 index 0000000..b603f16 --- /dev/null +++ b/t/recipes/checks/debian/rules/legacy-scripts/build-spec/debian/patches/04_i_dont_have_a_description_either.patch @@ -0,0 +1,7 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 04_i_dont_have_a_description_either.patch by Adam D. Barratt +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: + +@DPATCH@ diff --git a/t/recipes/checks/debian/rules/legacy-scripts/build-spec/debian/postinst b/t/recipes/checks/debian/rules/legacy-scripts/build-spec/debian/postinst new file mode 100644 index 0000000..7c5baf1 --- /dev/null +++ b/t/recipes/checks/debian/rules/legacy-scripts/build-spec/debian/postinst @@ -0,0 +1,14 @@ +#!/bin/sh + +if [ -x "/etc/init.d/lsb-broken" ] ; then + update-rc.d lsb-broken defaults >/dev/null +fi +if [ -x "/etc/init.d/no-lsb" ] ; then + update-rc.d no-lsb defaults >/dev/null +fi +if [ -x "/etc/init.d/skeleton" ] ; then + update-rc.d skeleton defaults >/dev/null +fi +if [ -x "/etc/init.d/lsb-other" ] ; then + update-rc.d lsb-other defaults >/dev/null +fi diff --git a/t/recipes/checks/debian/rules/legacy-scripts/build-spec/debian/postrm b/t/recipes/checks/debian/rules/legacy-scripts/build-spec/debian/postrm new file mode 100644 index 0000000..8fa75a2 --- /dev/null +++ b/t/recipes/checks/debian/rules/legacy-scripts/build-spec/debian/postrm @@ -0,0 +1,9 @@ +#!/bin/sh -e + +if [ "$1" = purge ] ; then + update-rc.d lsb-broken remove >/dev/null + update-rc.d no-lsb remove >/dev/null + update-rc.d skeleton remove >/dev/null + update-rc.d lsb-other remove >/dev/null + update-rc.d lsb-other remove >/dev/null +fi diff --git a/t/recipes/checks/debian/rules/legacy-scripts/build-spec/debian/preinst b/t/recipes/checks/debian/rules/legacy-scripts/build-spec/debian/preinst new file mode 100644 index 0000000..0799557 --- /dev/null +++ b/t/recipes/checks/debian/rules/legacy-scripts/build-spec/debian/preinst @@ -0,0 +1,15 @@ +#!/bin/sh + +set -e +set -x + +# +# Some comments here +# + +# This serves as an example of an "empty" script, so +# please do not add any real code here, thank you :) + +#DEBHELPER# + +exit 0 diff --git a/t/recipes/checks/debian/rules/legacy-scripts/build-spec/debian/rules b/t/recipes/checks/debian/rules/legacy-scripts/build-spec/debian/rules new file mode 100755 index 0000000..ee3677e --- /dev/null +++ b/t/recipes/checks/debian/rules/legacy-scripts/build-spec/debian/rules @@ -0,0 +1,105 @@ +#!/usr/bin/make -f + +tmp=debian/tmp + +build-arch: + echo "Hi, in an arch: all package, I am a bug!" + +build-indep: + +build: build-arch build-indep + +binary-arch: + echo "Hi, in an arch: all package, I am a bug!" + +binary-indep: + install -d $(tmp)/usr/bin/ + install -d $(tmp)/etc/X11/Xsession.d/ + install -d $(tmp)/etc/init.d/ + install -d $(tmp)/etc/csh/login.d/ + install -d $(tmp)/etc/fish.d/ + install -d $(tmp)/usr/share/scripts/ + install -d $(tmp)/usr/share/doc/scripts/ + install -d $(tmp)/usr/lib/cgi-bin + install -d $(tmp)/usr/src/scripts + install -d $(tmp)/DEBIAN + + install -m 755 csh-foo $(tmp)/etc/csh/login.d/ + install -m 755 envfoo $(tmp)/usr/bin/ + install -m 755 fish-foo $(tmp)/etc/fish.d/ + install -m 755 jruby-broken $(tmp)/usr/bin/ + install -m 755 perlfoo $(tmp)/usr/bin/ + install -m 755 rubyfoo $(tmp)/usr/bin/ +# This doesn't use "env" but should also trigger script-in-usr-share-doc + install -m 755 rubyfoo $(tmp)/usr/share/doc/scripts/ + install -m 755 make-foo $(tmp)/usr/bin/ + install -m 755 lefty-foo $(tmp)/usr/bin/ + install -m 4751 perlfoo $(tmp)/usr/bin/suidperlfoo2 + install -m 755 sh-broken $(tmp)/usr/bin/ + install -m 4555 suidperlfoo $(tmp)/usr/bin/ + install -m 755 tkfoo $(tmp)/usr/bin/ + install -m 755 wishfoo $(tmp)/usr/bin/ + install -m 644 xsession-test $(tmp)/etc/X11/Xsession.d/ + +# Permissions here aren't part of what's being tested, but let us exercise +# some other errors. + install -m 755 perl-bizarre-1 $(tmp)/usr/bin/ + install -m 750 perl-bizarre-2 $(tmp)/usr/bin/ + install -m 754 perl-bizarre-3 $(tmp)/usr/bin/ + install -m 705 guile-bizarre $(tmp)/usr/bin/ + +# First one should produce a warning; second one shouldn't. + install -m 755 gccbug.dpatch $(tmp)/usr/share/scripts/ + install -m 755 gccbug.dpatch $(tmp)/usr/src/scripts/ + + install -m 644 init-skeleton $(tmp)/etc/init.d/skeleton + install -m 755 init-no-lsb $(tmp)/etc/init.d/no-lsb + install -m 755 init-lsb-broken $(tmp)/etc/init.d/lsb-broken + install -m 755 init-lsb-other $(tmp)/etc/init.d/lsb-other + + install -m 755 phpfoo $(tmp)/usr/share/scripts/ + sed 's/php$$/php7.0/' phpfoo > $(tmp)/usr/share/scripts/php7.0foo + chmod 755 $(tmp)/usr/share/scripts/php7.0foo + + install -m 755 phpenvfoo $(tmp)/usr/share/scripts/ + sed 's/php$$/php7.0/' phpenvfoo > $(tmp)/usr/share/scripts/php7.0envfoo + chmod 755 $(tmp)/usr/share/scripts/php7.0envfoo + + echo "#!/usr/bin/perl" >> $(tmp)/usr/share/scripts/foobar.in + chmod 644 $(tmp)/usr/share/scripts/foobar.in + + touch $(tmp)/usr/share/scripts/mono.exe + chmod 755 $(tmp)/usr/share/scripts/mono.exe + + echo "#!/bin/sh" > $(tmp)/usr/share/scripts/foo\$$bar + chmod 755 $(tmp)/usr/share/scripts/foo\$$bar + + echo "#!/bin/sh" > $(tmp)/usr/lib/cgi-bin/cgi-script + chmod 755 $(tmp)/usr/lib/cgi-bin/cgi-script + + echo "#!/bin/sh" > $(tmp)/usr/bin/test.sh + chmod 755 $(tmp)/usr/bin/test.sh + + + dh_testroot # dummy to test missing debhelper dependency + + + install -m 644 debian/changelog $(tmp)/usr/share/doc/scripts/changelog.Debian + gzip -n -9 $(tmp)/usr/share/doc/scripts/changelog.Debian + install -m 644 debian/copyright $(tmp)/usr/share/doc/scripts/copyright + + install -m 644 debian/scripts.conffiles $(tmp)/DEBIAN/conffiles + install -m 755 debian/preinst $(tmp)/DEBIAN/preinst + install -m 755 debian/postinst $(tmp)/DEBIAN/postinst + install -m 755 debian/postrm $(tmp)/DEBIAN/postrm + touch $(tmp)/DEBIAN/prerm + chmod 755 $(tmp)/DEBIAN/prerm + dpkg-gencontrol -isp + dpkg --build $(tmp) .. + +binary: binary-arch binary-indep + +clean: + rm -rf debian/files $(tmp) debian/substvars + +.PHONY: build-arch build-indep build binary-arch binary-indep binary clean diff --git a/t/recipes/checks/debian/rules/legacy-scripts/build-spec/debian/scripts.conffiles b/t/recipes/checks/debian/rules/legacy-scripts/build-spec/debian/scripts.conffiles new file mode 100644 index 0000000..01a371a --- /dev/null +++ b/t/recipes/checks/debian/rules/legacy-scripts/build-spec/debian/scripts.conffiles @@ -0,0 +1,6 @@ +/etc/init.d/lsb-broken +/etc/init.d/lsb-other +/etc/init.d/no-lsb +/etc/X11/Xsession.d/xsession-test +/etc/csh/login.d/csh-foo +/etc/fish.d/fish-foo diff --git a/t/recipes/checks/debian/rules/legacy-scripts/build-spec/debian/watch b/t/recipes/checks/debian/rules/legacy-scripts/build-spec/debian/watch new file mode 100644 index 0000000..dba5815 --- /dev/null +++ b/t/recipes/checks/debian/rules/legacy-scripts/build-spec/debian/watch @@ -0,0 +1,8 @@ +# watch file with upstream version mangling + +version=2 +opts="uversionmangle=s/$/ds/" \ +http://qa.debian.org/watch/sf.php?project=foo scripts\.([\d.]+)\.tar\.gz debian uupdate + +version=3 +http://ftp.sf.net/foo/foo_bar(.+)\.Z 5 uupdate \ No newline at end of file diff --git a/t/recipes/checks/debian/rules/legacy-scripts/build-spec/fill-values b/t/recipes/checks/debian/rules/legacy-scripts/build-spec/fill-values new file mode 100644 index 0000000..8a68457 --- /dev/null +++ b/t/recipes/checks/debian/rules/legacy-scripts/build-spec/fill-values @@ -0,0 +1,6 @@ +Testname: legacy-scripts +Source: scripts +Version: 6ds-1ubuntu0.5.10.1 +Package-Architecture: all +Skeleton: upload-non-native +Description: Legacy test "scripts" diff --git a/t/recipes/checks/debian/rules/legacy-scripts/build-spec/orig/csh-foo b/t/recipes/checks/debian/rules/legacy-scripts/build-spec/orig/csh-foo new file mode 100644 index 0000000..eaf47a1 --- /dev/null +++ b/t/recipes/checks/debian/rules/legacy-scripts/build-spec/orig/csh-foo @@ -0,0 +1,2 @@ +#! /bin/csh + diff --git a/t/recipes/checks/debian/rules/legacy-scripts/build-spec/orig/envfoo b/t/recipes/checks/debian/rules/legacy-scripts/build-spec/orig/envfoo new file mode 100755 index 0000000..e005037 --- /dev/null +++ b/t/recipes/checks/debian/rules/legacy-scripts/build-spec/orig/envfoo @@ -0,0 +1,4 @@ +#! /bin/env python + +if __name__ == '__main__': + print 'Hi there' diff --git a/t/recipes/checks/debian/rules/legacy-scripts/build-spec/orig/fish-foo b/t/recipes/checks/debian/rules/legacy-scripts/build-spec/orig/fish-foo new file mode 100644 index 0000000..7f59139 --- /dev/null +++ b/t/recipes/checks/debian/rules/legacy-scripts/build-spec/orig/fish-foo @@ -0,0 +1,2 @@ +#! /usr/bin/fish + diff --git a/t/recipes/checks/debian/rules/legacy-scripts/build-spec/orig/gccbug.dpatch b/t/recipes/checks/debian/rules/legacy-scripts/build-spec/orig/gccbug.dpatch new file mode 100755 index 0000000..65cbf37 --- /dev/null +++ b/t/recipes/checks/debian/rules/legacy-scripts/build-spec/orig/gccbug.dpatch @@ -0,0 +1,39 @@ +#! /bin/sh -e + +# DP: Use sensible-editor instead of vi as fallback editor + +# Taken from gcc-4.1-source. Chokes bash -n (due to the patch) despite being +# a valid dpatch, so don't warn about it if it's in /usr/src. + +dir= +if [ $# -eq 3 -a "$2" = '-d' ]; then + pdir="-d $3" + dir="$3/" +elif [ $# -ne 1 ]; then + echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" + exit 1 +fi +case "$1" in + -patch) + patch $pdir -f --no-backup-if-mismatch -p0 < $0 + ;; + -unpatch) + patch $pdir -f --no-backup-if-mismatch -R -p0 < $0 + ;; + *) + echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" + exit 1 +esac +exit 0 + +--- gcc/gccbug.in~ 2003-03-01 00:51:42.000000000 +0100 ++++ gcc/gccbug.in 2003-03-02 12:08:36.000000000 +0100 +@@ -134,7 +134,7 @@ + # If they don't have a preferred editor set, then use + if [ -z "$VISUAL" ]; then + if [ -z "$EDITOR" ]; then +- EDIT=vi ++ EDIT=/usr/bin/sensible-editor + else + EDIT="$EDITOR" + fi diff --git a/t/recipes/checks/debian/rules/legacy-scripts/build-spec/orig/guile-bizarre b/t/recipes/checks/debian/rules/legacy-scripts/build-spec/orig/guile-bizarre new file mode 100644 index 0000000..70e2c74 --- /dev/null +++ b/t/recipes/checks/debian/rules/legacy-scripts/build-spec/orig/guile-bizarre @@ -0,0 +1,6 @@ +#! /bin/sh +# -*- scheme -*- +exec guile -s $0 $* +# Seen in the wild as build-guile-gtk in libguilegtk-1.2-dev (0.31-5.1) +# Tests script_is_evil_and_wrong +!# diff --git a/t/recipes/checks/debian/rules/legacy-scripts/build-spec/orig/init-lsb-broken b/t/recipes/checks/debian/rules/legacy-scripts/build-spec/orig/init-lsb-broken new file mode 100644 index 0000000..e4dfa92 --- /dev/null +++ b/t/recipes/checks/debian/rules/legacy-scripts/build-spec/orig/init-lsb-broken @@ -0,0 +1,34 @@ +#! /bin/sh +### BEGIN INIT INFO +# Provides: bad-lsb +# Required-Start: $local_fs $remote_fs +# Required-Stop: +# Default-Start: 1 2 3 4 5 +# Default-Stop: S 0 1 6 X +# Short-Description: Example Lintian initscript +# but this can't be continued +# Description: An example of a bad LSB section in an init script. +# This continuation is allowed (with spaces). +# This one is too (with tabs). +# X-Debian-Foo: Some unknown but valid keyword. +# Foo: Some invalid keyword. + +# Whoops, no terminating line. + +# And then we have this duplicate section. +### BEGIN INIT INFO +# Required-Start: This one doesn't count. +### END INIT INFO + +# Hey, look at all of those missing actions! But stop isn't missing. +case "$1" in + start|stop) + echo "Blah" + ;; + *) + echo "Usage: foo start" >&2 + exit 3 + ;; +esac + +: diff --git a/t/recipes/checks/debian/rules/legacy-scripts/build-spec/orig/init-lsb-other b/t/recipes/checks/debian/rules/legacy-scripts/build-spec/orig/init-lsb-other new file mode 100644 index 0000000..adb4795 --- /dev/null +++ b/t/recipes/checks/debian/rules/legacy-scripts/build-spec/orig/init-lsb-other @@ -0,0 +1,22 @@ +#! /bin/sh +### BEGIN INIT INFO +# Provides: lsb-other +# Required-Start: $local_fs $remote_fs +# Required-Stop: $local_fs $remote_fs +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +# Description: This is another LSB script test, which has a missing +# Short-Description. +### END INIT INFO + +case "$1" in + start|stop|restart|reload|force-reload) + echo "Blah" + ;; + *) + echo "Usage: foo start" >&2 + exit 3 + ;; +esac + +: diff --git a/t/recipes/checks/debian/rules/legacy-scripts/build-spec/orig/init-no-lsb b/t/recipes/checks/debian/rules/legacy-scripts/build-spec/orig/init-no-lsb new file mode 100644 index 0000000..6b994dd --- /dev/null +++ b/t/recipes/checks/debian/rules/legacy-scripts/build-spec/orig/init-no-lsb @@ -0,0 +1,17 @@ +#! /bin/sh +# No LSB section, but otherwise okay. (Well, the messages are bad, but we +# don't check that yet.) + +case "$1" in + start) + echo "Blah starting" + ;; + stop) + echo "Blah stopping" + ;; + restart|force-reload) + echo "Blah restarting" + ;; +esac + +: diff --git a/t/recipes/checks/debian/rules/legacy-scripts/build-spec/orig/init-skeleton b/t/recipes/checks/debian/rules/legacy-scripts/build-spec/orig/init-skeleton new file mode 100644 index 0000000..c868508 --- /dev/null +++ b/t/recipes/checks/debian/rules/legacy-scripts/build-spec/orig/init-skeleton @@ -0,0 +1,150 @@ +#! /bin/sh +### BEGIN INIT INFO +# Provides: skeleton +# Required-Start: $local_fs $remote_fs +# Required-Stop: $local_fs $remote_fs +# Default-Start: 2 3 4 5 +# Default-Stop: S 0 1 6 +# Short-Description: Example Lintian initscript +# Description: This file should be used to construct scripts to be +# placed in /etc/init.d. +### END INIT INFO + +# Do NOT "set -e" + +# PATH should only include /usr/* if it runs after the mountnfs.sh script +PATH=/usr/sbin:/usr/bin:/sbin:/bin +DESC="Description of the service" +NAME=daemonexecutablename +DAEMON=/usr/sbin/$NAME +DAEMON_ARGS="--options args" +PIDFILE=/var/run/$NAME.pid +SCRIPTNAME=/etc/init.d/$NAME + +# Exit if the package is not installed +[ -x "$DAEMON" ] || exit 0 + +# Read configuration variable file if it is present +[ -r /etc/default/$NAME ] && . /etc/default/$NAME + +# Load the VERBOSE setting and other rcS variables +[ -f /etc/default/rcS ] && . /etc/default/rcS + +# Define LSB log_* functions. +# Depend on lsb-base (>= 3.0-6) to ensure that this file is present. +. /lib/lsb/init-functions + +# +# Function that starts the daemon/service +# +do_start() +{ + # Return + # 0 if daemon has been started + # 1 if daemon was already running + # 2 if daemon could not be started + start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON --test > /dev/null \ + || return 1 + start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON -- \ + $DAEMON_ARGS \ + || return 2 + # Add code here, if necessary, that waits for the process to be ready + # to handle requests from services started subsequently which depend + # on this one. As a last resort, sleep for some time. +} + +# +# Function that stops the daemon/service +# +do_stop() +{ + # Return + # 0 if daemon has been stopped + # 1 if daemon was already stopped + # 2 if daemon could not be stopped + # other if a failure occurred + start-stop-daemon --stop --quiet --retry=TERM/30/KILL/5 --pidfile $PIDFILE --name $NAME + RETVAL="$?" + [ "$RETVAL" = 2 ] && return 2 + # Wait for children to finish too if this is a daemon that forks + # and if the daemon is only ever run from this initscript. + # If the above conditions are not satisfied then add some other code + # that waits for the process to drop all resources that could be + # needed by services started subsequently. A last resort is to + # sleep for some time. + start-stop-daemon --stop --quiet --oknodo --retry=0/30/KILL/5 --exec $DAEMON + [ "$?" = 2 ] && return 2 + # Many daemons don't delete their pidfiles when they exit. + rm -f $PIDFILE + return "$RETVAL" +} + +# +# Function that sends a SIGHUP to the daemon/service +# +do_reload() { + # + # If the daemon can reload its configuration without + # restarting (for example, when it is sent a SIGHUP), + # then implement that here. + # + start-stop-daemon --stop --signal 1 --quiet --pidfile $PIDFILE --name $NAME + return 0 +} + +case "$1" in + start) + [ "$VERBOSE" != no ] && log_daemon_msg "Starting $DESC" "$NAME" + do_start + case "$?" in + 0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;; + 2) [ "$VERBOSE" != no ] && log_end_msg 1 ;; + esac + ;; + stop) + [ "$VERBOSE" != no ] && log_daemon_msg "Stopping $DESC" "$NAME" + do_stop + case "$?" in + 0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;; + 2) [ "$VERBOSE" != no ] && log_end_msg 1 ;; + esac + ;; + #reload|force-reload) + # + # If do_reload() is not implemented then leave this commented out + # and leave 'force-reload' as an alias for 'restart'. + # + #log_daemon_msg "Reloading $DESC" "$NAME" + #do_reload + #log_end_msg $? + #;; + restart|force-reload) + # + # If the "reload" option is implemented then remove the + # 'force-reload' alias + # + log_daemon_msg "Restarting $DESC" "$NAME" + do_stop + case "$?" in + 0|1) + do_start + case "$?" in + 0) log_end_msg 0 ;; + 1) log_end_msg 1 ;; # Old process is still running + *) log_end_msg 1 ;; # Failed to start + esac + ;; + *) + # Failed to stop + log_end_msg 1 + ;; + esac + ;; + *) + #echo "Usage: $SCRIPTNAME {start|stop|restart|reload|force-reload}" >&2 + echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload}" >&2 + exit 3 + ;; +esac + +: diff --git a/t/recipes/checks/debian/rules/legacy-scripts/build-spec/orig/jruby-broken b/t/recipes/checks/debian/rules/legacy-scripts/build-spec/orig/jruby-broken new file mode 100644 index 0000000..56f574d --- /dev/null +++ b/t/recipes/checks/debian/rules/legacy-scripts/build-spec/orig/jruby-broken @@ -0,0 +1,2 @@ +#!/usr/bin/jruby +# There's no non-versioned jruby, so this should be an error. diff --git a/t/recipes/checks/debian/rules/legacy-scripts/build-spec/orig/lefty-foo b/t/recipes/checks/debian/rules/legacy-scripts/build-spec/orig/lefty-foo new file mode 100644 index 0000000..52c003e --- /dev/null +++ b/t/recipes/checks/debian/rules/legacy-scripts/build-spec/orig/lefty-foo @@ -0,0 +1,2 @@ +#!/usr/local/bin/lefty + diff --git a/t/recipes/checks/debian/rules/legacy-scripts/build-spec/orig/make-foo b/t/recipes/checks/debian/rules/legacy-scripts/build-spec/orig/make-foo new file mode 100644 index 0000000..6b787b5 --- /dev/null +++ b/t/recipes/checks/debian/rules/legacy-scripts/build-spec/orig/make-foo @@ -0,0 +1,3 @@ +#!/usr/bin/make + + diff --git a/t/recipes/checks/debian/rules/legacy-scripts/build-spec/orig/perl-bizarre-1 b/t/recipes/checks/debian/rules/legacy-scripts/build-spec/orig/perl-bizarre-1 new file mode 100644 index 0000000..fc632c8 --- /dev/null +++ b/t/recipes/checks/debian/rules/legacy-scripts/build-spec/orig/perl-bizarre-1 @@ -0,0 +1,11 @@ +#! /bin/sh +eval '(exit $?0)' && eval 'PERL_BADLANG=x;export PERL_BADLANG;: \ +;exec perl -x -S -- "$0" ${1+"$@"};#'if 0; +eval 'setenv PERL_BADLANG x;exec perl -x -S -- "$0" $argv:q;#'.q+ +#!perl -w +package Htex::a2ping; $0=~/(.*)/s;unshift@INC,'.';do($1);die$@if$@;__END__+if !1; +# This Perl script was generated by JustLib2 at Wed Apr 23 09:14:13 2003. +# Don't touch/remove any lines above; http://www.inf.bme.hu/~pts/justlib + +# The above was actually seen in the wild and stresses the +# script_is_evil_and_wrong test. diff --git a/t/recipes/checks/debian/rules/legacy-scripts/build-spec/orig/perl-bizarre-2 b/t/recipes/checks/debian/rules/legacy-scripts/build-spec/orig/perl-bizarre-2 new file mode 100644 index 0000000..afd9cfe --- /dev/null +++ b/t/recipes/checks/debian/rules/legacy-scripts/build-spec/orig/perl-bizarre-2 @@ -0,0 +1,7 @@ +#!/bin/sh +eval 'exec /usr/bin/perl -wS $0 ${1+"$@"}' + if $running_under_some_shell; + +# I'm someone following perlrun except without using the Perl #! line. +# Now something to choke bash. +while (<>) { if (/%#/) { print } } diff --git a/t/recipes/checks/debian/rules/legacy-scripts/build-spec/orig/perl-bizarre-3 b/t/recipes/checks/debian/rules/legacy-scripts/build-spec/orig/perl-bizarre-3 new file mode 100644 index 0000000..44baf75 --- /dev/null +++ b/t/recipes/checks/debian/rules/legacy-scripts/build-spec/orig/perl-bizarre-3 @@ -0,0 +1,6 @@ +eval '(exit $?0)' && eval 'exec perl -wS $0 ${1+"$@"}' +& eval 'exec /usr/bin/perl -wS $0 $argv:q' + if $running_under_some_shell; + +# More utterly bizarreness from perlrun. This one even doesn't work if +# there's a valid #! line on the first line. I don't understand why.... diff --git a/t/recipes/checks/debian/rules/legacy-scripts/build-spec/orig/perlfoo b/t/recipes/checks/debian/rules/legacy-scripts/build-spec/orig/perlfoo new file mode 100644 index 0000000..5b27ed0 --- /dev/null +++ b/t/recipes/checks/debian/rules/legacy-scripts/build-spec/orig/perlfoo @@ -0,0 +1,3 @@ +#! /usr/bin/perl + +print "Hello, World!"; diff --git a/t/recipes/checks/debian/rules/legacy-scripts/build-spec/orig/phpenvfoo b/t/recipes/checks/debian/rules/legacy-scripts/build-spec/orig/phpenvfoo new file mode 100644 index 0000000..cbbfb2e --- /dev/null +++ b/t/recipes/checks/debian/rules/legacy-scripts/build-spec/orig/phpenvfoo @@ -0,0 +1,7 @@ +#!/usr/bin/env php + + +Dumb PHP script + + + diff --git a/t/recipes/checks/debian/rules/legacy-scripts/build-spec/orig/phpfoo b/t/recipes/checks/debian/rules/legacy-scripts/build-spec/orig/phpfoo new file mode 100644 index 0000000..e0595e6 --- /dev/null +++ b/t/recipes/checks/debian/rules/legacy-scripts/build-spec/orig/phpfoo @@ -0,0 +1,7 @@ +#!/usr/bin/php + + +Dumb PHP script + + + diff --git a/t/recipes/checks/debian/rules/legacy-scripts/build-spec/orig/rubyfoo b/t/recipes/checks/debian/rules/legacy-scripts/build-spec/orig/rubyfoo new file mode 100644 index 0000000..8024605 --- /dev/null +++ b/t/recipes/checks/debian/rules/legacy-scripts/build-spec/orig/rubyfoo @@ -0,0 +1,4 @@ +#!/bin/ruby1.8 + +# Ok, that example is really pathetic, but until we have +# some better code in checks/scripts, it will do diff --git a/t/recipes/checks/debian/rules/legacy-scripts/build-spec/orig/sh-broken b/t/recipes/checks/debian/rules/legacy-scripts/build-spec/orig/sh-broken new file mode 100644 index 0000000..7b79074 --- /dev/null +++ b/t/recipes/checks/debian/rules/legacy-scripts/build-spec/orig/sh-broken @@ -0,0 +1,2 @@ +#!/bin/sh +if fi diff --git a/t/recipes/checks/debian/rules/legacy-scripts/build-spec/orig/suidperlfoo b/t/recipes/checks/debian/rules/legacy-scripts/build-spec/orig/suidperlfoo new file mode 100644 index 0000000..bcbc471 --- /dev/null +++ b/t/recipes/checks/debian/rules/legacy-scripts/build-spec/orig/suidperlfoo @@ -0,0 +1,3 @@ +#! /usr/bin/suidperl + +print "Hello, World!"; diff --git a/t/recipes/checks/debian/rules/legacy-scripts/build-spec/orig/tkfoo b/t/recipes/checks/debian/rules/legacy-scripts/build-spec/orig/tkfoo new file mode 100755 index 0000000..533595a --- /dev/null +++ b/t/recipes/checks/debian/rules/legacy-scripts/build-spec/orig/tkfoo @@ -0,0 +1,31 @@ +#!/bin/sh +# +# Insane amount of empty lines and comments + +# +# +# +# + +# +# + +# +# +# + +# +# + +# +# This line makes the next one a comment in Tcl \ +exec wish "$0" -- ${1+"$@"} + +# lintian should not check the following for syntax +# if it detects the line above correctly +# Code snippet taken from eTkTab + +if { [array names prefs keybindings] != "" } { + # Read in the file + array set unparsed_bindings [ read_settings_file $prefs(keybindings)] +} diff --git a/t/recipes/checks/debian/rules/legacy-scripts/build-spec/orig/wishfoo b/t/recipes/checks/debian/rules/legacy-scripts/build-spec/orig/wishfoo new file mode 100644 index 0000000..035c9ad --- /dev/null +++ b/t/recipes/checks/debian/rules/legacy-scripts/build-spec/orig/wishfoo @@ -0,0 +1,4 @@ +#!/usr/bin/wish +# +# This is not actually a wish script, here to force a test of wish +# dependencies. diff --git a/t/recipes/checks/debian/rules/legacy-scripts/build-spec/orig/xsession-test b/t/recipes/checks/debian/rules/legacy-scripts/build-spec/orig/xsession-test new file mode 100644 index 0000000..ca49d72 --- /dev/null +++ b/t/recipes/checks/debian/rules/legacy-scripts/build-spec/orig/xsession-test @@ -0,0 +1,3 @@ +#!/bin/sh + +echo "Foo." diff --git a/t/recipes/checks/debian/rules/legacy-scripts/build-spec/pre-build b/t/recipes/checks/debian/rules/legacy-scripts/build-spec/pre-build new file mode 100755 index 0000000..b5649a8 --- /dev/null +++ b/t/recipes/checks/debian/rules/legacy-scripts/build-spec/pre-build @@ -0,0 +1,5 @@ +#!/bin/sh + +DIR="$1" + +rm -f "$DIR/debian/compat" diff --git a/t/recipes/checks/debian/rules/legacy-scripts/eval/desc b/t/recipes/checks/debian/rules/legacy-scripts/eval/desc new file mode 100644 index 0000000..e56bb23 --- /dev/null +++ b/t/recipes/checks/debian/rules/legacy-scripts/eval/desc @@ -0,0 +1,2 @@ +Testname: legacy-scripts +Check: debian/rules diff --git a/t/recipes/checks/debian/rules/legacy-scripts/eval/hints b/t/recipes/checks/debian/rules/legacy-scripts/eval/hints new file mode 100644 index 0000000..cb1cdbd --- /dev/null +++ b/t/recipes/checks/debian/rules/legacy-scripts/eval/hints @@ -0,0 +1,2 @@ +scripts (source): rules-require-build-prerequisite (does not satisfy debhelper:any | debhelper-compat:any) [debian/rules] +scripts (source): binary-arch-rules-but-pkg-is-arch-indep [debian/rules] diff --git a/t/recipes/checks/debian/rules/legacy-scripts/eval/post-test b/t/recipes/checks/debian/rules/legacy-scripts/eval/post-test new file mode 100644 index 0000000..faeef0b --- /dev/null +++ b/t/recipes/checks/debian/rules/legacy-scripts/eval/post-test @@ -0,0 +1 @@ +s/\(current is ([0-9]+\.)+[0-9]\)/(current is CURRENT)/ diff --git a/t/recipes/checks/debian/rules/permissions-775/build-spec/fill-values b/t/recipes/checks/debian/rules/permissions-775/build-spec/fill-values new file mode 100644 index 0000000..709e867 --- /dev/null +++ b/t/recipes/checks/debian/rules/permissions-775/build-spec/fill-values @@ -0,0 +1,4 @@ +Skeleton: source-native +Testname: permissions-775 +Package-Architecture: all +Description: Test in which debian/rules has group write permissions. diff --git a/t/recipes/checks/debian/rules/permissions-775/build-spec/pre-build b/t/recipes/checks/debian/rules/permissions-775/build-spec/pre-build new file mode 100755 index 0000000..393800f --- /dev/null +++ b/t/recipes/checks/debian/rules/permissions-775/build-spec/pre-build @@ -0,0 +1,5 @@ +#!/bin/sh + +packagedir=$1 + +chmod 775 "$packagedir/debian/rules" diff --git a/t/recipes/checks/debian/rules/permissions-775/eval/desc b/t/recipes/checks/debian/rules/permissions-775/eval/desc new file mode 100644 index 0000000..47f7801 --- /dev/null +++ b/t/recipes/checks/debian/rules/permissions-775/eval/desc @@ -0,0 +1,4 @@ +Testname: permissions-775 +Check: debian/rules +Test-Against: debian-rules-not-executable +See-Also: Bug#945869, Bug#945869 diff --git a/t/recipes/checks/debian/rules/permissions-775/eval/hints b/t/recipes/checks/debian/rules/permissions-775/eval/hints new file mode 100644 index 0000000..e69de29 diff --git a/t/recipes/checks/debian/rules/rules-build-dep-pattern/build-spec/debian/rules b/t/recipes/checks/debian/rules/rules-build-dep-pattern/build-spec/debian/rules new file mode 100755 index 0000000..dbb0df1 --- /dev/null +++ b/t/recipes/checks/debian/rules/rules-build-dep-pattern/build-spec/debian/rules @@ -0,0 +1,37 @@ +#!/usr/bin/make -f + +build-indep: + +build-arch: build-stamp + +build-stamp: + dh build-arch + touch $@ + +build: build-arch build-indep + +# From deejayd 0.8.2-1 +clean: $(PYVERS:%=clean-python%) + +clean-python%: + dh_testdir + dh_testroot + + rm -f build-python* + python$* setup.py clean --all + find $(CURDIR) -name '*pyc' -exec rm -f {} \; + dh_clean + +install: install-stamp +install-stamp: build-stamp + dh install + touch $@ + +binary-arch: install + dh $@ + +binary-indep: install + dh $@ + +binary: binary-arch binary-indep +.PHONY: binary binary-arch binary-indep install clean build build-arch build-indep diff --git a/t/recipes/checks/debian/rules/rules-build-dep-pattern/build-spec/fill-values b/t/recipes/checks/debian/rules/rules-build-dep-pattern/build-spec/fill-values new file mode 100644 index 0000000..7760bbe --- /dev/null +++ b/t/recipes/checks/debian/rules/rules-build-dep-pattern/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: upload-native +Testname: rules-build-dep-pattern +Description: Check recognition of pattern dependencies diff --git a/t/recipes/checks/debian/rules/rules-build-dep-pattern/eval/desc b/t/recipes/checks/debian/rules/rules-build-dep-pattern/eval/desc new file mode 100644 index 0000000..075298a --- /dev/null +++ b/t/recipes/checks/debian/rules/rules-build-dep-pattern/eval/desc @@ -0,0 +1,3 @@ +Testname: rules-build-dep-pattern +See-Also: Bug#536405 +Check: debian/rules diff --git a/t/recipes/checks/debian/rules/rules-build-dep-pattern/eval/hints b/t/recipes/checks/debian/rules/rules-build-dep-pattern/eval/hints new file mode 100644 index 0000000..9827600 --- /dev/null +++ b/t/recipes/checks/debian/rules/rules-build-dep-pattern/eval/hints @@ -0,0 +1 @@ +rules-build-dep-pattern (source): rules-require-build-prerequisite (does not satisfy python2:any | python2-dev:any | python2.7:any | python2.7-dev:any | python3:any | python3-dev:any | python3-all:any | python3-all-dev:any | python3.4:any | python3.4-dev:any | python3.5:any | python3.5-dev:any | python3.6:any | python3.6-dev:any | python3.7:any | python3.7-dev:any) [debian/rules] diff --git a/t/recipes/checks/debian/rules/rules-debug-symbol-migration-possibly-complete/build-spec/debian/rules b/t/recipes/checks/debian/rules/rules-debug-symbol-migration-possibly-complete/build-spec/debian/rules new file mode 100755 index 0000000..0407d98 --- /dev/null +++ b/t/recipes/checks/debian/rules/rules-debug-symbol-migration-possibly-complete/build-spec/debian/rules @@ -0,0 +1,10 @@ +#!/usr/bin/make -f + +%: + dh $@ + +override_dh_strip: + dh_strip prefix --ddeb-migration=foo suffix + dh_strip prefix --dbgsym-migration=foo suffix + dh_strip prefix --dbgsym-migration='apostrophe' suffix + dh_strip prefix --dbgsym-migration='apostrophe << 1' suffix diff --git a/t/recipes/checks/debian/rules/rules-debug-symbol-migration-possibly-complete/build-spec/fill-values b/t/recipes/checks/debian/rules/rules-debug-symbol-migration-possibly-complete/build-spec/fill-values new file mode 100644 index 0000000..b6b29b8 --- /dev/null +++ b/t/recipes/checks/debian/rules/rules-debug-symbol-migration-possibly-complete/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: upload-native +Testname: rules-debug-symbol-migration-possibly-complete +Description: Test for --dbgsym-migration etc. diff --git a/t/recipes/checks/debian/rules/rules-debug-symbol-migration-possibly-complete/eval/desc b/t/recipes/checks/debian/rules/rules-debug-symbol-migration-possibly-complete/eval/desc new file mode 100644 index 0000000..fbb156b --- /dev/null +++ b/t/recipes/checks/debian/rules/rules-debug-symbol-migration-possibly-complete/eval/desc @@ -0,0 +1,2 @@ +Testname: rules-debug-symbol-migration-possibly-complete +Check: debian/rules diff --git a/t/recipes/checks/debian/rules/rules-debug-symbol-migration-possibly-complete/eval/hints b/t/recipes/checks/debian/rules/rules-debug-symbol-migration-possibly-complete/eval/hints new file mode 100644 index 0000000..39d2436 --- /dev/null +++ b/t/recipes/checks/debian/rules/rules-debug-symbol-migration-possibly-complete/eval/hints @@ -0,0 +1,4 @@ +rules-debug-symbol-migration-possibly-complete (source): debug-symbol-migration-possibly-complete --ddeb-migration=foo [debian/rules:7] +rules-debug-symbol-migration-possibly-complete (source): debug-symbol-migration-possibly-complete --dbgsym-migration=foo [debian/rules:8] +rules-debug-symbol-migration-possibly-complete (source): debug-symbol-migration-possibly-complete --dbgsym-migration='apostrophe' [debian/rules:9] +rules-debug-symbol-migration-possibly-complete (source): debug-symbol-migration-possibly-complete --dbgsym-migration='apostrophe << 1' [debian/rules:10] diff --git a/t/recipes/checks/debian/rules/rules-dh-auto-test-does-not-check-deb-build-options-unrel-a/build-spec/debian/rules b/t/recipes/checks/debian/rules/rules-dh-auto-test-does-not-check-deb-build-options-unrel-a/build-spec/debian/rules new file mode 100755 index 0000000..6f702fe --- /dev/null +++ b/t/recipes/checks/debian/rules/rules-dh-auto-test-does-not-check-deb-build-options-unrel-a/build-spec/debian/rules @@ -0,0 +1,9 @@ +#!/usr/bin/make -f + +%: + dh $@ + +override_dh_auto_test: +ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS))) + /bin/true +endif diff --git a/t/recipes/checks/debian/rules/rules-dh-auto-test-does-not-check-deb-build-options-unrel-a/build-spec/fill-values b/t/recipes/checks/debian/rules/rules-dh-auto-test-does-not-check-deb-build-options-unrel-a/build-spec/fill-values new file mode 100644 index 0000000..2e8d239 --- /dev/null +++ b/t/recipes/checks/debian/rules/rules-dh-auto-test-does-not-check-deb-build-options-unrel-a/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: upload-native +Testname: rules-dh-auto-test-does-not-check-deb-build-options-unrel-a +Description: Test for missing checks for DEB_BUILD_PROFILES (false-positive) diff --git a/t/recipes/checks/debian/rules/rules-dh-auto-test-does-not-check-deb-build-options-unrel-a/eval/desc b/t/recipes/checks/debian/rules/rules-dh-auto-test-does-not-check-deb-build-options-unrel-a/eval/desc new file mode 100644 index 0000000..9443f92 --- /dev/null +++ b/t/recipes/checks/debian/rules/rules-dh-auto-test-does-not-check-deb-build-options-unrel-a/eval/desc @@ -0,0 +1,4 @@ +Testname: rules-dh-auto-test-does-not-check-deb-build-options-unrel-a +Test-Against: + override_dh_auto_test-does-not-check-DEB_BUILD_OPTIONS +Check: debian/rules diff --git a/t/recipes/checks/debian/rules/rules-dh-auto-test-does-not-check-deb-build-options-unrel-a/eval/hints b/t/recipes/checks/debian/rules/rules-dh-auto-test-does-not-check-deb-build-options-unrel-a/eval/hints new file mode 100644 index 0000000..e69de29 diff --git a/t/recipes/checks/debian/rules/rules-dh-auto-test-does-not-check-deb-build-options-unrel-b/build-spec/debian/rules b/t/recipes/checks/debian/rules/rules-dh-auto-test-does-not-check-deb-build-options-unrel-b/build-spec/debian/rules new file mode 100755 index 0000000..11bd6cc --- /dev/null +++ b/t/recipes/checks/debian/rules/rules-dh-auto-test-does-not-check-deb-build-options-unrel-b/build-spec/debian/rules @@ -0,0 +1,7 @@ +#!/usr/bin/make -f + +%: + dh $@ + +# Empty target follows +override_dh_auto_test: diff --git a/t/recipes/checks/debian/rules/rules-dh-auto-test-does-not-check-deb-build-options-unrel-b/build-spec/fill-values b/t/recipes/checks/debian/rules/rules-dh-auto-test-does-not-check-deb-build-options-unrel-b/build-spec/fill-values new file mode 100644 index 0000000..17ed76d --- /dev/null +++ b/t/recipes/checks/debian/rules/rules-dh-auto-test-does-not-check-deb-build-options-unrel-b/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: upload-native +Testname: rules-dh-auto-test-does-not-check-deb-build-options-unrel-b +Description: Test for missing checks for DEB_BUILD_PROFILES (false-positive) diff --git a/t/recipes/checks/debian/rules/rules-dh-auto-test-does-not-check-deb-build-options-unrel-b/eval/desc b/t/recipes/checks/debian/rules/rules-dh-auto-test-does-not-check-deb-build-options-unrel-b/eval/desc new file mode 100644 index 0000000..e174c5a --- /dev/null +++ b/t/recipes/checks/debian/rules/rules-dh-auto-test-does-not-check-deb-build-options-unrel-b/eval/desc @@ -0,0 +1,4 @@ +Testname: rules-dh-auto-test-does-not-check-deb-build-options-unrel-b +Test-Against: + override_dh_auto_test-does-not-check-DEB_BUILD_OPTIONS +Check: debian/rules diff --git a/t/recipes/checks/debian/rules/rules-dh-auto-test-does-not-check-deb-build-options-unrel-b/eval/hints b/t/recipes/checks/debian/rules/rules-dh-auto-test-does-not-check-deb-build-options-unrel-b/eval/hints new file mode 100644 index 0000000..e69de29 diff --git a/t/recipes/checks/debian/rules/rules-dh-auto-test-does-not-check-deb-build-options-unrel-c/build-spec/debian/rules b/t/recipes/checks/debian/rules/rules-dh-auto-test-does-not-check-deb-build-options-unrel-c/build-spec/debian/rules new file mode 100755 index 0000000..91dd51c --- /dev/null +++ b/t/recipes/checks/debian/rules/rules-dh-auto-test-does-not-check-deb-build-options-unrel-c/build-spec/debian/rules @@ -0,0 +1,29 @@ +#!/usr/bin/make -f + +%: + dh $@ + +override_dh_auto_test: + dh_auto_test + dh_auto_test # Comment + mkdir ignore/ + rm -rf ignore/ + -dh_auto_test -- SUFFIX=1 + @dh_auto_test -- SUFFIX=1 + -cp -r ignore ignore/ + FOO=mydir dh_auto_test -- BAR=2 + : Disabled + echo "Disabled" + @echo "Disabled" + -echo "Disabled" + -mv -v ignore ignore/ + [ true ] || echo ignore + ENV="var" \ + ENV="var" \ + dh_auto_test || true + rm -f missing + test true && echo "foo" + rmdir missing || true + ln -sf foo bar + true + /bin/true diff --git a/t/recipes/checks/debian/rules/rules-dh-auto-test-does-not-check-deb-build-options-unrel-c/build-spec/fill-values b/t/recipes/checks/debian/rules/rules-dh-auto-test-does-not-check-deb-build-options-unrel-c/build-spec/fill-values new file mode 100644 index 0000000..b4bb0d6 --- /dev/null +++ b/t/recipes/checks/debian/rules/rules-dh-auto-test-does-not-check-deb-build-options-unrel-c/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: upload-native +Testname: rules-dh-auto-test-does-not-check-deb-build-options-unrel-c +Description: Test for missing checks for DEB_BUILD_PROFILES (false-positive) diff --git a/t/recipes/checks/debian/rules/rules-dh-auto-test-does-not-check-deb-build-options-unrel-c/eval/desc b/t/recipes/checks/debian/rules/rules-dh-auto-test-does-not-check-deb-build-options-unrel-c/eval/desc new file mode 100644 index 0000000..e9756fe --- /dev/null +++ b/t/recipes/checks/debian/rules/rules-dh-auto-test-does-not-check-deb-build-options-unrel-c/eval/desc @@ -0,0 +1,4 @@ +Testname: rules-dh-auto-test-does-not-check-deb-build-options-unrel-c +Test-Against: + override_dh_auto_test-does-not-check-DEB_BUILD_OPTIONS +Check: debian/rules diff --git a/t/recipes/checks/debian/rules/rules-dh-auto-test-does-not-check-deb-build-options-unrel-c/eval/hints b/t/recipes/checks/debian/rules/rules-dh-auto-test-does-not-check-deb-build-options-unrel-c/eval/hints new file mode 100644 index 0000000..e69de29 diff --git a/t/recipes/checks/debian/rules/rules-dh-auto-test-does-not-check-deb-build-options/build-spec/debian/rules b/t/recipes/checks/debian/rules/rules-dh-auto-test-does-not-check-deb-build-options/build-spec/debian/rules new file mode 100755 index 0000000..b46c122 --- /dev/null +++ b/t/recipes/checks/debian/rules/rules-dh-auto-test-does-not-check-deb-build-options/build-spec/debian/rules @@ -0,0 +1,7 @@ +#!/usr/bin/make -f + +%: + dh $@ + +override_dh_auto_test: + /bin/sync diff --git a/t/recipes/checks/debian/rules/rules-dh-auto-test-does-not-check-deb-build-options/build-spec/fill-values b/t/recipes/checks/debian/rules/rules-dh-auto-test-does-not-check-deb-build-options/build-spec/fill-values new file mode 100644 index 0000000..afa76a3 --- /dev/null +++ b/t/recipes/checks/debian/rules/rules-dh-auto-test-does-not-check-deb-build-options/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: upload-native +Testname: rules-dh-auto-test-does-not-check-deb-build-options +Description: Test for missing checks for DEB_BUILD_PROFILES diff --git a/t/recipes/checks/debian/rules/rules-dh-auto-test-does-not-check-deb-build-options/eval/desc b/t/recipes/checks/debian/rules/rules-dh-auto-test-does-not-check-deb-build-options/eval/desc new file mode 100644 index 0000000..ec297d9 --- /dev/null +++ b/t/recipes/checks/debian/rules/rules-dh-auto-test-does-not-check-deb-build-options/eval/desc @@ -0,0 +1,2 @@ +Testname: rules-dh-auto-test-does-not-check-deb-build-options +Check: debian/rules diff --git a/t/recipes/checks/debian/rules/rules-dh-auto-test-does-not-check-deb-build-options/eval/hints b/t/recipes/checks/debian/rules/rules-dh-auto-test-does-not-check-deb-build-options/eval/hints new file mode 100644 index 0000000..8d657b1 --- /dev/null +++ b/t/recipes/checks/debian/rules/rules-dh-auto-test-does-not-check-deb-build-options/eval/hints @@ -0,0 +1 @@ +rules-dh-auto-test-does-not-check-deb-build-options (source): override_dh_auto_test-does-not-check-DEB_BUILD_OPTIONS [debian/rules:6] diff --git a/t/recipes/checks/debian/rules/rules-dh-order/build-spec/debian/rules b/t/recipes/checks/debian/rules/rules-dh-order/build-spec/debian/rules new file mode 100755 index 0000000..8ea3133 --- /dev/null +++ b/t/recipes/checks/debian/rules/rules-dh-order/build-spec/debian/rules @@ -0,0 +1,34 @@ +#!/usr/bin/make -f +%: + dh $@ + +# Test for calling debhelper commands out of order. We take advantage here +# of the fact checks/rules doesn't care what target the commands are called +# from by using several uncalled targets. + +reverse: + dh_builddeb + dh_gencontrol + dh_installdeb + dh_shlibdeps + dh_makeshlibs + +shared-order: + dh_shlibdeps + dh_makeshlibs + dh_installdeb + dh_gencontrol + dh_builddeb + +multiple-package: + dh_makeshlibs -pfoo + dh_shlibdeps -pfoo + dh_installdeb -pfoo + dh_gencontrol -pfoo + dh_builddeb -pfoo + + dh_makeshlibs -pbar + dh_gencontrol -pbar + dh_installdeb -pbar + dh_shlibdeps -pbar + dh_builddeb -pbar diff --git a/t/recipes/checks/debian/rules/rules-dh-order/build-spec/fill-values b/t/recipes/checks/debian/rules/rules-dh-order/build-spec/fill-values new file mode 100644 index 0000000..fae0b62 --- /dev/null +++ b/t/recipes/checks/debian/rules/rules-dh-order/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: upload-native +Testname: rules-dh-order +Description: Test order of dh command invocations diff --git a/t/recipes/checks/debian/rules/rules-dh-order/eval/desc b/t/recipes/checks/debian/rules/rules-dh-order/eval/desc new file mode 100644 index 0000000..2ce04c4 --- /dev/null +++ b/t/recipes/checks/debian/rules/rules-dh-order/eval/desc @@ -0,0 +1,2 @@ +Testname: rules-dh-order +Check: debian/rules diff --git a/t/recipes/checks/debian/rules/rules-dh-order/eval/hints b/t/recipes/checks/debian/rules/rules-dh-order/eval/hints new file mode 100644 index 0000000..b0d36b0 --- /dev/null +++ b/t/recipes/checks/debian/rules/rules-dh-order/eval/hints @@ -0,0 +1,5 @@ +rules-dh-order (source): debian-rules-calls-debhelper-in-odd-order dh_shlibdeps [debian/rules:13] +rules-dh-order (source): debian-rules-calls-debhelper-in-odd-order dh_makeshlibs [debian/rules:18] +rules-dh-order (source): debian-rules-calls-debhelper-in-odd-order dh_makeshlibs [debian/rules:14] +rules-dh-order (source): debian-rules-calls-debhelper-in-odd-order dh_installdeb [debian/rules:12] +rules-dh-order (source): debian-rules-calls-debhelper-in-odd-order dh_gencontrol [debian/rules:11] diff --git a/t/recipes/checks/debian/rules/rules-dh-unused-target-nonempty/build-spec/debian/rules b/t/recipes/checks/debian/rules/rules-dh-unused-target-nonempty/build-spec/debian/rules new file mode 100755 index 0000000..79fc28b --- /dev/null +++ b/t/recipes/checks/debian/rules/rules-dh-unused-target-nonempty/build-spec/debian/rules @@ -0,0 +1,29 @@ +#!/usr/bin/make -f + +build: build-stamp +build-arch: +build-indep: + +build-stamp: + dh build + touch $@ + +clean: + dh $@ + +install: install-stamp +install-stamp: build-stamp + dh install + touch $@ + +binary-arch: install + dh $@ + # This target is not empty, but it should be + -install foo bar + +binary-indep: install + dh $@ + +binary: binary-arch binary-indep + +.PHONY: binary binary-arch binary-indep install clean build build-arch build-indep diff --git a/t/recipes/checks/debian/rules/rules-dh-unused-target-nonempty/build-spec/fill-values b/t/recipes/checks/debian/rules/rules-dh-unused-target-nonempty/build-spec/fill-values new file mode 100644 index 0000000..5307261 --- /dev/null +++ b/t/recipes/checks/debian/rules/rules-dh-unused-target-nonempty/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: upload-native +Testname: rules-dh-unused-target-nonempty +Description: Allow dh in unused targets, but nothing else diff --git a/t/recipes/checks/debian/rules/rules-dh-unused-target-nonempty/eval/desc b/t/recipes/checks/debian/rules/rules-dh-unused-target-nonempty/eval/desc new file mode 100644 index 0000000..55593d3 --- /dev/null +++ b/t/recipes/checks/debian/rules/rules-dh-unused-target-nonempty/eval/desc @@ -0,0 +1,3 @@ +Testname: rules-dh-unused-target-nonempty +See-Also: <20080806175819.GV11882@mail-vs.djpig.de> +Check: debian/rules diff --git a/t/recipes/checks/debian/rules/rules-dh-unused-target-nonempty/eval/hints b/t/recipes/checks/debian/rules/rules-dh-unused-target-nonempty/eval/hints new file mode 100644 index 0000000..4a6f8cd --- /dev/null +++ b/t/recipes/checks/debian/rules/rules-dh-unused-target-nonempty/eval/hints @@ -0,0 +1 @@ +rules-dh-unused-target-nonempty (source): binary-arch-rules-but-pkg-is-arch-indep [debian/rules] diff --git a/t/recipes/checks/debian/rules/rules-dh-unused-target/build-spec/debian/rules b/t/recipes/checks/debian/rules/rules-dh-unused-target/build-spec/debian/rules new file mode 100755 index 0000000..ca3e9b5 --- /dev/null +++ b/t/recipes/checks/debian/rules/rules-dh-unused-target/build-spec/debian/rules @@ -0,0 +1,29 @@ +#!/usr/bin/make -f + +build-indep: + +build-arch: build-stamp + +build-stamp: + dh build-arch + touch $@ + +build: build-arch build-indep + +clean: + dh $@ + +install: install-stamp +install-stamp: build-stamp + dh install + touch $@ + +binary-arch: install + dh $@ + +binary-indep: install + dh $@ + +binary: binary-arch binary-indep + +.PHONY: binary binary-arch binary-indep install clean build build-arch build-indep diff --git a/t/recipes/checks/debian/rules/rules-dh-unused-target/build-spec/fill-values b/t/recipes/checks/debian/rules/rules-dh-unused-target/build-spec/fill-values new file mode 100644 index 0000000..bdeaa0e --- /dev/null +++ b/t/recipes/checks/debian/rules/rules-dh-unused-target/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: upload-native +Testname: rules-dh-unused-target +Description: Allow dh in unused targets diff --git a/t/recipes/checks/debian/rules/rules-dh-unused-target/eval/desc b/t/recipes/checks/debian/rules/rules-dh-unused-target/eval/desc new file mode 100644 index 0000000..5700bcb --- /dev/null +++ b/t/recipes/checks/debian/rules/rules-dh-unused-target/eval/desc @@ -0,0 +1,4 @@ +Testname: rules-dh-unused-target +Test-Against: binary-arch-rules-but-pkg-is-arch-indep +See-Also: <20080806175819.GV11882@mail-vs.djpig.de> +Check: debian/rules diff --git a/t/recipes/checks/debian/rules/rules-dh-unused-target/eval/hints b/t/recipes/checks/debian/rules/rules-dh-unused-target/eval/hints new file mode 100644 index 0000000..e69de29 diff --git a/t/recipes/checks/debian/rules/rules-general/build-spec/debian/compat.in b/t/recipes/checks/debian/rules/rules-general/build-spec/debian/compat.in new file mode 100644 index 0000000..640a566 --- /dev/null +++ b/t/recipes/checks/debian/rules/rules-general/build-spec/debian/compat.in @@ -0,0 +1 @@ +[% $dh_compat_level %] diff --git a/t/recipes/checks/debian/rules/rules-general/build-spec/debian/control.in b/t/recipes/checks/debian/rules/rules-general/build-spec/debian/control.in new file mode 100644 index 0000000..4b34442 --- /dev/null +++ b/t/recipes/checks/debian/rules/rules-general/build-spec/debian/control.in @@ -0,0 +1,16 @@ +Source: [% $source %] +Priority: optional +Section: [% $section %] +Maintainer: [% $author %] +Standards-Version: [% $standards_version %] +Build-Depends-Indep: [% $build_depends %], python +Rules-Requires-Root: no + +Package: [% $source %] +Architecture: [% $package_architecture %] +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: [% $description %] + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. diff --git a/t/recipes/checks/debian/rules/rules-general/build-spec/debian/rules b/t/recipes/checks/debian/rules/rules-general/build-spec/debian/rules new file mode 100755 index 0000000..e1f72bf --- /dev/null +++ b/t/recipes/checks/debian/rules/rules-general/build-spec/debian/rules @@ -0,0 +1,23 @@ +#!/usr/bin/make -f +# See debhelper(7) (uncomment to enable) +# output every command that modifies files on the build system. +#export DH_VERBOSE = 1 + +DEB_AUTO_UPDATE_DEBIAN_CONTROL = yes +DH_EXTRA_ADDONS = systemd + +%: + dh $@ + +clean: + dh_clean + echo $(DEB_BUILD_OPTS) $(PWD) + @echo $(_) + +# dh_make generated override targets +# This is example for Cmake (See https://bugs.debian.org/641051 ) +#override_dh_auto_configure: +# dh_auto_configure -- # -DCMAKE_LIBRARY_PATH=$(DEB_HOST_MULTIARCH) + +override_dh_shlibdeps: + dh_shlibdeps -V "liblintian0 (>= 0.0.1)" diff --git a/t/recipes/checks/debian/rules/rules-general/build-spec/fill-values b/t/recipes/checks/debian/rules/rules-general/build-spec/fill-values new file mode 100644 index 0000000..f3cc7ce --- /dev/null +++ b/t/recipes/checks/debian/rules/rules-general/build-spec/fill-values @@ -0,0 +1,5 @@ +Skeleton: upload-native +Testname: rules-general +Package-Architecture: all +Description: Test various debian/rules checks +Default-Build-Depends: debhelper (>= [% $dh_compat_level %]~) diff --git a/t/recipes/checks/debian/rules/rules-general/eval/desc b/t/recipes/checks/debian/rules/rules-general/eval/desc new file mode 100644 index 0000000..8adced2 --- /dev/null +++ b/t/recipes/checks/debian/rules/rules-general/eval/desc @@ -0,0 +1,2 @@ +Testname: rules-general +Check: debian/rules diff --git a/t/recipes/checks/debian/rules/rules-general/eval/hints b/t/recipes/checks/debian/rules/rules-general/eval/hints new file mode 100644 index 0000000..8587a20 --- /dev/null +++ b/t/recipes/checks/debian/rules/rules-general/eval/hints @@ -0,0 +1,8 @@ +rules-general (source): missing-build-depends-for-clean-target-in-debian-rules (does not satisfy debhelper:any | debhelper-compat:any) [debian/rules] +rules-general (source): debian-rules-uses-special-shell-variable [debian/rules:15] +rules-general (source): debian-rules-uses-deb-build-opts [debian/rules:14] +rules-general (source): debian-rules-updates-control-automatically [debian/rules:6] +rules-general (source): debian-rules-should-not-use-DH_EXTRA_ADDONS systemd [debian/rules:7] +rules-general (source): debian-rules-passes-version-info-to-dh_shlibdeps [debian/rules:23] +rules-general (source): debian-rules-is-dh_make-template [debian/rules:17] +rules-general (source): debian-rules-calls-pwd [debian/rules:14] diff --git a/t/recipes/checks/debian/rules/rules-ignore-define/build-spec/debian/rules b/t/recipes/checks/debian/rules/rules-ignore-define/build-spec/debian/rules new file mode 100755 index 0000000..3445f5c --- /dev/null +++ b/t/recipes/checks/debian/rules/rules-ignore-define/build-spec/debian/rules @@ -0,0 +1,10 @@ +#!/usr/bin/make -f +%: + dh $@ + +binary-arch: + # EMPTY + +define checkdir + test -f debian/rules +endef diff --git a/t/recipes/checks/debian/rules/rules-ignore-define/build-spec/fill-values b/t/recipes/checks/debian/rules/rules-ignore-define/build-spec/fill-values new file mode 100644 index 0000000..84cbc2b --- /dev/null +++ b/t/recipes/checks/debian/rules/rules-ignore-define/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: upload-native +Testname: rules-ignore-define +Description: Ignore define blocks when checking rule files diff --git a/t/recipes/checks/debian/rules/rules-ignore-define/eval/desc b/t/recipes/checks/debian/rules/rules-ignore-define/eval/desc new file mode 100644 index 0000000..eab87e6 --- /dev/null +++ b/t/recipes/checks/debian/rules/rules-ignore-define/eval/desc @@ -0,0 +1,4 @@ +Testname: rules-ignore-define +Test-Against: binary-arch-rules-but-pkg-is-arch-indep +See-Also: Debian Bug#510869 +Check: debian/rules diff --git a/t/recipes/checks/debian/rules/rules-ignore-define/eval/hints b/t/recipes/checks/debian/rules/rules-ignore-define/eval/hints new file mode 100644 index 0000000..e69de29 diff --git a/t/recipes/checks/debian/rules/rules-ignores-error-clean-fp/build-spec/debian/Makefile b/t/recipes/checks/debian/rules/rules-ignores-error-clean-fp/build-spec/debian/Makefile new file mode 100644 index 0000000..959feb8 --- /dev/null +++ b/t/recipes/checks/debian/rules/rules-ignores-error-clean-fp/build-spec/debian/Makefile @@ -0,0 +1,3 @@ +all: + +distclean: diff --git a/t/recipes/checks/debian/rules/rules-ignores-error-clean-fp/build-spec/debian/rules b/t/recipes/checks/debian/rules/rules-ignores-error-clean-fp/build-spec/debian/rules new file mode 100755 index 0000000..63556d9 --- /dev/null +++ b/t/recipes/checks/debian/rules/rules-ignores-error-clean-fp/build-spec/debian/rules @@ -0,0 +1,8 @@ +#!/usr/bin/make -f +%: + dh $@ + +override_dh_auto_clean: + $(MAKE) -Cdebian distclean + + diff --git a/t/recipes/checks/debian/rules/rules-ignores-error-clean-fp/build-spec/fill-values b/t/recipes/checks/debian/rules/rules-ignores-error-clean-fp/build-spec/fill-values new file mode 100644 index 0000000..e882565 --- /dev/null +++ b/t/recipes/checks/debian/rules/rules-ignores-error-clean-fp/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: upload-native +Testname: rules-ignores-error-clean-fp +Description: Check against Lintian false-positive error diff --git a/t/recipes/checks/debian/rules/rules-ignores-error-clean-fp/eval/desc b/t/recipes/checks/debian/rules/rules-ignores-error-clean-fp/eval/desc new file mode 100644 index 0000000..5e15233 --- /dev/null +++ b/t/recipes/checks/debian/rules/rules-ignores-error-clean-fp/eval/desc @@ -0,0 +1,3 @@ +Testname: rules-ignores-error-clean-fp +Test-Against: debian-rules-ignores-make-clean-error +Check: debian/rules diff --git a/t/recipes/checks/debian/rules/rules-ignores-error-clean-fp/eval/hints b/t/recipes/checks/debian/rules/rules-ignores-error-clean-fp/eval/hints new file mode 100644 index 0000000..e69de29 diff --git a/t/recipes/checks/debian/rules/rules-ignores-error-clean/build-spec/debian/rules b/t/recipes/checks/debian/rules/rules-ignores-error-clean/build-spec/debian/rules new file mode 100755 index 0000000..b86584f --- /dev/null +++ b/t/recipes/checks/debian/rules/rules-ignores-error-clean/build-spec/debian/rules @@ -0,0 +1,8 @@ +#!/usr/bin/make -f +%: + dh $@ + +override_dh_auto_clean: + -$(MAKE) distclean + + diff --git a/t/recipes/checks/debian/rules/rules-ignores-error-clean/build-spec/fill-values b/t/recipes/checks/debian/rules/rules-ignores-error-clean/build-spec/fill-values new file mode 100644 index 0000000..e9f8da3 --- /dev/null +++ b/t/recipes/checks/debian/rules/rules-ignores-error-clean/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: upload-native +Testname: rules-ignores-error-clean +Description: Check for rules ignoring clean error diff --git a/t/recipes/checks/debian/rules/rules-ignores-error-clean/build-spec/orig/Makefile b/t/recipes/checks/debian/rules/rules-ignores-error-clean/build-spec/orig/Makefile new file mode 100644 index 0000000..959feb8 --- /dev/null +++ b/t/recipes/checks/debian/rules/rules-ignores-error-clean/build-spec/orig/Makefile @@ -0,0 +1,3 @@ +all: + +distclean: diff --git a/t/recipes/checks/debian/rules/rules-ignores-error-clean/eval/desc b/t/recipes/checks/debian/rules/rules-ignores-error-clean/eval/desc new file mode 100644 index 0000000..e41f791 --- /dev/null +++ b/t/recipes/checks/debian/rules/rules-ignores-error-clean/eval/desc @@ -0,0 +1,2 @@ +Testname: rules-ignores-error-clean +Check: debian/rules diff --git a/t/recipes/checks/debian/rules/rules-ignores-error-clean/eval/hints b/t/recipes/checks/debian/rules/rules-ignores-error-clean/eval/hints new file mode 100644 index 0000000..ef99bcf --- /dev/null +++ b/t/recipes/checks/debian/rules/rules-ignores-error-clean/eval/hints @@ -0,0 +1 @@ +rules-ignores-error-clean (source): debian-rules-ignores-make-clean-error [debian/rules:6] diff --git a/t/recipes/checks/debian/rules/rules-including-deprecated-makefiles/build-spec/debian/compat.in b/t/recipes/checks/debian/rules/rules-including-deprecated-makefiles/build-spec/debian/compat.in new file mode 100644 index 0000000..640a566 --- /dev/null +++ b/t/recipes/checks/debian/rules/rules-including-deprecated-makefiles/build-spec/debian/compat.in @@ -0,0 +1 @@ +[% $dh_compat_level %] diff --git a/t/recipes/checks/debian/rules/rules-including-deprecated-makefiles/build-spec/debian/rules b/t/recipes/checks/debian/rules/rules-including-deprecated-makefiles/build-spec/debian/rules new file mode 100755 index 0000000..3f98954 --- /dev/null +++ b/t/recipes/checks/debian/rules/rules-including-deprecated-makefiles/build-spec/debian/rules @@ -0,0 +1,5 @@ +#!/usr/bin/make -f + +include /usr/share/cdbs/1/rules/debhelper.mk +include /usr/share/cdbs/1/rules/simple-patchsys.mk + diff --git a/t/recipes/checks/debian/rules/rules-including-deprecated-makefiles/build-spec/fill-values b/t/recipes/checks/debian/rules/rules-including-deprecated-makefiles/build-spec/fill-values new file mode 100644 index 0000000..78c210e --- /dev/null +++ b/t/recipes/checks/debian/rules/rules-including-deprecated-makefiles/build-spec/fill-values @@ -0,0 +1,6 @@ +Skeleton: upload-native +Testname: rules-including-deprecated-makefiles +Dh-Compat-Level: 10 +Description: Test for debian/rules with deprecated included file +Default-Build-Depends: debhelper (>= [% $dh_compat_level %]~) +Extra-Build-Depends: cdbs diff --git a/t/recipes/checks/debian/rules/rules-including-deprecated-makefiles/eval/desc b/t/recipes/checks/debian/rules/rules-including-deprecated-makefiles/eval/desc new file mode 100644 index 0000000..e43aa61 --- /dev/null +++ b/t/recipes/checks/debian/rules/rules-including-deprecated-makefiles/eval/desc @@ -0,0 +1,3 @@ +Testname: rules-including-deprecated-makefiles +Test-Conflicts: dh-buildinfo +Check: debian/rules diff --git a/t/recipes/checks/debian/rules/rules-including-deprecated-makefiles/eval/hints b/t/recipes/checks/debian/rules/rules-including-deprecated-makefiles/eval/hints new file mode 100644 index 0000000..c3f7ceb --- /dev/null +++ b/t/recipes/checks/debian/rules/rules-including-deprecated-makefiles/eval/hints @@ -0,0 +1 @@ +rules-including-deprecated-makefiles (source): debian-rules-uses-deprecated-makefile /usr/share/cdbs/1/rules/simple-patchsys.mk [debian/rules:4] diff --git a/t/recipes/checks/debian/rules/rules-missing-targets-with-includes/build-spec/debian/rules b/t/recipes/checks/debian/rules/rules-missing-targets-with-includes/build-spec/debian/rules new file mode 100755 index 0000000..512e7e1 --- /dev/null +++ b/t/recipes/checks/debian/rules/rules-missing-targets-with-includes/build-spec/debian/rules @@ -0,0 +1,3 @@ +#!/usr/bin/make -f + + include debian/rules.mk diff --git a/t/recipes/checks/debian/rules/rules-missing-targets-with-includes/build-spec/debian/rules.mk b/t/recipes/checks/debian/rules/rules-missing-targets-with-includes/build-spec/debian/rules.mk new file mode 100644 index 0000000..4e68614 --- /dev/null +++ b/t/recipes/checks/debian/rules/rules-missing-targets-with-includes/build-spec/debian/rules.mk @@ -0,0 +1,2 @@ +%: + dh $@ diff --git a/t/recipes/checks/debian/rules/rules-missing-targets-with-includes/build-spec/fill-values b/t/recipes/checks/debian/rules/rules-missing-targets-with-includes/build-spec/fill-values new file mode 100644 index 0000000..9d39a99 --- /dev/null +++ b/t/recipes/checks/debian/rules/rules-missing-targets-with-includes/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: upload-native +Testname: rules-missing-targets-with-includes +Description: Test a debian/rules with targets included from another file diff --git a/t/recipes/checks/debian/rules/rules-missing-targets-with-includes/eval/desc b/t/recipes/checks/debian/rules/rules-missing-targets-with-includes/eval/desc new file mode 100644 index 0000000..81a5355 --- /dev/null +++ b/t/recipes/checks/debian/rules/rules-missing-targets-with-includes/eval/desc @@ -0,0 +1,4 @@ +Testname: rules-missing-targets-with-includes +Test-Against: debian-rules-missing-required-target +See-Also: Debian Bug#607281 +Check: debian/rules diff --git a/t/recipes/checks/debian/rules/rules-missing-targets-with-includes/eval/hints b/t/recipes/checks/debian/rules/rules-missing-targets-with-includes/eval/hints new file mode 100644 index 0000000..e69de29 diff --git a/t/recipes/checks/debian/rules/rules-missing-targets-with-known-includes/build-spec/debian/rules b/t/recipes/checks/debian/rules/rules-missing-targets-with-known-includes/build-spec/debian/rules new file mode 100755 index 0000000..e92755b --- /dev/null +++ b/t/recipes/checks/debian/rules/rules-missing-targets-with-known-includes/build-spec/debian/rules @@ -0,0 +1,8 @@ +#!/usr/bin/make -f + +# This should trigger a missing $type targets, since +# we know the makefile does not implement them. +include /usr/share/javahelper/java-vars.mk + +clean build binary: + dh $@ diff --git a/t/recipes/checks/debian/rules/rules-missing-targets-with-known-includes/build-spec/fill-values b/t/recipes/checks/debian/rules/rules-missing-targets-with-known-includes/build-spec/fill-values new file mode 100644 index 0000000..36d2a17 --- /dev/null +++ b/t/recipes/checks/debian/rules/rules-missing-targets-with-known-includes/build-spec/fill-values @@ -0,0 +1,4 @@ +Skeleton: upload-native +Testname: rules-missing-targets-with-known-includes +Description: Test for debian/rules with known included file +Extra-Build-Depends: javahelper diff --git a/t/recipes/checks/debian/rules/rules-missing-targets-with-known-includes/eval/desc b/t/recipes/checks/debian/rules/rules-missing-targets-with-known-includes/eval/desc new file mode 100644 index 0000000..34b9af5 --- /dev/null +++ b/t/recipes/checks/debian/rules/rules-missing-targets-with-known-includes/eval/desc @@ -0,0 +1,2 @@ +Testname: rules-missing-targets-with-known-includes +Check: debian/rules diff --git a/t/recipes/checks/debian/rules/rules-missing-targets-with-known-includes/eval/hints b/t/recipes/checks/debian/rules/rules-missing-targets-with-known-includes/eval/hints new file mode 100644 index 0000000..a8a5c95 --- /dev/null +++ b/t/recipes/checks/debian/rules/rules-missing-targets-with-known-includes/eval/hints @@ -0,0 +1,4 @@ +rules-missing-targets-with-known-includes (source): debian-rules-missing-required-target build-indep [debian/rules] +rules-missing-targets-with-known-includes (source): debian-rules-missing-required-target build-arch [debian/rules] +rules-missing-targets-with-known-includes (source): debian-rules-missing-required-target binary-indep [debian/rules] +rules-missing-targets-with-known-includes (source): debian-rules-missing-required-target binary-arch [debian/rules] diff --git a/t/recipes/checks/debian/rules/rules-missing-targets/build-spec/debian/control.in b/t/recipes/checks/debian/rules/rules-missing-targets/build-spec/debian/control.in new file mode 100644 index 0000000..8aa2a58 --- /dev/null +++ b/t/recipes/checks/debian/rules/rules-missing-targets/build-spec/debian/control.in @@ -0,0 +1,27 @@ +Source: [% $source %] +Priority: optional +Section: [% $section %] +Maintainer: [% $author %] +Standards-Version: [% $standards_version %] +Build-Depends: [% $build_depends %] +Rules-Requires-Root: no + +Package: [% $source %] +Architecture: any +Depends: ${misc:Depends}, [% $source %]-data +Description: [% $description %] + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. + +Package: [% $source %]-data +Architecture: all +Depends: ${misc:Depends}, +Description: [% $description %] - data + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. + . + Data package. diff --git a/t/recipes/checks/debian/rules/rules-missing-targets/build-spec/debian/rules b/t/recipes/checks/debian/rules/rules-missing-targets/build-spec/debian/rules new file mode 100644 index 0000000..3e3c60f --- /dev/null +++ b/t/recipes/checks/debian/rules/rules-missing-targets/build-spec/debian/rules @@ -0,0 +1,5 @@ +#!/usr/bin/make -f + +# Missing build-arch/build-indep :) +build clean binary binary-arch binary-indep: + dh $@ diff --git a/t/recipes/checks/debian/rules/rules-missing-targets/build-spec/fill-values b/t/recipes/checks/debian/rules/rules-missing-targets/build-spec/fill-values new file mode 100644 index 0000000..e98756d --- /dev/null +++ b/t/recipes/checks/debian/rules/rules-missing-targets/build-spec/fill-values @@ -0,0 +1,4 @@ +Testname: rules-missing-targets +Version: 1.0+dfsg-1 +Skeleton: upload-non-native +Description: Test for missing targets in debian/rules diff --git a/t/recipes/checks/debian/rules/rules-missing-targets/eval/desc b/t/recipes/checks/debian/rules/rules-missing-targets/eval/desc new file mode 100644 index 0000000..c0f6a2e --- /dev/null +++ b/t/recipes/checks/debian/rules/rules-missing-targets/eval/desc @@ -0,0 +1,2 @@ +Testname: rules-missing-targets +Check: debian/rules diff --git a/t/recipes/checks/debian/rules/rules-missing-targets/eval/hints b/t/recipes/checks/debian/rules/rules-missing-targets/eval/hints new file mode 100644 index 0000000..5c57705 --- /dev/null +++ b/t/recipes/checks/debian/rules/rules-missing-targets/eval/hints @@ -0,0 +1,2 @@ +rules-missing-targets (source): debian-rules-missing-required-target build-indep [debian/rules] +rules-missing-targets (source): debian-rules-missing-required-target build-arch [debian/rules] diff --git a/t/recipes/checks/debian/rules/rules-not-makefile/build-spec/debian/rules b/t/recipes/checks/debian/rules/rules-not-makefile/build-spec/debian/rules new file mode 100755 index 0000000..97e5f8d --- /dev/null +++ b/t/recipes/checks/debian/rules/rules-not-makefile/build-spec/debian/rules @@ -0,0 +1,13 @@ +#!/bin/sh +# This should be a makefile. +exec dh "$@" + +# fake targets to trick lintian into believing the +# required targets are present (removed unrelated errors). +binary: +binary-arch: +binary-indep: +build: +build-arch: +build-indep: +clean: diff --git a/t/recipes/checks/debian/rules/rules-not-makefile/build-spec/fill-values b/t/recipes/checks/debian/rules/rules-not-makefile/build-spec/fill-values new file mode 100644 index 0000000..33a94d1 --- /dev/null +++ b/t/recipes/checks/debian/rules/rules-not-makefile/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: upload-native +Testname: rules-not-makefile +Description: Check if the rules file is a makefile diff --git a/t/recipes/checks/debian/rules/rules-not-makefile/eval/desc b/t/recipes/checks/debian/rules/rules-not-makefile/eval/desc new file mode 100644 index 0000000..8f22a2e --- /dev/null +++ b/t/recipes/checks/debian/rules/rules-not-makefile/eval/desc @@ -0,0 +1,2 @@ +Testname: rules-not-makefile +Check: debian/rules diff --git a/t/recipes/checks/debian/rules/rules-not-makefile/eval/hints b/t/recipes/checks/debian/rules/rules-not-makefile/eval/hints new file mode 100644 index 0000000..492bf1f --- /dev/null +++ b/t/recipes/checks/debian/rules/rules-not-makefile/eval/hints @@ -0,0 +1 @@ +rules-not-makefile (source): debian-rules-not-a-makefile [debian/rules] diff --git a/t/recipes/checks/debian/rules/rules-override-dh-foo-does-not-call-dh-foo-unrel/build-spec/debian/rules b/t/recipes/checks/debian/rules/rules-override-dh-foo-does-not-call-dh-foo-unrel/build-spec/debian/rules new file mode 100755 index 0000000..c4d25dc --- /dev/null +++ b/t/recipes/checks/debian/rules/rules-override-dh-foo-does-not-call-dh-foo-unrel/build-spec/debian/rules @@ -0,0 +1,18 @@ +#!/usr/bin/make -f + +%: + dh $@ + +override_dh_clean: + true + dh_clean # This rule is a false positive + +override_dh_fixperms: + true + $(overridden_command) # This rule is a false positive + +override_dh_fixperms-indep: + dh_fixperms + +override_dh_fixperms-arch: + dh_fixperms diff --git a/t/recipes/checks/debian/rules/rules-override-dh-foo-does-not-call-dh-foo-unrel/build-spec/fill-values b/t/recipes/checks/debian/rules/rules-override-dh-foo-does-not-call-dh-foo-unrel/build-spec/fill-values new file mode 100644 index 0000000..64e6684 --- /dev/null +++ b/t/recipes/checks/debian/rules/rules-override-dh-foo-does-not-call-dh-foo-unrel/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: upload-native +Testname: rules-override-dh-foo-does-not-call-dh-foo-unrel +Description: Test for missing calls to dh_foo in override_dh_foo (false positives) diff --git a/t/recipes/checks/debian/rules/rules-override-dh-foo-does-not-call-dh-foo-unrel/eval/desc b/t/recipes/checks/debian/rules/rules-override-dh-foo-does-not-call-dh-foo-unrel/eval/desc new file mode 100644 index 0000000..5518f3b --- /dev/null +++ b/t/recipes/checks/debian/rules/rules-override-dh-foo-does-not-call-dh-foo-unrel/eval/desc @@ -0,0 +1,5 @@ +Testname: rules-override-dh-foo-does-not-call-dh-foo-unrel +Test-Against: + override_dh_clean-does-not-call-dh_clean + override_dh_fixperms-does-not-call-dh_fixperms +Check: debian/rules diff --git a/t/recipes/checks/debian/rules/rules-override-dh-foo-does-not-call-dh-foo-unrel/eval/hints b/t/recipes/checks/debian/rules/rules-override-dh-foo-does-not-call-dh-foo-unrel/eval/hints new file mode 100644 index 0000000..e69de29 diff --git a/t/recipes/checks/debian/rules/rules-override-dh-foo-does-not-call-dh-foo/build-spec/debian/rules b/t/recipes/checks/debian/rules/rules-override-dh-foo-does-not-call-dh-foo/build-spec/debian/rules new file mode 100755 index 0000000..9270348 --- /dev/null +++ b/t/recipes/checks/debian/rules/rules-override-dh-foo-does-not-call-dh-foo/build-spec/debian/rules @@ -0,0 +1,10 @@ +#!/usr/bin/make -f + +%: + dh $@ + +# Empty targets +override_dh_clean: +override_dh_fixperms: +override_dh_fixperms-indep: +override_dh_fixperms-arch: diff --git a/t/recipes/checks/debian/rules/rules-override-dh-foo-does-not-call-dh-foo/build-spec/fill-values b/t/recipes/checks/debian/rules/rules-override-dh-foo-does-not-call-dh-foo/build-spec/fill-values new file mode 100644 index 0000000..d652d91 --- /dev/null +++ b/t/recipes/checks/debian/rules/rules-override-dh-foo-does-not-call-dh-foo/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: upload-native +Testname: rules-override-dh-foo-does-not-call-dh-foo +Description: Test for missing calls to dh_foo in override_dh_foo diff --git a/t/recipes/checks/debian/rules/rules-override-dh-foo-does-not-call-dh-foo/eval/desc b/t/recipes/checks/debian/rules/rules-override-dh-foo-does-not-call-dh-foo/eval/desc new file mode 100644 index 0000000..92a9b16 --- /dev/null +++ b/t/recipes/checks/debian/rules/rules-override-dh-foo-does-not-call-dh-foo/eval/desc @@ -0,0 +1,2 @@ +Testname: rules-override-dh-foo-does-not-call-dh-foo +Check: debian/rules diff --git a/t/recipes/checks/debian/rules/rules-override-dh-foo-does-not-call-dh-foo/eval/hints b/t/recipes/checks/debian/rules/rules-override-dh-foo-does-not-call-dh-foo/eval/hints new file mode 100644 index 0000000..171356a --- /dev/null +++ b/t/recipes/checks/debian/rules/rules-override-dh-foo-does-not-call-dh-foo/eval/hints @@ -0,0 +1,4 @@ +rules-override-dh-foo-does-not-call-dh-foo (source): override_dh_fixperms-does-not-call-dh_fixperms [debian/rules:9] +rules-override-dh-foo-does-not-call-dh-foo (source): override_dh_fixperms-does-not-call-dh_fixperms [debian/rules:8] +rules-override-dh-foo-does-not-call-dh-foo (source): override_dh_fixperms-does-not-call-dh_fixperms [debian/rules:10] +rules-override-dh-foo-does-not-call-dh-foo (source): override_dh_clean-does-not-call-dh_clean [debian/rules:7] diff --git a/t/recipes/checks/debian/rules/rules-parses-dpkg-parsechangelog/build-spec/debian/rules b/t/recipes/checks/debian/rules/rules-parses-dpkg-parsechangelog/build-spec/debian/rules new file mode 100644 index 0000000..9ea710e --- /dev/null +++ b/t/recipes/checks/debian/rules/rules-parses-dpkg-parsechangelog/build-spec/debian/rules @@ -0,0 +1,11 @@ +#!/usr/bin/make -f + +DATE = $(shell dpkg-parsechangelog -SDate) +SOURCE = $(shell dpkg-parsechangelog -SSource) +SOURCE2 = $(shell dpkg-parsechangelog | grep ^Source | cut -d" " -f2) +VERSION = $(shell dpkg-parsechangelog -SVersion) +VERSION2 = $(shell dpkg-parsechangelog | sed -ne 's,^Version: *\(.*\)$$,\1,p') +TIMESTAMP = $(shell dpkg-parsechangelog -STimestamp) + +%: + dh $@ diff --git a/t/recipes/checks/debian/rules/rules-parses-dpkg-parsechangelog/build-spec/fill-values b/t/recipes/checks/debian/rules/rules-parses-dpkg-parsechangelog/build-spec/fill-values new file mode 100644 index 0000000..1f930fb --- /dev/null +++ b/t/recipes/checks/debian/rules/rules-parses-dpkg-parsechangelog/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: upload-native +Testname: rules-parses-dpkg-parsechangelog +Description: Test for debian/rules manually parsing dpkg-parsechangelog diff --git a/t/recipes/checks/debian/rules/rules-parses-dpkg-parsechangelog/eval/desc b/t/recipes/checks/debian/rules/rules-parses-dpkg-parsechangelog/eval/desc new file mode 100644 index 0000000..33856af --- /dev/null +++ b/t/recipes/checks/debian/rules/rules-parses-dpkg-parsechangelog/eval/desc @@ -0,0 +1,2 @@ +Testname: rules-parses-dpkg-parsechangelog +Check: debian/rules diff --git a/t/recipes/checks/debian/rules/rules-parses-dpkg-parsechangelog/eval/hints b/t/recipes/checks/debian/rules/rules-parses-dpkg-parsechangelog/eval/hints new file mode 100644 index 0000000..88e06d0 --- /dev/null +++ b/t/recipes/checks/debian/rules/rules-parses-dpkg-parsechangelog/eval/hints @@ -0,0 +1,6 @@ +rules-parses-dpkg-parsechangelog (source): debian-rules-parses-dpkg-parsechangelog [debian/rules:8] +rules-parses-dpkg-parsechangelog (source): debian-rules-parses-dpkg-parsechangelog [debian/rules:7] +rules-parses-dpkg-parsechangelog (source): debian-rules-parses-dpkg-parsechangelog [debian/rules:6] +rules-parses-dpkg-parsechangelog (source): debian-rules-parses-dpkg-parsechangelog [debian/rules:5] +rules-parses-dpkg-parsechangelog (source): debian-rules-parses-dpkg-parsechangelog [debian/rules:4] +rules-parses-dpkg-parsechangelog (source): debian-rules-parses-dpkg-parsechangelog [debian/rules:3] diff --git a/t/recipes/checks/debian/rules/rules-sanitize-all-buildflag/build-spec/debian/rules b/t/recipes/checks/debian/rules/rules-sanitize-all-buildflag/build-spec/debian/rules new file mode 100755 index 0000000..eef8ddc --- /dev/null +++ b/t/recipes/checks/debian/rules/rules-sanitize-all-buildflag/build-spec/debian/rules @@ -0,0 +1,6 @@ +#!/usr/bin/make -f + +export DEB_BUILD_MAINT_OPTIONS = sanitize=+all + +%: + dh $@ diff --git a/t/recipes/checks/debian/rules/rules-sanitize-all-buildflag/build-spec/fill-values b/t/recipes/checks/debian/rules/rules-sanitize-all-buildflag/build-spec/fill-values new file mode 100644 index 0000000..1fac498 --- /dev/null +++ b/t/recipes/checks/debian/rules/rules-sanitize-all-buildflag/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: upload-native +Testname: rules-sanitize-all-buildflag +Description: Test for sanitize=+all diff --git a/t/recipes/checks/debian/rules/rules-sanitize-all-buildflag/eval/desc b/t/recipes/checks/debian/rules/rules-sanitize-all-buildflag/eval/desc new file mode 100644 index 0000000..606ce75 --- /dev/null +++ b/t/recipes/checks/debian/rules/rules-sanitize-all-buildflag/eval/desc @@ -0,0 +1,2 @@ +Testname: rules-sanitize-all-buildflag +Check: debian/rules diff --git a/t/recipes/checks/debian/rules/rules-sanitize-all-buildflag/eval/hints b/t/recipes/checks/debian/rules/rules-sanitize-all-buildflag/eval/hints new file mode 100644 index 0000000..8602693 --- /dev/null +++ b/t/recipes/checks/debian/rules/rules-sanitize-all-buildflag/eval/hints @@ -0,0 +1 @@ +rules-sanitize-all-buildflag (source): debian-rules-should-not-use-sanitize-all-buildflag [debian/rules:3] diff --git a/t/recipes/checks/debian/rules/rules-sets-dpkg-architecture-variable/build-spec/debian/rules b/t/recipes/checks/debian/rules/rules-sets-dpkg-architecture-variable/build-spec/debian/rules new file mode 100755 index 0000000..77454fa --- /dev/null +++ b/t/recipes/checks/debian/rules/rules-sets-dpkg-architecture-variable/build-spec/debian/rules @@ -0,0 +1,8 @@ +#!/usr/bin/make -f + +export DEB_HOST_ARCH = invalid +export DEB_BUILD_ARCH := invalid +export DEB_TARGET_ARCH ?= false-positive + +%: + dh $@ diff --git a/t/recipes/checks/debian/rules/rules-sets-dpkg-architecture-variable/build-spec/fill-values b/t/recipes/checks/debian/rules/rules-sets-dpkg-architecture-variable/build-spec/fill-values new file mode 100644 index 0000000..7d7bc0a --- /dev/null +++ b/t/recipes/checks/debian/rules/rules-sets-dpkg-architecture-variable/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: upload-native +Testname: rules-sets-dpkg-architecture-variable +Description: Test for unnecessary dpkg-architecture assignments diff --git a/t/recipes/checks/debian/rules/rules-sets-dpkg-architecture-variable/eval/desc b/t/recipes/checks/debian/rules/rules-sets-dpkg-architecture-variable/eval/desc new file mode 100644 index 0000000..bc0cb7a --- /dev/null +++ b/t/recipes/checks/debian/rules/rules-sets-dpkg-architecture-variable/eval/desc @@ -0,0 +1,2 @@ +Testname: rules-sets-dpkg-architecture-variable +Check: debian/rules diff --git a/t/recipes/checks/debian/rules/rules-sets-dpkg-architecture-variable/eval/hints b/t/recipes/checks/debian/rules/rules-sets-dpkg-architecture-variable/eval/hints new file mode 100644 index 0000000..e636d4b --- /dev/null +++ b/t/recipes/checks/debian/rules/rules-sets-dpkg-architecture-variable/eval/hints @@ -0,0 +1,2 @@ +rules-sets-dpkg-architecture-variable (source): debian-rules-sets-dpkg-architecture-variable DEB_HOST_ARCH [debian/rules:3] +rules-sets-dpkg-architecture-variable (source): debian-rules-sets-dpkg-architecture-variable DEB_BUILD_ARCH [debian/rules:4] diff --git a/t/recipes/checks/debian/rules/rules-should-not-use-custom-compression-settings/build-spec/debian/rules b/t/recipes/checks/debian/rules/rules-should-not-use-custom-compression-settings/build-spec/debian/rules new file mode 100755 index 0000000..fbbdc99 --- /dev/null +++ b/t/recipes/checks/debian/rules/rules-should-not-use-custom-compression-settings/build-spec/debian/rules @@ -0,0 +1,12 @@ +#!/usr/bin/make -f + +%: + dh $@ + +override_dh_builddeb: + dh_builddeb -- -Zxz -z 9 + dh_builddeb -- -z9 -Z xz + dh_builddeb -- -z8 -Z xz + dh_builddeb -- -z9 -Zgzip + dh_builddeb -- -Zxz -Sextreme -z9 + dh_builddeb -- -Zxz -z9 -Sextreme diff --git a/t/recipes/checks/debian/rules/rules-should-not-use-custom-compression-settings/build-spec/fill-values b/t/recipes/checks/debian/rules/rules-should-not-use-custom-compression-settings/build-spec/fill-values new file mode 100644 index 0000000..683fab9 --- /dev/null +++ b/t/recipes/checks/debian/rules/rules-should-not-use-custom-compression-settings/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: upload-native +Testname: rules-should-not-use-custom-compression-settings +Description: Test for over-eager tarball compression etc. diff --git a/t/recipes/checks/debian/rules/rules-should-not-use-custom-compression-settings/eval/desc b/t/recipes/checks/debian/rules/rules-should-not-use-custom-compression-settings/eval/desc new file mode 100644 index 0000000..8f09d8f --- /dev/null +++ b/t/recipes/checks/debian/rules/rules-should-not-use-custom-compression-settings/eval/desc @@ -0,0 +1,2 @@ +Testname: rules-should-not-use-custom-compression-settings +Check: debian/rules diff --git a/t/recipes/checks/debian/rules/rules-should-not-use-custom-compression-settings/eval/hints b/t/recipes/checks/debian/rules/rules-should-not-use-custom-compression-settings/eval/hints new file mode 100644 index 0000000..09e88f1 --- /dev/null +++ b/t/recipes/checks/debian/rules/rules-should-not-use-custom-compression-settings/eval/hints @@ -0,0 +1,6 @@ +rules-should-not-use-custom-compression-settings (source): custom-compression-in-debian-rules dh_builddeb -- -z9 -Zgzip [debian/rules:10] +rules-should-not-use-custom-compression-settings (source): custom-compression-in-debian-rules dh_builddeb -- -z9 -Z xz [debian/rules:8] +rules-should-not-use-custom-compression-settings (source): custom-compression-in-debian-rules dh_builddeb -- -z8 -Z xz [debian/rules:9] +rules-should-not-use-custom-compression-settings (source): custom-compression-in-debian-rules dh_builddeb -- -Zxz -z9 -Sextreme [debian/rules:12] +rules-should-not-use-custom-compression-settings (source): custom-compression-in-debian-rules dh_builddeb -- -Zxz -Sextreme -z9 [debian/rules:11] +rules-should-not-use-custom-compression-settings (source): custom-compression-in-debian-rules dh_builddeb -- -Zxz -z 9 [debian/rules:7] diff --git a/t/recipes/checks/debian/rules/rules-special-variables/build-spec/debian/rules b/t/recipes/checks/debian/rules/rules-special-variables/build-spec/debian/rules new file mode 100644 index 0000000..fe1e7a6 --- /dev/null +++ b/t/recipes/checks/debian/rules/rules-special-variables/build-spec/debian/rules @@ -0,0 +1,7 @@ +#!/usr/bin/make -f + +DEB_CFLAGS_APPEND:= -Wl,--as-needed + +%: + dh $@ + diff --git a/t/recipes/checks/debian/rules/rules-special-variables/build-spec/fill-values b/t/recipes/checks/debian/rules/rules-special-variables/build-spec/fill-values new file mode 100644 index 0000000..6ca7a03 --- /dev/null +++ b/t/recipes/checks/debian/rules/rules-special-variables/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: upload-native +Testname: rules-special-variables +Description: Test for debian/rules using special variables diff --git a/t/recipes/checks/debian/rules/rules-special-variables/eval/desc b/t/recipes/checks/debian/rules/rules-special-variables/eval/desc new file mode 100644 index 0000000..3fc89d6 --- /dev/null +++ b/t/recipes/checks/debian/rules/rules-special-variables/eval/desc @@ -0,0 +1,2 @@ +Testname: rules-special-variables +Check: debian/rules diff --git a/t/recipes/checks/debian/rules/rules-special-variables/eval/hints b/t/recipes/checks/debian/rules/rules-special-variables/eval/hints new file mode 100644 index 0000000..198af25 --- /dev/null +++ b/t/recipes/checks/debian/rules/rules-special-variables/eval/hints @@ -0,0 +1,2 @@ +rules-special-variables (source): debian-rules-uses-wrong-environment-variable [debian/rules:3] +rules-special-variables (source): debian-rules-uses-as-needed-linker-flag [debian/rules:3] diff --git a/t/recipes/checks/debian/rules/rules-symlink/build-spec/debian/rules.real b/t/recipes/checks/debian/rules/rules-symlink/build-spec/debian/rules.real new file mode 100644 index 0000000..2d33f6a --- /dev/null +++ b/t/recipes/checks/debian/rules/rules-symlink/build-spec/debian/rules.real @@ -0,0 +1,4 @@ +#!/usr/bin/make -f + +%: + dh $@ diff --git a/t/recipes/checks/debian/rules/rules-symlink/build-spec/fill-values b/t/recipes/checks/debian/rules/rules-symlink/build-spec/fill-values new file mode 100644 index 0000000..e68b709 --- /dev/null +++ b/t/recipes/checks/debian/rules/rules-symlink/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: upload-native +Testname: rules-symlink +Description: Test for debian/rules being a symlink diff --git a/t/recipes/checks/debian/rules/rules-symlink/build-spec/pre-build b/t/recipes/checks/debian/rules/rules-symlink/build-spec/pre-build new file mode 100755 index 0000000..c887d2c --- /dev/null +++ b/t/recipes/checks/debian/rules/rules-symlink/build-spec/pre-build @@ -0,0 +1,6 @@ +#!/bin/sh +# Create d/rules as a symlink. + +ROOT_DIR="$1" + +ln -fs rules.real "${ROOT_DIR}/debian/rules" diff --git a/t/recipes/checks/debian/rules/rules-symlink/eval/desc b/t/recipes/checks/debian/rules/rules-symlink/eval/desc new file mode 100644 index 0000000..858059c --- /dev/null +++ b/t/recipes/checks/debian/rules/rules-symlink/eval/desc @@ -0,0 +1,2 @@ +Testname: rules-symlink +Check: debian/rules diff --git a/t/recipes/checks/debian/rules/rules-symlink/eval/hints b/t/recipes/checks/debian/rules/rules-symlink/eval/hints new file mode 100644 index 0000000..02f26f1 --- /dev/null +++ b/t/recipes/checks/debian/rules/rules-symlink/eval/hints @@ -0,0 +1 @@ +rules-symlink (source): debian-rules-is-symlink [debian/rules] diff --git a/t/recipes/checks/debian/rules/rules-unnecessary-get-orig-source/build-spec/debian/rules b/t/recipes/checks/debian/rules/rules-unnecessary-get-orig-source/build-spec/debian/rules new file mode 100755 index 0000000..6749484 --- /dev/null +++ b/t/recipes/checks/debian/rules/rules-unnecessary-get-orig-source/build-spec/debian/rules @@ -0,0 +1,7 @@ +#!/usr/bin/make -f + +%: + dh $@ + +get-orig-source: + uscan --noconf --force-download --rename --download-current-version --destdir=.. diff --git a/t/recipes/checks/debian/rules/rules-unnecessary-get-orig-source/build-spec/fill-values b/t/recipes/checks/debian/rules/rules-unnecessary-get-orig-source/build-spec/fill-values new file mode 100644 index 0000000..898d615 --- /dev/null +++ b/t/recipes/checks/debian/rules/rules-unnecessary-get-orig-source/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: upload-native +Testname: rules-unnecessary-get-orig-source +Description: Test for unnecessary get-orig-source targets diff --git a/t/recipes/checks/debian/rules/rules-unnecessary-get-orig-source/eval/desc b/t/recipes/checks/debian/rules/rules-unnecessary-get-orig-source/eval/desc new file mode 100644 index 0000000..067529a --- /dev/null +++ b/t/recipes/checks/debian/rules/rules-unnecessary-get-orig-source/eval/desc @@ -0,0 +1,2 @@ +Testname: rules-unnecessary-get-orig-source +Check: debian/rules diff --git a/t/recipes/checks/debian/rules/rules-unnecessary-get-orig-source/eval/hints b/t/recipes/checks/debian/rules/rules-unnecessary-get-orig-source/eval/hints new file mode 100644 index 0000000..accab16 --- /dev/null +++ b/t/recipes/checks/debian/rules/rules-unnecessary-get-orig-source/eval/hints @@ -0,0 +1 @@ +rules-unnecessary-get-orig-source (source): debian-rules-contains-unnecessary-get-orig-source-target [debian/rules] diff --git a/t/recipes/checks/debian/rules/rules-unnecessary-source-date-epoch-unrel/build-spec/debian/control.in b/t/recipes/checks/debian/rules/rules-unnecessary-source-date-epoch-unrel/build-spec/debian/control.in new file mode 100644 index 0000000..dea8a56 --- /dev/null +++ b/t/recipes/checks/debian/rules/rules-unnecessary-source-date-epoch-unrel/build-spec/debian/control.in @@ -0,0 +1,16 @@ +Source: [% $source %] +Priority: optional +Section: python +Maintainer: [% $author %] +Standards-Version: [% $standards_version %] +Build-Depends: [% $build_depends %], dpkg-dev (>= 1.18.8), debhelper (>= 10.10) +Rules-Requires-Root: no + +Package: [% $source %] +Architecture: all +Depends: ${misc:Depends} +Description: Test package + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. diff --git a/t/recipes/checks/debian/rules/rules-unnecessary-source-date-epoch-unrel/build-spec/debian/rules b/t/recipes/checks/debian/rules/rules-unnecessary-source-date-epoch-unrel/build-spec/debian/rules new file mode 100755 index 0000000..ec2dec6 --- /dev/null +++ b/t/recipes/checks/debian/rules/rules-unnecessary-source-date-epoch-unrel/build-spec/debian/rules @@ -0,0 +1,8 @@ +#!/usr/bin/make -f + +SOURCE_DATE_EPOCH = $(shell date -d "$$(dpkg-parsechangelog -SDate)" +%s) + +export SOURCE_DATE_EPOCH = $(shell date +%s) + +%: + dh $@ diff --git a/t/recipes/checks/debian/rules/rules-unnecessary-source-date-epoch-unrel/build-spec/fill-values b/t/recipes/checks/debian/rules/rules-unnecessary-source-date-epoch-unrel/build-spec/fill-values new file mode 100644 index 0000000..76255aa --- /dev/null +++ b/t/recipes/checks/debian/rules/rules-unnecessary-source-date-epoch-unrel/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: upload-native +Testname: rules-unnecessary-source-date-epoch-unrel +Description: Test for unnecessary SOURCE_DATE_EPOCH assignments (false positive) diff --git a/t/recipes/checks/debian/rules/rules-unnecessary-source-date-epoch-unrel/eval/desc b/t/recipes/checks/debian/rules/rules-unnecessary-source-date-epoch-unrel/eval/desc new file mode 100644 index 0000000..ae35f68 --- /dev/null +++ b/t/recipes/checks/debian/rules/rules-unnecessary-source-date-epoch-unrel/eval/desc @@ -0,0 +1,4 @@ +Testname: rules-unnecessary-source-date-epoch-unrel +Test-Against: + unnecessary-source-date-epoch-assignment +Check: debian/rules diff --git a/t/recipes/checks/debian/rules/rules-unnecessary-source-date-epoch-unrel/eval/hints b/t/recipes/checks/debian/rules/rules-unnecessary-source-date-epoch-unrel/eval/hints new file mode 100644 index 0000000..eb59578 --- /dev/null +++ b/t/recipes/checks/debian/rules/rules-unnecessary-source-date-epoch-unrel/eval/hints @@ -0,0 +1 @@ +rules-unnecessary-source-date-epoch-unrel (source): debian-rules-parses-dpkg-parsechangelog [debian/rules:3] diff --git a/t/recipes/checks/debian/rules/rules-unnecessary-source-date-epoch/build-spec/debian/compat.in b/t/recipes/checks/debian/rules/rules-unnecessary-source-date-epoch/build-spec/debian/compat.in new file mode 100644 index 0000000..640a566 --- /dev/null +++ b/t/recipes/checks/debian/rules/rules-unnecessary-source-date-epoch/build-spec/debian/compat.in @@ -0,0 +1 @@ +[% $dh_compat_level %] diff --git a/t/recipes/checks/debian/rules/rules-unnecessary-source-date-epoch/build-spec/debian/control.in b/t/recipes/checks/debian/rules/rules-unnecessary-source-date-epoch/build-spec/debian/control.in new file mode 100644 index 0000000..163f8bc --- /dev/null +++ b/t/recipes/checks/debian/rules/rules-unnecessary-source-date-epoch/build-spec/debian/control.in @@ -0,0 +1,16 @@ +Source: [% $source %] +Priority: optional +Section: python +Maintainer: [% $author %] +Standards-Version: [% $standards_version %] +Build-Depends: dpkg-dev (>= 1.18.7), debhelper (>= 10.9) +Rules-Requires-Root: no + +Package: [% $source %] +Architecture: [% $package_architecture %] +Depends: ${misc:Depends} +Description: Test package + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. diff --git a/t/recipes/checks/debian/rules/rules-unnecessary-source-date-epoch/build-spec/debian/rules b/t/recipes/checks/debian/rules/rules-unnecessary-source-date-epoch/build-spec/debian/rules new file mode 100755 index 0000000..ec2dec6 --- /dev/null +++ b/t/recipes/checks/debian/rules/rules-unnecessary-source-date-epoch/build-spec/debian/rules @@ -0,0 +1,8 @@ +#!/usr/bin/make -f + +SOURCE_DATE_EPOCH = $(shell date -d "$$(dpkg-parsechangelog -SDate)" +%s) + +export SOURCE_DATE_EPOCH = $(shell date +%s) + +%: + dh $@ diff --git a/t/recipes/checks/debian/rules/rules-unnecessary-source-date-epoch/build-spec/fill-values b/t/recipes/checks/debian/rules/rules-unnecessary-source-date-epoch/build-spec/fill-values new file mode 100644 index 0000000..b8dc1b6 --- /dev/null +++ b/t/recipes/checks/debian/rules/rules-unnecessary-source-date-epoch/build-spec/fill-values @@ -0,0 +1,4 @@ +Skeleton: upload-native +Testname: rules-unnecessary-source-date-epoch +Dh-Compat-Level: 10 +Description: Test for unnecessary SOURCE_DATE_EPOCH assignments diff --git a/t/recipes/checks/debian/rules/rules-unnecessary-source-date-epoch/eval/desc b/t/recipes/checks/debian/rules/rules-unnecessary-source-date-epoch/eval/desc new file mode 100644 index 0000000..d1cf5d7 --- /dev/null +++ b/t/recipes/checks/debian/rules/rules-unnecessary-source-date-epoch/eval/desc @@ -0,0 +1,2 @@ +Testname: rules-unnecessary-source-date-epoch +Check: debian/rules diff --git a/t/recipes/checks/debian/rules/rules-unnecessary-source-date-epoch/eval/hints b/t/recipes/checks/debian/rules/rules-unnecessary-source-date-epoch/eval/hints new file mode 100644 index 0000000..4c1864a --- /dev/null +++ b/t/recipes/checks/debian/rules/rules-unnecessary-source-date-epoch/eval/hints @@ -0,0 +1,3 @@ +rules-unnecessary-source-date-epoch (source): unnecessary-source-date-epoch-assignment [debian/rules:5] +rules-unnecessary-source-date-epoch (source): unnecessary-source-date-epoch-assignment [debian/rules:3] +rules-unnecessary-source-date-epoch (source): debian-rules-parses-dpkg-parsechangelog [debian/rules:3] diff --git a/t/recipes/checks/debian/rules/rules-variable-targets/build-spec/debian/rules b/t/recipes/checks/debian/rules/rules-variable-targets/build-spec/debian/rules new file mode 100644 index 0000000..bdb1c68 --- /dev/null +++ b/t/recipes/checks/debian/rules/rules-variable-targets/build-spec/debian/rules @@ -0,0 +1,9 @@ +#!/usr/bin/make -f + + TARGETS := build clean binary binary-arch binary-indep build-arch build-indep + +$(TARGETS): + dh $@ + +.PHONY: $(TARGETS) + diff --git a/t/recipes/checks/debian/rules/rules-variable-targets/build-spec/fill-values b/t/recipes/checks/debian/rules/rules-variable-targets/build-spec/fill-values new file mode 100644 index 0000000..45c7abb --- /dev/null +++ b/t/recipes/checks/debian/rules/rules-variable-targets/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: upload-native +Testname: rules-variable-targets +Description: Test against missing targets in debian/rules diff --git a/t/recipes/checks/debian/rules/rules-variable-targets/eval/desc b/t/recipes/checks/debian/rules/rules-variable-targets/eval/desc new file mode 100644 index 0000000..00b2ccc --- /dev/null +++ b/t/recipes/checks/debian/rules/rules-variable-targets/eval/desc @@ -0,0 +1,3 @@ +Testname: rules-variable-targets +Test-Against: debian-rules-missing-recommended-target +Check: debian/rules diff --git a/t/recipes/checks/debian/rules/rules-variable-targets/eval/hints b/t/recipes/checks/debian/rules/rules-variable-targets/eval/hints new file mode 100644 index 0000000..e69de29 diff --git a/t/recipes/checks/debian/shlibs/binaries-doesnt-match-sonames/build-spec/debian/compat.in b/t/recipes/checks/debian/shlibs/binaries-doesnt-match-sonames/build-spec/debian/compat.in new file mode 100644 index 0000000..640a566 --- /dev/null +++ b/t/recipes/checks/debian/shlibs/binaries-doesnt-match-sonames/build-spec/debian/compat.in @@ -0,0 +1 @@ +[% $dh_compat_level %] diff --git a/t/recipes/checks/debian/shlibs/binaries-doesnt-match-sonames/build-spec/debian/control.in b/t/recipes/checks/debian/shlibs/binaries-doesnt-match-sonames/build-spec/debian/control.in new file mode 100644 index 0000000..1109beb --- /dev/null +++ b/t/recipes/checks/debian/shlibs/binaries-doesnt-match-sonames/build-spec/debian/control.in @@ -0,0 +1,48 @@ +Source: [% $source %] +Priority: optional +Section: libs +Maintainer: [% $author %] +Standards-Version: [% $standards_version %] +Build-Depends: [% $build_depends %] +Rules-Requires-Root: no + +Package: mylibany +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: [% $description %] + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. + + +Package: libany6gcc1v6 +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: [% $description %] with gcc 6 version + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. + . + It test if v6 string are correctly escaped + +Package: libany5gcc1v5 +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: [% $description %] with gcc 5 version + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. + . + It test if v5 string are correctly escaped + +Package: libanyq16-6 +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: [% $description %] with Q16 version + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. + . + It test if string are correctly escaped like for imagemagick. + . + library name is not libanyQ166 \ No newline at end of file diff --git a/t/recipes/checks/debian/shlibs/binaries-doesnt-match-sonames/build-spec/debian/libany5gcc1v5.install b/t/recipes/checks/debian/shlibs/binaries-doesnt-match-sonames/build-spec/debian/libany5gcc1v5.install new file mode 100644 index 0000000..283bc61 --- /dev/null +++ b/t/recipes/checks/debian/shlibs/binaries-doesnt-match-sonames/build-spec/debian/libany5gcc1v5.install @@ -0,0 +1 @@ +/usr/lib/libany5gcc.* \ No newline at end of file diff --git a/t/recipes/checks/debian/shlibs/binaries-doesnt-match-sonames/build-spec/debian/libany5gcc1v5.symbols b/t/recipes/checks/debian/shlibs/binaries-doesnt-match-sonames/build-spec/debian/libany5gcc1v5.symbols new file mode 100644 index 0000000..a394502 --- /dev/null +++ b/t/recipes/checks/debian/shlibs/binaries-doesnt-match-sonames/build-spec/debian/libany5gcc1v5.symbols @@ -0,0 +1,2 @@ +libany5gcc.so.1 libany5gcc1v5 #MINVER# + e@Base 1.0 diff --git a/t/recipes/checks/debian/shlibs/binaries-doesnt-match-sonames/build-spec/debian/libany6gcc1v6.install b/t/recipes/checks/debian/shlibs/binaries-doesnt-match-sonames/build-spec/debian/libany6gcc1v6.install new file mode 100644 index 0000000..9485e87 --- /dev/null +++ b/t/recipes/checks/debian/shlibs/binaries-doesnt-match-sonames/build-spec/debian/libany6gcc1v6.install @@ -0,0 +1 @@ +/usr/lib/libany6gcc.* \ No newline at end of file diff --git a/t/recipes/checks/debian/shlibs/binaries-doesnt-match-sonames/build-spec/debian/libany6gcc1v6.symbols b/t/recipes/checks/debian/shlibs/binaries-doesnt-match-sonames/build-spec/debian/libany6gcc1v6.symbols new file mode 100644 index 0000000..aee5f00 --- /dev/null +++ b/t/recipes/checks/debian/shlibs/binaries-doesnt-match-sonames/build-spec/debian/libany6gcc1v6.symbols @@ -0,0 +1,2 @@ +libany6gcc.so.1v6 libany6gcc1v6 #MINVER# + e@Base 1.0 diff --git a/t/recipes/checks/debian/shlibs/binaries-doesnt-match-sonames/build-spec/debian/libanyq16-6.install b/t/recipes/checks/debian/shlibs/binaries-doesnt-match-sonames/build-spec/debian/libanyq16-6.install new file mode 100644 index 0000000..b4ecaea --- /dev/null +++ b/t/recipes/checks/debian/shlibs/binaries-doesnt-match-sonames/build-spec/debian/libanyq16-6.install @@ -0,0 +1 @@ +/usr/lib/libanyQ16* \ No newline at end of file diff --git a/t/recipes/checks/debian/shlibs/binaries-doesnt-match-sonames/build-spec/debian/libanyq16-6.symbols b/t/recipes/checks/debian/shlibs/binaries-doesnt-match-sonames/build-spec/debian/libanyq16-6.symbols new file mode 100644 index 0000000..0f32f79 --- /dev/null +++ b/t/recipes/checks/debian/shlibs/binaries-doesnt-match-sonames/build-spec/debian/libanyq16-6.symbols @@ -0,0 +1,2 @@ +libanyQ16.so.1v6 libanyQ16-6 #MINVER# + e@Base 1.0 diff --git a/t/recipes/checks/debian/shlibs/binaries-doesnt-match-sonames/build-spec/debian/mylibany.install b/t/recipes/checks/debian/shlibs/binaries-doesnt-match-sonames/build-spec/debian/mylibany.install new file mode 100644 index 0000000..5c86ce1 --- /dev/null +++ b/t/recipes/checks/debian/shlibs/binaries-doesnt-match-sonames/build-spec/debian/mylibany.install @@ -0,0 +1 @@ +/usr/lib/libany.* \ No newline at end of file diff --git a/t/recipes/checks/debian/shlibs/binaries-doesnt-match-sonames/build-spec/debian/mylibany.symbols b/t/recipes/checks/debian/shlibs/binaries-doesnt-match-sonames/build-spec/debian/mylibany.symbols new file mode 100644 index 0000000..9b6f454 --- /dev/null +++ b/t/recipes/checks/debian/shlibs/binaries-doesnt-match-sonames/build-spec/debian/mylibany.symbols @@ -0,0 +1,2 @@ +libany.so.1 mylibany #MINVER# + e@Base 1.0 diff --git a/t/recipes/checks/debian/shlibs/binaries-doesnt-match-sonames/build-spec/fill-values b/t/recipes/checks/debian/shlibs/binaries-doesnt-match-sonames/build-spec/fill-values new file mode 100644 index 0000000..523eb0b --- /dev/null +++ b/t/recipes/checks/debian/shlibs/binaries-doesnt-match-sonames/build-spec/fill-values @@ -0,0 +1,5 @@ +Skeleton: upload-native +Testname: binaries-doesnt-match-sonames +Default-Build-Depends: debhelper (>= 9.20151004~) +Dh-Compat-Level: 9 +Description: Test for library package that does not match SONAME diff --git a/t/recipes/checks/debian/shlibs/binaries-doesnt-match-sonames/build-spec/orig/Makefile b/t/recipes/checks/debian/shlibs/binaries-doesnt-match-sonames/build-spec/orig/Makefile new file mode 100644 index 0000000..21a67b5 --- /dev/null +++ b/t/recipes/checks/debian/shlibs/binaries-doesnt-match-sonames/build-spec/orig/Makefile @@ -0,0 +1,23 @@ +CC=gcc +MYCFLAGS=-Wall -Winline -O2 -fPIC +CFLAGS:=$(MYCFLAGS) $(CPPFLAGS) $(CFLAGS) + +SONAMES:= libany.so.1 libany6gcc.so.1v6 libany5gcc.so.1 libanyQ16.so.6 +LIBFILES:= $(patsubst %,%.0.1, $(SONAMES)) + +all: $(LIBFILES) + +$(LIBFILES): code.o + $(CC) $(LDFLAGS) -o $@ -shared -Wl,-soname,$(patsubst %.0.1,%,$@) $^ -lc + +clean: + rm -f *.a *.o *.so* + +install: all + install -m 0755 -d $(DESTDIR)/usr/lib + install -m 0755 *.so* $(DESTDIR)/usr/lib + for FILE in $(SONAMES) ; do \ + ln -s $${FILE}.0.1 $(DESTDIR)/usr/lib/$$FILE ; \ + done + +.PHONY: install clean diff --git a/t/recipes/checks/debian/shlibs/binaries-doesnt-match-sonames/build-spec/orig/code.c b/t/recipes/checks/debian/shlibs/binaries-doesnt-match-sonames/build-spec/orig/code.c new file mode 100644 index 0000000..0c4f917 --- /dev/null +++ b/t/recipes/checks/debian/shlibs/binaries-doesnt-match-sonames/build-spec/orig/code.c @@ -0,0 +1,9 @@ +#include +#include + +void e(char *p, int i, void (*f)(char *)){ + char test[10]; + memcpy(test, p, i); + f(test); + printf("%s", test); +} diff --git a/t/recipes/checks/debian/shlibs/binaries-doesnt-match-sonames/eval/desc b/t/recipes/checks/debian/shlibs/binaries-doesnt-match-sonames/eval/desc new file mode 100644 index 0000000..02d87f3 --- /dev/null +++ b/t/recipes/checks/debian/shlibs/binaries-doesnt-match-sonames/eval/desc @@ -0,0 +1,2 @@ +Testname: binaries-doesnt-match-sonames +Check: debian/shlibs diff --git a/t/recipes/checks/debian/shlibs/binaries-doesnt-match-sonames/eval/hints b/t/recipes/checks/debian/shlibs/binaries-doesnt-match-sonames/eval/hints new file mode 100644 index 0000000..6cf925b --- /dev/null +++ b/t/recipes/checks/debian/shlibs/binaries-doesnt-match-sonames/eval/hints @@ -0,0 +1,4 @@ +mylibany (binary): symbols-file-missing-build-depends-package-field libany.so.1 [symbols] +libanyq16-6 (binary): symbols-file-missing-build-depends-package-field libanyQ16.so.6 [symbols] +libany6gcc1v6 (binary): symbols-file-missing-build-depends-package-field libany6gcc.so.1v6 [symbols] +libany5gcc1v5 (binary): symbols-file-missing-build-depends-package-field libany5gcc.so.1 [symbols] diff --git a/t/recipes/checks/debian/shlibs/binaries-missing-depends-on-libc/build-spec/debian/compat.in b/t/recipes/checks/debian/shlibs/binaries-missing-depends-on-libc/build-spec/debian/compat.in new file mode 100644 index 0000000..640a566 --- /dev/null +++ b/t/recipes/checks/debian/shlibs/binaries-missing-depends-on-libc/build-spec/debian/compat.in @@ -0,0 +1 @@ +[% $dh_compat_level %] diff --git a/t/recipes/checks/debian/shlibs/binaries-missing-depends-on-libc/build-spec/debian/control.in b/t/recipes/checks/debian/shlibs/binaries-missing-depends-on-libc/build-spec/debian/control.in new file mode 100644 index 0000000..d8adb1b --- /dev/null +++ b/t/recipes/checks/debian/shlibs/binaries-missing-depends-on-libc/build-spec/debian/control.in @@ -0,0 +1,17 @@ +Source: [% $source %] +Priority: optional +Section: devel +Maintainer: [% $author %] +Standards-Version: [% $standards_version %] +Build-Depends: [% $build_depends %], perl +Rules-Requires-Root: no + +Package: libbasic2 +Section: libs +Architecture: [% $package_architecture %] +Depends: some-pkg, ${misc:Depends}, ${shlib:Depends} +Description: [% $description %] + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. diff --git a/t/recipes/checks/debian/shlibs/binaries-missing-depends-on-libc/build-spec/debian/libbasic2.symbols b/t/recipes/checks/debian/shlibs/binaries-missing-depends-on-libc/build-spec/debian/libbasic2.symbols new file mode 100644 index 0000000..0119bca --- /dev/null +++ b/t/recipes/checks/debian/shlibs/binaries-missing-depends-on-libc/build-spec/debian/libbasic2.symbols @@ -0,0 +1,4 @@ +libbasic.so.2 libbasic2 #MINVER# + lib_interface@Base 1.0 +libbasic++.so.2 libbasic2 #MINVER# + (c++)cxx_lib_interface@Base 1.0 diff --git a/t/recipes/checks/debian/shlibs/binaries-missing-depends-on-libc/build-spec/debian/rules b/t/recipes/checks/debian/shlibs/binaries-missing-depends-on-libc/build-spec/debian/rules new file mode 100644 index 0000000..188f490 --- /dev/null +++ b/t/recipes/checks/debian/shlibs/binaries-missing-depends-on-libc/build-spec/debian/rules @@ -0,0 +1,15 @@ +#!/usr/bin/make -f + +export DEB_BUILD_MAINT_OPTIONS=hardening=+all + +# Make sure the C++ library actually links to libc +export DEB_LDFLAGS_MAINT_APPEND=-Wl,--no-as-needed + +%: + dh $@ + +override_dh_gencontrol: + # Remove the shlib:Depends since it will contain libc + sed -i '/shlib:Depends=/ d' debian/libbasic2.substvars + echo "shlib:depends=" >> debian/libbasic2.substvars + dh_gencontrol diff --git a/t/recipes/checks/debian/shlibs/binaries-missing-depends-on-libc/build-spec/fill-values b/t/recipes/checks/debian/shlibs/binaries-missing-depends-on-libc/build-spec/fill-values new file mode 100644 index 0000000..0f58398 --- /dev/null +++ b/t/recipes/checks/debian/shlibs/binaries-missing-depends-on-libc/build-spec/fill-values @@ -0,0 +1,6 @@ +Skeleton: upload-native +Testname: binaries-missing-depends-on-libc +Default-Build-Depends: debhelper (>= 9.20151004~) +Dh-Compat-Level: 9 +Description: Test for missing libc depends +Package-Architecture: any diff --git a/t/recipes/checks/debian/shlibs/binaries-missing-depends-on-libc/build-spec/orig/Makefile b/t/recipes/checks/debian/shlibs/binaries-missing-depends-on-libc/build-spec/orig/Makefile new file mode 100644 index 0000000..fcf25f4 --- /dev/null +++ b/t/recipes/checks/debian/shlibs/binaries-missing-depends-on-libc/build-spec/orig/Makefile @@ -0,0 +1,14 @@ +all: + gcc $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -fPIC -shared -Wl,-z,defs -Wl,-soname,libbasic.so.2 -o libbasic.so.2 basic.c + g++ $(CXXFLAGS) $(CPPFLAGS) $(LDFLAGS) -fPIC -shared -Wl,-z,defs \ + -Wl,-soname,libbasic++.so.2 -olibbasic++.so.2 cpp.cxx + +install: + install -d $(DESTDIR)/usr/lib/ + install -m 644 -c -s libbasic.so.2 $(DESTDIR)/usr/lib/libbasic.so.2 + install -m 644 -c -s libbasic++.so.2 $(DESTDIR)/usr/lib/libbasic++.so.2 + +clean distclean: + rm -f libbasic.so.2 libbasic++.so.2 + +check test: diff --git a/t/recipes/checks/debian/shlibs/binaries-missing-depends-on-libc/build-spec/orig/basic.c b/t/recipes/checks/debian/shlibs/binaries-missing-depends-on-libc/build-spec/orig/basic.c new file mode 100644 index 0000000..27e93fc --- /dev/null +++ b/t/recipes/checks/debian/shlibs/binaries-missing-depends-on-libc/build-spec/orig/basic.c @@ -0,0 +1,19 @@ +#include +#include + +static void +hardening_trigger(char *p, int i, void (*f)(char *)) +{ + char test[10]; + memcpy(test, p, i); + f(test); + printf("%s", test); +} + +int +lib_interface(void) +{ + printf("Hello world!\n"); + hardening_trigger(NULL, 0, NULL); + return 0; +} diff --git a/t/recipes/checks/debian/shlibs/binaries-missing-depends-on-libc/build-spec/orig/cpp.cxx b/t/recipes/checks/debian/shlibs/binaries-missing-depends-on-libc/build-spec/orig/cpp.cxx new file mode 100644 index 0000000..1338e40 --- /dev/null +++ b/t/recipes/checks/debian/shlibs/binaries-missing-depends-on-libc/build-spec/orig/cpp.cxx @@ -0,0 +1,14 @@ +#include +#include + +using namespace std; + +template T +cxx_lib_interface(vector &v) +{ + cout << ":-) hello world" << endl; + return v[0]; +} + + + diff --git a/t/recipes/checks/debian/shlibs/binaries-missing-depends-on-libc/eval/desc b/t/recipes/checks/debian/shlibs/binaries-missing-depends-on-libc/eval/desc new file mode 100644 index 0000000..368818c --- /dev/null +++ b/t/recipes/checks/debian/shlibs/binaries-missing-depends-on-libc/eval/desc @@ -0,0 +1,2 @@ +Testname: binaries-missing-depends-on-libc +Check: debian/shlibs diff --git a/t/recipes/checks/debian/shlibs/binaries-missing-depends-on-libc/eval/hints b/t/recipes/checks/debian/shlibs/binaries-missing-depends-on-libc/eval/hints new file mode 100644 index 0000000..7290044 --- /dev/null +++ b/t/recipes/checks/debian/shlibs/binaries-missing-depends-on-libc/eval/hints @@ -0,0 +1,2 @@ +libbasic2 (binary): symbols-file-missing-build-depends-package-field libbasic.so.2 [symbols] +libbasic2 (binary): symbols-file-missing-build-depends-package-field libbasic++.so.2 [symbols] diff --git a/t/recipes/checks/debian/shlibs/binaries-missing-depends/build-spec/debian/compat.in b/t/recipes/checks/debian/shlibs/binaries-missing-depends/build-spec/debian/compat.in new file mode 100644 index 0000000..640a566 --- /dev/null +++ b/t/recipes/checks/debian/shlibs/binaries-missing-depends/build-spec/debian/compat.in @@ -0,0 +1 @@ +[% $dh_compat_level %] diff --git a/t/recipes/checks/debian/shlibs/binaries-missing-depends/build-spec/debian/control.in b/t/recipes/checks/debian/shlibs/binaries-missing-depends/build-spec/debian/control.in new file mode 100644 index 0000000..3b37179 --- /dev/null +++ b/t/recipes/checks/debian/shlibs/binaries-missing-depends/build-spec/debian/control.in @@ -0,0 +1,17 @@ +Source: [% $source %] +Priority: optional +Section: devel +Maintainer: [% $author %] +Standards-Version: [% $standards_version %] +Build-Depends: [% $build_depends %], perl +Rules-Requires-Root: no + +Package: libbasic2 +Architecture: [% $package_architecture %] +Section: libs +Depends: ${misc:Depends}, ${shlib:Depends} +Description: [% $description %] + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. diff --git a/t/recipes/checks/debian/shlibs/binaries-missing-depends/build-spec/debian/libbasic2.symbols b/t/recipes/checks/debian/shlibs/binaries-missing-depends/build-spec/debian/libbasic2.symbols new file mode 100644 index 0000000..c2b8fb3 --- /dev/null +++ b/t/recipes/checks/debian/shlibs/binaries-missing-depends/build-spec/debian/libbasic2.symbols @@ -0,0 +1,2 @@ +libbasic.so.2 libbasic2 #MINVER# + lib_interface@Base 1.0 diff --git a/t/recipes/checks/debian/shlibs/binaries-missing-depends/build-spec/debian/rules b/t/recipes/checks/debian/shlibs/binaries-missing-depends/build-spec/debian/rules new file mode 100644 index 0000000..8a83255 --- /dev/null +++ b/t/recipes/checks/debian/shlibs/binaries-missing-depends/build-spec/debian/rules @@ -0,0 +1,10 @@ +#!/usr/bin/make -f + +export DEB_BUILD_MAINT_OPTIONS=hardening=+all + +%: + dh $@ + +override_dh_builddeb: + sed -i '/Depends:/ d' debian/libbasic2/DEBIAN/control + dh_builddeb diff --git a/t/recipes/checks/debian/shlibs/binaries-missing-depends/build-spec/fill-values b/t/recipes/checks/debian/shlibs/binaries-missing-depends/build-spec/fill-values new file mode 100644 index 0000000..b1caef8 --- /dev/null +++ b/t/recipes/checks/debian/shlibs/binaries-missing-depends/build-spec/fill-values @@ -0,0 +1,6 @@ +Skeleton: upload-native +Testname: binaries-missing-depends +Default-Build-Depends: debhelper (>= 9.20151004~) +Dh-Compat-Level: 9 +Description: Test for missing depends line +Package-Architecture: any diff --git a/t/recipes/checks/debian/shlibs/binaries-missing-depends/build-spec/orig/Makefile b/t/recipes/checks/debian/shlibs/binaries-missing-depends/build-spec/orig/Makefile new file mode 100644 index 0000000..6fc3968 --- /dev/null +++ b/t/recipes/checks/debian/shlibs/binaries-missing-depends/build-spec/orig/Makefile @@ -0,0 +1,12 @@ +all: + gcc $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -fPIC -shared -Wl,-z,defs -Wl,-soname,libbasic.so.2 -o libbasic.so.2 basic.c + +install: + # install it under the correct triplet directory + install -d $(DESTDIR)/usr/lib/ + install -m 644 -c -s libbasic.so.2 $(DESTDIR)/usr/lib/libbasic.so.2 + +clean distclean: + rm -f libbasic.so.2 + +check test: diff --git a/t/recipes/checks/debian/shlibs/binaries-missing-depends/build-spec/orig/basic.c b/t/recipes/checks/debian/shlibs/binaries-missing-depends/build-spec/orig/basic.c new file mode 100644 index 0000000..27e93fc --- /dev/null +++ b/t/recipes/checks/debian/shlibs/binaries-missing-depends/build-spec/orig/basic.c @@ -0,0 +1,19 @@ +#include +#include + +static void +hardening_trigger(char *p, int i, void (*f)(char *)) +{ + char test[10]; + memcpy(test, p, i); + f(test); + printf("%s", test); +} + +int +lib_interface(void) +{ + printf("Hello world!\n"); + hardening_trigger(NULL, 0, NULL); + return 0; +} diff --git a/t/recipes/checks/debian/shlibs/binaries-missing-depends/eval/desc b/t/recipes/checks/debian/shlibs/binaries-missing-depends/eval/desc new file mode 100644 index 0000000..e3ef2c0 --- /dev/null +++ b/t/recipes/checks/debian/shlibs/binaries-missing-depends/eval/desc @@ -0,0 +1,2 @@ +Testname: binaries-missing-depends +Check: debian/shlibs diff --git a/t/recipes/checks/debian/shlibs/binaries-missing-depends/eval/hints b/t/recipes/checks/debian/shlibs/binaries-missing-depends/eval/hints new file mode 100644 index 0000000..d4e8830 --- /dev/null +++ b/t/recipes/checks/debian/shlibs/binaries-missing-depends/eval/hints @@ -0,0 +1 @@ +libbasic2 (binary): symbols-file-missing-build-depends-package-field libbasic.so.2 [symbols] diff --git a/t/recipes/checks/debian/shlibs/binaries-multiarch-same/build-spec/debian/compat.in b/t/recipes/checks/debian/shlibs/binaries-multiarch-same/build-spec/debian/compat.in new file mode 100644 index 0000000..640a566 --- /dev/null +++ b/t/recipes/checks/debian/shlibs/binaries-multiarch-same/build-spec/debian/compat.in @@ -0,0 +1 @@ +[% $dh_compat_level %] diff --git a/t/recipes/checks/debian/shlibs/binaries-multiarch-same/build-spec/debian/control.in b/t/recipes/checks/debian/shlibs/binaries-multiarch-same/build-spec/debian/control.in new file mode 100644 index 0000000..2efaa33 --- /dev/null +++ b/t/recipes/checks/debian/shlibs/binaries-multiarch-same/build-spec/debian/control.in @@ -0,0 +1,25 @@ +Source: [% $source %] +Priority: optional +Section: libs +Maintainer: [% $author %] +Standards-Version: [% $standards_version %] +Build-Depends: [% $build_depends %] +Rules-Requires-Root: no + +Package: libbasic2 +Architecture: [% $package_architecture %] +Pre-Depends: ${misc:Pre-Depends}, multiarch-support +Depends: ${misc:Depends}, ${shlibs:Depends} +Multi-Arch: same +Description: [% $description %] + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. + . + Note there is an explicitly pre-depends on multiarch-support, since + older versions of debhelper might not use it yet. dpkg-dev will + remove the duplicate entry (if any). + + + diff --git a/t/recipes/checks/debian/shlibs/binaries-multiarch-same/build-spec/debian/libbasic2.symbols b/t/recipes/checks/debian/shlibs/binaries-multiarch-same/build-spec/debian/libbasic2.symbols new file mode 100644 index 0000000..c2b8fb3 --- /dev/null +++ b/t/recipes/checks/debian/shlibs/binaries-multiarch-same/build-spec/debian/libbasic2.symbols @@ -0,0 +1,2 @@ +libbasic.so.2 libbasic2 #MINVER# + lib_interface@Base 1.0 diff --git a/t/recipes/checks/debian/shlibs/binaries-multiarch-same/build-spec/fill-values b/t/recipes/checks/debian/shlibs/binaries-multiarch-same/build-spec/fill-values new file mode 100644 index 0000000..c508b75 --- /dev/null +++ b/t/recipes/checks/debian/shlibs/binaries-multiarch-same/build-spec/fill-values @@ -0,0 +1,6 @@ +Skeleton: upload-native +Testname: binaries-multiarch-same +Package-Architecture: any +Default-Build-Depends: debhelper (>= 9.20151004~) +Dh-Compat-Level: 9 +Description: Test of multiarch same package with unsafe binaries diff --git a/t/recipes/checks/debian/shlibs/binaries-multiarch-same/build-spec/orig/Makefile b/t/recipes/checks/debian/shlibs/binaries-multiarch-same/build-spec/orig/Makefile new file mode 100644 index 0000000..ad7783b --- /dev/null +++ b/t/recipes/checks/debian/shlibs/binaries-multiarch-same/build-spec/orig/Makefile @@ -0,0 +1,12 @@ + +all: + gcc $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -fPIC -shared -Wl,-z,defs -Wl,-soname,libbasic.so.2 -o libbasic.so.2 basic.c + +install: + install -d $(DESTDIR)/usr/lib/ + install -m 644 -c -s libbasic.so.2 $(DESTDIR)/usr/lib/libbasic.so.2 + +clean distclean: + rm -f libbasic.so.2 + +check test: diff --git a/t/recipes/checks/debian/shlibs/binaries-multiarch-same/build-spec/orig/basic.c b/t/recipes/checks/debian/shlibs/binaries-multiarch-same/build-spec/orig/basic.c new file mode 100644 index 0000000..27e93fc --- /dev/null +++ b/t/recipes/checks/debian/shlibs/binaries-multiarch-same/build-spec/orig/basic.c @@ -0,0 +1,19 @@ +#include +#include + +static void +hardening_trigger(char *p, int i, void (*f)(char *)) +{ + char test[10]; + memcpy(test, p, i); + f(test); + printf("%s", test); +} + +int +lib_interface(void) +{ + printf("Hello world!\n"); + hardening_trigger(NULL, 0, NULL); + return 0; +} diff --git a/t/recipes/checks/debian/shlibs/binaries-multiarch-same/eval/desc b/t/recipes/checks/debian/shlibs/binaries-multiarch-same/eval/desc new file mode 100644 index 0000000..cd079c8 --- /dev/null +++ b/t/recipes/checks/debian/shlibs/binaries-multiarch-same/eval/desc @@ -0,0 +1,2 @@ +Testname: binaries-multiarch-same +Check: debian/shlibs diff --git a/t/recipes/checks/debian/shlibs/binaries-multiarch-same/eval/hints b/t/recipes/checks/debian/shlibs/binaries-multiarch-same/eval/hints new file mode 100644 index 0000000..d4e8830 --- /dev/null +++ b/t/recipes/checks/debian/shlibs/binaries-multiarch-same/eval/hints @@ -0,0 +1 @@ +libbasic2 (binary): symbols-file-missing-build-depends-package-field libbasic.so.2 [symbols] diff --git a/t/recipes/checks/debian/shlibs/binaries-multiarch/build-spec/debian/compat.in b/t/recipes/checks/debian/shlibs/binaries-multiarch/build-spec/debian/compat.in new file mode 100644 index 0000000..640a566 --- /dev/null +++ b/t/recipes/checks/debian/shlibs/binaries-multiarch/build-spec/debian/compat.in @@ -0,0 +1 @@ +[% $dh_compat_level %] diff --git a/t/recipes/checks/debian/shlibs/binaries-multiarch/build-spec/debian/control.in b/t/recipes/checks/debian/shlibs/binaries-multiarch/build-spec/debian/control.in new file mode 100644 index 0000000..aa271ff --- /dev/null +++ b/t/recipes/checks/debian/shlibs/binaries-multiarch/build-spec/debian/control.in @@ -0,0 +1,21 @@ +Source: [% $source %] +Priority: optional +Section: libs +Maintainer: [% $author %] +Standards-Version: [% $standards_version %] +Build-Depends: [% $build_depends %] +Rules-Requires-Root: no + +Package: libbasic2 +Architecture: [% $package_architecture %] +Pre-Depends: ${misc:Pre-Depends}, multiarch-support +Depends: ${misc:Depends}, ${shlibs:Depends} +Description: [% $description %] + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. + . + Note there is an explicitly pre-depends on multiarch-support, since + older versions of debhelper might not use it yet. dpkg-dev will + remove the duplicate entry (if any). diff --git a/t/recipes/checks/debian/shlibs/binaries-multiarch/build-spec/debian/libbasic2.symbols b/t/recipes/checks/debian/shlibs/binaries-multiarch/build-spec/debian/libbasic2.symbols new file mode 100644 index 0000000..c2b8fb3 --- /dev/null +++ b/t/recipes/checks/debian/shlibs/binaries-multiarch/build-spec/debian/libbasic2.symbols @@ -0,0 +1,2 @@ +libbasic.so.2 libbasic2 #MINVER# + lib_interface@Base 1.0 diff --git a/t/recipes/checks/debian/shlibs/binaries-multiarch/build-spec/debian/rules b/t/recipes/checks/debian/shlibs/binaries-multiarch/build-spec/debian/rules new file mode 100644 index 0000000..249fe25 --- /dev/null +++ b/t/recipes/checks/debian/shlibs/binaries-multiarch/build-spec/debian/rules @@ -0,0 +1,23 @@ +#!/usr/bin/make -f + +# Since dpkg in stable (Squeeze) does not support MULTIARCH we cannot use +# dpkg-architecture -qDEB_HOST_MULTIARCH +# Therefore this test is hardcoded to x86 and amd64 + +ARCH=$(shell dpkg-architecture -qDEB_HOST_ARCH) + +ifeq (i386,$(ARCH)) + TRIPLET = i386-linux-gnu +else + TRIPLET = x86_64-linux-gnu +endif + +export DEB_BUILD_MAINT_OPTIONS=hardening=+all + +%: + dh $@ + +override_dh_makeshlibs: + # dpkg-dev uses ld.so.conf so if we do not pass the lib directly + # this will fail on all x86 machines without with libc6 < 2.13-5 + dh_makeshlibs -- -edebian/libbasic2/usr/lib/$(TRIPLET)/libbasic.so.2 diff --git a/t/recipes/checks/debian/shlibs/binaries-multiarch/build-spec/fill-values b/t/recipes/checks/debian/shlibs/binaries-multiarch/build-spec/fill-values new file mode 100644 index 0000000..a521479 --- /dev/null +++ b/t/recipes/checks/debian/shlibs/binaries-multiarch/build-spec/fill-values @@ -0,0 +1,6 @@ +Skeleton: upload-native +Testname: binaries-multiarch +Description: Test of a correct multiarch package +Package-Architecture: any +Default-Build-Depends: debhelper (>= 9.20151004~) +Dh-Compat-Level: 9 diff --git a/t/recipes/checks/debian/shlibs/binaries-multiarch/build-spec/orig/Makefile b/t/recipes/checks/debian/shlibs/binaries-multiarch/build-spec/orig/Makefile new file mode 100644 index 0000000..979e366 --- /dev/null +++ b/t/recipes/checks/debian/shlibs/binaries-multiarch/build-spec/orig/Makefile @@ -0,0 +1,26 @@ + +# Since dpkg in stable (Squeeze) does not support MULTIARCH we cannot use +# dpkg-architecture -qDEB_HOST_MULTIARCH +# Therefore this test is hardcoded to x86 and amd64 + +ARCH=$(shell dpkg-architecture -qDEB_HOST_ARCH) + +ifeq (i386,$(ARCH)) + TRIPLET = i386-linux-gnu +else + TRIPLET = x86_64-linux-gnu +endif + + +all: + gcc $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -fPIC -shared -Wl,-z,defs -Wl,-soname,libbasic.so.2 -o libbasic.so.2 basic.c + +install: + # install it under the correct triplet directory + install -d $(DESTDIR)/usr/lib/$(TRIPLET) + install -m 644 -c -s libbasic.so.2 $(DESTDIR)/usr/lib/$(TRIPLET)/libbasic.so.2 + +clean distclean: + rm -f libbasic.so.2 + +check test: diff --git a/t/recipes/checks/debian/shlibs/binaries-multiarch/build-spec/orig/basic.c b/t/recipes/checks/debian/shlibs/binaries-multiarch/build-spec/orig/basic.c new file mode 100644 index 0000000..27e93fc --- /dev/null +++ b/t/recipes/checks/debian/shlibs/binaries-multiarch/build-spec/orig/basic.c @@ -0,0 +1,19 @@ +#include +#include + +static void +hardening_trigger(char *p, int i, void (*f)(char *)) +{ + char test[10]; + memcpy(test, p, i); + f(test); + printf("%s", test); +} + +int +lib_interface(void) +{ + printf("Hello world!\n"); + hardening_trigger(NULL, 0, NULL); + return 0; +} diff --git a/t/recipes/checks/debian/shlibs/binaries-multiarch/eval/desc b/t/recipes/checks/debian/shlibs/binaries-multiarch/eval/desc new file mode 100644 index 0000000..d50c6ad --- /dev/null +++ b/t/recipes/checks/debian/shlibs/binaries-multiarch/eval/desc @@ -0,0 +1,3 @@ +Testname: binaries-multiarch +Test-Architectures: i386 amd64 +Check: debian/shlibs diff --git a/t/recipes/checks/debian/shlibs/binaries-multiarch/eval/hints b/t/recipes/checks/debian/shlibs/binaries-multiarch/eval/hints new file mode 100644 index 0000000..d4e8830 --- /dev/null +++ b/t/recipes/checks/debian/shlibs/binaries-multiarch/eval/hints @@ -0,0 +1 @@ +libbasic2 (binary): symbols-file-missing-build-depends-package-field libbasic.so.2 [symbols] diff --git a/t/recipes/checks/debian/shlibs/binaries-multiarch/eval/post-test b/t/recipes/checks/debian/shlibs/binaries-multiarch/eval/post-test new file mode 100644 index 0000000..fdc0a20 --- /dev/null +++ b/t/recipes/checks/debian/shlibs/binaries-multiarch/eval/post-test @@ -0,0 +1,2 @@ +s/i386-linux-gnu/x86_64-linux-gnu/ +s/is for i386/is for amd64/ diff --git a/t/recipes/checks/debian/shlibs/files-wrong-ma-foreign/build-spec/debian/compat.in b/t/recipes/checks/debian/shlibs/files-wrong-ma-foreign/build-spec/debian/compat.in new file mode 100644 index 0000000..640a566 --- /dev/null +++ b/t/recipes/checks/debian/shlibs/files-wrong-ma-foreign/build-spec/debian/compat.in @@ -0,0 +1 @@ +[% $dh_compat_level %] diff --git a/t/recipes/checks/debian/shlibs/files-wrong-ma-foreign/build-spec/debian/control.in b/t/recipes/checks/debian/shlibs/files-wrong-ma-foreign/build-spec/debian/control.in new file mode 100644 index 0000000..addc2fc --- /dev/null +++ b/t/recipes/checks/debian/shlibs/files-wrong-ma-foreign/build-spec/debian/control.in @@ -0,0 +1,33 @@ +Source: [% $source %] +Priority: optional +Section: [% $section %] +Maintainer: [% $author %] +Standards-Version: [% $standards_version %] +Build-Depends: [% $build_depends %] +Rules-Requires-Root: no + +Package: libpublic1 +Section: libs +Architecture: any +Depends: ${misc:Depends}, ${shlibs:Depends}, +Multi-Arch: same +Description: [% $description %] + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. + +Package: libpublic-dev +Section: libdevel +Architecture: any +Depends: ${misc:Depends}, ${shlibs:Depends}, +Multi-Arch: foreign +Description: [% $description %] (dev) + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. + . + Supposedly includes some headers. + + diff --git a/t/recipes/checks/debian/shlibs/files-wrong-ma-foreign/build-spec/debian/libpublic-dev.install b/t/recipes/checks/debian/shlibs/files-wrong-ma-foreign/build-spec/debian/libpublic-dev.install new file mode 100644 index 0000000..012244d --- /dev/null +++ b/t/recipes/checks/debian/shlibs/files-wrong-ma-foreign/build-spec/debian/libpublic-dev.install @@ -0,0 +1 @@ +usr/lib/*/*.so diff --git a/t/recipes/checks/debian/shlibs/files-wrong-ma-foreign/build-spec/debian/libpublic1.install b/t/recipes/checks/debian/shlibs/files-wrong-ma-foreign/build-spec/debian/libpublic1.install new file mode 100644 index 0000000..3de3b10 --- /dev/null +++ b/t/recipes/checks/debian/shlibs/files-wrong-ma-foreign/build-spec/debian/libpublic1.install @@ -0,0 +1 @@ +usr/lib/*/*.so.* diff --git a/t/recipes/checks/debian/shlibs/files-wrong-ma-foreign/build-spec/debian/libpublic1.symbols b/t/recipes/checks/debian/shlibs/files-wrong-ma-foreign/build-spec/debian/libpublic1.symbols new file mode 100644 index 0000000..d8226ca --- /dev/null +++ b/t/recipes/checks/debian/shlibs/files-wrong-ma-foreign/build-spec/debian/libpublic1.symbols @@ -0,0 +1,3 @@ +libexecbit.so.1 libexecbit1 #MINVER# + e@Base 1.0 + energy@Base 0.9 diff --git a/t/recipes/checks/debian/shlibs/files-wrong-ma-foreign/build-spec/fill-values b/t/recipes/checks/debian/shlibs/files-wrong-ma-foreign/build-spec/fill-values new file mode 100644 index 0000000..2b7d50c --- /dev/null +++ b/t/recipes/checks/debian/shlibs/files-wrong-ma-foreign/build-spec/fill-values @@ -0,0 +1,5 @@ +Skeleton: upload-native +Testname: files-wrong-ma-foreign +Description: Test for wrong usage of Multi-Arch foreign +Default-Build-Depends: debhelper (>= 9.20151004~) +Dh-Compat-Level: 9 diff --git a/t/recipes/checks/debian/shlibs/files-wrong-ma-foreign/build-spec/orig/Makefile b/t/recipes/checks/debian/shlibs/files-wrong-ma-foreign/build-spec/orig/Makefile new file mode 100644 index 0000000..ff58c3a --- /dev/null +++ b/t/recipes/checks/debian/shlibs/files-wrong-ma-foreign/build-spec/orig/Makefile @@ -0,0 +1,24 @@ +CC=gcc +CFLAGS+= -fPIC + +SONAMES:= libpublic.so.1 +LIBFILES:= $(patsubst %,%.0.1, $(SONAMES)) +LIBDIR := /usr/lib/$(shell dpkg-architecture -qDEB_HOST_MULTIARCH) + +all: $(LIBFILES) + +$(LIBFILES): code.o + $(CC) $(LDFLAGS) -o $@ -shared -Wl,-soname,$(patsubst %.0.1,%,$@) $^ -lc + +clean: + rm -f *.a *.o *.so* + +install: all + install -m 0755 -d $(DESTDIR)$(LIBDIR) + install -m 0644 *.so* $(DESTDIR)$(LIBDIR) + set -e ; for FILE in $(SONAMES) ; do \ + ln -s $${FILE}.0.1 $(DESTDIR)$(LIBDIR)/$$FILE ; \ + ln -s $${FILE}.0.1 $(DESTDIR)$(LIBDIR)/$$(echo $$FILE | perl -pe 's/\.so\K.*//') ; \ + done + +.PHONY: install clean diff --git a/t/recipes/checks/debian/shlibs/files-wrong-ma-foreign/build-spec/orig/code.c b/t/recipes/checks/debian/shlibs/files-wrong-ma-foreign/build-spec/orig/code.c new file mode 100644 index 0000000..0ed08e0 --- /dev/null +++ b/t/recipes/checks/debian/shlibs/files-wrong-ma-foreign/build-spec/orig/code.c @@ -0,0 +1,15 @@ +#include +#include + +double e(void (*f)(char *)){ + char tmp[10]; + double x; + f(tmp); + x = atof(tmp); + return exp(x); +} + +double energy(double mass){ + return pow(10.0, 8.0) * pow(3.0, 2.0) * mass; +} + diff --git a/t/recipes/checks/debian/shlibs/files-wrong-ma-foreign/eval/desc b/t/recipes/checks/debian/shlibs/files-wrong-ma-foreign/eval/desc new file mode 100644 index 0000000..527b859 --- /dev/null +++ b/t/recipes/checks/debian/shlibs/files-wrong-ma-foreign/eval/desc @@ -0,0 +1,2 @@ +Testname: files-wrong-ma-foreign +Check: debian/shlibs diff --git a/t/recipes/checks/debian/shlibs/files-wrong-ma-foreign/eval/hints b/t/recipes/checks/debian/shlibs/files-wrong-ma-foreign/eval/hints new file mode 100644 index 0000000..a157d77 --- /dev/null +++ b/t/recipes/checks/debian/shlibs/files-wrong-ma-foreign/eval/hints @@ -0,0 +1 @@ +libpublic1 (binary): symbols-file-missing-build-depends-package-field libpublic.so.1 [symbols] diff --git a/t/recipes/checks/debian/shlibs/legacy-debug/build-spec/debian/_symbols b/t/recipes/checks/debian/shlibs/legacy-debug/build-spec/debian/_symbols new file mode 100644 index 0000000..46e6af1 --- /dev/null +++ b/t/recipes/checks/debian/shlibs/legacy-debug/build-spec/debian/_symbols @@ -0,0 +1,23 @@ + This line should flag a syntax error +# but this one shouldn't +| although this one should, but for a different reason + and so should this + +libhello.so.0 libhello0 #MINVER# +| libhello0c2 (>= 1.2) , libhelloc0c2 (<< 1.3) +| hello-dbg3| libhelloc0c3|foobar (= 1.2) |hello-dbg2 +| hello-dbg + hello@Base 1.0 +* Build-Dep-Foo: bar + hello2@Base 2.0 4 + hello3@Base 2.0 1 + hello3@Base 2.0 A + dummy + +libhello.so.2 libhello2 #MINVER# +* Build-Depends-Package: libbar +| libhello2 (>= 1:2.3) + hello@Base 2.0 + +libhello.so.0 libhello0 #MINVER# + duplicate@Base 1.0 diff --git a/t/recipes/checks/debian/shlibs/legacy-debug/build-spec/debian/changelog.in b/t/recipes/checks/debian/shlibs/legacy-debug/build-spec/debian/changelog.in new file mode 100644 index 0000000..02da925 --- /dev/null +++ b/t/recipes/checks/debian/shlibs/legacy-debug/build-spec/debian/changelog.in @@ -0,0 +1,13 @@ +debug ([% $version %]) [% $distribution %]; urgency=low + + * NMU. + (uploaded by the maintainer and with repeated version number) + + -- Russ Allbery Tue, 4 Apr 2006 20:27:22 +0000 + +debug (1.0) unstable; urgency=low + + * Initial version. + + -- Russ Allbery Sat, 4 Mar 2006 21:31:06 -0800 + diff --git a/t/recipes/checks/debian/shlibs/legacy-debug/build-spec/debian/compat.in b/t/recipes/checks/debian/shlibs/legacy-debug/build-spec/debian/compat.in new file mode 100644 index 0000000..640a566 --- /dev/null +++ b/t/recipes/checks/debian/shlibs/legacy-debug/build-spec/debian/compat.in @@ -0,0 +1 @@ +[% $dh_compat_level %] diff --git a/t/recipes/checks/debian/shlibs/legacy-debug/build-spec/debian/control b/t/recipes/checks/debian/shlibs/legacy-debug/build-spec/debian/control new file mode 100644 index 0000000..fcb2b86 --- /dev/null +++ b/t/recipes/checks/debian/shlibs/legacy-debug/build-spec/debian/control @@ -0,0 +1,85 @@ +Source: debug +Section: utils +Priority: optional +Maintainer: Russ Allbery +Build-Depends: debhelper (>= 5.0.0) +Build-Depends-Indep: not-debhelper (>= 0.4.3) +Standards-Version: 3.7.0 + +Package: hello +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: Test for external debugging information + Lintian regression test for external debugging file handling. This test + contains the binary. + . + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. + +Package: hello-dbg +Priority: optional +Section: debug +Architecture: any +Depends: hello (= ${binary:Version}), ${shlibs:Depends}, ${misc:Depends} +Description: Test for external debugging information (symbols) + Lintian regression test for external debugging file handling. This test + contains the binary symbols. + . + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. + +Package: libhello0 +Section: libs +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: Test for external debugging information (library) + Lintian regression test for external debugging file handling. This test + contains a library. + . + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. + +Package: libhello0-dbg +Section: debug +Priority: optional +Architecture: any +Depends: libhello (= ${binary:Version}), ${shlibs:Depends}, ${misc:Depends} +Description: Test for external debugging information (library symbols) + Lintian regression test for external debugging file handling. This test + contains the library symbols. + . + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. + +Package: hi-dbg +Section: debug +Priority: optional +Architecture: any +Depends: foo-pkg, not-libhello0 +Description: Test for external debugging symbols + Lintian regression test for external debugging files handling. This test + contains the library symbols. + . + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. + +Package: hello-hello-dbg +Section: debug +Priority: optional +Architecture: any +Depends: foo-pkg, not-libhello0, hello +Description: Test for external debugging symbols - another try + Lintian regression test for external debugging files handling. This test + contains the library symbols. This package actually tests a combination of + the above. + . + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. diff --git a/t/recipes/checks/debian/shlibs/legacy-debug/build-spec/debian/copyright b/t/recipes/checks/debian/shlibs/legacy-debug/build-spec/debian/copyright new file mode 100644 index 0000000..5d4f6c2 --- /dev/null +++ b/t/recipes/checks/debian/shlibs/legacy-debug/build-spec/debian/copyright @@ -0,0 +1,4 @@ +Written Sat, 04 Mar 2006 21:30:01 -0800 by Russ Allbery . + +Test for copyright in capital letters. (#464992) +COPYRIGHT RUSS ALLBERY 2006 diff --git a/t/recipes/checks/debian/shlibs/legacy-debug/build-spec/debian/rules b/t/recipes/checks/debian/shlibs/legacy-debug/build-spec/debian/rules new file mode 100755 index 0000000..b659895 --- /dev/null +++ b/t/recipes/checks/debian/shlibs/legacy-debug/build-spec/debian/rules @@ -0,0 +1,99 @@ +#!/usr/bin/make -f +# Sample debian/rules that uses debhelper. +# This file is public domain software, originally written by Joey Hess. + +# turn off PIE in CC in case we have a PIEful toolchain: +ifneq ($(findstring -no-pie,$(shell gcc -no-pie 2>&1)),) + CC := gcc +else + CC := gcc -fno-pie -no-pie +endif + +build-indep: + +build-arch: build-stamp + +build-stamp: + dh_testdir + $(CC) -D_REENTRANT -fPIC -c libhello.c + $(CC) -o libhello.so.0.0 -shared -Wl,-soname,libhello.so.0 libhello.o + ln -s libhello.so.0.0 libhello.so + $(CC) -o hello hello.c -L. -lhello + touch build-stamp + +build: build-arch build-indep + +clean: + dh_testdir + dh_testroot + rm -f build-stamp *.o libhello.so.0.0 libhello.so + dh_clean + +install: build-stamp + dh_testdir + dh_testroot + dh_clean -k + install -D hello $(CURDIR)/debian/hello/usr/bin/hello + install -D libhello.so.0.0 \ + $(CURDIR)/debian/libhello0/usr/lib/libhello.so.0.0 + ln -s libhello.so.0.0 \ + $(CURDIR)/debian/libhello0/usr/lib/libhello.so.0 + +# Build architecture-dependent files here. +export DH_OPTIONS +binary-arch: DH_OPTIONS=-a +binary-arch: build-stamp install + dh_testdir + dh_testroot + dh_installchangelogs -N hello-dbg + dh_installdocs + DH_OPTIONS= dh_strip -phello --dbg-package=hello-dbg + DH_OPTIONS= dh_strip -plibhello0 --dbg-package=libhello0-dbg + + # Now break a few things. Copy the debugging data into places it + # shouldn't be. + cp $(CURDIR)/debian/hello-dbg/usr/lib/debug/usr/bin/hello \ + $(CURDIR)/debian/hello/usr/bin/hello.dbg + cp $(CURDIR)/debian/libhello0-dbg/usr/lib/debug/usr/lib/libhello.so.0.0 \ + $(CURDIR)/debian/libhello0-dbg/usr/lib/libhello.so.dbg + + # Put a full copy of the library in libhello0-dbg in /usr/lib/debug, + # which is okay. + install -m 644 libhello.so.0.0 \ + $(CURDIR)/debian/libhello0-dbg/usr/lib/debug/libhello.so.0.0 + + # Also put it in /usr/lib/debug/lib, which isn't. + install -D -m 644 libhello.so.0.0 \ + $(CURDIR)/debian/libhello0-dbg/usr/lib/debug/lib/libhello.so.0.0 + + # Requires a versioned dependency. + dh_icons + + dh_link + dh_compress + dh_fixperms + dh_makeshlibs -X debug + dh_installdeb + dh_shlibdeps -X debug + + # We do this by hand as otherwise dpkg-gensymbols + # will error due to the broken symbols file + # and abort the build; similarly the file in + # the source tree is _symbols so that dpkg + # doesn't attempt to sanity check it + install -d $(CURDIR)/debian/libhello0/DEBIAN + install -m 644 $(CURDIR)/debian/_symbols \ + $(CURDIR)/debian/libhello0/DEBIAN/symbols + # hello doesn't contain any shlibs, but we + # make it contain a symbols file + install -d $(CURDIR)/debian/hello/DEBIAN + install -m 644 $(CURDIR)/debian/_symbols \ + $(CURDIR)/debian/hello/DEBIAN/symbols + + dh_gencontrol + dh_md5sums + dh_builddeb + +binary-indep: +binary: binary-indep binary-arch +.PHONY: build-arch build-indep build binary binary-indep binary-arch clean install diff --git a/t/recipes/checks/debian/shlibs/legacy-debug/build-spec/fill-values b/t/recipes/checks/debian/shlibs/legacy-debug/build-spec/fill-values new file mode 100644 index 0000000..79eebf1 --- /dev/null +++ b/t/recipes/checks/debian/shlibs/legacy-debug/build-spec/fill-values @@ -0,0 +1,6 @@ +Skeleton: upload-native +Testname: legacy-debug +Source: debug +Default-Build-Depends: debhelper (>= 9.20151004~) +Dh-Compat-Level: 7 +Description: Legacy test "debug" diff --git a/t/recipes/checks/debian/shlibs/legacy-debug/build-spec/orig/hello.c b/t/recipes/checks/debian/shlibs/legacy-debug/build-spec/orig/hello.c new file mode 100644 index 0000000..76f8337 --- /dev/null +++ b/t/recipes/checks/debian/shlibs/legacy-debug/build-spec/orig/hello.c @@ -0,0 +1,9 @@ +#include +#include "libhello.h" + +int +main(void) +{ + hello(); + exit(0); +} diff --git a/t/recipes/checks/debian/shlibs/legacy-debug/build-spec/orig/libhello.c b/t/recipes/checks/debian/shlibs/legacy-debug/build-spec/orig/libhello.c new file mode 100644 index 0000000..e2f8409 --- /dev/null +++ b/t/recipes/checks/debian/shlibs/legacy-debug/build-spec/orig/libhello.c @@ -0,0 +1,7 @@ +#include + +void +hello(void) +{ + printf("Hello, World!\n"); +} diff --git a/t/recipes/checks/debian/shlibs/legacy-debug/build-spec/orig/libhello.h b/t/recipes/checks/debian/shlibs/legacy-debug/build-spec/orig/libhello.h new file mode 100644 index 0000000..ef77476 --- /dev/null +++ b/t/recipes/checks/debian/shlibs/legacy-debug/build-spec/orig/libhello.h @@ -0,0 +1 @@ +void hello(void); diff --git a/t/recipes/checks/debian/shlibs/legacy-debug/eval/desc b/t/recipes/checks/debian/shlibs/legacy-debug/eval/desc new file mode 100644 index 0000000..48b87f4 --- /dev/null +++ b/t/recipes/checks/debian/shlibs/legacy-debug/eval/desc @@ -0,0 +1,3 @@ +Testname: legacy-debug +Check: debian/shlibs +Test-Against: symbols-file-missing-build-depends-package-field diff --git a/t/recipes/checks/debian/shlibs/legacy-debug/eval/hints b/t/recipes/checks/debian/shlibs/legacy-debug/eval/hints new file mode 100644 index 0000000..d9fdaff --- /dev/null +++ b/t/recipes/checks/debian/shlibs/legacy-debug/eval/hints @@ -0,0 +1,48 @@ +libhello0 (binary): unknown-meta-field-in-symbols-file Build-Dep-Foo (libhello.so.0) [symbols:11] +libhello0 (binary): syntax-error-in-symbols-file [symbols:4] +libhello0 (binary): syntax-error-in-symbols-file [symbols:3] +libhello0 (binary): syntax-error-in-symbols-file [symbols:1] +libhello0 (binary): syntax-error-in-symbols-file [symbols:19] +libhello0 (binary): syntax-error-in-symbols-file [symbols:15] +libhello0 (binary): syntax-error-in-symbols-file [symbols:11] +libhello0 (binary): symbols-for-undeclared-shared-library libhello 2 +libhello0 (binary): symbols-file-missing-build-depends-package-field libhello.so.0 [symbols] +libhello0 (binary): symbols-declares-dependency-on-other-package libhelloc0c3 (libhello.so.0) [symbols] +libhello0 (binary): symbols-declares-dependency-on-other-package libhelloc0c2 (<< 1.3) (libhello.so.0) [symbols] +libhello0 (binary): symbols-declares-dependency-on-other-package libhello2 (libhello.so.2) [symbols] +libhello0 (binary): symbols-declares-dependency-on-other-package libhello2 (>= 1:2.3) (libhello.so.2) [symbols] +libhello0 (binary): symbols-declares-dependency-on-other-package libhello0c2 (>= 1.2) (libhello.so.0) [symbols] +libhello0 (binary): symbols-declares-dependency-on-other-package hello-dbg3 (libhello.so.0) [symbols] +libhello0 (binary): symbols-declares-dependency-on-other-package hello-dbg2 (libhello.so.0) [symbols] +libhello0 (binary): symbols-declares-dependency-on-other-package hello-dbg (libhello.so.0) [symbols] +libhello0 (binary): symbols-declares-dependency-on-other-package foobar (= 1.2) (libhello.so.0) [symbols] +libhello0 (binary): surplus-shared-library-symbols libhello 2 [symbols] +libhello0 (binary): invalid-template-id-in-symbols-file should this [symbols:4] +libhello0 (binary): invalid-template-id-in-symbols-file A [symbols:14] +libhello0 (binary): invalid-template-id-in-symbols-file 4 [symbols:12] +libhello0 (binary): duplicate-entry-in-symbols-control-file (lines 6 22) libhello 0 [symbols] +hello (binary): unknown-meta-field-in-symbols-file Build-Dep-Foo (libhello.so.0) [symbols:11] +hello (binary): syntax-error-in-symbols-file [symbols:4] +hello (binary): syntax-error-in-symbols-file [symbols:3] +hello (binary): syntax-error-in-symbols-file [symbols:1] +hello (binary): syntax-error-in-symbols-file [symbols:19] +hello (binary): syntax-error-in-symbols-file [symbols:15] +hello (binary): syntax-error-in-symbols-file [symbols:11] +hello (binary): symbols-file-missing-build-depends-package-field libhello.so.0 [symbols] +hello (binary): symbols-declares-dependency-on-other-package libhelloc0c3 (libhello.so.0) [symbols] +hello (binary): symbols-declares-dependency-on-other-package libhelloc0c2 (<< 1.3) (libhello.so.0) [symbols] +hello (binary): symbols-declares-dependency-on-other-package libhello2 (libhello.so.2) [symbols] +hello (binary): symbols-declares-dependency-on-other-package libhello2 (>= 1:2.3) (libhello.so.2) [symbols] +hello (binary): symbols-declares-dependency-on-other-package libhello0c2 (>= 1.2) (libhello.so.0) [symbols] +hello (binary): symbols-declares-dependency-on-other-package libhello0 (libhello.so.0) [symbols] +hello (binary): symbols-declares-dependency-on-other-package hello-dbg3 (libhello.so.0) [symbols] +hello (binary): symbols-declares-dependency-on-other-package hello-dbg2 (libhello.so.0) [symbols] +hello (binary): symbols-declares-dependency-on-other-package hello-dbg (libhello.so.0) [symbols] +hello (binary): symbols-declares-dependency-on-other-package foobar (= 1.2) (libhello.so.0) [symbols] +hello (binary): surplus-shared-library-symbols libhello 2 [symbols] +hello (binary): surplus-shared-library-symbols libhello 0 [symbols] +hello (binary): invalid-template-id-in-symbols-file should this [symbols:4] +hello (binary): invalid-template-id-in-symbols-file A [symbols:14] +hello (binary): invalid-template-id-in-symbols-file 4 [symbols:12] +hello (binary): empty-shared-library-symbols [symbols] +hello (binary): duplicate-entry-in-symbols-control-file (lines 6 22) libhello 0 [symbols] diff --git a/t/recipes/checks/debian/shlibs/legacy-debug/eval/post-test b/t/recipes/checks/debian/shlibs/legacy-debug/eval/post-test new file mode 100644 index 0000000..fc97c5f --- /dev/null +++ b/t/recipes/checks/debian/shlibs/legacy-debug/eval/post-test @@ -0,0 +1,2 @@ +/: hardening-.*/ d +s/\(current is ([0-9]+\.)+[0-9]\)/(current is CURRENT)/ diff --git a/t/recipes/checks/debian/shlibs/legacy-libbaz/build-spec/debian/changelog.in b/t/recipes/checks/debian/shlibs/legacy-libbaz/build-spec/debian/changelog.in new file mode 100644 index 0000000..91a6bb5 --- /dev/null +++ b/t/recipes/checks/debian/shlibs/legacy-libbaz/build-spec/debian/changelog.in @@ -0,0 +1,6 @@ +libbaz ([% $version %]) [% $distribution %]; urgency=low + + * Initial setup + + -- Sean 'Shaleh' Perry Tue, 30 Jan 2001 15:23:59 -0800 + diff --git a/t/recipes/checks/debian/shlibs/legacy-libbaz/build-spec/debian/compat.in b/t/recipes/checks/debian/shlibs/legacy-libbaz/build-spec/debian/compat.in new file mode 100644 index 0000000..640a566 --- /dev/null +++ b/t/recipes/checks/debian/shlibs/legacy-libbaz/build-spec/debian/compat.in @@ -0,0 +1 @@ +[% $dh_compat_level %] diff --git a/t/recipes/checks/debian/shlibs/legacy-libbaz/build-spec/debian/control b/t/recipes/checks/debian/shlibs/legacy-libbaz/build-spec/debian/control new file mode 100644 index 0000000..1506687 --- /dev/null +++ b/t/recipes/checks/debian/shlibs/legacy-libbaz/build-spec/debian/control @@ -0,0 +1,58 @@ +Source: libbaz +Section: libs +Priority: optional +Maintainer: Lintian Maintainer +Build-depends: debhelper (>=4) +Standards-Version: 3.2.1 + +Package: libbaz1 +Architecture: any +Provides: libbaz +Description: test handling of library packages + Regression test for lintian's handling of libraries. + . + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. + +Package: libbaz1-dev +Architecture: any +Depends: libbaz1 (= ${source:Version}), perlapi-5.8.8 +Description: development package + Regression test for lintian's handling of libraries (dev). + . + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. + +Package: libbaz2 +Architecture: any +Depends: ${shlibs:Depends}, libssl0.9.8 +Description: test handling of library packages (good) + Regression test for lintian's handling of libraries (good). + . + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. + +Package: libbaz2-dev +Architecture: any +Depends: ${shlibs:Depends}, libbaz2 (= ${source:Version}) +Description: development package (good) + Regression test for lintian's handling of libraries (dev good). + . + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. + +Package: libbaz2-dbg +Architecture: any +Depends: libbaz2 (= ${binary:Version}) +Priority: optional +Description: debugging package + Regression test for lintian's handling of libraries (debug). + . + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. + diff --git a/t/recipes/checks/debian/shlibs/legacy-libbaz/build-spec/debian/copyright b/t/recipes/checks/debian/shlibs/legacy-libbaz/build-spec/debian/copyright new file mode 100644 index 0000000..a874c87 --- /dev/null +++ b/t/recipes/checks/debian/shlibs/legacy-libbaz/build-spec/debian/copyright @@ -0,0 +1,8 @@ +This package is released under public domain. This is distributed in the hope +that it will be useful, but without any warranty; without even the implied +warranty of merchantability or fitness for a particular purpose. + +A reference to /usr/share/common-licenses/GPL-2 to make it look like this +package is under the GPL and trigger the OpenSSL warning. + +However, this has an OpenSSL exception. diff --git a/t/recipes/checks/debian/shlibs/legacy-libbaz/build-spec/debian/dev.postinst b/t/recipes/checks/debian/shlibs/legacy-libbaz/build-spec/debian/dev.postinst new file mode 100644 index 0000000..683e3cc --- /dev/null +++ b/t/recipes/checks/debian/shlibs/legacy-libbaz/build-spec/debian/dev.postinst @@ -0,0 +1,4 @@ +#!/bin/sh -e + +$PKG=libbaz1-dev + diff --git a/t/recipes/checks/debian/shlibs/legacy-libbaz/build-spec/debian/dev.prerm b/t/recipes/checks/debian/shlibs/legacy-libbaz/build-spec/debian/dev.prerm new file mode 100644 index 0000000..683e3cc --- /dev/null +++ b/t/recipes/checks/debian/shlibs/legacy-libbaz/build-spec/debian/dev.prerm @@ -0,0 +1,4 @@ +#!/bin/sh -e + +$PKG=libbaz1-dev + diff --git a/t/recipes/checks/debian/shlibs/legacy-libbaz/build-spec/debian/lib.postinst b/t/recipes/checks/debian/shlibs/legacy-libbaz/build-spec/debian/lib.postinst new file mode 100644 index 0000000..ec0b98a --- /dev/null +++ b/t/recipes/checks/debian/shlibs/legacy-libbaz/build-spec/debian/lib.postinst @@ -0,0 +1,10 @@ +#!/bin/sh -e + +$PKG=libbaz1 + +if [ "$1" = "configure" ]; then + if [ -d /usr/doc -a ! -e /usr/doc/$PKG -a -d /usr/share/doc/$PKG ] +; then + ln -sf ../share/doc/$PKG /usr/doc/$PKG + fi +fi diff --git a/t/recipes/checks/debian/shlibs/legacy-libbaz/build-spec/debian/lib.prerm b/t/recipes/checks/debian/shlibs/legacy-libbaz/build-spec/debian/lib.prerm new file mode 100644 index 0000000..50e37c3 --- /dev/null +++ b/t/recipes/checks/debian/shlibs/legacy-libbaz/build-spec/debian/lib.prerm @@ -0,0 +1,7 @@ +#!/bin/sh -e + +$PKG=libbaz1 + +if [ \( "$1" = "upgrade" -o "$1" = "remove" \) -a -L /usr/doc/$PKG ]; then + rm -f /usr/doc/$PKG +fi diff --git a/t/recipes/checks/debian/shlibs/legacy-libbaz/build-spec/debian/lib.shlibs b/t/recipes/checks/debian/shlibs/legacy-libbaz/build-spec/debian/lib.shlibs new file mode 100644 index 0000000..b88e288 --- /dev/null +++ b/t/recipes/checks/debian/shlibs/legacy-libbaz/build-spec/debian/lib.shlibs @@ -0,0 +1,8 @@ +libdoesntexist2 1.0 libbaz1 +libdoesntexist2 1.0 libbaz1 +libbaz2 1.1 libbaz +libbaz3 1 libbaz1 (>> 1-1) +libbaz4 1 libbaz1 (= 1-1) +libbaz5 1 libbaz2 +udeb: libdoesntexist2 1.0 libbaz2 +udeb: libdoesntexist2 1.0 libbaz2 diff --git a/t/recipes/checks/debian/shlibs/legacy-libbaz/build-spec/debian/lib.symbols b/t/recipes/checks/debian/shlibs/legacy-libbaz/build-spec/debian/lib.symbols new file mode 100644 index 0000000..72f9d8a --- /dev/null +++ b/t/recipes/checks/debian/shlibs/legacy-libbaz/build-spec/debian/lib.symbols @@ -0,0 +1,3 @@ +libbaz.so.2 libbaz1 #MINVER# + pw 1-1 + foo 1.1-1 diff --git a/t/recipes/checks/debian/shlibs/legacy-libbaz/build-spec/debian/rules b/t/recipes/checks/debian/shlibs/legacy-libbaz/build-spec/debian/rules new file mode 100755 index 0000000..fa99bc8 --- /dev/null +++ b/t/recipes/checks/debian/shlibs/legacy-libbaz/build-spec/debian/rules @@ -0,0 +1,121 @@ +#!/usr/bin/make -f + +lib_tmp=debian/tmp-lib +dev_tmp=debian/tmp-dev + +LIB=libbaz1 +DEV=libbaz1-dev + +VENDORARCH := $(shell perl -MConfig -wE'say substr($$Config{vendorarch},1)') + +build-arch: + $(MAKE) + +build-indep: + +build: build-arch build-indep + +clean: + $(MAKE) clean + dh_clean -plibbaz2 -plibbaz2-dev + rm -f debian/files debian/substvars + rm -rf $(lib_tmp) $(dev_tmp) + +# Now the correct libbaz2-dev package +binary-correct: + install -d debian/libbaz2-dev/usr/lib + cp -a libbaz2.a libbaz2.so debian/libbaz2-dev/usr/lib + # usually, I'd also include some .h files to /usr/include + + # Now the correct libbaz2 package + install -d debian/libbaz2/usr/lib + cp -a libbaz2.so.* debian/libbaz2/usr/lib + chmod a-x debian/libbaz2/usr/lib/* + + # General stuff that is tested in other testsets: + dh_installdocs -plibbaz2 -plibbaz2-dev -plibbaz2-dbg + dh_compress -plibbaz2 -plibbaz2-dev -plibbaz2-dbg + + # Mess up the libbaz2 changelog files to test the symlink handling. + ln -s /usr/share/doc/lintian/changelog.gz \ + debian/libbaz2/usr/share/doc/libbaz2/changelog.gz + install -m 644 debian/changelog \ + debian/libbaz2-dev/usr/share/doc/libbaz2-dev/foo + ln -s foo debian/libbaz2-dev/usr/share/doc/libbaz2-dev/changelog + + # Okay, if either line is omitted, it should be noted + dh_strip --dbg-package=libbaz2-dbg -plibbaz2 -plibbaz2-dev + dh_makeshlibs -plibbaz2 -plibbaz2-dev -plibbaz2-dbg + dh_shlibdeps -plibbaz2 -plibbaz2-dev -plibbaz2-dbg + + # and again, regular packaging stuff + dh_installdeb -plibbaz2 -plibbaz2-dev -plibbaz2-dbg + echo udeb: libbaz2 1.0 libbaz2 >> debian/libbaz2/DEBIAN/shlibs + dh_gencontrol -plibbaz2 -plibbaz2-dev -plibbaz2-dbg + dh_builddeb -plibbaz2 -plibbaz2-dev -plibbaz2-dbg + +# and the incorrect one +binary-arch: build-arch binary-correct + # first, the lib package + install -d $(lib_tmp)/usr/lib + # resp. no soname (check), wrong soname (check), and no-pic (check) + cp -a libbaz1.so.1.0* $(lib_tmp)/usr/lib + cp -a libbaz2.so.1.0.3b $(lib_tmp)/usr/lib/libfoo2.so.1.0.3b + install -m644 libbaz3.so.1.0.3b $(lib_tmp)/usr/lib/libbaz3.so.1.0.3b + # let's include the .a in the non-dev too (TODO) + # Also, libbaz1.a hasn't a symbol table (TODO) + cp -a *.a $(lib_tmp)/usr/lib + # And a wrong .so symlink (wrong, only in -dev, TODO) + ln -s libfoo3.so.0.9 $(lib_tmp)/usr/lib/libfoo3.so + # And a wrong .so.X symlink (wrong, should point to a real existing + # shlib, TODO) + ln -s libfoo.so.0.9.1 $(lib_tmp)/usr/lib/libfoo.so.0.9 + # And a plain .so (wrong, TODO) + touch $(lib_tmp)/usr/lib/libbar2.so + # And a non-versioned SONAME. + install -m644 libbaz.so $(lib_tmp)/usr/lib/libbaz.so + strip --remove-section=.comment --strip-unneeded $(lib_tmp)/usr/lib/libbaz.so + # Pretend to be a Perl module to test a lack of Perl dependencies. + install -d $(lib_tmp)/$(VENDORARCH)/auto/Foo + install -m 644 libbaz2.so.1.0.3b $(lib_tmp)/$(VENDORARCH)/auto/Foo/Foo.so + strip $(lib_tmp)/$(VENDORARCH)/auto/Foo/Foo.so + + install -d $(lib_tmp)/usr/share/doc/$(LIB) + install -m 644 debian/copyright $(lib_tmp)/usr/share/doc/$(LIB) + install -m 644 debian/changelog $(lib_tmp)/usr/share/doc/$(LIB) + gzip -n -9 $(lib_tmp)/usr/share/doc/$(LIB)/changelog + install -d $(lib_tmp)/DEBIAN + install -m 755 debian/lib.postinst $(lib_tmp)/DEBIAN/postinst + install -m 755 debian/lib.prerm $(lib_tmp)/DEBIAN/prerm + touch $(lib_tmp)/usr/share/doc/README.Debian + #dpkg-shlibdeps $(lib_tmp)/usr/lib/libbaz.so.1.0 + install -m 755 debian/lib.shlibs $(lib_tmp)/DEBIAN/shlibs + install -m 755 debian/lib.symbols $(lib_tmp)/DEBIAN/symbols + dpkg-gencontrol -isp -p$(LIB) -P$(lib_tmp) + dpkg --build $(lib_tmp) .. + + # now the -dev package + install -d $(dev_tmp)/usr/include + install -d $(lib_tmp)/usr/lib + # let's also install the .so at the same time... (wrong, TODO) + cp -a *.a *.so.* $(lib_tmp)/usr/lib + # and fuck up permission (TODO) + chmod a+x $(lib_tmp)/usr/lib/*.a + # Pretend to be a Perl module to test a lack of Perl dependencies. + install -d $(dev_tmp)/$(VENDORARCH)/auto/Foo + install -m 644 libbaz2.so.1.0.3b $(dev_tmp)/$(VENDORARCH)/auto/Foo/Foo.so + strip $(dev_tmp)/$(VENDORARCH)/auto/Foo/Foo.so + install -d $(dev_tmp)/usr/share/doc + ln -s $(LIB) $(dev_tmp)/usr/share/doc/$(DEV) + install -d $(dev_tmp)/DEBIAN + install -m 755 debian/dev.postinst $(dev_tmp)/DEBIAN/postinst + install -m 755 debian/dev.prerm $(dev_tmp)/DEBIAN/prerm + dpkg-gencontrol -isp -p$(DEV) -P$(dev_tmp) + dpkg --build $(dev_tmp) .. + + +binary: binary-arch + +# The mention of binary-indep here should be sufficient to suppress the +# warning that it's not present. +.PHONY: build-arch build-indep build binary-arch binary-indep binary clean diff --git a/t/recipes/checks/debian/shlibs/legacy-libbaz/build-spec/debian/source.lintian-overrides b/t/recipes/checks/debian/shlibs/legacy-libbaz/build-spec/debian/source.lintian-overrides new file mode 100644 index 0000000..6008d27 --- /dev/null +++ b/t/recipes/checks/debian/shlibs/legacy-libbaz/build-spec/debian/source.lintian-overrides @@ -0,0 +1 @@ +libbaz source: maintainer-script-lacks-debhelper-token diff --git a/t/recipes/checks/debian/shlibs/legacy-libbaz/build-spec/fill-values b/t/recipes/checks/debian/shlibs/legacy-libbaz/build-spec/fill-values new file mode 100644 index 0000000..7effe4f --- /dev/null +++ b/t/recipes/checks/debian/shlibs/legacy-libbaz/build-spec/fill-values @@ -0,0 +1,6 @@ +Skeleton: upload-non-native +Testname: legacy-libbaz +Source: libbaz +Version: 1-1 +Default-Build-Depends: debhelper (>= 9.20151004~) +Description: Legacy test "libbaz" diff --git a/t/recipes/checks/debian/shlibs/legacy-libbaz/build-spec/orig/Makefile b/t/recipes/checks/debian/shlibs/legacy-libbaz/build-spec/orig/Makefile new file mode 100644 index 0000000..657dc2a --- /dev/null +++ b/t/recipes/checks/debian/shlibs/legacy-libbaz/build-spec/orig/Makefile @@ -0,0 +1,55 @@ +# This is the correct way to build a lib + +CC=gcc +CFLAGS=-g -Wall -Winline -O2 +LDFLAGS=-Wl,--no-as-needed + +OBJS=baz.o extra.o +SHOBJS=baz.sho extra.sho +NOPICOBJS = $(SHOBJS) + +all: libbaz1.a libbaz2.a libbaz1.so.1.0.3b libbaz2.so libbaz3.so.1.0.3b \ + libbaz.so + +libbaz2.so: libbaz2.so.1.0 + ln -sf $^ $@ +libbaz2.so.1.0: libbaz2.so.1.0.3b + ln -sf $^ $@ + +# Oops, forget the soname altogether +libbaz1.so.1.0.3b: $(NOPICOBJS) + $(CC) $(LDFLAGS) -o $@ -shared $^ -lc + +libbaz2.so.1.0.3b: $(SHOBJS) + $(CC) $(LDFLAGS) -o $@ -shared -Wl,-soname,libbaz2.so.1.0 $^ -lc + +# Non-PIC. We can't test this on all architectures +libbaz3.so.1.0.3b: $(NOPICOBJS) + $(CC) $(LDFLAGS) -o $@ -shared -Wl,-soname,libbaz3.so.1 $^ -lc + +# Non-versioned SONAME. +libbaz.so: $(SHOBJS) + $(CC) $(LDFLAGS) -o $@ -shared -Wl,-soname,libbaz.so $^ -lc + +#%.o-noreentrant: %.c +# $(CC) $(LDFLAGS) $(CFLAGS) -o $@ -c $< + +%.sho: %.c + $(CC) $(LDFLAGS) $(CFLAGS) -D_REENTRANT -fPIC -o $@ -c $< + +%.o: %.c + $(CC) $(LDFLAGS) $(CFLAGS) -D_REENTRANT -o $@ -c $< + +libbaz2.a: $(OBJS) + ar cq $@ $(OBJS) + strip --strip-unneeded --remove-section=.comment \ + --remove-section=-note $@ + ranlib $@ + +# The pic one in the .a (wrong), no archive table +libbaz1.a: $(SHOBJS) + ar cqS $@ $^ + strip --strip-unneeded --remove-section=.comment \ + --remove-section=-note $@ +clean: + rm -f *.a *.o *.so* *.sho diff --git a/t/recipes/checks/debian/shlibs/legacy-libbaz/build-spec/orig/baz.c b/t/recipes/checks/debian/shlibs/legacy-libbaz/build-spec/orig/baz.c new file mode 100644 index 0000000..4d5fc45 --- /dev/null +++ b/t/recipes/checks/debian/shlibs/legacy-libbaz/build-spec/orig/baz.c @@ -0,0 +1,6 @@ +#include + +double pw(double p) +{ + return exp(p); +} diff --git a/t/recipes/checks/debian/shlibs/legacy-libbaz/build-spec/orig/extra.c b/t/recipes/checks/debian/shlibs/legacy-libbaz/build-spec/orig/extra.c new file mode 100644 index 0000000..e69de29 diff --git a/t/recipes/checks/debian/shlibs/legacy-libbaz/eval/desc b/t/recipes/checks/debian/shlibs/legacy-libbaz/eval/desc new file mode 100644 index 0000000..ad73840 --- /dev/null +++ b/t/recipes/checks/debian/shlibs/legacy-libbaz/eval/desc @@ -0,0 +1,2 @@ +Testname: legacy-libbaz +Check: debian/shlibs diff --git a/t/recipes/checks/debian/shlibs/legacy-libbaz/eval/hints b/t/recipes/checks/debian/shlibs/legacy-libbaz/eval/hints new file mode 100644 index 0000000..8e668dc --- /dev/null +++ b/t/recipes/checks/debian/shlibs/legacy-libbaz/eval/hints @@ -0,0 +1,20 @@ +libbaz2 (binary): no-symbols-control-file usr/lib/libbaz2.so.1.0.3b +libbaz1 (binary): symbols-for-undeclared-shared-library libbaz 2 +libbaz1 (binary): symbols-file-missing-build-depends-package-field libbaz.so.2 [symbols] +libbaz1 (binary): symbols-file-contains-debian-revision on symbol foo (libbaz.so.2) [symbols] +libbaz1 (binary): symbols-file-contains-current-version-with-debian-revision on symbol pw (libbaz.so.2) [symbols] +libbaz1 (binary): surplus-shared-library-symbols libbaz 2 [symbols] +libbaz1 (binary): ships-undeclared-shared-library libbaz2 1.0 for usr/lib/libfoo2.so.1.0.3b [shlibs] +libbaz1 (binary): shared-library-symbols-not-tracked libbaz3 1 for usr/lib/libbaz3.so.1.0.3b [symbols] +libbaz1 (binary): shared-library-symbols-not-tracked libbaz2 1.0 for usr/lib/libfoo2.so.1.0.3b [symbols] +libbaz1 (binary): shared-library-symbols-not-tracked libbaz.so for usr/lib/libbaz.so [symbols] +libbaz1 (binary): shared-library-not-shipped udeb: libdoesntexist2 1.0 [shlibs] +libbaz1 (binary): shared-library-not-shipped libdoesntexist2 1.0 [shlibs] +libbaz1 (binary): shared-library-not-shipped libbaz5 1 [shlibs] +libbaz1 (binary): shared-library-not-shipped libbaz4 1 [shlibs] +libbaz1 (binary): shared-library-not-shipped libbaz2 1.1 [shlibs] +libbaz1 (binary): shared-library-lacks-version usr/lib/libbaz.so libbaz.so +libbaz1 (binary): duplicate-in-shlibs (lines 7 8) udeb: libdoesntexist2 1.0 [shlibs] +libbaz1 (binary): duplicate-in-shlibs (lines 1 2) libdoesntexist2 1.0 [shlibs] +libbaz1 (binary): distant-prerequisite-in-shlibs libbaz2 [shlibs] +libbaz1 (binary): distant-prerequisite-in-shlibs libbaz1 (>> 1-1) [shlibs] diff --git a/t/recipes/checks/debian/shlibs/legacy-libbaz/eval/post-test b/t/recipes/checks/debian/shlibs/legacy-libbaz/eval/post-test new file mode 100755 index 0000000..29dc3f4 --- /dev/null +++ b/t/recipes/checks/debian/shlibs/legacy-libbaz/eval/post-test @@ -0,0 +1,4 @@ +/: hardening-.*/ d +s/\(current is ([0-9]+\.)+[0-9]\)/(current is CURRENT)/ +s,usr/lib/([^\/]*/)?perl[0-9]*(/[0-9]*\.[0-9]*)?/,usr/lib/ma-dir/perl/version/,g +/: file-references-package-build-path / d diff --git a/t/recipes/checks/debian/shlibs/shared-libs-control-file/build-spec/debian/compat.in b/t/recipes/checks/debian/shlibs/shared-libs-control-file/build-spec/debian/compat.in new file mode 100644 index 0000000..640a566 --- /dev/null +++ b/t/recipes/checks/debian/shlibs/shared-libs-control-file/build-spec/debian/compat.in @@ -0,0 +1 @@ +[% $dh_compat_level %] diff --git a/t/recipes/checks/debian/shlibs/shared-libs-control-file/build-spec/debian/control.in b/t/recipes/checks/debian/shlibs/shared-libs-control-file/build-spec/debian/control.in new file mode 100644 index 0000000..a223c7e --- /dev/null +++ b/t/recipes/checks/debian/shlibs/shared-libs-control-file/build-spec/debian/control.in @@ -0,0 +1,57 @@ +Source: [% $source %] +Priority: optional +Section: libs +Maintainer: [% $author %] +Standards-Version: [% $standards_version %] +Build-Depends: [% $build_depends %] +Rules-Requires-Root: no + +Package: libnoshf1 +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: [% $description %] (no shlibs file) + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. + . + Checks for missing shlibs file. + +Package: libeshf1 +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: [% $description %] (empty shlibs file) + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. + . + Checks for empty shlibs file. + +Package: libunshf1 +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: [% $description %] (unused entry) + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. + . + Checks for unused entry in shlibs file. + +Package: libfdshf1 +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: [% $description %] (foreign dep) + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. + . + Checks for foreign dependency entry in shlibs file. + +Package: libdupshf1 +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: [% $description %] (dup entry) + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. + . + Checks for duplicate entry in shlibs file. diff --git a/t/recipes/checks/debian/shlibs/shared-libs-control-file/build-spec/debian/libdupshf1.install b/t/recipes/checks/debian/shlibs/shared-libs-control-file/build-spec/debian/libdupshf1.install new file mode 100644 index 0000000..7452fe1 --- /dev/null +++ b/t/recipes/checks/debian/shlibs/shared-libs-control-file/build-spec/debian/libdupshf1.install @@ -0,0 +1 @@ +usr/lib/libdupshf* diff --git a/t/recipes/checks/debian/shlibs/shared-libs-control-file/build-spec/debian/libdupshf1.symbols b/t/recipes/checks/debian/shlibs/shared-libs-control-file/build-spec/debian/libdupshf1.symbols new file mode 100644 index 0000000..166a346 --- /dev/null +++ b/t/recipes/checks/debian/shlibs/shared-libs-control-file/build-spec/debian/libdupshf1.symbols @@ -0,0 +1,3 @@ +libdupshf.so.1 libdupshf1 #MINVER# + e@Base 1.0 + energy@Base 0.9 diff --git a/t/recipes/checks/debian/shlibs/shared-libs-control-file/build-spec/debian/libeshf1.install b/t/recipes/checks/debian/shlibs/shared-libs-control-file/build-spec/debian/libeshf1.install new file mode 100644 index 0000000..5ef4c2d --- /dev/null +++ b/t/recipes/checks/debian/shlibs/shared-libs-control-file/build-spec/debian/libeshf1.install @@ -0,0 +1 @@ +usr/lib/libeshf* diff --git a/t/recipes/checks/debian/shlibs/shared-libs-control-file/build-spec/debian/libeshf1.symbols b/t/recipes/checks/debian/shlibs/shared-libs-control-file/build-spec/debian/libeshf1.symbols new file mode 100644 index 0000000..fdd0204 --- /dev/null +++ b/t/recipes/checks/debian/shlibs/shared-libs-control-file/build-spec/debian/libeshf1.symbols @@ -0,0 +1,3 @@ +libeshf.so.1 libeshf1 #MINVER# + e@Base 1.0 + energy@Base 0.9 diff --git a/t/recipes/checks/debian/shlibs/shared-libs-control-file/build-spec/debian/libfdshf1.install b/t/recipes/checks/debian/shlibs/shared-libs-control-file/build-spec/debian/libfdshf1.install new file mode 100644 index 0000000..c01a368 --- /dev/null +++ b/t/recipes/checks/debian/shlibs/shared-libs-control-file/build-spec/debian/libfdshf1.install @@ -0,0 +1 @@ +usr/lib/libfdshf* diff --git a/t/recipes/checks/debian/shlibs/shared-libs-control-file/build-spec/debian/libfdshf1.symbols b/t/recipes/checks/debian/shlibs/shared-libs-control-file/build-spec/debian/libfdshf1.symbols new file mode 100644 index 0000000..4a18831 --- /dev/null +++ b/t/recipes/checks/debian/shlibs/shared-libs-control-file/build-spec/debian/libfdshf1.symbols @@ -0,0 +1,3 @@ +libfdshf.so.1 libfdshf1 #MINVER# + e@Base 1.0 + energy@Base 0.9 diff --git a/t/recipes/checks/debian/shlibs/shared-libs-control-file/build-spec/debian/libnoshf1.install b/t/recipes/checks/debian/shlibs/shared-libs-control-file/build-spec/debian/libnoshf1.install new file mode 100644 index 0000000..175a915 --- /dev/null +++ b/t/recipes/checks/debian/shlibs/shared-libs-control-file/build-spec/debian/libnoshf1.install @@ -0,0 +1 @@ +usr/lib/libnoshf* diff --git a/t/recipes/checks/debian/shlibs/shared-libs-control-file/build-spec/debian/libnoshf1.symbols b/t/recipes/checks/debian/shlibs/shared-libs-control-file/build-spec/debian/libnoshf1.symbols new file mode 100644 index 0000000..fef945e --- /dev/null +++ b/t/recipes/checks/debian/shlibs/shared-libs-control-file/build-spec/debian/libnoshf1.symbols @@ -0,0 +1,3 @@ +libnoshf.so.1 libnoshf1 #MINVER# + e@Base 1.0 + energy@Base 0.9 diff --git a/t/recipes/checks/debian/shlibs/shared-libs-control-file/build-spec/debian/libunshf1.install b/t/recipes/checks/debian/shlibs/shared-libs-control-file/build-spec/debian/libunshf1.install new file mode 100644 index 0000000..dcdae56 --- /dev/null +++ b/t/recipes/checks/debian/shlibs/shared-libs-control-file/build-spec/debian/libunshf1.install @@ -0,0 +1 @@ +usr/lib/libunshf* diff --git a/t/recipes/checks/debian/shlibs/shared-libs-control-file/build-spec/debian/libunshf1.symbols b/t/recipes/checks/debian/shlibs/shared-libs-control-file/build-spec/debian/libunshf1.symbols new file mode 100644 index 0000000..737842d --- /dev/null +++ b/t/recipes/checks/debian/shlibs/shared-libs-control-file/build-spec/debian/libunshf1.symbols @@ -0,0 +1,3 @@ +libunshf.so.1 libunshf1 #MINVER# + e@Base 1.0 + energy@Base 0.9 diff --git a/t/recipes/checks/debian/shlibs/shared-libs-control-file/build-spec/debian/rules b/t/recipes/checks/debian/shlibs/shared-libs-control-file/build-spec/debian/rules new file mode 100644 index 0000000..0cd4c15 --- /dev/null +++ b/t/recipes/checks/debian/shlibs/shared-libs-control-file/build-spec/debian/rules @@ -0,0 +1,19 @@ +#!/usr/bin/make -f + +DUPSHF:=debian/libdupshf1/DEBIAN/shlibs + +export DEB_BUILD_MAINT_OPTIONS=hardening=+all + +%: + dh $@ + +override_dh_builddeb: + # Work around "smart tools" that check the shlibs + # before installing them. + rm -f debian/libnoshf1/DEBIAN/shlibs + echo "# aloha" > debian/libeshf1/DEBIAN/shlibs + echo "libfoo 1 libunshf1 (> 0.1)" >> debian/libunshf1/DEBIAN/shlibs + sed -i 's/libfdshf1/libforeign1/' debian/libfdshf1/DEBIAN/shlibs + cat $(DUPSHF) $(DUPSHF) > $(DUPSHF).tmp + mv -f $(DUPSHF).tmp $(DUPSHF) + dh_builddeb diff --git a/t/recipes/checks/debian/shlibs/shared-libs-control-file/build-spec/fill-values b/t/recipes/checks/debian/shlibs/shared-libs-control-file/build-spec/fill-values new file mode 100644 index 0000000..9336eee --- /dev/null +++ b/t/recipes/checks/debian/shlibs/shared-libs-control-file/build-spec/fill-values @@ -0,0 +1,5 @@ +Skeleton: upload-native +Testname: shared-libs-control-file +Default-Build-Depends: debhelper (>= 9.20151004~) +Dh-Compat-Level: 9 +Description: Test checks related to shlibs files diff --git a/t/recipes/checks/debian/shlibs/shared-libs-control-file/build-spec/orig/Makefile b/t/recipes/checks/debian/shlibs/shared-libs-control-file/build-spec/orig/Makefile new file mode 100644 index 0000000..37bef22 --- /dev/null +++ b/t/recipes/checks/debian/shlibs/shared-libs-control-file/build-spec/orig/Makefile @@ -0,0 +1,23 @@ +CC=gcc +CFLAGS+= -fPIC + +SONAMES:= libnoshf.so.1 libeshf.so.1 libunshf.so.1 libfdshf.so.1 \ + libdupshf.so.1 +LIBFILES:= $(patsubst %,%.0.1, $(SONAMES)) + +all: $(LIBFILES) + +$(LIBFILES): code.o + $(CC) $(LDFLAGS) -o $@ -shared -Wl,-soname,$(patsubst %.0.1,%,$@) $^ -lc + +clean: + rm -f *.a *.o *.so* + +install: all + install -m 0755 -d $(DESTDIR)/usr/lib + install -m 0644 *.so* $(DESTDIR)/usr/lib + for FILE in $(SONAMES) ; do \ + ln -s $${FILE}.0.1 $(DESTDIR)/usr/lib/$$FILE ; \ + done + +.PHONY: install clean diff --git a/t/recipes/checks/debian/shlibs/shared-libs-control-file/build-spec/orig/code.c b/t/recipes/checks/debian/shlibs/shared-libs-control-file/build-spec/orig/code.c new file mode 100644 index 0000000..0ed08e0 --- /dev/null +++ b/t/recipes/checks/debian/shlibs/shared-libs-control-file/build-spec/orig/code.c @@ -0,0 +1,15 @@ +#include +#include + +double e(void (*f)(char *)){ + char tmp[10]; + double x; + f(tmp); + x = atof(tmp); + return exp(x); +} + +double energy(double mass){ + return pow(10.0, 8.0) * pow(3.0, 2.0) * mass; +} + diff --git a/t/recipes/checks/debian/shlibs/shared-libs-control-file/eval/desc b/t/recipes/checks/debian/shlibs/shared-libs-control-file/eval/desc new file mode 100644 index 0000000..9ccf196 --- /dev/null +++ b/t/recipes/checks/debian/shlibs/shared-libs-control-file/eval/desc @@ -0,0 +1,2 @@ +Testname: shared-libs-control-file +Check: debian/shlibs diff --git a/t/recipes/checks/debian/shlibs/shared-libs-control-file/eval/hints b/t/recipes/checks/debian/shlibs/shared-libs-control-file/eval/hints new file mode 100644 index 0000000..87f69e6 --- /dev/null +++ b/t/recipes/checks/debian/shlibs/shared-libs-control-file/eval/hints @@ -0,0 +1,11 @@ +libunshf1 (binary): symbols-file-missing-build-depends-package-field libunshf.so.1 [symbols] +libunshf1 (binary): shared-library-not-shipped libfoo 1 [shlibs] +libunshf1 (binary): outdated-relation-in-shlibs libunshf1 (> 0.1) [shlibs] +libnoshf1 (binary): symbols-file-missing-build-depends-package-field libnoshf.so.1 [symbols] +libnoshf1 (binary): no-shlibs usr/lib/libnoshf.so.1.0.1 +libfdshf1 (binary): symbols-file-missing-build-depends-package-field libfdshf.so.1 [symbols] +libfdshf1 (binary): distant-prerequisite-in-shlibs libforeign1 [shlibs] +libeshf1 (binary): symbols-file-missing-build-depends-package-field libeshf.so.1 [symbols] +libeshf1 (binary): ships-undeclared-shared-library libeshf 1 for usr/lib/libeshf.so.1.0.1 [shlibs] +libdupshf1 (binary): symbols-file-missing-build-depends-package-field libdupshf.so.1 [symbols] +libdupshf1 (binary): duplicate-in-shlibs (lines 1 2) libdupshf 1 [shlibs] diff --git a/t/recipes/checks/debian/shlibs/shared-libs-dev-symlink-fp/build-spec/debian/compat.in b/t/recipes/checks/debian/shlibs/shared-libs-dev-symlink-fp/build-spec/debian/compat.in new file mode 100644 index 0000000..640a566 --- /dev/null +++ b/t/recipes/checks/debian/shlibs/shared-libs-dev-symlink-fp/build-spec/debian/compat.in @@ -0,0 +1 @@ +[% $dh_compat_level %] diff --git a/t/recipes/checks/debian/shlibs/shared-libs-dev-symlink-fp/build-spec/debian/control.in b/t/recipes/checks/debian/shlibs/shared-libs-dev-symlink-fp/build-spec/debian/control.in new file mode 100644 index 0000000..9ca1147 --- /dev/null +++ b/t/recipes/checks/debian/shlibs/shared-libs-dev-symlink-fp/build-spec/debian/control.in @@ -0,0 +1,27 @@ +Source: [% $source %] +Priority: optional +Section: libs +Maintainer: [% $author %] +Standards-Version: [% $standards_version %] +Build-Depends: [% $build_depends %] +Rules-Requires-Root: no + +Package: libfoo-1 +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: [% $description %] + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. + +Package: libfoo-dev +Architecture: any +Section: libdevel +Depends: ${shlibs:Depends}, ${misc:Depends}, + libfoo-1 (= ${binary:Version}) +Description: [% $description %] - dev + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. + . + Dev package. diff --git a/t/recipes/checks/debian/shlibs/shared-libs-dev-symlink-fp/build-spec/debian/libfoo-1.install b/t/recipes/checks/debian/shlibs/shared-libs-dev-symlink-fp/build-spec/debian/libfoo-1.install new file mode 100644 index 0000000..cb060ec --- /dev/null +++ b/t/recipes/checks/debian/shlibs/shared-libs-dev-symlink-fp/build-spec/debian/libfoo-1.install @@ -0,0 +1,2 @@ +lib/libbar-1.so +usr/lib/libfoo-1.so diff --git a/t/recipes/checks/debian/shlibs/shared-libs-dev-symlink-fp/build-spec/debian/libfoo-1.symbols b/t/recipes/checks/debian/shlibs/shared-libs-dev-symlink-fp/build-spec/debian/libfoo-1.symbols new file mode 100644 index 0000000..910a1e5 --- /dev/null +++ b/t/recipes/checks/debian/shlibs/shared-libs-dev-symlink-fp/build-spec/debian/libfoo-1.symbols @@ -0,0 +1,7 @@ +libfoo-1.so libfoo-1 #MINVER# + e@Base 1.0 + energy@Base 0.9 + +libbar-1.so libfoo-1 #MINVER# + e@Base 1.0 + energy@Base 0.9 diff --git a/t/recipes/checks/debian/shlibs/shared-libs-dev-symlink-fp/build-spec/debian/libfoo-dev.install b/t/recipes/checks/debian/shlibs/shared-libs-dev-symlink-fp/build-spec/debian/libfoo-dev.install new file mode 100644 index 0000000..ed7b146 --- /dev/null +++ b/t/recipes/checks/debian/shlibs/shared-libs-dev-symlink-fp/build-spec/debian/libfoo-dev.install @@ -0,0 +1,3 @@ +usr/include +usr/lib/libbar.so +usr/lib/libfoo.so diff --git a/t/recipes/checks/debian/shlibs/shared-libs-dev-symlink-fp/build-spec/fill-values b/t/recipes/checks/debian/shlibs/shared-libs-dev-symlink-fp/build-spec/fill-values new file mode 100644 index 0000000..5240e59 --- /dev/null +++ b/t/recipes/checks/debian/shlibs/shared-libs-dev-symlink-fp/build-spec/fill-values @@ -0,0 +1,5 @@ +Testname: shared-libs-dev-symlink-fp +Skeleton: upload-non-native +Default-Build-Depends: debhelper (>= 9.20151004~) +Dh-Compat-Level: 9 +Description: Test against dev symlink fp diff --git a/t/recipes/checks/debian/shlibs/shared-libs-dev-symlink-fp/build-spec/orig/Makefile b/t/recipes/checks/debian/shlibs/shared-libs-dev-symlink-fp/build-spec/orig/Makefile new file mode 100644 index 0000000..decdff1 --- /dev/null +++ b/t/recipes/checks/debian/shlibs/shared-libs-dev-symlink-fp/build-spec/orig/Makefile @@ -0,0 +1,27 @@ +CC=gcc +CFLAGS+= -fPIC + +SONAME:= libfoo-1.so +LSONAME:= libbar-1.so +devsymlink=$(shell echo $(1) | perl -pe 's:-[\d\.]*\.so$$:\.so:') +LIBFILES:=$(SONAME) $(LSONAME) + +all: $(LIBFILES) + +$(LIBFILES): code.o + $(CC) $(LDFLAGS) -o $@ -shared -Wl,-soname,$@ $^ -lc + +clean: + rm -f *.a *.o *.so* + +install: all + install -m 0755 -d $(DESTDIR)/lib + install -m 0755 -d $(DESTDIR)/usr/lib + install -m 0755 -d $(DESTDIR)/usr/include + install -m 0644 $(LSONAME) $(DESTDIR)/lib + install -m 0644 $(SONAME) $(DESTDIR)/usr/lib + ln -s /lib/$(LSONAME) $(DESTDIR)/usr/lib/$(call devsymlink,$(LSONAME)) + ln -s $(SONAME) $(DESTDIR)/usr/lib/$(call devsymlink,$(SONAME)) + install -m 0644 code.h $(DESTDIR)/usr/include + +.PHONY: install clean diff --git a/t/recipes/checks/debian/shlibs/shared-libs-dev-symlink-fp/build-spec/orig/code.c b/t/recipes/checks/debian/shlibs/shared-libs-dev-symlink-fp/build-spec/orig/code.c new file mode 100644 index 0000000..9a88735 --- /dev/null +++ b/t/recipes/checks/debian/shlibs/shared-libs-dev-symlink-fp/build-spec/orig/code.c @@ -0,0 +1,16 @@ +#include +#include +#include "code.h" + +double e(void (*f)(char *)){ + char tmp[10]; + double x; + f(tmp); + x = atof(tmp); + return exp(x); +} + +double energy(double mass){ + return pow(10.0, 8.0) * pow(3.0, 2.0) * mass; +} + diff --git a/t/recipes/checks/debian/shlibs/shared-libs-dev-symlink-fp/build-spec/orig/code.h b/t/recipes/checks/debian/shlibs/shared-libs-dev-symlink-fp/build-spec/orig/code.h new file mode 100644 index 0000000..570beae --- /dev/null +++ b/t/recipes/checks/debian/shlibs/shared-libs-dev-symlink-fp/build-spec/orig/code.h @@ -0,0 +1,8 @@ +#ifndef CODE_H_ +#define CODE_H_ + +double e(void (*f)(char *)); + +double energy(double mass); + +#endif diff --git a/t/recipes/checks/debian/shlibs/shared-libs-dev-symlink-fp/eval/desc b/t/recipes/checks/debian/shlibs/shared-libs-dev-symlink-fp/eval/desc new file mode 100644 index 0000000..c26091f --- /dev/null +++ b/t/recipes/checks/debian/shlibs/shared-libs-dev-symlink-fp/eval/desc @@ -0,0 +1,2 @@ +Testname: shared-libs-dev-symlink-fp +Check: debian/shlibs diff --git a/t/recipes/checks/debian/shlibs/shared-libs-dev-symlink-fp/eval/hints b/t/recipes/checks/debian/shlibs/shared-libs-dev-symlink-fp/eval/hints new file mode 100644 index 0000000..09ab005 --- /dev/null +++ b/t/recipes/checks/debian/shlibs/shared-libs-dev-symlink-fp/eval/hints @@ -0,0 +1,2 @@ +libfoo-1 (binary): symbols-file-missing-build-depends-package-field libfoo-1.so [symbols] +libfoo-1 (binary): symbols-file-missing-build-depends-package-field libbar-1.so [symbols] diff --git a/t/recipes/checks/debian/shlibs/shared-libs-dev-symlink/build-spec/debian/compat.in b/t/recipes/checks/debian/shlibs/shared-libs-dev-symlink/build-spec/debian/compat.in new file mode 100644 index 0000000..640a566 --- /dev/null +++ b/t/recipes/checks/debian/shlibs/shared-libs-dev-symlink/build-spec/debian/compat.in @@ -0,0 +1 @@ +[% $dh_compat_level %] diff --git a/t/recipes/checks/debian/shlibs/shared-libs-dev-symlink/build-spec/debian/control.in b/t/recipes/checks/debian/shlibs/shared-libs-dev-symlink/build-spec/debian/control.in new file mode 100644 index 0000000..dfba657 --- /dev/null +++ b/t/recipes/checks/debian/shlibs/shared-libs-dev-symlink/build-spec/debian/control.in @@ -0,0 +1,27 @@ +Source: [% $source %] +Priority: optional +Section: libs +Maintainer: [% $author %] +Standards-Version: [% $standards_version %] +Build-Depends: [% $build_depends %] +Rules-Requires-Root: no + +Package: libfoo1 +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: [% $description %] + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. + +Package: libfoo-dev +Architecture: any +Section: libdevel +Depends: ${shlibs:Depends}, ${misc:Depends}, + libfoo1 (= ${binary:Version}) +Description: [% $description %] - dev + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. + . + Dev package. diff --git a/t/recipes/checks/debian/shlibs/shared-libs-dev-symlink/build-spec/debian/libfoo-dev.install b/t/recipes/checks/debian/shlibs/shared-libs-dev-symlink/build-spec/debian/libfoo-dev.install new file mode 100644 index 0000000..e43b95c --- /dev/null +++ b/t/recipes/checks/debian/shlibs/shared-libs-dev-symlink/build-spec/debian/libfoo-dev.install @@ -0,0 +1 @@ +usr/include diff --git a/t/recipes/checks/debian/shlibs/shared-libs-dev-symlink/build-spec/debian/libfoo1.install b/t/recipes/checks/debian/shlibs/shared-libs-dev-symlink/build-spec/debian/libfoo1.install new file mode 100644 index 0000000..08fa063 --- /dev/null +++ b/t/recipes/checks/debian/shlibs/shared-libs-dev-symlink/build-spec/debian/libfoo1.install @@ -0,0 +1 @@ +usr/lib/libfoo.so.* diff --git a/t/recipes/checks/debian/shlibs/shared-libs-dev-symlink/build-spec/debian/libfoo1.symbols b/t/recipes/checks/debian/shlibs/shared-libs-dev-symlink/build-spec/debian/libfoo1.symbols new file mode 100644 index 0000000..a1f052b --- /dev/null +++ b/t/recipes/checks/debian/shlibs/shared-libs-dev-symlink/build-spec/debian/libfoo1.symbols @@ -0,0 +1,3 @@ +libfoo.so.1 libfoo1 #MINVER# + e@Base 1.0 + energy@Base 0.9 diff --git a/t/recipes/checks/debian/shlibs/shared-libs-dev-symlink/build-spec/fill-values b/t/recipes/checks/debian/shlibs/shared-libs-dev-symlink/build-spec/fill-values new file mode 100644 index 0000000..9c44aa5 --- /dev/null +++ b/t/recipes/checks/debian/shlibs/shared-libs-dev-symlink/build-spec/fill-values @@ -0,0 +1,5 @@ +Testname: shared-libs-dev-symlink +Skeleton: upload-non-native +Default-Build-Depends: debhelper (>= 9.20151004~) +Dh-Compat-Level: 9 +Description: Test checks related to dev symlink diff --git a/t/recipes/checks/debian/shlibs/shared-libs-dev-symlink/build-spec/orig/Makefile b/t/recipes/checks/debian/shlibs/shared-libs-dev-symlink/build-spec/orig/Makefile new file mode 100644 index 0000000..a7a50b9 --- /dev/null +++ b/t/recipes/checks/debian/shlibs/shared-libs-dev-symlink/build-spec/orig/Makefile @@ -0,0 +1,24 @@ +CC=gcc +CFLAGS+= -fPIC + +SONAMES:= libfoo.so.1 +LIBFILES:= $(patsubst %,%.0.1, $(SONAMES)) + +all: $(LIBFILES) + +$(LIBFILES): code.o + $(CC) $(LDFLAGS) -o $@ -shared -Wl,-soname,$(patsubst %.0.1,%,$@) $^ -lc + +clean: + rm -f *.a *.o *.so* + +install: all + install -m 0755 -d $(DESTDIR)/usr/lib + install -m 0755 -d $(DESTDIR)/usr/include + install -m 0644 *.so* $(DESTDIR)/usr/lib + for FILE in $(SONAMES) ; do \ + ln -s $${FILE}.0.1 $(DESTDIR)/usr/lib/$$FILE ; \ + done + install -m 0644 code.h $(DESTDIR)/usr/include + +.PHONY: install clean diff --git a/t/recipes/checks/debian/shlibs/shared-libs-dev-symlink/build-spec/orig/code.c b/t/recipes/checks/debian/shlibs/shared-libs-dev-symlink/build-spec/orig/code.c new file mode 100644 index 0000000..9a88735 --- /dev/null +++ b/t/recipes/checks/debian/shlibs/shared-libs-dev-symlink/build-spec/orig/code.c @@ -0,0 +1,16 @@ +#include +#include +#include "code.h" + +double e(void (*f)(char *)){ + char tmp[10]; + double x; + f(tmp); + x = atof(tmp); + return exp(x); +} + +double energy(double mass){ + return pow(10.0, 8.0) * pow(3.0, 2.0) * mass; +} + diff --git a/t/recipes/checks/debian/shlibs/shared-libs-dev-symlink/build-spec/orig/code.h b/t/recipes/checks/debian/shlibs/shared-libs-dev-symlink/build-spec/orig/code.h new file mode 100644 index 0000000..570beae --- /dev/null +++ b/t/recipes/checks/debian/shlibs/shared-libs-dev-symlink/build-spec/orig/code.h @@ -0,0 +1,8 @@ +#ifndef CODE_H_ +#define CODE_H_ + +double e(void (*f)(char *)); + +double energy(double mass); + +#endif diff --git a/t/recipes/checks/debian/shlibs/shared-libs-dev-symlink/eval/desc b/t/recipes/checks/debian/shlibs/shared-libs-dev-symlink/eval/desc new file mode 100644 index 0000000..451ac80 --- /dev/null +++ b/t/recipes/checks/debian/shlibs/shared-libs-dev-symlink/eval/desc @@ -0,0 +1,2 @@ +Testname: shared-libs-dev-symlink +Check: debian/shlibs diff --git a/t/recipes/checks/debian/shlibs/shared-libs-dev-symlink/eval/hints b/t/recipes/checks/debian/shlibs/shared-libs-dev-symlink/eval/hints new file mode 100644 index 0000000..a7f8c30 --- /dev/null +++ b/t/recipes/checks/debian/shlibs/shared-libs-dev-symlink/eval/hints @@ -0,0 +1 @@ +libfoo1 (binary): symbols-file-missing-build-depends-package-field libfoo.so.1 [symbols] diff --git a/t/recipes/checks/debian/shlibs/shared-libs-exec-bit/build-spec/debian/compat.in b/t/recipes/checks/debian/shlibs/shared-libs-exec-bit/build-spec/debian/compat.in new file mode 100644 index 0000000..640a566 --- /dev/null +++ b/t/recipes/checks/debian/shlibs/shared-libs-exec-bit/build-spec/debian/compat.in @@ -0,0 +1 @@ +[% $dh_compat_level %] diff --git a/t/recipes/checks/debian/shlibs/shared-libs-exec-bit/build-spec/debian/control.in b/t/recipes/checks/debian/shlibs/shared-libs-exec-bit/build-spec/debian/control.in new file mode 100644 index 0000000..86a2064 --- /dev/null +++ b/t/recipes/checks/debian/shlibs/shared-libs-exec-bit/build-spec/debian/control.in @@ -0,0 +1,15 @@ +Source: [% $source %] +Priority: optional +Section: libs +Maintainer: [% $author %] +Standards-Version: [% $standards_version %] +Build-Depends: [% $build_depends %] +Rules-Requires-Root: no + +Package: libexecbit1 +Architecture: [% $package_architecture %] +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: [% $description %] + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. diff --git a/t/recipes/checks/debian/shlibs/shared-libs-exec-bit/build-spec/debian/libexecbit1.symbols b/t/recipes/checks/debian/shlibs/shared-libs-exec-bit/build-spec/debian/libexecbit1.symbols new file mode 100644 index 0000000..d8226ca --- /dev/null +++ b/t/recipes/checks/debian/shlibs/shared-libs-exec-bit/build-spec/debian/libexecbit1.symbols @@ -0,0 +1,3 @@ +libexecbit.so.1 libexecbit1 #MINVER# + e@Base 1.0 + energy@Base 0.9 diff --git a/t/recipes/checks/debian/shlibs/shared-libs-exec-bit/build-spec/debian/rules b/t/recipes/checks/debian/shlibs/shared-libs-exec-bit/build-spec/debian/rules new file mode 100644 index 0000000..9082f3f --- /dev/null +++ b/t/recipes/checks/debian/shlibs/shared-libs-exec-bit/build-spec/debian/rules @@ -0,0 +1,9 @@ +#!/usr/bin/make -f + +export DEB_BUILD_MAINT_OPTIONS=hardening=+all + +%: + dh $@ + +override_dh_fixperms: + # Do nothing, TYIA diff --git a/t/recipes/checks/debian/shlibs/shared-libs-exec-bit/build-spec/fill-values b/t/recipes/checks/debian/shlibs/shared-libs-exec-bit/build-spec/fill-values new file mode 100644 index 0000000..0f19b1b --- /dev/null +++ b/t/recipes/checks/debian/shlibs/shared-libs-exec-bit/build-spec/fill-values @@ -0,0 +1,6 @@ +Skeleton: upload-native +Testname: shared-libs-exec-bit +Package-Architecture: any +Default-Build-Depends: debhelper (>= 9.20151004~) +Dh-Compat-Level: 9 +Description: Test checks related to libs with exec bit diff --git a/t/recipes/checks/debian/shlibs/shared-libs-exec-bit/build-spec/orig/Makefile b/t/recipes/checks/debian/shlibs/shared-libs-exec-bit/build-spec/orig/Makefile new file mode 100644 index 0000000..0997289 --- /dev/null +++ b/t/recipes/checks/debian/shlibs/shared-libs-exec-bit/build-spec/orig/Makefile @@ -0,0 +1,23 @@ +CC=gcc +CFLAGS+= -fPIC + +SONAMES:= libexecbit.so.1 libbadperm.so.1 +LIBFILES:= $(patsubst %,%.0.1, $(SONAMES)) + +all: $(LIBFILES) + +$(LIBFILES): code.o + $(CC) $(LDFLAGS) -o $@ -shared -Wl,-soname,$(patsubst %.0.1,%,$@) $^ -lc + +clean: + rm -f *.a *.o *.so* + +install: all + install -m 0755 -d $(DESTDIR)/usr/lib + install -m 0755 *execbit*.so* $(DESTDIR)/usr/lib + install -m 0600 *badperm*.so* $(DESTDIR)/usr/lib + for FILE in $(SONAMES) ; do \ + ln -s $${FILE}.0.1 $(DESTDIR)/usr/lib/$$FILE ; \ + done + +.PHONY: install clean diff --git a/t/recipes/checks/debian/shlibs/shared-libs-exec-bit/build-spec/orig/code.c b/t/recipes/checks/debian/shlibs/shared-libs-exec-bit/build-spec/orig/code.c new file mode 100644 index 0000000..0ed08e0 --- /dev/null +++ b/t/recipes/checks/debian/shlibs/shared-libs-exec-bit/build-spec/orig/code.c @@ -0,0 +1,15 @@ +#include +#include + +double e(void (*f)(char *)){ + char tmp[10]; + double x; + f(tmp); + x = atof(tmp); + return exp(x); +} + +double energy(double mass){ + return pow(10.0, 8.0) * pow(3.0, 2.0) * mass; +} + diff --git a/t/recipes/checks/debian/shlibs/shared-libs-exec-bit/eval/desc b/t/recipes/checks/debian/shlibs/shared-libs-exec-bit/eval/desc new file mode 100644 index 0000000..efef29f --- /dev/null +++ b/t/recipes/checks/debian/shlibs/shared-libs-exec-bit/eval/desc @@ -0,0 +1,2 @@ +Testname: shared-libs-exec-bit +Check: debian/shlibs diff --git a/t/recipes/checks/debian/shlibs/shared-libs-exec-bit/eval/hints b/t/recipes/checks/debian/shlibs/shared-libs-exec-bit/eval/hints new file mode 100644 index 0000000..b576dcd --- /dev/null +++ b/t/recipes/checks/debian/shlibs/shared-libs-exec-bit/eval/hints @@ -0,0 +1,2 @@ +libexecbit1 (binary): symbols-file-missing-build-depends-package-field libexecbit.so.1 [symbols] +libexecbit1 (binary): symbols-file-missing-build-depends-package-field libbadperm.so.1 [symbols] diff --git a/t/recipes/checks/debian/shlibs/shared-libs-exec-stack/build-spec/debian/compat.in b/t/recipes/checks/debian/shlibs/shared-libs-exec-stack/build-spec/debian/compat.in new file mode 100644 index 0000000..640a566 --- /dev/null +++ b/t/recipes/checks/debian/shlibs/shared-libs-exec-stack/build-spec/debian/compat.in @@ -0,0 +1 @@ +[% $dh_compat_level %] diff --git a/t/recipes/checks/debian/shlibs/shared-libs-exec-stack/build-spec/debian/control.in b/t/recipes/checks/debian/shlibs/shared-libs-exec-stack/build-spec/debian/control.in new file mode 100644 index 0000000..bd81464 --- /dev/null +++ b/t/recipes/checks/debian/shlibs/shared-libs-exec-stack/build-spec/debian/control.in @@ -0,0 +1,15 @@ +Source: [% $source %] +Priority: optional +Section: libs +Maintainer: [% $author %] +Standards-Version: [% $standards_version %] +Build-Depends: [% $build_depends %] +Rules-Requires-Root: no + +Package: libexecstack1 +Architecture: [% $package_architecture %] +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: [% $description %] + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. diff --git a/t/recipes/checks/debian/shlibs/shared-libs-exec-stack/build-spec/debian/libexecstack1.symbols b/t/recipes/checks/debian/shlibs/shared-libs-exec-stack/build-spec/debian/libexecstack1.symbols new file mode 100644 index 0000000..1cc72ae --- /dev/null +++ b/t/recipes/checks/debian/shlibs/shared-libs-exec-stack/build-spec/debian/libexecstack1.symbols @@ -0,0 +1,3 @@ +libexecstack.so.1 libexecstack1 #MINVER# + foo@Base 1.0 + get@Base 1.0 diff --git a/t/recipes/checks/debian/shlibs/shared-libs-exec-stack/build-spec/fill-values b/t/recipes/checks/debian/shlibs/shared-libs-exec-stack/build-spec/fill-values new file mode 100644 index 0000000..7ca10e3 --- /dev/null +++ b/t/recipes/checks/debian/shlibs/shared-libs-exec-stack/build-spec/fill-values @@ -0,0 +1,6 @@ +Skeleton: upload-native +Testname: shared-libs-exec-stack +Package-Architecture: any +Default-Build-Depends: debhelper (>= 9.20151004~) +Dh-Compat-Level: 9 +Description: Test checks related to libs with exec stack diff --git a/t/recipes/checks/debian/shlibs/shared-libs-exec-stack/build-spec/orig/Makefile b/t/recipes/checks/debian/shlibs/shared-libs-exec-stack/build-spec/orig/Makefile new file mode 100644 index 0000000..1754891 --- /dev/null +++ b/t/recipes/checks/debian/shlibs/shared-libs-exec-stack/build-spec/orig/Makefile @@ -0,0 +1,22 @@ +CC=gcc +CFLAGS+= -fPIC + +SONAMES:= libexecstack.so.1 +LIBFILES:= $(patsubst %,%.0.1, $(SONAMES)) + +all: $(LIBFILES) + +$(LIBFILES): foo.o get.o + $(CC) $(LDFLAGS) -o $@ -shared -Wl,-soname,$(patsubst %.0.1,%,$@) $^ + +clean: + rm -f *.a *.o *.so* + +install: all + install -m 0755 -d $(DESTDIR)/usr/lib + install -m 0755 *.so* $(DESTDIR)/usr/lib + for FILE in $(SONAMES) ; do \ + ln -s $${FILE}.0.1 $(DESTDIR)/usr/lib/$$FILE ; \ + done + +.PHONY: install clean diff --git a/t/recipes/checks/debian/shlibs/shared-libs-exec-stack/build-spec/orig/foo.c b/t/recipes/checks/debian/shlibs/shared-libs-exec-stack/build-spec/orig/foo.c new file mode 100644 index 0000000..7f41799 --- /dev/null +++ b/t/recipes/checks/debian/shlibs/shared-libs-exec-stack/build-spec/orig/foo.c @@ -0,0 +1,9 @@ +extern int get(int, int (*)(int)); + +int foo(int a) { + int b = a; + int bar(int a) { + return a + b; + } + return get(a, bar); +} diff --git a/t/recipes/checks/debian/shlibs/shared-libs-exec-stack/build-spec/orig/get.c b/t/recipes/checks/debian/shlibs/shared-libs-exec-stack/build-spec/orig/get.c new file mode 100644 index 0000000..8207637 --- /dev/null +++ b/t/recipes/checks/debian/shlibs/shared-libs-exec-stack/build-spec/orig/get.c @@ -0,0 +1,6 @@ +int get(int a, int (*f)(int)) { + return f(a); +} + +extern int foo(int); + diff --git a/t/recipes/checks/debian/shlibs/shared-libs-exec-stack/eval/desc b/t/recipes/checks/debian/shlibs/shared-libs-exec-stack/eval/desc new file mode 100644 index 0000000..f2a5f21 --- /dev/null +++ b/t/recipes/checks/debian/shlibs/shared-libs-exec-stack/eval/desc @@ -0,0 +1,2 @@ +Testname: shared-libs-exec-stack +Check: debian/shlibs diff --git a/t/recipes/checks/debian/shlibs/shared-libs-exec-stack/eval/hints b/t/recipes/checks/debian/shlibs/shared-libs-exec-stack/eval/hints new file mode 100644 index 0000000..57bd1d2 --- /dev/null +++ b/t/recipes/checks/debian/shlibs/shared-libs-exec-stack/eval/hints @@ -0,0 +1 @@ +libexecstack1 (binary): symbols-file-missing-build-depends-package-field libexecstack.so.1 [symbols] diff --git a/t/recipes/checks/debian/shlibs/shared-libs-exit-fork/build-spec/debian/compat.in b/t/recipes/checks/debian/shlibs/shared-libs-exit-fork/build-spec/debian/compat.in new file mode 100644 index 0000000..640a566 --- /dev/null +++ b/t/recipes/checks/debian/shlibs/shared-libs-exit-fork/build-spec/debian/compat.in @@ -0,0 +1 @@ +[% $dh_compat_level %] diff --git a/t/recipes/checks/debian/shlibs/shared-libs-exit-fork/build-spec/debian/control.in b/t/recipes/checks/debian/shlibs/shared-libs-exit-fork/build-spec/debian/control.in new file mode 100644 index 0000000..86a2064 --- /dev/null +++ b/t/recipes/checks/debian/shlibs/shared-libs-exit-fork/build-spec/debian/control.in @@ -0,0 +1,15 @@ +Source: [% $source %] +Priority: optional +Section: libs +Maintainer: [% $author %] +Standards-Version: [% $standards_version %] +Build-Depends: [% $build_depends %] +Rules-Requires-Root: no + +Package: libexecbit1 +Architecture: [% $package_architecture %] +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: [% $description %] + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. diff --git a/t/recipes/checks/debian/shlibs/shared-libs-exit-fork/build-spec/debian/libexecbit1.symbols b/t/recipes/checks/debian/shlibs/shared-libs-exit-fork/build-spec/debian/libexecbit1.symbols new file mode 100644 index 0000000..0b26833 --- /dev/null +++ b/t/recipes/checks/debian/shlibs/shared-libs-exit-fork/build-spec/debian/libexecbit1.symbols @@ -0,0 +1,2 @@ +libexecbit.so.1 libexecbit1 #MINVER# + e@Base 1.0 diff --git a/t/recipes/checks/debian/shlibs/shared-libs-exit-fork/build-spec/fill-values b/t/recipes/checks/debian/shlibs/shared-libs-exit-fork/build-spec/fill-values new file mode 100644 index 0000000..8c30582 --- /dev/null +++ b/t/recipes/checks/debian/shlibs/shared-libs-exit-fork/build-spec/fill-values @@ -0,0 +1,6 @@ +Skeleton: upload-native +Testname: shared-libs-exit-fork +Package-Architecture: any +Default-Build-Depends: debhelper (>= 9.20151004~) +Dh-Compat-Level: 9 +Description: Test checks related to libs invoking both exit(3) and fork(2) diff --git a/t/recipes/checks/debian/shlibs/shared-libs-exit-fork/build-spec/orig/Makefile b/t/recipes/checks/debian/shlibs/shared-libs-exit-fork/build-spec/orig/Makefile new file mode 100644 index 0000000..68d5863 --- /dev/null +++ b/t/recipes/checks/debian/shlibs/shared-libs-exit-fork/build-spec/orig/Makefile @@ -0,0 +1,22 @@ +CC=gcc +CFLAGS+= -fPIC + +SONAMES:= libexecbit.so.1 +LIBFILES:= $(patsubst %,%.0.1, $(SONAMES)) + +all: $(LIBFILES) + +$(LIBFILES): code.o + $(CC) $(LDFLAGS) -o $@ -shared -Wl,-soname,$(patsubst %.0.1,%,$@) $^ -lc + +clean: + rm -f *.a *.o *.so* + +install: all + install -m 0755 -d $(DESTDIR)/usr/lib + install -m 0755 *.so* $(DESTDIR)/usr/lib + for FILE in $(SONAMES) ; do \ + ln -s $${FILE}.0.1 $(DESTDIR)/usr/lib/$$FILE ; \ + done + +.PHONY: install clean diff --git a/t/recipes/checks/debian/shlibs/shared-libs-exit-fork/build-spec/orig/code.c b/t/recipes/checks/debian/shlibs/shared-libs-exit-fork/build-spec/orig/code.c new file mode 100644 index 0000000..df63394 --- /dev/null +++ b/t/recipes/checks/debian/shlibs/shared-libs-exit-fork/build-spec/orig/code.c @@ -0,0 +1,12 @@ +#include +#include + +double e(void (*f)(char *)){ + char tmp[10]; + double x; + f(tmp); + x = atof(tmp); + if (fork() != 0) + exit(1); + return x; +} diff --git a/t/recipes/checks/debian/shlibs/shared-libs-exit-fork/eval/desc b/t/recipes/checks/debian/shlibs/shared-libs-exit-fork/eval/desc new file mode 100644 index 0000000..fc71c36 --- /dev/null +++ b/t/recipes/checks/debian/shlibs/shared-libs-exit-fork/eval/desc @@ -0,0 +1,2 @@ +Testname: shared-libs-exit-fork +Check: debian/shlibs diff --git a/t/recipes/checks/debian/shlibs/shared-libs-exit-fork/eval/hints b/t/recipes/checks/debian/shlibs/shared-libs-exit-fork/eval/hints new file mode 100644 index 0000000..6105735 --- /dev/null +++ b/t/recipes/checks/debian/shlibs/shared-libs-exit-fork/eval/hints @@ -0,0 +1 @@ +libexecbit1 (binary): symbols-file-missing-build-depends-package-field libexecbit.so.1 [symbols] diff --git a/t/recipes/checks/debian/shlibs/shared-libs-exit/build-spec/debian/compat.in b/t/recipes/checks/debian/shlibs/shared-libs-exit/build-spec/debian/compat.in new file mode 100644 index 0000000..640a566 --- /dev/null +++ b/t/recipes/checks/debian/shlibs/shared-libs-exit/build-spec/debian/compat.in @@ -0,0 +1 @@ +[% $dh_compat_level %] diff --git a/t/recipes/checks/debian/shlibs/shared-libs-exit/build-spec/debian/control.in b/t/recipes/checks/debian/shlibs/shared-libs-exit/build-spec/debian/control.in new file mode 100644 index 0000000..86a2064 --- /dev/null +++ b/t/recipes/checks/debian/shlibs/shared-libs-exit/build-spec/debian/control.in @@ -0,0 +1,15 @@ +Source: [% $source %] +Priority: optional +Section: libs +Maintainer: [% $author %] +Standards-Version: [% $standards_version %] +Build-Depends: [% $build_depends %] +Rules-Requires-Root: no + +Package: libexecbit1 +Architecture: [% $package_architecture %] +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: [% $description %] + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. diff --git a/t/recipes/checks/debian/shlibs/shared-libs-exit/build-spec/debian/libexecbit1.symbols b/t/recipes/checks/debian/shlibs/shared-libs-exit/build-spec/debian/libexecbit1.symbols new file mode 100644 index 0000000..0b26833 --- /dev/null +++ b/t/recipes/checks/debian/shlibs/shared-libs-exit/build-spec/debian/libexecbit1.symbols @@ -0,0 +1,2 @@ +libexecbit.so.1 libexecbit1 #MINVER# + e@Base 1.0 diff --git a/t/recipes/checks/debian/shlibs/shared-libs-exit/build-spec/fill-values b/t/recipes/checks/debian/shlibs/shared-libs-exit/build-spec/fill-values new file mode 100644 index 0000000..99c4585 --- /dev/null +++ b/t/recipes/checks/debian/shlibs/shared-libs-exit/build-spec/fill-values @@ -0,0 +1,6 @@ +Skeleton: upload-native +Testname: shared-libs-exit +Package-Architecture: any +Default-Build-Depends: debhelper (>= 9.20151004~) +Dh-Compat-Level: 9 +Description: Test checks related to libs invoking exit(3) diff --git a/t/recipes/checks/debian/shlibs/shared-libs-exit/build-spec/orig/Makefile b/t/recipes/checks/debian/shlibs/shared-libs-exit/build-spec/orig/Makefile new file mode 100644 index 0000000..68d5863 --- /dev/null +++ b/t/recipes/checks/debian/shlibs/shared-libs-exit/build-spec/orig/Makefile @@ -0,0 +1,22 @@ +CC=gcc +CFLAGS+= -fPIC + +SONAMES:= libexecbit.so.1 +LIBFILES:= $(patsubst %,%.0.1, $(SONAMES)) + +all: $(LIBFILES) + +$(LIBFILES): code.o + $(CC) $(LDFLAGS) -o $@ -shared -Wl,-soname,$(patsubst %.0.1,%,$@) $^ -lc + +clean: + rm -f *.a *.o *.so* + +install: all + install -m 0755 -d $(DESTDIR)/usr/lib + install -m 0755 *.so* $(DESTDIR)/usr/lib + for FILE in $(SONAMES) ; do \ + ln -s $${FILE}.0.1 $(DESTDIR)/usr/lib/$$FILE ; \ + done + +.PHONY: install clean diff --git a/t/recipes/checks/debian/shlibs/shared-libs-exit/build-spec/orig/code.c b/t/recipes/checks/debian/shlibs/shared-libs-exit/build-spec/orig/code.c new file mode 100644 index 0000000..297a4e8 --- /dev/null +++ b/t/recipes/checks/debian/shlibs/shared-libs-exit/build-spec/orig/code.c @@ -0,0 +1,13 @@ +#include + +double e(void (*f)(char *)){ + char tmp[10]; + double x; + f(tmp); + x = atof(tmp); + if (x < 0.0) { + exit(1); + } else { + return x; + } +} diff --git a/t/recipes/checks/debian/shlibs/shared-libs-exit/eval/desc b/t/recipes/checks/debian/shlibs/shared-libs-exit/eval/desc new file mode 100644 index 0000000..cc20e73 --- /dev/null +++ b/t/recipes/checks/debian/shlibs/shared-libs-exit/eval/desc @@ -0,0 +1,2 @@ +Testname: shared-libs-exit +Check: debian/shlibs diff --git a/t/recipes/checks/debian/shlibs/shared-libs-exit/eval/hints b/t/recipes/checks/debian/shlibs/shared-libs-exit/eval/hints new file mode 100644 index 0000000..6105735 --- /dev/null +++ b/t/recipes/checks/debian/shlibs/shared-libs-exit/eval/hints @@ -0,0 +1 @@ +libexecbit1 (binary): symbols-file-missing-build-depends-package-field libexecbit.so.1 [symbols] diff --git a/t/recipes/checks/debian/shlibs/shared-libs-ldconfig-not-symlink/build-spec/debian/compat.in b/t/recipes/checks/debian/shlibs/shared-libs-ldconfig-not-symlink/build-spec/debian/compat.in new file mode 100644 index 0000000..640a566 --- /dev/null +++ b/t/recipes/checks/debian/shlibs/shared-libs-ldconfig-not-symlink/build-spec/debian/compat.in @@ -0,0 +1 @@ +[% $dh_compat_level %] diff --git a/t/recipes/checks/debian/shlibs/shared-libs-ldconfig-not-symlink/build-spec/debian/control.in b/t/recipes/checks/debian/shlibs/shared-libs-ldconfig-not-symlink/build-spec/debian/control.in new file mode 100644 index 0000000..c20a449 --- /dev/null +++ b/t/recipes/checks/debian/shlibs/shared-libs-ldconfig-not-symlink/build-spec/debian/control.in @@ -0,0 +1,15 @@ +Source: [% $source %] +Priority: optional +Section: libs +Maintainer: [% $author %] +Standards-Version: [% $standards_version %] +Build-Depends: [% $build_depends %] +Rules-Requires-Root: no + +Package: libfoo1 +Architecture: [% $package_architecture %] +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: [% $description %] + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. diff --git a/t/recipes/checks/debian/shlibs/shared-libs-ldconfig-not-symlink/build-spec/debian/libfoo1.symbols b/t/recipes/checks/debian/shlibs/shared-libs-ldconfig-not-symlink/build-spec/debian/libfoo1.symbols new file mode 100644 index 0000000..a1f052b --- /dev/null +++ b/t/recipes/checks/debian/shlibs/shared-libs-ldconfig-not-symlink/build-spec/debian/libfoo1.symbols @@ -0,0 +1,3 @@ +libfoo.so.1 libfoo1 #MINVER# + e@Base 1.0 + energy@Base 0.9 diff --git a/t/recipes/checks/debian/shlibs/shared-libs-ldconfig-not-symlink/build-spec/fill-values b/t/recipes/checks/debian/shlibs/shared-libs-ldconfig-not-symlink/build-spec/fill-values new file mode 100644 index 0000000..b000a7b --- /dev/null +++ b/t/recipes/checks/debian/shlibs/shared-libs-ldconfig-not-symlink/build-spec/fill-values @@ -0,0 +1,6 @@ +Testname: shared-libs-ldconfig-not-symlink +Package-Architecture: any +Skeleton: upload-non-native +Default-Build-Depends: debhelper (>= 9.20151004~) +Dh-Compat-Level: 9 +Description: Test ldconfig symlink not being a symlink diff --git a/t/recipes/checks/debian/shlibs/shared-libs-ldconfig-not-symlink/build-spec/orig/Makefile b/t/recipes/checks/debian/shlibs/shared-libs-ldconfig-not-symlink/build-spec/orig/Makefile new file mode 100644 index 0000000..2e3306e --- /dev/null +++ b/t/recipes/checks/debian/shlibs/shared-libs-ldconfig-not-symlink/build-spec/orig/Makefile @@ -0,0 +1,20 @@ +CC=gcc +CFLAGS+= -fPIC + +SONAMES:= libfoo.so.1 +LIBFILES:= $(patsubst %,%.0.1, $(SONAMES)) + +all: $(LIBFILES) + +$(LIBFILES): code.o + $(CC) $(LDFLAGS) -o $@ -shared -Wl,-soname,$(patsubst %.0.1,%,$@) $^ -lc + +clean: + rm -f *.a *.o *.so* + +install: all + install -m 0755 -d $(DESTDIR)/usr/lib + install -m 0644 *.so* $(DESTDIR)/usr/lib + install -T -m 0644 *.so* $(DESTDIR)/usr/lib/libfoo.so.1 + +.PHONY: install clean diff --git a/t/recipes/checks/debian/shlibs/shared-libs-ldconfig-not-symlink/build-spec/orig/code.c b/t/recipes/checks/debian/shlibs/shared-libs-ldconfig-not-symlink/build-spec/orig/code.c new file mode 100644 index 0000000..0ed08e0 --- /dev/null +++ b/t/recipes/checks/debian/shlibs/shared-libs-ldconfig-not-symlink/build-spec/orig/code.c @@ -0,0 +1,15 @@ +#include +#include + +double e(void (*f)(char *)){ + char tmp[10]; + double x; + f(tmp); + x = atof(tmp); + return exp(x); +} + +double energy(double mass){ + return pow(10.0, 8.0) * pow(3.0, 2.0) * mass; +} + diff --git a/t/recipes/checks/debian/shlibs/shared-libs-ldconfig-not-symlink/eval/desc b/t/recipes/checks/debian/shlibs/shared-libs-ldconfig-not-symlink/eval/desc new file mode 100644 index 0000000..56356db --- /dev/null +++ b/t/recipes/checks/debian/shlibs/shared-libs-ldconfig-not-symlink/eval/desc @@ -0,0 +1,2 @@ +Testname: shared-libs-ldconfig-not-symlink +Check: debian/shlibs diff --git a/t/recipes/checks/debian/shlibs/shared-libs-ldconfig-not-symlink/eval/hints b/t/recipes/checks/debian/shlibs/shared-libs-ldconfig-not-symlink/eval/hints new file mode 100644 index 0000000..a7f8c30 --- /dev/null +++ b/t/recipes/checks/debian/shlibs/shared-libs-ldconfig-not-symlink/eval/hints @@ -0,0 +1 @@ +libfoo1 (binary): symbols-file-missing-build-depends-package-field libfoo.so.1 [symbols] diff --git a/t/recipes/checks/debian/shlibs/shared-libs-ldconfig-scripts/build-spec/debian/app.install b/t/recipes/checks/debian/shlibs/shared-libs-ldconfig-scripts/build-spec/debian/app.install new file mode 100644 index 0000000..fe6951d --- /dev/null +++ b/t/recipes/checks/debian/shlibs/shared-libs-ldconfig-scripts/build-spec/debian/app.install @@ -0,0 +1,2 @@ +app usr/lib/app + diff --git a/t/recipes/checks/debian/shlibs/shared-libs-ldconfig-scripts/build-spec/debian/app.postinst b/t/recipes/checks/debian/shlibs/shared-libs-ldconfig-scripts/build-spec/debian/app.postinst new file mode 100755 index 0000000..3e67b7e --- /dev/null +++ b/t/recipes/checks/debian/shlibs/shared-libs-ldconfig-scripts/build-spec/debian/app.postinst @@ -0,0 +1,6 @@ +#!/bin/sh +set -e + +ldconfig + +#DEBHELPER# diff --git a/t/recipes/checks/debian/shlibs/shared-libs-ldconfig-scripts/build-spec/debian/app.postrm b/t/recipes/checks/debian/shlibs/shared-libs-ldconfig-scripts/build-spec/debian/app.postrm new file mode 100755 index 0000000..eaeb28d --- /dev/null +++ b/t/recipes/checks/debian/shlibs/shared-libs-ldconfig-scripts/build-spec/debian/app.postrm @@ -0,0 +1,6 @@ +#!/bin/sh +set -e + +if [ "$1" = remove ] ; then ldconfig ; fi + +#DEBHELPER# diff --git a/t/recipes/checks/debian/shlibs/shared-libs-ldconfig-scripts/build-spec/debian/app.triggers b/t/recipes/checks/debian/shlibs/shared-libs-ldconfig-scripts/build-spec/debian/app.triggers new file mode 100644 index 0000000..dd86603 --- /dev/null +++ b/t/recipes/checks/debian/shlibs/shared-libs-ldconfig-scripts/build-spec/debian/app.triggers @@ -0,0 +1 @@ +activate-noawait ldconfig diff --git a/t/recipes/checks/debian/shlibs/shared-libs-ldconfig-scripts/build-spec/debian/compat.in b/t/recipes/checks/debian/shlibs/shared-libs-ldconfig-scripts/build-spec/debian/compat.in new file mode 100644 index 0000000..640a566 --- /dev/null +++ b/t/recipes/checks/debian/shlibs/shared-libs-ldconfig-scripts/build-spec/debian/compat.in @@ -0,0 +1 @@ +[% $dh_compat_level %] diff --git a/t/recipes/checks/debian/shlibs/shared-libs-ldconfig-scripts/build-spec/debian/control.in b/t/recipes/checks/debian/shlibs/shared-libs-ldconfig-scripts/build-spec/debian/control.in new file mode 100644 index 0000000..9960ee9 --- /dev/null +++ b/t/recipes/checks/debian/shlibs/shared-libs-ldconfig-scripts/build-spec/debian/control.in @@ -0,0 +1,47 @@ +Source: [% $source %] +Priority: optional +Section: libs +Maintainer: [% $author %] +Standards-Version: [% $standards_version %] +Build-Depends: [% $build_depends %] +Rules-Requires-Root: no + +Package: libfoo1 +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: [% $description %] (missing ldc) + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. + . + Checks for missing ldconfig in scripts. + +Package: libfish1 +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: [% $description %] (preinst/rm ldc) + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. + . + Checks for ldconfig in preinst/prerm scripts. + +Package: libuns1 +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: [% $description %] (unsafe ldc) + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. + . + Checks for unsafe ldconfig usage scripts. + +Package: app +Architecture: all +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: [% $description %] (useless ldc) + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. + . + Checks for useless ldconfig usage in scripts. diff --git a/t/recipes/checks/debian/shlibs/shared-libs-ldconfig-scripts/build-spec/debian/libfish1.install b/t/recipes/checks/debian/shlibs/shared-libs-ldconfig-scripts/build-spec/debian/libfish1.install new file mode 100644 index 0000000..b1c4ec9 --- /dev/null +++ b/t/recipes/checks/debian/shlibs/shared-libs-ldconfig-scripts/build-spec/debian/libfish1.install @@ -0,0 +1 @@ +usr/lib/libfish* diff --git a/t/recipes/checks/debian/shlibs/shared-libs-ldconfig-scripts/build-spec/debian/libfish1.preinst b/t/recipes/checks/debian/shlibs/shared-libs-ldconfig-scripts/build-spec/debian/libfish1.preinst new file mode 100755 index 0000000..3e67b7e --- /dev/null +++ b/t/recipes/checks/debian/shlibs/shared-libs-ldconfig-scripts/build-spec/debian/libfish1.preinst @@ -0,0 +1,6 @@ +#!/bin/sh +set -e + +ldconfig + +#DEBHELPER# diff --git a/t/recipes/checks/debian/shlibs/shared-libs-ldconfig-scripts/build-spec/debian/libfish1.prerm b/t/recipes/checks/debian/shlibs/shared-libs-ldconfig-scripts/build-spec/debian/libfish1.prerm new file mode 100755 index 0000000..3e67b7e --- /dev/null +++ b/t/recipes/checks/debian/shlibs/shared-libs-ldconfig-scripts/build-spec/debian/libfish1.prerm @@ -0,0 +1,6 @@ +#!/bin/sh +set -e + +ldconfig + +#DEBHELPER# diff --git a/t/recipes/checks/debian/shlibs/shared-libs-ldconfig-scripts/build-spec/debian/libfish1.symbols b/t/recipes/checks/debian/shlibs/shared-libs-ldconfig-scripts/build-spec/debian/libfish1.symbols new file mode 100644 index 0000000..2c5a075 --- /dev/null +++ b/t/recipes/checks/debian/shlibs/shared-libs-ldconfig-scripts/build-spec/debian/libfish1.symbols @@ -0,0 +1,3 @@ +libfish.so.1 libfish1 #MINVER# + e@Base 1.0 + energy@Base 0.9 diff --git a/t/recipes/checks/debian/shlibs/shared-libs-ldconfig-scripts/build-spec/debian/libfoo1.install b/t/recipes/checks/debian/shlibs/shared-libs-ldconfig-scripts/build-spec/debian/libfoo1.install new file mode 100644 index 0000000..f3a3a05 --- /dev/null +++ b/t/recipes/checks/debian/shlibs/shared-libs-ldconfig-scripts/build-spec/debian/libfoo1.install @@ -0,0 +1 @@ +usr/lib/libfoo* diff --git a/t/recipes/checks/debian/shlibs/shared-libs-ldconfig-scripts/build-spec/debian/libfoo1.postinst b/t/recipes/checks/debian/shlibs/shared-libs-ldconfig-scripts/build-spec/debian/libfoo1.postinst new file mode 100755 index 0000000..2615bf9 --- /dev/null +++ b/t/recipes/checks/debian/shlibs/shared-libs-ldconfig-scripts/build-spec/debian/libfoo1.postinst @@ -0,0 +1,8 @@ +#!/bin/sh +set -e + +# No ldconfig +if false ; then true ; fi + +# -- we will remove all debhelper stuff later. +#DEBHELPER# diff --git a/t/recipes/checks/debian/shlibs/shared-libs-ldconfig-scripts/build-spec/debian/libfoo1.postrm b/t/recipes/checks/debian/shlibs/shared-libs-ldconfig-scripts/build-spec/debian/libfoo1.postrm new file mode 100755 index 0000000..9b2f636 --- /dev/null +++ b/t/recipes/checks/debian/shlibs/shared-libs-ldconfig-scripts/build-spec/debian/libfoo1.postrm @@ -0,0 +1,8 @@ +#!/bin/sh +set -e + +if false ; then true ; fi + + +# -- we will remove all debhelper stuff later. +#DEBHELPER# diff --git a/t/recipes/checks/debian/shlibs/shared-libs-ldconfig-scripts/build-spec/debian/libfoo1.symbols b/t/recipes/checks/debian/shlibs/shared-libs-ldconfig-scripts/build-spec/debian/libfoo1.symbols new file mode 100644 index 0000000..a1f052b --- /dev/null +++ b/t/recipes/checks/debian/shlibs/shared-libs-ldconfig-scripts/build-spec/debian/libfoo1.symbols @@ -0,0 +1,3 @@ +libfoo.so.1 libfoo1 #MINVER# + e@Base 1.0 + energy@Base 0.9 diff --git a/t/recipes/checks/debian/shlibs/shared-libs-ldconfig-scripts/build-spec/debian/libuns1.install b/t/recipes/checks/debian/shlibs/shared-libs-ldconfig-scripts/build-spec/debian/libuns1.install new file mode 100644 index 0000000..b91d5ff --- /dev/null +++ b/t/recipes/checks/debian/shlibs/shared-libs-ldconfig-scripts/build-spec/debian/libuns1.install @@ -0,0 +1 @@ +usr/lib/libuns* diff --git a/t/recipes/checks/debian/shlibs/shared-libs-ldconfig-scripts/build-spec/debian/libuns1.postrm b/t/recipes/checks/debian/shlibs/shared-libs-ldconfig-scripts/build-spec/debian/libuns1.postrm new file mode 100755 index 0000000..acc5d15 --- /dev/null +++ b/t/recipes/checks/debian/shlibs/shared-libs-ldconfig-scripts/build-spec/debian/libuns1.postrm @@ -0,0 +1,8 @@ +#!/bin/sh +set -e + +ldconfig + + +# -- we will remove all debhelper stuff later. +#DEBHELPER# diff --git a/t/recipes/checks/debian/shlibs/shared-libs-ldconfig-scripts/build-spec/debian/libuns1.symbols b/t/recipes/checks/debian/shlibs/shared-libs-ldconfig-scripts/build-spec/debian/libuns1.symbols new file mode 100644 index 0000000..d91149f --- /dev/null +++ b/t/recipes/checks/debian/shlibs/shared-libs-ldconfig-scripts/build-spec/debian/libuns1.symbols @@ -0,0 +1,3 @@ +libuns.so.1 libuns1 #MINVER# + e@Base 1.0 + energy@Base 0.9 diff --git a/t/recipes/checks/debian/shlibs/shared-libs-ldconfig-scripts/build-spec/debian/rules b/t/recipes/checks/debian/shlibs/shared-libs-ldconfig-scripts/build-spec/debian/rules new file mode 100755 index 0000000..b1c71a9 --- /dev/null +++ b/t/recipes/checks/debian/shlibs/shared-libs-ldconfig-scripts/build-spec/debian/rules @@ -0,0 +1,21 @@ +#!/usr/bin/make -f + +export DEB_BUILD_MAINT_OPTIONS=hardening=+all + +%: + dh $@ + +override_dh_builddeb: + for P in $$(dh_listpackages) ; do \ + for S in postinst postrm preinst prerm ; do \ + if [ -f debian/$${P}.$${S} ] ; then \ + cp -af debian/$${P}.$${S} debian/$${P}/DEBIAN/$${S} ; \ + chmod 0755 debian/$${P}/DEBIAN/$${S} ; \ + sed -i '/#DEBHELPER#/ d' debian/$${P}/DEBIAN/$${S} ; \ + fi ; \ + done ; \ + done + # Work around debhelper adding triggers instead of explicit + # ldconfig calls + rm -f debian/libfoo1/DEBIAN/triggers + dh_builddeb diff --git a/t/recipes/checks/debian/shlibs/shared-libs-ldconfig-scripts/build-spec/fill-values b/t/recipes/checks/debian/shlibs/shared-libs-ldconfig-scripts/build-spec/fill-values new file mode 100644 index 0000000..2159596 --- /dev/null +++ b/t/recipes/checks/debian/shlibs/shared-libs-ldconfig-scripts/build-spec/fill-values @@ -0,0 +1,5 @@ +Skeleton: upload-native +Testname: shared-libs-ldconfig-scripts +Default-Build-Depends: debhelper (>= 9.20151004~) +Dh-Compat-Level: 9 +Description: Test checks related to ldconfig in scripts diff --git a/t/recipes/checks/debian/shlibs/shared-libs-ldconfig-scripts/build-spec/orig/Makefile b/t/recipes/checks/debian/shlibs/shared-libs-ldconfig-scripts/build-spec/orig/Makefile new file mode 100644 index 0000000..4d3c286 --- /dev/null +++ b/t/recipes/checks/debian/shlibs/shared-libs-ldconfig-scripts/build-spec/orig/Makefile @@ -0,0 +1,22 @@ +CC=gcc +CFLAGS+= -fPIC + +SONAMES:= libfoo.so.1 libfish.so.1 libuns.so.1 +LIBFILES:= $(patsubst %,%.0.1, $(SONAMES)) + +all: $(LIBFILES) + +$(LIBFILES): code.o + $(CC) $(LDFLAGS) -o $@ -shared -Wl,-soname,$(patsubst %.0.1,%,$@) $^ -lm + +clean: + rm -f *.a *.o *.so* + +install: all + install -m 0755 -d $(DESTDIR)/usr/lib + install -m 0644 *.so* $(DESTDIR)/usr/lib + for FILE in $(SONAMES) ; do \ + ln -s $${FILE}.0.1 $(DESTDIR)/usr/lib/$$FILE ; \ + done + +.PHONY: install clean diff --git a/t/recipes/checks/debian/shlibs/shared-libs-ldconfig-scripts/build-spec/orig/app b/t/recipes/checks/debian/shlibs/shared-libs-ldconfig-scripts/build-spec/orig/app new file mode 100755 index 0000000..04f1961 --- /dev/null +++ b/t/recipes/checks/debian/shlibs/shared-libs-ldconfig-scripts/build-spec/orig/app @@ -0,0 +1,2 @@ +#!/bin/sh +echo Hello World diff --git a/t/recipes/checks/debian/shlibs/shared-libs-ldconfig-scripts/build-spec/orig/code.c b/t/recipes/checks/debian/shlibs/shared-libs-ldconfig-scripts/build-spec/orig/code.c new file mode 100644 index 0000000..0ed08e0 --- /dev/null +++ b/t/recipes/checks/debian/shlibs/shared-libs-ldconfig-scripts/build-spec/orig/code.c @@ -0,0 +1,15 @@ +#include +#include + +double e(void (*f)(char *)){ + char tmp[10]; + double x; + f(tmp); + x = atof(tmp); + return exp(x); +} + +double energy(double mass){ + return pow(10.0, 8.0) * pow(3.0, 2.0) * mass; +} + diff --git a/t/recipes/checks/debian/shlibs/shared-libs-ldconfig-scripts/eval/desc b/t/recipes/checks/debian/shlibs/shared-libs-ldconfig-scripts/eval/desc new file mode 100644 index 0000000..a05f43e --- /dev/null +++ b/t/recipes/checks/debian/shlibs/shared-libs-ldconfig-scripts/eval/desc @@ -0,0 +1,2 @@ +Testname: shared-libs-ldconfig-scripts +Check: debian/shlibs diff --git a/t/recipes/checks/debian/shlibs/shared-libs-ldconfig-scripts/eval/hints b/t/recipes/checks/debian/shlibs/shared-libs-ldconfig-scripts/eval/hints new file mode 100644 index 0000000..67c138b --- /dev/null +++ b/t/recipes/checks/debian/shlibs/shared-libs-ldconfig-scripts/eval/hints @@ -0,0 +1,3 @@ +libuns1 (binary): symbols-file-missing-build-depends-package-field libuns.so.1 [symbols] +libfoo1 (binary): symbols-file-missing-build-depends-package-field libfoo.so.1 [symbols] +libfish1 (binary): symbols-file-missing-build-depends-package-field libfish.so.1 [symbols] diff --git a/t/recipes/checks/debian/shlibs/shared-libs-ldconfig-wrong-file/build-spec/debian/compat.in b/t/recipes/checks/debian/shlibs/shared-libs-ldconfig-wrong-file/build-spec/debian/compat.in new file mode 100644 index 0000000..640a566 --- /dev/null +++ b/t/recipes/checks/debian/shlibs/shared-libs-ldconfig-wrong-file/build-spec/debian/compat.in @@ -0,0 +1 @@ +[% $dh_compat_level %] diff --git a/t/recipes/checks/debian/shlibs/shared-libs-ldconfig-wrong-file/build-spec/debian/control.in b/t/recipes/checks/debian/shlibs/shared-libs-ldconfig-wrong-file/build-spec/debian/control.in new file mode 100644 index 0000000..c20a449 --- /dev/null +++ b/t/recipes/checks/debian/shlibs/shared-libs-ldconfig-wrong-file/build-spec/debian/control.in @@ -0,0 +1,15 @@ +Source: [% $source %] +Priority: optional +Section: libs +Maintainer: [% $author %] +Standards-Version: [% $standards_version %] +Build-Depends: [% $build_depends %] +Rules-Requires-Root: no + +Package: libfoo1 +Architecture: [% $package_architecture %] +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: [% $description %] + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. diff --git a/t/recipes/checks/debian/shlibs/shared-libs-ldconfig-wrong-file/build-spec/debian/libfoo1.symbols b/t/recipes/checks/debian/shlibs/shared-libs-ldconfig-wrong-file/build-spec/debian/libfoo1.symbols new file mode 100644 index 0000000..a1f052b --- /dev/null +++ b/t/recipes/checks/debian/shlibs/shared-libs-ldconfig-wrong-file/build-spec/debian/libfoo1.symbols @@ -0,0 +1,3 @@ +libfoo.so.1 libfoo1 #MINVER# + e@Base 1.0 + energy@Base 0.9 diff --git a/t/recipes/checks/debian/shlibs/shared-libs-ldconfig-wrong-file/build-spec/fill-values b/t/recipes/checks/debian/shlibs/shared-libs-ldconfig-wrong-file/build-spec/fill-values new file mode 100644 index 0000000..74b1f2a --- /dev/null +++ b/t/recipes/checks/debian/shlibs/shared-libs-ldconfig-wrong-file/build-spec/fill-values @@ -0,0 +1,6 @@ +Testname: shared-libs-ldconfig-wrong-file +Package-Architecture: any +Skeleton: upload-non-native +Default-Build-Depends: debhelper (>= 9.20151004~) +Dh-Compat-Level: 9 +Description: Test ldconfig symlink with wrong target diff --git a/t/recipes/checks/debian/shlibs/shared-libs-ldconfig-wrong-file/build-spec/orig/Makefile b/t/recipes/checks/debian/shlibs/shared-libs-ldconfig-wrong-file/build-spec/orig/Makefile new file mode 100644 index 0000000..373cbd2 --- /dev/null +++ b/t/recipes/checks/debian/shlibs/shared-libs-ldconfig-wrong-file/build-spec/orig/Makefile @@ -0,0 +1,22 @@ +CC=gcc +CFLAGS+= -fPIC + +SONAMES:= libfoo.so.1 +LIBFILES:= $(patsubst %,%.0.1, $(SONAMES)) + +all: $(LIBFILES) + +$(LIBFILES): code.o + $(CC) $(LDFLAGS) -o $@ -shared -Wl,-soname,$(patsubst %.0.1,%,$@) $^ -lc + +clean: + rm -f *.a *.o *.so* + +install: all + install -m 0755 -d $(DESTDIR)/usr/lib + install -m 0644 *.so* $(DESTDIR)/usr/lib + echo "Strauss: Also Sprach Zarathustra" > \ + $(DESTDIR)/usr/lib/some-other-file + ln -s some-other-file $(DESTDIR)/usr/lib/libfoo.so.1 + +.PHONY: install clean diff --git a/t/recipes/checks/debian/shlibs/shared-libs-ldconfig-wrong-file/build-spec/orig/code.c b/t/recipes/checks/debian/shlibs/shared-libs-ldconfig-wrong-file/build-spec/orig/code.c new file mode 100644 index 0000000..0ed08e0 --- /dev/null +++ b/t/recipes/checks/debian/shlibs/shared-libs-ldconfig-wrong-file/build-spec/orig/code.c @@ -0,0 +1,15 @@ +#include +#include + +double e(void (*f)(char *)){ + char tmp[10]; + double x; + f(tmp); + x = atof(tmp); + return exp(x); +} + +double energy(double mass){ + return pow(10.0, 8.0) * pow(3.0, 2.0) * mass; +} + diff --git a/t/recipes/checks/debian/shlibs/shared-libs-ldconfig-wrong-file/eval/desc b/t/recipes/checks/debian/shlibs/shared-libs-ldconfig-wrong-file/eval/desc new file mode 100644 index 0000000..7cba095 --- /dev/null +++ b/t/recipes/checks/debian/shlibs/shared-libs-ldconfig-wrong-file/eval/desc @@ -0,0 +1,2 @@ +Testname: shared-libs-ldconfig-wrong-file +Check: debian/shlibs diff --git a/t/recipes/checks/debian/shlibs/shared-libs-ldconfig-wrong-file/eval/hints b/t/recipes/checks/debian/shlibs/shared-libs-ldconfig-wrong-file/eval/hints new file mode 100644 index 0000000..a7f8c30 --- /dev/null +++ b/t/recipes/checks/debian/shlibs/shared-libs-ldconfig-wrong-file/eval/hints @@ -0,0 +1 @@ +libfoo1 (binary): symbols-file-missing-build-depends-package-field libfoo.so.1 [symbols] diff --git a/t/recipes/checks/debian/shlibs/shared-libs-missing-ldconfig-symlink/build-spec/debian/compat.in b/t/recipes/checks/debian/shlibs/shared-libs-missing-ldconfig-symlink/build-spec/debian/compat.in new file mode 100644 index 0000000..640a566 --- /dev/null +++ b/t/recipes/checks/debian/shlibs/shared-libs-missing-ldconfig-symlink/build-spec/debian/compat.in @@ -0,0 +1 @@ +[% $dh_compat_level %] diff --git a/t/recipes/checks/debian/shlibs/shared-libs-missing-ldconfig-symlink/build-spec/debian/control.in b/t/recipes/checks/debian/shlibs/shared-libs-missing-ldconfig-symlink/build-spec/debian/control.in new file mode 100644 index 0000000..86a2064 --- /dev/null +++ b/t/recipes/checks/debian/shlibs/shared-libs-missing-ldconfig-symlink/build-spec/debian/control.in @@ -0,0 +1,15 @@ +Source: [% $source %] +Priority: optional +Section: libs +Maintainer: [% $author %] +Standards-Version: [% $standards_version %] +Build-Depends: [% $build_depends %] +Rules-Requires-Root: no + +Package: libexecbit1 +Architecture: [% $package_architecture %] +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: [% $description %] + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. diff --git a/t/recipes/checks/debian/shlibs/shared-libs-missing-ldconfig-symlink/build-spec/debian/libexecbit1.symbols b/t/recipes/checks/debian/shlibs/shared-libs-missing-ldconfig-symlink/build-spec/debian/libexecbit1.symbols new file mode 100644 index 0000000..0b26833 --- /dev/null +++ b/t/recipes/checks/debian/shlibs/shared-libs-missing-ldconfig-symlink/build-spec/debian/libexecbit1.symbols @@ -0,0 +1,2 @@ +libexecbit.so.1 libexecbit1 #MINVER# + e@Base 1.0 diff --git a/t/recipes/checks/debian/shlibs/shared-libs-missing-ldconfig-symlink/build-spec/fill-values b/t/recipes/checks/debian/shlibs/shared-libs-missing-ldconfig-symlink/build-spec/fill-values new file mode 100644 index 0000000..50aa473 --- /dev/null +++ b/t/recipes/checks/debian/shlibs/shared-libs-missing-ldconfig-symlink/build-spec/fill-values @@ -0,0 +1,6 @@ +Skeleton: upload-native +Testname: shared-libs-missing-ldconfig-symlink +Package-Architecture: any +Default-Build-Depends: debhelper (>= 9.20151004~) +Dh-Compat-Level: 9 +Description: Test for missing ldconfig symlink for shared libs diff --git a/t/recipes/checks/debian/shlibs/shared-libs-missing-ldconfig-symlink/build-spec/orig/Makefile b/t/recipes/checks/debian/shlibs/shared-libs-missing-ldconfig-symlink/build-spec/orig/Makefile new file mode 100644 index 0000000..6de6868 --- /dev/null +++ b/t/recipes/checks/debian/shlibs/shared-libs-missing-ldconfig-symlink/build-spec/orig/Makefile @@ -0,0 +1,19 @@ +CC=gcc +CFLAGS+= -fPIC + +SONAMES:= libexecbit.so.1 +LIBFILES:= $(patsubst %,%.0.1, $(SONAMES)) + +all: $(LIBFILES) + +$(LIBFILES): code.o + $(CC) $(LDFLAGS) -o $@ -shared -Wl,-soname,$(patsubst %.0.1,%,$@) $^ -lc + +clean: + rm -f *.a *.o *.so* + +install: all + install -m 0755 -d $(DESTDIR)/usr/lib + install -m 0755 *.so* $(DESTDIR)/usr/lib + +.PHONY: install clean diff --git a/t/recipes/checks/debian/shlibs/shared-libs-missing-ldconfig-symlink/build-spec/orig/code.c b/t/recipes/checks/debian/shlibs/shared-libs-missing-ldconfig-symlink/build-spec/orig/code.c new file mode 100644 index 0000000..65887f3 --- /dev/null +++ b/t/recipes/checks/debian/shlibs/shared-libs-missing-ldconfig-symlink/build-spec/orig/code.c @@ -0,0 +1,10 @@ +#include +#include + +double e(void (*f)(char *)){ + char tmp[10]; + double x; + f(tmp); + x = atof(tmp); + return exp(x); +} diff --git a/t/recipes/checks/debian/shlibs/shared-libs-missing-ldconfig-symlink/eval/desc b/t/recipes/checks/debian/shlibs/shared-libs-missing-ldconfig-symlink/eval/desc new file mode 100644 index 0000000..04a4305 --- /dev/null +++ b/t/recipes/checks/debian/shlibs/shared-libs-missing-ldconfig-symlink/eval/desc @@ -0,0 +1,3 @@ +Testname: shared-libs-missing-ldconfig-symlink +Check: debian/shlibs + diff --git a/t/recipes/checks/debian/shlibs/shared-libs-missing-ldconfig-symlink/eval/hints b/t/recipes/checks/debian/shlibs/shared-libs-missing-ldconfig-symlink/eval/hints new file mode 100644 index 0000000..6105735 --- /dev/null +++ b/t/recipes/checks/debian/shlibs/shared-libs-missing-ldconfig-symlink/eval/hints @@ -0,0 +1 @@ +libexecbit1 (binary): symbols-file-missing-build-depends-package-field libexecbit.so.1 [symbols] diff --git a/t/recipes/checks/debian/shlibs/shared-libs-multi-arch-foreign/build-spec/debian/compat.in b/t/recipes/checks/debian/shlibs/shared-libs-multi-arch-foreign/build-spec/debian/compat.in new file mode 100644 index 0000000..640a566 --- /dev/null +++ b/t/recipes/checks/debian/shlibs/shared-libs-multi-arch-foreign/build-spec/debian/compat.in @@ -0,0 +1 @@ +[% $dh_compat_level %] diff --git a/t/recipes/checks/debian/shlibs/shared-libs-multi-arch-foreign/build-spec/debian/control.in b/t/recipes/checks/debian/shlibs/shared-libs-multi-arch-foreign/build-spec/debian/control.in new file mode 100644 index 0000000..29d4c58 --- /dev/null +++ b/t/recipes/checks/debian/shlibs/shared-libs-multi-arch-foreign/build-spec/debian/control.in @@ -0,0 +1,16 @@ +Source: [% $source %] +Priority: optional +Section: libs +Maintainer: [% $author %] +Standards-Version: [% $standards_version %] +Build-Depends: [% $build_depends %] +Rules-Requires-Root: no + +Package: libhallo1 +Architecture: [% $package_architecture %] +Depends: ${shlibs:Depends}, ${misc:Depends} +Multi-Arch: foreign +Description: [% $description %] + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. diff --git a/t/recipes/checks/debian/shlibs/shared-libs-multi-arch-foreign/build-spec/debian/libhallo1.symbols b/t/recipes/checks/debian/shlibs/shared-libs-multi-arch-foreign/build-spec/debian/libhallo1.symbols new file mode 100644 index 0000000..4c27e3f --- /dev/null +++ b/t/recipes/checks/debian/shlibs/shared-libs-multi-arch-foreign/build-spec/debian/libhallo1.symbols @@ -0,0 +1,2 @@ +libhallo.so.1 libhallo1 #MINVER# + e@Base 1.0 diff --git a/t/recipes/checks/debian/shlibs/shared-libs-multi-arch-foreign/build-spec/fill-values b/t/recipes/checks/debian/shlibs/shared-libs-multi-arch-foreign/build-spec/fill-values new file mode 100644 index 0000000..de5d6cc --- /dev/null +++ b/t/recipes/checks/debian/shlibs/shared-libs-multi-arch-foreign/build-spec/fill-values @@ -0,0 +1,6 @@ +Skeleton: upload-native +Testname: shared-libs-multi-arch-foreign +Package-Architecture: any +Default-Build-Depends: debhelper (>= 9.20151004~) +Dh-Compat-Level: 9 +Description: Test for shared libs in m-a foreign pkgs diff --git a/t/recipes/checks/debian/shlibs/shared-libs-multi-arch-foreign/build-spec/orig/Makefile b/t/recipes/checks/debian/shlibs/shared-libs-multi-arch-foreign/build-spec/orig/Makefile new file mode 100644 index 0000000..ac55af7 --- /dev/null +++ b/t/recipes/checks/debian/shlibs/shared-libs-multi-arch-foreign/build-spec/orig/Makefile @@ -0,0 +1,22 @@ +CC=gcc +CFLAGS+= -fPIC + +SONAMES:= libhallo.so.1 +LIBFILES:= $(patsubst %,%.0.1, $(SONAMES)) + +all: $(LIBFILES) + +$(LIBFILES): code.o + $(CC) $(LDFLAGS) -fPIC -o $@ -shared -Wl,-soname,$(patsubst %.0.1,%,$@) $^ -lc + +clean: + rm -f *.a *.o *.so* + +install: all + install -m 0755 -d $(DESTDIR)/usr/lib + install -m 0755 *.so* $(DESTDIR)/usr/lib + for FILE in $(SONAMES) ; do \ + ln -s $${FILE}.0.1 $(DESTDIR)/usr/lib/$$FILE ; \ + done + +.PHONY: install clean diff --git a/t/recipes/checks/debian/shlibs/shared-libs-multi-arch-foreign/build-spec/orig/code.c b/t/recipes/checks/debian/shlibs/shared-libs-multi-arch-foreign/build-spec/orig/code.c new file mode 100644 index 0000000..65887f3 --- /dev/null +++ b/t/recipes/checks/debian/shlibs/shared-libs-multi-arch-foreign/build-spec/orig/code.c @@ -0,0 +1,10 @@ +#include +#include + +double e(void (*f)(char *)){ + char tmp[10]; + double x; + f(tmp); + x = atof(tmp); + return exp(x); +} diff --git a/t/recipes/checks/debian/shlibs/shared-libs-multi-arch-foreign/eval/desc b/t/recipes/checks/debian/shlibs/shared-libs-multi-arch-foreign/eval/desc new file mode 100644 index 0000000..6dee0b4 --- /dev/null +++ b/t/recipes/checks/debian/shlibs/shared-libs-multi-arch-foreign/eval/desc @@ -0,0 +1,2 @@ +Testname: shared-libs-multi-arch-foreign +Check: debian/shlibs diff --git a/t/recipes/checks/debian/shlibs/shared-libs-multi-arch-foreign/eval/hints b/t/recipes/checks/debian/shlibs/shared-libs-multi-arch-foreign/eval/hints new file mode 100644 index 0000000..8a5512d --- /dev/null +++ b/t/recipes/checks/debian/shlibs/shared-libs-multi-arch-foreign/eval/hints @@ -0,0 +1 @@ +libhallo1 (binary): symbols-file-missing-build-depends-package-field libhallo.so.1 [symbols] diff --git a/t/recipes/checks/debian/shlibs/shared-libs-no-gnu-stack/build-spec/debian/compat.in b/t/recipes/checks/debian/shlibs/shared-libs-no-gnu-stack/build-spec/debian/compat.in new file mode 100644 index 0000000..640a566 --- /dev/null +++ b/t/recipes/checks/debian/shlibs/shared-libs-no-gnu-stack/build-spec/debian/compat.in @@ -0,0 +1 @@ +[% $dh_compat_level %] diff --git a/t/recipes/checks/debian/shlibs/shared-libs-no-gnu-stack/build-spec/debian/control.in b/t/recipes/checks/debian/shlibs/shared-libs-no-gnu-stack/build-spec/debian/control.in new file mode 100644 index 0000000..c749732 --- /dev/null +++ b/t/recipes/checks/debian/shlibs/shared-libs-no-gnu-stack/build-spec/debian/control.in @@ -0,0 +1,15 @@ +Source: [% $source %] +Priority: optional +Section: libs +Maintainer: [% $author %] +Standards-Version: [% $standards_version %] +Build-Depends: [% $build_depends %] +Rules-Requires-Root: no + +Package: libhallo1 +Architecture: [% $package_architecture %] +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: [% $description %] + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. diff --git a/t/recipes/checks/debian/shlibs/shared-libs-no-gnu-stack/build-spec/debian/libhallo1.symbols b/t/recipes/checks/debian/shlibs/shared-libs-no-gnu-stack/build-spec/debian/libhallo1.symbols new file mode 100644 index 0000000..4c27e3f --- /dev/null +++ b/t/recipes/checks/debian/shlibs/shared-libs-no-gnu-stack/build-spec/debian/libhallo1.symbols @@ -0,0 +1,2 @@ +libhallo.so.1 libhallo1 #MINVER# + e@Base 1.0 diff --git a/t/recipes/checks/debian/shlibs/shared-libs-no-gnu-stack/build-spec/fill-values b/t/recipes/checks/debian/shlibs/shared-libs-no-gnu-stack/build-spec/fill-values new file mode 100644 index 0000000..c238ab1 --- /dev/null +++ b/t/recipes/checks/debian/shlibs/shared-libs-no-gnu-stack/build-spec/fill-values @@ -0,0 +1,6 @@ +Skeleton: upload-native +Testname: shared-libs-no-gnu-stack +Package-Architecture: any +Default-Build-Depends: debhelper (>= 9.20151004~) +Dh-Compat-Level: 9 +Description: Test for shared libs without PT_GNU_STACK diff --git a/t/recipes/checks/debian/shlibs/shared-libs-no-gnu-stack/build-spec/orig/Makefile b/t/recipes/checks/debian/shlibs/shared-libs-no-gnu-stack/build-spec/orig/Makefile new file mode 100644 index 0000000..8d357a8 --- /dev/null +++ b/t/recipes/checks/debian/shlibs/shared-libs-no-gnu-stack/build-spec/orig/Makefile @@ -0,0 +1,23 @@ +CC=gcc +CFLAGS+= -fPIC + +SONAMES:= libhallo.so.1 +LIBFILES:= $(patsubst %,%.0.1, $(SONAMES)) + +all: $(LIBFILES) + +$(LIBFILES): code.o + $(CC) $(LDFLAGS) -fPIC -o $@ -shared -Wl,-soname,$(patsubst %.0.1,%,$@) $^ -lc + ./erase-pt-gnu-stack $@ + +clean: + rm -f *.a *.o *.so* + +install: all + install -m 0755 -d $(DESTDIR)/usr/lib + install -m 0755 *.so* $(DESTDIR)/usr/lib + for FILE in $(SONAMES) ; do \ + ln -s $${FILE}.0.1 $(DESTDIR)/usr/lib/$$FILE ; \ + done + +.PHONY: install clean diff --git a/t/recipes/checks/debian/shlibs/shared-libs-no-gnu-stack/build-spec/orig/code.c b/t/recipes/checks/debian/shlibs/shared-libs-no-gnu-stack/build-spec/orig/code.c new file mode 100644 index 0000000..65887f3 --- /dev/null +++ b/t/recipes/checks/debian/shlibs/shared-libs-no-gnu-stack/build-spec/orig/code.c @@ -0,0 +1,10 @@ +#include +#include + +double e(void (*f)(char *)){ + char tmp[10]; + double x; + f(tmp); + x = atof(tmp); + return exp(x); +} diff --git a/t/recipes/checks/debian/shlibs/shared-libs-no-gnu-stack/build-spec/orig/erase-pt-gnu-stack b/t/recipes/checks/debian/shlibs/shared-libs-no-gnu-stack/build-spec/orig/erase-pt-gnu-stack new file mode 100755 index 0000000..d3b7e59 --- /dev/null +++ b/t/recipes/checks/debian/shlibs/shared-libs-no-gnu-stack/build-spec/orig/erase-pt-gnu-stack @@ -0,0 +1,9 @@ +#!/usr/bin/perl -pi + +use strict; +use warnings; + +my $PT_GNU_STACK = 0x6474e551; +my $be = pack('L>', $PT_GNU_STACK); +my $le = pack('L<', $PT_GNU_STACK); +s/\Q$be\E|\Q$le\E/\0\0\0\0/g; diff --git a/t/recipes/checks/debian/shlibs/shared-libs-no-gnu-stack/eval/desc b/t/recipes/checks/debian/shlibs/shared-libs-no-gnu-stack/eval/desc new file mode 100644 index 0000000..cab1f1c --- /dev/null +++ b/t/recipes/checks/debian/shlibs/shared-libs-no-gnu-stack/eval/desc @@ -0,0 +1,2 @@ +Testname: shared-libs-no-gnu-stack +Check: debian/shlibs diff --git a/t/recipes/checks/debian/shlibs/shared-libs-no-gnu-stack/eval/hints b/t/recipes/checks/debian/shlibs/shared-libs-no-gnu-stack/eval/hints new file mode 100644 index 0000000..8a5512d --- /dev/null +++ b/t/recipes/checks/debian/shlibs/shared-libs-no-gnu-stack/eval/hints @@ -0,0 +1 @@ +libhallo1 (binary): symbols-file-missing-build-depends-package-field libhallo.so.1 [symbols] diff --git a/t/recipes/checks/debian/shlibs/shared-libs-no-shared-lib/build-spec/debian/control.in b/t/recipes/checks/debian/shlibs/shared-libs-no-shared-lib/build-spec/debian/control.in new file mode 100644 index 0000000..c20a449 --- /dev/null +++ b/t/recipes/checks/debian/shlibs/shared-libs-no-shared-lib/build-spec/debian/control.in @@ -0,0 +1,15 @@ +Source: [% $source %] +Priority: optional +Section: libs +Maintainer: [% $author %] +Standards-Version: [% $standards_version %] +Build-Depends: [% $build_depends %] +Rules-Requires-Root: no + +Package: libfoo1 +Architecture: [% $package_architecture %] +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: [% $description %] + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. diff --git a/t/recipes/checks/debian/shlibs/shared-libs-no-shared-lib/build-spec/debian/libfoo1.install b/t/recipes/checks/debian/shlibs/shared-libs-no-shared-lib/build-spec/debian/libfoo1.install new file mode 100644 index 0000000..1d2eaab --- /dev/null +++ b/t/recipes/checks/debian/shlibs/shared-libs-no-shared-lib/build-spec/debian/libfoo1.install @@ -0,0 +1 @@ +some-lib usr/lib diff --git a/t/recipes/checks/debian/shlibs/shared-libs-no-shared-lib/build-spec/debian/libfoo1.shlibs b/t/recipes/checks/debian/shlibs/shared-libs-no-shared-lib/build-spec/debian/libfoo1.shlibs new file mode 100644 index 0000000..f233a64 --- /dev/null +++ b/t/recipes/checks/debian/shlibs/shared-libs-no-shared-lib/build-spec/debian/libfoo1.shlibs @@ -0,0 +1 @@ +libfoo 1 libfoo1 (>= 1.0) diff --git a/t/recipes/checks/debian/shlibs/shared-libs-no-shared-lib/build-spec/debian/libfoo1.symbols b/t/recipes/checks/debian/shlibs/shared-libs-no-shared-lib/build-spec/debian/libfoo1.symbols new file mode 100644 index 0000000..a1f052b --- /dev/null +++ b/t/recipes/checks/debian/shlibs/shared-libs-no-shared-lib/build-spec/debian/libfoo1.symbols @@ -0,0 +1,3 @@ +libfoo.so.1 libfoo1 #MINVER# + e@Base 1.0 + energy@Base 0.9 diff --git a/t/recipes/checks/debian/shlibs/shared-libs-no-shared-lib/build-spec/fill-values b/t/recipes/checks/debian/shlibs/shared-libs-no-shared-lib/build-spec/fill-values new file mode 100644 index 0000000..730c2cd --- /dev/null +++ b/t/recipes/checks/debian/shlibs/shared-libs-no-shared-lib/build-spec/fill-values @@ -0,0 +1,4 @@ +Skeleton: upload-native +Testname: shared-libs-no-shared-lib +Package-Architecture: any +Description: Test checks shlib without SO diff --git a/t/recipes/checks/debian/shlibs/shared-libs-no-shared-lib/build-spec/orig/some-lib b/t/recipes/checks/debian/shlibs/shared-libs-no-shared-lib/build-spec/orig/some-lib new file mode 100644 index 0000000..5707e12 --- /dev/null +++ b/t/recipes/checks/debian/shlibs/shared-libs-no-shared-lib/build-spec/orig/some-lib @@ -0,0 +1 @@ +Aloah world diff --git a/t/recipes/checks/debian/shlibs/shared-libs-no-shared-lib/eval/desc b/t/recipes/checks/debian/shlibs/shared-libs-no-shared-lib/eval/desc new file mode 100644 index 0000000..1b13462 --- /dev/null +++ b/t/recipes/checks/debian/shlibs/shared-libs-no-shared-lib/eval/desc @@ -0,0 +1,2 @@ +Testname: shared-libs-no-shared-lib +Check: debian/shlibs diff --git a/t/recipes/checks/debian/shlibs/shared-libs-no-shared-lib/eval/hints b/t/recipes/checks/debian/shlibs/shared-libs-no-shared-lib/eval/hints new file mode 100644 index 0000000..38aca0a --- /dev/null +++ b/t/recipes/checks/debian/shlibs/shared-libs-no-shared-lib/eval/hints @@ -0,0 +1 @@ +libfoo1 (binary): empty-shlibs [shlibs] diff --git a/t/recipes/checks/debian/shlibs/shared-libs-non-dev-symlink/build-spec/debian/compat.in b/t/recipes/checks/debian/shlibs/shared-libs-non-dev-symlink/build-spec/debian/compat.in new file mode 100644 index 0000000..640a566 --- /dev/null +++ b/t/recipes/checks/debian/shlibs/shared-libs-non-dev-symlink/build-spec/debian/compat.in @@ -0,0 +1 @@ +[% $dh_compat_level %] diff --git a/t/recipes/checks/debian/shlibs/shared-libs-non-dev-symlink/build-spec/debian/control.in b/t/recipes/checks/debian/shlibs/shared-libs-non-dev-symlink/build-spec/debian/control.in new file mode 100644 index 0000000..c20a449 --- /dev/null +++ b/t/recipes/checks/debian/shlibs/shared-libs-non-dev-symlink/build-spec/debian/control.in @@ -0,0 +1,15 @@ +Source: [% $source %] +Priority: optional +Section: libs +Maintainer: [% $author %] +Standards-Version: [% $standards_version %] +Build-Depends: [% $build_depends %] +Rules-Requires-Root: no + +Package: libfoo1 +Architecture: [% $package_architecture %] +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: [% $description %] + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. diff --git a/t/recipes/checks/debian/shlibs/shared-libs-non-dev-symlink/build-spec/debian/libfoo1.symbols b/t/recipes/checks/debian/shlibs/shared-libs-non-dev-symlink/build-spec/debian/libfoo1.symbols new file mode 100644 index 0000000..a1f052b --- /dev/null +++ b/t/recipes/checks/debian/shlibs/shared-libs-non-dev-symlink/build-spec/debian/libfoo1.symbols @@ -0,0 +1,3 @@ +libfoo.so.1 libfoo1 #MINVER# + e@Base 1.0 + energy@Base 0.9 diff --git a/t/recipes/checks/debian/shlibs/shared-libs-non-dev-symlink/build-spec/fill-values b/t/recipes/checks/debian/shlibs/shared-libs-non-dev-symlink/build-spec/fill-values new file mode 100644 index 0000000..cec22d9 --- /dev/null +++ b/t/recipes/checks/debian/shlibs/shared-libs-non-dev-symlink/build-spec/fill-values @@ -0,0 +1,6 @@ +Testname: shared-libs-non-dev-symlink +Package-Architecture: any +Skeleton: upload-non-native +Default-Build-Depends: debhelper (>= 9.20151004~) +Dh-Compat-Level: 9 +Description: Test checks related to dev symlink diff --git a/t/recipes/checks/debian/shlibs/shared-libs-non-dev-symlink/build-spec/orig/Makefile b/t/recipes/checks/debian/shlibs/shared-libs-non-dev-symlink/build-spec/orig/Makefile new file mode 100644 index 0000000..b62fa17 --- /dev/null +++ b/t/recipes/checks/debian/shlibs/shared-libs-non-dev-symlink/build-spec/orig/Makefile @@ -0,0 +1,21 @@ +CC=gcc +CFLAGS+= -fPIC + +SONAMES:= libfoo.so.1 +LIBFILES:= $(patsubst %,%.0.1, $(SONAMES)) + +all: $(LIBFILES) + +$(LIBFILES): code.o + $(CC) $(LDFLAGS) -o $@ -shared -Wl,-soname,$(patsubst %.0.1,%,$@) $^ -lc + +clean: + rm -f *.a *.o *.so* + +install: all + install -m 0755 -d $(DESTDIR)/usr/lib + install -m 0644 *.so* $(DESTDIR)/usr/lib + ln -s libfoo.so.1.0.1 $(DESTDIR)/usr/lib/libfoo.so.1 + ln -s libfoo.so.1.0.1 $(DESTDIR)/usr/lib/libfoo.so + +.PHONY: install clean diff --git a/t/recipes/checks/debian/shlibs/shared-libs-non-dev-symlink/build-spec/orig/code.c b/t/recipes/checks/debian/shlibs/shared-libs-non-dev-symlink/build-spec/orig/code.c new file mode 100644 index 0000000..0ed08e0 --- /dev/null +++ b/t/recipes/checks/debian/shlibs/shared-libs-non-dev-symlink/build-spec/orig/code.c @@ -0,0 +1,15 @@ +#include +#include + +double e(void (*f)(char *)){ + char tmp[10]; + double x; + f(tmp); + x = atof(tmp); + return exp(x); +} + +double energy(double mass){ + return pow(10.0, 8.0) * pow(3.0, 2.0) * mass; +} + diff --git a/t/recipes/checks/debian/shlibs/shared-libs-non-dev-symlink/eval/desc b/t/recipes/checks/debian/shlibs/shared-libs-non-dev-symlink/eval/desc new file mode 100644 index 0000000..905bf7f --- /dev/null +++ b/t/recipes/checks/debian/shlibs/shared-libs-non-dev-symlink/eval/desc @@ -0,0 +1,2 @@ +Testname: shared-libs-non-dev-symlink +Check: debian/shlibs diff --git a/t/recipes/checks/debian/shlibs/shared-libs-non-dev-symlink/eval/hints b/t/recipes/checks/debian/shlibs/shared-libs-non-dev-symlink/eval/hints new file mode 100644 index 0000000..a7f8c30 --- /dev/null +++ b/t/recipes/checks/debian/shlibs/shared-libs-non-dev-symlink/eval/hints @@ -0,0 +1 @@ +libfoo1 (binary): symbols-file-missing-build-depends-package-field libfoo.so.1 [symbols] diff --git a/t/recipes/checks/debian/shlibs/shared-libs-non-pic-i386/build-spec/Makefile.in b/t/recipes/checks/debian/shlibs/shared-libs-non-pic-i386/build-spec/Makefile.in new file mode 100644 index 0000000..372897d --- /dev/null +++ b/t/recipes/checks/debian/shlibs/shared-libs-non-pic-i386/build-spec/Makefile.in @@ -0,0 +1,110 @@ +# this makefile was adapted from the standard template to do just one thing: +# to ensure that no building takes place on architectures other than i386. +# +# dpkg-buildpackage croaks not only on build errors but also if there simply +# is nothing to do. source packages are nowadays permitted to create +# undeclared build artifacts. there is no way to tell when a build should +# or should not proceed (although the buildds use a heuristic based on the +# dsc). +# +# this makefile also touches the build product to make sure it exists. for +# historical reasons, the test runner check that (although perhaps it should +# not). +# +# more information may be available at Bug#949066. + +ROOT_DIR:=$(shell dirname $(realpath $(lastword $(MAKEFILE_LIST)))) + +package = [% $source %] +upstream_version = [% $upstream_version %] +type = [% $type %] + +packagedir = $(package)-$(upstream_version) + +origdata = $(ROOT_DIR)/orig +origtargz = $(package)_$(upstream_version).orig.tar.gz + +debiandata = $(ROOT_DIR)/debian +formatfile = $(debiandata)/source/format + +diffdata = $(ROOT_DIR)/diff + +private_key = $(ROOT_DIR)/upstream/private-key.asc + +pre_build = $(ROOT_DIR)/pre-build +post_build = $(ROOT_DIR)/post-build +pre_upstream = $(ROOT_DIR)/pre-upstream + +product = [% $build_product %] +upload_type = [% $upload_type %] + +ifeq ($(upload_type),source) +extraflags = -S +else +extraflags = +endif + +.DEFAULT_GOAL := $(product) + +ifeq ($(shell dpkg-architecture -qDEB_HOST_ARCH),i386) +$(product): $(origtargz) + if [ -r $(origtargz) -a -r $(private_key) ] ; then \ + tmpdir=$(shell mktemp -d) ; \ + gpg --homedir "$$tmpdir" --import $(private_key) ; \ + gpg --homedir "$$tmpdir" --batch --yes --armor --output $(origtargz).asc \ + --detach-sign $(origtargz) ; \ + gpg-connect-agent --homedir "$$tmpdir" KILLAGENT /bye ; \ + rm -rf "$$tmpdir" ; \ + fi + if [ -d $(diffdata)/. ] ; then \ + cp -rp $(diffdata)/. $(packagedir) ; \ + fi + if [ -d $(debiandata)/. ] ; then \ + cp -rp $(debiandata)/. $(packagedir)/debian ; \ + fi + + if [ -x $(pre_build) ] ; then \ + $(pre_build) $(shell realpath $(packagedir)) ; \ + fi + + cd $(packagedir) && dpkg-buildpackage -rfakeroot $(extraflags) -us -uc -d \ + -iNEVER_MATCH_ANYTHING -INEVER_MATCH_ANYTHING --source-option=--auto-commit + + if [ -x $(post_build) ] ; then \ + $(post_build) $(shell realpath $(packagedir)) ; \ + fi +else +$(product): + touch $(product) +endif + +ifeq ($(type),native) +$(origtargz): + -mkdir $(packagedir) + if [ -d $(origdata)/. ] ; then \ + cp -rp $(origdata)/. $(packagedir) ; \ + fi +else +$(origtargz): + -mkdir $(packagedir) + if [ -d $(origdata)/. ] ; then \ + cp -rp $(origdata)/. $(packagedir) ; \ + fi + + if [ -x $(pre_upstream) ] ; then \ + $(pre_upstream) $(shell realpath $(packagedir)) ; \ + fi + + tar czf $(origtargz) $(packagedir) + + if [ -f $(formatfile) ] && grep --quiet "^3\.. (quilt)$$" $(formatfile) ; then \ + rm -rf $(packagedir)/debian ; \ + fi +endif + +.PHONY: clean +clean: + rm -rf $(packagedir) + if [ "$(type)" = "native" ] ; then \ + rm -f $(origtargz) ; \ + fi diff --git a/t/recipes/checks/debian/shlibs/shared-libs-non-pic-i386/build-spec/debian/compat.in b/t/recipes/checks/debian/shlibs/shared-libs-non-pic-i386/build-spec/debian/compat.in new file mode 100644 index 0000000..640a566 --- /dev/null +++ b/t/recipes/checks/debian/shlibs/shared-libs-non-pic-i386/build-spec/debian/compat.in @@ -0,0 +1 @@ +[% $dh_compat_level %] diff --git a/t/recipes/checks/debian/shlibs/shared-libs-non-pic-i386/build-spec/debian/control.in b/t/recipes/checks/debian/shlibs/shared-libs-non-pic-i386/build-spec/debian/control.in new file mode 100644 index 0000000..47c51c7 --- /dev/null +++ b/t/recipes/checks/debian/shlibs/shared-libs-non-pic-i386/build-spec/debian/control.in @@ -0,0 +1,16 @@ +Source: [% $source %] +Priority: optional +Section: libs +Maintainer: [% $author %] +Standards-Version: [% $standards_version %] +Build-Depends: [% $build_depends %] +Rules-Requires-Root: no + +Package: libbaz3-1 +Architecture: [% $package_architecture %] +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: [% $description %] + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. + diff --git a/t/recipes/checks/debian/shlibs/shared-libs-non-pic-i386/build-spec/debian/symbols b/t/recipes/checks/debian/shlibs/shared-libs-non-pic-i386/build-spec/debian/symbols new file mode 100644 index 0000000..63ba04d --- /dev/null +++ b/t/recipes/checks/debian/shlibs/shared-libs-non-pic-i386/build-spec/debian/symbols @@ -0,0 +1,3 @@ +libbaz3.so libbaz3-1 #MINVER# + pw@Base 1.0 + stackprotfix@Base 1.0 diff --git a/t/recipes/checks/debian/shlibs/shared-libs-non-pic-i386/build-spec/fill-values b/t/recipes/checks/debian/shlibs/shared-libs-non-pic-i386/build-spec/fill-values new file mode 100644 index 0000000..cb0b316 --- /dev/null +++ b/t/recipes/checks/debian/shlibs/shared-libs-non-pic-i386/build-spec/fill-values @@ -0,0 +1,6 @@ +Skeleton: upload-native +Testname: shared-libs-non-pic-i386 +Package-Architecture: i386 +Default-Build-Depends: debhelper (>= 9.20151004~) +Dh-Compat-Level: 9 +Description: Test checks related to non-pic code diff --git a/t/recipes/checks/debian/shlibs/shared-libs-non-pic-i386/build-spec/orig/Makefile b/t/recipes/checks/debian/shlibs/shared-libs-non-pic-i386/build-spec/orig/Makefile new file mode 100644 index 0000000..c5ec48c --- /dev/null +++ b/t/recipes/checks/debian/shlibs/shared-libs-non-pic-i386/build-spec/orig/Makefile @@ -0,0 +1,26 @@ +CC=gcc + +NOPICOBJS=non-pic.o +SONAME:=libbaz3.so.1 + +NOPIC_CFLAGS = $(CFLAGS) -fno-PIE +NOPIC_LDFLAGS = $(LDFLAGS) -fno-PIE -fno-pie + +all: libbaz3.so.1.0.3b + +# Non-PIC. We can't test this on all architectures +libbaz3.so.1.0.3b: $(NOPICOBJS) + $(CC) $(NOPIC_LDFLAGS) -o $@ -shared -Wl,-soname,$(SONAME) $^ -lc + +%.o: %.c + $(CC) $(NOPIC_CFLAGS) $(CPPFLAGS) -o $@ -c $< + +clean: + rm -f *.a *.o *.so* *.sho + +install: all + install -m 0755 -d $(DESTDIR)/usr/lib + install -m 0644 *.so* $(DESTDIR)/usr/lib + ln -s libbaz3.so.1.0.3b $(DESTDIR)/usr/lib/$(SONAME) + +.PHONY: install clean diff --git a/t/recipes/checks/debian/shlibs/shared-libs-non-pic-i386/build-spec/orig/non-pic.c b/t/recipes/checks/debian/shlibs/shared-libs-non-pic-i386/build-spec/orig/non-pic.c new file mode 100644 index 0000000..f0fa719 --- /dev/null +++ b/t/recipes/checks/debian/shlibs/shared-libs-non-pic-i386/build-spec/orig/non-pic.c @@ -0,0 +1,11 @@ +#include +#include + +double pw(double p){ + return exp(p); +} + +void stackprotfix(void (*f)(char *, size_t)) { + char buffer[10]; + f(buffer, sizeof(buffer)); +} diff --git a/t/recipes/checks/debian/shlibs/shared-libs-non-pic-i386/eval/desc b/t/recipes/checks/debian/shlibs/shared-libs-non-pic-i386/eval/desc new file mode 100644 index 0000000..7d0d190 --- /dev/null +++ b/t/recipes/checks/debian/shlibs/shared-libs-non-pic-i386/eval/desc @@ -0,0 +1,3 @@ +Testname: shared-libs-non-pic-i386 +Test-Architectures: i386 +Check: debian/shlibs diff --git a/t/recipes/checks/debian/shlibs/shared-libs-non-pic-i386/eval/hints b/t/recipes/checks/debian/shlibs/shared-libs-non-pic-i386/eval/hints new file mode 100644 index 0000000..c371cac --- /dev/null +++ b/t/recipes/checks/debian/shlibs/shared-libs-non-pic-i386/eval/hints @@ -0,0 +1 @@ +libbaz3-1 (binary): symbols-file-missing-build-depends-package-field libbaz3.so.1 diff --git a/t/recipes/checks/debian/shlibs/shared-libs-non-pic-i386/eval/post-test b/t/recipes/checks/debian/shlibs/shared-libs-non-pic-i386/eval/post-test new file mode 100755 index 0000000..11ad2c8 --- /dev/null +++ b/t/recipes/checks/debian/shlibs/shared-libs-non-pic-i386/eval/post-test @@ -0,0 +1 @@ +/: hardening-.*/ d diff --git a/t/recipes/checks/debian/shlibs/shared-libs-symbols-file/build-spec/debian/compat.in b/t/recipes/checks/debian/shlibs/shared-libs-symbols-file/build-spec/debian/compat.in new file mode 100644 index 0000000..640a566 --- /dev/null +++ b/t/recipes/checks/debian/shlibs/shared-libs-symbols-file/build-spec/debian/compat.in @@ -0,0 +1 @@ +[% $dh_compat_level %] diff --git a/t/recipes/checks/debian/shlibs/shared-libs-symbols-file/build-spec/debian/control.in b/t/recipes/checks/debian/shlibs/shared-libs-symbols-file/build-spec/debian/control.in new file mode 100644 index 0000000..021518f --- /dev/null +++ b/t/recipes/checks/debian/shlibs/shared-libs-symbols-file/build-spec/debian/control.in @@ -0,0 +1,48 @@ +Source: [% $source %] +Priority: optional +Section: libs +Maintainer: [% $author %] +Standards-Version: [% $standards_version %] +Build-Depends: [% $build_depends %] +Rules-Requires-Root: no + +Package: libfoo1 +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: [% $description %] (deb revision) + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. + . + Checks for deb revisions in symbols files and other brokenness. + +Package: libsym1 +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: [% $description %] (missing) + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. + . + Checks for missing symbol file. + + +Package: libesym1 +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: [% $description %] (empty symbols) + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. + . + Checks for empty symbol file/missing shlib in symbols file. + +Package: nolibrary +Architecture: all +Depends: ${misc:Depends} +Description: [% $description %] (not a library) + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. + . + Check for shipping a symbols file without a library. diff --git a/t/recipes/checks/debian/shlibs/shared-libs-symbols-file/build-spec/debian/libesym1.install b/t/recipes/checks/debian/shlibs/shared-libs-symbols-file/build-spec/debian/libesym1.install new file mode 100644 index 0000000..750092c --- /dev/null +++ b/t/recipes/checks/debian/shlibs/shared-libs-symbols-file/build-spec/debian/libesym1.install @@ -0,0 +1 @@ +usr/lib/libesym* diff --git a/t/recipes/checks/debian/shlibs/shared-libs-symbols-file/build-spec/debian/libfoo1.install b/t/recipes/checks/debian/shlibs/shared-libs-symbols-file/build-spec/debian/libfoo1.install new file mode 100644 index 0000000..f3a3a05 --- /dev/null +++ b/t/recipes/checks/debian/shlibs/shared-libs-symbols-file/build-spec/debian/libfoo1.install @@ -0,0 +1 @@ +usr/lib/libfoo* diff --git a/t/recipes/checks/debian/shlibs/shared-libs-symbols-file/build-spec/debian/libfoo1.symbols b/t/recipes/checks/debian/shlibs/shared-libs-symbols-file/build-spec/debian/libfoo1.symbols new file mode 100644 index 0000000..7b91609 --- /dev/null +++ b/t/recipes/checks/debian/shlibs/shared-libs-symbols-file/build-spec/debian/libfoo1.symbols @@ -0,0 +1,10 @@ +libfoo.so.1 libfoo1 #MINVER# + e@Base 1.0-1 + energy@Base 0.9-1 + +# duplicate +# - e@Base has a bad index +# - energy@Base is a syntax error (missing version) +libfoo.so.1 libfoo1 #MINVER# + e@Base 1.0 1 + energy@Base diff --git a/t/recipes/checks/debian/shlibs/shared-libs-symbols-file/build-spec/debian/libsym1.install b/t/recipes/checks/debian/shlibs/shared-libs-symbols-file/build-spec/debian/libsym1.install new file mode 100644 index 0000000..7faef4f --- /dev/null +++ b/t/recipes/checks/debian/shlibs/shared-libs-symbols-file/build-spec/debian/libsym1.install @@ -0,0 +1 @@ +usr/lib/libsym* diff --git a/t/recipes/checks/debian/shlibs/shared-libs-symbols-file/build-spec/debian/nolibrary.install b/t/recipes/checks/debian/shlibs/shared-libs-symbols-file/build-spec/debian/nolibrary.install new file mode 100644 index 0000000..241d370 --- /dev/null +++ b/t/recipes/checks/debian/shlibs/shared-libs-symbols-file/build-spec/debian/nolibrary.install @@ -0,0 +1 @@ +someconf.conf etc/ diff --git a/t/recipes/checks/debian/shlibs/shared-libs-symbols-file/build-spec/debian/rules b/t/recipes/checks/debian/shlibs/shared-libs-symbols-file/build-spec/debian/rules new file mode 100644 index 0000000..9ef2bb2 --- /dev/null +++ b/t/recipes/checks/debian/shlibs/shared-libs-symbols-file/build-spec/debian/rules @@ -0,0 +1,17 @@ +#!/usr/bin/make -f + +export DEB_BUILD_MAINT_OPTIONS=hardening=+all + +%: + dh $@ + +override_dh_builddeb: + # Apparently some of the tools are too smart to install + # a redundant/empty symbols file in the package, so here + # is a non-empty useless symbols file! + echo "# Aloha!" > debian/libesym1/DEBIAN/symbols + echo "# Aloha!" > debian/nolibrary/DEBIAN/symbols + # ... they are also too smart to install slightly broken + # variants of symbols files + install -m 0644 debian/libfoo1.symbols debian/libfoo1/DEBIAN/symbols + dh_builddeb diff --git a/t/recipes/checks/debian/shlibs/shared-libs-symbols-file/build-spec/fill-values b/t/recipes/checks/debian/shlibs/shared-libs-symbols-file/build-spec/fill-values new file mode 100644 index 0000000..63a0f65 --- /dev/null +++ b/t/recipes/checks/debian/shlibs/shared-libs-symbols-file/build-spec/fill-values @@ -0,0 +1,5 @@ +Testname: shared-libs-symbols-file +Skeleton: upload-non-native +Default-Build-Depends: debhelper (>= 9.20151004~) +Dh-Compat-Level: 9 +Description: Test checks related to symbols files diff --git a/t/recipes/checks/debian/shlibs/shared-libs-symbols-file/build-spec/orig/Makefile b/t/recipes/checks/debian/shlibs/shared-libs-symbols-file/build-spec/orig/Makefile new file mode 100644 index 0000000..5ab4ec1 --- /dev/null +++ b/t/recipes/checks/debian/shlibs/shared-libs-symbols-file/build-spec/orig/Makefile @@ -0,0 +1,22 @@ +CC=gcc +CFLAGS+= -fPIC + +SONAMES:= libfoo.so.1 libsym.so.1 libesym.so.1 +LIBFILES:= $(patsubst %,%.0.1, $(SONAMES)) + +all: $(LIBFILES) + +$(LIBFILES): code.o + $(CC) $(LDFLAGS) -o $@ -shared -Wl,-soname,$(patsubst %.0.1,%,$@) $^ -lc + +clean: + rm -f *.a *.o *.so* + +install: all + install -m 0755 -d $(DESTDIR)/usr/lib + install -m 0644 *.so* $(DESTDIR)/usr/lib + for FILE in $(SONAMES) ; do \ + ln -s $${FILE}.0.1 $(DESTDIR)/usr/lib/$$FILE ; \ + done + +.PHONY: install clean diff --git a/t/recipes/checks/debian/shlibs/shared-libs-symbols-file/build-spec/orig/code.c b/t/recipes/checks/debian/shlibs/shared-libs-symbols-file/build-spec/orig/code.c new file mode 100644 index 0000000..0ed08e0 --- /dev/null +++ b/t/recipes/checks/debian/shlibs/shared-libs-symbols-file/build-spec/orig/code.c @@ -0,0 +1,15 @@ +#include +#include + +double e(void (*f)(char *)){ + char tmp[10]; + double x; + f(tmp); + x = atof(tmp); + return exp(x); +} + +double energy(double mass){ + return pow(10.0, 8.0) * pow(3.0, 2.0) * mass; +} + diff --git a/t/recipes/checks/debian/shlibs/shared-libs-symbols-file/build-spec/orig/someconf.conf b/t/recipes/checks/debian/shlibs/shared-libs-symbols-file/build-spec/orig/someconf.conf new file mode 100644 index 0000000..16940ea --- /dev/null +++ b/t/recipes/checks/debian/shlibs/shared-libs-symbols-file/build-spec/orig/someconf.conf @@ -0,0 +1,2 @@ +# Yada yada yada +Var=Val diff --git a/t/recipes/checks/debian/shlibs/shared-libs-symbols-file/eval/desc b/t/recipes/checks/debian/shlibs/shared-libs-symbols-file/eval/desc new file mode 100644 index 0000000..a35e821 --- /dev/null +++ b/t/recipes/checks/debian/shlibs/shared-libs-symbols-file/eval/desc @@ -0,0 +1,2 @@ +Testname: shared-libs-symbols-file +Check: debian/shlibs diff --git a/t/recipes/checks/debian/shlibs/shared-libs-symbols-file/eval/hints b/t/recipes/checks/debian/shlibs/shared-libs-symbols-file/eval/hints new file mode 100644 index 0000000..d7b0307 --- /dev/null +++ b/t/recipes/checks/debian/shlibs/shared-libs-symbols-file/eval/hints @@ -0,0 +1,9 @@ +nolibrary (binary): empty-shared-library-symbols [symbols] +libsym1 (binary): no-symbols-control-file usr/lib/libsym.so.1.0.1 +libfoo1 (binary): syntax-error-in-symbols-file [symbols:10] +libfoo1 (binary): symbols-file-missing-build-depends-package-field libfoo.so.1 [symbols] +libfoo1 (binary): symbols-file-contains-debian-revision on symbol energy@Base (libfoo.so.1) [symbols] +libfoo1 (binary): symbols-file-contains-current-version-with-debian-revision on symbol e@Base (libfoo.so.1) [symbols] +libfoo1 (binary): invalid-template-id-in-symbols-file 1 [symbols:9] +libfoo1 (binary): duplicate-entry-in-symbols-control-file (lines 1 8) libfoo 1 [symbols] +libesym1 (binary): shared-library-symbols-not-tracked libesym 1 for usr/lib/libesym.so.1.0.1 [symbols] diff --git a/t/recipes/checks/debian/shlibs/shared-libs-unversioned/build-spec/debian/control.in b/t/recipes/checks/debian/shlibs/shared-libs-unversioned/build-spec/debian/control.in new file mode 100644 index 0000000..d0e5f60 --- /dev/null +++ b/t/recipes/checks/debian/shlibs/shared-libs-unversioned/build-spec/debian/control.in @@ -0,0 +1,15 @@ +Source: [% $source %] +Priority: optional +Section: libs +Maintainer: [% $author %] +Standards-Version: [% $standards_version %] +Build-Depends: [% $build_depends %] +Rules-Requires-Root: no + +Package: libfoo +Architecture: [% $package_architecture %] +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: [% $description %] + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. diff --git a/t/recipes/checks/debian/shlibs/shared-libs-unversioned/build-spec/debian/rules b/t/recipes/checks/debian/shlibs/shared-libs-unversioned/build-spec/debian/rules new file mode 100755 index 0000000..f60e347 --- /dev/null +++ b/t/recipes/checks/debian/shlibs/shared-libs-unversioned/build-spec/debian/rules @@ -0,0 +1,13 @@ +#!/usr/bin/make -f + +export DEB_BUILD_MAINT_OPTIONS=hardening=+all + +%: + dh $@ + +# Do this manually so it works with jessie's debhelper without +# breaking of stretch because we get two triggers. +# - This rules file can be removed once lintian requires +# debhelper/9.20160403 or newer. +override_dh_makeshlibs: + dh_makeshlibs -n diff --git a/t/recipes/checks/debian/shlibs/shared-libs-unversioned/build-spec/debian/symbols b/t/recipes/checks/debian/shlibs/shared-libs-unversioned/build-spec/debian/symbols new file mode 100644 index 0000000..76a969f --- /dev/null +++ b/t/recipes/checks/debian/shlibs/shared-libs-unversioned/build-spec/debian/symbols @@ -0,0 +1,2 @@ +libfoo.so libfoo #MINVER# + foo@Base 1.0 diff --git a/t/recipes/checks/debian/shlibs/shared-libs-unversioned/build-spec/debian/triggers b/t/recipes/checks/debian/shlibs/shared-libs-unversioned/build-spec/debian/triggers new file mode 100644 index 0000000..dd86603 --- /dev/null +++ b/t/recipes/checks/debian/shlibs/shared-libs-unversioned/build-spec/debian/triggers @@ -0,0 +1 @@ +activate-noawait ldconfig diff --git a/t/recipes/checks/debian/shlibs/shared-libs-unversioned/build-spec/fill-values b/t/recipes/checks/debian/shlibs/shared-libs-unversioned/build-spec/fill-values new file mode 100644 index 0000000..8343487 --- /dev/null +++ b/t/recipes/checks/debian/shlibs/shared-libs-unversioned/build-spec/fill-values @@ -0,0 +1,4 @@ +Skeleton: upload-native +Testname: shared-libs-unversioned +Package-Architecture: any +Description: Test handling of shared libraries without versioned SONAMEs diff --git a/t/recipes/checks/debian/shlibs/shared-libs-unversioned/build-spec/orig/Makefile b/t/recipes/checks/debian/shlibs/shared-libs-unversioned/build-spec/orig/Makefile new file mode 100644 index 0000000..daf74d1 --- /dev/null +++ b/t/recipes/checks/debian/shlibs/shared-libs-unversioned/build-spec/orig/Makefile @@ -0,0 +1,15 @@ +CC = gcc + +all: libfoo.so + +libfoo.so: foo.o + $(CC) $(LDFLAGS) -o $@ -shared -Wl,-soname,libfoo.so $^ -lc + +%.o: %.c + $(CC) $(CFLAGS) $(CPPFLAGS) -fPIC -o $@ -c $< + +install: + install -d $(DESTDIR)/usr/lib + install -m644 libfoo.so $(DESTDIR)/usr/lib/ + +.PHONY: distclean realclean clean install test check diff --git a/t/recipes/checks/debian/shlibs/shared-libs-unversioned/build-spec/orig/foo.c b/t/recipes/checks/debian/shlibs/shared-libs-unversioned/build-spec/orig/foo.c new file mode 100644 index 0000000..aa323d5 --- /dev/null +++ b/t/recipes/checks/debian/shlibs/shared-libs-unversioned/build-spec/orig/foo.c @@ -0,0 +1,24 @@ +/* + * Be sure that this library uses a function from libc. Otherwise, gcc is + * smart enough not to link it with libc and we get more tags for missing + * dependency lines. + */ + +#include +#include +#include + +double e(void (*f)(char *)){ + char tmp[10]; + double x; + f(tmp); + x = atof(tmp); + return exp(x); +} + +int +foo(int num) +{ + printf("%d\n", num); + return num * 42; +} diff --git a/t/recipes/checks/debian/shlibs/shared-libs-unversioned/eval/desc b/t/recipes/checks/debian/shlibs/shared-libs-unversioned/eval/desc new file mode 100644 index 0000000..1937c93 --- /dev/null +++ b/t/recipes/checks/debian/shlibs/shared-libs-unversioned/eval/desc @@ -0,0 +1,5 @@ +Testname: shared-libs-unversioned +Check: debian/shlibs +Test-Against: + ships-undeclared-shared-library +See-Also: Debian Bug#506673 diff --git a/t/recipes/checks/debian/shlibs/shared-libs-unversioned/eval/hints b/t/recipes/checks/debian/shlibs/shared-libs-unversioned/eval/hints new file mode 100644 index 0000000..eee1d97 --- /dev/null +++ b/t/recipes/checks/debian/shlibs/shared-libs-unversioned/eval/hints @@ -0,0 +1,2 @@ +libfoo (binary): symbols-file-missing-build-depends-package-field libfoo.so [symbols] +libfoo (binary): shared-library-lacks-version usr/lib/libfoo.so libfoo.so diff --git a/t/recipes/checks/debian/source-dir/debian-source-dir-classifications/build-spec/fill-values b/t/recipes/checks/debian/source-dir/debian-source-dir-classifications/build-spec/fill-values new file mode 100644 index 0000000..0e031d2 --- /dev/null +++ b/t/recipes/checks/debian/source-dir/debian-source-dir-classifications/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: upload-native +Testname: debian-source-dir-classifications +Description: Test for d-s-d classifications tags diff --git a/t/recipes/checks/debian/source-dir/debian-source-dir-classifications/eval/desc b/t/recipes/checks/debian/source-dir/debian-source-dir-classifications/eval/desc new file mode 100644 index 0000000..1c4797f --- /dev/null +++ b/t/recipes/checks/debian/source-dir/debian-source-dir-classifications/eval/desc @@ -0,0 +1,2 @@ +Testname: debian-source-dir-classifications +Check: debian/source-dir diff --git a/t/recipes/checks/debian/source-dir/debian-source-dir-classifications/eval/hints b/t/recipes/checks/debian/source-dir/debian-source-dir-classifications/eval/hints new file mode 100644 index 0000000..a3bdc6a --- /dev/null +++ b/t/recipes/checks/debian/source-dir/debian-source-dir-classifications/eval/hints @@ -0,0 +1 @@ +debian-source-dir-classifications (source): source-format 3.0 (native) diff --git a/t/recipes/checks/debian/source-dir/debian-source-dir-custom-compression-settings/build-spec/debian/source/options b/t/recipes/checks/debian/source-dir/debian-source-dir-custom-compression-settings/build-spec/debian/source/options new file mode 100644 index 0000000..22a4de9 --- /dev/null +++ b/t/recipes/checks/debian/source-dir/debian-source-dir-custom-compression-settings/build-spec/debian/source/options @@ -0,0 +1,2 @@ +compression = xz +compression-level = 9 diff --git a/t/recipes/checks/debian/source-dir/debian-source-dir-custom-compression-settings/build-spec/fill-values b/t/recipes/checks/debian/source-dir/debian-source-dir-custom-compression-settings/build-spec/fill-values new file mode 100644 index 0000000..05e98a5 --- /dev/null +++ b/t/recipes/checks/debian/source-dir/debian-source-dir-custom-compression-settings/build-spec/fill-values @@ -0,0 +1,4 @@ +Skeleton: upload-native +Testname: debian-source-dir-custom-compression-settings +Source-Format: 3.0 (native) +Description: Check for custom compression settings in debian/source/format diff --git a/t/recipes/checks/debian/source-dir/debian-source-dir-custom-compression-settings/eval/desc b/t/recipes/checks/debian/source-dir/debian-source-dir-custom-compression-settings/eval/desc new file mode 100644 index 0000000..5d3372f --- /dev/null +++ b/t/recipes/checks/debian/source-dir/debian-source-dir-custom-compression-settings/eval/desc @@ -0,0 +1,2 @@ +Testname: debian-source-dir-custom-compression-settings +Check: debian/source-dir diff --git a/t/recipes/checks/debian/source-dir/debian-source-dir-custom-compression-settings/eval/hints b/t/recipes/checks/debian/source-dir/debian-source-dir-custom-compression-settings/eval/hints new file mode 100644 index 0000000..f03bb46 --- /dev/null +++ b/t/recipes/checks/debian/source-dir/debian-source-dir-custom-compression-settings/eval/hints @@ -0,0 +1,3 @@ +debian-source-dir-custom-compression-settings (source): source-format 3.0 (native) +debian-source-dir-custom-compression-settings (source): custom-compression-in-debian-source-options compression-level = 9 [debian/source/options:2] +debian-source-dir-custom-compression-settings (source): custom-compression-in-debian-source-options compression = xz [debian/source/options:1] diff --git a/t/recipes/checks/debian/source-dir/debian-source-dir-general/build-spec/debian/source/formt b/t/recipes/checks/debian/source-dir/debian-source-dir-general/build-spec/debian/source/formt new file mode 100644 index 0000000..d3827e7 --- /dev/null +++ b/t/recipes/checks/debian/source-dir/debian-source-dir-general/build-spec/debian/source/formt @@ -0,0 +1 @@ +1.0 diff --git a/t/recipes/checks/debian/source-dir/debian-source-dir-general/build-spec/fill-values b/t/recipes/checks/debian/source-dir/debian-source-dir-general/build-spec/fill-values new file mode 100644 index 0000000..8b1c351 --- /dev/null +++ b/t/recipes/checks/debian/source-dir/debian-source-dir-general/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: upload-native +Testname: debian-source-dir-general +Description: General tests for debian/source/* checks diff --git a/t/recipes/checks/debian/source-dir/debian-source-dir-general/build-spec/pre-build b/t/recipes/checks/debian/source-dir/debian-source-dir-general/build-spec/pre-build new file mode 100755 index 0000000..9442d4c --- /dev/null +++ b/t/recipes/checks/debian/source-dir/debian-source-dir-general/build-spec/pre-build @@ -0,0 +1,2 @@ +#!/bin/sh +rm "$1"/debian/source/format diff --git a/t/recipes/checks/debian/source-dir/debian-source-dir-general/eval/desc b/t/recipes/checks/debian/source-dir/debian-source-dir-general/eval/desc new file mode 100644 index 0000000..fedd774 --- /dev/null +++ b/t/recipes/checks/debian/source-dir/debian-source-dir-general/eval/desc @@ -0,0 +1,2 @@ +Testname: debian-source-dir-general +Check: debian/source-dir diff --git a/t/recipes/checks/debian/source-dir/debian-source-dir-general/eval/hints b/t/recipes/checks/debian/source-dir/debian-source-dir-general/eval/hints new file mode 100644 index 0000000..c9d8043 --- /dev/null +++ b/t/recipes/checks/debian/source-dir/debian-source-dir-general/eval/hints @@ -0,0 +1,4 @@ +debian-source-dir-general (source): unknown-file-in-debian-source [debian/source/formt] +debian-source-dir-general (source): source-format 1.0 [implicit native] +debian-source-dir-general (source): older-source-format 1.0 +debian-source-dir-general (source): missing-debian-source-format diff --git a/t/recipes/checks/debian/source-dir/debian-source-dir-gitpkg-series/build-spec/debian/patches/series b/t/recipes/checks/debian/source-dir/debian-source-dir-gitpkg-series/build-spec/debian/patches/series new file mode 100644 index 0000000..94cd91e --- /dev/null +++ b/t/recipes/checks/debian/source-dir/debian-source-dir-gitpkg-series/build-spec/debian/patches/series @@ -0,0 +1,11 @@ +# some line that ends with quilt-patches-deb-export-hook +# this looks like series file + + # but really it is just a bunch + +# of blank + +# lines + +# and # + # comments diff --git a/t/recipes/checks/debian/source-dir/debian-source-dir-gitpkg-series/build-spec/debian/source/git-patches b/t/recipes/checks/debian/source-dir/debian-source-dir-gitpkg-series/build-spec/debian/source/git-patches new file mode 100644 index 0000000..359925d --- /dev/null +++ b/t/recipes/checks/debian/source-dir/debian-source-dir-gitpkg-series/build-spec/debian/source/git-patches @@ -0,0 +1,11 @@ +upstream/$UPSTREAM_VERSION..patches/$DEB_VERSION + + + # this is an indented comment + + + + # some more blank lines + + + diff --git a/t/recipes/checks/debian/source-dir/debian-source-dir-gitpkg-series/build-spec/fill-values b/t/recipes/checks/debian/source-dir/debian-source-dir-gitpkg-series/build-spec/fill-values new file mode 100644 index 0000000..70ac870 --- /dev/null +++ b/t/recipes/checks/debian/source-dir/debian-source-dir-gitpkg-series/build-spec/fill-values @@ -0,0 +1,4 @@ +Testname: debian-source-dir-gitpkg-series +Skeleton: upload-non-native +Source-Format: 3.0 (quilt) +Description: Test for trivial series file in git-patches-not-exported diff --git a/t/recipes/checks/debian/source-dir/debian-source-dir-gitpkg-series/build-spec/orig/an_empty_file b/t/recipes/checks/debian/source-dir/debian-source-dir-gitpkg-series/build-spec/orig/an_empty_file new file mode 100644 index 0000000..e69de29 diff --git a/t/recipes/checks/debian/source-dir/debian-source-dir-gitpkg-series/eval/desc b/t/recipes/checks/debian/source-dir/debian-source-dir-gitpkg-series/eval/desc new file mode 100644 index 0000000..4ede50f --- /dev/null +++ b/t/recipes/checks/debian/source-dir/debian-source-dir-gitpkg-series/eval/desc @@ -0,0 +1,2 @@ +Testname: debian-source-dir-gitpkg-series +Check: debian/source-dir diff --git a/t/recipes/checks/debian/source-dir/debian-source-dir-gitpkg-series/eval/hints b/t/recipes/checks/debian/source-dir/debian-source-dir-gitpkg-series/eval/hints new file mode 100644 index 0000000..8e9437c --- /dev/null +++ b/t/recipes/checks/debian/source-dir/debian-source-dir-gitpkg-series/eval/hints @@ -0,0 +1,2 @@ +debian-source-dir-gitpkg-series (source): source-format 3.0 (quilt) +debian-source-dir-gitpkg-series (source): git-patches-not-exported [debian/patches/series] diff --git a/t/recipes/checks/debian/source-dir/debian-source-dir-gitpkg/build-spec/debian/source/git-patches b/t/recipes/checks/debian/source-dir/debian-source-dir-gitpkg/build-spec/debian/source/git-patches new file mode 100644 index 0000000..be4c03c --- /dev/null +++ b/t/recipes/checks/debian/source-dir/debian-source-dir-gitpkg/build-spec/debian/source/git-patches @@ -0,0 +1,11 @@ +# upstream/$UPSTREAM_VERSION..patches/$DEB_VERSION + + + # this is an indented comment + + + + # some more blank lines + + + diff --git a/t/recipes/checks/debian/source-dir/debian-source-dir-gitpkg/build-spec/fill-values b/t/recipes/checks/debian/source-dir/debian-source-dir-gitpkg/build-spec/fill-values new file mode 100644 index 0000000..f8455d2 --- /dev/null +++ b/t/recipes/checks/debian/source-dir/debian-source-dir-gitpkg/build-spec/fill-values @@ -0,0 +1,4 @@ +Testname: debian-source-dir-gitpkg +Skeleton: upload-non-native +Source-Format: 3.0 (quilt) +Description: Test for false positives in git-patches-not-exported diff --git a/t/recipes/checks/debian/source-dir/debian-source-dir-gitpkg/eval/desc b/t/recipes/checks/debian/source-dir/debian-source-dir-gitpkg/eval/desc new file mode 100644 index 0000000..8526d22 --- /dev/null +++ b/t/recipes/checks/debian/source-dir/debian-source-dir-gitpkg/eval/desc @@ -0,0 +1,4 @@ +Testname: debian-source-dir-gitpkg +Test-Against: + git-patches-not-exported +Check: debian/source-dir diff --git a/t/recipes/checks/debian/source-dir/debian-source-dir-gitpkg/eval/hints b/t/recipes/checks/debian/source-dir/debian-source-dir-gitpkg/eval/hints new file mode 100644 index 0000000..6212855 --- /dev/null +++ b/t/recipes/checks/debian/source-dir/debian-source-dir-gitpkg/eval/hints @@ -0,0 +1 @@ +debian-source-dir-gitpkg (source): source-format 3.0 (quilt) diff --git a/t/recipes/checks/debian/source-dir/source-format-1.0/build-spec/fill-values b/t/recipes/checks/debian/source-dir/source-format-1.0/build-spec/fill-values new file mode 100644 index 0000000..12123e7 --- /dev/null +++ b/t/recipes/checks/debian/source-dir/source-format-1.0/build-spec/fill-values @@ -0,0 +1,4 @@ +Skeleton: upload-native +Testname: source-format-1.0 +Source-Format: 1.0 +Description: General tests for debian/source/* checks diff --git a/t/recipes/checks/debian/source-dir/source-format-1.0/eval/desc b/t/recipes/checks/debian/source-dir/source-format-1.0/eval/desc new file mode 100644 index 0000000..c7df978 --- /dev/null +++ b/t/recipes/checks/debian/source-dir/source-format-1.0/eval/desc @@ -0,0 +1,2 @@ +Testname: source-format-1.0 +Check: debian/source-dir diff --git a/t/recipes/checks/debian/source-dir/source-format-1.0/eval/hints b/t/recipes/checks/debian/source-dir/source-format-1.0/eval/hints new file mode 100644 index 0000000..3fdf38f --- /dev/null +++ b/t/recipes/checks/debian/source-dir/source-format-1.0/eval/hints @@ -0,0 +1,2 @@ +source-format-1.0 (source): source-format 1.0 [native] +source-format-1.0 (source): older-source-format 1.0 diff --git a/t/recipes/checks/debian/source/include-binaries/non-existing-file/build-spec/debian/source/include-binaries b/t/recipes/checks/debian/source/include-binaries/non-existing-file/build-spec/debian/source/include-binaries new file mode 100644 index 0000000..c14271d --- /dev/null +++ b/t/recipes/checks/debian/source/include-binaries/non-existing-file/build-spec/debian/source/include-binaries @@ -0,0 +1,3 @@ +# the format should tolerate this comment +# and whitespace around the filename + debian/icon.png diff --git a/t/recipes/checks/debian/source/include-binaries/non-existing-file/build-spec/fill-values b/t/recipes/checks/debian/source/include-binaries/non-existing-file/build-spec/fill-values new file mode 100644 index 0000000..7e60c72 --- /dev/null +++ b/t/recipes/checks/debian/source/include-binaries/non-existing-file/build-spec/fill-values @@ -0,0 +1,4 @@ +Testname: non-existing-file +Skeleton: source-native +Description: An entry in d/source/include-binaries does not exist. +References: dpkg-source(1), Bug#528001, https://stackoverflow.com/questions/21057015/debian-include-binaries-format diff --git a/t/recipes/checks/debian/source/include-binaries/non-existing-file/eval/desc b/t/recipes/checks/debian/source/include-binaries/non-existing-file/eval/desc new file mode 100644 index 0000000..3fc395a --- /dev/null +++ b/t/recipes/checks/debian/source/include-binaries/non-existing-file/eval/desc @@ -0,0 +1,2 @@ +Testname: non-existing-file +Check: debian/source/include-binaries diff --git a/t/recipes/checks/debian/source/include-binaries/non-existing-file/eval/hints b/t/recipes/checks/debian/source/include-binaries/non-existing-file/eval/hints new file mode 100644 index 0000000..78e2e5d --- /dev/null +++ b/t/recipes/checks/debian/source/include-binaries/non-existing-file/eval/hints @@ -0,0 +1 @@ +non-existing-file (source): unused-entry-in-debian-source-include-binaries debian/icon.png [debian/source/include-binaries:3] diff --git a/t/recipes/checks/debian/substvars/cruft-general-diff/build-spec/debian/rules b/t/recipes/checks/debian/substvars/cruft-general-diff/build-spec/debian/rules new file mode 100755 index 0000000..413418b --- /dev/null +++ b/t/recipes/checks/debian/substvars/cruft-general-diff/build-spec/debian/rules @@ -0,0 +1,9 @@ +#!/usr/bin/make -f +%: + dh $@ + +override_dh_prep: + dh_prep -X~ -Xrej + +clean: + @echo 'Do nothing' diff --git a/t/recipes/checks/debian/substvars/cruft-general-diff/build-spec/debian/somepackage.substvars b/t/recipes/checks/debian/substvars/cruft-general-diff/build-spec/debian/somepackage.substvars new file mode 100644 index 0000000..abd3ebe --- /dev/null +++ b/t/recipes/checks/debian/substvars/cruft-general-diff/build-spec/debian/somepackage.substvars @@ -0,0 +1 @@ +misc:Depends= diff --git a/t/recipes/checks/debian/substvars/cruft-general-diff/build-spec/debian/substvars b/t/recipes/checks/debian/substvars/cruft-general-diff/build-spec/debian/substvars new file mode 100644 index 0000000..abd3ebe --- /dev/null +++ b/t/recipes/checks/debian/substvars/cruft-general-diff/build-spec/debian/substvars @@ -0,0 +1 @@ +misc:Depends= diff --git a/t/recipes/checks/debian/substvars/cruft-general-diff/build-spec/fill-values b/t/recipes/checks/debian/substvars/cruft-general-diff/build-spec/fill-values new file mode 100644 index 0000000..c6798f7 --- /dev/null +++ b/t/recipes/checks/debian/substvars/cruft-general-diff/build-spec/fill-values @@ -0,0 +1,4 @@ +Testname: cruft-general-diff +Skeleton: upload-non-native +Source-Format: 1.0 +Description: Check for cruft added in the diff diff --git a/t/recipes/checks/debian/substvars/cruft-general-diff/build-spec/pre-build b/t/recipes/checks/debian/substvars/cruft-general-diff/build-spec/pre-build new file mode 100755 index 0000000..537b323 --- /dev/null +++ b/t/recipes/checks/debian/substvars/cruft-general-diff/build-spec/pre-build @@ -0,0 +1,34 @@ +#!/bin/sh +# +# Create all the various junk that shouldn't exist in the diff so that we can +# trigger all the tags. + +set -e +dir="$1" + +mkdir "${dir}/CVS" +echo 'diff-contains-cvs-control-dir' > "${dir}/CVS/Entries" +mkdir "${dir}/.svn" +echo 'diff-contains-svn-control-dir' > "${dir}/.svn/format" +mkdir "${dir}/.bzr" +echo 'diff-contains-bzr-control-dir' > "${dir}/.bzr/foo" +mkdir "${dir}/{arch}" +echo 'diff-contains-arch-control-dir' > "${dir}/{arch}/foo" +mkdir "${dir}/.git" +echo 'diff-contains-git-control-dir' > "${dir}/.git/foo" +mkdir "${dir}/.hg" +echo 'diff-contains-hg-control-dir' > "${dir}/.hg/foo" +mkdir "${dir}/.be" +echo 'diff-contains-bts-control-dir' > "${dir}/.be/foo" +mkdir "${dir}/.pc" +echo 'diff-contains-quilt-control-dir' > "${dir}/.pc/foo" + +echo 'diff-contains-cmake-cache-file' > "${dir}/CMakeCache.txt" +echo 'diff-contains-svn-commit-file' > "${dir}/svn-commit.tmp" +echo 'diff-contains-svk-commit-file' > "${dir}/svk-commit444.tmp" +echo 'diff-contains-arch-inventory-file' > "${dir}/.arch-inventory" +echo 'diff-contains-hg-tags-file' > "${dir}/.hgtags" +echo 'diff-contains-cvs-conflict-copy' > "${dir}/.#foo.1.1" +echo 'diff-contains-svn-conflict-file' > "${dir}/foo.r1352" +echo 'diff-contains-patch-failure-file' > "${dir}/foo.rej" +echo 'diff-contains-editor-backup-file' > "${dir}/foo~" diff --git a/t/recipes/checks/debian/substvars/cruft-general-diff/eval/desc b/t/recipes/checks/debian/substvars/cruft-general-diff/eval/desc new file mode 100644 index 0000000..0ce942a --- /dev/null +++ b/t/recipes/checks/debian/substvars/cruft-general-diff/eval/desc @@ -0,0 +1,3 @@ +Testname: cruft-general-diff +See-Also: Debian Bug#598251 +Check: debian/substvars diff --git a/t/recipes/checks/debian/substvars/cruft-general-diff/eval/hints b/t/recipes/checks/debian/substvars/cruft-general-diff/eval/hints new file mode 100644 index 0000000..97f50c5 --- /dev/null +++ b/t/recipes/checks/debian/substvars/cruft-general-diff/eval/hints @@ -0,0 +1,2 @@ +cruft-general-diff (source): source-contains-debian-substvars [debian/substvars] +cruft-general-diff (source): source-contains-debian-substvars [debian/somepackage.substvars] diff --git a/t/recipes/checks/debian/substvars/cruft-general-native/build-spec/debian/rules b/t/recipes/checks/debian/substvars/cruft-general-native/build-spec/debian/rules new file mode 100755 index 0000000..413418b --- /dev/null +++ b/t/recipes/checks/debian/substvars/cruft-general-native/build-spec/debian/rules @@ -0,0 +1,9 @@ +#!/usr/bin/make -f +%: + dh $@ + +override_dh_prep: + dh_prep -X~ -Xrej + +clean: + @echo 'Do nothing' diff --git a/t/recipes/checks/debian/substvars/cruft-general-native/build-spec/debian/substvars b/t/recipes/checks/debian/substvars/cruft-general-native/build-spec/debian/substvars new file mode 100644 index 0000000..abd3ebe --- /dev/null +++ b/t/recipes/checks/debian/substvars/cruft-general-native/build-spec/debian/substvars @@ -0,0 +1 @@ +misc:Depends= diff --git a/t/recipes/checks/debian/substvars/cruft-general-native/build-spec/fill-values b/t/recipes/checks/debian/substvars/cruft-general-native/build-spec/fill-values new file mode 100644 index 0000000..8460259 --- /dev/null +++ b/t/recipes/checks/debian/substvars/cruft-general-native/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: upload-native +Testname: cruft-general-native +Description: Check for cruft in a native package diff --git a/t/recipes/checks/debian/substvars/cruft-general-native/build-spec/pre-build b/t/recipes/checks/debian/substvars/cruft-general-native/build-spec/pre-build new file mode 100755 index 0000000..c594074 --- /dev/null +++ b/t/recipes/checks/debian/substvars/cruft-general-native/build-spec/pre-build @@ -0,0 +1,32 @@ +#!/bin/sh +# +# Create all the various junk that shouldn't exist in the diff so that we can +# trigger all the tags. + +set -e +dir="$1" + +mkdir "${dir}/CVS" +echo 'diff-contains-cvs-control-dir' > "${dir}/CVS/Entries" +mkdir "${dir}/.svn" +echo 'diff-contains-svn-control-dir' > "${dir}/.svn/format" +mkdir "${dir}/.bzr" +echo 'diff-contains-bzr-control-dir' > "${dir}/.bzr/foo" +mkdir "${dir}/{arch}" +echo 'diff-contains-arch-control-dir' > "${dir}/{arch}/foo" +mkdir "${dir}/.git" +echo 'diff-contains-git-control-dir' > "${dir}/.git/foo" +mkdir "${dir}/.hg" +echo 'diff-contains-hg-control-dir' > "${dir}/.hg/foo" +mkdir "${dir}/.be" +echo 'diff-contains-bts-control-dir' > "${dir}/.be/foo" + +echo 'diff-contains-cmake-cache-file' > "${dir}/CMakeCache.txt" +echo 'diff-contains-svn-commit-file' > "${dir}/svn-commit.tmp" +echo 'diff-contains-svk-commit-file' > "${dir}/svk-commit444.tmp" +echo 'diff-contains-arch-inventory-file' > "${dir}/.arch-inventory" +echo 'diff-contains-hg-tags-file' > "${dir}/.hgtags" +echo 'diff-contains-cvs-conflict-copy' > "${dir}/.#foo.1.1" +echo 'diff-contains-svn-conflict-file' > "${dir}/foo.r1352" +echo 'diff-contains-patch-failure-file' > "${dir}/foo.rej" +echo 'diff-contains-editor-backup-file' > "${dir}/foo~" diff --git a/t/recipes/checks/debian/substvars/cruft-general-native/eval/desc b/t/recipes/checks/debian/substvars/cruft-general-native/eval/desc new file mode 100644 index 0000000..2cd8a25 --- /dev/null +++ b/t/recipes/checks/debian/substvars/cruft-general-native/eval/desc @@ -0,0 +1,2 @@ +Testname: cruft-general-native +Check: debian/substvars diff --git a/t/recipes/checks/debian/substvars/cruft-general-native/eval/hints b/t/recipes/checks/debian/substvars/cruft-general-native/eval/hints new file mode 100644 index 0000000..f7b0898 --- /dev/null +++ b/t/recipes/checks/debian/substvars/cruft-general-native/eval/hints @@ -0,0 +1 @@ +cruft-general-native (source): source-contains-debian-substvars [debian/substvars] diff --git a/t/recipes/checks/debian/substvars/cruft-general-quilt/build-spec/debian/README.source b/t/recipes/checks/debian/substvars/cruft-general-quilt/build-spec/debian/README.source new file mode 100644 index 0000000..0bbaa60 --- /dev/null +++ b/t/recipes/checks/debian/substvars/cruft-general-quilt/build-spec/debian/README.source @@ -0,0 +1 @@ +Some information about the patch system diff --git a/t/recipes/checks/debian/substvars/cruft-general-quilt/build-spec/debian/rules b/t/recipes/checks/debian/substvars/cruft-general-quilt/build-spec/debian/rules new file mode 100755 index 0000000..413418b --- /dev/null +++ b/t/recipes/checks/debian/substvars/cruft-general-quilt/build-spec/debian/rules @@ -0,0 +1,9 @@ +#!/usr/bin/make -f +%: + dh $@ + +override_dh_prep: + dh_prep -X~ -Xrej + +clean: + @echo 'Do nothing' diff --git a/t/recipes/checks/debian/substvars/cruft-general-quilt/build-spec/debian/somepackage.substvars b/t/recipes/checks/debian/substvars/cruft-general-quilt/build-spec/debian/somepackage.substvars new file mode 100644 index 0000000..abd3ebe --- /dev/null +++ b/t/recipes/checks/debian/substvars/cruft-general-quilt/build-spec/debian/somepackage.substvars @@ -0,0 +1 @@ +misc:Depends= diff --git a/t/recipes/checks/debian/substvars/cruft-general-quilt/build-spec/debian/substvars b/t/recipes/checks/debian/substvars/cruft-general-quilt/build-spec/debian/substvars new file mode 100644 index 0000000..abd3ebe --- /dev/null +++ b/t/recipes/checks/debian/substvars/cruft-general-quilt/build-spec/debian/substvars @@ -0,0 +1 @@ +misc:Depends= diff --git a/t/recipes/checks/debian/substvars/cruft-general-quilt/build-spec/fill-values b/t/recipes/checks/debian/substvars/cruft-general-quilt/build-spec/fill-values new file mode 100644 index 0000000..01bda9c --- /dev/null +++ b/t/recipes/checks/debian/substvars/cruft-general-quilt/build-spec/fill-values @@ -0,0 +1,4 @@ +Testname: cruft-general-quilt +Skeleton: upload-non-native +Source-Format: 3.0 (quilt) +Description: Check for cruft added in a 3.0 (quilt) package diff --git a/t/recipes/checks/debian/substvars/cruft-general-quilt/build-spec/pre-build b/t/recipes/checks/debian/substvars/cruft-general-quilt/build-spec/pre-build new file mode 100755 index 0000000..53e0ddd --- /dev/null +++ b/t/recipes/checks/debian/substvars/cruft-general-quilt/build-spec/pre-build @@ -0,0 +1,34 @@ +#!/bin/sh +# +# Create all the various junk that shouldn't exist in the diff so that we can +# trigger all the tags. + +set -e +dir="$1/debian" + +mkdir "${dir}/CVS" +echo 'diff-contains-cvs-control-dir' > "${dir}/CVS/Entries" +mkdir "${dir}/.svn" +echo 'diff-contains-svn-control-dir' > "${dir}/.svn/format" +mkdir "${dir}/.bzr" +echo 'diff-contains-bzr-control-dir' > "${dir}/.bzr/foo" +mkdir "${dir}/{arch}" +echo 'diff-contains-arch-control-dir' > "${dir}/{arch}/foo" +mkdir "${dir}/.git" +echo 'diff-contains-git-control-dir' > "${dir}/.git/foo" +mkdir "${dir}/.hg" +echo 'diff-contains-hg-control-dir' > "${dir}/.hg/foo" +mkdir "${dir}/.be" +echo 'diff-contains-bts-control-dir' > "${dir}/.be/foo" +mkdir "${dir}/.pc" +echo 'diff-contains-quilt-control-dir' > "${dir}/.pc/foo" + +echo 'diff-contains-cmake-cache-file' > "${dir}/CMakeCache.txt" +echo 'diff-contains-svn-commit-file' > "${dir}/svn-commit.tmp" +echo 'diff-contains-svk-commit-file' > "${dir}/svk-commit444.tmp" +echo 'diff-contains-arch-inventory-file' > "${dir}/.arch-inventory" +echo 'diff-contains-hg-tags-file' > "${dir}/.hgtags" +echo 'diff-contains-cvs-conflict-copy' > "${dir}/.#foo.1.1" +echo 'diff-contains-svn-conflict-file' > "${dir}/foo.r1352" +echo 'diff-contains-patch-failure-file' > "${dir}/foo.rej" +echo 'diff-contains-editor-backup-file' > "${dir}/foo~" diff --git a/t/recipes/checks/debian/substvars/cruft-general-quilt/eval/desc b/t/recipes/checks/debian/substvars/cruft-general-quilt/eval/desc new file mode 100644 index 0000000..21a04e6 --- /dev/null +++ b/t/recipes/checks/debian/substvars/cruft-general-quilt/eval/desc @@ -0,0 +1,3 @@ +Testname: cruft-general-quilt +See-Also: Debian Bug#598251 +Check: debian/substvars diff --git a/t/recipes/checks/debian/substvars/cruft-general-quilt/eval/hints b/t/recipes/checks/debian/substvars/cruft-general-quilt/eval/hints new file mode 100644 index 0000000..b005f00 --- /dev/null +++ b/t/recipes/checks/debian/substvars/cruft-general-quilt/eval/hints @@ -0,0 +1,2 @@ +cruft-general-quilt (source): source-contains-debian-substvars [debian/substvars] +cruft-general-quilt (source): source-contains-debian-substvars [debian/somepackage.substvars] diff --git a/t/recipes/checks/debian/substvars/cruft-general-wig-pen/build-spec/debian/patches/wig-pen b/t/recipes/checks/debian/substvars/cruft-general-wig-pen/build-spec/debian/patches/wig-pen new file mode 100644 index 0000000..a452b53 --- /dev/null +++ b/t/recipes/checks/debian/substvars/cruft-general-wig-pen/build-spec/debian/patches/wig-pen @@ -0,0 +1,5 @@ +--- upstream/README ++++ debian/README +@@ -1 +1 @@ +-README ++README for wig&pen diff --git a/t/recipes/checks/debian/substvars/cruft-general-wig-pen/build-spec/debian/rules b/t/recipes/checks/debian/substvars/cruft-general-wig-pen/build-spec/debian/rules new file mode 100755 index 0000000..413418b --- /dev/null +++ b/t/recipes/checks/debian/substvars/cruft-general-wig-pen/build-spec/debian/rules @@ -0,0 +1,9 @@ +#!/usr/bin/make -f +%: + dh $@ + +override_dh_prep: + dh_prep -X~ -Xrej + +clean: + @echo 'Do nothing' diff --git a/t/recipes/checks/debian/substvars/cruft-general-wig-pen/build-spec/debian/substvars b/t/recipes/checks/debian/substvars/cruft-general-wig-pen/build-spec/debian/substvars new file mode 100644 index 0000000..abd3ebe --- /dev/null +++ b/t/recipes/checks/debian/substvars/cruft-general-wig-pen/build-spec/debian/substvars @@ -0,0 +1 @@ +misc:Depends= diff --git a/t/recipes/checks/debian/substvars/cruft-general-wig-pen/build-spec/fill-values b/t/recipes/checks/debian/substvars/cruft-general-wig-pen/build-spec/fill-values new file mode 100644 index 0000000..edb39d9 --- /dev/null +++ b/t/recipes/checks/debian/substvars/cruft-general-wig-pen/build-spec/fill-values @@ -0,0 +1,4 @@ +Testname: cruft-general-wig-pen +Skeleton: upload-non-native +Source-Format: 2.0 +Description: Check for cruft added in a 2.0 package diff --git a/t/recipes/checks/debian/substvars/cruft-general-wig-pen/build-spec/orig/README b/t/recipes/checks/debian/substvars/cruft-general-wig-pen/build-spec/orig/README new file mode 100644 index 0000000..e845566 --- /dev/null +++ b/t/recipes/checks/debian/substvars/cruft-general-wig-pen/build-spec/orig/README @@ -0,0 +1 @@ +README diff --git a/t/recipes/checks/debian/substvars/cruft-general-wig-pen/build-spec/pre-build b/t/recipes/checks/debian/substvars/cruft-general-wig-pen/build-spec/pre-build new file mode 100755 index 0000000..78f359c --- /dev/null +++ b/t/recipes/checks/debian/substvars/cruft-general-wig-pen/build-spec/pre-build @@ -0,0 +1,32 @@ +#!/bin/sh +# +# Create all the various junk that shouldn't exist in the diff so that we can +# trigger all the tags. + +set -e +dir="$1/debian" + +mkdir "${dir}/CVS" +echo 'diff-contains-cvs-control-dir' > "${dir}/CVS/Entries" +mkdir "${dir}/.svn" +echo 'diff-contains-svn-control-dir' > "${dir}/.svn/format" +mkdir "${dir}/.bzr" +echo 'diff-contains-bzr-control-dir' > "${dir}/.bzr/foo" +mkdir "${dir}/{arch}" +echo 'diff-contains-arch-control-dir' > "${dir}/{arch}/foo" +mkdir "${dir}/.git" +echo 'diff-contains-git-control-dir' > "${dir}/.git/foo" +mkdir "${dir}/.hg" +echo 'diff-contains-hg-control-dir' > "${dir}/.hg/foo" +mkdir "${dir}/.be" +echo 'diff-contains-bts-control-dir' > "${dir}/.be/foo" + +echo 'diff-contains-cmake-cache-file' > "${dir}/CMakeCache.txt" +echo 'diff-contains-svn-commit-file' > "${dir}/svn-commit.tmp" +echo 'diff-contains-svk-commit-file' > "${dir}/svk-commit444.tmp" +echo 'diff-contains-arch-inventory-file' > "${dir}/.arch-inventory" +echo 'diff-contains-hg-tags-file' > "${dir}/.hgtags" +echo 'diff-contains-cvs-conflict-copy' > "${dir}/.#foo.1.1" +echo 'diff-contains-svn-conflict-file' > "${dir}/foo.r1352" +echo 'diff-contains-patch-failure-file' > "${dir}/foo.rej" +echo 'diff-contains-editor-backup-file' > "${dir}/foo~" diff --git a/t/recipes/checks/debian/substvars/cruft-general-wig-pen/eval/desc b/t/recipes/checks/debian/substvars/cruft-general-wig-pen/eval/desc new file mode 100644 index 0000000..72b8327 --- /dev/null +++ b/t/recipes/checks/debian/substvars/cruft-general-wig-pen/eval/desc @@ -0,0 +1,2 @@ +Testname: cruft-general-wig-pen +Check: debian/substvars diff --git a/t/recipes/checks/debian/substvars/cruft-general-wig-pen/eval/hints b/t/recipes/checks/debian/substvars/cruft-general-wig-pen/eval/hints new file mode 100644 index 0000000..e1dd703 --- /dev/null +++ b/t/recipes/checks/debian/substvars/cruft-general-wig-pen/eval/hints @@ -0,0 +1 @@ +cruft-general-wig-pen (source): source-contains-debian-substvars [debian/substvars] diff --git a/t/recipes/checks/debian/symbols/package-placeholder/build-spec/debian/package-placeholder.symbols b/t/recipes/checks/debian/symbols/package-placeholder/build-spec/debian/package-placeholder.symbols new file mode 100644 index 0000000..c9c913d --- /dev/null +++ b/t/recipes/checks/debian/symbols/package-placeholder/build-spec/debian/package-placeholder.symbols @@ -0,0 +1,66 @@ +# taken from http://deb.debian.org/debian/pool/main/libd/libdvdread/libdvdread_6.0.1-1.dsc +libdvdread.so.4 libdvdread4 #MINVER# +* Build-Depends-Package: #PACKAGE# + DVDClose@Base 4.1.3 + DVDCloseFile@Base 4.1.3 + DVDDiscID@Base 4.1.3 + DVDFileSeek@Base 4.1.3 + DVDFileSeekForce@Base 4.1.3 + DVDFileSize@Base 4.1.3 + DVDFileStat@Base 4.1.3-4~ + DVDISOVolumeInfo@Base 4.1.3 + DVDOpen@Base 4.1.3 + DVDOpenFile@Base 4.1.3 + DVDOpenStream@Base 5.0.2 + DVDReadBlocks@Base 4.1.3 + DVDReadBytes@Base 4.1.3 + DVDUDFCacheLevel@Base 4.1.3 + DVDUDFVolumeInfo@Base 4.1.3 + UDFFindFile@Base 4.1.3 + UDFGetVolumeIdentifier@Base 4.1.3 + UDFGetVolumeSetIdentifier@Base 4.1.3 +#MISSING: 6.0.0-1# dvdinput_close@Base 4.1.3 +#MISSING: 6.0.0-1# dvdinput_error@Base 4.1.3 +#MISSING: 6.0.0-1# dvdinput_open@Base 4.1.3 +#MISSING: 6.0.0-1# dvdinput_read@Base 4.1.3 +#MISSING: 6.0.0-1# dvdinput_seek@Base 4.1.3 +#MISSING: 6.0.0-1# dvdinput_setup@Base 4.1.3 +#MISSING: 6.0.0-1# dvdinput_title@Base 4.1.3 + dvdread_getbits@Base 4.1.3 + dvdread_getbits_init@Base 4.1.3 + dvdread_print_time@Base 4.1.3 + ifoClose@Base 4.1.3 + ifoFree_C_ADT@Base 4.1.3 + ifoFree_FP_PGC@Base 4.1.3 + ifoFree_PGCIT@Base 4.1.3 + ifoFree_PGCI_UT@Base 4.1.3 + ifoFree_PTL_MAIT@Base 4.1.3 + ifoFree_TITLE_C_ADT@Base 4.1.3 + ifoFree_TITLE_VOBU_ADMAP@Base 4.1.3 + ifoFree_TT_SRPT@Base 4.1.3 + ifoFree_TXTDT_MGI@Base 4.1.3 + ifoFree_VOBU_ADMAP@Base 4.1.3 + ifoFree_VTS_ATRT@Base 4.1.3 + ifoFree_VTS_PTT_SRPT@Base 4.1.3 + ifoFree_VTS_TMAPT@Base 4.1.3 + ifoOpen@Base 4.1.3 + ifoOpenVMGI@Base 4.1.3 + ifoOpenVTSI@Base 4.1.3 + ifoRead_C_ADT@Base 4.1.3 + ifoRead_FP_PGC@Base 4.1.3 + ifoRead_PGCIT@Base 4.1.3 + ifoRead_PGCI_UT@Base 4.1.3 + ifoRead_PTL_MAIT@Base 4.1.3 + ifoRead_TITLE_C_ADT@Base 4.1.3 + ifoRead_TITLE_VOBU_ADMAP@Base 4.1.3 + ifoRead_TT_SRPT@Base 4.1.3 + ifoRead_TXTDT_MGI@Base 4.1.3 + ifoRead_VOBU_ADMAP@Base 4.1.3 + ifoRead_VTS_ATRT@Base 4.1.3 + ifoRead_VTS_PTT_SRPT@Base 4.1.3 + ifoRead_VTS_TMAPT@Base 4.1.3 + ifo_print@Base 4.1.3 + navPrint_DSI@Base 4.1.3 + navPrint_PCI@Base 4.1.3 + navRead_DSI@Base 4.1.3 + navRead_PCI@Base 4.1.3 diff --git a/t/recipes/checks/debian/symbols/package-placeholder/build-spec/fill-values b/t/recipes/checks/debian/symbols/package-placeholder/build-spec/fill-values new file mode 100644 index 0000000..8ae39e8 --- /dev/null +++ b/t/recipes/checks/debian/symbols/package-placeholder/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: source-native +Testname: package-placeholder +Description: Look for PACKAGE placeholder in d/symbols files diff --git a/t/recipes/checks/debian/symbols/package-placeholder/eval/desc b/t/recipes/checks/debian/symbols/package-placeholder/eval/desc new file mode 100644 index 0000000..994734b --- /dev/null +++ b/t/recipes/checks/debian/symbols/package-placeholder/eval/desc @@ -0,0 +1,2 @@ +Testname: package-placeholder +Check: debian/symbols diff --git a/t/recipes/checks/debian/symbols/package-placeholder/eval/hints b/t/recipes/checks/debian/symbols/package-placeholder/eval/hints new file mode 100644 index 0000000..1b8a920 --- /dev/null +++ b/t/recipes/checks/debian/symbols/package-placeholder/eval/hints @@ -0,0 +1 @@ +package-placeholder (source): package-placeholder-in-symbols-file [debian/package-placeholder.symbols:3] diff --git a/t/recipes/checks/debian/trailing-whitespace/cruft-crlf-eols/build-spec/debian/changelog.in b/t/recipes/checks/debian/trailing-whitespace/cruft-crlf-eols/build-spec/debian/changelog.in new file mode 100644 index 0000000..7174e69 --- /dev/null +++ b/t/recipes/checks/debian/trailing-whitespace/cruft-crlf-eols/build-spec/debian/changelog.in @@ -0,0 +1,8 @@ +[% $source %] ([% $version %]) unstable; urgency=low + + * Lintian Test Suite. + * Test: [% $testname %] + + * Suppress "should close ITP bug" messages. (Closes: #123456) + + -- [% $author %] [% $date %] diff --git a/t/recipes/checks/debian/trailing-whitespace/cruft-crlf-eols/build-spec/debian/control.in b/t/recipes/checks/debian/trailing-whitespace/cruft-crlf-eols/build-spec/debian/control.in new file mode 100644 index 0000000..c4d5304 --- /dev/null +++ b/t/recipes/checks/debian/trailing-whitespace/cruft-crlf-eols/build-spec/debian/control.in @@ -0,0 +1,15 @@ +Source: [% $source %] +Priority: optional +Section: [% $section %] +Maintainer: [% $author %] +Standards-Version: [% $standards_version %] +Build-Depends: [% $build_depends %] +Rules-Requires-Root: no + +Package: [% $source %] +Architecture: [% $package_architecture %] +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: [% $description %] + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. diff --git a/t/recipes/checks/debian/trailing-whitespace/cruft-crlf-eols/build-spec/debian/install b/t/recipes/checks/debian/trailing-whitespace/cruft-crlf-eols/build-spec/debian/install new file mode 100644 index 0000000..47fc6a3 --- /dev/null +++ b/t/recipes/checks/debian/trailing-whitespace/cruft-crlf-eols/build-spec/debian/install @@ -0,0 +1 @@ +dummy usr/share/doc/foo/ diff --git a/t/recipes/checks/debian/trailing-whitespace/cruft-crlf-eols/build-spec/fill-values b/t/recipes/checks/debian/trailing-whitespace/cruft-crlf-eols/build-spec/fill-values new file mode 100644 index 0000000..faa216c --- /dev/null +++ b/t/recipes/checks/debian/trailing-whitespace/cruft-crlf-eols/build-spec/fill-values @@ -0,0 +1,4 @@ +Skeleton: upload-native +Testname: cruft-crlf-eols +Package-Architecture: all +Description: Check that control files with CRLF EOLs are reported diff --git a/t/recipes/checks/debian/trailing-whitespace/cruft-crlf-eols/build-spec/orig/dummy b/t/recipes/checks/debian/trailing-whitespace/cruft-crlf-eols/build-spec/orig/dummy new file mode 100644 index 0000000..5c3118d --- /dev/null +++ b/t/recipes/checks/debian/trailing-whitespace/cruft-crlf-eols/build-spec/orig/dummy @@ -0,0 +1 @@ +dummy file diff --git a/t/recipes/checks/debian/trailing-whitespace/cruft-crlf-eols/eval/desc b/t/recipes/checks/debian/trailing-whitespace/cruft-crlf-eols/eval/desc new file mode 100644 index 0000000..b3c05d7 --- /dev/null +++ b/t/recipes/checks/debian/trailing-whitespace/cruft-crlf-eols/eval/desc @@ -0,0 +1,2 @@ +Testname: cruft-crlf-eols +Check: debian/trailing-whitespace diff --git a/t/recipes/checks/debian/trailing-whitespace/cruft-crlf-eols/eval/hints b/t/recipes/checks/debian/trailing-whitespace/cruft-crlf-eols/eval/hints new file mode 100644 index 0000000..5e0885f --- /dev/null +++ b/t/recipes/checks/debian/trailing-whitespace/cruft-crlf-eols/eval/hints @@ -0,0 +1,22 @@ +cruft-crlf-eols (source): trailing-whitespace [debian/control:9] +cruft-crlf-eols (source): trailing-whitespace [debian/control:8] +cruft-crlf-eols (source): trailing-whitespace [debian/control:7] +cruft-crlf-eols (source): trailing-whitespace [debian/control:6] +cruft-crlf-eols (source): trailing-whitespace [debian/control:5] +cruft-crlf-eols (source): trailing-whitespace [debian/control:4] +cruft-crlf-eols (source): trailing-whitespace [debian/control:3] +cruft-crlf-eols (source): trailing-whitespace [debian/control:2] +cruft-crlf-eols (source): trailing-whitespace [debian/control:1] +cruft-crlf-eols (source): trailing-whitespace [debian/control:15] +cruft-crlf-eols (source): trailing-whitespace [debian/control:14] +cruft-crlf-eols (source): trailing-whitespace [debian/control:13] +cruft-crlf-eols (source): trailing-whitespace [debian/control:12] +cruft-crlf-eols (source): trailing-whitespace [debian/control:11] +cruft-crlf-eols (source): trailing-whitespace [debian/control:10] +cruft-crlf-eols (source): trailing-whitespace [debian/changelog:8] +cruft-crlf-eols (source): trailing-whitespace [debian/changelog:7] +cruft-crlf-eols (source): trailing-whitespace [debian/changelog:6] +cruft-crlf-eols (source): trailing-whitespace [debian/changelog:5] +cruft-crlf-eols (source): trailing-whitespace [debian/changelog:4] +cruft-crlf-eols (source): trailing-whitespace [debian/changelog:3] +cruft-crlf-eols (source): trailing-whitespace [debian/changelog:2] diff --git a/t/recipes/checks/debian/trailing-whitespace/cruft-file-contains-trailing-whitespace/build-spec/debian/README.source b/t/recipes/checks/debian/trailing-whitespace/cruft-file-contains-trailing-whitespace/build-spec/debian/README.source new file mode 100644 index 0000000..11f42a1 --- /dev/null +++ b/t/recipes/checks/debian/trailing-whitespace/cruft-file-contains-trailing-whitespace/build-spec/debian/README.source @@ -0,0 +1,6 @@ +cruft-file-contains-trailing-whitespace for Debian +-------------------------------------------------- + +This line does not contain any trailing whitespace. +This line contains a trailing whitespace character but is still a false-positive as we ignore README.source. + diff --git a/t/recipes/checks/debian/trailing-whitespace/cruft-file-contains-trailing-whitespace/build-spec/debian/changelog.in b/t/recipes/checks/debian/trailing-whitespace/cruft-file-contains-trailing-whitespace/build-spec/debian/changelog.in new file mode 100644 index 0000000..9c178f1 --- /dev/null +++ b/t/recipes/checks/debian/trailing-whitespace/cruft-file-contains-trailing-whitespace/build-spec/debian/changelog.in @@ -0,0 +1,9 @@ +[% $source %] ([% $version %]) [% $distribution %]; urgency=low + + * This line contains trailing whitespace. + * This line does not contais trailing whitespace. + * Suppress "should close ITP bug" messages. (Closes: #123456) + + -- [% $author %] [% $date %] + + diff --git a/t/recipes/checks/debian/trailing-whitespace/cruft-file-contains-trailing-whitespace/build-spec/debian/rules b/t/recipes/checks/debian/trailing-whitespace/cruft-file-contains-trailing-whitespace/build-spec/debian/rules new file mode 100755 index 0000000..c19a271 --- /dev/null +++ b/t/recipes/checks/debian/trailing-whitespace/cruft-file-contains-trailing-whitespace/build-spec/debian/rules @@ -0,0 +1,7 @@ +#!/usr/bin/make -f + +%: + dh $@ + # The line contains a trailing tab (false-positive) + + diff --git a/t/recipes/checks/debian/trailing-whitespace/cruft-file-contains-trailing-whitespace/build-spec/fill-values b/t/recipes/checks/debian/trailing-whitespace/cruft-file-contains-trailing-whitespace/build-spec/fill-values new file mode 100644 index 0000000..7a95b35 --- /dev/null +++ b/t/recipes/checks/debian/trailing-whitespace/cruft-file-contains-trailing-whitespace/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: upload-native +Testname: cruft-file-contains-trailing-whitespace +Description: Check for files containing trailing whitespace characters diff --git a/t/recipes/checks/debian/trailing-whitespace/cruft-file-contains-trailing-whitespace/eval/desc b/t/recipes/checks/debian/trailing-whitespace/cruft-file-contains-trailing-whitespace/eval/desc new file mode 100644 index 0000000..1f35e07 --- /dev/null +++ b/t/recipes/checks/debian/trailing-whitespace/cruft-file-contains-trailing-whitespace/eval/desc @@ -0,0 +1,2 @@ +Testname: cruft-file-contains-trailing-whitespace +Check: debian/trailing-whitespace diff --git a/t/recipes/checks/debian/trailing-whitespace/cruft-file-contains-trailing-whitespace/eval/hints b/t/recipes/checks/debian/trailing-whitespace/cruft-file-contains-trailing-whitespace/eval/hints new file mode 100644 index 0000000..7953403 --- /dev/null +++ b/t/recipes/checks/debian/trailing-whitespace/cruft-file-contains-trailing-whitespace/eval/hints @@ -0,0 +1,4 @@ +cruft-file-contains-trailing-whitespace (source): trailing-whitespace [debian/rules:7] +cruft-file-contains-trailing-whitespace (source): trailing-whitespace [debian/changelog:9] +cruft-file-contains-trailing-whitespace (source): trailing-whitespace [debian/changelog:8] +cruft-file-contains-trailing-whitespace (source): trailing-whitespace [debian/changelog:3] diff --git a/t/recipes/checks/debian/trailing-whitespace/rules-without-newline-at-end/build-spec/debian/rules b/t/recipes/checks/debian/trailing-whitespace/rules-without-newline-at-end/build-spec/debian/rules new file mode 100755 index 0000000..9a82cb7 --- /dev/null +++ b/t/recipes/checks/debian/trailing-whitespace/rules-without-newline-at-end/build-spec/debian/rules @@ -0,0 +1,13 @@ +#!/usr/bin/make -f + +export DEB_BUILD_MAINT_OPTIONS=hardening=+all + +%: + dh $@ + +# In Ubuntu, dh does not catch this file by default. +# They have diffed it to reduce the size of packages. +ifneq (,$(strip $(wildcard Changes))) +override_dh_installchangelogs: + dh_installchangelogs Changes +endif \ No newline at end of file diff --git a/t/recipes/checks/debian/trailing-whitespace/rules-without-newline-at-end/build-spec/fill-values b/t/recipes/checks/debian/trailing-whitespace/rules-without-newline-at-end/build-spec/fill-values new file mode 100644 index 0000000..90cfaae --- /dev/null +++ b/t/recipes/checks/debian/trailing-whitespace/rules-without-newline-at-end/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: upload-native +Testname: rules-without-newline-at-end +Description: d/rules lacking a newline at the end of file. diff --git a/t/recipes/checks/debian/trailing-whitespace/rules-without-newline-at-end/eval/desc b/t/recipes/checks/debian/trailing-whitespace/rules-without-newline-at-end/eval/desc new file mode 100644 index 0000000..232e02f --- /dev/null +++ b/t/recipes/checks/debian/trailing-whitespace/rules-without-newline-at-end/eval/desc @@ -0,0 +1,2 @@ +Testname: rules-without-newline-at-end +Check: debian/trailing-whitespace diff --git a/t/recipes/checks/debian/trailing-whitespace/rules-without-newline-at-end/eval/hints b/t/recipes/checks/debian/trailing-whitespace/rules-without-newline-at-end/eval/hints new file mode 100644 index 0000000..d14a8d4 --- /dev/null +++ b/t/recipes/checks/debian/trailing-whitespace/rules-without-newline-at-end/eval/hints @@ -0,0 +1 @@ +rules-without-newline-at-end (source): no-newline-at-end [debian/rules] diff --git a/t/recipes/checks/debian/upstream/metadata/bogus-field/build-spec/debian/upstream/metadata b/t/recipes/checks/debian/upstream/metadata/bogus-field/build-spec/debian/upstream/metadata new file mode 100644 index 0000000..4ffe477 --- /dev/null +++ b/t/recipes/checks/debian/upstream/metadata/bogus-field/build-spec/debian/upstream/metadata @@ -0,0 +1,4 @@ +--- +Bogus: This field name is not known. +Repository: Some repo. +Bug-Submit: A bug tracker. diff --git a/t/recipes/checks/debian/upstream/metadata/bogus-field/build-spec/fill-values b/t/recipes/checks/debian/upstream/metadata/bogus-field/build-spec/fill-values new file mode 100644 index 0000000..5be819d --- /dev/null +++ b/t/recipes/checks/debian/upstream/metadata/bogus-field/build-spec/fill-values @@ -0,0 +1,4 @@ +Skeleton: upload-non-native +Testname: bogus-field +Description: Upstream metadata contains a field named 'Bogus' +Extra-Build-Depends: libyaml-libyaml-perl (>= 0.69) diff --git a/t/recipes/checks/debian/upstream/metadata/bogus-field/eval/desc b/t/recipes/checks/debian/upstream/metadata/bogus-field/eval/desc new file mode 100644 index 0000000..2ac293b --- /dev/null +++ b/t/recipes/checks/debian/upstream/metadata/bogus-field/eval/desc @@ -0,0 +1,4 @@ +Testname: bogus-field +Check: debian/upstream/metadata +See-Also: + https://salsa.debian.org/lintian/lintian/-/merge_requests/356 diff --git a/t/recipes/checks/debian/upstream/metadata/bogus-field/eval/hints b/t/recipes/checks/debian/upstream/metadata/bogus-field/eval/hints new file mode 100644 index 0000000..47a6443 --- /dev/null +++ b/t/recipes/checks/debian/upstream/metadata/bogus-field/eval/hints @@ -0,0 +1,5 @@ +bogus-field (source): upstream-metadata-field-unknown Bogus [debian/upstream/metadata] +bogus-field (source): upstream-metadata-exists [debian/upstream/metadata] +bogus-field (source): upstream-metadata Repository Some repo. [debian/upstream/metadata] +bogus-field (source): upstream-metadata Bug-Submit A bug tracker. [debian/upstream/metadata] +bogus-field (source): upstream-metadata Bogus This field name is not known. [debian/upstream/metadata] diff --git a/t/recipes/checks/debian/upstream/metadata/cruft-obsolete-upstream-metadata/build-spec/debian/upstream b/t/recipes/checks/debian/upstream/metadata/cruft-obsolete-upstream-metadata/build-spec/debian/upstream new file mode 100644 index 0000000..ab2fc5d --- /dev/null +++ b/t/recipes/checks/debian/upstream/metadata/cruft-obsolete-upstream-metadata/build-spec/debian/upstream @@ -0,0 +1 @@ +# empty file \ No newline at end of file diff --git a/t/recipes/checks/debian/upstream/metadata/cruft-obsolete-upstream-metadata/build-spec/fill-values b/t/recipes/checks/debian/upstream/metadata/cruft-obsolete-upstream-metadata/build-spec/fill-values new file mode 100644 index 0000000..de42edd --- /dev/null +++ b/t/recipes/checks/debian/upstream/metadata/cruft-obsolete-upstream-metadata/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: upload-native +Testname: cruft-obsolete-upstream-metadata +Description: Check for obsolete path for debian/upstream/metadata diff --git a/t/recipes/checks/debian/upstream/metadata/cruft-obsolete-upstream-metadata/eval/desc b/t/recipes/checks/debian/upstream/metadata/cruft-obsolete-upstream-metadata/eval/desc new file mode 100644 index 0000000..c0934c3 --- /dev/null +++ b/t/recipes/checks/debian/upstream/metadata/cruft-obsolete-upstream-metadata/eval/desc @@ -0,0 +1,2 @@ +Testname: cruft-obsolete-upstream-metadata +Check: debian/upstream/metadata diff --git a/t/recipes/checks/debian/upstream/metadata/cruft-obsolete-upstream-metadata/eval/hints b/t/recipes/checks/debian/upstream/metadata/cruft-obsolete-upstream-metadata/eval/hints new file mode 100644 index 0000000..91c125c --- /dev/null +++ b/t/recipes/checks/debian/upstream/metadata/cruft-obsolete-upstream-metadata/eval/hints @@ -0,0 +1 @@ +cruft-obsolete-upstream-metadata (source): debian-upstream-obsolete-path [debian/upstream] diff --git a/t/recipes/checks/debian/upstream/metadata/fields-present/build-spec/debian/upstream/metadata b/t/recipes/checks/debian/upstream/metadata/fields-present/build-spec/debian/upstream/metadata new file mode 100644 index 0000000..1182684 --- /dev/null +++ b/t/recipes/checks/debian/upstream/metadata/fields-present/build-spec/debian/upstream/metadata @@ -0,0 +1,7 @@ +--- +Archive: GitHub +Bug-Database: https://github.com/isaacs/node-glob/issues +Contact: https://github.com/isaacs/node-glob/issues +Name: node-glob +Repository: https://github.com/isaacs/node-glob.git +Repository-Browse: https://github.com/isaacs/node-glob diff --git a/t/recipes/checks/debian/upstream/metadata/fields-present/build-spec/fill-values b/t/recipes/checks/debian/upstream/metadata/fields-present/build-spec/fill-values new file mode 100644 index 0000000..ad6eb57 --- /dev/null +++ b/t/recipes/checks/debian/upstream/metadata/fields-present/build-spec/fill-values @@ -0,0 +1,4 @@ +Skeleton: upload-non-native +Testname: fields-present +Description: Tests for classification tags on upstream metadata +Extra-Build-Depends: libyaml-libyaml-perl (>= 0.69) diff --git a/t/recipes/checks/debian/upstream/metadata/fields-present/eval/desc b/t/recipes/checks/debian/upstream/metadata/fields-present/eval/desc new file mode 100644 index 0000000..02d3d28 --- /dev/null +++ b/t/recipes/checks/debian/upstream/metadata/fields-present/eval/desc @@ -0,0 +1,2 @@ +Testname: fields-present +Check: debian/upstream/metadata diff --git a/t/recipes/checks/debian/upstream/metadata/fields-present/eval/hints b/t/recipes/checks/debian/upstream/metadata/fields-present/eval/hints new file mode 100644 index 0000000..769e5ab --- /dev/null +++ b/t/recipes/checks/debian/upstream/metadata/fields-present/eval/hints @@ -0,0 +1,7 @@ +fields-present (source): upstream-metadata-exists [debian/upstream/metadata] +fields-present (source): upstream-metadata Repository-Browse https://github.com/isaacs/node-glob [debian/upstream/metadata] +fields-present (source): upstream-metadata Repository https://github.com/isaacs/node-glob.git [debian/upstream/metadata] +fields-present (source): upstream-metadata Name node-glob [debian/upstream/metadata] +fields-present (source): upstream-metadata Contact https://github.com/isaacs/node-glob/issues [debian/upstream/metadata] +fields-present (source): upstream-metadata Bug-Database https://github.com/isaacs/node-glob/issues [debian/upstream/metadata] +fields-present (source): upstream-metadata Archive GitHub [debian/upstream/metadata] diff --git a/t/recipes/checks/debian/upstream/metadata/in-native-source/build-spec/debian/upstream/metadata b/t/recipes/checks/debian/upstream/metadata/in-native-source/build-spec/debian/upstream/metadata new file mode 100644 index 0000000..d18240a --- /dev/null +++ b/t/recipes/checks/debian/upstream/metadata/in-native-source/build-spec/debian/upstream/metadata @@ -0,0 +1,2 @@ + - Hi, +This is a completely invalid YAML file. diff --git a/t/recipes/checks/debian/upstream/metadata/in-native-source/build-spec/fill-values b/t/recipes/checks/debian/upstream/metadata/in-native-source/build-spec/fill-values new file mode 100644 index 0000000..4a524d2 --- /dev/null +++ b/t/recipes/checks/debian/upstream/metadata/in-native-source/build-spec/fill-values @@ -0,0 +1,4 @@ +Skeleton: source-native +Testname: in-native-source +Description: Tests for d/upstream/metadata in native sources. +Extra-Build-Depends: libyaml-libyaml-perl (>= 0.69) diff --git a/t/recipes/checks/debian/upstream/metadata/in-native-source/eval/desc b/t/recipes/checks/debian/upstream/metadata/in-native-source/eval/desc new file mode 100644 index 0000000..e639f6e --- /dev/null +++ b/t/recipes/checks/debian/upstream/metadata/in-native-source/eval/desc @@ -0,0 +1,2 @@ +Testname: in-native-source +Check: debian/upstream/metadata diff --git a/t/recipes/checks/debian/upstream/metadata/in-native-source/eval/hints b/t/recipes/checks/debian/upstream/metadata/in-native-source/eval/hints new file mode 100644 index 0000000..cabf645 --- /dev/null +++ b/t/recipes/checks/debian/upstream/metadata/in-native-source/eval/hints @@ -0,0 +1 @@ +in-native-source (source): upstream-metadata-in-native-source [debian/upstream/metadata] diff --git a/t/recipes/checks/debian/upstream/metadata/upstream-metadata-invalid-yml/build-spec/debian/upstream/metadata b/t/recipes/checks/debian/upstream/metadata/upstream-metadata-invalid-yml/build-spec/debian/upstream/metadata new file mode 100644 index 0000000..d18240a --- /dev/null +++ b/t/recipes/checks/debian/upstream/metadata/upstream-metadata-invalid-yml/build-spec/debian/upstream/metadata @@ -0,0 +1,2 @@ + - Hi, +This is a completely invalid YAML file. diff --git a/t/recipes/checks/debian/upstream/metadata/upstream-metadata-invalid-yml/build-spec/fill-values b/t/recipes/checks/debian/upstream/metadata/upstream-metadata-invalid-yml/build-spec/fill-values new file mode 100644 index 0000000..4807064 --- /dev/null +++ b/t/recipes/checks/debian/upstream/metadata/upstream-metadata-invalid-yml/build-spec/fill-values @@ -0,0 +1,4 @@ +Skeleton: upload-non-native +Testname: upstream-metadata-invalid-yml +Description: Tests for upstream-metadata being invalid yml +Extra-Build-Depends: libyaml-libyaml-perl (>= 0.69) diff --git a/t/recipes/checks/debian/upstream/metadata/upstream-metadata-invalid-yml/eval/desc b/t/recipes/checks/debian/upstream/metadata/upstream-metadata-invalid-yml/eval/desc new file mode 100644 index 0000000..cb6406c --- /dev/null +++ b/t/recipes/checks/debian/upstream/metadata/upstream-metadata-invalid-yml/eval/desc @@ -0,0 +1,2 @@ +Testname: upstream-metadata-invalid-yml +Check: debian/upstream/metadata diff --git a/t/recipes/checks/debian/upstream/metadata/upstream-metadata-invalid-yml/eval/hints b/t/recipes/checks/debian/upstream/metadata/upstream-metadata-invalid-yml/eval/hints new file mode 100644 index 0000000..6e29652 --- /dev/null +++ b/t/recipes/checks/debian/upstream/metadata/upstream-metadata-invalid-yml/eval/hints @@ -0,0 +1,2 @@ +upstream-metadata-invalid-yml (source): upstream-metadata-yaml-invalid did not find expected (at document 2, line 2, column 1) [debian/upstream/metadata] +upstream-metadata-invalid-yml (source): upstream-metadata-exists [debian/upstream/metadata] diff --git a/t/recipes/checks/debian/upstream/metadata/upstream-metadata-is-missing/build-spec/fill-values b/t/recipes/checks/debian/upstream/metadata/upstream-metadata-is-missing/build-spec/fill-values new file mode 100644 index 0000000..ffb322d --- /dev/null +++ b/t/recipes/checks/debian/upstream/metadata/upstream-metadata-is-missing/build-spec/fill-values @@ -0,0 +1,3 @@ +Testname: upstream-metadata-is-missing +Skeleton: upload-non-native +Description: Tests for missing upstream metadata file diff --git a/t/recipes/checks/debian/upstream/metadata/upstream-metadata-is-missing/build-spec/pre-build b/t/recipes/checks/debian/upstream/metadata/upstream-metadata-is-missing/build-spec/pre-build new file mode 100755 index 0000000..e4e9373 --- /dev/null +++ b/t/recipes/checks/debian/upstream/metadata/upstream-metadata-is-missing/build-spec/pre-build @@ -0,0 +1,2 @@ +#!/bin/sh +rm -f "$1/debian/upstream/metadata" diff --git a/t/recipes/checks/debian/upstream/metadata/upstream-metadata-is-missing/eval/desc b/t/recipes/checks/debian/upstream/metadata/upstream-metadata-is-missing/eval/desc new file mode 100644 index 0000000..eda1ff9 --- /dev/null +++ b/t/recipes/checks/debian/upstream/metadata/upstream-metadata-is-missing/eval/desc @@ -0,0 +1,2 @@ +Testname: upstream-metadata-is-missing +Check: debian/upstream/metadata diff --git a/t/recipes/checks/debian/upstream/metadata/upstream-metadata-is-missing/eval/hints b/t/recipes/checks/debian/upstream/metadata/upstream-metadata-is-missing/eval/hints new file mode 100644 index 0000000..b2f602f --- /dev/null +++ b/t/recipes/checks/debian/upstream/metadata/upstream-metadata-is-missing/eval/hints @@ -0,0 +1 @@ +upstream-metadata-is-missing (source): upstream-metadata-file-is-missing diff --git a/t/recipes/checks/debian/upstream/metadata/upstream-metadata-is-not-a-file/build-spec/fill-values b/t/recipes/checks/debian/upstream/metadata/upstream-metadata-is-not-a-file/build-spec/fill-values new file mode 100644 index 0000000..18a7845 --- /dev/null +++ b/t/recipes/checks/debian/upstream/metadata/upstream-metadata-is-not-a-file/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: upload-non-native +Testname: upstream-metadata-is-not-a-file +Description: Tests for d/upstream/metadata being non-file diff --git a/t/recipes/checks/debian/upstream/metadata/upstream-metadata-is-not-a-file/build-spec/pre-build b/t/recipes/checks/debian/upstream/metadata/upstream-metadata-is-not-a-file/build-spec/pre-build new file mode 100755 index 0000000..f237abf --- /dev/null +++ b/t/recipes/checks/debian/upstream/metadata/upstream-metadata-is-not-a-file/build-spec/pre-build @@ -0,0 +1,11 @@ +#!/bin/sh + +set -e + +DIR="$1" +UPSTREAM_DIR="$DIR/debian/upstream" +METADATA="$UPSTREAM_DIR/metadata" + +mkdir -p "$UPSTREAM_DIR" +rm -f "$METADATA" +mkfifo "$METADATA" diff --git a/t/recipes/checks/debian/upstream/metadata/upstream-metadata-is-not-a-file/eval/desc b/t/recipes/checks/debian/upstream/metadata/upstream-metadata-is-not-a-file/eval/desc new file mode 100644 index 0000000..8bbbeb1 --- /dev/null +++ b/t/recipes/checks/debian/upstream/metadata/upstream-metadata-is-not-a-file/eval/desc @@ -0,0 +1,2 @@ +Testname: upstream-metadata-is-not-a-file +Check: debian/upstream/metadata diff --git a/t/recipes/checks/debian/upstream/metadata/upstream-metadata-is-not-a-file/eval/hints b/t/recipes/checks/debian/upstream/metadata/upstream-metadata-is-not-a-file/eval/hints new file mode 100644 index 0000000..ba37c59 --- /dev/null +++ b/t/recipes/checks/debian/upstream/metadata/upstream-metadata-is-not-a-file/eval/hints @@ -0,0 +1,2 @@ +upstream-metadata-is-not-a-file (source): upstream-metadata-is-not-a-file [debian/upstream/metadata] +upstream-metadata-is-not-a-file (source): upstream-metadata-exists [debian/upstream/metadata] diff --git a/t/recipes/checks/debian/upstream/metadata/upstream-metadata-missing-bug-tracking/build-spec/debian/upstream/metadata b/t/recipes/checks/debian/upstream/metadata/upstream-metadata-missing-bug-tracking/build-spec/debian/upstream/metadata new file mode 100644 index 0000000..e740fba --- /dev/null +++ b/t/recipes/checks/debian/upstream/metadata/upstream-metadata-missing-bug-tracking/build-spec/debian/upstream/metadata @@ -0,0 +1,5 @@ +Archive: GitHub +Contact: https://github.com/isaacs/node-glob/issues +Name: node-glob +Repository: https://github.com/isaacs/node-glob.git +Repository-Browse: https://github.com/isaacs/node-glob diff --git a/t/recipes/checks/debian/upstream/metadata/upstream-metadata-missing-bug-tracking/build-spec/fill-values b/t/recipes/checks/debian/upstream/metadata/upstream-metadata-missing-bug-tracking/build-spec/fill-values new file mode 100644 index 0000000..924631c --- /dev/null +++ b/t/recipes/checks/debian/upstream/metadata/upstream-metadata-missing-bug-tracking/build-spec/fill-values @@ -0,0 +1,4 @@ +Skeleton: upload-non-native +Testname: upstream-metadata-missing-bug-tracking +Description: Tests for upstream-metadata missing upstream repo info +Extra-Build-Depends: libyaml-libyaml-perl (>= 0.69) diff --git a/t/recipes/checks/debian/upstream/metadata/upstream-metadata-missing-bug-tracking/eval/desc b/t/recipes/checks/debian/upstream/metadata/upstream-metadata-missing-bug-tracking/eval/desc new file mode 100644 index 0000000..60d30b1 --- /dev/null +++ b/t/recipes/checks/debian/upstream/metadata/upstream-metadata-missing-bug-tracking/eval/desc @@ -0,0 +1,2 @@ +Testname: upstream-metadata-missing-bug-tracking +Check: debian/upstream/metadata diff --git a/t/recipes/checks/debian/upstream/metadata/upstream-metadata-missing-bug-tracking/eval/hints b/t/recipes/checks/debian/upstream/metadata/upstream-metadata-missing-bug-tracking/eval/hints new file mode 100644 index 0000000..221dfb4 --- /dev/null +++ b/t/recipes/checks/debian/upstream/metadata/upstream-metadata-missing-bug-tracking/eval/hints @@ -0,0 +1,7 @@ +upstream-metadata-missing-bug-tracking (source): upstream-metadata-missing-bug-tracking [debian/upstream/metadata] +upstream-metadata-missing-bug-tracking (source): upstream-metadata-exists [debian/upstream/metadata] +upstream-metadata-missing-bug-tracking (source): upstream-metadata Repository-Browse https://github.com/isaacs/node-glob [debian/upstream/metadata] +upstream-metadata-missing-bug-tracking (source): upstream-metadata Repository https://github.com/isaacs/node-glob.git [debian/upstream/metadata] +upstream-metadata-missing-bug-tracking (source): upstream-metadata Name node-glob [debian/upstream/metadata] +upstream-metadata-missing-bug-tracking (source): upstream-metadata Contact https://github.com/isaacs/node-glob/issues [debian/upstream/metadata] +upstream-metadata-missing-bug-tracking (source): upstream-metadata Archive GitHub [debian/upstream/metadata] diff --git a/t/recipes/checks/debian/upstream/metadata/upstream-metadata-missing-repository/build-spec/debian/upstream/metadata b/t/recipes/checks/debian/upstream/metadata/upstream-metadata-missing-repository/build-spec/debian/upstream/metadata new file mode 100644 index 0000000..131493d --- /dev/null +++ b/t/recipes/checks/debian/upstream/metadata/upstream-metadata-missing-repository/build-spec/debian/upstream/metadata @@ -0,0 +1,6 @@ +Archive: GitHub +Bug-Database: https://github.com/isaacs/node-glob/issues +Contact: https://github.com/isaacs/node-glob/issues +Name: node-glob +Bug-Database: https://github.com/isaacs/node-glob/issues +Bug-Submit: https://github.com/isaacs/node-glob/issues/new diff --git a/t/recipes/checks/debian/upstream/metadata/upstream-metadata-missing-repository/build-spec/fill-values b/t/recipes/checks/debian/upstream/metadata/upstream-metadata-missing-repository/build-spec/fill-values new file mode 100644 index 0000000..65e64c5 --- /dev/null +++ b/t/recipes/checks/debian/upstream/metadata/upstream-metadata-missing-repository/build-spec/fill-values @@ -0,0 +1,4 @@ +Skeleton: upload-non-native +Testname: upstream-metadata-missing-repository +Description: Tests for upstream-metadata missing upstream repo info +Extra-Build-Depends: libyaml-libyaml-perl (>= 0.69) diff --git a/t/recipes/checks/debian/upstream/metadata/upstream-metadata-missing-repository/eval/desc b/t/recipes/checks/debian/upstream/metadata/upstream-metadata-missing-repository/eval/desc new file mode 100644 index 0000000..6e6fe31 --- /dev/null +++ b/t/recipes/checks/debian/upstream/metadata/upstream-metadata-missing-repository/eval/desc @@ -0,0 +1,2 @@ +Testname: upstream-metadata-missing-repository +Check: debian/upstream/metadata diff --git a/t/recipes/checks/debian/upstream/metadata/upstream-metadata-missing-repository/eval/hints b/t/recipes/checks/debian/upstream/metadata/upstream-metadata-missing-repository/eval/hints new file mode 100644 index 0000000..595916c --- /dev/null +++ b/t/recipes/checks/debian/upstream/metadata/upstream-metadata-missing-repository/eval/hints @@ -0,0 +1,7 @@ +upstream-metadata-missing-repository (source): upstream-metadata-missing-repository [debian/upstream/metadata] +upstream-metadata-missing-repository (source): upstream-metadata-exists [debian/upstream/metadata] +upstream-metadata-missing-repository (source): upstream-metadata Name node-glob [debian/upstream/metadata] +upstream-metadata-missing-repository (source): upstream-metadata Contact https://github.com/isaacs/node-glob/issues [debian/upstream/metadata] +upstream-metadata-missing-repository (source): upstream-metadata Bug-Submit https://github.com/isaacs/node-glob/issues/new [debian/upstream/metadata] +upstream-metadata-missing-repository (source): upstream-metadata Bug-Database https://github.com/isaacs/node-glob/issues [debian/upstream/metadata] +upstream-metadata-missing-repository (source): upstream-metadata Archive GitHub [debian/upstream/metadata] diff --git a/t/recipes/checks/debian/upstream/metadata/yaml-sequence/build-spec/debian/upstream/metadata b/t/recipes/checks/debian/upstream/metadata/yaml-sequence/build-spec/debian/upstream/metadata new file mode 100644 index 0000000..6e5ed82 --- /dev/null +++ b/t/recipes/checks/debian/upstream/metadata/yaml-sequence/build-spec/debian/upstream/metadata @@ -0,0 +1,5 @@ +- Name: libpff +- Bug-Database: https://github.com/libyal/libpff/issues +- Changelog: https://github.com/libyal/libpff/blob/master/ChangeLog +- Documentation: https://github.com/libyal/libpff/wiki +- Repository: https://github.com/libyal/libpff diff --git a/t/recipes/checks/debian/upstream/metadata/yaml-sequence/build-spec/fill-values b/t/recipes/checks/debian/upstream/metadata/yaml-sequence/build-spec/fill-values new file mode 100644 index 0000000..6ec962f --- /dev/null +++ b/t/recipes/checks/debian/upstream/metadata/yaml-sequence/build-spec/fill-values @@ -0,0 +1,4 @@ +Skeleton: upload-non-native +Testname: yaml-sequence +Description: File is YAML sequence instead of mapping +Extra-Build-Depends: libyaml-libyaml-perl (>= 0.69) diff --git a/t/recipes/checks/debian/upstream/metadata/yaml-sequence/eval/desc b/t/recipes/checks/debian/upstream/metadata/yaml-sequence/eval/desc new file mode 100644 index 0000000..0d43f76 --- /dev/null +++ b/t/recipes/checks/debian/upstream/metadata/yaml-sequence/eval/desc @@ -0,0 +1,2 @@ +Testname: yaml-sequence +Check: debian/upstream/metadata diff --git a/t/recipes/checks/debian/upstream/metadata/yaml-sequence/eval/hints b/t/recipes/checks/debian/upstream/metadata/yaml-sequence/eval/hints new file mode 100644 index 0000000..03f3384 --- /dev/null +++ b/t/recipes/checks/debian/upstream/metadata/yaml-sequence/eval/hints @@ -0,0 +1,2 @@ +yaml-sequence (source): upstream-metadata-not-yaml-mapping [debian/upstream/metadata] +yaml-sequence (source): upstream-metadata-exists [debian/upstream/metadata] diff --git a/t/recipes/checks/debian/upstream/signing-key/upstream-key-bloated/build-spec/debian/upstream/signing-key.asc b/t/recipes/checks/debian/upstream/signing-key/upstream-key-bloated/build-spec/debian/upstream/signing-key.asc new file mode 100644 index 0000000..41c2c56 --- /dev/null +++ b/t/recipes/checks/debian/upstream/signing-key/upstream-key-bloated/build-spec/debian/upstream/signing-key.asc @@ -0,0 +1,160 @@ +-----BEGIN PGP PUBLIC KEY BLOCK----- + +mQINBFkjME4BEACatcbzE9EaIKMmiS3OmcrooZZUI4pGtJcFqCNBOP3qvxUEq9Tk +4XPY8EARDGdwy2rMc12ywoc5FMzNwXiC3RpUNHnNhY+zau18q9CQx8UR02NDFWQq +AwaDSF4WU1GBVBMWgtxfIwAQGl/qOr+aSVtJCnEOTA/YiZPNw/wpA7r2g6EHYcce +a5srr7F15a6OxzDdPXlfoJuoSXMZUHpJIqG0UOo7NPkxPGRoHO2yGPS1DWKy3egG +xm718DwaIWee+mfJrcqT0ZFH4n5po1BJVj+8TcqE4YlkN/z4p0zI/XAxNCR2wGV2 +6cCQ8laEgwG33rPp+N3G/FeJchYTFvL7zDtdYKbBPVeaJh2kROnqbVVN5kZBVEXB +QNbXKuK6/TPiQeI+8anA9WflI19lzkzl29L7hsM9ornk7+wtu9P2hu3eEUgjjBli +Ujisw8s0aTPB5QsMCjSownwZ0ucqj+07nYVsPU2wK8x6A7p6Cg2SCPnjbX8jUb3Z +wyn0yi4SWceW9a+LW6wdGarMGbu+Lm6in8pK93u7mE/D4AskUVz1yLyiNO9WBXPq +GyTocqXKXTutHKhhSwY9CyEw1+SRzXXyHPmRunRULTgZHLOaydK6ekzBOe1Yp9Zk +hLvon6fgOhJTsokv27QCSw8ILbQPGF9qJWFQfYZhT4QCufmPaFgBpJOdewARAQAB +iQJOBB8BCgA4FiEE4c8g3f/kuJ6AJljx4LEYlPZq7JgFAlkjMMkXDIABgOl28UpQ +ikjpyj/pvDciUsoc+WQCBwAACgkQ4LEYlPZq7JiCcw/+NxzyntWMM/b/eIMedzZK +Zyq7Mo6vgFxT57wAloMtLu0WS9oETTH/+/9+fHPmkYxCX1HTNKpdY2KbjiZC/gAY +vJ8iGWredwIls2UyW4fegzRLNvWLZmUBbLg0WaTIQ9JZwa2Rw/q6Z0pe0tfb44oX +lpps0WA/OZCWXYVO2rhOzoiQulqdmHgwdcLA29BnpqBY1R8/LMDsfPLnJu7AFqgM +CQpnjIGRH6ZxF2TNUSdljUbIOultEeIvxtxosF1u0r20mg46aaKDpr0ANiR/Ojaj +YoeHZc39fyubSrhIyQuk4rDisrJod63MJ9x9upAc9H3qz71QjpwpVXPDxereWULO +17qN3hjjZd23CBdRv8HjRKQoFagUnxlrat1t+/yJCENzX6eX8wBs0vVCSmbtbSp7 +y+0BK4fyjDKCdiyKh1TiAnQ1Po/xICGr4Sa6Wohq2TeWXz4VlRnaQeCIwa4Kk6T/ +3VTQbNxn7Uiy9ec8aR+1YMGUBDG/k3s6K1PWLdJtSVgao8MkQYeKcQk/sgGSFPh8 +SkTy7CnSjK/gQP8NC5fFDWpatGpnDr9qsQwzMnUVYWNZQMQ+LJHPnXRyusr3M+Gh +4muVW1wmyjNLhtEYjJJnbv9bVVv2HFVXOWGiXY4hnj01xkHf3885Qq5ORWl1FMnU +lcqUcFsB6a1CCPGxNTJQhgKJAk4EHwEKADgWIQThzyDd/+S4noAmWPHgsRiU9mrs +mAUCWSMwyRcMgAH7+r21QbXclVvZum7bFs9bsSUlxAIHAAAKCRDgsRiU9mrsmK2H +D/9frYP6KRecLNMzLJGe6MB/1DbqIud1/kzd/jHRo3e4Dz8cls29N03HskLE4jTf +BXKAhUmRI52aMCioY/K03rZLaR++/GMIdnF7O4Ks7P203J4/CudmXQvz3Rby22lC +RCp3Wsx2DqFgpc1V5SjmdDxzEs3fwKJ0B8YOMyibyUaLfwaxRfiTsWmRF192WzCM +/B1tmJDLIqwq/xxzxmiqzrxBWq3JIxH1PzrGbWvAE0gfBJHgw/2HHO4PAG9Lj+AV +HHPV/9xhXdbF/KnnKUGtd9lssNleWlc5LeM0ix2pU/QrZx7c+CBW+142jQcZ58X6 +QvHTKBkImI7y3kMCUOs+UbxKnFsRBRduMLvIpXJVXukV3QvRn+9riITPIcviF4ni +F6V2NQ+ONrvMOK2s6VdfgMS7c4Azuyt4SJSEzBhHu+VTVnMZCBiKvZtRL5XX85ZF +DDkN62Bwa+F36lTiOBWOecSQykCyOKcnn0jKrSgDOk08qE7Nzl2SPdlpza0/bk2u +6i8o3mrmdO02OqC9vJum6M4Pn2HHrkPzAtSs11E7ogcZghPxnGCekGQNekHx9DKM +mv8W+SZf4b1KD1EKECeNLZ0QHQMjU3AYBav+Mq9IXIlwFZL85BYLUAWfrCnqf/gV +CTiy9yKdQ4WIr9XR+zywDigAZqJ5PxwBh1+phrkoWUfsLokCTgQfAQoAOBYhBOHP +IN3/5LiegCZY8eCxGJT2auyYBQJZIzDJFwyAATCZEb6pZtBhMFMEVxG05f8VsP2C +AgcAAAoJEOCxGJT2auyYWHAP/jlmSZQI/dnrYTT0ZtZA0k3sCaaOApWmno4Jm1+p +QzxBJyVXC/7em3D/Wb3B4XpQKnkWOGz3XtEf4LNPhrW1n6nLFOLctprGwnlZihBp +tmidEvvFKCa5exv4WOVyat5jLttNJ6o4O0BJHmUJG/wAVSjfWi2KgVXZEnz/wts8 +KFXc06RCgavIATmlC5QqD87U5ezKJdY0HY/A8uT9aBJ3KFdzj5MnZOzr2RJcEtWU +UE1HHxqJS7POQVMUWK/7nABUKjzpQg8Hn7VNom553Lf8yk+OLl0x7+bS/8tZltZ/ +zkIqzUmpPk1QSf5b4JOryJye0ZV60TtbI7juXi2VV41gcHxd7EMkF4PAMtHF/rNM +n/sR4LLXPnQk71zqOScYpMBDQ0FikQ7UuUT35iJAX3u7mWYL0P4h3NBlPmRLg9W3 +k/g5KRBLJ2U9Ba+i3UIRva8tUGz/EluzOCUcSbIEMNkaNyt4ktO3PaIzAzdVdxYk +IWV6NUj92vSBJvXinzIjyXTk9Tjfuf4hLo15C+1c9P0+XkpKzpvW1ycpIUVH9QSZ +afC1e45EXSkD0AV+y6ihJf4PWddgGb3ZeWarcp2QL/ll3XoBdEGfxOQJ1Py2nfIS +HxVrl5AxoEJ9q+4YO5xysAV4f+UFKvS4snJtRztOYBKM0/4pup41u4V8oGWLRUOC +d/GitEdEZWJpYW4gQXJjaGl2ZSBBdXRvbWF0aWMgU2lnbmluZyBLZXkgKDkvc3Ry +ZXRjaCkgPGZ0cG1hc3RlckBkZWJpYW4ub3JnPokCVAQTAQoAPhYhBOHPIN3/5Lie +gCZY8eCxGJT2auyYBQJZIzBOAhsDBQkPCZwABQsJCAcDBRUKCQgLBRYCAwEAAh4B +AheAAAoJEOCxGJT2auyYKFoP/R5ijjBRlLpClTvhk5p1pE/cJbMAHd1Y7x09iSN3 +nT222tx4Zk3wVnP/1puJNkOxW7btMuUNz6Y4DolLpAa71hq3NOsTGz+5PL8ZFBoi +lIN2iOpfzqIFLASM0Pz6X+twV3ZyE1PZmfzLAu8OWm4kt1v3qJVtWN/5dHbjTqMt +vUc28VX1di51zWTs+3b/SDC+KN98i9W64JUiHPcLL6b2Y44fDszDDVVExwtPrPk0 +VU+et4/uWmhcdEIEb91MIEsLAUJIBqcGTZU7Gymxupa3vApT6UUxfNKkVCGDN5dk +zFKkS6p2NEQjtIPNAheBwUfHqSDeN+EW4IuQxHZ92o+XGFMHqU29Vy81sPkGvKkG +EIL12iMpW9hDTbjO/+v695o3tVo/h1b0NSZP3Jk4I3iDBpAcUEYarxoOung2K1fC +QYH7R+7hy3lnRP36s9za6rEbik0c4XRvyYaYq7npGEq4CqhcKgRhZqVcy2Zmymcw +MqR1wLSxEmbREQZfBCFh5zpVC+kmRHfXCmZyAfDwLgGuMDVL7piCW5DqpC04Ks7M +Uj/r1O5hyMEjIzcdATVBMNJmdOPw7d0vqgBUizj0Y/e8RhmY8mkmy1zoI1HU7JfF +eKNnK/I2KYUop0qV0+bEFcu0RiEFVMP5cw4L2QAr1Y39XJNFU3v7IujRZXkxLn+H +6l4HiQJVBBABCAA/FiEE+/q9tUG13JVb2bpu2xbPW7ElJcQFAlkknnUhGmh0dHA6 +Ly9ncGcuZ2FubmVmZi5kZS9wb2xpY3kudHh0AAoJENsWz1uxJSXE0z8P/3wl5xqi +wO8sHcMtPXRoOMGRBGlXN/GWbEuqOxaN4lVko+sqGTineW0nk6bx9zhTFDCXjEpK +da6M8Tc7V/cQoEyrV7btFolrb1KPKl5cVTsxKbLSJO79VgN9CZdrv8xS1VsI6SW/ +7euwZmdjYCnOqs049uAxmeZU3HI/yjaOowhDDHAXRvzzbMTN5Y8aWqE1Sv/ndnb+ +qHDq0Xh6hX0iS+Szx7KIGDLsgPPPjvEfsfmXVhYrWPdB4KXIeOcISehblxxU9FCE +JmArB0txQtW595m/Gn5ntVbiyHhrhNlGYT+6D1Fsw3q1l9kIzj8ro2/yRcZ/JRot +w5j5bMbYatQGoxmaBr9AaHCyUmmQEwfQFqBDnOBrV2XwLlurIX3ZvkQQVy5e4ysp +9K8lAd5X4k3sKOSca9HooIcK8szc48aUijHabzOzU459qrds5iX10q0L5It1FqLp +obg2l3wLWU7XwAP6K7m6LcvSa+2QqJmh72SBLd6xPCQAdwwUgdfzjovxTpdQu+3u +5NX+ud4uc+WP8bEG1oT//H9cQ6ocRKXS9iGYby7LF0ykY1MVBI8KfQ7UyLWe/wZ/ +HlPBT2tFQ+8HoB1ZmtzsukaJcTiDtOcQGrIfgEs+bbw7mFKIDjI8OKZpZRlm+UAy +Vm4jG/OiHoxOcr29mYCUwAzLRpavE+L2/koGiQIzBBABCgAdFiEEgOl28UpQikjp +yj/pvDciUsoc+WQFAlkkgYkACgkQvDciUsoc+WQChQ/7BgfCpOAN2mmrSToaMY5C +UVsxw6GVa68gDJA6A1rFXq3cqI5KIj5lNZ+NQi5a9hUu/Ll0m5TN7bZQ8+wxre1U +GY1EnIUb1MFsL7r43dvYOifwV0jNci7+wfvU7slJWfwRlO+q9pwxseBRnGsxLgnf +p6ZK/VqzjMUBXzAdMxwqacaJITsgHHGqActsuTGlasOafTxSvWDjIM9O8+maOzAq +sTa9EXGQhASuzAnDaaW6L7etM6Icm//7cMz8oVnTPKIrqYsHTypIju5XXqHa6Y1D +jZlFcQe7aFbgyBufe4hNtcUHJxXpJHThmZVjJA0t8ofZ8tPWScRDrphMTPfGzVZS +TPUKn+WbkD7w9H7fjQcaCH6YKoJx3tIYzLuDStS/+SLqF45eJp5Miws7AYJCZ2u6 +vJ/8kDVByVPW4Xlq+nmi2RPG7Ym6NcmjG6FUFNUs4PPPfVn7cdLLcnNNriV8hyOJ +T+NnXISSLo20F9buHMl28YqBb7sXmM71lr4kbjNKi0IWUOb+uZcgzMnJPjegR0hT +GWbN5TmZnQ0lxYU2gr+t9F5DewTfMZMqE70T5eNfSyfr9iCEt8pp6GsjQlFglYZr +30bcoLI8IYvS5VOvHAtWrOe35UgLXT8iB0pdCDcVbdA4ZaUaSR6hH26RZgPu4dRx +9flHYtovRX1rDB9Ujc2d3JuJAhwEEAEIAAYFAlkl7L0ACgkQEbTl/xWw/YJo3BAA +jRFiSZPG8SH2QQ1XWF0RREv/yWO95HkZdTHY/yDNfB94YLVCSqWDfO7QepCE2SUp +4+eBdKUSUk6sICQL5gQ3D6PpSLMPaiJ9QoUi7JU6pT9xlrdFIfwC/zZypsfDQ8Gb +L0xZPuXEurcR6YArCFHxtACKSxcUBqvpb2YL9fOEQqVzq90yWxQYsX+xlOpXAXXe +ITwbjgT0E6izN0ucYthhvBM0nw3Ma+v1C4o590MzAFefKaA8kQ2xrO/NIQVwD4qI +MQh+Cshq7UZXM8LRa3gxaMvglMKeeyFHXPP1V+AKsQ5KmPlzYKFe+Fam85FZOF8i +0OrlYcuJ6ZCSXFY9Yfr4GFrkLNsyWfSdv20JVi5U5LWJj4kArw8vc09zVxnpw5IK +4TNxhg68Pho5/XES4upBQkWAzukwOKUVjzCaZkj9Kbos7MO5D4w9DZjGD5sosob/ +aLPznRqrhGX7KIVeqUDn5gavtIjk6mZBMpdDGi9GQ6ObuHUnDKyf0K4gYQ40NVGD +e1KidJmRoLgdWph2NNP1tuLQcq6dzCdC5Oryu0yCLFXnxHURkIDTT6mKCtJ6rEsk +O+s6+3yOB2FXv+oF1L/rUzv+dZsvKQR7T9odOITuQ/LGs9whGTG0sqpbCjyhCwt7 +2xy95fIpPdQ1Uhzcu9N/XZPRYY5IYR0NUDEUen9QAHWJAhwEEwEKAAYFAlkmhFEA +CgkQdjjQRCuQ0BAjWxAAjIMwo5CFvImdmyiSfDLPezHLFL49FbLGIENr6E0xcAKo +kPj5s3mCZ0dbCV32yrMBBIllHNrJ1dnv3+VQAwJFQNaTKZbej15zUL5RvBxZlaN5 +RNlf/vYD9Llm0fWiwMXpm0ep2ID2T93i1wGyYt1FnlQ58fO2Qye3h1Kp4qAQjDMR +k2jjePqwx06QkC9+R21XK78RezgmtVb9BPTVNnUazzREcq1/mVfratAnlR+Arh63 +80E63Glwc9vNqzkuYA1ilTodzPCXk9vEA2gD31L1gCu3YP0kqe5aHB1R6y1cFvQz +0Il/P4lyMBm3eTWZ09961Eopl0kLMPFFZkGw2ev4OB1wa0IAdugBTpCqc6lx/CY8 +mt/s6mEVxvzI4ljNgKPyyLaBZUOY0gtEgwmpE63njMWmuFxDOls7WuP45WEuRoOB +OJkwtYNNpaghN2K/qWEgLtU76Nq64DGkjFd8xVdEccgmYxquQtrXEKj+2E5G8NOx +tZeH0HrVcOfXHTMNx9UoZRP00VSycctkDwt0NBrDqA+o0Djkdql01YLUFOmOYe+U +Z7vxNZIfQkGr2ynnAiqIchMuoz4/IUBLJ0HKasEf62NYluPrcbh2giTTYKtDkZqA +eFB6lLxyTiZ3vDTE5a9lPrKt/p1JBhW5/S2BHWJjDMDO9ut4a8MWfw84u2ZwNuOJ +AhwEEwEKAAYFAlkmhVkACgkQnW2Pa8hXyQagAxAAvhC1r8xGL31TWdusrNWzh7jD +h1qWOMY/cvWmU5Jj10OG2O9oBa7hhm8g/bj8a3rVPEFPwdzJQNEG1MKinVkRjgTP +ST9QHNuUP2sPtVsq/Y5HxFV8prCKXZ5hiVBLgORpSLF/kUh54dGhiFjycUoTFn0g +MkaNArvkAGWpqjFgeQxW+Y15DHj4c1EwcSIKrcpDMyVqlZD96bbkLL7kTQ4zCMlJ +irezEANgEXUYz0RD4NcWGHaT+GFVJfI+Mq4P17FltpHZyTtWbBmkzvJ4y6tbvxQt +mKpDR4z88nstjCSXDjU4nOZL7Bifoi8ztV4uLzJ00dC6ivFmTCQyCqXCHPMvT3dj +9Byr+cMWBGSfM198/oUh++eYW8dp0wjNtIrnJaqnLICzvBg5OucxzRVa4ZMPPx9+ +4jYjdsNsYg+oiZE5ljW1Ig8CBcCyVjNSUBDrRbb9vp1up/ByC3oxD8Uy3wETc7C7 +AMJ8H+RH/6J+HrE3im0HB22XiR4TtKgOuLQxGVO+aXEhdGdxFdWZUDdulC+feWc8 +acVkRvlIYF2Bfxs1Ecee/BkP7++kWZJ9o9Nl1HEpv+spDoxpzL4VRNF3U84InaCb +wX17GLuVj07bk06ag44ZHmXwM/GSRn4ITwEVSKKoBCcvJGnRROA0n1a5+v7XSMvT +9Q0gJj1rzlA9VNgS7Pi5Ag0EWSMwTgEQAMkD4hfHi8rZYM4I8V+vJp8feW93+Oiq +caVzQygYKs+/dbr9favoHttNxOF8eBMIwkQgQlBIYehcHAnhnhuCP6s16tnM2lF6 +52s4c7DV4Fodo53Q+sqzPth/dH76NOeUAzSj3KPfD9YblrB+J2Z14PP2ObfvO8k/ +SghaCEPZ8geq5DZjTAs1YU5xYlawVJCvoQnb2TKEXbUrMOqAX/ysOwk3DrIo78h1 +HvGShBuHf08gOtv8Fm2pKdkPHzr/QI0/atFoRn793W74n4Qc2mwrDUUQds7oZ1IX +tXeIHlVV8Z13no4qA7FRNL40/vBfKuPFAPZGt17k946L2LL5Lxu43eVFIbW2jAod +tV3NxAYu5JAYIYOawZO0p9OZJdZ8sTg5KOhBfyfO4pFyc/FaOhxv3SVqhRZAuHTe +6OSKLUMcV/7Yrb1hClSXtZcuTEZfaqDksoGg/QDHuYcnAtD7NWEEgEfuL2KYXudw +GIjRQSUUMWv4Fw+BT50f3PHSH+lns/vQXxEaKDiGacKOC+FEHs9jTvWl9+phyzCK +4CfTgZagW6gsvfPc/0fg2a/TaTzj4Y48KbENcBc+x2IwowRZAtSI+LsgH8puKMbQ +7oRRnVdt2LqkWtzBoTcc4r5r4m+eGZ8/qsB1n69bS+MNWZtusaBeaQHGFv4d9rIC +0QOzwZLX5EE1ABEBAAGJBHIEGAEKACYWIQThzyDd/+S4noAmWPHgsRiU9mrsmAUC +WSMwTgIbAgUJDwmcAAJACRDgsRiU9mrsmMF0IAQZAQoAHRYhBBbpCz/fZe3jqn8y +PATucje31FPsBQJZIzBOAAoJEATucje31FPscu8P/0yRsvlQjY0q600VkxD8KciV +lvC7+xyrMBIal1ILjIpPlMeuWWpPE+Ffnry91m1GcAlXTfUf7NhZkqWfsyygqUGy +BJ7ydPox8rA4UXW3J31Em4Lgc0JwUFD/bFqz/iVVYCnaWYcoX/68CwaWRCjt67v3 +3vNCw97t/W40430HsmK+AC6HS6vV09KeYk5fhrORFBNGrZT7Bm7lsWGgaz+7pNGk +GE6k+K3sS6boGga1EGLA6YbaOEaIS6QJtpm4VEleFksj3JHK1TMN/QCnSGdy0/0b +qkF/TDcfqG9c1vCp9knWkCKQmi/nv2ay2v6ZAcICAY7sjibicmBd06uvfU1bhKB7 +nYC/i77l+IGKX5R/WvTrdb+J5qQhODF70Nr6HO6EsI4E4X541GRLgGMZYKbiu0Tb +uo1B7PSOrkddGUwxXjDBXM2ClcgPi8nL1irpleSAu89/B+Y+pr5IshaVmIP4+jCl +GDG18/kPryOFk0ACszjlX7eFMTFPUX0gl7qDRfVE1jKzPxf75gLoeIylYChMd17b +uQo8RsknkcvNgifdL4sRcbxOvhpERONK1MwR88K8C0GqJ61cIRMv8odMMpescww0 +5ECOpE+kl9PJcREnm8SVkclraWcQVEwGOkHtx5BsPqZplUEAIcJNXuvXm9kFkaVS +2SRvQyklI6/NQQZzK8SRwacQAIGFHV3eOtC0rdrnmnh2XCDeEN5iPCvVG723jIc2 +6aDR4a47zr9507TBLUxMPJQ6mB7imsEcWHfR48zARq8jMSj7ahfhIa1ixEksc943 +CxLrjPAWfAnog/2MYJdUw/nBjU4dqb53ssxD/F/c3LB+z/nCEaO2UgH2Kekh0KyV +KgwV0N8XcTB0UmGcH9J2DZ5/ZXRc2XiYWIDoJHs8thGxwsIYXEhYsgBwGu9Kil4t +LzFt4sluY0kvfrDHu+oYfcYBh5V7q6AQYBh8ujjAhKZUmlKtgay6IHkR65m8QI49 +ITdTQW+Y+orphcsdbvCm4IhXPgykLySouskwr7RuhPka0hKwDUt+0MHbBmAhfYnF +JC5o23tmgAq8l2WZbp6/uFZ+4E9UmvAI0RvQM/B3AxQBOCBOryGeaBwkJcsACm8V +ADWm+/OWK78kuval45wGQl9+TqqjRuwA9ESEUMgZnc33rVPM3h6gR8Rv/M77AjyM +88rGBLCWr7wNY4e3U34tH8jMFOMy9vN6l3kOR5/EFoXJJGehzE+xCyyeicY2HsJ5 +t5R/R6w23vgNqf6eBRQuDtym2rSuuiaCnvKEF3S9ng+phmm/eZadG7xOjERRPqqt +TP+zge55Q1B+P1HmllKlR6YLFyRuKOO1ZOVh4Ae2MS4oZybMQsTifjjiQ/8W8KJq +k5Bh +=3qWJ +-----END PGP PUBLIC KEY BLOCK----- diff --git a/t/recipes/checks/debian/upstream/signing-key/upstream-key-bloated/build-spec/fill-values b/t/recipes/checks/debian/upstream/signing-key/upstream-key-bloated/build-spec/fill-values new file mode 100644 index 0000000..9983ac1 --- /dev/null +++ b/t/recipes/checks/debian/upstream/signing-key/upstream-key-bloated/build-spec/fill-values @@ -0,0 +1,3 @@ +Testname: upstream-key-bloated +Skeleton: upload-non-native +Description: Check if public upstream signing key contains extra signatures diff --git a/t/recipes/checks/debian/upstream/signing-key/upstream-key-bloated/eval/desc b/t/recipes/checks/debian/upstream/signing-key/upstream-key-bloated/eval/desc new file mode 100644 index 0000000..9c407e3 --- /dev/null +++ b/t/recipes/checks/debian/upstream/signing-key/upstream-key-bloated/eval/desc @@ -0,0 +1,5 @@ +Testname: upstream-key-bloated +Test-Against: + public-upstream-key-unusable + public-upstream-keys-in-multiple-locations +Check: debian/upstream/signing-key diff --git a/t/recipes/checks/debian/upstream/signing-key/upstream-key-bloated/eval/hints b/t/recipes/checks/debian/upstream/signing-key/upstream-key-bloated/eval/hints new file mode 100644 index 0000000..9c5238e --- /dev/null +++ b/t/recipes/checks/debian/upstream/signing-key/upstream-key-bloated/eval/hints @@ -0,0 +1 @@ +upstream-key-bloated (source): public-upstream-key-not-minimal has 5 extra signature(s) for keyid E0B11894F66AEC98 [debian/upstream/signing-key.asc] diff --git a/t/recipes/checks/debian/upstream/signing-key/upstream-key-empty/build-spec/debian/upstream/signing-key.asc b/t/recipes/checks/debian/upstream/signing-key/upstream-key-empty/build-spec/debian/upstream/signing-key.asc new file mode 100644 index 0000000..e69de29 diff --git a/t/recipes/checks/debian/upstream/signing-key/upstream-key-empty/build-spec/fill-values b/t/recipes/checks/debian/upstream/signing-key/upstream-key-empty/build-spec/fill-values new file mode 100644 index 0000000..0d90cd0 --- /dev/null +++ b/t/recipes/checks/debian/upstream/signing-key/upstream-key-empty/build-spec/fill-values @@ -0,0 +1,4 @@ +Testname: upstream-key-empty +Skeleton: upload-non-native +Source-Format: 3.0 (quilt) +Description: Test with an empty public upstream signing key (requires source format 3.0) diff --git a/t/recipes/checks/debian/upstream/signing-key/upstream-key-empty/eval/desc b/t/recipes/checks/debian/upstream/signing-key/upstream-key-empty/eval/desc new file mode 100644 index 0000000..4e58f08 --- /dev/null +++ b/t/recipes/checks/debian/upstream/signing-key/upstream-key-empty/eval/desc @@ -0,0 +1,2 @@ +Testname: upstream-key-empty +Check: debian/upstream/signing-key diff --git a/t/recipes/checks/debian/upstream/signing-key/upstream-key-empty/eval/hints b/t/recipes/checks/debian/upstream/signing-key/upstream-key-empty/eval/hints new file mode 100644 index 0000000..b39ccf7 --- /dev/null +++ b/t/recipes/checks/debian/upstream/signing-key/upstream-key-empty/eval/hints @@ -0,0 +1 @@ +upstream-key-empty (source): public-upstream-key-unusable cannot be processed [debian/upstream/signing-key.asc] diff --git a/t/recipes/checks/debian/upstream/signing-key/upstream-key-minimal/build-spec/debian/upstream/signing-key.asc b/t/recipes/checks/debian/upstream/signing-key/upstream-key-minimal/build-spec/debian/upstream/signing-key.asc new file mode 100644 index 0000000..25cdc6a --- /dev/null +++ b/t/recipes/checks/debian/upstream/signing-key/upstream-key-minimal/build-spec/debian/upstream/signing-key.asc @@ -0,0 +1,101 @@ +-----BEGIN PGP PUBLIC KEY BLOCK----- + +mQINBFkjME4BEACatcbzE9EaIKMmiS3OmcrooZZUI4pGtJcFqCNBOP3qvxUEq9Tk +4XPY8EARDGdwy2rMc12ywoc5FMzNwXiC3RpUNHnNhY+zau18q9CQx8UR02NDFWQq +AwaDSF4WU1GBVBMWgtxfIwAQGl/qOr+aSVtJCnEOTA/YiZPNw/wpA7r2g6EHYcce +a5srr7F15a6OxzDdPXlfoJuoSXMZUHpJIqG0UOo7NPkxPGRoHO2yGPS1DWKy3egG +xm718DwaIWee+mfJrcqT0ZFH4n5po1BJVj+8TcqE4YlkN/z4p0zI/XAxNCR2wGV2 +6cCQ8laEgwG33rPp+N3G/FeJchYTFvL7zDtdYKbBPVeaJh2kROnqbVVN5kZBVEXB +QNbXKuK6/TPiQeI+8anA9WflI19lzkzl29L7hsM9ornk7+wtu9P2hu3eEUgjjBli +Ujisw8s0aTPB5QsMCjSownwZ0ucqj+07nYVsPU2wK8x6A7p6Cg2SCPnjbX8jUb3Z +wyn0yi4SWceW9a+LW6wdGarMGbu+Lm6in8pK93u7mE/D4AskUVz1yLyiNO9WBXPq +GyTocqXKXTutHKhhSwY9CyEw1+SRzXXyHPmRunRULTgZHLOaydK6ekzBOe1Yp9Zk +hLvon6fgOhJTsokv27QCSw8ILbQPGF9qJWFQfYZhT4QCufmPaFgBpJOdewARAQAB +iQJOBB8BCgA4FiEE4c8g3f/kuJ6AJljx4LEYlPZq7JgFAlkjMMkXDIABgOl28UpQ +ikjpyj/pvDciUsoc+WQCBwAACgkQ4LEYlPZq7JiCcw/+NxzyntWMM/b/eIMedzZK +Zyq7Mo6vgFxT57wAloMtLu0WS9oETTH/+/9+fHPmkYxCX1HTNKpdY2KbjiZC/gAY +vJ8iGWredwIls2UyW4fegzRLNvWLZmUBbLg0WaTIQ9JZwa2Rw/q6Z0pe0tfb44oX +lpps0WA/OZCWXYVO2rhOzoiQulqdmHgwdcLA29BnpqBY1R8/LMDsfPLnJu7AFqgM +CQpnjIGRH6ZxF2TNUSdljUbIOultEeIvxtxosF1u0r20mg46aaKDpr0ANiR/Ojaj +YoeHZc39fyubSrhIyQuk4rDisrJod63MJ9x9upAc9H3qz71QjpwpVXPDxereWULO +17qN3hjjZd23CBdRv8HjRKQoFagUnxlrat1t+/yJCENzX6eX8wBs0vVCSmbtbSp7 +y+0BK4fyjDKCdiyKh1TiAnQ1Po/xICGr4Sa6Wohq2TeWXz4VlRnaQeCIwa4Kk6T/ +3VTQbNxn7Uiy9ec8aR+1YMGUBDG/k3s6K1PWLdJtSVgao8MkQYeKcQk/sgGSFPh8 +SkTy7CnSjK/gQP8NC5fFDWpatGpnDr9qsQwzMnUVYWNZQMQ+LJHPnXRyusr3M+Gh +4muVW1wmyjNLhtEYjJJnbv9bVVv2HFVXOWGiXY4hnj01xkHf3885Qq5ORWl1FMnU +lcqUcFsB6a1CCPGxNTJQhgKJAk4EHwEKADgWIQThzyDd/+S4noAmWPHgsRiU9mrs +mAUCWSMwyRcMgAH7+r21QbXclVvZum7bFs9bsSUlxAIHAAAKCRDgsRiU9mrsmK2H +D/9frYP6KRecLNMzLJGe6MB/1DbqIud1/kzd/jHRo3e4Dz8cls29N03HskLE4jTf +BXKAhUmRI52aMCioY/K03rZLaR++/GMIdnF7O4Ks7P203J4/CudmXQvz3Rby22lC +RCp3Wsx2DqFgpc1V5SjmdDxzEs3fwKJ0B8YOMyibyUaLfwaxRfiTsWmRF192WzCM +/B1tmJDLIqwq/xxzxmiqzrxBWq3JIxH1PzrGbWvAE0gfBJHgw/2HHO4PAG9Lj+AV +HHPV/9xhXdbF/KnnKUGtd9lssNleWlc5LeM0ix2pU/QrZx7c+CBW+142jQcZ58X6 +QvHTKBkImI7y3kMCUOs+UbxKnFsRBRduMLvIpXJVXukV3QvRn+9riITPIcviF4ni +F6V2NQ+ONrvMOK2s6VdfgMS7c4Azuyt4SJSEzBhHu+VTVnMZCBiKvZtRL5XX85ZF +DDkN62Bwa+F36lTiOBWOecSQykCyOKcnn0jKrSgDOk08qE7Nzl2SPdlpza0/bk2u +6i8o3mrmdO02OqC9vJum6M4Pn2HHrkPzAtSs11E7ogcZghPxnGCekGQNekHx9DKM +mv8W+SZf4b1KD1EKECeNLZ0QHQMjU3AYBav+Mq9IXIlwFZL85BYLUAWfrCnqf/gV +CTiy9yKdQ4WIr9XR+zywDigAZqJ5PxwBh1+phrkoWUfsLokCTgQfAQoAOBYhBOHP +IN3/5LiegCZY8eCxGJT2auyYBQJZIzDJFwyAATCZEb6pZtBhMFMEVxG05f8VsP2C +AgcAAAoJEOCxGJT2auyYWHAP/jlmSZQI/dnrYTT0ZtZA0k3sCaaOApWmno4Jm1+p +QzxBJyVXC/7em3D/Wb3B4XpQKnkWOGz3XtEf4LNPhrW1n6nLFOLctprGwnlZihBp +tmidEvvFKCa5exv4WOVyat5jLttNJ6o4O0BJHmUJG/wAVSjfWi2KgVXZEnz/wts8 +KFXc06RCgavIATmlC5QqD87U5ezKJdY0HY/A8uT9aBJ3KFdzj5MnZOzr2RJcEtWU +UE1HHxqJS7POQVMUWK/7nABUKjzpQg8Hn7VNom553Lf8yk+OLl0x7+bS/8tZltZ/ +zkIqzUmpPk1QSf5b4JOryJye0ZV60TtbI7juXi2VV41gcHxd7EMkF4PAMtHF/rNM +n/sR4LLXPnQk71zqOScYpMBDQ0FikQ7UuUT35iJAX3u7mWYL0P4h3NBlPmRLg9W3 +k/g5KRBLJ2U9Ba+i3UIRva8tUGz/EluzOCUcSbIEMNkaNyt4ktO3PaIzAzdVdxYk +IWV6NUj92vSBJvXinzIjyXTk9Tjfuf4hLo15C+1c9P0+XkpKzpvW1ycpIUVH9QSZ +afC1e45EXSkD0AV+y6ihJf4PWddgGb3ZeWarcp2QL/ll3XoBdEGfxOQJ1Py2nfIS +HxVrl5AxoEJ9q+4YO5xysAV4f+UFKvS4snJtRztOYBKM0/4pup41u4V8oGWLRUOC +d/GitEdEZWJpYW4gQXJjaGl2ZSBBdXRvbWF0aWMgU2lnbmluZyBLZXkgKDkvc3Ry +ZXRjaCkgPGZ0cG1hc3RlckBkZWJpYW4ub3JnPokCVAQTAQoAPhYhBOHPIN3/5Lie +gCZY8eCxGJT2auyYBQJZIzBOAhsDBQkPCZwABQsJCAcDBRUKCQgLBRYCAwEAAh4B +AheAAAoJEOCxGJT2auyYKFoP/R5ijjBRlLpClTvhk5p1pE/cJbMAHd1Y7x09iSN3 +nT222tx4Zk3wVnP/1puJNkOxW7btMuUNz6Y4DolLpAa71hq3NOsTGz+5PL8ZFBoi +lIN2iOpfzqIFLASM0Pz6X+twV3ZyE1PZmfzLAu8OWm4kt1v3qJVtWN/5dHbjTqMt +vUc28VX1di51zWTs+3b/SDC+KN98i9W64JUiHPcLL6b2Y44fDszDDVVExwtPrPk0 +VU+et4/uWmhcdEIEb91MIEsLAUJIBqcGTZU7Gymxupa3vApT6UUxfNKkVCGDN5dk +zFKkS6p2NEQjtIPNAheBwUfHqSDeN+EW4IuQxHZ92o+XGFMHqU29Vy81sPkGvKkG +EIL12iMpW9hDTbjO/+v695o3tVo/h1b0NSZP3Jk4I3iDBpAcUEYarxoOung2K1fC +QYH7R+7hy3lnRP36s9za6rEbik0c4XRvyYaYq7npGEq4CqhcKgRhZqVcy2Zmymcw +MqR1wLSxEmbREQZfBCFh5zpVC+kmRHfXCmZyAfDwLgGuMDVL7piCW5DqpC04Ks7M +Uj/r1O5hyMEjIzcdATVBMNJmdOPw7d0vqgBUizj0Y/e8RhmY8mkmy1zoI1HU7JfF +eKNnK/I2KYUop0qV0+bEFcu0RiEFVMP5cw4L2QAr1Y39XJNFU3v7IujRZXkxLn+H +6l4HuQINBFkjME4BEADJA+IXx4vK2WDOCPFfryafH3lvd/joqnGlc0MoGCrPv3W6 +/X2r6B7bTcThfHgTCMJEIEJQSGHoXBwJ4Z4bgj+rNerZzNpReudrOHOw1eBaHaOd +0PrKsz7Yf3R++jTnlAM0o9yj3w/WG5awfidmdeDz9jm37zvJP0oIWghD2fIHquQ2 +Y0wLNWFOcWJWsFSQr6EJ29kyhF21KzDqgF/8rDsJNw6yKO/IdR7xkoQbh39PIDrb +/BZtqSnZDx86/0CNP2rRaEZ+/d1u+J+EHNpsKw1FEHbO6GdSF7V3iB5VVfGdd56O +KgOxUTS+NP7wXyrjxQD2Rrde5PeOi9iy+S8buN3lRSG1towKHbVdzcQGLuSQGCGD +msGTtKfTmSXWfLE4OSjoQX8nzuKRcnPxWjocb90laoUWQLh03ujkii1DHFf+2K29 +YQpUl7WXLkxGX2qg5LKBoP0Ax7mHJwLQ+zVhBIBH7i9imF7ncBiI0UElFDFr+BcP +gU+dH9zx0h/pZ7P70F8RGig4hmnCjgvhRB7PY071pffqYcswiuAn04GWoFuoLL3z +3P9H4Nmv02k84+GOPCmxDXAXPsdiMKMEWQLUiPi7IB/KbijG0O6EUZ1Xbdi6pFrc +waE3HOK+a+JvnhmfP6rAdZ+vW0vjDVmbbrGgXmkBxhb+HfayAtEDs8GS1+RBNQAR +AQABiQRyBBgBCgAmFiEE4c8g3f/kuJ6AJljx4LEYlPZq7JgFAlkjME4CGwIFCQ8J +nAACQAkQ4LEYlPZq7JjBdCAEGQEKAB0WIQQW6Qs/32Xt46p/MjwE7nI3t9RT7AUC +WSMwTgAKCRAE7nI3t9RT7HLvD/9MkbL5UI2NKutNFZMQ/CnIlZbwu/scqzASGpdS +C4yKT5THrllqTxPhX568vdZtRnAJV031H+zYWZKln7MsoKlBsgSe8nT6MfKwOFF1 +tyd9RJuC4HNCcFBQ/2xas/4lVWAp2lmHKF/+vAsGlkQo7eu7997zQsPe7f1uNON9 +B7JivgAuh0ur1dPSnmJOX4azkRQTRq2U+wZu5bFhoGs/u6TRpBhOpPit7Eum6BoG +tRBiwOmG2jhGiEukCbaZuFRJXhZLI9yRytUzDf0Ap0hnctP9G6pBf0w3H6hvXNbw +qfZJ1pAikJov579mstr+mQHCAgGO7I4m4nJgXdOrr31NW4Sge52Av4u+5fiBil+U +f1r063W/ieakITgxe9Da+hzuhLCOBOF+eNRkS4BjGWCm4rtE27qNQez0jq5HXRlM +MV4wwVzNgpXID4vJy9Yq6ZXkgLvPfwfmPqa+SLIWlZiD+PowpRgxtfP5D68jhZNA +ArM45V+3hTExT1F9IJe6g0X1RNYysz8X++YC6HiMpWAoTHde27kKPEbJJ5HLzYIn +3S+LEXG8Tr4aRETjStTMEfPCvAtBqietXCETL/KHTDKXrHMMNORAjqRPpJfTyXER +J5vElZHJa2lnEFRMBjpB7ceQbD6maZVBACHCTV7r15vZBZGlUtkkb0MpJSOvzUEG +cyvEkcGnEACBhR1d3jrQtK3a55p4dlwg3hDeYjwr1Ru9t4yHNumg0eGuO86/edO0 +wS1MTDyUOpge4prBHFh30ePMwEavIzEo+2oX4SGtYsRJLHPeNwsS64zwFnwJ6IP9 +jGCXVMP5wY1OHam+d7LMQ/xf3Nywfs/5whGjtlIB9inpIdCslSoMFdDfF3EwdFJh +nB/Sdg2ef2V0XNl4mFiA6CR7PLYRscLCGFxIWLIAcBrvSopeLS8xbeLJbmNJL36w +x7vqGH3GAYeVe6ugEGAYfLo4wISmVJpSrYGsuiB5EeuZvECOPSE3U0FvmPqK6YXL +HW7wpuCIVz4MpC8kqLrJMK+0boT5GtISsA1LftDB2wZgIX2JxSQuaNt7ZoAKvJdl +mW6ev7hWfuBPVJrwCNEb0DPwdwMUATggTq8hnmgcJCXLAApvFQA1pvvzliu/JLr2 +peOcBkJffk6qo0bsAPREhFDIGZ3N961TzN4eoEfEb/zO+wI8jPPKxgSwlq+8DWOH +t1N+LR/IzBTjMvbzepd5DkefxBaFySRnocxPsQssnonGNh7CebeUf0esNt74Dan+ +ngUULg7cptq0rromgp7yhBd0vZ4PqYZpv3mWnRu8ToxEUT6qrUz/s4HueUNQfj9R +5pZSpUemCxckbijjtWTlYeAHtjEuKGcmzELE4n444kP/FvCiapOQYQ== +=Gbbb +-----END PGP PUBLIC KEY BLOCK----- diff --git a/t/recipes/checks/debian/upstream/signing-key/upstream-key-minimal/build-spec/fill-values b/t/recipes/checks/debian/upstream/signing-key/upstream-key-minimal/build-spec/fill-values new file mode 100644 index 0000000..cd99595 --- /dev/null +++ b/t/recipes/checks/debian/upstream/signing-key/upstream-key-minimal/build-spec/fill-values @@ -0,0 +1,3 @@ +Testname: upstream-key-minimal +Skeleton: upload-non-native +Description: Test with a minimal public upstream signing key (false positive) diff --git a/t/recipes/checks/debian/upstream/signing-key/upstream-key-minimal/eval/desc b/t/recipes/checks/debian/upstream/signing-key/upstream-key-minimal/eval/desc new file mode 100644 index 0000000..87e5144 --- /dev/null +++ b/t/recipes/checks/debian/upstream/signing-key/upstream-key-minimal/eval/desc @@ -0,0 +1,4 @@ +Testname: upstream-key-minimal +Check: debian/upstream/signing-key +Test-Against: + public-upstream-key-not-minimal diff --git a/t/recipes/checks/debian/upstream/signing-key/upstream-key-minimal/eval/hints b/t/recipes/checks/debian/upstream/signing-key/upstream-key-minimal/eval/hints new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/t/recipes/checks/debian/upstream/signing-key/upstream-key-minimal/eval/hints @@ -0,0 +1 @@ + diff --git a/t/recipes/checks/debian/upstream/signing-key/upstream-key-multiple-locations/build-spec/debian/upstream-signing-key.pgp b/t/recipes/checks/debian/upstream/signing-key/upstream-key-multiple-locations/build-spec/debian/upstream-signing-key.pgp new file mode 100644 index 0000000..d83f52c --- /dev/null +++ b/t/recipes/checks/debian/upstream/signing-key/upstream-key-multiple-locations/build-spec/debian/upstream-signing-key.pgp @@ -0,0 +1,52 @@ +-----BEGIN PGP PUBLIC KEY BLOCK----- + +mQINBFpEMFgBEADNYEVhITIZ/rVECuLWxDJUk4rV+v6IfJCxJzuXRfqbjkdLNsCD +P83FOdvcxNQSrWPdSCgV1tDeDc18pNmfWDnu90zrLRipR1u7ln/ajTpx0RI7tHaO +SCIJfo42iw7firz9IoegqZaH8LKCh63EaXxLD98MgRA9fcBTEaBSD+Wxh8yYL/5b +bjdUu2FNNEi8f0POBAB3XInu80mqkEeVYPijd2T8Tc5xaxD90OBuuNGSiqKrJ+lB +9TSxwr5E/9N+6fnCjrR4FVkZtyTELAdZm4CpQN26tinVolG1gDpMz5B27471oXPY +9K92/UzTRllwuZ09pdBwpd4gu9mTXMLwOJ/S/+LJeSfCmby7QZiM/61NpS5EyaYg +h+m8YyTUtulFqpWd2HxttXz0ii5C01LKUrNPqlQrxmfrACJ1tHvcngVQm4wyqMHq +Uw5LYJ8FM7eS3JPeHpHqFGpY1VKx3nZAZGx+1As1ClvT7Og1KyuVY59w8qNaeJ8C +eA9XrwGVbMm9PiTP+fyBykMaYpf5aGucH+GeBtkvmpyOyXqf7zrOqyRvY0QaMgt1 +n3jXcD7AZKHCp0wY6LYVa/sKqrDJtxoloBA6kV2Ui3kClOWmlfvm+i1Ecg7vCG8d +QrJtZxo1Wu54dIr+g0qMFjlBA69OFYRXPzoaWFW1BKtNAYFoej9vW/f+0wARAQAB +tDtMaW50aWFuIFRlc3QgVXBzdHJlYW0gS2V5IChXb3JraW5nLCBObyBFeHBpcmF0 +aW9uLCBNaW5pbWFsKYkCTgQTAQoAOBYhBPr6VG+KNaSTu27AqFtc4nOV5lb+BQJa +RDBYAhsDBQsJCAcDBRUKCQgLBRYDAgEAAh4BAheAAAoJEFtc4nOV5lb+B3kQAMMm +umaOq12REmLdKWMN7GOsxzV6fTF5xBjTgKfY9DCBeNV7tSuJGpGT9MaxRD5Yu/1p +PDMGC9TkDxOEULBucmp7M//3FCuSnGQFBcObHNXY9FmLQ5MZJ32QUi8KLNIcDjuF +AKMEYJ5AT50pBsGyLVGXL27HWndNV7jMeIX64gIN5chPKMHqCn0g/wTTaPY/kkEs +MYirGmBQ83cIAv/1nywtIPeBnj+02Vu3B1hJIZYgmDQZwjZdd7HTxsVW0LAZEXs5 +gtWArfHO3zNKy6WkVE+xhNgZuVO3EyV46JW0bQ2RC7yY70/qFxX71co6p2+VaZgf +198QtRddq9cKaSe68BnZesIp9YnT3xJVYeL6IrrMYNIZxlslL4/b+gKU3epHyFes +tQP1tqkhnmC+Bxds6kx0ngPVfTfWM4Ruaeot51BuenZu82S1B3FB5B0qruCNyKre +nl53nPaNkOERPOF654AXoIODTgnyaocCaQTPztOYm52X8u9qogf9wf1eEA9EZIBI +WSbn3eCohN6qWvsdC0MMRDu0HB4S1QUyyOceNflXePg6SPvJSPHuOG/5DShcN6ah +mgVMH44ecAWsh/8Uj1+Z39Ea07nfE3lCU/WR+DXJb56WaQChXN7AKITrNRd/Q61X +jqrB6jWRSeVBKDidsFwI7oALdSgONE/ZEy+M4j76uQINBFpEMFgBEADCWJECQ6K1 +HgH7OwX7eY8ggEdCOYI/cTGx9rfzdqx67tc7fsF63BrO+nTHylcwXi9IAs695zvp +miCnCu1EUVjfM+nD52kocVEhzFc/lcCq6d9ac7H9ItJgf3Qc2HpwcqvsNUTWPDMU +VjQ8ciZ57qq601kIjVPuHjKRY96K9iHxUeVGh2n74JLYZL5IKO08WtQgPmPVLFDX +X2iZXnZdW/X4xTYB+/+V/D1LyUIP3X7CzBNzJuYjP3vGDH3h4ulLWnDSmxKs6Aep +a0sKu6+YD14/xXOi+buc0m6ghP7WePl9gYi6XePLdVPeLC9aiDi1tCWEVbbsinhw +ODxLwndXCGUc+AVySdUrUMuRchNRI6Z5PW/a/RsuVmyORg1RSuFGLeJQZj1pAw6x +WjxgioqoqydECIx4gCwGO/0GNZCfe5n11vuMEZ7SKbnrf5d58EQXOgV+yZumRKkz +OmdKICjql6w5CealrvP/si2kfD3oVwqBeuM0aM8HmWTfrdESWrd8xqAxBlcDsIun +mpsJ6obGN2mOaMFmOljukdzDFgMJMIrcS4UcGNzyQWUbz6JOSfPq96RkrTVsXMKy +40Ygtwe63PS9lXGT2ojmiV193UrGJqEUjuAL79KXWkxTRFxvFwck9qK5RAX2F1GQ +4ELDAFSKr8t6IpiYiTXaA3OTJfxJMK191QARAQABiQI2BBgBCgAgFiEE+vpUb4o1 +pJO7bsCoW1zic5XmVv4FAlpEMFgCGwwACgkQW1zic5XmVv4VEA//dOFj60ktKKsl +CgRdtnuo9Sdd7IjShic67qoT0gFZRiMATaryM4ifjAcl03rxzGk5MOsltHFJr5h+ +RmaudKhCyksd1nQ2dBpFgPHyxVTS5/k+wMelP9kPailqiGUA735SP5mO/28YOT8v +Xa4rwnTn6s9Ga7+lMN4I7LKRo47uGG89Og381tHSkW8DjFuLTme3TQDysG2MGlSY +vTPJmF7xPCuG3s8J5RIrVwWbN0orWen9YWT1923+0CAZG8M+7AFxU5xxCFIBRKMw +2tw/ovjtE9czuT743LMPlUJRc1pveYjVhLY9xUMQsPO6j41pdIL2X7txFjQqzjFl +hpIJviupVWlV0vSS0Q7nAtvLTsjhXSyQriKqmfdsdcxXBz7LGRxEi5l/9zuW5GMy +kD5ikQ05li6wkBdQYLS3ZBYkrj94LpNEqNZE3sfX33Yc5cpE2Bc4Ga+MxYxQwrfz +sNNSp8jdf2FyFvlvRkO8UUgsW5PPOuwthb05bx7dQGfKvqySpd0JLrhxw8G8odJh +PGzl0ig4F8xEitMc0lms5yzQGvtpEvSYLUs+4EJaf/XN9nRS+4e+GciTmp9XUM/5 +EtKOKXVuhHyaizqfpF4VR0Tbg65HHE3zLJMr7XTUGC0Zr+bj0n/V177R0XgptY7Y +jr6SfdNikIDjGYa+yuN6KGQsriza1aA= +=CYsi +-----END PGP PUBLIC KEY BLOCK----- diff --git a/t/recipes/checks/debian/upstream/signing-key/upstream-key-multiple-locations/build-spec/debian/upstream/signing-key.asc b/t/recipes/checks/debian/upstream/signing-key/upstream-key-multiple-locations/build-spec/debian/upstream/signing-key.asc new file mode 100644 index 0000000..d83f52c --- /dev/null +++ b/t/recipes/checks/debian/upstream/signing-key/upstream-key-multiple-locations/build-spec/debian/upstream/signing-key.asc @@ -0,0 +1,52 @@ +-----BEGIN PGP PUBLIC KEY BLOCK----- + +mQINBFpEMFgBEADNYEVhITIZ/rVECuLWxDJUk4rV+v6IfJCxJzuXRfqbjkdLNsCD +P83FOdvcxNQSrWPdSCgV1tDeDc18pNmfWDnu90zrLRipR1u7ln/ajTpx0RI7tHaO +SCIJfo42iw7firz9IoegqZaH8LKCh63EaXxLD98MgRA9fcBTEaBSD+Wxh8yYL/5b +bjdUu2FNNEi8f0POBAB3XInu80mqkEeVYPijd2T8Tc5xaxD90OBuuNGSiqKrJ+lB +9TSxwr5E/9N+6fnCjrR4FVkZtyTELAdZm4CpQN26tinVolG1gDpMz5B27471oXPY +9K92/UzTRllwuZ09pdBwpd4gu9mTXMLwOJ/S/+LJeSfCmby7QZiM/61NpS5EyaYg +h+m8YyTUtulFqpWd2HxttXz0ii5C01LKUrNPqlQrxmfrACJ1tHvcngVQm4wyqMHq +Uw5LYJ8FM7eS3JPeHpHqFGpY1VKx3nZAZGx+1As1ClvT7Og1KyuVY59w8qNaeJ8C +eA9XrwGVbMm9PiTP+fyBykMaYpf5aGucH+GeBtkvmpyOyXqf7zrOqyRvY0QaMgt1 +n3jXcD7AZKHCp0wY6LYVa/sKqrDJtxoloBA6kV2Ui3kClOWmlfvm+i1Ecg7vCG8d +QrJtZxo1Wu54dIr+g0qMFjlBA69OFYRXPzoaWFW1BKtNAYFoej9vW/f+0wARAQAB +tDtMaW50aWFuIFRlc3QgVXBzdHJlYW0gS2V5IChXb3JraW5nLCBObyBFeHBpcmF0 +aW9uLCBNaW5pbWFsKYkCTgQTAQoAOBYhBPr6VG+KNaSTu27AqFtc4nOV5lb+BQJa +RDBYAhsDBQsJCAcDBRUKCQgLBRYDAgEAAh4BAheAAAoJEFtc4nOV5lb+B3kQAMMm +umaOq12REmLdKWMN7GOsxzV6fTF5xBjTgKfY9DCBeNV7tSuJGpGT9MaxRD5Yu/1p +PDMGC9TkDxOEULBucmp7M//3FCuSnGQFBcObHNXY9FmLQ5MZJ32QUi8KLNIcDjuF +AKMEYJ5AT50pBsGyLVGXL27HWndNV7jMeIX64gIN5chPKMHqCn0g/wTTaPY/kkEs +MYirGmBQ83cIAv/1nywtIPeBnj+02Vu3B1hJIZYgmDQZwjZdd7HTxsVW0LAZEXs5 +gtWArfHO3zNKy6WkVE+xhNgZuVO3EyV46JW0bQ2RC7yY70/qFxX71co6p2+VaZgf +198QtRddq9cKaSe68BnZesIp9YnT3xJVYeL6IrrMYNIZxlslL4/b+gKU3epHyFes +tQP1tqkhnmC+Bxds6kx0ngPVfTfWM4Ruaeot51BuenZu82S1B3FB5B0qruCNyKre +nl53nPaNkOERPOF654AXoIODTgnyaocCaQTPztOYm52X8u9qogf9wf1eEA9EZIBI +WSbn3eCohN6qWvsdC0MMRDu0HB4S1QUyyOceNflXePg6SPvJSPHuOG/5DShcN6ah +mgVMH44ecAWsh/8Uj1+Z39Ea07nfE3lCU/WR+DXJb56WaQChXN7AKITrNRd/Q61X +jqrB6jWRSeVBKDidsFwI7oALdSgONE/ZEy+M4j76uQINBFpEMFgBEADCWJECQ6K1 +HgH7OwX7eY8ggEdCOYI/cTGx9rfzdqx67tc7fsF63BrO+nTHylcwXi9IAs695zvp +miCnCu1EUVjfM+nD52kocVEhzFc/lcCq6d9ac7H9ItJgf3Qc2HpwcqvsNUTWPDMU +VjQ8ciZ57qq601kIjVPuHjKRY96K9iHxUeVGh2n74JLYZL5IKO08WtQgPmPVLFDX +X2iZXnZdW/X4xTYB+/+V/D1LyUIP3X7CzBNzJuYjP3vGDH3h4ulLWnDSmxKs6Aep +a0sKu6+YD14/xXOi+buc0m6ghP7WePl9gYi6XePLdVPeLC9aiDi1tCWEVbbsinhw +ODxLwndXCGUc+AVySdUrUMuRchNRI6Z5PW/a/RsuVmyORg1RSuFGLeJQZj1pAw6x +WjxgioqoqydECIx4gCwGO/0GNZCfe5n11vuMEZ7SKbnrf5d58EQXOgV+yZumRKkz +OmdKICjql6w5CealrvP/si2kfD3oVwqBeuM0aM8HmWTfrdESWrd8xqAxBlcDsIun +mpsJ6obGN2mOaMFmOljukdzDFgMJMIrcS4UcGNzyQWUbz6JOSfPq96RkrTVsXMKy +40Ygtwe63PS9lXGT2ojmiV193UrGJqEUjuAL79KXWkxTRFxvFwck9qK5RAX2F1GQ +4ELDAFSKr8t6IpiYiTXaA3OTJfxJMK191QARAQABiQI2BBgBCgAgFiEE+vpUb4o1 +pJO7bsCoW1zic5XmVv4FAlpEMFgCGwwACgkQW1zic5XmVv4VEA//dOFj60ktKKsl +CgRdtnuo9Sdd7IjShic67qoT0gFZRiMATaryM4ifjAcl03rxzGk5MOsltHFJr5h+ +RmaudKhCyksd1nQ2dBpFgPHyxVTS5/k+wMelP9kPailqiGUA735SP5mO/28YOT8v +Xa4rwnTn6s9Ga7+lMN4I7LKRo47uGG89Og381tHSkW8DjFuLTme3TQDysG2MGlSY +vTPJmF7xPCuG3s8J5RIrVwWbN0orWen9YWT1923+0CAZG8M+7AFxU5xxCFIBRKMw +2tw/ovjtE9czuT743LMPlUJRc1pveYjVhLY9xUMQsPO6j41pdIL2X7txFjQqzjFl +hpIJviupVWlV0vSS0Q7nAtvLTsjhXSyQriKqmfdsdcxXBz7LGRxEi5l/9zuW5GMy +kD5ikQ05li6wkBdQYLS3ZBYkrj94LpNEqNZE3sfX33Yc5cpE2Bc4Ga+MxYxQwrfz +sNNSp8jdf2FyFvlvRkO8UUgsW5PPOuwthb05bx7dQGfKvqySpd0JLrhxw8G8odJh +PGzl0ig4F8xEitMc0lms5yzQGvtpEvSYLUs+4EJaf/XN9nRS+4e+GciTmp9XUM/5 +EtKOKXVuhHyaizqfpF4VR0Tbg65HHE3zLJMr7XTUGC0Zr+bj0n/V177R0XgptY7Y +jr6SfdNikIDjGYa+yuN6KGQsriza1aA= +=CYsi +-----END PGP PUBLIC KEY BLOCK----- diff --git a/t/recipes/checks/debian/upstream/signing-key/upstream-key-multiple-locations/build-spec/debian/watch b/t/recipes/checks/debian/upstream/signing-key/upstream-key-multiple-locations/build-spec/debian/watch new file mode 100644 index 0000000..8194d1c --- /dev/null +++ b/t/recipes/checks/debian/upstream/signing-key/upstream-key-multiple-locations/build-spec/debian/watch @@ -0,0 +1,5 @@ +version=4 \ + +opts=\ +pgpsigurlmangle=s/project-$1\.tar\.gz/project-$1\.tar\.gz\.asc/,\ + https://www.example.com/dist/ dh7-test\.([\d.]+)\.tar\.gz debian uupdate diff --git a/t/recipes/checks/debian/upstream/signing-key/upstream-key-multiple-locations/build-spec/fill-values b/t/recipes/checks/debian/upstream/signing-key/upstream-key-multiple-locations/build-spec/fill-values new file mode 100644 index 0000000..fd2f6c4 --- /dev/null +++ b/t/recipes/checks/debian/upstream/signing-key/upstream-key-multiple-locations/build-spec/fill-values @@ -0,0 +1,3 @@ +Testname: upstream-key-multiple-locations +Skeleton: upload-non-native +Description: Check if upstream signing keys are present in multiple locations diff --git a/t/recipes/checks/debian/upstream/signing-key/upstream-key-multiple-locations/eval/desc b/t/recipes/checks/debian/upstream/signing-key/upstream-key-multiple-locations/eval/desc new file mode 100644 index 0000000..71c877f --- /dev/null +++ b/t/recipes/checks/debian/upstream/signing-key/upstream-key-multiple-locations/eval/desc @@ -0,0 +1,2 @@ +Testname: upstream-key-multiple-locations +Check: debian/upstream/signing-key diff --git a/t/recipes/checks/debian/upstream/signing-key/upstream-key-multiple-locations/eval/hints b/t/recipes/checks/debian/upstream/signing-key/upstream-key-multiple-locations/eval/hints new file mode 100644 index 0000000..f6e6e54 --- /dev/null +++ b/t/recipes/checks/debian/upstream/signing-key/upstream-key-multiple-locations/eval/hints @@ -0,0 +1 @@ +upstream-key-multiple-locations (source): public-upstream-keys-in-multiple-locations upstream-signing-key.pgp upstream/signing-key.asc diff --git a/t/recipes/checks/debian/upstream/signing-key/upstream-key-native/build-spec/debian/upstream/signing-key.asc b/t/recipes/checks/debian/upstream/signing-key/upstream-key-native/build-spec/debian/upstream/signing-key.asc new file mode 100644 index 0000000..41c2c56 --- /dev/null +++ b/t/recipes/checks/debian/upstream/signing-key/upstream-key-native/build-spec/debian/upstream/signing-key.asc @@ -0,0 +1,160 @@ +-----BEGIN PGP PUBLIC KEY BLOCK----- + +mQINBFkjME4BEACatcbzE9EaIKMmiS3OmcrooZZUI4pGtJcFqCNBOP3qvxUEq9Tk +4XPY8EARDGdwy2rMc12ywoc5FMzNwXiC3RpUNHnNhY+zau18q9CQx8UR02NDFWQq +AwaDSF4WU1GBVBMWgtxfIwAQGl/qOr+aSVtJCnEOTA/YiZPNw/wpA7r2g6EHYcce +a5srr7F15a6OxzDdPXlfoJuoSXMZUHpJIqG0UOo7NPkxPGRoHO2yGPS1DWKy3egG +xm718DwaIWee+mfJrcqT0ZFH4n5po1BJVj+8TcqE4YlkN/z4p0zI/XAxNCR2wGV2 +6cCQ8laEgwG33rPp+N3G/FeJchYTFvL7zDtdYKbBPVeaJh2kROnqbVVN5kZBVEXB +QNbXKuK6/TPiQeI+8anA9WflI19lzkzl29L7hsM9ornk7+wtu9P2hu3eEUgjjBli +Ujisw8s0aTPB5QsMCjSownwZ0ucqj+07nYVsPU2wK8x6A7p6Cg2SCPnjbX8jUb3Z +wyn0yi4SWceW9a+LW6wdGarMGbu+Lm6in8pK93u7mE/D4AskUVz1yLyiNO9WBXPq +GyTocqXKXTutHKhhSwY9CyEw1+SRzXXyHPmRunRULTgZHLOaydK6ekzBOe1Yp9Zk +hLvon6fgOhJTsokv27QCSw8ILbQPGF9qJWFQfYZhT4QCufmPaFgBpJOdewARAQAB +iQJOBB8BCgA4FiEE4c8g3f/kuJ6AJljx4LEYlPZq7JgFAlkjMMkXDIABgOl28UpQ +ikjpyj/pvDciUsoc+WQCBwAACgkQ4LEYlPZq7JiCcw/+NxzyntWMM/b/eIMedzZK +Zyq7Mo6vgFxT57wAloMtLu0WS9oETTH/+/9+fHPmkYxCX1HTNKpdY2KbjiZC/gAY +vJ8iGWredwIls2UyW4fegzRLNvWLZmUBbLg0WaTIQ9JZwa2Rw/q6Z0pe0tfb44oX +lpps0WA/OZCWXYVO2rhOzoiQulqdmHgwdcLA29BnpqBY1R8/LMDsfPLnJu7AFqgM +CQpnjIGRH6ZxF2TNUSdljUbIOultEeIvxtxosF1u0r20mg46aaKDpr0ANiR/Ojaj +YoeHZc39fyubSrhIyQuk4rDisrJod63MJ9x9upAc9H3qz71QjpwpVXPDxereWULO +17qN3hjjZd23CBdRv8HjRKQoFagUnxlrat1t+/yJCENzX6eX8wBs0vVCSmbtbSp7 +y+0BK4fyjDKCdiyKh1TiAnQ1Po/xICGr4Sa6Wohq2TeWXz4VlRnaQeCIwa4Kk6T/ +3VTQbNxn7Uiy9ec8aR+1YMGUBDG/k3s6K1PWLdJtSVgao8MkQYeKcQk/sgGSFPh8 +SkTy7CnSjK/gQP8NC5fFDWpatGpnDr9qsQwzMnUVYWNZQMQ+LJHPnXRyusr3M+Gh +4muVW1wmyjNLhtEYjJJnbv9bVVv2HFVXOWGiXY4hnj01xkHf3885Qq5ORWl1FMnU +lcqUcFsB6a1CCPGxNTJQhgKJAk4EHwEKADgWIQThzyDd/+S4noAmWPHgsRiU9mrs +mAUCWSMwyRcMgAH7+r21QbXclVvZum7bFs9bsSUlxAIHAAAKCRDgsRiU9mrsmK2H +D/9frYP6KRecLNMzLJGe6MB/1DbqIud1/kzd/jHRo3e4Dz8cls29N03HskLE4jTf +BXKAhUmRI52aMCioY/K03rZLaR++/GMIdnF7O4Ks7P203J4/CudmXQvz3Rby22lC +RCp3Wsx2DqFgpc1V5SjmdDxzEs3fwKJ0B8YOMyibyUaLfwaxRfiTsWmRF192WzCM +/B1tmJDLIqwq/xxzxmiqzrxBWq3JIxH1PzrGbWvAE0gfBJHgw/2HHO4PAG9Lj+AV +HHPV/9xhXdbF/KnnKUGtd9lssNleWlc5LeM0ix2pU/QrZx7c+CBW+142jQcZ58X6 +QvHTKBkImI7y3kMCUOs+UbxKnFsRBRduMLvIpXJVXukV3QvRn+9riITPIcviF4ni +F6V2NQ+ONrvMOK2s6VdfgMS7c4Azuyt4SJSEzBhHu+VTVnMZCBiKvZtRL5XX85ZF +DDkN62Bwa+F36lTiOBWOecSQykCyOKcnn0jKrSgDOk08qE7Nzl2SPdlpza0/bk2u +6i8o3mrmdO02OqC9vJum6M4Pn2HHrkPzAtSs11E7ogcZghPxnGCekGQNekHx9DKM +mv8W+SZf4b1KD1EKECeNLZ0QHQMjU3AYBav+Mq9IXIlwFZL85BYLUAWfrCnqf/gV +CTiy9yKdQ4WIr9XR+zywDigAZqJ5PxwBh1+phrkoWUfsLokCTgQfAQoAOBYhBOHP +IN3/5LiegCZY8eCxGJT2auyYBQJZIzDJFwyAATCZEb6pZtBhMFMEVxG05f8VsP2C +AgcAAAoJEOCxGJT2auyYWHAP/jlmSZQI/dnrYTT0ZtZA0k3sCaaOApWmno4Jm1+p +QzxBJyVXC/7em3D/Wb3B4XpQKnkWOGz3XtEf4LNPhrW1n6nLFOLctprGwnlZihBp +tmidEvvFKCa5exv4WOVyat5jLttNJ6o4O0BJHmUJG/wAVSjfWi2KgVXZEnz/wts8 +KFXc06RCgavIATmlC5QqD87U5ezKJdY0HY/A8uT9aBJ3KFdzj5MnZOzr2RJcEtWU +UE1HHxqJS7POQVMUWK/7nABUKjzpQg8Hn7VNom553Lf8yk+OLl0x7+bS/8tZltZ/ +zkIqzUmpPk1QSf5b4JOryJye0ZV60TtbI7juXi2VV41gcHxd7EMkF4PAMtHF/rNM +n/sR4LLXPnQk71zqOScYpMBDQ0FikQ7UuUT35iJAX3u7mWYL0P4h3NBlPmRLg9W3 +k/g5KRBLJ2U9Ba+i3UIRva8tUGz/EluzOCUcSbIEMNkaNyt4ktO3PaIzAzdVdxYk +IWV6NUj92vSBJvXinzIjyXTk9Tjfuf4hLo15C+1c9P0+XkpKzpvW1ycpIUVH9QSZ +afC1e45EXSkD0AV+y6ihJf4PWddgGb3ZeWarcp2QL/ll3XoBdEGfxOQJ1Py2nfIS +HxVrl5AxoEJ9q+4YO5xysAV4f+UFKvS4snJtRztOYBKM0/4pup41u4V8oGWLRUOC +d/GitEdEZWJpYW4gQXJjaGl2ZSBBdXRvbWF0aWMgU2lnbmluZyBLZXkgKDkvc3Ry +ZXRjaCkgPGZ0cG1hc3RlckBkZWJpYW4ub3JnPokCVAQTAQoAPhYhBOHPIN3/5Lie +gCZY8eCxGJT2auyYBQJZIzBOAhsDBQkPCZwABQsJCAcDBRUKCQgLBRYCAwEAAh4B +AheAAAoJEOCxGJT2auyYKFoP/R5ijjBRlLpClTvhk5p1pE/cJbMAHd1Y7x09iSN3 +nT222tx4Zk3wVnP/1puJNkOxW7btMuUNz6Y4DolLpAa71hq3NOsTGz+5PL8ZFBoi +lIN2iOpfzqIFLASM0Pz6X+twV3ZyE1PZmfzLAu8OWm4kt1v3qJVtWN/5dHbjTqMt +vUc28VX1di51zWTs+3b/SDC+KN98i9W64JUiHPcLL6b2Y44fDszDDVVExwtPrPk0 +VU+et4/uWmhcdEIEb91MIEsLAUJIBqcGTZU7Gymxupa3vApT6UUxfNKkVCGDN5dk +zFKkS6p2NEQjtIPNAheBwUfHqSDeN+EW4IuQxHZ92o+XGFMHqU29Vy81sPkGvKkG +EIL12iMpW9hDTbjO/+v695o3tVo/h1b0NSZP3Jk4I3iDBpAcUEYarxoOung2K1fC +QYH7R+7hy3lnRP36s9za6rEbik0c4XRvyYaYq7npGEq4CqhcKgRhZqVcy2Zmymcw +MqR1wLSxEmbREQZfBCFh5zpVC+kmRHfXCmZyAfDwLgGuMDVL7piCW5DqpC04Ks7M +Uj/r1O5hyMEjIzcdATVBMNJmdOPw7d0vqgBUizj0Y/e8RhmY8mkmy1zoI1HU7JfF +eKNnK/I2KYUop0qV0+bEFcu0RiEFVMP5cw4L2QAr1Y39XJNFU3v7IujRZXkxLn+H +6l4HiQJVBBABCAA/FiEE+/q9tUG13JVb2bpu2xbPW7ElJcQFAlkknnUhGmh0dHA6 +Ly9ncGcuZ2FubmVmZi5kZS9wb2xpY3kudHh0AAoJENsWz1uxJSXE0z8P/3wl5xqi +wO8sHcMtPXRoOMGRBGlXN/GWbEuqOxaN4lVko+sqGTineW0nk6bx9zhTFDCXjEpK +da6M8Tc7V/cQoEyrV7btFolrb1KPKl5cVTsxKbLSJO79VgN9CZdrv8xS1VsI6SW/ +7euwZmdjYCnOqs049uAxmeZU3HI/yjaOowhDDHAXRvzzbMTN5Y8aWqE1Sv/ndnb+ +qHDq0Xh6hX0iS+Szx7KIGDLsgPPPjvEfsfmXVhYrWPdB4KXIeOcISehblxxU9FCE +JmArB0txQtW595m/Gn5ntVbiyHhrhNlGYT+6D1Fsw3q1l9kIzj8ro2/yRcZ/JRot +w5j5bMbYatQGoxmaBr9AaHCyUmmQEwfQFqBDnOBrV2XwLlurIX3ZvkQQVy5e4ysp +9K8lAd5X4k3sKOSca9HooIcK8szc48aUijHabzOzU459qrds5iX10q0L5It1FqLp +obg2l3wLWU7XwAP6K7m6LcvSa+2QqJmh72SBLd6xPCQAdwwUgdfzjovxTpdQu+3u +5NX+ud4uc+WP8bEG1oT//H9cQ6ocRKXS9iGYby7LF0ykY1MVBI8KfQ7UyLWe/wZ/ +HlPBT2tFQ+8HoB1ZmtzsukaJcTiDtOcQGrIfgEs+bbw7mFKIDjI8OKZpZRlm+UAy +Vm4jG/OiHoxOcr29mYCUwAzLRpavE+L2/koGiQIzBBABCgAdFiEEgOl28UpQikjp +yj/pvDciUsoc+WQFAlkkgYkACgkQvDciUsoc+WQChQ/7BgfCpOAN2mmrSToaMY5C +UVsxw6GVa68gDJA6A1rFXq3cqI5KIj5lNZ+NQi5a9hUu/Ll0m5TN7bZQ8+wxre1U +GY1EnIUb1MFsL7r43dvYOifwV0jNci7+wfvU7slJWfwRlO+q9pwxseBRnGsxLgnf +p6ZK/VqzjMUBXzAdMxwqacaJITsgHHGqActsuTGlasOafTxSvWDjIM9O8+maOzAq +sTa9EXGQhASuzAnDaaW6L7etM6Icm//7cMz8oVnTPKIrqYsHTypIju5XXqHa6Y1D +jZlFcQe7aFbgyBufe4hNtcUHJxXpJHThmZVjJA0t8ofZ8tPWScRDrphMTPfGzVZS +TPUKn+WbkD7w9H7fjQcaCH6YKoJx3tIYzLuDStS/+SLqF45eJp5Miws7AYJCZ2u6 +vJ/8kDVByVPW4Xlq+nmi2RPG7Ym6NcmjG6FUFNUs4PPPfVn7cdLLcnNNriV8hyOJ +T+NnXISSLo20F9buHMl28YqBb7sXmM71lr4kbjNKi0IWUOb+uZcgzMnJPjegR0hT +GWbN5TmZnQ0lxYU2gr+t9F5DewTfMZMqE70T5eNfSyfr9iCEt8pp6GsjQlFglYZr +30bcoLI8IYvS5VOvHAtWrOe35UgLXT8iB0pdCDcVbdA4ZaUaSR6hH26RZgPu4dRx +9flHYtovRX1rDB9Ujc2d3JuJAhwEEAEIAAYFAlkl7L0ACgkQEbTl/xWw/YJo3BAA +jRFiSZPG8SH2QQ1XWF0RREv/yWO95HkZdTHY/yDNfB94YLVCSqWDfO7QepCE2SUp +4+eBdKUSUk6sICQL5gQ3D6PpSLMPaiJ9QoUi7JU6pT9xlrdFIfwC/zZypsfDQ8Gb +L0xZPuXEurcR6YArCFHxtACKSxcUBqvpb2YL9fOEQqVzq90yWxQYsX+xlOpXAXXe +ITwbjgT0E6izN0ucYthhvBM0nw3Ma+v1C4o590MzAFefKaA8kQ2xrO/NIQVwD4qI +MQh+Cshq7UZXM8LRa3gxaMvglMKeeyFHXPP1V+AKsQ5KmPlzYKFe+Fam85FZOF8i +0OrlYcuJ6ZCSXFY9Yfr4GFrkLNsyWfSdv20JVi5U5LWJj4kArw8vc09zVxnpw5IK +4TNxhg68Pho5/XES4upBQkWAzukwOKUVjzCaZkj9Kbos7MO5D4w9DZjGD5sosob/ +aLPznRqrhGX7KIVeqUDn5gavtIjk6mZBMpdDGi9GQ6ObuHUnDKyf0K4gYQ40NVGD +e1KidJmRoLgdWph2NNP1tuLQcq6dzCdC5Oryu0yCLFXnxHURkIDTT6mKCtJ6rEsk +O+s6+3yOB2FXv+oF1L/rUzv+dZsvKQR7T9odOITuQ/LGs9whGTG0sqpbCjyhCwt7 +2xy95fIpPdQ1Uhzcu9N/XZPRYY5IYR0NUDEUen9QAHWJAhwEEwEKAAYFAlkmhFEA +CgkQdjjQRCuQ0BAjWxAAjIMwo5CFvImdmyiSfDLPezHLFL49FbLGIENr6E0xcAKo +kPj5s3mCZ0dbCV32yrMBBIllHNrJ1dnv3+VQAwJFQNaTKZbej15zUL5RvBxZlaN5 +RNlf/vYD9Llm0fWiwMXpm0ep2ID2T93i1wGyYt1FnlQ58fO2Qye3h1Kp4qAQjDMR +k2jjePqwx06QkC9+R21XK78RezgmtVb9BPTVNnUazzREcq1/mVfratAnlR+Arh63 +80E63Glwc9vNqzkuYA1ilTodzPCXk9vEA2gD31L1gCu3YP0kqe5aHB1R6y1cFvQz +0Il/P4lyMBm3eTWZ09961Eopl0kLMPFFZkGw2ev4OB1wa0IAdugBTpCqc6lx/CY8 +mt/s6mEVxvzI4ljNgKPyyLaBZUOY0gtEgwmpE63njMWmuFxDOls7WuP45WEuRoOB +OJkwtYNNpaghN2K/qWEgLtU76Nq64DGkjFd8xVdEccgmYxquQtrXEKj+2E5G8NOx +tZeH0HrVcOfXHTMNx9UoZRP00VSycctkDwt0NBrDqA+o0Djkdql01YLUFOmOYe+U +Z7vxNZIfQkGr2ynnAiqIchMuoz4/IUBLJ0HKasEf62NYluPrcbh2giTTYKtDkZqA +eFB6lLxyTiZ3vDTE5a9lPrKt/p1JBhW5/S2BHWJjDMDO9ut4a8MWfw84u2ZwNuOJ +AhwEEwEKAAYFAlkmhVkACgkQnW2Pa8hXyQagAxAAvhC1r8xGL31TWdusrNWzh7jD +h1qWOMY/cvWmU5Jj10OG2O9oBa7hhm8g/bj8a3rVPEFPwdzJQNEG1MKinVkRjgTP +ST9QHNuUP2sPtVsq/Y5HxFV8prCKXZ5hiVBLgORpSLF/kUh54dGhiFjycUoTFn0g +MkaNArvkAGWpqjFgeQxW+Y15DHj4c1EwcSIKrcpDMyVqlZD96bbkLL7kTQ4zCMlJ +irezEANgEXUYz0RD4NcWGHaT+GFVJfI+Mq4P17FltpHZyTtWbBmkzvJ4y6tbvxQt +mKpDR4z88nstjCSXDjU4nOZL7Bifoi8ztV4uLzJ00dC6ivFmTCQyCqXCHPMvT3dj +9Byr+cMWBGSfM198/oUh++eYW8dp0wjNtIrnJaqnLICzvBg5OucxzRVa4ZMPPx9+ +4jYjdsNsYg+oiZE5ljW1Ig8CBcCyVjNSUBDrRbb9vp1up/ByC3oxD8Uy3wETc7C7 +AMJ8H+RH/6J+HrE3im0HB22XiR4TtKgOuLQxGVO+aXEhdGdxFdWZUDdulC+feWc8 +acVkRvlIYF2Bfxs1Ecee/BkP7++kWZJ9o9Nl1HEpv+spDoxpzL4VRNF3U84InaCb +wX17GLuVj07bk06ag44ZHmXwM/GSRn4ITwEVSKKoBCcvJGnRROA0n1a5+v7XSMvT +9Q0gJj1rzlA9VNgS7Pi5Ag0EWSMwTgEQAMkD4hfHi8rZYM4I8V+vJp8feW93+Oiq +caVzQygYKs+/dbr9favoHttNxOF8eBMIwkQgQlBIYehcHAnhnhuCP6s16tnM2lF6 +52s4c7DV4Fodo53Q+sqzPth/dH76NOeUAzSj3KPfD9YblrB+J2Z14PP2ObfvO8k/ +SghaCEPZ8geq5DZjTAs1YU5xYlawVJCvoQnb2TKEXbUrMOqAX/ysOwk3DrIo78h1 +HvGShBuHf08gOtv8Fm2pKdkPHzr/QI0/atFoRn793W74n4Qc2mwrDUUQds7oZ1IX +tXeIHlVV8Z13no4qA7FRNL40/vBfKuPFAPZGt17k946L2LL5Lxu43eVFIbW2jAod +tV3NxAYu5JAYIYOawZO0p9OZJdZ8sTg5KOhBfyfO4pFyc/FaOhxv3SVqhRZAuHTe +6OSKLUMcV/7Yrb1hClSXtZcuTEZfaqDksoGg/QDHuYcnAtD7NWEEgEfuL2KYXudw +GIjRQSUUMWv4Fw+BT50f3PHSH+lns/vQXxEaKDiGacKOC+FEHs9jTvWl9+phyzCK +4CfTgZagW6gsvfPc/0fg2a/TaTzj4Y48KbENcBc+x2IwowRZAtSI+LsgH8puKMbQ +7oRRnVdt2LqkWtzBoTcc4r5r4m+eGZ8/qsB1n69bS+MNWZtusaBeaQHGFv4d9rIC +0QOzwZLX5EE1ABEBAAGJBHIEGAEKACYWIQThzyDd/+S4noAmWPHgsRiU9mrsmAUC +WSMwTgIbAgUJDwmcAAJACRDgsRiU9mrsmMF0IAQZAQoAHRYhBBbpCz/fZe3jqn8y +PATucje31FPsBQJZIzBOAAoJEATucje31FPscu8P/0yRsvlQjY0q600VkxD8KciV +lvC7+xyrMBIal1ILjIpPlMeuWWpPE+Ffnry91m1GcAlXTfUf7NhZkqWfsyygqUGy +BJ7ydPox8rA4UXW3J31Em4Lgc0JwUFD/bFqz/iVVYCnaWYcoX/68CwaWRCjt67v3 +3vNCw97t/W40430HsmK+AC6HS6vV09KeYk5fhrORFBNGrZT7Bm7lsWGgaz+7pNGk +GE6k+K3sS6boGga1EGLA6YbaOEaIS6QJtpm4VEleFksj3JHK1TMN/QCnSGdy0/0b +qkF/TDcfqG9c1vCp9knWkCKQmi/nv2ay2v6ZAcICAY7sjibicmBd06uvfU1bhKB7 +nYC/i77l+IGKX5R/WvTrdb+J5qQhODF70Nr6HO6EsI4E4X541GRLgGMZYKbiu0Tb +uo1B7PSOrkddGUwxXjDBXM2ClcgPi8nL1irpleSAu89/B+Y+pr5IshaVmIP4+jCl +GDG18/kPryOFk0ACszjlX7eFMTFPUX0gl7qDRfVE1jKzPxf75gLoeIylYChMd17b +uQo8RsknkcvNgifdL4sRcbxOvhpERONK1MwR88K8C0GqJ61cIRMv8odMMpescww0 +5ECOpE+kl9PJcREnm8SVkclraWcQVEwGOkHtx5BsPqZplUEAIcJNXuvXm9kFkaVS +2SRvQyklI6/NQQZzK8SRwacQAIGFHV3eOtC0rdrnmnh2XCDeEN5iPCvVG723jIc2 +6aDR4a47zr9507TBLUxMPJQ6mB7imsEcWHfR48zARq8jMSj7ahfhIa1ixEksc943 +CxLrjPAWfAnog/2MYJdUw/nBjU4dqb53ssxD/F/c3LB+z/nCEaO2UgH2Kekh0KyV +KgwV0N8XcTB0UmGcH9J2DZ5/ZXRc2XiYWIDoJHs8thGxwsIYXEhYsgBwGu9Kil4t +LzFt4sluY0kvfrDHu+oYfcYBh5V7q6AQYBh8ujjAhKZUmlKtgay6IHkR65m8QI49 +ITdTQW+Y+orphcsdbvCm4IhXPgykLySouskwr7RuhPka0hKwDUt+0MHbBmAhfYnF +JC5o23tmgAq8l2WZbp6/uFZ+4E9UmvAI0RvQM/B3AxQBOCBOryGeaBwkJcsACm8V +ADWm+/OWK78kuval45wGQl9+TqqjRuwA9ESEUMgZnc33rVPM3h6gR8Rv/M77AjyM +88rGBLCWr7wNY4e3U34tH8jMFOMy9vN6l3kOR5/EFoXJJGehzE+xCyyeicY2HsJ5 +t5R/R6w23vgNqf6eBRQuDtym2rSuuiaCnvKEF3S9ng+phmm/eZadG7xOjERRPqqt +TP+zge55Q1B+P1HmllKlR6YLFyRuKOO1ZOVh4Ae2MS4oZybMQsTifjjiQ/8W8KJq +k5Bh +=3qWJ +-----END PGP PUBLIC KEY BLOCK----- diff --git a/t/recipes/checks/debian/upstream/signing-key/upstream-key-native/build-spec/fill-values b/t/recipes/checks/debian/upstream/signing-key/upstream-key-native/build-spec/fill-values new file mode 100644 index 0000000..2a29809 --- /dev/null +++ b/t/recipes/checks/debian/upstream/signing-key/upstream-key-native/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: upload-native +Testname: upstream-key-native +Description: Check for public upstream signing key in native package diff --git a/t/recipes/checks/debian/upstream/signing-key/upstream-key-native/eval/desc b/t/recipes/checks/debian/upstream/signing-key/upstream-key-native/eval/desc new file mode 100644 index 0000000..789bca6 --- /dev/null +++ b/t/recipes/checks/debian/upstream/signing-key/upstream-key-native/eval/desc @@ -0,0 +1,2 @@ +Testname: upstream-key-native +Check: debian/upstream/signing-key diff --git a/t/recipes/checks/debian/upstream/signing-key/upstream-key-native/eval/hints b/t/recipes/checks/debian/upstream/signing-key/upstream-key-native/eval/hints new file mode 100644 index 0000000..fababb0 --- /dev/null +++ b/t/recipes/checks/debian/upstream/signing-key/upstream-key-native/eval/hints @@ -0,0 +1 @@ +upstream-key-native (source): public-upstream-key-in-native-package [debian/upstream/signing-key.asc] diff --git a/t/recipes/checks/debian/upstream/signing-key/upstream-key-nonsense/build-spec/debian/upstream/signing-key.asc b/t/recipes/checks/debian/upstream/signing-key/upstream-key-nonsense/build-spec/debian/upstream/signing-key.asc new file mode 100644 index 0000000..e311b55 --- /dev/null +++ b/t/recipes/checks/debian/upstream/signing-key/upstream-key-nonsense/build-spec/debian/upstream/signing-key.asc @@ -0,0 +1 @@ +Testing an empty file would require source format 3.0 (quilt). diff --git a/t/recipes/checks/debian/upstream/signing-key/upstream-key-nonsense/build-spec/fill-values b/t/recipes/checks/debian/upstream/signing-key/upstream-key-nonsense/build-spec/fill-values new file mode 100644 index 0000000..786ee2c --- /dev/null +++ b/t/recipes/checks/debian/upstream/signing-key/upstream-key-nonsense/build-spec/fill-values @@ -0,0 +1,3 @@ +Testname: upstream-key-nonsense +Skeleton: upload-non-native +Description: Check for nonsense data in public upstream signing key diff --git a/t/recipes/checks/debian/upstream/signing-key/upstream-key-nonsense/eval/desc b/t/recipes/checks/debian/upstream/signing-key/upstream-key-nonsense/eval/desc new file mode 100644 index 0000000..6e60720 --- /dev/null +++ b/t/recipes/checks/debian/upstream/signing-key/upstream-key-nonsense/eval/desc @@ -0,0 +1,2 @@ +Testname: upstream-key-nonsense +Check: debian/upstream/signing-key diff --git a/t/recipes/checks/debian/upstream/signing-key/upstream-key-nonsense/eval/hints b/t/recipes/checks/debian/upstream/signing-key/upstream-key-nonsense/eval/hints new file mode 100644 index 0000000..5bc79f7 --- /dev/null +++ b/t/recipes/checks/debian/upstream/signing-key/upstream-key-nonsense/eval/hints @@ -0,0 +1 @@ +upstream-key-nonsense (source): public-upstream-key-unusable cannot be processed [debian/upstream/signing-key.asc] diff --git a/t/recipes/checks/debian/upstream/signing-key/upstream-keyring/build-spec/debian/upstream/signing-key.asc b/t/recipes/checks/debian/upstream/signing-key/upstream-keyring/build-spec/debian/upstream/signing-key.asc new file mode 100644 index 0000000..b79208f --- /dev/null +++ b/t/recipes/checks/debian/upstream/signing-key/upstream-keyring/build-spec/debian/upstream/signing-key.asc @@ -0,0 +1,153 @@ +pub dsa1024 2006-05-25 [SC] + A0AEA075AC8398E93CFC6F45D70B095F855781BA +uid [ unknown] Aaron C Spike +sub elg2048 2006-05-25 [E] + 75FE92B054BE8CCB6556FE630B755C0230DF8115 + +pub dsa1024 2000-03-22 [SC] + 9FA3C49C23C9D1BC2E3019751FFF4BA917063E6D +uid [ unknown] Kees Cook +uid [ unknown] Kees Cook +uid [ unknown] Kees Cook +uid [ unknown] Kees Cook +uid [ unknown] Kees Cook +uid [ unknown] Kees Cook +sub elg4096 2000-03-22 [E] + EF1A71F45F7588F7EFACC36653B02EBC76E6CE33 + +pub dsa1024 2006-09-06 [SC] + C7223EBE4EF66513B892598911A30156E0E67611 +uid [ unknown] Bryce Harrington +uid [ unknown] Bryce Harrington +uid [ unknown] Bryce Harrington +uid [ unknown] Bryce Harrington +uid [ unknown] Bryce Harrington +uid [ unknown] Bryce Harrington +sub elg2048 2006-09-06 [E] + 90778E96D30DA29C45CC28920813D5E325D309EB + +-----BEGIN PGP PUBLIC KEY BLOCK----- + +mQGiBER12zgRBADBv4KbzMWnE5jwJlCK0aauc6NHsY9xiip6vMUmuyaU9O/DOKEx +DqiEixZzxggV3lBsYf4QjaTNZ7+Gkb1IV9zCG7YzmBbMRI12TT+sZRdfCArC0IV2 +N3XAlCLuibXpb/rBloWfJUJsh4SSnS+GNYutLtRqbS/gDLZ6U57w+yM5LwCg5vZA +M/JhaYA7y3aX91JkHKwxy40D/RwT8yo6RzckIs2+wSXSYEegPbvResOYV1kOXTi5 +qZ6afqHhyVtBRVVsQocEg/QIscAJu3ja/NiUAFCSKYN1iZCulGdcfLCfGIgJihSN +6TFh7vUyBB+lGPCnax9MsdttsUaLfQeikWIsHxCBQUTwHLl4elOG7TPSFwELB/JX +oZPvA/401Kv4bZvB9GLBzNfNLMdF3lrM+d0YH5R9k0WPV3XKShKz9H+vLEWGqxYB +dJpK7jdhC7TK+L9V1hv4UhpOz9++K1O681HvkodCi1TxfIEKW1bA7tsNsM+Ggz0Z +6BwqSCffc/ZysSL0L9GstNLMrtmnIdb+oQTtnR9XTVmAeD3H3bQfQWFyb24gQyBT +cGlrZSA8YWFyb25AZWtpcHMub3JnPohgBBMRAgAgBQJEdds4AhsDBgsJCAcDAgQV +AggDBBYCAwECHgECF4AACgkQ1wsJX4VXgbqdMgCfY0tcC/sffk1QXFqwh6ELk8Kx +JQgAnitcjtlGWPWobbLmwztmAr7VlldruQINBER120sQCACv0SkI1OCjgYgW+8MF +z3PALT7rP2J6IGEbIO95fg8H73apgPzx/ZM5bKY83mMbu3hN3SoFyhBY3yXA9qHE +nC/W3Wm54yDvTOgVRjW/LiuBGcLJvQruB0Eu2WF5XEjcUi+vl+iZpEtNGc3enrVB +tk0l4NXAONANWznX7ZlJx4IHhRNz4bHWsGrI1F5sA41bt1bRm2CE9GJrFcLnkjDp +x1OEciBgP9x5M0pKfKL8DMtrAq0XsppP+Gg9OS4YF7UTDDDWKzqQnJAitseH/JQs +soxsDOqxz6uY4GltnkV5inqAFVlVSxTG3JpxF3Rlsx2GqoOseEVssFUxTIFoBpYs +TJpTAAMGB/oCLhuHGWnGa3OMHxBBGGX8nOPr9snglEHk2P/Kox6MRSAOU1BW6nVN +LeN1jMldPH9Vd15FUHokCfydGuCPohx5daaA+vEp9qHM4g4fEGPgop+SZr8VMgNq +yQUjUhU1rQOro/jyNXiQ7nICG7+QyDjeDZNfgWR/sHruHmWuoSEavx2zgxseNE5s +pWICwdFltDXvvi9HWDDmPkCJHkhRlMaAaEwldM9z0M3AO6dXKK/1nKGGa4VqNL6f +qDIfKTTpp5vuM/GUBE3d7fEuEfgi27YvdzQJa17SK1vrnpUaZ5+Bdt7DP5oFE9pB +Tadkd4oCfglQQTEkOzYxVx4H6W/0XhjsiEkEGBECAAkFAkR120sCGwwACgkQ1wsJ +X4VXgbrWNQCgt+WswdAQXAmJbuSTHNEvMgIuXyUAoLQnXJqYx2DOTY2i28thyeYM +WS96mQGiBDjYWfMRBACN8F0N8tsW3zwhUpykfC62UdPJsu3zuqnipHWlPyMb7WYb +NeR2EXpNxh5DKyI4kXHZL+7I6wrSYroHcw3biIrEy00oNNjyYZTwetSB/GMfISz0 +PNG1TMKL1dLrG146vmZp9vfoU2tJcCCB7Ir5hsKva7ddndvQdQYsvdS3cHJzjwCg +pZPqPpzTpBnWZt/TA84LnjZ2Xt0D/36lHbAPDH92HjYeeclZjy7z3abrJYCxoc+U +PBIu6/rAqYkE17S9kjkkiLb5JdF5lMJgSYu8Kf1QSCkc/II1CGJYfGqnKo3YGLIS +rqrVzQob47tOMFjUYZ9UEb569m8rmgnl3RmPmZ9wCT+RY0U3XNeYx5ukfn/fJLt6 +A8b9Cqx5A/9rZLrnsSTL3bYuAHMn9FEwj1cetJvqi11L0MhQy4WBz293BUtR2X5S +/lKzRfY+mNzSMe6NEEd5sD1QgJTUdC3wIJJeK9qMqyqK56Cmge3E7m4l/5QdI8uZ +sqFuNCsGfpJPaSQ8yjJ2sAX+g8TjEMYZ9Cwkrod7sSagMrO4cV0no7QZS2VlcyBD +b29rIDxrZWVzQG9zZGwub3JnPohJBDARAgAJBQJFca8BAh0gAAoJEB//S6kXBj5t +uQYAn3X9zRGDua4OAPFS4qiNh09y7pItAJ0eQs5NHNFB/gBqZwEV7RCcUAelfbQb +S2VlcyBDb29rIDxjb29rQGNwb2ludC5uZXQ+iEkEMBECAAkFAkUQGNkCHSAACgkQ +H/9LqRcGPm2l1wCcDdjlXHGJzM4lrSyzUXyjxEwIvD4AoIv3oSyyfNoxTPTF3QTd +vhVrfm6GtBtLZWVzIENvb2sgPGtlZXNAZGViaWFuLm9yZz6IYQQTEQIAIQUCR6Eg +DQIbAwcLCQgHAwIBBBUCCAMEFgIDAQIeAQIXgAAKCRAf/0upFwY+bUNgAJ9RM+r7 +ZCl0xHjYqMkX9yF4NOjzrACdED6Y7Xohf5rpcSVxTkSFl3oSX5m0G0tlZXMgQ29v +ayA8a2Vlc0BrZXJuZWwub3JnPohgBBMRAgAgAhsDAh4BAheABQJFtXy4BgsJCAcD +AgQVAggDBBYCAwEACgkQH/9LqRcGPm3hcwCbBu1Wdux1iWFrxhV2E6mpjvjbt6EA +nRHaGYEH2BuMCJjq0AE2cWqPCHjQtBtLZWVzIENvb2sgPGtlZXNAdWJ1bnR1LmNv +bT6IYAQTEQIAIAIbAwIeAQIXgAUCRbV8uAYLCQgHAwIEFQIIAwQWAgMBAAoJEB// +S6kXBj5tK68AoIhUwpdkaNHz/ecNJPv6ZuPnzcHVAJ0f4p4HSXqjIM4w2123e5Kw +PyiQIbQcS2VlcyBDb29rIDxrZWVzQG91dGZsdXgubmV0PohjBBMRAgAjAhsDAh4B +AheAAhkBBQJFtXyzBgsJCAcDAgQVAggDBBYCAwEACgkQH/9LqRcGPm2t9QCbBBgv +K8umgFnfFM3gHSWXcchf/U8AnjgRSagInpCzDsriwz/7kRk6CZjRtB5LZWVzIENv +b2sgPGtlZXNAY2Fub25pY2FsLmNvbT6IYAQTEQIAIAIbAwIeAQIXgAUCRbV8uAYL +CQgHAwIEFQIIAwQWAgMBAAoJEB//S6kXBj5tlA4An1TrHtj4+NspE3AS3hhR3LzP +Y1Y/AJ9sF22Ytoz+RTuDnV+6b62E6kIe47QjS2VlcyBDb29rIDxrZWVzLmNvb2tA +Y2Fub25pY2FsLmNvbT6IYQQTEQIAIQUCR/QWgAIbAwcLCQgHAwIBBBUCCAMEFgID +AQIeAQIXgAAKCRAf/0upFwY+baOTAJ0XMfD87j/R/LyaF/p84mtYM/mUXACfd7KQ +Hty/NNRHZm65IGUiQpCMPVi0J0Nvcm5lbGl1cyBDb29rIChLZWVzKSA8Y29va0Bj +cG9pbnQubmV0PohJBDARAgAJBQJE64y0Ah0gAAoJEB//S6kXBj5tvXAAn3QUzyP3 +bopVytVzU2t5ATvFbDvSAJ9Kb7OYDI+d6Ym/kjRNVxyAMqfkcLQoQ29ybmVsaXVz +IENvb2sgKEtlZXMpIDxrZWVzQG91dGZsdXgubmV0PohJBDARAgAJBQJGAUI9Ah0g +AAoJEB//S6kXBj5tdt0An28ib9AYfoa6TRteVRn22k/sBykvAKCh9X7U/NspQC61 +kcH+6yf/FszC3LkEDQQ42FvaEBAAkofDOJKr1mgLU+0NM5M0z33uN3LFX3vC+ON+ +vY5SAwvt1WqCvUgocByb0npfdqtu8VGD0QZ+m9Lp1yXyYjDoSgMmBachbordxHHW +b7asqmHrOkPWX6AvrITRhMOfvQ1zDKlLa19kLMUANhYXRH3JjsiZAhQ++xcEZqes +JtgmKdpcX0vX3TuVV8wSBJFG0tKgLZPkEnYtUDRiBp7RrqYruNCctVzCxr4n26cY +V0saMvwHhHpmHP8qwJQf2++eWPG/lm/wMzatThEgkKqXGj1rHU+uzKBrxc2pQDi/ +Pz12vg9H86pO51E0xPXthH6hazwWix7Tx1Q0mig4pbrHLuHgV0A6CtlJIPclWlsY +9jO67XiUGVw+ypR3QwPyUVZuCmRv3w+FroajxQ+VM/hlKhikDb7ylhQ0UCo3nym7 +mRTbEC5O+3mahTr4X7TadaX3GOjceMLzaOF4sbo9pFusK3lXOoehZO5Ob6VIbyTw +T5M2qsjwLqLn7pmIN84tpQvlVaEFKyNyR9C+uCdB1ZkdOtUxOee8MOMxS3I06ZVv +pRbFfUAr3Y/SzgapIGsDqHf9HKP5mMw9zDTWJwtUcAVtQELfM4JZ9F1tGd8G9ebH +n1esy/Fb1c3upyhkLBBHdmI/dHnJ0hzt8SoSgsrORtq0DVL/fGpqDkeykkmOi4+t +XS315Q8AAwUP/37nvk/tvV/IH43RY1DHQ+7DFhWpNzGfUDIEORoQeCGqpw6pJm1B +Wvm3WDFuoXrrlOPvR5xQDEANbuBAejcC4MaPX+DHHdo6+uM2nkpYbIKFQ2GS6mg2 +GNUTqTBQX8Z/1BTE0NzcO/cANZA1kZeV7i6UXTpR7w3oNdPYk1OHWtDMCx97brCf +IFD+5UuTeJiNRuOe+OiNZGsRL6/BtowDjKTdhsgotE3ZsgL+IyW8bMdowc7F56fD +3SRL63SAu3yjfk7/ryZZIArCYusrkEV52OyEniCa42sCafONQ3WWIGXOVb3Wc62n +AMOSFcbOE+BqvnmGlJ9vxRZ1GCB1is4lJb/8Wr2oq0aDH3sQoontF5W7nzWD041u +rgsFMKLol8NH2waWXcnwbBcAcChk8duxGMEx0w1D8ldpTqVzIVgeIe8I2axlEnvq +Vta9oR4uiCtinApD3yTrZRez9O2PwjEY5iZTe1WyiSGi+U0Tiz1ZIawhojOCxJWC +ggB0Zs9n2FaCb5Cs7BMRzCdibeI1XoFqiL8YxY1cWkwcBTALSWpUy9FYOITPMSji +x/Svlew+8VTrGZ+aKDXmEoXMbUfcPkRIbk7TWq0YrTTCYkikLviXczkrvBl1b5qw +rhEF18dCl89N2kqUyDNJ4SuOeNELMhcGtARKY0OHtu3vSuC5Yr8woTN7iEYEGBEC +AAYFAkW2eZgACgkQH/9LqRcGPm2CBgCglD0MerQ+cfQ734FX0hd89L8+XBcAn3Ab +83GBmoy4K0aF4Jp5Nwlgo59DmQGiBET+XhERBADlUYa7VXfPl3y9uCBUMniYdE4F +KLAobrREyiveLf+2mTf435YLde0gcx9ZS/EZUq+4rn4uv6AsKmw/f/N/VWGC4KL6 +0uyp7zJjUNed2KKBk3sk57IGpHwRqzXQwk8wVMOuhyyv207cmUadGVtL4GPKUCOY +p+C0hnSs3Jq0fZJ9lwCg5xDxfg3g++HUm8Gu2D/SYR4pFWED/2J4fkdPRQhxnfmv +UxphqKf24aDngDwXYLkKlywYGs52J8iOwTQ/DRIruKepqrh66gb06QwnMQe9R5mJ +qncoi87m2jlKzUdJ5WV4JRmXc4QVu9vRySK9j6e1O2mJeRrYvkf5rDBCHXvOoXET +6VSHZI//1OJJ5OMiIApERFdT+a5TA/4u82BHdLFerbK23ML0aWOpTc/kMbOwLjF7 +rFF3iJ4Pbhv0gS2wWx/1oqbFZGdTS5XVGiWf/+/rZpN8SeC5Q8cJ1EYqSHyo/eA+ +mI+C6ylqyyODmZ42OQr142xjt6MFj5uBMq3QQGYytZ65ustDfnE/qP6hNJGtE9Lw +6NVGd6oG37QjQnJ5Y2UgSGFycmluZ3RvbiA8YnJ5Y2VAdWJ1bnR1LmNvbT6IYAQT +EQIAIAIbAwYLCQgHAwIEFQIIAwQWAgMBAh4BAheABQJUwED9AAoJEBGjAVbg5nYR +YHkAoN8LIA4RjqX6TtK87+V+5aOSggk1AKC6T20Lo9yte4Q6uXXJWGPNVydG8bQm +QnJ5Y2UgSGFycmluZ3RvbiA8YnJ5Y2VAY2Fub25pY2FsLmNvbT6IYAQTEQIAIAIb +AwYLCQgHAwIEFQIIAwQWAgMBAh4BAheABQJUwED9AAoJEBGjAVbg5nYRNDQAoKJ3 +TMTZS3nK+gtYCosXcO4JFYxRAKDdOzV2Hn+dwors+2n3X91Ol3BNArQoQnJ5Y2Ug +SGFycmluZ3RvbiA8YnJ5Y2VAb3NnLnNhbXN1bmcuY29tPohiBBMRAgAiAhsDBgsJ +CAcDAgYVCAIJCgsEFgIDAQIeAQIXgAUCVMBA/QAKCRARowFW4OZ2Ed2iAJ4s0EVg +9+vuE3wAmeHGZazsvRnakACg0VP0/JUmDDvgm7vOfg5Ex/v82nC0LEJyeWNlIEhh +cnJpbmd0b24gPGJyeWNlQGJyeWNlaGFycmluZ3Rvbi5vcmc+iGAEExECACACGwMG +CwkIBwMCBBUCCAMEFgIDAQIeAQIXgAUCVMBA/QAKCRARowFW4OZ2EfLRAKC/HqDc +a42tb3lyPxjEJv17tpFxSQCdHJeu88EIYaC5HZHUbG9ZaFoUuwi0LkJyeWNlIEhh +cnJpbmd0b24gPGJyeWNlLmhhcnJpbmd0b25AdWJ1bnR1LmNvbT6IYAQTEQIAIAIb +AwYLCQgHAwIEFQIIAwQWAgMBAh4BAheABQJUwED6AAoJEBGjAVbg5nYRHEcAnRlu +XGX7z2CeQHVccOjXPEx3DhbuAKC3BOql6z4e/oHnuPcrmm+cDVwvn7QxQnJ5Y2Ug +SGFycmluZ3RvbiA8YnJ5Y2UuaGFycmluZ3RvbkBjYW5vbmljYWwuY29tPohgBBMR +AgAgAhsDBgsJCAcDAgQVAggDBBYCAwECHgECF4AFAlTAQP0ACgkQEaMBVuDmdhHg +7wCgghXeewn/DeBZh3g0EstNcdSDDU4Anif0Ud+4cdTFS4jWWPJrs/gaPFbDuQIN +BET+XiQQCADT0bmOAoaZ/3Y7cpvc221+V7Yq1YtUw1QNUgkaku5I+5ee54oIvMrE +WbADQRd1TqtKjsTS8v1kYFqHC965uhHgXAMHCb6hlN+AzVXsgl/iqQI3knqHAtx5 +1Buqd/PF1t6grELRhGH39ElzkK2D9E1e8Ag6XdWY/jCx/tRypc2HrUJoNsdUFrj8 ++VDOYa9Xi1XSzQdRPbWbdzXiIxtA5iY4i8mS3B3wItl1eyzD5UFQzgWK5FLFjfhm +6/DEpVqlyu1mp+2I7InKz4HW64l0Rkzn5EC7UxUn/chGDWQTtfiyjeia4ANcUC8J +x5C4NOKXPzXN8anWV3S0oJZh+pGRaUKTAAMFB/9YkEg13DveEPPg8+bqUXtN9YU+ +Ogxcvcyou8I5bzRMxlpJkG3aEsrpAB7mS9D3kpImUa5QA8Y9QoEl4CLxbGIDJIyK +Nm93OhZrO+A0h8uCTHK45clmqg3UdUKqnXr5V48zIvs56lrpTnlJ3PqNSl2ErDYt +T7fgODyXAyLPNpCGsz2otYfJ4ne1aYf7i/7gI+UTXpavDUsM90FrX+sydnjbZIi0 +t6HNpmO9sb9o82QjF+hMr28YntWS0LUvOdUmWNnUyrDtZ2fnTzxoOYl0/8hxE+vU +wcw3vk6+CtNEw4r+VkuKKpZgrP7BIyD8m2dGJn5cfRe8LCP2TIkYh7WBoKQxiEkE +GBECAAkFAkT+XiQCGwwACgkQEaMBVuDmdhHXAgCg1DelVwB3NVuI4X3w4QAijqlg +3vsAn13J6LbSbWkCE1GwkJfoF9GzWqNd +=L+CY +-----END PGP PUBLIC KEY BLOCK----- diff --git a/t/recipes/checks/debian/upstream/signing-key/upstream-keyring/build-spec/fill-values b/t/recipes/checks/debian/upstream/signing-key/upstream-keyring/build-spec/fill-values new file mode 100644 index 0000000..1ed18f8 --- /dev/null +++ b/t/recipes/checks/debian/upstream/signing-key/upstream-keyring/build-spec/fill-values @@ -0,0 +1,3 @@ +Testname: upstream-keyring +Skeleton: upload-non-native +Description: Test with a keyring (false positive, from inkscape) diff --git a/t/recipes/checks/debian/upstream/signing-key/upstream-keyring/eval/desc b/t/recipes/checks/debian/upstream/signing-key/upstream-keyring/eval/desc new file mode 100644 index 0000000..753cd74 --- /dev/null +++ b/t/recipes/checks/debian/upstream/signing-key/upstream-keyring/eval/desc @@ -0,0 +1,4 @@ +Testname: upstream-keyring +Check: debian/upstream/signing-key +Test-Against: + public-upstream-key-unusable diff --git a/t/recipes/checks/debian/upstream/signing-key/upstream-keyring/eval/hints b/t/recipes/checks/debian/upstream/signing-key/upstream-keyring/eval/hints new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/t/recipes/checks/debian/upstream/signing-key/upstream-keyring/eval/hints @@ -0,0 +1 @@ + diff --git a/t/recipes/checks/debian/variables/build-multiarch-in-install/build-spec/debian/a-file b/t/recipes/checks/debian/variables/build-multiarch-in-install/build-spec/debian/a-file new file mode 100644 index 0000000..c40b9f1 --- /dev/null +++ b/t/recipes/checks/debian/variables/build-multiarch-in-install/build-spec/debian/a-file @@ -0,0 +1 @@ +MEANINGFUL CONTENTS diff --git a/t/recipes/checks/debian/variables/build-multiarch-in-install/build-spec/debian/install b/t/recipes/checks/debian/variables/build-multiarch-in-install/build-spec/debian/install new file mode 100644 index 0000000..8a62397 --- /dev/null +++ b/t/recipes/checks/debian/variables/build-multiarch-in-install/build-spec/debian/install @@ -0,0 +1 @@ +a-file usr/lib/$(DEB_BUILD_MULTIARCH)/ diff --git a/t/recipes/checks/debian/variables/build-multiarch-in-install/build-spec/fill-values b/t/recipes/checks/debian/variables/build-multiarch-in-install/build-spec/fill-values new file mode 100644 index 0000000..82217ed --- /dev/null +++ b/t/recipes/checks/debian/variables/build-multiarch-in-install/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: source-native +Testname: build-multiarch-in-install +Description: Uses DEB_BUILD_MULTIARCH in d/install diff --git a/t/recipes/checks/debian/variables/build-multiarch-in-install/eval/desc b/t/recipes/checks/debian/variables/build-multiarch-in-install/eval/desc new file mode 100644 index 0000000..f30475e --- /dev/null +++ b/t/recipes/checks/debian/variables/build-multiarch-in-install/eval/desc @@ -0,0 +1,4 @@ +Testname: build-multiarch-in-install +Check: debian/variables +See-Also: + Bug#983219 diff --git a/t/recipes/checks/debian/variables/build-multiarch-in-install/eval/hints b/t/recipes/checks/debian/variables/build-multiarch-in-install/eval/hints new file mode 100644 index 0000000..5ea29b9 --- /dev/null +++ b/t/recipes/checks/debian/variables/build-multiarch-in-install/eval/hints @@ -0,0 +1 @@ +build-multiarch-in-install (source): illegal-variable DEB_BUILD_MULTIARCH [debian/install] diff --git a/t/recipes/checks/debian/variables/build-multiarch-in-links/build-spec/debian/a-file b/t/recipes/checks/debian/variables/build-multiarch-in-links/build-spec/debian/a-file new file mode 100644 index 0000000..c40b9f1 --- /dev/null +++ b/t/recipes/checks/debian/variables/build-multiarch-in-links/build-spec/debian/a-file @@ -0,0 +1 @@ +MEANINGFUL CONTENTS diff --git a/t/recipes/checks/debian/variables/build-multiarch-in-links/build-spec/debian/links b/t/recipes/checks/debian/variables/build-multiarch-in-links/build-spec/debian/links new file mode 100644 index 0000000..4f759a6 --- /dev/null +++ b/t/recipes/checks/debian/variables/build-multiarch-in-links/build-spec/debian/links @@ -0,0 +1 @@ +/usr/lib/$(DEB_BUILD_MULTIARCH)/target /usr/lib/$(DEB_BUILD_MULTIARCH)/not-working diff --git a/t/recipes/checks/debian/variables/build-multiarch-in-links/build-spec/fill-values b/t/recipes/checks/debian/variables/build-multiarch-in-links/build-spec/fill-values new file mode 100644 index 0000000..bf606c3 --- /dev/null +++ b/t/recipes/checks/debian/variables/build-multiarch-in-links/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: source-native +Testname: build-multiarch-in-links +Description: Uses DEB_BUILD_MULTIARCH in d/links diff --git a/t/recipes/checks/debian/variables/build-multiarch-in-links/eval/desc b/t/recipes/checks/debian/variables/build-multiarch-in-links/eval/desc new file mode 100644 index 0000000..324f3b5 --- /dev/null +++ b/t/recipes/checks/debian/variables/build-multiarch-in-links/eval/desc @@ -0,0 +1,4 @@ +Testname: build-multiarch-in-links +Check: debian/variables +See-Also: + Bug#983219 diff --git a/t/recipes/checks/debian/variables/build-multiarch-in-links/eval/hints b/t/recipes/checks/debian/variables/build-multiarch-in-links/eval/hints new file mode 100644 index 0000000..d843c89 --- /dev/null +++ b/t/recipes/checks/debian/variables/build-multiarch-in-links/eval/hints @@ -0,0 +1 @@ +build-multiarch-in-links (source): illegal-variable DEB_BUILD_MULTIARCH [debian/links] diff --git a/t/recipes/checks/debian/version-substvars/legacy-binary/build-spec/debian/NEWS.Debian b/t/recipes/checks/debian/version-substvars/legacy-binary/build-spec/debian/NEWS.Debian new file mode 100644 index 0000000..29f561c --- /dev/null +++ b/t/recipes/checks/debian/version-substvars/legacy-binary/build-spec/debian/NEWS.Debian @@ -0,0 +1,12 @@ +binary (4-1.1) UNRELEASED; urgency=high + + This is a Debian NEWS entry that isn't encoded properly in UTF-8: . + It also has a usefull speling error. + + -- Russ Allbery Sun, 14 Oct 2007 17:11:36 -0700 + +binary (1) unstable; urgency=low + + This is another entry but this one isn't syntactically valid. + + -- Russ Allbery 2007-10-14 diff --git a/t/recipes/checks/debian/version-substvars/legacy-binary/build-spec/debian/README.Debian b/t/recipes/checks/debian/version-substvars/legacy-binary/build-spec/debian/README.Debian new file mode 100644 index 0000000..94bcc0a --- /dev/null +++ b/t/recipes/checks/debian/version-substvars/legacy-binary/build-spec/debian/README.Debian @@ -0,0 +1,5 @@ +this is a binary package to test lintian's handling of bins. +Check handling of D-Bus and dbus (neither of which should produce +warnings). + + -- Russ Allbery , Wed, 6 Feb 2008 18:35:11 -0800 diff --git a/t/recipes/checks/debian/version-substvars/legacy-binary/build-spec/debian/changelog.in b/t/recipes/checks/debian/version-substvars/legacy-binary/build-spec/debian/changelog.in new file mode 100644 index 0000000..39301d6 --- /dev/null +++ b/t/recipes/checks/debian/version-substvars/legacy-binary/build-spec/debian/changelog.in @@ -0,0 +1,47 @@ +binary ([% $version %]) [% $distribution %]; urgency=low + + * I'm doing an comaintainer-upload, acknowledging a NMU, but with a version + number which suggests I'm doing a NMU myself. + + Lintian-maintainers: Please don't update this changelog, otherwise you'll + probably break the checks/nmu checks. + + -- Jeroen van Wolffelaar Sun, 18 Apr 2004 01:49:42 +0200 + +binary (4-1) unstable; urgency=low + + * Weird version number for the new check for accidents with native + packaging. + * Date was fixed by BR and this test was put on changelog-file-strange-date + due to dpkg bug, see #794674. + + -- Marc 'HE' Brockschmidt Thu, 15 Apr 2004 23:33:51 +0200 + +binary (4) unstable; urgency=low + + * Add big file to /usr/share to trigger the big-usr-share check + + -- Jeroen van Wolffelaar Fri, 27 Feb 2004 10:15:59 +0100 + +binary (3) unstable; urgency=unlimited + + * Add some bogus menu entries using su-to-root in a bogus way + + -- Jeroen van Wolffelaar Thu, 12 Feb 2004 20:11:22 +0100 + +binary (2) unstable; urgency=low + + * Added an INSTALL document which policy 6.3 suggests not to do + + -- Sean 'Shaleh' Perry Tue, 30 Jan 2001 15:23:59 -0800 + +binary (1) unstable; urgency=low + + * hello.c added + * hello-static is same as hello, but compiled statically + * added a menu entry which lacks a Section + * added a postinst + * postinst calls suidregister which is no longer policy compliant + + -- Sean 'Shaleh' Perry Wed, 10 Jan 2001 08:55:34 -0800 + diff --git a/t/recipes/checks/debian/version-substvars/legacy-binary/build-spec/debian/conffiles b/t/recipes/checks/debian/version-substvars/legacy-binary/build-spec/debian/conffiles new file mode 100644 index 0000000..d1a0843 --- /dev/null +++ b/t/recipes/checks/debian/version-substvars/legacy-binary/build-spec/debian/conffiles @@ -0,0 +1 @@ +/etc/menu-methods/lintian diff --git a/t/recipes/checks/debian/version-substvars/legacy-binary/build-spec/debian/control b/t/recipes/checks/debian/version-substvars/legacy-binary/build-spec/debian/control new file mode 100644 index 0000000..c797357 --- /dev/null +++ b/t/recipes/checks/debian/version-substvars/legacy-binary/build-spec/debian/control @@ -0,0 +1,42 @@ +Source: binary +Section: misc +Priority: optional +Maintainer: Lintian Maintainers +Uploaders: Co-maintainer one , Jeroen van Wolffelaar , Co-maintainer three +Standards-Version: 3.2.1 +Homepage: http://lintian.debian.org/ +Vcs-Svn: http://svn.wolffelaar.nl/lintian/trunk +XS-Vcs-Browser: http://svn.wolffelaar.nl/lintian/trunk +XS-Dm-Upload-Allowed: yes + +Package: binary +Architecture: any +Pre-Depends: ${shlibs:Depends}, xorg, binary-data (= ${source:Version}), libssl0.9.8 +Homepage: +Vcs-Svn: http://svn.wolffelaar.nl/lintian/trunk +Description: test handling of binary files + Regression test for lintian's handling of binary files for debian. This + is checked for picky spelling errors. + . + This package list [ subversion | gconf ] should not be flagged as a spelling + mistake. The spelling correction for dont should be correct. + . + Homepage: http://lintian.debian.org/ + +Package: binary-data +Architecture: all +Depends: binary (= ${source:Version}), libssl-not-openssl, + libssl0.9.8 | or-something-else +Description: test handling of binary relationships + Regression test for lintian's checking of package relationships between + arch:any and arch:all packages. + . + This mention of subversion should be flagged as a spelling mistake. + +#Package: binary-comment +#Architecture: space-almonds +#Depends: * +#Depends: * +#Description: test comment support +# Yes, comments are actually allowed in debian/control, so none of the +# above should produce errors. diff --git a/t/recipes/checks/debian/version-substvars/legacy-binary/build-spec/debian/copyright b/t/recipes/checks/debian/version-substvars/legacy-binary/build-spec/debian/copyright new file mode 100644 index 0000000..1d6806d --- /dev/null +++ b/t/recipes/checks/debian/version-substvars/legacy-binary/build-spec/debian/copyright @@ -0,0 +1,15 @@ +hello.c is released under public domain. This is distributed in the hope that +it will be useful, but without any warranty; without even the implied warranty +of merchantability or fitness for a particular purpose. + +A reference to /usr/share/common-licenses/GPL-2 to make it look like this +package is under the GPL and trigger the OpenSSL warning. + +Test for old FSF address: + +Free Software Foundation, Inc., 59 Temple Place - Suite 330, +Boston, MA 02111-1307, USA. + +Test for deprecated ntionl ncoding. + +Improper capitalization of linux or debian isn't caught here. diff --git a/t/recipes/checks/debian/version-substvars/legacy-binary/build-spec/debian/doc-base b/t/recipes/checks/debian/version-substvars/legacy-binary/build-spec/debian/doc-base new file mode 100644 index 0000000..7e5b38f --- /dev/null +++ b/t/recipes/checks/debian/version-substvars/legacy-binary/build-spec/debian/doc-base @@ -0,0 +1,41 @@ +Document: binary!docs +Title: Broken debian binary doc-base control file +Author: Russ Allbery +Abstract: This control file exercises various tests of doc-base control + files, including several things that aren't tested yet. The third and + fourth one has trailing whitespace. + . + This section has a speling error and bad character. + . + The above separator was fine. +Section: Non/Existant +Unknown: Some field + + + +Format: debiandoc-sgML +Files: /usr/share/doc/binary/binary.sgml.gz +Unknown: Some field + +Format: ESP +Index: /usr/share/doc/binary/binary.txt + +Index: /usr/share/doc/binary/html/index.html + /usr/share/doc/binary/html/ch1.html + /usr/share/doc/binary/html/ch4.html + + +Format: HTML +Index: /usr/share/doc/binary/html/index.html +Files: /usr/share/doc/binary/html/ch?.h*l + /usr/share/doc/binary/hml/*.html + +Format: inFO +Files: /usr/share/info/binary.info.gz + +Format: HTML +Index: /usr/share/doc/binary/html/index.html +Files: /usr/share/doc/binary/html/ch5.html + /usr/share/doc/binary/html/ch6.html + + diff --git a/t/recipes/checks/debian/version-substvars/legacy-binary/build-spec/debian/goodbye.desktop b/t/recipes/checks/debian/version-substvars/legacy-binary/build-spec/debian/goodbye.desktop new file mode 100644 index 0000000..f6ce8e3 --- /dev/null +++ b/t/recipes/checks/debian/version-substvars/legacy-binary/build-spec/debian/goodbye.desktop @@ -0,0 +1,13 @@ +[Desktop Entry] +Name:Goodbye +# Name=Goodbye +Comment=Say hello! +SpecialTag=This doesn't exist! +Exec=goodbye +icon=hello +Terminal=true +Type=Application +Categories=WeirdStuff;Screensaver; +Encoding=ISO-10646-1 +[Other Entry] +Name=Goodbye diff --git a/t/recipes/checks/debian/version-substvars/legacy-binary/build-spec/debian/hello.desktop b/t/recipes/checks/debian/version-substvars/legacy-binary/build-spec/debian/hello.desktop new file mode 100644 index 0000000..f795468 --- /dev/null +++ b/t/recipes/checks/debian/version-substvars/legacy-binary/build-spec/debian/hello.desktop @@ -0,0 +1,14 @@ +# some random comment + +# [Foo Bar] +[KDE Desktop Entry] +Name=Hello +Name[en_US]=Hello +Comment=Say hello! +Exec=kdesu hello +Icon=hello +Terminal=true +Type=Application +Categories=GNOME;GTK;System;Applet;X-Foo;Settings; +Encoding=UTF-8 +OnlyShowIn=GNOME; diff --git a/t/recipes/checks/debian/version-substvars/legacy-binary/build-spec/debian/menu b/t/recipes/checks/debian/version-substvars/legacy-binary/build-spec/debian/menu new file mode 100644 index 0000000..e8972f4 --- /dev/null +++ b/t/recipes/checks/debian/version-substvars/legacy-binary/build-spec/debian/menu @@ -0,0 +1,26 @@ +?package(binary):needs=text title="Hello World" command="/usr/bin/hello" +?package(binary):needs=text section="Applications/System" title="Run cfdisk (0)" command="/usr/bin/su-to-root cfdisk" +?package(binary):needs="text" section="Applications/System/Hardware" title="Run cfdisk (1)" command="sux -p cfdisk" +?package(binary):needs="x11" section="Window Managers" title="Run xfdisk" command="/usr/sbin/su-to-root -c xfdisk" +?package(binary):needs="wm" section="Applications/System/Administration" title="Run fdisk-wm" command="su-to-root -c hello" +?package(binary):section="Apps/Games" title="I'm not root!" command="su-to-root -c imnothere" +?package(binary):needs="text" section="Apps/System" title="I'm not here!" command="/imnothere" +?package(binary,other-binary):\ + needs="text"\ + section="Applications/Shells"\ + title="more than one required"\ + command="other-bin -s omething" +?package(binary):needs="wmmodule" section="WindowManagers/Modules" title="somemodule" command="ModuleCmd" +?package(binary):needs="wmmodule" section="FVWM Modules" title="somemodule" command="ModuleCmd" +?package(binary):needs="text" section="Applications/System/Administration" title="I'm not in /usr/bin!" command="iminusrbin" +?package(binary):needs="text"\ + section="Applications/System/Administration"\ + title="I'm not root!" command="su-to-root -c imnothere" +?package(binary):needs="text" section="Applications/System/Administration"\ + title="Run cfdisk (0)" command="cfdisk" +?package(binary):needs="text" section="Applications/System/Administration" title="Hello World" command="/usr/bin/hello" +?package(binary):needs="wm" section="FVWM Modules" title="Fake Module" command="hello" +?package(binary):needs="fvwmmodule" section="Window Maker" title="Fake Module"\ + command="hello" +?package(binary):needs="x11" section="Applications/System/Hardware" title="Run xfdisk" command="su-to-root -c 'xfdisk -f'" +?package(binary):needs="text" section="Applications/System/Administration" title="foo" command="sh /path/to/foo" diff --git a/t/recipes/checks/debian/version-substvars/legacy-binary/build-spec/debian/menu-method b/t/recipes/checks/debian/version-substvars/legacy-binary/build-spec/debian/menu-method new file mode 100644 index 0000000..9f07bd7 --- /dev/null +++ b/t/recipes/checks/debian/version-substvars/legacy-binary/build-spec/debian/menu-method @@ -0,0 +1,22 @@ +#!/usr/bin/install-menu + +# -*- mode: shell-script; -*- +#I need menu-1! +# + +!include notmenu.h + +compat="menu-2" + +outputencoding="UTF-8"; +outputlanguage="C"; + +x11 = AppEntry("false"); +text = AppEntry("true"); + +startmenu = ""; +endmenu = ""; +submenutitle = ""; +rootprefix = "/var/lib/lintian/menu"; +userprefix = ".local/share/lintian/menu"; + diff --git a/t/recipes/checks/debian/version-substvars/legacy-binary/build-spec/debian/postinst b/t/recipes/checks/debian/version-substvars/legacy-binary/build-spec/debian/postinst new file mode 100644 index 0000000..29e1861 --- /dev/null +++ b/t/recipes/checks/debian/version-substvars/legacy-binary/build-spec/debian/postinst @@ -0,0 +1,6 @@ +#! /bin/bash -e + +if [ $1 eq 'configure' ] +then + suidregister hello-static root root 4755 +fi diff --git a/t/recipes/checks/debian/version-substvars/legacy-binary/build-spec/debian/rules b/t/recipes/checks/debian/version-substvars/legacy-binary/build-spec/debian/rules new file mode 100755 index 0000000..a962ea9 --- /dev/null +++ b/t/recipes/checks/debian/version-substvars/legacy-binary/build-spec/debian/rules @@ -0,0 +1,92 @@ +#!/usr/bin/make -f + +tmp=debian/tmp + +# This reference to $(PWD) should not cause an error but the one below +# should. +build-arch: + make + echo $(PWD) + +build: build-arch + +clean: + make -i clean + [ ! -f debian/files ] || rm -f debian/files + [ ! -f debian/substvars ] || rm -f debian/substvars + [ ! -d debian/tmp ] || rm -rf debian/tmp + [ ! -d debian/binary ] || rm -rf debian/binary + [ ! -d debian/binary-data ] || rm -rf debian/binary-data + +binary-arch: build + install -d $(tmp)/usr/bin + install -d $(tmp)/boot/hello + install -m 755 hello $(tmp)/usr/bin + touch $(tmp)/usr/bin/iminusrbin + chmod 755 $(tmp)/usr/bin/iminusrbin + install -m 755 hello-static $(tmp)/usr/bin + strip $(tmp)/usr/bin/hello-static + install -m 755 hello-static $(tmp)/usr/bin/hello.static + strip --remove-section=.comment --remove-section=.note $(tmp)/usr/bin/hello.static + ln $(tmp)/usr/bin/hello.static $(tmp)/usr/bin/static-hello + install -m 755 hello-static $(tmp)/boot/hello + strip --remove-section=.comment --remove-section=.note $(tmp)/boot/hello/hello-static + install -d $(tmp)/usr/share/doc/binary + install -m 644 INSTALL $(tmp)/usr/share/doc/binary + install -d $(tmp)/usr/share/doc/binary/html + echo '' > $(tmp)/usr/share/doc/binary/html/index.html + echo '' > $(tmp)/usr/share/doc/binary/html/ch1.html + ln -s ../html/./ch1.html $(tmp)/usr/share/doc/binary/html/ch2.html + ln -s /usr/share/doc/binary/htm/ch1.html $(tmp)/usr/share/doc/binary/html/ch3.html + echo '' > $(tmp)/usr/share/doc/binary/html/ch5.html + ln $(tmp)/usr/share/doc/binary/html/ch5.html \ + $(tmp)/usr/share/doc/binary/html/ch6.html + install -d $(tmp)/usr/share/menu + install -d $(tmp)/usr/lib/menu + install -d $(tmp)/usr/share/binary + install -m 644 debian/menu $(tmp)/usr/share/menu/binary + install -m 644 debian/menu $(tmp)/usr/lib/menu/binary + install -d $(tmp)/etc/menu-methods + install -m 755 debian/menu-method $(tmp)/etc/menu-methods/lintian + install -d $(tmp)/usr/share/doc-base + install -m 644 debian/doc-base $(tmp)/usr/share/doc-base/binary + touch '$(tmp)/usr/share/doc-base/space ' + install -m 644 debian/README.Debian $(tmp)/usr/share/doc/binary + install -m 644 debian/NEWS.Debian $(tmp)/usr/share/doc/binary + gzip -n -9 $(tmp)/usr/share/doc/binary/NEWS.Debian + install -m 644 debian/copyright $(tmp)/usr/share/doc/binary + install -m 644 debian/changelog $(tmp)/usr/share/doc/binary + #gzip -n -9 $(tmp)/usr/share/doc/binary/changelog + install -d $(tmp)/DEBIAN + install -m 755 debian/postinst $(tmp)/DEBIAN + install -m 644 debian/conffiles $(tmp)/DEBIAN + + install -d $(tmp)/usr/share/applications + install -m 644 debian/hello.desktop \ + $(tmp)/usr/share/applications/hello.desktop + install -m 755 debian/goodbye.desktop \ + $(tmp)/usr/share/applications/goodbye.desktop + + # should be ok... + echo boe > $(tmp)/usr/bar + ln $(tmp)/usr/bar $(tmp)/usr/foo + # but this isn't + echo boe > $(tmp)/usr/bar2 + ln $(tmp)/usr/bar2 $(tmp)/usr/share/baz + + dd if=/dev/zero of=$(tmp)/usr/share/binary/largefile bs=1024 count=4000 + + install -d debian/binary-data/DEBIAN + install -d debian/binary-data/usr/share/doc + ln -s binary debian/binary-data/usr/share/doc/binary-data + + dpkg-shlibdeps $(tmp)/usr/bin/hello + dpkg-gencontrol -pbinary -isp + dpkg-gencontrol -pbinary-data -Pdebian/binary-data -isp + + dpkg --build debian/tmp .. + dpkg --build debian/binary-data .. + +binary: binary-arch + +.PHONY: build-arch build binary-arch binary clean diff --git a/t/recipes/checks/debian/version-substvars/legacy-binary/build-spec/debian/templates b/t/recipes/checks/debian/version-substvars/legacy-binary/build-spec/debian/templates new file mode 100644 index 0000000..3d92861 --- /dev/null +++ b/t/recipes/checks/debian/version-substvars/legacy-binary/build-spec/debian/templates @@ -0,0 +1,16 @@ +# The debconf templates defined here are the sort that you'd use if +# providing a wordlist and an ispell dictionary for the language +# "perl". This shouldn't trigger warnings about not using debconf-po. + +Template: shared/packages-ispell +Type: text +Description: + +Template: shared/packages-wordlist +Type: text +Description: + +Template: miscfiles/languages +Type: text +Default: perl (Pathologically Eclectic Rubbish Lister) +Description: diff --git a/t/recipes/checks/debian/version-substvars/legacy-binary/build-spec/fill-values b/t/recipes/checks/debian/version-substvars/legacy-binary/build-spec/fill-values new file mode 100644 index 0000000..b503871 --- /dev/null +++ b/t/recipes/checks/debian/version-substvars/legacy-binary/build-spec/fill-values @@ -0,0 +1,5 @@ +Skeleton: upload-non-native +Testname: legacy-binary +Source: binary +Version: 4-1.1 +Description: Legacy test "binary" diff --git a/t/recipes/checks/debian/version-substvars/legacy-binary/build-spec/orig/INSTALL b/t/recipes/checks/debian/version-substvars/legacy-binary/build-spec/orig/INSTALL new file mode 100644 index 0000000..3b50ea9 --- /dev/null +++ b/t/recipes/checks/debian/version-substvars/legacy-binary/build-spec/orig/INSTALL @@ -0,0 +1,176 @@ +Basic Installation +================== + + These are generic installation instructions. + + The `configure' shell script attempts to guess correct values for +various system-dependent variables used during compilation. It uses +those values to create a `Makefile' in each directory of the package. +It may also create one or more `.h' files containing system-dependent +definitions. Finally, it creates a shell script `config.status' that +you can run in the future to recreate the current configuration, a file +`config.cache' that saves the results of its tests to speed up +reconfiguring, and a file `config.log' containing compiler output +(useful mainly for debugging `configure'). + + If you need to do unusual things to compile the package, please try +to figure out how `configure' could check whether to do them, and mail +diffs or instructions to the address given in the `README' so they can +be considered for the next release. If at some point `config.cache' +contains results you don't want to keep, you may remove or edit it. + + The file `configure.in' is used to create `configure' by a program +called `autoconf'. You only need `configure.in' if you want to change +it or regenerate `configure' using a newer version of `autoconf'. + +The simplest way to compile this package is: + + 1. `cd' to the directory containing the package's source code and type + `./configure' to configure the package for your system. If you're + using `csh' on an old version of System V, you might need to type + `sh ./configure' instead to prevent `csh' from trying to execute + `configure' itself. + + Running `configure' takes a while. While running, it prints some + messages telling which features it is checking for. + + 2. Type `make' to compile the package. + + 3. Optionally, type `make check' to run any self-tests that come with + the package. + + 4. Type `make install' to install the programs and any data files and + documentation. + + 5. You can remove the program binaries and object files from the + source code directory by typing `make clean'. To also remove the + files that `configure' created (so you can compile the package for + a different kind of computer), type `make distclean'. There is + also a `make maintainer-clean' target, but that is intended mainly + for the package's developers. If you use it, you may have to get + all sorts of other programs in order to regenerate files that came + with the distribution. + +Compilers and Options +===================== + + Some systems require unusual options for compilation or linking that +the `configure' script does not know about. You can give `configure' +initial values for variables by setting them in the environment. Using +a Bourne-compatible shell, you can do that on the command line like +this: + CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure + +Or on systems that have the `env' program, you can do it like this: + env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure + +Compiling For Multiple Architectures +==================================== + + You can compile the package for more than one kind of computer at the +same time, by placing the object files for each architecture in their +own directory. To do this, you must use a version of `make' that +supports the `VPATH' variable, such as GNU `make'. `cd' to the +directory where you want the object files and executables to go and run +the `configure' script. `configure' automatically checks for the +source code in the directory that `configure' is in and in `..'. + + If you have to use a `make' that does not supports the `VPATH' +variable, you have to compile the package for one architecture at a time +in the source code directory. After you have installed the package for +one architecture, use `make distclean' before reconfiguring for another +architecture. + +Installation Names +================== + + By default, `make install' will install the package's files in +`/usr/local/bin', `/usr/local/man', etc. You can specify an +installation prefix other than `/usr/local' by giving `configure' the +option `--prefix=PATH'. + + You can specify separate installation prefixes for +architecture-specific files and architecture-independent files. If you +give `configure' the option `--exec-prefix=PATH', the package will use +PATH as the prefix for installing programs and libraries. +Documentation and other data files will still use the regular prefix. + + If the package supports it, you can cause programs to be installed +with an extra prefix or suffix on their names by giving `configure' the +option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. + +Optional Features +================= + + Some packages pay attention to `--enable-FEATURE' options to +`configure', where FEATURE indicates an optional part of the package. +They may also pay attention to `--with-PACKAGE' options, where PACKAGE +is something like `gnu-as' or `x' (for the X Window System). The +`README' should mention any `--enable-' and `--with-' options that the +package recognizes. + + For packages that use the X Window System, `configure' can usually +find the X include and library files automatically, but if it doesn't, +you can use the `configure' options `--x-includes=DIR' and +`--x-libraries=DIR' to specify their locations. + +Specifying the System Type +========================== + + There may be some features `configure' can not figure out +automatically, but needs to determine by the type of host the package +will run on. Usually `configure' can figure that out, but if it prints +a message saying it can not guess the host type, give it the +`--host=TYPE' option. TYPE can either be a short name for the system +type, such as `sun4', or a canonical name with three fields: + CPU-COMPANY-SYSTEM + +See the file `config.sub' for the possible values of each field. If +`config.sub' isn't included in this package, then this package doesn't +need to know the host type. + + If you are building compiler tools for cross-compiling, you can also +use the `--target=TYPE' option to select the type of system they will +produce code for and the `--build=TYPE' option to select the type of +system on which you are compiling the package. + +Sharing Defaults +================ + + If you want to set default values for `configure' scripts to share, +you can create a site shell script called `config.site' that gives +default values for variables like `CC', `cache_file', and `prefix'. +`configure' looks for `PREFIX/share/config.site' if it exists, then +`PREFIX/etc/config.site' if it exists. Or, you can set the +`CONFIG_SITE' environment variable to the location of the site script. +A warning: not all `configure' scripts look for a site script. + +Operation Controls +================== + + `configure' recognizes the following options to control how it +operates. + +`--cache-file=FILE' + Use and save the results of the tests in FILE instead of + `./config.cache'. Set FILE to `/dev/null' to disable caching, for + debugging `configure'. + +`--help' + Print a summary of the options to `configure', and exit. + +`--quiet' +`--silent' +`-q' + Do not print messages saying which checks are being made. + +`--srcdir=DIR' + Look for the package's source code in directory DIR. Usually + `configure' can determine that directory automatically. + +`--version' + Print the version of Autoconf used to generate the `configure' + script, and exit. + +`configure' also accepts some other, not widely useful, options. + diff --git a/t/recipes/checks/debian/version-substvars/legacy-binary/build-spec/orig/Makefile b/t/recipes/checks/debian/version-substvars/legacy-binary/build-spec/orig/Makefile new file mode 100644 index 0000000..da1dc55 --- /dev/null +++ b/t/recipes/checks/debian/version-substvars/legacy-binary/build-spec/orig/Makefile @@ -0,0 +1,12 @@ +all: hello hello-static + +hello: hello.c + gcc hello.c -o hello + +hello-static: hello.c + gcc -static hello.c -o hello-static + +clean: + rm -f hello hello-static + +distclean: clean diff --git a/t/recipes/checks/debian/version-substvars/legacy-binary/build-spec/orig/hello.c b/t/recipes/checks/debian/version-substvars/legacy-binary/build-spec/orig/hello.c new file mode 100644 index 0000000..2fb04e1 --- /dev/null +++ b/t/recipes/checks/debian/version-substvars/legacy-binary/build-spec/orig/hello.c @@ -0,0 +1,8 @@ +#include +#include + +int main(int argc, char *argv[]) { + + printf("Hello, World!\n"); + exit(0); +} diff --git a/t/recipes/checks/debian/version-substvars/legacy-binary/eval/desc b/t/recipes/checks/debian/version-substvars/legacy-binary/eval/desc new file mode 100644 index 0000000..6d02762 --- /dev/null +++ b/t/recipes/checks/debian/version-substvars/legacy-binary/eval/desc @@ -0,0 +1,2 @@ +Testname: legacy-binary +Check: debian/version-substvars diff --git a/t/recipes/checks/debian/version-substvars/legacy-binary/eval/hints b/t/recipes/checks/debian/version-substvars/legacy-binary/eval/hints new file mode 100644 index 0000000..47fabf6 --- /dev/null +++ b/t/recipes/checks/debian/version-substvars/legacy-binary/eval/hints @@ -0,0 +1,2 @@ +binary (source): not-binnmuable-all-depends-any binary-data -> binary +binary (source): maybe-not-arch-all-binnmuable binary -> binary-data diff --git a/t/recipes/checks/debian/version-substvars/legacy-binary/eval/post-test b/t/recipes/checks/debian/version-substvars/legacy-binary/eval/post-test new file mode 100644 index 0000000..3deefd5 --- /dev/null +++ b/t/recipes/checks/debian/version-substvars/legacy-binary/eval/post-test @@ -0,0 +1,3 @@ +s/arch-dep-package-has-big-usr-share .*kB .*%/arch-dep-package-has-big-usr-share/ +/: hardening-.*/ d +s/\(current is ([0-9]+\.)+[0-9]\)/(current is CURRENT)/ diff --git a/t/recipes/checks/debian/version-substvars/legacy-etcfiles/build-spec/debian/README.Debian b/t/recipes/checks/debian/version-substvars/legacy-etcfiles/build-spec/debian/README.Debian new file mode 100644 index 0000000..e289bfb --- /dev/null +++ b/t/recipes/checks/debian/version-substvars/legacy-etcfiles/build-spec/debian/README.Debian @@ -0,0 +1,5 @@ +this is a package to test lintian's handling of files in /etc. +Also, there's a random mention of /usr/doc here to prompt a warning. +But /usr/documentation doesn't. + + -- Russ Allbery , Mon, 18 Feb 2008 16:40:55 -0800 diff --git a/t/recipes/checks/debian/version-substvars/legacy-etcfiles/build-spec/debian/changelog.in b/t/recipes/checks/debian/version-substvars/legacy-etcfiles/build-spec/debian/changelog.in new file mode 100644 index 0000000..00cdc77 --- /dev/null +++ b/t/recipes/checks/debian/version-substvars/legacy-etcfiles/build-spec/debian/changelog.in @@ -0,0 +1,7 @@ +etcfiles ([% $version %]) [% $distribution %]; urgency=low + + * Acknowledge NMU (Closes: #123456). + * initial setup + + -- Lintian Maintainers Fri, 21 Sep 2001 11:56:02 -0700 + diff --git a/t/recipes/checks/debian/version-substvars/legacy-etcfiles/build-spec/debian/conffiles b/t/recipes/checks/debian/version-substvars/legacy-etcfiles/build-spec/debian/conffiles new file mode 100644 index 0000000..76032b7 --- /dev/null +++ b/t/recipes/checks/debian/version-substvars/legacy-etcfiles/build-spec/debian/conffiles @@ -0,0 +1,5 @@ +/etc/proper +/var/lib/foo +/etc/cron.daily/cronfile-normal +/etc/cron.daily/.cronfile-begins-with-fullstop +/etc/cron.daily/cronfile-contains.fullstop diff --git a/t/recipes/checks/debian/version-substvars/legacy-etcfiles/build-spec/debian/conffiles.only b/t/recipes/checks/debian/version-substvars/legacy-etcfiles/build-spec/debian/conffiles.only new file mode 100644 index 0000000..a4b3895 --- /dev/null +++ b/t/recipes/checks/debian/version-substvars/legacy-etcfiles/build-spec/debian/conffiles.only @@ -0,0 +1,2 @@ +/etc/etcfiles/foo +/etc/etcfiles/bar diff --git a/t/recipes/checks/debian/version-substvars/legacy-etcfiles/build-spec/debian/control b/t/recipes/checks/debian/version-substvars/legacy-etcfiles/build-spec/debian/control new file mode 100644 index 0000000..f3dbda7 --- /dev/null +++ b/t/recipes/checks/debian/version-substvars/legacy-etcfiles/build-spec/debian/control @@ -0,0 +1,20 @@ +Source: etcfiles +Section: misc +Priority: optional +Maintainer: Lintian Maintainers +Standards-Version: 3.5.0 + +Package: etcfiles +Architecture: any +Depends: ${shlibs:Depends} +Description: test handling of files in /etc + Regression test for lintian's handling of files in /etc. + . + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. + +Package: only-etcfiles +Architecture: all +Depends: etcfiles (= ${source:Version}) +Description: test handling of conffile-only package diff --git a/t/recipes/checks/debian/version-substvars/legacy-etcfiles/build-spec/debian/rules b/t/recipes/checks/debian/version-substvars/legacy-etcfiles/build-spec/debian/rules new file mode 100755 index 0000000..97ff09f --- /dev/null +++ b/t/recipes/checks/debian/version-substvars/legacy-etcfiles/build-spec/debian/rules @@ -0,0 +1,64 @@ +#!/usr/bin/make -f + +tmp=debian/tmp +tmponly=debian/only-etcfiles + +clean: + rm -f debian/files debian/substvars + rm -rf debian/tmp + rm -rf debian/only-etcfiles + +build: +build-arch: +build-indep: +binary-indep: + install -d $(tmp)/etc + install -m 644 proper $(tmp)/etc + install -m 644 improper $(tmp)/etc + mkdir $(tmp)/etc/cron.daily + touch $(tmp)/etc/cron.daily/cronfile-normal + touch $(tmp)/etc/cron.daily/.cronfile-begins-with-fullstop + touch $(tmp)/etc/cron.daily/cronfile-contains.fullstop + ln $(tmp)/etc/improper $(tmp)/etc/improper-link + install -d $(tmp)/usr/share/doc/etcfiles + install -d $(tmp)/var/lib + install -m 644 proper $(tmp)/var/lib/foo + install -m 644 debian/README.Debian $(tmp)/usr/share/doc/etcfiles + install -m 644 debian/changelog $(tmp)/usr/share/doc/etcfiles + #gzip -9 $(tmp)/usr/share/doc/etcfiles/changelog + install -d $(tmp)/DEBIAN + install -m 644 debian/conffiles $(tmp)/DEBIAN + + echo 'd41d8cd98f00b204e9800998ecf8427e ./etc/cron.daily/cronfile-normal' \ + > debian/tmp/DEBIAN/md5sums + echo 'd41d8cd98f00b204e9800998ecf8427e ./etc/cron.daily/.cronfile-begins-with-fullstop' \ + >> debian/tmp/DEBIAN/md5sums + echo 'd41d8cd98f00b204e9800998ecf8427e ./etc/cron.daily/cronfile-contains.fullstop' \ + >> debian/tmp/DEBIAN/md5sums + echo '05c72cacce994208128b7d081116b04a ./etc/proper' \ + >> debian/tmp/DEBIAN/md5sums + echo 'ab371382468880299e5ebd05921764ce etc/improper' \ + >> debian/tmp/DEBIAN/md5sums + echo 'ab371382468880299e5ebd05921764ce usr/bin/foo' \ + >> debian/tmp/DEBIAN/md5sums + echo 'this is a malformed line' \ + >> debian/tmp/DEBIAN/md5sums + echo '56fb27e455dd86d8801f1ecd3a4cee49 usr/share/doc/etcfiles/README.Debian' \ + >> debian/tmp/DEBIAN/md5sums + + install -d $(tmponly)/etc/etcfiles + touch $(tmponly)/etc/etcfiles/foo + touch $(tmponly)/etc/etcfiles/bar + install -d $(tmponly)/usr/share/doc + cd $(tmponly)/usr/share/doc && ln -s etcfiles only-etcfiles + install -d $(tmponly)/DEBIAN + install -m 644 debian/conffiles.only $(tmponly)/DEBIAN/conffiles + + dpkg-gencontrol -isp -petcfiles + dpkg-gencontrol -isp -ponly-etcfiles -P$(tmponly) + dpkg --build $(tmp) .. + dpkg --build $(tmponly) .. + +binary: binary-indep + +.PHONY: binary-indep binary clean diff --git a/t/recipes/checks/debian/version-substvars/legacy-etcfiles/build-spec/fill-values b/t/recipes/checks/debian/version-substvars/legacy-etcfiles/build-spec/fill-values new file mode 100644 index 0000000..86deb10 --- /dev/null +++ b/t/recipes/checks/debian/version-substvars/legacy-etcfiles/build-spec/fill-values @@ -0,0 +1,5 @@ +Skeleton: upload-native +Testname: legacy-etcfiles +Source: etcfiles +Version: 1 +Description: Legacy test "etcfiles" diff --git a/t/recipes/checks/debian/version-substvars/legacy-etcfiles/build-spec/orig/improper b/t/recipes/checks/debian/version-substvars/legacy-etcfiles/build-spec/orig/improper new file mode 100644 index 0000000..23656f4 --- /dev/null +++ b/t/recipes/checks/debian/version-substvars/legacy-etcfiles/build-spec/orig/improper @@ -0,0 +1,2 @@ +[config] + var = value \ No newline at end of file diff --git a/t/recipes/checks/debian/version-substvars/legacy-etcfiles/build-spec/orig/proper b/t/recipes/checks/debian/version-substvars/legacy-etcfiles/build-spec/orig/proper new file mode 100644 index 0000000..f3dc68b --- /dev/null +++ b/t/recipes/checks/debian/version-substvars/legacy-etcfiles/build-spec/orig/proper @@ -0,0 +1,2 @@ +# i am a config file +foo = var \ No newline at end of file diff --git a/t/recipes/checks/debian/version-substvars/legacy-etcfiles/eval/desc b/t/recipes/checks/debian/version-substvars/legacy-etcfiles/eval/desc new file mode 100644 index 0000000..d8b2ef7 --- /dev/null +++ b/t/recipes/checks/debian/version-substvars/legacy-etcfiles/eval/desc @@ -0,0 +1,2 @@ +Testname: legacy-etcfiles +Check: debian/version-substvars diff --git a/t/recipes/checks/debian/version-substvars/legacy-etcfiles/eval/hints b/t/recipes/checks/debian/version-substvars/legacy-etcfiles/eval/hints new file mode 100644 index 0000000..939340b --- /dev/null +++ b/t/recipes/checks/debian/version-substvars/legacy-etcfiles/eval/hints @@ -0,0 +1 @@ +etcfiles (source): not-binnmuable-all-depends-any only-etcfiles -> etcfiles diff --git a/t/recipes/checks/debian/version-substvars/legacy-etcfiles/eval/post-test b/t/recipes/checks/debian/version-substvars/legacy-etcfiles/eval/post-test new file mode 100644 index 0000000..faeef0b --- /dev/null +++ b/t/recipes/checks/debian/version-substvars/legacy-etcfiles/eval/post-test @@ -0,0 +1 @@ +s/\(current is ([0-9]+\.)+[0-9]\)/(current is CURRENT)/ diff --git a/t/recipes/checks/debian/version-substvars/legacy-libbaz/build-spec/debian/changelog.in b/t/recipes/checks/debian/version-substvars/legacy-libbaz/build-spec/debian/changelog.in new file mode 100644 index 0000000..91a6bb5 --- /dev/null +++ b/t/recipes/checks/debian/version-substvars/legacy-libbaz/build-spec/debian/changelog.in @@ -0,0 +1,6 @@ +libbaz ([% $version %]) [% $distribution %]; urgency=low + + * Initial setup + + -- Sean 'Shaleh' Perry Tue, 30 Jan 2001 15:23:59 -0800 + diff --git a/t/recipes/checks/debian/version-substvars/legacy-libbaz/build-spec/debian/compat.in b/t/recipes/checks/debian/version-substvars/legacy-libbaz/build-spec/debian/compat.in new file mode 100644 index 0000000..640a566 --- /dev/null +++ b/t/recipes/checks/debian/version-substvars/legacy-libbaz/build-spec/debian/compat.in @@ -0,0 +1 @@ +[% $dh_compat_level %] diff --git a/t/recipes/checks/debian/version-substvars/legacy-libbaz/build-spec/debian/control b/t/recipes/checks/debian/version-substvars/legacy-libbaz/build-spec/debian/control new file mode 100644 index 0000000..1506687 --- /dev/null +++ b/t/recipes/checks/debian/version-substvars/legacy-libbaz/build-spec/debian/control @@ -0,0 +1,58 @@ +Source: libbaz +Section: libs +Priority: optional +Maintainer: Lintian Maintainer +Build-depends: debhelper (>=4) +Standards-Version: 3.2.1 + +Package: libbaz1 +Architecture: any +Provides: libbaz +Description: test handling of library packages + Regression test for lintian's handling of libraries. + . + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. + +Package: libbaz1-dev +Architecture: any +Depends: libbaz1 (= ${source:Version}), perlapi-5.8.8 +Description: development package + Regression test for lintian's handling of libraries (dev). + . + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. + +Package: libbaz2 +Architecture: any +Depends: ${shlibs:Depends}, libssl0.9.8 +Description: test handling of library packages (good) + Regression test for lintian's handling of libraries (good). + . + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. + +Package: libbaz2-dev +Architecture: any +Depends: ${shlibs:Depends}, libbaz2 (= ${source:Version}) +Description: development package (good) + Regression test for lintian's handling of libraries (dev good). + . + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. + +Package: libbaz2-dbg +Architecture: any +Depends: libbaz2 (= ${binary:Version}) +Priority: optional +Description: debugging package + Regression test for lintian's handling of libraries (debug). + . + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. + diff --git a/t/recipes/checks/debian/version-substvars/legacy-libbaz/build-spec/debian/copyright b/t/recipes/checks/debian/version-substvars/legacy-libbaz/build-spec/debian/copyright new file mode 100644 index 0000000..a874c87 --- /dev/null +++ b/t/recipes/checks/debian/version-substvars/legacy-libbaz/build-spec/debian/copyright @@ -0,0 +1,8 @@ +This package is released under public domain. This is distributed in the hope +that it will be useful, but without any warranty; without even the implied +warranty of merchantability or fitness for a particular purpose. + +A reference to /usr/share/common-licenses/GPL-2 to make it look like this +package is under the GPL and trigger the OpenSSL warning. + +However, this has an OpenSSL exception. diff --git a/t/recipes/checks/debian/version-substvars/legacy-libbaz/build-spec/debian/dev.postinst b/t/recipes/checks/debian/version-substvars/legacy-libbaz/build-spec/debian/dev.postinst new file mode 100644 index 0000000..683e3cc --- /dev/null +++ b/t/recipes/checks/debian/version-substvars/legacy-libbaz/build-spec/debian/dev.postinst @@ -0,0 +1,4 @@ +#!/bin/sh -e + +$PKG=libbaz1-dev + diff --git a/t/recipes/checks/debian/version-substvars/legacy-libbaz/build-spec/debian/dev.prerm b/t/recipes/checks/debian/version-substvars/legacy-libbaz/build-spec/debian/dev.prerm new file mode 100644 index 0000000..683e3cc --- /dev/null +++ b/t/recipes/checks/debian/version-substvars/legacy-libbaz/build-spec/debian/dev.prerm @@ -0,0 +1,4 @@ +#!/bin/sh -e + +$PKG=libbaz1-dev + diff --git a/t/recipes/checks/debian/version-substvars/legacy-libbaz/build-spec/debian/lib.postinst b/t/recipes/checks/debian/version-substvars/legacy-libbaz/build-spec/debian/lib.postinst new file mode 100644 index 0000000..ec0b98a --- /dev/null +++ b/t/recipes/checks/debian/version-substvars/legacy-libbaz/build-spec/debian/lib.postinst @@ -0,0 +1,10 @@ +#!/bin/sh -e + +$PKG=libbaz1 + +if [ "$1" = "configure" ]; then + if [ -d /usr/doc -a ! -e /usr/doc/$PKG -a -d /usr/share/doc/$PKG ] +; then + ln -sf ../share/doc/$PKG /usr/doc/$PKG + fi +fi diff --git a/t/recipes/checks/debian/version-substvars/legacy-libbaz/build-spec/debian/lib.prerm b/t/recipes/checks/debian/version-substvars/legacy-libbaz/build-spec/debian/lib.prerm new file mode 100644 index 0000000..50e37c3 --- /dev/null +++ b/t/recipes/checks/debian/version-substvars/legacy-libbaz/build-spec/debian/lib.prerm @@ -0,0 +1,7 @@ +#!/bin/sh -e + +$PKG=libbaz1 + +if [ \( "$1" = "upgrade" -o "$1" = "remove" \) -a -L /usr/doc/$PKG ]; then + rm -f /usr/doc/$PKG +fi diff --git a/t/recipes/checks/debian/version-substvars/legacy-libbaz/build-spec/debian/lib.shlibs b/t/recipes/checks/debian/version-substvars/legacy-libbaz/build-spec/debian/lib.shlibs new file mode 100644 index 0000000..b88e288 --- /dev/null +++ b/t/recipes/checks/debian/version-substvars/legacy-libbaz/build-spec/debian/lib.shlibs @@ -0,0 +1,8 @@ +libdoesntexist2 1.0 libbaz1 +libdoesntexist2 1.0 libbaz1 +libbaz2 1.1 libbaz +libbaz3 1 libbaz1 (>> 1-1) +libbaz4 1 libbaz1 (= 1-1) +libbaz5 1 libbaz2 +udeb: libdoesntexist2 1.0 libbaz2 +udeb: libdoesntexist2 1.0 libbaz2 diff --git a/t/recipes/checks/debian/version-substvars/legacy-libbaz/build-spec/debian/lib.symbols b/t/recipes/checks/debian/version-substvars/legacy-libbaz/build-spec/debian/lib.symbols new file mode 100644 index 0000000..72f9d8a --- /dev/null +++ b/t/recipes/checks/debian/version-substvars/legacy-libbaz/build-spec/debian/lib.symbols @@ -0,0 +1,3 @@ +libbaz.so.2 libbaz1 #MINVER# + pw 1-1 + foo 1.1-1 diff --git a/t/recipes/checks/debian/version-substvars/legacy-libbaz/build-spec/debian/rules b/t/recipes/checks/debian/version-substvars/legacy-libbaz/build-spec/debian/rules new file mode 100755 index 0000000..fa99bc8 --- /dev/null +++ b/t/recipes/checks/debian/version-substvars/legacy-libbaz/build-spec/debian/rules @@ -0,0 +1,121 @@ +#!/usr/bin/make -f + +lib_tmp=debian/tmp-lib +dev_tmp=debian/tmp-dev + +LIB=libbaz1 +DEV=libbaz1-dev + +VENDORARCH := $(shell perl -MConfig -wE'say substr($$Config{vendorarch},1)') + +build-arch: + $(MAKE) + +build-indep: + +build: build-arch build-indep + +clean: + $(MAKE) clean + dh_clean -plibbaz2 -plibbaz2-dev + rm -f debian/files debian/substvars + rm -rf $(lib_tmp) $(dev_tmp) + +# Now the correct libbaz2-dev package +binary-correct: + install -d debian/libbaz2-dev/usr/lib + cp -a libbaz2.a libbaz2.so debian/libbaz2-dev/usr/lib + # usually, I'd also include some .h files to /usr/include + + # Now the correct libbaz2 package + install -d debian/libbaz2/usr/lib + cp -a libbaz2.so.* debian/libbaz2/usr/lib + chmod a-x debian/libbaz2/usr/lib/* + + # General stuff that is tested in other testsets: + dh_installdocs -plibbaz2 -plibbaz2-dev -plibbaz2-dbg + dh_compress -plibbaz2 -plibbaz2-dev -plibbaz2-dbg + + # Mess up the libbaz2 changelog files to test the symlink handling. + ln -s /usr/share/doc/lintian/changelog.gz \ + debian/libbaz2/usr/share/doc/libbaz2/changelog.gz + install -m 644 debian/changelog \ + debian/libbaz2-dev/usr/share/doc/libbaz2-dev/foo + ln -s foo debian/libbaz2-dev/usr/share/doc/libbaz2-dev/changelog + + # Okay, if either line is omitted, it should be noted + dh_strip --dbg-package=libbaz2-dbg -plibbaz2 -plibbaz2-dev + dh_makeshlibs -plibbaz2 -plibbaz2-dev -plibbaz2-dbg + dh_shlibdeps -plibbaz2 -plibbaz2-dev -plibbaz2-dbg + + # and again, regular packaging stuff + dh_installdeb -plibbaz2 -plibbaz2-dev -plibbaz2-dbg + echo udeb: libbaz2 1.0 libbaz2 >> debian/libbaz2/DEBIAN/shlibs + dh_gencontrol -plibbaz2 -plibbaz2-dev -plibbaz2-dbg + dh_builddeb -plibbaz2 -plibbaz2-dev -plibbaz2-dbg + +# and the incorrect one +binary-arch: build-arch binary-correct + # first, the lib package + install -d $(lib_tmp)/usr/lib + # resp. no soname (check), wrong soname (check), and no-pic (check) + cp -a libbaz1.so.1.0* $(lib_tmp)/usr/lib + cp -a libbaz2.so.1.0.3b $(lib_tmp)/usr/lib/libfoo2.so.1.0.3b + install -m644 libbaz3.so.1.0.3b $(lib_tmp)/usr/lib/libbaz3.so.1.0.3b + # let's include the .a in the non-dev too (TODO) + # Also, libbaz1.a hasn't a symbol table (TODO) + cp -a *.a $(lib_tmp)/usr/lib + # And a wrong .so symlink (wrong, only in -dev, TODO) + ln -s libfoo3.so.0.9 $(lib_tmp)/usr/lib/libfoo3.so + # And a wrong .so.X symlink (wrong, should point to a real existing + # shlib, TODO) + ln -s libfoo.so.0.9.1 $(lib_tmp)/usr/lib/libfoo.so.0.9 + # And a plain .so (wrong, TODO) + touch $(lib_tmp)/usr/lib/libbar2.so + # And a non-versioned SONAME. + install -m644 libbaz.so $(lib_tmp)/usr/lib/libbaz.so + strip --remove-section=.comment --strip-unneeded $(lib_tmp)/usr/lib/libbaz.so + # Pretend to be a Perl module to test a lack of Perl dependencies. + install -d $(lib_tmp)/$(VENDORARCH)/auto/Foo + install -m 644 libbaz2.so.1.0.3b $(lib_tmp)/$(VENDORARCH)/auto/Foo/Foo.so + strip $(lib_tmp)/$(VENDORARCH)/auto/Foo/Foo.so + + install -d $(lib_tmp)/usr/share/doc/$(LIB) + install -m 644 debian/copyright $(lib_tmp)/usr/share/doc/$(LIB) + install -m 644 debian/changelog $(lib_tmp)/usr/share/doc/$(LIB) + gzip -n -9 $(lib_tmp)/usr/share/doc/$(LIB)/changelog + install -d $(lib_tmp)/DEBIAN + install -m 755 debian/lib.postinst $(lib_tmp)/DEBIAN/postinst + install -m 755 debian/lib.prerm $(lib_tmp)/DEBIAN/prerm + touch $(lib_tmp)/usr/share/doc/README.Debian + #dpkg-shlibdeps $(lib_tmp)/usr/lib/libbaz.so.1.0 + install -m 755 debian/lib.shlibs $(lib_tmp)/DEBIAN/shlibs + install -m 755 debian/lib.symbols $(lib_tmp)/DEBIAN/symbols + dpkg-gencontrol -isp -p$(LIB) -P$(lib_tmp) + dpkg --build $(lib_tmp) .. + + # now the -dev package + install -d $(dev_tmp)/usr/include + install -d $(lib_tmp)/usr/lib + # let's also install the .so at the same time... (wrong, TODO) + cp -a *.a *.so.* $(lib_tmp)/usr/lib + # and fuck up permission (TODO) + chmod a+x $(lib_tmp)/usr/lib/*.a + # Pretend to be a Perl module to test a lack of Perl dependencies. + install -d $(dev_tmp)/$(VENDORARCH)/auto/Foo + install -m 644 libbaz2.so.1.0.3b $(dev_tmp)/$(VENDORARCH)/auto/Foo/Foo.so + strip $(dev_tmp)/$(VENDORARCH)/auto/Foo/Foo.so + install -d $(dev_tmp)/usr/share/doc + ln -s $(LIB) $(dev_tmp)/usr/share/doc/$(DEV) + install -d $(dev_tmp)/DEBIAN + install -m 755 debian/dev.postinst $(dev_tmp)/DEBIAN/postinst + install -m 755 debian/dev.prerm $(dev_tmp)/DEBIAN/prerm + dpkg-gencontrol -isp -p$(DEV) -P$(dev_tmp) + dpkg --build $(dev_tmp) .. + + +binary: binary-arch + +# The mention of binary-indep here should be sufficient to suppress the +# warning that it's not present. +.PHONY: build-arch build-indep build binary-arch binary-indep binary clean diff --git a/t/recipes/checks/debian/version-substvars/legacy-libbaz/build-spec/debian/source.lintian-overrides b/t/recipes/checks/debian/version-substvars/legacy-libbaz/build-spec/debian/source.lintian-overrides new file mode 100644 index 0000000..6008d27 --- /dev/null +++ b/t/recipes/checks/debian/version-substvars/legacy-libbaz/build-spec/debian/source.lintian-overrides @@ -0,0 +1 @@ +libbaz source: maintainer-script-lacks-debhelper-token diff --git a/t/recipes/checks/debian/version-substvars/legacy-libbaz/build-spec/fill-values b/t/recipes/checks/debian/version-substvars/legacy-libbaz/build-spec/fill-values new file mode 100644 index 0000000..7effe4f --- /dev/null +++ b/t/recipes/checks/debian/version-substvars/legacy-libbaz/build-spec/fill-values @@ -0,0 +1,6 @@ +Skeleton: upload-non-native +Testname: legacy-libbaz +Source: libbaz +Version: 1-1 +Default-Build-Depends: debhelper (>= 9.20151004~) +Description: Legacy test "libbaz" diff --git a/t/recipes/checks/debian/version-substvars/legacy-libbaz/build-spec/orig/Makefile b/t/recipes/checks/debian/version-substvars/legacy-libbaz/build-spec/orig/Makefile new file mode 100644 index 0000000..657dc2a --- /dev/null +++ b/t/recipes/checks/debian/version-substvars/legacy-libbaz/build-spec/orig/Makefile @@ -0,0 +1,55 @@ +# This is the correct way to build a lib + +CC=gcc +CFLAGS=-g -Wall -Winline -O2 +LDFLAGS=-Wl,--no-as-needed + +OBJS=baz.o extra.o +SHOBJS=baz.sho extra.sho +NOPICOBJS = $(SHOBJS) + +all: libbaz1.a libbaz2.a libbaz1.so.1.0.3b libbaz2.so libbaz3.so.1.0.3b \ + libbaz.so + +libbaz2.so: libbaz2.so.1.0 + ln -sf $^ $@ +libbaz2.so.1.0: libbaz2.so.1.0.3b + ln -sf $^ $@ + +# Oops, forget the soname altogether +libbaz1.so.1.0.3b: $(NOPICOBJS) + $(CC) $(LDFLAGS) -o $@ -shared $^ -lc + +libbaz2.so.1.0.3b: $(SHOBJS) + $(CC) $(LDFLAGS) -o $@ -shared -Wl,-soname,libbaz2.so.1.0 $^ -lc + +# Non-PIC. We can't test this on all architectures +libbaz3.so.1.0.3b: $(NOPICOBJS) + $(CC) $(LDFLAGS) -o $@ -shared -Wl,-soname,libbaz3.so.1 $^ -lc + +# Non-versioned SONAME. +libbaz.so: $(SHOBJS) + $(CC) $(LDFLAGS) -o $@ -shared -Wl,-soname,libbaz.so $^ -lc + +#%.o-noreentrant: %.c +# $(CC) $(LDFLAGS) $(CFLAGS) -o $@ -c $< + +%.sho: %.c + $(CC) $(LDFLAGS) $(CFLAGS) -D_REENTRANT -fPIC -o $@ -c $< + +%.o: %.c + $(CC) $(LDFLAGS) $(CFLAGS) -D_REENTRANT -o $@ -c $< + +libbaz2.a: $(OBJS) + ar cq $@ $(OBJS) + strip --strip-unneeded --remove-section=.comment \ + --remove-section=-note $@ + ranlib $@ + +# The pic one in the .a (wrong), no archive table +libbaz1.a: $(SHOBJS) + ar cqS $@ $^ + strip --strip-unneeded --remove-section=.comment \ + --remove-section=-note $@ +clean: + rm -f *.a *.o *.so* *.sho diff --git a/t/recipes/checks/debian/version-substvars/legacy-libbaz/build-spec/orig/baz.c b/t/recipes/checks/debian/version-substvars/legacy-libbaz/build-spec/orig/baz.c new file mode 100644 index 0000000..4d5fc45 --- /dev/null +++ b/t/recipes/checks/debian/version-substvars/legacy-libbaz/build-spec/orig/baz.c @@ -0,0 +1,6 @@ +#include + +double pw(double p) +{ + return exp(p); +} diff --git a/t/recipes/checks/debian/version-substvars/legacy-libbaz/build-spec/orig/extra.c b/t/recipes/checks/debian/version-substvars/legacy-libbaz/build-spec/orig/extra.c new file mode 100644 index 0000000..e69de29 diff --git a/t/recipes/checks/debian/version-substvars/legacy-libbaz/eval/desc b/t/recipes/checks/debian/version-substvars/legacy-libbaz/eval/desc new file mode 100644 index 0000000..9f00b57 --- /dev/null +++ b/t/recipes/checks/debian/version-substvars/legacy-libbaz/eval/desc @@ -0,0 +1,2 @@ +Testname: legacy-libbaz +Check: debian/version-substvars diff --git a/t/recipes/checks/debian/version-substvars/legacy-libbaz/eval/hints b/t/recipes/checks/debian/version-substvars/legacy-libbaz/eval/hints new file mode 100644 index 0000000..81c169a --- /dev/null +++ b/t/recipes/checks/debian/version-substvars/legacy-libbaz/eval/hints @@ -0,0 +1,2 @@ +libbaz (source): not-binnmuable-any-depends-any libbaz2-dev -> libbaz2 +libbaz (source): not-binnmuable-any-depends-any libbaz1-dev -> libbaz1 diff --git a/t/recipes/checks/debian/version-substvars/legacy-libbaz/eval/post-test b/t/recipes/checks/debian/version-substvars/legacy-libbaz/eval/post-test new file mode 100755 index 0000000..29dc3f4 --- /dev/null +++ b/t/recipes/checks/debian/version-substvars/legacy-libbaz/eval/post-test @@ -0,0 +1,4 @@ +/: hardening-.*/ d +s/\(current is ([0-9]+\.)+[0-9]\)/(current is CURRENT)/ +s,usr/lib/([^\/]*/)?perl[0-9]*(/[0-9]*\.[0-9]*)?/,usr/lib/ma-dir/perl/version/,g +/: file-references-package-build-path / d diff --git a/t/recipes/checks/debian/version-substvars/version-substvars-general/build-spec/debian/control.in b/t/recipes/checks/debian/version-substvars/version-substvars-general/build-spec/debian/control.in new file mode 100644 index 0000000..bedaad7 --- /dev/null +++ b/t/recipes/checks/debian/version-substvars/version-substvars-general/build-spec/debian/control.in @@ -0,0 +1,62 @@ +Source: [% $source %] +Priority: optional +Section: [% $section %] +Maintainer: [% $author %] +Standards-Version: [% $standards_version %] +Build-Depends: [% $build_depends %] +Rules-Requires-Root: no + +Package: program-bin +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends}, + program-data (= ${binary:Version}), + program-data-extra (= ${source:Version}) +Provides: + provided-package (= ${binary:Version}), + provided-package-2 (= ${binary:Version}) +Description: [% $description %] + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. + + +Package: program-data +Architecture: all +Depends: ${shlibs:Depends}, ${misc:Depends}, + foreign-pkg:any (= ${source:Version}) +Suggests: provided-package (= ${binary:Version}) +Replaces: other-foreign-pkg:any (<< ${binary:Version}) +Recommends: another-foreign-pkg-${suffix}:any (= ${source:Version}) +Description: [% $description %] - data + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. + . + Data package. + +Package: program-utils +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends}, + program-bin:any (= ${source:Version}), + program-data (>= ${binary:Version}) +Description: [% $description %] - extra utils + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. + . + Extra utils. + +Package: program-data-extra +Architecture: all +Depends: ${shlibs:Depends}, ${misc:Depends}, + program-bin:any (= ${binary:Version}), +Description: [% $description %] - extra data + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. + . + Extra-Data package. diff --git a/t/recipes/checks/debian/version-substvars/version-substvars-general/build-spec/fill-values b/t/recipes/checks/debian/version-substvars/version-substvars-general/build-spec/fill-values new file mode 100644 index 0000000..4ccfdc0 --- /dev/null +++ b/t/recipes/checks/debian/version-substvars/version-substvars-general/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: upload-native +Testname: version-substvars-general +Description: Test of substvars diff --git a/t/recipes/checks/debian/version-substvars/version-substvars-general/eval/desc b/t/recipes/checks/debian/version-substvars/version-substvars-general/eval/desc new file mode 100644 index 0000000..a564fe5 --- /dev/null +++ b/t/recipes/checks/debian/version-substvars/version-substvars-general/eval/desc @@ -0,0 +1,2 @@ +Testname: version-substvars-general +Check: debian/version-substvars diff --git a/t/recipes/checks/debian/version-substvars/version-substvars-general/eval/hints b/t/recipes/checks/debian/version-substvars/version-substvars-general/eval/hints new file mode 100644 index 0000000..90f8083 --- /dev/null +++ b/t/recipes/checks/debian/version-substvars/version-substvars-general/eval/hints @@ -0,0 +1,7 @@ +version-substvars-general (source): version-substvar-for-external-package Replaces ${binary:Version} program-data -> other-foreign-pkg [debian/control:29] +version-substvars-general (source): version-substvar-for-external-package Depends ${source:Version} program-data -> foreign-pkg [debian/control:26] +version-substvars-general (source): not-binnmuable-any-depends-any program-utils -> program-bin +version-substvars-general (source): not-binnmuable-any-depends-all program-utils -> program-data +version-substvars-general (source): not-binnmuable-any-depends-all program-bin -> program-data +version-substvars-general (source): not-binnmuable-all-depends-any program-data-extra -> program-bin +version-substvars-general (source): maybe-not-arch-all-binnmuable program-bin -> program-data-extra diff --git a/t/recipes/checks/debian/version-substvars/version-substvars-obsolete/build-spec/debian/control.in b/t/recipes/checks/debian/version-substvars/version-substvars-obsolete/build-spec/debian/control.in new file mode 100644 index 0000000..200f9ad --- /dev/null +++ b/t/recipes/checks/debian/version-substvars/version-substvars-obsolete/build-spec/debian/control.in @@ -0,0 +1,57 @@ +Source: [% $source %] +Priority: optional +Section: [% $section %] +Maintainer: [% $author %] +Standards-Version: [% $standards_version %] +Build-Depends: [% $build_depends %] +Rules-Requires-Root: no + +Package: program-bin +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends}, + program-data (= ${binary:Version}), + program-data-extra (= ${source:Version}) +Description: [% $description %] + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. + + +Package: program-data +Architecture: all +Depends: ${shlibs:Depends}, ${misc:Depends}, + foreign-pkg:any (= ${Source-Version}) +Replaces: other-foreign-pkg:any (<< ${binary:Version}) +Description: [% $description %] - data + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. + . + Data package. + +Package: program-utils +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends}, + program-bin:any (= ${source:Version}), + program-data (>= ${binary:Version}) +Description: [% $description %] - extra utils + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. + . + Extra utils. + +Package: program-data-extra +Architecture: all +Depends: ${shlibs:Depends}, ${misc:Depends}, + program-bin:any (= ${binary:Version}), +Description: [% $description %] - extra data + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. + . + Extra-Data package. diff --git a/t/recipes/checks/debian/version-substvars/version-substvars-obsolete/build-spec/fill-values b/t/recipes/checks/debian/version-substvars/version-substvars-obsolete/build-spec/fill-values new file mode 100644 index 0000000..ec9740c --- /dev/null +++ b/t/recipes/checks/debian/version-substvars/version-substvars-obsolete/build-spec/fill-values @@ -0,0 +1,5 @@ +Skeleton: upload-native +Testname: version-substvars-obsolete +Description: Test of substvars +Extra-Build-Depends: dpkg (<< 1.17.2) +# dpkg 1.18.11 Will error out for ${source-version} diff --git a/t/recipes/checks/debian/version-substvars/version-substvars-obsolete/eval/desc b/t/recipes/checks/debian/version-substvars/version-substvars-obsolete/eval/desc new file mode 100644 index 0000000..25c3fcb --- /dev/null +++ b/t/recipes/checks/debian/version-substvars/version-substvars-obsolete/eval/desc @@ -0,0 +1,3 @@ +Testname: version-substvars-obsolete +Check: debian/version-substvars +# dpkg 1.18.11 Will error out for ${source-version} diff --git a/t/recipes/checks/debian/version-substvars/version-substvars-obsolete/eval/hints b/t/recipes/checks/debian/version-substvars/version-substvars-obsolete/eval/hints new file mode 100644 index 0000000..e1b5e52 --- /dev/null +++ b/t/recipes/checks/debian/version-substvars/version-substvars-obsolete/eval/hints @@ -0,0 +1,8 @@ +version-substvars-obsolete (source): version-substvar-for-external-package program-data -> other-foreign-pkg +version-substvars-obsolete (source): version-substvar-for-external-package program-data -> foreign-pkg +version-substvars-obsolete (source): substvar-source-version-is-deprecated program-data +version-substvars-obsolete (source): not-binnmuable-any-depends-any program-utils -> program-bin +version-substvars-obsolete (source): not-binnmuable-any-depends-all program-utils -> program-data +version-substvars-obsolete (source): not-binnmuable-any-depends-all program-bin -> program-data +version-substvars-obsolete (source): not-binnmuable-all-depends-any program-data-extra -> program-bin +version-substvars-obsolete (source): maybe-not-arch-all-binnmuable program-bin -> program-data-extra diff --git a/t/recipes/checks/debian/watch/changes-upstream-signature-missing/build-spec/debian/upstream/signing-key.asc b/t/recipes/checks/debian/watch/changes-upstream-signature-missing/build-spec/debian/upstream/signing-key.asc new file mode 100644 index 0000000..bd03c4e --- /dev/null +++ b/t/recipes/checks/debian/watch/changes-upstream-signature-missing/build-spec/debian/upstream/signing-key.asc @@ -0,0 +1 @@ +Too lazy to fake this file diff --git a/t/recipes/checks/debian/watch/changes-upstream-signature-missing/build-spec/fill-values b/t/recipes/checks/debian/watch/changes-upstream-signature-missing/build-spec/fill-values new file mode 100644 index 0000000..c3943fa --- /dev/null +++ b/t/recipes/checks/debian/watch/changes-upstream-signature-missing/build-spec/fill-values @@ -0,0 +1,6 @@ +Testname: changes-upstream-signature-missing +Skeleton: upload-non-native +Source-Format: 3.0 (quilt) +Description: No upstream signature included but package contains a signing key +Extra-Build-Depends: dpkg (>= 1.18.5) +# dpkg 1.18.5 required in order to create multiple tarballs with detached signatures diff --git a/t/recipes/checks/debian/watch/changes-upstream-signature-missing/build-spec/pre-build b/t/recipes/checks/debian/watch/changes-upstream-signature-missing/build-spec/pre-build new file mode 100755 index 0000000..2d5a158 --- /dev/null +++ b/t/recipes/checks/debian/watch/changes-upstream-signature-missing/build-spec/pre-build @@ -0,0 +1,18 @@ +#!/bin/sh + +set -e + +DIR="$1" +NAME="changes-upstream-signature-missing" +VERSION="1.0" + +# Check all components +cp ${DIR}/../${NAME}_${VERSION}.orig.tar.gz ${DIR}/../${NAME}_${VERSION}.orig-component.tar.gz + +# Don't emit if we have a signature +cp ${DIR}/../${NAME}_${VERSION}.orig.tar.gz ${DIR}/../${NAME}_${VERSION}.orig-signed.tar.gz +touch ${DIR}/../${NAME}_${VERSION}.orig-signed.tar.gz.asc + +# Don't emit if we have .tar.asc (NB. not a .tar.gz.asc) +cp ${DIR}/../${NAME}_${VERSION}.orig.tar.gz ${DIR}/../${NAME}_${VERSION}.orig-noext.tar.gz +touch ${DIR}/../${NAME}_${VERSION}.orig-noext.tar.gz.asc diff --git a/t/recipes/checks/debian/watch/changes-upstream-signature-missing/eval/desc b/t/recipes/checks/debian/watch/changes-upstream-signature-missing/eval/desc new file mode 100644 index 0000000..6c8544d --- /dev/null +++ b/t/recipes/checks/debian/watch/changes-upstream-signature-missing/eval/desc @@ -0,0 +1,3 @@ +Testname: changes-upstream-signature-missing +Check: debian/watch +# dpkg 1.18.5 required in order to create multiple tarballs with detached signatures diff --git a/t/recipes/checks/debian/watch/changes-upstream-signature-missing/eval/hints b/t/recipes/checks/debian/watch/changes-upstream-signature-missing/eval/hints new file mode 100644 index 0000000..a1301ce --- /dev/null +++ b/t/recipes/checks/debian/watch/changes-upstream-signature-missing/eval/hints @@ -0,0 +1,2 @@ +changes-upstream-signature-missing (source): debian-watch-does-not-check-openpgp-signature [debian/watch] +changes-upstream-signature-missing (source): debian-watch-could-verify-download debian/upstream/signing-key.asc [debian/watch] diff --git a/t/recipes/checks/debian/watch/filenamemangle/build-spec/debian/watch b/t/recipes/checks/debian/watch/filenamemangle/build-spec/debian/watch new file mode 100644 index 0000000..c266694 --- /dev/null +++ b/t/recipes/checks/debian/watch/filenamemangle/build-spec/debian/watch @@ -0,0 +1,5 @@ +version=4 +opts=\ + downloadurlmangle=s/\/releases\/tag\/(\d\S+)$/\/archive\/$1\.tar\.gz/,\ + filenamemangle=s/.+\/tag\/(\d\S+)$/foot-$1\.tar\.gz/ \ +https://codeberg.org/dnkl/foot/releases .*/releases/tag/(\d\S+) diff --git a/t/recipes/checks/debian/watch/filenamemangle/build-spec/fill-values b/t/recipes/checks/debian/watch/filenamemangle/build-spec/fill-values new file mode 100644 index 0000000..b0aec17 --- /dev/null +++ b/t/recipes/checks/debian/watch/filenamemangle/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: source-non-native +Testname: filenamemangle +Description: Option filenamemangle in d/watch diff --git a/t/recipes/checks/debian/watch/filenamemangle/eval/desc b/t/recipes/checks/debian/watch/filenamemangle/eval/desc new file mode 100644 index 0000000..9c5d3bc --- /dev/null +++ b/t/recipes/checks/debian/watch/filenamemangle/eval/desc @@ -0,0 +1,2 @@ +Testname: filenamemangle +Check: debian/watch diff --git a/t/recipes/checks/debian/watch/filenamemangle/eval/hints b/t/recipes/checks/debian/watch/filenamemangle/eval/hints new file mode 100644 index 0000000..3cb3be0 --- /dev/null +++ b/t/recipes/checks/debian/watch/filenamemangle/eval/hints @@ -0,0 +1,2 @@ +filenamemangle (source): prefer-uscan-symlink filenamemangle s/.+\/tag\/(\d\S+)$/foot-$1\.tar\.gz/ [debian/watch:5] +filenamemangle (source): debian-watch-does-not-check-openpgp-signature [debian/watch] diff --git a/t/recipes/checks/debian/watch/generic-dh-make-2008/build-spec/debian/README.Debian b/t/recipes/checks/debian/watch/generic-dh-make-2008/build-spec/debian/README.Debian new file mode 100644 index 0000000..69112e6 --- /dev/null +++ b/t/recipes/checks/debian/watch/generic-dh-make-2008/build-spec/debian/README.Debian @@ -0,0 +1,6 @@ +generic-dh-make-2008 for Debian +------------------------------- + + + + -- Russ Allbery Mon, 29 Dec 2008 17:33:59 -0800 diff --git a/t/recipes/checks/debian/watch/generic-dh-make-2008/build-spec/debian/changelog.in b/t/recipes/checks/debian/watch/generic-dh-make-2008/build-spec/debian/changelog.in new file mode 100644 index 0000000..8d16a3d --- /dev/null +++ b/t/recipes/checks/debian/watch/generic-dh-make-2008/build-spec/debian/changelog.in @@ -0,0 +1,5 @@ +generic-dh-make-2008 ([% $version %]) [% $distribution %]; urgency=low + + * Initial release (Closes: #nnnn) + + -- Russ Allbery Mon, 29 Dec 2008 17:33:59 -0800 diff --git a/t/recipes/checks/debian/watch/generic-dh-make-2008/build-spec/debian/compat.in b/t/recipes/checks/debian/watch/generic-dh-make-2008/build-spec/debian/compat.in new file mode 100644 index 0000000..640a566 --- /dev/null +++ b/t/recipes/checks/debian/watch/generic-dh-make-2008/build-spec/debian/compat.in @@ -0,0 +1 @@ +[% $dh_compat_level %] diff --git a/t/recipes/checks/debian/watch/generic-dh-make-2008/build-spec/debian/control.in b/t/recipes/checks/debian/watch/generic-dh-make-2008/build-spec/debian/control.in new file mode 100644 index 0000000..a668392 --- /dev/null +++ b/t/recipes/checks/debian/watch/generic-dh-make-2008/build-spec/debian/control.in @@ -0,0 +1,13 @@ +Source: generic-dh-make-2008 +Section: unknown +Priority: optional +Maintainer: Russ Allbery +Build-Depends: debhelper (>= 7) +Standards-Version: 3.7.3 +Homepage: + +Package: generic-dh-make-2008 +Architecture: [% $package_architecture %] +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: + diff --git a/t/recipes/checks/debian/watch/generic-dh-make-2008/build-spec/debian/copyright b/t/recipes/checks/debian/watch/generic-dh-make-2008/build-spec/debian/copyright new file mode 100644 index 0000000..31b796a --- /dev/null +++ b/t/recipes/checks/debian/watch/generic-dh-make-2008/build-spec/debian/copyright @@ -0,0 +1,24 @@ +This package was debianized by Russ Allbery on +Mon, 29 Dec 2008 17:33:59 -0800. + +It was downloaded from + +Upstream Author(s): + + + + +Copyright: + + + + +License: + + + +The Debian packaging is (C) 2008, Russ Allbery and +is licensed under the GPL, see `/usr/share/common-licenses/GPL'. + +# Please also look if there are files or directories which have a +# different copyright/license attached and list them here. diff --git a/t/recipes/checks/debian/watch/generic-dh-make-2008/build-spec/debian/cron.d.ex b/t/recipes/checks/debian/watch/generic-dh-make-2008/build-spec/debian/cron.d.ex new file mode 100644 index 0000000..d00b7d0 --- /dev/null +++ b/t/recipes/checks/debian/watch/generic-dh-make-2008/build-spec/debian/cron.d.ex @@ -0,0 +1,4 @@ +# +# Regular cron jobs for the generic-dh-make-2008 package +# +0 4 * * * root [ -x /usr/bin/generic-dh-make-2008_maintenance ] && /usr/bin/generic-dh-make-2008_maintenance diff --git a/t/recipes/checks/debian/watch/generic-dh-make-2008/build-spec/debian/dirs b/t/recipes/checks/debian/watch/generic-dh-make-2008/build-spec/debian/dirs new file mode 100644 index 0000000..ca882bb --- /dev/null +++ b/t/recipes/checks/debian/watch/generic-dh-make-2008/build-spec/debian/dirs @@ -0,0 +1,2 @@ +usr/bin +usr/sbin diff --git a/t/recipes/checks/debian/watch/generic-dh-make-2008/build-spec/debian/docs b/t/recipes/checks/debian/watch/generic-dh-make-2008/build-spec/debian/docs new file mode 100644 index 0000000..e845566 --- /dev/null +++ b/t/recipes/checks/debian/watch/generic-dh-make-2008/build-spec/debian/docs @@ -0,0 +1 @@ +README diff --git a/t/recipes/checks/debian/watch/generic-dh-make-2008/build-spec/debian/emacsen-install.ex b/t/recipes/checks/debian/watch/generic-dh-make-2008/build-spec/debian/emacsen-install.ex new file mode 100644 index 0000000..393594b --- /dev/null +++ b/t/recipes/checks/debian/watch/generic-dh-make-2008/build-spec/debian/emacsen-install.ex @@ -0,0 +1,45 @@ +#! /bin/sh -e +# /usr/lib/emacsen-common/packages/install/generic-dh-make-2008 + +# Written by Jim Van Zandt , borrowing heavily +# from the install scripts for gettext by Santiago Vila +# and octave by Dirk Eddelbuettel . + +FLAVOR=$1 +PACKAGE=generic-dh-make-2008 + +if [ ${FLAVOR} = emacs ]; then exit 0; fi + +echo install/${PACKAGE}: Handling install for emacsen flavor ${FLAVOR} + +#FLAVORTEST=`echo $FLAVOR | cut -c-6` +#if [ ${FLAVORTEST} = xemacs ] ; then +# SITEFLAG="-no-site-file" +#else +# SITEFLAG="--no-site-file" +#fi +FLAGS="${SITEFLAG} -q -batch -l path.el -f batch-byte-compile" + +ELDIR=/usr/share/emacs/site-lisp/${PACKAGE} +ELCDIR=/usr/share/${FLAVOR}/site-lisp/${PACKAGE} + +# Install-info-altdir does not actually exist. +# Maybe somebody will write it. +if test -x /usr/sbin/install-info-altdir; then + echo install/${PACKAGE}: install Info links for ${FLAVOR} + install-info-altdir --quiet --section "" "" --dirname=${FLAVOR} /usr/share/info/${PACKAGE}.info.gz +fi + +install -m 755 -d ${ELCDIR} +cd ${ELDIR} +FILES=`echo *.el` +cp ${FILES} ${ELCDIR} +cd ${ELCDIR} + +cat << EOF > path.el +(setq load-path (cons "." load-path) byte-compile-warnings nil) +EOF +${FLAVOR} ${FLAGS} ${FILES} +rm -f *.el path.el + +exit 0 diff --git a/t/recipes/checks/debian/watch/generic-dh-make-2008/build-spec/debian/emacsen-remove.ex b/t/recipes/checks/debian/watch/generic-dh-make-2008/build-spec/debian/emacsen-remove.ex new file mode 100644 index 0000000..c48d194 --- /dev/null +++ b/t/recipes/checks/debian/watch/generic-dh-make-2008/build-spec/debian/emacsen-remove.ex @@ -0,0 +1,15 @@ +#!/bin/sh -e +# /usr/lib/emacsen-common/packages/remove/generic-dh-make-2008 + +FLAVOR=$1 +PACKAGE=generic-dh-make-2008 + +if [ ${FLAVOR} != emacs ]; then + if test -x /usr/sbin/install-info-altdir; then + echo remove/${PACKAGE}: removing Info links for ${FLAVOR} + install-info-altdir --quiet --remove --dirname=${FLAVOR} /usr/share/info/generic-dh-make-2008.info.gz + fi + + echo remove/${PACKAGE}: purging byte-compiled files for ${FLAVOR} + rm -rf /usr/share/${FLAVOR}/site-lisp/${PACKAGE} +fi diff --git a/t/recipes/checks/debian/watch/generic-dh-make-2008/build-spec/debian/emacsen-startup.ex b/t/recipes/checks/debian/watch/generic-dh-make-2008/build-spec/debian/emacsen-startup.ex new file mode 100644 index 0000000..b51657a --- /dev/null +++ b/t/recipes/checks/debian/watch/generic-dh-make-2008/build-spec/debian/emacsen-startup.ex @@ -0,0 +1,25 @@ +;; -*-emacs-lisp-*- +;; +;; Emacs startup file, e.g. /etc/emacs/site-start.d/50generic-dh-make-2008.el +;; for the Debian generic-dh-make-2008 package +;; +;; Originally contributed by Nils Naumann +;; Modified by Dirk Eddelbuettel +;; Adapted for dh-make by Jim Van Zandt + +;; The generic-dh-make-2008 package follows the Debian/GNU Linux 'emacsen' policy and +;; byte-compiles its elisp files for each 'emacs flavor' (emacs19, +;; xemacs19, emacs20, xemacs20...). The compiled code is then +;; installed in a subdirectory of the respective site-lisp directory. +;; We have to add this to the load-path: +(let ((package-dir (concat "/usr/share/" + (symbol-name flavor) + "/site-lisp/generic-dh-make-2008"))) +;; If package-dir does not exist, the generic-dh-make-2008 package must have +;; removed but not purged, and we should skip the setup. + (when (file-directory-p package-dir) + (setq load-path (cons package-dir load-path)) + (autoload 'generic-dh-make-2008-mode "generic-dh-make-2008-mode" + "Major mode for editing generic-dh-make-2008 files." t) + (add-to-list 'auto-mode-alist '("\\.generic-dh-make-2008$" . generic-dh-make-2008-mode)))) + diff --git a/t/recipes/checks/debian/watch/generic-dh-make-2008/build-spec/debian/generic-dh-make-2008.default.ex b/t/recipes/checks/debian/watch/generic-dh-make-2008/build-spec/debian/generic-dh-make-2008.default.ex new file mode 100644 index 0000000..d770c6e --- /dev/null +++ b/t/recipes/checks/debian/watch/generic-dh-make-2008/build-spec/debian/generic-dh-make-2008.default.ex @@ -0,0 +1,10 @@ +# Defaults for generic-dh-make-2008 initscript +# sourced by /etc/init.d/generic-dh-make-2008 +# installed at /etc/default/generic-dh-make-2008 by the maintainer scripts + +# +# This is a POSIX shell fragment +# + +# Additional options that are passed to the Daemon. +DAEMON_OPTS="" diff --git a/t/recipes/checks/debian/watch/generic-dh-make-2008/build-spec/debian/generic-dh-make-2008.doc-base.EX b/t/recipes/checks/debian/watch/generic-dh-make-2008/build-spec/debian/generic-dh-make-2008.doc-base.EX new file mode 100644 index 0000000..3b966d1 --- /dev/null +++ b/t/recipes/checks/debian/watch/generic-dh-make-2008/build-spec/debian/generic-dh-make-2008.doc-base.EX @@ -0,0 +1,22 @@ +Document: generic-dh-make-2008 +Title: Debian generic-dh-make-2008 Manual +Author: +Abstract: This manual describes what generic-dh-make-2008 is + and how it can be used to + manage online manuals on Debian systems. +Section: unknown + +Format: debiandoc-sgml +Files: /usr/share/doc/generic-dh-make-2008/generic-dh-make-2008.sgml.gz + +Format: postscript +Files: /usr/share/doc/generic-dh-make-2008/generic-dh-make-2008.ps.gz + +Format: text +Files: /usr/share/doc/generic-dh-make-2008/generic-dh-make-2008.text.gz + +Format: HTML +Index: /usr/share/doc/generic-dh-make-2008/html/index.html +Files: /usr/share/doc/generic-dh-make-2008/html/*.html + + diff --git a/t/recipes/checks/debian/watch/generic-dh-make-2008/build-spec/debian/init.d.ex b/t/recipes/checks/debian/watch/generic-dh-make-2008/build-spec/debian/init.d.ex new file mode 100644 index 0000000..b464594 --- /dev/null +++ b/t/recipes/checks/debian/watch/generic-dh-make-2008/build-spec/debian/init.d.ex @@ -0,0 +1,157 @@ +#! /bin/sh +# +# skeleton example file to build /etc/init.d/ scripts. +# This file should be used to construct scripts for /etc/init.d. +# +# Written by Miquel van Smoorenburg . +# Modified for Debian +# by Ian Murdock . +# Further changes by Javier Fernandez-Sanguino +# +# Version: @(#)skeleton 1.9 26-Feb-2001 miquels@cistron.nl +# + +PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin +DAEMON=/usr/sbin/generic-dh-make-2008 +NAME=generic-dh-make-2008 +DESC=generic-dh-make-2008 + +test -x $DAEMON || exit 0 + +LOGDIR=/var/log/generic-dh-make-2008 +PIDFILE=/var/run/$NAME.pid +DODTIME=1 # Time to wait for the server to die, in seconds + # If this value is set too low you might not + # let some servers to die gracefully and + # 'restart' will not work + +# Include generic-dh-make-2008 defaults if available +if [ -f /etc/default/generic-dh-make-2008 ] ; then + . /etc/default/generic-dh-make-2008 +fi + +set -e + +running_pid() +{ + # Check if a given process pid's cmdline matches a given name + pid=$1 + name=$2 + [ -z "$pid" ] && return 1 + [ ! -d /proc/$pid ] && return 1 + cmd=`cat /proc/$pid/cmdline | tr "\000" "\n"|head -n 1 |cut -d : -f 1` + # Is this the expected child? + [ "$cmd" != "$name" ] && return 1 + return 0 +} + +running() +{ +# Check if the process is running looking at /proc +# (works for all users) + + # No pidfile, probably no daemon present + [ ! -f "$PIDFILE" ] && return 1 + # Obtain the pid and check it against the binary name + pid=`cat $PIDFILE` + running_pid $pid $DAEMON || return 1 + return 0 +} + +force_stop() { +# Forcefully kill the process + [ ! -f "$PIDFILE" ] && return + if running ; then + kill -15 $pid + # Is it really dead? + [ -n "$DODTIME" ] && sleep "$DODTIME"s + if running ; then + kill -9 $pid + [ -n "$DODTIME" ] && sleep "$DODTIME"s + if running ; then + echo "Cannot kill $LABEL (pid=$pid)!" + exit 1 + fi + fi + fi + rm -f $PIDFILE + return 0 +} + +case "$1" in + start) + echo -n "Starting $DESC: " + start-stop-daemon --start --quiet --pidfile $PIDFILE \ + --exec $DAEMON -- $DAEMON_OPTS + if running ; then + echo "$NAME." + else + echo " ERROR." + fi + ;; + stop) + echo -n "Stopping $DESC: " + start-stop-daemon --stop --quiet --pidfile $PIDFILE \ + --exec $DAEMON + echo "$NAME." + ;; + force-stop) + echo -n "Forcefully stopping $DESC: " + force_stop + if ! running ; then + echo "$NAME." + else + echo " ERROR." + fi + ;; + #reload) + # + # If the daemon can reload its config files on the fly + # for example by sending it SIGHUP, do it here. + # + # If the daemon responds to changes in its config file + # directly anyway, make this a do-nothing entry. + # + # echo "Reloading $DESC configuration files." + # start-stop-daemon --stop --signal 1 --quiet --pidfile \ + # /var/run/$NAME.pid --exec $DAEMON + #;; + force-reload) + # + # If the "reload" option is implemented, move the "force-reload" + # option to the "reload" entry above. If not, "force-reload" is + # just the same as "restart" except that it does nothing if the + # daemon isn't already running. + # check wether $DAEMON is running. If so, restart + start-stop-daemon --stop --test --quiet --pidfile \ + /var/run/$NAME.pid --exec $DAEMON \ + && $0 restart \ + || exit 0 + ;; + restart) + echo -n "Restarting $DESC: " + start-stop-daemon --stop --quiet --pidfile \ + /var/run/$NAME.pid --exec $DAEMON + [ -n "$DODTIME" ] && sleep $DODTIME + start-stop-daemon --start --quiet --pidfile \ + /var/run/$NAME.pid --exec $DAEMON -- $DAEMON_OPTS + echo "$NAME." + ;; + status) + echo -n "$LABEL is " + if running ; then + echo "running" + else + echo " not running." + exit 1 + fi + ;; + *) + N=/etc/init.d/$NAME + # echo "Usage: $N {start|stop|restart|reload|force-reload}" >&2 + echo "Usage: $N {start|stop|restart|force-reload|status|force-stop}" >&2 + exit 1 + ;; +esac + +exit 0 diff --git a/t/recipes/checks/debian/watch/generic-dh-make-2008/build-spec/debian/init.d.lsb.ex b/t/recipes/checks/debian/watch/generic-dh-make-2008/build-spec/debian/init.d.lsb.ex new file mode 100644 index 0000000..b3559de --- /dev/null +++ b/t/recipes/checks/debian/watch/generic-dh-make-2008/build-spec/debian/init.d.lsb.ex @@ -0,0 +1,296 @@ +#!/bin/sh +# +# Example init.d script with LSB support. +# +# Please read this init.d carefully and modify the sections to +# adjust it to the program you want to run. +# +# Copyright (c) 2007 Javier Fernandez-Sanguino +# +# This is free software; you may redistribute it and/or modify +# it under the terms of the GNU General Public License as +# published by the Free Software Foundation; either version 2, +# or (at your option) any later version. +# +# This is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License with +# the Debian operating system, in /usr/share/common-licenses/GPL; if +# not, write to the Free Software Foundation, Inc., 59 Temple Place, +# Suite 330, Boston, MA 02111-1307 USA +# +### BEGIN INIT INFO +# Provides: generic-dh-make-2008 +# Required-Start: $network $local_fs +# Required-Stop: +# Should-Start: $named +# Should-Stop: +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +# Short-Description: +# Description: +# <...> +# <...> +### END INIT INFO + +PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin + +DAEMON=/usr/sbin/generic-dh-make-2008 # Introduce the server's location here +NAME=#PACKAGE # Introduce the short server's name here +DESC=#PACKAGE # Introduce a short description here +LOGDIR=/var/log/generic-dh-make-2008 # Log directory to use + +PIDFILE=/var/run/$NAME.pid + +test -x $DAEMON || exit 0 + +. /lib/lsb/init-functions + +# Default options, these can be overriden by the information +# at /etc/default/$NAME +DAEMON_OPTS="" # Additional options given to the server + +DIETIME=10 # Time to wait for the server to die, in seconds + # If this value is set too low you might not + # let some servers to die gracefully and + # 'restart' will not work + +#STARTTIME=2 # Time to wait for the server to start, in seconds + # If this value is set each time the server is + # started (on start or restart) the script will + # stall to try to determine if it is running + # If it is not set and the server takes time + # to setup a pid file the log message might + # be a false positive (says it did not start + # when it actually did) + +LOGFILE=$LOGDIR/$NAME.log # Server logfile +#DAEMONUSER=generic-dh-make-2008 # Users to run the daemons as. If this value + # is set start-stop-daemon will chuid the server + +# Include defaults if available +if [ -f /etc/default/$NAME ] ; then + . /etc/default/$NAME +fi + +# Use this if you want the user to explicitly set 'RUN' in +# /etc/default/ +#if [ "x$RUN" != "xyes" ] ; then +# log_failure_msg "$NAME disabled, please adjust the configuration to your needs " +# log_failure_msg "and then set RUN to 'yes' in /etc/default/$NAME to enable it." +# exit 1 +#fi + +# Check that the user exists (if we set a user) +# Does the user exist? +if [ -n "$DAEMONUSER" ] ; then + if getent passwd | grep -q "^$DAEMONUSER:"; then + # Obtain the uid and gid + DAEMONUID=`getent passwd |grep "^$DAEMONUSER:" | awk -F : '{print $3}'` + DAEMONGID=`getent passwd |grep "^$DAEMONUSER:" | awk -F : '{print $4}'` + else + log_failure_msg "The user $DAEMONUSER, required to run $NAME does not exist." + exit 1 + fi +fi + + +set -e + +running_pid() { +# Check if a given process pid's cmdline matches a given name + pid=$1 + name=$2 + [ -z "$pid" ] && return 1 + [ ! -d /proc/$pid ] && return 1 + cmd=`cat /proc/$pid/cmdline | tr "\000" "\n"|head -n 1 |cut -d : -f 1` + # Is this the expected server + [ "$cmd" != "$name" ] && return 1 + return 0 +} + +running() { +# Check if the process is running looking at /proc +# (works for all users) + + # No pidfile, probably no daemon present + [ ! -f "$PIDFILE" ] && return 1 + pid=`cat $PIDFILE` + running_pid $pid $DAEMON || return 1 + return 0 +} + +start_server() { +# Start the process using the wrapper + if [ -z "$DAEMONUSER" ] ; then + start_daemon -p $PIDFILE $DAEMON -- $DAEMON_OPTS + errcode=$? + else +# if we are using a daemonuser then change the user id + start-stop-daemon --start --quiet --pidfile $PIDFILE \ + --chuid $DAEMONUSER \ + --exec $DAEMON -- $DAEMON_OPTS + errcode=$? + fi + return $errcode +} + +stop_server() { +# Stop the process using the wrapper + if [ -z "$DAEMONUSER" ] ; then + killproc -p $PIDFILE $DAEMON + errcode=$? + else +# if we are using a daemonuser then look for process that match + start-stop-daemon --stop --quiet --pidfile $PIDFILE \ + --user $DAEMONUSER \ + --exec $DAEMON + errcode=$? + fi + + return $errcode +} + +reload_server() { + [ ! -f "$PIDFILE" ] && return 1 + pid=pidofproc $PIDFILE # This is the daemon's pid + # Send a SIGHUP + kill -1 $pid + return $? +} + +force_stop() { +# Force the process to die killing it manually + [ ! -e "$PIDFILE" ] && return + if running ; then + kill -15 $pid + # Is it really dead? + sleep "$DIETIME"s + if running ; then + kill -9 $pid + sleep "$DIETIME"s + if running ; then + echo "Cannot kill $NAME (pid=$pid)!" + exit 1 + fi + fi + fi + rm -f $PIDFILE +} + + +case "$1" in + start) + log_daemon_msg "Starting $DESC " "$NAME" + # Check if it's running first + if running ; then + log_progress_msg "apparently already running" + log_end_msg 0 + exit 0 + fi + if start_server ; then + # NOTE: Some servers might die some time after they start, + # this code will detect this issue if STARTTIME is set + # to a reasonable value + [ -n "$STARTTIME" ] && sleep $STARTTIME # Wait some time + if running ; then + # It's ok, the server started and is running + log_end_msg 0 + else + # It is not running after we did start + log_end_msg 1 + fi + else + # Either we could not start it + log_end_msg 1 + fi + ;; + stop) + log_daemon_msg "Stopping $DESC" "$NAME" + if running ; then + # Only stop the server if we see it running + errcode=0 + stop_server || errcode=$? + log_end_msg $errcode + else + # If it's not running don't do anything + log_progress_msg "apparently not running" + log_end_msg 0 + exit 0 + fi + ;; + force-stop) + # First try to stop gracefully the program + $0 stop + if running; then + # If it's still running try to kill it more forcefully + log_daemon_msg "Stopping (force) $DESC" "$NAME" + errcode=0 + force_stop || errcode=$? + log_end_msg $errcode + fi + ;; + restart|force-reload) + log_daemon_msg "Restarting $DESC" "$NAME" + errcode=0 + stop_server || errcode=$? + # Wait some sensible amount, some server need this + [ -n "$DIETIME" ] && sleep $DIETIME + start_server || errcode=$? + [ -n "$STARTTIME" ] && sleep $STARTTIME + running || errcode=$? + log_end_msg $errcode + ;; + status) + + log_daemon_msg "Checking status of $DESC" "$NAME" + if running ; then + log_progress_msg "running" + log_end_msg 0 + else + log_progress_msg "apparently not running" + log_end_msg 1 + exit 1 + fi + ;; + # Use this if the daemon cannot reload + reload) + log_warning_msg "Reloading $NAME daemon: not implemented, as the daemon" + log_warning_msg "cannot re-read the config file (use restart)." + ;; + # And this if it cann + #reload) + # + # If the daemon can reload its config files on the fly + # for example by sending it SIGHUP, do it here. + # + # If the daemon responds to changes in its config file + # directly anyway, make this a do-nothing entry. + # + # log_daemon_msg "Reloading $DESC configuration files" "$NAME" + # if running ; then + # reload_server + # if ! running ; then + # Process died after we tried to reload + # log_progress_msg "died on reload" + # log_end_msg 1 + # exit 1 + # fi + # else + # log_progress_msg "server is not running" + # log_end_msg 1 + # exit 1 + # fi + #;; + + *) + N=/etc/init.d/$NAME + echo "Usage: $N {start|stop|force-stop|restart|force-reload|status}" >&2 + exit 1 + ;; +esac + +exit 0 diff --git a/t/recipes/checks/debian/watch/generic-dh-make-2008/build-spec/debian/manpage.1.ex b/t/recipes/checks/debian/watch/generic-dh-make-2008/build-spec/debian/manpage.1.ex new file mode 100644 index 0000000..d67baa2 --- /dev/null +++ b/t/recipes/checks/debian/watch/generic-dh-make-2008/build-spec/debian/manpage.1.ex @@ -0,0 +1,59 @@ +.\" Hey, EMACS: -*- nroff -*- +.\" First parameter, NAME, should be all caps +.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection +.\" other parameters are allowed: see man(7), man(1) +.TH GENERIC-DH-MAKE-2008 SECTION "December 29, 2008" +.\" Please adjust this date whenever revising the manpage. +.\" +.\" Some roff macros, for reference: +.\" .nh disable hyphenation +.\" .hy enable hyphenation +.\" .ad l left justify +.\" .ad b justify to both left and right margins +.\" .nf disable filling +.\" .fi enable filling +.\" .br insert line break +.\" .sp insert n+1 empty lines +.\" for manpage-specific macros, see man(7) +.SH NAME +generic-dh-make-2008 \- program to do something +.SH SYNOPSIS +.B generic-dh-make-2008 +.RI [ options ] " files" ... +.br +.B bar +.RI [ options ] " files" ... +.SH DESCRIPTION +This manual page documents briefly the +.B generic-dh-make-2008 +and +.B bar +commands. +.PP +.\" TeX users may be more comfortable with the \fB\fP and +.\" \fI\fP escape sequences to invode bold face and italics, +.\" respectively. +\fBgeneric-dh-make-2008\fP is a program that... +.SH OPTIONS +These programs follow the usual GNU command line syntax, with long +options starting with two dashes (`-'). +A summary of options is included below. +For a complete description, see the Info files. +.TP +.B \-h, \-\-help +Show summary of options. +.TP +.B \-v, \-\-version +Show version of program. +.SH SEE ALSO +.BR bar (1), +.BR baz (1). +.br +The programs are documented fully by +.IR "The Rise and Fall of a Fooish Bar" , +available via the Info system. +.SH AUTHOR +generic-dh-make-2008 was written by . +.PP +This manual page was written by Russ Allbery , +for the Debian project (but may be used by others). diff --git a/t/recipes/checks/debian/watch/generic-dh-make-2008/build-spec/debian/manpage.sgml.ex b/t/recipes/checks/debian/watch/generic-dh-make-2008/build-spec/debian/manpage.sgml.ex new file mode 100644 index 0000000..26b3e0c --- /dev/null +++ b/t/recipes/checks/debian/watch/generic-dh-make-2008/build-spec/debian/manpage.sgml.ex @@ -0,0 +1,156 @@ + manpage.1'. You may view + the manual page with: `docbook-to-man manpage.sgml | nroff -man | + less'. A typical entry in a Makefile or Makefile.am is: + +manpage.1: manpage.sgml + docbook-to-man $< > $@ + + + The docbook-to-man binary is found in the docbook-to-man package. + Please remember that if you create the nroff version in one of the + debian/rules file targets (such as build), you will need to include + docbook-to-man in your Build-Depends control field. + + --> + + + FIRSTNAME"> + SURNAME"> + + December 29, 2008"> + + SECTION"> + rra@debian.org"> + + GENERIC-DH-MAKE-2008"> + + + Debian"> + GNU"> + GPL"> +]> + + + +
      + &dhemail; +
      + + &dhfirstname; + &dhsurname; + + + 2003 + &dhusername; + + &dhdate; +
      + + &dhucpackage; + + &dhsection; + + + &dhpackage; + + program to do something + + + + &dhpackage; + + + + + + + + DESCRIPTION + + This manual page documents briefly the + &dhpackage; and bar + commands. + + This manual page was written for the &debian; distribution + because the original program does not have a manual page. + Instead, it has documentation in the &gnu; + Info format; see below. + + &dhpackage; is a program that... + + + + OPTIONS + + These programs follow the usual &gnu; command line syntax, + with long options starting with two dashes (`-'). A summary of + options is included below. For a complete description, see the + Info files. + + + + + + + + Show summary of options. + + + + + + + + Show version of program. + + + + + + SEE ALSO + + bar (1), baz (1). + + The programs are documented fully by The Rise and + Fall of a Fooish Bar available via the + Info system. + + + AUTHOR + + This manual page was written by &dhusername; &dhemail; for + the &debian; system (but may be used by others). Permission is + granted to copy, distribute and/or modify this document under + the terms of the &gnu; General Public License, Version 2 any + later version published by the Free Software Foundation. + + + On Debian systems, the complete text of the GNU General Public + License can be found in /usr/share/common-licenses/GPL. + + + +
      + + + + diff --git a/t/recipes/checks/debian/watch/generic-dh-make-2008/build-spec/debian/manpage.xml.ex b/t/recipes/checks/debian/watch/generic-dh-make-2008/build-spec/debian/manpage.xml.ex new file mode 100644 index 0000000..2d01c6f --- /dev/null +++ b/t/recipes/checks/debian/watch/generic-dh-make-2008/build-spec/debian/manpage.xml.ex @@ -0,0 +1,291 @@ + +.
      will be generated. You may view the +manual page with: nroff -man .
      | less'. A typical entry +in a Makefile or Makefile.am is: + +DB2MAN = /usr/share/sgml/docbook/stylesheet/xsl/nwalsh/manpages/docbook.xsl +XP = xsltproc -''-nonet -''-param man.charmap.use.subset "0" + +manpage.1: manpage.xml + $(XP) $(DB2MAN) $< + +The xsltproc binary is found in the xsltproc package. The XSL files are in +docbook-xsl. A description of the parameters you can use can be found in the +docbook-xsl-doc-* packages. Please remember that if you create the nroff +version in one of the debian/rules file targets (such as build), you will need +to include xsltproc and docbook-xsl in your Build-Depends control field. +Alternatively use the xmlto command/package. That will also automatically +pull in xsltproc and docbook-xsl. + +Notes for using docbook2x: docbook2x-man does not automatically create the +AUTHOR(S) and COPYRIGHT sections. In this case, please add them manually as + ... . + +To disable the automatic creation of the AUTHOR(S) and COPYRIGHT sections +read /usr/share/doc/docbook-xsl/doc/manpages/authors.html. This file can be +found in the docbook-xsl-doc-html package. + +Validation can be done using: `xmllint -''-noout -''-valid manpage.xml` + +General documentation about man-pages and man-page-formatting: +man(1), man(7), http://www.tldp.org/HOWTO/Man-Page/ + +--> + + + + + + + + + + + + + +]> + + + + &dhtitle; + &dhpackage; + + + &dhfirstname; + &dhsurname; + Wrote this manpage for the Debian system. +
      + &dhemail; +
      +
      +
      + + 2007 + &dhusername; + + + This manual page was written for the Debian system + (but may be used by others). + Permission is granted to copy, distribute and/or modify this + document under the terms of the GNU General Public License, + Version 2 or (at your option) any later version published by + the Free Software Foundation. + On Debian systems, the complete text of the GNU General Public + License can be found in + /usr/share/common-licenses/GPL. + +
      + + &dhucpackage; + &dhsection; + + + &dhpackage; + program to do something + + + + &dhpackage; + + + + + + + + + this + + + + + + + + this + that + + + + + &dhpackage; + + + + + + + + + + + + + + + + + + + DESCRIPTION + This manual page documents briefly the + &dhpackage; and bar + commands. + This manual page was written for the Debian distribution + because the original program does not have a manual page. + Instead, it has documentation in the GNU + info + 1 + format; see below. + &dhpackage; is a program that... + + + OPTIONS + The program follows the usual GNU command line syntax, + with long options starting with two dashes (`-'). A summary of + options is included below. For a complete description, see the + + info + 1 + files. + + + + + + + Does this and that. + + + + + + + Show summary of options. + + + + + + + Show version of program. + + + + + + FILES + + + /etc/foo.conf + + The system-wide configuration file to control the + behaviour of &dhpackage;. See + + foo.conf + 5 + for further details. + + + + ${HOME}/.foo.conf + + The per-user configuration file to control the + behaviour of &dhpackage;. See + + foo.conf + 5 + for further details. + + + + + + ENVIONMENT + + + FOO_CONF + + If used, the defined file is used as configuration + file (see also ). + + + + + + DIAGNOSTICS + The following diagnostics may be issued + on stderr: + + + Bad configuration file. Exiting. + + The configuration file seems to contain a broken configuration + line. Use the option, to get more info. + + + + + &dhpackage; provides some return codes, that can + be used in scripts: + + Code + Diagnostic + + 0 + Program exited successfully. + + + 1 + The configuration file seems to be broken. + + + + + + BUGS + The program is currently limited to only work + with the foobar library. + The upstreams BTS can be found + at . + + + SEE ALSO + + + bar + 1 + , + baz + 1 + , + foo.conf + 5 + + The programs are documented fully by The Rise and + Fall of a Fooish Bar available via the + info + 1 + system. + +
      + diff --git a/t/recipes/checks/debian/watch/generic-dh-make-2008/build-spec/debian/menu.ex b/t/recipes/checks/debian/watch/generic-dh-make-2008/build-spec/debian/menu.ex new file mode 100644 index 0000000..8a67e62 --- /dev/null +++ b/t/recipes/checks/debian/watch/generic-dh-make-2008/build-spec/debian/menu.ex @@ -0,0 +1,2 @@ +?package(generic-dh-make-2008):needs="X11|text|vc|wm" section="Applications/see-menu-manual"\ + title="generic-dh-make-2008" command="/usr/bin/generic-dh-make-2008" diff --git a/t/recipes/checks/debian/watch/generic-dh-make-2008/build-spec/debian/postinst.ex b/t/recipes/checks/debian/watch/generic-dh-make-2008/build-spec/debian/postinst.ex new file mode 100644 index 0000000..b5f5ca7 --- /dev/null +++ b/t/recipes/checks/debian/watch/generic-dh-make-2008/build-spec/debian/postinst.ex @@ -0,0 +1,41 @@ +#!/bin/sh +# postinst script for generic-dh-make-2008 +# +# see: dh_installdeb(1) + +set -e + +# summary of how this script can be called: +# * `configure' +# * `abort-upgrade' +# * `abort-remove' `in-favour' +# +# * `abort-remove' +# * `abort-deconfigure' `in-favour' +# `removing' +# +# for details, see http://www.debian.org/doc/debian-policy/ or +# the debian-policy package + + +case "$1" in + configure) + ;; + + abort-upgrade|abort-remove|abort-deconfigure) + ;; + + *) + echo "postinst called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# + +exit 0 + + diff --git a/t/recipes/checks/debian/watch/generic-dh-make-2008/build-spec/debian/postrm.ex b/t/recipes/checks/debian/watch/generic-dh-make-2008/build-spec/debian/postrm.ex new file mode 100644 index 0000000..1d8a18a --- /dev/null +++ b/t/recipes/checks/debian/watch/generic-dh-make-2008/build-spec/debian/postrm.ex @@ -0,0 +1,39 @@ +#!/bin/sh +# postrm script for generic-dh-make-2008 +# +# see: dh_installdeb(1) + +set -e + +# summary of how this script can be called: +# * `remove' +# * `purge' +# * `upgrade' +# * `failed-upgrade' +# * `abort-install' +# * `abort-install' +# * `abort-upgrade' +# * `disappear' +# +# for details, see http://www.debian.org/doc/debian-policy/ or +# the debian-policy package + + +case "$1" in + purge|remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear) + ;; + + *) + echo "postrm called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# + +exit 0 + + diff --git a/t/recipes/checks/debian/watch/generic-dh-make-2008/build-spec/debian/preinst.ex b/t/recipes/checks/debian/watch/generic-dh-make-2008/build-spec/debian/preinst.ex new file mode 100644 index 0000000..3134ccf --- /dev/null +++ b/t/recipes/checks/debian/watch/generic-dh-make-2008/build-spec/debian/preinst.ex @@ -0,0 +1,37 @@ +#!/bin/sh +# preinst script for generic-dh-make-2008 +# +# see: dh_installdeb(1) + +set -e + +# summary of how this script can be called: +# * `install' +# * `install' +# * `upgrade' +# * `abort-upgrade' +# for details, see http://www.debian.org/doc/debian-policy/ or +# the debian-policy package + + +case "$1" in + install|upgrade) + ;; + + abort-upgrade) + ;; + + *) + echo "preinst called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# + +exit 0 + + diff --git a/t/recipes/checks/debian/watch/generic-dh-make-2008/build-spec/debian/prerm.ex b/t/recipes/checks/debian/watch/generic-dh-make-2008/build-spec/debian/prerm.ex new file mode 100644 index 0000000..4e5dd3f --- /dev/null +++ b/t/recipes/checks/debian/watch/generic-dh-make-2008/build-spec/debian/prerm.ex @@ -0,0 +1,40 @@ +#!/bin/sh +# prerm script for generic-dh-make-2008 +# +# see: dh_installdeb(1) + +set -e + +# summary of how this script can be called: +# * `remove' +# * `upgrade' +# * `failed-upgrade' +# * `remove' `in-favour' +# * `deconfigure' `in-favour' +# `removing' +# +# for details, see http://www.debian.org/doc/debian-policy/ or +# the debian-policy package + + +case "$1" in + remove|upgrade|deconfigure) + ;; + + failed-upgrade) + ;; + + *) + echo "prerm called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# + +exit 0 + + diff --git a/t/recipes/checks/debian/watch/generic-dh-make-2008/build-spec/debian/rules b/t/recipes/checks/debian/watch/generic-dh-make-2008/build-spec/debian/rules new file mode 100755 index 0000000..92aa2b1 --- /dev/null +++ b/t/recipes/checks/debian/watch/generic-dh-make-2008/build-spec/debian/rules @@ -0,0 +1,91 @@ +#!/usr/bin/make -f +# -*- makefile -*- +# Sample debian/rules that uses debhelper. +# This file was originally written by Joey Hess and Craig Small. +# As a special exception, when this file is copied by dh-make into a +# dh-make output file, you may use that output file without restriction. +# This special exception was added by Craig Small in version 0.37 of dh-make. + +# Uncomment this to turn on verbose mode. +#export DH_VERBOSE=1 + + + + + +configure: configure-stamp +configure-stamp: + dh_testdir + # Add here commands to configure the package. + + touch configure-stamp + + +build: build-stamp + +build-stamp: configure-stamp + dh_testdir + + # Add here commands to compile the package. + $(MAKE) + #docbook-to-man debian/generic-dh-make-2008.sgml > generic-dh-make-2008.1 + + touch $@ + +clean: + dh_testdir + dh_testroot + rm -f build-stamp configure-stamp + + # Add here commands to clean up after the build process. + $(MAKE) clean + + dh_clean + +install: build + dh_testdir + dh_testroot + dh_clean -k + dh_installdirs + + # Add here commands to install the package into debian/generic-dh-make-2008. + $(MAKE) DESTDIR=$(CURDIR)/debian/generic-dh-make-2008 install + + +# Build architecture-independent files here. +binary-indep: build install +# We have nothing to do by default. + +# Build architecture-dependent files here. +binary-arch: build install + dh_testdir + dh_testroot + dh_installchangelogs + dh_installdocs + dh_installexamples +# dh_install +# dh_installmenu +# dh_installdebconf +# dh_installlogrotate +# dh_installemacsen +# dh_installpam +# dh_installmime +# dh_python +# dh_installinit +# dh_installcron +# dh_installinfo + dh_installman + dh_link + dh_strip + dh_compress + dh_fixperms +# dh_perl +# dh_makeshlibs + dh_installdeb + dh_shlibdeps + dh_gencontrol + dh_md5sums + dh_builddeb + +binary: binary-indep binary-arch +.PHONY: build clean binary-indep binary-arch binary install configure diff --git a/t/recipes/checks/debian/watch/generic-dh-make-2008/build-spec/debian/watch.ex b/t/recipes/checks/debian/watch/generic-dh-make-2008/build-spec/debian/watch.ex new file mode 100644 index 0000000..e62d18f --- /dev/null +++ b/t/recipes/checks/debian/watch/generic-dh-make-2008/build-spec/debian/watch.ex @@ -0,0 +1,23 @@ +# Example watch control file for uscan +# Rename this file to "watch" and then you can run the "uscan" command +# to check for upstream updates and more. +# See uscan(1) for format + +# Compulsory line, this is a version 3 file +version=3 + +# Uncomment to examine a Webpage +# +#http://www.example.com/downloads.php generic-dh-make-2008-(.*)\.tar\.gz + +# Uncomment to examine a Webserver directory +#http://www.example.com/pub/generic-dh-make-2008-(.*)\.tar\.gz + +# Uncommment to examine a FTP server +#ftp://ftp.example.com/pub/generic-dh-make-2008-(.*)\.tar\.gz debian uupdate + +# Uncomment to find new files on sourceforge, for devscripts >= 2.9 +# http://sf.net/generic-dh-make-2008/generic-dh-make-2008-(.*)\.tar\.gz + +# Uncomment to find new files on GooglePages +# http://example.googlepages.com/foo.html generic-dh-make-2008-(.*)\.tar\.gz diff --git a/t/recipes/checks/debian/watch/generic-dh-make-2008/build-spec/fill-values b/t/recipes/checks/debian/watch/generic-dh-make-2008/build-spec/fill-values new file mode 100644 index 0000000..ef7a896 --- /dev/null +++ b/t/recipes/checks/debian/watch/generic-dh-make-2008/build-spec/fill-values @@ -0,0 +1,7 @@ +Testname: generic-dh-make-2008 +Skeleton: upload-builder-only +Author: Russ Allbery +Package-Architecture: any +Dh-Compat-Level: 7 +Description: Generic dh_make template generated in 2008 +Default-Build-Depends: debhelper (>= [% $dh_compat_level %]~) diff --git a/t/recipes/checks/debian/watch/generic-dh-make-2008/build-spec/orig/Makefile b/t/recipes/checks/debian/watch/generic-dh-make-2008/build-spec/orig/Makefile new file mode 100644 index 0000000..4f762d8 --- /dev/null +++ b/t/recipes/checks/debian/watch/generic-dh-make-2008/build-spec/orig/Makefile @@ -0,0 +1,4 @@ +# Stub Makefile that's just enough so that the default rules file doesn't +# error out. + +clean install: diff --git a/t/recipes/checks/debian/watch/generic-dh-make-2008/build-spec/orig/README b/t/recipes/checks/debian/watch/generic-dh-make-2008/build-spec/orig/README new file mode 100644 index 0000000..6a3c009 --- /dev/null +++ b/t/recipes/checks/debian/watch/generic-dh-make-2008/build-spec/orig/README @@ -0,0 +1,13 @@ +dh_make 0.46 test +================= + +This is the results of running dh_make 0.46 on an upstream tarball +containing only this file. It's a useful test for the various dh_make +template and boilerplate tags, as well as many tags for ways of doing +things dh_make used to promote but are now deprecated or old debhelper +commands that are now deprecated. + +Please don't modify anything about the files in this package; instead, add +new tags as needed when Lintian adds new checks. This test case is +intended to continue to be a test of Lintian's handling of old and +template packages. diff --git a/t/recipes/checks/debian/watch/generic-dh-make-2008/build-spec/pre-build.in b/t/recipes/checks/debian/watch/generic-dh-make-2008/build-spec/pre-build.in new file mode 100755 index 0000000..bbdb5cb --- /dev/null +++ b/t/recipes/checks/debian/watch/generic-dh-make-2008/build-spec/pre-build.in @@ -0,0 +1,5 @@ +#!/bin/sh + +# not using any templates, but dh_clean requires compat + +echo "[% $dh_compat_level %]" > "$1/debian/compat" diff --git a/t/recipes/checks/debian/watch/generic-dh-make-2008/eval/desc b/t/recipes/checks/debian/watch/generic-dh-make-2008/eval/desc new file mode 100644 index 0000000..8b1333e --- /dev/null +++ b/t/recipes/checks/debian/watch/generic-dh-make-2008/eval/desc @@ -0,0 +1,4 @@ +Testname: generic-dh-make-2008 +Check: debian/watch +See-Also: + Bug#497347 diff --git a/t/recipes/checks/debian/watch/generic-dh-make-2008/eval/hints b/t/recipes/checks/debian/watch/generic-dh-make-2008/eval/hints new file mode 100644 index 0000000..3e324c4 --- /dev/null +++ b/t/recipes/checks/debian/watch/generic-dh-make-2008/eval/hints @@ -0,0 +1 @@ +generic-dh-make-2008 (source): debian-watch-file-is-missing diff --git a/t/recipes/checks/debian/watch/generic-dh-make-2008/eval/post-test b/t/recipes/checks/debian/watch/generic-dh-make-2008/eval/post-test new file mode 100644 index 0000000..faeef0b --- /dev/null +++ b/t/recipes/checks/debian/watch/generic-dh-make-2008/eval/post-test @@ -0,0 +1 @@ +s/\(current is ([0-9]+\.)+[0-9]\)/(current is CURRENT)/ diff --git a/t/recipes/checks/debian/watch/legacy-foo++/build-spec/debian/README.Debian b/t/recipes/checks/debian/watch/legacy-foo++/build-spec/debian/README.Debian new file mode 100644 index 0000000..87bfcdf --- /dev/null +++ b/t/recipes/checks/debian/watch/legacy-foo++/build-spec/debian/README.Debian @@ -0,0 +1,7 @@ +foo++ for Debian +---------------- + +This should trigger a warning, as i use a fake mail address. + + -- Marc 'HE' Brockschmidt , Wed, 14 Apr 2004 01:44:18 +0200 + diff --git a/t/recipes/checks/debian/watch/legacy-foo++/build-spec/debian/changelog.in b/t/recipes/checks/debian/watch/legacy-foo++/build-spec/debian/changelog.in new file mode 100644 index 0000000..f838939 --- /dev/null +++ b/t/recipes/checks/debian/watch/legacy-foo++/build-spec/debian/changelog.in @@ -0,0 +1,31 @@ +foo++ ([% $version %]) [% $distribution %]; urgency=low + + * Add a fake README.Debian to trigger a warning. + * This should trigger + debian-changelog-file-contains-debmake-default-email-address. + + -- Marc 'HE' Brockschmidt Wed, 14 Apr 2003 01:35:47 +0200 + +foo++ (4) unstable; urgency=low + + * This changelog now includes a ISO-8859-1 character: '' + + -- Frank Lichtenheld Fri, 5 Mar 2004 13:41:39 +0100 + +foo++ (3) unstable; urgency=low + + * Set maintainers + uploaders incorrectly + + -- Jeroen van Wolffelaar Fri, 5 Mar 2004 04:20:24 +0100 + +foo++ (2) unstable; urgency=low + + * Added a foo++-helper package to try and catch even more ++ bugs. + + -- Sean 'Shaleh' Perry Sat, 10 Feb 2001 23:16:17 -0800 + +foo++ (1) unstable; urgency=low + + * Initial version + + -- Sean 'Shaleh' Perry Thu, 16 Nov 2000 09:11:40 -0800 diff --git a/t/recipes/checks/debian/watch/legacy-foo++/build-spec/debian/control b/t/recipes/checks/debian/watch/legacy-foo++/build-spec/debian/control new file mode 100644 index 0000000..57a489c --- /dev/null +++ b/t/recipes/checks/debian/watch/legacy-foo++/build-spec/debian/control @@ -0,0 +1,30 @@ +Source: foo++ +Section: misc +Priority: optional +Maintainer: Lintian Maintainer +Uploaders: Marc 'HE' Brockschmidt , Jeroen van Wolffelaar, + Frank , Yama@gotchi, Josip, + I am afraid of spam and think this helps +Standards-Version: 3.1.1 +XS-Dm-Upload-Allowed: no + +Package: foo++ +Architecture: all +Build-Depends: test +Depends: test, libssl0.9.7 +Description: see how lintian reacts to plus signs in the package name + Regression test to see if lintian tests work on a package with plus signs in + its name. + . + This description uses only UTF-8 high bytes chars. + +Package: foo++-helper +Architecture: all +Depends: test, foo++ +Description: see how lintian reacts to plus signs in the package name + Regression test to see if lintian tests work on a package with plus signs in + its name. This has /usr/share/doc links to foo++ to trigger even more checks. + . + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. diff --git a/t/recipes/checks/debian/watch/legacy-foo++/build-spec/debian/copyright b/t/recipes/checks/debian/watch/legacy-foo++/build-spec/debian/copyright new file mode 100644 index 0000000..e2d6d93 --- /dev/null +++ b/t/recipes/checks/debian/watch/legacy-foo++/build-spec/debian/copyright @@ -0,0 +1,7 @@ +A reference to /usr/share/common-licenses/GPL to make it look like this +package is under the GPL and trigger the OpenSSL warning. + +However, there is also a reference to /usr/share/common-licenses/LGPL, so +who knows what bits actually depend on libssl. + +Copr. 2007 Somebody. diff --git a/t/recipes/checks/debian/watch/legacy-foo++/build-spec/debian/rules b/t/recipes/checks/debian/watch/legacy-foo++/build-spec/debian/rules new file mode 100755 index 0000000..63bb4db --- /dev/null +++ b/t/recipes/checks/debian/watch/legacy-foo++/build-spec/debian/rules @@ -0,0 +1,36 @@ +#!/usr/bin/make -f + +foo=foo++ +helper=foo++-helper + +build-arch: + +build-indep: + +build: build-arch build-indep + +binary-arch: + +binary-indep: + install -d debian/$(foo)/DEBIAN + install -d debian/$(foo)/usr/share/doc/$(foo) + install -m 644 debian/changelog \ + debian/$(foo)/usr/share/doc/$(foo)/changelog + gzip -n -9 debian/$(foo)/usr/share/doc/$(foo)/changelog + install -m 644 debian/README.Debian \ + debian/$(foo)/usr/share/doc/$(foo)/README.Debian + gzip -n -9 debian/$(foo)/usr/share/doc/$(foo)/README.Debian + dpkg-gencontrol -isp -p$(foo) -Pdebian/$(foo) + dpkg --build debian/$(foo) .. + + install -d debian/$(helper)/DEBIAN + install -d debian/$(helper)/usr/share/doc/ + ln -sf $(foo) debian/$(helper)/usr/share/doc/$(helper) + dpkg-gencontrol -isp -p$(helper) -Pdebian/$(helper) + dpkg --build debian/$(helper) .. + +binary: binary-arch binary-indep + +clean: + +.PHONY: build-arch build-indep build binary-arch binary-indep binary clean diff --git a/t/recipes/checks/debian/watch/legacy-foo++/build-spec/debian/watch b/t/recipes/checks/debian/watch/legacy-foo++/build-spec/debian/watch new file mode 100644 index 0000000..26f9a3c --- /dev/null +++ b/t/recipes/checks/debian/watch/legacy-foo++/build-spec/debian/watch @@ -0,0 +1,6 @@ +# A comment \ +version=0 + +# uscan does not interpret the backslash above, it is just part of the comment + +http://domain.tld/file-(.*)\.tar\.gz diff --git a/t/recipes/checks/debian/watch/legacy-foo++/build-spec/fill-values b/t/recipes/checks/debian/watch/legacy-foo++/build-spec/fill-values new file mode 100644 index 0000000..86d43bc --- /dev/null +++ b/t/recipes/checks/debian/watch/legacy-foo++/build-spec/fill-values @@ -0,0 +1,5 @@ +Skeleton: upload-native +Testname: legacy-foo++ +Source: foo++ +Version: 5 +Description: Legacy test "foo++" diff --git a/t/recipes/checks/debian/watch/legacy-foo++/eval/desc b/t/recipes/checks/debian/watch/legacy-foo++/eval/desc new file mode 100644 index 0000000..b8bd838 --- /dev/null +++ b/t/recipes/checks/debian/watch/legacy-foo++/eval/desc @@ -0,0 +1,2 @@ +Testname: legacy-foo++ +Check: debian/watch diff --git a/t/recipes/checks/debian/watch/legacy-foo++/eval/hints b/t/recipes/checks/debian/watch/legacy-foo++/eval/hints new file mode 100644 index 0000000..5607bd3 --- /dev/null +++ b/t/recipes/checks/debian/watch/legacy-foo++/eval/hints @@ -0,0 +1 @@ +foo++ (source): debian-watch-file-in-native-package [debian/watch] diff --git a/t/recipes/checks/debian/watch/legacy-foo++/eval/post-test b/t/recipes/checks/debian/watch/legacy-foo++/eval/post-test new file mode 100644 index 0000000..faeef0b --- /dev/null +++ b/t/recipes/checks/debian/watch/legacy-foo++/eval/post-test @@ -0,0 +1 @@ +s/\(current is ([0-9]+\.)+[0-9]\)/(current is CURRENT)/ diff --git a/t/recipes/checks/debian/watch/legacy-maintainer-scripts/build-spec/debian/changelog.in b/t/recipes/checks/debian/watch/legacy-maintainer-scripts/build-spec/debian/changelog.in new file mode 100644 index 0000000..a12fc8c --- /dev/null +++ b/t/recipes/checks/debian/watch/legacy-maintainer-scripts/build-spec/debian/changelog.in @@ -0,0 +1,57 @@ +maintainer-scripts ([% $version %]) [% $distribution %]; urgency=low + + * Doing an upload for QA but I fail to give it a correct version number, + have some uploaders, and also fail to mention it... Bad me ;) + + -- Jeroen van Wolffelaar Sun, 18 Apr 2004 02:05:29 +0200 + +maintainer-scripts (6.1) unstable; urgency=low + + * I made this entry on my local PC, oops ;) + + -- Jeroen van Wolffelaar Sat, 21 Feb 2004 18:29:37 +0100 + +maintainer-scripts (6) unstable; urgency=low + + * added ldconfig calls to postrm to check test the postrm tests + from shared-libs + + -- Frank Lichtenheld Sat, 21 Feb 2004 18:29:36 +0100 + +maintainer-scripts (5) unstable; urgency=low + + * added bash style arrays to postinst, this one is for you Torsten (-: + + -- Sean 'Shaleh' Perry Fri, 30 Mar 2001 23:27:06 -0800 + +maintainer-scripts (4) unstable; urgency=low + + * added a here document to the prerm, along with two more bashisms + * made postrm a bash script to check that bash scripts are not searched + + -- Sean 'Shaleh' Perry Mon, 26 Feb 2001 13:02:57 -0800 + +maintainer-scripts (3) unstable; urgency=low + + * Added check for '.' called as '. foo || bar', lintian 1.11.15 failed this + thinking the '||' was a argument. + * also added an invalid call to '. foo bar' + * postinst now has a space between the #! and /bin/sh to test the interpreter + checking code. + + -- Sean 'Shaleh' Perry Tue, 9 Jan 2001 23:06:25 -0800 + +maintainer-scripts (2) unstable; urgency=low + + * Fix location of changelog. + * prerm and postrm do 'update-alternatives --remove'; should only complain + about postrm. + + -- Colin Watson Fri, 29 Dec 2000 06:01:24 +0000 + +maintainer-scripts (1) unstable; urgency=low + + * Initial version + * postinst and prerm set the usr/doc symlink + + -- Sean 'Shaleh' Perry Thu, 16 Nov 2000 09:11:40 -0800 diff --git a/t/recipes/checks/debian/watch/legacy-maintainer-scripts/build-spec/debian/control.in b/t/recipes/checks/debian/watch/legacy-maintainer-scripts/build-spec/debian/control.in new file mode 100644 index 0000000..63dd2db --- /dev/null +++ b/t/recipes/checks/debian/watch/legacy-maintainer-scripts/build-spec/debian/control.in @@ -0,0 +1,18 @@ +Source: maintainer-scripts +Section: misc +Priority: optional +Maintainer: QA group +Uploaders: Anyone but Jeroen +Build-Depends: [% $build_depends %] +Standards-Version: 3.1.1 +Rules-Requires-Root: binary-targets +XS-Dm-Upload-Allowed: Yes + +Package: maintainer-scripts +Architecture: [% $package_architecture %] +Depends: test +Description: test lintian's maintainer script checks + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. diff --git a/t/recipes/checks/debian/watch/legacy-maintainer-scripts/build-spec/debian/postinst b/t/recipes/checks/debian/watch/legacy-maintainer-scripts/build-spec/debian/postinst new file mode 100644 index 0000000..e56ed3b --- /dev/null +++ b/t/recipes/checks/debian/watch/legacy-maintainer-scripts/build-spec/debian/postinst @@ -0,0 +1,181 @@ +#! /bin/sh -e + +if [ "$1" = "configure" ]; then + if [ -d /usr/doc -a ! -e /usr/doc/maintainer-scripts -a -d /usr/share/doc/maintainer-scripts ]; then + ln -sf ../share/doc/maintainer-scripts /usr/doc/maintainer-scripts + fi +fi + +# valid +. /usr/share/lintian/shell || exit 0 +. /usr/share/lintian/shell >/dev/null +. /usr/share/lintian/shell 2>/dev/null +. /usr/share/lintian/shell /dev/null +update-rc.d $FOO defaults +update-rc.d foo remove + +# valid +FOO=/tmp +FOO=/var/tmp +: ${FOO:=/tmp} +FOO=`mktemp /tmp/scripts.XXXXXX` +rm "$FOO" +FOO=`tempfile -n/tmp/scripts.tmp` +mkdir /var/tmp/scripts +FOO="/tmp/false.positive.XXXXXX" +# invalid +echo foo >>/tmp/scripts.tmp +rm /tmp/scripts.tmp +rmdir /var/tmp/scripts + +# invalid, maintainer-script-hides-init-failure +invoke-rc.d foo start || exit 0 + +# The right way to invoke an rc script +if which invoke-rc.d >/dev/null 2>&1; then + invoke-rc.d package start +else + /etc/init.d/package start +fi + +# Example ucf invocation. +ucf /usr/share/foo/configuration /etc/foo.conf + +# Calling gconftool directly. +gconftool-2 --makefile-install-rule foo.schema + +# Calling gconf-schemas with no dependency. +gconf-schemas --register foo.schema + +# Calling update-xmlcatalog with no dependency. +update-xmlcatalog --add --type system --id "/usr/share/sgml/dtd/foo" \ + --package maintainer-scripts --root + +# Maintainer scripts shouldn't touch /var/lib/dpkg/status. This is the old +# recipe from the dpkg wiki that should be replaced with dpkg-query. +sed -n -e \"/^Conffiles:/,/^[^ ]/{\\\\' /etc/conffile'{s/.* //;p}}\" \ + /var/lib/dpkg/status + +# Don't modify these files. +echo 'broken 6714/tcp' >> /etc/services +cp /nonexistent /etc/protocols +mv /usr/share/doc/rpc /etc/rpc + +# But this is okay. +cp /etc/protocols /etc/protocols.new + +# This is also wrong. +echo 'broken' > /etc/inetd.conf +cp /etc/inetd.conf.new /etc/inetd.conf + +# But this is fine. +cp /etc/inetd.conf /srv/chroot/etc/inetd.conf + +# Deprecated +install-sgmlcatalog --install package +install-sgmlcatalog --remove package + +# This too is a heredoc. +some-program > /etc/config-file <<'EOF' +echo "All of the array is: ${H[@]}" +EOF + +# But this isn't. +cat '</dev/null; then + ucf --purge /etc/foo.conf +fi + +# This isn't allowed. +rm /tmp/foo /dev/device +rm /dev/device1 + +# But this is okay. +rm /tmp/foo > /dev/null + +# Not allowed here even with remove. +install-sgmlcatalog --remove package diff --git a/t/recipes/checks/debian/watch/legacy-maintainer-scripts/build-spec/debian/preinst b/t/recipes/checks/debian/watch/legacy-maintainer-scripts/build-spec/debian/preinst new file mode 100644 index 0000000..6058978 --- /dev/null +++ b/t/recipes/checks/debian/watch/legacy-maintainer-scripts/build-spec/debian/preinst @@ -0,0 +1,18 @@ +#!/bin/sh + +update-rc.d foo remove +update-rc.d bar defaults + +# Obsolete dpkg assertions. +dpkg --assert-support-predepends || exit 1 +dpkg --assert-working-epoch || exit 1 +dpkg --assert-long-filenames || exit 1 +dpkg --assert-multi-conrep || exit 1 + +/bin/grep -E --mmap "^Package: foo$" /var/lib/dpkg/status + +# continuation lines +update-alternatives --install /usr/bin/fakeroot fakeroot \ + /usr/bin/fakeroot-ng 5 \ + --slave /usr/share/man/man1/fakeroot.1.gz \ + fakeroot.1.gz /usr/share/man/man1/fakeroot-ng.1.gz diff --git a/t/recipes/checks/debian/watch/legacy-maintainer-scripts/build-spec/debian/prerm b/t/recipes/checks/debian/watch/legacy-maintainer-scripts/build-spec/debian/prerm new file mode 100644 index 0000000..076ecaf --- /dev/null +++ b/t/recipes/checks/debian/watch/legacy-maintainer-scripts/build-spec/debian/prerm @@ -0,0 +1,188 @@ +#!/bin/sh + +if [ "$1" != "upgrade" ]; then + update-alternatives --remove dummy /usr/bin/dummy-alternative +fi + +if ([ "$1" = "upgrade" ] || [ "$1" = "remove" ]) && [ -L /usr/doc/maintainer-scripts ]; the +n + rm -f /usr/doc/maintainer-scripts +fi + +cat </dev/null +} + +source $FOO + +trap "echo hi" EXIT HUP 3 + +if [[ "$2" = "purge" ]]; then + kill -HUP $$ +fi + +#this is ok though +if test -n $(echo foo | perl -pe 's/[[:space:]]//go'); then + echo 1 +fi + +update-rc.d foo remove + +# More false positives for bashism checks. None of these are errors. +echo "$line" | grep -q '{fonts/map,}/{\$progname,pdftex,dvips,}//' +echo "$line" | grep -q "${fonts},${foo}" +echo '$[1+2]' +printf "foo |& bar" +perl -e "print q( kill -HUP $? )" + +# Still catch disallowed expansions in double-quotes, though. +echo "${line:3:1}" + +# The wrong way to run an init script (no invoke-rc.d). +/etc/init.d/package stop + +# This is the only install-sgmlcatalog call that's allowed. +install-sgmlcatalog --quiet --remove package + +# More bashisms checks + +read -x foo +read -x +read -r foo +read foo +read + +echo "a\\b" +echo 'a\nb' + +echo "${UID}" +echo "$EUID" +echo "$SHLVL" +echo "$DIRSTACK" +echo "$SECONDS" +echo "$BASH" +echo "$BASH_FOO" +echo "$SHELLOPTS" +echo "$PIPESTATUS" + +bar="$(cut '-d|' -f2 <<< "$foo")" + +VAR=1 +VAR+=a + +echos() { + echo -n -e "bar" + echo -e -n "bar" + echo -en "bar" + echo -ne "bar" + echo "bar" + echo "echo -e foo" +} + +ech.os() { + echo foo >& 2 + echo foo >&bar + echo foo >& bar +} + +echoes() { + echo "abc\nxyz" + echo 'xyz\rabc' + echo foo\cbar + + echo -e "abc\nxyz" + echo -net 'xyz\rabc' + echo -e foo\cbar +} + +foobar.() { + suspend x + suspended x + caller x + complete x + compgen x + declare -a foo +} + +.foobar() { + typeset -x bar + disown 1 + builtin foo + set -B + alias -p + unalias -a +} + +IFS="()" + +ulimit +shopt +type -v bar +time ls +dirs +diff <(tac a) <(tac b) + +pushd + +local foo=bar +local -x foo + +popd + +readonly -f + +echo bar > /dev/tcp +export x +export -x x +export -p x + +sh -x +sh -D +sh --foo +sh +O + +# Brace expansion checks +echo {a,b} +echo {abc},{bcd} + +foobar() +{ + # This is a function +} + + foo.bar() +( + # This is a function with a bad name +) + +foobar@() +{ + # As is this +} + +# This is ok +read -r foo +# but these aren't +read -r +read -p "Would you like to restart the service?" foo bar +read --fish + +set -e + +source "$BAR" +source '$BAR' +source ~/bar +source a diff --git a/t/recipes/checks/debian/watch/legacy-maintainer-scripts/build-spec/debian/rules b/t/recipes/checks/debian/watch/legacy-maintainer-scripts/build-spec/debian/rules new file mode 100755 index 0000000..5fcef00 --- /dev/null +++ b/t/recipes/checks/debian/watch/legacy-maintainer-scripts/build-spec/debian/rules @@ -0,0 +1,35 @@ +#!/usr/bin/make -f + +build-arch: + +build-indep: + +build: build-arch build-indep + +binary-arch: + +binary-indep: + install -d debian/tmp/DEBIAN + install -m 0755 debian/preinst debian/tmp/DEBIAN + install -m 0755 debian/postinst debian/tmp/DEBIAN + install -m 0755 debian/prerm debian/tmp/DEBIAN + install -m 0755 debian/postrm debian/tmp/DEBIAN + install -m 0644 debian/triggers debian/tmp/DEBIAN + install -d debian/tmp/usr/share/doc/maintainer-scripts + install -m 0644 debian/changelog \ + debian/tmp/usr/share/doc/maintainer-scripts/changelog + gzip -n -9 debian/tmp/usr/share/doc/maintainer-scripts/changelog + dpkg-gencontrol -isp + dpkg --build debian/tmp .. + +binary: binary-arch binary-indep + +# Make sure we see dh_clean even in a rule clean depends on. Not the point of +# this test suite, but a convenient place to put it. +clean: clean1 clean2 clean3 +clean1: +clean2: + dh_clean +clean3: + +.PHONY: build-arch build-indep build binary-arch binary-indep binary clean diff --git a/t/recipes/checks/debian/watch/legacy-maintainer-scripts/build-spec/debian/triggers b/t/recipes/checks/debian/watch/legacy-maintainer-scripts/build-spec/debian/triggers new file mode 100644 index 0000000..f627094 --- /dev/null +++ b/t/recipes/checks/debian/watch/legacy-maintainer-scripts/build-spec/debian/triggers @@ -0,0 +1,4 @@ +# Example triggers file +activate foo + +interest bar diff --git a/t/recipes/checks/debian/watch/legacy-maintainer-scripts/build-spec/debian/watch b/t/recipes/checks/debian/watch/legacy-maintainer-scripts/build-spec/debian/watch new file mode 100644 index 0000000..430eea3 --- /dev/null +++ b/t/recipes/checks/debian/watch/legacy-maintainer-scripts/build-spec/debian/watch @@ -0,0 +1,11 @@ +# A whitespace is fine for uscan: + version=5 + +# Following line should not be matched: +#opts=uversionmangle=s/$/+debian/,dversionmangle=s/foo/bar/ \ +# Following one is incorrect, there's a missing backslash at the end +opts=uversionmangle=s/$/+dfsg/,dversionmangle=s/foo/bar/ + +# 'active' is useless here, but it works anyway +options=active \ +http://domain.tld/foo-(.+)\.tar\.gz \ No newline at end of file diff --git a/t/recipes/checks/debian/watch/legacy-maintainer-scripts/build-spec/fill-values b/t/recipes/checks/debian/watch/legacy-maintainer-scripts/build-spec/fill-values new file mode 100644 index 0000000..c281e87 --- /dev/null +++ b/t/recipes/checks/debian/watch/legacy-maintainer-scripts/build-spec/fill-values @@ -0,0 +1,6 @@ +Skeleton: upload-non-native +Testname: legacy-maintainer-scripts +Source: maintainer-scripts +Version: 7+dfsg-0.1 +Description: Legacy test "maintainer-scripts" +Extra-Build-Depends: dash (>= 0.5.10.2) diff --git a/t/recipes/checks/debian/watch/legacy-maintainer-scripts/eval/desc b/t/recipes/checks/debian/watch/legacy-maintainer-scripts/eval/desc new file mode 100644 index 0000000..15e1052 --- /dev/null +++ b/t/recipes/checks/debian/watch/legacy-maintainer-scripts/eval/desc @@ -0,0 +1,2 @@ +Testname: legacy-maintainer-scripts +Check: debian/watch diff --git a/t/recipes/checks/debian/watch/legacy-maintainer-scripts/eval/hints b/t/recipes/checks/debian/watch/legacy-maintainer-scripts/eval/hints new file mode 100644 index 0000000..900fab6 --- /dev/null +++ b/t/recipes/checks/debian/watch/legacy-maintainer-scripts/eval/hints @@ -0,0 +1,4 @@ +maintainer-scripts (source): debian-watch-uses-insecure-uri http://domain.tld/foo-(.+)\.tar\.gz [debian/watch:11] +maintainer-scripts (source): debian-watch-not-mangling-version opts=uversionmangle=s/$/+dfsg/,dversionmangle=s/foo/bar/ [debian/watch:7] +maintainer-scripts (source): debian-watch-not-mangling-version options=active http://domain.tld/foo-(.+)\.tar\.gz [debian/watch:11] +maintainer-scripts (source): debian-watch-does-not-check-openpgp-signature [debian/watch] diff --git a/t/recipes/checks/debian/watch/legacy-maintainer-scripts/eval/post-test b/t/recipes/checks/debian/watch/legacy-maintainer-scripts/eval/post-test new file mode 100644 index 0000000..faeef0b --- /dev/null +++ b/t/recipes/checks/debian/watch/legacy-maintainer-scripts/eval/post-test @@ -0,0 +1 @@ +s/\(current is ([0-9]+\.)+[0-9]\)/(current is CURRENT)/ diff --git a/t/recipes/checks/debian/watch/legacy-scripts/build-spec/debian/changelog.in b/t/recipes/checks/debian/watch/legacy-scripts/build-spec/debian/changelog.in new file mode 100644 index 0000000..935c633 --- /dev/null +++ b/t/recipes/checks/debian/watch/legacy-scripts/build-spec/debian/changelog.in @@ -0,0 +1,41 @@ +scripts ([% $version %]) [% $distribution %]; urgency=low + + * I'm also not able to write my name. + * Added a script in /etc/Xsession.d + * Bizarre version number courtesy of + https://wiki.ubuntu.com/SecurityUpdateProcedures#Prepare + + -- Mark 'HE' Brokschmitt Thu, 23 Jun 2005 14:32:39 +0200 + +scripts (5-1) unstable; urgency=low + + * I'm making a typo in my own name... And I want lintian to warn me about + it. + + -- Jeroen van Wolffelaar Sun, 18 Apr 2004 02:26:34 +0200 + +scripts (4-1) unstable; urgency=low + + * Add new example to check that not executable files with a shebang line + called *in don't trigger the script-not-executable warning. + + -- Marc 'HE' Brockschmidt Wed, 14 Apr 2004 19:44:04 +0200 + +scripts (3-3) unstable; urgency=low + + * Add suidperlfoo and some code in debian/rules to + check the new suidperl checks + + -- Frank Lichtenheld Wed, 31 Mar 2004 21:06:20 +0000 + +scripts (2-1) unstable; urgency=low + + * Add tkfoo script for tk checkings + + -- Lintian Maintainers Sat, 21 Feb 2004 17:13:36 +0100 + +scripts (1-0) unstable; urgency=low + + * Initial version + + -- Lintian Maintainers Sat, 10 Feb 2001 15:37:31 -0800 diff --git a/t/recipes/checks/debian/watch/legacy-scripts/build-spec/debian/control.in b/t/recipes/checks/debian/watch/legacy-scripts/build-spec/debian/control.in new file mode 100644 index 0000000..75a521f --- /dev/null +++ b/t/recipes/checks/debian/watch/legacy-scripts/build-spec/debian/control.in @@ -0,0 +1,16 @@ +Source: scripts +Section: interpreters +Priority: optional +Maintainer: Lintian Maintainers +Uploaders: Jeroen van Wolfelaar , Marc 'HE' Brockschmidt +Build-Depends-Indep: dpatch +Standards-Version: 3.2.1 + +Package: scripts +Architecture: [% $package_architecture %] +Depends: test, ruby1.8, build-essential, libssl0.9.7, php7.0-cli +Recommends: tk8.4 | wish +Description: test lintian's script file checks + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. diff --git a/t/recipes/checks/debian/watch/legacy-scripts/build-spec/debian/copyright b/t/recipes/checks/debian/watch/legacy-scripts/build-spec/debian/copyright new file mode 100644 index 0000000..ad8a119 --- /dev/null +++ b/t/recipes/checks/debian/watch/legacy-scripts/build-spec/debian/copyright @@ -0,0 +1,5 @@ +This file contains the phrase "under the same terms as Perl itself" to +trigger warnings about not having common-licenses references. + +This file contains the phrase "public domain" which should suppress +warnings about no copyright date. diff --git a/t/recipes/checks/debian/watch/legacy-scripts/build-spec/debian/patches/00list b/t/recipes/checks/debian/watch/legacy-scripts/build-spec/debian/patches/00list new file mode 100644 index 0000000..3b9d37e --- /dev/null +++ b/t/recipes/checks/debian/watch/legacy-scripts/build-spec/debian/patches/00list @@ -0,0 +1,11 @@ +01_not_here_right_now.dpatch + +# some comment +/* some more + elaborate comment + which needs DPATCH_OPTION_CPP=1 + */02_i_dont_have_a_description.patch 03_specified_without_dpatch + +// and again a comment + +04_i_dont_have_a_description_either.patch diff --git a/t/recipes/checks/debian/watch/legacy-scripts/build-spec/debian/patches/00list.sparc b/t/recipes/checks/debian/watch/legacy-scripts/build-spec/debian/patches/00list.sparc new file mode 100644 index 0000000..8b47ab3 --- /dev/null +++ b/t/recipes/checks/debian/watch/legacy-scripts/build-spec/debian/patches/00list.sparc @@ -0,0 +1 @@ +01_some_other_patch_thats_not_in_the_package.dpatch diff --git a/t/recipes/checks/debian/watch/legacy-scripts/build-spec/debian/patches/00options b/t/recipes/checks/debian/watch/legacy-scripts/build-spec/debian/patches/00options new file mode 100644 index 0000000..57ffeb6 --- /dev/null +++ b/t/recipes/checks/debian/watch/legacy-scripts/build-spec/debian/patches/00options @@ -0,0 +1 @@ +DPATCH_OPTION_CPP=1 diff --git a/t/recipes/checks/debian/watch/legacy-scripts/build-spec/debian/patches/02_i_dont_have_a_description.patch b/t/recipes/checks/debian/watch/legacy-scripts/build-spec/debian/patches/02_i_dont_have_a_description.patch new file mode 100644 index 0000000..9279c1b --- /dev/null +++ b/t/recipes/checks/debian/watch/legacy-scripts/build-spec/debian/patches/02_i_dont_have_a_description.patch @@ -0,0 +1,7 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 02_i_dont_have_a_description.patch.dpatch by Marc 'HE' Brockschmidt > +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: No description. + +@DPATCH@ diff --git a/t/recipes/checks/debian/watch/legacy-scripts/build-spec/debian/patches/03_specified_without_dpatch.dpatch b/t/recipes/checks/debian/watch/legacy-scripts/build-spec/debian/patches/03_specified_without_dpatch.dpatch new file mode 100644 index 0000000..8303ac6 --- /dev/null +++ b/t/recipes/checks/debian/watch/legacy-scripts/build-spec/debian/patches/03_specified_without_dpatch.dpatch @@ -0,0 +1,5 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## All lines beginning with `## DP:' are a description of the patch. +## DP: Listed in 00list without .dpatch suffix. + +@DPATCH@ diff --git a/t/recipes/checks/debian/watch/legacy-scripts/build-spec/debian/patches/04_i_dont_have_a_description_either.patch b/t/recipes/checks/debian/watch/legacy-scripts/build-spec/debian/patches/04_i_dont_have_a_description_either.patch new file mode 100644 index 0000000..b603f16 --- /dev/null +++ b/t/recipes/checks/debian/watch/legacy-scripts/build-spec/debian/patches/04_i_dont_have_a_description_either.patch @@ -0,0 +1,7 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 04_i_dont_have_a_description_either.patch by Adam D. Barratt +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: + +@DPATCH@ diff --git a/t/recipes/checks/debian/watch/legacy-scripts/build-spec/debian/postinst b/t/recipes/checks/debian/watch/legacy-scripts/build-spec/debian/postinst new file mode 100644 index 0000000..7c5baf1 --- /dev/null +++ b/t/recipes/checks/debian/watch/legacy-scripts/build-spec/debian/postinst @@ -0,0 +1,14 @@ +#!/bin/sh + +if [ -x "/etc/init.d/lsb-broken" ] ; then + update-rc.d lsb-broken defaults >/dev/null +fi +if [ -x "/etc/init.d/no-lsb" ] ; then + update-rc.d no-lsb defaults >/dev/null +fi +if [ -x "/etc/init.d/skeleton" ] ; then + update-rc.d skeleton defaults >/dev/null +fi +if [ -x "/etc/init.d/lsb-other" ] ; then + update-rc.d lsb-other defaults >/dev/null +fi diff --git a/t/recipes/checks/debian/watch/legacy-scripts/build-spec/debian/postrm b/t/recipes/checks/debian/watch/legacy-scripts/build-spec/debian/postrm new file mode 100644 index 0000000..8fa75a2 --- /dev/null +++ b/t/recipes/checks/debian/watch/legacy-scripts/build-spec/debian/postrm @@ -0,0 +1,9 @@ +#!/bin/sh -e + +if [ "$1" = purge ] ; then + update-rc.d lsb-broken remove >/dev/null + update-rc.d no-lsb remove >/dev/null + update-rc.d skeleton remove >/dev/null + update-rc.d lsb-other remove >/dev/null + update-rc.d lsb-other remove >/dev/null +fi diff --git a/t/recipes/checks/debian/watch/legacy-scripts/build-spec/debian/preinst b/t/recipes/checks/debian/watch/legacy-scripts/build-spec/debian/preinst new file mode 100644 index 0000000..0799557 --- /dev/null +++ b/t/recipes/checks/debian/watch/legacy-scripts/build-spec/debian/preinst @@ -0,0 +1,15 @@ +#!/bin/sh + +set -e +set -x + +# +# Some comments here +# + +# This serves as an example of an "empty" script, so +# please do not add any real code here, thank you :) + +#DEBHELPER# + +exit 0 diff --git a/t/recipes/checks/debian/watch/legacy-scripts/build-spec/debian/rules b/t/recipes/checks/debian/watch/legacy-scripts/build-spec/debian/rules new file mode 100755 index 0000000..ee3677e --- /dev/null +++ b/t/recipes/checks/debian/watch/legacy-scripts/build-spec/debian/rules @@ -0,0 +1,105 @@ +#!/usr/bin/make -f + +tmp=debian/tmp + +build-arch: + echo "Hi, in an arch: all package, I am a bug!" + +build-indep: + +build: build-arch build-indep + +binary-arch: + echo "Hi, in an arch: all package, I am a bug!" + +binary-indep: + install -d $(tmp)/usr/bin/ + install -d $(tmp)/etc/X11/Xsession.d/ + install -d $(tmp)/etc/init.d/ + install -d $(tmp)/etc/csh/login.d/ + install -d $(tmp)/etc/fish.d/ + install -d $(tmp)/usr/share/scripts/ + install -d $(tmp)/usr/share/doc/scripts/ + install -d $(tmp)/usr/lib/cgi-bin + install -d $(tmp)/usr/src/scripts + install -d $(tmp)/DEBIAN + + install -m 755 csh-foo $(tmp)/etc/csh/login.d/ + install -m 755 envfoo $(tmp)/usr/bin/ + install -m 755 fish-foo $(tmp)/etc/fish.d/ + install -m 755 jruby-broken $(tmp)/usr/bin/ + install -m 755 perlfoo $(tmp)/usr/bin/ + install -m 755 rubyfoo $(tmp)/usr/bin/ +# This doesn't use "env" but should also trigger script-in-usr-share-doc + install -m 755 rubyfoo $(tmp)/usr/share/doc/scripts/ + install -m 755 make-foo $(tmp)/usr/bin/ + install -m 755 lefty-foo $(tmp)/usr/bin/ + install -m 4751 perlfoo $(tmp)/usr/bin/suidperlfoo2 + install -m 755 sh-broken $(tmp)/usr/bin/ + install -m 4555 suidperlfoo $(tmp)/usr/bin/ + install -m 755 tkfoo $(tmp)/usr/bin/ + install -m 755 wishfoo $(tmp)/usr/bin/ + install -m 644 xsession-test $(tmp)/etc/X11/Xsession.d/ + +# Permissions here aren't part of what's being tested, but let us exercise +# some other errors. + install -m 755 perl-bizarre-1 $(tmp)/usr/bin/ + install -m 750 perl-bizarre-2 $(tmp)/usr/bin/ + install -m 754 perl-bizarre-3 $(tmp)/usr/bin/ + install -m 705 guile-bizarre $(tmp)/usr/bin/ + +# First one should produce a warning; second one shouldn't. + install -m 755 gccbug.dpatch $(tmp)/usr/share/scripts/ + install -m 755 gccbug.dpatch $(tmp)/usr/src/scripts/ + + install -m 644 init-skeleton $(tmp)/etc/init.d/skeleton + install -m 755 init-no-lsb $(tmp)/etc/init.d/no-lsb + install -m 755 init-lsb-broken $(tmp)/etc/init.d/lsb-broken + install -m 755 init-lsb-other $(tmp)/etc/init.d/lsb-other + + install -m 755 phpfoo $(tmp)/usr/share/scripts/ + sed 's/php$$/php7.0/' phpfoo > $(tmp)/usr/share/scripts/php7.0foo + chmod 755 $(tmp)/usr/share/scripts/php7.0foo + + install -m 755 phpenvfoo $(tmp)/usr/share/scripts/ + sed 's/php$$/php7.0/' phpenvfoo > $(tmp)/usr/share/scripts/php7.0envfoo + chmod 755 $(tmp)/usr/share/scripts/php7.0envfoo + + echo "#!/usr/bin/perl" >> $(tmp)/usr/share/scripts/foobar.in + chmod 644 $(tmp)/usr/share/scripts/foobar.in + + touch $(tmp)/usr/share/scripts/mono.exe + chmod 755 $(tmp)/usr/share/scripts/mono.exe + + echo "#!/bin/sh" > $(tmp)/usr/share/scripts/foo\$$bar + chmod 755 $(tmp)/usr/share/scripts/foo\$$bar + + echo "#!/bin/sh" > $(tmp)/usr/lib/cgi-bin/cgi-script + chmod 755 $(tmp)/usr/lib/cgi-bin/cgi-script + + echo "#!/bin/sh" > $(tmp)/usr/bin/test.sh + chmod 755 $(tmp)/usr/bin/test.sh + + + dh_testroot # dummy to test missing debhelper dependency + + + install -m 644 debian/changelog $(tmp)/usr/share/doc/scripts/changelog.Debian + gzip -n -9 $(tmp)/usr/share/doc/scripts/changelog.Debian + install -m 644 debian/copyright $(tmp)/usr/share/doc/scripts/copyright + + install -m 644 debian/scripts.conffiles $(tmp)/DEBIAN/conffiles + install -m 755 debian/preinst $(tmp)/DEBIAN/preinst + install -m 755 debian/postinst $(tmp)/DEBIAN/postinst + install -m 755 debian/postrm $(tmp)/DEBIAN/postrm + touch $(tmp)/DEBIAN/prerm + chmod 755 $(tmp)/DEBIAN/prerm + dpkg-gencontrol -isp + dpkg --build $(tmp) .. + +binary: binary-arch binary-indep + +clean: + rm -rf debian/files $(tmp) debian/substvars + +.PHONY: build-arch build-indep build binary-arch binary-indep binary clean diff --git a/t/recipes/checks/debian/watch/legacy-scripts/build-spec/debian/scripts.conffiles b/t/recipes/checks/debian/watch/legacy-scripts/build-spec/debian/scripts.conffiles new file mode 100644 index 0000000..01a371a --- /dev/null +++ b/t/recipes/checks/debian/watch/legacy-scripts/build-spec/debian/scripts.conffiles @@ -0,0 +1,6 @@ +/etc/init.d/lsb-broken +/etc/init.d/lsb-other +/etc/init.d/no-lsb +/etc/X11/Xsession.d/xsession-test +/etc/csh/login.d/csh-foo +/etc/fish.d/fish-foo diff --git a/t/recipes/checks/debian/watch/legacy-scripts/build-spec/debian/watch b/t/recipes/checks/debian/watch/legacy-scripts/build-spec/debian/watch new file mode 100644 index 0000000..dba5815 --- /dev/null +++ b/t/recipes/checks/debian/watch/legacy-scripts/build-spec/debian/watch @@ -0,0 +1,8 @@ +# watch file with upstream version mangling + +version=2 +opts="uversionmangle=s/$/ds/" \ +http://qa.debian.org/watch/sf.php?project=foo scripts\.([\d.]+)\.tar\.gz debian uupdate + +version=3 +http://ftp.sf.net/foo/foo_bar(.+)\.Z 5 uupdate \ No newline at end of file diff --git a/t/recipes/checks/debian/watch/legacy-scripts/build-spec/fill-values b/t/recipes/checks/debian/watch/legacy-scripts/build-spec/fill-values new file mode 100644 index 0000000..8a68457 --- /dev/null +++ b/t/recipes/checks/debian/watch/legacy-scripts/build-spec/fill-values @@ -0,0 +1,6 @@ +Testname: legacy-scripts +Source: scripts +Version: 6ds-1ubuntu0.5.10.1 +Package-Architecture: all +Skeleton: upload-non-native +Description: Legacy test "scripts" diff --git a/t/recipes/checks/debian/watch/legacy-scripts/build-spec/orig/csh-foo b/t/recipes/checks/debian/watch/legacy-scripts/build-spec/orig/csh-foo new file mode 100644 index 0000000..eaf47a1 --- /dev/null +++ b/t/recipes/checks/debian/watch/legacy-scripts/build-spec/orig/csh-foo @@ -0,0 +1,2 @@ +#! /bin/csh + diff --git a/t/recipes/checks/debian/watch/legacy-scripts/build-spec/orig/envfoo b/t/recipes/checks/debian/watch/legacy-scripts/build-spec/orig/envfoo new file mode 100755 index 0000000..e005037 --- /dev/null +++ b/t/recipes/checks/debian/watch/legacy-scripts/build-spec/orig/envfoo @@ -0,0 +1,4 @@ +#! /bin/env python + +if __name__ == '__main__': + print 'Hi there' diff --git a/t/recipes/checks/debian/watch/legacy-scripts/build-spec/orig/fish-foo b/t/recipes/checks/debian/watch/legacy-scripts/build-spec/orig/fish-foo new file mode 100644 index 0000000..7f59139 --- /dev/null +++ b/t/recipes/checks/debian/watch/legacy-scripts/build-spec/orig/fish-foo @@ -0,0 +1,2 @@ +#! /usr/bin/fish + diff --git a/t/recipes/checks/debian/watch/legacy-scripts/build-spec/orig/gccbug.dpatch b/t/recipes/checks/debian/watch/legacy-scripts/build-spec/orig/gccbug.dpatch new file mode 100755 index 0000000..65cbf37 --- /dev/null +++ b/t/recipes/checks/debian/watch/legacy-scripts/build-spec/orig/gccbug.dpatch @@ -0,0 +1,39 @@ +#! /bin/sh -e + +# DP: Use sensible-editor instead of vi as fallback editor + +# Taken from gcc-4.1-source. Chokes bash -n (due to the patch) despite being +# a valid dpatch, so don't warn about it if it's in /usr/src. + +dir= +if [ $# -eq 3 -a "$2" = '-d' ]; then + pdir="-d $3" + dir="$3/" +elif [ $# -ne 1 ]; then + echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" + exit 1 +fi +case "$1" in + -patch) + patch $pdir -f --no-backup-if-mismatch -p0 < $0 + ;; + -unpatch) + patch $pdir -f --no-backup-if-mismatch -R -p0 < $0 + ;; + *) + echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" + exit 1 +esac +exit 0 + +--- gcc/gccbug.in~ 2003-03-01 00:51:42.000000000 +0100 ++++ gcc/gccbug.in 2003-03-02 12:08:36.000000000 +0100 +@@ -134,7 +134,7 @@ + # If they don't have a preferred editor set, then use + if [ -z "$VISUAL" ]; then + if [ -z "$EDITOR" ]; then +- EDIT=vi ++ EDIT=/usr/bin/sensible-editor + else + EDIT="$EDITOR" + fi diff --git a/t/recipes/checks/debian/watch/legacy-scripts/build-spec/orig/guile-bizarre b/t/recipes/checks/debian/watch/legacy-scripts/build-spec/orig/guile-bizarre new file mode 100644 index 0000000..70e2c74 --- /dev/null +++ b/t/recipes/checks/debian/watch/legacy-scripts/build-spec/orig/guile-bizarre @@ -0,0 +1,6 @@ +#! /bin/sh +# -*- scheme -*- +exec guile -s $0 $* +# Seen in the wild as build-guile-gtk in libguilegtk-1.2-dev (0.31-5.1) +# Tests script_is_evil_and_wrong +!# diff --git a/t/recipes/checks/debian/watch/legacy-scripts/build-spec/orig/init-lsb-broken b/t/recipes/checks/debian/watch/legacy-scripts/build-spec/orig/init-lsb-broken new file mode 100644 index 0000000..e4dfa92 --- /dev/null +++ b/t/recipes/checks/debian/watch/legacy-scripts/build-spec/orig/init-lsb-broken @@ -0,0 +1,34 @@ +#! /bin/sh +### BEGIN INIT INFO +# Provides: bad-lsb +# Required-Start: $local_fs $remote_fs +# Required-Stop: +# Default-Start: 1 2 3 4 5 +# Default-Stop: S 0 1 6 X +# Short-Description: Example Lintian initscript +# but this can't be continued +# Description: An example of a bad LSB section in an init script. +# This continuation is allowed (with spaces). +# This one is too (with tabs). +# X-Debian-Foo: Some unknown but valid keyword. +# Foo: Some invalid keyword. + +# Whoops, no terminating line. + +# And then we have this duplicate section. +### BEGIN INIT INFO +# Required-Start: This one doesn't count. +### END INIT INFO + +# Hey, look at all of those missing actions! But stop isn't missing. +case "$1" in + start|stop) + echo "Blah" + ;; + *) + echo "Usage: foo start" >&2 + exit 3 + ;; +esac + +: diff --git a/t/recipes/checks/debian/watch/legacy-scripts/build-spec/orig/init-lsb-other b/t/recipes/checks/debian/watch/legacy-scripts/build-spec/orig/init-lsb-other new file mode 100644 index 0000000..adb4795 --- /dev/null +++ b/t/recipes/checks/debian/watch/legacy-scripts/build-spec/orig/init-lsb-other @@ -0,0 +1,22 @@ +#! /bin/sh +### BEGIN INIT INFO +# Provides: lsb-other +# Required-Start: $local_fs $remote_fs +# Required-Stop: $local_fs $remote_fs +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +# Description: This is another LSB script test, which has a missing +# Short-Description. +### END INIT INFO + +case "$1" in + start|stop|restart|reload|force-reload) + echo "Blah" + ;; + *) + echo "Usage: foo start" >&2 + exit 3 + ;; +esac + +: diff --git a/t/recipes/checks/debian/watch/legacy-scripts/build-spec/orig/init-no-lsb b/t/recipes/checks/debian/watch/legacy-scripts/build-spec/orig/init-no-lsb new file mode 100644 index 0000000..6b994dd --- /dev/null +++ b/t/recipes/checks/debian/watch/legacy-scripts/build-spec/orig/init-no-lsb @@ -0,0 +1,17 @@ +#! /bin/sh +# No LSB section, but otherwise okay. (Well, the messages are bad, but we +# don't check that yet.) + +case "$1" in + start) + echo "Blah starting" + ;; + stop) + echo "Blah stopping" + ;; + restart|force-reload) + echo "Blah restarting" + ;; +esac + +: diff --git a/t/recipes/checks/debian/watch/legacy-scripts/build-spec/orig/init-skeleton b/t/recipes/checks/debian/watch/legacy-scripts/build-spec/orig/init-skeleton new file mode 100644 index 0000000..c868508 --- /dev/null +++ b/t/recipes/checks/debian/watch/legacy-scripts/build-spec/orig/init-skeleton @@ -0,0 +1,150 @@ +#! /bin/sh +### BEGIN INIT INFO +# Provides: skeleton +# Required-Start: $local_fs $remote_fs +# Required-Stop: $local_fs $remote_fs +# Default-Start: 2 3 4 5 +# Default-Stop: S 0 1 6 +# Short-Description: Example Lintian initscript +# Description: This file should be used to construct scripts to be +# placed in /etc/init.d. +### END INIT INFO + +# Do NOT "set -e" + +# PATH should only include /usr/* if it runs after the mountnfs.sh script +PATH=/usr/sbin:/usr/bin:/sbin:/bin +DESC="Description of the service" +NAME=daemonexecutablename +DAEMON=/usr/sbin/$NAME +DAEMON_ARGS="--options args" +PIDFILE=/var/run/$NAME.pid +SCRIPTNAME=/etc/init.d/$NAME + +# Exit if the package is not installed +[ -x "$DAEMON" ] || exit 0 + +# Read configuration variable file if it is present +[ -r /etc/default/$NAME ] && . /etc/default/$NAME + +# Load the VERBOSE setting and other rcS variables +[ -f /etc/default/rcS ] && . /etc/default/rcS + +# Define LSB log_* functions. +# Depend on lsb-base (>= 3.0-6) to ensure that this file is present. +. /lib/lsb/init-functions + +# +# Function that starts the daemon/service +# +do_start() +{ + # Return + # 0 if daemon has been started + # 1 if daemon was already running + # 2 if daemon could not be started + start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON --test > /dev/null \ + || return 1 + start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON -- \ + $DAEMON_ARGS \ + || return 2 + # Add code here, if necessary, that waits for the process to be ready + # to handle requests from services started subsequently which depend + # on this one. As a last resort, sleep for some time. +} + +# +# Function that stops the daemon/service +# +do_stop() +{ + # Return + # 0 if daemon has been stopped + # 1 if daemon was already stopped + # 2 if daemon could not be stopped + # other if a failure occurred + start-stop-daemon --stop --quiet --retry=TERM/30/KILL/5 --pidfile $PIDFILE --name $NAME + RETVAL="$?" + [ "$RETVAL" = 2 ] && return 2 + # Wait for children to finish too if this is a daemon that forks + # and if the daemon is only ever run from this initscript. + # If the above conditions are not satisfied then add some other code + # that waits for the process to drop all resources that could be + # needed by services started subsequently. A last resort is to + # sleep for some time. + start-stop-daemon --stop --quiet --oknodo --retry=0/30/KILL/5 --exec $DAEMON + [ "$?" = 2 ] && return 2 + # Many daemons don't delete their pidfiles when they exit. + rm -f $PIDFILE + return "$RETVAL" +} + +# +# Function that sends a SIGHUP to the daemon/service +# +do_reload() { + # + # If the daemon can reload its configuration without + # restarting (for example, when it is sent a SIGHUP), + # then implement that here. + # + start-stop-daemon --stop --signal 1 --quiet --pidfile $PIDFILE --name $NAME + return 0 +} + +case "$1" in + start) + [ "$VERBOSE" != no ] && log_daemon_msg "Starting $DESC" "$NAME" + do_start + case "$?" in + 0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;; + 2) [ "$VERBOSE" != no ] && log_end_msg 1 ;; + esac + ;; + stop) + [ "$VERBOSE" != no ] && log_daemon_msg "Stopping $DESC" "$NAME" + do_stop + case "$?" in + 0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;; + 2) [ "$VERBOSE" != no ] && log_end_msg 1 ;; + esac + ;; + #reload|force-reload) + # + # If do_reload() is not implemented then leave this commented out + # and leave 'force-reload' as an alias for 'restart'. + # + #log_daemon_msg "Reloading $DESC" "$NAME" + #do_reload + #log_end_msg $? + #;; + restart|force-reload) + # + # If the "reload" option is implemented then remove the + # 'force-reload' alias + # + log_daemon_msg "Restarting $DESC" "$NAME" + do_stop + case "$?" in + 0|1) + do_start + case "$?" in + 0) log_end_msg 0 ;; + 1) log_end_msg 1 ;; # Old process is still running + *) log_end_msg 1 ;; # Failed to start + esac + ;; + *) + # Failed to stop + log_end_msg 1 + ;; + esac + ;; + *) + #echo "Usage: $SCRIPTNAME {start|stop|restart|reload|force-reload}" >&2 + echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload}" >&2 + exit 3 + ;; +esac + +: diff --git a/t/recipes/checks/debian/watch/legacy-scripts/build-spec/orig/jruby-broken b/t/recipes/checks/debian/watch/legacy-scripts/build-spec/orig/jruby-broken new file mode 100644 index 0000000..56f574d --- /dev/null +++ b/t/recipes/checks/debian/watch/legacy-scripts/build-spec/orig/jruby-broken @@ -0,0 +1,2 @@ +#!/usr/bin/jruby +# There's no non-versioned jruby, so this should be an error. diff --git a/t/recipes/checks/debian/watch/legacy-scripts/build-spec/orig/lefty-foo b/t/recipes/checks/debian/watch/legacy-scripts/build-spec/orig/lefty-foo new file mode 100644 index 0000000..52c003e --- /dev/null +++ b/t/recipes/checks/debian/watch/legacy-scripts/build-spec/orig/lefty-foo @@ -0,0 +1,2 @@ +#!/usr/local/bin/lefty + diff --git a/t/recipes/checks/debian/watch/legacy-scripts/build-spec/orig/make-foo b/t/recipes/checks/debian/watch/legacy-scripts/build-spec/orig/make-foo new file mode 100644 index 0000000..6b787b5 --- /dev/null +++ b/t/recipes/checks/debian/watch/legacy-scripts/build-spec/orig/make-foo @@ -0,0 +1,3 @@ +#!/usr/bin/make + + diff --git a/t/recipes/checks/debian/watch/legacy-scripts/build-spec/orig/perl-bizarre-1 b/t/recipes/checks/debian/watch/legacy-scripts/build-spec/orig/perl-bizarre-1 new file mode 100644 index 0000000..fc632c8 --- /dev/null +++ b/t/recipes/checks/debian/watch/legacy-scripts/build-spec/orig/perl-bizarre-1 @@ -0,0 +1,11 @@ +#! /bin/sh +eval '(exit $?0)' && eval 'PERL_BADLANG=x;export PERL_BADLANG;: \ +;exec perl -x -S -- "$0" ${1+"$@"};#'if 0; +eval 'setenv PERL_BADLANG x;exec perl -x -S -- "$0" $argv:q;#'.q+ +#!perl -w +package Htex::a2ping; $0=~/(.*)/s;unshift@INC,'.';do($1);die$@if$@;__END__+if !1; +# This Perl script was generated by JustLib2 at Wed Apr 23 09:14:13 2003. +# Don't touch/remove any lines above; http://www.inf.bme.hu/~pts/justlib + +# The above was actually seen in the wild and stresses the +# script_is_evil_and_wrong test. diff --git a/t/recipes/checks/debian/watch/legacy-scripts/build-spec/orig/perl-bizarre-2 b/t/recipes/checks/debian/watch/legacy-scripts/build-spec/orig/perl-bizarre-2 new file mode 100644 index 0000000..afd9cfe --- /dev/null +++ b/t/recipes/checks/debian/watch/legacy-scripts/build-spec/orig/perl-bizarre-2 @@ -0,0 +1,7 @@ +#!/bin/sh +eval 'exec /usr/bin/perl -wS $0 ${1+"$@"}' + if $running_under_some_shell; + +# I'm someone following perlrun except without using the Perl #! line. +# Now something to choke bash. +while (<>) { if (/%#/) { print } } diff --git a/t/recipes/checks/debian/watch/legacy-scripts/build-spec/orig/perl-bizarre-3 b/t/recipes/checks/debian/watch/legacy-scripts/build-spec/orig/perl-bizarre-3 new file mode 100644 index 0000000..44baf75 --- /dev/null +++ b/t/recipes/checks/debian/watch/legacy-scripts/build-spec/orig/perl-bizarre-3 @@ -0,0 +1,6 @@ +eval '(exit $?0)' && eval 'exec perl -wS $0 ${1+"$@"}' +& eval 'exec /usr/bin/perl -wS $0 $argv:q' + if $running_under_some_shell; + +# More utterly bizarreness from perlrun. This one even doesn't work if +# there's a valid #! line on the first line. I don't understand why.... diff --git a/t/recipes/checks/debian/watch/legacy-scripts/build-spec/orig/perlfoo b/t/recipes/checks/debian/watch/legacy-scripts/build-spec/orig/perlfoo new file mode 100644 index 0000000..5b27ed0 --- /dev/null +++ b/t/recipes/checks/debian/watch/legacy-scripts/build-spec/orig/perlfoo @@ -0,0 +1,3 @@ +#! /usr/bin/perl + +print "Hello, World!"; diff --git a/t/recipes/checks/debian/watch/legacy-scripts/build-spec/orig/phpenvfoo b/t/recipes/checks/debian/watch/legacy-scripts/build-spec/orig/phpenvfoo new file mode 100644 index 0000000..cbbfb2e --- /dev/null +++ b/t/recipes/checks/debian/watch/legacy-scripts/build-spec/orig/phpenvfoo @@ -0,0 +1,7 @@ +#!/usr/bin/env php + + +Dumb PHP script + + + diff --git a/t/recipes/checks/debian/watch/legacy-scripts/build-spec/orig/phpfoo b/t/recipes/checks/debian/watch/legacy-scripts/build-spec/orig/phpfoo new file mode 100644 index 0000000..e0595e6 --- /dev/null +++ b/t/recipes/checks/debian/watch/legacy-scripts/build-spec/orig/phpfoo @@ -0,0 +1,7 @@ +#!/usr/bin/php + + +Dumb PHP script + + + diff --git a/t/recipes/checks/debian/watch/legacy-scripts/build-spec/orig/rubyfoo b/t/recipes/checks/debian/watch/legacy-scripts/build-spec/orig/rubyfoo new file mode 100644 index 0000000..8024605 --- /dev/null +++ b/t/recipes/checks/debian/watch/legacy-scripts/build-spec/orig/rubyfoo @@ -0,0 +1,4 @@ +#!/bin/ruby1.8 + +# Ok, that example is really pathetic, but until we have +# some better code in checks/scripts, it will do diff --git a/t/recipes/checks/debian/watch/legacy-scripts/build-spec/orig/sh-broken b/t/recipes/checks/debian/watch/legacy-scripts/build-spec/orig/sh-broken new file mode 100644 index 0000000..7b79074 --- /dev/null +++ b/t/recipes/checks/debian/watch/legacy-scripts/build-spec/orig/sh-broken @@ -0,0 +1,2 @@ +#!/bin/sh +if fi diff --git a/t/recipes/checks/debian/watch/legacy-scripts/build-spec/orig/suidperlfoo b/t/recipes/checks/debian/watch/legacy-scripts/build-spec/orig/suidperlfoo new file mode 100644 index 0000000..bcbc471 --- /dev/null +++ b/t/recipes/checks/debian/watch/legacy-scripts/build-spec/orig/suidperlfoo @@ -0,0 +1,3 @@ +#! /usr/bin/suidperl + +print "Hello, World!"; diff --git a/t/recipes/checks/debian/watch/legacy-scripts/build-spec/orig/tkfoo b/t/recipes/checks/debian/watch/legacy-scripts/build-spec/orig/tkfoo new file mode 100755 index 0000000..533595a --- /dev/null +++ b/t/recipes/checks/debian/watch/legacy-scripts/build-spec/orig/tkfoo @@ -0,0 +1,31 @@ +#!/bin/sh +# +# Insane amount of empty lines and comments + +# +# +# +# + +# +# + +# +# +# + +# +# + +# +# This line makes the next one a comment in Tcl \ +exec wish "$0" -- ${1+"$@"} + +# lintian should not check the following for syntax +# if it detects the line above correctly +# Code snippet taken from eTkTab + +if { [array names prefs keybindings] != "" } { + # Read in the file + array set unparsed_bindings [ read_settings_file $prefs(keybindings)] +} diff --git a/t/recipes/checks/debian/watch/legacy-scripts/build-spec/orig/wishfoo b/t/recipes/checks/debian/watch/legacy-scripts/build-spec/orig/wishfoo new file mode 100644 index 0000000..035c9ad --- /dev/null +++ b/t/recipes/checks/debian/watch/legacy-scripts/build-spec/orig/wishfoo @@ -0,0 +1,4 @@ +#!/usr/bin/wish +# +# This is not actually a wish script, here to force a test of wish +# dependencies. diff --git a/t/recipes/checks/debian/watch/legacy-scripts/build-spec/orig/xsession-test b/t/recipes/checks/debian/watch/legacy-scripts/build-spec/orig/xsession-test new file mode 100644 index 0000000..ca49d72 --- /dev/null +++ b/t/recipes/checks/debian/watch/legacy-scripts/build-spec/orig/xsession-test @@ -0,0 +1,3 @@ +#!/bin/sh + +echo "Foo." diff --git a/t/recipes/checks/debian/watch/legacy-scripts/build-spec/pre-build b/t/recipes/checks/debian/watch/legacy-scripts/build-spec/pre-build new file mode 100755 index 0000000..b5649a8 --- /dev/null +++ b/t/recipes/checks/debian/watch/legacy-scripts/build-spec/pre-build @@ -0,0 +1,5 @@ +#!/bin/sh + +DIR="$1" + +rm -f "$DIR/debian/compat" diff --git a/t/recipes/checks/debian/watch/legacy-scripts/eval/desc b/t/recipes/checks/debian/watch/legacy-scripts/eval/desc new file mode 100644 index 0000000..dc395d0 --- /dev/null +++ b/t/recipes/checks/debian/watch/legacy-scripts/eval/desc @@ -0,0 +1,2 @@ +Testname: legacy-scripts +Check: debian/watch diff --git a/t/recipes/checks/debian/watch/legacy-scripts/eval/hints b/t/recipes/checks/debian/watch/legacy-scripts/eval/hints new file mode 100644 index 0000000..eb22aa3 --- /dev/null +++ b/t/recipes/checks/debian/watch/legacy-scripts/eval/hints @@ -0,0 +1,7 @@ +scripts (source): debian-watch-uses-insecure-uri http://qa.debian.org/watch/sf.php?project=foo [debian/watch:5] +scripts (source): debian-watch-uses-insecure-uri http://ftp.sf.net/foo/foo_bar(.+)\.Z [debian/watch:8] +scripts (source): debian-watch-mangles-debian-version-improperly opts="uversionmangle=s/$/ds/" http://qa.debian.org/watch/sf.php?project=foo scripts\.([\d.]+)\.tar\.gz debian uupdate [debian/watch:5] +scripts (source): debian-watch-lacks-sourceforge-redirector http://ftp.sf.net/foo/foo_bar(.+)\.Z 5 uupdate [debian/watch:8] +scripts (source): debian-watch-file-uses-deprecated-sf-redirector-method http://qa.debian.org/watch/sf.php?project=foo scripts\.([\d.]+)\.tar\.gz debian uupdate [debian/watch:5] +scripts (source): debian-watch-file-specifies-old-upstream-version 5 [debian/watch] +scripts (source): debian-watch-does-not-check-openpgp-signature [debian/watch] diff --git a/t/recipes/checks/debian/watch/legacy-scripts/eval/post-test b/t/recipes/checks/debian/watch/legacy-scripts/eval/post-test new file mode 100644 index 0000000..faeef0b --- /dev/null +++ b/t/recipes/checks/debian/watch/legacy-scripts/eval/post-test @@ -0,0 +1 @@ +s/\(current is ([0-9]+\.)+[0-9]\)/(current is CURRENT)/ diff --git a/t/recipes/checks/debian/watch/repack-indicator-in-debian-revision/build-spec/debian/watch b/t/recipes/checks/debian/watch/repack-indicator-in-debian-revision/build-spec/debian/watch new file mode 100644 index 0000000..6cc9db4 --- /dev/null +++ b/t/recipes/checks/debian/watch/repack-indicator-in-debian-revision/build-spec/debian/watch @@ -0,0 +1,11 @@ +# watch file with no version mangling, even though there's a dfsg in the +# package version number. + +version=2 +https://www.example.com/dist/ dh7-test\.([\d.]+)\.tar\.gz debian uupdate + +# version mangling is not needed in this case: +https://www.example.com/dist/ dh7-test\.([\d.]+)\.tar\.gz 0.24 uupdate + +# version mangling *is* needed in this case: +https://www.example.com/dist/ dh7-test\.([\d.]+)\.tar\.gz diff --git a/t/recipes/checks/debian/watch/repack-indicator-in-debian-revision/build-spec/fill-values b/t/recipes/checks/debian/watch/repack-indicator-in-debian-revision/build-spec/fill-values new file mode 100644 index 0000000..a804d99 --- /dev/null +++ b/t/recipes/checks/debian/watch/repack-indicator-in-debian-revision/build-spec/fill-values @@ -0,0 +1,4 @@ +Testname: repack-indicator-in-debian-revision +Skeleton: upload-non-native +Version: 1-debian1 +Description: Avoid false positives in Devuan (#931846) diff --git a/t/recipes/checks/debian/watch/repack-indicator-in-debian-revision/eval/desc b/t/recipes/checks/debian/watch/repack-indicator-in-debian-revision/eval/desc new file mode 100644 index 0000000..cff1b33 --- /dev/null +++ b/t/recipes/checks/debian/watch/repack-indicator-in-debian-revision/eval/desc @@ -0,0 +1,2 @@ +Testname: repack-indicator-in-debian-revision +Check: debian/watch diff --git a/t/recipes/checks/debian/watch/repack-indicator-in-debian-revision/eval/hints b/t/recipes/checks/debian/watch/repack-indicator-in-debian-revision/eval/hints new file mode 100644 index 0000000..e758710 --- /dev/null +++ b/t/recipes/checks/debian/watch/repack-indicator-in-debian-revision/eval/hints @@ -0,0 +1 @@ +repack-indicator-in-debian-revision (source): debian-watch-does-not-check-openpgp-signature [debian/watch] diff --git a/t/recipes/checks/debian/watch/standard/comments-only/build-spec/debian/watch b/t/recipes/checks/debian/watch/standard/comments-only/build-spec/debian/watch new file mode 100644 index 0000000..b0c64af --- /dev/null +++ b/t/recipes/checks/debian/watch/standard/comments-only/build-spec/debian/watch @@ -0,0 +1,2 @@ +# explanation for why this file is empty +# presumably similar to the file that gave rise to Bug#965385 diff --git a/t/recipes/checks/debian/watch/standard/comments-only/build-spec/fill-values b/t/recipes/checks/debian/watch/standard/comments-only/build-spec/fill-values new file mode 100644 index 0000000..f599495 --- /dev/null +++ b/t/recipes/checks/debian/watch/standard/comments-only/build-spec/fill-values @@ -0,0 +1,3 @@ +Testname: comments-only +Skeleton: source-non-native +Description: Only comments in watch file (false positive) diff --git a/t/recipes/checks/debian/watch/standard/comments-only/eval/desc b/t/recipes/checks/debian/watch/standard/comments-only/eval/desc new file mode 100644 index 0000000..7edcb5e --- /dev/null +++ b/t/recipes/checks/debian/watch/standard/comments-only/eval/desc @@ -0,0 +1,7 @@ +Testname: comments-only +Check: debian/watch/standard +Test-Against: + missing-debian-watch-file-standard +See-Also: + Bug#965385, + Bug#992569 diff --git a/t/recipes/checks/debian/watch/standard/comments-only/eval/hints b/t/recipes/checks/debian/watch/standard/comments-only/eval/hints new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/t/recipes/checks/debian/watch/standard/comments-only/eval/hints @@ -0,0 +1 @@ + diff --git a/t/recipes/checks/debian/watch/standard/legacy-foo++/build-spec/debian/README.Debian b/t/recipes/checks/debian/watch/standard/legacy-foo++/build-spec/debian/README.Debian new file mode 100644 index 0000000..87bfcdf --- /dev/null +++ b/t/recipes/checks/debian/watch/standard/legacy-foo++/build-spec/debian/README.Debian @@ -0,0 +1,7 @@ +foo++ for Debian +---------------- + +This should trigger a warning, as i use a fake mail address. + + -- Marc 'HE' Brockschmidt , Wed, 14 Apr 2004 01:44:18 +0200 + diff --git a/t/recipes/checks/debian/watch/standard/legacy-foo++/build-spec/debian/changelog.in b/t/recipes/checks/debian/watch/standard/legacy-foo++/build-spec/debian/changelog.in new file mode 100644 index 0000000..f838939 --- /dev/null +++ b/t/recipes/checks/debian/watch/standard/legacy-foo++/build-spec/debian/changelog.in @@ -0,0 +1,31 @@ +foo++ ([% $version %]) [% $distribution %]; urgency=low + + * Add a fake README.Debian to trigger a warning. + * This should trigger + debian-changelog-file-contains-debmake-default-email-address. + + -- Marc 'HE' Brockschmidt Wed, 14 Apr 2003 01:35:47 +0200 + +foo++ (4) unstable; urgency=low + + * This changelog now includes a ISO-8859-1 character: '' + + -- Frank Lichtenheld Fri, 5 Mar 2004 13:41:39 +0100 + +foo++ (3) unstable; urgency=low + + * Set maintainers + uploaders incorrectly + + -- Jeroen van Wolffelaar Fri, 5 Mar 2004 04:20:24 +0100 + +foo++ (2) unstable; urgency=low + + * Added a foo++-helper package to try and catch even more ++ bugs. + + -- Sean 'Shaleh' Perry Sat, 10 Feb 2001 23:16:17 -0800 + +foo++ (1) unstable; urgency=low + + * Initial version + + -- Sean 'Shaleh' Perry Thu, 16 Nov 2000 09:11:40 -0800 diff --git a/t/recipes/checks/debian/watch/standard/legacy-foo++/build-spec/debian/control b/t/recipes/checks/debian/watch/standard/legacy-foo++/build-spec/debian/control new file mode 100644 index 0000000..57a489c --- /dev/null +++ b/t/recipes/checks/debian/watch/standard/legacy-foo++/build-spec/debian/control @@ -0,0 +1,30 @@ +Source: foo++ +Section: misc +Priority: optional +Maintainer: Lintian Maintainer +Uploaders: Marc 'HE' Brockschmidt , Jeroen van Wolffelaar, + Frank , Yama@gotchi, Josip, + I am afraid of spam and think this helps +Standards-Version: 3.1.1 +XS-Dm-Upload-Allowed: no + +Package: foo++ +Architecture: all +Build-Depends: test +Depends: test, libssl0.9.7 +Description: see how lintian reacts to plus signs in the package name + Regression test to see if lintian tests work on a package with plus signs in + its name. + . + This description uses only UTF-8 high bytes chars. + +Package: foo++-helper +Architecture: all +Depends: test, foo++ +Description: see how lintian reacts to plus signs in the package name + Regression test to see if lintian tests work on a package with plus signs in + its name. This has /usr/share/doc links to foo++ to trigger even more checks. + . + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. diff --git a/t/recipes/checks/debian/watch/standard/legacy-foo++/build-spec/debian/copyright b/t/recipes/checks/debian/watch/standard/legacy-foo++/build-spec/debian/copyright new file mode 100644 index 0000000..e2d6d93 --- /dev/null +++ b/t/recipes/checks/debian/watch/standard/legacy-foo++/build-spec/debian/copyright @@ -0,0 +1,7 @@ +A reference to /usr/share/common-licenses/GPL to make it look like this +package is under the GPL and trigger the OpenSSL warning. + +However, there is also a reference to /usr/share/common-licenses/LGPL, so +who knows what bits actually depend on libssl. + +Copr. 2007 Somebody. diff --git a/t/recipes/checks/debian/watch/standard/legacy-foo++/build-spec/debian/rules b/t/recipes/checks/debian/watch/standard/legacy-foo++/build-spec/debian/rules new file mode 100755 index 0000000..63bb4db --- /dev/null +++ b/t/recipes/checks/debian/watch/standard/legacy-foo++/build-spec/debian/rules @@ -0,0 +1,36 @@ +#!/usr/bin/make -f + +foo=foo++ +helper=foo++-helper + +build-arch: + +build-indep: + +build: build-arch build-indep + +binary-arch: + +binary-indep: + install -d debian/$(foo)/DEBIAN + install -d debian/$(foo)/usr/share/doc/$(foo) + install -m 644 debian/changelog \ + debian/$(foo)/usr/share/doc/$(foo)/changelog + gzip -n -9 debian/$(foo)/usr/share/doc/$(foo)/changelog + install -m 644 debian/README.Debian \ + debian/$(foo)/usr/share/doc/$(foo)/README.Debian + gzip -n -9 debian/$(foo)/usr/share/doc/$(foo)/README.Debian + dpkg-gencontrol -isp -p$(foo) -Pdebian/$(foo) + dpkg --build debian/$(foo) .. + + install -d debian/$(helper)/DEBIAN + install -d debian/$(helper)/usr/share/doc/ + ln -sf $(foo) debian/$(helper)/usr/share/doc/$(helper) + dpkg-gencontrol -isp -p$(helper) -Pdebian/$(helper) + dpkg --build debian/$(helper) .. + +binary: binary-arch binary-indep + +clean: + +.PHONY: build-arch build-indep build binary-arch binary-indep binary clean diff --git a/t/recipes/checks/debian/watch/standard/legacy-foo++/build-spec/debian/watch b/t/recipes/checks/debian/watch/standard/legacy-foo++/build-spec/debian/watch new file mode 100644 index 0000000..26f9a3c --- /dev/null +++ b/t/recipes/checks/debian/watch/standard/legacy-foo++/build-spec/debian/watch @@ -0,0 +1,6 @@ +# A comment \ +version=0 + +# uscan does not interpret the backslash above, it is just part of the comment + +http://domain.tld/file-(.*)\.tar\.gz diff --git a/t/recipes/checks/debian/watch/standard/legacy-foo++/build-spec/fill-values b/t/recipes/checks/debian/watch/standard/legacy-foo++/build-spec/fill-values new file mode 100644 index 0000000..86d43bc --- /dev/null +++ b/t/recipes/checks/debian/watch/standard/legacy-foo++/build-spec/fill-values @@ -0,0 +1,5 @@ +Skeleton: upload-native +Testname: legacy-foo++ +Source: foo++ +Version: 5 +Description: Legacy test "foo++" diff --git a/t/recipes/checks/debian/watch/standard/legacy-foo++/eval/desc b/t/recipes/checks/debian/watch/standard/legacy-foo++/eval/desc new file mode 100644 index 0000000..fd35332 --- /dev/null +++ b/t/recipes/checks/debian/watch/standard/legacy-foo++/eval/desc @@ -0,0 +1,2 @@ +Testname: legacy-foo++ +Check: debian/watch/standard diff --git a/t/recipes/checks/debian/watch/standard/legacy-foo++/eval/hints b/t/recipes/checks/debian/watch/standard/legacy-foo++/eval/hints new file mode 100644 index 0000000..6322360 --- /dev/null +++ b/t/recipes/checks/debian/watch/standard/legacy-foo++/eval/hints @@ -0,0 +1 @@ +foo++ (source): unknown-debian-watch-file-standard 0 [debian/watch] diff --git a/t/recipes/checks/debian/watch/standard/legacy-foo++/eval/post-test b/t/recipes/checks/debian/watch/standard/legacy-foo++/eval/post-test new file mode 100644 index 0000000..faeef0b --- /dev/null +++ b/t/recipes/checks/debian/watch/standard/legacy-foo++/eval/post-test @@ -0,0 +1 @@ +s/\(current is ([0-9]+\.)+[0-9]\)/(current is CURRENT)/ diff --git a/t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/debian/changelog.in b/t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/debian/changelog.in new file mode 100644 index 0000000..935c633 --- /dev/null +++ b/t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/debian/changelog.in @@ -0,0 +1,41 @@ +scripts ([% $version %]) [% $distribution %]; urgency=low + + * I'm also not able to write my name. + * Added a script in /etc/Xsession.d + * Bizarre version number courtesy of + https://wiki.ubuntu.com/SecurityUpdateProcedures#Prepare + + -- Mark 'HE' Brokschmitt Thu, 23 Jun 2005 14:32:39 +0200 + +scripts (5-1) unstable; urgency=low + + * I'm making a typo in my own name... And I want lintian to warn me about + it. + + -- Jeroen van Wolffelaar Sun, 18 Apr 2004 02:26:34 +0200 + +scripts (4-1) unstable; urgency=low + + * Add new example to check that not executable files with a shebang line + called *in don't trigger the script-not-executable warning. + + -- Marc 'HE' Brockschmidt Wed, 14 Apr 2004 19:44:04 +0200 + +scripts (3-3) unstable; urgency=low + + * Add suidperlfoo and some code in debian/rules to + check the new suidperl checks + + -- Frank Lichtenheld Wed, 31 Mar 2004 21:06:20 +0000 + +scripts (2-1) unstable; urgency=low + + * Add tkfoo script for tk checkings + + -- Lintian Maintainers Sat, 21 Feb 2004 17:13:36 +0100 + +scripts (1-0) unstable; urgency=low + + * Initial version + + -- Lintian Maintainers Sat, 10 Feb 2001 15:37:31 -0800 diff --git a/t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/debian/control.in b/t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/debian/control.in new file mode 100644 index 0000000..75a521f --- /dev/null +++ b/t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/debian/control.in @@ -0,0 +1,16 @@ +Source: scripts +Section: interpreters +Priority: optional +Maintainer: Lintian Maintainers +Uploaders: Jeroen van Wolfelaar , Marc 'HE' Brockschmidt +Build-Depends-Indep: dpatch +Standards-Version: 3.2.1 + +Package: scripts +Architecture: [% $package_architecture %] +Depends: test, ruby1.8, build-essential, libssl0.9.7, php7.0-cli +Recommends: tk8.4 | wish +Description: test lintian's script file checks + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. diff --git a/t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/debian/copyright b/t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/debian/copyright new file mode 100644 index 0000000..ad8a119 --- /dev/null +++ b/t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/debian/copyright @@ -0,0 +1,5 @@ +This file contains the phrase "under the same terms as Perl itself" to +trigger warnings about not having common-licenses references. + +This file contains the phrase "public domain" which should suppress +warnings about no copyright date. diff --git a/t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/debian/patches/00list b/t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/debian/patches/00list new file mode 100644 index 0000000..3b9d37e --- /dev/null +++ b/t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/debian/patches/00list @@ -0,0 +1,11 @@ +01_not_here_right_now.dpatch + +# some comment +/* some more + elaborate comment + which needs DPATCH_OPTION_CPP=1 + */02_i_dont_have_a_description.patch 03_specified_without_dpatch + +// and again a comment + +04_i_dont_have_a_description_either.patch diff --git a/t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/debian/patches/00list.sparc b/t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/debian/patches/00list.sparc new file mode 100644 index 0000000..8b47ab3 --- /dev/null +++ b/t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/debian/patches/00list.sparc @@ -0,0 +1 @@ +01_some_other_patch_thats_not_in_the_package.dpatch diff --git a/t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/debian/patches/00options b/t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/debian/patches/00options new file mode 100644 index 0000000..57ffeb6 --- /dev/null +++ b/t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/debian/patches/00options @@ -0,0 +1 @@ +DPATCH_OPTION_CPP=1 diff --git a/t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/debian/patches/02_i_dont_have_a_description.patch b/t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/debian/patches/02_i_dont_have_a_description.patch new file mode 100644 index 0000000..9279c1b --- /dev/null +++ b/t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/debian/patches/02_i_dont_have_a_description.patch @@ -0,0 +1,7 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 02_i_dont_have_a_description.patch.dpatch by Marc 'HE' Brockschmidt > +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: No description. + +@DPATCH@ diff --git a/t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/debian/patches/03_specified_without_dpatch.dpatch b/t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/debian/patches/03_specified_without_dpatch.dpatch new file mode 100644 index 0000000..8303ac6 --- /dev/null +++ b/t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/debian/patches/03_specified_without_dpatch.dpatch @@ -0,0 +1,5 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## All lines beginning with `## DP:' are a description of the patch. +## DP: Listed in 00list without .dpatch suffix. + +@DPATCH@ diff --git a/t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/debian/patches/04_i_dont_have_a_description_either.patch b/t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/debian/patches/04_i_dont_have_a_description_either.patch new file mode 100644 index 0000000..b603f16 --- /dev/null +++ b/t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/debian/patches/04_i_dont_have_a_description_either.patch @@ -0,0 +1,7 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 04_i_dont_have_a_description_either.patch by Adam D. Barratt +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: + +@DPATCH@ diff --git a/t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/debian/postinst b/t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/debian/postinst new file mode 100644 index 0000000..7c5baf1 --- /dev/null +++ b/t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/debian/postinst @@ -0,0 +1,14 @@ +#!/bin/sh + +if [ -x "/etc/init.d/lsb-broken" ] ; then + update-rc.d lsb-broken defaults >/dev/null +fi +if [ -x "/etc/init.d/no-lsb" ] ; then + update-rc.d no-lsb defaults >/dev/null +fi +if [ -x "/etc/init.d/skeleton" ] ; then + update-rc.d skeleton defaults >/dev/null +fi +if [ -x "/etc/init.d/lsb-other" ] ; then + update-rc.d lsb-other defaults >/dev/null +fi diff --git a/t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/debian/postrm b/t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/debian/postrm new file mode 100644 index 0000000..8fa75a2 --- /dev/null +++ b/t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/debian/postrm @@ -0,0 +1,9 @@ +#!/bin/sh -e + +if [ "$1" = purge ] ; then + update-rc.d lsb-broken remove >/dev/null + update-rc.d no-lsb remove >/dev/null + update-rc.d skeleton remove >/dev/null + update-rc.d lsb-other remove >/dev/null + update-rc.d lsb-other remove >/dev/null +fi diff --git a/t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/debian/preinst b/t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/debian/preinst new file mode 100644 index 0000000..0799557 --- /dev/null +++ b/t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/debian/preinst @@ -0,0 +1,15 @@ +#!/bin/sh + +set -e +set -x + +# +# Some comments here +# + +# This serves as an example of an "empty" script, so +# please do not add any real code here, thank you :) + +#DEBHELPER# + +exit 0 diff --git a/t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/debian/rules b/t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/debian/rules new file mode 100755 index 0000000..ee3677e --- /dev/null +++ b/t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/debian/rules @@ -0,0 +1,105 @@ +#!/usr/bin/make -f + +tmp=debian/tmp + +build-arch: + echo "Hi, in an arch: all package, I am a bug!" + +build-indep: + +build: build-arch build-indep + +binary-arch: + echo "Hi, in an arch: all package, I am a bug!" + +binary-indep: + install -d $(tmp)/usr/bin/ + install -d $(tmp)/etc/X11/Xsession.d/ + install -d $(tmp)/etc/init.d/ + install -d $(tmp)/etc/csh/login.d/ + install -d $(tmp)/etc/fish.d/ + install -d $(tmp)/usr/share/scripts/ + install -d $(tmp)/usr/share/doc/scripts/ + install -d $(tmp)/usr/lib/cgi-bin + install -d $(tmp)/usr/src/scripts + install -d $(tmp)/DEBIAN + + install -m 755 csh-foo $(tmp)/etc/csh/login.d/ + install -m 755 envfoo $(tmp)/usr/bin/ + install -m 755 fish-foo $(tmp)/etc/fish.d/ + install -m 755 jruby-broken $(tmp)/usr/bin/ + install -m 755 perlfoo $(tmp)/usr/bin/ + install -m 755 rubyfoo $(tmp)/usr/bin/ +# This doesn't use "env" but should also trigger script-in-usr-share-doc + install -m 755 rubyfoo $(tmp)/usr/share/doc/scripts/ + install -m 755 make-foo $(tmp)/usr/bin/ + install -m 755 lefty-foo $(tmp)/usr/bin/ + install -m 4751 perlfoo $(tmp)/usr/bin/suidperlfoo2 + install -m 755 sh-broken $(tmp)/usr/bin/ + install -m 4555 suidperlfoo $(tmp)/usr/bin/ + install -m 755 tkfoo $(tmp)/usr/bin/ + install -m 755 wishfoo $(tmp)/usr/bin/ + install -m 644 xsession-test $(tmp)/etc/X11/Xsession.d/ + +# Permissions here aren't part of what's being tested, but let us exercise +# some other errors. + install -m 755 perl-bizarre-1 $(tmp)/usr/bin/ + install -m 750 perl-bizarre-2 $(tmp)/usr/bin/ + install -m 754 perl-bizarre-3 $(tmp)/usr/bin/ + install -m 705 guile-bizarre $(tmp)/usr/bin/ + +# First one should produce a warning; second one shouldn't. + install -m 755 gccbug.dpatch $(tmp)/usr/share/scripts/ + install -m 755 gccbug.dpatch $(tmp)/usr/src/scripts/ + + install -m 644 init-skeleton $(tmp)/etc/init.d/skeleton + install -m 755 init-no-lsb $(tmp)/etc/init.d/no-lsb + install -m 755 init-lsb-broken $(tmp)/etc/init.d/lsb-broken + install -m 755 init-lsb-other $(tmp)/etc/init.d/lsb-other + + install -m 755 phpfoo $(tmp)/usr/share/scripts/ + sed 's/php$$/php7.0/' phpfoo > $(tmp)/usr/share/scripts/php7.0foo + chmod 755 $(tmp)/usr/share/scripts/php7.0foo + + install -m 755 phpenvfoo $(tmp)/usr/share/scripts/ + sed 's/php$$/php7.0/' phpenvfoo > $(tmp)/usr/share/scripts/php7.0envfoo + chmod 755 $(tmp)/usr/share/scripts/php7.0envfoo + + echo "#!/usr/bin/perl" >> $(tmp)/usr/share/scripts/foobar.in + chmod 644 $(tmp)/usr/share/scripts/foobar.in + + touch $(tmp)/usr/share/scripts/mono.exe + chmod 755 $(tmp)/usr/share/scripts/mono.exe + + echo "#!/bin/sh" > $(tmp)/usr/share/scripts/foo\$$bar + chmod 755 $(tmp)/usr/share/scripts/foo\$$bar + + echo "#!/bin/sh" > $(tmp)/usr/lib/cgi-bin/cgi-script + chmod 755 $(tmp)/usr/lib/cgi-bin/cgi-script + + echo "#!/bin/sh" > $(tmp)/usr/bin/test.sh + chmod 755 $(tmp)/usr/bin/test.sh + + + dh_testroot # dummy to test missing debhelper dependency + + + install -m 644 debian/changelog $(tmp)/usr/share/doc/scripts/changelog.Debian + gzip -n -9 $(tmp)/usr/share/doc/scripts/changelog.Debian + install -m 644 debian/copyright $(tmp)/usr/share/doc/scripts/copyright + + install -m 644 debian/scripts.conffiles $(tmp)/DEBIAN/conffiles + install -m 755 debian/preinst $(tmp)/DEBIAN/preinst + install -m 755 debian/postinst $(tmp)/DEBIAN/postinst + install -m 755 debian/postrm $(tmp)/DEBIAN/postrm + touch $(tmp)/DEBIAN/prerm + chmod 755 $(tmp)/DEBIAN/prerm + dpkg-gencontrol -isp + dpkg --build $(tmp) .. + +binary: binary-arch binary-indep + +clean: + rm -rf debian/files $(tmp) debian/substvars + +.PHONY: build-arch build-indep build binary-arch binary-indep binary clean diff --git a/t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/debian/scripts.conffiles b/t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/debian/scripts.conffiles new file mode 100644 index 0000000..01a371a --- /dev/null +++ b/t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/debian/scripts.conffiles @@ -0,0 +1,6 @@ +/etc/init.d/lsb-broken +/etc/init.d/lsb-other +/etc/init.d/no-lsb +/etc/X11/Xsession.d/xsession-test +/etc/csh/login.d/csh-foo +/etc/fish.d/fish-foo diff --git a/t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/debian/watch b/t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/debian/watch new file mode 100644 index 0000000..dba5815 --- /dev/null +++ b/t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/debian/watch @@ -0,0 +1,8 @@ +# watch file with upstream version mangling + +version=2 +opts="uversionmangle=s/$/ds/" \ +http://qa.debian.org/watch/sf.php?project=foo scripts\.([\d.]+)\.tar\.gz debian uupdate + +version=3 +http://ftp.sf.net/foo/foo_bar(.+)\.Z 5 uupdate \ No newline at end of file diff --git a/t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/fill-values b/t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/fill-values new file mode 100644 index 0000000..8a68457 --- /dev/null +++ b/t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/fill-values @@ -0,0 +1,6 @@ +Testname: legacy-scripts +Source: scripts +Version: 6ds-1ubuntu0.5.10.1 +Package-Architecture: all +Skeleton: upload-non-native +Description: Legacy test "scripts" diff --git a/t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/orig/csh-foo b/t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/orig/csh-foo new file mode 100644 index 0000000..eaf47a1 --- /dev/null +++ b/t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/orig/csh-foo @@ -0,0 +1,2 @@ +#! /bin/csh + diff --git a/t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/orig/envfoo b/t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/orig/envfoo new file mode 100755 index 0000000..e005037 --- /dev/null +++ b/t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/orig/envfoo @@ -0,0 +1,4 @@ +#! /bin/env python + +if __name__ == '__main__': + print 'Hi there' diff --git a/t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/orig/fish-foo b/t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/orig/fish-foo new file mode 100644 index 0000000..7f59139 --- /dev/null +++ b/t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/orig/fish-foo @@ -0,0 +1,2 @@ +#! /usr/bin/fish + diff --git a/t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/orig/gccbug.dpatch b/t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/orig/gccbug.dpatch new file mode 100755 index 0000000..65cbf37 --- /dev/null +++ b/t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/orig/gccbug.dpatch @@ -0,0 +1,39 @@ +#! /bin/sh -e + +# DP: Use sensible-editor instead of vi as fallback editor + +# Taken from gcc-4.1-source. Chokes bash -n (due to the patch) despite being +# a valid dpatch, so don't warn about it if it's in /usr/src. + +dir= +if [ $# -eq 3 -a "$2" = '-d' ]; then + pdir="-d $3" + dir="$3/" +elif [ $# -ne 1 ]; then + echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" + exit 1 +fi +case "$1" in + -patch) + patch $pdir -f --no-backup-if-mismatch -p0 < $0 + ;; + -unpatch) + patch $pdir -f --no-backup-if-mismatch -R -p0 < $0 + ;; + *) + echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" + exit 1 +esac +exit 0 + +--- gcc/gccbug.in~ 2003-03-01 00:51:42.000000000 +0100 ++++ gcc/gccbug.in 2003-03-02 12:08:36.000000000 +0100 +@@ -134,7 +134,7 @@ + # If they don't have a preferred editor set, then use + if [ -z "$VISUAL" ]; then + if [ -z "$EDITOR" ]; then +- EDIT=vi ++ EDIT=/usr/bin/sensible-editor + else + EDIT="$EDITOR" + fi diff --git a/t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/orig/guile-bizarre b/t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/orig/guile-bizarre new file mode 100644 index 0000000..70e2c74 --- /dev/null +++ b/t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/orig/guile-bizarre @@ -0,0 +1,6 @@ +#! /bin/sh +# -*- scheme -*- +exec guile -s $0 $* +# Seen in the wild as build-guile-gtk in libguilegtk-1.2-dev (0.31-5.1) +# Tests script_is_evil_and_wrong +!# diff --git a/t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/orig/init-lsb-broken b/t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/orig/init-lsb-broken new file mode 100644 index 0000000..e4dfa92 --- /dev/null +++ b/t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/orig/init-lsb-broken @@ -0,0 +1,34 @@ +#! /bin/sh +### BEGIN INIT INFO +# Provides: bad-lsb +# Required-Start: $local_fs $remote_fs +# Required-Stop: +# Default-Start: 1 2 3 4 5 +# Default-Stop: S 0 1 6 X +# Short-Description: Example Lintian initscript +# but this can't be continued +# Description: An example of a bad LSB section in an init script. +# This continuation is allowed (with spaces). +# This one is too (with tabs). +# X-Debian-Foo: Some unknown but valid keyword. +# Foo: Some invalid keyword. + +# Whoops, no terminating line. + +# And then we have this duplicate section. +### BEGIN INIT INFO +# Required-Start: This one doesn't count. +### END INIT INFO + +# Hey, look at all of those missing actions! But stop isn't missing. +case "$1" in + start|stop) + echo "Blah" + ;; + *) + echo "Usage: foo start" >&2 + exit 3 + ;; +esac + +: diff --git a/t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/orig/init-lsb-other b/t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/orig/init-lsb-other new file mode 100644 index 0000000..adb4795 --- /dev/null +++ b/t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/orig/init-lsb-other @@ -0,0 +1,22 @@ +#! /bin/sh +### BEGIN INIT INFO +# Provides: lsb-other +# Required-Start: $local_fs $remote_fs +# Required-Stop: $local_fs $remote_fs +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +# Description: This is another LSB script test, which has a missing +# Short-Description. +### END INIT INFO + +case "$1" in + start|stop|restart|reload|force-reload) + echo "Blah" + ;; + *) + echo "Usage: foo start" >&2 + exit 3 + ;; +esac + +: diff --git a/t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/orig/init-no-lsb b/t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/orig/init-no-lsb new file mode 100644 index 0000000..6b994dd --- /dev/null +++ b/t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/orig/init-no-lsb @@ -0,0 +1,17 @@ +#! /bin/sh +# No LSB section, but otherwise okay. (Well, the messages are bad, but we +# don't check that yet.) + +case "$1" in + start) + echo "Blah starting" + ;; + stop) + echo "Blah stopping" + ;; + restart|force-reload) + echo "Blah restarting" + ;; +esac + +: diff --git a/t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/orig/init-skeleton b/t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/orig/init-skeleton new file mode 100644 index 0000000..c868508 --- /dev/null +++ b/t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/orig/init-skeleton @@ -0,0 +1,150 @@ +#! /bin/sh +### BEGIN INIT INFO +# Provides: skeleton +# Required-Start: $local_fs $remote_fs +# Required-Stop: $local_fs $remote_fs +# Default-Start: 2 3 4 5 +# Default-Stop: S 0 1 6 +# Short-Description: Example Lintian initscript +# Description: This file should be used to construct scripts to be +# placed in /etc/init.d. +### END INIT INFO + +# Do NOT "set -e" + +# PATH should only include /usr/* if it runs after the mountnfs.sh script +PATH=/usr/sbin:/usr/bin:/sbin:/bin +DESC="Description of the service" +NAME=daemonexecutablename +DAEMON=/usr/sbin/$NAME +DAEMON_ARGS="--options args" +PIDFILE=/var/run/$NAME.pid +SCRIPTNAME=/etc/init.d/$NAME + +# Exit if the package is not installed +[ -x "$DAEMON" ] || exit 0 + +# Read configuration variable file if it is present +[ -r /etc/default/$NAME ] && . /etc/default/$NAME + +# Load the VERBOSE setting and other rcS variables +[ -f /etc/default/rcS ] && . /etc/default/rcS + +# Define LSB log_* functions. +# Depend on lsb-base (>= 3.0-6) to ensure that this file is present. +. /lib/lsb/init-functions + +# +# Function that starts the daemon/service +# +do_start() +{ + # Return + # 0 if daemon has been started + # 1 if daemon was already running + # 2 if daemon could not be started + start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON --test > /dev/null \ + || return 1 + start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON -- \ + $DAEMON_ARGS \ + || return 2 + # Add code here, if necessary, that waits for the process to be ready + # to handle requests from services started subsequently which depend + # on this one. As a last resort, sleep for some time. +} + +# +# Function that stops the daemon/service +# +do_stop() +{ + # Return + # 0 if daemon has been stopped + # 1 if daemon was already stopped + # 2 if daemon could not be stopped + # other if a failure occurred + start-stop-daemon --stop --quiet --retry=TERM/30/KILL/5 --pidfile $PIDFILE --name $NAME + RETVAL="$?" + [ "$RETVAL" = 2 ] && return 2 + # Wait for children to finish too if this is a daemon that forks + # and if the daemon is only ever run from this initscript. + # If the above conditions are not satisfied then add some other code + # that waits for the process to drop all resources that could be + # needed by services started subsequently. A last resort is to + # sleep for some time. + start-stop-daemon --stop --quiet --oknodo --retry=0/30/KILL/5 --exec $DAEMON + [ "$?" = 2 ] && return 2 + # Many daemons don't delete their pidfiles when they exit. + rm -f $PIDFILE + return "$RETVAL" +} + +# +# Function that sends a SIGHUP to the daemon/service +# +do_reload() { + # + # If the daemon can reload its configuration without + # restarting (for example, when it is sent a SIGHUP), + # then implement that here. + # + start-stop-daemon --stop --signal 1 --quiet --pidfile $PIDFILE --name $NAME + return 0 +} + +case "$1" in + start) + [ "$VERBOSE" != no ] && log_daemon_msg "Starting $DESC" "$NAME" + do_start + case "$?" in + 0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;; + 2) [ "$VERBOSE" != no ] && log_end_msg 1 ;; + esac + ;; + stop) + [ "$VERBOSE" != no ] && log_daemon_msg "Stopping $DESC" "$NAME" + do_stop + case "$?" in + 0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;; + 2) [ "$VERBOSE" != no ] && log_end_msg 1 ;; + esac + ;; + #reload|force-reload) + # + # If do_reload() is not implemented then leave this commented out + # and leave 'force-reload' as an alias for 'restart'. + # + #log_daemon_msg "Reloading $DESC" "$NAME" + #do_reload + #log_end_msg $? + #;; + restart|force-reload) + # + # If the "reload" option is implemented then remove the + # 'force-reload' alias + # + log_daemon_msg "Restarting $DESC" "$NAME" + do_stop + case "$?" in + 0|1) + do_start + case "$?" in + 0) log_end_msg 0 ;; + 1) log_end_msg 1 ;; # Old process is still running + *) log_end_msg 1 ;; # Failed to start + esac + ;; + *) + # Failed to stop + log_end_msg 1 + ;; + esac + ;; + *) + #echo "Usage: $SCRIPTNAME {start|stop|restart|reload|force-reload}" >&2 + echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload}" >&2 + exit 3 + ;; +esac + +: diff --git a/t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/orig/jruby-broken b/t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/orig/jruby-broken new file mode 100644 index 0000000..56f574d --- /dev/null +++ b/t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/orig/jruby-broken @@ -0,0 +1,2 @@ +#!/usr/bin/jruby +# There's no non-versioned jruby, so this should be an error. diff --git a/t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/orig/lefty-foo b/t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/orig/lefty-foo new file mode 100644 index 0000000..52c003e --- /dev/null +++ b/t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/orig/lefty-foo @@ -0,0 +1,2 @@ +#!/usr/local/bin/lefty + diff --git a/t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/orig/make-foo b/t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/orig/make-foo new file mode 100644 index 0000000..6b787b5 --- /dev/null +++ b/t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/orig/make-foo @@ -0,0 +1,3 @@ +#!/usr/bin/make + + diff --git a/t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/orig/perl-bizarre-1 b/t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/orig/perl-bizarre-1 new file mode 100644 index 0000000..fc632c8 --- /dev/null +++ b/t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/orig/perl-bizarre-1 @@ -0,0 +1,11 @@ +#! /bin/sh +eval '(exit $?0)' && eval 'PERL_BADLANG=x;export PERL_BADLANG;: \ +;exec perl -x -S -- "$0" ${1+"$@"};#'if 0; +eval 'setenv PERL_BADLANG x;exec perl -x -S -- "$0" $argv:q;#'.q+ +#!perl -w +package Htex::a2ping; $0=~/(.*)/s;unshift@INC,'.';do($1);die$@if$@;__END__+if !1; +# This Perl script was generated by JustLib2 at Wed Apr 23 09:14:13 2003. +# Don't touch/remove any lines above; http://www.inf.bme.hu/~pts/justlib + +# The above was actually seen in the wild and stresses the +# script_is_evil_and_wrong test. diff --git a/t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/orig/perl-bizarre-2 b/t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/orig/perl-bizarre-2 new file mode 100644 index 0000000..afd9cfe --- /dev/null +++ b/t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/orig/perl-bizarre-2 @@ -0,0 +1,7 @@ +#!/bin/sh +eval 'exec /usr/bin/perl -wS $0 ${1+"$@"}' + if $running_under_some_shell; + +# I'm someone following perlrun except without using the Perl #! line. +# Now something to choke bash. +while (<>) { if (/%#/) { print } } diff --git a/t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/orig/perl-bizarre-3 b/t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/orig/perl-bizarre-3 new file mode 100644 index 0000000..44baf75 --- /dev/null +++ b/t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/orig/perl-bizarre-3 @@ -0,0 +1,6 @@ +eval '(exit $?0)' && eval 'exec perl -wS $0 ${1+"$@"}' +& eval 'exec /usr/bin/perl -wS $0 $argv:q' + if $running_under_some_shell; + +# More utterly bizarreness from perlrun. This one even doesn't work if +# there's a valid #! line on the first line. I don't understand why.... diff --git a/t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/orig/perlfoo b/t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/orig/perlfoo new file mode 100644 index 0000000..5b27ed0 --- /dev/null +++ b/t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/orig/perlfoo @@ -0,0 +1,3 @@ +#! /usr/bin/perl + +print "Hello, World!"; diff --git a/t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/orig/phpenvfoo b/t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/orig/phpenvfoo new file mode 100644 index 0000000..cbbfb2e --- /dev/null +++ b/t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/orig/phpenvfoo @@ -0,0 +1,7 @@ +#!/usr/bin/env php + + +Dumb PHP script + + + diff --git a/t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/orig/phpfoo b/t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/orig/phpfoo new file mode 100644 index 0000000..e0595e6 --- /dev/null +++ b/t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/orig/phpfoo @@ -0,0 +1,7 @@ +#!/usr/bin/php + + +Dumb PHP script + + + diff --git a/t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/orig/rubyfoo b/t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/orig/rubyfoo new file mode 100644 index 0000000..8024605 --- /dev/null +++ b/t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/orig/rubyfoo @@ -0,0 +1,4 @@ +#!/bin/ruby1.8 + +# Ok, that example is really pathetic, but until we have +# some better code in checks/scripts, it will do diff --git a/t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/orig/sh-broken b/t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/orig/sh-broken new file mode 100644 index 0000000..7b79074 --- /dev/null +++ b/t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/orig/sh-broken @@ -0,0 +1,2 @@ +#!/bin/sh +if fi diff --git a/t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/orig/suidperlfoo b/t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/orig/suidperlfoo new file mode 100644 index 0000000..bcbc471 --- /dev/null +++ b/t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/orig/suidperlfoo @@ -0,0 +1,3 @@ +#! /usr/bin/suidperl + +print "Hello, World!"; diff --git a/t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/orig/tkfoo b/t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/orig/tkfoo new file mode 100755 index 0000000..533595a --- /dev/null +++ b/t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/orig/tkfoo @@ -0,0 +1,31 @@ +#!/bin/sh +# +# Insane amount of empty lines and comments + +# +# +# +# + +# +# + +# +# +# + +# +# + +# +# This line makes the next one a comment in Tcl \ +exec wish "$0" -- ${1+"$@"} + +# lintian should not check the following for syntax +# if it detects the line above correctly +# Code snippet taken from eTkTab + +if { [array names prefs keybindings] != "" } { + # Read in the file + array set unparsed_bindings [ read_settings_file $prefs(keybindings)] +} diff --git a/t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/orig/wishfoo b/t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/orig/wishfoo new file mode 100644 index 0000000..035c9ad --- /dev/null +++ b/t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/orig/wishfoo @@ -0,0 +1,4 @@ +#!/usr/bin/wish +# +# This is not actually a wish script, here to force a test of wish +# dependencies. diff --git a/t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/orig/xsession-test b/t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/orig/xsession-test new file mode 100644 index 0000000..ca49d72 --- /dev/null +++ b/t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/orig/xsession-test @@ -0,0 +1,3 @@ +#!/bin/sh + +echo "Foo." diff --git a/t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/pre-build b/t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/pre-build new file mode 100755 index 0000000..b5649a8 --- /dev/null +++ b/t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/pre-build @@ -0,0 +1,5 @@ +#!/bin/sh + +DIR="$1" + +rm -f "$DIR/debian/compat" diff --git a/t/recipes/checks/debian/watch/standard/legacy-scripts/eval/desc b/t/recipes/checks/debian/watch/standard/legacy-scripts/eval/desc new file mode 100644 index 0000000..b13e704 --- /dev/null +++ b/t/recipes/checks/debian/watch/standard/legacy-scripts/eval/desc @@ -0,0 +1,2 @@ +Testname: legacy-scripts +Check: debian/watch/standard diff --git a/t/recipes/checks/debian/watch/standard/legacy-scripts/eval/hints b/t/recipes/checks/debian/watch/standard/legacy-scripts/eval/hints new file mode 100644 index 0000000..8c75be5 --- /dev/null +++ b/t/recipes/checks/debian/watch/standard/legacy-scripts/eval/hints @@ -0,0 +1,3 @@ +scripts (source): older-debian-watch-file-standard 3 [debian/watch] +scripts (source): multiple-debian-watch-file-standards 2 3 [debian/watch] +scripts (source): debian-watch-file-standard 3 [debian/watch] diff --git a/t/recipes/checks/debian/watch/standard/legacy-scripts/eval/post-test b/t/recipes/checks/debian/watch/standard/legacy-scripts/eval/post-test new file mode 100644 index 0000000..faeef0b --- /dev/null +++ b/t/recipes/checks/debian/watch/standard/legacy-scripts/eval/post-test @@ -0,0 +1 @@ +s/\(current is ([0-9]+\.)+[0-9]\)/(current is CURRENT)/ diff --git a/t/recipes/checks/debian/watch/standard/no-version/build-spec/debian/watch b/t/recipes/checks/debian/watch/standard/no-version/build-spec/debian/watch new file mode 100644 index 0000000..4d3b502 --- /dev/null +++ b/t/recipes/checks/debian/watch/standard/no-version/build-spec/debian/watch @@ -0,0 +1 @@ +http://www.example.com/dist/ dh7-test\.([\d.]+)\.tar\.gz debian uupdate diff --git a/t/recipes/checks/debian/watch/standard/no-version/build-spec/fill-values b/t/recipes/checks/debian/watch/standard/no-version/build-spec/fill-values new file mode 100644 index 0000000..41649e0 --- /dev/null +++ b/t/recipes/checks/debian/watch/standard/no-version/build-spec/fill-values @@ -0,0 +1,3 @@ +Testname: no-version +Skeleton: upload-non-native +Description: Watch file with no version diff --git a/t/recipes/checks/debian/watch/standard/no-version/eval/desc b/t/recipes/checks/debian/watch/standard/no-version/eval/desc new file mode 100644 index 0000000..c16a93c --- /dev/null +++ b/t/recipes/checks/debian/watch/standard/no-version/eval/desc @@ -0,0 +1,2 @@ +Testname: no-version +Check: debian/watch/standard diff --git a/t/recipes/checks/debian/watch/standard/no-version/eval/hints b/t/recipes/checks/debian/watch/standard/no-version/eval/hints new file mode 100644 index 0000000..b3051e0 --- /dev/null +++ b/t/recipes/checks/debian/watch/standard/no-version/eval/hints @@ -0,0 +1 @@ +no-version (source): missing-debian-watch-file-standard [debian/watch] diff --git a/t/recipes/checks/debian/watch/standard/version-1/build-spec/debian/watch b/t/recipes/checks/debian/watch/standard/version-1/build-spec/debian/watch new file mode 100644 index 0000000..8cd5a87 --- /dev/null +++ b/t/recipes/checks/debian/watch/standard/version-1/build-spec/debian/watch @@ -0,0 +1,2 @@ +version=1 +http://www.example.com/dist/ dh7-test\.([\d.]+)\.tar\.gz debian uupdate diff --git a/t/recipes/checks/debian/watch/standard/version-1/build-spec/fill-values b/t/recipes/checks/debian/watch/standard/version-1/build-spec/fill-values new file mode 100644 index 0000000..1f9c306 --- /dev/null +++ b/t/recipes/checks/debian/watch/standard/version-1/build-spec/fill-values @@ -0,0 +1,3 @@ +Testname: version-1 +Skeleton: upload-non-native +Description: Watch file of version 1 diff --git a/t/recipes/checks/debian/watch/standard/version-1/eval/desc b/t/recipes/checks/debian/watch/standard/version-1/eval/desc new file mode 100644 index 0000000..0304f2e --- /dev/null +++ b/t/recipes/checks/debian/watch/standard/version-1/eval/desc @@ -0,0 +1,2 @@ +Testname: version-1 +Check: debian/watch/standard diff --git a/t/recipes/checks/debian/watch/standard/version-1/eval/hints b/t/recipes/checks/debian/watch/standard/version-1/eval/hints new file mode 100644 index 0000000..6d27d24 --- /dev/null +++ b/t/recipes/checks/debian/watch/standard/version-1/eval/hints @@ -0,0 +1 @@ +version-1 (source): unknown-debian-watch-file-standard 1 [debian/watch] diff --git a/t/recipes/checks/debian/watch/standard/version-2/build-spec/debian/watch b/t/recipes/checks/debian/watch/standard/version-2/build-spec/debian/watch new file mode 100644 index 0000000..a201846 --- /dev/null +++ b/t/recipes/checks/debian/watch/standard/version-2/build-spec/debian/watch @@ -0,0 +1,2 @@ +version=2 +http://www.example.com/dist/ dh7-test\.([\d.]+)\.tar\.gz debian uupdate diff --git a/t/recipes/checks/debian/watch/standard/version-2/build-spec/fill-values b/t/recipes/checks/debian/watch/standard/version-2/build-spec/fill-values new file mode 100644 index 0000000..d00cdfa --- /dev/null +++ b/t/recipes/checks/debian/watch/standard/version-2/build-spec/fill-values @@ -0,0 +1,3 @@ +Testname: version-2 +Skeleton: upload-non-native +Description: Watch file of version 2 diff --git a/t/recipes/checks/debian/watch/standard/version-2/eval/desc b/t/recipes/checks/debian/watch/standard/version-2/eval/desc new file mode 100644 index 0000000..3d5177c --- /dev/null +++ b/t/recipes/checks/debian/watch/standard/version-2/eval/desc @@ -0,0 +1,2 @@ +Testname: version-2 +Check: debian/watch/standard diff --git a/t/recipes/checks/debian/watch/standard/version-2/eval/hints b/t/recipes/checks/debian/watch/standard/version-2/eval/hints new file mode 100644 index 0000000..fd0f141 --- /dev/null +++ b/t/recipes/checks/debian/watch/standard/version-2/eval/hints @@ -0,0 +1,2 @@ +version-2 (source): obsolete-debian-watch-file-standard 2 [debian/watch] +version-2 (source): debian-watch-file-standard 2 [debian/watch] diff --git a/t/recipes/checks/debian/watch/standard/version-3/build-spec/debian/watch b/t/recipes/checks/debian/watch/standard/version-3/build-spec/debian/watch new file mode 100644 index 0000000..5750c6f --- /dev/null +++ b/t/recipes/checks/debian/watch/standard/version-3/build-spec/debian/watch @@ -0,0 +1,2 @@ +version=3 +http://www.example.com/dist/ dh7-test\.([\d.]+)\.tar\.gz debian uupdate diff --git a/t/recipes/checks/debian/watch/standard/version-3/build-spec/fill-values b/t/recipes/checks/debian/watch/standard/version-3/build-spec/fill-values new file mode 100644 index 0000000..ec6b701 --- /dev/null +++ b/t/recipes/checks/debian/watch/standard/version-3/build-spec/fill-values @@ -0,0 +1,3 @@ +Testname: version-3 +Skeleton: upload-non-native +Description: Watch file of version 3 diff --git a/t/recipes/checks/debian/watch/standard/version-3/eval/desc b/t/recipes/checks/debian/watch/standard/version-3/eval/desc new file mode 100644 index 0000000..fbb5105 --- /dev/null +++ b/t/recipes/checks/debian/watch/standard/version-3/eval/desc @@ -0,0 +1,2 @@ +Testname: version-3 +Check: debian/watch/standard diff --git a/t/recipes/checks/debian/watch/standard/version-3/eval/hints b/t/recipes/checks/debian/watch/standard/version-3/eval/hints new file mode 100644 index 0000000..31501a1 --- /dev/null +++ b/t/recipes/checks/debian/watch/standard/version-3/eval/hints @@ -0,0 +1,2 @@ +version-3 (source): older-debian-watch-file-standard 3 [debian/watch] +version-3 (source): debian-watch-file-standard 3 [debian/watch] diff --git a/t/recipes/checks/debian/watch/standard/version-4/build-spec/debian/watch b/t/recipes/checks/debian/watch/standard/version-4/build-spec/debian/watch new file mode 100644 index 0000000..259bb88 --- /dev/null +++ b/t/recipes/checks/debian/watch/standard/version-4/build-spec/debian/watch @@ -0,0 +1,2 @@ +version=4 +http://www.example.com/dist/ dh7-test\.([\d.]+)\.tar\.gz debian uupdate diff --git a/t/recipes/checks/debian/watch/standard/version-4/build-spec/fill-values b/t/recipes/checks/debian/watch/standard/version-4/build-spec/fill-values new file mode 100644 index 0000000..d7fd7de --- /dev/null +++ b/t/recipes/checks/debian/watch/standard/version-4/build-spec/fill-values @@ -0,0 +1,3 @@ +Testname: version-4 +Skeleton: upload-non-native +Description: Watch file of version 4 diff --git a/t/recipes/checks/debian/watch/standard/version-4/eval/desc b/t/recipes/checks/debian/watch/standard/version-4/eval/desc new file mode 100644 index 0000000..4c3c00e --- /dev/null +++ b/t/recipes/checks/debian/watch/standard/version-4/eval/desc @@ -0,0 +1,2 @@ +Testname: version-4 +Check: debian/watch/standard diff --git a/t/recipes/checks/debian/watch/standard/version-4/eval/hints b/t/recipes/checks/debian/watch/standard/version-4/eval/hints new file mode 100644 index 0000000..244ebd0 --- /dev/null +++ b/t/recipes/checks/debian/watch/standard/version-4/eval/hints @@ -0,0 +1 @@ +version-4 (source): debian-watch-file-standard 4 [debian/watch] diff --git a/t/recipes/checks/debian/watch/standard/version-5/build-spec/debian/watch b/t/recipes/checks/debian/watch/standard/version-5/build-spec/debian/watch new file mode 100644 index 0000000..6b8a6f4 --- /dev/null +++ b/t/recipes/checks/debian/watch/standard/version-5/build-spec/debian/watch @@ -0,0 +1,2 @@ +version=5 +http://www.example.com/dist/ dh7-test\.([\d.]+)\.tar\.gz debian uupdate diff --git a/t/recipes/checks/debian/watch/standard/version-5/build-spec/fill-values b/t/recipes/checks/debian/watch/standard/version-5/build-spec/fill-values new file mode 100644 index 0000000..7f069bb --- /dev/null +++ b/t/recipes/checks/debian/watch/standard/version-5/build-spec/fill-values @@ -0,0 +1,3 @@ +Testname: version-5 +Skeleton: upload-non-native +Description: Watch file of version 5 diff --git a/t/recipes/checks/debian/watch/standard/version-5/eval/desc b/t/recipes/checks/debian/watch/standard/version-5/eval/desc new file mode 100644 index 0000000..cd8cc36 --- /dev/null +++ b/t/recipes/checks/debian/watch/standard/version-5/eval/desc @@ -0,0 +1,2 @@ +Testname: version-5 +Check: debian/watch/standard diff --git a/t/recipes/checks/debian/watch/standard/version-5/eval/hints b/t/recipes/checks/debian/watch/standard/version-5/eval/hints new file mode 100644 index 0000000..5ebdc82 --- /dev/null +++ b/t/recipes/checks/debian/watch/standard/version-5/eval/hints @@ -0,0 +1 @@ +version-5 (source): unknown-debian-watch-file-standard 5 [debian/watch] diff --git a/t/recipes/checks/debian/watch/standard/watch-file-general/build-spec/debian/changelog.in b/t/recipes/checks/debian/watch/standard/watch-file-general/build-spec/debian/changelog.in new file mode 100644 index 0000000..2340930 --- /dev/null +++ b/t/recipes/checks/debian/watch/standard/watch-file-general/build-spec/debian/changelog.in @@ -0,0 +1,14 @@ +[% $source %] ([% $version %]) unstable; urgency=low + + * Lintian Test Suite. + * Test: [% $testname %] + + * Suppress "should close ITP bug" messages. (Closes: #123456) + + -- [% $author %] [% $date %] + +[% $source %] (1.0-1) unstable; urgency=low + + * Provoke debian-watch-file-specifies-old-upstream-version. + + -- [% $author %] Thu, 01 Jan 2009 08:34:20 -0800 diff --git a/t/recipes/checks/debian/watch/standard/watch-file-general/build-spec/debian/upstream/signing-key.asc b/t/recipes/checks/debian/watch/standard/watch-file-general/build-spec/debian/upstream/signing-key.asc new file mode 100644 index 0000000..d83f52c --- /dev/null +++ b/t/recipes/checks/debian/watch/standard/watch-file-general/build-spec/debian/upstream/signing-key.asc @@ -0,0 +1,52 @@ +-----BEGIN PGP PUBLIC KEY BLOCK----- + +mQINBFpEMFgBEADNYEVhITIZ/rVECuLWxDJUk4rV+v6IfJCxJzuXRfqbjkdLNsCD +P83FOdvcxNQSrWPdSCgV1tDeDc18pNmfWDnu90zrLRipR1u7ln/ajTpx0RI7tHaO +SCIJfo42iw7firz9IoegqZaH8LKCh63EaXxLD98MgRA9fcBTEaBSD+Wxh8yYL/5b +bjdUu2FNNEi8f0POBAB3XInu80mqkEeVYPijd2T8Tc5xaxD90OBuuNGSiqKrJ+lB +9TSxwr5E/9N+6fnCjrR4FVkZtyTELAdZm4CpQN26tinVolG1gDpMz5B27471oXPY +9K92/UzTRllwuZ09pdBwpd4gu9mTXMLwOJ/S/+LJeSfCmby7QZiM/61NpS5EyaYg +h+m8YyTUtulFqpWd2HxttXz0ii5C01LKUrNPqlQrxmfrACJ1tHvcngVQm4wyqMHq +Uw5LYJ8FM7eS3JPeHpHqFGpY1VKx3nZAZGx+1As1ClvT7Og1KyuVY59w8qNaeJ8C +eA9XrwGVbMm9PiTP+fyBykMaYpf5aGucH+GeBtkvmpyOyXqf7zrOqyRvY0QaMgt1 +n3jXcD7AZKHCp0wY6LYVa/sKqrDJtxoloBA6kV2Ui3kClOWmlfvm+i1Ecg7vCG8d +QrJtZxo1Wu54dIr+g0qMFjlBA69OFYRXPzoaWFW1BKtNAYFoej9vW/f+0wARAQAB +tDtMaW50aWFuIFRlc3QgVXBzdHJlYW0gS2V5IChXb3JraW5nLCBObyBFeHBpcmF0 +aW9uLCBNaW5pbWFsKYkCTgQTAQoAOBYhBPr6VG+KNaSTu27AqFtc4nOV5lb+BQJa +RDBYAhsDBQsJCAcDBRUKCQgLBRYDAgEAAh4BAheAAAoJEFtc4nOV5lb+B3kQAMMm +umaOq12REmLdKWMN7GOsxzV6fTF5xBjTgKfY9DCBeNV7tSuJGpGT9MaxRD5Yu/1p +PDMGC9TkDxOEULBucmp7M//3FCuSnGQFBcObHNXY9FmLQ5MZJ32QUi8KLNIcDjuF +AKMEYJ5AT50pBsGyLVGXL27HWndNV7jMeIX64gIN5chPKMHqCn0g/wTTaPY/kkEs +MYirGmBQ83cIAv/1nywtIPeBnj+02Vu3B1hJIZYgmDQZwjZdd7HTxsVW0LAZEXs5 +gtWArfHO3zNKy6WkVE+xhNgZuVO3EyV46JW0bQ2RC7yY70/qFxX71co6p2+VaZgf +198QtRddq9cKaSe68BnZesIp9YnT3xJVYeL6IrrMYNIZxlslL4/b+gKU3epHyFes +tQP1tqkhnmC+Bxds6kx0ngPVfTfWM4Ruaeot51BuenZu82S1B3FB5B0qruCNyKre +nl53nPaNkOERPOF654AXoIODTgnyaocCaQTPztOYm52X8u9qogf9wf1eEA9EZIBI +WSbn3eCohN6qWvsdC0MMRDu0HB4S1QUyyOceNflXePg6SPvJSPHuOG/5DShcN6ah +mgVMH44ecAWsh/8Uj1+Z39Ea07nfE3lCU/WR+DXJb56WaQChXN7AKITrNRd/Q61X +jqrB6jWRSeVBKDidsFwI7oALdSgONE/ZEy+M4j76uQINBFpEMFgBEADCWJECQ6K1 +HgH7OwX7eY8ggEdCOYI/cTGx9rfzdqx67tc7fsF63BrO+nTHylcwXi9IAs695zvp +miCnCu1EUVjfM+nD52kocVEhzFc/lcCq6d9ac7H9ItJgf3Qc2HpwcqvsNUTWPDMU +VjQ8ciZ57qq601kIjVPuHjKRY96K9iHxUeVGh2n74JLYZL5IKO08WtQgPmPVLFDX +X2iZXnZdW/X4xTYB+/+V/D1LyUIP3X7CzBNzJuYjP3vGDH3h4ulLWnDSmxKs6Aep +a0sKu6+YD14/xXOi+buc0m6ghP7WePl9gYi6XePLdVPeLC9aiDi1tCWEVbbsinhw +ODxLwndXCGUc+AVySdUrUMuRchNRI6Z5PW/a/RsuVmyORg1RSuFGLeJQZj1pAw6x +WjxgioqoqydECIx4gCwGO/0GNZCfe5n11vuMEZ7SKbnrf5d58EQXOgV+yZumRKkz +OmdKICjql6w5CealrvP/si2kfD3oVwqBeuM0aM8HmWTfrdESWrd8xqAxBlcDsIun +mpsJ6obGN2mOaMFmOljukdzDFgMJMIrcS4UcGNzyQWUbz6JOSfPq96RkrTVsXMKy +40Ygtwe63PS9lXGT2ojmiV193UrGJqEUjuAL79KXWkxTRFxvFwck9qK5RAX2F1GQ +4ELDAFSKr8t6IpiYiTXaA3OTJfxJMK191QARAQABiQI2BBgBCgAgFiEE+vpUb4o1 +pJO7bsCoW1zic5XmVv4FAlpEMFgCGwwACgkQW1zic5XmVv4VEA//dOFj60ktKKsl +CgRdtnuo9Sdd7IjShic67qoT0gFZRiMATaryM4ifjAcl03rxzGk5MOsltHFJr5h+ +RmaudKhCyksd1nQ2dBpFgPHyxVTS5/k+wMelP9kPailqiGUA735SP5mO/28YOT8v +Xa4rwnTn6s9Ga7+lMN4I7LKRo47uGG89Og381tHSkW8DjFuLTme3TQDysG2MGlSY +vTPJmF7xPCuG3s8J5RIrVwWbN0orWen9YWT1923+0CAZG8M+7AFxU5xxCFIBRKMw +2tw/ovjtE9czuT743LMPlUJRc1pveYjVhLY9xUMQsPO6j41pdIL2X7txFjQqzjFl +hpIJviupVWlV0vSS0Q7nAtvLTsjhXSyQriKqmfdsdcxXBz7LGRxEi5l/9zuW5GMy +kD5ikQ05li6wkBdQYLS3ZBYkrj94LpNEqNZE3sfX33Yc5cpE2Bc4Ga+MxYxQwrfz +sNNSp8jdf2FyFvlvRkO8UUgsW5PPOuwthb05bx7dQGfKvqySpd0JLrhxw8G8odJh +PGzl0ig4F8xEitMc0lms5yzQGvtpEvSYLUs+4EJaf/XN9nRS+4e+GciTmp9XUM/5 +EtKOKXVuhHyaizqfpF4VR0Tbg65HHE3zLJMr7XTUGC0Zr+bj0n/V177R0XgptY7Y +jr6SfdNikIDjGYa+yuN6KGQsriza1aA= +=CYsi +-----END PGP PUBLIC KEY BLOCK----- diff --git a/t/recipes/checks/debian/watch/standard/watch-file-general/build-spec/debian/watch b/t/recipes/checks/debian/watch/standard/watch-file-general/build-spec/debian/watch new file mode 100644 index 0000000..dc196dd --- /dev/null +++ b/t/recipes/checks/debian/watch/standard/watch-file-general/build-spec/debian/watch @@ -0,0 +1,32 @@ +# watch file with upstream version mangling + +version=2 +opts="uversionmangle=s/$/ds/" \ +http://qa.debian.org/watch/sf.php?project=foo scripts\.([\d.]+)\.tar\.gz debian uupdate + +version=3 +http://ftp.sf.net/foo/foo_bar(.+)\.Z 5 uupdate + +# Test additional Sourceforge patterns. (See Bug#510398) +ftp://upload.sourceforge.net/pub/sourceforge/s/so/soprano/ \ + soprano-(.*)\.tar\.bz2 +http://sourceforge.net/project/showfiles.php?group_id=100501 \ + .*/octaviz/octaviz-([\d\.]+).tar.gz.* +http://sourceforge.net/projects/synce/files http://downloads.sourceforge.net/.+/kcemirror-(.+).tar.gz.* + +# Unknown version number. +version=42 + +# Specifies the same version number as the package. +https://example.com/ foo([\d.]+)\.tar\.gz 2.0.ds1-1 uupdate + +# Deprecated githubredir +http://githubredir.debian.net/github/username/project /(.*).tar.gz + +# without any pgpsigurlmangle + +http://insecure.com /(.*).tar.gz +https://secure.com /(.*).tar.gz + +# False positive for debian-watch-uses-insecure-uri +http://sf.net/uses/redirector-([^-]+)\.tar\.gz diff --git a/t/recipes/checks/debian/watch/standard/watch-file-general/build-spec/fill-values b/t/recipes/checks/debian/watch/standard/watch-file-general/build-spec/fill-values new file mode 100644 index 0000000..185084f --- /dev/null +++ b/t/recipes/checks/debian/watch/standard/watch-file-general/build-spec/fill-values @@ -0,0 +1,4 @@ +Testname: watch-file-general +Skeleton: upload-non-native +Version: 2.0.ds1-1 +Description: General watch file checks diff --git a/t/recipes/checks/debian/watch/standard/watch-file-general/eval/desc b/t/recipes/checks/debian/watch/standard/watch-file-general/eval/desc new file mode 100644 index 0000000..f376aa2 --- /dev/null +++ b/t/recipes/checks/debian/watch/standard/watch-file-general/eval/desc @@ -0,0 +1,3 @@ +Testname: watch-file-general +See-Also: Debian Bug#510398 +Check: debian/watch/standard diff --git a/t/recipes/checks/debian/watch/standard/watch-file-general/eval/hints b/t/recipes/checks/debian/watch/standard/watch-file-general/eval/hints new file mode 100644 index 0000000..75c45f7 --- /dev/null +++ b/t/recipes/checks/debian/watch/standard/watch-file-general/eval/hints @@ -0,0 +1,4 @@ +watch-file-general (source): unknown-debian-watch-file-standard 42 [debian/watch] +watch-file-general (source): older-debian-watch-file-standard 3 [debian/watch] +watch-file-general (source): multiple-debian-watch-file-standards 2 3 42 [debian/watch] +watch-file-general (source): debian-watch-file-standard 3 [debian/watch] diff --git a/t/recipes/checks/debian/watch/two-upstream-components/build-spec/debian/watch b/t/recipes/checks/debian/watch/two-upstream-components/build-spec/debian/watch new file mode 100644 index 0000000..ae00c12 --- /dev/null +++ b/t/recipes/checks/debian/watch/two-upstream-components/build-spec/debian/watch @@ -0,0 +1,6 @@ +version=4 +https://www.kernel.org/pub/linux/utils/raid/mdadm/mdadm-([.[:digit:]]+).tar.gz + +opts="component=x1" https://github.com/a/x1/tags archives/v?([\d\-]+)\.tar\.gz + +opts="component=x2" https://github.com/a/x2 archives/v?([\d\-]+)\.tar\.gz diff --git a/t/recipes/checks/debian/watch/two-upstream-components/build-spec/fill-values b/t/recipes/checks/debian/watch/two-upstream-components/build-spec/fill-values new file mode 100644 index 0000000..b98e8f2 --- /dev/null +++ b/t/recipes/checks/debian/watch/two-upstream-components/build-spec/fill-values @@ -0,0 +1,3 @@ +Testname: two-upstream-components +Skeleton: upload-non-native +Description: Contains a watch file with 2 components diff --git a/t/recipes/checks/debian/watch/two-upstream-components/eval/desc b/t/recipes/checks/debian/watch/two-upstream-components/eval/desc new file mode 100644 index 0000000..37a05ff --- /dev/null +++ b/t/recipes/checks/debian/watch/two-upstream-components/eval/desc @@ -0,0 +1,2 @@ +Testname: two-upstream-components +Check: debian/watch diff --git a/t/recipes/checks/debian/watch/two-upstream-components/eval/hints b/t/recipes/checks/debian/watch/two-upstream-components/eval/hints new file mode 100644 index 0000000..d7b3f59 --- /dev/null +++ b/t/recipes/checks/debian/watch/two-upstream-components/eval/hints @@ -0,0 +1,3 @@ +two-upstream-components (source): debian-watch-upstream-component https://github.com/a/x2 x2 [debian/watch:6] +two-upstream-components (source): debian-watch-upstream-component https://github.com/a/x1/tags x1 [debian/watch:4] +two-upstream-components (source): debian-watch-does-not-check-openpgp-signature [debian/watch] diff --git a/t/recipes/checks/debian/watch/watch-file-bug-765995/build-spec/debian/upstream/signing-key.asc b/t/recipes/checks/debian/watch/watch-file-bug-765995/build-spec/debian/upstream/signing-key.asc new file mode 100644 index 0000000..bd03c4e --- /dev/null +++ b/t/recipes/checks/debian/watch/watch-file-bug-765995/build-spec/debian/upstream/signing-key.asc @@ -0,0 +1 @@ +Too lazy to fake this file diff --git a/t/recipes/checks/debian/watch/watch-file-bug-765995/build-spec/debian/watch b/t/recipes/checks/debian/watch/watch-file-bug-765995/build-spec/debian/watch new file mode 100644 index 0000000..6f30e20 --- /dev/null +++ b/t/recipes/checks/debian/watch/watch-file-bug-765995/build-spec/debian/watch @@ -0,0 +1,4 @@ +version=3 +# Trailing whitespace and missing continuation backslash intentional! +opts=pgpsigurlmangle=s/$/.asc/ +https://www.example.com/Downloads/code-(.+)code\.zip diff --git a/t/recipes/checks/debian/watch/watch-file-bug-765995/build-spec/fill-values b/t/recipes/checks/debian/watch/watch-file-bug-765995/build-spec/fill-values new file mode 100644 index 0000000..b764faa --- /dev/null +++ b/t/recipes/checks/debian/watch/watch-file-bug-765995/build-spec/fill-values @@ -0,0 +1,4 @@ +Testname: watch-file-bug-765995 +Skeleton: upload-non-native +Version: 2.0-1 +Description: Watch file that caused undef warning diff --git a/t/recipes/checks/debian/watch/watch-file-bug-765995/eval/desc b/t/recipes/checks/debian/watch/watch-file-bug-765995/eval/desc new file mode 100644 index 0000000..ff09232 --- /dev/null +++ b/t/recipes/checks/debian/watch/watch-file-bug-765995/eval/desc @@ -0,0 +1,2 @@ +Testname: watch-file-bug-765995 +Check: debian/watch diff --git a/t/recipes/checks/debian/watch/watch-file-bug-765995/eval/hints b/t/recipes/checks/debian/watch/watch-file-bug-765995/eval/hints new file mode 100644 index 0000000..93efc33 --- /dev/null +++ b/t/recipes/checks/debian/watch/watch-file-bug-765995/eval/hints @@ -0,0 +1,3 @@ +watch-file-bug-765995 (source): debian-watch-line-invalid opts=pgpsigurlmangle=s/$/.asc/ [debian/watch:3] +watch-file-bug-765995 (source): debian-watch-does-not-check-openpgp-signature [debian/watch] +watch-file-bug-765995 (source): debian-watch-could-verify-download debian/upstream/signing-key.asc [debian/watch] diff --git a/t/recipes/checks/debian/watch/watch-file-general/build-spec/debian/changelog.in b/t/recipes/checks/debian/watch/watch-file-general/build-spec/debian/changelog.in new file mode 100644 index 0000000..2340930 --- /dev/null +++ b/t/recipes/checks/debian/watch/watch-file-general/build-spec/debian/changelog.in @@ -0,0 +1,14 @@ +[% $source %] ([% $version %]) unstable; urgency=low + + * Lintian Test Suite. + * Test: [% $testname %] + + * Suppress "should close ITP bug" messages. (Closes: #123456) + + -- [% $author %] [% $date %] + +[% $source %] (1.0-1) unstable; urgency=low + + * Provoke debian-watch-file-specifies-old-upstream-version. + + -- [% $author %] Thu, 01 Jan 2009 08:34:20 -0800 diff --git a/t/recipes/checks/debian/watch/watch-file-general/build-spec/debian/upstream/signing-key.asc b/t/recipes/checks/debian/watch/watch-file-general/build-spec/debian/upstream/signing-key.asc new file mode 100644 index 0000000..d83f52c --- /dev/null +++ b/t/recipes/checks/debian/watch/watch-file-general/build-spec/debian/upstream/signing-key.asc @@ -0,0 +1,52 @@ +-----BEGIN PGP PUBLIC KEY BLOCK----- + +mQINBFpEMFgBEADNYEVhITIZ/rVECuLWxDJUk4rV+v6IfJCxJzuXRfqbjkdLNsCD +P83FOdvcxNQSrWPdSCgV1tDeDc18pNmfWDnu90zrLRipR1u7ln/ajTpx0RI7tHaO +SCIJfo42iw7firz9IoegqZaH8LKCh63EaXxLD98MgRA9fcBTEaBSD+Wxh8yYL/5b +bjdUu2FNNEi8f0POBAB3XInu80mqkEeVYPijd2T8Tc5xaxD90OBuuNGSiqKrJ+lB +9TSxwr5E/9N+6fnCjrR4FVkZtyTELAdZm4CpQN26tinVolG1gDpMz5B27471oXPY +9K92/UzTRllwuZ09pdBwpd4gu9mTXMLwOJ/S/+LJeSfCmby7QZiM/61NpS5EyaYg +h+m8YyTUtulFqpWd2HxttXz0ii5C01LKUrNPqlQrxmfrACJ1tHvcngVQm4wyqMHq +Uw5LYJ8FM7eS3JPeHpHqFGpY1VKx3nZAZGx+1As1ClvT7Og1KyuVY59w8qNaeJ8C +eA9XrwGVbMm9PiTP+fyBykMaYpf5aGucH+GeBtkvmpyOyXqf7zrOqyRvY0QaMgt1 +n3jXcD7AZKHCp0wY6LYVa/sKqrDJtxoloBA6kV2Ui3kClOWmlfvm+i1Ecg7vCG8d +QrJtZxo1Wu54dIr+g0qMFjlBA69OFYRXPzoaWFW1BKtNAYFoej9vW/f+0wARAQAB +tDtMaW50aWFuIFRlc3QgVXBzdHJlYW0gS2V5IChXb3JraW5nLCBObyBFeHBpcmF0 +aW9uLCBNaW5pbWFsKYkCTgQTAQoAOBYhBPr6VG+KNaSTu27AqFtc4nOV5lb+BQJa +RDBYAhsDBQsJCAcDBRUKCQgLBRYDAgEAAh4BAheAAAoJEFtc4nOV5lb+B3kQAMMm +umaOq12REmLdKWMN7GOsxzV6fTF5xBjTgKfY9DCBeNV7tSuJGpGT9MaxRD5Yu/1p +PDMGC9TkDxOEULBucmp7M//3FCuSnGQFBcObHNXY9FmLQ5MZJ32QUi8KLNIcDjuF +AKMEYJ5AT50pBsGyLVGXL27HWndNV7jMeIX64gIN5chPKMHqCn0g/wTTaPY/kkEs +MYirGmBQ83cIAv/1nywtIPeBnj+02Vu3B1hJIZYgmDQZwjZdd7HTxsVW0LAZEXs5 +gtWArfHO3zNKy6WkVE+xhNgZuVO3EyV46JW0bQ2RC7yY70/qFxX71co6p2+VaZgf +198QtRddq9cKaSe68BnZesIp9YnT3xJVYeL6IrrMYNIZxlslL4/b+gKU3epHyFes +tQP1tqkhnmC+Bxds6kx0ngPVfTfWM4Ruaeot51BuenZu82S1B3FB5B0qruCNyKre +nl53nPaNkOERPOF654AXoIODTgnyaocCaQTPztOYm52X8u9qogf9wf1eEA9EZIBI +WSbn3eCohN6qWvsdC0MMRDu0HB4S1QUyyOceNflXePg6SPvJSPHuOG/5DShcN6ah +mgVMH44ecAWsh/8Uj1+Z39Ea07nfE3lCU/WR+DXJb56WaQChXN7AKITrNRd/Q61X +jqrB6jWRSeVBKDidsFwI7oALdSgONE/ZEy+M4j76uQINBFpEMFgBEADCWJECQ6K1 +HgH7OwX7eY8ggEdCOYI/cTGx9rfzdqx67tc7fsF63BrO+nTHylcwXi9IAs695zvp +miCnCu1EUVjfM+nD52kocVEhzFc/lcCq6d9ac7H9ItJgf3Qc2HpwcqvsNUTWPDMU +VjQ8ciZ57qq601kIjVPuHjKRY96K9iHxUeVGh2n74JLYZL5IKO08WtQgPmPVLFDX +X2iZXnZdW/X4xTYB+/+V/D1LyUIP3X7CzBNzJuYjP3vGDH3h4ulLWnDSmxKs6Aep +a0sKu6+YD14/xXOi+buc0m6ghP7WePl9gYi6XePLdVPeLC9aiDi1tCWEVbbsinhw +ODxLwndXCGUc+AVySdUrUMuRchNRI6Z5PW/a/RsuVmyORg1RSuFGLeJQZj1pAw6x +WjxgioqoqydECIx4gCwGO/0GNZCfe5n11vuMEZ7SKbnrf5d58EQXOgV+yZumRKkz +OmdKICjql6w5CealrvP/si2kfD3oVwqBeuM0aM8HmWTfrdESWrd8xqAxBlcDsIun +mpsJ6obGN2mOaMFmOljukdzDFgMJMIrcS4UcGNzyQWUbz6JOSfPq96RkrTVsXMKy +40Ygtwe63PS9lXGT2ojmiV193UrGJqEUjuAL79KXWkxTRFxvFwck9qK5RAX2F1GQ +4ELDAFSKr8t6IpiYiTXaA3OTJfxJMK191QARAQABiQI2BBgBCgAgFiEE+vpUb4o1 +pJO7bsCoW1zic5XmVv4FAlpEMFgCGwwACgkQW1zic5XmVv4VEA//dOFj60ktKKsl +CgRdtnuo9Sdd7IjShic67qoT0gFZRiMATaryM4ifjAcl03rxzGk5MOsltHFJr5h+ +RmaudKhCyksd1nQ2dBpFgPHyxVTS5/k+wMelP9kPailqiGUA735SP5mO/28YOT8v +Xa4rwnTn6s9Ga7+lMN4I7LKRo47uGG89Og381tHSkW8DjFuLTme3TQDysG2MGlSY +vTPJmF7xPCuG3s8J5RIrVwWbN0orWen9YWT1923+0CAZG8M+7AFxU5xxCFIBRKMw +2tw/ovjtE9czuT743LMPlUJRc1pveYjVhLY9xUMQsPO6j41pdIL2X7txFjQqzjFl +hpIJviupVWlV0vSS0Q7nAtvLTsjhXSyQriKqmfdsdcxXBz7LGRxEi5l/9zuW5GMy +kD5ikQ05li6wkBdQYLS3ZBYkrj94LpNEqNZE3sfX33Yc5cpE2Bc4Ga+MxYxQwrfz +sNNSp8jdf2FyFvlvRkO8UUgsW5PPOuwthb05bx7dQGfKvqySpd0JLrhxw8G8odJh +PGzl0ig4F8xEitMc0lms5yzQGvtpEvSYLUs+4EJaf/XN9nRS+4e+GciTmp9XUM/5 +EtKOKXVuhHyaizqfpF4VR0Tbg65HHE3zLJMr7XTUGC0Zr+bj0n/V177R0XgptY7Y +jr6SfdNikIDjGYa+yuN6KGQsriza1aA= +=CYsi +-----END PGP PUBLIC KEY BLOCK----- diff --git a/t/recipes/checks/debian/watch/watch-file-general/build-spec/debian/watch b/t/recipes/checks/debian/watch/watch-file-general/build-spec/debian/watch new file mode 100644 index 0000000..dc196dd --- /dev/null +++ b/t/recipes/checks/debian/watch/watch-file-general/build-spec/debian/watch @@ -0,0 +1,32 @@ +# watch file with upstream version mangling + +version=2 +opts="uversionmangle=s/$/ds/" \ +http://qa.debian.org/watch/sf.php?project=foo scripts\.([\d.]+)\.tar\.gz debian uupdate + +version=3 +http://ftp.sf.net/foo/foo_bar(.+)\.Z 5 uupdate + +# Test additional Sourceforge patterns. (See Bug#510398) +ftp://upload.sourceforge.net/pub/sourceforge/s/so/soprano/ \ + soprano-(.*)\.tar\.bz2 +http://sourceforge.net/project/showfiles.php?group_id=100501 \ + .*/octaviz/octaviz-([\d\.]+).tar.gz.* +http://sourceforge.net/projects/synce/files http://downloads.sourceforge.net/.+/kcemirror-(.+).tar.gz.* + +# Unknown version number. +version=42 + +# Specifies the same version number as the package. +https://example.com/ foo([\d.]+)\.tar\.gz 2.0.ds1-1 uupdate + +# Deprecated githubredir +http://githubredir.debian.net/github/username/project /(.*).tar.gz + +# without any pgpsigurlmangle + +http://insecure.com /(.*).tar.gz +https://secure.com /(.*).tar.gz + +# False positive for debian-watch-uses-insecure-uri +http://sf.net/uses/redirector-([^-]+)\.tar\.gz diff --git a/t/recipes/checks/debian/watch/watch-file-general/build-spec/fill-values b/t/recipes/checks/debian/watch/watch-file-general/build-spec/fill-values new file mode 100644 index 0000000..185084f --- /dev/null +++ b/t/recipes/checks/debian/watch/watch-file-general/build-spec/fill-values @@ -0,0 +1,4 @@ +Testname: watch-file-general +Skeleton: upload-non-native +Version: 2.0.ds1-1 +Description: General watch file checks diff --git a/t/recipes/checks/debian/watch/watch-file-general/eval/desc b/t/recipes/checks/debian/watch/watch-file-general/eval/desc new file mode 100644 index 0000000..9f9961f --- /dev/null +++ b/t/recipes/checks/debian/watch/watch-file-general/eval/desc @@ -0,0 +1,3 @@ +Testname: watch-file-general +See-Also: Debian Bug#510398 +Check: debian/watch diff --git a/t/recipes/checks/debian/watch/watch-file-general/eval/hints b/t/recipes/checks/debian/watch/watch-file-general/eval/hints new file mode 100644 index 0000000..7383a4c --- /dev/null +++ b/t/recipes/checks/debian/watch/watch-file-general/eval/hints @@ -0,0 +1,24 @@ +watch-file-general (source): debian-watch-uses-insecure-uri http://sourceforge.net/projects/synce/files [debian/watch:15] +watch-file-general (source): debian-watch-uses-insecure-uri http://sourceforge.net/project/showfiles.php?group_id=100501 [debian/watch:14] +watch-file-general (source): debian-watch-uses-insecure-uri http://qa.debian.org/watch/sf.php?project=foo [debian/watch:5] +watch-file-general (source): debian-watch-uses-insecure-uri http://insecure.com [debian/watch:28] +watch-file-general (source): debian-watch-uses-insecure-uri http://githubredir.debian.net/github/username/project [debian/watch:24] +watch-file-general (source): debian-watch-uses-insecure-uri http://ftp.sf.net/foo/foo_bar(.+)\.Z [debian/watch:8] +watch-file-general (source): debian-watch-uses-insecure-uri ftp://upload.sourceforge.net/pub/sourceforge/s/so/soprano/ [debian/watch:12] +watch-file-general (source): debian-watch-not-mangling-version https://secure.com /(.*).tar.gz [debian/watch:29] +watch-file-general (source): debian-watch-not-mangling-version http://sourceforge.net/projects/synce/files http://downloads.sourceforge.net/.+/kcemirror-(.+).tar.gz.* [debian/watch:15] +watch-file-general (source): debian-watch-not-mangling-version http://sourceforge.net/project/showfiles.php?group_id=100501 .*/octaviz/octaviz-([\d\.]+).tar.gz.* [debian/watch:14] +watch-file-general (source): debian-watch-not-mangling-version http://sf.net/uses/redirector-([^-]+)\.tar\.gz [debian/watch:32] +watch-file-general (source): debian-watch-not-mangling-version http://insecure.com /(.*).tar.gz [debian/watch:28] +watch-file-general (source): debian-watch-not-mangling-version http://githubredir.debian.net/github/username/project /(.*).tar.gz [debian/watch:24] +watch-file-general (source): debian-watch-not-mangling-version ftp://upload.sourceforge.net/pub/sourceforge/s/so/soprano/ soprano-(.*)\.tar\.bz2 [debian/watch:12] +watch-file-general (source): debian-watch-mangles-debian-version-improperly opts="uversionmangle=s/$/ds/" http://qa.debian.org/watch/sf.php?project=foo scripts\.([\d.]+)\.tar\.gz debian uupdate [debian/watch:5] +watch-file-general (source): debian-watch-lacks-sourceforge-redirector http://sourceforge.net/projects/synce/files http://downloads.sourceforge.net/.+/kcemirror-(.+).tar.gz.* [debian/watch:15] +watch-file-general (source): debian-watch-lacks-sourceforge-redirector http://sourceforge.net/project/showfiles.php?group_id=100501 .*/octaviz/octaviz-([\d\.]+).tar.gz.* [debian/watch:14] +watch-file-general (source): debian-watch-lacks-sourceforge-redirector http://ftp.sf.net/foo/foo_bar(.+)\.Z 5 uupdate [debian/watch:8] +watch-file-general (source): debian-watch-lacks-sourceforge-redirector ftp://upload.sourceforge.net/pub/sourceforge/s/so/soprano/ soprano-(.*)\.tar\.bz2 [debian/watch:12] +watch-file-general (source): debian-watch-file-uses-deprecated-sf-redirector-method http://qa.debian.org/watch/sf.php?project=foo scripts\.([\d.]+)\.tar\.gz debian uupdate [debian/watch:5] +watch-file-general (source): debian-watch-file-uses-deprecated-githubredir http://githubredir.debian.net/github/username/project /(.*).tar.gz [debian/watch:24] +watch-file-general (source): debian-watch-file-specifies-wrong-upstream-version 2.0.ds1-1 [debian/watch] +watch-file-general (source): debian-watch-does-not-check-openpgp-signature [debian/watch] +watch-file-general (source): debian-watch-could-verify-download debian/upstream/signing-key.asc [debian/watch] diff --git a/t/recipes/checks/debian/watch/watch-file-native/build-spec/debian/watch b/t/recipes/checks/debian/watch/watch-file-native/build-spec/debian/watch new file mode 100644 index 0000000..23b829d --- /dev/null +++ b/t/recipes/checks/debian/watch/watch-file-native/build-spec/debian/watch @@ -0,0 +1,5 @@ +# watch file with upstream version mangling + +version=3 +https://somewhere.debian.org/foo/foo_bar(.+)\.tar\.gz 5 uupdate + diff --git a/t/recipes/checks/debian/watch/watch-file-native/build-spec/fill-values b/t/recipes/checks/debian/watch/watch-file-native/build-spec/fill-values new file mode 100644 index 0000000..72168c2 --- /dev/null +++ b/t/recipes/checks/debian/watch/watch-file-native/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: upload-native +Testname: watch-file-native +Description: Native package with a watch file diff --git a/t/recipes/checks/debian/watch/watch-file-native/eval/desc b/t/recipes/checks/debian/watch/watch-file-native/eval/desc new file mode 100644 index 0000000..bd769e4 --- /dev/null +++ b/t/recipes/checks/debian/watch/watch-file-native/eval/desc @@ -0,0 +1,2 @@ +Testname: watch-file-native +Check: debian/watch diff --git a/t/recipes/checks/debian/watch/watch-file-native/eval/hints b/t/recipes/checks/debian/watch/watch-file-native/eval/hints new file mode 100644 index 0000000..c38b1c2 --- /dev/null +++ b/t/recipes/checks/debian/watch/watch-file-native/eval/hints @@ -0,0 +1,2 @@ +watch-file-native (source): debian-watch-file-in-native-package [debian/watch] +watch-file-native (source): debian-watch-does-not-check-openpgp-signature [debian/watch] diff --git a/t/recipes/checks/debian/watch/watch-file-old-upstream-version/build-spec/debian/changelog.in b/t/recipes/checks/debian/watch/watch-file-old-upstream-version/build-spec/debian/changelog.in new file mode 100644 index 0000000..0aaa2a6 --- /dev/null +++ b/t/recipes/checks/debian/watch/watch-file-old-upstream-version/build-spec/debian/changelog.in @@ -0,0 +1,14 @@ +[% $source %] ([% $version %]) unstable; urgency=low + + * New upstream release. + * Lintian Test Suite. + * Test: [% $testname %] + * We forgot to update the watch file, lalala. + + -- [% $author %] [% $date %] + +[% $source %] (1.0-1) unstable; urgency=low + + * An earlier non-native version. + + -- [% $author %] Tue, 1 Jan 2008 22:45:57 +0000 diff --git a/t/recipes/checks/debian/watch/watch-file-old-upstream-version/build-spec/debian/watch b/t/recipes/checks/debian/watch/watch-file-old-upstream-version/build-spec/debian/watch new file mode 100644 index 0000000..ebaecbd --- /dev/null +++ b/t/recipes/checks/debian/watch/watch-file-old-upstream-version/build-spec/debian/watch @@ -0,0 +1,3 @@ +version=3 + +https://www.example.com/dist/ dh7-test\.([\d.]+)\.tar\.gz 1.0 uupdate diff --git a/t/recipes/checks/debian/watch/watch-file-old-upstream-version/build-spec/fill-values b/t/recipes/checks/debian/watch/watch-file-old-upstream-version/build-spec/fill-values new file mode 100644 index 0000000..e8c0c43 --- /dev/null +++ b/t/recipes/checks/debian/watch/watch-file-old-upstream-version/build-spec/fill-values @@ -0,0 +1,4 @@ +Testname: watch-file-old-upstream-version +Skeleton: upload-non-native +Version: 2.0-1 +Description: Watch file with old upstream version diff --git a/t/recipes/checks/debian/watch/watch-file-old-upstream-version/eval/desc b/t/recipes/checks/debian/watch/watch-file-old-upstream-version/eval/desc new file mode 100644 index 0000000..fdffb7d --- /dev/null +++ b/t/recipes/checks/debian/watch/watch-file-old-upstream-version/eval/desc @@ -0,0 +1,2 @@ +Testname: watch-file-old-upstream-version +Check: debian/watch diff --git a/t/recipes/checks/debian/watch/watch-file-old-upstream-version/eval/hints b/t/recipes/checks/debian/watch/watch-file-old-upstream-version/eval/hints new file mode 100644 index 0000000..7cdf746 --- /dev/null +++ b/t/recipes/checks/debian/watch/watch-file-old-upstream-version/eval/hints @@ -0,0 +1,2 @@ +watch-file-old-upstream-version (source): debian-watch-file-specifies-old-upstream-version 1.0 [debian/watch] +watch-file-old-upstream-version (source): debian-watch-does-not-check-openpgp-signature [debian/watch] diff --git a/t/recipes/checks/debian/watch/watch-file-pgpmode-next/build-spec/debian/upstream/signing-key.asc b/t/recipes/checks/debian/watch/watch-file-pgpmode-next/build-spec/debian/upstream/signing-key.asc new file mode 100644 index 0000000..bd03c4e --- /dev/null +++ b/t/recipes/checks/debian/watch/watch-file-pgpmode-next/build-spec/debian/upstream/signing-key.asc @@ -0,0 +1 @@ +Too lazy to fake this file diff --git a/t/recipes/checks/debian/watch/watch-file-pgpmode-next/build-spec/debian/watch b/t/recipes/checks/debian/watch/watch-file-pgpmode-next/build-spec/debian/watch new file mode 100644 index 0000000..139bc40 --- /dev/null +++ b/t/recipes/checks/debian/watch/watch-file-pgpmode-next/build-spec/debian/watch @@ -0,0 +1,5 @@ +version=4 +opts="pgpmode=next" https://alioth.debian.org/frs/?group_id=30928 \ + (?:.*)/@PACKAGE@@ANY_VERSION@@ARCHIVE_EXT@ debian +opts="pgpmode=previous" https://alioth.debian.org/frs/?group_id=30928 \ + (?:.*)/@PACKAGE@@ANY_VERSION@@SIGNATURE_EXT@ previous diff --git a/t/recipes/checks/debian/watch/watch-file-pgpmode-next/build-spec/fill-values b/t/recipes/checks/debian/watch/watch-file-pgpmode-next/build-spec/fill-values new file mode 100644 index 0000000..061e5ae --- /dev/null +++ b/t/recipes/checks/debian/watch/watch-file-pgpmode-next/build-spec/fill-values @@ -0,0 +1,4 @@ +Testname: watch-file-pgpmode-next +Skeleton: upload-non-native +Version: 2.0-1 +Description: Watch file with pgpmode=next diff --git a/t/recipes/checks/debian/watch/watch-file-pgpmode-next/eval/desc b/t/recipes/checks/debian/watch/watch-file-pgpmode-next/eval/desc new file mode 100644 index 0000000..10373e6 --- /dev/null +++ b/t/recipes/checks/debian/watch/watch-file-pgpmode-next/eval/desc @@ -0,0 +1,4 @@ +Testname: watch-file-pgpmode-next +Test-Against: debian-watch-does-not-check-openpgp-signature +See-Also: #841000 +Check: debian/watch diff --git a/t/recipes/checks/debian/watch/watch-file-pgpmode-next/eval/hints b/t/recipes/checks/debian/watch/watch-file-pgpmode-next/eval/hints new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/t/recipes/checks/debian/watch/watch-file-pgpmode-next/eval/hints @@ -0,0 +1 @@ + diff --git a/t/recipes/checks/debian/watch/watch-file-pgpmode-none/build-spec/debian/watch b/t/recipes/checks/debian/watch/watch-file-pgpmode-none/build-spec/debian/watch new file mode 100644 index 0000000..190a7c5 --- /dev/null +++ b/t/recipes/checks/debian/watch/watch-file-pgpmode-none/build-spec/debian/watch @@ -0,0 +1,3 @@ +version=4 +opts="pgpmode=none" https://alioth.debian.org/frs/?group_id=30928 \ + (?:.*)/@PACKAGE@@ANY_VERSION@@ARCHIVE_EXT@ debian diff --git a/t/recipes/checks/debian/watch/watch-file-pgpmode-none/build-spec/fill-values b/t/recipes/checks/debian/watch/watch-file-pgpmode-none/build-spec/fill-values new file mode 100644 index 0000000..e419c0a --- /dev/null +++ b/t/recipes/checks/debian/watch/watch-file-pgpmode-none/build-spec/fill-values @@ -0,0 +1,4 @@ +Testname: watch-file-pgpmode-none +Skeleton: upload-non-native +Version: 2.0-1 +Description: Watch file with pgpmode=none diff --git a/t/recipes/checks/debian/watch/watch-file-pgpmode-none/eval/desc b/t/recipes/checks/debian/watch/watch-file-pgpmode-none/eval/desc new file mode 100644 index 0000000..9797f85 --- /dev/null +++ b/t/recipes/checks/debian/watch/watch-file-pgpmode-none/eval/desc @@ -0,0 +1,4 @@ +Testname: watch-file-pgpmode-none +Test-Against: debian-watch-file-pubkey-file-is-missing +See-Also: #841000 +Check: debian/watch diff --git a/t/recipes/checks/debian/watch/watch-file-pgpmode-none/eval/hints b/t/recipes/checks/debian/watch/watch-file-pgpmode-none/eval/hints new file mode 100644 index 0000000..da03c49 --- /dev/null +++ b/t/recipes/checks/debian/watch/watch-file-pgpmode-none/eval/hints @@ -0,0 +1 @@ +watch-file-pgpmode-none (source): debian-watch-does-not-check-openpgp-signature [debian/watch] diff --git a/t/recipes/checks/debian/watch/watch-file-prerelease/build-spec/debian/watch b/t/recipes/checks/debian/watch/watch-file-prerelease/build-spec/debian/watch new file mode 100644 index 0000000..8038deb --- /dev/null +++ b/t/recipes/checks/debian/watch/watch-file-prerelease/build-spec/debian/watch @@ -0,0 +1,3 @@ +version=3 +opts=dversionmangle=s/~rc/-rc/ \ + https://www.example.com/software/foo/ .*/foo-([^-]+)\.tar\.gz diff --git a/t/recipes/checks/debian/watch/watch-file-prerelease/build-spec/fill-values b/t/recipes/checks/debian/watch/watch-file-prerelease/build-spec/fill-values new file mode 100644 index 0000000..759c2e9 --- /dev/null +++ b/t/recipes/checks/debian/watch/watch-file-prerelease/build-spec/fill-values @@ -0,0 +1,4 @@ +Testname: watch-file-prerelease +Skeleton: upload-non-native +Version: 1~rc1-1 +Description: Check mangling tags for upstream prereleases diff --git a/t/recipes/checks/debian/watch/watch-file-prerelease/eval/desc b/t/recipes/checks/debian/watch/watch-file-prerelease/eval/desc new file mode 100644 index 0000000..130e146 --- /dev/null +++ b/t/recipes/checks/debian/watch/watch-file-prerelease/eval/desc @@ -0,0 +1,2 @@ +Testname: watch-file-prerelease +Check: debian/watch diff --git a/t/recipes/checks/debian/watch/watch-file-prerelease/eval/hints b/t/recipes/checks/debian/watch/watch-file-prerelease/eval/hints new file mode 100644 index 0000000..9f86dc6 --- /dev/null +++ b/t/recipes/checks/debian/watch/watch-file-prerelease/eval/hints @@ -0,0 +1,2 @@ +watch-file-prerelease (source): debian-watch-mangles-upstream-version-improperly opts=dversionmangle=s/~rc/-rc/ https://www.example.com/software/foo/ .*/foo-([^-]+)\.tar\.gz [debian/watch:3] +watch-file-prerelease (source): debian-watch-does-not-check-openpgp-signature [debian/watch] diff --git a/t/recipes/checks/debian/watch/watch-file-pubkey-missing/build-spec/debian/watch b/t/recipes/checks/debian/watch/watch-file-pubkey-missing/build-spec/debian/watch new file mode 100644 index 0000000..7ac78bc --- /dev/null +++ b/t/recipes/checks/debian/watch/watch-file-pubkey-missing/build-spec/debian/watch @@ -0,0 +1,3 @@ +version=3 +opts="uversionmangle=s/-/./,dversionmangle=s/\.dfsg\d+$//,pgpsigurlmangle=s/$/.asc/" \ +ftp://ftp.imagemagick.org/pub/ImageMagick/ ImageMagick-(.*)\.tar\.xz diff --git a/t/recipes/checks/debian/watch/watch-file-pubkey-missing/build-spec/fill-values b/t/recipes/checks/debian/watch/watch-file-pubkey-missing/build-spec/fill-values new file mode 100644 index 0000000..31946e9 --- /dev/null +++ b/t/recipes/checks/debian/watch/watch-file-pubkey-missing/build-spec/fill-values @@ -0,0 +1,4 @@ +Testname: watch-file-pubkey-missing +Skeleton: upload-non-native +Version: 1+dfsg-1 +Description: Watch file if verify signature should check d/upstream/signing-key.{pgp,asc} diff --git a/t/recipes/checks/debian/watch/watch-file-pubkey-missing/eval/desc b/t/recipes/checks/debian/watch/watch-file-pubkey-missing/eval/desc new file mode 100644 index 0000000..de6e776 --- /dev/null +++ b/t/recipes/checks/debian/watch/watch-file-pubkey-missing/eval/desc @@ -0,0 +1,2 @@ +Testname: watch-file-pubkey-missing +Check: debian/watch diff --git a/t/recipes/checks/debian/watch/watch-file-pubkey-missing/eval/hints b/t/recipes/checks/debian/watch/watch-file-pubkey-missing/eval/hints new file mode 100644 index 0000000..a7ae561 --- /dev/null +++ b/t/recipes/checks/debian/watch/watch-file-pubkey-missing/eval/hints @@ -0,0 +1,2 @@ +watch-file-pubkey-missing (source): debian-watch-uses-insecure-uri ftp://ftp.imagemagick.org/pub/ImageMagick/ [debian/watch:3] +watch-file-pubkey-missing (source): debian-watch-file-pubkey-file-is-missing [debian/watch] diff --git a/t/recipes/checks/debian/watch/watch-file-should-mangle-unrel/build-spec/debian/watch b/t/recipes/checks/debian/watch/watch-file-should-mangle-unrel/build-spec/debian/watch new file mode 100644 index 0000000..9104ee4 --- /dev/null +++ b/t/recipes/checks/debian/watch/watch-file-should-mangle-unrel/build-spec/debian/watch @@ -0,0 +1,4 @@ +version=4 +opts="uversionmangle=s/.pre/~pre/,dversionmangle=s/@DEB_EXT@//,repacksuffix=+ds1" \ + https://github.com/user/project/tags \ + (?:.*?/)project@ANr_VERSION@\.tar\.gz diff --git a/t/recipes/checks/debian/watch/watch-file-should-mangle-unrel/build-spec/fill-values b/t/recipes/checks/debian/watch/watch-file-should-mangle-unrel/build-spec/fill-values new file mode 100644 index 0000000..8d0af82 --- /dev/null +++ b/t/recipes/checks/debian/watch/watch-file-should-mangle-unrel/build-spec/fill-values @@ -0,0 +1,4 @@ +Testname: watch-file-should-mangle-unrel +Skeleton: upload-non-native +Version: 1+dfsg-1 +Description: Watch file should mangle version (false-positive) diff --git a/t/recipes/checks/debian/watch/watch-file-should-mangle-unrel/eval/desc b/t/recipes/checks/debian/watch/watch-file-should-mangle-unrel/eval/desc new file mode 100644 index 0000000..67f3d93 --- /dev/null +++ b/t/recipes/checks/debian/watch/watch-file-should-mangle-unrel/eval/desc @@ -0,0 +1,4 @@ +Testname: watch-file-should-mangle-unrel +Test-Against: + debian-watch-not-mangling-version +Check: debian/watch diff --git a/t/recipes/checks/debian/watch/watch-file-should-mangle-unrel/eval/hints b/t/recipes/checks/debian/watch/watch-file-should-mangle-unrel/eval/hints new file mode 100644 index 0000000..e5e98dc --- /dev/null +++ b/t/recipes/checks/debian/watch/watch-file-should-mangle-unrel/eval/hints @@ -0,0 +1 @@ +watch-file-should-mangle-unrel (source): debian-watch-does-not-check-openpgp-signature [debian/watch] diff --git a/t/recipes/checks/debian/watch/watch-file-should-mangle/build-spec/debian/watch b/t/recipes/checks/debian/watch/watch-file-should-mangle/build-spec/debian/watch new file mode 100644 index 0000000..6cc9db4 --- /dev/null +++ b/t/recipes/checks/debian/watch/watch-file-should-mangle/build-spec/debian/watch @@ -0,0 +1,11 @@ +# watch file with no version mangling, even though there's a dfsg in the +# package version number. + +version=2 +https://www.example.com/dist/ dh7-test\.([\d.]+)\.tar\.gz debian uupdate + +# version mangling is not needed in this case: +https://www.example.com/dist/ dh7-test\.([\d.]+)\.tar\.gz 0.24 uupdate + +# version mangling *is* needed in this case: +https://www.example.com/dist/ dh7-test\.([\d.]+)\.tar\.gz diff --git a/t/recipes/checks/debian/watch/watch-file-should-mangle/build-spec/fill-values b/t/recipes/checks/debian/watch/watch-file-should-mangle/build-spec/fill-values new file mode 100644 index 0000000..8a8df44 --- /dev/null +++ b/t/recipes/checks/debian/watch/watch-file-should-mangle/build-spec/fill-values @@ -0,0 +1,4 @@ +Testname: watch-file-should-mangle +Skeleton: upload-non-native +Version: 1+dfsg-1 +Description: Watch file should mangle version diff --git a/t/recipes/checks/debian/watch/watch-file-should-mangle/eval/desc b/t/recipes/checks/debian/watch/watch-file-should-mangle/eval/desc new file mode 100644 index 0000000..584f10d --- /dev/null +++ b/t/recipes/checks/debian/watch/watch-file-should-mangle/eval/desc @@ -0,0 +1,2 @@ +Testname: watch-file-should-mangle +Check: debian/watch diff --git a/t/recipes/checks/debian/watch/watch-file-should-mangle/eval/hints b/t/recipes/checks/debian/watch/watch-file-should-mangle/eval/hints new file mode 100644 index 0000000..ed53e0f --- /dev/null +++ b/t/recipes/checks/debian/watch/watch-file-should-mangle/eval/hints @@ -0,0 +1,3 @@ +watch-file-should-mangle (source): debian-watch-not-mangling-version https://www.example.com/dist/ dh7-test\.([\d.]+)\.tar\.gz debian uupdate [debian/watch:5] +watch-file-should-mangle (source): debian-watch-not-mangling-version https://www.example.com/dist/ dh7-test\.([\d.]+)\.tar\.gz [debian/watch:11] +watch-file-should-mangle (source): debian-watch-does-not-check-openpgp-signature [debian/watch] diff --git a/t/recipes/checks/debian/watch/watch-file-template/build-spec/debian/watch b/t/recipes/checks/debian/watch/watch-file-template/build-spec/debian/watch new file mode 100644 index 0000000..fdbc536 --- /dev/null +++ b/t/recipes/checks/debian/watch/watch-file-template/build-spec/debian/watch @@ -0,0 +1,3 @@ +version=3 +# Example watch control file for uscan +http://www.example.com/software/foo/ .*/-([^-]+)\.tar\.gz diff --git a/t/recipes/checks/debian/watch/watch-file-template/build-spec/fill-values b/t/recipes/checks/debian/watch/watch-file-template/build-spec/fill-values new file mode 100644 index 0000000..fdad29e --- /dev/null +++ b/t/recipes/checks/debian/watch/watch-file-template/build-spec/fill-values @@ -0,0 +1,3 @@ +Testname: watch-file-template +Skeleton: upload-non-native +Description: Test for dh_make(1) templates diff --git a/t/recipes/checks/debian/watch/watch-file-template/eval/desc b/t/recipes/checks/debian/watch/watch-file-template/eval/desc new file mode 100644 index 0000000..c96ef04 --- /dev/null +++ b/t/recipes/checks/debian/watch/watch-file-template/eval/desc @@ -0,0 +1,2 @@ +Testname: watch-file-template +Check: debian/watch diff --git a/t/recipes/checks/debian/watch/watch-file-template/eval/hints b/t/recipes/checks/debian/watch/watch-file-template/eval/hints new file mode 100644 index 0000000..b0dd19d --- /dev/null +++ b/t/recipes/checks/debian/watch/watch-file-template/eval/hints @@ -0,0 +1,3 @@ +watch-file-template (source): debian-watch-uses-insecure-uri http://www.example.com/software/foo/ [debian/watch:3] +watch-file-template (source): debian-watch-does-not-check-openpgp-signature [debian/watch] +watch-file-template (source): debian-watch-contains-dh_make-template Example watch control file for uscan [debian/watch] diff --git a/t/recipes/checks/debug/automatic/changes-files-package-builds-dbg-and-dbgsym-variants/build-spec/debian/control.in b/t/recipes/checks/debug/automatic/changes-files-package-builds-dbg-and-dbgsym-variants/build-spec/debian/control.in new file mode 100644 index 0000000..0312410 --- /dev/null +++ b/t/recipes/checks/debug/automatic/changes-files-package-builds-dbg-and-dbgsym-variants/build-spec/debian/control.in @@ -0,0 +1,36 @@ +Source: [% $source %] +Section: [% $section %] +Priority: optional +Maintainer: [% $author %] +Standards-Version: [% $standards_version %] +Build-Depends: [% $build_depends %] +Rules-Requires-Root: no + +Package: [% $source %] +Architecture: [% $package_architecture %] +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: [% $description %] + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. + +Package: [% $source %]-dbg +Section: debug +Architecture: all +Depends: [% $source %], ${shlibs:Depends}, ${misc:Depends} +Description: Manual dbg package + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It + may be an empty package. + +Package: [% $source %]-dbgsym +Section: debug +Architecture: all +Depends: [% $source %], ${shlibs:Depends}, ${misc:Depends} +Description: Manual dbgsym package + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + even be an empty package. diff --git a/t/recipes/checks/debug/automatic/changes-files-package-builds-dbg-and-dbgsym-variants/build-spec/fill-values b/t/recipes/checks/debug/automatic/changes-files-package-builds-dbg-and-dbgsym-variants/build-spec/fill-values new file mode 100644 index 0000000..4d83180 --- /dev/null +++ b/t/recipes/checks/debug/automatic/changes-files-package-builds-dbg-and-dbgsym-variants/build-spec/fill-values @@ -0,0 +1,4 @@ +Skeleton: upload-native +Testname: changes-files-package-builds-dbg-and-dbgsym-variants +Package-Architecture: any +Description: Package builds -dbg and -dbgsym diff --git a/t/recipes/checks/debug/automatic/changes-files-package-builds-dbg-and-dbgsym-variants/eval/desc b/t/recipes/checks/debug/automatic/changes-files-package-builds-dbg-and-dbgsym-variants/eval/desc new file mode 100644 index 0000000..9413c0b --- /dev/null +++ b/t/recipes/checks/debug/automatic/changes-files-package-builds-dbg-and-dbgsym-variants/eval/desc @@ -0,0 +1,2 @@ +Testname: changes-files-package-builds-dbg-and-dbgsym-variants +Check: debug/automatic diff --git a/t/recipes/checks/debug/automatic/changes-files-package-builds-dbg-and-dbgsym-variants/eval/hints b/t/recipes/checks/debug/automatic/changes-files-package-builds-dbg-and-dbgsym-variants/eval/hints new file mode 100644 index 0000000..390db6f --- /dev/null +++ b/t/recipes/checks/debug/automatic/changes-files-package-builds-dbg-and-dbgsym-variants/eval/hints @@ -0,0 +1 @@ +changes-files-package-builds-dbg-and-dbgsym-variants (source): debian-control-has-dbgsym-package (in section for changes-files-package-builds-dbg-and-dbgsym-variants-dbgsym) Package [debian/control:28] diff --git a/t/recipes/checks/debug/automatic/control-file-general/build-spec/debian/control.in b/t/recipes/checks/debug/automatic/control-file-general/build-spec/debian/control.in new file mode 100644 index 0000000..3058e5a --- /dev/null +++ b/t/recipes/checks/debug/automatic/control-file-general/build-spec/debian/control.in @@ -0,0 +1,118 @@ +Source: [% $source %] +Priority: optional +Maintainer: [% $author %] +Standards-Version: [% $standards_version %] +Build-Depends: [% $build_depends %], + fiddle [amd64 powerpc mips mipsel hppa s390], + faddle + (>> + 2) [ + sparc i386 amd64 + ] +Build-Depends-Indep: perl (> 5.8) +Rules-Requires-Root: no +XS-Vcs-Svn: https://svn.example.com/[% $source %]/trunk +#Vcs-Git: git://git.debian.org/collab-maint/.git +#Vcs-Browser: http://git.debian.org/?p=collab-maint/.git;a=summary + +Package: [% $source %] +Section: [% $section %] +Maintainer: [% $author %] +Build-Conflicts: foo +Architecture: all +Pre-depends: ${misc:Pre-depends}, multiarch-support +Depends: [% $source %], foo, baz, ${shlibs:Depends} ${some:Depends}, ${misc:Depends} +Recommends: foo, bar, no-match${lintian:Foo}, match${lintian:Match}, no-match${lintian:Bar}-foo +Suggests: bar | baz, no-match${lintian:Bar}, match${lintian:Match} +Description: [% $description %] + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. + +Package: [% $source %]-1 +Section: [% $section %] +Architecture: all +Depends: ${shlibs:Depends}, ${misc:Depends} +Breaks: libsqlite3-0 (< 3.6.12) +Description: [% $description %] + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. + +Package: [% $source %]-2 +Section: [% $section %] +Architecture: all +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: [% $description %] (two) + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. + +Package: [% $source %]-3 +Section: [% $section %] +Architecture: all +Depends: ${shlibs:Depends}, ${misc:Depends}, foo (>= 1), + baz (<< 2), + fizz (= 2.0), gcc-${pv:gcc} ${reqv:gcc} +Description: [% $description %] (three) + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. + +Package: [% $source %]-4 +Section: [% $section %] +Architecture: all +Depends: ${shlibs:Depends}, ${misc:Depends}, foo | + bar (>= 1), baz +Description: [% $description %] (four) + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. + +Package: [% $source %]-5 +Section: [% $section %] +Architecture: all +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: Description: [% $description %] + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. + +Package: [% $source %]-dbgsym +Section: debug +Architecture: all +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: Description: dbg-sym + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. + +Package: [% $source %]-dbg +Section: debug +Architecture: all +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: Description: debug + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. + +Package: [% $source %]-udeb +Section: debian-installer +Package-Type: udeb +Architecture: all +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: [% $description %] (udeb) + udeb tests. + . + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. diff --git a/t/recipes/checks/debug/automatic/control-file-general/build-spec/debian/rules b/t/recipes/checks/debug/automatic/control-file-general/build-spec/debian/rules new file mode 100644 index 0000000..f5db4bb --- /dev/null +++ b/t/recipes/checks/debug/automatic/control-file-general/build-spec/debian/rules @@ -0,0 +1,8 @@ +#!/usr/bin/make -f +%: + dh $@ + +override_dh_gencontrol: + echo 'pv:gcc=4.3' >> debian/substvars + echo 'reqv:gcc=(>= 4.3-1)' >> debian/substvars + dh_gencontrol diff --git a/t/recipes/checks/debug/automatic/control-file-general/build-spec/fill-values b/t/recipes/checks/debug/automatic/control-file-general/build-spec/fill-values new file mode 100644 index 0000000..7338a95 --- /dev/null +++ b/t/recipes/checks/debug/automatic/control-file-general/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: upload-native +Testname: control-file-general +Description: Various problems with debian/control diff --git a/t/recipes/checks/debug/automatic/control-file-general/eval/desc b/t/recipes/checks/debug/automatic/control-file-general/eval/desc new file mode 100644 index 0000000..2c44eb9 --- /dev/null +++ b/t/recipes/checks/debug/automatic/control-file-general/eval/desc @@ -0,0 +1,11 @@ +Testname: control-file-general +Check: debug/automatic +See-Also: + Debian Bug#30020, + Debian Bug#409099, + Debian Bug#516706, + Debian Bug#533202, + Debian Bug#557971, + Debian Bug#573399, + Debian Bug#580494, + Debian Bug#657110 diff --git a/t/recipes/checks/debug/automatic/control-file-general/eval/hints b/t/recipes/checks/debug/automatic/control-file-general/eval/hints new file mode 100644 index 0000000..87c2911 --- /dev/null +++ b/t/recipes/checks/debug/automatic/control-file-general/eval/hints @@ -0,0 +1 @@ +control-file-general (source): debian-control-has-dbgsym-package (in section for control-file-general-dbgsym) Package [debian/control:87] diff --git a/t/recipes/checks/debug/obsolete/changes-files-package-builds-dbg-and-dbgsym-variants/build-spec/debian/control.in b/t/recipes/checks/debug/obsolete/changes-files-package-builds-dbg-and-dbgsym-variants/build-spec/debian/control.in new file mode 100644 index 0000000..0312410 --- /dev/null +++ b/t/recipes/checks/debug/obsolete/changes-files-package-builds-dbg-and-dbgsym-variants/build-spec/debian/control.in @@ -0,0 +1,36 @@ +Source: [% $source %] +Section: [% $section %] +Priority: optional +Maintainer: [% $author %] +Standards-Version: [% $standards_version %] +Build-Depends: [% $build_depends %] +Rules-Requires-Root: no + +Package: [% $source %] +Architecture: [% $package_architecture %] +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: [% $description %] + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. + +Package: [% $source %]-dbg +Section: debug +Architecture: all +Depends: [% $source %], ${shlibs:Depends}, ${misc:Depends} +Description: Manual dbg package + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It + may be an empty package. + +Package: [% $source %]-dbgsym +Section: debug +Architecture: all +Depends: [% $source %], ${shlibs:Depends}, ${misc:Depends} +Description: Manual dbgsym package + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + even be an empty package. diff --git a/t/recipes/checks/debug/obsolete/changes-files-package-builds-dbg-and-dbgsym-variants/build-spec/fill-values b/t/recipes/checks/debug/obsolete/changes-files-package-builds-dbg-and-dbgsym-variants/build-spec/fill-values new file mode 100644 index 0000000..4d83180 --- /dev/null +++ b/t/recipes/checks/debug/obsolete/changes-files-package-builds-dbg-and-dbgsym-variants/build-spec/fill-values @@ -0,0 +1,4 @@ +Skeleton: upload-native +Testname: changes-files-package-builds-dbg-and-dbgsym-variants +Package-Architecture: any +Description: Package builds -dbg and -dbgsym diff --git a/t/recipes/checks/debug/obsolete/changes-files-package-builds-dbg-and-dbgsym-variants/eval/desc b/t/recipes/checks/debug/obsolete/changes-files-package-builds-dbg-and-dbgsym-variants/eval/desc new file mode 100644 index 0000000..fa56958 --- /dev/null +++ b/t/recipes/checks/debug/obsolete/changes-files-package-builds-dbg-and-dbgsym-variants/eval/desc @@ -0,0 +1,2 @@ +Testname: changes-files-package-builds-dbg-and-dbgsym-variants +Check: debug/obsolete diff --git a/t/recipes/checks/debug/obsolete/changes-files-package-builds-dbg-and-dbgsym-variants/eval/hints b/t/recipes/checks/debug/obsolete/changes-files-package-builds-dbg-and-dbgsym-variants/eval/hints new file mode 100644 index 0000000..c424ec0 --- /dev/null +++ b/t/recipes/checks/debug/obsolete/changes-files-package-builds-dbg-and-dbgsym-variants/eval/hints @@ -0,0 +1 @@ +changes-files-package-builds-dbg-and-dbgsym-variants (source): debian-control-has-obsolete-dbg-package (in section for changes-files-package-builds-dbg-and-dbgsym-variants-dbg) Package [debian/control:18] diff --git a/t/recipes/checks/debug/obsolete/control-file-general/build-spec/debian/control.in b/t/recipes/checks/debug/obsolete/control-file-general/build-spec/debian/control.in new file mode 100644 index 0000000..3058e5a --- /dev/null +++ b/t/recipes/checks/debug/obsolete/control-file-general/build-spec/debian/control.in @@ -0,0 +1,118 @@ +Source: [% $source %] +Priority: optional +Maintainer: [% $author %] +Standards-Version: [% $standards_version %] +Build-Depends: [% $build_depends %], + fiddle [amd64 powerpc mips mipsel hppa s390], + faddle + (>> + 2) [ + sparc i386 amd64 + ] +Build-Depends-Indep: perl (> 5.8) +Rules-Requires-Root: no +XS-Vcs-Svn: https://svn.example.com/[% $source %]/trunk +#Vcs-Git: git://git.debian.org/collab-maint/.git +#Vcs-Browser: http://git.debian.org/?p=collab-maint/.git;a=summary + +Package: [% $source %] +Section: [% $section %] +Maintainer: [% $author %] +Build-Conflicts: foo +Architecture: all +Pre-depends: ${misc:Pre-depends}, multiarch-support +Depends: [% $source %], foo, baz, ${shlibs:Depends} ${some:Depends}, ${misc:Depends} +Recommends: foo, bar, no-match${lintian:Foo}, match${lintian:Match}, no-match${lintian:Bar}-foo +Suggests: bar | baz, no-match${lintian:Bar}, match${lintian:Match} +Description: [% $description %] + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. + +Package: [% $source %]-1 +Section: [% $section %] +Architecture: all +Depends: ${shlibs:Depends}, ${misc:Depends} +Breaks: libsqlite3-0 (< 3.6.12) +Description: [% $description %] + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. + +Package: [% $source %]-2 +Section: [% $section %] +Architecture: all +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: [% $description %] (two) + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. + +Package: [% $source %]-3 +Section: [% $section %] +Architecture: all +Depends: ${shlibs:Depends}, ${misc:Depends}, foo (>= 1), + baz (<< 2), + fizz (= 2.0), gcc-${pv:gcc} ${reqv:gcc} +Description: [% $description %] (three) + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. + +Package: [% $source %]-4 +Section: [% $section %] +Architecture: all +Depends: ${shlibs:Depends}, ${misc:Depends}, foo | + bar (>= 1), baz +Description: [% $description %] (four) + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. + +Package: [% $source %]-5 +Section: [% $section %] +Architecture: all +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: Description: [% $description %] + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. + +Package: [% $source %]-dbgsym +Section: debug +Architecture: all +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: Description: dbg-sym + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. + +Package: [% $source %]-dbg +Section: debug +Architecture: all +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: Description: debug + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. + +Package: [% $source %]-udeb +Section: debian-installer +Package-Type: udeb +Architecture: all +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: [% $description %] (udeb) + udeb tests. + . + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. diff --git a/t/recipes/checks/debug/obsolete/control-file-general/build-spec/debian/rules b/t/recipes/checks/debug/obsolete/control-file-general/build-spec/debian/rules new file mode 100644 index 0000000..f5db4bb --- /dev/null +++ b/t/recipes/checks/debug/obsolete/control-file-general/build-spec/debian/rules @@ -0,0 +1,8 @@ +#!/usr/bin/make -f +%: + dh $@ + +override_dh_gencontrol: + echo 'pv:gcc=4.3' >> debian/substvars + echo 'reqv:gcc=(>= 4.3-1)' >> debian/substvars + dh_gencontrol diff --git a/t/recipes/checks/debug/obsolete/control-file-general/build-spec/fill-values b/t/recipes/checks/debug/obsolete/control-file-general/build-spec/fill-values new file mode 100644 index 0000000..7338a95 --- /dev/null +++ b/t/recipes/checks/debug/obsolete/control-file-general/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: upload-native +Testname: control-file-general +Description: Various problems with debian/control diff --git a/t/recipes/checks/debug/obsolete/control-file-general/eval/desc b/t/recipes/checks/debug/obsolete/control-file-general/eval/desc new file mode 100644 index 0000000..0821016 --- /dev/null +++ b/t/recipes/checks/debug/obsolete/control-file-general/eval/desc @@ -0,0 +1,11 @@ +Testname: control-file-general +Check: debug/obsolete +See-Also: + Debian Bug#30020, + Debian Bug#409099, + Debian Bug#516706, + Debian Bug#533202, + Debian Bug#557971, + Debian Bug#573399, + Debian Bug#580494, + Debian Bug#657110 diff --git a/t/recipes/checks/debug/obsolete/control-file-general/eval/hints b/t/recipes/checks/debug/obsolete/control-file-general/eval/hints new file mode 100644 index 0000000..f9f2b8c --- /dev/null +++ b/t/recipes/checks/debug/obsolete/control-file-general/eval/hints @@ -0,0 +1 @@ +control-file-general (source): debian-control-has-obsolete-dbg-package (in section for control-file-general-dbg) Package [debian/control:97] diff --git a/t/recipes/checks/debug/obsolete/fields-general/build-spec/debian/control.in b/t/recipes/checks/debug/obsolete/fields-general/build-spec/debian/control.in new file mode 100644 index 0000000..f5aa07a --- /dev/null +++ b/t/recipes/checks/debug/obsolete/fields-general/build-spec/debian/control.in @@ -0,0 +1,46 @@ +Source: [% $source %] +Priority: optional +Section: [% $section %] +Maintainer: [% $author %] +Standards-Version: [% $standards_version %] +Build-Depends: [% $build_depends %] +Rules-Requires-Root: no +Homepage: http://lintian.debian.org/ + +Package: [% $source %] +Architecture: [% $package_architecture %] +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: [% $description %] + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. +# Whoops, typo +Homepage: ttp://lintian.debian.org/ + +Package: [% $source %]-dbg +Section: debug +Architecture: [% $package_architecture %] +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: [% $description %] (dbg) + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. + . + The debug package (dbg)g. +# ... and some unneeded <> +Homepage: + +Package: [% $source %]-debug +Section: debug +Architecture: [% $package_architecture %] +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: [% $description %] (debug) + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. + . + The debug package (debug). + diff --git a/t/recipes/checks/debug/obsolete/fields-general/build-spec/fill-values b/t/recipes/checks/debug/obsolete/fields-general/build-spec/fill-values new file mode 100644 index 0000000..11b0c69 --- /dev/null +++ b/t/recipes/checks/debug/obsolete/fields-general/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: upload-native +Testname: fields-general +Description: Test for tags related to minor field issues diff --git a/t/recipes/checks/debug/obsolete/fields-general/eval/desc b/t/recipes/checks/debug/obsolete/fields-general/eval/desc new file mode 100644 index 0000000..35f28a2 --- /dev/null +++ b/t/recipes/checks/debug/obsolete/fields-general/eval/desc @@ -0,0 +1,2 @@ +Testname: fields-general +Check: debug/obsolete diff --git a/t/recipes/checks/debug/obsolete/fields-general/eval/hints b/t/recipes/checks/debug/obsolete/fields-general/eval/hints new file mode 100644 index 0000000..d52577d --- /dev/null +++ b/t/recipes/checks/debug/obsolete/fields-general/eval/hints @@ -0,0 +1 @@ +fields-general (source): debian-control-has-obsolete-dbg-package (in section for fields-general-dbg) Package [debian/control:21] diff --git a/t/recipes/checks/debug/obsolete/legacy-libbaz/build-spec/debian/changelog.in b/t/recipes/checks/debug/obsolete/legacy-libbaz/build-spec/debian/changelog.in new file mode 100644 index 0000000..91a6bb5 --- /dev/null +++ b/t/recipes/checks/debug/obsolete/legacy-libbaz/build-spec/debian/changelog.in @@ -0,0 +1,6 @@ +libbaz ([% $version %]) [% $distribution %]; urgency=low + + * Initial setup + + -- Sean 'Shaleh' Perry Tue, 30 Jan 2001 15:23:59 -0800 + diff --git a/t/recipes/checks/debug/obsolete/legacy-libbaz/build-spec/debian/compat.in b/t/recipes/checks/debug/obsolete/legacy-libbaz/build-spec/debian/compat.in new file mode 100644 index 0000000..640a566 --- /dev/null +++ b/t/recipes/checks/debug/obsolete/legacy-libbaz/build-spec/debian/compat.in @@ -0,0 +1 @@ +[% $dh_compat_level %] diff --git a/t/recipes/checks/debug/obsolete/legacy-libbaz/build-spec/debian/control b/t/recipes/checks/debug/obsolete/legacy-libbaz/build-spec/debian/control new file mode 100644 index 0000000..1506687 --- /dev/null +++ b/t/recipes/checks/debug/obsolete/legacy-libbaz/build-spec/debian/control @@ -0,0 +1,58 @@ +Source: libbaz +Section: libs +Priority: optional +Maintainer: Lintian Maintainer +Build-depends: debhelper (>=4) +Standards-Version: 3.2.1 + +Package: libbaz1 +Architecture: any +Provides: libbaz +Description: test handling of library packages + Regression test for lintian's handling of libraries. + . + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. + +Package: libbaz1-dev +Architecture: any +Depends: libbaz1 (= ${source:Version}), perlapi-5.8.8 +Description: development package + Regression test for lintian's handling of libraries (dev). + . + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. + +Package: libbaz2 +Architecture: any +Depends: ${shlibs:Depends}, libssl0.9.8 +Description: test handling of library packages (good) + Regression test for lintian's handling of libraries (good). + . + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. + +Package: libbaz2-dev +Architecture: any +Depends: ${shlibs:Depends}, libbaz2 (= ${source:Version}) +Description: development package (good) + Regression test for lintian's handling of libraries (dev good). + . + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. + +Package: libbaz2-dbg +Architecture: any +Depends: libbaz2 (= ${binary:Version}) +Priority: optional +Description: debugging package + Regression test for lintian's handling of libraries (debug). + . + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. + diff --git a/t/recipes/checks/debug/obsolete/legacy-libbaz/build-spec/debian/copyright b/t/recipes/checks/debug/obsolete/legacy-libbaz/build-spec/debian/copyright new file mode 100644 index 0000000..a874c87 --- /dev/null +++ b/t/recipes/checks/debug/obsolete/legacy-libbaz/build-spec/debian/copyright @@ -0,0 +1,8 @@ +This package is released under public domain. This is distributed in the hope +that it will be useful, but without any warranty; without even the implied +warranty of merchantability or fitness for a particular purpose. + +A reference to /usr/share/common-licenses/GPL-2 to make it look like this +package is under the GPL and trigger the OpenSSL warning. + +However, this has an OpenSSL exception. diff --git a/t/recipes/checks/debug/obsolete/legacy-libbaz/build-spec/debian/dev.postinst b/t/recipes/checks/debug/obsolete/legacy-libbaz/build-spec/debian/dev.postinst new file mode 100644 index 0000000..683e3cc --- /dev/null +++ b/t/recipes/checks/debug/obsolete/legacy-libbaz/build-spec/debian/dev.postinst @@ -0,0 +1,4 @@ +#!/bin/sh -e + +$PKG=libbaz1-dev + diff --git a/t/recipes/checks/debug/obsolete/legacy-libbaz/build-spec/debian/dev.prerm b/t/recipes/checks/debug/obsolete/legacy-libbaz/build-spec/debian/dev.prerm new file mode 100644 index 0000000..683e3cc --- /dev/null +++ b/t/recipes/checks/debug/obsolete/legacy-libbaz/build-spec/debian/dev.prerm @@ -0,0 +1,4 @@ +#!/bin/sh -e + +$PKG=libbaz1-dev + diff --git a/t/recipes/checks/debug/obsolete/legacy-libbaz/build-spec/debian/lib.postinst b/t/recipes/checks/debug/obsolete/legacy-libbaz/build-spec/debian/lib.postinst new file mode 100644 index 0000000..ec0b98a --- /dev/null +++ b/t/recipes/checks/debug/obsolete/legacy-libbaz/build-spec/debian/lib.postinst @@ -0,0 +1,10 @@ +#!/bin/sh -e + +$PKG=libbaz1 + +if [ "$1" = "configure" ]; then + if [ -d /usr/doc -a ! -e /usr/doc/$PKG -a -d /usr/share/doc/$PKG ] +; then + ln -sf ../share/doc/$PKG /usr/doc/$PKG + fi +fi diff --git a/t/recipes/checks/debug/obsolete/legacy-libbaz/build-spec/debian/lib.prerm b/t/recipes/checks/debug/obsolete/legacy-libbaz/build-spec/debian/lib.prerm new file mode 100644 index 0000000..50e37c3 --- /dev/null +++ b/t/recipes/checks/debug/obsolete/legacy-libbaz/build-spec/debian/lib.prerm @@ -0,0 +1,7 @@ +#!/bin/sh -e + +$PKG=libbaz1 + +if [ \( "$1" = "upgrade" -o "$1" = "remove" \) -a -L /usr/doc/$PKG ]; then + rm -f /usr/doc/$PKG +fi diff --git a/t/recipes/checks/debug/obsolete/legacy-libbaz/build-spec/debian/lib.shlibs b/t/recipes/checks/debug/obsolete/legacy-libbaz/build-spec/debian/lib.shlibs new file mode 100644 index 0000000..b88e288 --- /dev/null +++ b/t/recipes/checks/debug/obsolete/legacy-libbaz/build-spec/debian/lib.shlibs @@ -0,0 +1,8 @@ +libdoesntexist2 1.0 libbaz1 +libdoesntexist2 1.0 libbaz1 +libbaz2 1.1 libbaz +libbaz3 1 libbaz1 (>> 1-1) +libbaz4 1 libbaz1 (= 1-1) +libbaz5 1 libbaz2 +udeb: libdoesntexist2 1.0 libbaz2 +udeb: libdoesntexist2 1.0 libbaz2 diff --git a/t/recipes/checks/debug/obsolete/legacy-libbaz/build-spec/debian/lib.symbols b/t/recipes/checks/debug/obsolete/legacy-libbaz/build-spec/debian/lib.symbols new file mode 100644 index 0000000..72f9d8a --- /dev/null +++ b/t/recipes/checks/debug/obsolete/legacy-libbaz/build-spec/debian/lib.symbols @@ -0,0 +1,3 @@ +libbaz.so.2 libbaz1 #MINVER# + pw 1-1 + foo 1.1-1 diff --git a/t/recipes/checks/debug/obsolete/legacy-libbaz/build-spec/debian/rules b/t/recipes/checks/debug/obsolete/legacy-libbaz/build-spec/debian/rules new file mode 100755 index 0000000..fa99bc8 --- /dev/null +++ b/t/recipes/checks/debug/obsolete/legacy-libbaz/build-spec/debian/rules @@ -0,0 +1,121 @@ +#!/usr/bin/make -f + +lib_tmp=debian/tmp-lib +dev_tmp=debian/tmp-dev + +LIB=libbaz1 +DEV=libbaz1-dev + +VENDORARCH := $(shell perl -MConfig -wE'say substr($$Config{vendorarch},1)') + +build-arch: + $(MAKE) + +build-indep: + +build: build-arch build-indep + +clean: + $(MAKE) clean + dh_clean -plibbaz2 -plibbaz2-dev + rm -f debian/files debian/substvars + rm -rf $(lib_tmp) $(dev_tmp) + +# Now the correct libbaz2-dev package +binary-correct: + install -d debian/libbaz2-dev/usr/lib + cp -a libbaz2.a libbaz2.so debian/libbaz2-dev/usr/lib + # usually, I'd also include some .h files to /usr/include + + # Now the correct libbaz2 package + install -d debian/libbaz2/usr/lib + cp -a libbaz2.so.* debian/libbaz2/usr/lib + chmod a-x debian/libbaz2/usr/lib/* + + # General stuff that is tested in other testsets: + dh_installdocs -plibbaz2 -plibbaz2-dev -plibbaz2-dbg + dh_compress -plibbaz2 -plibbaz2-dev -plibbaz2-dbg + + # Mess up the libbaz2 changelog files to test the symlink handling. + ln -s /usr/share/doc/lintian/changelog.gz \ + debian/libbaz2/usr/share/doc/libbaz2/changelog.gz + install -m 644 debian/changelog \ + debian/libbaz2-dev/usr/share/doc/libbaz2-dev/foo + ln -s foo debian/libbaz2-dev/usr/share/doc/libbaz2-dev/changelog + + # Okay, if either line is omitted, it should be noted + dh_strip --dbg-package=libbaz2-dbg -plibbaz2 -plibbaz2-dev + dh_makeshlibs -plibbaz2 -plibbaz2-dev -plibbaz2-dbg + dh_shlibdeps -plibbaz2 -plibbaz2-dev -plibbaz2-dbg + + # and again, regular packaging stuff + dh_installdeb -plibbaz2 -plibbaz2-dev -plibbaz2-dbg + echo udeb: libbaz2 1.0 libbaz2 >> debian/libbaz2/DEBIAN/shlibs + dh_gencontrol -plibbaz2 -plibbaz2-dev -plibbaz2-dbg + dh_builddeb -plibbaz2 -plibbaz2-dev -plibbaz2-dbg + +# and the incorrect one +binary-arch: build-arch binary-correct + # first, the lib package + install -d $(lib_tmp)/usr/lib + # resp. no soname (check), wrong soname (check), and no-pic (check) + cp -a libbaz1.so.1.0* $(lib_tmp)/usr/lib + cp -a libbaz2.so.1.0.3b $(lib_tmp)/usr/lib/libfoo2.so.1.0.3b + install -m644 libbaz3.so.1.0.3b $(lib_tmp)/usr/lib/libbaz3.so.1.0.3b + # let's include the .a in the non-dev too (TODO) + # Also, libbaz1.a hasn't a symbol table (TODO) + cp -a *.a $(lib_tmp)/usr/lib + # And a wrong .so symlink (wrong, only in -dev, TODO) + ln -s libfoo3.so.0.9 $(lib_tmp)/usr/lib/libfoo3.so + # And a wrong .so.X symlink (wrong, should point to a real existing + # shlib, TODO) + ln -s libfoo.so.0.9.1 $(lib_tmp)/usr/lib/libfoo.so.0.9 + # And a plain .so (wrong, TODO) + touch $(lib_tmp)/usr/lib/libbar2.so + # And a non-versioned SONAME. + install -m644 libbaz.so $(lib_tmp)/usr/lib/libbaz.so + strip --remove-section=.comment --strip-unneeded $(lib_tmp)/usr/lib/libbaz.so + # Pretend to be a Perl module to test a lack of Perl dependencies. + install -d $(lib_tmp)/$(VENDORARCH)/auto/Foo + install -m 644 libbaz2.so.1.0.3b $(lib_tmp)/$(VENDORARCH)/auto/Foo/Foo.so + strip $(lib_tmp)/$(VENDORARCH)/auto/Foo/Foo.so + + install -d $(lib_tmp)/usr/share/doc/$(LIB) + install -m 644 debian/copyright $(lib_tmp)/usr/share/doc/$(LIB) + install -m 644 debian/changelog $(lib_tmp)/usr/share/doc/$(LIB) + gzip -n -9 $(lib_tmp)/usr/share/doc/$(LIB)/changelog + install -d $(lib_tmp)/DEBIAN + install -m 755 debian/lib.postinst $(lib_tmp)/DEBIAN/postinst + install -m 755 debian/lib.prerm $(lib_tmp)/DEBIAN/prerm + touch $(lib_tmp)/usr/share/doc/README.Debian + #dpkg-shlibdeps $(lib_tmp)/usr/lib/libbaz.so.1.0 + install -m 755 debian/lib.shlibs $(lib_tmp)/DEBIAN/shlibs + install -m 755 debian/lib.symbols $(lib_tmp)/DEBIAN/symbols + dpkg-gencontrol -isp -p$(LIB) -P$(lib_tmp) + dpkg --build $(lib_tmp) .. + + # now the -dev package + install -d $(dev_tmp)/usr/include + install -d $(lib_tmp)/usr/lib + # let's also install the .so at the same time... (wrong, TODO) + cp -a *.a *.so.* $(lib_tmp)/usr/lib + # and fuck up permission (TODO) + chmod a+x $(lib_tmp)/usr/lib/*.a + # Pretend to be a Perl module to test a lack of Perl dependencies. + install -d $(dev_tmp)/$(VENDORARCH)/auto/Foo + install -m 644 libbaz2.so.1.0.3b $(dev_tmp)/$(VENDORARCH)/auto/Foo/Foo.so + strip $(dev_tmp)/$(VENDORARCH)/auto/Foo/Foo.so + install -d $(dev_tmp)/usr/share/doc + ln -s $(LIB) $(dev_tmp)/usr/share/doc/$(DEV) + install -d $(dev_tmp)/DEBIAN + install -m 755 debian/dev.postinst $(dev_tmp)/DEBIAN/postinst + install -m 755 debian/dev.prerm $(dev_tmp)/DEBIAN/prerm + dpkg-gencontrol -isp -p$(DEV) -P$(dev_tmp) + dpkg --build $(dev_tmp) .. + + +binary: binary-arch + +# The mention of binary-indep here should be sufficient to suppress the +# warning that it's not present. +.PHONY: build-arch build-indep build binary-arch binary-indep binary clean diff --git a/t/recipes/checks/debug/obsolete/legacy-libbaz/build-spec/debian/source.lintian-overrides b/t/recipes/checks/debug/obsolete/legacy-libbaz/build-spec/debian/source.lintian-overrides new file mode 100644 index 0000000..6008d27 --- /dev/null +++ b/t/recipes/checks/debug/obsolete/legacy-libbaz/build-spec/debian/source.lintian-overrides @@ -0,0 +1 @@ +libbaz source: maintainer-script-lacks-debhelper-token diff --git a/t/recipes/checks/debug/obsolete/legacy-libbaz/build-spec/fill-values b/t/recipes/checks/debug/obsolete/legacy-libbaz/build-spec/fill-values new file mode 100644 index 0000000..7effe4f --- /dev/null +++ b/t/recipes/checks/debug/obsolete/legacy-libbaz/build-spec/fill-values @@ -0,0 +1,6 @@ +Skeleton: upload-non-native +Testname: legacy-libbaz +Source: libbaz +Version: 1-1 +Default-Build-Depends: debhelper (>= 9.20151004~) +Description: Legacy test "libbaz" diff --git a/t/recipes/checks/debug/obsolete/legacy-libbaz/build-spec/orig/Makefile b/t/recipes/checks/debug/obsolete/legacy-libbaz/build-spec/orig/Makefile new file mode 100644 index 0000000..657dc2a --- /dev/null +++ b/t/recipes/checks/debug/obsolete/legacy-libbaz/build-spec/orig/Makefile @@ -0,0 +1,55 @@ +# This is the correct way to build a lib + +CC=gcc +CFLAGS=-g -Wall -Winline -O2 +LDFLAGS=-Wl,--no-as-needed + +OBJS=baz.o extra.o +SHOBJS=baz.sho extra.sho +NOPICOBJS = $(SHOBJS) + +all: libbaz1.a libbaz2.a libbaz1.so.1.0.3b libbaz2.so libbaz3.so.1.0.3b \ + libbaz.so + +libbaz2.so: libbaz2.so.1.0 + ln -sf $^ $@ +libbaz2.so.1.0: libbaz2.so.1.0.3b + ln -sf $^ $@ + +# Oops, forget the soname altogether +libbaz1.so.1.0.3b: $(NOPICOBJS) + $(CC) $(LDFLAGS) -o $@ -shared $^ -lc + +libbaz2.so.1.0.3b: $(SHOBJS) + $(CC) $(LDFLAGS) -o $@ -shared -Wl,-soname,libbaz2.so.1.0 $^ -lc + +# Non-PIC. We can't test this on all architectures +libbaz3.so.1.0.3b: $(NOPICOBJS) + $(CC) $(LDFLAGS) -o $@ -shared -Wl,-soname,libbaz3.so.1 $^ -lc + +# Non-versioned SONAME. +libbaz.so: $(SHOBJS) + $(CC) $(LDFLAGS) -o $@ -shared -Wl,-soname,libbaz.so $^ -lc + +#%.o-noreentrant: %.c +# $(CC) $(LDFLAGS) $(CFLAGS) -o $@ -c $< + +%.sho: %.c + $(CC) $(LDFLAGS) $(CFLAGS) -D_REENTRANT -fPIC -o $@ -c $< + +%.o: %.c + $(CC) $(LDFLAGS) $(CFLAGS) -D_REENTRANT -o $@ -c $< + +libbaz2.a: $(OBJS) + ar cq $@ $(OBJS) + strip --strip-unneeded --remove-section=.comment \ + --remove-section=-note $@ + ranlib $@ + +# The pic one in the .a (wrong), no archive table +libbaz1.a: $(SHOBJS) + ar cqS $@ $^ + strip --strip-unneeded --remove-section=.comment \ + --remove-section=-note $@ +clean: + rm -f *.a *.o *.so* *.sho diff --git a/t/recipes/checks/debug/obsolete/legacy-libbaz/build-spec/orig/baz.c b/t/recipes/checks/debug/obsolete/legacy-libbaz/build-spec/orig/baz.c new file mode 100644 index 0000000..4d5fc45 --- /dev/null +++ b/t/recipes/checks/debug/obsolete/legacy-libbaz/build-spec/orig/baz.c @@ -0,0 +1,6 @@ +#include + +double pw(double p) +{ + return exp(p); +} diff --git a/t/recipes/checks/debug/obsolete/legacy-libbaz/build-spec/orig/extra.c b/t/recipes/checks/debug/obsolete/legacy-libbaz/build-spec/orig/extra.c new file mode 100644 index 0000000..e69de29 diff --git a/t/recipes/checks/debug/obsolete/legacy-libbaz/eval/desc b/t/recipes/checks/debug/obsolete/legacy-libbaz/eval/desc new file mode 100644 index 0000000..68eb0d3 --- /dev/null +++ b/t/recipes/checks/debug/obsolete/legacy-libbaz/eval/desc @@ -0,0 +1,2 @@ +Testname: legacy-libbaz +Check: debug/obsolete diff --git a/t/recipes/checks/debug/obsolete/legacy-libbaz/eval/hints b/t/recipes/checks/debug/obsolete/legacy-libbaz/eval/hints new file mode 100644 index 0000000..306ecd5 --- /dev/null +++ b/t/recipes/checks/debug/obsolete/legacy-libbaz/eval/hints @@ -0,0 +1 @@ +libbaz (source): debian-control-has-obsolete-dbg-package (in section for libbaz2-dbg) Package [debian/control:48] diff --git a/t/recipes/checks/debug/obsolete/legacy-libbaz/eval/post-test b/t/recipes/checks/debug/obsolete/legacy-libbaz/eval/post-test new file mode 100755 index 0000000..29dc3f4 --- /dev/null +++ b/t/recipes/checks/debug/obsolete/legacy-libbaz/eval/post-test @@ -0,0 +1,4 @@ +/: hardening-.*/ d +s/\(current is ([0-9]+\.)+[0-9]\)/(current is CURRENT)/ +s,usr/lib/([^\/]*/)?perl[0-9]*(/[0-9]*\.[0-9]*)?/,usr/lib/ma-dir/perl/version/,g +/: file-references-package-build-path / d diff --git a/t/recipes/checks/desktop/dbus/dbus-policy/build-spec/debian/install b/t/recipes/checks/desktop/dbus/dbus-policy/build-spec/debian/install new file mode 100644 index 0000000..ee19d5d --- /dev/null +++ b/t/recipes/checks/desktop/dbus/dbus-policy/build-spec/debian/install @@ -0,0 +1 @@ +etc diff --git a/t/recipes/checks/desktop/dbus/dbus-policy/build-spec/fill-values b/t/recipes/checks/desktop/dbus/dbus-policy/build-spec/fill-values new file mode 100644 index 0000000..8466676 --- /dev/null +++ b/t/recipes/checks/desktop/dbus/dbus-policy/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: upload-native +Testname: dbus-policy +Description: test deprecated D-Bus policies diff --git a/t/recipes/checks/desktop/dbus/dbus-policy/build-spec/orig/etc/dbus-1/system.d/at-console.conf b/t/recipes/checks/desktop/dbus/dbus-policy/build-spec/orig/etc/dbus-1/system.d/at-console.conf new file mode 100644 index 0000000..8c47adb --- /dev/null +++ b/t/recipes/checks/desktop/dbus/dbus-policy/build-spec/orig/etc/dbus-1/system.d/at-console.conf @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/t/recipes/checks/desktop/dbus/dbus-policy/build-spec/orig/etc/dbus-1/system.d/send-destination.conf b/t/recipes/checks/desktop/dbus/dbus-policy/build-spec/orig/etc/dbus-1/system.d/send-destination.conf new file mode 100644 index 0000000..ae052ff --- /dev/null +++ b/t/recipes/checks/desktop/dbus/dbus-policy/build-spec/orig/etc/dbus-1/system.d/send-destination.conf @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/t/recipes/checks/desktop/dbus/dbus-policy/eval/desc b/t/recipes/checks/desktop/dbus/dbus-policy/eval/desc new file mode 100644 index 0000000..a1b0e16 --- /dev/null +++ b/t/recipes/checks/desktop/dbus/dbus-policy/eval/desc @@ -0,0 +1,2 @@ +Testname: dbus-policy +Check: desktop/dbus diff --git a/t/recipes/checks/desktop/dbus/dbus-policy/eval/hints b/t/recipes/checks/desktop/dbus/dbus-policy/eval/hints new file mode 100644 index 0000000..164613f --- /dev/null +++ b/t/recipes/checks/desktop/dbus/dbus-policy/eval/hints @@ -0,0 +1,8 @@ +dbus-policy (binary): dbus-policy-without-send-destination [etc/dbus-1/system.d/send-destination.conf:2] +dbus-policy (binary): dbus-policy-without-send-destination [etc/dbus-1/system.d/send-destination.conf:5] +dbus-policy (binary): dbus-policy-without-send-destination [etc/dbus-1/system.d/send-destination.conf:4] +dbus-policy (binary): dbus-policy-without-send-destination [etc/dbus-1/system.d/send-destination.conf:3] +dbus-policy (binary): dbus-policy-excessively-broad [etc/dbus-1/system.d/send-destination.conf:5] +dbus-policy (binary): dbus-policy-excessively-broad [etc/dbus-1/system.d/send-destination.conf:4] +dbus-policy (binary): dbus-policy-at-console [etc/dbus-1/system.d/at-console.conf:3] +dbus-policy (binary): dbus-policy-at-console [etc/dbus-1/system.d/at-console.conf:4] diff --git a/t/recipes/checks/desktop/dbus/dbus-services/build-spec/debian/install b/t/recipes/checks/desktop/dbus/dbus-services/build-spec/debian/install new file mode 100644 index 0000000..73752c9 --- /dev/null +++ b/t/recipes/checks/desktop/dbus/dbus-services/build-spec/debian/install @@ -0,0 +1 @@ +usr diff --git a/t/recipes/checks/desktop/dbus/dbus-services/build-spec/fill-values b/t/recipes/checks/desktop/dbus/dbus-services/build-spec/fill-values new file mode 100644 index 0000000..694bdb7 --- /dev/null +++ b/t/recipes/checks/desktop/dbus/dbus-services/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: upload-native +Testname: dbus-services +Description: test D-Bus .service files diff --git a/t/recipes/checks/desktop/dbus/dbus-services/build-spec/orig/usr/share/dbus-1/services/gvfs-daemon.service b/t/recipes/checks/desktop/dbus/dbus-services/build-spec/orig/usr/share/dbus-1/services/gvfs-daemon.service new file mode 100644 index 0000000..1a8607d --- /dev/null +++ b/t/recipes/checks/desktop/dbus/dbus-services/build-spec/orig/usr/share/dbus-1/services/gvfs-daemon.service @@ -0,0 +1,3 @@ +[D-BUS Service] +Name=org.gtk.vfs.Daemon +Exec=/usr/lib/gvfs/gvfsd diff --git a/t/recipes/checks/desktop/dbus/dbus-services/build-spec/orig/usr/share/dbus-1/services/org.mpris.MediaPlayer2.mpd.service b/t/recipes/checks/desktop/dbus/dbus-services/build-spec/orig/usr/share/dbus-1/services/org.mpris.MediaPlayer2.mpd.service new file mode 100644 index 0000000..3f14f4a --- /dev/null +++ b/t/recipes/checks/desktop/dbus/dbus-services/build-spec/orig/usr/share/dbus-1/services/org.mpris.MediaPlayer2.mpd.service @@ -0,0 +1,3 @@ +[D-BUS Service] +Name=org.mpris.MediaPlayer2.mpd +Exec=/usr/bin/mpDris2 diff --git a/t/recipes/checks/desktop/dbus/dbus-services/build-spec/orig/usr/share/dbus-1/system-services/org.freedesktop.PolicyKit1.service b/t/recipes/checks/desktop/dbus/dbus-services/build-spec/orig/usr/share/dbus-1/system-services/org.freedesktop.PolicyKit1.service new file mode 100644 index 0000000..51d1f94 --- /dev/null +++ b/t/recipes/checks/desktop/dbus/dbus-services/build-spec/orig/usr/share/dbus-1/system-services/org.freedesktop.PolicyKit1.service @@ -0,0 +1,5 @@ +[D-BUS Service] +Name=org.freedesktop.PolicyKit1 +Exec=/usr/lib/policykit-1/polkitd --no-debug +User=root +SystemdService=polkitd.service diff --git a/t/recipes/checks/desktop/dbus/dbus-services/build-spec/orig/usr/share/dbus-1/system-services/this-name-cannot-work.service b/t/recipes/checks/desktop/dbus/dbus-services/build-spec/orig/usr/share/dbus-1/system-services/this-name-cannot-work.service new file mode 100644 index 0000000..e87a5bb --- /dev/null +++ b/t/recipes/checks/desktop/dbus/dbus-services/build-spec/orig/usr/share/dbus-1/system-services/this-name-cannot-work.service @@ -0,0 +1,4 @@ +[D-BUS Service] +Name=com.example.SystemDaemon1 +Exec=/usr/sbin/example-system-daemon +User=nobody diff --git a/t/recipes/checks/desktop/dbus/dbus-services/eval/desc b/t/recipes/checks/desktop/dbus/dbus-services/eval/desc new file mode 100644 index 0000000..8102dfa --- /dev/null +++ b/t/recipes/checks/desktop/dbus/dbus-services/eval/desc @@ -0,0 +1,2 @@ +Testname: dbus-services +Check: desktop/dbus diff --git a/t/recipes/checks/desktop/dbus/dbus-services/eval/hints b/t/recipes/checks/desktop/dbus/dbus-services/eval/hints new file mode 100644 index 0000000..1f45b32 --- /dev/null +++ b/t/recipes/checks/desktop/dbus/dbus-services/eval/hints @@ -0,0 +1,2 @@ +dbus-services (binary): dbus-system-service-wrong-name better: com.example.SystemDaemon1.service [usr/share/dbus-1/system-services/this-name-cannot-work.service] +dbus-services (binary): dbus-session-service-wrong-name better: org.gtk.vfs.Daemon.service [usr/share/dbus-1/services/gvfs-daemon.service] diff --git a/t/recipes/checks/desktop/gnome/files-foo-in-bar/build-spec/debian/clean b/t/recipes/checks/desktop/gnome/files-foo-in-bar/build-spec/debian/clean new file mode 100644 index 0000000..be4ae72 --- /dev/null +++ b/t/recipes/checks/desktop/gnome/files-foo-in-bar/build-spec/debian/clean @@ -0,0 +1,5 @@ +bar.1* +Bar.pm +bar.png +perllocal.pod +preferences diff --git a/t/recipes/checks/desktop/gnome/files-foo-in-bar/build-spec/debian/dirs b/t/recipes/checks/desktop/gnome/files-foo-in-bar/build-spec/debian/dirs new file mode 100644 index 0000000..e8759c9 --- /dev/null +++ b/t/recipes/checks/desktop/gnome/files-foo-in-bar/build-spec/debian/dirs @@ -0,0 +1,15 @@ +etc/apt/preferences.d +etc/apt +etc/init +bin/foo +mnt/foo +tmp/foo +usr/bin/foo +usr/foo +usr/lib/debug +usr/local/foo +usr/lib/site-python/foo +usr/share/doc/files-foo-in-bar/examples/examples +var/foo +var/lock/foo +var/run/foo diff --git a/t/recipes/checks/desktop/gnome/files-foo-in-bar/build-spec/debian/install b/t/recipes/checks/desktop/gnome/files-foo-in-bar/build-spec/debian/install new file mode 100644 index 0000000..ba46865 --- /dev/null +++ b/t/recipes/checks/desktop/gnome/files-foo-in-bar/build-spec/debian/install @@ -0,0 +1,61 @@ +bar bin/foo +bar emul +bar etc/apt/preferences.d +bar etc/apt/sources.list.d +bar etc/apt/trusted.gpg.d +bar etc/gconf/schemas/ +bar etc/init +bar etc/rc.boot +bar etc/rc.d +bar etc/udev/rules.d +bar lib32 +bar lib64 +bar libx32 +bar mnt/foo +bar run/foo +bar srv/foo +bar tmp/foo +bar usr/bin/foo +bar usr/foo +bar usr/lib/debug/ +bar usr/lib32 +bar usr/lib64 +bar usr/libexec +bar usr/libx32 +bar usr/lib/perl/ +bar usr/lib/python2.7/ +bar usr/lib/sgml +bar usr/lib/site-python/foo +bar usr/local/foo +bar usr/share +bar usr/share/doc +bar usr/share/doc/files-foo-in-bar/.xvpics/ +bar usr/share/doc/files-foo-in-bar/.thumbnails/ +bar usr/share/doc/files-foo-in-bar/examples/examples +bar usr/share/mime/foo/ +bar usr/share/mime/packages/ +bar usr/share/perl/ +bar usr/share/vim/vimcurrent/ +bar usr/share/vim/vim73/ +bar usr/X11R6/bin +bar usr/X11R6/lib/X11/fonts/ +bar var/foo +bar var/lock/foo +bar var/run/foo +bar var/www/foo +bar home/johndoe +bar root +bar etc/opt +bar var/cache/pbuilder/build +bar var/lib/sbuild +bar var/lib/buildd +bar build/dir/foo +bar tmp/buildd/dir/foo +bar etc/dhcp3 + +Bar.pm usr/lib/perl5/Foo +bar.png usr/lib/files-foo-in-bar + +perllocal.pod usr/lib/perl-foo +.packlist usr/lib/perl5 +preferences etc/apt diff --git a/t/recipes/checks/desktop/gnome/files-foo-in-bar/build-spec/debian/manpages b/t/recipes/checks/desktop/gnome/files-foo-in-bar/build-spec/debian/manpages new file mode 100644 index 0000000..e69de29 diff --git a/t/recipes/checks/desktop/gnome/files-foo-in-bar/build-spec/debian/rules b/t/recipes/checks/desktop/gnome/files-foo-in-bar/build-spec/debian/rules new file mode 100755 index 0000000..69a61df --- /dev/null +++ b/t/recipes/checks/desktop/gnome/files-foo-in-bar/build-spec/debian/rules @@ -0,0 +1,18 @@ +#!/usr/bin/make -f +%: + dh $@ + +override_dh_auto_build: + pod2man --section 1 bar.pod > bar.1 + gzip -n --best bar.1 + cp bar Bar.pm + cp bar bar.png + cp bar perllocal.pod + touch .packlist + touch preferences + +override_dh_auto_install: + dh_install bar.1.gz usr/X11R6/man/man1/ + +# skip +override_dh_usrlocal override_dh_gconf: diff --git a/t/recipes/checks/desktop/gnome/files-foo-in-bar/build-spec/fill-values b/t/recipes/checks/desktop/gnome/files-foo-in-bar/build-spec/fill-values new file mode 100644 index 0000000..17ea927 --- /dev/null +++ b/t/recipes/checks/desktop/gnome/files-foo-in-bar/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: upload-native +Testname: files-foo-in-bar +Description: Test tags about files or dirs in given paths diff --git a/t/recipes/checks/desktop/gnome/files-foo-in-bar/build-spec/orig/bar b/t/recipes/checks/desktop/gnome/files-foo-in-bar/build-spec/orig/bar new file mode 100644 index 0000000..980a0d5 --- /dev/null +++ b/t/recipes/checks/desktop/gnome/files-foo-in-bar/build-spec/orig/bar @@ -0,0 +1 @@ +Hello World! diff --git a/t/recipes/checks/desktop/gnome/files-foo-in-bar/build-spec/orig/bar.pod b/t/recipes/checks/desktop/gnome/files-foo-in-bar/build-spec/orig/bar.pod new file mode 100644 index 0000000..4144a36 --- /dev/null +++ b/t/recipes/checks/desktop/gnome/files-foo-in-bar/build-spec/orig/bar.pod @@ -0,0 +1,18 @@ + +=head1 NAME + +bar - does stuff + +=head1 SYNOPSIS + +bar + +=head1 DESCRIPTION + +Does nothing. + +=head1 AUTHOR + +Niels Thykier + +=cut diff --git a/t/recipes/checks/desktop/gnome/files-foo-in-bar/eval/desc b/t/recipes/checks/desktop/gnome/files-foo-in-bar/eval/desc new file mode 100644 index 0000000..f48544d --- /dev/null +++ b/t/recipes/checks/desktop/gnome/files-foo-in-bar/eval/desc @@ -0,0 +1,2 @@ +Testname: files-foo-in-bar +Check: desktop/gnome diff --git a/t/recipes/checks/desktop/gnome/files-foo-in-bar/eval/hints b/t/recipes/checks/desktop/gnome/files-foo-in-bar/eval/hints new file mode 100644 index 0000000..c030bf5 --- /dev/null +++ b/t/recipes/checks/desktop/gnome/files-foo-in-bar/eval/hints @@ -0,0 +1 @@ +files-foo-in-bar (binary): package-installs-into-etc-gconf-schemas [etc/gconf/schemas/bar] diff --git a/t/recipes/checks/desktop/gnome/files-foo-in-bar/eval/post-test b/t/recipes/checks/desktop/gnome/files-foo-in-bar/eval/post-test new file mode 100644 index 0000000..5af7ea2 --- /dev/null +++ b/t/recipes/checks/desktop/gnome/files-foo-in-bar/eval/post-test @@ -0,0 +1,2 @@ +# Ignore all duplicate-files tags +/[^ ]* \([^)]*\): duplicate-files .*/ d diff --git a/t/recipes/checks/desktop/gnome/gir/gir/build-spec/debian/control.in b/t/recipes/checks/desktop/gnome/gir/gir/build-spec/debian/control.in new file mode 100644 index 0000000..e664631 --- /dev/null +++ b/t/recipes/checks/desktop/gnome/gir/gir/build-spec/debian/control.in @@ -0,0 +1,87 @@ +Source: [% $source %] +Priority: optional +Section: libs +Maintainer: [% $author %] +Standards-Version: [% $standards_version %] +Build-Depends: [% $build_depends %] +Rules-Requires-Root: no + +Package: gir1.2-bad +Section: misc +Architecture: all +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: [% $description %] + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. + . + This package gets GObject-Introspection wrong in various ways. + +Package: gir1.2-good-42 +Section: oldlibs +Architecture: any +Provides: gir1.2-goodextras-42 (= ${binary:Version}) +Depends: ${gir:Depends}, ${shlibs:Depends}, ${misc:Depends}, libgood-42-0 +Description: [% $description %] - GIR + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. + . + This contains the GObject-Introspection typelib. + . + This package is in the oldlibs section (a deprecated typelib), unlike + gir1.2-perfect-42 which is in the introspection section. + +Package: libgood-42-dev +Section: oldlibs +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends}, gir1.2-good-42 (= ${binary:Version}), libgood-42-0 (= ${binary:Version}) +Description: [% $description %] - development + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. + . + This package is in the oldlibs section (a deprecated development + package), unlike libperfect-42-dev which is in the libdevel section. + +Package: libgood-42-0 +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: [% $description %] - shared library + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. + . + This is the shared library. + +Package: gir1.2-perfect-42 +Section: introspection +Architecture: any +Depends: ${gir:Depends}, ${shlibs:Depends}, ${misc:Depends}, libperfect-42-0 +Description: [% $description %] - GIR with multiarch + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. + . + This contains the GObject-Introspection typelib, with multiarch. + +Package: libperfect-42-dev +Section: libdevel +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends}, gir1.2-perfect-42 (= ${binary:Version}), libperfect-42-0 (= ${binary:Version}) +Description: [% $description %] - development with multiarch + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. + . + This contains the development files, with multiarch. + +Package: libperfect-42-0 +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: [% $description %] - shared library with multiarch + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. + . + This is the shared library, with multiarch. diff --git a/t/recipes/checks/desktop/gnome/gir/gir/build-spec/debian/gir1.2-bad.install b/t/recipes/checks/desktop/gnome/gir/gir/build-spec/debian/gir1.2-bad.install new file mode 100644 index 0000000..c83626e --- /dev/null +++ b/t/recipes/checks/desktop/gnome/gir/gir/build-spec/debian/gir1.2-bad.install @@ -0,0 +1,2 @@ +usr/lib/girepository-1.0/Bad-23.typelib +usr/share/gir-1.0/Bad-23.gir diff --git a/t/recipes/checks/desktop/gnome/gir/gir/build-spec/debian/gir1.2-good-42.install b/t/recipes/checks/desktop/gnome/gir/gir/build-spec/debian/gir1.2-good-42.install new file mode 100644 index 0000000..5f1692f --- /dev/null +++ b/t/recipes/checks/desktop/gnome/gir/gir/build-spec/debian/gir1.2-good-42.install @@ -0,0 +1,2 @@ +usr/lib/girepository-1.0/Good-42.typelib +usr/lib/girepository-1.0/GoodExtras-42.typelib diff --git a/t/recipes/checks/desktop/gnome/gir/gir/build-spec/debian/gir1.2-perfect-42.install b/t/recipes/checks/desktop/gnome/gir/gir/build-spec/debian/gir1.2-perfect-42.install new file mode 100644 index 0000000..195f200 --- /dev/null +++ b/t/recipes/checks/desktop/gnome/gir/gir/build-spec/debian/gir1.2-perfect-42.install @@ -0,0 +1 @@ +usr/lib/*/girepository-1.0/Perfect-42.typelib diff --git a/t/recipes/checks/desktop/gnome/gir/gir/build-spec/debian/libgood-42-0.install b/t/recipes/checks/desktop/gnome/gir/gir/build-spec/debian/libgood-42-0.install new file mode 100644 index 0000000..5bff9aa --- /dev/null +++ b/t/recipes/checks/desktop/gnome/gir/gir/build-spec/debian/libgood-42-0.install @@ -0,0 +1 @@ +usr/lib/libgood-42-0-dummy diff --git a/t/recipes/checks/desktop/gnome/gir/gir/build-spec/debian/libgood-42-dev.install b/t/recipes/checks/desktop/gnome/gir/gir/build-spec/debian/libgood-42-dev.install new file mode 100644 index 0000000..1bc5a2c --- /dev/null +++ b/t/recipes/checks/desktop/gnome/gir/gir/build-spec/debian/libgood-42-dev.install @@ -0,0 +1,3 @@ +usr/share/gir-1.0/Good-42.gir +usr/share/gir-1.0/GoodExtras-42.gir +usr/lib/libgood-42-dev-dummy diff --git a/t/recipes/checks/desktop/gnome/gir/gir/build-spec/debian/libperfect-42-0.install b/t/recipes/checks/desktop/gnome/gir/gir/build-spec/debian/libperfect-42-0.install new file mode 100644 index 0000000..75b60a2 --- /dev/null +++ b/t/recipes/checks/desktop/gnome/gir/gir/build-spec/debian/libperfect-42-0.install @@ -0,0 +1 @@ +usr/lib/*/libperfect-42-0-dummy diff --git a/t/recipes/checks/desktop/gnome/gir/gir/build-spec/debian/libperfect-42-dev.install b/t/recipes/checks/desktop/gnome/gir/gir/build-spec/debian/libperfect-42-dev.install new file mode 100644 index 0000000..7d0a75b --- /dev/null +++ b/t/recipes/checks/desktop/gnome/gir/gir/build-spec/debian/libperfect-42-dev.install @@ -0,0 +1,2 @@ +usr/share/gir-1.0/Perfect-42.gir +usr/lib/*/libperfect-42-dev-dummy diff --git a/t/recipes/checks/desktop/gnome/gir/gir/build-spec/fill-values b/t/recipes/checks/desktop/gnome/gir/gir/build-spec/fill-values new file mode 100644 index 0000000..7a86e74 --- /dev/null +++ b/t/recipes/checks/desktop/gnome/gir/gir/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: upload-native +Testname: gir +Description: test GObject-Introspection diff --git a/t/recipes/checks/desktop/gnome/gir/gir/build-spec/orig/Makefile b/t/recipes/checks/desktop/gnome/gir/gir/build-spec/orig/Makefile new file mode 100644 index 0000000..a91332d --- /dev/null +++ b/t/recipes/checks/desktop/gnome/gir/gir/build-spec/orig/Makefile @@ -0,0 +1,7 @@ +multiarch := $(shell dpkg-architecture -qDEB_HOST_ARCH) + +all: + install -d usr/lib/$(multiarch)/girepository-1.0 + cp usr/lib/libgood-42-dev-dummy usr/lib/$(multiarch)/libperfect-42-dev-dummy + cp usr/lib/libgood-42-0-dummy usr/lib/$(multiarch)/libperfect-42-0-dummy + cp usr/lib/girepository-1.0/Good-42.typelib usr/lib/$(multiarch)/girepository-1.0/Perfect-42.typelib diff --git a/t/recipes/checks/desktop/gnome/gir/gir/build-spec/orig/usr/lib/girepository-1.0/Bad-23.typelib b/t/recipes/checks/desktop/gnome/gir/gir/build-spec/orig/usr/lib/girepository-1.0/Bad-23.typelib new file mode 100644 index 0000000..64fba42 --- /dev/null +++ b/t/recipes/checks/desktop/gnome/gir/gir/build-spec/orig/usr/lib/girepository-1.0/Bad-23.typelib @@ -0,0 +1 @@ +not really a typelib diff --git a/t/recipes/checks/desktop/gnome/gir/gir/build-spec/orig/usr/lib/girepository-1.0/Good-42.typelib b/t/recipes/checks/desktop/gnome/gir/gir/build-spec/orig/usr/lib/girepository-1.0/Good-42.typelib new file mode 100644 index 0000000..64fba42 --- /dev/null +++ b/t/recipes/checks/desktop/gnome/gir/gir/build-spec/orig/usr/lib/girepository-1.0/Good-42.typelib @@ -0,0 +1 @@ +not really a typelib diff --git a/t/recipes/checks/desktop/gnome/gir/gir/build-spec/orig/usr/lib/girepository-1.0/GoodExtras-42.typelib b/t/recipes/checks/desktop/gnome/gir/gir/build-spec/orig/usr/lib/girepository-1.0/GoodExtras-42.typelib new file mode 100644 index 0000000..64fba42 --- /dev/null +++ b/t/recipes/checks/desktop/gnome/gir/gir/build-spec/orig/usr/lib/girepository-1.0/GoodExtras-42.typelib @@ -0,0 +1 @@ +not really a typelib diff --git a/t/recipes/checks/desktop/gnome/gir/gir/build-spec/orig/usr/lib/libgood-42-0-dummy b/t/recipes/checks/desktop/gnome/gir/gir/build-spec/orig/usr/lib/libgood-42-0-dummy new file mode 100644 index 0000000..e69de29 diff --git a/t/recipes/checks/desktop/gnome/gir/gir/build-spec/orig/usr/lib/libgood-42-dev-dummy b/t/recipes/checks/desktop/gnome/gir/gir/build-spec/orig/usr/lib/libgood-42-dev-dummy new file mode 100644 index 0000000..e69de29 diff --git a/t/recipes/checks/desktop/gnome/gir/gir/build-spec/orig/usr/share/gir-1.0/Bad-23.gir b/t/recipes/checks/desktop/gnome/gir/gir/build-spec/orig/usr/share/gir-1.0/Bad-23.gir new file mode 100644 index 0000000..59e267d --- /dev/null +++ b/t/recipes/checks/desktop/gnome/gir/gir/build-spec/orig/usr/share/gir-1.0/Bad-23.gir @@ -0,0 +1 @@ +not really GIR diff --git a/t/recipes/checks/desktop/gnome/gir/gir/build-spec/orig/usr/share/gir-1.0/Good-42.gir b/t/recipes/checks/desktop/gnome/gir/gir/build-spec/orig/usr/share/gir-1.0/Good-42.gir new file mode 100644 index 0000000..59e267d --- /dev/null +++ b/t/recipes/checks/desktop/gnome/gir/gir/build-spec/orig/usr/share/gir-1.0/Good-42.gir @@ -0,0 +1 @@ +not really GIR diff --git a/t/recipes/checks/desktop/gnome/gir/gir/build-spec/orig/usr/share/gir-1.0/GoodExtras-42.gir b/t/recipes/checks/desktop/gnome/gir/gir/build-spec/orig/usr/share/gir-1.0/GoodExtras-42.gir new file mode 100644 index 0000000..59e267d --- /dev/null +++ b/t/recipes/checks/desktop/gnome/gir/gir/build-spec/orig/usr/share/gir-1.0/GoodExtras-42.gir @@ -0,0 +1 @@ +not really GIR diff --git a/t/recipes/checks/desktop/gnome/gir/gir/build-spec/orig/usr/share/gir-1.0/Perfect-42.gir b/t/recipes/checks/desktop/gnome/gir/gir/build-spec/orig/usr/share/gir-1.0/Perfect-42.gir new file mode 100644 index 0000000..59e267d --- /dev/null +++ b/t/recipes/checks/desktop/gnome/gir/gir/build-spec/orig/usr/share/gir-1.0/Perfect-42.gir @@ -0,0 +1 @@ +not really GIR diff --git a/t/recipes/checks/desktop/gnome/gir/gir/eval/desc b/t/recipes/checks/desktop/gnome/gir/gir/eval/desc new file mode 100644 index 0000000..f54de23 --- /dev/null +++ b/t/recipes/checks/desktop/gnome/gir/gir/eval/desc @@ -0,0 +1,3 @@ +Testname: gir +Check: desktop/gnome/gir +Test-Architecture: amd64 diff --git a/t/recipes/checks/desktop/gnome/gir/gir/eval/hints b/t/recipes/checks/desktop/gnome/gir/gir/eval/hints new file mode 100644 index 0000000..9811f07 --- /dev/null +++ b/t/recipes/checks/desktop/gnome/gir/gir/eval/hints @@ -0,0 +1,10 @@ +gir (source): typelib-missing-gir-depends gir1.2-bad [debian/control] +gir1.2-good-42 (binary): typelib-not-in-multiarch-directory usr/lib/x86_64-linux-gnu/girepository-1.0 [usr/lib/girepository-1.0/GoodExtras-42.typelib] +gir1.2-good-42 (binary): typelib-not-in-multiarch-directory usr/lib/x86_64-linux-gnu/girepository-1.0 [usr/lib/girepository-1.0/Good-42.typelib] +gir1.2-bad (binary): typelib-section-not-introspection misc [usr/lib/girepository-1.0/Bad-23.typelib] +gir1.2-bad (binary): typelib-package-name-does-not-match gir1.2-bad-23 [usr/lib/girepository-1.0/Bad-23.typelib] +gir1.2-bad (binary): typelib-not-in-multiarch-directory usr/lib/${DEB_HOST_MULTIARCH}/girepository-1.0 [usr/lib/girepository-1.0/Bad-23.typelib] +gir1.2-bad (binary): typelib-in-arch-all-package [usr/lib/girepository-1.0/Bad-23.typelib] +gir1.2-bad (binary): gir-section-not-libdevel misc [usr/share/gir-1.0/Bad-23.gir] +gir1.2-bad (binary): gir-missing-typelib-dependency gir1.2-bad-23 [usr/share/gir-1.0/Bad-23.gir] +gir1.2-bad (binary): gir-in-arch-all-package [usr/share/gir-1.0/Bad-23.gir] diff --git a/t/recipes/checks/desktop/gnome/gir/gir/eval/post-test b/t/recipes/checks/desktop/gnome/gir/gir/eval/post-test new file mode 100644 index 0000000..56d219b --- /dev/null +++ b/t/recipes/checks/desktop/gnome/gir/gir/eval/post-test @@ -0,0 +1 @@ +s, usr/lib/[^/${}]+/girepository-1.0$, usr/lib/MULTIARCH/girepository-1.0, diff --git a/t/recipes/checks/desktop/gnome/gir/substvars/control-file-gobject-introspection-package-missing-gir-depends/build-spec/debian/control.in b/t/recipes/checks/desktop/gnome/gir/substvars/control-file-gobject-introspection-package-missing-gir-depends/build-spec/debian/control.in new file mode 100644 index 0000000..7c8bf78 --- /dev/null +++ b/t/recipes/checks/desktop/gnome/gir/substvars/control-file-gobject-introspection-package-missing-gir-depends/build-spec/debian/control.in @@ -0,0 +1,29 @@ +Source: [% $source %] +Section: introspection +Priority: optional +Maintainer: [% $author %] +Standards-Version: [% $standards_version %] +Build-Depends: [% $build_depends %] +Rules-Requires-Root: no + +Package: gir1.1-missing-gir-depends-2.2 +Architecture: [% $package_architecture %] +Depends: ${misc:Depends} +Description: [% $description %] + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. + . + This package should be tagged by Lintian. + +Package: gir1.1-gir-depends-present-2.2 +Architecture: [% $package_architecture %] +Depends: ${misc:Depends}, ${gir:Depends} +Description: [% $description %]: False + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. + . + This package should not be tagged by Lintian. diff --git a/t/recipes/checks/desktop/gnome/gir/substvars/control-file-gobject-introspection-package-missing-gir-depends/build-spec/fill-values b/t/recipes/checks/desktop/gnome/gir/substvars/control-file-gobject-introspection-package-missing-gir-depends/build-spec/fill-values new file mode 100644 index 0000000..019383e --- /dev/null +++ b/t/recipes/checks/desktop/gnome/gir/substvars/control-file-gobject-introspection-package-missing-gir-depends/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: upload-native +Testname: control-file-gobject-introspection-package-missing-gir-depends +Description: Check for missing binary dependencies on ${gir:Depends} diff --git a/t/recipes/checks/desktop/gnome/gir/substvars/control-file-gobject-introspection-package-missing-gir-depends/eval/desc b/t/recipes/checks/desktop/gnome/gir/substvars/control-file-gobject-introspection-package-missing-gir-depends/eval/desc new file mode 100644 index 0000000..4509573 --- /dev/null +++ b/t/recipes/checks/desktop/gnome/gir/substvars/control-file-gobject-introspection-package-missing-gir-depends/eval/desc @@ -0,0 +1,2 @@ +Testname: control-file-gobject-introspection-package-missing-gir-depends +Check: desktop/gnome/gir/substvars diff --git a/t/recipes/checks/desktop/gnome/gir/substvars/control-file-gobject-introspection-package-missing-gir-depends/eval/hints b/t/recipes/checks/desktop/gnome/gir/substvars/control-file-gobject-introspection-package-missing-gir-depends/eval/hints new file mode 100644 index 0000000..3807818 --- /dev/null +++ b/t/recipes/checks/desktop/gnome/gir/substvars/control-file-gobject-introspection-package-missing-gir-depends/eval/hints @@ -0,0 +1 @@ +control-file-gobject-introspection-package-missing-gir-depends (source): gobject-introspection-package-missing-depends-on-gir-depends gir1.1-missing-gir-depends-2.2 [debian/control] diff --git a/t/recipes/checks/desktop/gnome/legacy-filenames/build-spec/debian/changelog.in b/t/recipes/checks/desktop/gnome/legacy-filenames/build-spec/debian/changelog.in new file mode 100644 index 0000000..b79c4ca --- /dev/null +++ b/t/recipes/checks/desktop/gnome/legacy-filenames/build-spec/debian/changelog.in @@ -0,0 +1,78 @@ +filenames ([% $version %]) [% $distribution %]; urgency=low + + * /me is doing a correct NMU of this package, bumping the epoch too. + + -- Jeroen van Wolffelaar Sun, 18 Apr 2004 02:04:39 +0200 + +filenames (11) unstable; urgency=low + + * Add a README.macos. + + -- Marc 'HE' Brockschmidt Mon, 12 Apr 2004 23:35:24 +0200 + +filenames (10) unstable; urgency=low + + * Some new files to check the checks for the use of /usr/*/X11 and + /usr/X11R6/*. + + -- Marc 'HE' Brockschmidt Sun, 11 Apr 2004 17:35:20 +0200 + +filenames (9) unstable; urgency=low + + * Add a two *.ali files, one with the right permission, one with + the more common, but false one. + + -- Marc 'HE' Brockschmidt Sun, 11 Apr 2004 00:18:16 +0200 + +filenames (8) unstable; urgency=low + + * Add a real ancient file + + -- Frank Lichtenheld Thu, 8 Apr 2004 22:22:40 +0200 + +filenames (7) unstable; urgency=low + + * Add a dozen symlinks, some correct, some not + + -- Jeroen van Wolffelaar Fri, 27 Feb 2004 01:28:42 +0100 + +filenames (6) unstable; urgency=low + + * Add perl files to check if + package-installs-nonbinary-perl-in-usr-lib-perl5 is correctly + issued even after attempting to suppress it in some cases + + -- Frank Lichtenheld Fri, 27 Feb 2004 00:49:44 +0100 + +filenames (5) unstable; urgency=low + + * Added check for too long symlink + + -- Sean 'Shaleh' Perry Wed, 3 Jan 2001 13:20:31 -0800 + +filenames (4) unstable; urgency=low + + * Add /usr/lib/menu/menu file to test the bad-menu-file-name tag. + * Add /usr/lib/menu/README to test the new execption for it. + + -- Richard Braakman Thu, 22 Oct 1998 15:42:52 +0200 + +filenames (3) unstable; urgency=low + + * Don't rely on the installer's umask. + + -- Richard Braakman Thu, 20 Aug 1998 12:45:47 +0200 + +filenames (2) unstable; urgency=low + + * Noted more limitations on what filenames lintian handles. + * Added Changes.gz in /usr/doc/filenames and made a symlink from changelog.gz + to Changes.gz. + + -- Richard Braakman Sat, 4 Jul 1998 15:46:11 +0200 + +filenames (1) unstable; urgency=low + + * Initial version + + -- Richard Braakman Sat, 4 Jul 1998 15:25:01 +0200 diff --git a/t/recipes/checks/desktop/gnome/legacy-filenames/build-spec/debian/control b/t/recipes/checks/desktop/gnome/legacy-filenames/build-spec/debian/control new file mode 100644 index 0000000..1ff9c50 --- /dev/null +++ b/t/recipes/checks/desktop/gnome/legacy-filenames/build-spec/debian/control @@ -0,0 +1,42 @@ +Source: filenames +Maintainer: Lintian Maintainer +Standards-Version: 3.1.1 +Rules-Requires-Root: binary-targets + +Package: filenames +Architecture: any +Description: see how lintian reacts to weird filenames + This package contains files with the most evil names I could find, + except for ones that lintian is explicitly not designed to handle. + . + Lintian does not handle filenames containing newlines, or filenames + that contain the strings " link to ", " -> ", or ": ". The last one + is used as a separator by the file command, the others are used as + separators by tar. + . + Lintian also does not handle filenames that contain backslashes, or + other characters that are mangled by tar's -tv output. + +Package: filename-games +Architecture: all +Depends: filenames +Section: games +Description: Test game filename/location checks + This package contains files with slightly less evil names than + filenames. + . + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. + +Package: more-filename-games +Architecture: all +Depends: filenames, filename-games +Section: games +Priority: optional +Description: More test for game filename/location checks + This package contains no evil names, only evil locations. + . + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. diff --git a/t/recipes/checks/desktop/gnome/legacy-filenames/build-spec/debian/doc-base b/t/recipes/checks/desktop/gnome/legacy-filenames/build-spec/debian/doc-base new file mode 100644 index 0000000..e5a611b --- /dev/null +++ b/t/recipes/checks/desktop/gnome/legacy-filenames/build-spec/debian/doc-base @@ -0,0 +1,11 @@ +Document: testing +Title: Working doc-base control file +Author: Russ Allbery +Abstract: This control file ensures that we don't get false positives for + correct doc-base files. + . + There isn't anything wrong with this one. +Section: Education + +Format: Text +Files: /usr/share/doc/filenames/README.macosx diff --git a/t/recipes/checks/desktop/gnome/legacy-filenames/build-spec/debian/rules b/t/recipes/checks/desktop/gnome/legacy-filenames/build-spec/debian/rules new file mode 100755 index 0000000..0b9e87c --- /dev/null +++ b/t/recipes/checks/desktop/gnome/legacy-filenames/build-spec/debian/rules @@ -0,0 +1,231 @@ +#!/usr/bin/make -f + +# Copyright (C) 1998 Richard Braakman +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +VENDORARCH := $(shell perl -MConfig -wE'say substr($$Config{vendorarch},1)') + +clean: + mkdir -p .svn CVS "{arch}" .arch-ids .bzr + touch data/.cvsignore data/svn-commit.tmp data/svk-commitsEr9P.tmp + touch data/.arch-inventory + touch 'data/.#Maelstrom Sound.1.1.1' 'data/Maelstrom Sounce.r121' + touch 'data/Maelstrom Sound.mine' + touch "data/'\\ " + touch filenames.c~ + +build-arch: + +build-indep: + +build: build-arch build-indep + + +binary-arch: + +binary-indep: + install -d debian/tmp/DEBIAN + cp -a data debian/tmp/files + chmod -R go=rX debian/tmp/files + + install -d debian/tmp/usr/lib/filenames + install -m 555 -d debian/tmp/usr/lib/filenames/readonly + touch debian/tmp/usr/lib/filenames/readonly/test + + install -d debian/tmp/usr/lib/menu + install -d debian/tmp/usr/share/menu + touch debian/tmp/usr/lib/menu/README + touch debian/tmp/usr/share/menu/README + touch debian/tmp/usr/lib/menu/menu + touch debian/tmp/usr/share/menu/menu + chmod 644 debian/tmp/usr/lib/menu/* + + install -d debian/tmp/$(VENDORARCH)/foo + mkdir debian/tmp/$(VENDORARCH)/.svn + mkdir debian/tmp/$(VENDORARCH)/CVS + mkdir "debian/tmp/$(VENDORARCH)/{arch}" + mkdir debian/tmp/$(VENDORARCH)/.arch-ids + mkdir debian/tmp/$(VENDORARCH)/.bzr + mkdir debian/tmp/$(VENDORARCH)/.be + mkdir debian/tmp/$(VENDORARCH)/.ditrack + install -d debian/tmp/usr/share/perl5 + echo foo > debian/tmp/$(VENDORARCH)/foo/.gitignore + echo foo > debian/tmp/$(VENDORARCH)/foo/.hgignore + echo foo > debian/tmp/$(VENDORARCH)/foo/.hgtags + echo foo > debian/tmp/$(VENDORARCH)/foo/.hg_archival.txt + + touch debian/tmp/$(VENDORARCH)/foo/.packlist + chmod 644 debian/tmp/$(VENDORARCH)/foo/.packlist + touch debian/tmp/$(VENDORARCH)/foo/bar.pm + TZ=UTC touch -t 197501010101 debian/tmp/$(VENDORARCH)/foo/ancient.pm + chmod 644 debian/tmp/$(VENDORARCH)/foo/bar.pm + + install -d debian/tmp/usr/share/pixmaps + install -d debian/tmp/usr/share/pixmaps/foo + touch debian/tmp/usr/share/pixmaps/license.jpeg + touch debian/tmp/usr/share/pixmaps/licence.jpg + touch debian/tmp/usr/share/pixmaps/copying.xpm + touch debian/tmp/usr/share/pixmaps/foo/COPYING.svg + touch debian/tmp/usr/share/pixmaps/foo/copying.png + touch debian/tmp/usr/share/pixmaps/license.txt + touch debian/tmp/usr/share/pixmaps/license.foo + touch debian/tmp/usr/share/pixmaps/COPYING + + install -d debian/tmp/usr/share/linda/overrides + echo 'foo' > debian/tmp/usr/share/linda/overrides/filenames + + install -d debian/tmp/usr/share/doc/filenames + touch debian/tmp/usr/share/doc/filenames/README.macosx + + echo foo > debian/tmp/usr/share/doc/filenames/bokmål + echo foo > debian/tmp/usr/share/doc/filenames/bokm\\ål + echo foo > debian/tmp/usr/share/doc/filenames/bokml + echo foo > debian/tmp/usr/share/doc/filenames/bokm\\l + + echo foo > debian/tmp/usr/share/doc/filenames/Thumbs.db + echo foo > debian/tmp/usr/share/doc/filenames/.DS_Store + echo foo > debian/tmp/usr/share/doc/filenames/._NEWS.Debian + + touch debian/tmp/usr/share/doc/filenames/news.debian + gzip -n debian/tmp/usr/share/doc/filenames/news.debian + touch debian/tmp/usr/share/doc/filenames/NEWS.Debian + + echo foo > debian/tmp/usr/share/doc/filenames/link-one + ln debian/tmp/usr/share/doc/filenames/link-one \ + debian/tmp/usr/share/doc/filenames/link-two + + install -d debian/tmp/usr/share/doc/filenames/examples + touch debian/tmp/usr/share/doc/filenames/examples/__init__.py + touch debian/tmp/usr/share/doc/filenames/examples/very_interesting_example + touch debian/tmp/usr/share/doc/filenames/examples/very_interesting_example2 + gzip -n debian/tmp/usr/share/doc/filenames/examples/very_interesting_example2 + + install -d debian/tmp/usr/lib/ada/adalib/ + touch debian/tmp/usr/lib/ada/adalib/test.ali debian/tmp/usr/lib/ada/adalib/test2.ali + chmod 0644 debian/tmp/usr/lib/ada/adalib/test.ali + chmod 0444 debian/tmp/usr/lib/ada/adalib/test2.ali + + install -d debian/tmp/usr/bin/X11/ + touch debian/tmp/usr/bin/X11/testxbin + install -d debian/tmp/usr/X11R6/bin + touch debian/tmp/usr/X11R6/bin/testxbin2 + install -d debian/tmp/usr/include/X11 + touch debian/tmp/usr/include/X11/foo.h + + install -d debian/tmp/usr/bin/mh + touch debian/tmp/usr/bin/mh/read + chmod 755 debian/tmp/usr/bin/mh/read + install -d debian/tmp/usr/bin/bin + touch debian/tmp/usr/bin/bin/bad + chmod 755 debian/tmp/usr/bin/bin/bad + + install -m 644 debian/changelog debian/tmp/usr/share/doc/filenames/Changes + gzip -n -9 debian/tmp/usr/share/doc/filenames/Changes + ln -s Changes.gz debian/tmp/usr/share/doc/filenames/changelog.gz + + install -d debian/tmp/var/www + echo foo > debian/tmp/var/www/foo + + install -d debian/tmp/srv/foo + touch debian/tmp/srv/foo/bar + install -d debian/tmp/opt/foo + touch debian/tmp/opt/foo/bar + + install -d debian/tmp/etc/gconf/schemas + touch debian/tmp/etc/gconf/schemas/test.schema + + install -d debian/tmp/usr/lib/sgml + touch debian/tmp/usr/lib/sgml/package + + install -d debian/tmp/usr/share/gnome/apps/System + touch debian/tmp/usr/share/gnome/apps/System/foo.desktop + + install -d debian/tmp/usr/share/filenames + touch debian/tmp/usr/share/filenames/jquery.js + touch debian/tmp/usr/share/filenames/jquery.lite.js + touch debian/tmp/usr/share/filenames/jquery.min.js + touch debian/tmp/usr/share/filenames/jquery.pack.js + touch debian/tmp/usr/share/filenames/mochikit.js + touch debian/tmp/usr/share/filenames/prototype-1.2.3.4.js + touch debian/tmp/usr/share/filenames/prototype.js + touch debian/tmp/usr/share/filenames/prototype.js.gz + touch debian/tmp/usr/share/filenames/scriptaculous.js + touch debian/tmp/usr/share/filenames/yahoo-dom-event.js + touch debian/tmp/usr/share/filenames/yahoo-min.js + + ln -s '../filenames/doc/version6.txt.gz' debian/tmp/usr/share/doc/filenames/version.txt.gz + ln -s ../../share/symlink debian/tmp/usr/lib/filenames/symlink1ok + ln -s ../../../etc/symlink debian/tmp/usr/lib/filenames/symlink1wrong + ln -s ../../../../etc/symlink debian/tmp/usr/lib/filenames/symlink2wrong + ln -s /etc/symlink debian/tmp/usr/lib/filenames/symlink2ok + ln -s /usr/lib/filenames/symlink2 debian/tmp/usr/lib/filenames/symlink3wrong + ln -s test debian/tmp/usr/lib/filenames/symlink3ok + ln -s ../filenames/symlink2 debian/tmp/usr/lib/filenames/symlink4wrong + ln -s ../menu/../somethingelse debian/tmp/usr/lib/filenames/symlink5wrong + ln -s ../menu/somethingelse debian/tmp/usr/lib/filenames/symlink4ok + ln -s ./file4 debian/tmp/usr/lib/filenames/symlink6wrong + ln -s ../menu/./something debian/tmp/usr/lib/filenames/symlink7wrong + ln -s ../menu//something debian/tmp/usr/lib/filenames/symlink8wrong + ln -s ../menu/something/ debian/tmp/usr/lib/filenames/symlink9wrong + ln -s .. debian/tmp/usr/lib/filenames/symlink5ok+warn + ln -s . debian/tmp/usr/lib/filenames/symlink6ok+warn + ln -s / debian/tmp/usr/lib/filenames/symlink7ok+warn + ln -s ../../.. debian/tmp/usr/lib/filenames/symlink10wrong + +# devhelp tests. Files in /usr/share/gtk-doc/html or /usr/share/devhelp/books +# are okay. Files elsewhere are okay iff their parent path is symlinked into +# one of those paths. + install -d debian/tmp/usr/share/devhelp/books/filenames + echo 'Not really XML' > debian/tmp/usr/share/devhelp/books/filenames/a.devhelp + echo 'Not really XML' > debian/tmp/usr/share/devhelp/books/filenames/.devhelp2 + gzip -n -9 debian/tmp/usr/share/devhelp/books/filenames/.devhelp2 + install -d debian/tmp/usr/share/gtk-doc/html/filenames + echo 'Not really XML' > debian/tmp/usr/share/gtk-doc/html/filenames/b.devhelp + gzip -n -9 debian/tmp/usr/share/gtk-doc/html/filenames/b.devhelp + install -d debian/tmp/usr/share/doc/filenames/good-devhelp + echo 'Not really XML' > debian/tmp/usr/share/doc/filenames/good-devhelp/.devhelp2 + install -d debian/tmp/usr/share/doc/filenames/bad-devhelp + echo 'Not really XML' > debian/tmp/usr/share/doc/filenames/bad-devhelp/c.devhelp + gzip -n -9 debian/tmp/usr/share/doc/filenames/bad-devhelp/c.devhelp + ln -s ../../doc/filenames/good-devhelp debian/tmp/usr/share/gtk-doc/html/good + ln -s ../doc/filenames/bad-devhelp debian/tmp/usr/share/gtk-doc/html/bad + + install -d debian/tmp/usr/share/doc-base + install -m 644 debian/doc-base debian/tmp/usr/share/doc-base/filenames + + dpkg-gencontrol -pfilenames -Pdebian/tmp + dpkg --build debian/tmp .. + + install -d debian/filename-games debian/filename-games/DEBIAN + install -d debian/filename-games/usr debian/filename-games/usr/games debian/filename-games/usr/bin + echo '#! /bin/sh' > debian/filename-games/usr/bin/test-game + chmod 755 debian/filename-games/usr/bin/test-game + dpkg-gencontrol -pfilename-games -Pdebian/filename-games + dpkg --build debian/filename-games .. + + install -d debian/more-filename-games debian/more-filename-games/DEBIAN + install -d debian/more-filename-games/usr debian/more-filename-games/usr/games debian/more-filename-games/usr/bin + echo '#! /bin/sh' > debian/more-filename-games/usr/bin/another-test-game + echo '#! /bin/sh' > debian/more-filename-games/usr/games/yet-another-test-game + chmod 755 debian/more-filename-games/usr/bin/another-test-game debian/more-filename-games/usr/games/yet-another-test-game + dpkg-gencontrol -pmore-filename-games -Pdebian/more-filename-games + dpkg --build debian/more-filename-games .. + +binary: binary-arch binary-indep + +.PHONY: build-indep build-arch build binary-arch binary-indep binary clean diff --git a/t/recipes/checks/desktop/gnome/legacy-filenames/build-spec/fill-values b/t/recipes/checks/desktop/gnome/legacy-filenames/build-spec/fill-values new file mode 100644 index 0000000..062a1ea --- /dev/null +++ b/t/recipes/checks/desktop/gnome/legacy-filenames/build-spec/fill-values @@ -0,0 +1,5 @@ +Skeleton: upload-non-native +Testname: legacy-filenames +Source: filenames +Version: 1:12-0.1 +Description: Legacy test "filenames" diff --git a/t/recipes/checks/desktop/gnome/legacy-filenames/build-spec/orig/data/ .tif b/t/recipes/checks/desktop/gnome/legacy-filenames/build-spec/orig/data/ .tif new file mode 100644 index 0000000..07fd914 --- /dev/null +++ b/t/recipes/checks/desktop/gnome/legacy-filenames/build-spec/orig/data/ .tif @@ -0,0 +1,2 @@ +This filename was inspired by the ".tif used by fnlib. The real package +uses space.tif. diff --git "a/t/recipes/checks/desktop/gnome/legacy-filenames/build-spec/orig/data/\".tif" "b/t/recipes/checks/desktop/gnome/legacy-filenames/build-spec/orig/data/\".tif" new file mode 100644 index 0000000..e005775 --- /dev/null +++ "b/t/recipes/checks/desktop/gnome/legacy-filenames/build-spec/orig/data/\".tif" @@ -0,0 +1 @@ +This filename is really used, by fnlib. diff --git a/t/recipes/checks/desktop/gnome/legacy-filenames/build-spec/orig/data/Maelstrom Sound b/t/recipes/checks/desktop/gnome/legacy-filenames/build-spec/orig/data/Maelstrom Sound new file mode 100644 index 0000000..4110410 --- /dev/null +++ b/t/recipes/checks/desktop/gnome/legacy-filenames/build-spec/orig/data/Maelstrom Sound @@ -0,0 +1 @@ +This filename occurs in the maelstrom package. diff --git a/t/recipes/checks/desktop/gnome/legacy-filenames/eval/desc b/t/recipes/checks/desktop/gnome/legacy-filenames/eval/desc new file mode 100644 index 0000000..edb26ba --- /dev/null +++ b/t/recipes/checks/desktop/gnome/legacy-filenames/eval/desc @@ -0,0 +1,2 @@ +Testname: legacy-filenames +Check: desktop/gnome diff --git a/t/recipes/checks/desktop/gnome/legacy-filenames/eval/hints b/t/recipes/checks/desktop/gnome/legacy-filenames/eval/hints new file mode 100644 index 0000000..3e3cc43 --- /dev/null +++ b/t/recipes/checks/desktop/gnome/legacy-filenames/eval/hints @@ -0,0 +1 @@ +filenames (binary): package-installs-into-etc-gconf-schemas [etc/gconf/schemas/test.schema] diff --git a/t/recipes/checks/desktop/gnome/legacy-filenames/eval/post-test b/t/recipes/checks/desktop/gnome/legacy-filenames/eval/post-test new file mode 100644 index 0000000..571e35d --- /dev/null +++ b/t/recipes/checks/desktop/gnome/legacy-filenames/eval/post-test @@ -0,0 +1,3 @@ +s/\(current is ([0-9]+\.)+[0-9]\)/(current is CURRENT)/ +s,usr/lib/([^\/]*/)?perl[0-9]*(/[0-9]*\.[0-9]*)?/,usr/lib/ma-dir/perl/version/,g +/package-installs-packlist/ d diff --git a/t/recipes/checks/desktop/icons/files-general/build-spec/debian/clean b/t/recipes/checks/desktop/icons/files-general/build-spec/debian/clean new file mode 100644 index 0000000..222b726 --- /dev/null +++ b/t/recipes/checks/desktop/icons/files-general/build-spec/debian/clean @@ -0,0 +1 @@ +鳥の詩.1 diff --git a/t/recipes/checks/desktop/icons/files-general/build-spec/debian/dirs b/t/recipes/checks/desktop/icons/files-general/build-spec/debian/dirs new file mode 100644 index 0000000..b76fb64 --- /dev/null +++ b/t/recipes/checks/desktop/icons/files-general/build-spec/debian/dirs @@ -0,0 +1,13 @@ +etc +etc/skel +usr/bin +usr/doc +usr/lib/python3/dist-packages/foo +usr/share/foo +usr/share/fonts/X11/misc +usr/share/glib-2.0/schemas +usr/share/hal +usr/share/man/man1/random +var/catman +var/lock/lintian +var/run/lintian diff --git a/t/recipes/checks/desktop/icons/files-general/build-spec/debian/examples b/t/recipes/checks/desktop/icons/files-general/build-spec/debian/examples new file mode 100644 index 0000000..18fb10f --- /dev/null +++ b/t/recipes/checks/desktop/icons/files-general/build-spec/debian/examples @@ -0,0 +1 @@ +foo.vcproj diff --git a/t/recipes/checks/desktop/icons/files-general/build-spec/debian/install b/t/recipes/checks/desktop/icons/files-general/build-spec/debian/install new file mode 100644 index 0000000..dccb61e --- /dev/null +++ b/t/recipes/checks/desktop/icons/files-general/build-spec/debian/install @@ -0,0 +1,18 @@ +lintian-16x16.png usr/share/apps/lintian/icons/hicolor/22x22 +lintian-16x16.png usr/share/icons/hicolor/22x22/apps +lintian-22x22.png usr/share/apps/lintian/icons/hicolor/22x22 +lintian-22x22.png usr/share/apps/lintian/icons/hicolor/20x20 +lintian-16x16.png usr/share/doc/lintian/ +lintian-22x22.png usr/share/games/icons/hicolor/22x22 +lintian-16x16.png usr/share/icons/hicolor/scalable/apps +lintian-22x22.png usr/share/icons/16x16/animations/ +--lzma etc/modprobe.d +lintian.conf etc/modprobe.d +dir usr/share/info +foo.vcproj usr/lib/foo +lintian-lib.conf etc/ld.so.conf.d +php-foo.ini etc/php/7.0/mods-available +types usr/share/mime +mimeinfo.cache usr/share/applications +file-in-new-top-level-dir new-top-level-dir/ +sudotest etc/sudoers.d/ diff --git a/t/recipes/checks/desktop/icons/files-general/build-spec/debian/links b/t/recipes/checks/desktop/icons/files-general/build-spec/debian/links new file mode 100644 index 0000000..f3e425d --- /dev/null +++ b/t/recipes/checks/desktop/icons/files-general/build-spec/debian/links @@ -0,0 +1 @@ +usr/share/apps/lintian/icons/hicolor/22x22/lintian-22x22.png usr/share/apps/lintian/icons/hicolor/64x64/lintian-64x64.png diff --git a/t/recipes/checks/desktop/icons/files-general/build-spec/debian/manpages b/t/recipes/checks/desktop/icons/files-general/build-spec/debian/manpages new file mode 100644 index 0000000..e8af11b --- /dev/null +++ b/t/recipes/checks/desktop/icons/files-general/build-spec/debian/manpages @@ -0,0 +1,2 @@ +foo.5 +鳥の詩.1 diff --git a/t/recipes/checks/desktop/icons/files-general/build-spec/debian/rules b/t/recipes/checks/desktop/icons/files-general/build-spec/debian/rules new file mode 100755 index 0000000..798f01e --- /dev/null +++ b/t/recipes/checks/desktop/icons/files-general/build-spec/debian/rules @@ -0,0 +1,67 @@ +#!/usr/bin/make -f + +tmp := $(CURDIR)/debian/$(shell dh_listpackages) + +%: + dh $@ + +override_dh_install: + dh_install + echo "#fake conf file" > $(tmp)/etc/pam.conf + # true positives + touch $(tmp)/etc/skel/.lintianrc + # false positives + touch $(tmp)/etc/skel/.bashrc + touch $(tmp)/etc/skel/.bash_logout + touch $(tmp)/etc/skel/.profile + touch $(tmp)/etc/skel/.kshrc + touch $(tmp)/etc/skel/.mkshrc + echo "Back-up file" > $(tmp)/usr/share/foo/file~ + # The name of the "binary" is "Tori no Uta" + # If it is ever messed up, it can be restored by + # using something like: + # perl -pe 's/\@FILE\@/\xe9\xb3\xa5\xe3\x81\xae\xe8\xa9\xa9\x0a/' + echo "#!/bin/sh" > $(tmp)/usr/bin/鳥の詩 + chmod +x $(tmp)/usr/bin/鳥の詩 + # Copy the manpage to its correct name so dh_installman can + # find it. + # - d/clean will remove it again + cp -a tnu.1 鳥の詩.1 + touch $(tmp)/usr/doc/FSSTND + touch $(tmp)/usr/share/foo/'*' + touch $(tmp)/usr/share/foo/'ws ' + touch $(tmp)/usr/share/fonts/X11/misc/fonts.dir + touch $(tmp)/usr/share/fonts/X11/misc/fonts.scale + touch $(tmp)/usr/share/fonts/X11/misc/fonts.alias + touch $(tmp)/usr/share/fonts/X11/misc/encodings.dir + touch $(tmp)/usr/share/fonts/X11/misc/false-positive + touch $(tmp)/usr/share/foo/.nfs-fake-tmpfile + touch $(tmp)/usr/share/foo/foo.doctree + touch $(tmp)/usr/share/foo/gschemas.compiled + touch $(tmp)/usr/share/glib-2.0/schemas/gschemas.compiled + touch $(tmp)/usr/share/hal/foo.fdi + touch $(tmp)/usr/lib/python3/dist-packages/test_foo.py + touch $(tmp)/usr/lib/python3/dist-packages/foo/test_falsepositive.py + # If the following line gets messed up, it can be + # restored with something like: + # sed -i 's/@FILE@/bokm\xe5l/' + touch $(tmp)/usr/share/foo/bokml + touch $(tmp)/var/catman/do + +override_dh_fixperms: + dh_fixperms + chmod 755 $(tmp)/usr/share/man/man5/foo.5.gz + chmod 644 $(tmp)/etc/sudoers.d/* + +override_dh_compress: + dh_compress + # create a .png and .png.gz + gzip -n -1 $(tmp)/usr/share/doc/lintian/lintian-16x16.png + zcat $(tmp)/usr/share/doc/lintian/lintian-16x16.png.gz > \ + $(tmp)/usr/share/doc/lintian/lintian-16x16.png + +override_dh_link: + dh_link + mkdir -p $(tmp)/usr/share/doc/bar + echo "Hallo World" > $(tmp)/usr/share/doc/bar/foo + ln -s ../bar/foo $(tmp)/usr/share/doc/bar/star diff --git a/t/recipes/checks/desktop/icons/files-general/build-spec/fill-values b/t/recipes/checks/desktop/icons/files-general/build-spec/fill-values new file mode 100644 index 0000000..45de709 --- /dev/null +++ b/t/recipes/checks/desktop/icons/files-general/build-spec/fill-values @@ -0,0 +1,4 @@ +Skeleton: upload-native +Testname: files-general +Description: Test tags for file paths, names, and modes +# tar -t is buggy and does not list \\\ filename diff --git a/t/recipes/checks/desktop/icons/files-general/build-spec/orig/--lzma b/t/recipes/checks/desktop/icons/files-general/build-spec/orig/--lzma new file mode 100644 index 0000000..5241aaa --- /dev/null +++ b/t/recipes/checks/desktop/icons/files-general/build-spec/orig/--lzma @@ -0,0 +1,2 @@ +Test file to check that various parts of Lintian correctly handle files with names that look +like options diff --git a/t/recipes/checks/desktop/icons/files-general/build-spec/orig/dir b/t/recipes/checks/desktop/icons/files-general/build-spec/orig/dir new file mode 100644 index 0000000..e465d26 --- /dev/null +++ b/t/recipes/checks/desktop/icons/files-general/build-spec/orig/dir @@ -0,0 +1,18 @@ +This is the file .../info/dir, which contains the +topmost node of the Info hierarchy, called (dir)Top. +The first time you invoke Info you start off looking at this node. + +File: dir, Node: Top This is the top of the INFO tree + + This (the Directory node) gives a menu of major topics. + Typing "q" exits, "?" lists all Info commands, "d" returns here, + "h" gives a primer for first-timers, + "mEmacs" visits the Emacs manual, etc. + + In Emacs, you can click mouse button 2 on a menu item or cross reference + to select it. + +* Menu: + +Archiving +* Cpio: (cpio). Copy-in-copy-out archiver to tape or disk. diff --git a/t/recipes/checks/desktop/icons/files-general/build-spec/orig/file-in-new-top-level-dir b/t/recipes/checks/desktop/icons/files-general/build-spec/orig/file-in-new-top-level-dir new file mode 100644 index 0000000..ae82d42 --- /dev/null +++ b/t/recipes/checks/desktop/icons/files-general/build-spec/orig/file-in-new-top-level-dir @@ -0,0 +1,2 @@ +Since an empty file triggers "empty-dir" tags; we might as well +test file-in-unusual-dir together with non-standard-toplevel-dir. diff --git a/t/recipes/checks/desktop/icons/files-general/build-spec/orig/foo.5 b/t/recipes/checks/desktop/icons/files-general/build-spec/orig/foo.5 new file mode 100644 index 0000000..718eae1 --- /dev/null +++ b/t/recipes/checks/desktop/icons/files-general/build-spec/orig/foo.5 @@ -0,0 +1,5 @@ +.TH FOO "5" +.SH NAME +foo \- file format for foo +.SH DESCRIPTION +This file can store anything. diff --git a/t/recipes/checks/desktop/icons/files-general/build-spec/orig/foo.vcproj b/t/recipes/checks/desktop/icons/files-general/build-spec/orig/foo.vcproj new file mode 100644 index 0000000..6ec1ca6 --- /dev/null +++ b/t/recipes/checks/desktop/icons/files-general/build-spec/orig/foo.vcproj @@ -0,0 +1 @@ +Not actually a VC project file. diff --git a/t/recipes/checks/desktop/icons/files-general/build-spec/orig/lintian-16x16.png b/t/recipes/checks/desktop/icons/files-general/build-spec/orig/lintian-16x16.png new file mode 100644 index 0000000..cd7355d Binary files /dev/null and b/t/recipes/checks/desktop/icons/files-general/build-spec/orig/lintian-16x16.png differ diff --git a/t/recipes/checks/desktop/icons/files-general/build-spec/orig/lintian-22x22.png b/t/recipes/checks/desktop/icons/files-general/build-spec/orig/lintian-22x22.png new file mode 100644 index 0000000..efc9af0 Binary files /dev/null and b/t/recipes/checks/desktop/icons/files-general/build-spec/orig/lintian-22x22.png differ diff --git a/t/recipes/checks/desktop/icons/files-general/build-spec/orig/lintian-lib.conf b/t/recipes/checks/desktop/icons/files-general/build-spec/orig/lintian-lib.conf new file mode 100644 index 0000000..e2b41a8 --- /dev/null +++ b/t/recipes/checks/desktop/icons/files-general/build-spec/orig/lintian-lib.conf @@ -0,0 +1 @@ +/usr/lib/lintian diff --git a/t/recipes/checks/desktop/icons/files-general/build-spec/orig/lintian.conf b/t/recipes/checks/desktop/icons/files-general/build-spec/orig/lintian.conf new file mode 100644 index 0000000..7f6693c --- /dev/null +++ b/t/recipes/checks/desktop/icons/files-general/build-spec/orig/lintian.conf @@ -0,0 +1 @@ +Test file which should not be flagged by the modprobe.d checks diff --git a/t/recipes/checks/desktop/icons/files-general/build-spec/orig/mimeinfo.cache b/t/recipes/checks/desktop/icons/files-general/build-spec/orig/mimeinfo.cache new file mode 100644 index 0000000..f3067c5 --- /dev/null +++ b/t/recipes/checks/desktop/icons/files-general/build-spec/orig/mimeinfo.cache @@ -0,0 +1,2 @@ +[MIME Cache] +text/plain=foo-editor.desktop diff --git a/t/recipes/checks/desktop/icons/files-general/build-spec/orig/php-foo.ini b/t/recipes/checks/desktop/icons/files-general/build-spec/orig/php-foo.ini new file mode 100644 index 0000000..6a33666 --- /dev/null +++ b/t/recipes/checks/desktop/icons/files-general/build-spec/orig/php-foo.ini @@ -0,0 +1 @@ +# this style of comments are obsolete diff --git a/t/recipes/checks/desktop/icons/files-general/build-spec/orig/sudotest b/t/recipes/checks/desktop/icons/files-general/build-spec/orig/sudotest new file mode 100644 index 0000000..e69de29 diff --git a/t/recipes/checks/desktop/icons/files-general/build-spec/orig/tnu.1 b/t/recipes/checks/desktop/icons/files-general/build-spec/orig/tnu.1 new file mode 100644 index 0000000..147dc1a --- /dev/null +++ b/t/recipes/checks/desktop/icons/files-general/build-spec/orig/tnu.1 @@ -0,0 +1,5 @@ +.TH 鳥の詩 "1" +.SH NAME +鳥の詩 \- command in PATH written in UTF-8 +.SH DESCRIPTION +鳥の詩 (Tori no uta) is not really a useful command. diff --git a/t/recipes/checks/desktop/icons/files-general/build-spec/orig/types b/t/recipes/checks/desktop/icons/files-general/build-spec/orig/types new file mode 100644 index 0000000..e69de29 diff --git a/t/recipes/checks/desktop/icons/files-general/eval/desc b/t/recipes/checks/desktop/icons/files-general/eval/desc new file mode 100644 index 0000000..6b5e296 --- /dev/null +++ b/t/recipes/checks/desktop/icons/files-general/eval/desc @@ -0,0 +1,3 @@ +Testname: files-general +Check: desktop/icons +# tar -t is buggy and does not list \\\ filename diff --git a/t/recipes/checks/desktop/icons/files-general/eval/hints b/t/recipes/checks/desktop/icons/files-general/eval/hints new file mode 100644 index 0000000..3605524 --- /dev/null +++ b/t/recipes/checks/desktop/icons/files-general/eval/hints @@ -0,0 +1,4 @@ +files-general (binary): raster-image-in-scalable-directory [usr/share/icons/hicolor/scalable/apps/lintian-16x16.png] +files-general (binary): icon-size-and-directory-name-mismatch 22x22 [usr/share/apps/lintian/icons/hicolor/64x64/lintian-64x64.png] +files-general (binary): icon-size-and-directory-name-mismatch 16x16 [usr/share/icons/hicolor/22x22/apps/lintian-16x16.png] +files-general (binary): icon-size-and-directory-name-mismatch 16x16 [usr/share/apps/lintian/icons/hicolor/22x22/lintian-16x16.png] diff --git a/t/recipes/checks/desktop/x11/files-fonts/build-spec/debian/control.in b/t/recipes/checks/desktop/x11/files-fonts/build-spec/debian/control.in new file mode 100644 index 0000000..851be7b --- /dev/null +++ b/t/recipes/checks/desktop/x11/files-fonts/build-spec/debian/control.in @@ -0,0 +1,31 @@ +Source: [% $source %] +Priority: optional +Section: [% $section %] +Maintainer: [% $author %] +Standards-Version: [% $standards_version %] +Build-Depends: [% $build_depends %] +Rules-Requires-Root: no +Homepage: http://lintian.debian.org/ + +Package: [% $source %] +Architecture: all +Depends: ${misc:Depends} +Description: [% $description %] + Non-font package containing fonts. + . + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. + +Package: ttf-[% $source %] +Section: fonts +Architecture: all +# Due to file-conflict +Conflicts: [% $source %] +Depends: ${misc:Depends} +Description: [% $description %] (okay) + Font package containing fonts. + . + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. diff --git a/t/recipes/checks/desktop/x11/files-fonts/build-spec/debian/files-fonts.install b/t/recipes/checks/desktop/x11/files-fonts/build-spec/debian/files-fonts.install new file mode 100644 index 0000000..f3dd053 --- /dev/null +++ b/t/recipes/checks/desktop/x11/files-fonts/build-spec/debian/files-fonts.install @@ -0,0 +1,14 @@ +font.otf usr/share/fonts/truetype +font.ttf usr/share/fonts/truetype +4shadow.ttf usr/share/fonts/truetype +foo.pcf usr/share/fonts/X11/100dpi +foo.pcf usr/share/fonts/X11/75dpi +foo.pcf usr/share/fonts/X11/misc +foo.pcf usr/share/fonts/X11/Type1 +foo.pcf usr/share/fonts/X11/encodings +foo.pcf usr/share/fonts/X11/util +foo.pcf usr/share/fonts/X11/PEX +foo.pcf usr/share/fonts/X11/CID +foo.pcf usr/share/fonts/X11/Speedo +foo.pcf usr/share/fonts/X11/cyrillic +foo.pcf usr/share/fonts/X11/other diff --git a/t/recipes/checks/desktop/x11/files-fonts/build-spec/debian/ttf-files-fonts.install b/t/recipes/checks/desktop/x11/files-fonts/build-spec/debian/ttf-files-fonts.install new file mode 100644 index 0000000..95e5191 --- /dev/null +++ b/t/recipes/checks/desktop/x11/files-fonts/build-spec/debian/ttf-files-fonts.install @@ -0,0 +1,4 @@ +font.otf usr/share/fonts/truetype +font.ttf usr/share/fonts/truetype +4shadow.ttf usr/share/fonts/truetype +font.ttf usr/lib/fontpackage diff --git a/t/recipes/checks/desktop/x11/files-fonts/build-spec/debian/ttf-files-fonts.links b/t/recipes/checks/desktop/x11/files-fonts/build-spec/debian/ttf-files-fonts.links new file mode 100644 index 0000000..f57bbb5 --- /dev/null +++ b/t/recipes/checks/desktop/x11/files-fonts/build-spec/debian/ttf-files-fonts.links @@ -0,0 +1 @@ +usr/share/fonts/truetype/font.ttf usr/share/fonts/truetype/dejavusans.ttf diff --git a/t/recipes/checks/desktop/x11/files-fonts/build-spec/fill-values b/t/recipes/checks/desktop/x11/files-fonts/build-spec/fill-values new file mode 100644 index 0000000..1b07cd1 --- /dev/null +++ b/t/recipes/checks/desktop/x11/files-fonts/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: upload-native +Testname: files-fonts +Description: Font file checks diff --git a/t/recipes/checks/desktop/x11/files-fonts/build-spec/orig/4shadow.ttf b/t/recipes/checks/desktop/x11/files-fonts/build-spec/orig/4shadow.ttf new file mode 100644 index 0000000..780ab93 --- /dev/null +++ b/t/recipes/checks/desktop/x11/files-fonts/build-spec/orig/4shadow.ttf @@ -0,0 +1,2 @@ +This isn't actually a font. The current test is based on the file +name and doesn't care. diff --git a/t/recipes/checks/desktop/x11/files-fonts/build-spec/orig/font.otf b/t/recipes/checks/desktop/x11/files-fonts/build-spec/orig/font.otf new file mode 100644 index 0000000..c118d8d --- /dev/null +++ b/t/recipes/checks/desktop/x11/files-fonts/build-spec/orig/font.otf @@ -0,0 +1 @@ +This is a fake font file. diff --git a/t/recipes/checks/desktop/x11/files-fonts/build-spec/orig/font.ttf b/t/recipes/checks/desktop/x11/files-fonts/build-spec/orig/font.ttf new file mode 100644 index 0000000..c118d8d --- /dev/null +++ b/t/recipes/checks/desktop/x11/files-fonts/build-spec/orig/font.ttf @@ -0,0 +1 @@ +This is a fake font file. diff --git a/t/recipes/checks/desktop/x11/files-fonts/build-spec/orig/foo.pcf b/t/recipes/checks/desktop/x11/files-fonts/build-spec/orig/foo.pcf new file mode 100644 index 0000000..8a7d9df --- /dev/null +++ b/t/recipes/checks/desktop/x11/files-fonts/build-spec/orig/foo.pcf @@ -0,0 +1 @@ +I'm not really a font, but I play one on TV. diff --git a/t/recipes/checks/desktop/x11/files-fonts/eval/desc b/t/recipes/checks/desktop/x11/files-fonts/eval/desc new file mode 100644 index 0000000..4a018d8 --- /dev/null +++ b/t/recipes/checks/desktop/x11/files-fonts/eval/desc @@ -0,0 +1,2 @@ +Testname: files-fonts +Check: desktop/x11 diff --git a/t/recipes/checks/desktop/x11/files-fonts/eval/hints b/t/recipes/checks/desktop/x11/files-fonts/eval/hints new file mode 100644 index 0000000..ac9d4e0 --- /dev/null +++ b/t/recipes/checks/desktop/x11/files-fonts/eval/hints @@ -0,0 +1,7 @@ +files-fonts (binary): package-mixes-misc-and-dpi-fonts +files-fonts (binary): package-contains-multiple-dpi-fonts +files-fonts (binary): file-in-unknown-x11-font-directory [usr/share/fonts/X11/other/foo.pcf.gz] +files-fonts (binary): file-in-discouraged-x11-font-directory [usr/share/fonts/X11/cyrillic/foo.pcf.gz] +files-fonts (binary): file-in-discouraged-x11-font-directory [usr/share/fonts/X11/Speedo/foo.pcf.gz] +files-fonts (binary): file-in-discouraged-x11-font-directory [usr/share/fonts/X11/PEX/foo.pcf.gz] +files-fonts (binary): file-in-discouraged-x11-font-directory [usr/share/fonts/X11/CID/foo.pcf.gz] diff --git a/t/recipes/checks/desktop/x11/files-general/build-spec/debian/clean b/t/recipes/checks/desktop/x11/files-general/build-spec/debian/clean new file mode 100644 index 0000000..222b726 --- /dev/null +++ b/t/recipes/checks/desktop/x11/files-general/build-spec/debian/clean @@ -0,0 +1 @@ +鳥の詩.1 diff --git a/t/recipes/checks/desktop/x11/files-general/build-spec/debian/dirs b/t/recipes/checks/desktop/x11/files-general/build-spec/debian/dirs new file mode 100644 index 0000000..b76fb64 --- /dev/null +++ b/t/recipes/checks/desktop/x11/files-general/build-spec/debian/dirs @@ -0,0 +1,13 @@ +etc +etc/skel +usr/bin +usr/doc +usr/lib/python3/dist-packages/foo +usr/share/foo +usr/share/fonts/X11/misc +usr/share/glib-2.0/schemas +usr/share/hal +usr/share/man/man1/random +var/catman +var/lock/lintian +var/run/lintian diff --git a/t/recipes/checks/desktop/x11/files-general/build-spec/debian/examples b/t/recipes/checks/desktop/x11/files-general/build-spec/debian/examples new file mode 100644 index 0000000..18fb10f --- /dev/null +++ b/t/recipes/checks/desktop/x11/files-general/build-spec/debian/examples @@ -0,0 +1 @@ +foo.vcproj diff --git a/t/recipes/checks/desktop/x11/files-general/build-spec/debian/install b/t/recipes/checks/desktop/x11/files-general/build-spec/debian/install new file mode 100644 index 0000000..ea7c1c2 --- /dev/null +++ b/t/recipes/checks/desktop/x11/files-general/build-spec/debian/install @@ -0,0 +1,21 @@ +lintian-16x16.png usr/share/apps/lintian/icons/hicolor/22x22 +lintian-16x16.png usr/share/icons/hicolor/22x22/apps +lintian-22x22.png usr/share/apps/lintian/icons/hicolor/22x22 +lintian-22x22.png usr/share/apps/lintian/icons/hicolor/20x20 +lintian-16x16.png usr/share/doc/lintian/ +lintian-22x22.png usr/share/games/icons/hicolor/22x22 +lintian-16x16.png usr/share/icons/hicolor/scalable/apps +lintian-22x22.png usr/share/icons/16x16/animations/ +--lzma etc/modprobe.d +lintian.conf etc/modprobe.d +lintian.conf etc/modules-load.d +lintian-install.conf etc/modprobe.d +lintian-install.conf etc/modules-load.d +dir usr/share/info +foo.vcproj usr/lib/foo +lintian-lib.conf etc/ld.so.conf.d +php-foo.ini etc/php/7.0/mods-available +types usr/share/mime +mimeinfo.cache usr/share/applications +file-in-new-top-level-dir new-top-level-dir/ +sudotest etc/sudoers.d/ diff --git a/t/recipes/checks/desktop/x11/files-general/build-spec/debian/links b/t/recipes/checks/desktop/x11/files-general/build-spec/debian/links new file mode 100644 index 0000000..f3e425d --- /dev/null +++ b/t/recipes/checks/desktop/x11/files-general/build-spec/debian/links @@ -0,0 +1 @@ +usr/share/apps/lintian/icons/hicolor/22x22/lintian-22x22.png usr/share/apps/lintian/icons/hicolor/64x64/lintian-64x64.png diff --git a/t/recipes/checks/desktop/x11/files-general/build-spec/debian/manpages b/t/recipes/checks/desktop/x11/files-general/build-spec/debian/manpages new file mode 100644 index 0000000..e8af11b --- /dev/null +++ b/t/recipes/checks/desktop/x11/files-general/build-spec/debian/manpages @@ -0,0 +1,2 @@ +foo.5 +鳥の詩.1 diff --git a/t/recipes/checks/desktop/x11/files-general/build-spec/debian/rules b/t/recipes/checks/desktop/x11/files-general/build-spec/debian/rules new file mode 100755 index 0000000..798f01e --- /dev/null +++ b/t/recipes/checks/desktop/x11/files-general/build-spec/debian/rules @@ -0,0 +1,67 @@ +#!/usr/bin/make -f + +tmp := $(CURDIR)/debian/$(shell dh_listpackages) + +%: + dh $@ + +override_dh_install: + dh_install + echo "#fake conf file" > $(tmp)/etc/pam.conf + # true positives + touch $(tmp)/etc/skel/.lintianrc + # false positives + touch $(tmp)/etc/skel/.bashrc + touch $(tmp)/etc/skel/.bash_logout + touch $(tmp)/etc/skel/.profile + touch $(tmp)/etc/skel/.kshrc + touch $(tmp)/etc/skel/.mkshrc + echo "Back-up file" > $(tmp)/usr/share/foo/file~ + # The name of the "binary" is "Tori no Uta" + # If it is ever messed up, it can be restored by + # using something like: + # perl -pe 's/\@FILE\@/\xe9\xb3\xa5\xe3\x81\xae\xe8\xa9\xa9\x0a/' + echo "#!/bin/sh" > $(tmp)/usr/bin/鳥の詩 + chmod +x $(tmp)/usr/bin/鳥の詩 + # Copy the manpage to its correct name so dh_installman can + # find it. + # - d/clean will remove it again + cp -a tnu.1 鳥の詩.1 + touch $(tmp)/usr/doc/FSSTND + touch $(tmp)/usr/share/foo/'*' + touch $(tmp)/usr/share/foo/'ws ' + touch $(tmp)/usr/share/fonts/X11/misc/fonts.dir + touch $(tmp)/usr/share/fonts/X11/misc/fonts.scale + touch $(tmp)/usr/share/fonts/X11/misc/fonts.alias + touch $(tmp)/usr/share/fonts/X11/misc/encodings.dir + touch $(tmp)/usr/share/fonts/X11/misc/false-positive + touch $(tmp)/usr/share/foo/.nfs-fake-tmpfile + touch $(tmp)/usr/share/foo/foo.doctree + touch $(tmp)/usr/share/foo/gschemas.compiled + touch $(tmp)/usr/share/glib-2.0/schemas/gschemas.compiled + touch $(tmp)/usr/share/hal/foo.fdi + touch $(tmp)/usr/lib/python3/dist-packages/test_foo.py + touch $(tmp)/usr/lib/python3/dist-packages/foo/test_falsepositive.py + # If the following line gets messed up, it can be + # restored with something like: + # sed -i 's/@FILE@/bokm\xe5l/' + touch $(tmp)/usr/share/foo/bokml + touch $(tmp)/var/catman/do + +override_dh_fixperms: + dh_fixperms + chmod 755 $(tmp)/usr/share/man/man5/foo.5.gz + chmod 644 $(tmp)/etc/sudoers.d/* + +override_dh_compress: + dh_compress + # create a .png and .png.gz + gzip -n -1 $(tmp)/usr/share/doc/lintian/lintian-16x16.png + zcat $(tmp)/usr/share/doc/lintian/lintian-16x16.png.gz > \ + $(tmp)/usr/share/doc/lintian/lintian-16x16.png + +override_dh_link: + dh_link + mkdir -p $(tmp)/usr/share/doc/bar + echo "Hallo World" > $(tmp)/usr/share/doc/bar/foo + ln -s ../bar/foo $(tmp)/usr/share/doc/bar/star diff --git a/t/recipes/checks/desktop/x11/files-general/build-spec/fill-values b/t/recipes/checks/desktop/x11/files-general/build-spec/fill-values new file mode 100644 index 0000000..45de709 --- /dev/null +++ b/t/recipes/checks/desktop/x11/files-general/build-spec/fill-values @@ -0,0 +1,4 @@ +Skeleton: upload-native +Testname: files-general +Description: Test tags for file paths, names, and modes +# tar -t is buggy and does not list \\\ filename diff --git a/t/recipes/checks/desktop/x11/files-general/build-spec/orig/--lzma b/t/recipes/checks/desktop/x11/files-general/build-spec/orig/--lzma new file mode 100644 index 0000000..5241aaa --- /dev/null +++ b/t/recipes/checks/desktop/x11/files-general/build-spec/orig/--lzma @@ -0,0 +1,2 @@ +Test file to check that various parts of Lintian correctly handle files with names that look +like options diff --git a/t/recipes/checks/desktop/x11/files-general/build-spec/orig/dir b/t/recipes/checks/desktop/x11/files-general/build-spec/orig/dir new file mode 100644 index 0000000..e465d26 --- /dev/null +++ b/t/recipes/checks/desktop/x11/files-general/build-spec/orig/dir @@ -0,0 +1,18 @@ +This is the file .../info/dir, which contains the +topmost node of the Info hierarchy, called (dir)Top. +The first time you invoke Info you start off looking at this node. + +File: dir, Node: Top This is the top of the INFO tree + + This (the Directory node) gives a menu of major topics. + Typing "q" exits, "?" lists all Info commands, "d" returns here, + "h" gives a primer for first-timers, + "mEmacs" visits the Emacs manual, etc. + + In Emacs, you can click mouse button 2 on a menu item or cross reference + to select it. + +* Menu: + +Archiving +* Cpio: (cpio). Copy-in-copy-out archiver to tape or disk. diff --git a/t/recipes/checks/desktop/x11/files-general/build-spec/orig/file-in-new-top-level-dir b/t/recipes/checks/desktop/x11/files-general/build-spec/orig/file-in-new-top-level-dir new file mode 100644 index 0000000..ae82d42 --- /dev/null +++ b/t/recipes/checks/desktop/x11/files-general/build-spec/orig/file-in-new-top-level-dir @@ -0,0 +1,2 @@ +Since an empty file triggers "empty-dir" tags; we might as well +test file-in-unusual-dir together with non-standard-toplevel-dir. diff --git a/t/recipes/checks/desktop/x11/files-general/build-spec/orig/foo.5 b/t/recipes/checks/desktop/x11/files-general/build-spec/orig/foo.5 new file mode 100644 index 0000000..718eae1 --- /dev/null +++ b/t/recipes/checks/desktop/x11/files-general/build-spec/orig/foo.5 @@ -0,0 +1,5 @@ +.TH FOO "5" +.SH NAME +foo \- file format for foo +.SH DESCRIPTION +This file can store anything. diff --git a/t/recipes/checks/desktop/x11/files-general/build-spec/orig/foo.vcproj b/t/recipes/checks/desktop/x11/files-general/build-spec/orig/foo.vcproj new file mode 100644 index 0000000..6ec1ca6 --- /dev/null +++ b/t/recipes/checks/desktop/x11/files-general/build-spec/orig/foo.vcproj @@ -0,0 +1 @@ +Not actually a VC project file. diff --git a/t/recipes/checks/desktop/x11/files-general/build-spec/orig/lintian-16x16.png b/t/recipes/checks/desktop/x11/files-general/build-spec/orig/lintian-16x16.png new file mode 100644 index 0000000..cd7355d Binary files /dev/null and b/t/recipes/checks/desktop/x11/files-general/build-spec/orig/lintian-16x16.png differ diff --git a/t/recipes/checks/desktop/x11/files-general/build-spec/orig/lintian-22x22.png b/t/recipes/checks/desktop/x11/files-general/build-spec/orig/lintian-22x22.png new file mode 100644 index 0000000..efc9af0 Binary files /dev/null and b/t/recipes/checks/desktop/x11/files-general/build-spec/orig/lintian-22x22.png differ diff --git a/t/recipes/checks/desktop/x11/files-general/build-spec/orig/lintian-install.conf b/t/recipes/checks/desktop/x11/files-general/build-spec/orig/lintian-install.conf new file mode 100644 index 0000000..d47e02f --- /dev/null +++ b/t/recipes/checks/desktop/x11/files-general/build-spec/orig/lintian-install.conf @@ -0,0 +1,2 @@ +install modulename command +remove modulename command diff --git a/t/recipes/checks/desktop/x11/files-general/build-spec/orig/lintian-lib.conf b/t/recipes/checks/desktop/x11/files-general/build-spec/orig/lintian-lib.conf new file mode 100644 index 0000000..e2b41a8 --- /dev/null +++ b/t/recipes/checks/desktop/x11/files-general/build-spec/orig/lintian-lib.conf @@ -0,0 +1 @@ +/usr/lib/lintian diff --git a/t/recipes/checks/desktop/x11/files-general/build-spec/orig/lintian.conf b/t/recipes/checks/desktop/x11/files-general/build-spec/orig/lintian.conf new file mode 100644 index 0000000..7f6693c --- /dev/null +++ b/t/recipes/checks/desktop/x11/files-general/build-spec/orig/lintian.conf @@ -0,0 +1 @@ +Test file which should not be flagged by the modprobe.d checks diff --git a/t/recipes/checks/desktop/x11/files-general/build-spec/orig/mimeinfo.cache b/t/recipes/checks/desktop/x11/files-general/build-spec/orig/mimeinfo.cache new file mode 100644 index 0000000..f3067c5 --- /dev/null +++ b/t/recipes/checks/desktop/x11/files-general/build-spec/orig/mimeinfo.cache @@ -0,0 +1,2 @@ +[MIME Cache] +text/plain=foo-editor.desktop diff --git a/t/recipes/checks/desktop/x11/files-general/build-spec/orig/php-foo.ini b/t/recipes/checks/desktop/x11/files-general/build-spec/orig/php-foo.ini new file mode 100644 index 0000000..6a33666 --- /dev/null +++ b/t/recipes/checks/desktop/x11/files-general/build-spec/orig/php-foo.ini @@ -0,0 +1 @@ +# this style of comments are obsolete diff --git a/t/recipes/checks/desktop/x11/files-general/build-spec/orig/sudotest b/t/recipes/checks/desktop/x11/files-general/build-spec/orig/sudotest new file mode 100644 index 0000000..e69de29 diff --git a/t/recipes/checks/desktop/x11/files-general/build-spec/orig/tnu.1 b/t/recipes/checks/desktop/x11/files-general/build-spec/orig/tnu.1 new file mode 100644 index 0000000..147dc1a --- /dev/null +++ b/t/recipes/checks/desktop/x11/files-general/build-spec/orig/tnu.1 @@ -0,0 +1,5 @@ +.TH 鳥の詩 "1" +.SH NAME +鳥の詩 \- command in PATH written in UTF-8 +.SH DESCRIPTION +鳥の詩 (Tori no uta) is not really a useful command. diff --git a/t/recipes/checks/desktop/x11/files-general/build-spec/orig/types b/t/recipes/checks/desktop/x11/files-general/build-spec/orig/types new file mode 100644 index 0000000..e69de29 diff --git a/t/recipes/checks/desktop/x11/files-general/eval/desc b/t/recipes/checks/desktop/x11/files-general/eval/desc new file mode 100644 index 0000000..7aa2151 --- /dev/null +++ b/t/recipes/checks/desktop/x11/files-general/eval/desc @@ -0,0 +1,3 @@ +Testname: files-general +Check: desktop/x11 +# tar -t is buggy and does not list \\\ filename diff --git a/t/recipes/checks/desktop/x11/files-general/eval/hints b/t/recipes/checks/desktop/x11/files-general/eval/hints new file mode 100644 index 0000000..d60294f --- /dev/null +++ b/t/recipes/checks/desktop/x11/files-general/eval/hints @@ -0,0 +1,4 @@ +files-general (binary): package-contains-compiled-font-file [usr/share/fonts/X11/misc/fonts.scale] +files-general (binary): package-contains-compiled-font-file [usr/share/fonts/X11/misc/fonts.dir] +files-general (binary): package-contains-compiled-font-file [usr/share/fonts/X11/misc/fonts.alias] +files-general (binary): package-contains-compiled-font-file [usr/share/fonts/X11/misc/encodings.dir] diff --git a/t/recipes/checks/desktop/x11/font/update/scripts-missing-call-to-update-fonts-unrel/build-spec/debian/install b/t/recipes/checks/desktop/x11/font/update/scripts-missing-call-to-update-fonts-unrel/build-spec/debian/install new file mode 100644 index 0000000..4690206 --- /dev/null +++ b/t/recipes/checks/desktop/x11/font/update/scripts-missing-call-to-update-fonts-unrel/build-spec/debian/install @@ -0,0 +1 @@ +foo.afm usr/share/fonts/X11/Type1 diff --git a/t/recipes/checks/desktop/x11/font/update/scripts-missing-call-to-update-fonts-unrel/build-spec/debian/postinst b/t/recipes/checks/desktop/x11/font/update/scripts-missing-call-to-update-fonts-unrel/build-spec/debian/postinst new file mode 100644 index 0000000..ea5884d --- /dev/null +++ b/t/recipes/checks/desktop/x11/font/update/scripts-missing-call-to-update-fonts-unrel/build-spec/debian/postinst @@ -0,0 +1,9 @@ +#!/bin/sh + +set -e + +if false +then + update-fonts-dir manual + update-fonts-scale manual +fi diff --git a/t/recipes/checks/desktop/x11/font/update/scripts-missing-call-to-update-fonts-unrel/build-spec/fill-values b/t/recipes/checks/desktop/x11/font/update/scripts-missing-call-to-update-fonts-unrel/build-spec/fill-values new file mode 100644 index 0000000..37d3c47 --- /dev/null +++ b/t/recipes/checks/desktop/x11/font/update/scripts-missing-call-to-update-fonts-unrel/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: upload-native +Testname: scripts-missing-call-to-update-fonts-unrel +Description: Check missing calls to update-fonts (false-positives) diff --git a/t/recipes/checks/desktop/x11/font/update/scripts-missing-call-to-update-fonts-unrel/build-spec/orig/foo.afm b/t/recipes/checks/desktop/x11/font/update/scripts-missing-call-to-update-fonts-unrel/build-spec/orig/foo.afm new file mode 100644 index 0000000..e69de29 diff --git a/t/recipes/checks/desktop/x11/font/update/scripts-missing-call-to-update-fonts-unrel/eval/desc b/t/recipes/checks/desktop/x11/font/update/scripts-missing-call-to-update-fonts-unrel/eval/desc new file mode 100644 index 0000000..2858502 --- /dev/null +++ b/t/recipes/checks/desktop/x11/font/update/scripts-missing-call-to-update-fonts-unrel/eval/desc @@ -0,0 +1,4 @@ +Testname: scripts-missing-call-to-update-fonts-unrel +Test-Against: + missing-call-to-update-fonts +Check: desktop/x11/font/update diff --git a/t/recipes/checks/desktop/x11/font/update/scripts-missing-call-to-update-fonts-unrel/eval/hints b/t/recipes/checks/desktop/x11/font/update/scripts-missing-call-to-update-fonts-unrel/eval/hints new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/t/recipes/checks/desktop/x11/font/update/scripts-missing-call-to-update-fonts-unrel/eval/hints @@ -0,0 +1 @@ + diff --git a/t/recipes/checks/desktop/x11/font/update/scripts-missing-call-to-update-fonts/build-spec/debian/install b/t/recipes/checks/desktop/x11/font/update/scripts-missing-call-to-update-fonts/build-spec/debian/install new file mode 100644 index 0000000..4690206 --- /dev/null +++ b/t/recipes/checks/desktop/x11/font/update/scripts-missing-call-to-update-fonts/build-spec/debian/install @@ -0,0 +1 @@ +foo.afm usr/share/fonts/X11/Type1 diff --git a/t/recipes/checks/desktop/x11/font/update/scripts-missing-call-to-update-fonts/build-spec/debian/postinst b/t/recipes/checks/desktop/x11/font/update/scripts-missing-call-to-update-fonts/build-spec/debian/postinst new file mode 100644 index 0000000..72a8dfb --- /dev/null +++ b/t/recipes/checks/desktop/x11/font/update/scripts-missing-call-to-update-fonts/build-spec/debian/postinst @@ -0,0 +1,8 @@ +#!/bin/sh + +set -e + +if false +then + echo "Deliberately not including DEBHELPER snippet." +fi diff --git a/t/recipes/checks/desktop/x11/font/update/scripts-missing-call-to-update-fonts/build-spec/fill-values b/t/recipes/checks/desktop/x11/font/update/scripts-missing-call-to-update-fonts/build-spec/fill-values new file mode 100644 index 0000000..4b17473 --- /dev/null +++ b/t/recipes/checks/desktop/x11/font/update/scripts-missing-call-to-update-fonts/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: upload-native +Testname: scripts-missing-call-to-update-fonts +Description: Check missing calls to update-fonts diff --git a/t/recipes/checks/desktop/x11/font/update/scripts-missing-call-to-update-fonts/build-spec/orig/foo.afm b/t/recipes/checks/desktop/x11/font/update/scripts-missing-call-to-update-fonts/build-spec/orig/foo.afm new file mode 100644 index 0000000..e69de29 diff --git a/t/recipes/checks/desktop/x11/font/update/scripts-missing-call-to-update-fonts/eval/desc b/t/recipes/checks/desktop/x11/font/update/scripts-missing-call-to-update-fonts/eval/desc new file mode 100644 index 0000000..5f5f575 --- /dev/null +++ b/t/recipes/checks/desktop/x11/font/update/scripts-missing-call-to-update-fonts/eval/desc @@ -0,0 +1,2 @@ +Testname: scripts-missing-call-to-update-fonts +Check: desktop/x11/font/update diff --git a/t/recipes/checks/desktop/x11/font/update/scripts-missing-call-to-update-fonts/eval/hints b/t/recipes/checks/desktop/x11/font/update/scripts-missing-call-to-update-fonts/eval/hints new file mode 100644 index 0000000..163e983 --- /dev/null +++ b/t/recipes/checks/desktop/x11/font/update/scripts-missing-call-to-update-fonts/eval/hints @@ -0,0 +1 @@ +scripts-missing-call-to-update-fonts (binary): missing-call-to-update-fonts usr/share/fonts/X11/Type1/foo.afm [postinst] diff --git a/t/recipes/checks/desktop/x11/legacy-filenames/build-spec/debian/changelog.in b/t/recipes/checks/desktop/x11/legacy-filenames/build-spec/debian/changelog.in new file mode 100644 index 0000000..b79c4ca --- /dev/null +++ b/t/recipes/checks/desktop/x11/legacy-filenames/build-spec/debian/changelog.in @@ -0,0 +1,78 @@ +filenames ([% $version %]) [% $distribution %]; urgency=low + + * /me is doing a correct NMU of this package, bumping the epoch too. + + -- Jeroen van Wolffelaar Sun, 18 Apr 2004 02:04:39 +0200 + +filenames (11) unstable; urgency=low + + * Add a README.macos. + + -- Marc 'HE' Brockschmidt Mon, 12 Apr 2004 23:35:24 +0200 + +filenames (10) unstable; urgency=low + + * Some new files to check the checks for the use of /usr/*/X11 and + /usr/X11R6/*. + + -- Marc 'HE' Brockschmidt Sun, 11 Apr 2004 17:35:20 +0200 + +filenames (9) unstable; urgency=low + + * Add a two *.ali files, one with the right permission, one with + the more common, but false one. + + -- Marc 'HE' Brockschmidt Sun, 11 Apr 2004 00:18:16 +0200 + +filenames (8) unstable; urgency=low + + * Add a real ancient file + + -- Frank Lichtenheld Thu, 8 Apr 2004 22:22:40 +0200 + +filenames (7) unstable; urgency=low + + * Add a dozen symlinks, some correct, some not + + -- Jeroen van Wolffelaar Fri, 27 Feb 2004 01:28:42 +0100 + +filenames (6) unstable; urgency=low + + * Add perl files to check if + package-installs-nonbinary-perl-in-usr-lib-perl5 is correctly + issued even after attempting to suppress it in some cases + + -- Frank Lichtenheld Fri, 27 Feb 2004 00:49:44 +0100 + +filenames (5) unstable; urgency=low + + * Added check for too long symlink + + -- Sean 'Shaleh' Perry Wed, 3 Jan 2001 13:20:31 -0800 + +filenames (4) unstable; urgency=low + + * Add /usr/lib/menu/menu file to test the bad-menu-file-name tag. + * Add /usr/lib/menu/README to test the new execption for it. + + -- Richard Braakman Thu, 22 Oct 1998 15:42:52 +0200 + +filenames (3) unstable; urgency=low + + * Don't rely on the installer's umask. + + -- Richard Braakman Thu, 20 Aug 1998 12:45:47 +0200 + +filenames (2) unstable; urgency=low + + * Noted more limitations on what filenames lintian handles. + * Added Changes.gz in /usr/doc/filenames and made a symlink from changelog.gz + to Changes.gz. + + -- Richard Braakman Sat, 4 Jul 1998 15:46:11 +0200 + +filenames (1) unstable; urgency=low + + * Initial version + + -- Richard Braakman Sat, 4 Jul 1998 15:25:01 +0200 diff --git a/t/recipes/checks/desktop/x11/legacy-filenames/build-spec/debian/control b/t/recipes/checks/desktop/x11/legacy-filenames/build-spec/debian/control new file mode 100644 index 0000000..1ff9c50 --- /dev/null +++ b/t/recipes/checks/desktop/x11/legacy-filenames/build-spec/debian/control @@ -0,0 +1,42 @@ +Source: filenames +Maintainer: Lintian Maintainer +Standards-Version: 3.1.1 +Rules-Requires-Root: binary-targets + +Package: filenames +Architecture: any +Description: see how lintian reacts to weird filenames + This package contains files with the most evil names I could find, + except for ones that lintian is explicitly not designed to handle. + . + Lintian does not handle filenames containing newlines, or filenames + that contain the strings " link to ", " -> ", or ": ". The last one + is used as a separator by the file command, the others are used as + separators by tar. + . + Lintian also does not handle filenames that contain backslashes, or + other characters that are mangled by tar's -tv output. + +Package: filename-games +Architecture: all +Depends: filenames +Section: games +Description: Test game filename/location checks + This package contains files with slightly less evil names than + filenames. + . + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. + +Package: more-filename-games +Architecture: all +Depends: filenames, filename-games +Section: games +Priority: optional +Description: More test for game filename/location checks + This package contains no evil names, only evil locations. + . + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. diff --git a/t/recipes/checks/desktop/x11/legacy-filenames/build-spec/debian/doc-base b/t/recipes/checks/desktop/x11/legacy-filenames/build-spec/debian/doc-base new file mode 100644 index 0000000..e5a611b --- /dev/null +++ b/t/recipes/checks/desktop/x11/legacy-filenames/build-spec/debian/doc-base @@ -0,0 +1,11 @@ +Document: testing +Title: Working doc-base control file +Author: Russ Allbery +Abstract: This control file ensures that we don't get false positives for + correct doc-base files. + . + There isn't anything wrong with this one. +Section: Education + +Format: Text +Files: /usr/share/doc/filenames/README.macosx diff --git a/t/recipes/checks/desktop/x11/legacy-filenames/build-spec/debian/rules b/t/recipes/checks/desktop/x11/legacy-filenames/build-spec/debian/rules new file mode 100755 index 0000000..0b9e87c --- /dev/null +++ b/t/recipes/checks/desktop/x11/legacy-filenames/build-spec/debian/rules @@ -0,0 +1,231 @@ +#!/usr/bin/make -f + +# Copyright (C) 1998 Richard Braakman +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +VENDORARCH := $(shell perl -MConfig -wE'say substr($$Config{vendorarch},1)') + +clean: + mkdir -p .svn CVS "{arch}" .arch-ids .bzr + touch data/.cvsignore data/svn-commit.tmp data/svk-commitsEr9P.tmp + touch data/.arch-inventory + touch 'data/.#Maelstrom Sound.1.1.1' 'data/Maelstrom Sounce.r121' + touch 'data/Maelstrom Sound.mine' + touch "data/'\\ " + touch filenames.c~ + +build-arch: + +build-indep: + +build: build-arch build-indep + + +binary-arch: + +binary-indep: + install -d debian/tmp/DEBIAN + cp -a data debian/tmp/files + chmod -R go=rX debian/tmp/files + + install -d debian/tmp/usr/lib/filenames + install -m 555 -d debian/tmp/usr/lib/filenames/readonly + touch debian/tmp/usr/lib/filenames/readonly/test + + install -d debian/tmp/usr/lib/menu + install -d debian/tmp/usr/share/menu + touch debian/tmp/usr/lib/menu/README + touch debian/tmp/usr/share/menu/README + touch debian/tmp/usr/lib/menu/menu + touch debian/tmp/usr/share/menu/menu + chmod 644 debian/tmp/usr/lib/menu/* + + install -d debian/tmp/$(VENDORARCH)/foo + mkdir debian/tmp/$(VENDORARCH)/.svn + mkdir debian/tmp/$(VENDORARCH)/CVS + mkdir "debian/tmp/$(VENDORARCH)/{arch}" + mkdir debian/tmp/$(VENDORARCH)/.arch-ids + mkdir debian/tmp/$(VENDORARCH)/.bzr + mkdir debian/tmp/$(VENDORARCH)/.be + mkdir debian/tmp/$(VENDORARCH)/.ditrack + install -d debian/tmp/usr/share/perl5 + echo foo > debian/tmp/$(VENDORARCH)/foo/.gitignore + echo foo > debian/tmp/$(VENDORARCH)/foo/.hgignore + echo foo > debian/tmp/$(VENDORARCH)/foo/.hgtags + echo foo > debian/tmp/$(VENDORARCH)/foo/.hg_archival.txt + + touch debian/tmp/$(VENDORARCH)/foo/.packlist + chmod 644 debian/tmp/$(VENDORARCH)/foo/.packlist + touch debian/tmp/$(VENDORARCH)/foo/bar.pm + TZ=UTC touch -t 197501010101 debian/tmp/$(VENDORARCH)/foo/ancient.pm + chmod 644 debian/tmp/$(VENDORARCH)/foo/bar.pm + + install -d debian/tmp/usr/share/pixmaps + install -d debian/tmp/usr/share/pixmaps/foo + touch debian/tmp/usr/share/pixmaps/license.jpeg + touch debian/tmp/usr/share/pixmaps/licence.jpg + touch debian/tmp/usr/share/pixmaps/copying.xpm + touch debian/tmp/usr/share/pixmaps/foo/COPYING.svg + touch debian/tmp/usr/share/pixmaps/foo/copying.png + touch debian/tmp/usr/share/pixmaps/license.txt + touch debian/tmp/usr/share/pixmaps/license.foo + touch debian/tmp/usr/share/pixmaps/COPYING + + install -d debian/tmp/usr/share/linda/overrides + echo 'foo' > debian/tmp/usr/share/linda/overrides/filenames + + install -d debian/tmp/usr/share/doc/filenames + touch debian/tmp/usr/share/doc/filenames/README.macosx + + echo foo > debian/tmp/usr/share/doc/filenames/bokmål + echo foo > debian/tmp/usr/share/doc/filenames/bokm\\ål + echo foo > debian/tmp/usr/share/doc/filenames/bokml + echo foo > debian/tmp/usr/share/doc/filenames/bokm\\l + + echo foo > debian/tmp/usr/share/doc/filenames/Thumbs.db + echo foo > debian/tmp/usr/share/doc/filenames/.DS_Store + echo foo > debian/tmp/usr/share/doc/filenames/._NEWS.Debian + + touch debian/tmp/usr/share/doc/filenames/news.debian + gzip -n debian/tmp/usr/share/doc/filenames/news.debian + touch debian/tmp/usr/share/doc/filenames/NEWS.Debian + + echo foo > debian/tmp/usr/share/doc/filenames/link-one + ln debian/tmp/usr/share/doc/filenames/link-one \ + debian/tmp/usr/share/doc/filenames/link-two + + install -d debian/tmp/usr/share/doc/filenames/examples + touch debian/tmp/usr/share/doc/filenames/examples/__init__.py + touch debian/tmp/usr/share/doc/filenames/examples/very_interesting_example + touch debian/tmp/usr/share/doc/filenames/examples/very_interesting_example2 + gzip -n debian/tmp/usr/share/doc/filenames/examples/very_interesting_example2 + + install -d debian/tmp/usr/lib/ada/adalib/ + touch debian/tmp/usr/lib/ada/adalib/test.ali debian/tmp/usr/lib/ada/adalib/test2.ali + chmod 0644 debian/tmp/usr/lib/ada/adalib/test.ali + chmod 0444 debian/tmp/usr/lib/ada/adalib/test2.ali + + install -d debian/tmp/usr/bin/X11/ + touch debian/tmp/usr/bin/X11/testxbin + install -d debian/tmp/usr/X11R6/bin + touch debian/tmp/usr/X11R6/bin/testxbin2 + install -d debian/tmp/usr/include/X11 + touch debian/tmp/usr/include/X11/foo.h + + install -d debian/tmp/usr/bin/mh + touch debian/tmp/usr/bin/mh/read + chmod 755 debian/tmp/usr/bin/mh/read + install -d debian/tmp/usr/bin/bin + touch debian/tmp/usr/bin/bin/bad + chmod 755 debian/tmp/usr/bin/bin/bad + + install -m 644 debian/changelog debian/tmp/usr/share/doc/filenames/Changes + gzip -n -9 debian/tmp/usr/share/doc/filenames/Changes + ln -s Changes.gz debian/tmp/usr/share/doc/filenames/changelog.gz + + install -d debian/tmp/var/www + echo foo > debian/tmp/var/www/foo + + install -d debian/tmp/srv/foo + touch debian/tmp/srv/foo/bar + install -d debian/tmp/opt/foo + touch debian/tmp/opt/foo/bar + + install -d debian/tmp/etc/gconf/schemas + touch debian/tmp/etc/gconf/schemas/test.schema + + install -d debian/tmp/usr/lib/sgml + touch debian/tmp/usr/lib/sgml/package + + install -d debian/tmp/usr/share/gnome/apps/System + touch debian/tmp/usr/share/gnome/apps/System/foo.desktop + + install -d debian/tmp/usr/share/filenames + touch debian/tmp/usr/share/filenames/jquery.js + touch debian/tmp/usr/share/filenames/jquery.lite.js + touch debian/tmp/usr/share/filenames/jquery.min.js + touch debian/tmp/usr/share/filenames/jquery.pack.js + touch debian/tmp/usr/share/filenames/mochikit.js + touch debian/tmp/usr/share/filenames/prototype-1.2.3.4.js + touch debian/tmp/usr/share/filenames/prototype.js + touch debian/tmp/usr/share/filenames/prototype.js.gz + touch debian/tmp/usr/share/filenames/scriptaculous.js + touch debian/tmp/usr/share/filenames/yahoo-dom-event.js + touch debian/tmp/usr/share/filenames/yahoo-min.js + + ln -s '../filenames/doc/version6.txt.gz' debian/tmp/usr/share/doc/filenames/version.txt.gz + ln -s ../../share/symlink debian/tmp/usr/lib/filenames/symlink1ok + ln -s ../../../etc/symlink debian/tmp/usr/lib/filenames/symlink1wrong + ln -s ../../../../etc/symlink debian/tmp/usr/lib/filenames/symlink2wrong + ln -s /etc/symlink debian/tmp/usr/lib/filenames/symlink2ok + ln -s /usr/lib/filenames/symlink2 debian/tmp/usr/lib/filenames/symlink3wrong + ln -s test debian/tmp/usr/lib/filenames/symlink3ok + ln -s ../filenames/symlink2 debian/tmp/usr/lib/filenames/symlink4wrong + ln -s ../menu/../somethingelse debian/tmp/usr/lib/filenames/symlink5wrong + ln -s ../menu/somethingelse debian/tmp/usr/lib/filenames/symlink4ok + ln -s ./file4 debian/tmp/usr/lib/filenames/symlink6wrong + ln -s ../menu/./something debian/tmp/usr/lib/filenames/symlink7wrong + ln -s ../menu//something debian/tmp/usr/lib/filenames/symlink8wrong + ln -s ../menu/something/ debian/tmp/usr/lib/filenames/symlink9wrong + ln -s .. debian/tmp/usr/lib/filenames/symlink5ok+warn + ln -s . debian/tmp/usr/lib/filenames/symlink6ok+warn + ln -s / debian/tmp/usr/lib/filenames/symlink7ok+warn + ln -s ../../.. debian/tmp/usr/lib/filenames/symlink10wrong + +# devhelp tests. Files in /usr/share/gtk-doc/html or /usr/share/devhelp/books +# are okay. Files elsewhere are okay iff their parent path is symlinked into +# one of those paths. + install -d debian/tmp/usr/share/devhelp/books/filenames + echo 'Not really XML' > debian/tmp/usr/share/devhelp/books/filenames/a.devhelp + echo 'Not really XML' > debian/tmp/usr/share/devhelp/books/filenames/.devhelp2 + gzip -n -9 debian/tmp/usr/share/devhelp/books/filenames/.devhelp2 + install -d debian/tmp/usr/share/gtk-doc/html/filenames + echo 'Not really XML' > debian/tmp/usr/share/gtk-doc/html/filenames/b.devhelp + gzip -n -9 debian/tmp/usr/share/gtk-doc/html/filenames/b.devhelp + install -d debian/tmp/usr/share/doc/filenames/good-devhelp + echo 'Not really XML' > debian/tmp/usr/share/doc/filenames/good-devhelp/.devhelp2 + install -d debian/tmp/usr/share/doc/filenames/bad-devhelp + echo 'Not really XML' > debian/tmp/usr/share/doc/filenames/bad-devhelp/c.devhelp + gzip -n -9 debian/tmp/usr/share/doc/filenames/bad-devhelp/c.devhelp + ln -s ../../doc/filenames/good-devhelp debian/tmp/usr/share/gtk-doc/html/good + ln -s ../doc/filenames/bad-devhelp debian/tmp/usr/share/gtk-doc/html/bad + + install -d debian/tmp/usr/share/doc-base + install -m 644 debian/doc-base debian/tmp/usr/share/doc-base/filenames + + dpkg-gencontrol -pfilenames -Pdebian/tmp + dpkg --build debian/tmp .. + + install -d debian/filename-games debian/filename-games/DEBIAN + install -d debian/filename-games/usr debian/filename-games/usr/games debian/filename-games/usr/bin + echo '#! /bin/sh' > debian/filename-games/usr/bin/test-game + chmod 755 debian/filename-games/usr/bin/test-game + dpkg-gencontrol -pfilename-games -Pdebian/filename-games + dpkg --build debian/filename-games .. + + install -d debian/more-filename-games debian/more-filename-games/DEBIAN + install -d debian/more-filename-games/usr debian/more-filename-games/usr/games debian/more-filename-games/usr/bin + echo '#! /bin/sh' > debian/more-filename-games/usr/bin/another-test-game + echo '#! /bin/sh' > debian/more-filename-games/usr/games/yet-another-test-game + chmod 755 debian/more-filename-games/usr/bin/another-test-game debian/more-filename-games/usr/games/yet-another-test-game + dpkg-gencontrol -pmore-filename-games -Pdebian/more-filename-games + dpkg --build debian/more-filename-games .. + +binary: binary-arch binary-indep + +.PHONY: build-indep build-arch build binary-arch binary-indep binary clean diff --git a/t/recipes/checks/desktop/x11/legacy-filenames/build-spec/fill-values b/t/recipes/checks/desktop/x11/legacy-filenames/build-spec/fill-values new file mode 100644 index 0000000..062a1ea --- /dev/null +++ b/t/recipes/checks/desktop/x11/legacy-filenames/build-spec/fill-values @@ -0,0 +1,5 @@ +Skeleton: upload-non-native +Testname: legacy-filenames +Source: filenames +Version: 1:12-0.1 +Description: Legacy test "filenames" diff --git a/t/recipes/checks/desktop/x11/legacy-filenames/build-spec/orig/data/ .tif b/t/recipes/checks/desktop/x11/legacy-filenames/build-spec/orig/data/ .tif new file mode 100644 index 0000000..07fd914 --- /dev/null +++ b/t/recipes/checks/desktop/x11/legacy-filenames/build-spec/orig/data/ .tif @@ -0,0 +1,2 @@ +This filename was inspired by the ".tif used by fnlib. The real package +uses space.tif. diff --git "a/t/recipes/checks/desktop/x11/legacy-filenames/build-spec/orig/data/\".tif" "b/t/recipes/checks/desktop/x11/legacy-filenames/build-spec/orig/data/\".tif" new file mode 100644 index 0000000..e005775 --- /dev/null +++ "b/t/recipes/checks/desktop/x11/legacy-filenames/build-spec/orig/data/\".tif" @@ -0,0 +1 @@ +This filename is really used, by fnlib. diff --git a/t/recipes/checks/desktop/x11/legacy-filenames/build-spec/orig/data/Maelstrom Sound b/t/recipes/checks/desktop/x11/legacy-filenames/build-spec/orig/data/Maelstrom Sound new file mode 100644 index 0000000..4110410 --- /dev/null +++ b/t/recipes/checks/desktop/x11/legacy-filenames/build-spec/orig/data/Maelstrom Sound @@ -0,0 +1 @@ +This filename occurs in the maelstrom package. diff --git a/t/recipes/checks/desktop/x11/legacy-filenames/eval/desc b/t/recipes/checks/desktop/x11/legacy-filenames/eval/desc new file mode 100644 index 0000000..7b219ba --- /dev/null +++ b/t/recipes/checks/desktop/x11/legacy-filenames/eval/desc @@ -0,0 +1,2 @@ +Testname: legacy-filenames +Check: desktop/x11 diff --git a/t/recipes/checks/desktop/x11/legacy-filenames/eval/hints b/t/recipes/checks/desktop/x11/legacy-filenames/eval/hints new file mode 100644 index 0000000..9980158 --- /dev/null +++ b/t/recipes/checks/desktop/x11/legacy-filenames/eval/hints @@ -0,0 +1,3 @@ +filenames (binary): package-installs-file-to-usr-x11r6 [usr/X11R6/bin/testxbin2] +filenames (binary): package-installs-file-to-usr-x11r6 [usr/X11R6/bin/] +filenames (binary): package-installs-file-to-usr-x11r6 [usr/X11R6/] diff --git a/t/recipes/checks/desktop/x11/legacy-filenames/eval/post-test b/t/recipes/checks/desktop/x11/legacy-filenames/eval/post-test new file mode 100644 index 0000000..571e35d --- /dev/null +++ b/t/recipes/checks/desktop/x11/legacy-filenames/eval/post-test @@ -0,0 +1,3 @@ +s/\(current is ([0-9]+\.)+[0-9]\)/(current is CURRENT)/ +s,usr/lib/([^\/]*/)?perl[0-9]*(/[0-9]*\.[0-9]*)?/,usr/lib/ma-dir/perl/version/,g +/package-installs-packlist/ d diff --git a/t/recipes/checks/dh-make/cruft-fixme-placeholders/build-spec/debian/README.source b/t/recipes/checks/dh-make/cruft-fixme-placeholders/build-spec/debian/README.source new file mode 100644 index 0000000..f4b7709 --- /dev/null +++ b/t/recipes/checks/dh-make/cruft-fixme-placeholders/build-spec/debian/README.source @@ -0,0 +1,5 @@ +cruft-fixme-placeholders for Debian +----------------------------------- + +FIXME: A reminder to do something +FIX_ME: npm2deb uses underscores diff --git a/t/recipes/checks/dh-make/cruft-fixme-placeholders/build-spec/debian/control.in b/t/recipes/checks/dh-make/cruft-fixme-placeholders/build-spec/debian/control.in new file mode 100644 index 0000000..4f62807 --- /dev/null +++ b/t/recipes/checks/dh-make/cruft-fixme-placeholders/build-spec/debian/control.in @@ -0,0 +1,22 @@ +Source: [% $source %] +Priority: optional +Section: devel +Maintainer: [% $author %] +Standards-Version: [% $standards_version %] +Build-Depends: [% $build_depends %] +Rules-Requires-Root: no + +Package: [% $source %] +Architecture: [% $package_architecture %] +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: [% $description %] + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. + . + FIXME: This line should be detected by Lintian. + . + This line shouldn't be detected as it has a quoted "FIXME". + . + FIXME: This mixed "FIXME" line should still be detected though. diff --git a/t/recipes/checks/dh-make/cruft-fixme-placeholders/build-spec/debian/copyright b/t/recipes/checks/dh-make/cruft-fixme-placeholders/build-spec/debian/copyright new file mode 100644 index 0000000..6bb2c0e --- /dev/null +++ b/t/recipes/checks/dh-make/cruft-fixme-placeholders/build-spec/debian/copyright @@ -0,0 +1,8 @@ +This is part of the testsuite of lintian. See the file debian/copyright +in the lintian source directory for more details. + +Insofar as this is copyrightable, it is: + + Copyright 2017 Chris Lamb + +FIXME: Lintian should detect this text. diff --git a/t/recipes/checks/dh-make/cruft-fixme-placeholders/build-spec/debian/copyright_hints b/t/recipes/checks/dh-make/cruft-fixme-placeholders/build-spec/debian/copyright_hints new file mode 100644 index 0000000..de8f916 --- /dev/null +++ b/t/recipes/checks/dh-make/cruft-fixme-placeholders/build-spec/debian/copyright_hints @@ -0,0 +1 @@ +FIXME: This file should be ignored. diff --git a/t/recipes/checks/dh-make/cruft-fixme-placeholders/build-spec/debian/rules b/t/recipes/checks/dh-make/cruft-fixme-placeholders/build-spec/debian/rules new file mode 100644 index 0000000..975a857 --- /dev/null +++ b/t/recipes/checks/dh-make/cruft-fixme-placeholders/build-spec/debian/rules @@ -0,0 +1,5 @@ +#!/usr/bin/make -f + +%: + # FIXME: Something + dh $@ diff --git a/t/recipes/checks/dh-make/cruft-fixme-placeholders/build-spec/fill-values b/t/recipes/checks/dh-make/cruft-fixme-placeholders/build-spec/fill-values new file mode 100644 index 0000000..dc619a2 --- /dev/null +++ b/t/recipes/checks/dh-make/cruft-fixme-placeholders/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: upload-native +Testname: cruft-fixme-placeholders +Description: Check for placeholders in various maintainer scripts diff --git a/t/recipes/checks/dh-make/cruft-fixme-placeholders/eval/desc b/t/recipes/checks/dh-make/cruft-fixme-placeholders/eval/desc new file mode 100644 index 0000000..10f5d9f --- /dev/null +++ b/t/recipes/checks/dh-make/cruft-fixme-placeholders/eval/desc @@ -0,0 +1,2 @@ +Testname: cruft-fixme-placeholders +Check: dh-make diff --git a/t/recipes/checks/dh-make/cruft-fixme-placeholders/eval/hints b/t/recipes/checks/dh-make/cruft-fixme-placeholders/eval/hints new file mode 100644 index 0000000..9d6298b --- /dev/null +++ b/t/recipes/checks/dh-make/cruft-fixme-placeholders/eval/hints @@ -0,0 +1,6 @@ +cruft-fixme-placeholders (source): file-contains-fixme-placeholder FIX_ME [debian/README.source:5] +cruft-fixme-placeholders (source): file-contains-fixme-placeholder FIXME [debian/rules:4] +cruft-fixme-placeholders (source): file-contains-fixme-placeholder FIXME [debian/copyright:8] +cruft-fixme-placeholders (source): file-contains-fixme-placeholder FIXME [debian/control:22] +cruft-fixme-placeholders (source): file-contains-fixme-placeholder FIXME [debian/control:18] +cruft-fixme-placeholders (source): file-contains-fixme-placeholder FIXME [debian/README.source:4] diff --git a/t/recipes/checks/dh-make/cruft-readme-source/build-spec/debian/README.source b/t/recipes/checks/dh-make/cruft-readme-source/build-spec/debian/README.source new file mode 100644 index 0000000..5fdbe79 --- /dev/null +++ b/t/recipes/checks/dh-make/cruft-readme-source/build-spec/debian/README.source @@ -0,0 +1,5 @@ +cruft-readme-source for Debian +------------------------------ + + diff --git a/t/recipes/checks/dh-make/cruft-readme-source/build-spec/fill-values b/t/recipes/checks/dh-make/cruft-readme-source/build-spec/fill-values new file mode 100644 index 0000000..be86fdc --- /dev/null +++ b/t/recipes/checks/dh-make/cruft-readme-source/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: upload-native +Testname: cruft-readme-source +Description: Check for cruft in README.source diff --git a/t/recipes/checks/dh-make/cruft-readme-source/eval/desc b/t/recipes/checks/dh-make/cruft-readme-source/eval/desc new file mode 100644 index 0000000..a46d9a7 --- /dev/null +++ b/t/recipes/checks/dh-make/cruft-readme-source/eval/desc @@ -0,0 +1,2 @@ +Testname: cruft-readme-source +Check: dh-make diff --git a/t/recipes/checks/dh-make/cruft-readme-source/eval/hints b/t/recipes/checks/dh-make/cruft-readme-source/eval/hints new file mode 100644 index 0000000..c44d576 --- /dev/null +++ b/t/recipes/checks/dh-make/cruft-readme-source/eval/hints @@ -0,0 +1 @@ +cruft-readme-source (source): readme-source-is-dh_make-template [debian/README.source] diff --git a/t/recipes/checks/dh-make/template/generic-dh-make-2008/build-spec/debian/README.Debian b/t/recipes/checks/dh-make/template/generic-dh-make-2008/build-spec/debian/README.Debian new file mode 100644 index 0000000..69112e6 --- /dev/null +++ b/t/recipes/checks/dh-make/template/generic-dh-make-2008/build-spec/debian/README.Debian @@ -0,0 +1,6 @@ +generic-dh-make-2008 for Debian +------------------------------- + + + + -- Russ Allbery Mon, 29 Dec 2008 17:33:59 -0800 diff --git a/t/recipes/checks/dh-make/template/generic-dh-make-2008/build-spec/debian/changelog.in b/t/recipes/checks/dh-make/template/generic-dh-make-2008/build-spec/debian/changelog.in new file mode 100644 index 0000000..8d16a3d --- /dev/null +++ b/t/recipes/checks/dh-make/template/generic-dh-make-2008/build-spec/debian/changelog.in @@ -0,0 +1,5 @@ +generic-dh-make-2008 ([% $version %]) [% $distribution %]; urgency=low + + * Initial release (Closes: #nnnn) + + -- Russ Allbery Mon, 29 Dec 2008 17:33:59 -0800 diff --git a/t/recipes/checks/dh-make/template/generic-dh-make-2008/build-spec/debian/compat.in b/t/recipes/checks/dh-make/template/generic-dh-make-2008/build-spec/debian/compat.in new file mode 100644 index 0000000..640a566 --- /dev/null +++ b/t/recipes/checks/dh-make/template/generic-dh-make-2008/build-spec/debian/compat.in @@ -0,0 +1 @@ +[% $dh_compat_level %] diff --git a/t/recipes/checks/dh-make/template/generic-dh-make-2008/build-spec/debian/control.in b/t/recipes/checks/dh-make/template/generic-dh-make-2008/build-spec/debian/control.in new file mode 100644 index 0000000..a668392 --- /dev/null +++ b/t/recipes/checks/dh-make/template/generic-dh-make-2008/build-spec/debian/control.in @@ -0,0 +1,13 @@ +Source: generic-dh-make-2008 +Section: unknown +Priority: optional +Maintainer: Russ Allbery +Build-Depends: debhelper (>= 7) +Standards-Version: 3.7.3 +Homepage: + +Package: generic-dh-make-2008 +Architecture: [% $package_architecture %] +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: + diff --git a/t/recipes/checks/dh-make/template/generic-dh-make-2008/build-spec/debian/copyright b/t/recipes/checks/dh-make/template/generic-dh-make-2008/build-spec/debian/copyright new file mode 100644 index 0000000..31b796a --- /dev/null +++ b/t/recipes/checks/dh-make/template/generic-dh-make-2008/build-spec/debian/copyright @@ -0,0 +1,24 @@ +This package was debianized by Russ Allbery on +Mon, 29 Dec 2008 17:33:59 -0800. + +It was downloaded from + +Upstream Author(s): + + + + +Copyright: + + + + +License: + + + +The Debian packaging is (C) 2008, Russ Allbery and +is licensed under the GPL, see `/usr/share/common-licenses/GPL'. + +# Please also look if there are files or directories which have a +# different copyright/license attached and list them here. diff --git a/t/recipes/checks/dh-make/template/generic-dh-make-2008/build-spec/debian/cron.d.ex b/t/recipes/checks/dh-make/template/generic-dh-make-2008/build-spec/debian/cron.d.ex new file mode 100644 index 0000000..d00b7d0 --- /dev/null +++ b/t/recipes/checks/dh-make/template/generic-dh-make-2008/build-spec/debian/cron.d.ex @@ -0,0 +1,4 @@ +# +# Regular cron jobs for the generic-dh-make-2008 package +# +0 4 * * * root [ -x /usr/bin/generic-dh-make-2008_maintenance ] && /usr/bin/generic-dh-make-2008_maintenance diff --git a/t/recipes/checks/dh-make/template/generic-dh-make-2008/build-spec/debian/dirs b/t/recipes/checks/dh-make/template/generic-dh-make-2008/build-spec/debian/dirs new file mode 100644 index 0000000..ca882bb --- /dev/null +++ b/t/recipes/checks/dh-make/template/generic-dh-make-2008/build-spec/debian/dirs @@ -0,0 +1,2 @@ +usr/bin +usr/sbin diff --git a/t/recipes/checks/dh-make/template/generic-dh-make-2008/build-spec/debian/docs b/t/recipes/checks/dh-make/template/generic-dh-make-2008/build-spec/debian/docs new file mode 100644 index 0000000..e845566 --- /dev/null +++ b/t/recipes/checks/dh-make/template/generic-dh-make-2008/build-spec/debian/docs @@ -0,0 +1 @@ +README diff --git a/t/recipes/checks/dh-make/template/generic-dh-make-2008/build-spec/debian/emacsen-install.ex b/t/recipes/checks/dh-make/template/generic-dh-make-2008/build-spec/debian/emacsen-install.ex new file mode 100644 index 0000000..393594b --- /dev/null +++ b/t/recipes/checks/dh-make/template/generic-dh-make-2008/build-spec/debian/emacsen-install.ex @@ -0,0 +1,45 @@ +#! /bin/sh -e +# /usr/lib/emacsen-common/packages/install/generic-dh-make-2008 + +# Written by Jim Van Zandt , borrowing heavily +# from the install scripts for gettext by Santiago Vila +# and octave by Dirk Eddelbuettel . + +FLAVOR=$1 +PACKAGE=generic-dh-make-2008 + +if [ ${FLAVOR} = emacs ]; then exit 0; fi + +echo install/${PACKAGE}: Handling install for emacsen flavor ${FLAVOR} + +#FLAVORTEST=`echo $FLAVOR | cut -c-6` +#if [ ${FLAVORTEST} = xemacs ] ; then +# SITEFLAG="-no-site-file" +#else +# SITEFLAG="--no-site-file" +#fi +FLAGS="${SITEFLAG} -q -batch -l path.el -f batch-byte-compile" + +ELDIR=/usr/share/emacs/site-lisp/${PACKAGE} +ELCDIR=/usr/share/${FLAVOR}/site-lisp/${PACKAGE} + +# Install-info-altdir does not actually exist. +# Maybe somebody will write it. +if test -x /usr/sbin/install-info-altdir; then + echo install/${PACKAGE}: install Info links for ${FLAVOR} + install-info-altdir --quiet --section "" "" --dirname=${FLAVOR} /usr/share/info/${PACKAGE}.info.gz +fi + +install -m 755 -d ${ELCDIR} +cd ${ELDIR} +FILES=`echo *.el` +cp ${FILES} ${ELCDIR} +cd ${ELCDIR} + +cat << EOF > path.el +(setq load-path (cons "." load-path) byte-compile-warnings nil) +EOF +${FLAVOR} ${FLAGS} ${FILES} +rm -f *.el path.el + +exit 0 diff --git a/t/recipes/checks/dh-make/template/generic-dh-make-2008/build-spec/debian/emacsen-remove.ex b/t/recipes/checks/dh-make/template/generic-dh-make-2008/build-spec/debian/emacsen-remove.ex new file mode 100644 index 0000000..c48d194 --- /dev/null +++ b/t/recipes/checks/dh-make/template/generic-dh-make-2008/build-spec/debian/emacsen-remove.ex @@ -0,0 +1,15 @@ +#!/bin/sh -e +# /usr/lib/emacsen-common/packages/remove/generic-dh-make-2008 + +FLAVOR=$1 +PACKAGE=generic-dh-make-2008 + +if [ ${FLAVOR} != emacs ]; then + if test -x /usr/sbin/install-info-altdir; then + echo remove/${PACKAGE}: removing Info links for ${FLAVOR} + install-info-altdir --quiet --remove --dirname=${FLAVOR} /usr/share/info/generic-dh-make-2008.info.gz + fi + + echo remove/${PACKAGE}: purging byte-compiled files for ${FLAVOR} + rm -rf /usr/share/${FLAVOR}/site-lisp/${PACKAGE} +fi diff --git a/t/recipes/checks/dh-make/template/generic-dh-make-2008/build-spec/debian/emacsen-startup.ex b/t/recipes/checks/dh-make/template/generic-dh-make-2008/build-spec/debian/emacsen-startup.ex new file mode 100644 index 0000000..b51657a --- /dev/null +++ b/t/recipes/checks/dh-make/template/generic-dh-make-2008/build-spec/debian/emacsen-startup.ex @@ -0,0 +1,25 @@ +;; -*-emacs-lisp-*- +;; +;; Emacs startup file, e.g. /etc/emacs/site-start.d/50generic-dh-make-2008.el +;; for the Debian generic-dh-make-2008 package +;; +;; Originally contributed by Nils Naumann +;; Modified by Dirk Eddelbuettel +;; Adapted for dh-make by Jim Van Zandt + +;; The generic-dh-make-2008 package follows the Debian/GNU Linux 'emacsen' policy and +;; byte-compiles its elisp files for each 'emacs flavor' (emacs19, +;; xemacs19, emacs20, xemacs20...). The compiled code is then +;; installed in a subdirectory of the respective site-lisp directory. +;; We have to add this to the load-path: +(let ((package-dir (concat "/usr/share/" + (symbol-name flavor) + "/site-lisp/generic-dh-make-2008"))) +;; If package-dir does not exist, the generic-dh-make-2008 package must have +;; removed but not purged, and we should skip the setup. + (when (file-directory-p package-dir) + (setq load-path (cons package-dir load-path)) + (autoload 'generic-dh-make-2008-mode "generic-dh-make-2008-mode" + "Major mode for editing generic-dh-make-2008 files." t) + (add-to-list 'auto-mode-alist '("\\.generic-dh-make-2008$" . generic-dh-make-2008-mode)))) + diff --git a/t/recipes/checks/dh-make/template/generic-dh-make-2008/build-spec/debian/generic-dh-make-2008.default.ex b/t/recipes/checks/dh-make/template/generic-dh-make-2008/build-spec/debian/generic-dh-make-2008.default.ex new file mode 100644 index 0000000..d770c6e --- /dev/null +++ b/t/recipes/checks/dh-make/template/generic-dh-make-2008/build-spec/debian/generic-dh-make-2008.default.ex @@ -0,0 +1,10 @@ +# Defaults for generic-dh-make-2008 initscript +# sourced by /etc/init.d/generic-dh-make-2008 +# installed at /etc/default/generic-dh-make-2008 by the maintainer scripts + +# +# This is a POSIX shell fragment +# + +# Additional options that are passed to the Daemon. +DAEMON_OPTS="" diff --git a/t/recipes/checks/dh-make/template/generic-dh-make-2008/build-spec/debian/generic-dh-make-2008.doc-base.EX b/t/recipes/checks/dh-make/template/generic-dh-make-2008/build-spec/debian/generic-dh-make-2008.doc-base.EX new file mode 100644 index 0000000..3b966d1 --- /dev/null +++ b/t/recipes/checks/dh-make/template/generic-dh-make-2008/build-spec/debian/generic-dh-make-2008.doc-base.EX @@ -0,0 +1,22 @@ +Document: generic-dh-make-2008 +Title: Debian generic-dh-make-2008 Manual +Author: +Abstract: This manual describes what generic-dh-make-2008 is + and how it can be used to + manage online manuals on Debian systems. +Section: unknown + +Format: debiandoc-sgml +Files: /usr/share/doc/generic-dh-make-2008/generic-dh-make-2008.sgml.gz + +Format: postscript +Files: /usr/share/doc/generic-dh-make-2008/generic-dh-make-2008.ps.gz + +Format: text +Files: /usr/share/doc/generic-dh-make-2008/generic-dh-make-2008.text.gz + +Format: HTML +Index: /usr/share/doc/generic-dh-make-2008/html/index.html +Files: /usr/share/doc/generic-dh-make-2008/html/*.html + + diff --git a/t/recipes/checks/dh-make/template/generic-dh-make-2008/build-spec/debian/init.d.ex b/t/recipes/checks/dh-make/template/generic-dh-make-2008/build-spec/debian/init.d.ex new file mode 100644 index 0000000..b464594 --- /dev/null +++ b/t/recipes/checks/dh-make/template/generic-dh-make-2008/build-spec/debian/init.d.ex @@ -0,0 +1,157 @@ +#! /bin/sh +# +# skeleton example file to build /etc/init.d/ scripts. +# This file should be used to construct scripts for /etc/init.d. +# +# Written by Miquel van Smoorenburg . +# Modified for Debian +# by Ian Murdock . +# Further changes by Javier Fernandez-Sanguino +# +# Version: @(#)skeleton 1.9 26-Feb-2001 miquels@cistron.nl +# + +PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin +DAEMON=/usr/sbin/generic-dh-make-2008 +NAME=generic-dh-make-2008 +DESC=generic-dh-make-2008 + +test -x $DAEMON || exit 0 + +LOGDIR=/var/log/generic-dh-make-2008 +PIDFILE=/var/run/$NAME.pid +DODTIME=1 # Time to wait for the server to die, in seconds + # If this value is set too low you might not + # let some servers to die gracefully and + # 'restart' will not work + +# Include generic-dh-make-2008 defaults if available +if [ -f /etc/default/generic-dh-make-2008 ] ; then + . /etc/default/generic-dh-make-2008 +fi + +set -e + +running_pid() +{ + # Check if a given process pid's cmdline matches a given name + pid=$1 + name=$2 + [ -z "$pid" ] && return 1 + [ ! -d /proc/$pid ] && return 1 + cmd=`cat /proc/$pid/cmdline | tr "\000" "\n"|head -n 1 |cut -d : -f 1` + # Is this the expected child? + [ "$cmd" != "$name" ] && return 1 + return 0 +} + +running() +{ +# Check if the process is running looking at /proc +# (works for all users) + + # No pidfile, probably no daemon present + [ ! -f "$PIDFILE" ] && return 1 + # Obtain the pid and check it against the binary name + pid=`cat $PIDFILE` + running_pid $pid $DAEMON || return 1 + return 0 +} + +force_stop() { +# Forcefully kill the process + [ ! -f "$PIDFILE" ] && return + if running ; then + kill -15 $pid + # Is it really dead? + [ -n "$DODTIME" ] && sleep "$DODTIME"s + if running ; then + kill -9 $pid + [ -n "$DODTIME" ] && sleep "$DODTIME"s + if running ; then + echo "Cannot kill $LABEL (pid=$pid)!" + exit 1 + fi + fi + fi + rm -f $PIDFILE + return 0 +} + +case "$1" in + start) + echo -n "Starting $DESC: " + start-stop-daemon --start --quiet --pidfile $PIDFILE \ + --exec $DAEMON -- $DAEMON_OPTS + if running ; then + echo "$NAME." + else + echo " ERROR." + fi + ;; + stop) + echo -n "Stopping $DESC: " + start-stop-daemon --stop --quiet --pidfile $PIDFILE \ + --exec $DAEMON + echo "$NAME." + ;; + force-stop) + echo -n "Forcefully stopping $DESC: " + force_stop + if ! running ; then + echo "$NAME." + else + echo " ERROR." + fi + ;; + #reload) + # + # If the daemon can reload its config files on the fly + # for example by sending it SIGHUP, do it here. + # + # If the daemon responds to changes in its config file + # directly anyway, make this a do-nothing entry. + # + # echo "Reloading $DESC configuration files." + # start-stop-daemon --stop --signal 1 --quiet --pidfile \ + # /var/run/$NAME.pid --exec $DAEMON + #;; + force-reload) + # + # If the "reload" option is implemented, move the "force-reload" + # option to the "reload" entry above. If not, "force-reload" is + # just the same as "restart" except that it does nothing if the + # daemon isn't already running. + # check wether $DAEMON is running. If so, restart + start-stop-daemon --stop --test --quiet --pidfile \ + /var/run/$NAME.pid --exec $DAEMON \ + && $0 restart \ + || exit 0 + ;; + restart) + echo -n "Restarting $DESC: " + start-stop-daemon --stop --quiet --pidfile \ + /var/run/$NAME.pid --exec $DAEMON + [ -n "$DODTIME" ] && sleep $DODTIME + start-stop-daemon --start --quiet --pidfile \ + /var/run/$NAME.pid --exec $DAEMON -- $DAEMON_OPTS + echo "$NAME." + ;; + status) + echo -n "$LABEL is " + if running ; then + echo "running" + else + echo " not running." + exit 1 + fi + ;; + *) + N=/etc/init.d/$NAME + # echo "Usage: $N {start|stop|restart|reload|force-reload}" >&2 + echo "Usage: $N {start|stop|restart|force-reload|status|force-stop}" >&2 + exit 1 + ;; +esac + +exit 0 diff --git a/t/recipes/checks/dh-make/template/generic-dh-make-2008/build-spec/debian/init.d.lsb.ex b/t/recipes/checks/dh-make/template/generic-dh-make-2008/build-spec/debian/init.d.lsb.ex new file mode 100644 index 0000000..b3559de --- /dev/null +++ b/t/recipes/checks/dh-make/template/generic-dh-make-2008/build-spec/debian/init.d.lsb.ex @@ -0,0 +1,296 @@ +#!/bin/sh +# +# Example init.d script with LSB support. +# +# Please read this init.d carefully and modify the sections to +# adjust it to the program you want to run. +# +# Copyright (c) 2007 Javier Fernandez-Sanguino +# +# This is free software; you may redistribute it and/or modify +# it under the terms of the GNU General Public License as +# published by the Free Software Foundation; either version 2, +# or (at your option) any later version. +# +# This is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License with +# the Debian operating system, in /usr/share/common-licenses/GPL; if +# not, write to the Free Software Foundation, Inc., 59 Temple Place, +# Suite 330, Boston, MA 02111-1307 USA +# +### BEGIN INIT INFO +# Provides: generic-dh-make-2008 +# Required-Start: $network $local_fs +# Required-Stop: +# Should-Start: $named +# Should-Stop: +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +# Short-Description: +# Description: +# <...> +# <...> +### END INIT INFO + +PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin + +DAEMON=/usr/sbin/generic-dh-make-2008 # Introduce the server's location here +NAME=#PACKAGE # Introduce the short server's name here +DESC=#PACKAGE # Introduce a short description here +LOGDIR=/var/log/generic-dh-make-2008 # Log directory to use + +PIDFILE=/var/run/$NAME.pid + +test -x $DAEMON || exit 0 + +. /lib/lsb/init-functions + +# Default options, these can be overriden by the information +# at /etc/default/$NAME +DAEMON_OPTS="" # Additional options given to the server + +DIETIME=10 # Time to wait for the server to die, in seconds + # If this value is set too low you might not + # let some servers to die gracefully and + # 'restart' will not work + +#STARTTIME=2 # Time to wait for the server to start, in seconds + # If this value is set each time the server is + # started (on start or restart) the script will + # stall to try to determine if it is running + # If it is not set and the server takes time + # to setup a pid file the log message might + # be a false positive (says it did not start + # when it actually did) + +LOGFILE=$LOGDIR/$NAME.log # Server logfile +#DAEMONUSER=generic-dh-make-2008 # Users to run the daemons as. If this value + # is set start-stop-daemon will chuid the server + +# Include defaults if available +if [ -f /etc/default/$NAME ] ; then + . /etc/default/$NAME +fi + +# Use this if you want the user to explicitly set 'RUN' in +# /etc/default/ +#if [ "x$RUN" != "xyes" ] ; then +# log_failure_msg "$NAME disabled, please adjust the configuration to your needs " +# log_failure_msg "and then set RUN to 'yes' in /etc/default/$NAME to enable it." +# exit 1 +#fi + +# Check that the user exists (if we set a user) +# Does the user exist? +if [ -n "$DAEMONUSER" ] ; then + if getent passwd | grep -q "^$DAEMONUSER:"; then + # Obtain the uid and gid + DAEMONUID=`getent passwd |grep "^$DAEMONUSER:" | awk -F : '{print $3}'` + DAEMONGID=`getent passwd |grep "^$DAEMONUSER:" | awk -F : '{print $4}'` + else + log_failure_msg "The user $DAEMONUSER, required to run $NAME does not exist." + exit 1 + fi +fi + + +set -e + +running_pid() { +# Check if a given process pid's cmdline matches a given name + pid=$1 + name=$2 + [ -z "$pid" ] && return 1 + [ ! -d /proc/$pid ] && return 1 + cmd=`cat /proc/$pid/cmdline | tr "\000" "\n"|head -n 1 |cut -d : -f 1` + # Is this the expected server + [ "$cmd" != "$name" ] && return 1 + return 0 +} + +running() { +# Check if the process is running looking at /proc +# (works for all users) + + # No pidfile, probably no daemon present + [ ! -f "$PIDFILE" ] && return 1 + pid=`cat $PIDFILE` + running_pid $pid $DAEMON || return 1 + return 0 +} + +start_server() { +# Start the process using the wrapper + if [ -z "$DAEMONUSER" ] ; then + start_daemon -p $PIDFILE $DAEMON -- $DAEMON_OPTS + errcode=$? + else +# if we are using a daemonuser then change the user id + start-stop-daemon --start --quiet --pidfile $PIDFILE \ + --chuid $DAEMONUSER \ + --exec $DAEMON -- $DAEMON_OPTS + errcode=$? + fi + return $errcode +} + +stop_server() { +# Stop the process using the wrapper + if [ -z "$DAEMONUSER" ] ; then + killproc -p $PIDFILE $DAEMON + errcode=$? + else +# if we are using a daemonuser then look for process that match + start-stop-daemon --stop --quiet --pidfile $PIDFILE \ + --user $DAEMONUSER \ + --exec $DAEMON + errcode=$? + fi + + return $errcode +} + +reload_server() { + [ ! -f "$PIDFILE" ] && return 1 + pid=pidofproc $PIDFILE # This is the daemon's pid + # Send a SIGHUP + kill -1 $pid + return $? +} + +force_stop() { +# Force the process to die killing it manually + [ ! -e "$PIDFILE" ] && return + if running ; then + kill -15 $pid + # Is it really dead? + sleep "$DIETIME"s + if running ; then + kill -9 $pid + sleep "$DIETIME"s + if running ; then + echo "Cannot kill $NAME (pid=$pid)!" + exit 1 + fi + fi + fi + rm -f $PIDFILE +} + + +case "$1" in + start) + log_daemon_msg "Starting $DESC " "$NAME" + # Check if it's running first + if running ; then + log_progress_msg "apparently already running" + log_end_msg 0 + exit 0 + fi + if start_server ; then + # NOTE: Some servers might die some time after they start, + # this code will detect this issue if STARTTIME is set + # to a reasonable value + [ -n "$STARTTIME" ] && sleep $STARTTIME # Wait some time + if running ; then + # It's ok, the server started and is running + log_end_msg 0 + else + # It is not running after we did start + log_end_msg 1 + fi + else + # Either we could not start it + log_end_msg 1 + fi + ;; + stop) + log_daemon_msg "Stopping $DESC" "$NAME" + if running ; then + # Only stop the server if we see it running + errcode=0 + stop_server || errcode=$? + log_end_msg $errcode + else + # If it's not running don't do anything + log_progress_msg "apparently not running" + log_end_msg 0 + exit 0 + fi + ;; + force-stop) + # First try to stop gracefully the program + $0 stop + if running; then + # If it's still running try to kill it more forcefully + log_daemon_msg "Stopping (force) $DESC" "$NAME" + errcode=0 + force_stop || errcode=$? + log_end_msg $errcode + fi + ;; + restart|force-reload) + log_daemon_msg "Restarting $DESC" "$NAME" + errcode=0 + stop_server || errcode=$? + # Wait some sensible amount, some server need this + [ -n "$DIETIME" ] && sleep $DIETIME + start_server || errcode=$? + [ -n "$STARTTIME" ] && sleep $STARTTIME + running || errcode=$? + log_end_msg $errcode + ;; + status) + + log_daemon_msg "Checking status of $DESC" "$NAME" + if running ; then + log_progress_msg "running" + log_end_msg 0 + else + log_progress_msg "apparently not running" + log_end_msg 1 + exit 1 + fi + ;; + # Use this if the daemon cannot reload + reload) + log_warning_msg "Reloading $NAME daemon: not implemented, as the daemon" + log_warning_msg "cannot re-read the config file (use restart)." + ;; + # And this if it cann + #reload) + # + # If the daemon can reload its config files on the fly + # for example by sending it SIGHUP, do it here. + # + # If the daemon responds to changes in its config file + # directly anyway, make this a do-nothing entry. + # + # log_daemon_msg "Reloading $DESC configuration files" "$NAME" + # if running ; then + # reload_server + # if ! running ; then + # Process died after we tried to reload + # log_progress_msg "died on reload" + # log_end_msg 1 + # exit 1 + # fi + # else + # log_progress_msg "server is not running" + # log_end_msg 1 + # exit 1 + # fi + #;; + + *) + N=/etc/init.d/$NAME + echo "Usage: $N {start|stop|force-stop|restart|force-reload|status}" >&2 + exit 1 + ;; +esac + +exit 0 diff --git a/t/recipes/checks/dh-make/template/generic-dh-make-2008/build-spec/debian/manpage.1.ex b/t/recipes/checks/dh-make/template/generic-dh-make-2008/build-spec/debian/manpage.1.ex new file mode 100644 index 0000000..d67baa2 --- /dev/null +++ b/t/recipes/checks/dh-make/template/generic-dh-make-2008/build-spec/debian/manpage.1.ex @@ -0,0 +1,59 @@ +.\" Hey, EMACS: -*- nroff -*- +.\" First parameter, NAME, should be all caps +.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection +.\" other parameters are allowed: see man(7), man(1) +.TH GENERIC-DH-MAKE-2008 SECTION "December 29, 2008" +.\" Please adjust this date whenever revising the manpage. +.\" +.\" Some roff macros, for reference: +.\" .nh disable hyphenation +.\" .hy enable hyphenation +.\" .ad l left justify +.\" .ad b justify to both left and right margins +.\" .nf disable filling +.\" .fi enable filling +.\" .br insert line break +.\" .sp insert n+1 empty lines +.\" for manpage-specific macros, see man(7) +.SH NAME +generic-dh-make-2008 \- program to do something +.SH SYNOPSIS +.B generic-dh-make-2008 +.RI [ options ] " files" ... +.br +.B bar +.RI [ options ] " files" ... +.SH DESCRIPTION +This manual page documents briefly the +.B generic-dh-make-2008 +and +.B bar +commands. +.PP +.\" TeX users may be more comfortable with the \fB\fP and +.\" \fI\fP escape sequences to invode bold face and italics, +.\" respectively. +\fBgeneric-dh-make-2008\fP is a program that... +.SH OPTIONS +These programs follow the usual GNU command line syntax, with long +options starting with two dashes (`-'). +A summary of options is included below. +For a complete description, see the Info files. +.TP +.B \-h, \-\-help +Show summary of options. +.TP +.B \-v, \-\-version +Show version of program. +.SH SEE ALSO +.BR bar (1), +.BR baz (1). +.br +The programs are documented fully by +.IR "The Rise and Fall of a Fooish Bar" , +available via the Info system. +.SH AUTHOR +generic-dh-make-2008 was written by . +.PP +This manual page was written by Russ Allbery , +for the Debian project (but may be used by others). diff --git a/t/recipes/checks/dh-make/template/generic-dh-make-2008/build-spec/debian/manpage.sgml.ex b/t/recipes/checks/dh-make/template/generic-dh-make-2008/build-spec/debian/manpage.sgml.ex new file mode 100644 index 0000000..26b3e0c --- /dev/null +++ b/t/recipes/checks/dh-make/template/generic-dh-make-2008/build-spec/debian/manpage.sgml.ex @@ -0,0 +1,156 @@ + manpage.1'. You may view + the manual page with: `docbook-to-man manpage.sgml | nroff -man | + less'. A typical entry in a Makefile or Makefile.am is: + +manpage.1: manpage.sgml + docbook-to-man $< > $@ + + + The docbook-to-man binary is found in the docbook-to-man package. + Please remember that if you create the nroff version in one of the + debian/rules file targets (such as build), you will need to include + docbook-to-man in your Build-Depends control field. + + --> + + + FIRSTNAME"> + SURNAME"> + + December 29, 2008"> + + SECTION"> + rra@debian.org"> + + GENERIC-DH-MAKE-2008"> + + + Debian"> + GNU"> + GPL"> +]> + + + +
      + &dhemail; +
      + + &dhfirstname; + &dhsurname; + + + 2003 + &dhusername; + + &dhdate; +
      + + &dhucpackage; + + &dhsection; + + + &dhpackage; + + program to do something + + + + &dhpackage; + + + + + + + + DESCRIPTION + + This manual page documents briefly the + &dhpackage; and bar + commands. + + This manual page was written for the &debian; distribution + because the original program does not have a manual page. + Instead, it has documentation in the &gnu; + Info format; see below. + + &dhpackage; is a program that... + + + + OPTIONS + + These programs follow the usual &gnu; command line syntax, + with long options starting with two dashes (`-'). A summary of + options is included below. For a complete description, see the + Info files. + + + + + + + + Show summary of options. + + + + + + + + Show version of program. + + + + + + SEE ALSO + + bar (1), baz (1). + + The programs are documented fully by The Rise and + Fall of a Fooish Bar available via the + Info system. + + + AUTHOR + + This manual page was written by &dhusername; &dhemail; for + the &debian; system (but may be used by others). Permission is + granted to copy, distribute and/or modify this document under + the terms of the &gnu; General Public License, Version 2 any + later version published by the Free Software Foundation. + + + On Debian systems, the complete text of the GNU General Public + License can be found in /usr/share/common-licenses/GPL. + + + +
      + + + + diff --git a/t/recipes/checks/dh-make/template/generic-dh-make-2008/build-spec/debian/manpage.xml.ex b/t/recipes/checks/dh-make/template/generic-dh-make-2008/build-spec/debian/manpage.xml.ex new file mode 100644 index 0000000..2d01c6f --- /dev/null +++ b/t/recipes/checks/dh-make/template/generic-dh-make-2008/build-spec/debian/manpage.xml.ex @@ -0,0 +1,291 @@ + +.
      will be generated. You may view the +manual page with: nroff -man .
      | less'. A typical entry +in a Makefile or Makefile.am is: + +DB2MAN = /usr/share/sgml/docbook/stylesheet/xsl/nwalsh/manpages/docbook.xsl +XP = xsltproc -''-nonet -''-param man.charmap.use.subset "0" + +manpage.1: manpage.xml + $(XP) $(DB2MAN) $< + +The xsltproc binary is found in the xsltproc package. The XSL files are in +docbook-xsl. A description of the parameters you can use can be found in the +docbook-xsl-doc-* packages. Please remember that if you create the nroff +version in one of the debian/rules file targets (such as build), you will need +to include xsltproc and docbook-xsl in your Build-Depends control field. +Alternatively use the xmlto command/package. That will also automatically +pull in xsltproc and docbook-xsl. + +Notes for using docbook2x: docbook2x-man does not automatically create the +AUTHOR(S) and COPYRIGHT sections. In this case, please add them manually as + ... . + +To disable the automatic creation of the AUTHOR(S) and COPYRIGHT sections +read /usr/share/doc/docbook-xsl/doc/manpages/authors.html. This file can be +found in the docbook-xsl-doc-html package. + +Validation can be done using: `xmllint -''-noout -''-valid manpage.xml` + +General documentation about man-pages and man-page-formatting: +man(1), man(7), http://www.tldp.org/HOWTO/Man-Page/ + +--> + + + + + + + + + + + + + +]> + + + + &dhtitle; + &dhpackage; + + + &dhfirstname; + &dhsurname; + Wrote this manpage for the Debian system. +
      + &dhemail; +
      +
      +
      + + 2007 + &dhusername; + + + This manual page was written for the Debian system + (but may be used by others). + Permission is granted to copy, distribute and/or modify this + document under the terms of the GNU General Public License, + Version 2 or (at your option) any later version published by + the Free Software Foundation. + On Debian systems, the complete text of the GNU General Public + License can be found in + /usr/share/common-licenses/GPL. + +
      + + &dhucpackage; + &dhsection; + + + &dhpackage; + program to do something + + + + &dhpackage; + + + + + + + + + this + + + + + + + + this + that + + + + + &dhpackage; + + + + + + + + + + + + + + + + + + + DESCRIPTION + This manual page documents briefly the + &dhpackage; and bar + commands. + This manual page was written for the Debian distribution + because the original program does not have a manual page. + Instead, it has documentation in the GNU + info + 1 + format; see below. + &dhpackage; is a program that... + + + OPTIONS + The program follows the usual GNU command line syntax, + with long options starting with two dashes (`-'). A summary of + options is included below. For a complete description, see the + + info + 1 + files. + + + + + + + Does this and that. + + + + + + + Show summary of options. + + + + + + + Show version of program. + + + + + + FILES + + + /etc/foo.conf + + The system-wide configuration file to control the + behaviour of &dhpackage;. See + + foo.conf + 5 + for further details. + + + + ${HOME}/.foo.conf + + The per-user configuration file to control the + behaviour of &dhpackage;. See + + foo.conf + 5 + for further details. + + + + + + ENVIONMENT + + + FOO_CONF + + If used, the defined file is used as configuration + file (see also ). + + + + + + DIAGNOSTICS + The following diagnostics may be issued + on stderr: + + + Bad configuration file. Exiting. + + The configuration file seems to contain a broken configuration + line. Use the option, to get more info. + + + + + &dhpackage; provides some return codes, that can + be used in scripts: + + Code + Diagnostic + + 0 + Program exited successfully. + + + 1 + The configuration file seems to be broken. + + + + + + BUGS + The program is currently limited to only work + with the foobar library. + The upstreams BTS can be found + at . + + + SEE ALSO + + + bar + 1 + , + baz + 1 + , + foo.conf + 5 + + The programs are documented fully by The Rise and + Fall of a Fooish Bar available via the + info + 1 + system. + +
      + diff --git a/t/recipes/checks/dh-make/template/generic-dh-make-2008/build-spec/debian/menu.ex b/t/recipes/checks/dh-make/template/generic-dh-make-2008/build-spec/debian/menu.ex new file mode 100644 index 0000000..8a67e62 --- /dev/null +++ b/t/recipes/checks/dh-make/template/generic-dh-make-2008/build-spec/debian/menu.ex @@ -0,0 +1,2 @@ +?package(generic-dh-make-2008):needs="X11|text|vc|wm" section="Applications/see-menu-manual"\ + title="generic-dh-make-2008" command="/usr/bin/generic-dh-make-2008" diff --git a/t/recipes/checks/dh-make/template/generic-dh-make-2008/build-spec/debian/postinst.ex b/t/recipes/checks/dh-make/template/generic-dh-make-2008/build-spec/debian/postinst.ex new file mode 100644 index 0000000..b5f5ca7 --- /dev/null +++ b/t/recipes/checks/dh-make/template/generic-dh-make-2008/build-spec/debian/postinst.ex @@ -0,0 +1,41 @@ +#!/bin/sh +# postinst script for generic-dh-make-2008 +# +# see: dh_installdeb(1) + +set -e + +# summary of how this script can be called: +# * `configure' +# * `abort-upgrade' +# * `abort-remove' `in-favour' +# +# * `abort-remove' +# * `abort-deconfigure' `in-favour' +# `removing' +# +# for details, see http://www.debian.org/doc/debian-policy/ or +# the debian-policy package + + +case "$1" in + configure) + ;; + + abort-upgrade|abort-remove|abort-deconfigure) + ;; + + *) + echo "postinst called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# + +exit 0 + + diff --git a/t/recipes/checks/dh-make/template/generic-dh-make-2008/build-spec/debian/postrm.ex b/t/recipes/checks/dh-make/template/generic-dh-make-2008/build-spec/debian/postrm.ex new file mode 100644 index 0000000..1d8a18a --- /dev/null +++ b/t/recipes/checks/dh-make/template/generic-dh-make-2008/build-spec/debian/postrm.ex @@ -0,0 +1,39 @@ +#!/bin/sh +# postrm script for generic-dh-make-2008 +# +# see: dh_installdeb(1) + +set -e + +# summary of how this script can be called: +# * `remove' +# * `purge' +# * `upgrade' +# * `failed-upgrade' +# * `abort-install' +# * `abort-install' +# * `abort-upgrade' +# * `disappear' +# +# for details, see http://www.debian.org/doc/debian-policy/ or +# the debian-policy package + + +case "$1" in + purge|remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear) + ;; + + *) + echo "postrm called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# + +exit 0 + + diff --git a/t/recipes/checks/dh-make/template/generic-dh-make-2008/build-spec/debian/preinst.ex b/t/recipes/checks/dh-make/template/generic-dh-make-2008/build-spec/debian/preinst.ex new file mode 100644 index 0000000..3134ccf --- /dev/null +++ b/t/recipes/checks/dh-make/template/generic-dh-make-2008/build-spec/debian/preinst.ex @@ -0,0 +1,37 @@ +#!/bin/sh +# preinst script for generic-dh-make-2008 +# +# see: dh_installdeb(1) + +set -e + +# summary of how this script can be called: +# * `install' +# * `install' +# * `upgrade' +# * `abort-upgrade' +# for details, see http://www.debian.org/doc/debian-policy/ or +# the debian-policy package + + +case "$1" in + install|upgrade) + ;; + + abort-upgrade) + ;; + + *) + echo "preinst called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# + +exit 0 + + diff --git a/t/recipes/checks/dh-make/template/generic-dh-make-2008/build-spec/debian/prerm.ex b/t/recipes/checks/dh-make/template/generic-dh-make-2008/build-spec/debian/prerm.ex new file mode 100644 index 0000000..4e5dd3f --- /dev/null +++ b/t/recipes/checks/dh-make/template/generic-dh-make-2008/build-spec/debian/prerm.ex @@ -0,0 +1,40 @@ +#!/bin/sh +# prerm script for generic-dh-make-2008 +# +# see: dh_installdeb(1) + +set -e + +# summary of how this script can be called: +# * `remove' +# * `upgrade' +# * `failed-upgrade' +# * `remove' `in-favour' +# * `deconfigure' `in-favour' +# `removing' +# +# for details, see http://www.debian.org/doc/debian-policy/ or +# the debian-policy package + + +case "$1" in + remove|upgrade|deconfigure) + ;; + + failed-upgrade) + ;; + + *) + echo "prerm called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# + +exit 0 + + diff --git a/t/recipes/checks/dh-make/template/generic-dh-make-2008/build-spec/debian/rules b/t/recipes/checks/dh-make/template/generic-dh-make-2008/build-spec/debian/rules new file mode 100755 index 0000000..92aa2b1 --- /dev/null +++ b/t/recipes/checks/dh-make/template/generic-dh-make-2008/build-spec/debian/rules @@ -0,0 +1,91 @@ +#!/usr/bin/make -f +# -*- makefile -*- +# Sample debian/rules that uses debhelper. +# This file was originally written by Joey Hess and Craig Small. +# As a special exception, when this file is copied by dh-make into a +# dh-make output file, you may use that output file without restriction. +# This special exception was added by Craig Small in version 0.37 of dh-make. + +# Uncomment this to turn on verbose mode. +#export DH_VERBOSE=1 + + + + + +configure: configure-stamp +configure-stamp: + dh_testdir + # Add here commands to configure the package. + + touch configure-stamp + + +build: build-stamp + +build-stamp: configure-stamp + dh_testdir + + # Add here commands to compile the package. + $(MAKE) + #docbook-to-man debian/generic-dh-make-2008.sgml > generic-dh-make-2008.1 + + touch $@ + +clean: + dh_testdir + dh_testroot + rm -f build-stamp configure-stamp + + # Add here commands to clean up after the build process. + $(MAKE) clean + + dh_clean + +install: build + dh_testdir + dh_testroot + dh_clean -k + dh_installdirs + + # Add here commands to install the package into debian/generic-dh-make-2008. + $(MAKE) DESTDIR=$(CURDIR)/debian/generic-dh-make-2008 install + + +# Build architecture-independent files here. +binary-indep: build install +# We have nothing to do by default. + +# Build architecture-dependent files here. +binary-arch: build install + dh_testdir + dh_testroot + dh_installchangelogs + dh_installdocs + dh_installexamples +# dh_install +# dh_installmenu +# dh_installdebconf +# dh_installlogrotate +# dh_installemacsen +# dh_installpam +# dh_installmime +# dh_python +# dh_installinit +# dh_installcron +# dh_installinfo + dh_installman + dh_link + dh_strip + dh_compress + dh_fixperms +# dh_perl +# dh_makeshlibs + dh_installdeb + dh_shlibdeps + dh_gencontrol + dh_md5sums + dh_builddeb + +binary: binary-indep binary-arch +.PHONY: build clean binary-indep binary-arch binary install configure diff --git a/t/recipes/checks/dh-make/template/generic-dh-make-2008/build-spec/debian/watch.ex b/t/recipes/checks/dh-make/template/generic-dh-make-2008/build-spec/debian/watch.ex new file mode 100644 index 0000000..e62d18f --- /dev/null +++ b/t/recipes/checks/dh-make/template/generic-dh-make-2008/build-spec/debian/watch.ex @@ -0,0 +1,23 @@ +# Example watch control file for uscan +# Rename this file to "watch" and then you can run the "uscan" command +# to check for upstream updates and more. +# See uscan(1) for format + +# Compulsory line, this is a version 3 file +version=3 + +# Uncomment to examine a Webpage +# +#http://www.example.com/downloads.php generic-dh-make-2008-(.*)\.tar\.gz + +# Uncomment to examine a Webserver directory +#http://www.example.com/pub/generic-dh-make-2008-(.*)\.tar\.gz + +# Uncommment to examine a FTP server +#ftp://ftp.example.com/pub/generic-dh-make-2008-(.*)\.tar\.gz debian uupdate + +# Uncomment to find new files on sourceforge, for devscripts >= 2.9 +# http://sf.net/generic-dh-make-2008/generic-dh-make-2008-(.*)\.tar\.gz + +# Uncomment to find new files on GooglePages +# http://example.googlepages.com/foo.html generic-dh-make-2008-(.*)\.tar\.gz diff --git a/t/recipes/checks/dh-make/template/generic-dh-make-2008/build-spec/fill-values b/t/recipes/checks/dh-make/template/generic-dh-make-2008/build-spec/fill-values new file mode 100644 index 0000000..ef7a896 --- /dev/null +++ b/t/recipes/checks/dh-make/template/generic-dh-make-2008/build-spec/fill-values @@ -0,0 +1,7 @@ +Testname: generic-dh-make-2008 +Skeleton: upload-builder-only +Author: Russ Allbery +Package-Architecture: any +Dh-Compat-Level: 7 +Description: Generic dh_make template generated in 2008 +Default-Build-Depends: debhelper (>= [% $dh_compat_level %]~) diff --git a/t/recipes/checks/dh-make/template/generic-dh-make-2008/build-spec/orig/Makefile b/t/recipes/checks/dh-make/template/generic-dh-make-2008/build-spec/orig/Makefile new file mode 100644 index 0000000..4f762d8 --- /dev/null +++ b/t/recipes/checks/dh-make/template/generic-dh-make-2008/build-spec/orig/Makefile @@ -0,0 +1,4 @@ +# Stub Makefile that's just enough so that the default rules file doesn't +# error out. + +clean install: diff --git a/t/recipes/checks/dh-make/template/generic-dh-make-2008/build-spec/orig/README b/t/recipes/checks/dh-make/template/generic-dh-make-2008/build-spec/orig/README new file mode 100644 index 0000000..6a3c009 --- /dev/null +++ b/t/recipes/checks/dh-make/template/generic-dh-make-2008/build-spec/orig/README @@ -0,0 +1,13 @@ +dh_make 0.46 test +================= + +This is the results of running dh_make 0.46 on an upstream tarball +containing only this file. It's a useful test for the various dh_make +template and boilerplate tags, as well as many tags for ways of doing +things dh_make used to promote but are now deprecated or old debhelper +commands that are now deprecated. + +Please don't modify anything about the files in this package; instead, add +new tags as needed when Lintian adds new checks. This test case is +intended to continue to be a test of Lintian's handling of old and +template packages. diff --git a/t/recipes/checks/dh-make/template/generic-dh-make-2008/build-spec/pre-build.in b/t/recipes/checks/dh-make/template/generic-dh-make-2008/build-spec/pre-build.in new file mode 100755 index 0000000..bbdb5cb --- /dev/null +++ b/t/recipes/checks/dh-make/template/generic-dh-make-2008/build-spec/pre-build.in @@ -0,0 +1,5 @@ +#!/bin/sh + +# not using any templates, but dh_clean requires compat + +echo "[% $dh_compat_level %]" > "$1/debian/compat" diff --git a/t/recipes/checks/dh-make/template/generic-dh-make-2008/eval/desc b/t/recipes/checks/dh-make/template/generic-dh-make-2008/eval/desc new file mode 100644 index 0000000..101d4c8 --- /dev/null +++ b/t/recipes/checks/dh-make/template/generic-dh-make-2008/eval/desc @@ -0,0 +1,4 @@ +Testname: generic-dh-make-2008 +Check: dh-make/template +See-Also: + Debian Bug#497347 diff --git a/t/recipes/checks/dh-make/template/generic-dh-make-2008/eval/hints b/t/recipes/checks/dh-make/template/generic-dh-make-2008/eval/hints new file mode 100644 index 0000000..f2817be --- /dev/null +++ b/t/recipes/checks/dh-make/template/generic-dh-make-2008/eval/hints @@ -0,0 +1,17 @@ +generic-dh-make-2008 (source): dh-make-template-in-source [debian/watch.ex] +generic-dh-make-2008 (source): dh-make-template-in-source [debian/prerm.ex] +generic-dh-make-2008 (source): dh-make-template-in-source [debian/preinst.ex] +generic-dh-make-2008 (source): dh-make-template-in-source [debian/postrm.ex] +generic-dh-make-2008 (source): dh-make-template-in-source [debian/postinst.ex] +generic-dh-make-2008 (source): dh-make-template-in-source [debian/menu.ex] +generic-dh-make-2008 (source): dh-make-template-in-source [debian/manpage.xml.ex] +generic-dh-make-2008 (source): dh-make-template-in-source [debian/manpage.sgml.ex] +generic-dh-make-2008 (source): dh-make-template-in-source [debian/manpage.1.ex] +generic-dh-make-2008 (source): dh-make-template-in-source [debian/init.d.lsb.ex] +generic-dh-make-2008 (source): dh-make-template-in-source [debian/init.d.ex] +generic-dh-make-2008 (source): dh-make-template-in-source [debian/generic-dh-make-2008.doc-base.EX] +generic-dh-make-2008 (source): dh-make-template-in-source [debian/generic-dh-make-2008.default.ex] +generic-dh-make-2008 (source): dh-make-template-in-source [debian/emacsen-startup.ex] +generic-dh-make-2008 (source): dh-make-template-in-source [debian/emacsen-remove.ex] +generic-dh-make-2008 (source): dh-make-template-in-source [debian/emacsen-install.ex] +generic-dh-make-2008 (source): dh-make-template-in-source [debian/cron.d.ex] diff --git a/t/recipes/checks/dh-make/template/generic-dh-make-2008/eval/post-test b/t/recipes/checks/dh-make/template/generic-dh-make-2008/eval/post-test new file mode 100644 index 0000000..faeef0b --- /dev/null +++ b/t/recipes/checks/dh-make/template/generic-dh-make-2008/eval/post-test @@ -0,0 +1 @@ +s/\(current is ([0-9]+\.)+[0-9]\)/(current is CURRENT)/ diff --git a/t/recipes/checks/documentation/devhelp/legacy-filenames/build-spec/debian/changelog.in b/t/recipes/checks/documentation/devhelp/legacy-filenames/build-spec/debian/changelog.in new file mode 100644 index 0000000..b79c4ca --- /dev/null +++ b/t/recipes/checks/documentation/devhelp/legacy-filenames/build-spec/debian/changelog.in @@ -0,0 +1,78 @@ +filenames ([% $version %]) [% $distribution %]; urgency=low + + * /me is doing a correct NMU of this package, bumping the epoch too. + + -- Jeroen van Wolffelaar Sun, 18 Apr 2004 02:04:39 +0200 + +filenames (11) unstable; urgency=low + + * Add a README.macos. + + -- Marc 'HE' Brockschmidt Mon, 12 Apr 2004 23:35:24 +0200 + +filenames (10) unstable; urgency=low + + * Some new files to check the checks for the use of /usr/*/X11 and + /usr/X11R6/*. + + -- Marc 'HE' Brockschmidt Sun, 11 Apr 2004 17:35:20 +0200 + +filenames (9) unstable; urgency=low + + * Add a two *.ali files, one with the right permission, one with + the more common, but false one. + + -- Marc 'HE' Brockschmidt Sun, 11 Apr 2004 00:18:16 +0200 + +filenames (8) unstable; urgency=low + + * Add a real ancient file + + -- Frank Lichtenheld Thu, 8 Apr 2004 22:22:40 +0200 + +filenames (7) unstable; urgency=low + + * Add a dozen symlinks, some correct, some not + + -- Jeroen van Wolffelaar Fri, 27 Feb 2004 01:28:42 +0100 + +filenames (6) unstable; urgency=low + + * Add perl files to check if + package-installs-nonbinary-perl-in-usr-lib-perl5 is correctly + issued even after attempting to suppress it in some cases + + -- Frank Lichtenheld Fri, 27 Feb 2004 00:49:44 +0100 + +filenames (5) unstable; urgency=low + + * Added check for too long symlink + + -- Sean 'Shaleh' Perry Wed, 3 Jan 2001 13:20:31 -0800 + +filenames (4) unstable; urgency=low + + * Add /usr/lib/menu/menu file to test the bad-menu-file-name tag. + * Add /usr/lib/menu/README to test the new execption for it. + + -- Richard Braakman Thu, 22 Oct 1998 15:42:52 +0200 + +filenames (3) unstable; urgency=low + + * Don't rely on the installer's umask. + + -- Richard Braakman Thu, 20 Aug 1998 12:45:47 +0200 + +filenames (2) unstable; urgency=low + + * Noted more limitations on what filenames lintian handles. + * Added Changes.gz in /usr/doc/filenames and made a symlink from changelog.gz + to Changes.gz. + + -- Richard Braakman Sat, 4 Jul 1998 15:46:11 +0200 + +filenames (1) unstable; urgency=low + + * Initial version + + -- Richard Braakman Sat, 4 Jul 1998 15:25:01 +0200 diff --git a/t/recipes/checks/documentation/devhelp/legacy-filenames/build-spec/debian/control b/t/recipes/checks/documentation/devhelp/legacy-filenames/build-spec/debian/control new file mode 100644 index 0000000..1ff9c50 --- /dev/null +++ b/t/recipes/checks/documentation/devhelp/legacy-filenames/build-spec/debian/control @@ -0,0 +1,42 @@ +Source: filenames +Maintainer: Lintian Maintainer +Standards-Version: 3.1.1 +Rules-Requires-Root: binary-targets + +Package: filenames +Architecture: any +Description: see how lintian reacts to weird filenames + This package contains files with the most evil names I could find, + except for ones that lintian is explicitly not designed to handle. + . + Lintian does not handle filenames containing newlines, or filenames + that contain the strings " link to ", " -> ", or ": ". The last one + is used as a separator by the file command, the others are used as + separators by tar. + . + Lintian also does not handle filenames that contain backslashes, or + other characters that are mangled by tar's -tv output. + +Package: filename-games +Architecture: all +Depends: filenames +Section: games +Description: Test game filename/location checks + This package contains files with slightly less evil names than + filenames. + . + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. + +Package: more-filename-games +Architecture: all +Depends: filenames, filename-games +Section: games +Priority: optional +Description: More test for game filename/location checks + This package contains no evil names, only evil locations. + . + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. diff --git a/t/recipes/checks/documentation/devhelp/legacy-filenames/build-spec/debian/doc-base b/t/recipes/checks/documentation/devhelp/legacy-filenames/build-spec/debian/doc-base new file mode 100644 index 0000000..e5a611b --- /dev/null +++ b/t/recipes/checks/documentation/devhelp/legacy-filenames/build-spec/debian/doc-base @@ -0,0 +1,11 @@ +Document: testing +Title: Working doc-base control file +Author: Russ Allbery +Abstract: This control file ensures that we don't get false positives for + correct doc-base files. + . + There isn't anything wrong with this one. +Section: Education + +Format: Text +Files: /usr/share/doc/filenames/README.macosx diff --git a/t/recipes/checks/documentation/devhelp/legacy-filenames/build-spec/debian/rules b/t/recipes/checks/documentation/devhelp/legacy-filenames/build-spec/debian/rules new file mode 100755 index 0000000..0b9e87c --- /dev/null +++ b/t/recipes/checks/documentation/devhelp/legacy-filenames/build-spec/debian/rules @@ -0,0 +1,231 @@ +#!/usr/bin/make -f + +# Copyright (C) 1998 Richard Braakman +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +VENDORARCH := $(shell perl -MConfig -wE'say substr($$Config{vendorarch},1)') + +clean: + mkdir -p .svn CVS "{arch}" .arch-ids .bzr + touch data/.cvsignore data/svn-commit.tmp data/svk-commitsEr9P.tmp + touch data/.arch-inventory + touch 'data/.#Maelstrom Sound.1.1.1' 'data/Maelstrom Sounce.r121' + touch 'data/Maelstrom Sound.mine' + touch "data/'\\ " + touch filenames.c~ + +build-arch: + +build-indep: + +build: build-arch build-indep + + +binary-arch: + +binary-indep: + install -d debian/tmp/DEBIAN + cp -a data debian/tmp/files + chmod -R go=rX debian/tmp/files + + install -d debian/tmp/usr/lib/filenames + install -m 555 -d debian/tmp/usr/lib/filenames/readonly + touch debian/tmp/usr/lib/filenames/readonly/test + + install -d debian/tmp/usr/lib/menu + install -d debian/tmp/usr/share/menu + touch debian/tmp/usr/lib/menu/README + touch debian/tmp/usr/share/menu/README + touch debian/tmp/usr/lib/menu/menu + touch debian/tmp/usr/share/menu/menu + chmod 644 debian/tmp/usr/lib/menu/* + + install -d debian/tmp/$(VENDORARCH)/foo + mkdir debian/tmp/$(VENDORARCH)/.svn + mkdir debian/tmp/$(VENDORARCH)/CVS + mkdir "debian/tmp/$(VENDORARCH)/{arch}" + mkdir debian/tmp/$(VENDORARCH)/.arch-ids + mkdir debian/tmp/$(VENDORARCH)/.bzr + mkdir debian/tmp/$(VENDORARCH)/.be + mkdir debian/tmp/$(VENDORARCH)/.ditrack + install -d debian/tmp/usr/share/perl5 + echo foo > debian/tmp/$(VENDORARCH)/foo/.gitignore + echo foo > debian/tmp/$(VENDORARCH)/foo/.hgignore + echo foo > debian/tmp/$(VENDORARCH)/foo/.hgtags + echo foo > debian/tmp/$(VENDORARCH)/foo/.hg_archival.txt + + touch debian/tmp/$(VENDORARCH)/foo/.packlist + chmod 644 debian/tmp/$(VENDORARCH)/foo/.packlist + touch debian/tmp/$(VENDORARCH)/foo/bar.pm + TZ=UTC touch -t 197501010101 debian/tmp/$(VENDORARCH)/foo/ancient.pm + chmod 644 debian/tmp/$(VENDORARCH)/foo/bar.pm + + install -d debian/tmp/usr/share/pixmaps + install -d debian/tmp/usr/share/pixmaps/foo + touch debian/tmp/usr/share/pixmaps/license.jpeg + touch debian/tmp/usr/share/pixmaps/licence.jpg + touch debian/tmp/usr/share/pixmaps/copying.xpm + touch debian/tmp/usr/share/pixmaps/foo/COPYING.svg + touch debian/tmp/usr/share/pixmaps/foo/copying.png + touch debian/tmp/usr/share/pixmaps/license.txt + touch debian/tmp/usr/share/pixmaps/license.foo + touch debian/tmp/usr/share/pixmaps/COPYING + + install -d debian/tmp/usr/share/linda/overrides + echo 'foo' > debian/tmp/usr/share/linda/overrides/filenames + + install -d debian/tmp/usr/share/doc/filenames + touch debian/tmp/usr/share/doc/filenames/README.macosx + + echo foo > debian/tmp/usr/share/doc/filenames/bokmål + echo foo > debian/tmp/usr/share/doc/filenames/bokm\\ål + echo foo > debian/tmp/usr/share/doc/filenames/bokml + echo foo > debian/tmp/usr/share/doc/filenames/bokm\\l + + echo foo > debian/tmp/usr/share/doc/filenames/Thumbs.db + echo foo > debian/tmp/usr/share/doc/filenames/.DS_Store + echo foo > debian/tmp/usr/share/doc/filenames/._NEWS.Debian + + touch debian/tmp/usr/share/doc/filenames/news.debian + gzip -n debian/tmp/usr/share/doc/filenames/news.debian + touch debian/tmp/usr/share/doc/filenames/NEWS.Debian + + echo foo > debian/tmp/usr/share/doc/filenames/link-one + ln debian/tmp/usr/share/doc/filenames/link-one \ + debian/tmp/usr/share/doc/filenames/link-two + + install -d debian/tmp/usr/share/doc/filenames/examples + touch debian/tmp/usr/share/doc/filenames/examples/__init__.py + touch debian/tmp/usr/share/doc/filenames/examples/very_interesting_example + touch debian/tmp/usr/share/doc/filenames/examples/very_interesting_example2 + gzip -n debian/tmp/usr/share/doc/filenames/examples/very_interesting_example2 + + install -d debian/tmp/usr/lib/ada/adalib/ + touch debian/tmp/usr/lib/ada/adalib/test.ali debian/tmp/usr/lib/ada/adalib/test2.ali + chmod 0644 debian/tmp/usr/lib/ada/adalib/test.ali + chmod 0444 debian/tmp/usr/lib/ada/adalib/test2.ali + + install -d debian/tmp/usr/bin/X11/ + touch debian/tmp/usr/bin/X11/testxbin + install -d debian/tmp/usr/X11R6/bin + touch debian/tmp/usr/X11R6/bin/testxbin2 + install -d debian/tmp/usr/include/X11 + touch debian/tmp/usr/include/X11/foo.h + + install -d debian/tmp/usr/bin/mh + touch debian/tmp/usr/bin/mh/read + chmod 755 debian/tmp/usr/bin/mh/read + install -d debian/tmp/usr/bin/bin + touch debian/tmp/usr/bin/bin/bad + chmod 755 debian/tmp/usr/bin/bin/bad + + install -m 644 debian/changelog debian/tmp/usr/share/doc/filenames/Changes + gzip -n -9 debian/tmp/usr/share/doc/filenames/Changes + ln -s Changes.gz debian/tmp/usr/share/doc/filenames/changelog.gz + + install -d debian/tmp/var/www + echo foo > debian/tmp/var/www/foo + + install -d debian/tmp/srv/foo + touch debian/tmp/srv/foo/bar + install -d debian/tmp/opt/foo + touch debian/tmp/opt/foo/bar + + install -d debian/tmp/etc/gconf/schemas + touch debian/tmp/etc/gconf/schemas/test.schema + + install -d debian/tmp/usr/lib/sgml + touch debian/tmp/usr/lib/sgml/package + + install -d debian/tmp/usr/share/gnome/apps/System + touch debian/tmp/usr/share/gnome/apps/System/foo.desktop + + install -d debian/tmp/usr/share/filenames + touch debian/tmp/usr/share/filenames/jquery.js + touch debian/tmp/usr/share/filenames/jquery.lite.js + touch debian/tmp/usr/share/filenames/jquery.min.js + touch debian/tmp/usr/share/filenames/jquery.pack.js + touch debian/tmp/usr/share/filenames/mochikit.js + touch debian/tmp/usr/share/filenames/prototype-1.2.3.4.js + touch debian/tmp/usr/share/filenames/prototype.js + touch debian/tmp/usr/share/filenames/prototype.js.gz + touch debian/tmp/usr/share/filenames/scriptaculous.js + touch debian/tmp/usr/share/filenames/yahoo-dom-event.js + touch debian/tmp/usr/share/filenames/yahoo-min.js + + ln -s '../filenames/doc/version6.txt.gz' debian/tmp/usr/share/doc/filenames/version.txt.gz + ln -s ../../share/symlink debian/tmp/usr/lib/filenames/symlink1ok + ln -s ../../../etc/symlink debian/tmp/usr/lib/filenames/symlink1wrong + ln -s ../../../../etc/symlink debian/tmp/usr/lib/filenames/symlink2wrong + ln -s /etc/symlink debian/tmp/usr/lib/filenames/symlink2ok + ln -s /usr/lib/filenames/symlink2 debian/tmp/usr/lib/filenames/symlink3wrong + ln -s test debian/tmp/usr/lib/filenames/symlink3ok + ln -s ../filenames/symlink2 debian/tmp/usr/lib/filenames/symlink4wrong + ln -s ../menu/../somethingelse debian/tmp/usr/lib/filenames/symlink5wrong + ln -s ../menu/somethingelse debian/tmp/usr/lib/filenames/symlink4ok + ln -s ./file4 debian/tmp/usr/lib/filenames/symlink6wrong + ln -s ../menu/./something debian/tmp/usr/lib/filenames/symlink7wrong + ln -s ../menu//something debian/tmp/usr/lib/filenames/symlink8wrong + ln -s ../menu/something/ debian/tmp/usr/lib/filenames/symlink9wrong + ln -s .. debian/tmp/usr/lib/filenames/symlink5ok+warn + ln -s . debian/tmp/usr/lib/filenames/symlink6ok+warn + ln -s / debian/tmp/usr/lib/filenames/symlink7ok+warn + ln -s ../../.. debian/tmp/usr/lib/filenames/symlink10wrong + +# devhelp tests. Files in /usr/share/gtk-doc/html or /usr/share/devhelp/books +# are okay. Files elsewhere are okay iff their parent path is symlinked into +# one of those paths. + install -d debian/tmp/usr/share/devhelp/books/filenames + echo 'Not really XML' > debian/tmp/usr/share/devhelp/books/filenames/a.devhelp + echo 'Not really XML' > debian/tmp/usr/share/devhelp/books/filenames/.devhelp2 + gzip -n -9 debian/tmp/usr/share/devhelp/books/filenames/.devhelp2 + install -d debian/tmp/usr/share/gtk-doc/html/filenames + echo 'Not really XML' > debian/tmp/usr/share/gtk-doc/html/filenames/b.devhelp + gzip -n -9 debian/tmp/usr/share/gtk-doc/html/filenames/b.devhelp + install -d debian/tmp/usr/share/doc/filenames/good-devhelp + echo 'Not really XML' > debian/tmp/usr/share/doc/filenames/good-devhelp/.devhelp2 + install -d debian/tmp/usr/share/doc/filenames/bad-devhelp + echo 'Not really XML' > debian/tmp/usr/share/doc/filenames/bad-devhelp/c.devhelp + gzip -n -9 debian/tmp/usr/share/doc/filenames/bad-devhelp/c.devhelp + ln -s ../../doc/filenames/good-devhelp debian/tmp/usr/share/gtk-doc/html/good + ln -s ../doc/filenames/bad-devhelp debian/tmp/usr/share/gtk-doc/html/bad + + install -d debian/tmp/usr/share/doc-base + install -m 644 debian/doc-base debian/tmp/usr/share/doc-base/filenames + + dpkg-gencontrol -pfilenames -Pdebian/tmp + dpkg --build debian/tmp .. + + install -d debian/filename-games debian/filename-games/DEBIAN + install -d debian/filename-games/usr debian/filename-games/usr/games debian/filename-games/usr/bin + echo '#! /bin/sh' > debian/filename-games/usr/bin/test-game + chmod 755 debian/filename-games/usr/bin/test-game + dpkg-gencontrol -pfilename-games -Pdebian/filename-games + dpkg --build debian/filename-games .. + + install -d debian/more-filename-games debian/more-filename-games/DEBIAN + install -d debian/more-filename-games/usr debian/more-filename-games/usr/games debian/more-filename-games/usr/bin + echo '#! /bin/sh' > debian/more-filename-games/usr/bin/another-test-game + echo '#! /bin/sh' > debian/more-filename-games/usr/games/yet-another-test-game + chmod 755 debian/more-filename-games/usr/bin/another-test-game debian/more-filename-games/usr/games/yet-another-test-game + dpkg-gencontrol -pmore-filename-games -Pdebian/more-filename-games + dpkg --build debian/more-filename-games .. + +binary: binary-arch binary-indep + +.PHONY: build-indep build-arch build binary-arch binary-indep binary clean diff --git a/t/recipes/checks/documentation/devhelp/legacy-filenames/build-spec/fill-values b/t/recipes/checks/documentation/devhelp/legacy-filenames/build-spec/fill-values new file mode 100644 index 0000000..062a1ea --- /dev/null +++ b/t/recipes/checks/documentation/devhelp/legacy-filenames/build-spec/fill-values @@ -0,0 +1,5 @@ +Skeleton: upload-non-native +Testname: legacy-filenames +Source: filenames +Version: 1:12-0.1 +Description: Legacy test "filenames" diff --git a/t/recipes/checks/documentation/devhelp/legacy-filenames/build-spec/orig/data/ .tif b/t/recipes/checks/documentation/devhelp/legacy-filenames/build-spec/orig/data/ .tif new file mode 100644 index 0000000..07fd914 --- /dev/null +++ b/t/recipes/checks/documentation/devhelp/legacy-filenames/build-spec/orig/data/ .tif @@ -0,0 +1,2 @@ +This filename was inspired by the ".tif used by fnlib. The real package +uses space.tif. diff --git "a/t/recipes/checks/documentation/devhelp/legacy-filenames/build-spec/orig/data/\".tif" "b/t/recipes/checks/documentation/devhelp/legacy-filenames/build-spec/orig/data/\".tif" new file mode 100644 index 0000000..e005775 --- /dev/null +++ "b/t/recipes/checks/documentation/devhelp/legacy-filenames/build-spec/orig/data/\".tif" @@ -0,0 +1 @@ +This filename is really used, by fnlib. diff --git a/t/recipes/checks/documentation/devhelp/legacy-filenames/build-spec/orig/data/Maelstrom Sound b/t/recipes/checks/documentation/devhelp/legacy-filenames/build-spec/orig/data/Maelstrom Sound new file mode 100644 index 0000000..4110410 --- /dev/null +++ b/t/recipes/checks/documentation/devhelp/legacy-filenames/build-spec/orig/data/Maelstrom Sound @@ -0,0 +1 @@ +This filename occurs in the maelstrom package. diff --git a/t/recipes/checks/documentation/devhelp/legacy-filenames/eval/desc b/t/recipes/checks/documentation/devhelp/legacy-filenames/eval/desc new file mode 100644 index 0000000..0663c8f --- /dev/null +++ b/t/recipes/checks/documentation/devhelp/legacy-filenames/eval/desc @@ -0,0 +1,2 @@ +Testname: legacy-filenames +Check: documentation/devhelp diff --git a/t/recipes/checks/documentation/devhelp/legacy-filenames/eval/hints b/t/recipes/checks/documentation/devhelp/legacy-filenames/eval/hints new file mode 100644 index 0000000..680eb22 --- /dev/null +++ b/t/recipes/checks/documentation/devhelp/legacy-filenames/eval/hints @@ -0,0 +1 @@ +filenames (binary): stray-devhelp-documentation [usr/share/doc/filenames/bad-devhelp/c.devhelp.gz] diff --git a/t/recipes/checks/documentation/devhelp/legacy-filenames/eval/post-test b/t/recipes/checks/documentation/devhelp/legacy-filenames/eval/post-test new file mode 100644 index 0000000..571e35d --- /dev/null +++ b/t/recipes/checks/documentation/devhelp/legacy-filenames/eval/post-test @@ -0,0 +1,3 @@ +s/\(current is ([0-9]+\.)+[0-9]\)/(current is CURRENT)/ +s,usr/lib/([^\/]*/)?perl[0-9]*(/[0-9]*\.[0-9]*)?/,usr/lib/ma-dir/perl/version/,g +/package-installs-packlist/ d diff --git a/t/recipes/checks/documentation/devhelp/standard/version-1/build-spec/debian/install b/t/recipes/checks/documentation/devhelp/standard/version-1/build-spec/debian/install new file mode 100644 index 0000000..1f6260c --- /dev/null +++ b/t/recipes/checks/documentation/devhelp/standard/version-1/build-spec/debian/install @@ -0,0 +1 @@ +devhelp/index.devhelp usr/share/devhelp/books/this-test/ diff --git a/t/recipes/checks/documentation/devhelp/standard/version-1/build-spec/fill-values b/t/recipes/checks/documentation/devhelp/standard/version-1/build-spec/fill-values new file mode 100644 index 0000000..0839040 --- /dev/null +++ b/t/recipes/checks/documentation/devhelp/standard/version-1/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: upload-non-native +Testname: version-1 +Description: Ships a Devhelp index file that follows version 1. diff --git a/t/recipes/checks/documentation/devhelp/standard/version-1/build-spec/orig/devhelp/index.devhelp b/t/recipes/checks/documentation/devhelp/standard/version-1/build-spec/orig/devhelp/index.devhelp new file mode 100644 index 0000000..c40b9f1 --- /dev/null +++ b/t/recipes/checks/documentation/devhelp/standard/version-1/build-spec/orig/devhelp/index.devhelp @@ -0,0 +1 @@ +MEANINGFUL CONTENTS diff --git a/t/recipes/checks/documentation/devhelp/standard/version-1/eval/desc b/t/recipes/checks/documentation/devhelp/standard/version-1/eval/desc new file mode 100644 index 0000000..94c87c6 --- /dev/null +++ b/t/recipes/checks/documentation/devhelp/standard/version-1/eval/desc @@ -0,0 +1,2 @@ +Testname: version-1 +Check: documentation/devhelp/standard diff --git a/t/recipes/checks/documentation/devhelp/standard/version-1/eval/hints b/t/recipes/checks/documentation/devhelp/standard/version-1/eval/hints new file mode 100644 index 0000000..81e1498 --- /dev/null +++ b/t/recipes/checks/documentation/devhelp/standard/version-1/eval/hints @@ -0,0 +1 @@ +version-1 (binary): old-devhelp-standard [usr/share/devhelp/books/this-test/index.devhelp] diff --git a/t/recipes/checks/documentation/doxygen/cruft-doxygen-documentation/build-spec/fill-values b/t/recipes/checks/documentation/doxygen/cruft-doxygen-documentation/build-spec/fill-values new file mode 100644 index 0000000..9ba18d6 --- /dev/null +++ b/t/recipes/checks/documentation/doxygen/cruft-doxygen-documentation/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: upload-native +Testname: cruft-doxygen-documentation +Description: Detect doxygen documentation diff --git a/t/recipes/checks/documentation/doxygen/cruft-doxygen-documentation/build-spec/orig/src/Doxyfile b/t/recipes/checks/documentation/doxygen/cruft-doxygen-documentation/build-spec/orig/src/Doxyfile new file mode 100644 index 0000000..2807c21 --- /dev/null +++ b/t/recipes/checks/documentation/doxygen/cruft-doxygen-documentation/build-spec/orig/src/Doxyfile @@ -0,0 +1,2363 @@ +# Doxyfile 1.8.7 + +# This file describes the settings to be used by the documentation system +# doxygen (www.doxygen.org) for a project. +# +# All text after a double hash (##) is considered a comment and is placed in +# front of the TAG it is preceding. +# +# All text after a single hash (#) is considered a comment and will be ignored. +# The format is: +# TAG = value [value, ...] +# For lists, items can also be appended using: +# TAG += value [value, ...] +# Values that contain spaces should be placed between quotes (\" \"). + +#--------------------------------------------------------------------------- +# Project related configuration options +#--------------------------------------------------------------------------- + +# This tag specifies the encoding used for all characters in the config file +# that follow. The default is UTF-8 which is also the encoding used for all text +# before the first occurrence of this tag. Doxygen uses libiconv (or the iconv +# built into libc) for the transcoding. See http://www.gnu.org/software/libiconv +# for the list of possible encodings. +# The default value is: UTF-8. + +DOXYFILE_ENCODING = UTF-8 + +# The PROJECT_NAME tag is a single word (or a sequence of words surrounded by +# double-quotes, unless you are using Doxywizard) that should identify the +# project for which the documentation is generated. This name is used in the +# title of most generated pages and in a few other places. +# The default value is: My Project. + +PROJECT_NAME = example + +# The PROJECT_NUMBER tag can be used to enter a project or revision number. This +# could be handy for archiving the generated documentation or if some version +# control system is used. + +PROJECT_NUMBER = + +# Using the PROJECT_BRIEF tag one can provide an optional one line description +# for a project that appears at the top of each page and should give viewer a +# quick idea about the purpose of the project. Keep the description short. + +PROJECT_BRIEF = + +# With the PROJECT_LOGO tag one can specify an logo or icon that is included in +# the documentation. The maximum height of the logo should not exceed 55 pixels +# and the maximum width should not exceed 200 pixels. Doxygen will copy the logo +# to the output directory. + +PROJECT_LOGO = + +# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) path +# into which the generated documentation will be written. If a relative path is +# entered, it will be relative to the location where doxygen was started. If +# left blank the current directory will be used. + +OUTPUT_DIRECTORY = doc + +# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create 4096 sub- +# directories (in 2 levels) under the output directory of each output format and +# will distribute the generated files over these directories. Enabling this +# option can be useful when feeding doxygen a huge amount of source files, where +# putting all generated files in the same directory would otherwise causes +# performance problems for the file system. +# The default value is: NO. + +CREATE_SUBDIRS = YES + +# If the ALLOW_UNICODE_NAMES tag is set to YES, doxygen will allow non-ASCII +# characters to appear in the names of generated files. If set to NO, non-ASCII +# characters will be escaped, for example _xE3_x81_x84 will be used for Unicode +# U+3044. +# The default value is: NO. + +ALLOW_UNICODE_NAMES = YES + +# The OUTPUT_LANGUAGE tag is used to specify the language in which all +# documentation generated by doxygen is written. Doxygen will use this +# information to generate all constant output in the proper language. +# Possible values are: Afrikaans, Arabic, Armenian, Brazilian, Catalan, Chinese, +# Chinese-Traditional, Croatian, Czech, Danish, Dutch, English (United States), +# Esperanto, Farsi (Persian), Finnish, French, German, Greek, Hungarian, +# Indonesian, Italian, Japanese, Japanese-en (Japanese with English messages), +# Korean, Korean-en (Korean with English messages), Latvian, Lithuanian, +# Macedonian, Norwegian, Persian (Farsi), Polish, Portuguese, Romanian, Russian, +# Serbian, Serbian-Cyrillic, Slovak, Slovene, Spanish, Swedish, Turkish, +# Ukrainian and Vietnamese. +# The default value is: English. + +OUTPUT_LANGUAGE = English + +# If the BRIEF_MEMBER_DESC tag is set to YES doxygen will include brief member +# descriptions after the members that are listed in the file and class +# documentation (similar to Javadoc). Set to NO to disable this. +# The default value is: YES. + +BRIEF_MEMBER_DESC = YES + +# If the REPEAT_BRIEF tag is set to YES doxygen will prepend the brief +# description of a member or function before the detailed description +# +# Note: If both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the +# brief descriptions will be completely suppressed. +# The default value is: YES. + +REPEAT_BRIEF = YES + +# This tag implements a quasi-intelligent brief description abbreviator that is +# used to form the text in various listings. Each string in this list, if found +# as the leading text of the brief description, will be stripped from the text +# and the result, after processing the whole list, is used as the annotated +# text. Otherwise, the brief description is used as-is. If left blank, the +# following values are used ($name is automatically replaced with the name of +# the entity):The $name class, The $name widget, The $name file, is, provides, +# specifies, contains, represents, a, an and the. + +ABBREVIATE_BRIEF = "The $name class" \ + "The $name widget" \ + "The $name file" \ + is \ + provides \ + specifies \ + contains \ + represents \ + a \ + an \ + the + +# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then +# doxygen will generate a detailed section even if there is only a brief +# description. +# The default value is: NO. + +ALWAYS_DETAILED_SEC = NO + +# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all +# inherited members of a class in the documentation of that class as if those +# members were ordinary class members. Constructors, destructors and assignment +# operators of the base classes will not be shown. +# The default value is: NO. + +INLINE_INHERITED_MEMB = NO + +# If the FULL_PATH_NAMES tag is set to YES doxygen will prepend the full path +# before files name in the file list and in the header files. If set to NO the +# shortest path that makes the file name unique will be used +# The default value is: YES. + +FULL_PATH_NAMES = YES + +# The STRIP_FROM_PATH tag can be used to strip a user-defined part of the path. +# Stripping is only done if one of the specified strings matches the left-hand +# part of the path. The tag can be used to show relative paths in the file list. +# If left blank the directory from which doxygen is run is used as the path to +# strip. +# +# Note that you can specify absolute paths here, but also relative paths, which +# will be relative from the directory where doxygen is started. +# This tag requires that the tag FULL_PATH_NAMES is set to YES. + +STRIP_FROM_PATH = + +# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of the +# path mentioned in the documentation of a class, which tells the reader which +# header file to include in order to use a class. If left blank only the name of +# the header file containing the class definition is used. Otherwise one should +# specify the list of include paths that are normally passed to the compiler +# using the -I flag. + +STRIP_FROM_INC_PATH = + +# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter (but +# less readable) file names. This can be useful is your file systems doesn't +# support long names like on DOS, Mac, or CD-ROM. +# The default value is: NO. + +SHORT_NAMES = NO + +# If the JAVADOC_AUTOBRIEF tag is set to YES then doxygen will interpret the +# first line (until the first dot) of a Javadoc-style comment as the brief +# description. If set to NO, the Javadoc-style will behave just like regular Qt- +# style comments (thus requiring an explicit @brief command for a brief +# description.) +# The default value is: NO. + +JAVADOC_AUTOBRIEF = NO + +# If the QT_AUTOBRIEF tag is set to YES then doxygen will interpret the first +# line (until the first dot) of a Qt-style comment as the brief description. If +# set to NO, the Qt-style will behave just like regular Qt-style comments (thus +# requiring an explicit \brief command for a brief description.) +# The default value is: NO. + +QT_AUTOBRIEF = NO + +# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make doxygen treat a +# multi-line C++ special comment block (i.e. a block of //! or /// comments) as +# a brief description. This used to be the default behavior. The new default is +# to treat a multi-line C++ comment block as a detailed description. Set this +# tag to YES if you prefer the old behavior instead. +# +# Note that setting this tag to YES also means that rational rose comments are +# not recognized any more. +# The default value is: NO. + +MULTILINE_CPP_IS_BRIEF = NO + +# If the INHERIT_DOCS tag is set to YES then an undocumented member inherits the +# documentation from any documented member that it re-implements. +# The default value is: YES. + +INHERIT_DOCS = YES + +# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce a +# new page for each member. If set to NO, the documentation of a member will be +# part of the file/class/namespace that contains it. +# The default value is: NO. + +SEPARATE_MEMBER_PAGES = NO + +# The TAB_SIZE tag can be used to set the number of spaces in a tab. Doxygen +# uses this value to replace tabs by spaces in code fragments. +# Minimum value: 1, maximum value: 16, default value: 4. + +TAB_SIZE = 4 + +# This tag can be used to specify a number of aliases that act as commands in +# the documentation. An alias has the form: +# name=value +# For example adding +# "sideeffect=@par Side Effects:\n" +# will allow you to put the command \sideeffect (or @sideeffect) in the +# documentation, which will result in a user-defined paragraph with heading +# "Side Effects:". You can put \n's in the value part of an alias to insert +# newlines. + +ALIASES = + +# This tag can be used to specify a number of word-keyword mappings (TCL only). +# A mapping has the form "name=value". For example adding "class=itcl::class" +# will allow you to use the command class in the itcl::class meaning. + +TCL_SUBST = + +# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources +# only. Doxygen will then generate output that is more tailored for C. For +# instance, some of the names that are used will be different. The list of all +# members will be omitted, etc. +# The default value is: NO. + +OPTIMIZE_OUTPUT_FOR_C = NO + +# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java or +# Python sources only. Doxygen will then generate output that is more tailored +# for that language. For instance, namespaces will be presented as packages, +# qualified scopes will look different, etc. +# The default value is: NO. + +OPTIMIZE_OUTPUT_JAVA = NO + +# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran +# sources. Doxygen will then generate output that is tailored for Fortran. +# The default value is: NO. + +OPTIMIZE_FOR_FORTRAN = NO + +# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL +# sources. Doxygen will then generate output that is tailored for VHDL. +# The default value is: NO. + +OPTIMIZE_OUTPUT_VHDL = NO + +# Doxygen selects the parser to use depending on the extension of the files it +# parses. With this tag you can assign which parser to use for a given +# extension. Doxygen has a built-in mapping, but you can override or extend it +# using this tag. The format is ext=language, where ext is a file extension, and +# language is one of the parsers supported by doxygen: IDL, Java, Javascript, +# C#, C, C++, D, PHP, Objective-C, Python, Fortran (fixed format Fortran: +# FortranFixed, free formatted Fortran: FortranFree, unknown formatted Fortran: +# Fortran. In the later case the parser tries to guess whether the code is fixed +# or free formatted code, this is the default for Fortran type files), VHDL. For +# instance to make doxygen treat .inc files as Fortran files (default is PHP), +# and .f files as C (default is Fortran), use: inc=Fortran f=C. +# +# Note For files without extension you can use no_extension as a placeholder. +# +# Note that for custom extensions you also need to set FILE_PATTERNS otherwise +# the files are not read by doxygen. + +EXTENSION_MAPPING = + +# If the MARKDOWN_SUPPORT tag is enabled then doxygen pre-processes all comments +# according to the Markdown format, which allows for more readable +# documentation. See http://daringfireball.net/projects/markdown/ for details. +# The output of markdown processing is further processed by doxygen, so you can +# mix doxygen, HTML, and XML commands with Markdown formatting. Disable only in +# case of backward compatibilities issues. +# The default value is: YES. + +MARKDOWN_SUPPORT = YES + +# When enabled doxygen tries to link words that correspond to documented +# classes, or namespaces to their corresponding documentation. Such a link can +# be prevented in individual cases by putting a % sign in front of the word +# or globally by setting AUTOLINK_SUPPORT to NO. +# The default value is: YES. + +AUTOLINK_SUPPORT = YES + +# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want +# to include (a tag file for) the STL sources as input, then you should set this +# tag to YES in order to let doxygen match functions declarations and +# definitions whose arguments contain STL classes (e.g. func(std::string); +# versus func(std::string) {}). This also make the inheritance and collaboration +# diagrams that involve STL classes more complete and accurate. +# The default value is: NO. + +BUILTIN_STL_SUPPORT = NO + +# If you use Microsoft's C++/CLI language, you should set this option to YES to +# enable parsing support. +# The default value is: NO. + +CPP_CLI_SUPPORT = NO + +# Set the SIP_SUPPORT tag to YES if your project consists of sip (see: +# http://www.riverbankcomputing.co.uk/software/sip/intro) sources only. Doxygen +# will parse them like normal C++ but will assume all classes use public instead +# of private inheritance when no explicit protection keyword is present. +# The default value is: NO. + +SIP_SUPPORT = NO + +# For Microsoft's IDL there are propget and propput attributes to indicate +# getter and setter methods for a property. Setting this option to YES will make +# doxygen to replace the get and set methods by a property in the documentation. +# This will only work if the methods are indeed getting or setting a simple +# type. If this is not the case, or you want to show the methods anyway, you +# should set this option to NO. +# The default value is: YES. + +IDL_PROPERTY_SUPPORT = YES + +# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC +# tag is set to YES, then doxygen will reuse the documentation of the first +# member in the group (if any) for the other members of the group. By default +# all members of a group must be documented explicitly. +# The default value is: NO. + +DISTRIBUTE_GROUP_DOC = NO + +# Set the SUBGROUPING tag to YES to allow class member groups of the same type +# (for instance a group of public functions) to be put as a subgroup of that +# type (e.g. under the Public Functions section). Set it to NO to prevent +# subgrouping. Alternatively, this can be done per class using the +# \nosubgrouping command. +# The default value is: YES. + +SUBGROUPING = YES + +# When the INLINE_GROUPED_CLASSES tag is set to YES, classes, structs and unions +# are shown inside the group in which they are included (e.g. using \ingroup) +# instead of on a separate page (for HTML and Man pages) or section (for LaTeX +# and RTF). +# +# Note that this feature does not work in combination with +# SEPARATE_MEMBER_PAGES. +# The default value is: NO. + +INLINE_GROUPED_CLASSES = NO + +# When the INLINE_SIMPLE_STRUCTS tag is set to YES, structs, classes, and unions +# with only public data fields or simple typedef fields will be shown inline in +# the documentation of the scope in which they are defined (i.e. file, +# namespace, or group documentation), provided this scope is documented. If set +# to NO, structs, classes, and unions are shown on a separate page (for HTML and +# Man pages) or section (for LaTeX and RTF). +# The default value is: NO. + +INLINE_SIMPLE_STRUCTS = NO + +# When TYPEDEF_HIDES_STRUCT tag is enabled, a typedef of a struct, union, or +# enum is documented as struct, union, or enum with the name of the typedef. So +# typedef struct TypeS {} TypeT, will appear in the documentation as a struct +# with name TypeT. When disabled the typedef will appear as a member of a file, +# namespace, or class. And the struct will be named TypeS. This can typically be +# useful for C code in case the coding convention dictates that all compound +# types are typedef'ed and only the typedef is referenced, never the tag name. +# The default value is: NO. + +TYPEDEF_HIDES_STRUCT = NO + +# The size of the symbol lookup cache can be set using LOOKUP_CACHE_SIZE. This +# cache is used to resolve symbols given their name and scope. Since this can be +# an expensive process and often the same symbol appears multiple times in the +# code, doxygen keeps a cache of pre-resolved symbols. If the cache is too small +# doxygen will become slower. If the cache is too large, memory is wasted. The +# cache size is given by this formula: 2^(16+LOOKUP_CACHE_SIZE). The valid range +# is 0..9, the default is 0, corresponding to a cache size of 2^16=65536 +# symbols. At the end of a run doxygen will report the cache usage and suggest +# the optimal cache size from a speed point of view. +# Minimum value: 0, maximum value: 9, default value: 0. + +LOOKUP_CACHE_SIZE = 0 + +#--------------------------------------------------------------------------- +# Build related configuration options +#--------------------------------------------------------------------------- + +# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in +# documentation are documented, even if no documentation was available. Private +# class members and static file members will be hidden unless the +# EXTRACT_PRIVATE respectively EXTRACT_STATIC tags are set to YES. +# Note: This will also disable the warnings about undocumented members that are +# normally produced when WARNINGS is set to YES. +# The default value is: NO. + +EXTRACT_ALL = YES + +# If the EXTRACT_PRIVATE tag is set to YES all private members of a class will +# be included in the documentation. +# The default value is: NO. + +EXTRACT_PRIVATE = NO + +# If the EXTRACT_PACKAGE tag is set to YES all members with package or internal +# scope will be included in the documentation. +# The default value is: NO. + +EXTRACT_PACKAGE = NO + +# If the EXTRACT_STATIC tag is set to YES all static members of a file will be +# included in the documentation. +# The default value is: NO. + +EXTRACT_STATIC = NO + +# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) defined +# locally in source files will be included in the documentation. If set to NO +# only classes defined in header files are included. Does not have any effect +# for Java sources. +# The default value is: YES. + +EXTRACT_LOCAL_CLASSES = YES + +# This flag is only useful for Objective-C code. When set to YES local methods, +# which are defined in the implementation section but not in the interface are +# included in the documentation. If set to NO only methods in the interface are +# included. +# The default value is: NO. + +EXTRACT_LOCAL_METHODS = NO + +# If this flag is set to YES, the members of anonymous namespaces will be +# extracted and appear in the documentation as a namespace called +# 'anonymous_namespace{file}', where file will be replaced with the base name of +# the file that contains the anonymous namespace. By default anonymous namespace +# are hidden. +# The default value is: NO. + +EXTRACT_ANON_NSPACES = NO + +# If the HIDE_UNDOC_MEMBERS tag is set to YES, doxygen will hide all +# undocumented members inside documented classes or files. If set to NO these +# members will be included in the various overviews, but no documentation +# section is generated. This option has no effect if EXTRACT_ALL is enabled. +# The default value is: NO. + +HIDE_UNDOC_MEMBERS = NO + +# If the HIDE_UNDOC_CLASSES tag is set to YES, doxygen will hide all +# undocumented classes that are normally visible in the class hierarchy. If set +# to NO these classes will be included in the various overviews. This option has +# no effect if EXTRACT_ALL is enabled. +# The default value is: NO. + +HIDE_UNDOC_CLASSES = NO + +# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, doxygen will hide all friend +# (class|struct|union) declarations. If set to NO these declarations will be +# included in the documentation. +# The default value is: NO. + +HIDE_FRIEND_COMPOUNDS = NO + +# If the HIDE_IN_BODY_DOCS tag is set to YES, doxygen will hide any +# documentation blocks found inside the body of a function. If set to NO these +# blocks will be appended to the function's detailed documentation block. +# The default value is: NO. + +HIDE_IN_BODY_DOCS = NO + +# The INTERNAL_DOCS tag determines if documentation that is typed after a +# \internal command is included. If the tag is set to NO then the documentation +# will be excluded. Set it to YES to include the internal documentation. +# The default value is: NO. + +INTERNAL_DOCS = NO + +# If the CASE_SENSE_NAMES tag is set to NO then doxygen will only generate file +# names in lower-case letters. If set to YES upper-case letters are also +# allowed. This is useful if you have classes or files whose names only differ +# in case and if your file system supports case sensitive file names. Windows +# and Mac users are advised to set this option to NO. +# The default value is: system dependent. + +CASE_SENSE_NAMES = NO + +# If the HIDE_SCOPE_NAMES tag is set to NO then doxygen will show members with +# their full class and namespace scopes in the documentation. If set to YES the +# scope will be hidden. +# The default value is: NO. + +HIDE_SCOPE_NAMES = NO + +# If the SHOW_INCLUDE_FILES tag is set to YES then doxygen will put a list of +# the files that are included by a file in the documentation of that file. +# The default value is: YES. + +SHOW_INCLUDE_FILES = YES + +# If the SHOW_GROUPED_MEMB_INC tag is set to YES then Doxygen will add for each +# grouped member an include statement to the documentation, telling the reader +# which file to include in order to use the member. +# The default value is: NO. + +SHOW_GROUPED_MEMB_INC = NO + +# If the FORCE_LOCAL_INCLUDES tag is set to YES then doxygen will list include +# files with double quotes in the documentation rather than with sharp brackets. +# The default value is: NO. + +FORCE_LOCAL_INCLUDES = NO + +# If the INLINE_INFO tag is set to YES then a tag [inline] is inserted in the +# documentation for inline members. +# The default value is: YES. + +INLINE_INFO = YES + +# If the SORT_MEMBER_DOCS tag is set to YES then doxygen will sort the +# (detailed) documentation of file and class members alphabetically by member +# name. If set to NO the members will appear in declaration order. +# The default value is: YES. + +SORT_MEMBER_DOCS = YES + +# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the brief +# descriptions of file, namespace and class members alphabetically by member +# name. If set to NO the members will appear in declaration order. Note that +# this will also influence the order of the classes in the class list. +# The default value is: NO. + +SORT_BRIEF_DOCS = NO + +# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen will sort the +# (brief and detailed) documentation of class members so that constructors and +# destructors are listed first. If set to NO the constructors will appear in the +# respective orders defined by SORT_BRIEF_DOCS and SORT_MEMBER_DOCS. +# Note: If SORT_BRIEF_DOCS is set to NO this option is ignored for sorting brief +# member documentation. +# Note: If SORT_MEMBER_DOCS is set to NO this option is ignored for sorting +# detailed member documentation. +# The default value is: NO. + +SORT_MEMBERS_CTORS_1ST = NO + +# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the hierarchy +# of group names into alphabetical order. If set to NO the group names will +# appear in their defined order. +# The default value is: NO. + +SORT_GROUP_NAMES = NO + +# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be sorted by +# fully-qualified names, including namespaces. If set to NO, the class list will +# be sorted only by class name, not including the namespace part. +# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. +# Note: This option applies only to the class list, not to the alphabetical +# list. +# The default value is: NO. + +SORT_BY_SCOPE_NAME = NO + +# If the STRICT_PROTO_MATCHING option is enabled and doxygen fails to do proper +# type resolution of all parameters of a function it will reject a match between +# the prototype and the implementation of a member function even if there is +# only one candidate or it is obvious which candidate to choose by doing a +# simple string match. By disabling STRICT_PROTO_MATCHING doxygen will still +# accept a match between prototype and implementation in such cases. +# The default value is: NO. + +STRICT_PROTO_MATCHING = NO + +# The GENERATE_TODOLIST tag can be used to enable ( YES) or disable ( NO) the +# todo list. This list is created by putting \todo commands in the +# documentation. +# The default value is: YES. + +GENERATE_TODOLIST = YES + +# The GENERATE_TESTLIST tag can be used to enable ( YES) or disable ( NO) the +# test list. This list is created by putting \test commands in the +# documentation. +# The default value is: YES. + +GENERATE_TESTLIST = YES + +# The GENERATE_BUGLIST tag can be used to enable ( YES) or disable ( NO) the bug +# list. This list is created by putting \bug commands in the documentation. +# The default value is: YES. + +GENERATE_BUGLIST = YES + +# The GENERATE_DEPRECATEDLIST tag can be used to enable ( YES) or disable ( NO) +# the deprecated list. This list is created by putting \deprecated commands in +# the documentation. +# The default value is: YES. + +GENERATE_DEPRECATEDLIST= YES + +# The ENABLED_SECTIONS tag can be used to enable conditional documentation +# sections, marked by \if ... \endif and \cond +# ... \endcond blocks. + +ENABLED_SECTIONS = + +# The MAX_INITIALIZER_LINES tag determines the maximum number of lines that the +# initial value of a variable or macro / define can have for it to appear in the +# documentation. If the initializer consists of more lines than specified here +# it will be hidden. Use a value of 0 to hide initializers completely. The +# appearance of the value of individual variables and macros / defines can be +# controlled using \showinitializer or \hideinitializer command in the +# documentation regardless of this setting. +# Minimum value: 0, maximum value: 10000, default value: 30. + +MAX_INITIALIZER_LINES = 30 + +# Set the SHOW_USED_FILES tag to NO to disable the list of files generated at +# the bottom of the documentation of classes and structs. If set to YES the list +# will mention the files that were used to generate the documentation. +# The default value is: YES. + +SHOW_USED_FILES = YES + +# Set the SHOW_FILES tag to NO to disable the generation of the Files page. This +# will remove the Files entry from the Quick Index and from the Folder Tree View +# (if specified). +# The default value is: YES. + +SHOW_FILES = YES + +# Set the SHOW_NAMESPACES tag to NO to disable the generation of the Namespaces +# page. This will remove the Namespaces entry from the Quick Index and from the +# Folder Tree View (if specified). +# The default value is: YES. + +SHOW_NAMESPACES = YES + +# The FILE_VERSION_FILTER tag can be used to specify a program or script that +# doxygen should invoke to get the current version for each file (typically from +# the version control system). Doxygen will invoke the program by executing (via +# popen()) the command command input-file, where command is the value of the +# FILE_VERSION_FILTER tag, and input-file is the name of an input file provided +# by doxygen. Whatever the program writes to standard output is used as the file +# version. For an example see the documentation. + +FILE_VERSION_FILTER = + +# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed +# by doxygen. The layout file controls the global structure of the generated +# output files in an output format independent way. To create the layout file +# that represents doxygen's defaults, run doxygen with the -l option. You can +# optionally specify a file name after the option, if omitted DoxygenLayout.xml +# will be used as the name of the layout file. +# +# Note that if you run doxygen from a directory containing a file called +# DoxygenLayout.xml, doxygen will parse it automatically even if the LAYOUT_FILE +# tag is left empty. + +LAYOUT_FILE = + +# The CITE_BIB_FILES tag can be used to specify one or more bib files containing +# the reference definitions. This must be a list of .bib files. The .bib +# extension is automatically appended if omitted. This requires the bibtex tool +# to be installed. See also http://en.wikipedia.org/wiki/BibTeX for more info. +# For LaTeX the style of the bibliography can be controlled using +# LATEX_BIB_STYLE. To use this feature you need bibtex and perl available in the +# search path. Do not use file names with spaces, bibtex cannot handle them. See +# also \cite for info how to create references. + +CITE_BIB_FILES = + +#--------------------------------------------------------------------------- +# Configuration options related to warning and progress messages +#--------------------------------------------------------------------------- + +# The QUIET tag can be used to turn on/off the messages that are generated to +# standard output by doxygen. If QUIET is set to YES this implies that the +# messages are off. +# The default value is: NO. + +QUIET = NO + +# The WARNINGS tag can be used to turn on/off the warning messages that are +# generated to standard error ( stderr) by doxygen. If WARNINGS is set to YES +# this implies that the warnings are on. +# +# Tip: Turn warnings on while writing the documentation. +# The default value is: YES. + +WARNINGS = YES + +# If the WARN_IF_UNDOCUMENTED tag is set to YES, then doxygen will generate +# warnings for undocumented members. If EXTRACT_ALL is set to YES then this flag +# will automatically be disabled. +# The default value is: YES. + +WARN_IF_UNDOCUMENTED = YES + +# If the WARN_IF_DOC_ERROR tag is set to YES, doxygen will generate warnings for +# potential errors in the documentation, such as not documenting some parameters +# in a documented function, or documenting parameters that don't exist or using +# markup commands wrongly. +# The default value is: YES. + +WARN_IF_DOC_ERROR = YES + +# This WARN_NO_PARAMDOC option can be enabled to get warnings for functions that +# are documented, but have no documentation for their parameters or return +# value. If set to NO doxygen will only warn about wrong or incomplete parameter +# documentation, but not about the absence of documentation. +# The default value is: NO. + +WARN_NO_PARAMDOC = NO + +# The WARN_FORMAT tag determines the format of the warning messages that doxygen +# can produce. The string should contain the $file, $line, and $text tags, which +# will be replaced by the file and line number from which the warning originated +# and the warning text. Optionally the format may contain $version, which will +# be replaced by the version of the file (if it could be obtained via +# FILE_VERSION_FILTER) +# The default value is: $file:$line: $text. + +WARN_FORMAT = "$file:$line: $text" + +# The WARN_LOGFILE tag can be used to specify a file to which warning and error +# messages should be written. If left blank the output is written to standard +# error (stderr). + +WARN_LOGFILE = + +#--------------------------------------------------------------------------- +# Configuration options related to the input files +#--------------------------------------------------------------------------- + +# The INPUT tag is used to specify the files and/or directories that contain +# documented source files. You may enter file names like myfile.cpp or +# directories like /usr/src/myproject. Separate the files or directories with +# spaces. +# Note: If this tag is empty the current directory is searched. + +INPUT = + +# This tag can be used to specify the character encoding of the source files +# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses +# libiconv (or the iconv built into libc) for the transcoding. See the libiconv +# documentation (see: http://www.gnu.org/software/libiconv) for the list of +# possible encodings. +# The default value is: UTF-8. + +INPUT_ENCODING = UTF-8 + +# If the value of the INPUT tag contains directories, you can use the +# FILE_PATTERNS tag to specify one or more wildcard patterns (like *.cpp and +# *.h) to filter out the source-files in the directories. If left blank the +# following patterns are tested:*.c, *.cc, *.cxx, *.cpp, *.c++, *.java, *.ii, +# *.ixx, *.ipp, *.i++, *.inl, *.idl, *.ddl, *.odl, *.h, *.hh, *.hxx, *.hpp, +# *.h++, *.cs, *.d, *.php, *.php4, *.php5, *.phtml, *.inc, *.m, *.markdown, +# *.md, *.mm, *.dox, *.py, *.f90, *.f, *.for, *.tcl, *.vhd, *.vhdl, *.ucf, +# *.qsf, *.as and *.js. + +FILE_PATTERNS = *.c \ + *.cc \ + *.cxx \ + *.cpp \ + *.c++ \ + *.java \ + *.ii \ + *.ixx \ + *.ipp \ + *.i++ \ + *.inl \ + *.idl \ + *.ddl \ + *.odl \ + *.h \ + *.hh \ + *.hxx \ + *.hpp \ + *.h++ \ + *.cs \ + *.d \ + *.php \ + *.php4 \ + *.php5 \ + *.phtml \ + *.inc \ + *.m \ + *.markdown \ + *.md \ + *.mm \ + *.dox \ + *.py \ + *.f90 \ + *.f \ + *.for \ + *.tcl \ + *.vhd \ + *.vhdl \ + *.ucf \ + *.qsf \ + *.as \ + *.js + +# The RECURSIVE tag can be used to specify whether or not subdirectories should +# be searched for input files as well. +# The default value is: NO. + +RECURSIVE = YES + +# The EXCLUDE tag can be used to specify files and/or directories that should be +# excluded from the INPUT source files. This way you can easily exclude a +# subdirectory from a directory tree whose root is specified with the INPUT tag. +# +# Note that relative paths are relative to the directory from which doxygen is +# run. + +EXCLUDE = + +# The EXCLUDE_SYMLINKS tag can be used to select whether or not files or +# directories that are symbolic links (a Unix file system feature) are excluded +# from the input. +# The default value is: NO. + +EXCLUDE_SYMLINKS = NO + +# If the value of the INPUT tag contains directories, you can use the +# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude +# certain files from those directories. +# +# Note that the wildcards are matched against the file with absolute path, so to +# exclude all test directories for example use the pattern */test/* + +EXCLUDE_PATTERNS = + +# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names +# (namespaces, classes, functions, etc.) that should be excluded from the +# output. The symbol name can be a fully qualified name, a word, or if the +# wildcard * is used, a substring. Examples: ANamespace, AClass, +# AClass::ANamespace, ANamespace::*Test +# +# Note that the wildcards are matched against the file with absolute path, so to +# exclude all test directories use the pattern */test/* + +EXCLUDE_SYMBOLS = + +# The EXAMPLE_PATH tag can be used to specify one or more files or directories +# that contain example code fragments that are included (see the \include +# command). + +EXAMPLE_PATH = + +# If the value of the EXAMPLE_PATH tag contains directories, you can use the +# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp and +# *.h) to filter out the source-files in the directories. If left blank all +# files are included. + +EXAMPLE_PATTERNS = * + +# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be +# searched for input files to be used with the \include or \dontinclude commands +# irrespective of the value of the RECURSIVE tag. +# The default value is: NO. + +EXAMPLE_RECURSIVE = NO + +# The IMAGE_PATH tag can be used to specify one or more files or directories +# that contain images that are to be included in the documentation (see the +# \image command). + +IMAGE_PATH = + +# The INPUT_FILTER tag can be used to specify a program that doxygen should +# invoke to filter for each input file. Doxygen will invoke the filter program +# by executing (via popen()) the command: +# +# +# +# where is the value of the INPUT_FILTER tag, and is the +# name of an input file. Doxygen will then use the output that the filter +# program writes to standard output. If FILTER_PATTERNS is specified, this tag +# will be ignored. +# +# Note that the filter must not add or remove lines; it is applied before the +# code is scanned, but not when the output code is generated. If lines are added +# or removed, the anchors will not be placed correctly. + +INPUT_FILTER = + +# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern +# basis. Doxygen will compare the file name with each pattern and apply the +# filter if there is a match. The filters are a list of the form: pattern=filter +# (like *.cpp=my_cpp_filter). See INPUT_FILTER for further information on how +# filters are used. If the FILTER_PATTERNS tag is empty or if none of the +# patterns match the file name, INPUT_FILTER is applied. + +FILTER_PATTERNS = + +# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using +# INPUT_FILTER ) will also be used to filter the input files that are used for +# producing the source files to browse (i.e. when SOURCE_BROWSER is set to YES). +# The default value is: NO. + +FILTER_SOURCE_FILES = NO + +# The FILTER_SOURCE_PATTERNS tag can be used to specify source filters per file +# pattern. A pattern will override the setting for FILTER_PATTERN (if any) and +# it is also possible to disable source filtering for a specific pattern using +# *.ext= (so without naming a filter). +# This tag requires that the tag FILTER_SOURCE_FILES is set to YES. + +FILTER_SOURCE_PATTERNS = + +# If the USE_MDFILE_AS_MAINPAGE tag refers to the name of a markdown file that +# is part of the input, its contents will be placed on the main page +# (index.html). This can be useful if you have a project on for instance GitHub +# and want to reuse the introduction page also for the doxygen output. + +USE_MDFILE_AS_MAINPAGE = + +#--------------------------------------------------------------------------- +# Configuration options related to source browsing +#--------------------------------------------------------------------------- + +# If the SOURCE_BROWSER tag is set to YES then a list of source files will be +# generated. Documented entities will be cross-referenced with these sources. +# +# Note: To get rid of all source code in the generated output, make sure that +# also VERBATIM_HEADERS is set to NO. +# The default value is: NO. + +SOURCE_BROWSER = NO + +# Setting the INLINE_SOURCES tag to YES will include the body of functions, +# classes and enums directly into the documentation. +# The default value is: NO. + +INLINE_SOURCES = NO + +# Setting the STRIP_CODE_COMMENTS tag to YES will instruct doxygen to hide any +# special comment blocks from generated source code fragments. Normal C, C++ and +# Fortran comments will always remain visible. +# The default value is: YES. + +STRIP_CODE_COMMENTS = YES + +# If the REFERENCED_BY_RELATION tag is set to YES then for each documented +# function all documented functions referencing it will be listed. +# The default value is: NO. + +REFERENCED_BY_RELATION = NO + +# If the REFERENCES_RELATION tag is set to YES then for each documented function +# all documented entities called/used by that function will be listed. +# The default value is: NO. + +REFERENCES_RELATION = NO + +# If the REFERENCES_LINK_SOURCE tag is set to YES and SOURCE_BROWSER tag is set +# to YES, then the hyperlinks from functions in REFERENCES_RELATION and +# REFERENCED_BY_RELATION lists will link to the source code. Otherwise they will +# link to the documentation. +# The default value is: YES. + +REFERENCES_LINK_SOURCE = YES + +# If SOURCE_TOOLTIPS is enabled (the default) then hovering a hyperlink in the +# source code will show a tooltip with additional information such as prototype, +# brief description and links to the definition and documentation. Since this +# will make the HTML file larger and loading of large files a bit slower, you +# can opt to disable this feature. +# The default value is: YES. +# This tag requires that the tag SOURCE_BROWSER is set to YES. + +SOURCE_TOOLTIPS = YES + +# If the USE_HTAGS tag is set to YES then the references to source code will +# point to the HTML generated by the htags(1) tool instead of doxygen built-in +# source browser. The htags tool is part of GNU's global source tagging system +# (see http://www.gnu.org/software/global/global.html). You will need version +# 4.8.6 or higher. +# +# To use it do the following: +# - Install the latest version of global +# - Enable SOURCE_BROWSER and USE_HTAGS in the config file +# - Make sure the INPUT points to the root of the source tree +# - Run doxygen as normal +# +# Doxygen will invoke htags (and that will in turn invoke gtags), so these +# tools must be available from the command line (i.e. in the search path). +# +# The result: instead of the source browser generated by doxygen, the links to +# source code will now point to the output of htags. +# The default value is: NO. +# This tag requires that the tag SOURCE_BROWSER is set to YES. + +USE_HTAGS = NO + +# If the VERBATIM_HEADERS tag is set the YES then doxygen will generate a +# verbatim copy of the header file for each class for which an include is +# specified. Set to NO to disable this. +# See also: Section \class. +# The default value is: YES. + +VERBATIM_HEADERS = YES + +#--------------------------------------------------------------------------- +# Configuration options related to the alphabetical class index +#--------------------------------------------------------------------------- + +# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index of all +# compounds will be generated. Enable this if the project contains a lot of +# classes, structs, unions or interfaces. +# The default value is: YES. + +ALPHABETICAL_INDEX = YES + +# The COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns in +# which the alphabetical index list will be split. +# Minimum value: 1, maximum value: 20, default value: 5. +# This tag requires that the tag ALPHABETICAL_INDEX is set to YES. + +COLS_IN_ALPHA_INDEX = 5 + +# In case all classes in a project start with a common prefix, all classes will +# be put under the same header in the alphabetical index. The IGNORE_PREFIX tag +# can be used to specify a prefix (or a list of prefixes) that should be ignored +# while generating the index headers. +# This tag requires that the tag ALPHABETICAL_INDEX is set to YES. + +IGNORE_PREFIX = + +#--------------------------------------------------------------------------- +# Configuration options related to the HTML output +#--------------------------------------------------------------------------- + +# If the GENERATE_HTML tag is set to YES doxygen will generate HTML output +# The default value is: YES. + +GENERATE_HTML = YES + +# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. If a +# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of +# it. +# The default directory is: html. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_OUTPUT = html + +# The HTML_FILE_EXTENSION tag can be used to specify the file extension for each +# generated HTML page (for example: .htm, .php, .asp). +# The default value is: .html. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_FILE_EXTENSION = .html + +# The HTML_HEADER tag can be used to specify a user-defined HTML header file for +# each generated HTML page. If the tag is left blank doxygen will generate a +# standard header. +# +# To get valid HTML the header file that includes any scripts and style sheets +# that doxygen needs, which is dependent on the configuration options used (e.g. +# the setting GENERATE_TREEVIEW). It is highly recommended to start with a +# default header using +# doxygen -w html new_header.html new_footer.html new_stylesheet.css +# YourConfigFile +# and then modify the file new_header.html. See also section "Doxygen usage" +# for information on how to generate the default header that doxygen normally +# uses. +# Note: The header is subject to change so you typically have to regenerate the +# default header when upgrading to a newer version of doxygen. For a description +# of the possible markers and block names see the documentation. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_HEADER = + +# The HTML_FOOTER tag can be used to specify a user-defined HTML footer for each +# generated HTML page. If the tag is left blank doxygen will generate a standard +# footer. See HTML_HEADER for more information on how to generate a default +# footer and what special commands can be used inside the footer. See also +# section "Doxygen usage" for information on how to generate the default footer +# that doxygen normally uses. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_FOOTER = + +# The HTML_STYLESHEET tag can be used to specify a user-defined cascading style +# sheet that is used by each HTML page. It can be used to fine-tune the look of +# the HTML output. If left blank doxygen will generate a default style sheet. +# See also section "Doxygen usage" for information on how to generate the style +# sheet that doxygen normally uses. +# Note: It is recommended to use HTML_EXTRA_STYLESHEET instead of this tag, as +# it is more robust and this tag (HTML_STYLESHEET) will in the future become +# obsolete. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_STYLESHEET = + +# The HTML_EXTRA_STYLESHEET tag can be used to specify an additional user- +# defined cascading style sheet that is included after the standard style sheets +# created by doxygen. Using this option one can overrule certain style aspects. +# This is preferred over using HTML_STYLESHEET since it does not replace the +# standard style sheet and is therefor more robust against future updates. +# Doxygen will copy the style sheet file to the output directory. For an example +# see the documentation. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_EXTRA_STYLESHEET = + +# The HTML_EXTRA_FILES tag can be used to specify one or more extra images or +# other source files which should be copied to the HTML output directory. Note +# that these files will be copied to the base HTML output directory. Use the +# $relpath^ marker in the HTML_HEADER and/or HTML_FOOTER files to load these +# files. In the HTML_STYLESHEET file, use the file name only. Also note that the +# files will be copied as-is; there are no commands or markers available. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_EXTRA_FILES = + +# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. Doxygen +# will adjust the colors in the stylesheet and background images according to +# this color. Hue is specified as an angle on a colorwheel, see +# http://en.wikipedia.org/wiki/Hue for more information. For instance the value +# 0 represents red, 60 is yellow, 120 is green, 180 is cyan, 240 is blue, 300 +# purple, and 360 is red again. +# Minimum value: 0, maximum value: 359, default value: 220. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_COLORSTYLE_HUE = 220 + +# The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of the colors +# in the HTML output. For a value of 0 the output will use grayscales only. A +# value of 255 will produce the most vivid colors. +# Minimum value: 0, maximum value: 255, default value: 100. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_COLORSTYLE_SAT = 100 + +# The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to the +# luminance component of the colors in the HTML output. Values below 100 +# gradually make the output lighter, whereas values above 100 make the output +# darker. The value divided by 100 is the actual gamma applied, so 80 represents +# a gamma of 0.8, The value 220 represents a gamma of 2.2, and 100 does not +# change the gamma. +# Minimum value: 40, maximum value: 240, default value: 80. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_COLORSTYLE_GAMMA = 80 + +# If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML +# page will contain the date and time when the page was generated. Setting this +# to NO can help when comparing the output of multiple runs. +# The default value is: YES. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_TIMESTAMP = YES + +# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML +# documentation will contain sections that can be hidden and shown after the +# page has loaded. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_DYNAMIC_SECTIONS = NO + +# With HTML_INDEX_NUM_ENTRIES one can control the preferred number of entries +# shown in the various tree structured indices initially; the user can expand +# and collapse entries dynamically later on. Doxygen will expand the tree to +# such a level that at most the specified number of entries are visible (unless +# a fully collapsed tree already exceeds this amount). So setting the number of +# entries 1 will produce a full collapsed tree by default. 0 is a special value +# representing an infinite number of entries and will result in a full expanded +# tree by default. +# Minimum value: 0, maximum value: 9999, default value: 100. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_INDEX_NUM_ENTRIES = 100 + +# If the GENERATE_DOCSET tag is set to YES, additional index files will be +# generated that can be used as input for Apple's Xcode 3 integrated development +# environment (see: http://developer.apple.com/tools/xcode/), introduced with +# OSX 10.5 (Leopard). To create a documentation set, doxygen will generate a +# Makefile in the HTML output directory. Running make will produce the docset in +# that directory and running make install will install the docset in +# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find it at +# startup. See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html +# for more information. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +GENERATE_DOCSET = NO + +# This tag determines the name of the docset feed. A documentation feed provides +# an umbrella under which multiple documentation sets from a single provider +# (such as a company or product suite) can be grouped. +# The default value is: Doxygen generated docs. +# This tag requires that the tag GENERATE_DOCSET is set to YES. + +DOCSET_FEEDNAME = "Doxygen generated docs" + +# This tag specifies a string that should uniquely identify the documentation +# set bundle. This should be a reverse domain-name style string, e.g. +# com.mycompany.MyDocSet. Doxygen will append .docset to the name. +# The default value is: org.doxygen.Project. +# This tag requires that the tag GENERATE_DOCSET is set to YES. + +DOCSET_BUNDLE_ID = org.doxygen.Project + +# The DOCSET_PUBLISHER_ID tag specifies a string that should uniquely identify +# the documentation publisher. This should be a reverse domain-name style +# string, e.g. com.mycompany.MyDocSet.documentation. +# The default value is: org.doxygen.Publisher. +# This tag requires that the tag GENERATE_DOCSET is set to YES. + +DOCSET_PUBLISHER_ID = org.doxygen.Publisher + +# The DOCSET_PUBLISHER_NAME tag identifies the documentation publisher. +# The default value is: Publisher. +# This tag requires that the tag GENERATE_DOCSET is set to YES. + +DOCSET_PUBLISHER_NAME = Publisher + +# If the GENERATE_HTMLHELP tag is set to YES then doxygen generates three +# additional HTML index files: index.hhp, index.hhc, and index.hhk. The +# index.hhp is a project file that can be read by Microsoft's HTML Help Workshop +# (see: http://www.microsoft.com/en-us/download/details.aspx?id=21138) on +# Windows. +# +# The HTML Help Workshop contains a compiler that can convert all HTML output +# generated by doxygen into a single compiled HTML file (.chm). Compiled HTML +# files are now used as the Windows 98 help format, and will replace the old +# Windows help format (.hlp) on all Windows platforms in the future. Compressed +# HTML files also contain an index, a table of contents, and you can search for +# words in the documentation. The HTML workshop also contains a viewer for +# compressed HTML files. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +GENERATE_HTMLHELP = NO + +# The CHM_FILE tag can be used to specify the file name of the resulting .chm +# file. You can add a path in front of the file if the result should not be +# written to the html output directory. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. + +CHM_FILE = + +# The HHC_LOCATION tag can be used to specify the location (absolute path +# including file name) of the HTML help compiler ( hhc.exe). If non-empty +# doxygen will try to run the HTML help compiler on the generated index.hhp. +# The file has to be specified with full path. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. + +HHC_LOCATION = + +# The GENERATE_CHI flag controls if a separate .chi index file is generated ( +# YES) or that it should be included in the master .chm file ( NO). +# The default value is: NO. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. + +GENERATE_CHI = NO + +# The CHM_INDEX_ENCODING is used to encode HtmlHelp index ( hhk), content ( hhc) +# and project file content. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. + +CHM_INDEX_ENCODING = + +# The BINARY_TOC flag controls whether a binary table of contents is generated ( +# YES) or a normal table of contents ( NO) in the .chm file. Furthermore it +# enables the Previous and Next buttons. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. + +BINARY_TOC = NO + +# The TOC_EXPAND flag can be set to YES to add extra items for group members to +# the table of contents of the HTML help documentation and to the tree view. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. + +TOC_EXPAND = NO + +# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and +# QHP_VIRTUAL_FOLDER are set, an additional index file will be generated that +# can be used as input for Qt's qhelpgenerator to generate a Qt Compressed Help +# (.qch) of the generated HTML documentation. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +GENERATE_QHP = NO + +# If the QHG_LOCATION tag is specified, the QCH_FILE tag can be used to specify +# the file name of the resulting .qch file. The path specified is relative to +# the HTML output folder. +# This tag requires that the tag GENERATE_QHP is set to YES. + +QCH_FILE = + +# The QHP_NAMESPACE tag specifies the namespace to use when generating Qt Help +# Project output. For more information please see Qt Help Project / Namespace +# (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#namespace). +# The default value is: org.doxygen.Project. +# This tag requires that the tag GENERATE_QHP is set to YES. + +QHP_NAMESPACE = org.doxygen.Project + +# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating Qt +# Help Project output. For more information please see Qt Help Project / Virtual +# Folders (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#virtual- +# folders). +# The default value is: doc. +# This tag requires that the tag GENERATE_QHP is set to YES. + +QHP_VIRTUAL_FOLDER = doc + +# If the QHP_CUST_FILTER_NAME tag is set, it specifies the name of a custom +# filter to add. For more information please see Qt Help Project / Custom +# Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom- +# filters). +# This tag requires that the tag GENERATE_QHP is set to YES. + +QHP_CUST_FILTER_NAME = + +# The QHP_CUST_FILTER_ATTRS tag specifies the list of the attributes of the +# custom filter to add. For more information please see Qt Help Project / Custom +# Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom- +# filters). +# This tag requires that the tag GENERATE_QHP is set to YES. + +QHP_CUST_FILTER_ATTRS = + +# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this +# project's filter section matches. Qt Help Project / Filter Attributes (see: +# http://qt-project.org/doc/qt-4.8/qthelpproject.html#filter-attributes). +# This tag requires that the tag GENERATE_QHP is set to YES. + +QHP_SECT_FILTER_ATTRS = + +# The QHG_LOCATION tag can be used to specify the location of Qt's +# qhelpgenerator. If non-empty doxygen will try to run qhelpgenerator on the +# generated .qhp file. +# This tag requires that the tag GENERATE_QHP is set to YES. + +QHG_LOCATION = + +# If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files will be +# generated, together with the HTML files, they form an Eclipse help plugin. To +# install this plugin and make it available under the help contents menu in +# Eclipse, the contents of the directory containing the HTML and XML files needs +# to be copied into the plugins directory of eclipse. The name of the directory +# within the plugins directory should be the same as the ECLIPSE_DOC_ID value. +# After copying Eclipse needs to be restarted before the help appears. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +GENERATE_ECLIPSEHELP = NO + +# A unique identifier for the Eclipse help plugin. When installing the plugin +# the directory name containing the HTML and XML files should also have this +# name. Each documentation set should have its own identifier. +# The default value is: org.doxygen.Project. +# This tag requires that the tag GENERATE_ECLIPSEHELP is set to YES. + +ECLIPSE_DOC_ID = org.doxygen.Project + +# If you want full control over the layout of the generated HTML pages it might +# be necessary to disable the index and replace it with your own. The +# DISABLE_INDEX tag can be used to turn on/off the condensed index (tabs) at top +# of each HTML page. A value of NO enables the index and the value YES disables +# it. Since the tabs in the index contain the same information as the navigation +# tree, you can set this option to YES if you also set GENERATE_TREEVIEW to YES. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +DISABLE_INDEX = NO + +# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index +# structure should be generated to display hierarchical information. If the tag +# value is set to YES, a side panel will be generated containing a tree-like +# index structure (just like the one that is generated for HTML Help). For this +# to work a browser that supports JavaScript, DHTML, CSS and frames is required +# (i.e. any modern browser). Windows users are probably better off using the +# HTML help feature. Via custom stylesheets (see HTML_EXTRA_STYLESHEET) one can +# further fine-tune the look of the index. As an example, the default style +# sheet generated by doxygen has an example that shows how to put an image at +# the root of the tree instead of the PROJECT_NAME. Since the tree basically has +# the same information as the tab index, you could consider setting +# DISABLE_INDEX to YES when enabling this option. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +GENERATE_TREEVIEW = NO + +# The ENUM_VALUES_PER_LINE tag can be used to set the number of enum values that +# doxygen will group on one line in the generated HTML documentation. +# +# Note that a value of 0 will completely suppress the enum values from appearing +# in the overview section. +# Minimum value: 0, maximum value: 20, default value: 4. +# This tag requires that the tag GENERATE_HTML is set to YES. + +ENUM_VALUES_PER_LINE = 4 + +# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be used +# to set the initial width (in pixels) of the frame in which the tree is shown. +# Minimum value: 0, maximum value: 1500, default value: 250. +# This tag requires that the tag GENERATE_HTML is set to YES. + +TREEVIEW_WIDTH = 250 + +# When the EXT_LINKS_IN_WINDOW option is set to YES doxygen will open links to +# external symbols imported via tag files in a separate window. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +EXT_LINKS_IN_WINDOW = NO + +# Use this tag to change the font size of LaTeX formulas included as images in +# the HTML documentation. When you change the font size after a successful +# doxygen run you need to manually remove any form_*.png images from the HTML +# output directory to force them to be regenerated. +# Minimum value: 8, maximum value: 50, default value: 10. +# This tag requires that the tag GENERATE_HTML is set to YES. + +FORMULA_FONTSIZE = 10 + +# Use the FORMULA_TRANPARENT tag to determine whether or not the images +# generated for formulas are transparent PNGs. Transparent PNGs are not +# supported properly for IE 6.0, but are supported on all modern browsers. +# +# Note that when changing this option you need to delete any form_*.png files in +# the HTML output directory before the changes have effect. +# The default value is: YES. +# This tag requires that the tag GENERATE_HTML is set to YES. + +FORMULA_TRANSPARENT = YES + +# Enable the USE_MATHJAX option to render LaTeX formulas using MathJax (see +# http://www.mathjax.org) which uses client side Javascript for the rendering +# instead of using prerendered bitmaps. Use this if you do not have LaTeX +# installed or if you want to formulas look prettier in the HTML output. When +# enabled you may also need to install MathJax separately and configure the path +# to it using the MATHJAX_RELPATH option. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +USE_MATHJAX = NO + +# When MathJax is enabled you can set the default output format to be used for +# the MathJax output. See the MathJax site (see: +# http://docs.mathjax.org/en/latest/output.html) for more details. +# Possible values are: HTML-CSS (which is slower, but has the best +# compatibility), NativeMML (i.e. MathML) and SVG. +# The default value is: HTML-CSS. +# This tag requires that the tag USE_MATHJAX is set to YES. + +MATHJAX_FORMAT = HTML-CSS + +# When MathJax is enabled you need to specify the location relative to the HTML +# output directory using the MATHJAX_RELPATH option. The destination directory +# should contain the MathJax.js script. For instance, if the mathjax directory +# is located at the same level as the HTML output directory, then +# MATHJAX_RELPATH should be ../mathjax. The default value points to the MathJax +# Content Delivery Network so you can quickly see the result without installing +# MathJax. However, it is strongly recommended to install a local copy of +# MathJax from http://www.mathjax.org before deployment. +# The default value is: http://cdn.mathjax.org/mathjax/latest. +# This tag requires that the tag USE_MATHJAX is set to YES. + +MATHJAX_RELPATH = http://cdn.mathjax.org/mathjax/latest + +# The MATHJAX_EXTENSIONS tag can be used to specify one or more MathJax +# extension names that should be enabled during MathJax rendering. For example +# MATHJAX_EXTENSIONS = TeX/AMSmath TeX/AMSsymbols +# This tag requires that the tag USE_MATHJAX is set to YES. + +MATHJAX_EXTENSIONS = + +# The MATHJAX_CODEFILE tag can be used to specify a file with javascript pieces +# of code that will be used on startup of the MathJax code. See the MathJax site +# (see: http://docs.mathjax.org/en/latest/output.html) for more details. For an +# example see the documentation. +# This tag requires that the tag USE_MATHJAX is set to YES. + +MATHJAX_CODEFILE = + +# When the SEARCHENGINE tag is enabled doxygen will generate a search box for +# the HTML output. The underlying search engine uses javascript and DHTML and +# should work on any modern browser. Note that when using HTML help +# (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets (GENERATE_DOCSET) +# there is already a search function so this one should typically be disabled. +# For large projects the javascript based search engine can be slow, then +# enabling SERVER_BASED_SEARCH may provide a better solution. It is possible to +# search using the keyboard; to jump to the search box use + S +# (what the is depends on the OS and browser, but it is typically +# , /
      + + + + +
      + +
      + +
      +
      +
      File List
      +
      +
      +
      Here is a list of all files with brief descriptions:
      + + +
       hello.c
      +
      +
      + + + + diff --git a/t/recipes/checks/documentation/doxygen/cruft-doxygen-documentation/build-spec/orig/src/doc/html/index.html b/t/recipes/checks/documentation/doxygen/cruft-doxygen-documentation/build-spec/orig/src/doc/html/index.html new file mode 100644 index 0000000..e9e2c06 --- /dev/null +++ b/t/recipes/checks/documentation/doxygen/cruft-doxygen-documentation/build-spec/orig/src/doc/html/index.html @@ -0,0 +1,87 @@ + + + + + + +example: Main Page + + + + + + + + + +
      +
      + + + + + + +
      +
      example +
      +
      +
      + + + + +
      + + + + +
      + +
      + +
      +
      +
      example Documentation
      +
      +
      +
      + + + + diff --git a/t/recipes/checks/documentation/doxygen/cruft-doxygen-documentation/build-spec/orig/src/doc/html/tabs.css b/t/recipes/checks/documentation/doxygen/cruft-doxygen-documentation/build-spec/orig/src/doc/html/tabs.css new file mode 100644 index 0000000..9cf578f --- /dev/null +++ b/t/recipes/checks/documentation/doxygen/cruft-doxygen-documentation/build-spec/orig/src/doc/html/tabs.css @@ -0,0 +1,60 @@ +.tabs, .tabs2, .tabs3 { + background-image: url('tab_b.png'); + width: 100%; + z-index: 101; + font-size: 13px; + font-family: 'Lucida Grande',Geneva,Helvetica,Arial,sans-serif; +} + +.tabs2 { + font-size: 10px; +} +.tabs3 { + font-size: 9px; +} + +.tablist { + margin: 0; + padding: 0; + display: table; +} + +.tablist li { + float: left; + display: table-cell; + background-image: url('tab_b.png'); + line-height: 36px; + list-style: none; +} + +.tablist a { + display: block; + padding: 0 20px; + font-weight: bold; + background-image:url('tab_s.png'); + background-repeat:no-repeat; + background-position:right; + color: #283A5D; + text-shadow: 0px 1px 1px rgba(255, 255, 255, 0.9); + text-decoration: none; + outline: none; +} + +.tabs3 .tablist a { + padding: 0 10px; +} + +.tablist a:hover { + background-image: url('tab_h.png'); + background-repeat:repeat-x; + color: #fff; + text-shadow: 0px 1px 1px rgba(0, 0, 0, 1.0); + text-decoration: none; +} + +.tablist li.current a { + background-image: url('tab_a.png'); + background-repeat:repeat-x; + color: #fff; + text-shadow: 0px 1px 1px rgba(0, 0, 0, 1.0); +} diff --git a/t/recipes/checks/documentation/doxygen/cruft-doxygen-documentation/build-spec/orig/src/doc/latex/doxygen.sty b/t/recipes/checks/documentation/doxygen/cruft-doxygen-documentation/build-spec/orig/src/doc/latex/doxygen.sty new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/t/recipes/checks/documentation/doxygen/cruft-doxygen-documentation/build-spec/orig/src/doc/latex/doxygen.sty @@ -0,0 +1 @@ + diff --git a/t/recipes/checks/documentation/doxygen/cruft-doxygen-documentation/build-spec/orig/src/doc/latex/files.tex b/t/recipes/checks/documentation/doxygen/cruft-doxygen-documentation/build-spec/orig/src/doc/latex/files.tex new file mode 100644 index 0000000..4335bbf --- /dev/null +++ b/t/recipes/checks/documentation/doxygen/cruft-doxygen-documentation/build-spec/orig/src/doc/latex/files.tex @@ -0,0 +1,4 @@ +\section{File List} +Here is a list of all files with brief descriptions\+:\begin{DoxyCompactList} +\item\contentsline{section}{\hyperlink{hello_8c}{hello.\+c} }{\pageref{d1/d6a/hello_8c}}{} +\end{DoxyCompactList} diff --git a/t/recipes/checks/documentation/doxygen/cruft-doxygen-documentation/build-spec/orig/src/doc/latex/refman.tex b/t/recipes/checks/documentation/doxygen/cruft-doxygen-documentation/build-spec/orig/src/doc/latex/refman.tex new file mode 100644 index 0000000..608e040 --- /dev/null +++ b/t/recipes/checks/documentation/doxygen/cruft-doxygen-documentation/build-spec/orig/src/doc/latex/refman.tex @@ -0,0 +1,153 @@ +\documentclass[twoside]{book} + +% Packages required by doxygen +\usepackage{fixltx2e} +\usepackage{calc} +\usepackage{doxygen} +\usepackage{graphicx} +\usepackage[utf8]{inputenc} +\usepackage{makeidx} +\usepackage{multicol} +\usepackage{multirow} +\PassOptionsToPackage{warn}{textcomp} +\usepackage{textcomp} +\usepackage[nointegrals]{wasysym} +\usepackage[table]{xcolor} + +% Font selection +\usepackage[T1]{fontenc} +\usepackage{mathptmx} +\usepackage[scaled=.90]{helvet} +\usepackage{courier} +\usepackage{amssymb} +\usepackage{sectsty} +\renewcommand{\familydefault}{\sfdefault} +\allsectionsfont{% + \fontseries{bc}\selectfont% + \color{darkgray}% +} +\renewcommand{\DoxyLabelFont}{% + \fontseries{bc}\selectfont% + \color{darkgray}% +} +\newcommand{\+}{\discretionary{\mbox{\scriptsize$\hookleftarrow$}}{}{}} + +% Page & text layout +\usepackage{geometry} +\geometry{% + a4paper,% + top=2.5cm,% + bottom=2.5cm,% + left=2.5cm,% + right=2.5cm% +} +\tolerance=750 +\hfuzz=15pt +\hbadness=750 +\setlength{\emergencystretch}{15pt} +\setlength{\parindent}{0cm} +\setlength{\parskip}{0.2cm} +\makeatletter +\renewcommand{\paragraph}{% + \@startsection{paragraph}{4}{0ex}{-1.0ex}{1.0ex}{% + \normalfont\normalsize\bfseries\SS@parafont% + }% +} +\renewcommand{\subparagraph}{% + \@startsection{subparagraph}{5}{0ex}{-1.0ex}{1.0ex}{% + \normalfont\normalsize\bfseries\SS@subparafont% + }% +} +\makeatother + +% Headers & footers +\usepackage{fancyhdr} +\pagestyle{fancyplain} +\fancyhead[LE]{\fancyplain{}{\bfseries\thepage}} +\fancyhead[CE]{\fancyplain{}{}} +\fancyhead[RE]{\fancyplain{}{\bfseries\leftmark}} +\fancyhead[LO]{\fancyplain{}{\bfseries\rightmark}} +\fancyhead[CO]{\fancyplain{}{}} +\fancyhead[RO]{\fancyplain{}{\bfseries\thepage}} +\fancyfoot[LE]{\fancyplain{}{}} +\fancyfoot[CE]{\fancyplain{}{}} +\fancyfoot[RE]{\fancyplain{}{\bfseries\scriptsize Generated on Sun Sep 7 2014 16\+:14\+:08 for example by Doxygen }} +\fancyfoot[LO]{\fancyplain{}{\bfseries\scriptsize Generated on Sun Sep 7 2014 16\+:14\+:08 for example by Doxygen }} +\fancyfoot[CO]{\fancyplain{}{}} +\fancyfoot[RO]{\fancyplain{}{}} +\renewcommand{\footrulewidth}{0.4pt} +\renewcommand{\chaptermark}[1]{% + \markboth{#1}{}% +} +\renewcommand{\sectionmark}[1]{% + \markright{\thesection\ #1}% +} + +% Indices & bibliography +\usepackage{natbib} +\usepackage[titles]{tocloft} +\setcounter{tocdepth}{3} +\setcounter{secnumdepth}{5} +\makeindex + +% Hyperlinks (required, but should be loaded last) +\usepackage{ifpdf} +\ifpdf + \usepackage[pdftex,pagebackref=true]{hyperref} +\else + \usepackage[ps2pdf,pagebackref=true]{hyperref} +\fi +\hypersetup{% + colorlinks=true,% + linkcolor=blue,% + citecolor=blue,% + unicode% +} + +% Custom commands +\newcommand{\clearemptydoublepage}{% + \newpage{\pagestyle{empty}\cleardoublepage}% +} + + +%===== C O N T E N T S ===== + +\begin{document} + +% Titlepage & ToC +\hypersetup{pageanchor=false, + bookmarks=true, + bookmarksnumbered=true, + pdfencoding=unicode + } +\pagenumbering{roman} +\begin{titlepage} +\vspace*{7cm} +\begin{center}% +{\Large example }\\ +\vspace*{1cm} +{\large Generated by Doxygen 1.8.7}\\ +\vspace*{0.5cm} +{\small Sun Sep 7 2014 16:14:08}\\ +\end{center} +\end{titlepage} +\clearemptydoublepage +\tableofcontents +\clearemptydoublepage +\pagenumbering{arabic} +\hypersetup{pageanchor=true} + +%--- Begin generated contents --- +\chapter{File Index} +\input{files} +\chapter{File Documentation} +\input{d1/d6a/hello_8c} +%--- End generated contents --- + +% Index +\newpage +\phantomsection +\addcontentsline{toc}{chapter}{Index} +\printindex + +\end{document} diff --git a/t/recipes/checks/documentation/doxygen/cruft-doxygen-documentation/build-spec/orig/src/hello.c b/t/recipes/checks/documentation/doxygen/cruft-doxygen-documentation/build-spec/orig/src/hello.c new file mode 100644 index 0000000..ff2cb8d --- /dev/null +++ b/t/recipes/checks/documentation/doxygen/cruft-doxygen-documentation/build-spec/orig/src/hello.c @@ -0,0 +1,10 @@ +#include + +void hello() { + printf("hello"); +} + +int main() +{ + hello(); +} \ No newline at end of file diff --git a/t/recipes/checks/documentation/doxygen/cruft-doxygen-documentation/eval/desc b/t/recipes/checks/documentation/doxygen/cruft-doxygen-documentation/eval/desc new file mode 100644 index 0000000..3495c4d --- /dev/null +++ b/t/recipes/checks/documentation/doxygen/cruft-doxygen-documentation/eval/desc @@ -0,0 +1,2 @@ +Testname: cruft-doxygen-documentation +Check: documentation/doxygen diff --git a/t/recipes/checks/documentation/doxygen/cruft-doxygen-documentation/eval/hints b/t/recipes/checks/documentation/doxygen/cruft-doxygen-documentation/eval/hints new file mode 100644 index 0000000..0f18d7a --- /dev/null +++ b/t/recipes/checks/documentation/doxygen/cruft-doxygen-documentation/eval/hints @@ -0,0 +1,4 @@ +cruft-doxygen-documentation (source): source-contains-prebuilt-doxygen-documentation [src/doc/latex/] +cruft-doxygen-documentation (source): source-contains-prebuilt-doxygen-documentation [src/doc/html/index.html] +cruft-doxygen-documentation (source): source-contains-prebuilt-doxygen-documentation [src/doc/html/files.html] +cruft-doxygen-documentation (source): source-contains-prebuilt-doxygen-documentation [src/doc/html/] diff --git a/t/recipes/checks/documentation/doxygen/files-doxygen-documentation/build-spec/debian/install b/t/recipes/checks/documentation/doxygen/files-doxygen-documentation/build-spec/debian/install new file mode 100644 index 0000000..a99dced --- /dev/null +++ b/t/recipes/checks/documentation/doxygen/files-doxygen-documentation/build-spec/debian/install @@ -0,0 +1 @@ +src/doc /usr/share/doc/files-doxygen-documentation/html \ No newline at end of file diff --git a/t/recipes/checks/documentation/doxygen/files-doxygen-documentation/build-spec/fill-values b/t/recipes/checks/documentation/doxygen/files-doxygen-documentation/build-spec/fill-values new file mode 100644 index 0000000..2614efb --- /dev/null +++ b/t/recipes/checks/documentation/doxygen/files-doxygen-documentation/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: upload-native +Testname: files-doxygen-documentation +Description: Detect doxygen documentation problem diff --git a/t/recipes/checks/documentation/doxygen/files-doxygen-documentation/build-spec/orig/src/Doxyfile b/t/recipes/checks/documentation/doxygen/files-doxygen-documentation/build-spec/orig/src/Doxyfile new file mode 100644 index 0000000..67bf289 --- /dev/null +++ b/t/recipes/checks/documentation/doxygen/files-doxygen-documentation/build-spec/orig/src/Doxyfile @@ -0,0 +1,2363 @@ +# Doxyfile 1.8.7 + +# This file describes the settings to be used by the documentation system +# doxygen (www.doxygen.org) for a project. +# +# All text after a double hash (##) is considered a comment and is placed in +# front of the TAG it is preceding. +# +# All text after a single hash (#) is considered a comment and will be ignored. +# The format is: +# TAG = value [value, ...] +# For lists, items can also be appended using: +# TAG += value [value, ...] +# Values that contain spaces should be placed between quotes (\" \"). + +#--------------------------------------------------------------------------- +# Project related configuration options +#--------------------------------------------------------------------------- + +# This tag specifies the encoding used for all characters in the config file +# that follow. The default is UTF-8 which is also the encoding used for all text +# before the first occurrence of this tag. Doxygen uses libiconv (or the iconv +# built into libc) for the transcoding. See http://www.gnu.org/software/libiconv +# for the list of possible encodings. +# The default value is: UTF-8. + +DOXYFILE_ENCODING = UTF-8 + +# The PROJECT_NAME tag is a single word (or a sequence of words surrounded by +# double-quotes, unless you are using Doxywizard) that should identify the +# project for which the documentation is generated. This name is used in the +# title of most generated pages and in a few other places. +# The default value is: My Project. + +PROJECT_NAME = example + +# The PROJECT_NUMBER tag can be used to enter a project or revision number. This +# could be handy for archiving the generated documentation or if some version +# control system is used. + +PROJECT_NUMBER = + +# Using the PROJECT_BRIEF tag one can provide an optional one line description +# for a project that appears at the top of each page and should give viewer a +# quick idea about the purpose of the project. Keep the description short. + +PROJECT_BRIEF = + +# With the PROJECT_LOGO tag one can specify an logo or icon that is included in +# the documentation. The maximum height of the logo should not exceed 55 pixels +# and the maximum width should not exceed 200 pixels. Doxygen will copy the logo +# to the output directory. + +PROJECT_LOGO = + +# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) path +# into which the generated documentation will be written. If a relative path is +# entered, it will be relative to the location where doxygen was started. If +# left blank the current directory will be used. + +OUTPUT_DIRECTORY = doc + +# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create 4096 sub- +# directories (in 2 levels) under the output directory of each output format and +# will distribute the generated files over these directories. Enabling this +# option can be useful when feeding doxygen a huge amount of source files, where +# putting all generated files in the same directory would otherwise causes +# performance problems for the file system. +# The default value is: NO. + +CREATE_SUBDIRS = YES + +# If the ALLOW_UNICODE_NAMES tag is set to YES, doxygen will allow non-ASCII +# characters to appear in the names of generated files. If set to NO, non-ASCII +# characters will be escaped, for example _xE3_x81_x84 will be used for Unicode +# U+3044. +# The default value is: NO. + +ALLOW_UNICODE_NAMES = YES + +# The OUTPUT_LANGUAGE tag is used to specify the language in which all +# documentation generated by doxygen is written. Doxygen will use this +# information to generate all constant output in the proper language. +# Possible values are: Afrikaans, Arabic, Armenian, Brazilian, Catalan, Chinese, +# Chinese-Traditional, Croatian, Czech, Danish, Dutch, English (United States), +# Esperanto, Farsi (Persian), Finnish, French, German, Greek, Hungarian, +# Indonesian, Italian, Japanese, Japanese-en (Japanese with English messages), +# Korean, Korean-en (Korean with English messages), Latvian, Lithuanian, +# Macedonian, Norwegian, Persian (Farsi), Polish, Portuguese, Romanian, Russian, +# Serbian, Serbian-Cyrillic, Slovak, Slovene, Spanish, Swedish, Turkish, +# Ukrainian and Vietnamese. +# The default value is: English. + +OUTPUT_LANGUAGE = English + +# If the BRIEF_MEMBER_DESC tag is set to YES doxygen will include brief member +# descriptions after the members that are listed in the file and class +# documentation (similar to Javadoc). Set to NO to disable this. +# The default value is: YES. + +BRIEF_MEMBER_DESC = YES + +# If the REPEAT_BRIEF tag is set to YES doxygen will prepend the brief +# description of a member or function before the detailed description +# +# Note: If both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the +# brief descriptions will be completely suppressed. +# The default value is: YES. + +REPEAT_BRIEF = YES + +# This tag implements a quasi-intelligent brief description abbreviator that is +# used to form the text in various listings. Each string in this list, if found +# as the leading text of the brief description, will be stripped from the text +# and the result, after processing the whole list, is used as the annotated +# text. Otherwise, the brief description is used as-is. If left blank, the +# following values are used ($name is automatically replaced with the name of +# the entity):The $name class, The $name widget, The $name file, is, provides, +# specifies, contains, represents, a, an and the. + +ABBREVIATE_BRIEF = "The $name class" \ + "The $name widget" \ + "The $name file" \ + is \ + provides \ + specifies \ + contains \ + represents \ + a \ + an \ + the + +# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then +# doxygen will generate a detailed section even if there is only a brief +# description. +# The default value is: NO. + +ALWAYS_DETAILED_SEC = NO + +# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all +# inherited members of a class in the documentation of that class as if those +# members were ordinary class members. Constructors, destructors and assignment +# operators of the base classes will not be shown. +# The default value is: NO. + +INLINE_INHERITED_MEMB = NO + +# If the FULL_PATH_NAMES tag is set to YES doxygen will prepend the full path +# before files name in the file list and in the header files. If set to NO the +# shortest path that makes the file name unique will be used +# The default value is: YES. + +FULL_PATH_NAMES = YES + +# The STRIP_FROM_PATH tag can be used to strip a user-defined part of the path. +# Stripping is only done if one of the specified strings matches the left-hand +# part of the path. The tag can be used to show relative paths in the file list. +# If left blank the directory from which doxygen is run is used as the path to +# strip. +# +# Note that you can specify absolute paths here, but also relative paths, which +# will be relative from the directory where doxygen is started. +# This tag requires that the tag FULL_PATH_NAMES is set to YES. + +STRIP_FROM_PATH = + +# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of the +# path mentioned in the documentation of a class, which tells the reader which +# header file to include in order to use a class. If left blank only the name of +# the header file containing the class definition is used. Otherwise one should +# specify the list of include paths that are normally passed to the compiler +# using the -I flag. + +STRIP_FROM_INC_PATH = + +# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter (but +# less readable) file names. This can be useful is your file systems doesn't +# support long names like on DOS, Mac, or CD-ROM. +# The default value is: NO. + +SHORT_NAMES = NO + +# If the JAVADOC_AUTOBRIEF tag is set to YES then doxygen will interpret the +# first line (until the first dot) of a Javadoc-style comment as the brief +# description. If set to NO, the Javadoc-style will behave just like regular Qt- +# style comments (thus requiring an explicit @brief command for a brief +# description.) +# The default value is: NO. + +JAVADOC_AUTOBRIEF = NO + +# If the QT_AUTOBRIEF tag is set to YES then doxygen will interpret the first +# line (until the first dot) of a Qt-style comment as the brief description. If +# set to NO, the Qt-style will behave just like regular Qt-style comments (thus +# requiring an explicit \brief command for a brief description.) +# The default value is: NO. + +QT_AUTOBRIEF = NO + +# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make doxygen treat a +# multi-line C++ special comment block (i.e. a block of //! or /// comments) as +# a brief description. This used to be the default behavior. The new default is +# to treat a multi-line C++ comment block as a detailed description. Set this +# tag to YES if you prefer the old behavior instead. +# +# Note that setting this tag to YES also means that rational rose comments are +# not recognized any more. +# The default value is: NO. + +MULTILINE_CPP_IS_BRIEF = NO + +# If the INHERIT_DOCS tag is set to YES then an undocumented member inherits the +# documentation from any documented member that it re-implements. +# The default value is: YES. + +INHERIT_DOCS = YES + +# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce a +# new page for each member. If set to NO, the documentation of a member will be +# part of the file/class/namespace that contains it. +# The default value is: NO. + +SEPARATE_MEMBER_PAGES = NO + +# The TAB_SIZE tag can be used to set the number of spaces in a tab. Doxygen +# uses this value to replace tabs by spaces in code fragments. +# Minimum value: 1, maximum value: 16, default value: 4. + +TAB_SIZE = 4 + +# This tag can be used to specify a number of aliases that act as commands in +# the documentation. An alias has the form: +# name=value +# For example adding +# "sideeffect=@par Side Effects:\n" +# will allow you to put the command \sideeffect (or @sideeffect) in the +# documentation, which will result in a user-defined paragraph with heading +# "Side Effects:". You can put \n's in the value part of an alias to insert +# newlines. + +ALIASES = + +# This tag can be used to specify a number of word-keyword mappings (TCL only). +# A mapping has the form "name=value". For example adding "class=itcl::class" +# will allow you to use the command class in the itcl::class meaning. + +TCL_SUBST = + +# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources +# only. Doxygen will then generate output that is more tailored for C. For +# instance, some of the names that are used will be different. The list of all +# members will be omitted, etc. +# The default value is: NO. + +OPTIMIZE_OUTPUT_FOR_C = NO + +# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java or +# Python sources only. Doxygen will then generate output that is more tailored +# for that language. For instance, namespaces will be presented as packages, +# qualified scopes will look different, etc. +# The default value is: NO. + +OPTIMIZE_OUTPUT_JAVA = NO + +# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran +# sources. Doxygen will then generate output that is tailored for Fortran. +# The default value is: NO. + +OPTIMIZE_FOR_FORTRAN = NO + +# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL +# sources. Doxygen will then generate output that is tailored for VHDL. +# The default value is: NO. + +OPTIMIZE_OUTPUT_VHDL = NO + +# Doxygen selects the parser to use depending on the extension of the files it +# parses. With this tag you can assign which parser to use for a given +# extension. Doxygen has a built-in mapping, but you can override or extend it +# using this tag. The format is ext=language, where ext is a file extension, and +# language is one of the parsers supported by doxygen: IDL, Java, Javascript, +# C#, C, C++, D, PHP, Objective-C, Python, Fortran (fixed format Fortran: +# FortranFixed, free formatted Fortran: FortranFree, unknown formatted Fortran: +# Fortran. In the later case the parser tries to guess whether the code is fixed +# or free formatted code, this is the default for Fortran type files), VHDL. For +# instance to make doxygen treat .inc files as Fortran files (default is PHP), +# and .f files as C (default is Fortran), use: inc=Fortran f=C. +# +# Note For files without extension you can use no_extension as a placeholder. +# +# Note that for custom extensions you also need to set FILE_PATTERNS otherwise +# the files are not read by doxygen. + +EXTENSION_MAPPING = + +# If the MARKDOWN_SUPPORT tag is enabled then doxygen pre-processes all comments +# according to the Markdown format, which allows for more readable +# documentation. See http://daringfireball.net/projects/markdown/ for details. +# The output of markdown processing is further processed by doxygen, so you can +# mix doxygen, HTML, and XML commands with Markdown formatting. Disable only in +# case of backward compatibilities issues. +# The default value is: YES. + +MARKDOWN_SUPPORT = YES + +# When enabled doxygen tries to link words that correspond to documented +# classes, or namespaces to their corresponding documentation. Such a link can +# be prevented in individual cases by by putting a % sign in front of the word +# or globally by setting AUTOLINK_SUPPORT to NO. +# The default value is: YES. + +AUTOLINK_SUPPORT = YES + +# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want +# to include (a tag file for) the STL sources as input, then you should set this +# tag to YES in order to let doxygen match functions declarations and +# definitions whose arguments contain STL classes (e.g. func(std::string); +# versus func(std::string) {}). This also make the inheritance and collaboration +# diagrams that involve STL classes more complete and accurate. +# The default value is: NO. + +BUILTIN_STL_SUPPORT = NO + +# If you use Microsoft's C++/CLI language, you should set this option to YES to +# enable parsing support. +# The default value is: NO. + +CPP_CLI_SUPPORT = NO + +# Set the SIP_SUPPORT tag to YES if your project consists of sip (see: +# http://www.riverbankcomputing.co.uk/software/sip/intro) sources only. Doxygen +# will parse them like normal C++ but will assume all classes use public instead +# of private inheritance when no explicit protection keyword is present. +# The default value is: NO. + +SIP_SUPPORT = NO + +# For Microsoft's IDL there are propget and propput attributes to indicate +# getter and setter methods for a property. Setting this option to YES will make +# doxygen to replace the get and set methods by a property in the documentation. +# This will only work if the methods are indeed getting or setting a simple +# type. If this is not the case, or you want to show the methods anyway, you +# should set this option to NO. +# The default value is: YES. + +IDL_PROPERTY_SUPPORT = YES + +# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC +# tag is set to YES, then doxygen will reuse the documentation of the first +# member in the group (if any) for the other members of the group. By default +# all members of a group must be documented explicitly. +# The default value is: NO. + +DISTRIBUTE_GROUP_DOC = NO + +# Set the SUBGROUPING tag to YES to allow class member groups of the same type +# (for instance a group of public functions) to be put as a subgroup of that +# type (e.g. under the Public Functions section). Set it to NO to prevent +# subgrouping. Alternatively, this can be done per class using the +# \nosubgrouping command. +# The default value is: YES. + +SUBGROUPING = YES + +# When the INLINE_GROUPED_CLASSES tag is set to YES, classes, structs and unions +# are shown inside the group in which they are included (e.g. using \ingroup) +# instead of on a separate page (for HTML and Man pages) or section (for LaTeX +# and RTF). +# +# Note that this feature does not work in combination with +# SEPARATE_MEMBER_PAGES. +# The default value is: NO. + +INLINE_GROUPED_CLASSES = NO + +# When the INLINE_SIMPLE_STRUCTS tag is set to YES, structs, classes, and unions +# with only public data fields or simple typedef fields will be shown inline in +# the documentation of the scope in which they are defined (i.e. file, +# namespace, or group documentation), provided this scope is documented. If set +# to NO, structs, classes, and unions are shown on a separate page (for HTML and +# Man pages) or section (for LaTeX and RTF). +# The default value is: NO. + +INLINE_SIMPLE_STRUCTS = NO + +# When TYPEDEF_HIDES_STRUCT tag is enabled, a typedef of a struct, union, or +# enum is documented as struct, union, or enum with the name of the typedef. So +# typedef struct TypeS {} TypeT, will appear in the documentation as a struct +# with name TypeT. When disabled the typedef will appear as a member of a file, +# namespace, or class. And the struct will be named TypeS. This can typically be +# useful for C code in case the coding convention dictates that all compound +# types are typedef'ed and only the typedef is referenced, never the tag name. +# The default value is: NO. + +TYPEDEF_HIDES_STRUCT = NO + +# The size of the symbol lookup cache can be set using LOOKUP_CACHE_SIZE. This +# cache is used to resolve symbols given their name and scope. Since this can be +# an expensive process and often the same symbol appears multiple times in the +# code, doxygen keeps a cache of pre-resolved symbols. If the cache is too small +# doxygen will become slower. If the cache is too large, memory is wasted. The +# cache size is given by this formula: 2^(16+LOOKUP_CACHE_SIZE). The valid range +# is 0..9, the default is 0, corresponding to a cache size of 2^16=65536 +# symbols. At the end of a run doxygen will report the cache usage and suggest +# the optimal cache size from a speed point of view. +# Minimum value: 0, maximum value: 9, default value: 0. + +LOOKUP_CACHE_SIZE = 0 + +#--------------------------------------------------------------------------- +# Build related configuration options +#--------------------------------------------------------------------------- + +# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in +# documentation are documented, even if no documentation was available. Private +# class members and static file members will be hidden unless the +# EXTRACT_PRIVATE respectively EXTRACT_STATIC tags are set to YES. +# Note: This will also disable the warnings about undocumented members that are +# normally produced when WARNINGS is set to YES. +# The default value is: NO. + +EXTRACT_ALL = YES + +# If the EXTRACT_PRIVATE tag is set to YES all private members of a class will +# be included in the documentation. +# The default value is: NO. + +EXTRACT_PRIVATE = NO + +# If the EXTRACT_PACKAGE tag is set to YES all members with package or internal +# scope will be included in the documentation. +# The default value is: NO. + +EXTRACT_PACKAGE = NO + +# If the EXTRACT_STATIC tag is set to YES all static members of a file will be +# included in the documentation. +# The default value is: NO. + +EXTRACT_STATIC = NO + +# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) defined +# locally in source files will be included in the documentation. If set to NO +# only classes defined in header files are included. Does not have any effect +# for Java sources. +# The default value is: YES. + +EXTRACT_LOCAL_CLASSES = YES + +# This flag is only useful for Objective-C code. When set to YES local methods, +# which are defined in the implementation section but not in the interface are +# included in the documentation. If set to NO only methods in the interface are +# included. +# The default value is: NO. + +EXTRACT_LOCAL_METHODS = NO + +# If this flag is set to YES, the members of anonymous namespaces will be +# extracted and appear in the documentation as a namespace called +# 'anonymous_namespace{file}', where file will be replaced with the base name of +# the file that contains the anonymous namespace. By default anonymous namespace +# are hidden. +# The default value is: NO. + +EXTRACT_ANON_NSPACES = NO + +# If the HIDE_UNDOC_MEMBERS tag is set to YES, doxygen will hide all +# undocumented members inside documented classes or files. If set to NO these +# members will be included in the various overviews, but no documentation +# section is generated. This option has no effect if EXTRACT_ALL is enabled. +# The default value is: NO. + +HIDE_UNDOC_MEMBERS = NO + +# If the HIDE_UNDOC_CLASSES tag is set to YES, doxygen will hide all +# undocumented classes that are normally visible in the class hierarchy. If set +# to NO these classes will be included in the various overviews. This option has +# no effect if EXTRACT_ALL is enabled. +# The default value is: NO. + +HIDE_UNDOC_CLASSES = NO + +# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, doxygen will hide all friend +# (class|struct|union) declarations. If set to NO these declarations will be +# included in the documentation. +# The default value is: NO. + +HIDE_FRIEND_COMPOUNDS = NO + +# If the HIDE_IN_BODY_DOCS tag is set to YES, doxygen will hide any +# documentation blocks found inside the body of a function. If set to NO these +# blocks will be appended to the function's detailed documentation block. +# The default value is: NO. + +HIDE_IN_BODY_DOCS = NO + +# The INTERNAL_DOCS tag determines if documentation that is typed after a +# \internal command is included. If the tag is set to NO then the documentation +# will be excluded. Set it to YES to include the internal documentation. +# The default value is: NO. + +INTERNAL_DOCS = NO + +# If the CASE_SENSE_NAMES tag is set to NO then doxygen will only generate file +# names in lower-case letters. If set to YES upper-case letters are also +# allowed. This is useful if you have classes or files whose names only differ +# in case and if your file system supports case sensitive file names. Windows +# and Mac users are advised to set this option to NO. +# The default value is: system dependent. + +CASE_SENSE_NAMES = NO + +# If the HIDE_SCOPE_NAMES tag is set to NO then doxygen will show members with +# their full class and namespace scopes in the documentation. If set to YES the +# scope will be hidden. +# The default value is: NO. + +HIDE_SCOPE_NAMES = NO + +# If the SHOW_INCLUDE_FILES tag is set to YES then doxygen will put a list of +# the files that are included by a file in the documentation of that file. +# The default value is: YES. + +SHOW_INCLUDE_FILES = YES + +# If the SHOW_GROUPED_MEMB_INC tag is set to YES then Doxygen will add for each +# grouped member an include statement to the documentation, telling the reader +# which file to include in order to use the member. +# The default value is: NO. + +SHOW_GROUPED_MEMB_INC = NO + +# If the FORCE_LOCAL_INCLUDES tag is set to YES then doxygen will list include +# files with double quotes in the documentation rather than with sharp brackets. +# The default value is: NO. + +FORCE_LOCAL_INCLUDES = NO + +# If the INLINE_INFO tag is set to YES then a tag [inline] is inserted in the +# documentation for inline members. +# The default value is: YES. + +INLINE_INFO = YES + +# If the SORT_MEMBER_DOCS tag is set to YES then doxygen will sort the +# (detailed) documentation of file and class members alphabetically by member +# name. If set to NO the members will appear in declaration order. +# The default value is: YES. + +SORT_MEMBER_DOCS = YES + +# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the brief +# descriptions of file, namespace and class members alphabetically by member +# name. If set to NO the members will appear in declaration order. Note that +# this will also influence the order of the classes in the class list. +# The default value is: NO. + +SORT_BRIEF_DOCS = NO + +# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen will sort the +# (brief and detailed) documentation of class members so that constructors and +# destructors are listed first. If set to NO the constructors will appear in the +# respective orders defined by SORT_BRIEF_DOCS and SORT_MEMBER_DOCS. +# Note: If SORT_BRIEF_DOCS is set to NO this option is ignored for sorting brief +# member documentation. +# Note: If SORT_MEMBER_DOCS is set to NO this option is ignored for sorting +# detailed member documentation. +# The default value is: NO. + +SORT_MEMBERS_CTORS_1ST = NO + +# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the hierarchy +# of group names into alphabetical order. If set to NO the group names will +# appear in their defined order. +# The default value is: NO. + +SORT_GROUP_NAMES = NO + +# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be sorted by +# fully-qualified names, including namespaces. If set to NO, the class list will +# be sorted only by class name, not including the namespace part. +# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. +# Note: This option applies only to the class list, not to the alphabetical +# list. +# The default value is: NO. + +SORT_BY_SCOPE_NAME = NO + +# If the STRICT_PROTO_MATCHING option is enabled and doxygen fails to do proper +# type resolution of all parameters of a function it will reject a match between +# the prototype and the implementation of a member function even if there is +# only one candidate or it is obvious which candidate to choose by doing a +# simple string match. By disabling STRICT_PROTO_MATCHING doxygen will still +# accept a match between prototype and implementation in such cases. +# The default value is: NO. + +STRICT_PROTO_MATCHING = NO + +# The GENERATE_TODOLIST tag can be used to enable ( YES) or disable ( NO) the +# todo list. This list is created by putting \todo commands in the +# documentation. +# The default value is: YES. + +GENERATE_TODOLIST = YES + +# The GENERATE_TESTLIST tag can be used to enable ( YES) or disable ( NO) the +# test list. This list is created by putting \test commands in the +# documentation. +# The default value is: YES. + +GENERATE_TESTLIST = YES + +# The GENERATE_BUGLIST tag can be used to enable ( YES) or disable ( NO) the bug +# list. This list is created by putting \bug commands in the documentation. +# The default value is: YES. + +GENERATE_BUGLIST = YES + +# The GENERATE_DEPRECATEDLIST tag can be used to enable ( YES) or disable ( NO) +# the deprecated list. This list is created by putting \deprecated commands in +# the documentation. +# The default value is: YES. + +GENERATE_DEPRECATEDLIST= YES + +# The ENABLED_SECTIONS tag can be used to enable conditional documentation +# sections, marked by \if ... \endif and \cond +# ... \endcond blocks. + +ENABLED_SECTIONS = + +# The MAX_INITIALIZER_LINES tag determines the maximum number of lines that the +# initial value of a variable or macro / define can have for it to appear in the +# documentation. If the initializer consists of more lines than specified here +# it will be hidden. Use a value of 0 to hide initializers completely. The +# appearance of the value of individual variables and macros / defines can be +# controlled using \showinitializer or \hideinitializer command in the +# documentation regardless of this setting. +# Minimum value: 0, maximum value: 10000, default value: 30. + +MAX_INITIALIZER_LINES = 30 + +# Set the SHOW_USED_FILES tag to NO to disable the list of files generated at +# the bottom of the documentation of classes and structs. If set to YES the list +# will mention the files that were used to generate the documentation. +# The default value is: YES. + +SHOW_USED_FILES = YES + +# Set the SHOW_FILES tag to NO to disable the generation of the Files page. This +# will remove the Files entry from the Quick Index and from the Folder Tree View +# (if specified). +# The default value is: YES. + +SHOW_FILES = YES + +# Set the SHOW_NAMESPACES tag to NO to disable the generation of the Namespaces +# page. This will remove the Namespaces entry from the Quick Index and from the +# Folder Tree View (if specified). +# The default value is: YES. + +SHOW_NAMESPACES = YES + +# The FILE_VERSION_FILTER tag can be used to specify a program or script that +# doxygen should invoke to get the current version for each file (typically from +# the version control system). Doxygen will invoke the program by executing (via +# popen()) the command command input-file, where command is the value of the +# FILE_VERSION_FILTER tag, and input-file is the name of an input file provided +# by doxygen. Whatever the program writes to standard output is used as the file +# version. For an example see the documentation. + +FILE_VERSION_FILTER = + +# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed +# by doxygen. The layout file controls the global structure of the generated +# output files in an output format independent way. To create the layout file +# that represents doxygen's defaults, run doxygen with the -l option. You can +# optionally specify a file name after the option, if omitted DoxygenLayout.xml +# will be used as the name of the layout file. +# +# Note that if you run doxygen from a directory containing a file called +# DoxygenLayout.xml, doxygen will parse it automatically even if the LAYOUT_FILE +# tag is left empty. + +LAYOUT_FILE = + +# The CITE_BIB_FILES tag can be used to specify one or more bib files containing +# the reference definitions. This must be a list of .bib files. The .bib +# extension is automatically appended if omitted. This requires the bibtex tool +# to be installed. See also http://en.wikipedia.org/wiki/BibTeX for more info. +# For LaTeX the style of the bibliography can be controlled using +# LATEX_BIB_STYLE. To use this feature you need bibtex and perl available in the +# search path. Do not use file names with spaces, bibtex cannot handle them. See +# also \cite for info how to create references. + +CITE_BIB_FILES = + +#--------------------------------------------------------------------------- +# Configuration options related to warning and progress messages +#--------------------------------------------------------------------------- + +# The QUIET tag can be used to turn on/off the messages that are generated to +# standard output by doxygen. If QUIET is set to YES this implies that the +# messages are off. +# The default value is: NO. + +QUIET = NO + +# The WARNINGS tag can be used to turn on/off the warning messages that are +# generated to standard error ( stderr) by doxygen. If WARNINGS is set to YES +# this implies that the warnings are on. +# +# Tip: Turn warnings on while writing the documentation. +# The default value is: YES. + +WARNINGS = YES + +# If the WARN_IF_UNDOCUMENTED tag is set to YES, then doxygen will generate +# warnings for undocumented members. If EXTRACT_ALL is set to YES then this flag +# will automatically be disabled. +# The default value is: YES. + +WARN_IF_UNDOCUMENTED = YES + +# If the WARN_IF_DOC_ERROR tag is set to YES, doxygen will generate warnings for +# potential errors in the documentation, such as not documenting some parameters +# in a documented function, or documenting parameters that don't exist or using +# markup commands wrongly. +# The default value is: YES. + +WARN_IF_DOC_ERROR = YES + +# This WARN_NO_PARAMDOC option can be enabled to get warnings for functions that +# are documented, but have no documentation for their parameters or return +# value. If set to NO doxygen will only warn about wrong or incomplete parameter +# documentation, but not about the absence of documentation. +# The default value is: NO. + +WARN_NO_PARAMDOC = NO + +# The WARN_FORMAT tag determines the format of the warning messages that doxygen +# can produce. The string should contain the $file, $line, and $text tags, which +# will be replaced by the file and line number from which the warning originated +# and the warning text. Optionally the format may contain $version, which will +# be replaced by the version of the file (if it could be obtained via +# FILE_VERSION_FILTER) +# The default value is: $file:$line: $text. + +WARN_FORMAT = "$file:$line: $text" + +# The WARN_LOGFILE tag can be used to specify a file to which warning and error +# messages should be written. If left blank the output is written to standard +# error (stderr). + +WARN_LOGFILE = + +#--------------------------------------------------------------------------- +# Configuration options related to the input files +#--------------------------------------------------------------------------- + +# The INPUT tag is used to specify the files and/or directories that contain +# documented source files. You may enter file names like myfile.cpp or +# directories like /usr/src/myproject. Separate the files or directories with +# spaces. +# Note: If this tag is empty the current directory is searched. + +INPUT = + +# This tag can be used to specify the character encoding of the source files +# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses +# libiconv (or the iconv built into libc) for the transcoding. See the libiconv +# documentation (see: http://www.gnu.org/software/libiconv) for the list of +# possible encodings. +# The default value is: UTF-8. + +INPUT_ENCODING = UTF-8 + +# If the value of the INPUT tag contains directories, you can use the +# FILE_PATTERNS tag to specify one or more wildcard patterns (like *.cpp and +# *.h) to filter out the source-files in the directories. If left blank the +# following patterns are tested:*.c, *.cc, *.cxx, *.cpp, *.c++, *.java, *.ii, +# *.ixx, *.ipp, *.i++, *.inl, *.idl, *.ddl, *.odl, *.h, *.hh, *.hxx, *.hpp, +# *.h++, *.cs, *.d, *.php, *.php4, *.php5, *.phtml, *.inc, *.m, *.markdown, +# *.md, *.mm, *.dox, *.py, *.f90, *.f, *.for, *.tcl, *.vhd, *.vhdl, *.ucf, +# *.qsf, *.as and *.js. + +FILE_PATTERNS = *.c \ + *.cc \ + *.cxx \ + *.cpp \ + *.c++ \ + *.java \ + *.ii \ + *.ixx \ + *.ipp \ + *.i++ \ + *.inl \ + *.idl \ + *.ddl \ + *.odl \ + *.h \ + *.hh \ + *.hxx \ + *.hpp \ + *.h++ \ + *.cs \ + *.d \ + *.php \ + *.php4 \ + *.php5 \ + *.phtml \ + *.inc \ + *.m \ + *.markdown \ + *.md \ + *.mm \ + *.dox \ + *.py \ + *.f90 \ + *.f \ + *.for \ + *.tcl \ + *.vhd \ + *.vhdl \ + *.ucf \ + *.qsf \ + *.as \ + *.js + +# The RECURSIVE tag can be used to specify whether or not subdirectories should +# be searched for input files as well. +# The default value is: NO. + +RECURSIVE = YES + +# The EXCLUDE tag can be used to specify files and/or directories that should be +# excluded from the INPUT source files. This way you can easily exclude a +# subdirectory from a directory tree whose root is specified with the INPUT tag. +# +# Note that relative paths are relative to the directory from which doxygen is +# run. + +EXCLUDE = + +# The EXCLUDE_SYMLINKS tag can be used to select whether or not files or +# directories that are symbolic links (a Unix file system feature) are excluded +# from the input. +# The default value is: NO. + +EXCLUDE_SYMLINKS = NO + +# If the value of the INPUT tag contains directories, you can use the +# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude +# certain files from those directories. +# +# Note that the wildcards are matched against the file with absolute path, so to +# exclude all test directories for example use the pattern */test/* + +EXCLUDE_PATTERNS = + +# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names +# (namespaces, classes, functions, etc.) that should be excluded from the +# output. The symbol name can be a fully qualified name, a word, or if the +# wildcard * is used, a substring. Examples: ANamespace, AClass, +# AClass::ANamespace, ANamespace::*Test +# +# Note that the wildcards are matched against the file with absolute path, so to +# exclude all test directories use the pattern */test/* + +EXCLUDE_SYMBOLS = + +# The EXAMPLE_PATH tag can be used to specify one or more files or directories +# that contain example code fragments that are included (see the \include +# command). + +EXAMPLE_PATH = + +# If the value of the EXAMPLE_PATH tag contains directories, you can use the +# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp and +# *.h) to filter out the source-files in the directories. If left blank all +# files are included. + +EXAMPLE_PATTERNS = * + +# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be +# searched for input files to be used with the \include or \dontinclude commands +# irrespective of the value of the RECURSIVE tag. +# The default value is: NO. + +EXAMPLE_RECURSIVE = NO + +# The IMAGE_PATH tag can be used to specify one or more files or directories +# that contain images that are to be included in the documentation (see the +# \image command). + +IMAGE_PATH = + +# The INPUT_FILTER tag can be used to specify a program that doxygen should +# invoke to filter for each input file. Doxygen will invoke the filter program +# by executing (via popen()) the command: +# +# +# +# where is the value of the INPUT_FILTER tag, and is the +# name of an input file. Doxygen will then use the output that the filter +# program writes to standard output. If FILTER_PATTERNS is specified, this tag +# will be ignored. +# +# Note that the filter must not add or remove lines; it is applied before the +# code is scanned, but not when the output code is generated. If lines are added +# or removed, the anchors will not be placed correctly. + +INPUT_FILTER = + +# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern +# basis. Doxygen will compare the file name with each pattern and apply the +# filter if there is a match. The filters are a list of the form: pattern=filter +# (like *.cpp=my_cpp_filter). See INPUT_FILTER for further information on how +# filters are used. If the FILTER_PATTERNS tag is empty or if none of the +# patterns match the file name, INPUT_FILTER is applied. + +FILTER_PATTERNS = + +# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using +# INPUT_FILTER ) will also be used to filter the input files that are used for +# producing the source files to browse (i.e. when SOURCE_BROWSER is set to YES). +# The default value is: NO. + +FILTER_SOURCE_FILES = NO + +# The FILTER_SOURCE_PATTERNS tag can be used to specify source filters per file +# pattern. A pattern will override the setting for FILTER_PATTERN (if any) and +# it is also possible to disable source filtering for a specific pattern using +# *.ext= (so without naming a filter). +# This tag requires that the tag FILTER_SOURCE_FILES is set to YES. + +FILTER_SOURCE_PATTERNS = + +# If the USE_MDFILE_AS_MAINPAGE tag refers to the name of a markdown file that +# is part of the input, its contents will be placed on the main page +# (index.html). This can be useful if you have a project on for instance GitHub +# and want to reuse the introduction page also for the doxygen output. + +USE_MDFILE_AS_MAINPAGE = + +#--------------------------------------------------------------------------- +# Configuration options related to source browsing +#--------------------------------------------------------------------------- + +# If the SOURCE_BROWSER tag is set to YES then a list of source files will be +# generated. Documented entities will be cross-referenced with these sources. +# +# Note: To get rid of all source code in the generated output, make sure that +# also VERBATIM_HEADERS is set to NO. +# The default value is: NO. + +SOURCE_BROWSER = NO + +# Setting the INLINE_SOURCES tag to YES will include the body of functions, +# classes and enums directly into the documentation. +# The default value is: NO. + +INLINE_SOURCES = NO + +# Setting the STRIP_CODE_COMMENTS tag to YES will instruct doxygen to hide any +# special comment blocks from generated source code fragments. Normal C, C++ and +# Fortran comments will always remain visible. +# The default value is: YES. + +STRIP_CODE_COMMENTS = YES + +# If the REFERENCED_BY_RELATION tag is set to YES then for each documented +# function all documented functions referencing it will be listed. +# The default value is: NO. + +REFERENCED_BY_RELATION = NO + +# If the REFERENCES_RELATION tag is set to YES then for each documented function +# all documented entities called/used by that function will be listed. +# The default value is: NO. + +REFERENCES_RELATION = NO + +# If the REFERENCES_LINK_SOURCE tag is set to YES and SOURCE_BROWSER tag is set +# to YES, then the hyperlinks from functions in REFERENCES_RELATION and +# REFERENCED_BY_RELATION lists will link to the source code. Otherwise they will +# link to the documentation. +# The default value is: YES. + +REFERENCES_LINK_SOURCE = YES + +# If SOURCE_TOOLTIPS is enabled (the default) then hovering a hyperlink in the +# source code will show a tooltip with additional information such as prototype, +# brief description and links to the definition and documentation. Since this +# will make the HTML file larger and loading of large files a bit slower, you +# can opt to disable this feature. +# The default value is: YES. +# This tag requires that the tag SOURCE_BROWSER is set to YES. + +SOURCE_TOOLTIPS = YES + +# If the USE_HTAGS tag is set to YES then the references to source code will +# point to the HTML generated by the htags(1) tool instead of doxygen built-in +# source browser. The htags tool is part of GNU's global source tagging system +# (see http://www.gnu.org/software/global/global.html). You will need version +# 4.8.6 or higher. +# +# To use it do the following: +# - Install the latest version of global +# - Enable SOURCE_BROWSER and USE_HTAGS in the config file +# - Make sure the INPUT points to the root of the source tree +# - Run doxygen as normal +# +# Doxygen will invoke htags (and that will in turn invoke gtags), so these +# tools must be available from the command line (i.e. in the search path). +# +# The result: instead of the source browser generated by doxygen, the links to +# source code will now point to the output of htags. +# The default value is: NO. +# This tag requires that the tag SOURCE_BROWSER is set to YES. + +USE_HTAGS = NO + +# If the VERBATIM_HEADERS tag is set the YES then doxygen will generate a +# verbatim copy of the header file for each class for which an include is +# specified. Set to NO to disable this. +# See also: Section \class. +# The default value is: YES. + +VERBATIM_HEADERS = YES + +#--------------------------------------------------------------------------- +# Configuration options related to the alphabetical class index +#--------------------------------------------------------------------------- + +# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index of all +# compounds will be generated. Enable this if the project contains a lot of +# classes, structs, unions or interfaces. +# The default value is: YES. + +ALPHABETICAL_INDEX = YES + +# The COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns in +# which the alphabetical index list will be split. +# Minimum value: 1, maximum value: 20, default value: 5. +# This tag requires that the tag ALPHABETICAL_INDEX is set to YES. + +COLS_IN_ALPHA_INDEX = 5 + +# In case all classes in a project start with a common prefix, all classes will +# be put under the same header in the alphabetical index. The IGNORE_PREFIX tag +# can be used to specify a prefix (or a list of prefixes) that should be ignored +# while generating the index headers. +# This tag requires that the tag ALPHABETICAL_INDEX is set to YES. + +IGNORE_PREFIX = + +#--------------------------------------------------------------------------- +# Configuration options related to the HTML output +#--------------------------------------------------------------------------- + +# If the GENERATE_HTML tag is set to YES doxygen will generate HTML output +# The default value is: YES. + +GENERATE_HTML = YES + +# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. If a +# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of +# it. +# The default directory is: html. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_OUTPUT = html + +# The HTML_FILE_EXTENSION tag can be used to specify the file extension for each +# generated HTML page (for example: .htm, .php, .asp). +# The default value is: .html. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_FILE_EXTENSION = .html + +# The HTML_HEADER tag can be used to specify a user-defined HTML header file for +# each generated HTML page. If the tag is left blank doxygen will generate a +# standard header. +# +# To get valid HTML the header file that includes any scripts and style sheets +# that doxygen needs, which is dependent on the configuration options used (e.g. +# the setting GENERATE_TREEVIEW). It is highly recommended to start with a +# default header using +# doxygen -w html new_header.html new_footer.html new_stylesheet.css +# YourConfigFile +# and then modify the file new_header.html. See also section "Doxygen usage" +# for information on how to generate the default header that doxygen normally +# uses. +# Note: The header is subject to change so you typically have to regenerate the +# default header when upgrading to a newer version of doxygen. For a description +# of the possible markers and block names see the documentation. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_HEADER = + +# The HTML_FOOTER tag can be used to specify a user-defined HTML footer for each +# generated HTML page. If the tag is left blank doxygen will generate a standard +# footer. See HTML_HEADER for more information on how to generate a default +# footer and what special commands can be used inside the footer. See also +# section "Doxygen usage" for information on how to generate the default footer +# that doxygen normally uses. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_FOOTER = + +# The HTML_STYLESHEET tag can be used to specify a user-defined cascading style +# sheet that is used by each HTML page. It can be used to fine-tune the look of +# the HTML output. If left blank doxygen will generate a default style sheet. +# See also section "Doxygen usage" for information on how to generate the style +# sheet that doxygen normally uses. +# Note: It is recommended to use HTML_EXTRA_STYLESHEET instead of this tag, as +# it is more robust and this tag (HTML_STYLESHEET) will in the future become +# obsolete. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_STYLESHEET = + +# The HTML_EXTRA_STYLESHEET tag can be used to specify an additional user- +# defined cascading style sheet that is included after the standard style sheets +# created by doxygen. Using this option one can overrule certain style aspects. +# This is preferred over using HTML_STYLESHEET since it does not replace the +# standard style sheet and is therefor more robust against future updates. +# Doxygen will copy the style sheet file to the output directory. For an example +# see the documentation. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_EXTRA_STYLESHEET = + +# The HTML_EXTRA_FILES tag can be used to specify one or more extra images or +# other source files which should be copied to the HTML output directory. Note +# that these files will be copied to the base HTML output directory. Use the +# $relpath^ marker in the HTML_HEADER and/or HTML_FOOTER files to load these +# files. In the HTML_STYLESHEET file, use the file name only. Also note that the +# files will be copied as-is; there are no commands or markers available. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_EXTRA_FILES = + +# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. Doxygen +# will adjust the colors in the stylesheet and background images according to +# this color. Hue is specified as an angle on a colorwheel, see +# http://en.wikipedia.org/wiki/Hue for more information. For instance the value +# 0 represents red, 60 is yellow, 120 is green, 180 is cyan, 240 is blue, 300 +# purple, and 360 is red again. +# Minimum value: 0, maximum value: 359, default value: 220. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_COLORSTYLE_HUE = 220 + +# The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of the colors +# in the HTML output. For a value of 0 the output will use grayscales only. A +# value of 255 will produce the most vivid colors. +# Minimum value: 0, maximum value: 255, default value: 100. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_COLORSTYLE_SAT = 100 + +# The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to the +# luminance component of the colors in the HTML output. Values below 100 +# gradually make the output lighter, whereas values above 100 make the output +# darker. The value divided by 100 is the actual gamma applied, so 80 represents +# a gamma of 0.8, The value 220 represents a gamma of 2.2, and 100 does not +# change the gamma. +# Minimum value: 40, maximum value: 240, default value: 80. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_COLORSTYLE_GAMMA = 80 + +# If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML +# page will contain the date and time when the page was generated. Setting this +# to NO can help when comparing the output of multiple runs. +# The default value is: YES. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_TIMESTAMP = YES + +# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML +# documentation will contain sections that can be hidden and shown after the +# page has loaded. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_DYNAMIC_SECTIONS = NO + +# With HTML_INDEX_NUM_ENTRIES one can control the preferred number of entries +# shown in the various tree structured indices initially; the user can expand +# and collapse entries dynamically later on. Doxygen will expand the tree to +# such a level that at most the specified number of entries are visible (unless +# a fully collapsed tree already exceeds this amount). So setting the number of +# entries 1 will produce a full collapsed tree by default. 0 is a special value +# representing an infinite number of entries and will result in a full expanded +# tree by default. +# Minimum value: 0, maximum value: 9999, default value: 100. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_INDEX_NUM_ENTRIES = 100 + +# If the GENERATE_DOCSET tag is set to YES, additional index files will be +# generated that can be used as input for Apple's Xcode 3 integrated development +# environment (see: http://developer.apple.com/tools/xcode/), introduced with +# OSX 10.5 (Leopard). To create a documentation set, doxygen will generate a +# Makefile in the HTML output directory. Running make will produce the docset in +# that directory and running make install will install the docset in +# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find it at +# startup. See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html +# for more information. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +GENERATE_DOCSET = NO + +# This tag determines the name of the docset feed. A documentation feed provides +# an umbrella under which multiple documentation sets from a single provider +# (such as a company or product suite) can be grouped. +# The default value is: Doxygen generated docs. +# This tag requires that the tag GENERATE_DOCSET is set to YES. + +DOCSET_FEEDNAME = "Doxygen generated docs" + +# This tag specifies a string that should uniquely identify the documentation +# set bundle. This should be a reverse domain-name style string, e.g. +# com.mycompany.MyDocSet. Doxygen will append .docset to the name. +# The default value is: org.doxygen.Project. +# This tag requires that the tag GENERATE_DOCSET is set to YES. + +DOCSET_BUNDLE_ID = org.doxygen.Project + +# The DOCSET_PUBLISHER_ID tag specifies a string that should uniquely identify +# the documentation publisher. This should be a reverse domain-name style +# string, e.g. com.mycompany.MyDocSet.documentation. +# The default value is: org.doxygen.Publisher. +# This tag requires that the tag GENERATE_DOCSET is set to YES. + +DOCSET_PUBLISHER_ID = org.doxygen.Publisher + +# The DOCSET_PUBLISHER_NAME tag identifies the documentation publisher. +# The default value is: Publisher. +# This tag requires that the tag GENERATE_DOCSET is set to YES. + +DOCSET_PUBLISHER_NAME = Publisher + +# If the GENERATE_HTMLHELP tag is set to YES then doxygen generates three +# additional HTML index files: index.hhp, index.hhc, and index.hhk. The +# index.hhp is a project file that can be read by Microsoft's HTML Help Workshop +# (see: http://www.microsoft.com/en-us/download/details.aspx?id=21138) on +# Windows. +# +# The HTML Help Workshop contains a compiler that can convert all HTML output +# generated by doxygen into a single compiled HTML file (.chm). Compiled HTML +# files are now used as the Windows 98 help format, and will replace the old +# Windows help format (.hlp) on all Windows platforms in the future. Compressed +# HTML files also contain an index, a table of contents, and you can search for +# words in the documentation. The HTML workshop also contains a viewer for +# compressed HTML files. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +GENERATE_HTMLHELP = NO + +# The CHM_FILE tag can be used to specify the file name of the resulting .chm +# file. You can add a path in front of the file if the result should not be +# written to the html output directory. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. + +CHM_FILE = + +# The HHC_LOCATION tag can be used to specify the location (absolute path +# including file name) of the HTML help compiler ( hhc.exe). If non-empty +# doxygen will try to run the HTML help compiler on the generated index.hhp. +# The file has to be specified with full path. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. + +HHC_LOCATION = + +# The GENERATE_CHI flag controls if a separate .chi index file is generated ( +# YES) or that it should be included in the master .chm file ( NO). +# The default value is: NO. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. + +GENERATE_CHI = NO + +# The CHM_INDEX_ENCODING is used to encode HtmlHelp index ( hhk), content ( hhc) +# and project file content. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. + +CHM_INDEX_ENCODING = + +# The BINARY_TOC flag controls whether a binary table of contents is generated ( +# YES) or a normal table of contents ( NO) in the .chm file. Furthermore it +# enables the Previous and Next buttons. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. + +BINARY_TOC = NO + +# The TOC_EXPAND flag can be set to YES to add extra items for group members to +# the table of contents of the HTML help documentation and to the tree view. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. + +TOC_EXPAND = NO + +# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and +# QHP_VIRTUAL_FOLDER are set, an additional index file will be generated that +# can be used as input for Qt's qhelpgenerator to generate a Qt Compressed Help +# (.qch) of the generated HTML documentation. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +GENERATE_QHP = NO + +# If the QHG_LOCATION tag is specified, the QCH_FILE tag can be used to specify +# the file name of the resulting .qch file. The path specified is relative to +# the HTML output folder. +# This tag requires that the tag GENERATE_QHP is set to YES. + +QCH_FILE = + +# The QHP_NAMESPACE tag specifies the namespace to use when generating Qt Help +# Project output. For more information please see Qt Help Project / Namespace +# (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#namespace). +# The default value is: org.doxygen.Project. +# This tag requires that the tag GENERATE_QHP is set to YES. + +QHP_NAMESPACE = org.doxygen.Project + +# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating Qt +# Help Project output. For more information please see Qt Help Project / Virtual +# Folders (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#virtual- +# folders). +# The default value is: doc. +# This tag requires that the tag GENERATE_QHP is set to YES. + +QHP_VIRTUAL_FOLDER = doc + +# If the QHP_CUST_FILTER_NAME tag is set, it specifies the name of a custom +# filter to add. For more information please see Qt Help Project / Custom +# Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom- +# filters). +# This tag requires that the tag GENERATE_QHP is set to YES. + +QHP_CUST_FILTER_NAME = + +# The QHP_CUST_FILTER_ATTRS tag specifies the list of the attributes of the +# custom filter to add. For more information please see Qt Help Project / Custom +# Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom- +# filters). +# This tag requires that the tag GENERATE_QHP is set to YES. + +QHP_CUST_FILTER_ATTRS = + +# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this +# project's filter section matches. Qt Help Project / Filter Attributes (see: +# http://qt-project.org/doc/qt-4.8/qthelpproject.html#filter-attributes). +# This tag requires that the tag GENERATE_QHP is set to YES. + +QHP_SECT_FILTER_ATTRS = + +# The QHG_LOCATION tag can be used to specify the location of Qt's +# qhelpgenerator. If non-empty doxygen will try to run qhelpgenerator on the +# generated .qhp file. +# This tag requires that the tag GENERATE_QHP is set to YES. + +QHG_LOCATION = + +# If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files will be +# generated, together with the HTML files, they form an Eclipse help plugin. To +# install this plugin and make it available under the help contents menu in +# Eclipse, the contents of the directory containing the HTML and XML files needs +# to be copied into the plugins directory of eclipse. The name of the directory +# within the plugins directory should be the same as the ECLIPSE_DOC_ID value. +# After copying Eclipse needs to be restarted before the help appears. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +GENERATE_ECLIPSEHELP = NO + +# A unique identifier for the Eclipse help plugin. When installing the plugin +# the directory name containing the HTML and XML files should also have this +# name. Each documentation set should have its own identifier. +# The default value is: org.doxygen.Project. +# This tag requires that the tag GENERATE_ECLIPSEHELP is set to YES. + +ECLIPSE_DOC_ID = org.doxygen.Project + +# If you want full control over the layout of the generated HTML pages it might +# be necessary to disable the index and replace it with your own. The +# DISABLE_INDEX tag can be used to turn on/off the condensed index (tabs) at top +# of each HTML page. A value of NO enables the index and the value YES disables +# it. Since the tabs in the index contain the same information as the navigation +# tree, you can set this option to YES if you also set GENERATE_TREEVIEW to YES. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +DISABLE_INDEX = NO + +# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index +# structure should be generated to display hierarchical information. If the tag +# value is set to YES, a side panel will be generated containing a tree-like +# index structure (just like the one that is generated for HTML Help). For this +# to work a browser that supports JavaScript, DHTML, CSS and frames is required +# (i.e. any modern browser). Windows users are probably better off using the +# HTML help feature. Via custom stylesheets (see HTML_EXTRA_STYLESHEET) one can +# further fine-tune the look of the index. As an example, the default style +# sheet generated by doxygen has an example that shows how to put an image at +# the root of the tree instead of the PROJECT_NAME. Since the tree basically has +# the same information as the tab index, you could consider setting +# DISABLE_INDEX to YES when enabling this option. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +GENERATE_TREEVIEW = NO + +# The ENUM_VALUES_PER_LINE tag can be used to set the number of enum values that +# doxygen will group on one line in the generated HTML documentation. +# +# Note that a value of 0 will completely suppress the enum values from appearing +# in the overview section. +# Minimum value: 0, maximum value: 20, default value: 4. +# This tag requires that the tag GENERATE_HTML is set to YES. + +ENUM_VALUES_PER_LINE = 4 + +# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be used +# to set the initial width (in pixels) of the frame in which the tree is shown. +# Minimum value: 0, maximum value: 1500, default value: 250. +# This tag requires that the tag GENERATE_HTML is set to YES. + +TREEVIEW_WIDTH = 250 + +# When the EXT_LINKS_IN_WINDOW option is set to YES doxygen will open links to +# external symbols imported via tag files in a separate window. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +EXT_LINKS_IN_WINDOW = NO + +# Use this tag to change the font size of LaTeX formulas included as images in +# the HTML documentation. When you change the font size after a successful +# doxygen run you need to manually remove any form_*.png images from the HTML +# output directory to force them to be regenerated. +# Minimum value: 8, maximum value: 50, default value: 10. +# This tag requires that the tag GENERATE_HTML is set to YES. + +FORMULA_FONTSIZE = 10 + +# Use the FORMULA_TRANPARENT tag to determine whether or not the images +# generated for formulas are transparent PNGs. Transparent PNGs are not +# supported properly for IE 6.0, but are supported on all modern browsers. +# +# Note that when changing this option you need to delete any form_*.png files in +# the HTML output directory before the changes have effect. +# The default value is: YES. +# This tag requires that the tag GENERATE_HTML is set to YES. + +FORMULA_TRANSPARENT = YES + +# Enable the USE_MATHJAX option to render LaTeX formulas using MathJax (see +# http://www.mathjax.org) which uses client side Javascript for the rendering +# instead of using prerendered bitmaps. Use this if you do not have LaTeX +# installed or if you want to formulas look prettier in the HTML output. When +# enabled you may also need to install MathJax separately and configure the path +# to it using the MATHJAX_RELPATH option. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +USE_MATHJAX = NO + +# When MathJax is enabled you can set the default output format to be used for +# the MathJax output. See the MathJax site (see: +# http://docs.mathjax.org/en/latest/output.html) for more details. +# Possible values are: HTML-CSS (which is slower, but has the best +# compatibility), NativeMML (i.e. MathML) and SVG. +# The default value is: HTML-CSS. +# This tag requires that the tag USE_MATHJAX is set to YES. + +MATHJAX_FORMAT = HTML-CSS + +# When MathJax is enabled you need to specify the location relative to the HTML +# output directory using the MATHJAX_RELPATH option. The destination directory +# should contain the MathJax.js script. For instance, if the mathjax directory +# is located at the same level as the HTML output directory, then +# MATHJAX_RELPATH should be ../mathjax. The default value points to the MathJax +# Content Delivery Network so you can quickly see the result without installing +# MathJax. However, it is strongly recommended to install a local copy of +# MathJax from http://www.mathjax.org before deployment. +# The default value is: http://cdn.mathjax.org/mathjax/latest. +# This tag requires that the tag USE_MATHJAX is set to YES. + +MATHJAX_RELPATH = http://cdn.mathjax.org/mathjax/latest + +# The MATHJAX_EXTENSIONS tag can be used to specify one or more MathJax +# extension names that should be enabled during MathJax rendering. For example +# MATHJAX_EXTENSIONS = TeX/AMSmath TeX/AMSsymbols +# This tag requires that the tag USE_MATHJAX is set to YES. + +MATHJAX_EXTENSIONS = + +# The MATHJAX_CODEFILE tag can be used to specify a file with javascript pieces +# of code that will be used on startup of the MathJax code. See the MathJax site +# (see: http://docs.mathjax.org/en/latest/output.html) for more details. For an +# example see the documentation. +# This tag requires that the tag USE_MATHJAX is set to YES. + +MATHJAX_CODEFILE = + +# When the SEARCHENGINE tag is enabled doxygen will generate a search box for +# the HTML output. The underlying search engine uses javascript and DHTML and +# should work on any modern browser. Note that when using HTML help +# (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets (GENERATE_DOCSET) +# there is already a search function so this one should typically be disabled. +# For large projects the javascript based search engine can be slow, then +# enabling SERVER_BASED_SEARCH may provide a better solution. It is possible to +# search using the keyboard; to jump to the search box use + S +# (what the is depends on the OS and browser, but it is typically +# , /